Sfoglia il codice sorgente

Use fakeroot by default to gain root privileges in dpkg-buildpackage

Guillem Jover 19 anni fa
parent
commit
c258829c1f
3 ha cambiato i file con 13 aggiunte e 0 eliminazioni
  1. 5 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 6 0
      scripts/dpkg-buildpackage.sh

+ 5 - 0
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

+ 2 - 0
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).

+ 6 - 0
scripts/dpkg-buildpackage.sh

@@ -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