Use 'posix' tar format and implement tar format guessing
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Mon, 3 Jun 2013 11:00:29 +0000 (14:00 +0300)
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Tue, 11 Jun 2013 06:29:33 +0000 (09:29 +0300)
Fixes bug #998.

Change-Id: I54e7ab56bd80cf87e11be5c45e88a1bd50b60d17
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
16 files changed:
debian/changelog
debian/patches/0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch [new file with mode: 0644]
debian/patches/0007-implement-tar-format-guessing.patch [new file with mode: 0644]
debian/patches/0008-Use-posix-tar-format-by-default.patch [new file with mode: 0644]
debian/patches/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch [new file with mode: 0644]
debian/patches/series [new file with mode: 0644]
packaging/0001-Fix-libbz2.so-version-numbers.patch
packaging/0003-openSUSE-HACK-modify-Makefile-in-upstream-bzip2.patch
packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch
packaging/0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch
packaging/0006-Add-.gbp.conf.patch [new file with mode: 0644]
packaging/0007-implement-tar-format-guessing.patch [new file with mode: 0644]
packaging/0008-Use-posix-tar-format-by-default.patch [new file with mode: 0644]
packaging/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch [new file with mode: 0644]
packaging/pristine-tar.changes
packaging/pristine-tar.spec

index 455dadf8a4c78a914815953440effdbdc083a599..8e9e43f5f0a56494690e4ce599655062a190f54b 100644 (file)
@@ -1,3 +1,13 @@
+pristine-tar (1.28-1) unstable; urgency=low
+
+  * Fixes Bug #998
+    - Mangle PAX headers when using posix tar format
+    - Use posix tar format by default
+    - implement tar format guessing
+  * change format to 3.0 (quilt)
+
+ -- Markus Lehtonen <markus.lehtonen@linux.intel.com>  Mon, 10 Jun 2013 11:26:45 +0300
+
 pristine-tar (1.28-0) unstable; urgency=low
 
   * Change to non-native: add RPM packaging files
diff --git a/debian/patches/0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch b/debian/patches/0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch
new file mode 100644 (file)
index 0000000..b3bbab9
--- /dev/null
@@ -0,0 +1,44 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Fri, 31 May 2013 11:01:05 +0300
+Subject: pristine-gz: obey the XDELTA_PROGRAM build parameter
+
+Change-Id: I571466bacc8b50a7b2d2c7681b4d7ab1083508ad
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-gz | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/pristine-gz b/pristine-gz
+index 3668256..00c0055 100755
+--- a/pristine-gz
++++ b/pristine-gz
+@@ -96,6 +96,11 @@ use File::Basename qw/basename/;
+ delete $ENV{GZIP};
++# The following assignment is potentially munged during the
++# build process to hold the value of XDELTA_PROGRAM
++# parameter as given to Makefile.PL.
++my $xdelta_program = "xdelta";
++
+ dispatch(
+       commands => {
+               usage => [\&usage],
+@@ -234,7 +239,7 @@ sub reproducegz {
+               else {
+                       # generate a binary delta and see if this is the
+                       # best variant so far
+-                      my $ret=system("xdelta delta -0 --pristine $tempout $orig $tempdir/tmpdelta 2>/dev/null") >> 8;
++                      my $ret=system("$xdelta_program delta -0 --pristine $tempout $orig $tempdir/tmpdelta 2>/dev/null") >> 8;
+                       # xdelta exits 1 on success
+                       if ($ret == 1) {
+                               my $size=(stat("$tempdir/tmpdelta"))[7];
+@@ -297,7 +302,7 @@ sub gengz {
+               my $tempdir=tempdir();
+               my $tfile="$tempdir/".basename($file).".gz";
+               doit_redir($file, $tfile, @zgz);
+-              doit("xdelta", "patch", "--pristine", $delta->{delta}, $tfile, "$file.gz");
++              doit("$xdelta_program", "patch", "--pristine", $delta->{delta}, $tfile, "$file.gz");
+       }
+       else {
+               doit_redir("$file", "$file.gz", @zgz);
diff --git a/debian/patches/0007-implement-tar-format-guessing.patch b/debian/patches/0007-implement-tar-format-guessing.patch
new file mode 100644 (file)
index 0000000..028d02b
--- /dev/null
@@ -0,0 +1,60 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Fri, 31 May 2013 12:45:51 +0300
+Subject: implement tar format guessing
+
+Try "posix" and "gnu" formats if tarball re-creation with the default
+tar format fails.
+
+Makes pristine-tar more compatible accross different Linux distributions
+as the default format used by tar varies.
+
+Change-Id: I3c345a632f8b02b723a6151b08dc36521fe5646b
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-tar | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/pristine-tar b/pristine-tar
+index 14bac15..1c321d4 100755
+--- a/pristine-tar
++++ b/pristine-tar
+@@ -343,18 +343,23 @@ sub recreatetarball {
+       delete $ENV{TAR_LONGLINK_100};
+       $recreatetarball_tempdir=$tempdir;
+-      return recreatetarball_helper();
++      return recreatetarball_helper(%options);
+ }
+ sub recreatetarball_helper {
++      my %options=@_;
+       my $tempdir=$recreatetarball_tempdir;
+       
+       my $ret="$tempdir/recreatetarball";
++      my @cmd=($tar_program, "cf", $ret, "--owner", 0, "--group", 0,
++                      "--numeric-owner", "-C", "$tempdir/workdir",
++                      "--no-recursion", "--mode", "0644",
++            "--files-from", "$tempdir/manifest");
++      if (exists $options{tar_format}) {
++              push @cmd, ("-H", $options{tar_format});
++      }
+-      doit($tar_program, "cf", $ret, "--owner", 0, "--group", 0, 
+-              "--numeric-owner", "-C", "$tempdir/workdir",
+-              "--no-recursion", "--mode", "0644", 
+-              "--files-from", "$tempdir/manifest");
++      doit(@cmd);
+       
+       return $ret;
+ }
+@@ -393,6 +398,10 @@ sub gentar {
+       push @try, sub { recreatetarball($delta->{manifest}, getcwd,
+                       clobber_source => 0, %opts) };
+       push @try, \&recreatetarball_longlink_100;
++      push @try, sub { recreatetarball($delta->{manifest}, getcwd,
++                      clobber_source => 0, tar_format => "gnu", %opts) };
++      push @try, sub { recreatetarball($delta->{manifest}, getcwd,
++                      clobber_source => 0, tar_format => "posix", %opts) };
+       my $ok;
+       foreach my $variant (@try) {
diff --git a/debian/patches/0008-Use-posix-tar-format-by-default.patch b/debian/patches/0008-Use-posix-tar-format-by-default.patch
new file mode 100644 (file)
index 0000000..cf712c1
--- /dev/null
@@ -0,0 +1,54 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Fri, 31 May 2013 13:51:40 +0300
+Subject: Use posix tar format by default
+
+Should lead to smaller deltas as e.g. git-archive produces tarballs in
+posix format.
+
+The tar format guessing makes sure that pristine-tar commits generated
+with "gnu" tar format also are usable.
+
+Change-Id: I52c20b81c4b02ec22d3744d49b64415af14e0ab4
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-tar | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/pristine-tar b/pristine-tar
+index 1c321d4..f1fae98 100755
+--- a/pristine-tar
++++ b/pristine-tar
+@@ -396,12 +396,10 @@ sub gentar {
+       my @try;
+       push @try, sub { recreatetarball($delta->{manifest}, getcwd,
+-                      clobber_source => 0, %opts) };
+-      push @try, \&recreatetarball_longlink_100;
++                      clobber_source => 0, tar_format => "posix", %opts) };
+       push @try, sub { recreatetarball($delta->{manifest}, getcwd,
+                       clobber_source => 0, tar_format => "gnu", %opts) };
+-      push @try, sub { recreatetarball($delta->{manifest}, getcwd,
+-                      clobber_source => 0, tar_format => "posix", %opts) };
++      push @try, \&recreatetarball_longlink_100;
+       my $ok;
+       foreach my $variant (@try) {
+@@ -511,7 +509,8 @@ sub gendelta {
+               if ($#out == 0 && -d $out[0]) {
+                       $sourcedir=$out[0];
+               }
+-              $recreatetarball=recreatetarball("$tempdir/manifest", $sourcedir, clobber_source => 1);
++              $recreatetarball=recreatetarball("$tempdir/manifest", $sourcedir,
++                                                                      clobber_source => 1, tar_format => "posix");
+       }
+       else {
+               $recreatetarball=$opts{recreatetarball};
+@@ -778,7 +777,7 @@ sub commit {
+       my ($sourcedir, $id)=export($upstream);
+       genmanifest($tarball, "$tempdir/manifest");
+       my $recreatetarball=recreatetarball("$tempdir/manifest", $sourcedir,
+-              clobber_source => 1, create_missing => 1);
++              clobber_source => 1, create_missing => 1, tar_format => "posix");
+       my $pid = open(GENDELTA, "-|");
+       if (! $pid) {
+               # child
diff --git a/debian/patches/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch b/debian/patches/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch
new file mode 100644 (file)
index 0000000..bb2b418
--- /dev/null
@@ -0,0 +1,28 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Thu, 6 Jun 2013 14:31:25 +0300
+Subject: Mangle PAX headers when using posix tar format
+
+Mangle tar PAX headers in order to guarantee that created tarballs are
+always identical so that the delta can be applied cleanly.
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-tar | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/pristine-tar b/pristine-tar
+index f1fae98..3e92a74 100755
+--- a/pristine-tar
++++ b/pristine-tar
+@@ -357,6 +357,11 @@ sub recreatetarball_helper {
+             "--files-from", "$tempdir/manifest");
+       if (exists $options{tar_format}) {
+               push @cmd, ("-H", $options{tar_format});
++              if ($options{tar_format} eq 'posix') {
++                      # Mangle PAX headers so that created tarballs are always identical
++                      # so that delta can be successfully applied
++                      push @cmd, ('--pax-option=exthdr.name=%d/PaxHeaders/%f,ctime:=0');
++              }
+       }
+       doit(@cmd);
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..c034b74
--- /dev/null
@@ -0,0 +1,4 @@
+0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch
+0007-implement-tar-format-guessing.patch
+0008-Use-posix-tar-format-by-default.patch
+0009-Mangle-PAX-headers-when-using-posix-tar-format.patch
index 3dac84ac2ac449cde15e263d57b81909a3c1aaf4..c2a83e469b29ba9334cd626a7cf6ceec37c93eb6 100644 (file)
@@ -5,9 +5,11 @@ Subject: Fix libbz2.so version numbers
 Fixes the .so version number for the suse-bzip2. Otherwise we may get an
 error from the dynamic linker when trying to run bzip2 from suse-bzip2.
 
+Gbp: Ignore
+
 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
 ---
- pit/suse-bzip2/Makefile |    4 ++--
+ pit/suse-bzip2/Makefile | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/pit/suse-bzip2/Makefile b/pit/suse-bzip2/Makefile
index 6aa4c70dbfb372635c68c64e9da0a469d6c3e3eb..45e30a1ff3c441018eb9ffa523552bf79558d95e 100644 (file)
@@ -10,7 +10,7 @@ Gbp: Ignore
 Change-Id: Id74e43aa3d913d0cb52f3866d5434d5ff92f2aaf
 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
 ---
- pit/upstream-bzip2/Makefile |    3 +--
+ pit/upstream-bzip2/Makefile | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)
 
 diff --git a/pit/upstream-bzip2/Makefile b/pit/upstream-bzip2/Makefile
index c54d587a2f63a6bda88ca218b840d8ab45d9a65c..ab47a57e482c04901866cf48ccec480460b5b1b8 100644 (file)
@@ -13,8 +13,8 @@ Gbp: Ignore
 Change-Id: Icfcbee5207e65820248172152623a4dbf4440131
 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
 ---
- Makefile.PL  |    5 +++++
- pristine-bz2 |    4 +++-
+ Makefile.PL  | 5 +++++
+ pristine-bz2 | 4 +++-
  2 files changed, 8 insertions(+), 1 deletion(-)
 
 diff --git a/Makefile.PL b/Makefile.PL
index 5a2148e3ab10fdfb0ee88395bc00c5aefec7fc79..b3bbab957d8cf223406b0b8d83f708dd5bb381ff 100644 (file)
@@ -5,7 +5,7 @@ Subject: pristine-gz: obey the XDELTA_PROGRAM build parameter
 Change-Id: I571466bacc8b50a7b2d2c7681b4d7ab1083508ad
 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
 ---
- pristine-gz |    9 +++++++--
+ pristine-gz | 9 +++++++--
  1 file changed, 7 insertions(+), 2 deletions(-)
 
 diff --git a/pristine-gz b/pristine-gz
diff --git a/packaging/0006-Add-.gbp.conf.patch b/packaging/0006-Add-.gbp.conf.patch
new file mode 100644 (file)
index 0000000..3a0c918
--- /dev/null
@@ -0,0 +1,30 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Mon, 13 May 2013 10:36:39 +0300
+Subject: Add .gbp.conf
+
+Needed for gbp-pq-rpm tool.
+
+Gbp: Ignore
+
+Change-Id: Idb1677653b08de7763ccaf7fe001267c06ff3109
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ .gbp.conf | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+ create mode 100644 .gbp.conf
+
+diff --git a/.gbp.conf b/.gbp.conf
+new file mode 100644
+index 0000000..361c0ec
+--- /dev/null
++++ b/.gbp.conf
+@@ -0,0 +1,9 @@
++[DEFAULT]
++upstream-tag = %(upstreamversion)s
++packaging-dir = packaging
++
++[git-buildpackage]
++upstream-tag = %(version)s
++
++[gbp-pq-rpm]
++pq-branch = patch-queue/%(branch)s
diff --git a/packaging/0007-implement-tar-format-guessing.patch b/packaging/0007-implement-tar-format-guessing.patch
new file mode 100644 (file)
index 0000000..028d02b
--- /dev/null
@@ -0,0 +1,60 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Fri, 31 May 2013 12:45:51 +0300
+Subject: implement tar format guessing
+
+Try "posix" and "gnu" formats if tarball re-creation with the default
+tar format fails.
+
+Makes pristine-tar more compatible accross different Linux distributions
+as the default format used by tar varies.
+
+Change-Id: I3c345a632f8b02b723a6151b08dc36521fe5646b
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-tar | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/pristine-tar b/pristine-tar
+index 14bac15..1c321d4 100755
+--- a/pristine-tar
++++ b/pristine-tar
+@@ -343,18 +343,23 @@ sub recreatetarball {
+       delete $ENV{TAR_LONGLINK_100};
+       $recreatetarball_tempdir=$tempdir;
+-      return recreatetarball_helper();
++      return recreatetarball_helper(%options);
+ }
+ sub recreatetarball_helper {
++      my %options=@_;
+       my $tempdir=$recreatetarball_tempdir;
+       
+       my $ret="$tempdir/recreatetarball";
++      my @cmd=($tar_program, "cf", $ret, "--owner", 0, "--group", 0,
++                      "--numeric-owner", "-C", "$tempdir/workdir",
++                      "--no-recursion", "--mode", "0644",
++            "--files-from", "$tempdir/manifest");
++      if (exists $options{tar_format}) {
++              push @cmd, ("-H", $options{tar_format});
++      }
+-      doit($tar_program, "cf", $ret, "--owner", 0, "--group", 0, 
+-              "--numeric-owner", "-C", "$tempdir/workdir",
+-              "--no-recursion", "--mode", "0644", 
+-              "--files-from", "$tempdir/manifest");
++      doit(@cmd);
+       
+       return $ret;
+ }
+@@ -393,6 +398,10 @@ sub gentar {
+       push @try, sub { recreatetarball($delta->{manifest}, getcwd,
+                       clobber_source => 0, %opts) };
+       push @try, \&recreatetarball_longlink_100;
++      push @try, sub { recreatetarball($delta->{manifest}, getcwd,
++                      clobber_source => 0, tar_format => "gnu", %opts) };
++      push @try, sub { recreatetarball($delta->{manifest}, getcwd,
++                      clobber_source => 0, tar_format => "posix", %opts) };
+       my $ok;
+       foreach my $variant (@try) {
diff --git a/packaging/0008-Use-posix-tar-format-by-default.patch b/packaging/0008-Use-posix-tar-format-by-default.patch
new file mode 100644 (file)
index 0000000..cf712c1
--- /dev/null
@@ -0,0 +1,54 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Fri, 31 May 2013 13:51:40 +0300
+Subject: Use posix tar format by default
+
+Should lead to smaller deltas as e.g. git-archive produces tarballs in
+posix format.
+
+The tar format guessing makes sure that pristine-tar commits generated
+with "gnu" tar format also are usable.
+
+Change-Id: I52c20b81c4b02ec22d3744d49b64415af14e0ab4
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-tar | 11 +++++------
+ 1 file changed, 5 insertions(+), 6 deletions(-)
+
+diff --git a/pristine-tar b/pristine-tar
+index 1c321d4..f1fae98 100755
+--- a/pristine-tar
++++ b/pristine-tar
+@@ -396,12 +396,10 @@ sub gentar {
+       my @try;
+       push @try, sub { recreatetarball($delta->{manifest}, getcwd,
+-                      clobber_source => 0, %opts) };
+-      push @try, \&recreatetarball_longlink_100;
++                      clobber_source => 0, tar_format => "posix", %opts) };
+       push @try, sub { recreatetarball($delta->{manifest}, getcwd,
+                       clobber_source => 0, tar_format => "gnu", %opts) };
+-      push @try, sub { recreatetarball($delta->{manifest}, getcwd,
+-                      clobber_source => 0, tar_format => "posix", %opts) };
++      push @try, \&recreatetarball_longlink_100;
+       my $ok;
+       foreach my $variant (@try) {
+@@ -511,7 +509,8 @@ sub gendelta {
+               if ($#out == 0 && -d $out[0]) {
+                       $sourcedir=$out[0];
+               }
+-              $recreatetarball=recreatetarball("$tempdir/manifest", $sourcedir, clobber_source => 1);
++              $recreatetarball=recreatetarball("$tempdir/manifest", $sourcedir,
++                                                                      clobber_source => 1, tar_format => "posix");
+       }
+       else {
+               $recreatetarball=$opts{recreatetarball};
+@@ -778,7 +777,7 @@ sub commit {
+       my ($sourcedir, $id)=export($upstream);
+       genmanifest($tarball, "$tempdir/manifest");
+       my $recreatetarball=recreatetarball("$tempdir/manifest", $sourcedir,
+-              clobber_source => 1, create_missing => 1);
++              clobber_source => 1, create_missing => 1, tar_format => "posix");
+       my $pid = open(GENDELTA, "-|");
+       if (! $pid) {
+               # child
diff --git a/packaging/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch b/packaging/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch
new file mode 100644 (file)
index 0000000..bb2b418
--- /dev/null
@@ -0,0 +1,28 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Thu, 6 Jun 2013 14:31:25 +0300
+Subject: Mangle PAX headers when using posix tar format
+
+Mangle tar PAX headers in order to guarantee that created tarballs are
+always identical so that the delta can be applied cleanly.
+
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-tar | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/pristine-tar b/pristine-tar
+index f1fae98..3e92a74 100755
+--- a/pristine-tar
++++ b/pristine-tar
+@@ -357,6 +357,11 @@ sub recreatetarball_helper {
+             "--files-from", "$tempdir/manifest");
+       if (exists $options{tar_format}) {
+               push @cmd, ("-H", $options{tar_format});
++              if ($options{tar_format} eq 'posix') {
++                      # Mangle PAX headers so that created tarballs are always identical
++                      # so that delta can be successfully applied
++                      push @cmd, ('--pax-option=exthdr.name=%d/PaxHeaders/%f,ctime:=0');
++              }
+       }
+       doit(@cmd);
index 068de9f37e2dce4d191f13ff90b06195f6f1ac34..66bfbb545ef7b8b960ebc6668aacb769137234ba 100644 (file)
@@ -1,3 +1,9 @@
+* Mon Jun 03 2013 Markus Lehtonen <markus.lehtonen@linux.intel.com> 1.28
+- Fixes Bug #998
+  * Mangle PAX headers when using posix tar format
+  * Use posix tar format by default
+  * implement tar format guessing
+
 * Mon May 13 2013 Markus Lehtonen <markus.lehtonen@linux.intel.com> 1.28
 - Version bump to 1.28
 
index 21e016fb6fccb4e521f672f243d734b12d3630cb..0f72e6652df10ac6f17ad8ffaddf30610da08e7b 100644 (file)
@@ -12,6 +12,10 @@ Patch1:     0002-openSUSE-HACK-add-upstream-bzip2-v1.0.6-sources.patch
 Patch2:     0003-openSUSE-HACK-modify-Makefile-in-upstream-bzip2.patch
 Patch3:     0004-openSUSE-HACK-enable-special-upstream-bzip2.patch
 Patch4:     0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch
+Patch5:     0006-Add-.gbp.conf.patch
+Patch6:     0007-implement-tar-format-guessing.patch
+Patch7:     0008-Use-posix-tar-format-by-default.patch
+Patch8:     0009-Mangle-PAX-headers-when-using-posix-tar-format.patch
 Requires:   gzip
 Requires:   bzip2
 %if 0%{?suse_version} >= 1210
@@ -77,6 +81,14 @@ control.
 %endif
 # 0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch
 %patch4 -p1
+# 0006-Add-.gbp.conf.patch
+%patch5 -p1
+# 0007-implement-tar-format-guessing.patch
+%patch6 -p1
+# 0008-Use-posix-tar-format-by-default.patch
+%patch7 -p1
+# 0009-Mangle-PAX-headers-when-using-posix-tar-format.patch
+%patch8 -p1
 
 %build
 %if 0%{?fedora}