[arch-general] How to build package in "clean chroot" using the "-U" parameter?
Manuel.Spam at nurfuerspam.de
Fri Dec 22 13:02:46 UTC 2017
I want to autobuild a set of packages. For this process, it is not
acceptable to use "sudo" as I don't want to enter some passwords and my
autobuild program also has to do some other stuff with root privileges.
The help page of "makechrootpkg" suggests, that there is an option for me:
-U Run makepkg as a specified user
But I tried this several times. So far without success.
I've copied the PKGBUILD to the /tmp directory, just to be sure it is
really readable by my build user.
Then my command was:
# makechrootpkg -c -U build -r /var/cache/PATH_TO_MY_CHROOT
This now seems to download the source files and also is validating them
against the stored MD5 sums.
But after that I get the error
==> ERROR: Running makepkg as root is not allowed as it can cause
permanent, catastrophic damage to your system.
Seems like makepkg is called once in context of my supplied "build user"
and then a second time without using the build user.
Where is my mistabe? Or is this a bug in makechrootpkg?
Thanks in advance
More information about the arch-general