cherry-pick archivesize fix from upstream
OBS-URL: https://build.opensuse.org/package/show/Base:System/rpm?expand=0&rev=342
This commit is contained in:
parent
0e96c3e5b8
commit
1468c16952
50
archivesize.diff
Normal file
50
archivesize.diff
Normal file
@ -0,0 +1,50 @@
|
||||
Fix archive size tag missing cpio trailer size (RhBug:1142949)
|
||||
|
||||
- Fixes regression from commit 7f84a126ab43f2d0163911100b4432364d0952a6
|
||||
which causes archive size to be determined before closing the archive
|
||||
when closing actually writes the cpio trailer into the archive. Thus
|
||||
RPMTAG_ARCHIVESIZE (and RPMTAG_LONGARCHIVESIZE) are off by the
|
||||
cpio trailer size in all packages built with rpm 4.12.0 and
|
||||
pre-releases :(
|
||||
- Move rpmcpioFree() to rpmfiFree() to allow Tell() on the archive
|
||||
after closing it, swap to original order of things on build-side.
|
||||
|
||||
index cfb24ef..28834dc 100644
|
||||
--- build/pack.c
|
||||
+++ build/pack.c
|
||||
@@ -55,13 +55,13 @@ static int rpmPackageFilesArchive(rpmfiles fi, int isSrc,
|
||||
if (rc == RPMERR_ITER_END)
|
||||
rc = 0;
|
||||
|
||||
- if (archiveSize)
|
||||
- *archiveSize = (rc == 0) ? rpmfiArchiveTell(archive) : 0;
|
||||
-
|
||||
/* Finish the payload stream */
|
||||
if (!rc)
|
||||
rc = rpmfiArchiveClose(archive);
|
||||
|
||||
+ if (archiveSize)
|
||||
+ *archiveSize = (rc == 0) ? rpmfiArchiveTell(archive) : 0;
|
||||
+
|
||||
rpmfiFree(archive);
|
||||
|
||||
return rc;
|
||||
index 49fc2c4..384a6c9 100644
|
||||
--- lib/rpmfi.c
|
||||
+++ lib/rpmfi.c
|
||||
@@ -1199,6 +1199,7 @@ rpmfi rpmfiFree(rpmfi fi)
|
||||
fi->fn = _free(fi->fn);
|
||||
fi->ofn = _free(fi->ofn);
|
||||
fi->found = _free(fi->found);
|
||||
+ fi->archive = rpmcpioFree(fi->archive);
|
||||
|
||||
free(fi);
|
||||
return NULL;
|
||||
@@ -1734,7 +1735,6 @@ int rpmfiArchiveClose(rpmfi fi)
|
||||
if (fi == NULL)
|
||||
return -1;
|
||||
int rc = rpmcpioClose(fi->archive);
|
||||
- fi->archive = rpmcpioFree(fi->archive);
|
||||
return rc;
|
||||
}
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 18 13:40:43 CEST 2014 - mls@suse.de
|
||||
|
||||
- cherry-pick archivesize fix from upstream
|
||||
new patch: archivesize.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 16 13:55:09 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: archivesize.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