[bsd-games/f15] Fix Requires(pre) syntax for group creation. (BZ #744571) Create groups as specified in packaging gu

Jeff Makey jmakey at fedoraproject.org
Thu Jan 26 17:08:46 UTC 2012


commit 9525c9a7554139acfc6cf2f1dd63a0171e77c174
Author: Jeff Makey <jeff at makey.net>
Date:   Thu Jan 26 09:07:17 2012 -0800

    Fix Requires(pre) syntax for group creation. (BZ #744571)
    Create groups as specified in packaging guidelines.

 bsd-games.spec |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/bsd-games.spec b/bsd-games.spec
index 51af13e..7093f43 100644
--- a/bsd-games.spec
+++ b/bsd-games.spec
@@ -36,7 +36,7 @@ Patch15: bsd-games-2.17-wtfupdate.patch
 Patch16: bsd-games-2.17-backgammonsize.patch
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: ncurses-devel words flex flex-static bison
-Requires(Pre): /usr/sbin/groupadd
+Requires(pre): shadow-utils
 
 %description
 Bsd-games includes adventure, arithmetic, atc, backgammon, battlestar,
@@ -119,9 +119,10 @@ install -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_datadir}/misc/
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-%{_sbindir}/groupadd -r gamehack &>/dev/null || :
-%{_sbindir}/groupadd -r gamesail &>/dev/null || :
-%{_sbindir}/groupadd -r gamephant &>/dev/null || :
+for group in gamehack gamesail gamephant; do
+    getent group $group >/dev/null || groupadd -r $group
+done
+exit 0
 
 %files
 %defattr(-,root,root)
@@ -191,6 +192,8 @@ rm -rf $RPM_BUILD_ROOT
 %changelog
 * Thu Jan 26 2012 Jeff Makey <jeff at makey.net> - 2.17-33
 - Update acronym databases, fix URLs to them. (BZ #529921)
+- Fix Requires(pre) syntax for group creation. (BZ #744571)
+- Create groups as specified in packaging guidelines.
 
 * Mon Feb 07 2011 Fedora Release Engineering <rel-eng at lists.fedoraproject.org>
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild


More information about the scm-commits mailing list