LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-30-2013, 05:27 AM   #1
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Rep: Reputation: 68
Openvpn in Slackware -curent: easy-rsa scripts missing


According to:

http://openvpn.net/index.php/open-source/downloads.html

the easy-rsa scripts have been moved out of the main openvpn download into their own package. As a consequence of this (I'm assuming), the easy-rsa scripts have disappeared from -current as well (I think they used to be in /usr/share/doc/openvpn). I always rely on the easy-rsa scripts to create a new CA and to manage the client certificates and keys when rolling a new openvpn installation. It would be nice if they could find their way back into Slackware. Then again - I don't have any statistics to hand - maybe not many other people are using them?
 
Old 04-30-2013, 08:48 AM   #2
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 307

Rep: Reputation: 92
Here's a patch for the SlackBuild in -current (also attached as a text file):

Code:
--- openvpn.SlackBuild  2013-04-30 15:38:18.000000000 +0200                                                                                                                                                    
+++ openvpn.SlackBuild  2013-04-30 15:33:42.000000000 +0200                                                                                                                                                    
@@ -23,7 +23,7 @@                                                                                                                                                                                              
                                                                                                                                                                                                               
                                                                                                                                                                                                               
 PKGNAM=openvpn                                                                                                                                                                                                
-VERSION=2.3.1                                                                                                                                                                                                 
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}                                                                                                                    
 BUILD=${BUILD:-1}                                                                                                                                                                                             
                                                                                                                                                                                                               
 # Automatically determine the architecture we're building on:                                                                                                                                                 
@@ -38,6 +38,19 @@                                                                                                                                                                                             
                                                                                                                                                                                                               
 NUMJOBS=${NUMJOBS:-" -j7 "}                                                                                                                                                                                   
                                                                                                                                                                                                               
+CWD=$(pwd)                                                                                                                                                                                                    
+TMP=${TMP:-/tmp}                                                                                                                                                                                              
+PKG=$TMP/package-$PKGNAM                                                                                                                                                                                      
+                                                                                                                                                                                                              
+# Download the easy-rsa Git head if there's no tarball:                                                                                                                                                       
+if ! /bin/ls $CWD/easy-rsa*tar* 1> /dev/null 2> /dev/null ; then                                                                                                                                              
+  git clone https://github.com/OpenVPN/easy-rsa.git                                                                                                                                                           
+  rm -r easy-rsa/.git*                                                                                                                                                                                        
+  tar cf easy-rsa-$(date +%Y%m%d).tar easy-rsa                                                                                                                                                                
+  xz -9 easy-rsa-$(date +%Y%m%d).tar                                                                                                                                                                          
+  rm -r $CWD/easy-rsa                                                                                                                                                                                         
+fi                                                                                                                                                                                                            
+                                                                                                                                                                                                              
 if [ "$ARCH" = "i486" ]; then                                                                                                                                                                                 
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"                                                                                                                                                                     
   LIBDIRSUFFIX=""
@@ -52,13 +65,14 @@
   LIBDIRSUFFIX=""
 fi
 
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-$PKGNAM
-
 rm -rf $PKG
 mkdir -p $TMP $PKG
 cd $TMP
+
+if [ -z $VERSION ]; then
+    echo "Could not parse version of tarball."
+    exit 1
+fi
 rm -rf $PKGNAM-$VERSION
 tar xvf $CWD/$PKGNAM-$VERSION.tar.xz || exit 1
 cd $PKGNAM-$VERSION || exit 1
@@ -112,12 +126,6 @@
 See "man openvpn" and the other docs for more information.
 EOF
 
-# Add a link, too:
-mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files
-( cd $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files
-  ln -sf /etc/openvpn/openvpn.conf.sample .
-)
-
 if [ -d $PKG/usr/man ]; then
 ( cd $PKG/usr/man
   find . -type f -exec gzip -9 {} \;
@@ -126,10 +134,15 @@
 fi
 
 mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-cp -a AUTHORS COPYING* COPYRIGHT.GPL INSTALL INSTALL-win32.txt \
-  NEWS PORTS README* sample-config-files sample-keys sample-scripts easy-rsa \
+cp -a AUTHORS COPY* INSTALL* PORTS README* sample/sample* \
   $PKG/usr/doc/$PKGNAM-$VERSION
 
+# Add a link, too:
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files
+( cd $PKG/usr/doc/$PKGNAM-$VERSION/sample-config-files
+  ln -sf /etc/openvpn/openvpn.conf.sample .
+)
+
 # If there's a ChangeLog, installing at least part of the recent history
 # is useful, but don't let it get totally out of control:
 if [ -r ChangeLog ]; then
@@ -138,9 +151,18 @@
   touch -r ChangeLog $DOCSDIR/ChangeLog
 fi
 
+# Package easy-rsa stuff
+cd $TMP
+rm -rf easy-rsa
+tar xvf $CWD/easy-rsa-$(date +%Y%m%d).tar.xz || exit 1
+cd easy-rsa || exit 1
+
+mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a easy-rsa $PKG/usr/doc/$PKGNAM-$VERSION
+cp -a COPY* READ* $PKG/usr/doc/$PKGNAM-$VERSION/easy-rsa
+
 mkdir -p $PKG/install
 cat $CWD/slack-desc > $PKG/install/slack-desc
 
 cd $PKG
 /sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
-
Attached Files
File Type: txt openvpn_easy-rsa_slackbuild_fix.patch.txt (2.7 KB, 49 views)
 
Old 04-30-2013, 08:56 AM   #3
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Brilliant! Thanks. Is this likely to make its way into Slackware - or just to be used as a one off?
 
Old 04-30-2013, 09:06 AM   #4
fskmh
Member
 
Registered: Jun 2002
Location: South Africa
Distribution: Custom slackware64-current
Posts: 307

Rep: Reputation: 92
I suspect that Pat might be inclined to have a look because the changes in the last release also affect the sample files that usually go into /usr/doc/openvpn-x.y.z
Let's see what he decides to do. ;-)
 
Old 06-25-2014, 07:24 AM   #5
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Bump

I notice that the easy-rsa scripts are still missing in -current. Is anything being done to bring them back?
 
Old 02-01-2016, 01:57 PM   #6
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
bump

Any chance of the Easy-RSA scripts making it back into Slackware? They are the main way to generate the CA's and server and client certificates for OpenVPN - and the OpenVPN community is still offering and maintaining them here: https://github.com/OpenVPN/easy-rsa
 
Old 11-03-2016, 03:52 AM   #7
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
Another bump - may Pat or someone else will notice this thread
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] VPN easy to setup other than OpenVPN? qwertyjjj Linux - Newbie 6 01-07-2010 02:34 AM
Problem in OpenVPN /easy-rsa on Debian Sarge jlinkels Debian 0 07-26-2007 06:21 AM
rc scripts in slackware-current, rc.0 missing? GamerX Slackware 4 04-13-2007 09:02 AM
slackware-curent and kernel 2.6.6 Menestrel Slackware 4 06-15-2004 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration