[csw-devel] SF.net SVN: gar:[4275] csw/mgar/pkg/bash/trunk

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Sat Apr 11 20:42:24 CEST 2009


Revision: 4275
          http://gar.svn.sourceforge.net/gar/?rev=4275&view=rev
Author:   chninkel
Date:     2009-04-11 18:42:23 +0000 (Sat, 11 Apr 2009)

Log Message:
-----------
bash: now uses build class action script provided by Solaris

Modified Paths:
--------------
    csw/mgar/pkg/bash/trunk/Makefile
    csw/mgar/pkg/bash/trunk/checksums
    csw/mgar/pkg/bash/trunk/files/CSWbash.prototype
    csw/mgar/pkg/bash/trunk/files/changelog.CSW

Added Paths:
-----------
    csw/mgar/pkg/bash/trunk/files/shells

Removed Paths:
-------------
    csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall
    csw/mgar/pkg/bash/trunk/files/CSWbash.postremove

Modified: csw/mgar/pkg/bash/trunk/Makefile
===================================================================
--- csw/mgar/pkg/bash/trunk/Makefile	2009-04-11 15:35:57 UTC (rev 4274)
+++ csw/mgar/pkg/bash/trunk/Makefile	2009-04-11 18:42:23 UTC (rev 4275)
@@ -29,6 +29,7 @@
 REQUIRED_PKGS = CSWggettextrt
 REQUIRED_PKGS += CSWiconv
 
+SPKG_CLASSES = none build
 
 ###### Upstream and opencsw files information #######
 
@@ -41,9 +42,12 @@
 MASTER_SITES += $(GNU_MIRROR)
 DISTNAME = $(GARNAME)-$(BASH_VERSION)
 DISTFILES  = $(GARNAME)-$(BASH_VERSION).tar.gz
-DISTFILES += CSWbash.prototype CSWbash.postinstall CSWbash.postremove
+DISTFILES += CSWbash.prototype
 DISTFILES += changelog.CSW
 
+# build action script to modify /etc/shells at package installation and removal time
+DISTFILES += shells
+
 PATCHFILE_PREFIX = bash$(subst .,,$(BASH_VERSION))
 PATCHDIRLEVEL = 0
 # we generate the list of patches from the PATCHLEVEL
@@ -57,6 +61,8 @@
 			fi; \
 		done )
 
+#
+# opencsw bash use /etc/bash.bashrc and /etc/bash.bash_logout files
 PATCHFILES += use_system_bashrc_and_logout.patch
 
 
@@ -79,4 +85,4 @@
 		 ginstall -D $(WORKSRC_FIRSTMOD)/$$FILE $(PKGROOT)$(docdir)/$(GARNAME)/`basename $$FILE`; \
 	done )
 	ginstall -D $(WORKDIR_FIRSTMOD)/changelog.CSW $(PKGROOT)$(docdir)/$(GARNAME)/changelog.CSW
-
+	ginstall -D $(WORKDIR_FIRSTMOD)/shells $(PKGROOT)/etc/shells

Modified: csw/mgar/pkg/bash/trunk/checksums
===================================================================
--- csw/mgar/pkg/bash/trunk/checksums	2009-04-11 15:35:57 UTC (rev 4274)
+++ csw/mgar/pkg/bash/trunk/checksums	2009-04-11 18:42:23 UTC (rev 4275)
@@ -1,6 +1,4 @@
-bcc9760316385d49ff31c2ed72f4be4a  download/CSWbash.postinstall
-589297e4f9a43d0c82632e99423db7ef  download/CSWbash.postremove
-949396065ba932e8af683eae510586e9  download/CSWbash.prototype
+f93b41b44ce6b023df65b72f00386ac5  download/CSWbash.prototype
 a90a1b5a6db4838483f05438e05e8eb9  download/bash-4.0.tar.gz
 bc7f4762443939bd7dccb42370f0d932  download/bash40-001
 c2a4a4786a83ed4ec366c6a8924369a2  download/bash40-002
@@ -19,5 +17,6 @@
 bb41963d030bc61a20e8185367b337c5  download/bash40-015
 f75455048a086528971252fd979b8755  download/bash40-016
 34b2cd57271a452f4a26b39d77ff908f  download/bash40-017
-4e4a9d374ce4291b6ba4974adc086767  download/changelog.CSW
+e3a631b0798de159e48cdb8701dad334  download/changelog.CSW
+60956e6be20f69dafbb06fcc83bab88e  download/shells
 29607316cff22f7427322d8f190cbadf  download/use_system_bashrc_and_logout.patch

Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall
===================================================================
--- csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall	2009-04-11 15:35:57 UTC (rev 4274)
+++ csw/mgar/pkg/bash/trunk/files/CSWbash.postinstall	2009-04-11 18:42:23 UTC (rev 4275)
@@ -1,42 +0,0 @@
-#!/bin/sh
-PATH=/usr/bin
-export PATH
-
-if [ -f ${BASEDIR}/etc/shells ]; then
-	echo "${BASEDIR}/etc/shells already exists."
-else
-	cat > ${BASEDIR}/etc/shells <<EOF
-/bin/bash
-/bin/csh
-/bin/jsh
-/bin/ksh
-/bin/pfcsh
-/bin/pfksh
-/bin/pfsh
-/bin/sh
-/bin/tcsh
-/bin/zsh
-/sbin/jsh
-/sbin/sh
-/usr/bin/bash
-/usr/bin/csh
-/usr/bin/jsh
-/usr/bin/ksh
-/usr/bin/pfcsh
-/usr/bin/pfksh
-/usr/bin/pfsh
-/usr/bin/sh
-/usr/bin/tcsh
-/usr/bin/zsh
-EOF
-fi
-
-THE_SHELL="`echo "${BASEDIR}/opt/csw/bin/bash" | /usr/bin/sed -e 's/\/\/*/\//g'`"
-
-if /usr/bin/cat "${BASEDIR}/etc/shells" | /usr/bin/sed -e 's/\/\/*/\//g' | /usr/bin/grep "$THE_SHELL" 2>/dev/null >/dev/null; then
-	echo "${BASEDIR}/etc/shells is UNCHANGED because entry $THE_SHELL does already exists."
-else
-	echo "$THE_SHELL" >> ${BASEDIR}/etc/shells
-	echo "ADDED $THE_SHELL to ${BASEDIR}/etc/shells."
-fi
-

Deleted: csw/mgar/pkg/bash/trunk/files/CSWbash.postremove
===================================================================
--- csw/mgar/pkg/bash/trunk/files/CSWbash.postremove	2009-04-11 15:35:57 UTC (rev 4274)
+++ csw/mgar/pkg/bash/trunk/files/CSWbash.postremove	2009-04-11 18:42:23 UTC (rev 4275)
@@ -1,19 +0,0 @@
-#!/bin/sh
-PATH=/usr/bin
-export PATH
-
-# Removing bash from /etc/shells
-THE_SHELL="`echo "${BASEDIR}/opt/csw/bin/bash" | /usr/bin/sed -e 's/\/\/*/\//g'`"
-
-if /usr/bin/cat "${BASEDIR}/etc/shells" | /usr/bin/sed -e 's/\/\/*/\//g' | /usr/bin/grep "$THE_SHELL" 2>/dev/null >/dev/null; then
-	/usr/bin/perl -i -pwe '$_ = "" if /\/+opt\/+csw\/+bin\/+bash$/' ${BASEDIR}/etc/shells
-	cat <<EOF
-REMOVED $THE_SHELL from ${BASEDIR}/etc/shells."
-NOTE: Don't worry if you are just upgrading bash, the entry
-      will be RE-ADDED as soon as the upgrade is finished.
-EOF
-else
-	echo "${BASEDIR}/etc/shells is UNCHANGED because entry $THE_SHELL was already wiped."
-fi
-
-exit 0

Modified: csw/mgar/pkg/bash/trunk/files/CSWbash.prototype
===================================================================
--- csw/mgar/pkg/bash/trunk/files/CSWbash.prototype	2009-04-11 15:35:57 UTC (rev 4274)
+++ csw/mgar/pkg/bash/trunk/files/CSWbash.prototype	2009-04-11 18:42:23 UTC (rev 4275)
@@ -1,3 +1,4 @@
+e build /etc/shells ? ? ?
 f none /opt/csw/bin/bash 0755 root bin
 f none /opt/csw/bin/bashbug 0555 root bin
 d none /opt/csw/share/doc/bash 0755 root bin

Modified: csw/mgar/pkg/bash/trunk/files/changelog.CSW
===================================================================
--- csw/mgar/pkg/bash/trunk/files/changelog.CSW	2009-04-11 15:35:57 UTC (rev 4274)
+++ csw/mgar/pkg/bash/trunk/files/changelog.CSW	2009-04-11 18:42:23 UTC (rev 4275)
@@ -2,6 +2,7 @@
 
   * Added bash patches bash40-011 to bash40-017.
   * Added patch level in package version.
+  * Now uses build class action scripts to modify /etc/shells.
 
  -- Yann Rouillard <yann at opencsw.org>  Fri, 11 Apr 2009 12:06:33 +0200
 

Added: csw/mgar/pkg/bash/trunk/files/shells
===================================================================
--- csw/mgar/pkg/bash/trunk/files/shells	                        (rev 0)
+++ csw/mgar/pkg/bash/trunk/files/shells	2009-04-11 18:42:23 UTC (rev 4275)
@@ -0,0 +1,40 @@
+if [ install = "$1" ]; then 
+	if [ -f "$PKG_INSTALL_ROOT/etc/shells" ]; then 
+		cat "$PKG_INSTALL_ROOT/etc/shells"
+	else
+		cat <<-__EOT__
+# default entries
+/usr/bin/sh
+/usr/bin/csh
+/usr/bin/ksh
+/usr/bin/jsh
+/bin/sh
+/bin/csh
+/bin/ksh
+/bin/jsh
+/sbin/sh
+/sbin/jsh
+/usr/bin/pfsh
+/usr/bin/pfcsh
+/usr/bin/pfksh
+/usr/bin/bash
+/usr/bin/tcsh
+/usr/bin/zsh
+/bin/pfsh
+/bin/pfcsh
+/bin/pfksh
+/bin/bash
+/bin/tcsh
+/bin/zsh
+/usr/xpg4/bin/sh
+
+# added entries
+__EOT__
+	fi &&
+	cat <<-__EOT__
+/opt/csw/bin/bash    # added by $PKGINST
+__EOT__
+
+elif [ remove = "$1" ] && [ -f "$PKG_INSTALL_ROOT/etc/shells" ]; then 
+	egrep -v "^/opt/csw/bin/bash(#| |  |\$)" <$PKG_INSTALL_ROOT/etc/shells || echo "#"
+fi


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list