From: Markus Lehtonen Date: Mon, 9 Dec 2013 09:22:18 +0000 (+0200) Subject: packaging: version bump to 1.30 X-Git-Tag: tizen/1.30-20140227~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6d5b294e8235944e8b86766f16e1a978d3a098a3;p=tools%2Fpristine-tar.git packaging: version bump to 1.30 Rebase patches and update changelogs. Change-Id: I6aa54c76be6d94d1c427f0177678bdad684961d9 Signed-off-by: Markus Lehtonen --- diff --git a/debian/changelog b/debian/changelog index 1c8257c..66ffbd7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +pristine-tar (1.30-tizen20131209) UNRELEASED; urgency=low + + * Tizen tools version based on upstream 1.30 + + -- Markus Lehtonen Mon, 09 Dec 2013 11:28:44 +0200 + pristine-tar (1.30) unstable; urgency=low * Set GIT_WORK_TREE when committing to make it work when inside diff --git a/debian/patches/0001-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch b/debian/patches/0001-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch index b3bbab9..6f8ddac 100644 --- a/debian/patches/0001-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch +++ b/debian/patches/0001-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch @@ -9,7 +9,7 @@ Signed-off-by: Markus Lehtonen 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pristine-gz b/pristine-gz -index 3668256..00c0055 100755 +index 5ca9f65..973c7fb 100755 --- a/pristine-gz +++ b/pristine-gz @@ -96,6 +96,11 @@ use File::Basename qw/basename/; diff --git a/debian/patches/0002-Use-posix-tar-format-by-default.patch b/debian/patches/0002-Use-posix-tar-format-by-default.patch new file mode 100644 index 0000000..6b615aa --- /dev/null +++ b/debian/patches/0002-Use-posix-tar-format-by-default.patch @@ -0,0 +1,54 @@ +From: Markus Lehtonen +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 +--- + pristine-tar | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/pristine-tar b/pristine-tar +index 0bf44e8..d36e51b 100755 +--- a/pristine-tar ++++ b/pristine-tar +@@ -417,12 +417,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) { +@@ -532,7 +530,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}; +@@ -800,7 +799,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/0002-implement-tar-format-guessing.patch b/debian/patches/0002-implement-tar-format-guessing.patch deleted file mode 100644 index 028d02b..0000000 --- a/debian/patches/0002-implement-tar-format-guessing.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: Markus Lehtonen -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 ---- - 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/0003-Mangle-PAX-headers-when-using-posix-tar-format.patch b/debian/patches/0003-Mangle-PAX-headers-when-using-posix-tar-format.patch new file mode 100644 index 0000000..d2862b0 --- /dev/null +++ b/debian/patches/0003-Mangle-PAX-headers-when-using-posix-tar-format.patch @@ -0,0 +1,34 @@ +From: Markus Lehtonen +Date: Thu, 6 Jun 2013 14:31:25 +0300 +Subject: Mangle PAX headers when using posix tar format + +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 +--- + pristine-tar | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/pristine-tar b/pristine-tar +index d36e51b..4421068 100755 +--- a/pristine-tar ++++ b/pristine-tar +@@ -378,6 +378,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,mtime:=0,atime:=0,ctime:=0'); ++ } + } + + doit(@cmd); diff --git a/debian/patches/0003-Use-posix-tar-format-by-default.patch b/debian/patches/0003-Use-posix-tar-format-by-default.patch deleted file mode 100644 index cf712c1..0000000 --- a/debian/patches/0003-Use-posix-tar-format-by-default.patch +++ /dev/null @@ -1,54 +0,0 @@ -From: Markus Lehtonen -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 ---- - 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/0004-HACK-workaround-for-some-broken-pristine-tar-branche.patch b/debian/patches/0004-HACK-workaround-for-some-broken-pristine-tar-branche.patch new file mode 100644 index 0000000..7378bdb --- /dev/null +++ b/debian/patches/0004-HACK-workaround-for-some-broken-pristine-tar-branche.patch @@ -0,0 +1,28 @@ +From: Markus Lehtonen +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 +--- + pristine-bz2 | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pristine-bz2 b/pristine-bz2 +index 411e990..8fc694e 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/0004-Mangle-PAX-headers-when-using-posix-tar-format.patch b/debian/patches/0004-Mangle-PAX-headers-when-using-posix-tar-format.patch deleted file mode 100644 index 8385147..0000000 --- a/debian/patches/0004-Mangle-PAX-headers-when-using-posix-tar-format.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Markus Lehtonen -Date: Thu, 6 Jun 2013 14:31:25 +0300 -Subject: Mangle PAX headers when using posix tar format - -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 ---- - pristine-tar | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/pristine-tar b/pristine-tar -index f1fae98..19af965 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,mtime:=0,atime:=0,ctime:=0'); -+ } - } - - doit(@cmd); 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 deleted file mode 100644 index c264fb5..0000000 --- a/debian/patches/0005-HACK-workaround-for-some-broken-pristine-tar-branche.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Markus Lehtonen -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 ---- - 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/series b/debian/patches/series index a4aec78..43df199 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,4 @@ 0001-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch -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-HACK-workaround-for-some-broken-pristine-tar-branche.patch +0002-Use-posix-tar-format-by-default.patch +0003-Mangle-PAX-headers-when-using-posix-tar-format.patch +0004-HACK-workaround-for-some-broken-pristine-tar-branche.patch diff --git a/packaging/0001-Fix-libbz2.so-version-numbers.patch b/packaging/0001-Fix-libbz2.so-version-numbers.patch index c2a83e4..f5187d4 100644 --- a/packaging/0001-Fix-libbz2.so-version-numbers.patch +++ b/packaging/0001-Fix-libbz2.so-version-numbers.patch @@ -13,7 +13,7 @@ Signed-off-by: Markus Lehtonen 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pit/suse-bzip2/Makefile b/pit/suse-bzip2/Makefile -index 3e41319..ef3f9d8 100644 +index 031aacf..5d647a3 100644 --- a/pit/suse-bzip2/Makefile +++ b/pit/suse-bzip2/Makefile @@ -12,8 +12,8 @@ diff --git a/packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch b/packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch index 3c05114..5edf29a 100644 --- a/packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch +++ b/packaging/0004-openSUSE-HACK-enable-special-upstream-bzip2.patch @@ -18,7 +18,7 @@ Signed-off-by: Markus Lehtonen 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile.PL b/Makefile.PL -index 60a5103..8a2fe1c 100755 +index 904d6ce..e64459a 100755 --- a/Makefile.PL +++ b/Makefile.PL @@ -59,6 +59,8 @@ extra_build: zgz/zgz pristine-tar.spec @@ -41,7 +41,7 @@ index 60a5103..8a2fe1c 100755 extra_clean: $(MAKE) clean -C pit/suse-bzip2 PREFIX=$(PREFIX) diff --git a/pristine-bz2 b/pristine-bz2 -index 53c42bc..dbbe319 100755 +index c2403ff..411e990 100755 --- a/pristine-bz2 +++ b/pristine-bz2 @@ -91,6 +91,8 @@ use IO::Handle; diff --git a/packaging/0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch b/packaging/0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch index b3bbab9..6f8ddac 100644 --- a/packaging/0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch +++ b/packaging/0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch @@ -9,7 +9,7 @@ Signed-off-by: Markus Lehtonen 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pristine-gz b/pristine-gz -index 3668256..00c0055 100755 +index 5ca9f65..973c7fb 100755 --- a/pristine-gz +++ b/pristine-gz @@ -96,6 +96,11 @@ use File::Basename qw/basename/; diff --git a/packaging/0007-Use-posix-tar-format-by-default.patch b/packaging/0007-Use-posix-tar-format-by-default.patch new file mode 100644 index 0000000..6b615aa --- /dev/null +++ b/packaging/0007-Use-posix-tar-format-by-default.patch @@ -0,0 +1,54 @@ +From: Markus Lehtonen +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 +--- + pristine-tar | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/pristine-tar b/pristine-tar +index 0bf44e8..d36e51b 100755 +--- a/pristine-tar ++++ b/pristine-tar +@@ -417,12 +417,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) { +@@ -532,7 +530,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}; +@@ -800,7 +799,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/0007-implement-tar-format-guessing.patch b/packaging/0007-implement-tar-format-guessing.patch deleted file mode 100644 index 028d02b..0000000 --- a/packaging/0007-implement-tar-format-guessing.patch +++ /dev/null @@ -1,60 +0,0 @@ -From: Markus Lehtonen -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 ---- - 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-Mangle-PAX-headers-when-using-posix-tar-format.patch b/packaging/0008-Mangle-PAX-headers-when-using-posix-tar-format.patch new file mode 100644 index 0000000..d2862b0 --- /dev/null +++ b/packaging/0008-Mangle-PAX-headers-when-using-posix-tar-format.patch @@ -0,0 +1,34 @@ +From: Markus Lehtonen +Date: Thu, 6 Jun 2013 14:31:25 +0300 +Subject: Mangle PAX headers when using posix tar format + +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 +--- + pristine-tar | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/pristine-tar b/pristine-tar +index d36e51b..4421068 100755 +--- a/pristine-tar ++++ b/pristine-tar +@@ -378,6 +378,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,mtime:=0,atime:=0,ctime:=0'); ++ } + } + + doit(@cmd); diff --git a/packaging/0008-Use-posix-tar-format-by-default.patch b/packaging/0008-Use-posix-tar-format-by-default.patch deleted file mode 100644 index cf712c1..0000000 --- a/packaging/0008-Use-posix-tar-format-by-default.patch +++ /dev/null @@ -1,54 +0,0 @@ -From: Markus Lehtonen -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 ---- - 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-HACK-workaround-for-some-broken-pristine-tar-branche.patch b/packaging/0009-HACK-workaround-for-some-broken-pristine-tar-branche.patch new file mode 100644 index 0000000..7378bdb --- /dev/null +++ b/packaging/0009-HACK-workaround-for-some-broken-pristine-tar-branche.patch @@ -0,0 +1,28 @@ +From: Markus Lehtonen +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 +--- + pristine-bz2 | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/pristine-bz2 b/pristine-bz2 +index 411e990..8fc694e 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/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch b/packaging/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch deleted file mode 100644 index 8385147..0000000 --- a/packaging/0009-Mangle-PAX-headers-when-using-posix-tar-format.patch +++ /dev/null @@ -1,34 +0,0 @@ -From: Markus Lehtonen -Date: Thu, 6 Jun 2013 14:31:25 +0300 -Subject: Mangle PAX headers when using posix tar format - -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 ---- - pristine-tar | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/pristine-tar b/pristine-tar -index f1fae98..19af965 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,mtime:=0,atime:=0,ctime:=0'); -+ } - } - - doit(@cmd); 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 deleted file mode 100644 index c264fb5..0000000 --- a/packaging/0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch +++ /dev/null @@ -1,28 +0,0 @@ -From: Markus Lehtonen -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 ---- - 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/pristine-tar.spec b/packaging/pristine-tar.spec index af7bd7f..f187517 100644 --- a/packaging/pristine-tar.spec +++ b/packaging/pristine-tar.spec @@ -1,6 +1,6 @@ Name: pristine-tar Summary: Regenerate pristine tarballs -Version: 1.28 +Version: 1.30 Release: 0 Group: Development/Tools/Building License: GPLv2 @@ -13,10 +13,9 @@ 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 -Patch9: 0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch +Patch6: 0007-Use-posix-tar-format-by-default.patch +Patch7: 0008-Mangle-PAX-headers-when-using-posix-tar-format.patch +Patch8: 0009-HACK-workaround-for-some-broken-pristine-tar-branche.patch Requires: gzip Requires: bzip2 %if 0%{?suse_version} >= 1210 @@ -44,7 +43,7 @@ BuildRequires: fdupes # Need to define these manually because otherwise rpmbuild makes the package # provide libbz2.so which breaks building of other tools AutoProv: no -Provides: tizen-pristine-tar = 20131205 +Provides: tizen-pristine-tar = 20131209 Provides: perl(Pristine::Tar) Provides: perl(Pristine::Tar::Delta) Provides: perl(Pristine::Tar::Delta::Tarball) @@ -85,14 +84,12 @@ control. %patch4 -p1 # 0006-Add-.gbp.conf.patch %patch5 -p1 -# 0007-implement-tar-format-guessing.patch +# 0007-Use-posix-tar-format-by-default.patch %patch6 -p1 -# 0008-Use-posix-tar-format-by-default.patch +# 0008-Mangle-PAX-headers-when-using-posix-tar-format.patch %patch7 -p1 -# 0009-Mangle-PAX-headers-when-using-posix-tar-format.patch +# 0009-HACK-workaround-for-some-broken-pristine-tar-branche.patch %patch8 -p1 -# 0010-HACK-workaround-for-some-broken-pristine-tar-branche.patch -%patch9 -p1 %build %if 0%{?fedora}