tor-0.3.4.8-i686.tgz
tor-0.3.4.8-i686.tgz.tazpkg
**Note, I created the user and group tor on my system both with the id "220"
Part 1 - Building a Stand Alone Version of Tor with Slackbuild Scripts for TazPup
I decided to make this it's own thread because I wanted to give some background on a few topics. This is relevant to puppy in general but I'm focussing on TazPup.
some observations
1. The tor website only offers the browser bundle of tor,
2. distribution specific versions of Tor might be tightly integrated with the linux distribution, which may cause problems with puppy and;
3. by compiling a distribution specific version of a package, it will be better integrated with the package manager (in terms of finding dependencies).
The distribution I'm focusing on is TazPup and I chose to use the slackbuild scripts as the starting point to build Tor.
The reason, that I chose the slackbuild scripts is that they are easy to modify and tend not to have distribution specific quirks to them, Slackware is known for simplicity where in contrast I find the Debian package management system very complex and fragile.
The kernal sources are required to build Tor because the header file limits.h is imported in the c code. The dependence on the kernal sources is probably pretty lose but I'm told the kernal sources that I used in my build are compatable with TazPup.
To get your kernal version type:
Code: Select all
uname -a
I ran the configure scripts prior to even trying the slackbuild scripts. One might want to do this because the slackbuild scripts often re-do a lot of tasks each time (e.g. extracting files to a temporary folder). and this could slow down the troubleshooting process.
After mouting the sfs file containing the kernal sources I searched for limits.h
Code: Select all
sh-4.4# find /usr/src -name 'limits.h'
/usr/src/linux/arch/arm/include/asm/limits.h
/usr/src/linux/include/uapi/linux/limits.h
/usr/src/linux/usr/include/linux/limits.h
Code: Select all
export CPPFLAGS="-I/usr/include -I/usr/src/linux/usr/include"
Code: Select all
cd /home/tux/Downloads/tor.tar.gz.extracted/tor
./tor.slackbuild
If you use a different version of the sourcecode then one must modify the slackbuild script to point to the correct version of the source code.
In my case I simply had to modify the line containing the following code:
Code: Select all
VERSION=${VERSION:-0.3.4.8}
When using slackbuild scripts I have at times tried to be fancy and modify the script to cover all specifics to changing the distribution but a quick an dirty thing to do instead is just comment the few lines at the end where the package is built:
Code: Select all
#mkdir -p $PKG/install
#cat $CWD/slack-desc > $PKG/install/slack-desc
#cat $CWD/doinst.sh > $PKG/install/doinst.sh
#
#cd $PKG
#/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
Code: Select all
/tmp/SBo/package-tor
/tmp/SBo/tor-0.3.4.8
Now if you look at the lines that I commented out we see two distribution specific items. The first is the information about the package "slack-desc" and the second is the post install script. In some distributions (e.g. debian) these can be quite complicated and I thought rather than trying to figure out how to create these from scratch on TazPup, I would use the conversion tools that are built into tazpkg.
After doing some googling I found out that a slackware package is simply a tar archive compressed with gunzip. If you want to extract a tazpackage you can change the .tgz to .tar.gz extension and use a tool (e.g. uextract) to extract the tar archive. Actually it isn't really necessary to change the extension but the .tgz file extention might not be set up to be associated with uextract, and changing the extension is faster than setting up uextract to open .tgz files.
Anyway, one can see that I shouldn't have commented out the lines:
Code: Select all
#mkdir -p $PKG/install
#cat $CWD/slack-desc > $PKG/install/slack-desc
#cat $CWD/doinst.sh > $PKG/install/doinst.sh
Code: Select all
cd /tmp/SBo/package-tor
tar -cvzf /home/tux/tor-0.3.4.8-i686.tgz ./*
Code: Select all
tazpkg convert /home/tux/tor-0.3.4.8-i686.tgz
Code: Select all
tazpkg install /home/tux/tor-0.3.4.8-i686.tazpkg