From 6c5649c0b67e7349a88ecb2ac111abf5bcf37151 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Thu, 17 Feb 2022 13:58:21 +0100 Subject: [PATCH] Simplify creation of /etc/mtab symlink It was created unconditionally in %post, so the original contents (if any) were overwritten. Listing is as %config was just misleading. Let's simply list the symlink as normal contents in the rpm, so that rpm can install the symlink for us. (The scriplet was missing a dependency on coreutils for ln, but let's not add that if we can drop the whole thing.) [kzak@redhat.com: - add %changelog entry] --- util-linux.spec | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/util-linux.spec b/util-linux.spec index 2dc911e..47621d5 100644 --- a/util-linux.spec +++ b/util-linux.spec @@ -2,7 +2,7 @@ Summary: Collection of basic system utilities Name: util-linux Version: 2.38 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv2 and GPLv2+ and LGPLv2+ and BSD with advertising and Public Domain URL: https://en.wikipedia.org/wiki/Util-linux @@ -429,11 +429,6 @@ find $RPM_BUILD_ROOT%{_mandir}/man8 -regextype posix-egrep \ -printf "%{_mandir}/man8/%f*\n" >> %{name}.files -%post -n util-linux-core -if [ ! -L /etc/mtab ]; then - ln -sf ../proc/self/mounts /etc/mtab || : -fi - %pre -n uuidd getent group uuidd >/dev/null || groupadd -r uuidd getent passwd uuidd >/dev/null || \ @@ -736,7 +731,6 @@ fi %files -n util-linux-core -%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab %attr(4755,root,root) %{_bindir}/mount %attr(4755,root,root) %{_bindir}/umount %{_bindir}/chrt @@ -822,6 +816,7 @@ fi %{_sbindir}/swapoff %{_sbindir}/swapon %{_sbindir}/switch_root +/etc/mtab %files -n util-linux-user @@ -914,6 +909,9 @@ fi %{_libdir}/python*/site-packages/libmount/ %changelog +* Wed Mar 30 2022 Zbigniew Jędrzejewski-Szmek - 2.38-2 +- simplify creation of /etc/mtab symlink + * Wed Mar 30 2022 Karel Zak - 2.38-1 - upgrade to v2.38 - don't (re)generate build-system