diff options
author | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2008-12-28 17:31:33 +0000 |
---|---|---|
committer | rhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4> | 2008-12-28 17:31:33 +0000 |
commit | b80678c5effd3008c5994bedfe511987bb265c59 (patch) | |
tree | 6c966137ceef83e3ab9255cbcaad22e8d80fe1ba /app/backup/duplicity | |
parent | f1caea946bec5d4505bfdcb0e45d487c92a48156 (diff) | |
download | slackbuilds-b80678c5effd3008c5994bedfe511987bb265c59.tar.gz slackbuilds-b80678c5effd3008c5994bedfe511987bb265c59.tar.bz2 |
duplicity: adding more dependencies and manifest
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2048 370017ae-e619-0410-ac65-c121f96126d4
Diffstat (limited to 'app/backup/duplicity')
-rw-r--r-- | app/backup/duplicity/Manifest | 4 | ||||
-rwxr-xr-x | app/backup/duplicity/duplicity.SlackBuild | 60 | ||||
-rw-r--r-- | app/backup/duplicity/slack-required | 2 |
3 files changed, 65 insertions, 1 deletions
diff --git a/app/backup/duplicity/Manifest b/app/backup/duplicity/Manifest new file mode 100644 index 00000000..1d1160d8 --- /dev/null +++ b/app/backup/duplicity/Manifest @@ -0,0 +1,4 @@ +DIST duplicity-0.5.03.tar.gz 146490 MD5 80273525ae47e8075078a855cf4a134e SHA1 7c78ec834fb742c1499680db4024e625f13fd21a SHA256 d6e3929dc515b72916bfe7cadb25cbe7b383b9f699353bed65c16029ea1cda81 SHA512 41258134b0b5fb4bf19f849a3f0dc0e66da38d21769934564b0019e0aa68fe253c2f173232eede6e79b9d90d8abfe8329d67cfccaaec5860669caee6ec001424 RMD160 4841488694a1d9c1229fbf298e9a46c5a2e96007 +MKBUILD duplicity.mkbuild 3257 MD5 4e0deb66fd464a3a296bf976c89252a9 SHA1 dca986a21c156d724d37d097e17334ea88427b08 SHA256 4d1f8e4c06dfd738f3f0be22e90e044496dc0c436f88ea685bbcfcb8cae3da00 SHA512 84208f007672182ffa0eb9e70b7f43fd4e99ca348c5e45b25a5ff1e47cb0223226ed325bab7818c6e3084ec7808917e7553484eccf3c80136de74243549fa798 RMD160 d75bf0877b5b40338ab770e5298f7164e462b989 +SLACK-REQUIRED slack-required 107 MD5 f35f4cde74f4c8647d2c8aac01927ade SHA1 ff30133a4e23609f8b3faddf26c6fa90487e769b SHA256 127536baf911bc2e6d86dc801231a14cc9dc769bd9f08ef9909c44f2a95a1513 SHA512 0327c883e77e93aa9360c2aa2b06a568947f8e3c495a0c8e526a5718ea3718f7b4f61c37b1ee2906bf98f05df965114e9f71b746b33ec696ec93c74aef421334 RMD160 6679ef54a25ef75d592edb3da6953b10def79a06 +SLACKBUILD duplicity.SlackBuild 6690 MD5 256ca8c11294a61da528acaede99f298 SHA1 f4cf9fcaac4be2d1c88ada555105903b4369b9dc SHA256 1131d000275f591bb4e482ba14b1363235d80447a4e405e7c9dfd6f3c981942a SHA512 00ad4446a2888d0e7a992b93cc6bc8e52fadb1416ae6f3bd19fa534bb2e38bca8ece8a46334b5f00c98fd05f80b6476bf2da46ed24c159951191832298f7ec46 RMD160 be78a1341eb32367b1bf56cf2adb8007ea007d58 diff --git a/app/backup/duplicity/duplicity.SlackBuild b/app/backup/duplicity/duplicity.SlackBuild index 46674216..c50d8ba8 100755 --- a/app/backup/duplicity/duplicity.SlackBuild +++ b/app/backup/duplicity/duplicity.SlackBuild @@ -15,7 +15,7 @@ # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA # # slackbuild for duplicity, by Silvio Rhatto -# requires: librsync +# requires: librsync py-gnupg pexpect # tested: duplicity-0.5.03 # @@ -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,63 @@ 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_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 sha1 sha256 sha512 rmd160; 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 diff --git a/app/backup/duplicity/slack-required b/app/backup/duplicity/slack-required index 9e640165..23a51f59 100644 --- a/app/backup/duplicity/slack-required +++ b/app/backup/duplicity/slack-required @@ -2,3 +2,5 @@ # # dependency [condition] [version]] librsync +py-gnupg +pexpect |