summaryrefslogtreecommitdiff
path: root/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
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 /network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
parenta3efcb3c06aa3b620251e5b9448b03caa113ad1c (diff)
downloadslackbuilds-41b81aa13f4aff092134749e52c5e2f665da2cdf.tar.gz
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>
Diffstat (limited to 'network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild')
-rw-r--r--network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild27
1 files changed, 24 insertions, 3 deletions
diff --git a/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild b/network/NetworkManager-openvpn/NetworkManager-openvpn.SlackBuild
index 6fc156beac..0aa8ce7daf 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