Thomas Gerbet 2022-12-06 22:36:17 +01:00
parent 693d42397b
commit 95f9db8d5f
3 changed files with 30 additions and 25 deletions

View file

@ -0,0 +1,17 @@
--- a/apache2/Makefile.am
+++ b/apache2/Makefile.am
@@ -179,7 +179,6 @@ install-exec-hook: $(pkglib_LTLIBRARIES)
for m in $(pkglib_LTLIBRARIES); do \
base=`echo $$m | sed 's/\..*//'`; \
rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
- install -D -m444 $(DESTDIR)$(pkglibdir)/$$base.so $(DESTDIR)$(APXS_MODULES)/$$base.so; \
done
else
install-exec-hook: $(pkglib_LTLIBRARIES)
@@ -187,6 +186,5 @@ install-exec-hook: $(pkglib_LTLIBRARIES)
for m in $(pkglib_LTLIBRARIES); do \
base=`echo $$m | sed 's/\..*//'`; \
rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
- cp -p $(DESTDIR)$(pkglibdir)/$$base.so $(DESTDIR)$(APXS_MODULES); \
done
endif

View file

@ -1,17 +0,0 @@
--- a/apache2/Makefile.in 2017-10-10 09:45:51.000000000 -0400
+++ b/apache2/Makefile.in 2017-10-10 09:46:04.000000000 -0400
@@ -1208,14 +1208,12 @@
@LINUX_TRUE@ for m in $(pkglib_LTLIBRARIES); do \
@LINUX_TRUE@ base=`echo $$m | sed 's/\..*//'`; \
@LINUX_TRUE@ rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
-@LINUX_TRUE@ install -D -m444 $(DESTDIR)$(pkglibdir)/$$base.so $(DESTDIR)$(APXS_MODULES)/$$base.so; \
@LINUX_TRUE@ done
@LINUX_FALSE@install-exec-hook: $(pkglib_LTLIBRARIES)
@LINUX_FALSE@ @echo "Removing unused static libraries..."; \
@LINUX_FALSE@ for m in $(pkglib_LTLIBRARIES); do \
@LINUX_FALSE@ base=`echo $$m | sed 's/\..*//'`; \
@LINUX_FALSE@ rm -f $(DESTDIR)$(pkglibdir)/$$base.*a; \
-@LINUX_FALSE@ cp -p $(DESTDIR)$(pkglibdir)/$$base.so $(DESTDIR)$(APXS_MODULES); \
@LINUX_FALSE@ done
# Tell versions [3.59,3.63) of GNU make to not export all variables.

View file

@ -1,6 +1,6 @@
{ stdenv, lib, fetchurl, pkg-config
{ stdenv, lib, fetchFromGitHub, pkg-config, autoreconfHook
, curl, apacheHttpd, pcre, apr, aprutil, libxml2
, luaSupport ? false, lua5
, luaSupport ? false, lua5, perl
}:
with lib;
@ -11,14 +11,16 @@ in
stdenv.mkDerivation rec {
pname = "modsecurity";
version = "2.9.3";
version = "2.9.6";
src = fetchurl {
url = "https://www.modsecurity.org/tarball/${version}/${pname}-${version}.tar.gz";
sha256 = "0611nskd2y6yagrciqafxdn4rxbdk2v4swf45kc1sgwx2sfh34j1";
src = fetchFromGitHub {
owner = "SpiderLabs";
repo = pname;
rev = "v${version}";
sha256 = "sha256-C/D/UWaI4GsXjfhLmNnYhRJoUvlsps1551SqhmZUc/4=";
};
nativeBuildInputs = [ pkg-config ];
nativeBuildInputs = [ pkg-config autoreconfHook ];
buildInputs = [ curl apacheHttpd pcre apr aprutil libxml2 ] ++
optional luaSupport lua5;
@ -37,7 +39,10 @@ stdenv.mkDerivation rec {
outputs = ["out" "nginx"];
# by default modsecurity's install script copies compiled output to httpd's modules folder
# this patch removes those lines
patches = [ ./Makefile.in.patch ];
patches = [ ./Makefile.am.patch ];
doCheck = true;
checkInputs = [ perl ];
postInstall = ''
mkdir -p $nginx