mirror of
https://github.com/Ponce/slackbuilds
synced 2024-09-28 03:20:39 +02:00
network/modsecurity-apache: Updated for version 2.9.8 and CRS 4.6.0.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
d54e25eb36
commit
8e5cbf1387
2 changed files with 30 additions and 16 deletions
|
@ -3,17 +3,34 @@
|
|||
# Slackware build script for ModSecurity
|
||||
|
||||
# Written by pyllyukko
|
||||
#
|
||||
# Redistribution and use of this script, with or without modification, is
|
||||
# permitted provided that the following conditions are met:
|
||||
#
|
||||
# 1. Redistributions of this script must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR "AS IS" AND ANY EXPRESS OR IMPLIED
|
||||
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
||||
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
|
||||
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
|
||||
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
cd $(dirname $0) ; CWD=$(pwd)
|
||||
|
||||
PRGNAM=modsecurity-apache
|
||||
SRCNAM=modsecurity
|
||||
VERSION=${VERSION:-2.9.7}
|
||||
VERSION=${VERSION:-2.9.8}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
PKGTYPE=${PKGTYPE:-tgz}
|
||||
|
||||
CRS_VERSION="3.2.0"
|
||||
CRS_VERSION="4.6.0"
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
|
@ -23,9 +40,6 @@ if [ -z "$ARCH" ]; then
|
|||
esac
|
||||
fi
|
||||
|
||||
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
||||
# the name of the created package would be, and then exit. This information
|
||||
# could be useful to other scripts.
|
||||
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
||||
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
||||
exit 0
|
||||
|
@ -54,10 +68,10 @@ set -e
|
|||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf ${SRCNAM}-${VERSION}
|
||||
tar xvf $CWD/${SRCNAM}-${VERSION}.tar.gz
|
||||
cd ${SRCNAM}-${VERSION}
|
||||
tar xvf $CWD/owasp-modsecurity-crs-${CRS_VERSION}.tar.gz
|
||||
rm -rf ${SRCNAM}-v${VERSION}
|
||||
tar xvf $CWD/${SRCNAM}-v${VERSION}.tar.gz
|
||||
cd ${SRCNAM}-v${VERSION}
|
||||
tar xvf $CWD/coreruleset-${CRS_VERSION}.tar.gz
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
|
@ -89,7 +103,7 @@ cat unicode.mapping > $PKG/etc/httpd/extra/unicode.mapping
|
|||
|
||||
# The Core Rule Set
|
||||
mkdir -p ${PKG}/etc/httpd/crs
|
||||
cp -Rv owasp-modsecurity-crs-${CRS_VERSION}/* ${PKG}/etc/httpd/crs
|
||||
cp -Rv coreruleset-${CRS_VERSION}/* ${PKG}/etc/httpd/crs
|
||||
mv -v ${PKG}/etc/httpd/crs/crs-setup.conf.example ${PKG}/etc/httpd/crs/crs-setup.conf.new
|
||||
mv -v ${PKG}/etc/httpd/crs/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf.example ${PKG}/etc/httpd/crs/rules/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf.new
|
||||
mv -v ${PKG}/etc/httpd/crs/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.example ${PKG}/etc/httpd/crs/rules/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf.new
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
PRGNAM="modsecurity-apache"
|
||||
VERSION="2.9.7"
|
||||
VERSION="2.9.8"
|
||||
HOMEPAGE="https://www.modsecurity.org/"
|
||||
DOWNLOAD="https://github.com/SpiderLabs/ModSecurity/releases/download/v2.9.7/modsecurity-2.9.7.tar.gz \
|
||||
https://github.com/SpiderLabs/owasp-modsecurity-crs/archive/v3.2.0/owasp-modsecurity-crs-3.2.0.tar.gz"
|
||||
MD5SUM="f2ccb0d6b3ba59a5677accb5569abbbd \
|
||||
9dd31ff7e74bd797d2013b93c02df304"
|
||||
DOWNLOAD="https://github.com/owasp-modsecurity/ModSecurity/releases/download/v2.9.8/modsecurity-v2.9.8.tar.gz \
|
||||
https://github.com/coreruleset/coreruleset/archive/v4.6.0/coreruleset-4.6.0.tar.gz"
|
||||
MD5SUM="69ba67a0d1e93404919b276980d88331 \
|
||||
2dfe58af935db7d3c843db9ba6c8794a"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="pyllyukko"
|
||||
EMAIL="pyllyukko AT maimed dot org"
|
||||
EMAIL="pyllyukko@maimed.org"
|
||||
|
|
Loading…
Reference in a new issue