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

[SRM] dpkg 1.15.8.12 for squeeze



Hi!

There's some (old) regressions affecting the dpkg 1.15.x series, and
I'd like to upload a new 1.15.8.12 release targetting squeeze. Those
fixes have been cherry picked from master, now uploaded to sid as
1.16.1 (that's why this request comes a bit late given the upcoming
point release, sorry about that!).

I'm attaching the interesting git commits (with translations omitted).
Here's the changelog:


dpkg (1.15.8.12) stable; urgency=low

  [ Guillem Jover ]
  * Do not fail to unpack shared directories missing on the file system
    from packages being replaced by other packages. Closes: #631808
  * Defer hardlink renames so that there's never a point were the new
    file contents are accessible from the final path before they have
    been fsync()ed and cannot be executed causing ETXTBSY when trying
    to open the to be installed paths for writing.
    Thanks to Jonathan Nieder <jrnieder@gmail.com>. Closes: #635683
  * Add armhf support to ostable and triplettable. Closes: #594179, #639674

  [ Updated man page translations ]
  * German (Helge Kreutzmann). Minor fixe(s), including improvement by "Flo".

  [ Updated scripts translations ]
  * German (Helge Kreutzmann). Minor fix from Sven Joachim.

 -- Guillem Jover <guillem@debian.org>  Sat, 24 Sep 2011 03:41:56 +0200


The git branch for squeeze can be found at:

  <http://git.debian.org/?p=dpkg/dpkg.git;a=shortlog;h=refs/heads/squeeze>

Would such upload be fine?

thanks,
guillem
commit 736b9213f7aa8ff50916e1555513582af711f9ca
Author: Guillem Jover <guillem@debian.org>
Date:   Tue Mar 15 01:24:28 2011 +0100

    Add armhf support to ostable and triplettable
    
    Cherry picked from commit 88b0c3043a651a422cd0c43c38ab6d553e2214ea.
    
    Closes: #594179, #639674

diff --git a/debian/changelog b/debian/changelog
index f7416c2..3a19809 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,7 @@ dpkg (1.15.8.12) UNRELEASED; urgency=low
     been fsync()ed and cannot be executed causing ETXTBSY when trying
     to open the to be installed paths for writing.
     Thanks to Jonathan Nieder <jrnieder@gmail.com>. Closes: #635683
+  * Add armhf support to ostable and triplettable. Closes: #594179, #639674
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann). Minor fixe(s), including improvement by "Flo".
diff --git a/ostable b/ostable
index 17b7581..4c81abe 100644
--- a/ostable
+++ b/ostable
@@ -16,6 +16,7 @@
 # <Debian name>		<GNU name>		<config.guess regex>
 uclibceabi-linux	linux-uclibceabi	linux[^-]*-uclibceabi
 uclibc-linux		linux-uclibc		linux[^-]*-uclibc
+gnueabihf-linux		linux-gnueabihf		linux[^-]*-gnueabihf
 gnueabi-linux		linux-gnueabi		linux[^-]*-gnueabi
 gnuspe-linux		linux-gnuspe		linux[^-]*-gnuspe
 gnulp-linux		linux-gnulp		linux[^-]*-gnulp
diff --git a/triplettable b/triplettable
index 3e076e2..f47d68c 100644
--- a/triplettable
+++ b/triplettable
@@ -5,6 +5,7 @@
 # <Debian triplet>	<Debian arch>
 uclibceabi-linux-arm	uclibc-linux-armel
 uclibc-linux-<cpu>	uclibc-linux-<cpu>
+gnueabihf-linux-arm	armhf
 gnueabi-linux-arm	armel
 gnuspe-linux-powerpc	powerpcspe
 gnulp-linux-i386	lpia

commit 3fe96e302867a6e983c1c469a2751dfc050ecb1f
Author: Guillem Jover <guillem@debian.org>
Date:   Sat Aug 13 03:19:24 2011 +0200

    dpkg: Defer hardlink renames to avoid breakage on unpack
    
    Cherry picked from commit efcf279a50aba3369b24d062017d581006d47d9b.
    
    This fixes two issues related to making the new file contents available
    through an alternative but final path before
    
    1) the one "carrying" the content has been fsync()ed, to avoid getting
    garbage on system failure.
    
    2) the deferred fsync() on the main path has been performed, avoiding
    a possible error when reopening the file for writing if it's currently
    under execution.
    
    Deferring the hardlink is safe as they are always after the tar entry
    containing the actual file data.
    
    Regression introduced in commit 9cd41fdda1c27169c52d73b3b3ce71991d724994.
    
    Closes: #635683
    
    Reported-by: Niko Tyni <ntyni@debian.org>
    Based-on-patch-by: Jonathan Nieder <jrnieder@gmail.com>
    Signed-off-by: Guillem Jover <guillem@debian.org>

diff --git a/debian/changelog b/debian/changelog
index 9851c33..f7416c2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,11 @@ dpkg (1.15.8.12) UNRELEASED; urgency=low
   [ Guillem Jover ]
   * Do not fail to unpack shared directories missing on the file system
     from packages being replaced by other packages. Closes: #631808
+  * Defer hardlink renames so that there's never a point were the new
+    file contents are accessible from the final path before they have
+    been fsync()ed and cannot be executed causing ETXTBSY when trying
+    to open the to be installed paths for writing.
+    Thanks to Jonathan Nieder <jrnieder@gmail.com>. Closes: #635683
 
   [ Updated man page translations ]
   * German (Helge Kreutzmann). Minor fixe(s), including improvement by "Flo".
diff --git a/src/archives.c b/src/archives.c
index 7189045..0e9c113 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -846,7 +846,8 @@ tarobject(void *ctx, struct tar_entry *ti)
    * in dpkg-new.
    */
 
-  if (ti->type == tar_filetype_file || ti->type == tar_filetype_symlink) {
+  if (ti->type == tar_filetype_file || ti->type == tar_filetype_hardlink ||
+      ti->type == tar_filetype_symlink) {
     nifd->namenode->flags |= fnnf_deferred_rename;
 
     debug(dbg_eachfiledetail, "tarobject done and installation deferred");

commit d460aac069a68f1115c8a26f07c147e42816e2b1
Author: Guillem Jover <guillem@debian.org>
Date:   Wed Jun 29 04:11:32 2011 +0200

    dpkg: Unpack missing shared directories when the package is replaced
    
    Cherry picked from commit b6ca9bcdb5887e30fe65ecd2105da9dcd55a351c.
    
    When unpacking a directory missing in the file system with that path
    shared by at least one other package, from a package that is Replaced
    by other packages, assume the missing path is a shared directory and
    avoid setting ‘keepexisting’ and as such returning prematurely from
    tarobject(), because in that case we need to recreate the lost
    directory. As a side effect this also prevents printing the message
    “Replaced by files in installed package” which is bogus in this case,
    as directories are always shared.
    
    Regression introduced in commit 00e5640a99be03aba40c9e08a663b90d8f8aa797.
    
    Closes: #631808

diff --git a/debian/changelog b/debian/changelog
index 58e170a..8e859c8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,9 @@
 dpkg (1.15.8.12) UNRELEASED; urgency=low
 
+  [ Guillem Jover ]
+  * Do not fail to unpack shared directories missing on the file system
+    from packages being replaced by other packages. Closes: #631808
+
   [ Updated man page translations ]
   * German (Helge Kreutzmann). Minor fixe(s).
 
diff --git a/src/archives.c b/src/archives.c
index 63d713a..7189045 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -565,6 +565,15 @@ tarobject(void *ctx, struct tar_entry *ti)
           continue;
       }
 
+      /* If the new object is a directory and the previous object does
+       * not exist assume it's also a directory and skip further checks.
+       * XXX: Ideally with more information about the installed files we
+       * could perform more clever checks. */
+      if (statr != 0 && ti->type == tar_filetype_dir) {
+        debug(dbg_eachfile, "tarobject ... assuming shared directory");
+        continue;
+      }
+
       /* Nope ?  Hmm, file conflict, perhaps.  Check Replaces. */
       switch (otherpkg->clientdata->replacingfilesandsaid) {
       case 2:
@@ -618,6 +627,7 @@ tarobject(void *ctx, struct tar_entry *ti)
         nifd->namenode->flags &= ~fnnf_new_inarchive;
         keepexisting = true;
       } else {
+        /* At this point we are replacing something without a Replaces. */
         if (!statr && S_ISDIR(stab.st_mode)) {
           forcibleerr(fc_overwritedir,
                       _("trying to overwrite directory '%.250s' "
@@ -626,16 +636,12 @@ tarobject(void *ctx, struct tar_entry *ti)
                       versiondescribe(&otherpkg->installed.version,
                                       vdew_nonambig));
         } else {
-          /* WTA: At this point we are replacing something without a Replaces.
-           * if the new object is a directory and the previous object does not
-           * exist assume it's also a directory and don't complain. */
-          if (!(statr && ti->type == tar_filetype_dir))
-            forcibleerr(fc_overwrite,
-                        _("trying to overwrite '%.250s', "
-                          "which is also in package %.250s %.250s"),
-                        nifd->namenode->name, otherpkg->name,
-                        versiondescribe(&otherpkg->installed.version,
-                                        vdew_nonambig));
+          forcibleerr(fc_overwrite,
+                      _("trying to overwrite '%.250s', "
+                        "which is also in package %.250s %.250s"),
+                      nifd->namenode->name, otherpkg->name,
+                      versiondescribe(&otherpkg->installed.version,
+                                      vdew_nonambig));
         }
       }
     }


Reply to: