public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Ondrej Vasik <ovasik@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/setup] update_services: rewrite postun scriptlet to <lua> to prevent /bin/sh postun dependency
Date: Mon, 22 Jun 2026 15:55:07 GMT	[thread overview]
Message-ID: <178214370729.1.9406193131383099776.rpms-setup-3ad6f40b459d@fedoraproject.org> (raw)

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)

                 reply	other threads:[~2026-06-22 15:55 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178214370729.1.9406193131383099776.rpms-setup-3ad6f40b459d@fedoraproject.org \
    --to=ovasik@fedoraproject.org \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox