Mageia Bugzilla – Attachment 7117 Details for
Bug 16945
Apply fixes from Fedora to deltarpm package
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
Patch to apply patches from Fedora to deltarpm package
deltarpm-fixes.diff (text/plain), 10.43 KB, created by
Neal Gompa
on 2015-10-12 01:45:07 CEST
(
hide
)
Description:
Patch to apply patches from Fedora to deltarpm package
Filename:
MIME Type:
Creator:
Neal Gompa
Created:
2015-10-12 01:45:07 CEST
Size:
10.43 KB
patch
obsolete
>Index: SOURCES/0002-do-not-finish-applydeltarpm-jobs-when-in-the-middle-.patch >=================================================================== >--- SOURCES/0002-do-not-finish-applydeltarpm-jobs-when-in-the-middle-.patch (revision 0) >+++ SOURCES/0002-do-not-finish-applydeltarpm-jobs-when-in-the-middle-.patch (working copy) >@@ -0,0 +1,98 @@ >+From 9e0e8bf226112195c93fa2493086353bd46bd001 Mon Sep 17 00:00:00 2001 >+From: Michael Schroeder <mls@suse.de> >+Date: Wed, 17 Dec 2014 18:07:11 +0100 >+Subject: [PATCH 2/4] do not finish applydeltarpm jobs when in the middle of a >+ request >+ >+If applydeltarpm failed we start another request, this does not >+mix well if re're in the middle of receiving another request... >+--- >+ drpmsync | 39 +++++++++++++++++++++++++++------------ >+ 1 file changed, 27 insertions(+), 12 deletions(-) >+ >+diff --git a/drpmsync b/drpmsync >+index f629aad..2265b7e 100755 >+--- a/drpmsync >++++ b/drpmsync >+@@ -2686,6 +2686,7 @@ sub opensock { >+ return if $sock_isopen; >+ my $tcpproto = getprotobyname('tcp'); >+ socket(S, PF_INET, SOCK_STREAM, $tcpproto) || die("socket: $!\n"); >++ setsockopt(S, SOL_SOCKET, SO_KEEPALIVE, pack("l",1)) || die("setsockopt: $!\n"); >+ connect(S, sockaddr_in($syncport, $syncaddr)) || die("connect: $!\n"); >+ $sock_isopen = 1; >+ } >+@@ -2974,7 +2975,8 @@ sub drpmsync_get_update { >+ } elsif ($type eq 'FISO') { >+ $ans = copytofile(*S, "$tmpnam.fiso", $ans, $anssize, $ctx); >+ $ans = finishreq(*S, $ans, $ctx, $id); >+- return 'FISO', [ $tmpnam, undef, substr($extra, 0, 12) ]; >++ $d = [ $tmpnam, undef, substr($extra, 0, 12) ]; >++ return ('FISO', $d); >+ } elsif ($type eq 'RPM ') { >+ $sabytes -= $anssize; >+ my $delta; >+@@ -2982,36 +2984,49 @@ sub drpmsync_get_update { >+ die("nothing to do?\n") if $nrpm == 0 && $ndrpm == 0; >+ my @deltas; >+ my $dextra = substr($extra, 12 + 16); >++ my @renames; >+ while ($ndrpm > 0) { >+ $delta = $tmpnam; >+ $delta =~ s/[^\/]*$//; >+ $delta .= substr($dextra, 12, 32 * 3); >+- # end old job if we have a delta conflict >+- checkjob() if $runningjob && -e $delta; >+ my $size = hex(substr($dextra, 12 + 3 * 32, 8)); >+ die("delta rpm bigger than answer? $size > $anssize\n") if $size > $anssize; >++ push @deltas, $delta; >++ # conflict with running job? >++ if ($runningjob && -e $delta) { >++ push @renames, $delta; >++ $delta .= ".tmp"; >++ } >+ $ans = copytofile(*S, $delta, $ans, $size, $ctx); >+ $anssize -= $size; >+ fixmodetime($delta, substr($dextra, 0, 12)); >+ $dextra = substr($dextra, 12 + 32 * 3 + 8); >+- push @deltas, $delta; >+ $ndrpm--; >+ } >+- if ($nrpm == 1) { >++ if ($nrpm) { >+ $ans = copytofile_seek(*S, $tmpnam, $extractoff, $ans, $anssize, $ctx); >+- $ans = finishreq(*S, $ans, $ctx, $id); >+- return 'RPM ', [ $dto->[0] ], @deltas if $rextract; >++ } else { >++ die("junk at end of answer\n") if $anssize; >++ } >++ $ans = finishreq(*S, $ans, $ctx, $id); >++ if (@renames) { >++ checkjob(); >++ for (@renames) { >++ rename("$_.tmp", $_) || die("rename $_.tmp $_: $!\n"); >++ } >++ } >++ if (!$nrpm) { >++ $d = [ undef, undef, substr($extra, 0, 12) ]; >++ } elsif ($rextract) { >++ $d = [ $dto->[0] ]; >++ } else { >+ fixmodetime($tmpnam, substr($extra, 0, 12)); >+ my @s = stat($tmpnam); >+ die("$tmpnam: $!\n") unless @s; >+ $sabytes += $s[7]; >+ $d = [ $dto->[0], "$s[9]/$s[7]/$s[1]", sprintf("1%03x%08x", ($s[2] & 07777), $s[9]), rpminfo($tmpnam) ]; >+- } else { >+- die("junk at end of answer\n") if $anssize; >+- $ans = finishreq(*S, $ans, $ctx, $id); >+- $d = [ undef, undef, substr($extra, 0, 12) ]; >+ } >+- return 'RPM ', $d, @deltas; >++ return ('RPM ', $d, @deltas); >+ } else { >+ die("received strange answer type: $type\n"); >+ } >+-- >+2.1.0 >+ >Index: SOURCES/0003-add-newline-in-missing-prelink-error.patch >=================================================================== >--- SOURCES/0003-add-newline-in-missing-prelink-error.patch (revision 0) >+++ SOURCES/0003-add-newline-in-missing-prelink-error.patch (working copy) >@@ -0,0 +1,25 @@ >+From 6b13095e1ae5b3ba2f2631ce750ac1d3d3d3e152 Mon Sep 17 00:00:00 2001 >+From: Michael Schroeder <mls@suse.de> >+Date: Fri, 9 Jan 2015 12:39:39 +0100 >+Subject: [PATCH 3/4] add newline in missing prelink error >+ >+--- >+ prelink.c | 2 +- >+ 1 file changed, 1 insertion(+), 1 deletion(-) >+ >+diff --git a/prelink.c b/prelink.c >+index 07516f8..e74fbc5 100644 >+--- a/prelink.c >++++ b/prelink.c >+@@ -130,7 +130,7 @@ prelinked_open(char *name) >+ if (stat("/usr/sbin/prelink", &stb)) >+ { >+ perror("/usr/sbin/prelink"); >+- fprintf(stderr, "prelink not installed, cannot undo prelinking"); >++ fprintf(stderr, "prelink not installed, cannot undo prelinking\n"); >+ exit(1); >+ } >+ strcpy(template, "/tmp/deltarpm.XXXXXX"); >+-- >+2.1.0 >+ >Index: SOURCES/0004-Return-error-rather-than-crashing-if-we-can-t-alloca.patch >=================================================================== >--- SOURCES/0004-Return-error-rather-than-crashing-if-we-can-t-alloca.patch (revision 0) >+++ SOURCES/0004-Return-error-rather-than-crashing-if-we-can-t-alloca.patch (working copy) >@@ -0,0 +1,41 @@ >+From 1d0657b29ee72e842e0d1ada61ea0177b3159a8e Mon Sep 17 00:00:00 2001 >+From: Jonathan Dieter <jdieter@lesbg.com> >+Date: Mon, 12 Jan 2015 13:47:51 +0200 >+Subject: [PATCH 4/4] Return error rather than crashing if we can't allocate >+ memory >+ >+Signed-off-by: Jonathan Dieter <jdieter@lesbg.com> >+--- >+ deltarpmmodule.c | 9 +++++++++ >+ 1 file changed, 9 insertions(+) >+ >+diff --git a/deltarpmmodule.c b/deltarpmmodule.c >+index cf333b6..40ea60f 100644 >+--- a/deltarpmmodule.c >++++ b/deltarpmmodule.c >+@@ -46,6 +46,11 @@ PyObject *createDict(struct deltarpm d) >+ if (d.seq) { >+ char *tmp = calloc(d.seql * 2 + 1, sizeof(char)); >+ int i; >++ >++ if(tmp == NULL) { >++ PyErr_SetFromErrno(PyExc_SystemError); >++ return NULL; >++ } >+ for (i = 0; i < d.seql; i++) { >+ char buf[3]; >+ >+@@ -54,6 +59,10 @@ PyObject *createDict(struct deltarpm d) >+ } >+ o = PyString_FromString(tmp); >+ free(tmp); >++ if(o == NULL) { >++ PyErr_SetFromErrno(PyExc_SystemError); >++ return NULL; >++ } >+ PyDict_SetItemString(dict, "seq", o); >+ Py_DECREF(o); >+ } else { >+-- >+2.1.0 >+ >Index: SOURCES/0005-fix-off-by-one-error-in-delta-generation-code.patch >=================================================================== >--- SOURCES/0005-fix-off-by-one-error-in-delta-generation-code.patch (revision 0) >+++ SOURCES/0005-fix-off-by-one-error-in-delta-generation-code.patch (working copy) >@@ -0,0 +1,26 @@ >+From 619eaf318b3420056c14933bd513201bfb8af494 Mon Sep 17 00:00:00 2001 >+From: Michael Schroeder <mls@suse.de> >+Date: Mon, 12 Jan 2015 14:38:50 +0100 >+Subject: [PATCH 5/6] fix off-by-one error in delta generation code >+ >+This could lead to a segfault in rare circumstances. >+--- >+ delta.c | 2 +- >+ 1 file changed, 1 insertion(+), 1 deletion(-) >+ >+diff --git a/delta.c b/delta.c >+index 3569351..caafa62 100644 >+--- a/delta.c >++++ b/delta.c >+@@ -366,7 +366,7 @@ scannext: >+ { >+ if (memcmp(new + scan + HSIZE *3, old + pos2 - 1, HSIZE)) >+ { >+- ssx2 = (ssx2 == prime) ? 0 : ssx2 + 1; >++ ssx2 = (ssx2 == prime - 1) ? 0 : ssx2 + 1; >+ pos2 = hash[ssx2]; >+ } >+ } >+-- >+2.1.0 >+ >Index: SOURCES/0006-Add-fflush-s-so-output-can-be-watched-using-tail-f.patch >=================================================================== >--- SOURCES/0006-Add-fflush-s-so-output-can-be-watched-using-tail-f.patch (revision 0) >+++ SOURCES/0006-Add-fflush-s-so-output-can-be-watched-using-tail-f.patch (working copy) >@@ -0,0 +1,43 @@ >+From 19b7ad9efae520997da8b4b58a5ae0208185952c Mon Sep 17 00:00:00 2001 >+From: Jonathan Dieter <jdieter@lesbg.com> >+Date: Wed, 14 Jan 2015 08:16:55 +0200 >+Subject: [PATCH 6/6] Add fflush's so output can be watched using tail -f >+ >+Signed-off-by: Jonathan Dieter <jdieter@lesbg.com> >+--- >+ applydeltaiso.c | 11 +++++++++-- >+ 1 file changed, 9 insertions(+), 2 deletions(-) >+ >+diff --git a/applydeltaiso.c b/applydeltaiso.c >+index 67f8e39..e482694 100644 >+--- a/applydeltaiso.c >++++ b/applydeltaiso.c >+@@ -122,6 +122,7 @@ processrpm(FILE *fpold, struct cfile *ocf, struct cfile *cf, unsigned int *nmp, >+ unsigned char buf[8192]; >+ >+ printf("%s: verbatim copy\n", namebuf); >++ fflush(stdout); >+ len = cget4(cf); >+ while (len) >+ { >+@@ -141,9 +142,15 @@ processrpm(FILE *fpold, struct cfile *ocf, struct cfile *cf, unsigned int *nmp, >+ return; >+ } >+ if (ctype == 254) >+- printf("%s: copying unchanged payload\n", namebuf); >++ { >++ printf("%s: copying unchanged payload\n", namebuf); >++ fflush(stdout); >++ } >+ else >+- printf("%s (%s): applying delta\n", namebuf, cfile_comp2str(ctype)); >++ { >++ printf("%s (%s): applying delta\n", namebuf, cfile_comp2str(ctype)); >++ fflush(stdout); >++ } >+ rpmn = cget4(cf); >+ if (rpmn < 0 || rpmn >= nmpn) >+ { >+-- >+2.1.0 >+ >Index: SPECS/deltarpm.spec >=================================================================== >--- SPECS/deltarpm.spec (revision 889844) >+++ SPECS/deltarpm.spec (working copy) >@@ -21,7 +21,7 @@ > > Name: deltarpm > Version: 3.6 >-Release: %mkrel 16 >+Release: %mkrel 17 > Summary: Tools to Create and Apply deltarpms > License: BSD-3-Clause > Group: System/Packaging >@@ -28,15 +28,22 @@ > Url: ftp://ftp.suse.com/pub/projects/deltarpm > %if 0%{?snap} > # Generate source by doing: >-# git clone git://gitorious.org/deltarpm/deltarpm >+# git clone https://github.com/rpm-software-management/deltarpm.git > # cd deltarpm > # git archive --format=tar --prefix="deltarpm-git-20120324/" 7ed5208 | \ > # bzip2 > deltarpm-git-20120324.tar.bz2 >-Source: %{name}-%{version}-20120324.tar.bz2 >+Source: %{name}-%{version}-20120324.tar.bz2 > %else > Source: ftp://ftp.suse.com/pub/projects/deltarpm/%{name}-%{version}.tar.bz2 > %endif >-Patch1: 0003-initial-perl-binding.patch >+# Patches from Fedora >+Patch1: 0002-do-not-finish-applydeltarpm-jobs-when-in-the-middle-.patch >+Patch2: 0003-add-newline-in-missing-prelink-error.patch >+Patch3: 0004-Return-error-rather-than-crashing-if-we-can-t-alloca.patch >+Patch4: 0005-fix-off-by-one-error-in-delta-generation-code.patch >+Patch5: 0006-Add-fflush-s-so-output-can-be-watched-using-tail-f.patch >+# Mageia patches >+Patch6: 0003-initial-perl-binding.patch > BuildRequires: libbzip2-devel > BuildRequires: python-devel > BuildRequires: python3-devel
Index: SOURCES/0002-do-not-finish-applydeltarpm-jobs-when-in-the-middle-.patch =================================================================== --- SOURCES/0002-do-not-finish-applydeltarpm-jobs-when-in-the-middle-.patch (revision 0) +++ SOURCES/0002-do-not-finish-applydeltarpm-jobs-when-in-the-middle-.patch (working copy) @@ -0,0 +1,98 @@ +From 9e0e8bf226112195c93fa2493086353bd46bd001 Mon Sep 17 00:00:00 2001 +From: Michael Schroeder <mls@suse.de> +Date: Wed, 17 Dec 2014 18:07:11 +0100 +Subject: [PATCH 2/4] do not finish applydeltarpm jobs when in the middle of a + request + +If applydeltarpm failed we start another request, this does not +mix well if re're in the middle of receiving another request... +--- + drpmsync | 39 +++++++++++++++++++++++++++------------ + 1 file changed, 27 insertions(+), 12 deletions(-) + +diff --git a/drpmsync b/drpmsync +index f629aad..2265b7e 100755 +--- a/drpmsync ++++ b/drpmsync +@@ -2686,6 +2686,7 @@ sub opensock { + return if $sock_isopen; + my $tcpproto = getprotobyname('tcp'); + socket(S, PF_INET, SOCK_STREAM, $tcpproto) || die("socket: $!\n"); ++ setsockopt(S, SOL_SOCKET, SO_KEEPALIVE, pack("l",1)) || die("setsockopt: $!\n"); + connect(S, sockaddr_in($syncport, $syncaddr)) || die("connect: $!\n"); + $sock_isopen = 1; + } +@@ -2974,7 +2975,8 @@ sub drpmsync_get_update { + } elsif ($type eq 'FISO') { + $ans = copytofile(*S, "$tmpnam.fiso", $ans, $anssize, $ctx); + $ans = finishreq(*S, $ans, $ctx, $id); +- return 'FISO', [ $tmpnam, undef, substr($extra, 0, 12) ]; ++ $d = [ $tmpnam, undef, substr($extra, 0, 12) ]; ++ return ('FISO', $d); + } elsif ($type eq 'RPM ') { + $sabytes -= $anssize; + my $delta; +@@ -2982,36 +2984,49 @@ sub drpmsync_get_update { + die("nothing to do?\n") if $nrpm == 0 && $ndrpm == 0; + my @deltas; + my $dextra = substr($extra, 12 + 16); ++ my @renames; + while ($ndrpm > 0) { + $delta = $tmpnam; + $delta =~ s/[^\/]*$//; + $delta .= substr($dextra, 12, 32 * 3); +- # end old job if we have a delta conflict +- checkjob() if $runningjob && -e $delta; + my $size = hex(substr($dextra, 12 + 3 * 32, 8)); + die("delta rpm bigger than answer? $size > $anssize\n") if $size > $anssize; ++ push @deltas, $delta; ++ # conflict with running job? ++ if ($runningjob && -e $delta) { ++ push @renames, $delta; ++ $delta .= ".tmp"; ++ } + $ans = copytofile(*S, $delta, $ans, $size, $ctx); + $anssize -= $size; + fixmodetime($delta, substr($dextra, 0, 12)); + $dextra = substr($dextra, 12 + 32 * 3 + 8); +- push @deltas, $delta; + $ndrpm--; + } +- if ($nrpm == 1) { ++ if ($nrpm) { + $ans = copytofile_seek(*S, $tmpnam, $extractoff, $ans, $anssize, $ctx); +- $ans = finishreq(*S, $ans, $ctx, $id); +- return 'RPM ', [ $dto->[0] ], @deltas if $rextract; ++ } else { ++ die("junk at end of answer\n") if $anssize; ++ } ++ $ans = finishreq(*S, $ans, $ctx, $id); ++ if (@renames) { ++ checkjob(); ++ for (@renames) { ++ rename("$_.tmp", $_) || die("rename $_.tmp $_: $!\n"); ++ } ++ } ++ if (!$nrpm) { ++ $d = [ undef, undef, substr($extra, 0, 12) ]; ++ } elsif ($rextract) { ++ $d = [ $dto->[0] ]; ++ } else { + fixmodetime($tmpnam, substr($extra, 0, 12)); + my @s = stat($tmpnam); + die("$tmpnam: $!\n") unless @s; + $sabytes += $s[7]; + $d = [ $dto->[0], "$s[9]/$s[7]/$s[1]", sprintf("1%03x%08x", ($s[2] & 07777), $s[9]), rpminfo($tmpnam) ]; +- } else { +- die("junk at end of answer\n") if $anssize; +- $ans = finishreq(*S, $ans, $ctx, $id); +- $d = [ undef, undef, substr($extra, 0, 12) ]; + } +- return 'RPM ', $d, @deltas; ++ return ('RPM ', $d, @deltas); + } else { + die("received strange answer type: $type\n"); + } +-- +2.1.0 + Index: SOURCES/0003-add-newline-in-missing-prelink-error.patch =================================================================== --- SOURCES/0003-add-newline-in-missing-prelink-error.patch (revision 0) +++ SOURCES/0003-add-newline-in-missing-prelink-error.patch (working copy) @@ -0,0 +1,25 @@ +From 6b13095e1ae5b3ba2f2631ce750ac1d3d3d3e152 Mon Sep 17 00:00:00 2001 +From: Michael Schroeder <mls@suse.de> +Date: Fri, 9 Jan 2015 12:39:39 +0100 +Subject: [PATCH 3/4] add newline in missing prelink error + +--- + prelink.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/prelink.c b/prelink.c +index 07516f8..e74fbc5 100644 +--- a/prelink.c ++++ b/prelink.c +@@ -130,7 +130,7 @@ prelinked_open(char *name) + if (stat("/usr/sbin/prelink", &stb)) + { + perror("/usr/sbin/prelink"); +- fprintf(stderr, "prelink not installed, cannot undo prelinking"); ++ fprintf(stderr, "prelink not installed, cannot undo prelinking\n"); + exit(1); + } + strcpy(template, "/tmp/deltarpm.XXXXXX"); +-- +2.1.0 + Index: SOURCES/0004-Return-error-rather-than-crashing-if-we-can-t-alloca.patch =================================================================== --- SOURCES/0004-Return-error-rather-than-crashing-if-we-can-t-alloca.patch (revision 0) +++ SOURCES/0004-Return-error-rather-than-crashing-if-we-can-t-alloca.patch (working copy) @@ -0,0 +1,41 @@ +From 1d0657b29ee72e842e0d1ada61ea0177b3159a8e Mon Sep 17 00:00:00 2001 +From: Jonathan Dieter <jdieter@lesbg.com> +Date: Mon, 12 Jan 2015 13:47:51 +0200 +Subject: [PATCH 4/4] Return error rather than crashing if we can't allocate + memory + +Signed-off-by: Jonathan Dieter <jdieter@lesbg.com> +--- + deltarpmmodule.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/deltarpmmodule.c b/deltarpmmodule.c +index cf333b6..40ea60f 100644 +--- a/deltarpmmodule.c ++++ b/deltarpmmodule.c +@@ -46,6 +46,11 @@ PyObject *createDict(struct deltarpm d) + if (d.seq) { + char *tmp = calloc(d.seql * 2 + 1, sizeof(char)); + int i; ++ ++ if(tmp == NULL) { ++ PyErr_SetFromErrno(PyExc_SystemError); ++ return NULL; ++ } + for (i = 0; i < d.seql; i++) { + char buf[3]; + +@@ -54,6 +59,10 @@ PyObject *createDict(struct deltarpm d) + } + o = PyString_FromString(tmp); + free(tmp); ++ if(o == NULL) { ++ PyErr_SetFromErrno(PyExc_SystemError); ++ return NULL; ++ } + PyDict_SetItemString(dict, "seq", o); + Py_DECREF(o); + } else { +-- +2.1.0 + Index: SOURCES/0005-fix-off-by-one-error-in-delta-generation-code.patch =================================================================== --- SOURCES/0005-fix-off-by-one-error-in-delta-generation-code.patch (revision 0) +++ SOURCES/0005-fix-off-by-one-error-in-delta-generation-code.patch (working copy) @@ -0,0 +1,26 @@ +From 619eaf318b3420056c14933bd513201bfb8af494 Mon Sep 17 00:00:00 2001 +From: Michael Schroeder <mls@suse.de> +Date: Mon, 12 Jan 2015 14:38:50 +0100 +Subject: [PATCH 5/6] fix off-by-one error in delta generation code + +This could lead to a segfault in rare circumstances. +--- + delta.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/delta.c b/delta.c +index 3569351..caafa62 100644 +--- a/delta.c ++++ b/delta.c +@@ -366,7 +366,7 @@ scannext: + { + if (memcmp(new + scan + HSIZE *3, old + pos2 - 1, HSIZE)) + { +- ssx2 = (ssx2 == prime) ? 0 : ssx2 + 1; ++ ssx2 = (ssx2 == prime - 1) ? 0 : ssx2 + 1; + pos2 = hash[ssx2]; + } + } +-- +2.1.0 + Index: SOURCES/0006-Add-fflush-s-so-output-can-be-watched-using-tail-f.patch =================================================================== --- SOURCES/0006-Add-fflush-s-so-output-can-be-watched-using-tail-f.patch (revision 0) +++ SOURCES/0006-Add-fflush-s-so-output-can-be-watched-using-tail-f.patch (working copy) @@ -0,0 +1,43 @@ +From 19b7ad9efae520997da8b4b58a5ae0208185952c Mon Sep 17 00:00:00 2001 +From: Jonathan Dieter <jdieter@lesbg.com> +Date: Wed, 14 Jan 2015 08:16:55 +0200 +Subject: [PATCH 6/6] Add fflush's so output can be watched using tail -f + +Signed-off-by: Jonathan Dieter <jdieter@lesbg.com> +--- + applydeltaiso.c | 11 +++++++++-- + 1 file changed, 9 insertions(+), 2 deletions(-) + +diff --git a/applydeltaiso.c b/applydeltaiso.c +index 67f8e39..e482694 100644 +--- a/applydeltaiso.c ++++ b/applydeltaiso.c +@@ -122,6 +122,7 @@ processrpm(FILE *fpold, struct cfile *ocf, struct cfile *cf, unsigned int *nmp, + unsigned char buf[8192]; + + printf("%s: verbatim copy\n", namebuf); ++ fflush(stdout); + len = cget4(cf); + while (len) + { +@@ -141,9 +142,15 @@ processrpm(FILE *fpold, struct cfile *ocf, struct cfile *cf, unsigned int *nmp, + return; + } + if (ctype == 254) +- printf("%s: copying unchanged payload\n", namebuf); ++ { ++ printf("%s: copying unchanged payload\n", namebuf); ++ fflush(stdout); ++ } + else +- printf("%s (%s): applying delta\n", namebuf, cfile_comp2str(ctype)); ++ { ++ printf("%s (%s): applying delta\n", namebuf, cfile_comp2str(ctype)); ++ fflush(stdout); ++ } + rpmn = cget4(cf); + if (rpmn < 0 || rpmn >= nmpn) + { +-- +2.1.0 + Index: SPECS/deltarpm.spec =================================================================== --- SPECS/deltarpm.spec (revision 889844) +++ SPECS/deltarpm.spec (working copy) @@ -21,7 +21,7 @@ Name: deltarpm Version: 3.6 -Release: %mkrel 16 +Release: %mkrel 17 Summary: Tools to Create and Apply deltarpms License: BSD-3-Clause Group: System/Packaging @@ -28,15 +28,22 @@ Url: ftp://ftp.suse.com/pub/projects/deltarpm %if 0%{?snap} # Generate source by doing: -# git clone git://gitorious.org/deltarpm/deltarpm +# git clone https://github.com/rpm-software-management/deltarpm.git # cd deltarpm # git archive --format=tar --prefix="deltarpm-git-20120324/" 7ed5208 | \ # bzip2 > deltarpm-git-20120324.tar.bz2 -Source: %{name}-%{version}-20120324.tar.bz2 +Source: %{name}-%{version}-20120324.tar.bz2 %else Source: ftp://ftp.suse.com/pub/projects/deltarpm/%{name}-%{version}.tar.bz2 %endif -Patch1: 0003-initial-perl-binding.patch +# Patches from Fedora +Patch1: 0002-do-not-finish-applydeltarpm-jobs-when-in-the-middle-.patch +Patch2: 0003-add-newline-in-missing-prelink-error.patch +Patch3: 0004-Return-error-rather-than-crashing-if-we-can-t-alloca.patch +Patch4: 0005-fix-off-by-one-error-in-delta-generation-code.patch +Patch5: 0006-Add-fflush-s-so-output-can-be-watched-using-tail-f.patch +# Mageia patches +Patch6: 0003-initial-perl-binding.patch BuildRequires: libbzip2-devel BuildRequires: python-devel BuildRequires: python3-devel
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 16945
: 7117