Hello community, here is the log from the commit of package deltarpm for openSUSE:Factory checked in at 2015-12-01 09:16:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/deltarpm (Old) and /work/SRC/openSUSE:Factory/.deltarpm.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "deltarpm" Changes: -------- --- /work/SRC/openSUSE:Factory/deltarpm/deltarpm.changes 2013-06-13 16:24:52.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.deltarpm.new/deltarpm.changes 2015-12-01 09:16:57.000000000 +0100 @@ -1,0 +2,12 @@ +Tue Nov 24 15:44:56 CET 2015 - ro@suse.de + +- update to version 3.6.1 + - remove upstreamed patch deltarpm-zlibcppflags.diff + - fix off-by-one error in delta generation code (bnc#948504) + This could lead to a segfault in rare circumstances. + - Return error rather than crashing if we can't allocate memory + - add newline in missing prelink error + - do not finish applydeltarpm jobs when in the middle of a request + - fix zlibcppflags typo + +------------------------------------------------------------------- Old: ---- deltarpm-3.6.tar.bz2 deltarpm-zlibcppflags.diff New: ---- deltarpm-3.6.1.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ deltarpm.spec ++++++ --- /var/tmp/diff_new_pack.Hph6HA/_old 2015-12-01 09:16:58.000000000 +0100 +++ /var/tmp/diff_new_pack.Hph6HA/_new 2015-12-01 09:16:58.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package deltarpm # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,17 +17,15 @@ Name: deltarpm -Version: 3.6 +Version: 3.6.1 Release: 0 Summary: Tools to Create and Apply deltarpms License: BSD-3-Clause Group: System/Packages -Url: ftp://ftp.suse.com/pub/projects/deltarpm -Source: deltarpm-3.6.tar.bz2 +Url: https://github.com/rpm-software-management/deltarpm/ +Source: deltarpm-3.6.1.tar.bz2 # PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines Patch0: patch.sles8 -# PATCH-MISSING-TAG -- See http://wiki.opensuse.org/openSUSE:Packaging_Patches_guidelines -Patch1: deltarpm-zlibcppflags.diff BuildRequires: libbz2-devel BuildRequires: python-devel BuildRequires: rpm-devel @@ -59,7 +57,6 @@ %if 0%{?suse_version} < 900 %patch0 %endif -%patch1 %build make CC="gcc" CFLAGS="%{optflags}" rpmdumpheader="/usr/lib/rpm/rpmdumpheader" %{?_smp_mflags} ++++++ deltarpm-3.6.tar.bz2 -> deltarpm-3.6.1.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6/Makefile new/deltarpm-3.6.1/Makefile --- old/deltarpm-3.6/Makefile 2013-06-07 17:02:18.000000000 +0200 +++ new/deltarpm-3.6.1/Makefile 2015-01-12 14:39:47.000000000 +0100 @@ -40,7 +40,7 @@ PYCFLAGS=`$$PY-config --cflags`; \ if [ ! -f "python$$PYVER/$@" ]; then \ mkdir -p python$$PYVER ;\ - $(CC) $(CFLAGS) $$PYCFLAGS $(zlibcppflag) -fPIC -c -o python$$PYVER/deltarpmmodule.o deltarpmmodule.c ;\ + $(CC) $(CFLAGS) $$PYCFLAGS $(zlibcppflags) -fPIC -c -o python$$PYVER/deltarpmmodule.o deltarpmmodule.c ;\ $(CC) $(LDFLAGS) -o python$$PYVER/$@ python$$PYVER/deltarpmmodule.o $^ -shared -Wl,-soname,_deltarpmmodule.so $(LDLIBS); \ fi; \ fi; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6/delta.c new/deltarpm-3.6.1/delta.c --- old/deltarpm-3.6/delta.c 2013-06-07 17:02:18.000000000 +0200 +++ new/deltarpm-3.6.1/delta.c 2015-01-12 14:39:47.000000000 +0100 @@ -366,7 +366,7 @@ { 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]; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6/deltarpmmodule.c new/deltarpm-3.6.1/deltarpmmodule.c --- old/deltarpm-3.6/deltarpmmodule.c 2013-06-07 17:02:18.000000000 +0200 +++ new/deltarpm-3.6.1/deltarpmmodule.c 2015-01-12 14:39:47.000000000 +0100 @@ -46,6 +46,11 @@ 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 @@ } o = PyString_FromString(tmp); free(tmp); + if(o == NULL) { + PyErr_SetFromErrno(PyExc_SystemError); + return NULL; + } PyDict_SetItemString(dict, "seq", o); Py_DECREF(o); } else { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6/drpmsync new/deltarpm-3.6.1/drpmsync --- old/deltarpm-3.6/drpmsync 2013-06-07 17:02:18.000000000 +0200 +++ new/deltarpm-3.6.1/drpmsync 2015-01-12 14:39:47.000000000 +0100 @@ -2686,6 +2686,7 @@ 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 @@ } 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 @@ 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"); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/deltarpm-3.6/prelink.c new/deltarpm-3.6.1/prelink.c --- old/deltarpm-3.6/prelink.c 2013-06-07 17:02:18.000000000 +0200 +++ new/deltarpm-3.6.1/prelink.c 2015-01-12 14:39:47.000000000 +0100 @@ -130,7 +130,7 @@ 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");