From owner-svn-ports-all@FreeBSD.ORG Sat May 9 02:10:11 2015 Return-Path: Delivered-To: svn-ports-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0562A557; Sat, 9 May 2015 02:10:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E729C1F19; Sat, 9 May 2015 02:10:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t492AAgm056679; Sat, 9 May 2015 02:10:10 GMT (envelope-from amdmi3@FreeBSD.org) Received: (from amdmi3@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t492AAi0056676; Sat, 9 May 2015 02:10:10 GMT (envelope-from amdmi3@FreeBSD.org) Message-Id: <201505090210.t492AAi0056676@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: amdmi3 set sender to amdmi3@FreeBSD.org using -f From: Dmitry Marakasov Date: Sat, 9 May 2015 02:10:10 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r385855 - in head/shells/shell-include: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 May 2015 02:10:11 -0000 Author: amdmi3 Date: Sat May 9 02:10:09 2015 New Revision: 385855 URL: https://svnweb.freebsd.org/changeset/ports/385855 Log: - Fix stagedir referenced from installed files: Error: 'bin/bash-include' is referring to /wrkdirs/usr/ports/shells/shell-include/work/stage Error: 'bin/sh-include' is referring to /wrkdirs/usr/ports/shells/shell-include/work/stage - Don't use random and don't use /tmp for temporary files. It's unsafe, and netstat spews warnings from the jail: netstat: kvm not available: /dev/mem: No such file or directory - Depend on perl as pod2man is used during build - Fix path to pod2man PR: 199645 Submitted by: amdmi3 Approved by: maintainer timeout Added: head/shells/shell-include/files/ head/shells/shell-include/files/patch-install (contents, props changed) Modified: head/shells/shell-include/Makefile Modified: head/shells/shell-include/Makefile ============================================================================== --- head/shells/shell-include/Makefile Sat May 9 02:06:43 2015 (r385854) +++ head/shells/shell-include/Makefile Sat May 9 02:10:09 2015 (r385855) @@ -3,6 +3,7 @@ PORTNAME= shell-include PORTVERSION= 0.1.2 +PORTREVISION= 1 CATEGORIES= shells devel MASTER_SITES= http://vvelox.net/src/shell-include/ @@ -11,12 +12,16 @@ COMMENT= Include system for shell script USES= perl5 -WRKSRC= ${WRKDIR}/${DISTNAME} - -USES= tar:tgz +USES= perl5 tar:tgz +USE_PERL5= build NO_BUILD= yes +post-patch: + @${REINPLACE_CMD} -e 's|/usr/local/bin/pod2man|${LOCALBASE}/bin/pod2man|' \ + ${WRKSRC}/install + do-install: - cd ${WRKSRC}/ ; ${SH} ${WRKSRC}/install ${STAGEDIR}${PREFIX} + cd ${WRKSRC}/ ; ${SETENV} DESTDIR=${STAGEDIR} \ + ${SH} ${WRKSRC}/install ${PREFIX} .include Added: head/shells/shell-include/files/patch-install ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/shells/shell-include/files/patch-install Sat May 9 02:10:09 2015 (r385855) @@ -0,0 +1,105 @@ +--- install.orig 2009-11-08 21:53:11 UTC ++++ install +@@ -36,12 +36,12 @@ manInstall(){ + #$3 = VERSION + + #makes the man dir if it does not exist +- if /bin/[ ! -d "$1/man" ]; then +- /bin/mkdir "$1/man" +- /bin/chmod 755 "$1/man" ++ if /bin/[ ! -d "${DESTDIR}$1/man" ]; then ++ /bin/mkdir "${DESTDIR}$1/man" ++ /bin/chmod 755 "${DESTDIR}$1/man" + fi + +- manInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom` ++ manInstallTMPfile=_tmpfile + /usr/bin/touch $manInstallTMPfile + /bin/chmod go-rwx $manInstallTMPfile + +@@ -72,9 +72,9 @@ manInstall(){ + + + #makes the man section dir if it does not exist +- if /bin/[ ! -d $1/man/man$manInstallMANsection ]; then +- /bin/mkdir "$1/man/man$manInstallMANsection" +- /bin/chmod 755 "$1/man/man$manInstallMANsection" ++ if /bin/[ ! -d ${DESTDIR}$1/man/man$manInstallMANsection ]; then ++ /bin/mkdir "${DESTDIR}$1/man/man$manInstallMANsection" ++ /bin/chmod 755 "${DESTDIR}$1/man/man$manInstallMANsection" + fi + + #echo $line +@@ -82,7 +82,7 @@ manInstall(){ + #echo $MANsection + #echo $MANcenter + +- manInstallMANfile=`echo $1/man/man$manInstallMANsection/$manInstallMANname.$manInstallMANsection.gz | sed 's/\/\//\//g'` ++ manInstallMANfile=`echo ${DESTDIR}$1/man/man$manInstallMANsection/$manInstallMANname.$manInstallMANsection.gz | sed 's/\/\//\//g'` + + /usr/local/bin/pod2man --section="$manInstallMANsection" --release="$3" --name="$manInstallMANname" --center="$manInstallMANcenter" "$manInstallLine" | /usr/bin/gzip > "$manInstallMANfile" + +@@ -97,17 +97,17 @@ manInstall(){ + binInstall(){ + #$1 = prefix + +- if /bin/[ ! -d "$1/bin" ]; then +- /bin/mkdir "$1/bin" +- if /bin/[ ! -d $1/bin ]; then +- echo "$1/bin does not a dir or does not exist and could not be created" ++ if /bin/[ ! -d "${DESTDIR}$1/bin" ]; then ++ /bin/mkdir "${DESTDIR}$1/bin" ++ if /bin/[ ! -d ${DESTDIR}$1/bin ]; then ++ echo "${DESTDIR}$1/bin does not a dir or does not exist and could not be created" + exit 1; + fi +- /bin/chmod u+rwx "$1/bin" ++ /bin/chmod u+rwx "${DESTDIR}$1/bin" + + fi + +- binInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom` ++ binInstallTMPfile=_tmpfile + /usr/bin/touch $binInstallTMPfile + /bin/chmod go-rwx $binInstallTMPfile + +@@ -119,9 +119,9 @@ binInstall(){ + while /bin/[ $binInstallCL -le $binInstallNOL ]; do + binInstallLine=`getline $binInstallTMPfile $binInstallCL` + +- /bin/cat "./bin/$binInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "$1/bin/$binInstallLine" ++ /bin/cat "./bin/$binInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "${DESTDIR}$1/bin/$binInstallLine" + +- /bin/chmod 755 "$1/bin/$binInstallLine" ++ /bin/chmod 755 "${DESTDIR}$1/bin/$binInstallLine" + + binInstallCL=`/bin/expr $binInstallCL + 1` + done +@@ -132,7 +132,7 @@ binInstall(){ + includeInstall(){ + #$1 = prefix + +- includeInstallTMPfile=/tmp/`shortRandom``shortRandom``shortRandom`$$`shortRandom` ++ includeInstallTMPfile=_tmpfile + /usr/bin/touch $includeInstallTMPfile + /bin/chmod go-rwx $includeInstallTMPfile + +@@ -145,13 +145,13 @@ includeInstall(){ + includeInstallLine=`getline $includeInstallTMPfile $includeInstallCL` + + if /bin/[ -d $includeInstallLine ]; then +- if /bin/[ ! -d "$1/$includeInstallLine" ]; then +- mkdir "$1/$includeInstallLine" +- chmod 755 "$1/$includeInstallLine" ++ if /bin/[ ! -d "${DESTDIR}$1/$includeInstallLine" ]; then ++ mkdir "${DESTDIR}$1/$includeInstallLine" ++ chmod 755 "${DESTDIR}$1/$includeInstallLine" + fi + else +- cat "$includeInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "$1/$includeInstallLine" +- /bin/chmod 644 "$1/$includeInstallLine" ++ cat "$includeInstallLine" | /usr/bin/sed "s/%%PREFIX%%/"`echo $1 | sed 's/\\//\\\\\//g'`"/g" > "${DESTDIR}$1/$includeInstallLine" ++ /bin/chmod 644 "${DESTDIR}$1/$includeInstallLine" + fi + + includeInstallCL=`/bin/expr $includeInstallCL + 1`