From 50fad43210316758d990279e6f21d4449740f190 Mon Sep 17 00:00:00 2001 From: Martin Osvald Date: Tue, 9 Aug 2022 15:22:29 +0200 Subject: [PATCH] Filesystem has a dependency on /bin/sh (rhbz#1306489) Fix wrong usage of posix.exec() and replace it with rpm.execute(): https://bugzilla.redhat.com/show_bug.cgi?id=1306489#c20 --- filesystem.spec | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/filesystem.spec b/filesystem.spec index 3afcbc8..fc5df84 100644 --- a/filesystem.spec +++ b/filesystem.spec @@ -1,7 +1,7 @@ Summary: The basic directory layout for a Linux system Name: filesystem Version: 3.18 -Release: 1%{?dist} +Release: 2%{?dist} License: Public Domain URL: https://pagure.io/filesystem Source1: https://pagure.io/filesystem/raw/master/f/lang-exceptions @@ -170,20 +170,8 @@ return 0 %posttrans -p --# we need to restorecon on some dirs created in %pretrans or by other packages if posix.access ("/usr/sbin/restorecon", "x") then - local pid = posix.fork() - if pid == 0 then - posix.exec("/usr/sbin/restorecon", "/var") - posix.exec("/usr/sbin/restorecon", "/var/run") - posix.exec("/usr/sbin/restorecon", "/var/lock") - posix.exec("/usr/sbin/restorecon", "-r", "/usr/lib/debug/") - posix.exec("/usr/sbin/restorecon", "/sys") - posix.exec("/usr/sbin/restorecon", "/boot") - posix.exec("/usr/sbin/restorecon", "/dev") - posix.exec("/usr/sbin/restorecon", "/media") - posix.exec("/usr/sbin/restorecon", "/afs") - elseif pid > 0 then - posix.wait(pid) - end + rpm.execute("/usr/sbin/restorecon", "/var", "/var/run", "/var/lock", "/sys", "/boot", "/dev", "/media", "/afs") + rpm.execute("/usr/sbin/restorecon", "-r", "/usr/lib/debug") end %files content @@ -322,6 +310,9 @@ end /var/yp %changelog +* Tue Aug 09 2022 Martin Osvald - 3.18-2 +- Filesystem has a dependency on /bin/sh (rhbz#1306489) + * Tue Jul 26 2022 Martin Osvald - 3.18-1 - Filesystem has a dependency on /bin/sh (#1306489) - Add /usr/share/X11/fonts/ to default filesystem (#2107447)