]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
tor: signature checking, initscript and slack-required
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Wed, 13 Sep 2006 23:26:55 +0000 (23:26 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Wed, 13 Sep 2006 23:26:55 +0000 (23:26 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@188 370017ae-e619-0410-ac65-c121f96126d4

clamav/clamav.SlackBuild
tor/rc.tor.new [new file with mode: 0755]
tor/slack-required [new file with mode: 0644]
tor/tor.SlackBuild

index c1431ca8511a7ba3be0b5f8a1db68578bca0405b..8371ec8922c1d5826736d6fba5b23600cee185d1 100755 (executable)
@@ -59,7 +59,7 @@ if [ ! -f "$SRC_DIR/$PACKAGE-key.asc" ]; then
   wget "$KEY" -O "$SRC_DIR/$PACKAGE-key.asc" && gpg --import $SRC_DIR/$PACKAGE-key.asc
 fi
 
-gpg --verify $SRC_DIR/$SRC.sig $SRC || echo WARNING: Could not check signature or WRONG signature found.
+gpg --verify $SRC_DIR/$SRC.sig $SRC_DIR/$SRC || echo WARNING: Could not check signature or WRONG signature found.
 
 if [ "$ARCH" == "x86_64" ]; then
   LIBDIR="/usr/lib64"
diff --git a/tor/rc.tor.new b/tor/rc.tor.new
new file mode 100755 (executable)
index 0000000..f90b6d3
--- /dev/null
@@ -0,0 +1,20 @@
+#!/bin/sh
+#
+# init script for tor
+#
+
+PID="/var/run"
+PRIVOXY_PID="$PID/privoxy.pid"
+TOR_PID="$PID/tor.pid"
+USER="privoxy"
+
+if [ -f $TOR_PID ]; then
+  if ps `cat $TOR_PID` | grep -q tor; then
+    kill `cat $TOR_PID`
+  fi
+  rm $TOR_PID
+fi
+
+sudo -u $USER /usr/bin/tor &> /dev/null &
+echo "$!" > $TOR_PID
+
diff --git a/tor/slack-required b/tor/slack-required
new file mode 100644 (file)
index 0000000..dd6fade
--- /dev/null
@@ -0,0 +1 @@
+libevent
index e17078b8ff471320d6dbf219dd18d1e3796738f8..4017448d3136593d0f4f515ce8dd71f1860fa57b 100755 (executable)
@@ -4,7 +4,17 @@
 # by rhatto at riseup.net
 #
 
-# TODO: signature checking
+if [ -s "slack-required" ]; then
+  echo Recomended and required packages for building tor are:
+  cat slack-required | sed -e 's/^/\t/'
+  if [ "$INTERACT" != "no" ]; then
+    echo If you dont have those installed, press Ctrl-C. Otherwise, hit ENTER.
+    read crap
+  else
+    echo Sleeping 3 seconds...
+    sleep 3
+  fi
+fi
 
 CWD="`pwd`"
 
@@ -47,8 +57,14 @@ fi
 
 if [ "$RTOOL" == "wget" ] && [ ! -f "$SRC_DIR/$SRC" ]; then
   wget "$URL" -O "$SRC_DIR/$SRC"
+  wget "$URL.asc" -O "$SRC_DIR/$SRC.asc"
 fi
 
+gpg --keyserver subkeys.pgp.net --recv-keys 0x28988BF5
+gpg --keyserver subkeys.pgp.net --recv-keys 0x165733EA
+gpg --verify $SRC_DIR/$SRC.asc $SRC_DIR/$SRC || echo WARNING: Could not check signature or WRONG signature found.
+sleep 3
+
 TMP="$TMP/$PACKAGE"
 rm -rf $TMP
 mkdir -p $TMP
@@ -102,6 +118,10 @@ for file in AUTHORS ChangeLog INSTALL LICENSE README; do
   cp $CWD/$file* usr/doc/$PACKAGE-$VERSION/
 done
 
+# install script
+echo '( chroot . /sbin/ldconfig )' > install/doinst.sh
+echo '( if [ ! -f "etc/rc.d/rc.tor" ]; then mv etc/rc.d/rc.tor.new etc/rc.d/rc.tor ; fi )' >> install/doinst.sh
+
 makepkg -c y -l y $REPOS/$PACKAGE-$VERSION-$ARCH-$BUILD.tgz
 
 if [ "$CLEANUP" == "yes" ]; then