summaryrefslogtreecommitdiff
path: root/network/modsecurity-apache/modsecurity-apache.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/modsecurity-apache/modsecurity-apache.SlackBuild')
-rw-r--r--network/modsecurity-apache/modsecurity-apache.SlackBuild35
1 files changed, 27 insertions, 8 deletions
diff --git a/network/modsecurity-apache/modsecurity-apache.SlackBuild b/network/modsecurity-apache/modsecurity-apache.SlackBuild
index e065cf877e..807071a71e 100644
--- a/network/modsecurity-apache/modsecurity-apache.SlackBuild
+++ b/network/modsecurity-apache/modsecurity-apache.SlackBuild
@@ -5,10 +5,12 @@
# Written by pyllyukko
PRGNAM=modsecurity-apache
-VERSION=${VERSION:-2.6.1}
+VERSION=${VERSION:-2.6.5}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+CRS_VERSION="2.2.4"
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@@ -36,13 +38,6 @@ else
LIBDIRSUFFIX=""
fi
-set -e
-
-rm -rf $PKG
-mkdir -p $TMP $PKG $OUTPUT
-cd $TMP
-rm -rf ${PRGNAM}_${VERSION}
-
# The package can be verified with Breno Silva Pinto's PGP key (0x6980F8B0)
# If we have GPG installed, we try to verify the signature.
if [ -x "/usr/bin/gpg" -a -x "/usr/bin/gpgv" ]
@@ -60,10 +55,28 @@ then
then
/usr/bin/gpgv "${CWD}/${PRGNAM}_${VERSION}.tar.gz.asc"
fi
+
+ # Verify the Core Rule Set package.
+ set +e
+ /usr/bin/gpg --keyring trustedkeys.gpg --no-default-keyring --list-keys 0x9624FCD2 &>/dev/null
+ GPG_RET=${?}
+ set -e
+ if [ ${GPG_RET} -eq 0 -a \
+ -f "${CWD}/modsecurity-crs_${CRS_VERSION}.tar.gz.asc" ]
+ then
+ /usr/bin/gpgv "${CWD}/modsecurity-crs_${CRS_VERSION}.tar.gz.asc"
+ fi
fi
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf ${PRGNAM}_${VERSION}
tar xvf $CWD/${PRGNAM}_${VERSION}.tar.gz
cd ${PRGNAM}_${VERSION}
+tar xvf $CWD/modsecurity-crs_${CRS_VERSION}.tar.gz
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -104,6 +117,12 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/etc/httpd/extra
cat modsecurity.conf-recommended > $PKG/etc/httpd/extra/modsecurity-recommended.conf.new
+# The Core Rule Set
+mkdir -p ${PKG}/etc/httpd/crs
+cp -Rv modsecurity-crs_${CRS_VERSION}/* ${PKG}/etc/httpd/crs
+cat modsecurity-crs_${CRS_VERSION}/modsecurity_crs_10_config.conf.example > \
+ ${PKG}/etc/httpd/crs/modsecurity_crs_10_config.conf.new
+
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh