SPECS: bash.spec - partial /etc/shells edit with lua

glen glen at pld-linux.org
Wed Jun 25 13:19:56 CEST 2008


Author: glen                         Date: Wed Jun 25 11:19:56 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- partial /etc/shells edit with lua

---- Files affected:
SPECS:
   bash.spec (1.185 -> 1.186) 

---- Diffs:

================================================================
Index: SPECS/bash.spec
diff -u SPECS/bash.spec:1.185 SPECS/bash.spec:1.186
--- SPECS/bash.spec:1.185	Tue Jun 24 20:52:23 2008
+++ SPECS/bash.spec	Wed Jun 25 13:19:50 2008
@@ -45,7 +45,7 @@
 BuildRequires:	bison
 BuildRequires:	ncurses-devel >= 5.2
 BuildRequires:	readline-devel >= 5.2
-BuildRequires:	rpmbuild(macros) >= 1.353
+BuildRequires:	rpmbuild(macros) >= 1.429
 BuildRequires:	sed >= 4.0
 BuildRequires:	texinfo
 %if %{with static}
@@ -276,35 +276,17 @@
 	fi
 fi
 
+# XXX need this in lua
 [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
 
-%preun
-if [ "$1" = "0" ]; then
-	umask 022
-	grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new
-	mv -f /etc/shells.new /etc/shells
-fi
-
-%post static
-umask 022
-if [ ! -f /etc/shells ]; then
-	echo "/bin/bash.static" > /etc/shells
-else
-	if ! grep -q '^/bin/bash.static$' /etc/shells; then
-		echo "/bin/bash.static" >> /etc/shells
-	fi
-fi
-
-%preun static
-if [ "$1" = "0" ]; then
-	umask 022
-	grep -v /bin/bash.static /etc/shells > /etc/shells.new
-	mv -f /etc/shells.new /etc/shells
-fi
+%preun	-p %remove_etc_shells -p /bin/bash /bin/rbash
 
 %postun	-p	/sbin/postshell
 -/usr/sbin/fix-info-dir -c %{_infodir}
 
+%post static -p %add_etc_shells -p /bin/bash.static
+%preun static -p %remove_etc_shells -p /bin/bash.static
+
 %files -f %{name}.lang
 %defattr(644,root,root,755)
 %doc CHANGES NEWS README doc/{FAQ,INTRO}
@@ -342,6 +324,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.186  2008/06/25 11:19:50  glen
+- partial /etc/shells edit with lua
+
 Revision 1.185  2008/06/24 18:52:23  arekm
 - up to 3.2.39
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/bash.spec?r1=1.185&r2=1.186&f=u



More information about the pld-cvs-commit mailing list