


























Thank you for your help. I have updated the package accordingly. I will look into replacing emsdk in the future as well.
I looked into emsdk and it looks to me to be very useless. It just downloads a pinned version of node (node-lts-iron) and emscripten. And worse, it downloads into /usr with no possibility of changing it. I would try to ditch this and use the official packages.
That said, I think it should be possible to "vendor" emsdk such that it downloads its files during prepare() like it suggested previously. Not ideal though.
Below the changes I suggest to the PKGBUILD (untested! it may need some tweaks (and fill the blanks)). Change the emsdk version if needed (and update checksums).
_emsdk=4.0.8
source=("git+$url"
"emsdk-$pkgver.tar.gz::https://github.com/emscripten-core/emsdk/archive/refs/tags/$_emsdk.tar.gz")
prepare() {
cd emsdk-$_emsdk
./emsdk install latest
}
build() {
"$srcdir"/emsdk-$_emsdk/emsdk activate latest
source "$srcdir"/emsdk-$_emsdk/emsdk_env.sh
# continue the build process...
}
I understand the issue, but as I guess you realize, this is a could have a big security impact. And using sudo is forbidden according to the guidelines. I suggest:
emsdk has a destination flag at install, so you can temporarily install in $srcdir and calling it from there. You'll need to update the PATH I would guess.emsdk such that the post-installation script are called from build(), so one does not need to call sudo emsdk install, but not sure whether this is possible or makes sense.Also, I noticed that the package penpot does not need to call emsdk install, so maybe all of this is unnecessary? (of course, it could be that package is broken...)
The reason sudo was used is that the required make dependency emsdk does not automatically initialize when installed. If you have an alternative to using sudo for the initialization step, please let me know.
please do not use sudo in PKGBUILDs
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
When trying to build this myself, I noticed a couple issues with the
PKGBUILDfilesudomake dependency is unused, and can be removedemscriptenfor the build, you need python, sopythonshould be inmakedependselectron-builderlooks forlibcrypt.so.1, which isn't required by any of the make dependencies, so it should be added to themakedependswithlibcrypt.so=1ldd, andadvantagescopeexecutable doesn't dynamically link tolibcrypt.so.1, so I don't think it is required at runtime, but it could load it in a different way, and I can't easily check if it runs properly withoutlibcrypt.so.1because I havelibcrypt.so.1on my machine..pacmanfile is based off the latest commit version, while the actual version is in thepackage.jsonfile. you should eitherpackage.jsonand use that when extracting the filespackage.jsonfile with the package versionpkgverformat produces versions thatelectron-builderrejects for being invalidLICENSEfile is still there from the git cloneI did implement and test all the changes I mentioned, so feel free to reach out over email if you want me to send you a patch file.