From c258829c1fc114a86707b7f5f24b94e559fe1efa Mon Sep 17 00:00:00 2001 From: Guillem Jover Date: Sat, 8 Sep 2007 05:35:18 +0300 Subject: [PATCH] Use fakeroot by default to gain root privileges in dpkg-buildpackage --- ChangeLog | 5 +++++ debian/changelog | 2 ++ scripts/dpkg-buildpackage.sh | 6 ++++++ 3 files changed, 13 insertions(+) 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 -- 2.39.5