public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/setup] update_services: rewrite postun scriptlet to <lua> to prevent /bin/sh postun dependency
@ 2026-06-22 15:55 Ondrej Vasik
  0 siblings, 0 replies; only message in thread
From: Ondrej Vasik @ 2026-06-22 15:55 UTC (permalink / raw)
  To: git-commits

A new commit has been pushed.

Repo   : rpms/setup
Branch : update_services
Commit : 3ad6f40b459dec3214a06faa91c32800c386ed4e
Author : Ondrej Vasik <ovasik@fedoraproject.org>
Date   : 2009-04-22T13:25:41+00:00
Stats  : +13/-6 in 1 file(s)
URL    : https://src.fedoraproject.org/rpms/setup/c/3ad6f40b459dec3214a06faa91c32800c386ed4e?branch=update_services

Log:
rewrite postun scriptlet to <lua> to prevent /bin/sh postun dependency

---
diff --git a/setup.spec b/setup.spec
index 6e0d635..d2540e3 100644
--- a/setup.spec
+++ b/setup.spec
@@ -1,7 +1,7 @@
 Summary: A set of system configuration and setup files
 Name: setup
 Version: 2.8.3
-Release: 1%{?dist}
+Release: 2%{?dist}
 License: Public Domain
 Group: System Environment/Base
 URL: https://fedorahosted.org/setup/
@@ -50,13 +50,16 @@ rm -f %{buildroot}/etc/setup.spec
 %clean
 rm -rf %{buildroot}
 
-%postun
+
 #throw away useless and dangerous update stuff until rpm will be able to
 #handle it ( http://rpm.org/ticket/6 )
-rm -f /etc/passwd.rpmnew
-rm -f /etc/shadow.rpmnew
-rm -f /etc/group.rpmnew
-rm -f /etc/gshadow.rpmnew
+%postun -p <lua>
+if arg[2] > 1 and posix.access("/bin/rm", "x") then
+   os.execute("rm -f /etc/passwd.rpmnew")
+   os.execute("rm -f /etc/shadow.rpmnew")
+   os.execute("rm -f /etc/group.rpmnew")
+   os.execute("rm -f /etc/gshadow.rpmnew")
+end
 
 %files
 %defattr(-,root,root)
@@ -90,6 +93,10 @@ rm -f /etc/gshadow.rpmnew
 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab
 
 %changelog
+* Wed Apr 22 2009 Ondrej Vasik <ovasik@redhat.com> 2.8.3-2
+- rewrite postun scriptlet to <lua> to prevent /bin/sh
+  dependency
+
 * Fri Apr 10 2009 Ondrej Vasik <ovasik@redhat.com> 2.8.3-1
 - do not disable coredumps in profile/csh.cshrc scripts,
   coredumps already disabled in rawhide's RLIMIT_CORE(#495035)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-06-22 15:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-22 15:55 [rpms/setup] update_services: rewrite postun scriptlet to <lua> to prevent /bin/sh postun dependency Ondrej Vasik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox