LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


LinkBack Search this Thread
Old 04-30-2013, 05:27 AM   #1
Registered: Jun 2008
Posts: 260

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

According to:

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
Registered: Jun 2002
Location: South Africa
Distribution: Slackware64-current multilib
Posts: 225

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

--- openvpn.SlackBuild  2013-04-30 15:38:18.000000000 +0200                                                                                                                                                    
+++ openvpn.SlackBuild  2013-04-30 15:33:42.000000000 +0200                                                                                                                                                    
@@ -23,7 +23,7 @@                                                                                                                                                                                              
+VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}                                                                                                                    
 # Automatically determine the architecture we're building on:                                                                                                                                                 
@@ -38,6 +38,19 @@                                                                                                                                                                                             
 NUMJOBS=${NUMJOBS:-" -j7 "}                                                                                                                                                                                   
+# 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                                                                                                                                                           
+  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                                                                                                                                                                                         
 if [ "$ARCH" = "i486" ]; then                                                                                                                                                                                 
   SLKCFLAGS="-O2 -march=i486 -mtune=i686"                                                                                                                                                                     
@@ -52,13 +65,14 @@
 rm -rf $PKG
 mkdir -p $TMP $PKG
 cd $TMP
+if [ -z $VERSION ]; then
+    echo "Could not parse version of tarball."
+    exit 1
 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.
-# 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 @@
 mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION
-  NEWS PORTS README* sample-config-files sample-keys sample-scripts easy-rsa \
+cp -a AUTHORS COPY* INSTALL* PORTS README* sample/sample* \
+# 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
+# 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, 10 views)
Old 04-30-2013, 08:56 AM   #3
Registered: Jun 2008
Posts: 260

Original Poster
Rep: Reputation: 16
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
Registered: Jun 2002
Location: South Africa
Distribution: Slackware64-current multilib
Posts: 225

Rep: Reputation: 52
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. ;-)


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
Trackbacks are Off
Pingbacks are On
Refbacks are 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

All times are GMT -5. The time now is 07:32 AM.

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