From: Guillem Jover Date: Sat, 8 Sep 2007 02:35:18 +0000 (+0300) Subject: Use fakeroot by default to gain root privileges in dpkg-buildpackage X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c258829c1fc114a86707b7f5f24b94e559fe1efa;p=dpkg Use fakeroot by default to gain root privileges in dpkg-buildpackage --- diff --git a/ChangeLog b/ChangeLog index acc7c3f8..598af202 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-09-08 Guillem Jover + + * scripts/dpkg-buildpackage.sh: Use fakeroot, if present, as default + value for the '-r' option. + 2007-09-06 Guillem Jover * scripts/dpkg-genchanges.pl: Stop recognizing the obsolete Optional diff --git a/debian/changelog b/debian/changelog index 110b1176..489965cb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,8 @@ dpkg (1.14.7) UNRELEASED; urgency=low * Document in dpkg-scanpackages that apt now requires Packages.bz2 instead of Packages.gz. Closes: #440973 * Stop recognizing the obsolete Optional field when building packages. + * Use fakeroot, if present, by default to gain root privileges in + dpkg-buildpackage. [ Updated dpkg translations ] * Portuguese (Miguel Figueiredo). diff --git a/scripts/dpkg-buildpackage.sh b/scripts/dpkg-buildpackage.sh index 82508c1d..f5e07848 100755 --- a/scripts/dpkg-buildpackage.sh +++ b/scripts/dpkg-buildpackage.sh @@ -22,6 +22,8 @@ Usage: $progname [ ...] Options: -r + command to gain root privileges (default is fakeroot if it + exists). -p -d do not check build dependencies and conflicts. -D check build dependencies and conflicts. @@ -59,6 +61,10 @@ END } rootcommand='' +if command -v fakeroot >/dev/null 2>&1; then + rootcommand=fakeroot +fi + signcommand="" if [ -e "$GNUPGHOME" ] || [ -e "$HOME/.gnupg" ] && \ command -v gpg > /dev/null 2>&1; then