xbps-src: require sudo to build packages.
The reason is that fakeroot can't read files that have restrictive perms and you'd have to change them before the src installation, and restoring them at binpkg pre-installation. I prefer to avoid all this and build the pkg with appropiate perms. --HG-- extra : convert_revision : 8a5086049ab575962913eda0cb2ace0c211b97f1
This commit is contained in:
@@ -165,7 +165,7 @@ xbps_make_binpkg()
|
||||
binpkg=$pkgname-$version.$arch.xbps
|
||||
pkgdir=$XBPS_PACKAGESDIR/$arch
|
||||
|
||||
run_rootcmd tar cfjp $XBPS_DESTDIR/$binpkg .
|
||||
run_rootcmd yes tar cfjp $XBPS_DESTDIR/$binpkg .
|
||||
if [ $? -eq 0 ]; then
|
||||
[ ! -d $pkgdir ] && mkdir -p $pkgdir
|
||||
mv -f $XBPS_DESTDIR/$binpkg $pkgdir
|
||||
|
||||
@@ -39,12 +39,19 @@ run_func()
|
||||
run_rootcmd()
|
||||
{
|
||||
local lenv=
|
||||
local usesudo="$1"
|
||||
|
||||
[ -n "$in_chroot" ] && unset fakeroot_cmd
|
||||
|
||||
lenv="XBPS_DESTDIR=$XBPS_DESTDIR"
|
||||
lenv="XBPS_DISTRIBUTIONDIR=$XBPS_DISTRIBUTIONDIR $lenv"
|
||||
env ${lenv} ${fakeroot_cmd} $@
|
||||
|
||||
shift
|
||||
if [ -n "$usesudo" -a -z "$in_chroot" ]; then
|
||||
sudo env ${lenv} $@
|
||||
else
|
||||
env ${lenv} ${fakeroot_cmd} $@
|
||||
fi
|
||||
}
|
||||
|
||||
msg_error()
|
||||
|
||||
@@ -106,7 +106,7 @@ make_install()
|
||||
#
|
||||
# Install package via make.
|
||||
#
|
||||
run_rootcmd ${make_cmd} ${make_install_target} ${make_install_args}
|
||||
run_rootcmd no ${make_cmd} ${make_install_target} ${make_install_args}
|
||||
if [ "$?" -ne 0 ]; then
|
||||
msg_error "installing $pkgname-$version."
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user