diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-03 10:11:11 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-02-03 10:11:11 +0000 |
commit | 9f750544a956d862d37472e9b8f406d613cc381a (patch) | |
tree | 857b032d5e0323d5a22af96468963b8f43d29aff | |
parent | 49900c76bb6afaddf29553c0e8b9b7b4708a2122 (diff) | |
download | aports-9f750544a956d862d37472e9b8f406d613cc381a.tar.bz2 aports-9f750544a956d862d37472e9b8f406d613cc381a.tar.xz |
main/openvpn: upgrade to 2.1.1 (moved from testing)
-rw-r--r-- | main/openvpn/APKBUILD | 24 | ||||
-rw-r--r-- | main/openvpn/openvpn-2.0.9-persistent.patch | 44 | ||||
-rw-r--r-- | main/openvpn/openvpn.initd | 3 | ||||
-rw-r--r-- | testing/openvpn/APKBUILD | 57 | ||||
-rw-r--r-- | testing/openvpn/openvpn.initd | 63 |
5 files changed, 11 insertions, 180 deletions
diff --git a/main/openvpn/APKBUILD b/main/openvpn/APKBUILD index a8f1e18ff2..bd751f3111 100644 --- a/main/openvpn/APKBUILD +++ b/main/openvpn/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=openvpn -pkgver=2.0.9 -pkgrel=2 +pkgver=2.1.1 +pkgrel=0 pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)" url="http://openvpn.sourceforge.net/" license="custom" @@ -10,17 +10,12 @@ depends="iproute2" makedepends="openssl-dev lzo-dev" install= source="http://$pkgname.net/release/$pkgname-$pkgver.tar.gz - openvpn-2.0.9-persistent.patch openvpn.initd " +_builddir="$srcdir"/$pkgname-$pkgver build() { - cd "$srcdir"/$pkgname-$pkgver - for i in ../*.patch; do - msg "Applying $i..." - patch -p1 < $i || return 1 - done - + cd "$_builddir" ./configure --prefix=/usr \ --mandir=/usr/share/man \ --enable-ssl \ @@ -29,10 +24,13 @@ build() { --enable-iproute2 make || return 1 - cd plugin/down-root make || return 1 cd ../.. +} + +package() { + cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 @@ -54,8 +52,6 @@ build() { # install init.d install -Dm755 ../openvpn.initd "$pkgdir"/etc/init.d/openvpn - } -md5sums="60745008b90b7dbe25fe8337c550fec6 openvpn-2.0.9.tar.gz -a9075ceb8552980519132cc27fda85ac openvpn-2.0.9-persistent.patch -793184e36ad09b22cdb19b4294131508 openvpn.initd" +md5sums="b273ed2b5ec8616fb9834cde8634bce7 openvpn-2.1.1.tar.gz +020376f1e7ed6b4adbe20cf5ff774856 openvpn.initd" diff --git a/main/openvpn/openvpn-2.0.9-persistent.patch b/main/openvpn/openvpn-2.0.9-persistent.patch deleted file mode 100644 index e042124ea4..0000000000 --- a/main/openvpn/openvpn-2.0.9-persistent.patch +++ /dev/null @@ -1,44 +0,0 @@ -diff -ru openvpn-2.0.9~/init.c openvpn-2.0.9/init.c ---- openvpn-2.0.9~/init.c 2008-05-13 23:21:30.000000000 +0200 -+++ openvpn-2.0.9/init.c 2008-05-13 23:22:51.000000000 +0200 -@@ -347,7 +347,8 @@ - msg (M_FATAL|M_OPTERR, - "options --mktun or --rmtun should only be used together with --dev"); - tuncfg (options->dev, options->dev_type, options->dev_node, -- options->tun_ipv6, options->persist_mode); -+ options->tun_ipv6, options->persist_mode, -+ &options->tuntap_options); - return true; - } - #endif -diff -ru openvpn-2.0.9~/tun.c openvpn-2.0.9/tun.c ---- openvpn-2.0.9~/tun.c 2008-05-13 23:21:30.000000000 +0200 -+++ openvpn-2.0.9/tun.c 2008-05-13 23:22:51.000000000 +0200 -@@ -1095,13 +1095,14 @@ - #ifdef TUNSETPERSIST - - void --tuncfg (const char *dev, const char *dev_type, const char *dev_node, bool ipv6, int persist_mode) -+tuncfg (const char *dev, const char *dev_type, const char *dev_node, bool ipv6, int persist_mode, const struct tuntap_options *options) - { - struct tuntap *tt; - - ALLOC_OBJ (tt, struct tuntap); - clear_tuntap (tt); - tt->type = dev_type_enum (dev, dev_type); -+ tt->options = *options; - open_tun (dev, dev_type, dev_node, ipv6, tt); - if (ioctl (tt->fd, TUNSETPERSIST, persist_mode) < 0) - msg (M_ERR, "Cannot ioctl TUNSETPERSIST(%d) %s", persist_mode, dev); -diff -ru openvpn-2.0.9~/tun.h openvpn-2.0.9/tun.h ---- openvpn-2.0.9~/tun.h 2008-05-13 23:21:30.000000000 +0200 -+++ openvpn-2.0.9/tun.h 2008-05-13 23:22:51.000000000 +0200 -@@ -194,7 +194,7 @@ - int read_tun (struct tuntap* tt, uint8_t *buf, int len); - - void tuncfg (const char *dev, const char *dev_type, const char *dev_node, -- bool ipv6, int persist_mode); -+ bool ipv6, int persist_mode, const struct tuntap_options *options); - - const char *guess_tuntap_dev (const char *dev, - const char *dev_type, diff --git a/main/openvpn/openvpn.initd b/main/openvpn/openvpn.initd index 89201f9cf6..7e0e3eb9ef 100644 --- a/main/openvpn/openvpn.initd +++ b/main/openvpn/openvpn.initd @@ -13,9 +13,8 @@ VPNCONF="${VPNDIR}/${VPN}.conf" depend() { need localmount net - after firewall before netmount - after bootmisc + after bootmisc firewall } checktundevice() { diff --git a/testing/openvpn/APKBUILD b/testing/openvpn/APKBUILD deleted file mode 100644 index bd751f3111..0000000000 --- a/testing/openvpn/APKBUILD +++ /dev/null @@ -1,57 +0,0 @@ -# Maintainer: Natanael Copa <ncopa@alpinelinux.org> -pkgname=openvpn -pkgver=2.1.1 -pkgrel=0 -pkgdesc="A robust, and highly configurable VPN (Virtual Private Network)" -url="http://openvpn.sourceforge.net/" -license="custom" -subpackages="$pkgname-doc" -depends="iproute2" -makedepends="openssl-dev lzo-dev" -install= -source="http://$pkgname.net/release/$pkgname-$pkgver.tar.gz - openvpn.initd - " - -_builddir="$srcdir"/$pkgname-$pkgver -build() { - cd "$_builddir" - ./configure --prefix=/usr \ - --mandir=/usr/share/man \ - --enable-ssl \ - --enable-crypto \ - --disable-threads \ - --enable-iproute2 - - make || return 1 - cd plugin/down-root - make || return 1 - cd ../.. -} - -package() { - cd "$_builddir" - - make DESTDIR="$pkgdir" install || return 1 - - # install plugins - install -d "$pkgdir"/usr/lib/$pkgname - cp plugin/*/*.so "$pkgdir"/usr/lib/$pkgname - - # install easy-rsa - sed -i -e 's/--directory/-d/g; s/--mode=/-m/g' easy-rsa/2.0/Makefile - sed -i -e '1s|#!/bin/bash|#!/bin/sh|' easy-rsa/2.0/* - make -C easy-rsa/2.0 DESTDIR="$pkgdir" \ - PREFIX=etc/openvpn/easy-rsa \ - install - - # install examples - mkdir -p "$pkgdir"/usr/share/doc/$pkgname/examples - cp -a sample-config-files "$pkgdir"/usr/share/doc/$pkgname/examples - install -D -m644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING - - # install init.d - install -Dm755 ../openvpn.initd "$pkgdir"/etc/init.d/openvpn -} -md5sums="b273ed2b5ec8616fb9834cde8634bce7 openvpn-2.1.1.tar.gz -020376f1e7ed6b4adbe20cf5ff774856 openvpn.initd" diff --git a/testing/openvpn/openvpn.initd b/testing/openvpn/openvpn.initd deleted file mode 100644 index 7e0e3eb9ef..0000000000 --- a/testing/openvpn/openvpn.initd +++ /dev/null @@ -1,63 +0,0 @@ -#!/sbin/runscript -# Copyright 1999-2007 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -VPNDIR="/etc/openvpn" -VPN="${SVCNAME#*.}" -if [ -n "${VPN}" ] && [ "${SVCNAME}" != "openvpn" ]; then - VPNPID="/var/run/openvpn.${VPN}.pid" -else - VPNPID="/var/run/openvpn.pid" -fi -VPNCONF="${VPNDIR}/${VPN}.conf" - -depend() { - need localmount net - before netmount - after bootmisc firewall -} - -checktundevice() { - if [ ! -e /dev/net/tun ]; then - if ! modprobe tun ; then - eerror "TUN/TAP support is not available in this kernel" - return 1 - fi - fi - if [ -h /dev/net/tun ] && [ -c /dev/misc/net/tun ]; then - ebegin "Detected broken /dev/net/tun symlink, fixing..." - rm -f /dev/net/tun - ln -s /dev/misc/net/tun /dev/net/tun - eend $? - fi -} - -start() { - ebegin "Starting ${SVCNAME}" - - checktundevice || return 1 - - if [ ! -e "${VPNCONF}" ]; then - eend 1 "${VPNCONF} does not exist" - return 1 - fi - - local args="" - # If the config file does not specify the cd option, we do - # But if we specify it, we override the config option which we do not want - if ! grep -q "^[ \t]*cd[ \t].*" "${VPNCONF}" ; then - args="${args} --cd ${VPNDIR}" - fi - - start-stop-daemon --start --exec /usr/sbin/openvpn --pidfile "${VPNPID}" \ - -- --config "${VPNCONF}" --writepid "${VPNPID}" --daemon ${args} - eend $? "Check your logs to see why startup failed" -} - -stop() { - ebegin "Stopping ${SVCNAME}" - start-stop-daemon --stop --exec /usr/sbin/openvpn --pidfile "${VPNPID}" - eend $? -} - -# vim: ts=4 |