public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/setup] update_services: use lua instead of default /bin/sh post script to prevent external
@ 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 : 8165353207fd0836e48f021629f20fc62f1bb02a
        Author : Ondrej Vasik <ovasik@fedoraproject.org>
        Date   : 2009-01-07T11:43:41+00:00
        Stats  : +11/-9 in 1 file(s)
        URL    : https://src.fedoraproject.org/rpms/setup/c/8165353207fd0836e48f021629f20fc62f1bb02a?branch=update_services

        Log:
        use lua instead of default /bin/sh post script to prevent external
dependencies(#477769)

---
diff --git a/setup.spec b/setup.spec
index af377da..56ea714 100644
--- a/setup.spec
+++ b/setup.spec
@@ -1,7 +1,7 @@
 Summary: A set of system configuration and setup files
 Name: setup
 Version: 2.7.5
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: Public Domain
 Group: System Environment/Base
 URL: https://fedorahosted.org/setup/
@@ -10,7 +10,6 @@ Patch1: setup-2.7.5.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch: noarch
 BuildRequires: bash tcsh perl
-Requires(post): grep
 
 Conflicts: initscripts < 4.26, bash <= 2.0.4-21
 
@@ -52,13 +51,12 @@ rm -f %{buildroot}/etc/setup.spec
 %clean
 rm -rf %{buildroot}
 
-%post
-if [ `grep -c video /etc/group` -eq 0 ] ; then
-  groupadd -g 39 video
-fi
-if [ `grep -c audio /etc/group` -eq 0 ] ; then
-  groupadd -g 63 audio
-fi
+#remove post script after F10 EOL (and for RHEL-6)
+%post -p <lua>
+if arg[2] > 1 and posix.access("/usr/sbin/groupadd", "x") then
+   os.execute("/usr/sbin/groupadd -g 39 video &>/dev/null")
+   os.execute("/usr/sbin/groupadd -g 63 audio &>/dev/null")
+end
 
 %files
 %defattr(-,root,root)
@@ -91,6 +89,10 @@ fi
 %ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/mtab
 
 %changelog
+* Tue Jan 06 2009 Ondrej Vasik <ovasik@redhat.com> 2.7.5-4
+- use lua language in post to prevent additional
+  dependencies
+
 * Thu Dec 18 2008 Ondrej Vasik <ovasik@redhat.com> 2.7.5-3
 - add pkiuser (17:17) to uidgid
 - temporarily create video/audio group in post section

^ 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: use lua instead of default /bin/sh post script to prevent external Ondrej Vasik

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