Browse Source

new package: apache-security 2.1.1 (Apache Extension: Security)

master
parent
commit
4cfc2f7961
  1. 23
      apache-security/apache-security.conf
  2. 115
      apache-security/apache-security.spec

23
apache-security/apache-security.conf

@ -0,0 +1,23 @@
##
## apache-security.conf -- Apache configuration for mod_security
##
LoadModule security2_module @l_prefix@/libexec/apache/mod_security.so
SecRuleEngine On
SecRequestBodyAccess On
SecResponseBodyAccess Off
SecDebugLog @l_prefix@/var/apache/log/security-debug.log
SecDebugLogLevel 0
SecAuditEngine RelevantOnly
SecAuditLogRelevantStatus ^5
SecAuditLogParts ABIFHZ
SecAuditLogType Serial
SecAuditLog @l_prefix@/var/apache/log/security-audit.log
SecRequestBodyLimit 131072
SecRequestBodyInMemoryLimit 131072
SecResponseBodyLimit 524288

115
apache-security/apache-security.spec

@ -0,0 +1,115 @@
##
## apache-security.spec -- OpenPKG RPM Package Specification
## Copyright (c) 2000-2007 OpenPKG Foundation e.V. <http://openpkg.net/>
## Copyright (c) 2000-2007 Ralf S. Engelschall <http://engelschall.com/>
##
## Permission to use, copy, modify, and distribute this software for
## any purpose with or without fee is hereby granted, provided that
## the above copyright notice and this permission notice appear in all
## copies.
##
## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 AUTHORS AND COPYRIGHT HOLDERS AND THEIR
## CONTRIBUTORS 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.
##
# package version
%define V_module 2.1.1
%define V_rules 2.1-1.4
# package information
Name: apache-security
Summary: Apache Extension: Security
URL: http://www.modsecurity.org/
Vendor: Breach Security, Inc.
Packager: OpenPKG Foundation e.V.
Distribution: OpenPKG Community
Class: EVAL
Group: Web
License: Open Source
Version: %{V_module}
Release: 20070622
# list of sources
Source0: http://www.modsecurity.org/download/modsecurity-apache_%{V_module}.tar.gz
Source1: http://www.modsecurity.org/download/modsecurity-core-rules_%{V_rules}.tar.gz
Source2: apache-security.conf
# build information
Prefix: %{l_prefix}
BuildRoot: %{l_buildroot}
BuildPreReq: OpenPKG, openpkg >= 20060823, apache, make
PreReq: OpenPKG, openpkg >= 20060823, apache
AutoReq: no
AutoReqProv: no
%description
This is the Security extension module for the Apache HTTP webserver.
%track
prog apache-security:module = {
version = %{V_module}
url = http://www.modsecurity.org/download/index.html
regex = modsecurity-apache_(\d+\.\d+\.\d+)\.tar\.gz
}
prog apache-security:rules = {
version = %{V_rules}
url = http://www.modsecurity.org/download/index.html
regex = modsecurity-core-rules_(\d+\.\d+(\.\d+)?-\d+\.\d+(\.\d+)?)\.tar\.gz
}
%prep
%setup -q -n modsecurity-apache_%{V_module}
( cd rules
%{l_gzip} -d -c %{SOURCE modsecurity-core-rules_%{V_rules}.tar.gz} | %{l_tar} xf -
) || exit $?
%build
# build module
( cd apache2
%{l_make} %{l_mflags} \
top_dir=%{l_prefix}/share/apache \
DEFS="-DWITH_LIBXML2" \
INCLUDES="%{l_cppflags libxml2}" \
EXTRA_LDFLAGS="%{l_ldflags} -lxml2"
) || exit $?
%install
# install module
rm -rf $RPM_BUILD_ROOT
%{l_shtool} mkdir -f -p -m 755 \
$RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d \
$RPM_BUILD_ROOT%{l_prefix}/libexec/apache
%{l_shtool} install -c -m 755 \
apache2/.libs/mod_security2.so \
$RPM_BUILD_ROOT%{l_prefix}/libexec/apache/mod_security.so
%{l_shtool} install -c -m 755 \
%{SOURCE apache-security.conf} \
$RPM_BUILD_ROOT%{l_prefix}/etc/apache/apache.d/
# determine installation files
%{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT \
%{l_files_std} \
'%config %{l_prefix}/etc/apache/apache.d/apache-security.conf'
%files -f files
%clean
rm -rf $RPM_BUILD_ROOT
%post
# after upgrade, restart service
[ $1 -eq 2 ] || exit 0
eval `%{l_rc} apache status 2>/dev/null`
[ ".$apache_active" = .yes ] && %{l_rc} apache restart
exit 0
Loading…
Cancel
Save