From 5ee4c14efb7a55b41a7f3ebe14a9377f26bf2983 Mon Sep 17 00:00:00 2001 From: rhatto Date: Fri, 1 May 2009 15:27:08 +0000 Subject: tahoe: updating tahoe and dependencies git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2179 370017ae-e619-0410-ac65-c121f96126d4 --- app/backup/tahoe/Manifest | 24 ++++++++++++ app/backup/tahoe/slack-required | 4 ++ app/backup/tahoe/tahoe.SlackBuild | 82 ++++++++++++++++++++++++++++++++++++--- 3 files changed, 104 insertions(+), 6 deletions(-) create mode 100644 app/backup/tahoe/Manifest (limited to 'app/backup/tahoe') diff --git a/app/backup/tahoe/Manifest b/app/backup/tahoe/Manifest new file mode 100644 index 00000000..860d0c28 --- /dev/null +++ b/app/backup/tahoe/Manifest @@ -0,0 +1,24 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + +DIST allmydata-tahoe-1.4.1.tar.bz2 2238916 MD5 a602682366d70a6a2f8bb5026fc75917 RMD160 fe290f528ca1f81a0c5d13d2d598a8c73b119374 SHA1 d7a3f0d9a593f148526d39f6c8a382b0be52e683 SHA256 ebe780fb55ca188bcbbdb16aac5eae73f6fe89cd5c9ae2a3a9e3966ec3e8517c SHA512 623ce96bbb4ffd77e4128b0c37e91e573335cb88c57e65fafcf42df949e880ab6be21369c632d7fb6d01fbd69bd5ed890145e80c9c57a2da9333d14f050a7a40 +MKBUILD tahoe.mkbuild 2935 MD5 0ac99ccd890ef96beb66d4873c441d19 RMD160 51971ce9b58b53790df873876166827316206fd6 SHA1 2a6a08f09e2dccd0070002df865075d1f60b4b77 SHA256 db68e8a609717d6dab1e25b766f3d93b65bb356ee76aa42e3918f756ddf8bcbf SHA512 2fa9ddf695bbde9236150adeafa064b9b5b387dc018e4229882e45d0feef9f84016c134c0f610f929b053adfc2033244fc3d72a9f61e3058668a86077c345637 +SLACK-REQUIRED slack-required 223 MD5 4a1dca9716f46125bfa35f9e04d6d078 RMD160 29d0e0829d169ada4a42cbc3e8ed4b6c7d68ecb7 SHA1 5688f34b6f1f41c51b8f74027457263c4ea2457c SHA256 d8599d1c4927d0eddb5f1f6bf83075370cdfa69e899083da53457859a8441458 SHA512 abad9f1b26a82899e1a9f5eb0f25b927ffdb09973410ac4d1e6738871a2063512be90b89d12dac00a95c347b5f6c7622ac5b489ce7a67a5c0aad0c6695f011f6 +SLACKBUILD tahoe.SlackBuild 6910 MD5 d22c1c9a02c0d2a7850b330815d998dd RMD160 bc36def815c9b7f3e35a10e62de475ebe5b11e71 SHA1 83e67b96bd32bb014ccdd3506622837cf4e856b0 SHA256 005e841dc73e1a5b6d9fd1bd60ac3baaee9c39d23ed797dc5bc70479df85f905 SHA512 c8307ca0037302a9f790d5f1466703025a24a18c11e5d61ab202d91a37c745b2b7922895ef814117d071766956e9fe352370ad8c9a6dbf07f0bb4e8211fea0a5 +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v1.4.9 (GNU/Linux) + +iQIcBAEBAgAGBQJJ+xYQAAoJEEHL93ESzgeiQPQQALos7VFWhMGxScDS6Zc0fzDx +eC9JLUH4C7UGsTS8SbERIb8dnxT6RjfgkxKTwNYIwEmiubgrx2lfT0JA0lu1in84 +t9xKfO5EVaD0Y646PuMEydd+c7BDzESgs2y0GBPL0OaMr4rWE4KnT9ODHvoFoIKC +v0j1eNDHpa4S1nwnKW5Yv8xTHOZksmPT9ySDWpP/F9P09ijsV0QAEicgQizR6CjF +DHEeimCY8OLGbBvy1TVI72lOxH68m9mSziIFRJel/JBPz7m65hkLCWFExHznMQAq +WDcaw9kl7MDOMRC9xEmKtTlETyk+6k5CzN2zXRib4rfcbEIGDzz+v5JVIAtG6FhS +ifosT16YutwWsBF1TkJMOHXFVuX85082dBOChCUmRMTemb6HVMv2HjznismPp/JU +BjRHboj8qwlq7ac2R7uS3fVzAtjjXfYMCLaisSUtgb8d9ptNhuedEu1O6Xl0wIeu +xHElnwzlmrFqhYW2q2HQyTmkPM8WNibpO3Y8p8UzrsLs1KsAmSOvPHMt9CicZUFv +s0wsy7fVscoi+jrelb8wdNyGBeu5nk2p6L0GUTQm/Qe75o8xB2tK+XAM3+rjXvt0 ++wokcbJrTFB64pruKXB1PrvrYtxBr3Oui+c0+AUrNNIXY7X62qc+T5157hWtxMdx +mUSMTGbzSea5FVJCxFZq +=Jo/n +-----END PGP SIGNATURE----- diff --git a/app/backup/tahoe/slack-required b/app/backup/tahoe/slack-required index c4b5f57c..1851d0a1 100644 --- a/app/backup/tahoe/slack-required +++ b/app/backup/tahoe/slack-required @@ -9,3 +9,7 @@ Nevow zope.interface Twisted setuptools +pyOpenSSL +pyutil +argparse +zbase32 diff --git a/app/backup/tahoe/tahoe.SlackBuild b/app/backup/tahoe/tahoe.SlackBuild index 05a5ba57..26b53cce 100755 --- a/app/backup/tahoe/tahoe.SlackBuild +++ b/app/backup/tahoe/tahoe.SlackBuild @@ -15,8 +15,9 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for tahoe, by Silvio Rhatto -# requires: zfec foolscap simplejson pycryptopp zope.interface setuptools -# tested: tahoe-1.2.0 +# requires: +# tested: tahoe-1.4.1 +# model: generic.mkSlackBuild $Rev: 805 $ # # Look for slackbuildrc @@ -31,13 +32,14 @@ CWD="$(pwd)" SRC_NAME="tahoe" PKG_NAME="tahoe" ARCH=${ARCH:=i486} -SRC_VERSION=${VERSION:=1.2.0} +SRC_VERSION=${VERSION:=1.4.1} 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:="app/backup/tahoe"} PREFIX=${PREFIX:=/usr} PKG_WORK="$TMP/$SRC_NAME" CONF_OPTIONS=${CONF_OPTIONS:=""} @@ -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 @@ -84,6 +87,72 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! bunzip2 -t "$SRC_DIR/$SRC" 2> /dev/null; then wget "$URL" -O "$SRC_DIR/$SRC" || exit $ERROR_WGET fi +# 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 @@ -142,7 +211,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 -- cgit v1.2.3