Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package dnf for openSUSE:Factory checked in at 2021-02-18 20:38:20 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dnf (Old) and /work/SRC/openSUSE:Factory/.dnf.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dnf" Thu Feb 18 20:38:20 2021 rev:24 rq:871994 version:4.6.0 Changes: -------- --- /work/SRC/openSUSE:Factory/dnf/dnf.changes 2021-02-07 15:18:05.081674172 +0100 +++ /work/SRC/openSUSE:Factory/.dnf.new.28504/dnf.changes 2021-02-18 20:41:42.446742353 +0100 @@ -1,0 +2,6 @@ +Sat Feb 13 17:08:15 UTC 2021 - Neal Gompa <[email protected]> + +- Migrate DNF persistent state data to /usr/lib/sysimage/dnf + + Patch: dnf-4.6.0-Use-usr-lib-sysimage-for-the-persistent-state-dir.patch + +------------------------------------------------------------------- New: ---- dnf-4.6.0-Use-usr-lib-sysimage-for-the-persistent-state-dir.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dnf.spec ++++++ --- /var/tmp/diff_new_pack.ylVOa6/_old 2021-02-18 20:41:43.094743105 +0100 +++ /var/tmp/diff_new_pack.ylVOa6/_new 2021-02-18 20:41:43.098743110 +0100 @@ -30,6 +30,8 @@ %global py3pluginpath %{python3_sitelib}/dnf-plugins +%global persistdir %{_prefix}/lib/sysimage/%{name} + # YUM v3 has been removed from openSUSE Tumbleweed as of 20191119 %if 0%{?sle_version} && 0%{?sle_version} < 160000 %bcond_with as_yum @@ -57,6 +59,14 @@ URL: https://github.com/rpm-software-management/dnf Source0: %{url}/archive/%{version}/%{name}-%{version}.tar.gz +# Backports from upstream + +# Fixes proposed upstream + +# openSUSE specific fixes +## Migrate DNF persistent state directory to /usr/lib/sysimage +Patch1001: dnf-4.6.0-Use-usr-lib-sysimage-for-the-persistent-state-dir.patch + BuildRequires: bash-completion BuildRequires: cmake BuildRequires: gettext @@ -208,7 +218,9 @@ mkdir -p %{buildroot}%{confdir}/vars mkdir -p %{buildroot}%{pluginconfpath} mkdir -p %{buildroot}%{py3pluginpath} -mkdir -p %{buildroot}%{_sharedstatedir}/dnf +mkdir -p %{buildroot}%{persistdir} +mkdir -p %{buildroot}%{_sharedstatedir} +ln -sf %{persistdir} %{buildroot}%{_sharedstatedir}/%{name} mkdir -p %{buildroot}%{_localstatedir}/log mkdir -p %{buildroot}%{_var}/cache/dnf touch %{buildroot}%{_localstatedir}/log/%{name}.log @@ -274,10 +286,11 @@ %ghost %{_localstatedir}/log/%{name}.librepo.log %ghost %{_localstatedir}/log/%{name}.rpm.log %ghost %{_localstatedir}/log/%{name}.plugin.log -%dir %{_sharedstatedir}/%{name} -%ghost %{_sharedstatedir}/%{name}/groups.json -%ghost %{_sharedstatedir}/%{name}/yumdb -%ghost %{_sharedstatedir}/%{name}/history +%dir %{persistdir} +%ghost %{persistdir}/groups.json +%ghost %{persistdir}/yumdb +%ghost %{persistdir}/history +%ghost %{_sharedstatedir}/%{name} %{_datadir}/bash-completion/completions/dnf %{_mandir}/man5/dnf.conf.5.* %{_tmpfilesdir}/dnf.conf @@ -342,6 +355,30 @@ %postun automatic %systemd_postun_with_restart %{name}-automatic.timer %{name}-automatic-notifyonly.timer %{name}-automatic-download.timer %{name}-automatic-install.timer +%pretrans -n %{name}-data -p <lua> +-- Migrate DNF state data to /usr/lib/sysimage if it is still in /var/lib +oldpersistdir = "%{_sharedstatedir}/%{name}" +newpersistdir = "%{persistdir}" +chkoldst = posix.stat(oldpersistdir) +chknewst = posix.stat(newpersistdir) +if chkoldst and chkoldst.type == "directory" then + if chknewst then + rmst = os.execute("rm -rf " .. newpersistdir) + end + status = os.execute("mv " .. oldpersistdir .. " " .. newpersistdir) + if status then + posix.symlink(oldpersistdir, newpersistdir) + end +end + +%post -n %{name}-data +# Complete migration of DNF state data to /usr/lib/sysimage +if [ ! -L "%{_sharedstatedir}/%{name}" ]; then + if [ -d "%{persistdir}" ]; then + ln -sr %{persistdir} %{_sharedstatedir}/%{name} + fi +fi + %if %{with as_yum} %pretrans -n %{yum_subpackage_name} -p <lua> -- Backup all legacy YUM package manager configuration subdirectories if they exist ++++++ dnf-4.6.0-Use-usr-lib-sysimage-for-the-persistent-state-dir.patch ++++++ >From 3f7d94b879a95c1ca53edda5e025daa2f1da5ef0 Mon Sep 17 00:00:00 2001 From: Neal Gompa <[email protected]> Date: Sat, 13 Feb 2021 12:16:10 -0500 Subject: [PATCH] Use /usr/lib/sysimage for the persistent state directory This aligns us with the location where the RPM database is stored. --- dnf/const.py.in | 2 +- doc/conf_ref.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dnf/const.py.in b/dnf/const.py.in index 4ef2613e..1535ef81 100644 --- a/dnf/const.py.in +++ b/dnf/const.py.in @@ -38,7 +38,7 @@ LOG_LIBREPO='dnf.librepo.log' LOG_MARKER='--- logging initialized ---' LOG_RPM='dnf.rpm.log' NAME='DNF' -PERSISTDIR='/var/lib/dnf' # :api +PERSISTDIR='/usr/lib/sysimage/dnf' # :api PID_FILENAME = '/var/run/dnf.pid' RUNDIR='/run' USER_RUNDIR='/run/user' diff --git a/doc/conf_ref.rst b/doc/conf_ref.rst index 9c0c3911..4196361e 100644 --- a/doc/conf_ref.rst +++ b/doc/conf_ref.rst @@ -354,7 +354,7 @@ configuration file by your distribution to override the DNF defaults. ``persistdir`` :ref:`string <string-label>` - Directory where DNF stores its persistent data between runs. Default is ``"/var/lib/dnf"``. + Directory where DNF stores its persistent data between runs. Default is ``"/usr/lib/sysimage/dnf"``. ``pluginconfpath`` :ref:`list <list-label>` -- 2.29.2
