summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-11-29 12:54:27 +0200
committerMarkus Lehtonen <markus.lehtonen@linux.intel.com>2013-12-02 12:46:27 +0200
commit44426105fab9f0a6ced0b24b57bb78e200ee2d04 (patch)
tree82d7ef5aa0a7e45bcb3b703ab4c0f4c3a8536947
parenta74d8907fb3b25f4da14e6e9db061f7f0c36c550 (diff)
downloadpristine-tar-44426105fab9f0a6ced0b24b57bb78e200ee2d04.tar.gz
pristine-tar-44426105fab9f0a6ced0b24b57bb78e200ee2d04.tar.bz2
pristine-tar-44426105fab9f0a6ced0b24b57bb78e200ee2d04.zip
Workaround for broken pristine-tar branches in Tizen
Makes it possible to checkout tarballs from certain broken pristine-tar branches created with buggy versions of Tizen pristine-tar on openSUSE. Also limit the suse bzip2 hack to older openSUSE distros. Change-Id: Ifc5b173f8a5f5db5266a79c9cfd2b27c4293f7c7 Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rw-r--r--debian/changelog8
-rw-r--r--debian/patches/0004-Mangle-PAX-headers-when-using-posix-tar-format.patch14
-rw-r--r--debian/patches/0005-HACK-workaround-for-some-broken-pristine-tar-branche.patch28
-rw-r--r--debian/patches/0005-Remove-all-timestamps-from-extended-PAX-headers.patch28
-rw-r--r--debian/patches/series2
-rw-r--r--packaging/0002-openSUSE-HACK-add-upstream-bzip2-v1.0.6-sources.patch2
-rw-r--r--packaging/0003-openSUSE-HACK-modify-Makefile-in-upstream-bzip2.patch2
-rw-r--r--packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch38
-rw-r--r--packaging/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch14
-rw-r--r--packaging/0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch28
-rw-r--r--packaging/0010-Remove-all-timestamps-from-extended-PAX-headers.patch28
-rw-r--r--packaging/pristine-tar.changes5
-rw-r--r--packaging/pristine-tar.spec10
13 files changed, 127 insertions, 80 deletions
diff --git a/debian/changelog b/debian/changelog
index 13c2c7f..06ff826 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+pristine-tar (1.28-3) unstable; urgency=low
+
+ * Workaround for broken pristine-tar branches in Tizen
+ Makes it possible to checkout tarballs from certain broken pristine-tar
+ branches created with buggy versions of Tizen pristine-tar on openSUSE.
+
+ -- Markus Lehtonen <markus.lehtonen@linux.intel.com> Fri, 29 Nov 2013 15:07:41 +0200
+
pristine-tar (1.28-2) unstable; urgency=low
* Remove all timestamps from extended PAX headers of posix tarballs
diff --git a/debian/patches/0004-Mangle-PAX-headers-when-using-posix-tar-format.patch b/debian/patches/0004-Mangle-PAX-headers-when-using-posix-tar-format.patch
index bb2b418..8385147 100644
--- a/debian/patches/0004-Mangle-PAX-headers-when-using-posix-tar-format.patch
+++ b/debian/patches/0004-Mangle-PAX-headers-when-using-posix-tar-format.patch
@@ -2,8 +2,14 @@ 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.
+Remove all timestamps from extended PAX headers in order to guarantee
+that created tarballs are always identical so that the delta can be
+applied cleanly.
+
+The timestamps can break pristine-tar generation as they are different
+every time an archive is generated from git (when using tree id
+instead of commit id as the sha-1 to checkout). Git uses the current
+time as the modification time of files when a tree is archived.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
---
@@ -11,7 +17,7 @@ Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
1 file changed, 5 insertions(+)
diff --git a/pristine-tar b/pristine-tar
-index f1fae98..3e92a74 100755
+index f1fae98..19af965 100755
--- a/pristine-tar
+++ b/pristine-tar
@@ -357,6 +357,11 @@ sub recreatetarball_helper {
@@ -21,7 +27,7 @@ index f1fae98..3e92a74 100755
+ 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');
++ push @cmd, ('--pax-option=exthdr.name=%d/PaxHeaders/%f,mtime:=0,atime:=0,ctime:=0');
+ }
}
diff --git a/debian/patches/0005-HACK-workaround-for-some-broken-pristine-tar-branche.patch b/debian/patches/0005-HACK-workaround-for-some-broken-pristine-tar-branche.patch
new file mode 100644
index 0000000..c264fb5
--- /dev/null
+++ b/debian/patches/0005-HACK-workaround-for-some-broken-pristine-tar-branche.patch
@@ -0,0 +1,28 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Fri, 29 Nov 2013 12:44:56 +0200
+Subject: HACK: workaround for some broken pristine-tar branches
+
+Created by previous buggy versions of the pristine-tar tool distributed
+for openSUSE in Tizen.
+
+Change-Id: I31b1b5527fa399dd0c4baff87b0775a0ff8da773
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-bz2 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/pristine-bz2 b/pristine-bz2
+index dbbe319..112d49e 100755
+--- a/pristine-bz2
++++ b/pristine-bz2
+@@ -263,6 +263,10 @@ sub genbz2 {
+ @params=split(' ', $delta->{params});
+
+ my $program=$delta->{program};
++ # Work around for some broken pristine-tar data in Tizen repos
++ if ($program =~ /.*upstream-bzip2\/bzip2$/) {
++ $program="bzip2"
++ }
+ if (! grep { $program eq $_ } @supported_bzip2_programs) {
+ die "paranoia check failed on program from delta ($program)";
+ }
diff --git a/debian/patches/0005-Remove-all-timestamps-from-extended-PAX-headers.patch b/debian/patches/0005-Remove-all-timestamps-from-extended-PAX-headers.patch
deleted file mode 100644
index 4d5cbe2..0000000
--- a/debian/patches/0005-Remove-all-timestamps-from-extended-PAX-headers.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-Date: Fri, 23 Aug 2013 00:47:12 +0300
-Subject: Remove all timestamps from extended PAX headers
-
-The timestamps can break pristine-tar generation as they are different
-every time an archive is generated from git (when using tree id
-instead of commit id as the sha-1 to checkout). Git uses the current
-time as the modification time of files when a tree is archived.
-
-Change-Id: I25fc631c4f1c62fc5ec2c1a8112dd01c643aae90
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- pristine-tar | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pristine-tar b/pristine-tar
-index 3e92a74..19af965 100755
---- a/pristine-tar
-+++ b/pristine-tar
-@@ -360,7 +360,7 @@ sub recreatetarball_helper {
- 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');
-+ push @cmd, ('--pax-option=exthdr.name=%d/PaxHeaders/%f,mtime:=0,atime:=0,ctime:=0');
- }
- }
-
diff --git a/debian/patches/series b/debian/patches/series
index 7e32c85..a4aec78 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -2,4 +2,4 @@
0002-implement-tar-format-guessing.patch
0003-Use-posix-tar-format-by-default.patch
0004-Mangle-PAX-headers-when-using-posix-tar-format.patch
-0005-Remove-all-timestamps-from-extended-PAX-headers.patch
+0005-HACK-workaround-for-some-broken-pristine-tar-branche.patch
diff --git a/packaging/0002-openSUSE-HACK-add-upstream-bzip2-v1.0.6-sources.patch b/packaging/0002-openSUSE-HACK-add-upstream-bzip2-v1.0.6-sources.patch
index cddcb9f..2d8214a 100644
--- a/packaging/0002-openSUSE-HACK-add-upstream-bzip2-v1.0.6-sources.patch
+++ b/packaging/0002-openSUSE-HACK-add-upstream-bzip2-v1.0.6-sources.patch
@@ -5,7 +5,7 @@ Subject: openSUSE HACK: add upstream bzip2 (v1.0.6) sources
Only take the selected files that are needed. Needed for being able to
correctly re-create bz2 archives on openSUSE.
-Gbp-Rpm: If 0%{?suse_version}
+Gbp-Rpm: If 0%{?suse_version} && 0%{?suse_version} < 1220
Gbp: Ignore
Change-Id: I0b7848774f5a0b7bd69de853de3d04bbbbc7f3fd
diff --git a/packaging/0003-openSUSE-HACK-modify-Makefile-in-upstream-bzip2.patch b/packaging/0003-openSUSE-HACK-modify-Makefile-in-upstream-bzip2.patch
index 45e30a1..b1e343c 100644
--- a/packaging/0003-openSUSE-HACK-modify-Makefile-in-upstream-bzip2.patch
+++ b/packaging/0003-openSUSE-HACK-modify-Makefile-in-upstream-bzip2.patch
@@ -4,7 +4,7 @@ Subject: openSUSE HACK: modify Makefile in upstream-bzip2
To make the (only partially imported) upstream-bzip2 compile.
-Gbp-Rpm: If 0%{?suse_version}
+Gbp-Rpm: If 0%{?suse_version} && 0%{?suse_version} < 1220
Gbp: Ignore
Change-Id: Id74e43aa3d913d0cb52f3866d5434d5ff92f2aaf
diff --git a/packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch b/packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch
index ab47a57..3c05114 100644
--- a/packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch
+++ b/packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch
@@ -7,15 +7,15 @@ This is a hack for openSUSE that makes pristine-bz2 use a special
is unable to re-create/gendelta bz2 archives created by other
distributions.
-Gbp-Rpm: If 0%{?suse_version}
+Gbp-Rpm: If 0%{?suse_version} && 0%{?suse_version} < 1220
Gbp: Ignore
Change-Id: Icfcbee5207e65820248172152623a4dbf4440131
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
---
- Makefile.PL | 5 +++++
- pristine-bz2 | 4 +++-
- 2 files changed, 8 insertions(+), 1 deletion(-)
+ Makefile.PL | 5 +++++
+ pristine-bz2 | 12 +++++++++++-
+ 2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/Makefile.PL b/Makefile.PL
index 60a5103..8a2fe1c 100755
@@ -41,17 +41,39 @@ index 60a5103..8a2fe1c 100755
extra_clean:
$(MAKE) clean -C pit/suse-bzip2 PREFIX=$(PREFIX)
diff --git a/pristine-bz2 b/pristine-bz2
-index 53c42bc..7da6607 100755
+index 53c42bc..dbbe319 100755
--- a/pristine-bz2
+++ b/pristine-bz2
-@@ -91,7 +91,9 @@ use IO::Handle;
+@@ -91,6 +91,8 @@ use IO::Handle;
delete $ENV{BZIP};
delete $ENV{BZIP2};
--my @supported_bzip2_programs = qw(bzip2 pbzip2 zgz);
+my $__upstream_bzip2_prefix = "";
+
-+my @supported_bzip2_programs = ("${__upstream_bzip2_prefix}bzip2", "pbzip2", "zgz");
+ my @supported_bzip2_programs = qw(bzip2 pbzip2 zgz);
my $try=0;
+@@ -169,7 +171,12 @@ sub testvariant {
+ # try bzip2'ing with the arguments passed
+ if ($bzip2_program ne 'zgz') {
+- doit($bzip2_program, @args, $tmpin);
++ if ($bzip2_program eq 'bzip2') {
++ doit("$__upstream_bzip2_prefix/bzip2", @args, $tmpin);
++ }
++ else {
++ doit($bzip2_program, @args, $tmpin);
++ }
+ }
+ else {
+ doit_redir($tmpin, $new, $bzip2_program, @args);
+@@ -264,6 +271,9 @@ sub genbz2 {
+ # unlike bzip2, zgz only uses stdio
+ doit_redir($file, "$file.bz2", $program, @params);
+ }
++ elsif ($program eq 'bzip2') {
++ doit("$__upstream_bzip2_prefix/bzip2", @params, $file);
++ }
+ else {
+ doit($program, @params, $file);
+ }
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
index bb2b418..8385147 100644
--- a/packaging/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch
+++ b/packaging/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch
@@ -2,8 +2,14 @@ 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.
+Remove all timestamps from extended PAX headers in order to guarantee
+that created tarballs are always identical so that the delta can be
+applied cleanly.
+
+The timestamps can break pristine-tar generation as they are different
+every time an archive is generated from git (when using tree id
+instead of commit id as the sha-1 to checkout). Git uses the current
+time as the modification time of files when a tree is archived.
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
---
@@ -11,7 +17,7 @@ Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
1 file changed, 5 insertions(+)
diff --git a/pristine-tar b/pristine-tar
-index f1fae98..3e92a74 100755
+index f1fae98..19af965 100755
--- a/pristine-tar
+++ b/pristine-tar
@@ -357,6 +357,11 @@ sub recreatetarball_helper {
@@ -21,7 +27,7 @@ index f1fae98..3e92a74 100755
+ 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');
++ push @cmd, ('--pax-option=exthdr.name=%d/PaxHeaders/%f,mtime:=0,atime:=0,ctime:=0');
+ }
}
diff --git a/packaging/0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch b/packaging/0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch
new file mode 100644
index 0000000..c264fb5
--- /dev/null
+++ b/packaging/0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch
@@ -0,0 +1,28 @@
+From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+Date: Fri, 29 Nov 2013 12:44:56 +0200
+Subject: HACK: workaround for some broken pristine-tar branches
+
+Created by previous buggy versions of the pristine-tar tool distributed
+for openSUSE in Tizen.
+
+Change-Id: I31b1b5527fa399dd0c4baff87b0775a0ff8da773
+Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
+---
+ pristine-bz2 | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/pristine-bz2 b/pristine-bz2
+index dbbe319..112d49e 100755
+--- a/pristine-bz2
++++ b/pristine-bz2
+@@ -263,6 +263,10 @@ sub genbz2 {
+ @params=split(' ', $delta->{params});
+
+ my $program=$delta->{program};
++ # Work around for some broken pristine-tar data in Tizen repos
++ if ($program =~ /.*upstream-bzip2\/bzip2$/) {
++ $program="bzip2"
++ }
+ if (! grep { $program eq $_ } @supported_bzip2_programs) {
+ die "paranoia check failed on program from delta ($program)";
+ }
diff --git a/packaging/0010-Remove-all-timestamps-from-extended-PAX-headers.patch b/packaging/0010-Remove-all-timestamps-from-extended-PAX-headers.patch
deleted file mode 100644
index 4d5cbe2..0000000
--- a/packaging/0010-Remove-all-timestamps-from-extended-PAX-headers.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-Date: Fri, 23 Aug 2013 00:47:12 +0300
-Subject: Remove all timestamps from extended PAX headers
-
-The timestamps can break pristine-tar generation as they are different
-every time an archive is generated from git (when using tree id
-instead of commit id as the sha-1 to checkout). Git uses the current
-time as the modification time of files when a tree is archived.
-
-Change-Id: I25fc631c4f1c62fc5ec2c1a8112dd01c643aae90
-Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
----
- pristine-tar | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/pristine-tar b/pristine-tar
-index 3e92a74..19af965 100755
---- a/pristine-tar
-+++ b/pristine-tar
-@@ -360,7 +360,7 @@ sub recreatetarball_helper {
- 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');
-+ push @cmd, ('--pax-option=exthdr.name=%d/PaxHeaders/%f,mtime:=0,atime:=0,ctime:=0');
- }
- }
-
diff --git a/packaging/pristine-tar.changes b/packaging/pristine-tar.changes
index 1b6ad75..6411e1e 100644
--- a/packaging/pristine-tar.changes
+++ b/packaging/pristine-tar.changes
@@ -1,3 +1,8 @@
+* Fri Nov 29 2013 Markus Lehtonen <markus.lehtonen@linux.intel.com> 1.28
+- Workaround for broken pristine-tar branches in Tizen
+ Makes it possible to checkout tarballs from certain broken pristine-tar
+ branches created with buggy versions of Tizen pristine-tar on openSUSE.
+
* Fri Aug 23 2013 Markus Lehtonen <markus.lehtonen@linux.intel.com> 1.28
- Remove all timestamps from extended PAX headers of posix tarballs
diff --git a/packaging/pristine-tar.spec b/packaging/pristine-tar.spec
index f3e83d9..f97d1f4 100644
--- a/packaging/pristine-tar.spec
+++ b/packaging/pristine-tar.spec
@@ -16,7 +16,7 @@ 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
-Patch9: 0010-Remove-all-timestamps-from-extended-PAX-headers.patch
+Patch9: 0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch
Requires: gzip
Requires: bzip2
%if 0%{?suse_version} >= 1210
@@ -69,15 +69,15 @@ control.
# 0001-Fix-libbz2.so-version-numbers.patch
%patch0 -p1
# 0002-openSUSE-HACK-add-upstream-bzip2-v1.0.6-sources.patch
-%if 0%{?suse_version}
+%if 0%{?suse_version} && 0%{?suse_version} < 1220
%patch1 -p1
%endif
# 0003-openSUSE-HACK-modify-Makefile-in-upstream-bzip2.patch
-%if 0%{?suse_version}
+%if 0%{?suse_version} && 0%{?suse_version} < 1220
%patch2 -p1
%endif
# 0004-openSUSE-HACK-enable-special-upstream-bzip2.patch
-%if 0%{?suse_version}
+%if 0%{?suse_version} && 0%{?suse_version} < 1220
%patch3 -p1
%endif
# 0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch
@@ -90,7 +90,7 @@ control.
%patch7 -p1
# 0009-Mangle-PAX-headers-when-using-posix-tar-format.patch
%patch8 -p1
-# 0010-Remove-all-timestamps-from-extended-PAX-headers.patch
+# 0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch
%patch9 -p1
%build