]> err.no Git - dpkg/commitdiff
Use fakeroot by default to gain root privileges in dpkg-buildpackage
authorGuillem Jover <guillem@debian.org>
Sat, 8 Sep 2007 02:35:18 +0000 (05:35 +0300)
committerGuillem Jover <guillem@debian.org>
Sat, 8 Sep 2007 03:00:00 +0000 (06:00 +0300)
ChangeLog
debian/changelog
scripts/dpkg-buildpackage.sh

index acc7c3f8d073657454eff0366b4cff2b021a582d..598af20201339954728845e40bb678a597c2b168 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-09-08  Guillem Jover  <guillem@debian.org>
+
+       * scripts/dpkg-buildpackage.sh: Use fakeroot, if present, as default
+       value for the '-r' option.
+
 2007-09-06  Guillem Jover  <guillem@debian.org>
 
        * scripts/dpkg-genchanges.pl: Stop recognizing the obsolete Optional
index 110b117625defd31add7d3674e07861eddd9848c..489965cb13a3c7945675a9a125d802104eb1c3fd 100644 (file)
@@ -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).
index 82508c1de20dba87becc7fc6eddb476f0f24237a..f5e07848c61f330d6428a231340e8decd556e9c4 100755 (executable)
@@ -22,6 +22,8 @@ Usage: $progname [<options> ...]
 
 Options:
   -r<gain-root-command>
+                 command to gain root privileges (default is fakeroot if it
+                 exists).
   -p<sign-command>
   -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