Add an @shell keyword to handle adding and remove a shell path in /etc/shell
Bump port revision of all ports that were doing it wrong prior to the keyword CR: D208 Reviewed by: antoine With hat: portmgr
This commit is contained in:
parent
de32df9231
commit
2bacde9c3b
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=357511
27 changed files with 70 additions and 70 deletions
|
@ -14,6 +14,14 @@
|
|||
# @exec if ! [ -f %D/etc/somefile.conf ]; then cp %D/etc/somefile.conf.sample %D/etc/somefile.conf; fi
|
||||
# @comment end @sample somefile.conf.sample
|
||||
#
|
||||
##
|
||||
# @shell bin/shell
|
||||
# ->
|
||||
# @comment begin @shell bin/shell
|
||||
# @exec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
# @unexec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
# @comment end @shell bin/shell
|
||||
|
||||
$1 == "@sample" {
|
||||
sample_file=$2
|
||||
# Take out .sample
|
||||
|
@ -25,6 +33,17 @@ $1 == "@sample" {
|
|||
print "@comment end " $0
|
||||
next
|
||||
}
|
||||
|
||||
$1 == "@shell" {
|
||||
shell_file=$2
|
||||
print "@comment begin " $0
|
||||
print shell_file
|
||||
print "@exec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak"
|
||||
print "@unexec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak"
|
||||
print "@comment end " $0
|
||||
next
|
||||
}
|
||||
|
||||
# Print everything else as-is
|
||||
{
|
||||
print $0
|
||||
|
|
22
Keywords/shell.yaml
Normal file
22
Keywords/shell.yaml
Normal file
|
@ -0,0 +1,22 @@
|
|||
# $FreeBSD$
|
||||
#
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
#
|
||||
# @shell bin/shell
|
||||
#
|
||||
# Handle adding and remove a path to a shell binary into /etc/shells
|
||||
# it replaces the following code:
|
||||
#
|
||||
# bin/shell
|
||||
# @exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
# @unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
|
||||
actions: [file]
|
||||
post-install: |
|
||||
cp /etc/shells /etc/shells.bak
|
||||
(grep -v %D/%@ /etc/shells.bak; echo %D/%@) > /etc/shells
|
||||
rm -f /etc/shells.bak
|
||||
pre-deinstall: |
|
||||
cp /etc/shells /etc/shells.bak
|
||||
grep -v %D/%@ /etc/shells.bak > /etc/shells
|
||||
rm -f /etc/shells.bak
|
|
@ -64,7 +64,7 @@ parse_plist() {
|
|||
esac
|
||||
;;
|
||||
# Handle [file] Keywords
|
||||
@info\ *)
|
||||
@info\ *|@shell\ *)
|
||||
set -- $line
|
||||
shift
|
||||
echo "${comment}${cwd}/$@"
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# $FreeBSD$
|
||||
PORTNAME= 44bsd-csh
|
||||
PORTVERSION= 20001106
|
||||
PORTREVISION= 3
|
||||
PORTREVISION= 4
|
||||
CATEGORIES= shells
|
||||
MASTER_SITES= ${MASTER_SITE_LOCAL}
|
||||
MASTER_SITE_SUBDIR= cy
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
bin/44bsd-csh
|
||||
@shell bin/44bsd-csh
|
||||
man/man1/44bsd-csh.1.gz
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
bin/bash
|
||||
@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
bin/rbash
|
||||
@exec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
@shell bin/bash
|
||||
@shell bin/rbash
|
||||
bin/bashbug
|
||||
man/man1/bash.1.gz
|
||||
man/man1/bashbug.1.gz
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
@exec cp /etc/shells /etc/shells.bak; (grep -v %D/bin/ch /etc/shells.bak; echo %D/bin/ch) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec cp /etc/shells /etc/shells.bak; (grep -v %D/bin/ch /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
bin/ch
|
||||
@shell bin/ch
|
||||
%%DATADIR%%/docs/images/softIntegration.gif
|
||||
%%DATADIR%%/docs/README
|
||||
%%DATADIR%%/docs/index.html
|
||||
|
|
|
@ -1,3 +1 @@
|
|||
bin/esh
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells
|
||||
@shell bin/esh
|
||||
|
|
|
@ -1,15 +1,11 @@
|
|||
bin/fd
|
||||
bin/fd-cat.C
|
||||
bin/fd-cat.ja
|
||||
bin/fdsh
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
@shell bin/fdsh
|
||||
bin/fd-dict.tbl
|
||||
bin/fd-unicd.tbl
|
||||
etc/fd2rc.dist
|
||||
@unexec if cmp -s %D/etc/fd2rc %D/etc/fd2rc.sample; then rm -f %D/etc/fd2rc; fi
|
||||
etc/fd2rc.sample
|
||||
@exec [ ! -f %B/fd2rc ] && cp %B/%f %B/fd2rc
|
||||
@sample etc/fd2rc.sample
|
||||
man/ja/man1/fd.1.gz
|
||||
man/ja/man1/fdsh.1.gz
|
||||
man/man1/fd.1.gz
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
bin/fish
|
||||
@shell bin/fish
|
||||
bin/fish_indent
|
||||
bin/fish_pager
|
||||
bin/fishd
|
||||
|
@ -572,5 +572,3 @@ man/man1/mimedb.1.gz
|
|||
@dirrm %%DATADIR%%/completions
|
||||
@dirrm %%DATADIR%%
|
||||
@dirrm %%ETCDIR%%
|
||||
@exec cp /etc/shells /etc/shells.bak; (grep -v %D/bin/fish /etc/shells.bak; echo %D/bin/fish) > /etc/shells; rm -f /etc/shells.bak
|
||||
@unexec cp /etc/shells /etc/shells.bak; (grep -v %D/bin/fish /etc/shells.bak) > /etc/shells; rm -f /etc/shells.bak
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= jailkit
|
||||
PORTVERSION= 2.15
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= shells
|
||||
MASTER_SITES= http://olivier.sessink.nl/jailkit/ \
|
||||
http://www.sfr-fresh.com/unix/privat/
|
||||
|
|
|
@ -20,7 +20,7 @@ man/man8/jk_socketd.8.gz
|
|||
man/man8/jk_uchroot.8.gz
|
||||
man/man8/jk_update.8.gz
|
||||
sbin/jk_chrootlaunch
|
||||
sbin/jk_chrootsh
|
||||
@shell sbin/jk_chrootsh
|
||||
sbin/jk_cp
|
||||
sbin/jk_init
|
||||
sbin/jk_check
|
||||
|
@ -30,8 +30,6 @@ sbin/jk_list
|
|||
sbin/jk_update
|
||||
sbin/jk_lsh
|
||||
sbin/jk_socketd
|
||||
@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v jk_chrootsh /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v jk_chrootsh /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
%%DATADIR%%/jk_lib.py
|
||||
%%DATADIR%%/jk_lib.pyc
|
||||
@dirrm %%DATADIR%%
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
bin/ksh93
|
||||
@unexec echo "Updating /etc/shells"; sed -i "" "\|%D/%F|d" /etc/shells
|
||||
@exec echo "Updating /etc/shells"; sed -i "" "\|%D/%F|d" /etc/shells; echo %D/%F >> /etc/shells
|
||||
@shell bin/ksh93
|
||||
man/man1/ksh93.1.gz
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dirs
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/popd
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
bin/lshell
|
||||
@shell bin/lshell
|
||||
man/man1/lshell.1.gz
|
||||
@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec if cmp -s %D/etc/lshell.conf %D/etc/lshell.conf.sample; then rm -f %D/etc/lshell.conf; fi
|
||||
etc/lshell.conf.sample
|
||||
@exec if [ ! -f %D/etc/lshell.conf ]; then cp %B/%f %D/etc/lshell.conf; fi
|
||||
@sample etc/lshell.conf.sample
|
||||
etc/logrotate.d/lshell
|
||||
%%PYTHON_SITELIBDIR%%/lshell.py
|
||||
%%PYTHON_SITELIBDIR%%/lshell.pyc
|
||||
|
|
|
@ -1,7 +1,4 @@
|
|||
man/man1/mksh.1.gz
|
||||
@comment Please mind the order. bin/mksh needs to come right before the exec/unexec magic.
|
||||
bin/mksh
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
@shell bin/mksh
|
||||
%%PORTEXAMPLES%%%%EXAMPLESDIR%%/dot.mkshrc
|
||||
%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= osh
|
||||
DISTVERSION= 20140410
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= shells
|
||||
MASTER_SITES= http://v6shell.org/src/
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
bin/fd2
|
||||
bin/goto
|
||||
bin/if
|
||||
bin/osh
|
||||
@shell bin/osh
|
||||
bin/sh6
|
||||
bin/glob6
|
||||
man/man1/fd2.1.gz
|
||||
|
@ -10,5 +10,3 @@ man/man1/goto.1.gz
|
|||
man/man1/if.1.gz
|
||||
man/man1/osh.1.gz
|
||||
man/man1/sh6.1.gz
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
PORTNAME= pdksh
|
||||
PORTVERSION= 5.2.14p2
|
||||
PORTREVISION= 5
|
||||
PORTREVISION= 6
|
||||
CATEGORIES= shells
|
||||
MASTER_SITES= http://gd.tuwien.ac.at/utils/shells/pdksh/ \
|
||||
ftp://ftp.lip6.fr/pub/unix/shells/pdksh/ \
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
bin/ksh
|
||||
@shell bin/ksh
|
||||
man/man1/ksh.1.gz
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= rssh
|
||||
PORTVERSION= 2.3.4
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= shells security
|
||||
MASTER_SITES= SF
|
||||
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
bin/rssh
|
||||
@shell bin/rssh
|
||||
man/man1/rssh.1.gz
|
||||
man/man5/rssh.conf.5.gz
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
etc/rssh.conf.default.dist
|
||||
libexec/rssh_chroot_helper
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
bin/sash
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells ; rm -f /etc/shells.bak
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells ; rm -f /etc/shells.bak
|
||||
@shell bin/sash
|
||||
man/man1/sash.1.gz
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
bin/scponly
|
||||
@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
@shell bin/scponly
|
||||
%%CHROOT%%@exec echo ""
|
||||
%%CHROOT%%@exec echo "To setup chroot cage, run the following commands:"
|
||||
%%CHROOT%%@exec echo " 1) cd %%PREFIX%%/%%EXAMPLESDIR%%/ && /bin/sh setup_chroot.sh"
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
PORTNAME= v7sh
|
||||
PORTVERSION= 1.0
|
||||
PORTREVISION= 1
|
||||
CATEGORIES= shells
|
||||
MASTER_SITES= ftp://minnie.tuhs.org/UnixArchive/PDP-11/Trees/V7/usr/src/cmd/sh/:s \
|
||||
http://minnie.tuhs.org/UnixTree/V7/usr/src/cmd/sh/:s \
|
||||
|
|
|
@ -1,4 +1,2 @@
|
|||
bin/v7sh
|
||||
@shell bin/v7sh
|
||||
man/man1/v7sh.1.gz
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
bin/vshnu
|
||||
@exec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells
|
||||
@unexec echo "updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells
|
||||
@shell bin/vshnu
|
||||
%%SITE_PERL%%/vshnucfg.pl
|
||||
%%SITE_PERL%%/%%PERL_ARCH%%/auto/vshnu/.packlist
|
||||
@dirrm %%SITE_PERL%%/%%PERL_ARCH%%/auto/vshnu
|
||||
|
|
|
@ -1,9 +1,5 @@
|
|||
bin/zsh
|
||||
@exec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec echo "Updating /etc/shells"; cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
bin/rzsh
|
||||
@exec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak; echo %D/%F) >/etc/shells; rm -f /etc/shells.bak
|
||||
@unexec cp /etc/shells /etc/shells.bak; (grep -v %D/%F /etc/shells.bak) >/etc/shells; rm -f /etc/shells.bak
|
||||
@shell bin/zsh
|
||||
@shell bin/rzsh
|
||||
bin/zsh-%%ZSH_VER%%
|
||||
%%NO_STATIC%%lib/zsh/%%ZSH_VER%%/zsh/cap.so
|
||||
%%NO_STATIC%%lib/zsh/%%ZSH_VER%%/zsh/clone.so
|
||||
|
|
Loading…
Reference in a new issue