- fix size and payloadsize generation for big endian platforms
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=345
This commit is contained in:
parent
df9abe086b
commit
48ff97361e
28
fixsizeforbigendian.diff
Normal file
28
fixsizeforbigendian.diff
Normal file
@ -0,0 +1,28 @@
|
||||
--- ./build/pack.c.orig 2014-10-06 13:05:52.801204141 +0000
|
||||
+++ ./build/pack.c 2014-10-06 13:06:19.815077722 +0000
|
||||
@@ -290,6 +290,8 @@ static rpmRC generateSignature(char *SHA
|
||||
rpmRC rc = RPMRC_OK;
|
||||
char *reservedSpace;
|
||||
int spaceSize = 0;
|
||||
+ uint32_t size32 = (uint32_t)size;
|
||||
+ uint32_t payloadSize32 = (uint32_t)payloadSize;
|
||||
|
||||
/* Prepare signature */
|
||||
sig = rpmNewSignature();
|
||||
@@ -322,14 +324,14 @@ static rpmRC generateSignature(char *SHA
|
||||
td.tag = payloadtag;
|
||||
td.count = 1;
|
||||
td.type = typetag;
|
||||
- td.data = &payloadSize;
|
||||
+ td.data = typetag == RPM_INT32_TYPE ? &payloadSize32 : &payloadSize;
|
||||
headerPut(sig, &td, HEADERPUT_DEFAULT);
|
||||
|
||||
rpmtdReset(&td);
|
||||
td.tag = sizetag;
|
||||
td.count = 1;
|
||||
td.type = typetag;
|
||||
- td.data = &size;
|
||||
+ td.data = typetag == RPM_INT32_TYPE ? &size32 : &size;
|
||||
headerPut(sig, &td, HEADERPUT_DEFAULT);
|
||||
|
||||
spaceSize = rpmExpandNumeric("%{__gpg_reserved_space}");
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 6 15:08:17 CEST 2014 - mls@suse.de
|
||||
|
||||
- fix size and payloadsize generation for big endian platforms
|
||||
new patch: fixsizeforbigendian.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 18 13:40:43 CEST 2014 - mls@suse.de
|
||||
|
||||
|
3
rpm.spec
3
rpm.spec
@ -128,6 +128,7 @@ Patch85: brp-compress-no-img.patch
|
||||
Patch92: find-lang-python.patch
|
||||
Patch93: weakdepscompat.diff
|
||||
Patch94: checksepwarn.diff
|
||||
Patch95: fixsizeforbigendian.diff
|
||||
Patch6464: auto-config-update-aarch64-ppc64le.diff
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
#
|
||||
@ -215,7 +216,7 @@ rm -f rpmdb/db.h
|
||||
%patch -P 60 -P 61 -P 65 -P 66 -P 67 -P 68 -P 69
|
||||
%patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 76 -P 77 -P 78 -P 79
|
||||
%patch -P 85
|
||||
%patch -P 92 -P 93 -P 94
|
||||
%patch -P 92 -P 93 -P 94 -P 95
|
||||
|
||||
%ifarch aarch64 ppc64le
|
||||
%patch6464
|
||||
|
Loading…
Reference in New Issue
Block a user