- handle RSA V4 signatures (#436812)

- add alpha arch ISA-bits
- enable internal testsuite on build
- adjust sqlite backend comment - it works but nobody is missing it...
This commit is contained in:
Panu Matilainen 2009-03-12 06:27:20 +00:00
parent e15b00592e
commit 9ea2c1db54
3 changed files with 70 additions and 4 deletions

22
rpm-4.7.0-alpha-isa.patch Normal file
View File

@ -0,0 +1,22 @@
commit 48c70edaa1ed3bab085cebea5749c812cee3109a
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Tue Mar 3 08:48:12 2009 +0200
Add ISA bits for alpha (Oliver Falk)
(cherry picked from commit d39a6c7de51c0d01ce69ee1f464b94ca70309751)
diff --git a/installplatform b/installplatform
index fded6f6..96919b6 100755
--- a/installplatform
+++ b/installplatform
@@ -109,6 +109,10 @@ for SUBST in $SUBSTS ; do
ISANAME=`echo ${ARCH} | sed "s/^\([^-]*\)-.*/\1/"`
ISABITS=32
;;
+ alpha*)
+ ISANAME=alpha
+ ISABITS=64
+ ;;
esac
case $VENDOR in

34
rpm-4.7.0-rsa-v4.patch Normal file
View File

@ -0,0 +1,34 @@
commit 452f162ef51d4c6484e93c2b0bc5866c10c8b734
Author: Panu Matilainen <pmatilai@redhat.com>
Date: Wed Mar 4 13:08:30 2009 +0200
Handle V4 signature trailer for RSA too (ticket #34)
(cherry picked from commit d50db40ceed7083467f7b548da7b2fbe96aaec61)
diff --git a/lib/signature.c b/lib/signature.c
index feafc5e..9ca8da5 100644
--- a/lib/signature.c
+++ b/lib/signature.c
@@ -1194,17 +1194,16 @@ verifyRSASignature(rpmKeyring keyring, rpmtd sigtd, pgpDig dig, char ** msg,
if (sigp->hash != NULL)
xx = rpmDigestUpdate(ctx, sigp->hash, sigp->hashlen);
-#ifdef NOTYET /* XXX not for binary/text signatures as in packages. */
- if (!(sigp->sigtype == PGPSIGTYPE_BINARY || sigp->sigtype == PGP_SIGTYPE_TEXT)) {
- size_t nb = dig->nbytes + sigp->hashlen;
+ if (sigp->version == 4) {
+ /* V4 trailer is six octets long (rfc4880) */
uint8_t trailer[6];
+ uint32_t nb = sigp->hashlen;
nb = htonl(nb);
- trailer[0] = 0x4;
+ trailer[0] = sigp->version;
trailer[1] = 0xff;
- memcpy(trailer+2, &nb, sizeof(nb));
+ memcpy(trailer+2, &nb, 4);
xx = rpmDigestUpdate(ctx, trailer, sizeof(trailer));
}
-#endif
xx = rpmDigestFinal(ctx, (void **)&dig->md5, &dig->md5len, 0);

View File

@ -4,8 +4,8 @@
%bcond_with sqlite
# just for giggles, option to build with internal Berkeley DB
%bcond_with int_bdb
# not yet, a missing test-data file in beta1 tarball causes two tests to fail
%bcond_with check
# run internal testsuite?
%bcond_without check
# switch rpm itself back to md5 file digests until the dust settles a bit
%define _source_filedigest_algorithm 0
@ -25,7 +25,7 @@
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
Release: 0.%{snapver}.3%{?dist}
Release: 0.%{snapver}.4%{?dist}
Group: System Environment/Base
Url: http://www.rpm.org/
Source0: http://rpm.org/releases/testing/%{name}-%{srcver}.tar.bz2
@ -46,6 +46,8 @@ Patch3: rpm-4.6.0-fedora-specspo.patch
Patch200: rpm-4.7.0-beta1-srcrpm-macros.patch
Patch201: rpm-4.7.0-beta1-fstates.patch
Patch202: rpm-4.7.0-beta1-installangs.patch
Patch203: rpm-4.7.0-alpha-isa.patch
Patch204: rpm-4.7.0-rsa-v4.patch
# These are not yet upstream
Patch300: rpm-4.7.0-extra-provides.patch
@ -189,6 +191,8 @@ that will manipulate RPM packages and databases.
%patch200 -p1 -b .srcrpm-macros
%patch201 -p1 -b .fstates
%patch202 -p1 -b .installangs
%patch203 -p1 -b .alpha-isa
%patch204 -p1 -b .rsa-v4
%patch300 -p1 -b .extra-prov
@ -271,7 +275,8 @@ rm -rf $RPM_BUILD_ROOT
%if %{with check}
%check
make check
# missing file in beta1 tarball causes two failures, permit failure for now
make check ||:
%endif
%post libs -p /sbin/ldconfig
@ -395,6 +400,11 @@ exit 0
%doc doc/librpm/html/*
%changelog
* Thu Mar 12 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.0-0.beta1.4
- handle RSA V4 signatures (#436812)
- add alpha arch ISA-bits
- enable internal testsuite on build
* Mon Mar 09 2009 Panu Matilainen <pmatilai@redhat.com> - 4.7.0-0.beta1.3
- fix _install_langs behavior (#489235)
- fix recording of file states into rpmdb on install