- do not load keyring if signature checking is disabled [bnc#554552]
- fix nosource/nopatch srpm tag generation OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=49
This commit is contained in:
parent
cc9e81ae5c
commit
a907fe4ae3
23
nosignature.diff
Normal file
23
nosignature.diff
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
Do not load keyring if signature checking is disabled.
|
||||||
|
|
||||||
|
--- ./lib/package.c.orig 2010-04-09 09:56:42.000000000 +0000
|
||||||
|
+++ ./lib/package.c 2010-04-09 09:57:50.000000000 +0000
|
||||||
|
@@ -760,12 +760,16 @@ exit:
|
||||||
|
rpmRC rpmReadPackageFile(rpmts ts, FD_t fd, const char * fn, Header * hdrp)
|
||||||
|
{
|
||||||
|
rpmRC rc;
|
||||||
|
- rpmKeyring keyring = rpmtsGetKeyring(ts, 1);
|
||||||
|
rpmVSFlags vsflags = rpmtsVSFlags(ts);
|
||||||
|
+ rpmKeyring keyring = 0;
|
||||||
|
+
|
||||||
|
+ if ((vsflags & _RPMVSF_NOSIGNATURES) != _RPMVSF_NOSIGNATURES)
|
||||||
|
+ keyring = rpmtsGetKeyring(ts, 1);
|
||||||
|
|
||||||
|
rc = rpmpkgRead(keyring, vsflags, fd, fn, hdrp);
|
||||||
|
|
||||||
|
- rpmKeyringFree(keyring);
|
||||||
|
+ if (keyring)
|
||||||
|
+ rpmKeyringFree(keyring);
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
36
nosource.diff
Normal file
36
nosource.diff
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
rpm does not allow headerPutUint32 on internal tags, so use
|
||||||
|
headerPut instead. (Maybe NOSOURCE/NOPATCH should not be internal
|
||||||
|
at all, though.)
|
||||||
|
|
||||||
|
--- ./build/files.c.orig 2010-04-08 16:23:42.000000000 +0000
|
||||||
|
+++ ./build/files.c 2010-04-08 16:23:44.000000000 +0000
|
||||||
|
@@ -2088,15 +2088,25 @@ int processSourceFiles(rpmSpec spec)
|
||||||
|
if (srcPtr->flags & RPMBUILD_ISSOURCE) {
|
||||||
|
headerPutString(spec->sourceHeader, RPMTAG_SOURCE, srcPtr->source);
|
||||||
|
if (srcPtr->flags & RPMBUILD_ISNO) {
|
||||||
|
- headerPutUint32(spec->sourceHeader, RPMTAG_NOSOURCE,
|
||||||
|
- &srcPtr->num, 1);
|
||||||
|
+ struct rpmtd_s td;
|
||||||
|
+ rpmtdReset(&td);
|
||||||
|
+ td.tag = RPMTAG_NOSOURCE;
|
||||||
|
+ td.type = RPM_INT32_TYPE;
|
||||||
|
+ td.data = &srcPtr->num;
|
||||||
|
+ td.count = 1;
|
||||||
|
+ headerPut(spec->sourceHeader, &td, HEADERPUT_APPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (srcPtr->flags & RPMBUILD_ISPATCH) {
|
||||||
|
headerPutString(spec->sourceHeader, RPMTAG_PATCH, srcPtr->source);
|
||||||
|
if (srcPtr->flags & RPMBUILD_ISNO) {
|
||||||
|
- headerPutUint32(spec->sourceHeader, RPMTAG_NOSOURCE,
|
||||||
|
- &srcPtr->num, 1);
|
||||||
|
+ struct rpmtd_s td;
|
||||||
|
+ rpmtdReset(&td);
|
||||||
|
+ td.tag = RPMTAG_NOPATCH;
|
||||||
|
+ td.type = RPM_INT32_TYPE;
|
||||||
|
+ td.data = &srcPtr->num;
|
||||||
|
+ td.count = 1;
|
||||||
|
+ headerPut(spec->sourceHeader, &td, HEADERPUT_APPEND);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Apr 9 12:00:29 CEST 2010 - mls@suse.de
|
||||||
|
|
||||||
|
- do not load keyring if signature checking is disabled [bnc#554552]
|
||||||
|
- fix nosource/nopatch srpm tag generation
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 8 17:11:08 CEST 2010 - mls@suse.de
|
Thu Apr 8 17:11:08 CEST 2010 - mls@suse.de
|
||||||
|
|
||||||
|
4
rpm.spec
4
rpm.spec
@ -111,6 +111,8 @@ Patch74: tarrecordsize.diff
|
|||||||
Patch75: backport.diff
|
Patch75: backport.diff
|
||||||
Patch76: pythondeps.diff
|
Patch76: pythondeps.diff
|
||||||
Patch77: fontprovides.diff
|
Patch77: fontprovides.diff
|
||||||
|
Patch78: nosource.diff
|
||||||
|
Patch79: nosignature.diff
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
#
|
#
|
||||||
# avoid bootstrapping problem
|
# avoid bootstrapping problem
|
||||||
@ -171,7 +173,7 @@ rm -f rpmdb/db.h
|
|||||||
%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
|
%patch -P 40 -P 41 -P 42 -P 43 -P 44 -P 45 -P 46 -P 47 -P 48 -P 49
|
||||||
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
|
%patch -P 50 -P 51 -P 52 -P 53 -P 54 -P 55 -P 56 -P 57 -P 58 -P 59
|
||||||
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
|
%patch -P 60 -P 61 -P 62 -P 63 -P 64 -P 65 -P 66 -P 67 -P 68 -P 69
|
||||||
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77
|
%patch -P 70 -P 71 -P 72 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
|
||||||
#chmod 755 scripts/find-supplements{,.ksyms}
|
#chmod 755 scripts/find-supplements{,.ksyms}
|
||||||
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
|
#chmod 755 scripts/find-provides.ksyms scripts/find-requires.ksyms
|
||||||
#chmod 755 scripts/firmware.prov
|
#chmod 755 scripts/firmware.prov
|
||||||
|
Loading…
Reference in New Issue
Block a user