rpms/deltarpm/devel deltarpm-3.4-skipmd5.patch, NONE, 1.1 deltarpm.spec, 1.10, 1.11 deltarpm-3.4-no-skip-doc.patch, 1.1, NONE
Jonathan Dieter (jdieter)
fedora-extras-commits at redhat.com
Mon Jan 7 08:55:50 UTC 2008
Author: jdieter
Update of /cvs/extras/rpms/deltarpm/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv23818
Modified Files:
deltarpm.spec
Added Files:
deltarpm-3.4-skipmd5.patch
Removed Files:
deltarpm-3.4-no-skip-doc.patch
Log Message:
Add patch to deal with deltarpms signed after creation and remove patch that
isn't needed any more.
deltarpm-3.4-skipmd5.patch:
--- NEW FILE deltarpm-3.4-skipmd5.patch ---
diff -ur deltarpm-3.4/applydeltarpm.c deltarpm-3.4b/applydeltarpm.c
--- deltarpm-3.4/applydeltarpm.c 2007-12-17 17:48:18.000000000 +0200
+++ deltarpm-3.4b/applydeltarpm.c 2008-01-03 08:47:02.000000000 +0200
@@ -1104,6 +1104,7 @@
unsigned char buf[4096];
MD5_CTX wrmd5;
unsigned char wrmd5res[16];
+ int nofullmd5 = 0;
FILE *ofp;
int numblks;
int percent = 0;
@@ -1212,6 +1213,7 @@
if (verbose)
fprintf(vfp, "reading deltarpm\n");
readdeltarpm(deltarpm, &d, &bfp);
+ nofullmd5 = !memcmp("\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", d.targetmd5, 16);
#ifdef DELTARPM_64BIT
if (d.outlen >= 0xffffffffULL << BLKSHIFT)
{
@@ -1465,7 +1467,8 @@
fprintf(stderr, "write error\n");
exit(1);
}
- rpmMD5Update(&wrmd5, d.lead, d.leadl);
+ if (!nofullmd5)
+ rpmMD5Update(&wrmd5, d.lead, d.leadl);
if (!d.h)
fromrpm_raw = 1;
@@ -1494,7 +1497,24 @@
exit(1);
}
rpmMD5Final(wrmd5res, &wrmd5);
- if (memcmp(wrmd5res, d.targetmd5, 16) != 0)
+ if (nofullmd5)
+ {
+ struct rpmhead *dsigh = readhead_buf(d.lead + 96, d.leadl - 96, 0);
+ if (dsigh)
+ {
+ unsigned char *hmd5 = headbin(dsigh, SIGTAG_MD5, 16);
+ if (hmd5)
+ {
+ if (memcmp(wrmd5res, hmd5, 16) != 0)
+ {
+ fprintf(stderr, "%s: md5 mismatch of result\n", deltarpm);
+ exit(1);
+ }
+ }
+ xfree(dsigh);
+ }
+ }
+ else if (memcmp(wrmd5res, d.targetmd5, 16) != 0)
{
fprintf(stderr, "%s: md5 mismatch of result\n", deltarpm);
exit(1);
@@ -1753,7 +1773,24 @@
fprintf(vfp, "had to call prelink %d times\n", nprelink);
}
rpmMD5Final(wrmd5res, &wrmd5);
- if (memcmp(wrmd5res, d.targetmd5, 16) != 0)
+ if (nofullmd5)
+ {
+ struct rpmhead *dsigh = readhead_buf(d.lead + 96, d.leadl - 96, 0);
+ if (dsigh)
+ {
+ unsigned char *hmd5 = headbin(dsigh, SIGTAG_MD5, 16);
+ if (hmd5)
+ {
+ if (memcmp(wrmd5res, hmd5, 16) != 0)
+ {
+ fprintf(stderr, "%s: md5 mismatch of result\n", deltarpm);
+ exit(1);
+ }
+ }
+ xfree(dsigh);
+ }
+ }
+ else if (memcmp(wrmd5res, d.targetmd5, 16) != 0)
{
fprintf(stderr, "%s: md5 mismatch of result\n", deltarpm);
exit(1);
Index: deltarpm.spec
===================================================================
RCS file: /cvs/extras/rpms/deltarpm/devel/deltarpm.spec,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- deltarpm.spec 29 Aug 2007 07:33:22 -0000 1.10
+++ deltarpm.spec 7 Jan 2008 08:55:03 -0000 1.11
@@ -1,7 +1,7 @@
Summary: Create deltas between rpms
Name: deltarpm
Version: 3.4
-Release: 6%{?dist}
+Release: 9%{?dist}
License: BSD
Group: System Environment/Base
URL: http://www.novell.com/products/linuxpackages/professional/deltarpm.html
@@ -14,7 +14,7 @@
Patch0: deltarpm-3.4-multilib-workaround.patch
Patch1: deltarpm-3.4-multilib-include-colored.patch
Patch2: deltarpm-3.4-prelink-bugfix.patch
-Patch3: deltarpm-3.4-no-skip-doc.patch
+Patch3: deltarpm-3.4-skipmd5.patch
%description
A deltarpm contains the difference between an old
@@ -28,7 +28,7 @@
%patch0 -p0 -b .multilib
%patch1 -p1 -b .multicolor
%patch2 -p1 -b .prelink
-%patch3 -p1 -b .nodoc
+%patch3 -p1 -b .skipmd5
%build
%{__make} %{?_smp_mflags} CFLAGS="$RPM_OPT_FLAGS" \
@@ -55,7 +55,14 @@
%{_bindir}/rpmdumpheader
%changelog
-* Wed Aug 29 2007 Jonathan Dieter <jdieter at gmail.com> - 3.4.6
+* Mon Jan 7 2008 Jonathan Dieter <jdieter at gmail.com> - 3.4-9
+- Add patch that allows deltarpm to rebuild rpms from deltarpms that have
+ had the rpm signature added after their creation. The code came from
+ upstream.
+- Drop nodoc patch added in 3.4-4 as most packages in repository have been
+ updated since April-May 2007 and this patch was supposed to be temporary.
+
+* Wed Aug 29 2007 Jonathan Dieter <jdieter at gmail.com> - 3.4-6
- Bring in popt-devel in BuildRequires to fix build in x86_64
* Wed Aug 29 2007 Fedora Release Engineering <rel-eng at fedoraproject dot org> - 3.4-5
--- deltarpm-3.4-no-skip-doc.patch DELETED ---
More information about the fedora-extras-commits
mailing list