diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-04-06 13:46:02 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2009-04-06 13:46:02 +0000 |
commit | 7dd37e2ceeab27332e86828477612b485fd8f575 (patch) | |
tree | 2766e7d67f6dda6593cc9dc49b501b8966fba5c9 /net/misc | |
parent | 17fcfc05db7671fe1aeeda10a72fe3b140af9aa3 (diff) | |
download | slackbuilds-7dd37e2ceeab27332e86828477612b485fd8f575.tar.gz slackbuilds-7dd37e2ceeab27332e86828477612b485fd8f575.tar.bz2 |
tor: updating to 0.2.0.34
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2140 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'net/misc')
-rw-r--r-- | net/misc/tor/Manifest | 25 | ||||
-rwxr-xr-x | net/misc/tor/tor.SlackBuild | 99 |
2 files changed, 106 insertions, 18 deletions
diff --git a/net/misc/tor/Manifest b/net/misc/tor/Manifest new file mode 100644 index 00000000..d8c894c7 --- /dev/null +++ b/net/misc/tor/Manifest @@ -0,0 +1,25 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST tor-0.2.0.34.tar.gz 2170871 MD5 f20011be23d5a76988233df12c346f41 RMD160 a7a1a78b32072524472c6b2973117689aab4823b SHA1 6797b85cf4bd44a3a1c3ff1ccb9c46b55f9391f9 SHA256 1bb19bcc52d365b47dd0e7bc06e3208786447a1cf759d6595c516a0f0cde3cb2 SHA512 7e7bc9a57213a4111d6e24df1d02debf7f4e8e5e1fab1987af667bee81c1ba15360f0bbadc0d4fc7c1844e6330d25bfc439bed7566c8a3565a6c6a912c3b3d2c +MISC rc.tor.new 301 MD5 63b5085a7fba2cc7a88653504b34493c RMD160 976c4a560173fffc854b519c67250fb8b43c72a8 SHA1 9352f5b64c054ce043721fb633979c1981674546 SHA256 b949e5b6f12920c52609a618f8972e29b310369d53617bb6629b61731a17e141 SHA512 e91108836f610871ada25941784b23b5a8510de27477108fc01c6e3b4e1c95107ca9c115984774eeaf5c7d82efcef32bbe5202f6d4bae4938cedda89d2474dcb +MKBUILD tor.mkbuild 3251 MD5 7522a21e8202d9c8c2ebc03065d65377 RMD160 14856d11503364e7abf76a51dbed4f9d015c22ba SHA1 c9a3a8abd5838ff16bcd4fa614f7352b3720dcda SHA256 31f1c51e2c9d76921bf0877fff00e5444a8b676b0ec130fe8c049a86f7b505bd SHA512 57d0585b8fdc9d7b2582ce0a26a1dafb71ff9b97bfc845fd8dfdcb5e657246466c5e13e48867c0c2fb2ba03717864b0d7878606879da68ebc34bc25deb33d21c +SLACK-REQUIRED slack-required 76 MD5 c7ca4740be239c51d69b3d4a7cce9528 RMD160 ed0db5575c2bdd8667623e3a34b1df9afa256704 SHA1 a22b8cb045bfce0c916de6ffd280773656531001 SHA256 94857833fe38ed3fecd7ec592c6d2ae46bb2f9c7bc7ac0f278c8e73c752b1a34 SHA512 546946b33f6f93ae79fd8a021d93115533baa5c9ca398369d54aedb6d7295a57ceb72311f9fab7ce4c43bb68bf79f3c2ed95580da1e8337dfe951cc535f54a3f +SLACKBUILD tor.SlackBuild 10973 MD5 a128159e63aaba29ddb4c2b6abb8a03f RMD160 dda5b1f7b6ff598b8250d8003f704af7ebfd05c8 SHA1 2bff120655553e22d8857c984e0a45a5cfacab93 SHA256 21dbf43462bea1fa50cad241e892598b10db78a5da1b15d8d3f4d1c40edc8924 SHA512 92c54fd4da012f744c929bb5718f1d4d424a9dde2b7d1bd483c2335bb0d3b3ba0ed4c4462986438860a7860ea6f766aa8a56ecdaa1ba19c701fce110143d98f1 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ2gZyAAoJEEHL93ESzgeiwmQP/jhJpZluKgx6o9rqv+eqidT4 +467ejmnCBQODy7rSFs8+L4CRic9Z4g9ptAGk9O34qgp8/oQ+7EsCCHL7GDv09Kcq +2KZVsGh3Ug6DQ5NLohdg29107H5Ko+cLi+trxrsytjyW2eacdFfTkGF5QgndReQS +AQFUgvLChTyweNjqdTJymHXTTMFvvzgriVDm5AYI7tjxHG7ujcw65X75qovPyNZL +d4pupE5XNit6hjqTBTtPAmRIDZFusAMqpNW21N9PNSOf3JLy17mdDw7Uv0Dtnm2/ +fSlpPEYCrNEsRVVAgn8pGZDIqbStiFs2vn0Twuf8Pwlu2zhaFKUK2l2QWrgvHtmp +Hpzn9pFeca50hDTgtXPo+ic/TnA9Gk7Hcuew63dtwQWW/r2j6/SwIoaTGbO+yVYc +T8P5qaC0EHkbjYKepooSZHjHPPk+hMdhuDhjaQijPSXNNfnNWpbo840L/iUHYSvY +2jBCoG/asidEytwdDSztEpN0RqajydxwMjvl4suc0VkEnmdOp6zUSq4uX9ZhZctJ +Sohoscm4RUQu4iM19ZowH9M5ER5Tou1pMYa4LhvodyV8G8nbK7hDQXgq0db2jp8t +QLs+EThhrRS6M2yDsxHaTtjJl/XjqxDTteUSUrkwo9E54Xb8nd7rLeYC9WA1ueaJ +tHhQzZhEj76V1I49QT53 +=di9F +-----END PGP SIGNATURE----- diff --git a/net/misc/tor/tor.SlackBuild b/net/misc/tor/tor.SlackBuild index e447e990..e7b2c0b6 100755 --- a/net/misc/tor/tor.SlackBuild +++ b/net/misc/tor/tor.SlackBuild @@ -15,8 +15,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for tor, by Silvio Rhatto -# requires: libevent -# tested: tor-0.2.0.32 +# requires: +# tested: tor-0.2.0.34 +# model: generic.mkSlackBuild $Rev: 805 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="tor" PKG_NAME="tor" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=0.2.0.32} +SRC_VERSION=${VERSION:=0.2.0.34} PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')" BUILD=${BUILD:=1rha} SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME TMP=${TMP:=/tmp} PKG=${PKG:=$TMP/package-$PKG_NAME} REPOS=${REPOS:=$TMP} +SLACKBUILD_PATH=${SLACKBUILD_PATH:="net/misc/tor"} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:="--sysconfdir=/etc"} @@ -47,9 +49,9 @@ NUMJOBS=${NUMJOBS:=""} LIBDIR="$PREFIX/lib" if [ "$ARCH" = "i386" ]; then - SLKCFLAGS="-O2 -march=i386 -mcpu=i686" + SLKCFLAGS="-O2 -march=i386 -mtune=i686" elif [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mcpu=i686" + SLKCFLAGS="-O2 -march=i486 -mtune=i686" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686" elif [ "$ARCH" = "s390" ]; then @@ -65,6 +67,7 @@ ERROR_WGET=31; ERROR_MAKE=32; ERROR_INSTALL=33 ERROR_MD5=34; ERROR_CONF=35; ERROR_HELP=36 ERROR_TAR=37; ERROR_MKPKG=38; ERROR_GPG=39 ERROR_PATCH=40; ERROR_VCS=41; ERROR_MKDIR=42 +ERROR_MANIFEST=43; # Clean up any leftovers of previous builds rm -rf "$PKG_WORK" 2> /dev/null @@ -128,6 +131,72 @@ echo Checking $SRC_DIR/$SRC with gpg using $SRC_DIR/$SIGNATURE... gpg --verify "$SRC_DIR/$SIGNATURE" "$SRC_DIR/$SRC" || exit $ERROR_GPG echo Success. +# Check Manifest file +if [ -e "$CWD/Manifest" ]; then + + # Manifest signature checking + if grep -q -- "-----BEGIN PGP SIGNED MESSAGE-----" $CWD/Manifest; then + echo "Checking Manifest signature..." + gpg --verify $CWD/Manifest + if [ "$?" != "0" ]; then + exit $ERROR_MANIFEST + fi + fi + + MANIFEST_LINES="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | wc -l`" + + for ((MANIFEST_COUNT=1; MANIFEST_COUNT <= $MANIFEST_LINES; MANIFEST_COUNT++)); do + + MANIFEST_LINE="`grep -E -v "^(MKBUILD|SLACKBUILD)" $CWD/Manifest | head -n $MANIFEST_COUNT | tail -n 1`" + MANIFEST_FILE="`echo $MANIFEST_LINE | awk '{ print $2 }'`" + MANIFEST_FILE_TYPE="`echo $MANIFEST_LINE | awk '{ print $1 }'`" + + if [ -e "$SRC_DIR/$MANIFEST_FILE" ]; then + MANIFEST_FILE="$SRC_DIR/$MANIFEST_FILE" + else + MANIFEST_FILE="`find $CWD -name $MANIFEST_FILE`" + fi + + if [ ! -e "$MANIFEST_FILE" ] || [ -d "$MANIFEST_FILE" ]; then + continue + fi + + echo "Checking Manifest for $MANIFEST_FILE_TYPE $MANIFEST_FILE integrity..." + + SIZE_SRC="`wc -c $MANIFEST_FILE | awk '{ print $1 }'`" + SIZE_MANIFEST="`echo $MANIFEST_LINE | awk '{ print $3 }'`" + + # Check source code size + if [ "$SIZE_SRC" != "$SIZE_MANIFEST" ]; then + echo "SIZE Manifest: $SIZE_MANIFEST; SIZE $SRC: $SIZE_SRC" + exit $ERROR_MANIFEST + else + echo "Size match." + fi + + # Check source code integrity + for ALGO in md5 rmd160 sha1 sha256 sha512; do + if [ $ALGO = "rmd160" ]; then + ALGO_SRC="`openssl rmd160 $MANIFEST_FILE | awk '{ print $2 }'`" + else + ALGO_SRC="`"$ALGO"sum $MANIFEST_FILE | awk '{ print $1 }'`" + fi + ALGO="`echo $ALGO | tr '[:lower:]' '[:upper:]'`" + ALGO_MANIFEST=$(echo $MANIFEST_LINE | sed "s/.* $ALGO //" | awk '{ print $1 }') + if [ "$ALGO_SRC" != "$ALGO_MANIFEST" ]; then + echo "$ALGO Manifest: $ALGO_MANIFEST; $ALGO $SRC: $ALGO_SRC" + exit $ERROR_MANIFEST + else + echo "$ALGO match." + fi + done + + done + +else + exit $ERROR_MANIFEST +fi + # Untar cd "$PKG_WORK" tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TAR @@ -135,10 +204,11 @@ PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`" cd "$PKG_SRC" # Patch source -patches=" +patches=" [[PATCH URLS]] $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff" for patch in $patches; do + patch="`basename $patch`" if [ -f "$CWD/$patch" ]; then patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH elif [ -f "$CWD/patches/$patch" ]; then @@ -147,15 +217,7 @@ for patch in $patches; do gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH elif [ -f "$CWD/patches/$patch.gz" ]; then gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH - fi -done - -if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then - for patch_url in [[PATCH URLS]]; do - patch="`basename $patch_url`" - if [ ! -s "$SRC_DIR/$patch" ]; then - wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET - fi + elif [ -f "$SRC_DIR/$patch" ]; then if [ "`basename $patch .gz`" != "$patch" ]; then gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH elif [ "`basename $patch .bz2`" != "$patch" ]; then @@ -163,8 +225,8 @@ if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then else patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH fi - done -fi + fi +done # Configure CFLAGS="$SLKCFLAGS" \ @@ -279,7 +341,8 @@ fi # Build the package cd "$PKG" -makepkg -l y -c n "$REPOS/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG +mkdir -p $REPOS/$SLACKBUILD_PATH +makepkg -l y -c n "$REPOS/$SLACKBUILD_PATH/$PKG_NAME-$PKG_VERSION-$ARCH-$BUILD.tgz" || exit $ERROR_MKPKG # Delete source and build directories if requested if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then |