Created
January 29, 2016 17:00
-
-
Save zimmerle/a2b069f0099c90c142e8 to your computer and use it in GitHub Desktop.
ModSecurity 2.x rpm package generation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 0d90c84a7a89d26b9cffb4f987342185fe482118 Mon Sep 17 00:00:00 2001 | |
From: Antony Hutchison <[email protected]> | |
Date: Tue, 12 Jan 2016 22:43:35 +0000 | |
Subject: [PATCH] Adds a spec file for building an RPM package | |
--- | |
rpmbuild/mod_security.spec | 45 +++++++++++++++++++++++++++++++++++++++++++++ | |
1 file changed, 45 insertions(+) | |
create mode 100644 rpmbuild/mod_security.spec | |
diff --git a/rpmbuild/mod_security.spec b/rpmbuild/mod_security.spec | |
new file mode 100644 | |
index 0000000..9a64834 | |
--- /dev/null | |
+++ b/rpmbuild/mod_security.spec | |
@@ -0,0 +1,45 @@ | |
+Summary: ModSecurity module for Apache HTTP Server | |
+Name: mod_security | |
+Version: 2.9.0 | |
+Release: 1%{?dist} | |
+License: ASL 2.0 | |
+URL: http://www.modsecurity.org/ | |
+Group: System Environment/Daemons | |
+Source: http://www.modsecurity.org/download/modsecurity-%{version}.tar.gz | |
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | |
+Requires: httpd httpd-mmn = %([ -a %{_includedir}/httpd/.mmn ] && cat %{_includedir}/httpd/.mmn || echo missing) | |
+BuildRequires: httpd-devel libxml2-devel pcre-devel curl-devel lua-devel | |
+ | |
+%description | |
+ModSecurity: Open Source Web Application Firewall | |
+ | |
+%prep | |
+%setup -q -n modsecurity-%{version} | |
+ | |
+%build | |
+find doc -type f -exec chmod -x {} \; | |
+./autogen.sh | |
+%configure | |
+make %{_smp_mflags} | |
+ | |
+%install | |
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT | |
+make DESTDIR=$RPM_BUILD_ROOT install | |
+rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name} | |
+ | |
+%clean | |
+[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT | |
+ | |
+%files | |
+%defattr (-,root,root) | |
+%doc CHANGES LICENSE README.* modsecurity* doc | |
+%{_libdir}/httpd/modules/mod_security2.so | |
+%{_bindir}/mlogc | |
+%{_bindir}/mlogc-batch-load.pl | |
+%{_bindir}/rules-updater.pl | |
+/usr/lib/mod_security2.so | |
+ | |
+ | |
+%changelog | |
+* Tue Jan 12 2016 Antony Hutchison <[email protected]> - 2.9.0-1 | |
+- initial build of RPM |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
heads up @zimmerle, this file has some odd characters which cause errors when trying to consume it from within docker:
source of awk command: https://stackoverflow.com/questions/30738924/detecting-corrupt-characters-in-utf-8-encoded-text-file#30764921
Did not get a chance to scrub it