summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiankang Fan <jiankang.fan@samsung.com>2016-09-27 11:31:20 +0800
committerSoonKyu Park <sk7.park@samsung.com>2016-12-28 22:19:07 +0900
commit8c99bd2dd6339b021e51dbf67c618e32572cdb02 (patch)
treeeb44a075db8eb8c3a2937efb0fd9405b56ac17dc
parentd99d6fb276ba5144c6fb08559a6e24d2e7ce810c (diff)
downloadpristine-tar-8c99bd2dd6339b021e51dbf67c618e32572cdb02.tar.gz
pristine-tar-8c99bd2dd6339b021e51dbf67c618e32572cdb02.tar.bz2
pristine-tar-8c99bd2dd6339b021e51dbf67c618e32572cdb02.zip
Fix xdelta upgrade to xdelta3 but left pristine-gz
Change-Id: I6fe34718e339dd42826fac5971d36abf291850e3
-rw-r--r--debian/patches/0005-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch39
-rw-r--r--debian/patches/series1
-rw-r--r--packaging/00010-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch39
-rw-r--r--packaging/pristine-tar.spec5
4 files changed, 83 insertions, 1 deletions
diff --git a/debian/patches/0005-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch b/debian/patches/0005-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch
new file mode 100644
index 0000000..06ddd54
--- /dev/null
+++ b/debian/patches/0005-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch
@@ -0,0 +1,39 @@
+From 77a7c2e9ad4c0a1f51451d0c11e507c513fba652 Mon Sep 17 00:00:00 2001
+From: yang.zhang <y0169.zhang@samsung.com>
+Date: Wed, 27 Jul 2016 13:55:14 +0800
+Subject: [PATCH] Fix xdelta upgrade to xdelta3 for pristine-gz
+
+Change-Id: I4fcb088918dafe1d2c2946f04f8308271df9b74c
+---
+
+diff --git a/pristine-gz b/pristine-gz
+index 5ca9f65..d0ebb48 100755
+--- a/pristine-gz
++++ b/pristine-gz
+@@ -96,6 +96,8 @@
+
+ delete $ENV{GZIP};
+
++my $xdelta_program = "xdelta3";
++
+ dispatch(
+ commands => {
+ usage => [\&usage],
+@@ -234,7 +236,7 @@
+ 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 -0 -e -s $tempout $orig $tempdir/tmpdelta 2>/dev/null") >> 8;
+ # xdelta exits 1 on success
+ if ($ret == 1) {
+ my $size=(stat("$tempdir/tmpdelta"))[7];
+@@ -297,7 +299,7 @@
+ my $tempdir=tempdir();
+ my $tfile="$tempdir/".basename($file).".gz";
+ doit_redir($file, $tfile, @zgz);
+- doit("xdelta", "patch", "--pristine", $delta->{delta}, $tfile, "$file.gz");
++ my $ret=system("$xdelta_program -d -s $tfile $delta->{delta} $file.gz");
+ }
+ else {
+ doit_redir("$file", "$file.gz", @zgz);
diff --git a/debian/patches/series b/debian/patches/series
index 3696249..b4c29c1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
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
+0005-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch
diff --git a/packaging/00010-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch b/packaging/00010-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch
new file mode 100644
index 0000000..06ddd54
--- /dev/null
+++ b/packaging/00010-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch
@@ -0,0 +1,39 @@
+From 77a7c2e9ad4c0a1f51451d0c11e507c513fba652 Mon Sep 17 00:00:00 2001
+From: yang.zhang <y0169.zhang@samsung.com>
+Date: Wed, 27 Jul 2016 13:55:14 +0800
+Subject: [PATCH] Fix xdelta upgrade to xdelta3 for pristine-gz
+
+Change-Id: I4fcb088918dafe1d2c2946f04f8308271df9b74c
+---
+
+diff --git a/pristine-gz b/pristine-gz
+index 5ca9f65..d0ebb48 100755
+--- a/pristine-gz
++++ b/pristine-gz
+@@ -96,6 +96,8 @@
+
+ delete $ENV{GZIP};
+
++my $xdelta_program = "xdelta3";
++
+ dispatch(
+ commands => {
+ usage => [\&usage],
+@@ -234,7 +236,7 @@
+ 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 -0 -e -s $tempout $orig $tempdir/tmpdelta 2>/dev/null") >> 8;
+ # xdelta exits 1 on success
+ if ($ret == 1) {
+ my $size=(stat("$tempdir/tmpdelta"))[7];
+@@ -297,7 +299,7 @@
+ my $tempdir=tempdir();
+ my $tfile="$tempdir/".basename($file).".gz";
+ doit_redir($file, $tfile, @zgz);
+- doit("xdelta", "patch", "--pristine", $delta->{delta}, $tfile, "$file.gz");
++ my $ret=system("$xdelta_program -d -s $tfile $delta->{delta} $file.gz");
+ }
+ else {
+ doit_redir("$file", "$file.gz", @zgz);
diff --git a/packaging/pristine-tar.spec b/packaging/pristine-tar.spec
index 84da4d5..a1d190b 100644
--- a/packaging/pristine-tar.spec
+++ b/packaging/pristine-tar.spec
@@ -16,6 +16,7 @@ Patch4: 0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.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
+Patch9: 00010-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch
Requires: tar
Requires: gzip
Requires: bzip2
@@ -87,7 +88,7 @@ control.
%patch3 -p1
%endif
# 0005-pristine-gz-obey-the-XDELTA_PROGRAM-build-parameter.patch
-%patch4 -p1
+#%patch4 -p1
# 0006-Add-.gbp.conf.patch
#%patch5 -p1
# 0007-Use-posix-tar-format-by-default.patch
@@ -96,6 +97,8 @@ control.
%patch7 -p1
# 0009-HACK-workaround-for-some-broken-pristine-tar-branche.patch
%patch8 -p1
+# 00010-Fix-xdelta-upgrade-to-xdelta3-for-pristine-gz.patch
+%patch9 -p1
%build
%if 0%{?fedora} || 0%{?centos_ver} >= 7