Accepting request 643707 from Base:System

- update to rpm-4.14.2.1

OBS-URL: https://build.opensuse.org/request/show/643707
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=267
This commit is contained in:
Dominique Leuenberger 2018-10-29 13:13:42 +00:00 committed by Git OBS Bridge
commit faa6627883
16 changed files with 51 additions and 351 deletions

View File

@ -1,5 +1,5 @@
--- ./lib/rpmdb.c.orig 2017-10-05 10:05:27.459594162 +0000
+++ ./lib/rpmdb.c 2017-12-01 14:19:12.361872712 +0000
--- ./lib/rpmdb.c.orig 2018-08-08 13:40:18.153941351 +0000
+++ ./lib/rpmdb.c 2018-10-16 09:20:11.196708098 +0000
@@ -387,9 +387,11 @@ int rpmdbClose(rpmdb db)
{
rpmdb * prev, next;
@ -21,12 +21,12 @@
rpmsqActivate(0);
}
exit:
@@ -505,7 +507,7 @@ static int openDatabase(const char * pre
/* Try to ensure db home exists, error out if we can't even create */
@@ -509,7 +511,7 @@ static int openDatabase(const char * pre
rc = rpmioMkpath(rpmdbHome(db), 0755, getuid(), getgid());
if (rc == 0) {
- if (rpmdbRock == NULL) {
+ if (rpmdbRock == NULL && (db->db_mode & (O_RDWR|O_WRONLY)) != 0) {
/* Enable signal queue on the first db open */
- if (db->db_next == NULL) {
+ if (db->db_next == NULL && (db->db_mode & (O_RDWR|O_WRONLY)) != 0) {
rpmsqActivate(1);
}

View File

@ -1,15 +0,0 @@
--- tools/debugedit.c.orig 2018-01-22 12:09:07.477955907 +0100
+++ tools/debugedit.c 2018-01-22 12:09:22.210197759 +0100
@@ -2154,9 +2154,9 @@
/* Offset (pointing into the line program) moves
from old to new index including the header
size diff. */
- r_offset += ((dso->lines.table[lndx].new_idx
- - dso->lines.table[lndx].old_idx)
- + dso->lines.table[lndx].size_diff);
+ r_offset += (ssize_t)((dso->lines.table[lndx].new_idx
+ - dso->lines.table[lndx].old_idx)
+ + dso->lines.table[lndx].size_diff);
if (rtype == SHT_RELA)
{

View File

@ -1,27 +0,0 @@
From 86ec4c03de2b7cc6af6ba5b10dd686002e0b588c Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Mon, 26 Feb 2018 10:34:26 +0100
Subject: [PATCH] debugedit: handle RISC-V relocation
Resolves #407
---
tools/debugedit.c | 6 ++++++
1 file changed, 6 insertions(+)
Index: tools/debugedit.c
===================================================================
--- tools/debugedit.c.orig
+++ tools/debugedit.c
@@ -1985,6 +1985,12 @@ edit_dwarf2 (DSO *dso)
if (rtype != R_68K_32)
goto fail;
break;
+#if defined(EM_RISCV) && defined(R_RISCV_32)
+ case EM_RISCV:
+ if (rtype != R_RISCV_32)
+ goto fail;
+ break;
+#endif
default:
fail:
error (1, 0, "%s: Unhandled relocation %d in .debug_info section",

View File

@ -1,31 +0,0 @@
Hmm, SUSE doesn't use it, so what's the purpose of this patch?
--- ./build/parsePreamble.c.orig 2011-05-11 14:27:32.000000000 +0000
+++ ./build/parsePreamble.c 2011-05-11 15:59:08.000000000 +0000
@@ -485,6 +485,7 @@ static struct optionalTag {
{ RPMTAG_PACKAGER, "%{packager}" },
{ RPMTAG_DISTRIBUTION, "%{distribution}" },
{ RPMTAG_DISTURL, "%{disturl}" },
+ { RPMTAG_DISTTAG, "%{disttag}" },
{ RPMTAG_BUGURL, "%{bugurl}" },
{ -1, NULL }
};
--- ./macros.in.orig 2011-05-11 15:38:44.000000000 +0000
+++ ./macros.in 2011-05-11 15:59:08.000000000 +0000
@@ -279,6 +279,16 @@ package or when debugging this package.\
#
#%bugurl
+# Configurable distribution tag, same as Disttag: tag in a specfile.
+# The tag will be used to supply reliable information to tools like
+# rpmfind.
+#
+# Note: You should not configure with disturl (or build packages with
+# the Disttag: tag) unless you are willing to supply content in a
+# yet-to-be-determined format at the tag specified.
+#
+#%disttag
+
# Boolean (i.e. 1 == "yes", 0 == "no") that controls whether files
# marked as %doc should be installed.
#%_excludedocs

View File

@ -1,92 +0,0 @@
--- lib/rpmfiles.h.orig
+++ lib/rpmfiles.h
@@ -156,7 +156,7 @@ typedef rpmFlags rpmfiFlags;
#define RPMFI_FLAGS_ERASE \
(RPMFI_NOFILECLASS | RPMFI_NOFILELANGS | \
- RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | RPMFI_NOFILEINODES | \
+ RPMFI_NOFILEMTIMES | RPMFI_NOFILERDEVS | \
RPMFI_NOFILEVERIFYFLAGS)
#define RPMFI_FLAGS_INSTALL \
--- lib/transaction.c.orig
+++ lib/transaction.c
@@ -231,11 +231,11 @@ static void rpmtsUpdateDSI(const rpmts ts, dev_t dev, const char *dirName,
dsi->bneeded += bneeded;
dsi->ineeded++;
if (prevSize) {
- dsi->bdelta += BLOCK_ROUND(prevSize, dsi->bsize);
+ dsi->bdelta += BLOCK_ROUND(prevSize - 1, dsi->bsize);
dsi->idelta++;
}
if (fixupSize) {
- dsi->bdelta += BLOCK_ROUND(fixupSize, dsi->bsize);
+ dsi->bdelta += BLOCK_ROUND(fixupSize - 1, dsi->bsize);
dsi->idelta++;
}
@@ -412,6 +412,9 @@ static void handleInstInstalledFile(const rpmts ts, rpmte p, rpmfiles fi, int fx
{
rpmfs fs = rpmteGetFileStates(p);
int isCfgFile = ((rpmfilesFFlags(otherFi, ofx) | rpmfilesFFlags(fi, fx)) & RPMFILE_CONFIG);
+ rpm_loff_t otherFileSize;
+ int nlink;
+ const int *links;
if (XFA_SKIPPING(rpmfsGetAction(fs, fx)))
return;
@@ -481,7 +484,15 @@ static void handleInstInstalledFile(const rpmts ts, rpmte p, rpmfiles fi, int fx
}
}
- rpmfilesSetFReplacedSize(fi, fx, rpmfilesFSize(otherFi, ofx));
+ otherFileSize = rpmfilesFSize(otherFi, ofx);
+
+ /* Only account for the last file of a hardlink set */
+ nlink = rpmfilesFLinks(otherFi, ofx, &links);
+ if (nlink > 1 && links[nlink - 1] != ofx)
+ otherFileSize = 0;
+
+ /* Add one to make sure the size is not zero */
+ rpmfilesSetFReplacedSize(fi, fx, otherFileSize + 1);
}
/**
@@ -506,6 +517,9 @@ static void handleOverlappedFiles(rpmts ts, fingerPrintCache fpc, rpmte p, rpmfi
rpmfileAttrs FFlags;
struct rpmffi_s * recs;
int numRecs;
+ rpm_loff_t fileSize;
+ int nlink;
+ const int *links;
if (XFA_SKIPPING(rpmfsGetAction(fs, i)))
continue;
@@ -628,7 +642,8 @@ assert(otherFi != NULL);
break;
/* Try to get the disk accounting correct even if a conflict. */
- fixupSize = rpmfilesFSize(otherFi, otherFileNum);
+ /* Add one to make sure the size is not zero */
+ fixupSize = rpmfilesFSize(otherFi, otherFileNum) + 1;
if (rpmfilesConfigConflict(fi, i)) {
/* Here is an overlapped pre-existing config file. */
@@ -675,9 +690,16 @@ assert(otherFi != NULL);
}
rpmfilesFree(otherFi);
+ fileSize = rpmfilesFSize(fi, i);
+ nlink = rpmfilesFLinks(fi, i, &links);
+ if (nlink > 1 && links[nlink - 1] != i) {
+ /* Only account for the last file of a hardlink set */
+ fileSize = 0;
+ fixupSize = fixupSize ? 1 : 0;
+ }
/* Update disk space info for a file. */
rpmtsUpdateDSI(ts, fpEntryDev(fpc, fiFps), fpEntryDir(fpc, fiFps),
- rpmfilesFSize(fi, i), rpmfilesFReplacedSize(fi, i),
+ fileSize, rpmfilesFReplacedSize(fi, i),
fixupSize, rpmfsGetAction(fs, i));
}

View File

@ -20,7 +20,7 @@
# Enable Python build sourced from rpm spec
%global with_python 1
Name: python-rpm
Version: 4.14.1
Version: 4.14.2.1
Release: 0
Summary: Python Bindings for Manipulating RPM Packages
License: GPL-2.0-or-later

View File

@ -1,12 +1,5 @@
--- ./scripts/python-macro-helper.orig 2018-02-05 10:06:51.837690381 +0000
+++ ./scripts/python-macro-helper 2018-02-05 10:07:22.500594058 +0000
@@ -1,4 +1,3 @@
-#!/usr/bin/python -Es
from distutils.sysconfig import get_python_lib
from platform import python_version_tuple
--- ./scripts/pythondistdeps.py.orig 2017-10-05 10:04:57.587602034 +0000
+++ ./scripts/pythondistdeps.py 2018-02-05 10:06:37.013736947 +0000
--- ./scripts/pythondistdeps.py.orig 2018-08-08 13:40:18.173941320 +0000
+++ ./scripts/pythondistdeps.py 2018-10-16 09:30:49.271004917 +0000
@@ -1,4 +1,3 @@
-#!/usr/bin/python
# -*- coding: utf-8 -*-

View File

@ -3,14 +3,14 @@ Subject: remove references to removed brp scripts
Some brp-scripts are not used in openSUSE, remove references
to it
--- ./platform.in.orig 2011-05-11 15:02:03.000000000 +0000
+++ ./platform.in 2011-05-11 15:38:05.000000000 +0000
@@ -55,8 +55,6 @@
--- ./platform.in.orig 2018-10-16 09:22:16.004374524 +0000
+++ ./platform.in 2018-10-16 09:24:58.891939175 +0000
@@ -80,8 +80,6 @@
%__os_install_post \
%{_rpmconfigdir}/brp-compress \
%{_rpmconfigdir}/brp-strip %{__strip} \
- %{_rpmconfigdir}/brp-strip-static-archive %{__strip} \
- %{_rpmconfigdir}/brp-strip-comment-note %{__strip} %{__objdump} \
%{?__brp_compress} \
%{?__brp_strip} \
- %{?__brp_strip_static_archive} \
- %{?__brp_strip_comment_note} \
%{nil}
%__spec_install_post\

View File

@ -1,27 +0,0 @@
commit 5b29a1d4b1d25a16c24c2365980ac5fd847e1aa6
Author: Bernhard M. Wiedemann <bwiedemann@suse.de>
Date: Mon Jul 30 19:02:46 2018 +0200
find-debuginfo.sh: sort output of find
to make build results more reproducible
in spite of indeterministic filesystem readdir order.
For openSUSE, this helped to make squid, openssh, postfix and shadow
packages build reproducibly.
See https://reproducible-builds.org/ for why this is good.
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 44d164299..11397b7e8 100755
--- scripts/find-debuginfo.sh
+++ scripts/find-debuginfo.sh
@@ -487,7 +487,7 @@ fi
# Invoke the DWARF Compressor utility.
if $run_dwz \
&& [ -d "${RPM_BUILD_ROOT}/usr/lib/debug" ]; then
- readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug)
+ readarray dwz_files < <(cd "${RPM_BUILD_ROOT}/usr/lib/debug"; find -type f -name \*.debug | LC_ALL=C sort)
if [ ${#dwz_files[@]} -gt 0 ]; then
dwz_multifile_name="${RPM_PACKAGE_NAME}-${RPM_PACKAGE_VERSION}-${RPM_PACKAGE_RELEASE}.${RPM_ARCH}"
dwz_multifile_suffix=

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:43f40e2ccc3ca65bd3238f8c9f8399d4957be0878c2e83cba2746d2d0d96793b
size 4103880

3
rpm-4.14.2.1.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1139c24b7372f89c0a697096bf9809be70ba55e006c23ff47305c1849d98acda
size 4156574

View File

@ -1,3 +1,26 @@
-------------------------------------------------------------------
Mon Oct 22 13:26:55 CEST 2018 - mls@suse.de
- update to rpm-4.14.2.1
* fix regression in --setperms and --setugids
-------------------------------------------------------------------
Tue Oct 16 11:27:36 CEST 2018 - mls@suse.de
- update to rpm-4.14.2
* new configurable, mandatory package verification level
* new package verification phase in rpmtsRun()
* new --setcaps and --restore options
* new --whatobsoletes and --whatconflicts query options
- dropped patches:
* disttag-macro.diff
* reproducible-debuginfo.patch
* debugedit-bnc1076819.diff
* hardlinks.diff
* debugedit-riscv.patch
* safesymlinks.diff
* verifynodup.diff
-------------------------------------------------------------------
Mon Oct 1 12:08:32 UTC 2018 - Martin Liška <mliska@suse.cz>

View File

@ -54,7 +54,7 @@ Requires: /usr/bin/awk
Summary: The RPM Package Manager
License: GPL-2.0-or-later
Group: System/Packages
Version: 4.14.1
Version: 4.14.2.1
Release: 0
Source: http://ftp.rpm.org/releases/rpm-4.14.x/rpm-%{version}.tar.bz2
Source1: RPM-HOWTO.tar.bz2
@ -98,7 +98,6 @@ Patch46: remove-brp-strips.diff
Patch47: requires-ge-macro.diff
Patch49: finddebuginfo-absolute-links.diff
Patch51: specfilemacro.diff
Patch53: disttag-macro.diff
Patch55: debugsubpkg.diff
Patch56: debuglink.diff
Patch57: debuginfo-mono.patch
@ -121,18 +120,11 @@ Patch93: weakdepscompat.diff
Patch94: checksepwarn.diff
Patch99: enable-postin-scripts-error.diff
Patch100: rpm-findlang-inject-metainfo.patch
# https://github.com/rpm-software-management/rpm/pull/485
Patch101: reproducible-debuginfo.patch
Patch102: emptymanifest.diff
Patch103: find-lang-qt-qm.patch
Patch108: debugedit-macro.diff
Patch109: pythondistdeps.diff
Patch111: debugedit-bnc1076819.diff
Patch112: hardlinks.diff
Patch113: debugedit-riscv.patch
Patch114: source_date_epoch_buildtime.diff
Patch115: safesymlinks.diff
Patch116: verifynodup.diff
Patch117: findsupplements.diff
Patch118: dwz-compression.patch
Patch6464: auto-config-update-aarch64-ppc64le.diff
@ -226,13 +218,13 @@ rm -f rpmdb/db.h
%patch -P 20 -P 21 -P 24 -P 25 -P 26 -P 27 -P 29
%patch -P 30 -P 32 -P 33 -P 34 -P 35 -P 36 -P 38
%patch -P 43 -P 45 -P 46 -P 47 -P 49
%patch -P 51 -P 53 -P 55 -P 56 -P 57 -P 58
%patch -P 51 -P 55 -P 56 -P 57 -P 58
%patch -P 60 -P 61 -P 66 -P 67 -P 68 -P 69
%patch -P 70 -P 71 -P 73 -P 74 -P 75 -P 77 -P 78
%patch -P 85
%patch -P 93 -P 94 -P 99
%patch -P 100 -P 101 -P 102 -P 103 -P 108
%patch -P 109 -P 111 -P 112 -P 113 -P 114 -P 115 -P 116 -P 117 -P 118
%patch -P 100 -P 102 -P 103 -P 108
%patch -P 109 -P 114 -P 117 -P 118
%ifarch aarch64 ppc64le riscv64
%patch6464

View File

@ -1,44 +0,0 @@
--- ./lib/fsm.c.orig 2018-06-15 11:15:50.320133057 +0000
+++ ./lib/fsm.c 2018-06-15 11:15:56.240118124 +0000
@@ -653,7 +653,7 @@ static int fsmUtime(const char *path, mo
return rc;
}
-static int fsmVerify(const char *path, rpmfi fi, const struct stat *fsb)
+static int fsmVerify(const char *path, rpmfi fi)
{
int rc;
int saveerrno = errno;
@@ -684,7 +684,7 @@ static int fsmVerify(const char *path, r
if (rc) return rc;
errno = saveerrno;
/* Only permit directory symlinks by target owner and root */
- if (S_ISDIR(dsb.st_mode) && (luid == 0 || luid == fsb->st_uid))
+ if (S_ISDIR(dsb.st_mode) && (luid == 0 || luid == dsb.st_uid))
return 0;
}
} else if (S_ISLNK(mode)) {
@@ -928,7 +928,7 @@ int rpmPackageFilesInstall(rpmts ts, rpm
}
/* Assume file does't exist when tmp suffix is in use */
if (!suffix) {
- rc = fsmVerify(fpath, fi, &sb);
+ rc = fsmVerify(fpath, fi);
} else {
rc = (action == FA_TOUCH) ? 0 : RPMERR_ENOENT;
}
--- ./lib/verify.c.orig 2018-06-15 11:16:03.904098773 +0000
+++ ./lib/verify.c 2018-06-15 11:23:42.842941766 +0000
@@ -98,11 +98,8 @@ rpmVerifyAttrs rpmfilesVerify(rpmfiles f
struct stat dsb;
/* ...if it actually points to a directory */
if (stat(fn, &dsb) == 0 && S_ISDIR(dsb.st_mode)) {
- uid_t fuid;
/* ...and is by a legit user, to match fsmVerify() behavior */
- if (sb.st_uid == 0 ||
- (rpmugUid(rpmfilesFUser(fi, ix), &fuid) == 0 &&
- sb.st_uid == fuid)) {
+ if (sb.st_uid == 0 || sb.st_uid == dsb.st_uid) {
sb = dsb; /* struct assignment */
}
}

View File

@ -1,72 +0,0 @@
--- ./lib/verify.c.orig 2018-06-15 11:25:09.142724319 +0000
+++ ./lib/verify.c 2018-06-15 11:27:32.246363744 +0000
@@ -59,7 +59,7 @@ rpmVerifyAttrs rpmfilesVerify(rpmfiles f
rpmfileAttrs fileAttrs = rpmfilesFFlags(fi, ix);
rpmVerifyAttrs flags = rpmfilesVFlags(fi, ix);
const char * fn = rpmfilesFN(fi, ix);
- struct stat sb;
+ struct stat sb, fsb;
rpmVerifyAttrs vfy = RPMVERIFY_NONE;
/*
@@ -88,7 +88,7 @@ rpmVerifyAttrs rpmfilesVerify(rpmfiles f
break;
}
- if (fn == NULL || lstat(fn, &sb) != 0) {
+ if (fn == NULL || lstat(fn, &sb) != 0 || rpmfilesStat(fi, ix, 0, &fsb)) {
vfy |= RPMVERIFY_LSTATFAIL;
goto exit;
}
@@ -243,47 +243,11 @@ rpmVerifyAttrs rpmfilesVerify(rpmfiles f
vfy |= RPMVERIFY_MTIME;
}
- if (flags & RPMVERIFY_USER) {
- const char * name = rpmugUname(sb.st_uid);
- const char * fuser = rpmfilesFUser(fi, ix);
- uid_t uid;
- int namematch = 0;
- int idmatch = 0;
-
- if (name && fuser)
- namematch = rstreq(name, fuser);
- if (fuser && rpmugUid(fuser, &uid) == 0)
- idmatch = (uid == sb.st_uid);
-
- if (namematch != idmatch) {
- rpmlog(RPMLOG_WARNING,
- _("Duplicate username or UID for user %s\n"), fuser);
- }
-
- if (!(namematch || idmatch))
- vfy |= RPMVERIFY_USER;
- }
-
- if (flags & RPMVERIFY_GROUP) {
- const char * name = rpmugGname(sb.st_gid);
- const char * fgroup = rpmfilesFGroup(fi, ix);
- gid_t gid;
- int namematch = 0;
- int idmatch = 0;
-
- if (name && fgroup)
- namematch = rstreq(name, fgroup);
- if (fgroup && rpmugGid(fgroup, &gid) == 0)
- idmatch = (gid == sb.st_gid);
-
- if (namematch != idmatch) {
- rpmlog(RPMLOG_WARNING,
- _("Duplicate groupname or GID for group %s\n"), fgroup);
- }
+ if ((flags & RPMVERIFY_USER) && (sb.st_uid != fsb.st_uid))
+ vfy |= RPMVERIFY_USER;
- if (!(namematch || idmatch))
- vfy |= RPMVERIFY_GROUP;
- }
+ if ((flags & RPMVERIFY_GROUP) && (sb.st_gid != fsb.st_gid))
+ vfy |= RPMVERIFY_GROUP;
exit:
return vfy;

View File

@ -1,6 +1,6 @@
--- ./doc/rpm.8.orig 2017-01-19 12:57:41.380527116 +0000
+++ ./doc/rpm.8 2017-01-19 12:58:12.693437688 +0000
@@ -592,6 +592,11 @@ Query all packages that provide the \fIC
--- ./doc/rpm.8.orig 2018-08-21 10:38:02.035078442 +0000
+++ ./doc/rpm.8 2018-10-16 09:21:26.948505637 +0000
@@ -632,6 +632,11 @@ Query all packages that provide the \fIC
.TP
\fB--whatrequires \fICAPABILITY\fB\fR
Query all packages that require \fICAPABILITY\fR for proper functioning.
@ -10,5 +10,5 @@
+other packages may depend. To see the complete dependencies
+for a package, use \fB-e --test \fIPACKAGE_NAME\fB\fR
.TP
\fB--whatrecommends \fICAPABILITY\fB\fR
Query all packages that recommend \fICAPABILITY\fR.
\fB--whatconflicts \fICAPABILITY\fB\fR
Query all packages that conflict with \fICAPABILITY\fR.