Compare commits
51 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
3b94c7e3fe | ||
|
872ea5af1b | ||
|
1af30e0e23 | ||
|
2bef3ba7c7 | ||
|
391c3aeb66 | ||
|
3afd14a395 | ||
|
d5f3c0a5b3 | ||
|
7fefa01b9e | ||
|
0b9f813cd5 | ||
|
9e3cd4beae | ||
|
d5a5044945 | ||
|
951ffa7e5d | ||
|
5abb204ea5 | ||
|
376b8b277a | ||
|
5a48e9d787 | ||
|
f6ae8e75fa | ||
|
ae022866f0 | ||
|
c37b0e75b2 | ||
|
a66e966a5f | ||
|
7c9bfb59ff | ||
|
f209b8606b | ||
|
161b1ca16a | ||
|
0c2b0cd02a | ||
|
f3fae00ffe | ||
|
f40acc53d9 | ||
|
d0c51399dc | ||
|
77dba0a29f | ||
|
e38cfd281b | ||
|
d56ba0c11f | ||
|
3e8fbdcf8f | ||
|
ae094714b0 | ||
|
d9ef132c60 | ||
|
1089af6b8a | ||
|
05e837eb31 | ||
|
b439c18a65 | ||
|
d5b8c7b4cb | ||
|
ff02e06b27 | ||
|
008caa69a3 | ||
|
652537b1a5 | ||
|
a38f609d72 | ||
|
d1d0607ffa | ||
|
1200e8af92 | ||
|
dd58cd6118 | ||
|
abe14426e2 | ||
|
9ad9c40835 | ||
|
7bcd4c2489 | ||
|
7b0bfa9fc2 | ||
|
b47d15685e | ||
|
c691aaf809 | ||
|
7bf49f32a0 | ||
|
3a1ce1ea2d |
11
.gitignore
vendored
11
.gitignore
vendored
@ -40,3 +40,14 @@
|
||||
/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.17.1.tar.bz2
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
|
15
rpm-4.17.1-revert-autopatch-branch.patch
Normal file
15
rpm-4.17.1-revert-autopatch-branch.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff -up rpm-4.17.1/macros.in.orig rpm-4.17.1/macros.in
|
||||
--- rpm-4.17.1/macros.in.orig 2022-08-02 14:19:36.496729048 +0200
|
||||
+++ rpm-4.17.1/macros.in 2022-08-02 14:19:56.270615191 +0200
|
||||
@@ -1166,10 +1166,7 @@ package or when debugging this package.\
|
||||
%{__git} config gc.auto 0\
|
||||
%{__git} add --force .\
|
||||
%{__git} commit %{-q} --allow-empty -a\\\
|
||||
- --author "%{__scm_author}" -m "%{NAME}-%{VERSION} base"\
|
||||
-%{__git} branch rpm-build \
|
||||
-%{__git} checkout rpm-build \
|
||||
-%{__git} branch --set-upstream-to=master
|
||||
+ --author "%{__scm_author}" -m "%{NAME}-%{VERSION} base"
|
||||
|
||||
%__scm_apply_git(qp:m:)\
|
||||
%{__git} apply --index --reject %{-p:-p%{-p*}} -\
|
12
rpm-4.17.x-rpm_dbpath.patch
Normal file
12
rpm-4.17.x-rpm_dbpath.patch
Normal 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}
|
@ -8,5 +8,5 @@ diff -up rpm-4.11.1-rc1/macros.in.siteconfig rpm-4.11.1-rc1/macros.in
|
||||
+ CONFIG_SITE=${CONFIG_SITE:-NONE}\
|
||||
+ export CONFIG_SITE\
|
||||
\
|
||||
%{verbose:set -x}\
|
||||
%[%{verbose}?"set -x":""]\
|
||||
umask 022\
|
343
rpm.spec
343
rpm.spec
@ -1,62 +1,59 @@
|
||||
|
||||
# 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
|
||||
|
||||
%define rpmhome /usr/lib/rpm
|
||||
|
||||
%global rpmver 4.16.0
|
||||
%global snapver beta3
|
||||
%global rel 2
|
||||
%global rpmver 4.17.1
|
||||
#global snapver rc1
|
||||
%global baserelease 3
|
||||
%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
|
||||
|
||||
Source20: rpmdb-migrate.service
|
||||
Source21: rpmdb_migrate
|
||||
|
||||
# Set rpmdb path to /usr/lib/sysimage/rpm
|
||||
Patch0: rpm-4.17.x-rpm_dbpath.patch
|
||||
# Disable autoconf config.site processing (#962837)
|
||||
Patch1: rpm-4.15.x-siteconfig.patch
|
||||
Patch1: rpm-4.17.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:
|
||||
|
||||
@ -64,8 +61,8 @@ Patch6: 0001-find-debuginfo.sh-decompress-DWARF-compressed-ELF-se.patch
|
||||
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
|
||||
# Hotfix, needs revert or fix upstream
|
||||
Patch908: rpm-4.17.1-revert-autopatch-branch.patch
|
||||
|
||||
# Partially GPL/LGPL dual-licensed and some bits with BSD
|
||||
# SourceLicense: (GPLv2+ and LGPLv2+ with exceptions) and BSD
|
||||
@ -76,12 +73,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
|
||||
@ -118,6 +112,9 @@ BuildRequires: sqlite-devel
|
||||
# Couple of patches change makefiles so, require for now...
|
||||
BuildRequires: automake libtool
|
||||
|
||||
# Temporary! Work around bugs in beta1 makefiles
|
||||
BuildRequires: pandoc
|
||||
|
||||
%if %{with plugins}
|
||||
BuildRequires: libselinux-devel
|
||||
BuildRequires: dbus-devel
|
||||
@ -128,6 +125,15 @@ 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
|
||||
|
||||
%description
|
||||
The RPM Package Manager (RPM) is a powerful command line driven
|
||||
package management system capable of installing, uninstalling,
|
||||
@ -189,6 +195,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
|
||||
@ -292,20 +299,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,15 +356,15 @@ 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} \
|
||||
@ -360,6 +388,10 @@ 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 +400,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 +420,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 +510,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 +533,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,13 +548,20 @@ 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
|
||||
@ -516,9 +575,6 @@ fi
|
||||
|
||||
%{rpmhome}/brp-*
|
||||
%{rpmhome}/check-*
|
||||
%{rpmhome}/debugedit
|
||||
%{rpmhome}/sepdebugcrcfix
|
||||
%{rpmhome}/find-debuginfo.sh
|
||||
%{rpmhome}/find-lang.sh
|
||||
%{rpmhome}/*provides*
|
||||
%{rpmhome}/*requires*
|
||||
@ -527,6 +583,7 @@ fi
|
||||
%{rpmhome}/*.req
|
||||
%{rpmhome}/mkinstalldirs
|
||||
%{rpmhome}/fileattrs/*
|
||||
%{rpmhome}/find-debuginfo.sh
|
||||
|
||||
%files sign
|
||||
%{_bindir}/rpmsign
|
||||
@ -549,9 +606,147 @@ fi
|
||||
|
||||
%files apidocs
|
||||
%license COPYING
|
||||
%doc doc/librpm/html/*
|
||||
%doc docs/librpm/html/*
|
||||
|
||||
%changelog
|
||||
* Tue Aug 02 2022 Michal Domonkos <mdomonko@redhat.com> - 4.17.1-3
|
||||
- Revert %%autosetup -S git patch due to another regression
|
||||
|
||||
* Mon Jul 11 2022 Michal Domonkos <mdomonko@redhat.com> - 4.17.1-2
|
||||
- Fix %%autosetup -S git regression wrt default git branch
|
||||
|
||||
* Fri Jul 01 2022 Michal Domonkos <mdomonko@redhat.com> - 4.17.1-1
|
||||
- Rebase to rpm 4.17.1 (http://rpm.org/wiki/Releases/4.17.1)
|
||||
|
||||
* 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
18
rpmdb-migrate.service
Normal 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
|
@ -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
40
rpmdb_migrate
Normal 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}
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (rpm-4.16.0-beta3.tar.bz2) = 20efa638a7fe85b1b4d3d42fb07172c20a1f3c62024a29e4184b67a2d52ff3f94a186f178e9a5bfee9bf6c826a1023995d970b5c0ddaffe8b61fd2c888b44032
|
||||
SHA512 (rpm-4.17.1.tar.bz2) = d0429510140f25a25b6c9441abe2027d27c485bbd4969752f69e1c843435c9508b9f85e5bb68085dd64b7da533801aa5c04d8c9d962e08d2ddd3199d0265cc85
|
||||
|
Loading…
Reference in New Issue
Block a user