4 ms·
Yes, Alpine's APKBUILD seems to be very much modelled after PKGBUILD, and "abuild" sounds analogous to "makepkg". It's also 100% shell, but it uses busybox ash
by chubot 9y ago
Yes, Alpine's APKBUILD seems to be very much modelled after PKGBUILD, and "abuild" sounds analogous to "makepkg". It's also 100% shell, but it uses busybox ash rather than bash.
I prefer pure hand-written shell to an unholy mix of auto-generated shell and Make. The latter is what I remember Debian's build system to be, although admittedly I haven't looked at it in awhile.
- jhasse 9y agoAlpine's apk-build was also written in Shell, but rewritten in C: https://github.com/alpinelinux/apk-tools https://github.com/alpinelinux/apk-tools I wonder what the reason was.
- chubot 9y agoThere is "abuild" to build packages, and "apk" for users to install packages. abuild is definitely still in shell (~2600 lines). I'm not sure if apk used to be in shell, but I wouldn't be surprised if it were. If you have a link to the old version I'm interested. I think the main reason not to use shell for the user side is the version solver. To install packages, you have to solve dependency constraints, which is actually an NP-complete problem! Those heuristics are best coded in C. In contrast, the build side doesn't have to do anything like that, or it can just shell out to "apk" if it does.
- Santosh83 9y agoUsually rewrites to C are for performance and portability. In this case I suspect the former.