mirror of
https://github.com/moparisthebest/pacman
synced 2024-11-13 21:05:05 -05:00
Allow an unprivileged user to create packages without fakeroot
When fakeroot was not in BUILDENV and the user was not root, makepkg still tried to use fakeroot for building packages. BUILDENV is now checked to see if fakeroot is enabled. If it is not enabled the package can still be built, but root will not have ownership of files. This is useful when users want to make packages for personal use and don't care about ownership. Closes FS#10450. Signed-off-by: Sebastian Nowicki <sebnow@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Dan McGee <dan@archlinux.org>
This commit is contained in:
parent
149839c539
commit
b9369a747d
@ -1457,8 +1457,8 @@ else
|
|||||||
mkdir -p "$pkgdir"
|
mkdir -p "$pkgdir"
|
||||||
cd "$startdir"
|
cd "$startdir"
|
||||||
|
|
||||||
if [ $EUID -eq 0 ]; then
|
if [ "$(check_buildenv fakeroot)" != "y" -o $EUID -eq 0 ]; then
|
||||||
# if we are root, then we don't need to recall makepkg with fakeroot
|
# if we are root or if fakeroot is not enabled, then we don't use it
|
||||||
if [ "$REPKG" = "1" ]; then
|
if [ "$REPKG" = "1" ]; then
|
||||||
warning "$(gettext "Skipping build.")"
|
warning "$(gettext "Skipping build.")"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user