[DIFF] security/vpnc - annoying 'which: ip: Command not found.'

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[DIFF] security/vpnc - annoying 'which: ip: Command not found.'

Jiri B-2
Just removing annoying linuxism...

jirib

Index: patches/patch-vpnc-script_in
===================================================================
RCS file: /cvs/ports/security/vpnc/patches/patch-vpnc-script_in,v
retrieving revision 1.1
diff -u -p -r1.1 patch-vpnc-script_in
--- patches/patch-vpnc-script_in 29 Jan 2009 19:07:06 -0000 1.1
+++ patches/patch-vpnc-script_in 12 Jan 2013 19:58:10 -0000
@@ -1,6 +1,15 @@
 $OpenBSD: patch-vpnc-script_in,v 1.1 2009/01/29 19:07:06 pea Exp $
 --- vpnc-script.in.orig Wed Nov 19 21:55:51 2008
-+++ vpnc-script.in Thu Jan 22 14:00:42 2009
++++ vpnc-script.in Sat Jan 12 20:54:25 2013
+@@ -59,7 +59,7 @@ if [ ! -d "/var/run/vpnc" ]; then
+ fi
+
+ # stupid SunOS: no blubber in /usr/local/bin ... (on stdout)
+-IPROUTE="`which ip | grep '^/' 2> /dev/null`"
++IPROUTE="`which ip 2>/dev/null | grep '^/' 2> /dev/null`"
+
+ if [ "$OS" = "Linux" ]; then
+ ifconfig_syntax_ptp="pointopoint"
 @@ -114,7 +114,7 @@ destroy_tun_device() {
 
  # =========== route handling ====================================

Reply | Threaded
Open this post in threaded view
|

Re: [DIFF] security/vpnc - annoying 'which: ip: Command not found.'

Stuart Henderson
On 2013/01/12 15:00, Jiri B wrote:
> Just removing annoying linuxism...

Please try the vpnc-script from the openconnect package (installs as
/etc/openconnect/vpnc-script). If it works OK with vpnc (which it should)
then I would prefer to just sync the two.

Reply | Threaded
Open this post in threaded view
|

Re: [DIFF] security/vpnc - annoying 'which: ip: Command not found.'

Eric Radman-3
On Sun, Jan 13, 2013 at 10:05:05AM +0000, Stuart Henderson wrote:
> On 2013/01/12 15:00, Jiri B wrote:
> > Just removing annoying linuxism...
>
> Please try the vpnc-script from the openconnect package (installs as
> /etc/openconnect/vpnc-script). If it works OK with vpnc (which it
> should) then I would prefer to just sync the two.

# cp /etc/openconnect/vpnc-script /etc/vpnc/

Works well for me

--
E. Radman

Reply | Threaded
Open this post in threaded view
|

Re: [DIFF] security/vpnc - annoying 'which: ip: Command not found.'

Julien Dhaille
This post has NOT been accepted by the mailing list yet.
Hi guys.
I confirm vpnc-script from openconnect is working well with this port.
Have a good day.
Reply | Threaded
Open this post in threaded view
|

Re: [DIFF] security/vpnc - annoying 'which: ip: Command not found.'

Julien Dhaille
In reply to this post by Jiri B-2
Hi guys.
I confirm vpnc-script from openconnect is working well with this port.
Have a good day.

--
Julien Dhaille
Reply | Threaded
Open this post in threaded view
|

NEW: net/vpnc-scripts, and switch vpnc/openconnect across to use it

Stuart Henderson-6
On 2014/04/01 09:48, Julien Dhaille wrote:
> Hi guys.
> I confirm vpnc-script from openconnect is working well with this port.
> Have a good day.
>
> --
> Julien Dhaille

OK - let's separate out the script (which is distributed separately
anyway) and adjust openconnect/vpnc ports to use it.

Any OKs for the import (tgz attached)? Simple port, just installs a couple
of shell scripts to ${PREFIX}/share/vpnc-scripts and @sample's one of them
into ${SYSCONFDIR}. It installs to a different location than the previous
copies of the script in vpnc/openconnect so there is no @pkgpath/@conflict
issue.

Diff for vpnc and OpenConnect inline below.


Index: security/vpnc/Makefile
===================================================================
RCS file: /cvs/ports/security/vpnc/Makefile,v
retrieving revision 1.21
diff -u -p -r1.21 Makefile
--- security/vpnc/Makefile 20 May 2013 16:26:51 -0000 1.21
+++ security/vpnc/Makefile 1 Apr 2014 08:32:33 -0000
@@ -3,7 +3,7 @@
 COMMENT= client for Cisco 3000 VPN concentrators
 
 DISTNAME= vpnc-0.5.3
-REVISION= 2
+REVISION= 3
 CATEGORIES= security net
 
 HOMEPAGE= http://www.unix-ag.uni-kl.de/~massar/vpnc/
@@ -34,7 +34,6 @@ do-install:
  ${INSTALL_DATA} ${WRKBUILD}/README ${PREFIX}/share/doc/vpnc
  ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/vpnc
  ${INSTALL_DATA} ${WRKBUILD}/vpnc.conf ${PREFIX}/share/examples/vpnc
- ${INSTALL_DATA} ${WRKBUILD}/vpnc-script ${PREFIX}/share/examples/vpnc
  ${INSTALL_DATA} ${WRKBUILD}/split.sh ${PREFIX}/share/examples/vpnc
  ${INSTALL_DATA} ${WRKBUILD}/vpnc.sh ${PREFIX}/share/examples/vpnc
  ${INSTALL_MAN} ${WRKBUILD}/vpnc.8 ${PREFIX}/man/man8
Index: security/vpnc/files/split.sh
===================================================================
RCS file: /cvs/ports/security/vpnc/files/split.sh,v
retrieving revision 1.1
diff -u -p -r1.1 split.sh
--- security/vpnc/files/split.sh 4 Apr 2008 21:41:27 -0000 1.1
+++ security/vpnc/files/split.sh 1 Apr 2014 08:32:33 -0000
@@ -16,4 +16,4 @@ CISCO_SPLIT_INC_0_PROTOCOL=0
 CISCO_SPLIT_INC_0_SPORT=0
 CISCO_SPLIT_INC_0_DPORT=0
 
-. /etc/vpnc/vpnc-script
+. /etc/vpnc-script
Index: security/vpnc/patches/patch-config_c
===================================================================
RCS file: security/vpnc/patches/patch-config_c
diff -N security/vpnc/patches/patch-config_c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ security/vpnc/patches/patch-config_c 1 Apr 2014 08:32:33 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+/etc is substituted with ${SYSCONFDIR} in do-configure.
+
+--- config.c.orig Tue Apr  1 09:29:18 2014
++++ config.c Tue Apr  1 09:29:47 2014
+@@ -173,7 +173,7 @@ static const char *config_def_app_version(void)
+
+ static const char *config_def_script(void)
+ {
+- return "/etc/vpnc/vpnc-script";
++ return "/etc/vpnc-script";
+ }
+
+ static const char *config_def_pid_file(void)
Index: security/vpnc/patches/patch-vpnc-script_in
===================================================================
RCS file: security/vpnc/patches/patch-vpnc-script_in
diff -N security/vpnc/patches/patch-vpnc-script_in
--- security/vpnc/patches/patch-vpnc-script_in 29 Jan 2009 19:07:06 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,26 +0,0 @@
-$OpenBSD: patch-vpnc-script_in,v 1.1 2009/01/29 19:07:06 pea Exp $
---- vpnc-script.in.orig Wed Nov 19 21:55:51 2008
-+++ vpnc-script.in Thu Jan 22 14:00:42 2009
-@@ -114,7 +114,7 @@ destroy_tun_device() {
-
- # =========== route handling ====================================
-
--if [ -n "$IPROUTE" ]; then
-+if [ -x "$IPROUTE" ]; then
- fix_ip_get_output () {
- sed 's/cache//;s/metric \?[0-9]\+ [0-9]\+//g;s/hoplimit [0-9]\+//g'
- }
-@@ -201,6 +201,13 @@ else # use route command
- case "$OS" in
- Linux|NetBSD|Darwin) # and probably others...
- # routes are deleted automatically on device shutdown
-+ return
-+ ;;
-+ OpenBSD)
-+ # delete only routes that are present
-+ if [ `route -n get $1|grep $2|wc -l` -ne 0 ]; then
-+ route $route_syntax_del -net "$NETWORK" $route_syntax_netmask "$NETMASK" $route_syntax_gw "$INTERNAL_IP4_ADDRESS"
-+ fi
- return
- ;;
- esac
Index: security/vpnc/pkg/PLIST
===================================================================
RCS file: /cvs/ports/security/vpnc/pkg/PLIST,v
retrieving revision 1.8
diff -u -p -r1.8 PLIST
--- security/vpnc/pkg/PLIST 20 May 2013 16:26:51 -0000 1.8
+++ security/vpnc/pkg/PLIST 1 Apr 2014 08:32:33 -0000
@@ -10,10 +10,6 @@ share/examples/vpnc/split.sh
 @mode 0755
 @sample ${SYSCONFDIR}/vpnc/split.sh
 @mode
-share/examples/vpnc/vpnc-script
-@mode 0755
-@sample ${SYSCONFDIR}/vpnc/vpnc-script
-@mode
 share/examples/vpnc/vpnc.conf
 @mode 0600
 @sample ${SYSCONFDIR}/vpnc/default.conf
Index: net/openconnect/Makefile
===================================================================
RCS file: /cvs/ports/net/openconnect/Makefile,v
retrieving revision 1.24
diff -u -p -r1.24 Makefile
--- net/openconnect/Makefile 26 Mar 2014 14:19:07 -0000 1.24
+++ net/openconnect/Makefile 1 Apr 2014 08:32:33 -0000
@@ -3,10 +3,8 @@
 COMMENT= client for Cisco AnyConnect SSL VPN
 
 DISTNAME= openconnect-5.99
+REVISION= 0
 DIST_SUBDIR= openconnect
-VPNC_SCRIPT= vpnc-script
-DISTFILES= ${DISTNAME}${EXTRACT_SUFX} ${VPNC_SCRIPT}:0
-EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
 
 SHARED_LIBS +=  openconnect               2.0 # 3.2
 
@@ -23,7 +21,6 @@ WANTLIB += c gmp gnutls hogweed m nettle
 WANTLIB += stdc++ tasn1 xml2 z ffi
 
 MASTER_SITES= ftp://ftp.infradead.org/pub/openconnect/
-MASTER_SITES0= http://git.infradead.org/users/dwmw2/vpnc-scripts.git/blob_plain/0e042c5ab78bd5dbeeb82b8570160c081fa8c3ff:/
 
 # used to format html during build, USE_GROFF not needed
 # XXX can probably convert to using mandoc?
@@ -43,16 +40,8 @@ CONFIGURE_STYLE= gnu
 
 CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
  LDFLAGS="-L${LOCALBASE}/lib -liconv"
-CONFIGURE_ARGS= --with-vpnc-script=${SYSCONFDIR}/openconnect/vpnc-script \
+CONFIGURE_ARGS= --with-vpnc-script=${SYSCONFDIR}/vpnc-script \
  --without-stoken
 # make sure libstoken isn't picked up automatically if we import it.
-
-post-extract:
- cp ${FULLDISTDIR}/${VPNC_SCRIPT} ${WRKSRC}/vpnc-script
-
-post-install:
- ${INSTALL_DATA_DIR} ${PREFIX}/share/examples/openconnect/
- ${INSTALL_SCRIPT} ${WRKSRC}/vpnc-script \
-    ${PREFIX}/share/examples/openconnect/
 
 .include <bsd.port.mk>
Index: net/openconnect/patches/patch-vpnc-script
===================================================================
RCS file: net/openconnect/patches/patch-vpnc-script
diff -N net/openconnect/patches/patch-vpnc-script
--- net/openconnect/patches/patch-vpnc-script 8 Nov 2012 16:44:21 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,40 +0,0 @@
-$OpenBSD: patch-vpnc-script,v 1.1 2012/11/08 16:44:21 sthen Exp $
---- vpnc-script.orig Thu Nov  8 16:22:19 2012
-+++ vpnc-script Thu Nov  8 16:22:31 2012
-@@ -89,7 +89,7 @@ if [ ! -d "/var/run/vpnc" ]; then
- fi
-
- # stupid SunOS: no blubber in /usr/local/bin ... (on stdout)
--IPROUTE="`which ip | grep '^/'`" 2> /dev/null
-+IPROUTE="`which ip 2> /dev/null | grep '^/'`"
-
- if ifconfig --help 2>&1 | grep BusyBox > /dev/null; then
- ifconfig_syntax_inet=""
-@@ -198,7 +198,7 @@ do_ifconfig() {
-
- destroy_tun_device() {
- case "$OS" in
-- NetBSD|FreeBSD) # and probably others...
-+ NetBSD|FreeBSD|OpenBSD) # and probably others...
- ifconfig "$TUNDEV" destroy
- ;;
- esac
-@@ -317,7 +317,7 @@ else # use route command
-
- del_network_route() {
- case "$OS" in
-- Linux|NetBSD|Darwin|SunOS) # and probably others...
-+ Linux|NetBSD|OpenBSD|Darwin|SunOS) # and probably others...
- # routes are deleted automatically on device shutdown
- return
- ;;
-@@ -603,6 +603,9 @@ do_pre_init() {
- elif [ "$OS" = "NetBSD" ]; then
- :
- elif [ "$OS" = "OpenBSD" ]; then
-+ if ! ifconfig $TUNDEV > /dev/null; then
-+ ifconfig $TUNDEV create
-+ fi
- :
- elif [ "$OS" = "SunOS" ]; then
- :
Index: net/openconnect/pkg/PLIST
===================================================================
RCS file: /cvs/ports/net/openconnect/pkg/PLIST,v
retrieving revision 1.5
diff -u -p -r1.5 PLIST
--- net/openconnect/pkg/PLIST 26 Mar 2014 14:19:07 -0000 1.5
+++ net/openconnect/pkg/PLIST 1 Apr 2014 08:32:33 -0000
@@ -40,12 +40,6 @@ share/doc/openconnect/styles/
 share/doc/openconnect/styles/main.css
 share/doc/openconnect/technical.html
 share/doc/openconnect/vpnc-script.html
-share/examples/openconnect/
-share/examples/openconnect/vpnc-script
-@sample ${SYSCONFDIR}/openconnect/
-@mode 755
-@sample ${SYSCONFDIR}/openconnect/vpnc-script
-@mode
 share/locale/ar/LC_MESSAGES/openconnect.mo
 share/locale/cs/LC_MESSAGES/openconnect.mo
 share/locale/de/LC_MESSAGES/openconnect.mo


vpnc-scripts.tgz (1K) Download Attachment