aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-01-22 20:48:18 +0000
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>2009-01-22 20:48:18 +0000
commitd39c312b0df7fdb39de0a71265f16e49559a71cf (patch)
tree1c2dba36f8268c0274d23763cd6217a01426e4aa /app
parente6fbfe7499107f0911428fddd0d91f6f1211867d (diff)
downloadslackbuilds-d39c312b0df7fdb39de0a71265f16e49559a71cf.tar.gz
slackbuilds-d39c312b0df7fdb39de0a71265f16e49559a71cf.tar.bz2
kedpm: adding Manifest
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2092 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'app')
-rw-r--r--app/admin/kedpm/Manifest24
-rwxr-xr-xapp/admin/kedpm/kedpm.SlackBuild73
2 files changed, 94 insertions, 3 deletions
diff --git a/app/admin/kedpm/Manifest b/app/admin/kedpm/Manifest
new file mode 100644
index 00000000..aaa223c4
--- /dev/null
+++ b/app/admin/kedpm/Manifest
@@ -0,0 +1,24 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
+DIST kedpm-0.4.0.tar.gz 61636 MD5 6b83a646873f8ea00af9c6403aa259bc RMD160 7b37c06c93151a7177505c4dd796c33d5d1c77bb SHA1 449b733718918ad5d7c782e85c70c1a43873109f SHA256 f1dfb44a990110fddf132c9841f40aa2b9848ade4be56957a8a572574dc2fc28 SHA512 f6d73d4aab2b9184774e4a109bdf7401b96d9d9417e30a30d34958b9bee709e46676d68bb82e401b10b2eb32c56b6c8b1bb3947880cafb6e11d644d7f718a0f5
+MKBUILD kedpm.mkbuild 2624 MD5 5ebc10ea9dbcf05982ba9d0171e5b789 RMD160 ce5ef2d4b02b6cef2466e31c83669889853a093c SHA1 77d313dc88d669434fa2a889cd82d8b0d105a2d0 SHA256 285f6eaa38d8f985aaf3616f205029706511f5f65564cd2d75221acc8c26e599 SHA512 84400ff01eecf4e73e78926d55d150ac03731387af267ed362e0a9fa349f411d9ccc92f176eba67d21cb9815695b4d2e9650c3b8b81dac70dd75218a3e572a40
+SLACK-REQUIRED slack-required 78 MD5 3f913cad0376ed255eb558b084d67a47 RMD160 8b9cf61a494db772204a424c1dda524457de578c SHA1 3e28463e225d65713bfa176ea9027e3e7ea01692 SHA256 dbaeb4faf27440db6bf4ffd407635acaffd550e5a83085b4329f29321c483ed4 SHA512 21e2f699f245069c20f52619589a133516b6bfe3aed900e7d9c857b79349531f0c216448f325759e6226a3f2f8831058820205e4dd9c13351c3d9ae773b31163
+SLACKBUILD kedpm.SlackBuild 6700 MD5 51657718f2dcb46858a8f6f0429bc9d9 RMD160 7f73abe9d77df9ee76c6050733e05de6c4097a26 SHA1 a176ca165371aea662b068f08187a26bee6c541a SHA256 594cc6a8781738cdd60fca7ee083f28b9101f12dfb7b92e3e8a4f0e6d3ce3c08 SHA512 8647b618fa773ac0b1da371bd152c940d15fc21e16975b3034fa0fc7277107c51e1ad0e11959872cf2a63e0052277e509359fb833e1a24ec3d7668f401d0611f
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBAgAGBQJJeNzGAAoJEEHL93ESzgeidk8P+gMrKRCsrahNuHKDMjjI8fPB
+7sEUNSMfx05ZvcjslNEZgdS/bcrLDBAr9putO+wUI59IIyng/qrf9l97CWViA4sR
+DuIIaqKWDQdWwD9OXRq8Mg03FgbRh6jmsGDtB8CuxuWh8G8LxHs2qK21HsemENHW
+hYXvILWXBhc80XPTtYNVGAJ6lU9BdF6Y6dRDD0sacJ1x/wTVie0P+uiC1fZ2y7SV
+qxS6kza8Obd96LtqMoMkz39x2ns9dCKjpAAODxdFrOKMCPocvRkUVzdbulEAS64H
+CNVHNQu1/WaOGNgXvqgGsKxKqjRPPicihRdjLO+qa8ScoLB1Hnt05mhvRZLIseKY
+EG6XU9wamPkXlYmIJI7DrFBQKvaXrZOu5r4vk7kzCVJvrTSL6IgPn1Li3JskRaJF
+dNXoYWdsXNRHCEfeENC5blQHv4xdR9hf+9Z6XcI3cOpIi+RxFnYWQ/5Fb51RND1s
+jADvtG4FzBqH4MDTuZEijxwRsOnZLOr9Zv3v9C1xIeVZ4hOZ9rs0YVJENN9i7ffw
+tj3/0dzY3F/PBzxnDYYjsSPn2qTOMk9gryFj3Hk1cI44S7wj8s7Dr2WKqY+oyEaQ
+ZVk9ROnx38z3Wv0AUVPZpLlIMw/EgU70qTHvfqbaJHUuev/EHdgarj+1WMmIXIqZ
+CZxgUgDPSkPaiAWoXqWx
+=pBMs
+-----END PGP SIGNATURE-----
diff --git a/app/admin/kedpm/kedpm.SlackBuild b/app/admin/kedpm/kedpm.SlackBuild
index 30db1e15..c35fd1fd 100755
--- a/app/admin/kedpm/kedpm.SlackBuild
+++ b/app/admin/kedpm/kedpm.SlackBuild
@@ -15,7 +15,7 @@
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
#
# slackbuild for kedpm, by Silvio Rhatto
-# requires: pycrypto
+# requires:
# tested: kedpm-0.4.0
#
@@ -47,9 +47,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 +65,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 +85,72 @@ if [ ! -s "$SRC_DIR/$SRC" ] || ! gunzip -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