aboutsummaryrefslogtreecommitdiff
path: root/shells
diff options
context:
space:
mode:
authorSergei Kolobov <sergei@FreeBSD.org>2005-09-06 12:53:34 +0000
committerSergei Kolobov <sergei@FreeBSD.org>2005-09-06 12:53:34 +0000
commit4af6572b3cd98c26834db1f0a83e346a639f790f (patch)
treea1039362df65d36e4022511471f2918c39fc48fb /shells
parentbd0b45663171b0093972ffdc8fe9891011326884 (diff)
downloadports-4af6572b3cd98c26834db1f0a83e346a639f790f.tar.gz
ports-4af6572b3cd98c26834db1f0a83e346a639f790f.zip
- Stop adding rzsh (restricted zsh) to /etc/shells [1]:
rzsh(1) is the restricted version of zsh(1), with various things disabled so as to provide a strictly limited access to the system. A user with a shell in /etc/shells can use chsh(1) to change their shell, can use FTP, can use other file-transfer services, etc. Thus, adding rzsh to /etc/shells could be a security risk in certain configurations. - zsh-mime-setup is set up to look for /etc/{mime.types,mailcap}. Neither of them should exist on a stock FreeBSD system. Teach it to look in ${LOCALBASE}/etc instead. [2] - Zsh completion doesn't know about bsdtar(1) achievements: it won't complete to foo.tar.gz if you just enter 'tar xf foo^D'. Teach zsh completion about this and other formats supported by bsdtar(1). NOTE: This is only applicable to FreeBSD 5.3-RELEASE or newer, where bsdtar(1) replaced GNU tar(1) in the base system. - Bump PORTREVISION PR: ports/82066 [2], ports/83023 [3] Submitted by: Phil Pennock <pdp@nl.demon.net> [1] Ulrich Spoerlein <q@galgenberg.net> [2] [3]
Notes
Notes: svn path=/head/; revision=142091
Diffstat (limited to 'shells')
-rw-r--r--shells/zsh/Makefile24
-rw-r--r--shells/zsh/files/extra-patch-bsdtar18
2 files changed, 36 insertions, 6 deletions
diff --git a/shells/zsh/Makefile b/shells/zsh/Makefile
index 6baff43a57f0..426263888e87 100644
--- a/shells/zsh/Makefile
+++ b/shells/zsh/Makefile
@@ -26,6 +26,7 @@
PORTNAME= zsh
PORTVERSION= 4.2.5
+PORTREVISION= 1
CATEGORIES= shells
MASTER_SITES= \
http://archive.progeny.com/zsh/ \
@@ -103,8 +104,21 @@ DOCS= LICENCE META-FAQ README Etc/BUGS Etc/CONTRIBUTORS Etc/FAQ \
Doc/zsh*.html Doc/zsh.dvi Doc/zsh_a4.ps Doc/zsh_us.ps
EXAMPLES= zlogin zshenv zshrc
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 503000
+EXTRA_PATCHES= ${FILESDIR}/extra-patch-bsdtar
+.endif
+
post-patch:
- ${REINPLACE_CMD} -e 's/link=dynamic/link=either/' ${WRKSRC}/Src/Modules/*.mdd
+ ${REINPLACE_CMD} -e "s,link=dynamic,link=either," \
+ ${WRKSRC}/Src/Modules/*.mdd
+ ${REINPLACE_CMD} -e "s,/etc/,${LOCALBASE}/etc/," \
+ ${WRKSRC}/Functions/MIME/zsh-mime-setup
+ ${RM} -f ${WRKSRC}/Functions/MIME/zsh-mime-setup.bak
+.if ${OSVERSION} >= 503000
+ ${RM} -f ${WRKSRC}/Completion/Unix/Type/_tar_archive.orig
+.endif
post-build:
# Fix ".so" macro problem by using "soelim" command.
@@ -135,10 +149,8 @@ post-install:
.endif
@${ECHO_MSG} "Updating /etc/shells"
@${CP} /etc/shells /etc/shells.bak
- @(${GREP} -v ${PREFIX}/bin/zsh /etc/shells.bak \
- | ${GREP} -v ${PREFIX}/bin/rzsh; \
- ${ECHO_CMD} ${PREFIX}/bin/zsh; \
- ${ECHO_CMD} ${PREFIX}/bin/rzsh) > /etc/shells
+ @(${GREP} -v ${PREFIX}/bin/zsh /etc/shells.bak; \
+ ${ECHO_CMD} ${PREFIX}/bin/zsh) > /etc/shells
@${RM} /etc/shells.bak
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/shells/zsh/files/extra-patch-bsdtar b/shells/zsh/files/extra-patch-bsdtar
new file mode 100644
index 000000000000..d33ed3e0bab9
--- /dev/null
+++ b/shells/zsh/files/extra-patch-bsdtar
@@ -0,0 +1,18 @@
+--- Completion/Unix/Type/_tar_archive Mon Jul 4 17:16:10 2005
++++ Completion/Unix/Type/_tar_archive Tue Jul 5 20:44:52 2005
+@@ -14,13 +14,8 @@
+ _description files expl 'archive file'
+
+ if [[ "$1" = *[urtx]* ]]; then
+- if [[ "$1" = *[zZ]* ]]; then
+- _files "$expl[@]" -g '*.((tar|TAR).(gz|GZ|Z)|tgz)(-.)'
+- elif [[ "$1" = *[Ijy]* ]]; then
+- _files "$expl[@]" -g '*.(tar|TAR).bz2(-.)'
+- else
+- _files "$expl[@]" -g '*.(tar|TAR)(-.)'
+- fi
++# bsdtar/libarchive handle these automagically
++ _files "$expl[@]" -g '*.((tar|TAR|iso|ISO|cpio).(|(gz|GZ|Z|bz2))|tgz|tbz|jar|zip)(-.)'
+ else
+ _files "$expl[@]"
+ fi