On 2/7/19 8:00 PM, james harvey via arch-projects wrote:
I guess I'm abusing devtools a bit, as a few others are. I use devtools to build modified official packages when necessary, and to build AUR packages even if they depend on other AUR packages. I add a local repository to "/usr/share/devtools/pacman-extra.conf", and to /etc/pacman.conf as a CacheDir so it is bind mounted. I also add to "COMPRESSXZ" "--threads=0" to "/usr/share/devtools/makepkg-x86_64.conf".
Maybe others using devtools similarly are using a customized version of archbuild using its own pacman and makepkg conf files, which is what I used to do. I stopped so when devtools updates its conf files, it would overwrite my changes and I'd just add them back in. Otherwise, I might miss merging changes into mine.
You can override pacman.conf much more simply. sudo cp /usr/share/devtools/pacman-{extra,myrepo}.conf sudoedit /usr/share/devtools/pacman-myrepo.conf sudo ln -s archbuild /usr/bin/myrepo-x86_64-build Then build packages using `myrepo-x86_64-build`, and instead of building against the "extra" target, you will be building against the "myrepo" target. Changing makepkg.conf is usually somewhat questionable. What's the goal -- changing COMPRESSXZ seems rather wasteful since you could just set PKGEXT='.pkg.tar' and not compress at all, if you're worried about how long it takes.
Or, maybe they run mkarchroot/arch-nspawn/makechrootpkg directly.
Using makechrootpkg sounds like an excellent idea. The purpose of archbuild is to provide presets for makechrootpkg and to run mkarchroot automatically for you on demand, but you explicitly don't want those presets, so... why? Why use it? The only thing that keeps on rewriting your makepkg.conf inside the chroot, is archbuild. Just create a bashrc: alias chrootbuild="makechrootpkg -r /var/lib/archbuild/myrepo-x86_64" and you're reimplemented the most significant part of every devtools wrapper ever.
Or, maybe they use graysky2's clean-chroot-manager, which I haven't looked at yet.
Basically the alias except it also tries to do complex magic with distcc.
It still seems odd to me for "/usr/share/devtools/*.conf" to show variables that are never read from it, and personally would replace those with a comment referring to /etc/makepkg.conf, but I respect if the answer is that I shouldn't have been confused because I shouldn't have been looking at them in the first place.
It's perfectly possible to "arch-nspawn -M /etc/makepkg.conf" and install your regular makepkg.conf into the chroot, and if that happens then you also have things being ignored. /etc/makepkg.conf will be *overridden* by $HOME/.config/pacman/makepkg.conf, and makechrootpkg will likewise be *overridden* by these variables. I don't see the benefit of creating differences between the devtools/makepkg.conf and the one that comes as stock in pacman, just for this. -- Eli Schwartz Bug Wrangler and Trusted User