Accepting request 1251214 from Base:System

- update to rpm-4.20.1

OBS-URL: https://build.opensuse.org/request/show/1251214
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/rpm?expand=0&rev=320
This commit is contained in:
Ana Guerrero 2025-03-10 16:58:29 +00:00 committed by Git OBS Bridge
commit 1a83c7b5f3
12 changed files with 63 additions and 170 deletions

View File

@ -1,12 +0,0 @@
--- build/parseSpec.c.orig 2025-02-13 13:20:21.075462279 +0000
+++ build/parseSpec.c 2025-02-13 13:15:42.447942795 +0000
@@ -1429,7 +1429,8 @@ static rpmRC parseSpecParts(rpmSpec spec
/* rpmGlob returns files sorted */
if (rpmGlob(pattern, &argc, &argv) == 0) {
for (int i = 0; i < argc; i++) {
- rpmlog(RPMLOG_NOTICE, "Reading %s\n", argv[i]);
+ if (stage != PARSE_BUILDSYS)
+ rpmlog(RPMLOG_NOTICE, "Reading %s\n", argv[i]);
pushOFI(spec, argv[i]);
snprintf(spec->fileStack->readBuf, spec->fileStack->readBufLen,
"# Spec part read from %s\n\n", argv[i]);

View File

@ -1,17 +0,0 @@
--- macros.in.orig 2024-12-19 13:27:56.291657815 +0000
+++ macros.in 2024-12-19 13:29:00.335537654 +0000
@@ -199,11 +199,12 @@ package or when debugging this package.\
%{nil}
# The duplicate __debug_package definition is needed to ensure matching
-# state when %install is skipped due to short-circuit.
+# state when %install is skipped due to short-circuit, IFF buildsubdir
+# is defined (indicating use of automatic debuginfo generation)
%debug_package \
%ifnarch noarch\
%global __debug_package 1\
-%%global __debug_package 1\
+%{?buildsubdir:%%global __debug_package 1}\
%_debuginfo_template\
%{?_debugsource_packages:%_debugsource_template}\
%endif\

View File

@ -1,40 +0,0 @@
--- lib/rpmtriggers.c.orig 2024-12-19 14:05:56.403437646 +0000
+++ lib/rpmtriggers.c 2024-12-19 14:11:56.646774439 +0000
@@ -239,31 +239,33 @@ typedef struct matchFilesIter_s {
static rpmfiles rpmtsNextFiles(matchFilesIter mfi)
{
Header h;
- rpmte *te;
rpmfiles files = NULL;
+ const char *pkgname = NULL;
rpmstrPool pool = mfi->ts->members->pool;
int ix;
- unsigned int offset;
ix = rpmdbGetIteratorIndex(mfi->pi);
if (ix < rpmdbGetIteratorCount(mfi->pi)) {
- offset = rpmdbGetIteratorOffsetFor(mfi->pi, ix);
+ unsigned int offset = rpmdbGetIteratorOffsetFor(mfi->pi, ix);
+ rpmte *te;
if (packageHashGetEntry(mfi->ts->members->removedPackages, offset,
&te, NULL, NULL)) {
/* Files are available in memory */
files = rpmteFiles(te[0]);
+ pkgname = rpmteN(te[0]);
}
if (packageHashGetEntry(mfi->ts->members->installedPackages, offset,
&te, NULL, NULL)) {
/* Files are available in memory */
files = rpmteFiles(te[0]);
+ pkgname = rpmteN(te[0]);
}
}
if (files) {
rpmdbSetIteratorIndex(mfi->pi, ix + 1);
- mfi->pkgname = rpmteN(te[0]);
+ mfi->pkgname = pkgname;
} else {
/* Files are not available in memory. Read them from rpmdb */
h = rpmdbNextIterator(mfi->pi);

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Fri Mar 7 14:14:55 CET 2025 - mls@suse.de
- update to rpm-4.20.1
-------------------------------------------------------------------
Mon Dec 16 11:55:23 CET 2024 - mls@suse.de

View File

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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:56ff7638cff98b56d4a7503ff59bc79f281a6ddffcda0d238c082bedfb5fbe7b
size 5984513

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

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:52647e12638364533ab671cbc8e485c96f9f08889d93fe0ed104a6632661124f
size 4534720

View File

@ -1,3 +1,23 @@
-------------------------------------------------------------------
Fri Mar 7 14:14:55 CET 2025 - mls@suse.de
- update to rpm-4.20.1
* add support for fully locked user accounts in sysusers.d
* fix unmodified %config files being removed in case of an
unpack failure
* fix lua deprecation warnings being shown packages built with
old rpm versions
* ignore all files in macro directories that do not end with an
alphanumeric character
- refreshed patches:
* rpmqpack.diff
* unshare.diff
* rpm2archive.diff
- dropped patches:
* debugpackage.diff
* nextfiles.diff
* buildsys.diff
-------------------------------------------------------------------
Wed Feb 12 13:36:45 CET 2025 - mls@suse.de

View File

@ -58,11 +58,11 @@ Requires: rpm-config-SUSE
Summary: The RPM Package Manager
License: GPL-2.0-or-later
Group: System/Packages
Version: 4.20.0
Version: 4.20.1
Release: 0
URL: https://rpm.org/
#Git-Clone: https://github.com/rpm-software-management/rpm
Source: https://ftp.osuosl.org/pub/rpm/releases/rpm-4.19.x/rpm-%{version}.tar.bz2
Source: https://ftp.osuosl.org/pub/rpm/releases/rpm-4.20.x/rpm-%{version}.tar.bz2
#Git-Clone: https://github.com/rpm-software-management/rpmpgp_legacy
Source1: rpmpgp_legacy-1.1.tar.gz
Source5: rpmsort
@ -120,12 +120,9 @@ Patch141: 0002-log-build-time-if-it-is-set-from-SOURCE_DATE_EPOCH.patch
Patch142: 0003-Error-out-on-a-missing-changelog-date.patch
Patch150: unshare.diff
Patch151: buildroot-symlink.diff
Patch152: debugpackage.diff
Patch153: nextfiles.diff
Patch154: undefbuildroot.diff
Patch155: rpm2archive.diff
Patch156: mtime_policy_set.diff
Patch157: buildsys.diff
Patch6464: auto-config-update-aarch64-ppc64le.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#
@ -244,7 +241,7 @@ rm -rf sqlite
%patch -P 131 -P 133 -P 134 -P 135 -P 136 -P 138
%patch -P 139
%patch -P 141 -P 142
%patch -P 150 -P 151 -P 152 -P 153 -P 154 -P 155 -P 156 -P 157
%patch -P 150 -P 151 -P 154 -P 155 -P 156
%ifarch aarch64 ppc64le riscv64 loongarch64
%patch -P 6464

View File

@ -1,38 +1,15 @@
--- tools/CMakeLists.txt.orig 2025-02-13 09:56:00.257085875 +0000
+++ tools/CMakeLists.txt 2025-02-13 09:56:11.433064235 +0000
@@ -40,11 +40,8 @@ if (READLINE_FOUND)
target_link_libraries(rpmlua PRIVATE PkgConfig::READLINE)
--- tools/CMakeLists.txt.orig 2025-03-07 13:25:15.637092178 +0000
+++ tools/CMakeLists.txt 2025-03-07 13:26:53.764950409 +0000
@@ -41,7 +41,6 @@ if (READLINE_FOUND)
endif()
-if (WITH_ARCHIVE)
- add_executable(rpm2archive rpm2archive.c)
- target_link_libraries(rpm2archive PRIVATE PkgConfig::LIBARCHIVE)
- install(TARGETS rpm2archive)
-endif()
+add_executable(rpm2archive rpm2archive.c)
+install(TARGETS rpm2archive)
add_executable(rpm2archive rpm2archive.c)
-target_link_libraries(rpm2archive PRIVATE PkgConfig::LIBARCHIVE)
install(TARGETS rpm2archive)
# Everything links to these
get_property(executables DIRECTORY PROPERTY BUILDSYSTEM_TARGETS)
@@ -60,12 +57,10 @@ foreach(cmd rpmverify rpmquery)
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${cmd} TYPE BIN)
endforeach()
-if (WITH_ARCHIVE)
- add_custom_target(rpm2cpio ALL COMMAND
- ${CMAKE_COMMAND} -E create_symlink rpm2archive rpm2cpio
- )
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rpm2cpio TYPE BIN)
-endif()
+add_custom_target(rpm2cpio ALL COMMAND
+ ${CMAKE_COMMAND} -E create_symlink rpm2archive rpm2cpio
+ )
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/rpm2cpio TYPE BIN)
if (WITH_CXX)
set (cxx_sources
--- tools/rpm2archive.c.orig 2024-10-07 09:35:46.000000000 +0000
+++ tools/rpm2archive.c 2025-02-13 11:50:46.533098005 +0000
--- tools/rpm2archive.c.orig 2025-02-19 15:29:33.000000000 +0000
+++ tools/rpm2archive.c 2025-03-07 13:25:19.881086047 +0000
@@ -2,6 +2,14 @@
#include "system.h"

View File

@ -1,15 +1,15 @@
--- docs/man/CMakeLists.txt.orig 2024-10-07 09:35:46.000000000 +0000
+++ docs/man/CMakeLists.txt 2024-12-16 09:17:15.684229047 +0000
--- docs/man/CMakeLists.txt.orig 2025-02-19 15:29:33.000000000 +0000
+++ docs/man/CMakeLists.txt 2025-03-07 13:16:59.913873002 +0000
@@ -2,6 +2,7 @@ set(core
gendiff.1 rpm2cpio.8
gendiff.1 rpm2cpio.8 rpm2archive.8
rpm.8 rpmbuild.8 rpmdb.8 rpmkeys.8 rpmsign.8 rpmspec.8
rpmdeps.8 rpmgraph.8 rpmlua.8 rpm-misc.8 rpmsort.8
+ rpmqpack.8
)
set(extra
rpm2archive.8 rpm-plugins.8 rpm-plugin-prioreset.8 rpm-plugin-syslog.8
--- docs/man/rpmqpack.8.orig 2024-12-16 09:17:15.684229047 +0000
+++ docs/man/rpmqpack.8 2024-12-16 09:17:15.684229047 +0000
rpm-plugins.8 rpm-plugin-prioreset.8 rpm-plugin-syslog.8
--- docs/man/rpmqpack.8.orig 2025-03-07 13:16:59.913873002 +0000
+++ docs/man/rpmqpack.8 2025-03-07 13:16:59.913873002 +0000
@@ -0,0 +1,25 @@
+.TH RPMQPACK 8 "Mar 2002"
+.SH NAME
@ -36,8 +36,8 @@
+
+.SH AUTHOR
+Michael Schroeder <mls@suse.de>
--- tools/CMakeLists.txt.orig 2024-10-07 09:35:46.000000000 +0000
+++ tools/CMakeLists.txt 2024-12-16 09:18:57.764016162 +0000
--- tools/CMakeLists.txt.orig 2025-02-19 15:29:33.000000000 +0000
+++ tools/CMakeLists.txt 2025-03-07 13:16:59.913873002 +0000
@@ -6,6 +6,7 @@ add_executable(rpmkeys rpmkeys.c cliutil
add_executable(rpmsign rpmsign.c cliutils)
add_executable(rpmbuild rpmbuild.c cliutils)
@ -46,7 +46,7 @@
add_executable(rpmdeps rpmdeps.c)
add_executable(rpmgraph rpmgraph.c)
@@ -77,7 +78,7 @@ endif()
@@ -73,7 +74,7 @@ endif()
install(TARGETS
rpm rpmdb rpmkeys rpmsign rpmbuild rpmspec
@ -55,8 +55,8 @@
)
install(TARGETS rpmdeps rpmdump rpmuncompress DESTINATION ${RPM_CONFIGDIR})
--- tools/rpmqpack.c.orig 2024-12-16 09:17:15.688229038 +0000
+++ tools/rpmqpack.c 2024-12-16 09:17:15.688229038 +0000
--- tools/rpmqpack.c.orig 2025-03-07 13:16:59.913873002 +0000
+++ tools/rpmqpack.c 2025-03-07 13:16:59.913873002 +0000
@@ -0,0 +1,60 @@
+#include <sys/types.h>
+#include <limits.h>

View File

@ -1,20 +1,6 @@
--- docs/man/rpm-plugin-unshare.8.md.orig 2024-10-07 09:35:46.000000000 +0000
+++ docs/man/rpm-plugin-unshare.8.md 2024-12-16 13:28:44.597787315 +0000
@@ -27,6 +27,11 @@ This plugin implements the following con
execution. Typical examples would be `/tmp` to protect against
insecure temporary file usage inside scriptlets, and `/home` to
prevent scriptlets from accessing user home directories.
+ When path unsharing is enabled, any mounts made from scriptlets
+ are also private to the scriptlet (and vice versa, mount changes
+ on the host are not visible to the scriptlet).
+
+ Private mounts in chroot-operations is unimplemented.
`%__transaction_unshare_nonet`
--- plugins/unshare.c.orig 2024-10-07 09:35:46.000000000 +0000
+++ plugins/unshare.c 2024-12-16 13:52:31.530793880 +0000
@@ -15,12 +15,32 @@
--- plugins/unshare.c.orig 2025-02-19 15:29:33.000000000 +0000
+++ plugins/unshare.c 2025-03-07 13:21:21.145450130 +0000
@@ -15,6 +15,16 @@
static ARGV_t private_mounts = NULL;
static int unshare_flags = 0;
@ -24,42 +10,19 @@
+ if (stat("/", &sta))
+ return 0;
+ if (stat("/proc/1/root", &stb))
+ return 1; /* proc not mounted, assume chroot */
+ return 1; /* proc not mounted, assume chroot */
+ return sta.st_dev == stb.st_dev && sta.st_ino == stb.st_ino ? 0 : 1;
+}
+
static rpmRC unshare_init(rpmPlugin plugin, rpmts ts)
{
char *paths = rpmExpand("%{?__transaction_unshare_paths}", NULL);
private_mounts = argvSplitString(paths, ":", ARGV_SKIPEMPTY);
- if (private_mounts)
- unshare_flags |= CLONE_NEWNS;
+ if (private_mounts) {
+ /*
+ * Changing mount propagation from inside a chroot fails if the root
+ * is not also a mount point, disable for now.
+ */
@@ -24,7 +34,7 @@ static rpmRC unshare_init(rpmPlugin plug
* Changing mount propagation from inside a chroot fails if the root
* is not also a mount point, disable for now.
*/
- if (strcmp(rpmtsRootDir(ts), "/")) {
+ if (strcmp(rpmtsRootDir(ts), "/") || in_chroot()) {
+ rpmlog(RPMLOG_WARNING,
+ "private mounts in chroot not implemented\n");
+ } else {
+ unshare_flags |= CLONE_NEWNS;
+ }
+ }
free(paths);
if (rpmExpandNumeric("%{?__transaction_unshare_nonet}"))
@@ -47,9 +67,10 @@ static rpmRC unshare_scriptlet_fork_post
goto exit;
}
- if (private_mounts) {
- if (mount("/", "/", NULL, MS_REC | MS_PRIVATE, NULL) == -1) {
- rpmlog(RPMLOG_ERR, _("failed to mount private %s: %s\n"),
+ if (unshare_flags & CLONE_NEWNS) {
+ if (mount(NULL, "/", NULL, MS_REC | MS_PRIVATE, NULL) == -1) {
+ rpmlog(RPMLOG_ERR,
+ _("failed to change mount propagation %s: %s\n"),
"/", strerror(errno));
goto exit;
}
rpmlog(RPMLOG_WARNING,
"private mounts in chroot not implemented\n");
} else {