aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2016-01-02 04:30:06 -0600
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-01-17 09:40:16 +0700
commit41b81aa13f4aff092134749e52c5e2f665da2cdf (patch)
treeb6bf96f7eb0521ea0c2f8128dd3742274f6e227e
parenta3efcb3c06aa3b620251e5b9448b03caa113ad1c (diff)
network/NetworkManager-openvpn: Updated for version 1.0.8.
This now requires an "nm-openvpn" user and group as well as a chroot directory of /var/lib/nm-openvpn/chroot/ Thanks to David Miller for the bug report and fix. Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
-rw-r--r--network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild27
-rw-r--r--network/NetworkManager-openvpn/NetworkManager-openvpn.info6
-rw-r--r--network/NetworkManager-openvpn/README4
3 files changed, 31 insertions, 6 deletions
diff --git a/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild b/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
index 6fc156beac6f2..0aa8ce7daf16a 100644
--- a/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
+++ b/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
@@ -1,8 +1,8 @@
#!/bin/sh
-# Slackware build script for NetworkManager
+# Slackware build script for NetworkManager-openvpn
-# Copyright 2010-2013 Robby Workman, Northport, Alabama, USA
+# Copyright 2010-2015 Robby Workman, Tuscaloosa, Alabama, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=NetworkManager-openvpn
-VERSION=${VERSION:-0.9.8.4}
+VERSION=${VERSION:-1.0.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@@ -54,6 +54,19 @@ else
LIBDIRSUFFIX=""
fi
+# Bail out if user or group isn't valid on your system
+# For slackbuilds.org, assigned nm-openvpn uid/gid are 320/320
+# See http://slackbuilds.org/uid_gid.txt
+if ! getent group nm-openvpn 2>&1 > /dev/null; then
+ echo " You must have a \"nm-openvpn\" group to run this script."
+ echo " # groupadd -g 320 nm-openvpn"
+ exit 1
+elif ! getent passwd nm-openvpn 2>&1 > /dev/null; then
+ echo " You must have a \"nm-openvpn\" user to run this script."
+ echo " # useradd -u 320 -g nm-openvpn -d /var/lib/openvpn/chroot -s /bin/false nm-openvpn"
+ exit 1
+fi
+
set -e
rm -rf $PKG
@@ -83,6 +96,14 @@ CXXFLAGS="$SLKCFLAGS" \
make
make install DESTDIR=$PKG
+# Create the chroot directory
+# From src/nm-openvpn-service-defines.h
+# /* User name and group to run nm-openvpn-service under */
+# #define NM_OPENVPN_USER "nm-openvpn"
+# #define NM_OPENVPN_GROUP "nm-openvpn"
+# #define NM_OPENVPN_CHROOT LOCALSTATEDIR "/lib/openvpn/chroot"
+mkdir -p $PKG/var/lib/openvpn/chroot
+
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
diff --git a/network/NetworkManager-openvpn/NetworkManager-openvpn.info b/network/NetworkManager-openvpn/NetworkManager-openvpn.info
index ef5e1a87c4982..273f68c68892e 100644
--- a/network/NetworkManager-openvpn/NetworkManager-openvpn.info
+++ b/network/NetworkManager-openvpn/NetworkManager-openvpn.info
@@ -1,8 +1,8 @@
PRGNAM="NetworkManager-openvpn"
-VERSION="0.9.8.4"
+VERSION="1.0.8"
HOMEPAGE="http://projects.gnome.org/NetworkManager/"
-DOWNLOAD="http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-openvpn/0.9/NetworkManager-openvpn-0.9.8.4.tar.xz"
-MD5SUM="afe11c50ce63bd251e50a2f1b20af654"
+DOWNLOAD="http://ftp.gnome.org/pub/GNOME/sources/NetworkManager-openvpn/1.0/NetworkManager-openvpn-1.0.8.tar.xz"
+MD5SUM="758a9951ad5e20a37c72cc7326c9c750"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/network/NetworkManager-openvpn/README b/network/NetworkManager-openvpn/README
index 509171483496a..9062204cbb9f4 100644
--- a/network/NetworkManager-openvpn/README
+++ b/network/NetworkManager-openvpn/README
@@ -1 +1,5 @@
OpenVPN support for NetworkManager
+
+You will need an "nm-openvpn" user and group to use this. Suggested:
+# groupadd -g 320 nm-openvpn
+# useradd -u 320 -g nm-openvpn -d /var/lib/openvpn/chroot -s /bin/false nm-openvpn