[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Ubuntu dpkg 1.13.22ubuntu7



This e-mail has been sent due to an upload to Ubuntu that contains Ubuntu
changes.  It contains the difference between the new version and the
previous version of the same source package in Ubuntu.
Format: 1.7
Date: Tue,  3 Oct 2006 18:01:06 +0100
Source: dpkg
Binary: dpkg dselect dpkg-dev
Architecture: source
Version: 1.13.22ubuntu7
Distribution: edgy
Urgency: low
Maintainer: Dpkg Developers <team@dpkg.org>
Changed-By: Ian Jackson <iwj@ubuntu.com>
Description: 
 dpkg       - package maintenance system for Debian
 dpkg-dev   - package building tools for Debian
 dselect    - user tool to manage Debian packages
Changes: 
 dpkg (1.13.22ubuntu7) edgy; urgency=low
 .
   * dpkg: add missing newline to an error message.  (LP 29729.)
   * dpkg: describedepcon uses more l10n-friendly approach.  (LP 63744.)
   * dpkg-source: respect g+s and umask when extracting.  (LP 51468.)
     The new behaviour is that the only thing which matters about the
     permissions specified in the archive is whether an object has execute
     permission for anyone, as for chmod =X.  Set-id (of files and
     directories) and read/write permissions from the archive are ignored.
     Permissions are determined by the umask; group ownership and
     directory-setgid according the usual filesystem policies.
Files: 
 ee013847280f0b81caf6ab09c11b1f84 867 admin required dpkg_1.13.22ubuntu7.dsc
 9f02cc089d5f879009702e35d34cdb28 4499786 admin required dpkg_1.13.22ubuntu7.tar.gz
diff -pruN 1.13.22ubuntu6/debian/changelog 1.13.22ubuntu7/debian/changelog
--- 1.13.22ubuntu6/debian/changelog	2006-08-18 10:59:44.000000000 +0100
+++ 1.13.22ubuntu7/debian/changelog	2006-10-03 18:01:15.000000000 +0100
@@ -1,3 +1,17 @@
+dpkg (1.13.22ubuntu7) edgy; urgency=low
+
+  * dpkg: add missing newline to an error message.  (LP 29729.)
+  * dpkg: describedepcon uses more l10n-friendly approach.  (LP 63744.)
+  * dpkg-source: respect g+s and umask when extracting.  (LP 51468.)
+    The new behaviour is that the only thing which matters about the
+    permissions specified in the archive is whether an object has execute
+    permission for anyone, as for chmod =X.  Set-id (of files and
+    directories) and read/write permissions from the archive are ignored.
+    Permissions are determined by the umask; group ownership and
+    directory-setgid according the usual filesystem policies.
+
+ -- Ian Jackson <iwj@ubuntu.com>  Tue,  3 Oct 2006 18:01:06 +0100
+
 dpkg (1.13.22ubuntu6) edgy; urgency=low
 
   * dselect: do not abort on Breaks; ignore it instead.  (Malone 56761.)
diff -pruN 1.13.22ubuntu6/scripts/dpkg-source.pl 1.13.22ubuntu7/scripts/dpkg-source.pl
--- 1.13.22ubuntu6/scripts/dpkg-source.pl	2006-08-14 16:40:52.000000000 +0100
+++ 1.13.22ubuntu7/scripts/dpkg-source.pl	2006-10-03 17:55:58.000000000 +0100
@@ -746,10 +746,8 @@ if ($opmode eq 'build') {
 	(my $t = $target) =~ s!.*/!!;
 
 	mkdir($tmp,0700) || &syserr(sprintf(_g("unable to create `%s'"), $tmp));
-	system "chmod", "g-s", $tmp;
 	printf(_g("%s: unpacking %s")."\n", $progname, $tarfile);
 	extracttar("$dscdir/$tarfile",$tmp,$t);
-	system "chown", '-R', '-f', join(':',@fowner), "$tmp/$t";
 	rename("$tmp/$t",$target)
 	    || &syserr(sprintf(_g("unable to rename `%s' to `%s'"), "$tmp/$t", $target));
 	rmdir($tmp)
@@ -1217,19 +1215,49 @@ sub checkdiff
 
 sub extracttar {
     my ($tarfileread,$dirchdir,$newtopdir) = @_;
+    my ($mode, $modes_set);
     &forkgzipread("$tarfileread");
     defined($c2= fork) || &syserr(_g("fork for tar -xkf -"));
     if (!$c2) {
         open(STDIN,"<&GZIP") || &syserr(_g("reopen gzip for tar -xkf -"));
         &cpiostderr;
         chdir($dirchdir) || &syserr(sprintf(_g("cannot chdir to `%s' for tar extract"), $dirchdir));
-        exec('tar','-xkf','-') or &syserr(_g("exec tar -xkf -"));
+        exec('tar','--no-same-owner','--no-same-permissions',
+	     '-xkf','-') or &syserr(_g("exec tar -xkf -"));
     }
     close(GZIP);
     $c2 == waitpid($c2,0) || &syserr(_g("wait for tar -xkf -"));
     $? && subprocerr("tar -xkf -");
     &reapgzip;
 
+    # Unfortunately tar insists on applying our umask _to the original
+    # permissions_ rather than mostly-ignoring the original
+    # permissions.  We fix it up with chmod -R (which saves us some
+    # work) but we have to construct a u+/- string which is a bit
+    # of a palaver.  (Numeric doesn't work because we need [ugo]+X
+    # and [ugo]=<stuff> doesn't work because that unsets sgid on dirs.)
+    #
+    # We still need --no-same-permissions because otherwise tar might
+    # extract directory setgid (which we want inherited, not
+    # extracted); we need --no-same-owner because putting the owner
+    # back is tedious - in particular, correct group ownership would
+    # have to be calculated using mount options and other madness.
+    #
+    # It would be nice if tar could do it right, or if pax could cope
+    # with GNU format tarfiles with long filenames.
+    #
+    $mode= 0777 & ~umask;
+    for ($i=0; $i<9; $i+=3) {
+	$modes_set.= ',' if $i;
+	$modes_set.= qw(u g o)[$i/3];
+	for ($j=0; $j<3; $j++) {
+	    $modes_set.= $mode & (0400 >> ($i+$j)) ? '+' : '-';
+	    $modes_set.= qw(r w X)[$j];
+	}
+    }
+    system 'chmod','-R',$modes_set,'--',$dirchdir;
+    $? && subprocerr("chmod -R $modes_set $dirchdir");
+    
     opendir(D,"$dirchdir") || &syserr(sprintf(_g("Unable to open dir %s"), $dirchdir));
     @dirchdirfiles = grep($_ ne "." && $_ ne "..",readdir(D));
     closedir(D) || &syserr(sprintf(_g("Unable to close dir %s"), $dirchdir));
diff -pruN 1.13.22ubuntu6/src/depcon.c 1.13.22ubuntu7/src/depcon.c
--- 1.13.22ubuntu6/src/depcon.c	2006-07-21 17:20:25.000000000 +0100
+++ 1.13.22ubuntu7/src/depcon.c	2006-10-03 16:59:27.000000000 +0100
@@ -148,18 +148,25 @@ int findbreakcycle(struct pkginfo *pkg) 
 }
 
 void describedepcon(struct varbuf *addto, struct dependency *dep) {
-  varbufaddstr(addto,dep->up->name);
+  const char *fmt;
+  struct varbuf depstr;
+
   switch (dep->type) {
-  case dep_depends:     varbufaddstr(addto, _(" depends on "));     break;
-  case dep_predepends:  varbufaddstr(addto, _(" pre-depends on ")); break;
-  case dep_recommends:  varbufaddstr(addto, _(" recommends "));     break;
-  case dep_conflicts:   varbufaddstr(addto, _(" conflicts with ")); break;
-  case dep_suggests:    varbufaddstr(addto, _(" suggests ")); break;
-  case dep_enhances:    varbufaddstr(addto, _(" enhances "));       break;
-  case dep_breaks:      varbufaddstr(addto, _(" breaks "));         break;
+  case dep_depends:     fmt= _("%s depends on %s");     break;
+  case dep_predepends:  fmt= _("%s pre-depends on %s"); break;
+  case dep_recommends:  fmt= _("%s recommends %s");     break;
+  case dep_conflicts:   fmt= _("%s conflicts with %s"); break;
+  case dep_suggests:    fmt= _("%s suggests %s");       break;
+  case dep_enhances:    fmt= _("%s enhances %s");       break;
+  case dep_breaks:      fmt= _("%s breaks %s");         break;
   default:              internerr("unknown deptype");
   }
-  varbufdependency(addto, dep);
+  varbufinit(&depstr);
+  varbufdependency(&depstr, dep);
+  varbufaddc(&depstr,0);
+
+  varbufprintf(addto,fmt,dep->up->name,depstr.buf);
+  varbuffree(&depstr);
 }
   
 int depisok(struct dependency *dep, struct varbuf *whynot,
diff -pruN 1.13.22ubuntu6/src/processarc.c 1.13.22ubuntu7/src/processarc.c
--- 1.13.22ubuntu6/src/processarc.c	2006-07-21 17:20:25.000000000 +0100
+++ 1.13.22ubuntu7/src/processarc.c	2006-10-03 14:54:25.000000000 +0100
@@ -671,7 +671,7 @@ void process_archive(const char *filenam
 	    oldfs.st_ino == cfile->namenode->filestat->st_ino) {
 	  if (sameas)
 	    fprintf(stderr, _("dpkg: warning - old file `%.250s' is the same"
-		      " as several new files!  (both `%.250s' and `%.250s')"),
+		      " as several new files!  (both `%.250s' and `%.250s')\n"),
 		    fnamevb.buf,
 		    sameas->namenode->name, cfile->namenode->name);
 	  sameas= cfile;

Reply to: