diff options
author | itetcu <itetcu@FreeBSD.org> | 2006-07-28 17:56:54 +0800 |
---|---|---|
committer | itetcu <itetcu@FreeBSD.org> | 2006-07-28 17:56:54 +0800 |
commit | 0c1e83d0e8e914a5701579031b84bf63b7e812fa (patch) | |
tree | c443a56d3615fbd105aca530b7aa0ed27e1e2702 /security | |
parent | 0913808ed6109d175037cd00859cb0712f06ceb2 (diff) | |
download | freebsd-ports-gnome-0c1e83d0e8e914a5701579031b84bf63b7e812fa.tar.gz freebsd-ports-gnome-0c1e83d0e8e914a5701579031b84bf63b7e812fa.tar.zst freebsd-ports-gnome-0c1e83d0e8e914a5701579031b84bf63b7e812fa.zip |
1 - build and install lib/openvpn-down-root.so plugin (see --plugin option in
the man page) and README.openvpn-down-root
2 - match rc.d filename as printed post install in pkg-message to actual file
name on newer systems (which use openvpn rather than openvpn.sh)
Reported by: Jean-Baptiste Quenot (Bcc'd)
The maintainer wishes to thank Jean-Baptiste for his report and patience.
3 - add a pkg-req script to prevent installation of 6.1 packages on older
machines, which is a frequent source of "rc.d script doesn't work"
complaints.
Added file(s):
- files/pkg-req.in
PR: ports/100917
Submitted by: Matthias Andree (maintainer)
Diffstat (limited to 'security')
-rw-r--r-- | security/openvpn-devel/Makefile | 25 | ||||
-rw-r--r-- | security/openvpn-devel/files/pkg-message.in | 2 | ||||
-rw-r--r-- | security/openvpn-devel/files/pkg-req.in | 29 | ||||
-rw-r--r-- | security/openvpn-devel/pkg-plist | 2 | ||||
-rw-r--r-- | security/openvpn/Makefile | 25 | ||||
-rw-r--r-- | security/openvpn/files/pkg-message.in | 2 | ||||
-rw-r--r-- | security/openvpn/files/pkg-req.in | 29 | ||||
-rw-r--r-- | security/openvpn/pkg-plist | 2 | ||||
-rw-r--r-- | security/openvpn20/Makefile | 25 | ||||
-rw-r--r-- | security/openvpn20/files/pkg-message.in | 2 | ||||
-rw-r--r-- | security/openvpn20/files/pkg-req.in | 29 | ||||
-rw-r--r-- | security/openvpn20/pkg-plist | 2 |
12 files changed, 165 insertions, 9 deletions
diff --git a/security/openvpn-devel/Makefile b/security/openvpn-devel/Makefile index a275b30d2fc4..f259afc52511 100644 --- a/security/openvpn-devel/Makefile +++ b/security/openvpn-devel/Makefile @@ -13,6 +13,7 @@ PORTNAME= openvpn # WILL BE DROPPED. -- Matthias Andree, 2006-04-26 # ----------------------------------------------------- PORTVERSION= 2.0.6 +PORTREVISION= 1 CATEGORIES= security net # MASTER_SITES points to hosts in distinct data centers, # so just one MASTER_SITES entry should be OK. @@ -32,11 +33,20 @@ MAN8= openvpn.8 OPTIONS= PW_SAVE "Interactive passwords may be read from a file" off USE_RC_SUBR= openvpn.sh +USE_LDCONFIG= ${PREFIX}/lib -SUB_FILES= pkg-message +SUB_FILES= pkg-message pkg-req +SUB_LIST+= OSVERSION=${OSVERSION} .include <bsd.port.pre.mk> +.if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101)) +rcsuffix= +.else +rcsuffix= .sh +.endif +SUB_LIST+= RCSFX=${rcsuffix} + # NOTE: there is no way to explicitly specify the LZO version to OpenVPN, # if LZO2 and LZO1 are installed, OpenVPN will pick LZO2. # So depend on LZO1 only if it's already there and LZO2 isn't. @@ -51,13 +61,24 @@ LIB_DEPENDS+= lzo.1:${PORTSDIR}/archivers/lzo CONFIGURE_ARGS+= --enable-password-save .endif -# self-tests here post-build: + cd ${WRKSRC}/plugin/down-root && ${MAKE} + @# self-tests here +.if !defined(WITHOUT_CHECK) cd ${WRKSRC} && ${MAKE} check +.endif + +pre-install: + PKG_PREFIX=${PREFIX} ${SH} ${PKGREQ} ${PKGNAME} INSTALL post-install: + ${MKDIR} ${PREFIX}/lib + ${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so \ + ${PREFIX}/lib .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/plugin/down-root/README \ + ${DOCSDIR}/README.openvpn-down-root .for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL NEWS \ PORTS README ${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR} diff --git a/security/openvpn-devel/files/pkg-message.in b/security/openvpn-devel/files/pkg-message.in index 7b6d0e6cbfa0..64494e4d6a85 100644 --- a/security/openvpn-devel/files/pkg-message.in +++ b/security/openvpn-devel/files/pkg-message.in @@ -1,7 +1,7 @@ ### ------------------------------------------------------------------------ ### The OpenVPN FreeBSD port, since v2.0.1, uses rcNG to start OpenVPN. ### Edit /etc/rc.conf to start OpenVPN automatically at system startup. -### See %%PREFIX%%/etc/rc.d/openvpn.sh for details. +### See %%PREFIX%%/etc/rc.d/openvpn%%RCSFX%% for details. ### ------------------------------------------------------------------------ ### To get OpenVPN 1.X to talk with the new 2.0 version, you may need to ### edit the 1.X configuration file by adding these lines: diff --git a/security/openvpn-devel/files/pkg-req.in b/security/openvpn-devel/files/pkg-req.in new file mode 100644 index 000000000000..15c8242d8724 --- /dev/null +++ b/security/openvpn-devel/files/pkg-req.in @@ -0,0 +1,29 @@ +set -e + +rcvers() { + # determine if we have "old" or "new" (rcorder integration) scheme + # for %%PREFIX%%/etc/rc.d/* files + if test $1 -ge 700007 || test $1 -lt 700000 -a $1 -ge 600101 ; then + echo 2 + else + echo 1 + fi +} + +if [ "$2" = INSTALL ] ; then + # check if the base system is new enough for us, + # which should only matter for package installs. + buildrc=$(rcvers %%OSVERSION%%) + execrc=$(rcvers $(sysctl -n kern.osreldate) ) + if test $buildrc -gt $execrc ; then + cat <<EOF + +Error: this package, $1, was compiled for a newer FreeBSD +====== version that uses different boot scripts. + Therefore, the rc.d script WILL NOT WORK. + Please update your ports tree and install security/openvpn from there. + +EOF + exit 1 + fi +fi diff --git a/security/openvpn-devel/pkg-plist b/security/openvpn-devel/pkg-plist index 44883fb1103d..e91cb935a82a 100644 --- a/security/openvpn-devel/pkg-plist +++ b/security/openvpn-devel/pkg-plist @@ -1,4 +1,5 @@ sbin/openvpn +lib/openvpn-down-root.so %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.GPL @@ -7,6 +8,7 @@ sbin/openvpn %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/PORTS %%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README.openvpn-down-root %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/README %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/build-ca %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/build-dh diff --git a/security/openvpn/Makefile b/security/openvpn/Makefile index a275b30d2fc4..f259afc52511 100644 --- a/security/openvpn/Makefile +++ b/security/openvpn/Makefile @@ -13,6 +13,7 @@ PORTNAME= openvpn # WILL BE DROPPED. -- Matthias Andree, 2006-04-26 # ----------------------------------------------------- PORTVERSION= 2.0.6 +PORTREVISION= 1 CATEGORIES= security net # MASTER_SITES points to hosts in distinct data centers, # so just one MASTER_SITES entry should be OK. @@ -32,11 +33,20 @@ MAN8= openvpn.8 OPTIONS= PW_SAVE "Interactive passwords may be read from a file" off USE_RC_SUBR= openvpn.sh +USE_LDCONFIG= ${PREFIX}/lib -SUB_FILES= pkg-message +SUB_FILES= pkg-message pkg-req +SUB_LIST+= OSVERSION=${OSVERSION} .include <bsd.port.pre.mk> +.if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101)) +rcsuffix= +.else +rcsuffix= .sh +.endif +SUB_LIST+= RCSFX=${rcsuffix} + # NOTE: there is no way to explicitly specify the LZO version to OpenVPN, # if LZO2 and LZO1 are installed, OpenVPN will pick LZO2. # So depend on LZO1 only if it's already there and LZO2 isn't. @@ -51,13 +61,24 @@ LIB_DEPENDS+= lzo.1:${PORTSDIR}/archivers/lzo CONFIGURE_ARGS+= --enable-password-save .endif -# self-tests here post-build: + cd ${WRKSRC}/plugin/down-root && ${MAKE} + @# self-tests here +.if !defined(WITHOUT_CHECK) cd ${WRKSRC} && ${MAKE} check +.endif + +pre-install: + PKG_PREFIX=${PREFIX} ${SH} ${PKGREQ} ${PKGNAME} INSTALL post-install: + ${MKDIR} ${PREFIX}/lib + ${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so \ + ${PREFIX}/lib .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/plugin/down-root/README \ + ${DOCSDIR}/README.openvpn-down-root .for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL NEWS \ PORTS README ${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR} diff --git a/security/openvpn/files/pkg-message.in b/security/openvpn/files/pkg-message.in index 7b6d0e6cbfa0..64494e4d6a85 100644 --- a/security/openvpn/files/pkg-message.in +++ b/security/openvpn/files/pkg-message.in @@ -1,7 +1,7 @@ ### ------------------------------------------------------------------------ ### The OpenVPN FreeBSD port, since v2.0.1, uses rcNG to start OpenVPN. ### Edit /etc/rc.conf to start OpenVPN automatically at system startup. -### See %%PREFIX%%/etc/rc.d/openvpn.sh for details. +### See %%PREFIX%%/etc/rc.d/openvpn%%RCSFX%% for details. ### ------------------------------------------------------------------------ ### To get OpenVPN 1.X to talk with the new 2.0 version, you may need to ### edit the 1.X configuration file by adding these lines: diff --git a/security/openvpn/files/pkg-req.in b/security/openvpn/files/pkg-req.in new file mode 100644 index 000000000000..15c8242d8724 --- /dev/null +++ b/security/openvpn/files/pkg-req.in @@ -0,0 +1,29 @@ +set -e + +rcvers() { + # determine if we have "old" or "new" (rcorder integration) scheme + # for %%PREFIX%%/etc/rc.d/* files + if test $1 -ge 700007 || test $1 -lt 700000 -a $1 -ge 600101 ; then + echo 2 + else + echo 1 + fi +} + +if [ "$2" = INSTALL ] ; then + # check if the base system is new enough for us, + # which should only matter for package installs. + buildrc=$(rcvers %%OSVERSION%%) + execrc=$(rcvers $(sysctl -n kern.osreldate) ) + if test $buildrc -gt $execrc ; then + cat <<EOF + +Error: this package, $1, was compiled for a newer FreeBSD +====== version that uses different boot scripts. + Therefore, the rc.d script WILL NOT WORK. + Please update your ports tree and install security/openvpn from there. + +EOF + exit 1 + fi +fi diff --git a/security/openvpn/pkg-plist b/security/openvpn/pkg-plist index 44883fb1103d..e91cb935a82a 100644 --- a/security/openvpn/pkg-plist +++ b/security/openvpn/pkg-plist @@ -1,4 +1,5 @@ sbin/openvpn +lib/openvpn-down-root.so %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.GPL @@ -7,6 +8,7 @@ sbin/openvpn %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/PORTS %%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README.openvpn-down-root %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/README %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/build-ca %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/build-dh diff --git a/security/openvpn20/Makefile b/security/openvpn20/Makefile index a275b30d2fc4..f259afc52511 100644 --- a/security/openvpn20/Makefile +++ b/security/openvpn20/Makefile @@ -13,6 +13,7 @@ PORTNAME= openvpn # WILL BE DROPPED. -- Matthias Andree, 2006-04-26 # ----------------------------------------------------- PORTVERSION= 2.0.6 +PORTREVISION= 1 CATEGORIES= security net # MASTER_SITES points to hosts in distinct data centers, # so just one MASTER_SITES entry should be OK. @@ -32,11 +33,20 @@ MAN8= openvpn.8 OPTIONS= PW_SAVE "Interactive passwords may be read from a file" off USE_RC_SUBR= openvpn.sh +USE_LDCONFIG= ${PREFIX}/lib -SUB_FILES= pkg-message +SUB_FILES= pkg-message pkg-req +SUB_LIST+= OSVERSION=${OSVERSION} .include <bsd.port.pre.mk> +.if (${OSVERSION} >= 700007 || ( ${OSVERSION} < 700000 && ${OSVERSION} >= 600101)) +rcsuffix= +.else +rcsuffix= .sh +.endif +SUB_LIST+= RCSFX=${rcsuffix} + # NOTE: there is no way to explicitly specify the LZO version to OpenVPN, # if LZO2 and LZO1 are installed, OpenVPN will pick LZO2. # So depend on LZO1 only if it's already there and LZO2 isn't. @@ -51,13 +61,24 @@ LIB_DEPENDS+= lzo.1:${PORTSDIR}/archivers/lzo CONFIGURE_ARGS+= --enable-password-save .endif -# self-tests here post-build: + cd ${WRKSRC}/plugin/down-root && ${MAKE} + @# self-tests here +.if !defined(WITHOUT_CHECK) cd ${WRKSRC} && ${MAKE} check +.endif + +pre-install: + PKG_PREFIX=${PREFIX} ${SH} ${PKGREQ} ${PKGNAME} INSTALL post-install: + ${MKDIR} ${PREFIX}/lib + ${INSTALL_PROGRAM} ${WRKSRC}/plugin/down-root/openvpn-down-root.so \ + ${PREFIX}/lib .if !defined(NOPORTDOCS) ${MKDIR} ${DOCSDIR} + ${INSTALL_DATA} ${WRKSRC}/plugin/down-root/README \ + ${DOCSDIR}/README.openvpn-down-root .for docs in AUTHORS COPYING COPYRIGHT.GPL ChangeLog INSTALL NEWS \ PORTS README ${INSTALL_DATA} ${WRKSRC}/${docs} ${DOCSDIR} diff --git a/security/openvpn20/files/pkg-message.in b/security/openvpn20/files/pkg-message.in index 7b6d0e6cbfa0..64494e4d6a85 100644 --- a/security/openvpn20/files/pkg-message.in +++ b/security/openvpn20/files/pkg-message.in @@ -1,7 +1,7 @@ ### ------------------------------------------------------------------------ ### The OpenVPN FreeBSD port, since v2.0.1, uses rcNG to start OpenVPN. ### Edit /etc/rc.conf to start OpenVPN automatically at system startup. -### See %%PREFIX%%/etc/rc.d/openvpn.sh for details. +### See %%PREFIX%%/etc/rc.d/openvpn%%RCSFX%% for details. ### ------------------------------------------------------------------------ ### To get OpenVPN 1.X to talk with the new 2.0 version, you may need to ### edit the 1.X configuration file by adding these lines: diff --git a/security/openvpn20/files/pkg-req.in b/security/openvpn20/files/pkg-req.in new file mode 100644 index 000000000000..15c8242d8724 --- /dev/null +++ b/security/openvpn20/files/pkg-req.in @@ -0,0 +1,29 @@ +set -e + +rcvers() { + # determine if we have "old" or "new" (rcorder integration) scheme + # for %%PREFIX%%/etc/rc.d/* files + if test $1 -ge 700007 || test $1 -lt 700000 -a $1 -ge 600101 ; then + echo 2 + else + echo 1 + fi +} + +if [ "$2" = INSTALL ] ; then + # check if the base system is new enough for us, + # which should only matter for package installs. + buildrc=$(rcvers %%OSVERSION%%) + execrc=$(rcvers $(sysctl -n kern.osreldate) ) + if test $buildrc -gt $execrc ; then + cat <<EOF + +Error: this package, $1, was compiled for a newer FreeBSD +====== version that uses different boot scripts. + Therefore, the rc.d script WILL NOT WORK. + Please update your ports tree and install security/openvpn from there. + +EOF + exit 1 + fi +fi diff --git a/security/openvpn20/pkg-plist b/security/openvpn20/pkg-plist index 44883fb1103d..e91cb935a82a 100644 --- a/security/openvpn20/pkg-plist +++ b/security/openvpn20/pkg-plist @@ -1,4 +1,5 @@ sbin/openvpn +lib/openvpn-down-root.so %%PORTDOCS%%%%DOCSDIR%%/AUTHORS %%PORTDOCS%%%%DOCSDIR%%/COPYING %%PORTDOCS%%%%DOCSDIR%%/COPYRIGHT.GPL @@ -7,6 +8,7 @@ sbin/openvpn %%PORTDOCS%%%%DOCSDIR%%/NEWS %%PORTDOCS%%%%DOCSDIR%%/PORTS %%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%%%DOCSDIR%%/README.openvpn-down-root %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/README %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/build-ca %%PORTDOCS%%%%DOCSDIR%%/easy-rsa/build-dh |