rpms/bash/F-10 bash.spec,1.164,1.165
Jesse Keating
jkeating at fedoraproject.org
Thu Jan 29 07:29:00 UTC 2009
- Previous message: rpms/bash/devel bash.spec,1.170,1.171
- Next message: rpms/perl-Fedora-Bugzilla/devel import.log, NONE, 1.1 perl-Fedora-Bugzilla.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jkeating
Update of /cvs/pkgs/rpms/bash/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv25489
Modified Files:
bash.spec
Log Message:
* Wed Jan 28 2009 Jesse Keating <jkeating at redhat.com> - 3.2-31
- Replace post code with lua to be able to not have external deps
Index: bash.spec
===================================================================
RCS file: /cvs/pkgs/rpms/bash/F-10/bash.spec,v
retrieving revision 1.164
retrieving revision 1.165
diff -u -r1.164 -r1.165
--- bash.spec 15 Dec 2008 10:58:33 -0000 1.164
+++ bash.spec 29 Jan 2009 07:28:29 -0000 1.165
@@ -1,7 +1,7 @@
Version: 3.2
Name: bash
Summary: The GNU Bourne Again shell (bash) version %{version}
-Release: 30%{?dist}
+Release: 31%{?dist}
Group: System Environment/Shells
License: GPLv2+
Url: http://www.gnu.org/software/bash
@@ -258,29 +258,42 @@
# ***** bash doesn't use install-info. It's always listed in %{_infodir}/dir
# to prevent prereq loops
-%post
-
-HASBASH=""
-HASSH=""
-
-if [ ! -f /etc/shells ]; then
- > /etc/shells
-fi
-
-(while read line ; do
- if [ "$line" = "/bin/bash" ]; then
- HASBASH=1
- elif [ "$line" = "/bin/sh" ]; then
- HASSH=1
- fi
- done
-
- if [ -z "$HASBASH" ]; then
- echo "/bin/bash" >> /etc/shells
- fi
- if [ -z "$HASSH" ]; then
- echo "/bin/sh" >> /etc/shells
-fi) < /etc/shells
+# post is in lua so that we can run it without any external deps. Helps
+# for bootstrapping a new install.
+# Jesse Keating 2009-01-29 (code from Ignacio Vazquez-Abrams)
+%post -p <lua>
+bashfound = false;
+shfound = false;
+
+f = io.open("/etc/shells", "r");
+if f == nil
+then
+ f = io.open("/etc/shells", "w");
+else
+ repeat
+ t = f:read();
+ if t == "/bin/bash"
+ then
+ bashfound = true;
+ end
+ if t == "/bin/sh"
+ then
+ shfound = true;
+ end
+ until t == nil;
+end
+f:close()
+
+f = io.open("/etc/shells", "a");
+if not bashfound
+then
+ f:write("/bin/bash\n")
+end
+if not shfound
+then
+ f:write("/bin/sh\n")
+end
+f:close()
%postun
if [ "$1" = 0 ]; then
@@ -306,6 +319,9 @@
%doc doc/*.ps doc/*.0 doc/*.html doc/article.txt
%changelog
+* Wed Jan 28 2009 Jesse Keating <jkeating at redhat.com> - 3.2-31
+- Replace post code with lua to be able to not have external deps
+
* Mon Dec 15 2008 Roman Rakus <rrakus at redhat.com> - 3.2-30
- Enabling auditing
Resolves: #476216
- Previous message: rpms/bash/devel bash.spec,1.170,1.171
- Next message: rpms/perl-Fedora-Bugzilla/devel import.log, NONE, 1.1 perl-Fedora-Bugzilla.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list