diff --git a/.gitignore b/.gitignore index e69de29..57c57e4 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,6 @@ +/mod_qos-10.13.tar.gz +*~ +/x86_64/ +/mod_qos-*/ +*.rpm +*.log diff --git a/mod_qos.conf b/mod_qos.conf new file mode 100644 index 0000000..afdf9e7 --- /dev/null +++ b/mod_qos.conf @@ -0,0 +1 @@ +LoadModule qos_module modules/mod_qos.so diff --git a/mod_qos.spec b/mod_qos.spec new file mode 100644 index 0000000..33fe984 --- /dev/null +++ b/mod_qos.spec @@ -0,0 +1,71 @@ +%{!?_httpd_mmn: %{expand: %%global _httpd_mmn %%(cat %{_includedir}/httpd/.mmn || echo missing-httpd-devel)}} +%{!?_httpd_apxs: %{expand: %%global _httpd_apxs %%{_sbindir}/apxs}} + +Name: mod_qos +Version: 10.13 +Release: 4%{?dist} +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: mod_qos.conf +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: httpd-devel >= 2.0.0 +BuildRequires: pcre-devel +BuildRequires: openssl-devel +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} + +%build +%{_httpd_apxs} -Wc,"%{optflags}" -c apache2/mod_qos.c -lcrypto -lpcre + +%install +rm -rf $RPM_BUILD_ROOT +install -Dpm 755 apache2/.libs/mod_qos.so \ + $RPM_BUILD_ROOT%{_libdir}/httpd/modules/mod_qos.so +install -Dpm 644 %{SOURCE1} \ + $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d/mod_qos.conf + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc doc README.TXT +%{_libdir}/httpd/modules/mod_qos.so +%config(noreplace) %{_sysconfdir}/httpd/conf.d/mod_qos.conf + + +%changelog +* 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 + diff --git a/sources b/sources index e69de29..25841d2 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +8b03da6da5018ef26916de6d5d6cd767 mod_qos-10.13.tar.gz