aboutsummaryrefslogtreecommitdiff
path: root/app/backup
diff options
context:
space:
mode:
Diffstat (limited to 'app/backup')
-rw-r--r--app/backup/rdiff-backup/Manifest4
-rwxr-xr-xapp/backup/rdiff-backup/rdiff-backup.SlackBuild62
2 files changed, 64 insertions, 2 deletions
diff --git a/app/backup/rdiff-backup/Manifest b/app/backup/rdiff-backup/Manifest
new file mode 100644
index 00000000..deddd060
--- /dev/null
+++ b/app/backup/rdiff-backup/Manifest
@@ -0,0 +1,4 @@
+DIST rdiff-backup-1.1.5.tar.gz 170477 MD5 37478b1d3e76ea521aac22216582ec58 SHA1 f7713506c537f1b33ed61c216ae3f1a2e4dec1cc SHA256 0cbfb4b3940ecc9e351bbd72b5a9c53af050f2f5f63d500e8ff714ab6c91e447 SHA512 87a4c8184b6409395eb22ac420dd87afe829893e43a96700ac0e9132cb832459f86de05ced1b35bd0a48f28be9924f0b9a9d261a11db416e3978a1cdc7a62051 RMD160 a34f2155eac6f1ebb9559c17ed0b4a360b408bcd
+MKBUILD rdiff-backup.mkbuild 3352 MD5 fdbe68f204ca040d022e4dcb4e757171 SHA1 4e867e94585b4209e4f4de450d142730b1f43db9 SHA256 97390ef770c972e6c4e87557b119d8968ce286b576d873ea2d0f74b991bd8cf7 SHA512 29d016cdfee218088dda63e6380de67a2726229e4ee8a1b4ead6fa5fc55324bbeedde5de7483097a3706d2817a478efc9bd20051da12193fc6aadf180b40f949 RMD160 f1d9441aad9e77fb58e71e8f004b147547d4e76d
+SLACK-REQUIRED slack-required 85 MD5 cb1c16908e086b6ec2e536e773e65b2f SHA1 8ac3524e97e545f8c7bdbe262f988a052150cbda SHA256 b2fc9b5b34ac54cd43a4fe8e4571ad73b6501abe29a900c92984929d2d85fe79 SHA512 d0b1dcd3cd61a91b914634521e12edc2b1f1576ce76f2d4a41655d34361c3a0fb83cedb3c3df14a62b188f4fb616cf3593651fa1beff9a6424d52531c7fe2a09 RMD160 7be7118f76867325d3d4827720be03f5a6f674f7
+SLACKBUILD rdiff-backup.SlackBuild 6795 MD5 bdd358a656efe20de6c5edc82104d23e SHA1 6e3b1ffd4b39e8883505fedc46ba2ae916df0895 SHA256 df2fc9fe7068cffa5cb828d6c4c5f0acc73a08fffb0292fc30972afd20be9c31 SHA512 c535522526b5f708a79f0e99466f532d2f7ad9712b423c03e628bb96b37d418c650c4305656b50157a331d67defb42542ad42eec7d9096f6d886842d4eef3c71 RMD160 38d56070d6873f47fcf79db97a43ab7a09bf89e6
diff --git a/app/backup/rdiff-backup/rdiff-backup.SlackBuild b/app/backup/rdiff-backup/rdiff-backup.SlackBuild
index 7a34f5b4..e7068b1a 100755
--- a/app/backup/rdiff-backup/rdiff-backup.SlackBuild
+++ b/app/backup/rdiff-backup/rdiff-backup.SlackBuild
@@ -16,7 +16,7 @@
#
# slackbuild for rdiff-backup, by Silvio Rhatto
# requires: librsync
-# tested: rdiff-backup-1.0.5
+# tested: rdiff-backup-1.1.5
#
# Look for slackbuildrc
@@ -31,7 +31,7 @@ CWD="$(pwd)"
SRC_NAME="rdiff-backup"
PKG_NAME="rdiff-backup"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=1.0.5}
+SRC_VERSION=${VERSION:=1.1.5}
PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
BUILD=${BUILD:=1rha}
SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
@@ -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