aboutsummaryrefslogtreecommitdiff
path: root/dev/libs/eventlog
diff options
context:
space:
mode:
Diffstat (limited to 'dev/libs/eventlog')
-rw-r--r--dev/libs/eventlog/Manifest23
-rwxr-xr-xdev/libs/eventlog/eventlog.SlackBuild86
2 files changed, 101 insertions, 8 deletions
diff --git a/dev/libs/eventlog/Manifest b/dev/libs/eventlog/Manifest
new file mode 100644
index 00000000..9e8ae806
--- /dev/null
+++ b/dev/libs/eventlog/Manifest
@@ -0,0 +1,23 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+DIST eventlog_0.2.9.tar.gz 330517 MD5 76e3d7a0b8f335c12099e9b91191fbf1 RMD160 e5b75a133b0e173425f4c2dd4d86a11c73dec6af SHA1 2cc6a4d1dc07ab84832f2cd44822ee7b339deb51 SHA256 15146cb72e322766bb8f93b7b0d254d4b9a53826ee65de335dc6ac4376cd51b1 SHA512 c37636cf3cd37a9cb9bafbc56c414d4a6baacfb866af0ff8728a8529d619d0716e2b7cd40f3bdcd9d8eff964e564737692409f20a20235ecaee3281e310435e5
+MKBUILD eventlog.mkbuild 2880 MD5 22d7aa0018ad630c70f1aa4c84dd8eba RMD160 aa67d6eea94fed33d3dbcd01104102334622acaf SHA1 641bdbbad0353f7d3fb4ecd323a089bc1f8dcd84 SHA256 b19e95a80e4d2e43381a0b4c93bfc96253dae3923accc297653eb5acccf6db65 SHA512 856e1f1b1edcd25f3e011059377962d1b6bcdb28c8652b555496e574f2ec44f25495cd4791b6e09b72b976e49ff224cc978367c7b812b8722321b8d12a9065f9
+SLACKBUILD eventlog.SlackBuild 7004 MD5 684a5633d65459bfd00b43d0aef1750b RMD160 c2f99f0a8e48888e59883c164c7056953ce0edee SHA1 59dcd9c59391932a580130546e0f2cdb7fbf4d78 SHA256 6bbd8baeee2ffa76627f8b5458072748c67ef68d8e8a7672a7fb85032aa4f08f SHA512 132a899e4fc741a9ee51e61fd3d36471a001029d2255c236167287128c65e3de1dd3b4dd9eb23f2c26cda66f6c13c4b923a901cc3e942ff60f4484a5e49172af
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.9 (GNU/Linux)
+
+iQIcBAEBCAAGBQJKWpwtAAoJEEHL93ESzgeiKwUP/2CD7kqNfyGk+B5/Nq1BJNGP
+qc38APLISfnNYqOfh4YVdvwcrzvFhaU5PbUVhW/8AlpkhSAaqTr/AAIEADCEfEQT
+s0A3SsIECjBvRzf4xrBc2ArVFWXnZUNWDfcVUcXlNWC+/nO4D7b0gbfez2PoWyS8
+yuKFX4sKFLiN2zzkoiWJh9q50kf51qEgBZxndNN8F8VMKlkb1h5084oav+0Gk2Z/
+R2XGARSEPU+GGKv5F0Yh7AbdWP7VGXvz2XbcwRC9lPN7X0/i0lU0AzxOuhlFWWsh
+oWGTazrLmPUda/xJOW93srv4sWsCDltKxGEIhsnP4yKJhkueQ5O7Ci/I6SNXfO0l
+O1pKBrHhedsEiIiNhjv2VpejRcaEqMMtsODFUcCvPfqQAs2Wm/wZ08y7x6AiEyGH
+Ha6iDOecWrfbHyRfQNDn3szekcTs01viOARI7vKtFkn6pqxbGgku/72TKc1YkE88
+dgUIpzqZnCBiAbd+UT0JbGI978ElkLIOSzJIvs0O5jySeeEdRTRw2+lr4Hj/3H8U
+a5kMbGVm59PEg9D4M1/d97feiWlZGFvkGYENyXQiKAZZhwFzltlJ+ECclGdkRA36
+zIgGrwPAREC5HiikPg3/9rUppiKmYB9IBSLRfD9GnPwvVP2jfxlyBscjJwYfKRbr
+oRlWNNzL19ynS0vPV+Zz
+=+fVD
+-----END PGP SIGNATURE-----
diff --git a/dev/libs/eventlog/eventlog.SlackBuild b/dev/libs/eventlog/eventlog.SlackBuild
index 8830087d..d5fc82c7 100755
--- a/dev/libs/eventlog/eventlog.SlackBuild
+++ b/dev/libs/eventlog/eventlog.SlackBuild
@@ -16,7 +16,8 @@
#
# slackbuild for eventlog, by Silvio Rhatto
# requires:
-# tested: eventlog-0.2.7
+# tested: eventlog-0.2.9
+# model: generic.mkSlackBuild $Rev: 805 $
#
# Look for slackbuildrc
@@ -31,13 +32,14 @@ CWD="$(pwd)"
SRC_NAME="eventlog"
PKG_NAME="eventlog"
ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=0.2.7}
+SRC_VERSION=${VERSION:=0.2.9}
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:="dev/libs/eventlog"}
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
@@ -77,13 +80,79 @@ mkdir -p "$REPOS" || exit $ERROR_MKDIR
mkdir -p "$PKG_WORK" || exit $ERROR_MKDIR
# Dowload source if necessary
-SRC="$SRC_NAME-$VERSION.tar.gz"
-URL="http://www.balabit.com/downloads/files/syslog-ng/sources/stable/src/$SRC"
+SRC="$SRC_NAME"_"$VERSION.tar.gz"
+URL="http://www.balabit.com/downloads/files/eventlog/0.2/$SRC"
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
@@ -145,9 +214,10 @@ EODESC
# 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" ]; then
+if [ "$CLEANUP" == "yes" ] || [ "$1" = "--cleanup" ]; then
rm -rf "$PKG_WORK" "$PKG"
fi