From b61002081577e06a89c1ed882cec7a80bfd763af Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 10 Feb 2005 18:03:28 +0000 Subject: [PATCH] - confdir enabled apache1 (no triggers as it wasn't on ftp) - add patch for new mysql API - cosmetics Changed files: apache1-mod_antihak.spec -> 1.26 --- apache1-mod_antihak.spec | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/apache1-mod_antihak.spec b/apache1-mod_antihak.spec index b1eccdb..1c67791 100644 --- a/apache1-mod_antihak.spec +++ b/apache1-mod_antihak.spec @@ -5,31 +5,31 @@ Summary(pl): Modu Name: apache1-mod_%{mod_name} %define tar_ver 0.3.1-beta Version: 0.3.1beta -Release: 3.1 +Release: 3.2 License: GPL Group: Networking/Daemons Source0: http://dl.sourceforge.net/apantihak/mod_antihak-%{tar_ver}.tar.gz # Source0-md5: 38f22f5b5662e8dd7318c42fa96fb083 Patch0: %{name}-iptables.patch Patch1: %{name}-am.patch +Patch2: %{name}-mysql-API.patch URL: http://sourceforge.net/projects/apantihak/ BuildRequires: automake BuildRequires: autoconf -BuildRequires: apache1-devel +BuildRequires: apache1-devel >= 1.3.33-2 BuildRequires: libtool BuildRequires: mysql-devel BuildRequires: %{apxs} -Requires(post,preun): %{apxs} Requires(post,preun): grep -Requires(post,preun): sudo -Requires(preun): fileutils -Requires: apache1 >= 1.3.1 +Requires(preun): sed >= 4.0 +Requires: apache1 >= 1.3.33-2 Requires: iptables Requires: sudo Obsoletes: apache-mod_%{mod_name} <= %{version} BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _pkglibdir %(%{apxs} -q LIBEXECDIR) +%define _pkglibdir %(%{apxs} -q LIBEXECDIR 2>/dev/null) +%define _sysconfdir %(%{apxs} -q SYSCONFDIR 2>/dev/null) %description mod_antihak is an Apache Module designed to eliminate the CodeRed and @@ -45,6 +45,7 @@ przez robaki CodeRed i Nimda. Ponadto trwaj %setup -q -n mod_antihak-0.3.1-beta/src %patch0 -p0 %patch1 -p0 +%patch2 -p1 %build rm -f tools/missing @@ -63,9 +64,11 @@ rm -f tools/missing %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT%{_pkglibdir} +install -d $RPM_BUILD_ROOT{%{_pkglibdir},%{_sysconfdir}/conf.d} install mod_antihak/mod_antihak.so $RPM_BUILD_ROOT%{_pkglibdir} +echo 'LoadModule %{mod_name}_module modules/mod_%{mod_name}.so' > \ + $RPM_BUILD_ROOT%{_sysconfdir}/conf.d/90_mod_%{mod_name}.conf %clean rm -rf $RPM_BUILD_ROOT @@ -73,12 +76,11 @@ rm -rf $RPM_BUILD_ROOT %post if ! grep -qF "http ALL= NOPASSWD: /sbin/iptables" ; then echo "#http ALL= NOPASSWD: /sbin/iptables" >> /etc/sudoers - echo "%{mod_name}: you need to allow apache to run iptables as root," + echo "%{mod_name}: You need to allow apache to run iptables as root," echo "%{mod_name}: appropriate (commented out) line added to /etc/sudoers;" - echo "%{mod_name}: be sure to uncomment it if you want this module to work" + echo "%{mod_name}: be sure to uncomment it if you want this module to work." fi -%{apxs} -e -a -n antihak %{_pkglibdir}/mod_antihak.so 1>&2 if [ -f /var/lock/subsys/apache ]; then /etc/rc.d/init.d/apache restart 1>&2 else @@ -88,13 +90,9 @@ fi %preun if [ "$1" = "0" ]; then if grep -qF "^http ALL= NOPASSWD: /sbin/iptables" /etc/sudoers ; then - umask 227 - grep -v '^http ALL= NOPASSWD: /sbin/iptables$' /etc/sudoers \ - > /etc/sudoers.rpmnew-antihak - mv -f /etc/sudoers.rpmnew-antihak /etc/sudoers + sed -i -e '/^http ALL= NOPASSWD: /sbin/iptables$/d' /etc/sudoers fi - %{apxs} -e -A -n antihak %{_pkglibdir}/mod_antihak.so 1>&2 if [ -f /var/lock/subsys/apache ]; then /etc/rc.d/init.d/apache restart 1>&2 fi @@ -103,4 +101,5 @@ fi %files %defattr(644,root,root,755) %doc AUTHORS INSTALL ChangeLog NEWS TODO +%attr(640,root,root) %config(noreplace) %verify(not size mtime md5) %{_sysconfdir}/conf.d/*_mod_%{mod_name}.conf %attr(755,root,root) %{_pkglibdir}/* -- 2.43.0