[arch-commits] Commit in openvpn/repos (6 files)
Thomas Bächler
thomas at archlinux.org
Thu Jul 23 13:59:21 UTC 2009
Date: Thursday, July 23, 2009 @ 09:59:21
Author: thomas
Revision: 47205
Merged revisions 47204 via svnmerge from
svn+ssh://archlinux.org/srv/svn-packages/openvpn/trunk
........
r47204 | thomas | 2009-07-23 15:59:05 +0200 (Do, 23 Jul 2009) | 1 line
upgpkg: openvpn 2.1_rc19-1
........
Added:
openvpn/repos/testing-x86_64/openvpn-tapdev.conf
(from rev 47204, openvpn/trunk/openvpn-tapdev.conf)
openvpn/repos/testing-x86_64/openvpn-tapdev.rc
(from rev 47204, openvpn/trunk/openvpn-tapdev.rc)
openvpn/repos/testing-x86_64/openvpn.rc
(from rev 47204, openvpn/trunk/openvpn.rc)
Modified:
openvpn/repos/testing-x86_64/ (properties)
openvpn/repos/testing-x86_64/PKGBUILD
Deleted:
openvpn/repos/testing-x86_64/openvpn.install
---------------------+
PKGBUILD | 54 +++++++++++++++++++++++++++++++-------------------
openvpn-tapdev.conf | 12 +++++++++++
openvpn-tapdev.rc | 40 +++++++++++++++++++++++++++++++++++++
openvpn.install | 32 -----------------------------
openvpn.rc | 43 +++++++++++++++++++++++++++++++++++++++
5 files changed, 129 insertions(+), 52 deletions(-)
Property changes on: openvpn/repos/testing-x86_64
___________________________________________________________________
Modified: svnmerge-integrated
- /openvpn/trunk:1-46305
+ /openvpn/trunk:1-47204
Modified: testing-x86_64/PKGBUILD
===================================================================
--- testing-x86_64/PKGBUILD 2009-07-23 13:59:05 UTC (rev 47204)
+++ testing-x86_64/PKGBUILD 2009-07-23 13:59:21 UTC (rev 47205)
@@ -1,37 +1,51 @@
# $Id$
-# Maintainer: Judd Vinet <jvinet at zeroflux.org>
+# Maintainer: Thomas Baechler <thomas at archlinux.org>
pkgname=openvpn
-pkgver=2.1_rc18
+pkgver=2.1_rc19
pkgrel=1
pkgdesc="An easy-to-use, robust, and highly configurable VPN (Virtual Private Network)"
arch=(i686 x86_64)
url="http://openvpn.sourceforge.net/"
depends=('openssl' 'lzo2')
license=('custom')
-backup=(usr/share/openvpn/easy-rsa/vars usr/share/openvpn/easy-rsa/openssl.cnf)
-source=(http://openvpn.net/release/openvpn-$pkgver.tar.gz)
-md5sums=('af330c94da5200df94c4e84798ea39be')
-install=openvpn.install
+backup=(usr/share/openvpn/easy-rsa/vars
+ usr/share/openvpn/easy-rsa/openssl.cnf
+ etc/conf.d/openvpn-tapdev)
+source=(http://openvpn.net/release/openvpn-$pkgver.tar.gz
+ openvpn.rc
+ openvpn-tapdev.rc
+ openvpn-tapdev.conf)
+md5sums=('ba2ee667a8b7606b125b7d32f47ca578'
+ '90f37d4338cfc28d7a4e2d47a15bde54'
+ '7576704ea86a781589e0b5eef469b693'
+ '722f483c9e3ce2ec66d3301aaf7cf3d5')
build() {
cd $srcdir/$pkgname-$pkgver
- ./configure --prefix=/usr --enable-password-save --mandir=/usr/share/man
+ # Build and install openvpn
+ CFLAGS="$CFLAGS -DPLUGIN_LIBDIR=\\\"/usr/lib/openvpn\\\"" ./configure --prefix=/usr --enable-password-save --mandir=/usr/share/man
make || return 1
make DESTDIR=$pkgdir install || return 1
- mkdir -p $pkgdir/etc/openvpn
- cp -a sample-config-files $pkgdir/etc/openvpn/examples
- chmod 755 $pkgdir/etc/openvpn/examples
- install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
- # build pam-auth
- cd $srcdir/$pkgname-$pkgver/plugin/auth-pam
- make || return 1
- install -D -m755 openvpn-auth-pam.so $pkgdir/usr/share/openvpn/plugin/lib/openvpn-auth-pam.so
- # build down-root
- cd $srcdir/$pkgname-$pkgver/plugin/down-root
- make || return 1
- install -D -m755 openvpn-down-root.so $pkgdir/usr/share/openvpn/plugin/lib/openvpn-down-root.so
+ install -d -m755 $pkgdir/etc/openvpn
+ # Install examples
+ install -d -m755 $pkgdir/usr/share/openvpn
+ cp -r sample-config-files $pkgdir/usr/share/openvpn/examples || return 1
+ find $pkgdir/usr/share/openvpn -type f -exec chmod 644 {} \;
+ find $pkgdir/usr/share/openvpn -type d -exec chmod 755 {} \;
+ # Install license
+ install -D -m644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING || return 1
+ # Build and install plugins
+ for plug in auth-pam down-root; do
+ cd $srcdir/$pkgname-$pkgver/plugin/$plug
+ make || return 1
+ install -D -m755 openvpn-$plug.so $pkgdir/usr/lib/openvpn/openvpn-$plug.so || return 1
+ done
# Install easy-rsa
cd $srcdir/$pkgname-$pkgver
- make -C easy-rsa/2.0 install DESTDIR=$pkgdir PREFIX=usr/share/openvpn/easy-rsa
+ make -C easy-rsa/2.0 install DESTDIR=$pkgdir PREFIX=usr/share/openvpn/easy-rsa || return 1
+ # Install rc scripts
+ install -D -m755 $srcdir/openvpn.rc $pkgdir/etc/rc.d/openvpn || return 1
+ install -D -m755 $srcdir/openvpn-tapdev.rc $pkgdir/etc/rc.d/openvpn-tapdev || return 1
+ install -D -m644 $srcdir/openvpn-tapdev.conf $pkgdir/etc/conf.d/openvpn-tapdev || return 1
}
Copied: openvpn/repos/testing-x86_64/openvpn-tapdev.conf (from rev 47204, openvpn/trunk/openvpn-tapdev.conf)
===================================================================
--- testing-x86_64/openvpn-tapdev.conf (rev 0)
+++ testing-x86_64/openvpn-tapdev.conf 2009-07-23 13:59:21 UTC (rev 47205)
@@ -0,0 +1,12 @@
+#
+# /etc/conf.d/openvpn-tapdev
+#
+# Place openvpn-tapdev before network into your DAEMONS array
+# This will create permanent tap devices which you can use for bridging
+#
+# Example:
+# TAPDEVS="work home"
+# Will create two tap devices "work" and "home"
+#
+
+TAPDEVS=""
Copied: openvpn/repos/testing-x86_64/openvpn-tapdev.rc (from rev 47204, openvpn/trunk/openvpn-tapdev.rc)
===================================================================
--- testing-x86_64/openvpn-tapdev.rc (rev 0)
+++ testing-x86_64/openvpn-tapdev.rc 2009-07-23 13:59:21 UTC (rev 47205)
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+. /etc/conf.d/openvpn-tapdev
+
+case "$1" in
+ start)
+ stat_busy "Creating tap devices for OpenVPN ... "
+ success=0
+ for tapdev in ${TAPDEVS}; do
+ stat_append "${tapdev} "
+ /usr/sbin/openvpn --mktun --dev-type tap --dev ${tapdev} >/dev/null 2>&1 || success = $!
+ done
+ if [ $success -eq 0 ]; then
+ add_daemon openvpn-tapdev
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Destroying tap devices for OpenVPN ..."
+ for tapdev in ${TAPDEVS}; do
+ stat_append "${tapdev} "
+ /usr/sbin/openvpn --rmtun --dev-type tap --dev ${tapdev} >/dev/null 2>&1 || success = $!
+ done
+ rm_daemon openvpn-tapdev
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
Deleted: testing-x86_64/openvpn.install
===================================================================
--- testing-x86_64/openvpn.install 2009-07-23 13:59:05 UTC (rev 47204)
+++ testing-x86_64/openvpn.install 2009-07-23 13:59:21 UTC (rev 47205)
@@ -1,32 +0,0 @@
-
-
-post_install() {
- cat << 'EOM'
-
- ==>
- ==> PLEASE NOTE:
- ==> Config file examples are provided in /etc/openvpn/examples.
- ==>
- ==> The "easy-rsa" key management scripts are available in
- ==> /usr/share/openvpn/easy-rsa.
- ==>
-
-EOM
-}
-
-post_upgrade() {
- cat << 'EOM'
-
- ==>
- ==> PLEASE NOTE:
- ==> The openvpn package now includes the "easy-rsa" key
- ==> management scripts, which are installed in
- ==> /use/share/openvpn/easy-rsa.
- ==>
-
-EOM
-}
-
-op=$1
-shift
-$op $*
Copied: openvpn/repos/testing-x86_64/openvpn.rc (from rev 47204, openvpn/trunk/openvpn.rc)
===================================================================
--- testing-x86_64/openvpn.rc (rev 0)
+++ testing-x86_64/openvpn.rc 2009-07-23 13:59:21 UTC (rev 47205)
@@ -0,0 +1,43 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+CFGDIR="/etc/openvpn"
+STATEDIR="/var/run/openvpn"
+
+case "$1" in
+ start)
+ stat_busy "Starting OpenVPN ... "
+ success=0
+ mkdir -p "${STATEDIR}"
+ for cfg in "${CFGDIR}"/*.conf; do
+ stat_append "$(basename "${cfg}" .conf) "
+ /usr/sbin/openvpn --daemon --writepid "${STATEDIR}"/"$(basename "${cfg}" .conf)".pid --cd "${CFGDIR}" --config "${cfg}" || success = $!
+ done
+ if [ $success -eq 0 ]; then
+ add_daemon openvpn
+ stat_done
+ else
+ stat_fail
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping OpenVPN ..."
+ for pidfile in "${STATEDIR}"/*.pid; do
+ stat_append "$(basename "${cfg}" .conf) "
+ kill $(cat "${pidfile}" 2>/dev/null) 2>/dev/null
+ rm -f "${pidfile}"
+ done
+ rm_daemon openvpn
+ stat_done
+ ;;
+ restart)
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart}"
+esac
+exit 0
More information about the arch-commits
mailing list