Re:Using NetBSD’s pkgsrc everywhere I can
by Foxboron on Wednesday May 26, 2021 @04:51PM
(#27295940)
We are missing unprivileged builds and clean chroot builds for `makepkg`. Our interal devtools uses `systemd-nspawn` which requires root. But that should be easy to implement with the leftover code we tried to use with our reproducible builds tooling.
https://github.com/archlinux/archlinux-repro/pull/70
Maybe a weekend hack to wrap `makepkg` with this.
- With both the community-maintained packages and the AUR packages, you can already find almost any binary that already exists
- If it doesn't exist, or if you need particular options/architectures, a PKGBUILD is basically a glorified Makefile with standard steps, so you can for example get binaries from a http source and use them directly, or pass exotic compilation flags during the build() phase
- It is of course possible to put dependencies inside a given package
- preparing a package is entirely done by your user, no need for root right. Inside the package you put your files in a fake root, and when the package is done you apply the package to your real fs. By default it is installed under /, so of course you need root rights, but you can install it under any root you desire. This is actually what's done when installing Arch: it basically runs pacman (the package manager) but instead of installing packages in the live environment's root, it installs packages in the mounted filesystem that will become your root after rebooting.