Source27: %{name}-mod_mime_magic.conf
Source28: %{name}-mod_cache.conf
Source29: %{name}-example.net.conf
Source27: %{name}-mod_mime_magic.conf
Source28: %{name}-mod_cache.conf
Source29: %{name}-example.net.conf
Patch0: %{name}-configdir_skip_backups.patch
Patch1: %{name}-layout.patch
Patch2: %{name}-suexec.patch
Patch0: %{name}-configdir_skip_backups.patch
Patch1: %{name}-layout.patch
Patch2: %{name}-suexec.patch
BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpm-build >= 4.4.0
BuildRequires: rpm-perlprov >= 4.1-13
BuildRequires: rpm >= 4.4.9-56
BuildRequires: rpm-build >= 4.4.0
BuildRequires: rpm-perlprov >= 4.1-13
BuildRequires: sed >= 4.0
BuildRequires: zlib-devel
Requires: %{name}-errordocs = %{version}-%{release}
BuildRequires: sed >= 4.0
BuildRequires: zlib-devel
Requires: %{name}-errordocs = %{version}-%{release}
+%define httpd_restart \
+ if /bin/systemd_booted; then \
+ /bin/systemctl restart httpd.service \
+ else \
+ %service -q httpd restart \
+ fi
+%define httpd_reload \
+ if /bin/systemd_booted; then \
+ /bin/systemctl reload httpd.service \
+ else \
+ %service -q httpd reload \
+ fi
+
%description
Apache is a powerful, full-featured, efficient and freely-available
Web server. Apache is also the most popular Web server on the
%description
Apache is a powerful, full-featured, efficient and freely-available
Web server. Apache is also the most popular Web server on the
-install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig} \
+install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,systemd/system} \
$RPM_BUILD_ROOT%{_var}/{log/{httpd,archive/httpd},{run,cache}/httpd,lock/mod_dav} \
$RPM_BUILD_ROOT%{_sysconfdir}/{webapps.d,conf.d,vhosts.d} \
$RPM_BUILD_ROOT%{_var}/{log/{httpd,archive/httpd},{run,cache}/httpd,lock/mod_dav} \
$RPM_BUILD_ROOT%{_sysconfdir}/{webapps.d,conf.d,vhosts.d} \
- $RPM_BUILD_ROOT%{_datadir}/{cgi-bin,vhosts}
+ $RPM_BUILD_ROOT%{_datadir}/{cgi-bin,vhosts} \
+ $RPM_BUILD_ROOT/usr/lib/tmpfiles.d \
+ $RPM_BUILD_ROOT%{systemdunitdir}
# install other mpm-s
for mpm in worker %{?with_event:event} %{?with_itk:itk}; do
install buildmpm-${mpm}/httpd.${mpm} $RPM_BUILD_ROOT%{_sbindir}/httpd.${mpm}
# install other mpm-s
for mpm in worker %{?with_event:event} %{?with_itk:itk}; do
install buildmpm-${mpm}/httpd.${mpm} $RPM_BUILD_ROOT%{_sbindir}/httpd.${mpm}
ln -s %{_libexecdir} $RPM_BUILD_ROOT%{_sysconfdir}/modules
ln -s %{_localstatedir}/run/httpd $RPM_BUILD_ROOT%{_sysconfdir}/run
ln -s %{_var}/log/httpd $RPM_BUILD_ROOT%{_sysconfdir}/logs
ln -s %{_libexecdir} $RPM_BUILD_ROOT%{_sysconfdir}/modules
ln -s %{_localstatedir}/run/httpd $RPM_BUILD_ROOT%{_sysconfdir}/run
ln -s %{_var}/log/httpd $RPM_BUILD_ROOT%{_sysconfdir}/logs
cp -a %{SOURCE22} $CFG/20_languages.conf
cp -a %{SOURCE29} $RPM_BUILD_ROOT%{_sysconfdir}/vhosts.d/example.net.conf
cp -a %{SOURCE22} $CFG/20_languages.conf
cp -a %{SOURCE29} $RPM_BUILD_ROOT%{_sysconfdir}/vhosts.d/example.net.conf
echo "LoadModule alias_module modules/mod_alias.so" > $CFG/00_mod_alias.conf
echo "LoadModule authn_file_module modules/mod_authn_file.so" > $CFG/00_mod_authn_file.conf
echo "LoadModule authn_dbm_module modules/mod_authn_dbm.so" > $CFG/00_mod_authn_dbm.conf
echo "LoadModule alias_module modules/mod_alias.so" > $CFG/00_mod_alias.conf
echo "LoadModule authn_file_module modules/mod_authn_file.so" > $CFG/00_mod_authn_file.conf
echo "LoadModule authn_dbm_module modules/mod_authn_dbm.so" > $CFG/00_mod_authn_dbm.conf
/sbin/chkconfig --add httpd
umask 137
touch /var/log/httpd/{access,error,agent,referer}_log
/sbin/chkconfig --add httpd
umask 137
touch /var/log/httpd/{access,error,agent,referer}_log
%triggerpostun mod_ssl -- %{name}-mod_ssl < 1:2.2.0-3.1
cp -f /etc/httpd/conf.d/40_mod_ssl.conf{,.rpmsave}
sed -i -e '
%triggerpostun mod_ssl -- %{name}-mod_ssl < 1:2.2.0-3.1
cp -f /etc/httpd/conf.d/40_mod_ssl.conf{,.rpmsave}
sed -i -e '
# main package are very important for all this to work.
# restart webserver at the end of transaction
# main package are very important for all this to work.
# restart webserver at the end of transaction
%attr(640,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/vhosts.d/example.net.conf
%attr(640,root,root) %{_sysconfdir}/magic
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/httpd
%attr(640,root,root) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/vhosts.d/example.net.conf
%attr(640,root,root) %{_sysconfdir}/magic
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/httpd
%dir %attr(770,root,http) /var/run/httpd
%dir %attr(770,root,http) /var/cache/httpd
%dir %attr(770,root,http) /var/run/httpd
%dir %attr(770,root,http) /var/cache/httpd
%attr(755,root,root) %{_sbindir}/htdigest
%attr(755,root,root) %{_sbindir}/logresolve
%attr(755,root,root) %{_sbindir}/rotatelogs
%attr(755,root,root) %{_sbindir}/htdigest
%attr(755,root,root) %{_sbindir}/logresolve
%attr(755,root,root) %{_sbindir}/rotatelogs
%{_libexecdir}/build/config_vars.mk
%attr(755,root,root) %{_libexecdir}/build/*.sh
%{_includedir}
%{_libexecdir}/build/config_vars.mk
%attr(755,root,root) %{_libexecdir}/build/*.sh
%{_includedir}
%files mod_actions
%defattr(644,root,root,755)
%files mod_actions
%defattr(644,root,root,755)
%attr(755,root,root) %{_sbindir}/httxt2dbm
%attr(755,root,root) %{_libexecdir}/mod_rewrite.so
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_rewrite.conf
%attr(755,root,root) %{_sbindir}/httxt2dbm
%attr(755,root,root) %{_libexecdir}/mod_rewrite.so
%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/conf.d/*_mod_rewrite.conf
%files mod_setenvif
%defattr(644,root,root,755)
%files mod_setenvif
%defattr(644,root,root,755)