%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} %{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo 0-0)}} # /etc/httpd/conf.d with httpd < 2.4 and defined as /etc/httpd/conf.modules.d with httpd >= 2.4 %{!?_httpd_modconfdir: %{expand: %%global _httpd_modconfdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_confdir: %{expand: %%global _httpd_confdir %%{_sysconfdir}/httpd/conf.d}} %{!?_httpd_moddir: %{expand: %%global _httpd_moddir %%{_libdir}/httpd/modules}} Name: mod_qos Version: 11.24 Release: 1 Summary: Quality of service module for Apache Group: System Environment/Daemons License: GPLv2 URL: http://opensource.adnovum.ch/mod_qos/ Source0: http://downloads.sourceforge.net/project/mod-qos/%{name}-%{version}.tar.gz Source1: 10-mod_qos.conf Patch0: warning.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: httpd-devel >= 2.0.0 BuildRequires: pcre-devel, openssl-devel, libpng-devel BuildRequires: automake Requires: httpd-mmn = %{_httpd_mmn} %description The mod_qos module may be used to determine which requests should be served and which shouldn't in order to avoid resource over-subscription. The module collects different attributes such as the request URL, HTTP request and response headers, the IP source address, the HTTP response code, history data (based on user session and source IP address), the number of concurrent requests to the server (total or requests having similar attributes), the number of concurrent TCP connections (total or from a single source IP), and so forth. Counteractive measures to enforce the defined rules are: request blocking, dynamic timeout adjustment, request delay, response throttling, and dropping of TCP connections. %prep %setup -q -n %{name}-%{version} %patch0 -p1 %build %{_httpd_apxs} -Wc,"%{optflags}" -c apache2/mod_qos.c -lcrypto -lpcre # Tools building # Need to fix the binaries pushd . cd tools/ aclocal automake --add-missing %configure make %{?_smp_mflags} popd %install rm -rf $RPM_BUILD_ROOT install -Dpm 755 apache2/.libs/mod_qos.so \ $RPM_BUILD_ROOT%{_libdir}/httpd/modules/mod_qos.so %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" # 2.4-style install -Dpm 644 %{SOURCE1} %{buildroot}%{_httpd_modconfdir}/10-mod_qos.conf %else # 2.2-style install -Dpm 644 %{SOURCE1} %{buildroot}%{_httpd_confdir}/mod_qos.conf %endif cd tools/ %make_install install -d %{buildroot}%{_mandir}/man1/ install -Dpm 644 man1/* %{buildroot}%{_mandir}/man1/ # Exclude some utilities util they get audited # because of suid/guid related calls rm -f %{buildroot}%{_bindir}/{qsexec,qsrotate,qslog} rm -f %{buildroot}%{_mandir}/man1/{qsexec,qsrotate,qslog}.1.gz %clean rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_bindir}/* %{_mandir}/man1/* %doc doc README.TXT %{_libdir}/httpd/modules/mod_qos.so %if "%{_httpd_modconfdir}" != "%{_httpd_confdir}" # 2.4-style %config(noreplace) %{_httpd_modconfdir}/10-mod_qos.conf %else # 2.2-style %config(noreplace) %{_httpd_confdir}/mod_qos.conf %endif %changelog * Mon Apr 11 2016 Support 11.24-1 - Update to 11.24 * Fri Oct 10 2014 Athmane Madjoudj 11.5-1 - Update to 11.5 - Include the tools - Exclude some utilities util they get audited because of suid/guid related calls - Follow the new httpd 2.4.x module packaging guidelines. * Sun Aug 17 2014 Fedora Release Engineering - 10.24-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild * Sat Jun 07 2014 Fedora Release Engineering - 10.24-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Thu Jan 23 2014 Joe Orton - 10.24-2 - fix _httpd_mmn expansion in absence of httpd-devel * Sat Nov 2 2013 Christof Damian - 10.24-1 - upstream 10.24 * Thu Jul 25 2013 Christof Damian - 10.16-1 - upstream 10.16 * Sat Apr 27 2013 Christof Damian - 10.15-1 - upstream 10.15 * Sat Feb 23 2013 Christof Damian - 10.13-4 - add crypto requirement * Tue Jan 8 2013 Christof Damian - 10.13-3 - update build requires * Tue Jan 8 2013 Christof Damian - 10.13-2 - add conf file * Tue Jan 8 2013 Christof Damian - 10.13-1 - initial package