summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--htcacheclean.service10
-rw-r--r--htcacheclean.sysconf16
-rw-r--r--httpd-2.4.3-r1337344+.patch2
-rw-r--r--httpd.spec38
-rw-r--r--httpd.tmpfiles1
5 files changed, 55 insertions, 12 deletions
diff --git a/htcacheclean.service b/htcacheclean.service
new file mode 100644
index 0000000..166067b
--- /dev/null
+++ b/htcacheclean.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Disk Cache Cleaning Daemon for Apache HTTP Server
+After=httpd.service
+
+[Service]
+Type=forking
+User=apache
+PIDFile=/run/httpd/htcacheclean/pid
+EnvironmentFile=/etc/sysconfig/htcacheclean
+ExecStart=/usr/sbin/htcacheclean -P /run/httpd/htcacheclean/pid -d $INTERVAL -p $CACHE_ROOT -l $LIMIT $OPTIONS
diff --git a/htcacheclean.sysconf b/htcacheclean.sysconf
new file mode 100644
index 0000000..fffa17b
--- /dev/null
+++ b/htcacheclean.sysconf
@@ -0,0 +1,16 @@
+#
+# Configuration options for systemd service, htcacheclean.service.
+# See htcacheclean(8) for more information on available options.
+#
+
+# Interval between cache clean runs, in minutes
+INTERVAL=15
+
+# Default cache root.
+CACHE_ROOT=/var/cache/httpd/proxy
+
+# Cache size limit in bytes (K=Kbytes, M=Mbytes)
+LIMIT=100M
+
+# Any other options...
+OPTIONS=
diff --git a/httpd-2.4.3-r1337344+.patch b/httpd-2.4.3-r1337344+.patch
index 2aa982e..e2d7ed1 100644
--- a/httpd-2.4.3-r1337344+.patch
+++ b/httpd-2.4.3-r1337344+.patch
@@ -137,7 +137,7 @@ http://svn.apache.org/viewvc?view=revision&revision=1341930
+
+install-suexec-caps:
+ @if test -f $(builddir)/support/suexec; then \
-+ echo Skipping setcap for 'cap_setuid,cap_setgid+pe' $(DESTDIR)$(sbindir)/suexec; \
++ setcap 'cap_setuid,cap_setgid+pe' $(DESTDIR)$(sbindir)/suexec; \
fi
suexec:
diff --git a/httpd.spec b/httpd.spec
index e7b5e3e..e38d654 100644
--- a/httpd.spec
+++ b/httpd.spec
@@ -14,7 +14,7 @@
Summary: Apache HTTP Server
Name: httpd
Version: 2.4.3
-Release: 14%{?dist}
+Release: 15%{?dist}
URL: http://httpd.apache.org/
Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.bz2
Source1: index.html
@@ -42,6 +42,8 @@ Source23: manual.conf
Source24: 00-systemd.conf
# Documentation
Source30: README.confd
+Source40: htcacheclean.service
+Source41: htcacheclean.sysconf
# build/scripts patches
Patch1: httpd-2.4.1-apctl.patch
Patch2: httpd-2.4.3-apxs.patch
@@ -252,8 +254,10 @@ make DESTDIR=$RPM_BUILD_ROOT install
# Install systemd service files
mkdir -p $RPM_BUILD_ROOT%{_unitdir}
-install -p -m 644 $RPM_SOURCE_DIR/httpd.service \
- $RPM_BUILD_ROOT%{_unitdir}/httpd.service
+for s in httpd htcacheclean; do
+ install -p -m 644 $RPM_SOURCE_DIR/${s}.service \
+ $RPM_BUILD_ROOT%{_unitdir}/${s}.service
+done
# install conf file/directory
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf.d \
@@ -286,16 +290,19 @@ install -m 644 -p $RPM_SOURCE_DIR/httpd.conf \
$RPM_BUILD_ROOT%{_sysconfdir}/httpd/conf/httpd.conf
mkdir $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
-install -m 644 -p $RPM_SOURCE_DIR/httpd.sysconf \
- $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/httpd
+for s in httpd htcacheclean; do
+ install -m 644 -p $RPM_SOURCE_DIR/${s}.sysconf \
+ $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/${s}
+done
# tmpfiles.d configuration
mkdir -p $RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d
install -m 644 -p $RPM_SOURCE_DIR/httpd.tmpfiles \
$RPM_BUILD_ROOT%{_prefix}/lib/tmpfiles.d/httpd.conf
-# for holding mod_dav lock database
-mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav
+# Other directories
+mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/dav \
+ $RPM_BUILD_ROOT/run/httpd/htcacheclean
# Create cache directory
mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/cache/httpd \
@@ -404,7 +411,7 @@ rm -rf $RPM_BUILD_ROOT/etc/httpd/conf/{original,extra}
%post
%if 0%{?systemd_post:1}
-%systemd_post httpd.service
+%systemd_post httpd.service htcacheclean.service
%else
# Register the httpd service
if [ $1 -eq 1 ] ; then
@@ -415,12 +422,14 @@ fi
%preun
%if 0%{?systemd_preun:1}
-%systemd_preun httpd.service
+%systemd_preun httpd.service htcacheclean.service
%else
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
/bin/systemctl --no-reload disable httpd.service > /dev/null 2>&1 || :
+ /bin/systemctl --no-reload disable htcacheclean.service > /dev/null 2>&1 || :
/bin/systemctl stop httpd.service > /dev/null 2>&1 || :
+ /bin/systemctl stop htcacheclean.service > /dev/null 2>&1 || :
fi
%endif
@@ -444,7 +453,7 @@ fi
%posttrans
test -f /etc/sysconfig/httpd-disable-posttrans || \
- /bin/systemctl try-restart httpd.service >/dev/null 2>&1 || :
+ /bin/systemctl try-restart httpd.service htcacheclean.service >/dev/null 2>&1 || :
%define sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt
%define sslkey %{_sysconfdir}/pki/tls/private/localhost.key
@@ -513,7 +522,7 @@ rm -rf $RPM_BUILD_ROOT
%exclude %{_sysconfdir}/httpd/conf.modules.d/00-proxyhtml.conf
%exclude %{_sysconfdir}/httpd/conf.modules.d/01-ldap.conf
-%config(noreplace) %{_sysconfdir}/sysconfig/httpd
+%config(noreplace) %{_sysconfdir}/sysconfig/ht*
%{_prefix}/lib/tmpfiles.d/httpd.conf
%dir %{_libexecdir}/initscripts/legacy-actions/httpd
@@ -549,6 +558,7 @@ rm -rf $RPM_BUILD_ROOT
%dir %{docroot}/html
%attr(0710,root,apache) %dir /run/httpd
+%attr(0700,apache,apache) %dir /run/httpd/htcacheclean
%attr(0700,root,root) %dir %{_localstatedir}/log/httpd
%attr(0700,apache,apache) %dir %{_localstatedir}/lib/dav
%attr(0700,apache,apache) %dir %{_localstatedir}/cache/httpd
@@ -600,6 +610,12 @@ rm -rf $RPM_BUILD_ROOT
%{_sysconfdir}/rpm/macros.httpd
%changelog
+* Wed Feb 13 2013 Remi Collet <RPMS@FamilleCollet.com> - 2.4.3-15
+- sync with rawhide, rebuild for remi repo
+
+* Tue Jan 8 2013 Joe Orton <jorton@redhat.com> - 2.4.3-15
+- add systemd service for htcacheclean
+
* Sat Nov 17 2012 Remi Collet <RPMS@FamilleCollet.com> - 2.4.3-14
- sync with rawhide, rebuild for remi repo
diff --git a/httpd.tmpfiles b/httpd.tmpfiles
index 49be6b8..f148886 100644
--- a/httpd.tmpfiles
+++ b/httpd.tmpfiles
@@ -1 +1,2 @@
d /run/httpd 710 root apache
+d /run/httpd/htcacheclean 700 apache apache