Compare commits

...

86 Commits
master ... f38

Author SHA1 Message Date
Michal Domonkos f42b172033 Rebase to rpm 4.18.2 (https://rpm.org/wiki/Releases/4.18.2) 2023-11-13 16:25:25 +01:00
Miro Hrončok c608d7cdd7 Require rpm-sequoia >= 1.4.0 to avoid undefined symbol: _pgpVerifySignature2
With rpm-4.18.1-2.fc39.x86_64 and rpm-sequoia-1.3.0-1.fc39.x86_64:

    $ rpm -q rpm
    rpm: symbol lookup error: /lib64/librpmio.so.9: undefined symbol: _pgpVerifySignature2
2023-04-25 16:15:49 +02:00
Panu Matilainen 201a02bcd5 Backport improved crypto error messages from upstream 2023-04-25 11:53:59 +03:00
Michal Domonkos 5ca1cfeb91 Drop patches already in 4.18.1 tarball
These were forgotten in the previous commit...
2023-04-24 10:07:45 +02:00
Michal Domonkos 7bfe20af40 Rebase to rpm 4.18.1 (https://rpm.org/wiki/Releases/4.18.1) 2023-03-15 14:58:17 +01:00
Panu Matilainen 1cb2cea4c3 Dependency generation sanity
Disable debuginfod lookups in rpmbuild scripts, there's no circumstance
where rpmbuild should look up symbols from the internet.
Exclude kernel modules from ELF dependency generation, kernel modules
do not have DT_NEEDED style dependencies.
2023-02-16 13:38:34 +02:00
Fedora Release Engineering fa9a65dc3b Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2023-01-20 19:56:42 +00:00
Panu Matilainen 6c1efa07cc Remember to bump release, doh
(maybe this suggests it's time to look into rpmautospec...)
2023-01-10 11:38:04 +02:00
Panu Matilainen 56868f0f9b Drop setup.py based Python build (#2135561, #2149762)
The setup.py build was only really added for dealing with parallel
installable Python 2 and 3 builds, and has been quite a PITA otherwise
because it's not what the upstream builds and tests use. Now that
the 2to3 transition is thankfully over, we can go back to building the
extension by ourselves. Only, in the meanwhile people have come to
depend on the egg-info data so create that from automake, that format is
not exactly rocket science.

This fixes us accidentally shipping two slightly different Python
modules for years (#2135719) and building with Python >= 3.12 where
distutils has been dropped, and does so in upstream compatible manner
(where a similar approach was taken when transitioning to cmake based
build system)
2023-01-09 14:02:40 +02:00
Miro Hrončok 51caa93346 Remove 5 years old Obsoletes for platform-python-rpm 2022-12-19 22:43:30 +01:00
Panu Matilainen 6c83a290e3 Fix hang-up on failed key import (related to #2149762) 2022-12-07 13:52:01 +02:00
Panu Matilainen 002373bffd Require rpm-sequoia >= 1.2.0 for V3 signature support, re-enable (#2141686) 2022-11-24 10:15:47 +02:00
Panu Matilainen 581e8ac2ae Revert back to internal OpenPGP parser for V3 signature support (#2141686)
Much of the world outside Fedora itself appears to be signed using
obs-signd which defaults to OpenPGP v3 signatures, which the Sequoia
backend does not currently support. Revert for now to consider the
options.
2022-11-10 18:13:25 +02:00
Panu Matilainen 7c98f6310a Switch to Sequoia crypto (https://fedoraproject.org/wiki/Changes/RpmSequoia) 2022-11-01 12:28:32 +02:00
Panu Matilainen 2212faed65 Add an option for building with Sequoia crypto
In preparation of https://fedoraproject.org/wiki/Changes/RpmSequoia
but the default is still openssl for now.
2022-10-14 09:40:47 +03:00
Panu Matilainen 27024cb2a8 Break ancient rpm <-> rpm-libs ordering loop 2022-10-05 13:56:40 +03:00
Panu Matilainen 63a01f5b39 Start utilizing %patchlist, finally
No actual patch changes.
2022-10-03 15:40:53 +03:00
Panu Matilainen 46895c4091 Drop the temporary build-dependency on pandoc before it grows a beard 2022-10-03 15:40:21 +03:00
Panu Matilainen 476a04e71a Rebase to rpm 4.18.0 final 2022-09-21 13:24:24 +03:00
Panu Matilainen 293b446a51 Fix a largish directory walk related memory leak in transactions 2022-09-14 13:22:39 +03:00
Panu Matilainen 56a300ba62 Fix buffer overrun on rpmdb queries involving ^ in version 2022-09-07 10:44:44 +03:00
Panu Matilainen 480384be6c Break selinux-policy <-> rpm-plugin-selinux ordering loop (#1851266)
Technically the packages depend on each other in that if you install on,
the other must be pulled in for the functionality. However the
installation order doesn't matter, as the plugin will only be used in
the next transaction anyway. Thus, making that dependency unordered by
flagging it as "meta" resolves the ordering loop.
2022-09-07 09:52:27 +03:00
Panu Matilainen 7e293eda16 Rebase to 4.18.0 rc1 2022-09-02 09:07:19 +03:00
Michal Domonkos e92156f606 Bump release 2022-08-02 15:03:31 +02:00
Michal Domonkos d8119b93a1 Revert %%autosetup patch due to another regression
The repo may be initialized before the macro runs, in which case we
would fail to create the initial main branch and thus fail on "git
branch --set-upstream-to=main".  This caused an FTBFS in the edk2
package:

https://github.com/rpm-software-management/rpm/pull/2121#issuecomment-1202349789

Revert the patch for now as a hotfit and revisit the actual use case
later upstream, either fixing it properly or reverting there as well.
2022-08-02 15:00:44 +02:00
Fedora Release Engineering d9a2f98ff9 Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-07-23 01:01:19 +00:00
Michal Domonkos 83570997b2 Fix minor regressions 2022-07-11 15:05:24 +02:00
Panu Matilainen 8b4a3685d4 Rebase to 4.18.0-beta1 2022-06-29 09:13:17 +03:00
Python Maint 75045b9669 Rebuilt for Python 3.11 2022-06-13 15:22:04 +02:00
Panu Matilainen d4a60dbb2e Rebase to alpha2, prevent uncontrolled sqlite WAL growth 2022-05-23 10:57:13 +03:00
Panu Matilainen de6dc77d50 Fix rubygem unpack regression, causing rubygem builds to fail 2022-04-28 10:32:07 +03:00
Miro Hrončok deee8829f8 Fedora CI: Add a regression test for rhbz#2078744 2022-04-27 07:34:12 +00:00
Panu Matilainen d849b13cc8 Fix verbose source uncompress regression (#2079127) 2022-04-27 09:58:48 +03:00
Panu Matilainen 2f2f9ed291 Further dynamic buildrequires cli switch regression fixes (#2078744)
Third time's the charm, eh?
2022-04-26 18:25:30 +03:00
Panu Matilainen f384795ec8 Fix rpmbuild -ba --nodeps regression wrt dynamic buildrequires (#2078744) 2022-04-26 16:32:29 +03:00
Panu Matilainen 0c48f210b1 Subtle tweak to bug 2078744 fix logic... 2022-04-26 11:20:13 +03:00
Panu Matilainen 5e60ce8fd7 Fix rpmbuild -br not producing a src.rpm regression (#2078744) 2022-04-26 11:07:48 +03:00
Panu Matilainen 2742b0e272 Rebase to rpm 4.18 alpha
As per https://fedoraproject.org/wiki/Changes/RPM-4.18
Adding patches for two late discovered regressions
2022-04-25 13:10:58 +03:00
Neal Gompa 2bef3ba7c7 oops, fix order for ln command in posttrans 2022-03-21 18:45:52 -04:00
Neal Gompa 391c3aeb66 Create rpmdb directory symlink in posttrans by default (#2066427) 2022-03-21 18:42:53 -04:00
Neal Gompa 3afd14a395 Add dependencies for the rpmdb migration scriptlet (#2055033) 2022-02-16 07:41:35 -05:00
Neal Gompa d5f3c0a5b3 Drop "duplicate" trigger that is no longer needed
It causes a spec error and is not needed anymore anyway.
2022-02-16 07:39:58 -05:00
Panu Matilainen 7fefa01b9e Really fix spurious %%transfiletriggerpostun execution (#2023311, #2048168) 2022-02-02 14:05:21 +02:00
Neal Gompa 0b9f813cd5 Migrate rpmdb to /usr/lib/sysimage/rpm (#2042099)
Reference:  https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr
2022-01-26 20:14:39 -05:00
Fedora Release Engineering 9e3cd4beae - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2022-01-21 18:01:28 +00:00
Björn Esser d5a5044945
Use baserelease for rpm release tag to make rpmdev-bumpspec work
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2022-01-20 07:01:22 +01:00
Björn Esser 951ffa7e5d
Rebuild (ima-evm-utils)
Signed-off-by: Björn Esser <besser82@fedoraproject.org>
2022-01-20 06:38:27 +01:00
Panu Matilainen 5abb204ea5 Fix spurious %%transfiletriggerpostun execution (#2023311) 2022-01-14 13:58:04 +02:00
Panu Matilainen 376b8b277a Fix fapolicyd plugin dependencies to replace fapolicyd-dnf-plugin (#2007639) 2022-01-14 13:57:12 +02:00
Peter Robinson 5a48e9d787 Rebuils for ima-evm-utils 1.4 soname bump 2021-11-08 21:06:40 +00:00
Sahana Prasad f6ae8e75fa Rebuilt with OpenSSL 3.0.0 2021-09-14 19:13:44 +02:00
Panu Matilainen ae022866f0 Rebase to 4.17.0 final (https://rpm.org/wiki/Releases/4.17.0) 2021-09-03 14:09:14 +03:00
Panu Matilainen c37b0e75b2 Rebase to rpm 4.17.0 rc1 2021-08-20 12:55:26 +03:00
Fedora Release Engineering a66e966a5f - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-07-23 11:35:32 +00:00
Panu Matilainen 7c9bfb59ff Temporarily buildrequire pandoc due to makefile bugs
The upstream patches wont help when the tarball is created with
buggy makefiles, hpmh. Temporarily require pandoc for building
to get around it.
2021-06-23 10:08:40 +03:00
Panu Matilainen f209b8606b Doh, remember to upload the tarball... 2021-06-23 09:41:32 +03:00
Panu Matilainen 161b1ca16a Rebase to rpm 4.17.0 beta1
Drop upstreamed / unnecessary patches, drop debugedit conditionals
as it's now a hard external dependency. Add back
/usr/lib/rpm/find-debuginfo.sh as a compat symlink for now, this
is referred to from quite a few packages directly.

Pull couple of late upstream patches to avoid build dependency on
pandoc.
2021-06-23 08:16:12 +03:00
Python Maint 0c2b0cd02a Rebuilt for Python 3.10 2021-06-02 21:35:50 +02:00
Panu Matilainen f3fae00ffe Switch to external debugedit 2021-05-17 12:49:14 +03:00
Panu Matilainen f40acc53d9 Handle different find-debuginfo.sh location with external debugedit 2021-05-17 12:46:22 +03:00
Panu Matilainen d0c51399dc Fix regression causing a crash on Lua state reset (#1958095)
Also move previously misplaced previous patch to the "already upstream"
section.
2021-05-07 15:48:24 +03:00
Panu Matilainen 77dba0a29f Proper fix for comments affecting macro file parsing (#1953910) 2021-04-29 14:35:08 +03:00
Panu Matilainen e38cfd281b Enable fapolicyd plugin build
This doesn't introduce any new build dependencies so no point
conditionalizing it, we have too many bconds as it is...
2021-04-27 12:59:10 +03:00
Panu Matilainen d56ba0c11f Temporarily revert macro file loading fix due to regression #1953910 2021-04-27 10:55:36 +03:00
Panu Matilainen 3e8fbdcf8f Add a bcond to build with external debugedit
In preparation to splitting debugedit to a separate project, add a
switch that we can easily flick when the time comes.
2021-04-26 14:30:22 +03:00
Panu Matilainen ae094714b0 Rebase to rpm 4.17.0 alpha
Apart from the obviously dropped upstreamed patches etc:
- Drop a local hack for a cosmetic Fedora 22 era rpm2cpio issue
- Drop BDB support leftovers from the spec (party like its's 1999!)
- Add build conditional for fsverity plugin
2021-04-26 13:36:43 +03:00
Panu Matilainen d9ef132c60 Rebase to rpm 4.16.1.3 2021-03-22 12:27:52 +02:00
Panu Matilainen 1089af6b8a Drop support for read-write Berkeley DB format (#1787311) 2021-02-03 15:19:13 +02:00
Panu Matilainen 05e837eb31 Minor spec fixes
Make with/without bdb build option actually work. An expression would be
nicer but people want to be able to build rpm with older versions of
itself...

Clean up unpackaged /var/tmp from the buildroot, rpm >= 4.17 will fail
on it.
2021-02-03 15:01:49 +02:00
Fedora Release Engineering b439c18a65 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2021-01-27 15:26:51 +00:00
Mark Wielaard d5b8c7b4cb Fix edit_attributes_str_comp_dir in Patch916 (#1919107) 2021-01-22 11:20:35 +01:00
Mark Wielaard ff02e06b27 Fix up bcond_with check conditional for eln. 2021-01-20 13:52:32 +01:00
Jeff Law 008caa69a3 Fix typo in test for F33 or newer 2021-01-19 11:32:45 -07:00
Mark Wielaard 652537b1a5 Add DWARF5 support to debugedit. 2021-01-19 12:29:29 +01:00
Panu Matilainen a38f609d72 Rebase to 4.16.1.2 and add soname safeguards, sigh... 2020-12-16 14:34:02 +02:00
Panu Matilainen d1d0607ffa Rebase to rpm 4.16.1.1 2020-12-16 12:29:49 +02:00
Panu Matilainen 1200e8af92 Rebase to rpm 4.16.1 (http://rpm.org/wiki/Releases/4.16.1) 2020-12-10 13:46:29 +02:00
Panu Matilainen dd58cd6118 Groan, its Monday alright... 2020-11-30 11:24:58 +02:00
Panu Matilainen abe14426e2 Bah, remember to bump release 2020-11-30 11:22:56 +02:00
Panu Matilainen 9ad9c40835 Only disable test-suite where it's actually broken 2020-11-30 11:22:25 +02:00
Panu Matilainen 7bcd4c2489 Database opening related fixes
BDB will segfault on multiple failed attempts of certain kind, something
unexpected fails when selinux says no. Stop on first failure instead.
On a related note, fix double rpmdb open failure from lazy keyring open
recursing back to the same lazy open.
2020-11-30 11:02:41 +02:00
Panu Matilainen 7b0bfa9fc2 Temporarily disable test-suite due to massive fakechroot breakage 2020-10-28 08:36:06 +02:00
Panu Matilainen b47d15685e Issue deprecation warning when creating BDB databases (#1787311) 2020-10-28 08:20:30 +02:00
Panu Matilainen c691aaf809 Clean up after test-suite which leaves a read-only tree behind 2020-10-05 09:36:29 +03:00
Panu Matilainen 7bf49f32a0 Rebase to 4.16.0 final 2020-09-30 11:36:59 +03:00
Panu Matilainen 3a1ce1ea2d Rebase to rpm 4.16.0-rc1, run test-suite in parallel 2020-08-31 12:39:26 +03:00
17 changed files with 780 additions and 275 deletions

17
.gitignore vendored
View File

@ -40,3 +40,20 @@
/rpm-4.15.90-git14971.tar.bz2
/rpm-4.16.0-beta1.tar.bz2
/rpm-4.16.0-beta3.tar.bz2
/rpm-4.16.0-rc1.tar.bz2
/rpm-4.16.0.tar.bz2
/rpm-4.16.1.tar.bz2
/rpm-4.16.1.1.tar.bz2
/rpm-4.16.1.2.tar.bz2
/rpm-4.16.1.3.tar.bz2
/rpm-4.16.90-git15395.tar.bz2
/rpm-4.17.0-beta1.tar.bz2
/rpm-4.17.0-rc1.tar.bz2
/rpm-4.17.0.tar.bz2
/rpm-4.18.0-alpha1.tar.bz2
/rpm-4.18.0-alpha2.tar.bz2
/rpm-4.18.0-beta1.tar.bz2
/rpm-4.18.0-rc1.tar.bz2
/rpm-4.18.0.tar.bz2
/rpm-4.18.1.tar.bz2
/rpm-4.18.2.tar.bz2

View File

@ -1,95 +0,0 @@
From 2426c2a066e44f4d9a342585e76cdbdb0a8a2db1 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Wed, 23 Oct 2019 20:22:19 +0100
Subject: [PATCH] Revert "Improve ARM detection"
This reverts commit 8c3a7b8fa92b49a811fe36b60857b12f5d7db8a8.
This is the final piece in fixing rhbz 1691430. It's a clean revert
so let's do that for F-31 and we can discuss the details later.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
---
lib/rpmrc.c | 37 +++++++++----------------------------
1 file changed, 9 insertions(+), 28 deletions(-)
diff --git a/lib/rpmrc.c b/lib/rpmrc.c
index 0806e1b07..cada3f788 100644
--- a/lib/rpmrc.c
+++ b/lib/rpmrc.c
@@ -82,7 +82,6 @@ struct rpmOption {
static struct rpmat_s {
const char *platform;
uint64_t hwcap;
- uint64_t hwcap2;
} rpmat;
typedef struct defaultEntry_s {
@@ -951,9 +950,6 @@ static int is_geode(void)
#if defined(__linux__)
-#ifndef AT_HWCAP2 /* glibc < 2.18 */
-#define AT_HWCAP2 26
-#endif
/**
* Populate rpmat structure with auxv values
*/
@@ -967,7 +963,6 @@ static void read_auxv(void)
if (!rpmat.platform)
rpmat.platform = "";
rpmat.hwcap = getauxval(AT_HWCAP);
- rpmat.hwcap2 = getauxval(AT_HWCAP2);
#else
rpmat.platform = "";
int fd = open("/proc/self/auxv", O_RDONLY);
@@ -989,9 +984,6 @@ static void read_auxv(void)
case AT_HWCAP:
rpmat.hwcap = auxv.a_un.a_val;
break;
- case AT_HWCAP2:
- rpmat.hwcap2 = auxv.a_un.a_val;
- break;
}
}
close(fd);
@@ -1225,27 +1217,16 @@ static void defaultMachine(rpmrcCtx ctx, const char ** arch, const char ** os)
# if !defined(HWCAP_ARM_VFPv3)
# define HWCAP_ARM_VFPv3 (1 << 13)
# endif
-# if !defined(HWCAP2_AES)
-# define HWCAP2_AES (1 << 0)
-# endif
- /*
- * un.machine is armvXE, where X is version number and E is
- * endianness (b or l)
- */
- if (rstreqn(un.machine, "armv", 4)) {
- char endian = un.machine[strlen(un.machine)-1];
- char *modifier = un.machine + 5;
- /* keep armv7, armv8, armv9, armv10, ... */
- while(risdigit(*modifier))
- modifier++;
- if (rpmat.hwcap & HWCAP_ARM_VFPv3)
- *modifier++ = 'h';
- if (rpmat.hwcap2 & HWCAP2_AES)
- *modifier++ = 'c';
+ if (rstreq(un.machine, "armv7l")) {
+ if (rpmat.hwcap & HWCAP_ARM_VFPv3) {
if (rpmat.hwcap & HWCAP_ARM_NEON)
- *modifier++ = 'n';
- *modifier++ = endian;
- *modifier++ = 0;
+ strcpy(un.machine, "armv7hnl");
+ else
+ strcpy(un.machine, "armv7hl");
+ }
+ } else if (rstreq(un.machine, "armv6l")) {
+ if (rpmat.hwcap & HWCAP_ARM_VFP)
+ strcpy(un.machine, "armv6hl");
}
# endif /* arm*-linux */
--
2.23.0

View File

@ -1,30 +0,0 @@
From f2bc669cd0a080792522dd1bb7f50ef7025f16f0 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark@klomp.org>
Date: Sat, 21 Jul 2018 10:13:04 +0200
Subject: [PATCH] find-debuginfo.sh: decompress DWARF compressed ELF sections
debugedit and dwz do not support DWARF compressed ELF sections, let's
just decompress those before extracting debuginfo.
Tested-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
---
scripts/find-debuginfo.sh | 3 +++
1 file changed, 3 insertions(+)
diff --git a/scripts/find-debuginfo.sh b/scripts/find-debuginfo.sh
index 90a44942d..7b01bc036 100755
--- a/scripts/find-debuginfo.sh
+++ b/scripts/find-debuginfo.sh
@@ -357,6 +357,9 @@ do_file()
get_debugfn "$f"
[ -f "${debugfn}" ] && return
+ echo "explicitly decompress any DWARF compressed ELF sections in $f"
+ eu-elfcompress -q -p -t none "$f"
+
echo "extracting debug info from $f"
# See also cpio SOURCEFILE copy. Directories must match up.
debug_base_name="$RPM_BUILD_DIR"
--
2.18.0

View File

@ -1,18 +0,0 @@
diff --git a/rpm2cpio.c b/rpm2cpio.c
index 89ebdfa..ae999ff 100644
--- a/rpm2cpio.c
+++ b/rpm2cpio.c
@@ -84,7 +84,12 @@ int main(int argc, char *argv[])
exit(EXIT_FAILURE);
}
- rc = (ufdCopy(gzdi, fdo) == payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
+ /*
+ * XXX HACK for #1142949: should be equality test, but archive size
+ * short by cpio trailer size in packages built with rpm 4.12.0
+ * and its pre-releases.
+ */
+ rc = (ufdCopy(gzdi, fdo) >= payload_size) ? EXIT_SUCCESS : EXIT_FAILURE;
Fclose(fdo);

View File

@ -1,15 +0,0 @@
diff -up rpm-4.9.1.1/macros.in.jx rpm-4.9.1.1/macros.in
--- rpm-4.9.1.1/macros.in.jx 2011-08-03 16:19:05.000000000 -0400
+++ rpm-4.9.1.1/macros.in 2011-08-08 09:41:52.981064316 -0400
@@ -674,9 +674,10 @@ print (t)\
RPM_BUILD_DIR=\"%{u2p:%{_builddir}}\"\
RPM_OPT_FLAGS=\"%{optflags}\"\
+ RPM_LD_FLAGS=\"%{?build_ldflags}\"\
RPM_ARCH=\"%{_arch}\"\
RPM_OS=\"%{_os}\"\
RPM_BUILD_NCPUS=\"%{_smp_build_ncpus}\"\
- export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS\
+ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_LD_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_LD_FLAGS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
RPM_PACKAGE_NAME=\"%{NAME}\"\

View File

@ -1,12 +0,0 @@
diff -up rpm-4.11.1-rc1/macros.in.siteconfig rpm-4.11.1-rc1/macros.in
--- rpm-4.11.1-rc1/macros.in.siteconfig 2013-06-07 13:19:21.000000000 +0300
+++ rpm-4.11.1-rc1/macros.in 2013-06-11 15:06:59.525747503 +0300
@@ -647,6 +647,8 @@ package or when debugging this package.\
export CLASSPATH}\
PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\
export PKG_CONFIG_PATH\
+ CONFIG_SITE=${CONFIG_SITE:-NONE}\
+ export CONFIG_SITE\
\
%{verbose:set -x}\
umask 022\

View File

@ -0,0 +1,12 @@
diff '--color=auto' -rup rpm-4.17.0-orig/macros.in rpm-4.17.0/macros.in
--- rpm-4.17.0-orig/macros.in 2021-08-20 04:44:56.264259007 -0400
+++ rpm-4.17.0/macros.in 2022-01-26 20:11:26.864195884 -0500
@@ -140,7 +140,7 @@
%_buildshell /bin/sh
# The location of the rpm database file(s).
-%_dbpath %{_var}/lib/rpm
+%_dbpath %{_usr}/lib/sysimage/rpm
# The location of the rpm database file(s) after "rpm --rebuilddb".
%_dbpath_rebuild %{_dbpath}

View File

@ -0,0 +1,225 @@
diff -up rpm-4.18.2/configure.ac.orig rpm-4.18.2/configure.ac
--- rpm-4.18.2/configure.ac.orig 2023-11-13 13:18:27.694107699 +0100
+++ rpm-4.18.2/configure.ac 2023-11-13 16:18:59.917784964 +0100
@@ -384,7 +384,7 @@ AC_SUBST(WITH_LIBGCRYPT_LIB)
WITH_RPM_SEQUOIA_INCLUDE=
WITH_RPM_SEQUOIA_LIB=
if test "$with_crypto" = sequoia ; then
- PKG_CHECK_MODULES([RPM_SEQUOIA], [rpm-sequoia], [have_rpm_sequoia=yes], [have_rpm_sequoia=no])
+ PKG_CHECK_MODULES([RPM_SEQUOIA], [rpm-sequoia >= 1.4.0], [have_rpm_sequoia=yes], [have_rpm_sequoia=no])
if test "$have_rpm_sequoia" = "yes"; then
WITH_RPM_SEQUOIA_INCLUDE="$RPM_SEQUOIA_CFLAGS"
WITH_RPM_SEQUOIA_LIB="$RPM_SEQUOIA_LIBS"
diff -up rpm-4.18.2/include/rpm/rpmpgp.h.orig rpm-4.18.2/include/rpm/rpmpgp.h
--- rpm-4.18.2/include/rpm/rpmpgp.h.orig 2023-11-13 13:18:27.697107681 +0100
+++ rpm-4.18.2/include/rpm/rpmpgp.h 2023-11-13 16:18:59.918784958 +0100
@@ -1014,6 +1014,18 @@ int pgpPrtParams(const uint8_t *pkts, si
pgpDigParams * ret);
/** \ingroup rpmpgp
+ * Parse a OpenPGP packet(s).
+ * @param pkts OpenPGP packet(s)
+ * @param pktlen OpenPGP packet(s) length (no. of bytes)
+ * @param pkttype Expected packet type (signature/key) or 0 for any
+ * @param[out] ret signature/pubkey packet parameters on success (alloced)
+ * @param[out] lints error messages and lints
+ * @return -1 on error, 0 on success
+ */
+int pgpPrtParams2(const uint8_t *pkts, size_t pktlen, unsigned int pkttype,
+ pgpDigParams * ret, char **lints);
+
+/** \ingroup rpmpgp
* Parse subkey parameters from OpenPGP packet(s).
* @param pkts OpenPGP packet(s)
* @param pktlen OpenPGP packet(s) length (no. of bytes)
@@ -1192,6 +1204,17 @@ const uint8_t *pgpDigParamsSignID(pgpDig
const char *pgpDigParamsUserID(pgpDigParams digp);
/** \ingroup rpmpgp
+ * Verify a PGP signature and return a error message or lint.
+ * @param key public key
+ * @param sig signature
+ * @param hashctx digest context
+ * @param lints error messages and lints
+ * @return RPMRC_OK on success
+ */
+rpmRC pgpVerifySignature2(pgpDigParams key, pgpDigParams sig, DIGEST_CTX hashctx,
+ char **lints);
+
+/** \ingroup rpmpgp
* Retrieve the object's version.
*
* Returns the object's version.
diff -up rpm-4.18.2/lib/rpmvs.c.orig rpm-4.18.2/lib/rpmvs.c
--- rpm-4.18.2/lib/rpmvs.c.orig 2023-11-13 13:18:27.703107645 +0100
+++ rpm-4.18.2/lib/rpmvs.c 2023-11-13 16:18:59.918784958 +0100
@@ -193,10 +193,23 @@ static void rpmsinfoInit(const struct vf
}
if (sinfo->type == RPMSIG_SIGNATURE_TYPE) {
- if (pgpPrtParams(data, dlen, PGPTAG_SIGNATURE, &sinfo->sig)) {
- rasprintf(&sinfo->msg, _("%s tag %u: invalid OpenPGP signature"),
- origin, td->tag);
+ char *lints = NULL;
+ int ec = pgpPrtParams2(data, dlen, PGPTAG_SIGNATURE, &sinfo->sig, &lints);
+ if (ec) {
+ if (lints) {
+ rasprintf(&sinfo->msg,
+ ("%s tag %u: invalid OpenPGP signature: %s"),
+ origin, td->tag, lints);
+ free(lints);
+ } else {
+ rasprintf(&sinfo->msg,
+ _("%s tag %u: invalid OpenPGP signature"),
+ origin, td->tag);
+ }
goto exit;
+ } else if (lints) {
+ rpmlog(RPMLOG_WARNING, "%s\n", lints);
+ free(lints);
}
sinfo->hashalgo = pgpDigParamsAlgo(sinfo->sig, PGPVAL_HASHALGO);
sinfo->keyid = pgpGrab(pgpDigParamsSignID(sinfo->sig)+4, 4);
diff -up rpm-4.18.2/rpmio/rpmkeyring.c.orig rpm-4.18.2/rpmio/rpmkeyring.c
--- rpm-4.18.2/rpmio/rpmkeyring.c.orig 2023-11-13 13:18:27.719107550 +0100
+++ rpm-4.18.2/rpmio/rpmkeyring.c 2023-11-13 16:18:59.919784952 +0100
@@ -328,7 +328,12 @@ rpmRC rpmKeyringVerifySig(rpmKeyring key
pgpkey = key->pgpkey;
/* We call verify even if key not found for a signature sanity check */
- rc = pgpVerifySignature(pgpkey, sig, ctx);
+ char *lints = NULL;
+ rc = pgpVerifySignature2(pgpkey, sig, ctx, &lints);
+ if (lints) {
+ rpmlog(rc ? RPMLOG_ERR : RPMLOG_WARNING, "%s\n", lints);
+ free(lints);
+ }
}
if (keyring)
diff -up rpm-4.18.2/rpmio/rpmpgp_internal.c.orig rpm-4.18.2/rpmio/rpmpgp_internal.c
--- rpm-4.18.2/rpmio/rpmpgp_internal.c.orig 2023-11-13 13:18:27.719107550 +0100
+++ rpm-4.18.2/rpmio/rpmpgp_internal.c 2023-11-13 16:18:59.919784952 +0100
@@ -1095,6 +1095,14 @@ int pgpPrtParams(const uint8_t * pkts, s
return rc;
}
+int pgpPrtParams2(const uint8_t * pkts, size_t pktlen, unsigned int pkttype,
+ pgpDigParams * ret, char **lints)
+{
+ if (lints)
+ *lints = NULL;
+ return pgpPrtParams(pkts, pktlen, pkttype, ret);
+}
+
int pgpPrtParamsSubkeys(const uint8_t *pkts, size_t pktlen,
pgpDigParams mainkey, pgpDigParams **subkeys,
int *subkeysCount)
@@ -1264,6 +1272,13 @@ rpmRC pgpVerifySig(pgpDig dig, DIGEST_CT
pgpDigGetParams(dig, PGPTAG_SIGNATURE), hashctx);
}
+rpmRC pgpVerifySignature2(pgpDigParams key, pgpDigParams sig, DIGEST_CTX hashctx, char **lints)
+{
+ if (lints)
+ *lints = NULL;
+ return pgpVerifySignature(key, sig, hashctx);
+}
+
static pgpArmor decodePkts(uint8_t *b, uint8_t **pkt, size_t *pktlen)
{
const char * enc = NULL;
diff -up rpm-4.18.2/rpmio/rpmpgp_sequoia.c.orig rpm-4.18.2/rpmio/rpmpgp_sequoia.c
--- rpm-4.18.2/rpmio/rpmpgp_sequoia.c.orig 2023-11-13 13:18:27.719107550 +0100
+++ rpm-4.18.2/rpmio/rpmpgp_sequoia.c 2023-11-13 16:18:59.919784952 +0100
@@ -36,6 +36,9 @@ W(uint32_t, pgpDigParamsCreationTime, (p
W(rpmRC, pgpVerifySignature,
(pgpDigParams key, pgpDigParams sig, DIGEST_CTX hashctx),
(key, sig, hashctx))
+W(rpmRC, pgpVerifySignature2,
+ (pgpDigParams key, pgpDigParams sig, DIGEST_CTX hashctx, char **lints),
+ (key, sig, hashctx, lints))
W(int, pgpPubkeyKeyID,
(const uint8_t * pkt, size_t pktlen, pgpKeyID_t keyid),
(pkt, pktlen, keyid))
@@ -51,6 +54,10 @@ W(int, pgpPubKeyCertLen,
W(int, pgpPrtParams,
(const uint8_t *pkts, size_t pktlen, unsigned int pkttype, pgpDigParams *ret),
(pkts, pktlen, pkttype, ret))
+W(int, pgpPrtParams2,
+ (const uint8_t *pkts, size_t pktlen, unsigned int pkttype, pgpDigParams *ret,
+ char **lints),
+ (pkts, pktlen, pkttype, ret, lints))
W(int, pgpPrtParamsSubkeys,
(const uint8_t *pkts, size_t pktlen,
pgpDigParams mainkey, pgpDigParams **subkeys,
diff -up rpm-4.18.2/tests/rpmi.at.orig rpm-4.18.2/tests/rpmi.at
--- rpm-4.18.2/tests/rpmi.at.orig 2023-11-13 13:18:27.721107538 +0100
+++ rpm-4.18.2/tests/rpmi.at 2023-11-13 16:21:40.657790792 +0100
@@ -254,7 +254,7 @@ RPMTEST_CLEANUP
AT_SETUP([rpm -U <corrupted signed 1>])
AT_KEYWORDS([install])
-RPMTEST_CHECK([
+RPMTEST_CHECK_UNQUOTED([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-signed.rpm"
@@ -267,7 +267,13 @@ runroot rpm -U --ignorearch --ignoreos -
],
[1],
[],
-[error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header RSA signature: BAD (package tag 268: invalid OpenPGP signature)
+[`if test x$PGP = xinternal; then
+ echo 'error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header RSA signature: BAD (package tag 268: invalid OpenPGP signature)'
+else
+ echo 'error: /tmp/hello-2.0-1.x86_64-signed.rpm: Header RSA signature: BAD (package tag 268: invalid OpenPGP signature: Parsing an OpenPGP packet:'
+ echo ' Failed to parse Signature Packet'
+ echo ' because: Malformed packet: Subpacket extends beyond the end of the subpacket area)'
+fi`
error: /tmp/hello-2.0-1.x86_64-signed.rpm cannot be installed
])
RPMTEST_CLEANUP
diff -up rpm-4.18.2/tests/rpmsigdig.at.orig rpm-4.18.2/tests/rpmsigdig.at
--- rpm-4.18.2/tests/rpmsigdig.at.orig 2023-11-13 13:18:27.722107532 +0100
+++ rpm-4.18.2/tests/rpmsigdig.at 2023-11-13 16:21:03.842018500 +0100
@@ -539,7 +539,7 @@ RPMTEST_CLEANUP
# Test pre-built corrupted package verification (corrupted signature)
AT_SETUP([rpmkeys -Kv <corrupted signed> 1])
AT_KEYWORDS([rpmkeys digest signature])
-RPMTEST_CHECK([
+RPMTEST_CHECK_UNQUOTED([
RPMDB_INIT
pkg="hello-2.0-1.x86_64-signed.rpm"
@@ -553,14 +553,28 @@ runroot rpmkeys -Kv /tmp/${pkg}
],
[1],
[/tmp/hello-2.0-1.x86_64-signed.rpm:
- Header RSA signature: BAD (package tag 268: invalid OpenPGP signature)
+`if test x$PGP = xinternal; then
+ echo ' Header RSA signature: BAD (package tag 268: invalid OpenPGP signature)'
+else
+ echo ' Header RSA signature: BAD (package tag 268: invalid OpenPGP signature: Parsing an OpenPGP packet:'
+ echo ' Failed to parse Signature Packet'
+ echo ' because: Signature appears to be created by a non-conformant OpenPGP implementation, see <https://github.com/rpm-software-management/rpm/issues/2351>.'
+ echo ' because: Malformed MPI: leading bit is not set: expected bit 1 to be set in 0 (0))'
+fi`
Header SHA256 digest: OK
Header SHA1 digest: OK
Payload SHA256 digest: OK
V4 RSA/SHA256 Signature, key ID 1964c5fc: NOKEY
MD5 digest: OK
/tmp/hello-2.0-1.x86_64-signed.rpm:
- Header RSA signature: BAD (package tag 268: invalid OpenPGP signature)
+`if test x$PGP = xinternal; then
+ echo ' Header RSA signature: BAD (package tag 268: invalid OpenPGP signature)'
+else
+ echo ' Header RSA signature: BAD (package tag 268: invalid OpenPGP signature: Parsing an OpenPGP packet:'
+ echo ' Failed to parse Signature Packet'
+ echo ' because: Signature appears to be created by a non-conformant OpenPGP implementation, see <https://github.com/rpm-software-management/rpm/issues/2351>.'
+ echo ' because: Malformed MPI: leading bit is not set: expected bit 1 to be set in 0 (0))'
+fi`
Header SHA256 digest: OK
Header SHA1 digest: OK
Payload SHA256 digest: OK

16
rpm-4.18.x-ldflags.patch Normal file
View File

@ -0,0 +1,16 @@
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
@@ -727,10 +727,11 @@ 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}\"\
- export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS\
+ export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS RPM_BUILD_NCPUS RPM_LD_FLAGS\
RPM_DOC_DIR=\"%{_docdir}\"\
export RPM_DOC_DIR\
RPM_PACKAGE_NAME=\"%{NAME}\"\

View File

@ -0,0 +1,12 @@
diff -up rpm-4.18.1/docs/Makefile.am.orig rpm-4.18.1/docs/Makefile.am
--- rpm-4.18.1/docs/Makefile.am.orig 2023-03-15 14:48:27.955720807 +0100
+++ rpm-4.18.1/docs/Makefile.am 2023-03-15 14:48:43.634626934 +0100
@@ -1,8 +1,6 @@
## Process this file with automake to produce Makefile.in
-if PANDOC
SUBDIRS = man
-endif
EXTRA_DIST =

View File

@ -0,0 +1,14 @@
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:52:55.211928040 +0100
+++ rpm-4.18.1/macros.in 2023-03-15 13:55:04.113129930 +0100
@@ -746,7 +746,9 @@ package or when debugging this package.\
%{?_javaclasspath:CLASSPATH=\"%{_javaclasspath}\"\
export CLASSPATH}\
PKG_CONFIG_PATH=\"${PKG_CONFIG_PATH}:%{_libdir}/pkgconfig:%{_datadir}/pkgconfig\"\
- export PKG_CONFIG_PATH
+ export PKG_CONFIG_PATH\
+ CONFIG_SITE=${CONFIG_SITE:-NONE}\
+ export CONFIG_SITE
%___build_pre \
%{___build_pre_env} \

495
rpm.spec
View File

@ -1,71 +1,54 @@
# 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
# run internal testsuite?
%bcond_without check
# build with plugins?
%bcond_without plugins
# build with libarchive? (needed for rpm2archive)
%bcond_without libarchive
# build with libimaevm.so
%bcond_without libimaevm
# build with fsverity support?
%bcond_without fsverity
# build with zstd support?
%bcond_without zstd
# build with ndb backend?
%bcond_without ndb
# build with sqlite support?
%bcond_without sqlite
# build with bdb support?
%bcond_without bdb
# build with internal Berkeley DB?
%bcond_with int_bdb
# build with bdb_ro support?
%bcond_without bdb_ro
# build with sequoia crypto?
%bcond_without sequoia
%define rpmhome /usr/lib/rpm
%global rpmver 4.16.0
%global snapver beta3
%global rel 2
%global rpmver 4.18.2
#global snapver rc1
%global baserelease 1
%global sover 9
%global srcver %{rpmver}%{?snapver:-%{snapver}}
%global srcdir %{?snapver:testing}%{!?snapver:rpm-%(echo %{rpmver} | cut -d'.' -f1-2).x}
%if %{with bdb}
%define bdbver 5.3.15
# Build-dependency on systemd for the sake of one macro would be a bit much...
%{!?_tmpfilesdir:%global _tmpfilesdir /usr/lib/tmpfiles.d}
%endif
Summary: The RPM package management system
Name: rpm
Version: %{rpmver}
Release: %{?snapver:0.%{snapver}.}%{rel}%{?dist}.3
Release: %{?snapver:0.%{snapver}.}%{baserelease}%{?dist}
Url: http://www.rpm.org/
Source0: http://ftp.rpm.org/releases/%{srcdir}/rpm-%{srcver}.tar.bz2
%if %{with bdb} && %{with int_bdb}
Source1: db-%{bdbver}.tar.gz
%endif
Source10: rpmdb-rebuild.service
# Disable autoconf config.site processing (#962837)
Patch1: rpm-4.15.x-siteconfig.patch
# In current Fedora, man-pages pkg owns all the localized man directories
Patch3: rpm-4.9.90-no-man-dirs.patch
# Temporary band-aid for rpm2cpio whining on payload size mismatch (#1142949)
Patch5: rpm-4.12.0-rpm2cpio-hack.patch
# https://github.com/rpm-software-management/rpm/pull/473
Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
# Patches already upstream:
# These are not yet upstream
Patch906: rpm-4.7.1-geode-i686.patch
# Probably to be upstreamed in slightly different form
Patch907: rpm-4.15.x-ldflags.patch
Patch912: 0001-Revert-Improve-ARM-detection.patch
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
@ -76,12 +59,9 @@ Requires: popt%{_isa} >= 1.10.2.1
Requires: curl
Obsoletes: python2-rpm < %{version}-%{release}
%if %{with bdb} && %{without int_bdb}
BuildRequires: libdb-devel
%endif
%if %{with check}
BuildRequires: fakechroot gnupg2
BuildRequires: debugedit >= 0.3
%endif
# XXX generally assumed to be installed but make it explicit as rpm
@ -93,7 +73,6 @@ BuildRequires: gawk
BuildRequires: elfutils-devel >= 0.112
BuildRequires: elfutils-libelf-devel
BuildRequires: readline-devel zlib-devel
BuildRequires: openssl-devel
# The popt version here just documents an older known-good version
BuildRequires: popt-devel >= 1.10.2
BuildRequires: file-devel
@ -115,6 +94,15 @@ BuildRequires: libzstd-devel
%if %{with sqlite}
BuildRequires: sqlite-devel
%endif
%if %{with sequoia}
%global crypto sequoia
BuildRequires: rpm-sequoia-devel >= 1.4.0
%else
%global crypto openssl
BuildRequires: openssl-devel
%endif
# Couple of patches change makefiles so, require for now...
BuildRequires: automake libtool
@ -128,6 +116,34 @@ BuildRequires: audit-libs-devel
BuildRequires: ima-evm-utils-devel >= 1.0
%endif
%if %{with fsverity}
BuildRequires: fsverity-utils-devel
%endif
# For the rpmdb migration scriptlet (#2055033)
Requires(pre): coreutils
Requires(pre): findutils
Requires(pre): sed
%patchlist
# Set rpmdb path to /usr/lib/sysimage/rpm
rpm-4.17.x-rpm_dbpath.patch
# Disable autoconf config.site processing (#962837)
rpm-4.18.x-siteconfig.patch
# In current Fedora, man-pages pkg owns all the localized man directories
rpm-4.9.90-no-man-dirs.patch
# Patches already upstream:
rpm-4.18.x-add-pgpVerifySignature2-and-pgpPrtParams2.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
# We either need pandoc in buildroot or this patch in order for man pages to
# actually be installed, choose the latter
rpm-4.18.x-revert-pandoc-cond.patch
%description
The RPM Package Manager (RPM) is a powerful command line driven
package management system capable of installing, uninstalling,
@ -138,7 +154,11 @@ the package like its version, a description, etc.
%package libs
Summary: Libraries for manipulating RPM packages
License: GPLv2+ and LGPLv2+ with exceptions
Requires: %{name} = %{version}-%{release}
Requires(meta): %{name} = %{version}-%{release}
%if %{with sequoia}
# >= 1.4.0 required for pgpVerifySignature2() and pgpPrtParams2()
Requires: rpm-sequoia%{_isa} >= 1.4.0
%endif
%description libs
This package contains the RPM shared libraries.
@ -189,6 +209,7 @@ Requires: tar unzip gzip bzip2 cpio xz
%if %{with zstd}
Requires: zstd
%endif
Requires: debugedit >= 0.3
Requires: pkgconfig >= 1:0.24
Requires: /usr/bin/gdb-add-index
# https://fedoraproject.org/wiki/Changes/Minimal_GDB_in_buildroot
@ -217,7 +238,6 @@ BuildRequires: python3-devel
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
Provides: %{name}-python3 = %{version}-%{release}
Obsoletes: %{name}-python3 < %{version}-%{release}
Obsoletes: platform-python-%{name} < %{version}-%{release}
%description -n python3-%{name}
The python3-rpm package contains a module that permits applications
@ -248,7 +268,7 @@ packages on a system.
%package plugin-selinux
Summary: Rpm plugin for SELinux functionality
Requires: rpm-libs%{_isa} = %{version}-%{release}
Requires: selinux-policy-base
Requires(meta): selinux-policy-base
%description plugin-selinux
%{summary}.
@ -292,20 +312,41 @@ Requires: rpm-libs%{_isa} = %{version}-%{release}
%description plugin-audit
%{summary}.
%package plugin-fsverity
Summary: Rpm plugin for fsverity file signatures
Requires: rpm-libs%{_isa} = %{version}-%{release}
%description plugin-fsverity
%{summary}.
%package plugin-fapolicyd
Summary: Rpm plugin for fapolicyd support
Requires: rpm-libs%{_isa} = %{version}-%{release}
Provides: fapolicyd-plugin = %{version}-%{release}
# fapolicyd-dnf-plugin currently at 1.0.4
Obsoletes: fapolicyd-dnf-plugin < 1.0.5
%description plugin-fapolicyd
%{summary}.
See https://people.redhat.com/sgrubb/fapolicyd/ for information about
the fapolicyd daemon.
%package plugin-dbus-announce
Summary: Rpm plugin for announcing transactions on the DBUS
Requires: rpm-libs%{_isa} = %{version}-%{release}
%description plugin-dbus-announce
The plugin announces basic information about rpm transactions to the
system DBUS - like packages installed or removed. Other programs can
subscribe to the signals to get notified when packages on the system
change.
# with plugins
%endif
%prep
%autosetup -n rpm-%{srcver} %{?with_int_bdb:-a 1} -p1
%if %{with bdb} && %{with int_bdb}
ln -s db-%{bdbver} db
%endif
# switch to sqlite db by default, including during build-time tests
%if %{with sqlite}
sed -i -e "/_db_backend/ s/ bdb/ sqlite/g" macros.in
%endif
%autosetup -n rpm-%{srcver} -p1
%build
%set_build_flags
@ -328,38 +369,32 @@ done;
--build=%{_target_platform} \
--host=%{_target_platform} \
--with-vendor=redhat \
%{?with_bdb: --enable-bdb} \
%{!?with_int_bdb: --with-external-db} \
%{!?with_plugins: --disable-plugins} \
--with-lua \
--with-selinux \
--with-cap \
--with-acl \
--with-fapolicyd \
%{?with_ndb: --enable-ndb} \
%{?with_libimaevm: --with-imaevm} \
%{?with_fsverity: --with-fsverity} \
%{?with_zstd: --enable-zstd} \
%{?with_sqlite: --enable-sqlite} \
%{?with_bdb_ro: --enable-bdb-ro} \
--enable-python \
--with-crypto=openssl
--with-crypto=%{crypto}
%make_build
pushd python
%py3_build
popd
%install
%make_install
# We need to build with --enable-python for the self-test suite, but we
# actually package the bindings built with setup.py (#531543#c26)
pushd python
%py3_install
popd
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
install -m 644 %{SOURCE10} $RPM_BUILD_ROOT/%{_unitdir}
install -m 644 %{SOURCE20} $RPM_BUILD_ROOT/%{_unitdir}
mkdir -p $RPM_BUILD_ROOT%{rpmhome}
install -m 755 %{SOURCE21} $RPM_BUILD_ROOT/%{rpmhome}
# Save list of packages through cron
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily
@ -368,21 +403,19 @@ install -m 755 scripts/rpm.daily ${RPM_BUILD_ROOT}%{_sysconfdir}/cron.daily/rpm
mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d
install -m 644 scripts/rpm.log ${RPM_BUILD_ROOT}%{_sysconfdir}/logrotate.d/rpm
%if %{with bdb}
mkdir -p ${RPM_BUILD_ROOT}%{_tmpfilesdir}
echo "r /var/lib/rpm/__db.*" > ${RPM_BUILD_ROOT}%{_tmpfilesdir}/rpm.conf
%endif
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rpm
mkdir -p $RPM_BUILD_ROOT%{rpmhome}/macros.d
mkdir -p $RPM_BUILD_ROOT/var/lib/rpm
mkdir -p $RPM_BUILD_ROOT/usr/lib/sysimage/rpm
# init an empty database for %ghost'ing for all supported backends
for be in %{?with_ndb:ndb} %{?with_sqlite:sqlite} %{?with_bdb:bdb}; do
for be in %{?with_ndb:ndb} %{?with_sqlite:sqlite}; do
./rpmdb --define "_db_backend ${be}" --dbpath=${PWD}/${be} --initdb
cp -va ${be}/. $RPM_BUILD_ROOT/var/lib/rpm/
cp -va ${be}/. $RPM_BUILD_ROOT/usr/lib/sysimage/rpm/
done
# some packages invoke find-debuginfo directly, preserve compat for now
ln -s ../../bin/find-debuginfo $RPM_BUILD_ROOT/usr/lib/rpm/find-debuginfo.sh
%find_lang rpm
find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f
@ -390,39 +423,52 @@ find $RPM_BUILD_ROOT -name "*.la"|xargs rm -f
# These live in perl-generators and python-rpm-generators now
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
make check || (cat tests/rpmtests.log; exit 1)
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
# Handle rpmdb rebuild service on erasure of old to avoid ordering issues
# https://pagure.io/fesco/issue/2382
%triggerun -- rpm < 4.15.90-0.git14971.10
%pre
# Symlink all rpmdb files to the new location if we're still using /var/lib/rpm
if [ -d /var/lib/rpm ]; then
mkdir -p /usr/lib/sysimage/rpm
rpmdb_files=$(find /var/lib/rpm -maxdepth 1 -type f | sed 's|^/var/lib/rpm/||g' | sort)
for rpmdb_file in ${rpmdb_files[@]}; do
ln -sfr /var/lib/rpm/${rpmdb_file} /usr/lib/sysimage/rpm/${rpmdb_file}
done
fi
%triggerun -- rpm < 4.17.0-7
# Handle rpmdb migrate service on erasure of old to avoid ordering issues
if [ -x /usr/bin/systemctl ]; then
systemctl --no-reload preset rpmdb-rebuild ||:
systemctl --no-reload preset rpmdb-migrate ||:
fi
%posttrans
if [ -f /var/lib/rpm/Packages ]; then
touch /var/lib/rpm/.rebuilddb
if [ -d /var/lib/rpm ]; then
touch /var/lib/rpm/.migratedb
fi
if [ ! -d /var/lib/rpm ] && [ -d /usr/lib/sysimage/rpm ] && [ ! -f /usr/lib/sysimage/rpm/.rpmdbdirsymlink_created ]; then
ln -sfr /usr/lib/sysimage/rpm /var/lib/rpm
touch /usr/lib/sysimage/rpm/.rpmdbdirsymlink_created
fi
%files -f rpm.lang
%license COPYING
%doc CREDITS doc/manual/[a-z]*
%if %{with bdb}
%{_tmpfilesdir}/rpm.conf
%endif
%doc CREDITS docs/manual/[a-z]*
%{_unitdir}/rpmdb-rebuild.service
%{_unitdir}/rpmdb-migrate.service
%dir %{_sysconfdir}/rpm
%attr(0755, root, root) %dir /var/lib/rpm
%attr(0644, root, root) %ghost %config(missingok,noreplace) /var/lib/rpm/*
%attr(0644, root, root) %ghost /var/lib/rpm/.*.lock
%attr(0755, root, root) %dir /usr/lib/sysimage/rpm
%attr(0644, root, root) %ghost %config(missingok,noreplace) /usr/lib/sysimage/rpm/*
%attr(0644, root, root) %ghost /usr/lib/sysimage/rpm/.*.lock
%{_bindir}/rpm
%{_bindir}/rpm2archive
@ -467,8 +513,10 @@ fi
%dir %{rpmhome}/fileattrs
%files libs
%{_libdir}/librpmio.so.*
%{_libdir}/librpm.so.*
%{_libdir}/librpmio.so.%{sover}
%{_libdir}/librpm.so.%{sover}
%{_libdir}/librpmio.so.%{sover}.*
%{_libdir}/librpm.so.%{sover}.*
%if %{with plugins}
%dir %{_libdir}/rpm-plugins
@ -488,6 +536,13 @@ fi
%{_libdir}/rpm-plugins/ima.so
%{_mandir}/man8/rpm-plugin-ima.8*
%files plugin-fsverity
%{_libdir}/rpm-plugins/fsverity.so
%files plugin-fapolicyd
%{_libdir}/rpm-plugins/fapolicyd.so
%{_mandir}/man8/rpm-plugin-fapolicyd.8*
%files plugin-prioreset
%{_libdir}/rpm-plugins/prioreset.so
%{_mandir}/man8/rpm-plugin-prioreset.8*
@ -496,29 +551,35 @@ fi
%{_libdir}/rpm-plugins/audit.so
%{_mandir}/man8/rpm-plugin-audit.8*
# with plugins
%files plugin-dbus-announce
%{_libdir}/rpm-plugins/dbus_announce.so
%{_mandir}/man8/rpm-plugin-dbus-announce.8*
%{_sysconfdir}/dbus-1/system.d/org.rpm.conf
%endif
%files build-libs
%{_libdir}/librpmbuild.so.*
%{_libdir}/librpmbuild.so.%{sover}
%{_libdir}/librpmbuild.so.%{sover}.*
%files sign-libs
%{_libdir}/librpmsign.so.*
%{_libdir}/librpmsign.so.%{sover}
%{_libdir}/librpmsign.so.%{sover}.*
%files build
%{_bindir}/rpmbuild
%{_bindir}/gendiff
%{_bindir}/rpmspec
%{_bindir}/rpmlua
%{_mandir}/man1/gendiff.1*
%{_mandir}/man8/rpmbuild.8*
%{_mandir}/man8/rpmdeps.8*
%{_mandir}/man8/rpmspec.8*
%{_mandir}/man8/rpmlua.8*
%{rpmhome}/brp-*
%{rpmhome}/check-*
%{rpmhome}/debugedit
%{rpmhome}/sepdebugcrcfix
%{rpmhome}/find-debuginfo.sh
%{rpmhome}/find-lang.sh
%{rpmhome}/*provides*
%{rpmhome}/*requires*
@ -527,14 +588,19 @@ fi
%{rpmhome}/*.req
%{rpmhome}/mkinstalldirs
%{rpmhome}/fileattrs/*
%{rpmhome}/find-debuginfo.sh
%{rpmhome}/rpmuncompress
%files sign
%{_bindir}/rpmsign
%{_mandir}/man8/rpmsign.8*
%files -n python3-%{name}
%{python3_sitearch}/rpm/
%{python3_sitearch}/rpm-%{rpmver}*.egg-info
%{python3_sitearch}/rpm/__init__.py
%{python3_sitearch}/rpm/transaction.py
%{python3_sitearch}/rpm/_rpm.so
%artifact %{python3_sitearch}/rpm/__pycache__/
%files devel
%{_mandir}/man8/rpmgraph.8*
@ -549,9 +615,238 @@ fi
%files apidocs
%license COPYING
%doc doc/librpm/html/*
%doc docs/librpm/html/*
%changelog
* Mon Nov 13 2023 Michal Domonkos <mdomonko@redhat.com> - 4.18.2-1
- Rebase to rpm 4.18.2 (https://rpm.org/wiki/Releases/4.18.2)
* Tue Apr 25 2023 Miro Hrončok <mhroncok@redhat.com> - 4.18.1-3
- Explicitly require rpm-sequoia >= 1.4.0 on runtime to avoid
rpm: symbol lookup error: /lib64/librpmio.so.9: undefined symbol: _pgpVerifySignature2
* Thu Apr 20 2023 Panu Matilainen <pmatilai@redhat.com> - 4.18.1-2
- Backport improved crypto error messages from upstream
* Wed Mar 15 2023 Michal Domonkos <mdomonko@redhat.com> - 4.18.1-1
- Rebase to rpm 4.18.1 (https://rpm.org/wiki/Releases/4.18.1)
* Thu Feb 16 2023 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-11
- Disable debuginfod lookups in rpmbuild scripts
- Exclude kernel modules from ELF dependency generation
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 4.18.0-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Mon Jan 09 2023 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-9
- Generate Python egg-info from automake (#2135561)
- Drop setup.py-based Python build (#2135719)
* Wed Dec 07 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-8
- Fix hang-up on failed key import (related to #2149762)
* Thu Nov 24 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-7
- Require rpm-sequoia >= 1.2.0 for V3 signature support, re-enable (#2141686)
* Thu Nov 10 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-6
- Revert back to internal OpenPGP parser for V3 signature support (#2141686)
* Tue Nov 01 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-5
- Switch to Sequoia crypto (https://fedoraproject.org/wiki/Changes/RpmSequoia)
* Fri Oct 14 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-4
- Add an option for building with Sequoia crypto
* Wed Oct 05 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-3
- Break ancient rpm <-> rpm-libs ordering loop
* Mon Oct 03 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-2
- Drop the temporary build-dependency on pandoc before it grows a beard
- Start utilizing %%patchlist, finally
* Wed Sep 21 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-1
- Rebase to rpm 4.18.0 (https://rpm.org/wiki/Releases/4.18.0)
* Wed Sep 14 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.rc1.4
- Fix a largish directory walk related memory leak in transactions
* Wed Sep 07 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.rc1.3
- Fix buffer overrun on rpmdb queries involving ^ in version
* Wed Sep 07 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.rc1.2
- Break selinux-policy <-> rpm-plugin-selinux ordering loop (#1851266)
* Fri Sep 02 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.rc1.1
- Rebase to 4.18.0-rc1 (https://rpm.org/wiki/Releases/4.18.0)
* Tue Aug 02 2022 Michal Domonkos <mdomonko@redhat.com> - 4.18.0-0.beta1.4
- Revert %%autosetup -S git patch due to another regression
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.18.0-0.beta1.3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Mon Jul 11 2022 Michal Domonkos <mdomonko@redhat.com> - 4.18.0-0.beta1.2
- Fix check-buildroot regression wrt bundled SRPM (#2104150)
- Fix %%autosetup -S git regression wrt default git branch
* Tue Jun 28 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.beta1.1
- Rebase to 4.18.0-beta1 (https://rpm.org/wiki/Releases/4.18.0)
* Mon Jun 13 2022 Python Maint <python-maint@redhat.com> - 4.18.0-0.alpha2.2
- Rebuilt for Python 3.11
* Mon May 23 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha2.1
- Rebase to 4.18.0-0.alpha2
- Prevent uncontrolled sqlite WAL growth during large transactions
* Thu Apr 28 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.6
- Fix rubygem unpack regression, causing rubygem builds to fail
* Wed Apr 27 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.5
- Fix verbose source uncompress regression (#2079127)
* Tue Apr 26 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.4
- Further dynamic buildrequires cli switch regression fixes (#2078744)
* Tue Apr 26 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.3
- Fix rpmbuild -ba --nodeps regression wrt dynamic buildrequires (#2078744)
* Tue Apr 26 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.2
- Fix rpmbuild -br not producing a src.rpm regression (#2078744)
* Mon Apr 25 2022 Panu Matilainen <pmatilai@redhat.com> - 4.18.0-0.alpha1.1
- Rebase to 4.18.0 alpha (https://fedoraproject.org/wiki/Changes/RPM-4.18)
- Add patches for two late discovered regressions
* Mon Mar 21 2022 Neal Gompa <ngompa@fedoraproject.org> - 4.17.0-10
- Create rpmdb directory symlink in posttrans by default (#2066427)
* Wed Feb 16 2022 Neal Gompa <ngompa@fedoraproject.org> - 4.17.0-9
- Add dependencies for the rpmdb migration scriptlet (#2055033)
* Wed Feb 02 2022 Panu Matilainen <pmatilai@redhat.com> - 4.17.0-8
- Really fix spurious %%transfiletriggerpostun execution (#2023311, #2048168)
* Wed Jan 26 2022 Neal Gompa <ngompa@fedoraproject.org> - 4.17.0-7
- Migrate rpmdb to /usr/lib/sysimage/rpm (#2042099)
https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 4.17.0-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Thu Jan 20 2022 Björn Esser <besser82@fedoraproject.org> - 4.17.0-5
- Rebuild (ima-evm-utils)
- Use baserelease for rpm release tag to make rpmdev-bumpspec work
* Fri Jan 14 2022 Panu Matilainen <pmatilai@redhat.com> - 4.17.0-4
- Fix spurious %%transfiletriggerpostun execution (#2023311)
* Fri Jan 14 2022 Panu Matilainen <pmatilai@redhat.com> - 4.17.0-3
- Fix fapolicyd plugin dependencies to replace fapolicyd-dnf-plugin (#2007639)
* Mon Nov 08 2021 Peter Robinson <pbrobinson@fedoraproject.org> - 4.17.0-2
- Rebuils for ima-evm-utils 1.4 soname bump
* Tue Sep 14 2021 Sahana Prasad <sahana@redhat.com> - 4.17.0-1.1
- Rebuilt with OpenSSL 3.0.0
* Fri Sep 03 2021 Panu Matilainen <pmatilai@redhat.com> - 4.17.0-1
- Rebase to 4.17.0 final (https://rpm.org/wiki/Releases/4.17.0)
* Thu Aug 19 2021 Panu Matilainen <pmatilai@redhat.com> - 4.17.0-0.rc1.1
- Rebase to 4.17.0 rc1
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.17.0-0.beta1.0.2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jun 22 2021 Panu Matilainen <pmatilai@redhat.com> - 4.17.0-0.beta1.1
- Rebase to 4.17.0 beta1
- Add back /usr/lib/rpm/find-debuginfo.sh as a compat symlink
- Add temporary buildrequire on pandoc due to makefile bugs in beta1
* Wed Jun 02 2021 Python Maint <python-maint@redhat.com> - 4.16.90-0.git15395.8.1
- Rebuilt for Python 3.10
* Mon May 17 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.8
- Switch to external debugedit
* Mon May 17 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.7
- Handle different find-debuginfo.sh location with external debugedit
* Fri May 07 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.6
- Fix regression causing a crash on Lua state reset (#1958095)
* Thu Apr 29 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.5
- Proper fix for comments affecting macro file parsing (#1953910)
* Tue Apr 27 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.4
- Enable fapolicyd plugin build
* Tue Apr 27 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.3
- Temporarily revert macro file loading fix due to regression #1953910
* Mon Apr 26 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.2
- Add a bcond to build with external debugedit
* Mon Apr 26 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.90-0.git15395.1
- Rebase to rpm 4.17.0 alpha (https://rpm.org/wiki/Releases/4.17.0)
- Drop a local hack for a cosmetic Fedora 22 era rpm2cpio issue
- Drop BDB support leftovers from the spec
- Add build conditional for fsverity plugin
* Mon Mar 22 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.1.3-1
- Rebase to rpm 4.16.1.3 (https://rpm.org/wiki/Releases/4.16.1.3)
* Wed Feb 03 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.1.2-6
- Drop support for read-write Berkeley DB format (#1787311)
* Wed Feb 03 2021 Panu Matilainen <pmatilai@redhat.com> - 4.16.1.2-5
- Make with/without bdb build option actually work
- Clean up unpackaged /var/tmp from the build root
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 4.16.1.2-4.1
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Fri Jan 22 2021 Mark Wielaard <mjw@fedoraproject.org> - 4.16.1.2-4
- Fix edit_attributes_str_comp_dir in Patch916 (#1919107)
* Tue Jan 19 2021 Jeff Law <law@redhat.com> - 4.16.1.2-3
- Fix typo in test for F33 or newer
* Tue Jan 19 2021 Mark Wielaard <mjw@fedoraproject.org> - 4.16.1.2-2
- Add debugedit DWARF5 support
* Wed Dec 16 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.1.2-1
- Rebase to rpm 4.16.1.2 (http://rpm.org/wiki/Releases/4.16.1.2)
- Add a spec safeguard for accidental soname bumps
* Wed Dec 16 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.1.1-1
- Rebase to rpm 4.16.1.1 (http://rpm.org/wiki/Releases/4.16.1.1)
* Thu Dec 10 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.1-1
- Rebase to rpm 4.16.1 (http://rpm.org/wiki/Releases/4.16.1)
* Mon Nov 30 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-5
- Only disable test-suite where it's actually broken
* Mon Nov 30 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-4
- Fix BDB crashing on failed open attempts (#1902395, #1898299, #1900407)
- Fix unnecessary double failure on lazy keyring open
* Wed Oct 28 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-3
- Issue deprecation warning when creating BDB databases (#1787311)
- Temporarily disable test-suite due to massive fakechroot breakage
* Mon Oct 05 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-2
- Clean up after test-suite which leaves a read-only tree behind
* Wed Sep 30 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-1
- Rebase to 4.16.0 final (https://rpm.org/wiki/Releases/4.16.0)
* Mon Aug 31 2020 Panu Matilainen <pmatilai@redhat.com> - 4.16.0-0.rc1.1
- Rebase to 4.16.0-rc1
- Run test-suite in parallel
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.16.0-0.beta3.2.3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild

18
rpmdb-migrate.service Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=RPM database migration to /usr
ConditionPathExists=/var/lib/rpm/.migratedb
# This should run before any daemons that may open the rpmdb
DefaultDependencies=no
After=sysinit.target
Before=basic.target shutdown.target
Conflicts=shutdown.target
# In case /var is remote-mounted
RequiresMountsFor=/var
[Service]
Type=oneshot
ExecStart=/usr/lib/rpm/rpmdb_migrate
[Install]
WantedBy=basic.target

View File

@ -1,19 +1,19 @@
[Unit]
Description=RPM database rebuild
ConditionPathExists=/var/lib/rpm/.rebuilddb
ConditionPathExists=/usr/lib/sysimage/rpm/.rebuilddb
# This should run before any daemons that may open the rpmdb
DefaultDependencies=no
After=sysinit.target
Before=basic.target shutdown.target
Conflicts=shutdown.target
# In case /var is remote-mounted
RequiresMountsFor=/var
# In case /usr is remote-mounted
RequiresMountsFor=/usr
[Service]
Type=oneshot
ExecStart=/usr/bin/rpmdb --rebuilddb
ExecStartPost=rm -f /var/lib/rpm/.rebuilddb
ExecStartPost=rm -f /usr/lib/sysimage/rpm/.rebuilddb
[Install]
WantedBy=basic.target

40
rpmdb_migrate Normal file
View File

@ -0,0 +1,40 @@
#!/bin/bash
# Script to migrate rpmdb from /var/lib/rpm to new rpmdb path in /usr
# Copyright (C) 2022 Neal Gompa <ngompa@fedoraproject.org>.
#
# Fedora-License-Identifier: GPLv2+
# SPDX-2.0-License-Identifier: GPL-2.0+
# SPDX-3.0-License-Identifier: GPL-2.0-or-later
#
# This program is free software.
# For more information on the license, see COPYING or
# <https://www.gnu.org/licenses/gpl-2.0.en.html>.
# For more information on free software, see
# <https://www.gnu.org/philosophy/free-sw.en.html>.
set -euo pipefail
# Script to migrate the rpmdb to /usr
rpmdb_path="$(rpm --eval '%_dbpath')"
rpmdb_path_old="/var/lib/rpm"
rpmdb_path_new="${rpmdb_path}"
if [ "${rpmdb_path}" = "${rpmdb_path_old}" ]; then
echo "The rpmdb path is still in /var, exiting!"
exit 0
fi
if [ -L "${rpmdb_path_old}" ]; then
echo "The rpmdb has already been migrated, exiting!"
rm -v "${rpmdb_path_old}/.migratedb"
exit 0
fi
rpm --verbose --rebuilddb
rm -rfv ${rpmdb_path_old}
ln -srv ${rpmdb_path_new} ${rpmdb_path_old}

View File

@ -1 +1 @@
SHA512 (rpm-4.16.0-beta3.tar.bz2) = 20efa638a7fe85b1b4d3d42fb07172c20a1f3c62024a29e4184b67a2d52ff3f94a186f178e9a5bfee9bf6c826a1023995d970b5c0ddaffe8b61fd2c888b44032
SHA512 (rpm-4.18.2.tar.bz2) = 1544efef04190299ac988f52c4f6e58ba9ff8943fe1f3e1353fb2bf4d73248935dac65a8a73b32c5d2d96f6875ce25c5196a78ed645d9504465cf1e89e0a268a

26
tests/tests.yml Normal file
View File

@ -0,0 +1,26 @@
---
- hosts: localhost
tags:
- classic
tasks:
- dnf:
name: "*"
state: latest
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
repositories:
- repo: "https://src.fedoraproject.org/rpms/pyproject-rpm-macros.git"
dest: "pyproject-rpm-macros"
tests:
# regression test for https://bugzilla.redhat.com/show_bug.cgi?id=2078744
- pyproject_rpm_macros:
dir: pyproject-rpm-macros/tests
run: ./mocktest.sh python-pluggy
required_packages:
- mock
- rpmdevtools
- rpm-build