--- /dev/null
+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);
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
--- /dev/null
+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);
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
%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
%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