public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/rpm] pmatilai-v6: Drop rpmdb migration scripts
@ 2026-11-23 9:35 Michal Domonkos
0 siblings, 0 replies; only message in thread
From: Michal Domonkos @ 2026-11-23 9:35 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/rpm
Branch : pmatilai-v6
Commit : f1d6b6fa7bda608f35a268182a1a466c36b150ed
Author : Michal Domonkos <mdomonko@redhat.com>
Date : 2024-12-11T14:31:56+01:00
Stats : +2/-85 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/rpm/c/f1d6b6fa7bda608f35a268182a1a466c36b150ed?branch=pmatilai-v6
Log:
Drop rpmdb migration scripts
This logic was added for the F35 -> F36 rpmdb migration [1] so we should
now be safely past that window. System upgrades skipping more than two
releases aren't really supported, anyway.
Note that this means we'll no longer install the compat symlink from
/var/lib/rpm to /usr/lib/sysimage/rpm but that should be fine.
[1] https://fedoraproject.org/wiki/Changes/RelocateRPMToUsr
Fixes: #2274332
---
diff --git a/rpm.spec b/rpm.spec
index 8748684..9857821 100644
--- a/rpm.spec
+++ b/rpm.spec
@@ -28,7 +28,7 @@
%global rpmver 4.20.0
#global snapver rc1
-%global baserelease 1
+%global baserelease 2
%global sover 10
%global srcver %{rpmver}%{?snapver:-%{snapver}}
@@ -44,9 +44,6 @@ Source0: http://ftp.rpm.org/releases/%{srcdir}/rpm-%{srcver}.tar.bz2
Source10: rpmdb-rebuild.service
-Source20: rpmdb-migrate.service
-Source21: rpmdb_migrate
-
Requires: coreutils
Requires: popt%{_isa} >= 1.10.2.1
Requires: curl
@@ -119,11 +116,6 @@ BuildRequires: ima-evm-utils-devel >= 1.0
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
@@ -397,10 +389,8 @@ cd ..
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}
# Built-in replacement for systemd-sysusers(8)
install -m 755 scripts/sysusers.sh $RPM_BUILD_ROOT/%{rpmhome}
@@ -446,21 +436,6 @@ if [ -d /var/lib/rpm ]; then
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-migrate ||:
-fi
-
-%posttrans
-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 _build/rpm.lang
%license COPYING
%doc CREDITS docs/manual/[a-z]*
@@ -470,7 +445,6 @@ fi
%doc %{_defaultdocdir}/rpm/README
%{_unitdir}/rpmdb-rebuild.service
-%{_unitdir}/rpmdb-migrate.service
%dir %{_sysconfdir}/rpm
@@ -648,6 +622,7 @@ fi
* Tue Dec 10 2024 Michal Domonkos <mdomonko@redhat.com> - 4.20.0-2
- Drop build option for legacy OpenPGP parser (#2239780)
- Fix Python examples directory ownership (#2279750)
+- Drop rpmdb migration scripts (#2274332)
* Mon Oct 07 2024 Michal Domonkos <mdomonko@redhat.com> - 4.20.0-1
- Rebase to 4.20.0
diff --git a/rpmdb-migrate.service b/rpmdb-migrate.service
deleted file mode 100644
index 54a934d..0000000
--- a/rpmdb-migrate.service
+++ /dev/null
@@ -1,18 +0,0 @@
-[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
diff --git a/rpmdb_migrate b/rpmdb_migrate
deleted file mode 100644
index 196744d..0000000
--- a/rpmdb_migrate
+++ /dev/null
@@ -1,40 +0,0 @@
-#!/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}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-23 9:35 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23 9:35 [rpms/rpm] pmatilai-v6: Drop rpmdb migration scripts Michal Domonkos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox