Compare commits

...

10 Commits

Author SHA1 Message Date
Miroslav Suchý c96af978b4 Migrate to SPDX license
This follows https://github.com/rpm-software-management/rpm/issues/2511
and moves the license string to only one place. No need to repeat it
in subpackages.

I did not include a changelog entry as there are five other PR waiting in a
queue, and that would conflict with them.
2023-10-03 10:00:06 +03:00
Michal Domonkos f4212c08d7 Update to 4.19.0 2023-09-19 14:46:58 +02:00
Panu Matilainen 0b65501ee5 Restore a warning comment lost in 3913b45078 2023-09-11 13:30:47 +03:00
Michal Domonkos b779389deb Update to 4.19 rc1 2023-09-04 16:56:58 +02:00
Panu Matilainen 033b63dfde Fix couple of unrelated regressions (#2229984, #2233454)
- a regression on uncompressing 7zip compressed sources (#2229984)
- a conflict with pre-existing scl-utils %_root_prefix macro (#2233454)
2023-08-22 14:28:13 +03:00
Panu Matilainen 88f6201129 Behave more consistently when target %%optflags are not defined (#2231727) 2023-08-21 14:28:53 +03:00
Michal Domonkos 4eff63bcb6 Update to 4.19 beta
Also remove the already noop %check support altogether as the new
test-suite backend currently doesn't support running inside a mock
buildroot (this may change in the future, in which case we'll add it
back).
2023-08-02 18:32:31 +02:00
Yaakov Selkowitz dfc1484732 Drop fsverity plugin from RHEL builds
The fsverity plugin subpackage is not planned to be shipped in RHEL, so
avoid the build dependency by not building it at all.
2023-07-24 23:32:28 -04:00
Fedora Release Engineering ee04b3651c Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-07-21 17:04:23 +00:00
Panu Matilainen a68075b252 Rebuild for Python 3.12. Third time's the charm, eh? 2023-06-28 10:19:26 +03:00
9 changed files with 66 additions and 201 deletions

3
.gitignore vendored
View File

@ -58,3 +58,6 @@
/rpm-4.18.1.tar.bz2
/rpm-4.18.90.tar.bz2
/rpm-4.18.91.tar.bz2
/rpm-4.18.92.tar.bz2
/rpm-4.18.99.tar.bz2
/rpm-4.19.0.tar.bz2

View File

@ -1,49 +0,0 @@
From 911a4f253c7213a8570028a7dc2a20b045de8e9e Mon Sep 17 00:00:00 2001
Message-ID: <911a4f253c7213a8570028a7dc2a20b045de8e9e.1687934951.git.pmatilai@redhat.com>
From: Fabian Vogt <fvogt@suse.de>
Date: Mon, 26 Jun 2023 16:28:07 +0200
Subject: [PATCH] Actually return an error in parseScript if parsing fails
The return value is stored in the "res" variable which is set to the return
value of parseLines early in the function. Past that point, any "goto exit;"
caused the function to return success. This was introduced by 52ce88851abb
("Port parseScript() to use parseLines(), no functional changes"). To fix it,
reintroduce the nextPart variable.
---
build/parseScript.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/build/parseScript.c b/build/parseScript.c
index f8b693ac6..6f3dc2fe8 100644
--- a/build/parseScript.c
+++ b/build/parseScript.c
@@ -95,7 +95,7 @@ int parseScript(rpmSpec spec, int parsePart)
int index;
char * reqargs = NULL;
- int res = PART_ERROR; /* assume failure */
+ int nextPart, res = PART_ERROR; /* assume failure */
int rc, argc;
int arg;
const char **argv = NULL;
@@ -367,7 +367,7 @@ int parseScript(rpmSpec spec, int parsePart)
goto exit;
}
- if ((res = parseLines(spec, STRIP_NOTHING, NULL, &sb)) == PART_ERROR)
+ if ((nextPart = parseLines(spec, STRIP_NOTHING, NULL, &sb)) == PART_ERROR)
goto exit;
if (sb) {
@@ -479,6 +479,8 @@ int parseScript(rpmSpec spec, int parsePart)
}
}
+ res = nextPart;
+
exit:
free(reqargs);
freeStringBuf(sb);
--
2.41.0

View File

@ -1,52 +0,0 @@
From ea3187cfcf9cac87e5bc5e7db79b0338da9e355e Mon Sep 17 00:00:00 2001
Message-ID: <ea3187cfcf9cac87e5bc5e7db79b0338da9e355e.1687844980.git.pmatilai@redhat.com>
From: Panu Matilainen <pmatilai@redhat.com>
Date: Mon, 26 Jun 2023 12:45:09 +0300
Subject: [PATCH] Don't muck with per-process global sqlite configuration from
the db backend
sqlite3_config() affects all in-process uses of sqlite. librpm being a
low-level library, it has no business whatsoever making such decisions
for the applications running on top of it. Besides that, the callback can
easily end up pointing to an already closed database, causing an
innocent API user to crash in librpm on an entirely unrelated error on
some other database. "Oops."
The sqlite API doesn't seem to provide any per-db or non-global context
for logging errors, thus we can only remove the call and let sqlite output
errors the way it pleases (print through stderr, presumably).
Thanks to Jan Palus for spotting and reporting!
---
lib/backend/sqlite.c | 8 --------
1 file changed, 8 deletions(-)
diff --git a/lib/backend/sqlite.c b/lib/backend/sqlite.c
index 5a029d575..b61273226 100644
--- a/lib/backend/sqlite.c
+++ b/lib/backend/sqlite.c
@@ -44,13 +44,6 @@ static void rpm_match3(sqlite3_context *sctx, int argc, sqlite3_value **argv)
sqlite3_result_int(sctx, match);
}
-static void errCb(void *data, int err, const char *msg)
-{
- rpmdb rdb = data;
- rpmlog(RPMLOG_WARNING, "%s: %s: %s\n",
- rdb->db_descr, sqlite3_errstr(err), msg);
-}
-
static int dbiCursorReset(dbiCursor dbc)
{
if (dbc->stmt) {
@@ -170,7 +163,6 @@ static int sqlite_init(rpmdb rdb, const char * dbhome)
* the "database is locked" errors at every cost
*/
sqlite3_busy_timeout(sdb, 10000);
- sqlite3_config(SQLITE_CONFIG_LOG, errCb, rdb);
sqlexec(sdb, "PRAGMA secure_delete = OFF");
sqlexec(sdb, "PRAGMA case_sensitive_like = ON");
--
2.41.0

View File

@ -1,33 +0,0 @@
From 7072b2d2b92e4d2731451bdcca8d83ab6b945016 Mon Sep 17 00:00:00 2001
Message-ID: <7072b2d2b92e4d2731451bdcca8d83ab6b945016.1687934969.git.pmatilai@redhat.com>
From: Panu Matilainen <pmatilai@redhat.com>
Date: Tue, 20 Jun 2023 10:11:20 +0300
Subject: [PATCH] Fix per-file plugin hook regression introduced in 4.18
Commit 6dd62720fe84f7e2ad902c915b952fc0b29e3dcd neglected to update
rpmpluginsCallFsmFilePost() to pass the absolute path in the case
of unowned directories. Because in that case there's no rpmfi to
pass to the plugin in that case, there's simply no way for the plugin
to know what path is being manipulated. Oops.
Fixes: #2543
---
lib/fsm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/fsm.c b/lib/fsm.c
index 747ed2b09..c44f6313c 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -360,7 +360,7 @@ static int fsmDoMkDir(rpmPlugins plugins, int dirfd, const char *dn,
}
/* Run fsm file post hook for all plugins */
- rpmpluginsCallFsmFilePost(plugins, NULL, dn, mode, op, rc);
+ rpmpluginsCallFsmFilePost(plugins, NULL, apath, mode, op, rc);
if (!rc) {
rpmlog(RPMLOG_DEBUG,
--
2.41.0

View File

@ -1,11 +0,0 @@
--- rpm-4.18.90/macros.in.orig 2023-04-17 14:44:14.186653076 +0200
+++ rpm-4.18.90/macros.in 2023-04-17 14:46:25.190322631 +0200
@@ -133,7 +133,7 @@
%_keyringpath %{_dbpath}/pubkeys/
# sysusers helper binary or script, uncomment to disable
-%__systemd_sysusers %{_bindir}/systemd-sysusers
+# %__systemd_sysusers %{_bindir}/systemd-sysusers
#
# Path to script that creates debug symbols in a /usr/lib/debug

View File

@ -0,0 +1,12 @@
diff -up rpm-4.18.92/macros.in.orig rpm-4.18.92/macros.in
--- rpm-4.18.92/macros.in.orig 2023-08-02 17:56:49.858065935 +0200
+++ rpm-4.18.92/macros.in 2023-08-02 17:57:01.967988065 +0200
@@ -138,7 +138,7 @@
# sysusers helper binary (or a replacement script), uncomment to disable
#%__systemd_sysusers @__SYSTEMD_SYSUSERS@
-%__systemd_sysusers %{_rpmconfigdir}/sysusers.sh
+#%__systemd_sysusers %{_rpmconfigdir}/sysusers.sh
#
# Path to script that creates debug symbols in a /usr/lib/debug

View File

@ -1,17 +0,0 @@
diff -up rpm-4.18.1/macros.in.orig rpm-4.18.1/macros.in
--- rpm-4.18.1/macros.in.orig 2023-03-15 13:57:06.385361527 +0100
+++ rpm-4.18.1/macros.in 2023-03-15 13:58:09.613971713 +0100
@@ -750,11 +750,12 @@ package or when debugging this package.\
RPM_SOURCE_DIR=\"%{_sourcedir}\"\
RPM_BUILD_DIR=\"%{_builddir}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
+ RPM_LD_FLAGS=\"%{?build_ldflags}\"\
RPM_ARCH=\"%{_arch}\"\
RPM_OS=\"%{_os}\"\
RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\
RPM_SPECPARTS_DIR=\"%{specpartsdir}\"\
- export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_SPECPARTS_DIR\
+ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_SPECPARTS_DIR RPM_LD_FLAGS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
RPM_PACKAGE_NAME=\"%{NAME}\"\

View File

@ -1,12 +1,3 @@
# run internal testsuite?
# fakechroot is severely broken beyond fedora 33, disable...
%if 0%{?fedora} > 33 || 0%{?rhel} > 8
%bcond_with check
%else
%bcond_without check
%endif
# build against xz?
%bcond_without xz
# build with plugins?
@ -16,7 +7,11 @@
# build with libimaevm.so
%bcond_without libimaevm
# build with fsverity support?
%if 0%{?rhel}
%bcond_with fsverity
%else
%bcond_without fsverity
%endif
# build with zstd support?
%bcond_without zstd
# build with ndb backend?
@ -30,9 +25,9 @@
%define rpmhome /usr/lib/rpm
%global rpmver 4.18.91
%global rpmver 4.19.0
#global snapver rc1
%global baserelease 6
%global baserelease 1
%global sover 10
%global srcver %{rpmver}%{?snapver:-%{snapver}}
@ -43,6 +38,7 @@ Name: rpm
Version: %{rpmver}
Release: %{?snapver:0.%{snapver}.}%{baserelease}%{?dist}
Url: http://www.rpm.org/
License: GPL-2.0-or-later
Source0: http://ftp.rpm.org/releases/%{srcdir}/rpm-%{srcver}.tar.bz2
Source10: rpmdb-rebuild.service
@ -50,21 +46,12 @@ Source10: rpmdb-rebuild.service
Source20: rpmdb-migrate.service
Source21: rpmdb_migrate
# Partially GPL/LGPL dual-licensed and some bits with BSD
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
License: GPLv2+
Requires: coreutils
Requires: popt%{_isa} >= 1.10.2.1
Requires: curl
Conflicts: systemd < 253.5-6
Obsoletes: python2-rpm < %{version}-%{release}
%if %{with check}
BuildRequires: fakechroot gnupg2
BuildRequires: debugedit >= 0.3
%endif
# XXX generally assumed to be installed but make it explicit as rpm
# is a bit special...
BuildRequires: redhat-rpm-config >= 94
@ -145,19 +132,14 @@ rpm-4.18.x-siteconfig.patch
rpm-4.9.90-no-man-dirs.patch
# Disable new user/group handling
rpm-4.18.90-disable-sysusers.patch
rpm-4.18.92-disable-sysusers.patch
rpm-4.18.90-weak-user-group.patch
# Patches already upstream:
0001-Don-t-muck-with-per-process-global-sqlite-configurat.patch
0001-Actually-return-an-error-in-parseScript-if-parsing-f.patch
0001-Fix-per-file-plugin-hook-regression-introduced-in-4..patch
# ...
# These are not yet upstream
rpm-4.7.1-geode-i686.patch
# Probably to be upstreamed in slightly different form
rpm-4.18.x-ldflags.patch
%description
The RPM Package Manager (RPM) is a powerful command line driven
@ -168,7 +150,7 @@ the package like its version, a description, etc.
%package libs
Summary: Libraries for manipulating RPM packages
License: GPLv2+ and LGPLv2+ with exceptions
License: GPL-2.0-or-later OR LGPL-2.1-or-later
Requires(meta): %{name} = %{version}-%{release}
%if %{with sequoia}
# >= 1.4.0 required for pgpVerifySignature2() and pgpPrtParams2()
@ -180,7 +162,6 @@ This package contains the RPM shared libraries.
%package build-libs
Summary: Libraries for building RPM packages
License: GPLv2+ and LGPLv2+ with exceptions
Requires: rpm-libs%{_isa} = %{version}-%{release}
%description build-libs
@ -188,7 +169,6 @@ This package contains the RPM shared libraries for building packages.
%package sign-libs
Summary: Libraries for signing RPM packages
License: GPLv2+ and LGPLv2+ with exceptions
Requires: rpm-libs%{_isa} = %{version}-%{release}
Requires: %{_bindir}/gpg2
@ -197,7 +177,7 @@ This package contains the RPM shared libraries for signing packages.
%package devel
Summary: Development files for manipulating RPM packages
License: GPLv2+ and LGPLv2+ with exceptions
License: GPL-2.0-or-later OR LGPL-2.1-or-later
Requires: %{name} = %{version}-%{release}
Requires: %{name}-libs%{_isa} = %{version}-%{release}
Requires: %{name}-build-libs%{_isa} = %{version}-%{release}
@ -329,12 +309,14 @@ Requires: rpm-libs%{_isa} = %{version}-%{release}
%description plugin-audit
%{summary}.
%if %{with fsverity}
%package plugin-fsverity
Summary: Rpm plugin for fsverity file signatures
Requires: rpm-libs%{_isa} = %{version}-%{release}
%description plugin-fsverity
%{summary}.
%endif
%package plugin-fapolicyd
Summary: Rpm plugin for fapolicyd support
@ -370,6 +352,9 @@ change.
mkdir _build
cd _build
# Using the %%cmake macro creates a confusing and unworkable mirror-in-mirror
# effect on rpm platform setup. Use the old-fashioned way, only definining
# minimal paths.
cmake \
-DCMAKE_INSTALL_PREFIX=%{_usr} \
-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=%{_var}/lib \
@ -400,6 +385,9 @@ install -m 644 %{SOURCE20} $RPM_BUILD_ROOT/%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{rpmhome}
install -m 755 %{SOURCE21} $RPM_BUILD_ROOT/%{rpmhome}
# Built-in replacement for systemd-sysusers(8)
install -m 755 scripts/sysusers.sh $RPM_BUILD_ROOT/%{rpmhome}
# Save list of packages through cron
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm
@ -431,14 +419,6 @@ rm -f $RPM_BUILD_ROOT/%{rpmhome}/{perldeps.pl,perl.*,pythond*}
rm -f $RPM_BUILD_ROOT/%{_fileattrsdir}/{perl*,python*}
rm -rf $RPM_BUILD_ROOT/var/tmp
%if %{with check}
%check
cd _build
make check TESTSUITEFLAGS=-j%{_smp_build_ncpus} || (cat tests/rpmtests.log; exit 1)
# rpm >= 4.16.0 testsuite leaves a read-only tree behind, clean it up
make clean
%endif
%pre
# Symlink all rpmdb files to the new location if we're still using /var/lib/rpm
if [ -d /var/lib/rpm ]; then
@ -514,6 +494,7 @@ fi
%{rpmhome}/tgpg
%{rpmhome}/platform
%{rpmhome}/sysusers.sh
%dir %{rpmhome}/fileattrs
@ -543,8 +524,10 @@ fi
%{_mandir}/man8/rpm-plugin-ima.8*
%endif
%if %{with fsverity}
%files plugin-fsverity
%{_libdir}/rpm-plugins/fsverity.so
%endif
%files plugin-fapolicyd
%{_libdir}/rpm-plugins/fapolicyd.so
@ -608,11 +591,15 @@ fi
%{python3_sitearch}/rpm/_rpm.so
%artifact %{python3_sitearch}/rpm/__pycache__/
# Python examples
%{_defaultdocdir}/rpm/examples/*.py
%files devel
%{_mandir}/man8/rpmgraph.8*
%{_bindir}/rpmgraph
%{_libdir}/librp*[a-z].so
%{_libdir}/pkgconfig/rpm.pc
%{_libdir}/cmake/rpm/
%{_includedir}/rpm/
%files cron
@ -624,6 +611,31 @@ fi
%doc %{_defaultdocdir}/rpm/API/
%changelog
* Tue Sep 19 2023 Michal Domonkos <mdomonko@redhat.com> - 4.19.0-1
- Update to 4.19.0
* Mon Sep 04 2023 Michal Domonkos <mdomonko@redhat.com> - 4.18.99-1
- Update to 4.19 rc1
* Tue Aug 22 2023 Panu Matilainen <pmatilai@redhat.com> - 4.18.92-3
- Fix regression on uncompressing 7zip compressed sources (#2229984)
- Fix a conflict with pre-existing scl-utils %_root_prefix macro (#2233454)
* Mon Aug 21 2023 Panu Matilainen <pmatilai@redhat.com> - 4.18.92-2
- Behave more consistently when target %%optflags are not defined (#2231727)
* Wed Aug 02 2023 Michal Domonkos <mdomonko@redhat.com> - 4.18.92-1
- Update to 4.19 beta
* Tue Jul 25 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 4.18.91-9
- Drop fsverity plugin from RHEL builds
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.18.91-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Wed Jun 28 2023 Panu Matilainen <pmatilai@redhat.com> - 4.18.91-7
- Rebuilt for Python 3.12
* Wed Jun 28 2023 Panu Matilainen <pmatilai@redhat.com> - 4.18.91-6
- Fix a spec parsing error handling regression
- Fix a per-file plugin hook regression

View File

@ -1 +1 @@
SHA512 (rpm-4.18.91.tar.bz2) = e3b3e9f195e16afc0596d31ad7614b8369e2b9c6835cc2739f166772d21ae71714ce99b29fded63843ab7216bb34f1c33bb69c0718383ed4bb3b9058639aa246
SHA512 (rpm-4.19.0.tar.bz2) = 84801954eab8390af86388c96e0a446b0924bc3791dabcb8641dbaa53586ca852400c0b53c969c06e716949aa36ce337de7d6ba1ffc09eca31900af250f205cb