Skip to contentSkip to conversation

dpkg: Fix for Fedora22

PATCH Richard Purdie 1 participant 2 messages Jul 13, 2015

lore
Share & tools
lore
#0 lore raw

Yes, they managed to break tar. Again.

The addition of:
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=163e96a0e619a900eab6de827c7c5749ecc9d3f2
("Bugfix: entries read from the -T file did not get proper matching_flag.") means that the no-recursion option gets lost. This leads to many files getting included multiple times, along with files which shouldn't be there.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=7988

Moving the --no-reursion option to earlier in the command avoids the bug.

The bug was not present in tar 1.28 however it has been backported in at least Fedora 22.

[YOCTO #7988]

meta/recipes-devtools/dpkg/dpkg/tarfix.patch new file +32 -0
new file mode 100644
index 0000000..c343742
@@ -0,0 +1,32 @@
+Yes, they managed to break tar. Again.
+
+The addition of:
+http://git.savannah.gnu.org/cgit/tar.git/commit/?id=163e96a0e619a900eab6de827c7c5749ecc9d3f2
+("Bugfix: entries read from the -T file did not get proper matching_flag.")
+means that the no-recursion option gets lost. This leads to many files getting included
+multiple times, along with files which shouldn't be there.
+
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=7988
+
+Moving the --no-reursion option to earlier in the command avoids the bug.
+
+The bug was not present in tar 1.28 however it has been backported in at least 
+Fedora 22.
+
+RP
+2015/7/13
+
+
+Index: dpkg-1.17.25/dpkg-deb/build.c
+===================================================================
+--- dpkg-1.17.25.orig/dpkg-deb/build.c
++++ dpkg-1.17.25/dpkg-deb/build.c
+@@ -560,7 +560,7 @@ do_build(const char *const *argv)
+     if (chdir(dir))
+       ohshite(_("failed to chdir to `%.255s'"), dir);
+     execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--null", "--no-unquote",
+-                       "-T", "-", "--no-recursion", NULL);
++                       "--no-recursion", "-T", "-", NULL);
+     ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
+   }
+   close(p1[0]);
meta/recipes-devtools/dpkg/dpkg_1.17.25.bb +1 -0
index 74b1dd0..1969eff 100644
@@ -13,6 +13,7 @@ SRC_URI += "file://noman.patch \
             file://glibc2.5-sync_file_range.patch \
             file://no-vla-warning.patch \
             file://add_armeb_triplet_entry.patch \
+            file://tarfix.patch \
            "
 
 SRC_URI[md5sum] = "e48fcfdb2162e77d72c2a83432d537ca"
#1 lore raw
Quoted 1 line · Richard Purdie

Yes, they managed to break tar. Again.

Turns out they intentionally broke tar:

http://www.mail-archive.com/[email protected]/msg04799.html

I'll mention this to the dpkg maintainers to save them debugging this mess. I'm not impressed with the upstream commit messages since this isn't clear at all (at least to me).

I'll also add the missing Upstream-Status to the patch.

Cheers,

Richard

Quoted 69 lines

The addition of:
http://git.savannah.gnu.org/cgit/tar.git/commit/?id=163e96a0e619a900eab6de827c7c5749ecc9d3f2
("Bugfix: entries read from the -T file did not get proper matching_flag.") means that the no-recursion option gets lost. This leads to many files getting included multiple times, along with files which shouldn't be there.

https://bugzilla.yoctoproject.org/show_bug.cgi?id=7988

Moving the --no-reursion option to earlier in the command avoids the bug.

The bug was not present in tar 1.28 however it has been backported in at least Fedora 22.

[YOCTO #7988]

meta/recipes-devtools/dpkg/dpkg/tarfix.patch new file +32 -0
new file mode 100644
index 0000000..c343742
@@ -0,0 +1,32 @@
+Yes, they managed to break tar. Again.
+
+The addition of:
+http://git.savannah.gnu.org/cgit/tar.git/commit/?id=163e96a0e619a900eab6de827c7c5749ecc9d3f2
+("Bugfix: entries read from the -T file did not get proper matching_flag.")
+means that the no-recursion option gets lost. This leads to many files getting included
+multiple times, along with files which shouldn't be there.
+
+https://bugzilla.yoctoproject.org/show_bug.cgi?id=7988
+
+Moving the --no-reursion option to earlier in the command avoids the bug.
+
+The bug was not present in tar 1.28 however it has been backported in at least 
+Fedora 22.
+
+RP
+2015/7/13
+
+
+Index: dpkg-1.17.25/dpkg-deb/build.c
+===================================================================
+--- dpkg-1.17.25.orig/dpkg-deb/build.c
++++ dpkg-1.17.25/dpkg-deb/build.c
+@@ -560,7 +560,7 @@ do_build(const char *const *argv)
+     if (chdir(dir))
+       ohshite(_("failed to chdir to `%.255s'"), dir);
+     execlp(TAR, "tar", "-cf", "-", "--format=gnu", "--null", "--no-unquote",
+-                       "-T", "-", "--no-recursion", NULL);
++                       "--no-recursion", "-T", "-", NULL);
+     ohshite(_("unable to execute %s (%s)"), "tar -cf", TAR);
+   }
+   close(p1[0]);
meta/recipes-devtools/dpkg/dpkg_1.17.25.bb +1 -0
index 74b1dd0..1969eff 100644
@@ -13,6 +13,7 @@ SRC_URI += "file://noman.patch \
             file://glibc2.5-sync_file_range.patch \
             file://no-vla-warning.patch \
             file://add_armeb_triplet_entry.patch \
+            file://tarfix.patch \
            "
 
 SRC_URI[md5sum] = "e48fcfdb2162e77d72c2a83432d537ca"