Browse Source

Switch from editing /etc/shells to displaying just a hint about editing /etc/shells. This way we no longer touch anything outside the OpenPKG instance in a package except the bootstrap package.

master
parent
commit
f277d5191f
  1. 24
      bash/bash.spec
  2. 24
      ksh/ksh.spec
  3. 26
      pdksh/pdksh.spec
  4. 25
      tcsh/tcsh.spec
  5. 24
      zsh/zsh.spec

24
bash/bash.spec

@ -33,7 +33,7 @@ Distribution: OpenPKG [REL]
Group: Shell
License: GPL
Version: 2.05a
Release: 20020308
Release: 20020416
# list of sources
Source0: ftp://ftp.cwru.edu/pub/bash/bash-%{version}.tar.gz
@ -42,8 +42,8 @@ Source1: profile
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206
PreReq: OpenPKG, openpkg >= 20020206
BuildPreReq: OpenPKG, openpkg >= 20020416
PreReq: OpenPKG, openpkg >= 20020416
AutoReq: no
AutoReqProv: no
@ -91,17 +91,13 @@ AutoReqProv: no
rm -rf $RPM_BUILD_ROOT
%post
if [ ".$1" = .1 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/bash" </tmp/shells >/etc/shells
echo "$RPM_INSTALL_PREFIX/bin/bash" >>/etc/shells
rm -f /tmp/shells
if [ ".$1" = .1 ]; then
if [ -f /etc/shells ]; then
if [ ".`grep $RPM_INSTALL_PREFIX/bin/bash /etc/shells`" = . ]; then
( echo "Hint: If you want to use $RPM_INSTALL_PREFIX/bin/bash as the login"
echo "shell for users you have to add this path to /etc/shells, please."
) | %{l_rpmtool} msg -b -t notice
fi
fi
%postun
if [ ".$1" = .0 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/bash" </tmp/shells >/etc/shells
rm -f /tmp/shells
fi

24
ksh/ksh.spec

@ -37,7 +37,7 @@ Distribution: OpenPKG [EXP]
Group: Shell
License: AT&T
Version: %{V_pkg}
Release: 20020327
Release: 20020416
# list of sources
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{V_ksh}.tgz
@ -46,8 +46,8 @@ Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{V_init}.tgz
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206
PreReq: OpenPKG, openpkg >= 20020206
BuildPreReq: OpenPKG, openpkg >= 20020416
PreReq: OpenPKG, openpkg >= 20020416
AutoReq: no
AutoReqProv: no
@ -85,17 +85,13 @@ AutoReqProv: no
rm -rf $RPM_BUILD_ROOT
%post
if [ ".$1" = .1 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/ksh" </tmp/shells >/etc/shells
echo "$RPM_INSTALL_PREFIX/bin/ksh" >>/etc/shells
rm -f /tmp/shells
if [ ".$1" = .1 ]; then
if [ -f /etc/shells ]; then
if [ ".`grep $RPM_INSTALL_PREFIX/bin/ksh /etc/shells`" = . ]; then
( echo "Hint: If you want to use $RPM_INSTALL_PREFIX/bin/ksh as the login"
echo "shell for users you have to add this path to /etc/shells, please."
) | %{l_rpmtool} msg -b -t notice
fi
fi
%postun
if [ ".$1" = .0 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/ksh" </tmp/shells >/etc/shells
rm -f /tmp/shells
fi

26
pdksh/pdksh.spec

@ -31,9 +31,9 @@ Vendor: Eric Gisin, Charles Forsyth
Packager: The OpenPKG Project
Distribution: OpenPKG [REL]
Group: Shell
License: ?
License: unknown
Version: 5.2.14
Release: 20020206
Release: 20020416
# list of sources
Source0: ftp://ftp.cs.mun.ca/pub/pdksh/pdksh-%{version}.tar.gz
@ -41,8 +41,8 @@ Source0: ftp://ftp.cs.mun.ca/pub/pdksh/pdksh-%{version}.tar.gz
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206
PreReq: OpenPKG, openpkg >= 20020206
BuildPreReq: OpenPKG, openpkg >= 20020416
PreReq: OpenPKG, openpkg >= 20020416
AutoReq: no
AutoReqProv: no
@ -76,17 +76,13 @@ AutoReqProv: no
rm -rf $RPM_BUILD_ROOT
%post
if [ ".$1" = .1 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/pdksh" </tmp/shells >/etc/shells
echo "$RPM_INSTALL_PREFIX/bin/pdksh" >>/etc/shells
rm -f /tmp/shells
if [ ".$1" = .1 ]; then
if [ -f /etc/shells ]; then
if [ ".`grep $RPM_INSTALL_PREFIX/bin/pdksh /etc/shells`" = . ]; then
( echo "Hint: If you want to use $RPM_INSTALL_PREFIX/bin/pdksh as the login"
echo "shell for users you have to add this path to /etc/shells, please."
) | %{l_rpmtool} msg -b -t notice
fi
fi
%postun
if [ ".$1" = .0 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/pdksh" </tmp/shells >/etc/shells
rm -f /tmp/shells
fi

25
tcsh/tcsh.spec

@ -33,17 +33,16 @@ Distribution: OpenPKG [REL]
Group: Shell
License: BSD
Version: 6.11
Release: 20020206
Release: 20020416
# list of sources
Source0: ftp://ftp.astron.com/pub/tcsh/tcsh-%{version}.tar.gz
#Source0: ftp://ftp.fujitsu.co.jp/pub/misc/shells/tcsh/tcsh-%{version}.tgz
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206
PreReq: OpenPKG, openpkg >= 20020206
BuildPreReq: OpenPKG, openpkg >= 20020416
PreReq: OpenPKG, openpkg >= 20020416
AutoReq: no
AutoReqProv: no
@ -79,17 +78,13 @@ AutoReqProv: no
rm -rf $RPM_BUILD_ROOT
%post
if [ ".$1" = .1 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/tcsh" </tmp/shells >/etc/shells
echo "$RPM_INSTALL_PREFIX/bin/tcsh" >>/etc/shells
rm -f /tmp/shells
if [ ".$1" = .1 ]; then
if [ -f /etc/shells ]; then
if [ ".`grep $RPM_INSTALL_PREFIX/bin/tcsh /etc/shells`" = . ]; then
( echo "Hint: If you want to use $RPM_INSTALL_PREFIX/bin/tcsh as the login"
echo "shell for users you have to add this path to /etc/shells, please."
) | %{l_rpmtool} msg -b -t notice
fi
fi
%postun
if [ ".$1" = .0 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/tcsh" </tmp/shells >/etc/shells
rm -f /tmp/shells
fi

24
zsh/zsh.spec

@ -33,7 +33,7 @@ Distribution: OpenPKG [REL]
Group: Shell
License: BSD-style
Version: 4.0.4
Release: 20020206
Release: 20020416
# list of sources
Source0: ftp://ftp.zsh.org/pub/zsh/zsh-%{version}.tar.bz2
@ -41,8 +41,8 @@ Source0: ftp://ftp.zsh.org/pub/zsh/zsh-%{version}.tar.bz2
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20020206
PreReq: OpenPKG, openpkg >= 20020206
BuildPreReq: OpenPKG, openpkg >= 20020416
PreReq: OpenPKG, openpkg >= 20020416
AutoReq: no
AutoReqProv: no
@ -84,17 +84,13 @@ AutoReqProv: no
rm -rf $RPM_BUILD_ROOT
%post
if [ ".$1" = .1 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/zsh" </tmp/shells >/etc/shells
echo "$RPM_INSTALL_PREFIX/bin/zsh" >>/etc/shells
rm -f /tmp/shells
if [ ".$1" = .1 ]; then
if [ -f /etc/shells ]; then
if [ ".`grep $RPM_INSTALL_PREFIX/bin/zsh /etc/shells`" = . ]; then
( echo "Hint: If you want to use $RPM_INSTALL_PREFIX/bin/zsh as the login"
echo "shell for users you have to add this path to /etc/shells, please."
) | %{l_rpmtool} msg -b -t notice
fi
fi
%postun
if [ ".$1" = .0 -a -w /etc/shells ]; then
cp -p /etc/shells /tmp/shells
grep -v "$RPM_INSTALL_PREFIX/bin/zsh" </tmp/shells >/etc/shells
rm -f /tmp/shells
fi

Loading…
Cancel
Save