[arch-general] How to build package in "clean chroot" using the "-U" parameter?
Manuel.Spam at nurfuerspam.de
Fri Dec 22 16:55:52 UTC 2017
On 12/22/2017 03:17 PM, Giancarlo Razzolini via arch-general wrote:
> Well, so far you said you want to autobuild some packages and that it
> MUST run
> as root, with no good reason why.
I have a set of PKGBUILD's (around 40) and a self-made "build system":
The autobuild system works completely without user interaction. You just
call "repo-make" and it will do *everything* that is needed to finally
have a working local repository.
This is meant to be used on a dedicated build VM and never on any
Now my idea was to improve this process by doing every build in a chroot
So far my build system does things like installing packages directly, so
makepkg never has to do this as this would cause silly sudo password
prompts that I don't want to have in a fully automated build.
> There's no reason to change the way the software gets built either. It
> to me you're trying to avoid some extra work by running everything as root.
I want to avoid unnecessary work that is not needed on a system that is
meant only to be used to build some packages. If I ever trash this
system, I just restore the VM from a backup.
> If you share more of what you're trying to do, and your goals, perhaps
> we can
> help more. So far it seems like a mild XY problem.
I have an existing build system that I call with root permissions and
from this point on it does everything on its own. Including creating the
required build user, fetching build dependencies, building packages in
context of the build user, ...
My idea was to make use of "chroot building" to have a clean state of
packages for every build. If this is possible, I would add this. If
fully automated processing doesn't work with the existing tools, I'll
stick with my way and keep building without chroot.
More information about the arch-general