X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=apache.spec;h=2b184e1bd831123a98aa749c4917656033f6edb2;hb=f863012ff284fed67a8f58888713fb403c9ee3cf;hp=3cf4d76da88084471e18ecf70b65f71d6dd7d33f;hpb=74665295d6f94e6fd3f44e79c77ce59ccd573fe5;p=packages%2Fapache.git diff --git a/apache.spec b/apache.spec index 3cf4d76..2b184e1 100644 --- a/apache.spec +++ b/apache.spec @@ -43,12 +43,12 @@ Summary(pt_BR.UTF-8): Servidor HTTPD para prover serviços WWW Summary(ru.UTF-8): Самый популярный веб-сервер Summary(tr.UTF-8): Lider WWW tarayıcı Name: apache -Version: 2.2.21 +Version: 2.2.22 Release: 5 License: Apache v2.0 Group: Networking/Daemons/HTTP Source0: http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz -# Source0-md5: b24ca6db942a4f8e57c357e5e3058d31 +# Source0-md5: d77fa5af23df96a8af68ea8114fa6ce1 Source1: %{name}.init Source2: %{name}.logrotate Source3: %{name}.sysconfig @@ -79,6 +79,7 @@ Source27: %{name}-mod_mime_magic.conf Source28: %{name}-mod_cache.conf Source29: %{name}-example.net.conf Source30: %{name}.tmpfiles +Source31: %{name}.service Patch0: %{name}-configdir_skip_backups.patch Patch1: %{name}-layout.patch Patch2: %{name}-suexec.patch @@ -119,7 +120,7 @@ BuildRequires: pkgconfig BuildRequires: rpm >= 4.4.9-56 BuildRequires: rpm-build >= 4.4.0 BuildRequires: rpm-perlprov >= 4.1-13 -BuildRequires: rpmbuild(macros) >= 1.268 +BuildRequires: rpmbuild(macros) >= 1.647 BuildRequires: sed >= 4.0 BuildRequires: zlib-devel Requires: %{name}-errordocs = %{version}-%{release} @@ -200,6 +201,8 @@ Requires: /sbin/chkconfig Requires: apr >= %{apr_ver} Requires: psmisc >= 20.1 Requires: rc-scripts >= 0.4.1.23 +Requires: sed >= 4.0 +Requires: systemd-units Provides: apache(modules-api) = %{_apache_modules_api} Provides: group(http) Provides: user(http) @@ -1919,22 +1922,29 @@ done %install rm -rf $RPM_BUILD_ROOT -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%{_datadir}/{cgi-bin,vhosts} \ - $RPM_BUILD_ROOT/usr/lib/tmpfiles.d + $RPM_BUILD_ROOT/usr/lib/tmpfiles.d \ + $RPM_BUILD_ROOT%{systemdunitdir} # prefork is default one %{__make} -C buildmpm-prefork install \ DESTDIR=$RPM_BUILD_ROOT +mpm=prefork +sed -e "s|@EXEC@|%{_sbindir}/httpd.${mpm}|g;s|@NAME@|${mpm}|g" < %{SOURCE31} \ + > $RPM_BUILD_ROOT%{systemdunitdir}/httpd-${mpm}.service # 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} + sed -e "s|@EXEC@|%{_sbindir}/httpd.${mpm}|g;s|@NAME@|${mpm}|g" < %{SOURCE31} \ + > $RPM_BUILD_ROOT%{systemdunitdir}/httpd-${mpm}.service done ln -s httpd.prefork $RPM_BUILD_ROOT%{_sbindir}/httpd +ln -s %{systemdunitdir}/httpd-prefork.service $RPM_BUILD_ROOT/etc/systemd/system/httpd.service 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 @@ -2100,18 +2110,21 @@ exit 0 /sbin/chkconfig --add httpd umask 137 touch /var/log/httpd/{access,error,agent,referer}_log +%systemd_post httpd.service %preun base if [ "$1" = "0" ]; then %service httpd stop /sbin/chkconfig --del httpd fi +%systemd_preun httpd.service %postun base if [ "$1" = "0" ]; then %userremove http %groupremove http fi +%systemd_reload %triggerpostun base -- %{name} < 2.0.50-6.9 %banner %{name}-2.0.50-6 << EOF @@ -2199,6 +2212,13 @@ Please report bugs to . EOF +%triggerpostun base -- %{name} < 2.2.22-2 +. /etc/sysconfig/httpd +if [ -z "$HTTPD_CONF" ]; then + echo 'HTTPD_CONF="/etc/httpd/apache.conf"' >> /etc/sysconfig/httpd +fi +%systemd_trigger httpd.service + %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 ' @@ -2221,17 +2241,20 @@ mv -f /var/lock/subsys/httpd{.disabled,} 2>/dev/null # restart webserver at the end of transaction %service httpd restart +%systemd_service_restart httpd.service # macro called at module post scriptlet %define module_post \ if [ "$1" = "1" ]; then \ %service -q httpd restart \ + %systemd_service_restart httpd.service \ fi # macro called at module postun scriptlet %define module_postun \ if [ "$1" = "0" ]; then \ %service -q httpd restart \ + %systemd_service_restart httpd.service \ fi # it's sooo annoying to write them @@ -2311,21 +2334,25 @@ fi %post cgi_test if [ "$1" = "1" ]; then %service -q httpd reload + %systemd_service_reload httpd.service fi %postun cgi_test if [ "$1" = "0" ]; then %service -q httpd reload + %systemd_service_reload httpd.service fi %post errordocs if [ "$1" = "1" ]; then %service -q httpd reload + %systemd_service_reload httpd.service fi %postun errordocs if [ "$1" = "0" ]; then %service -q httpd reload + %systemd_service_reload httpd.service fi %files @@ -2350,7 +2377,7 @@ fi %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) %verify(not md5 mtime size) /etc/logrotate.d/* +%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/httpd %dir %{_libexecdir} @@ -2362,6 +2389,8 @@ fi %dir %attr(770,root,http) /var/cache/httpd /usr/lib/tmpfiles.d/%{name}.conf +%{systemdunitdir}/httpd-*.service +%config(noreplace) %verify(not md5 mtime size) /etc/systemd/system/httpd.service %{_mandir}/man8/httpd.8* @@ -2405,10 +2434,10 @@ fi %attr(755,root,root) %{_sbindir}/htdigest %attr(755,root,root) %{_sbindir}/logresolve %attr(755,root,root) %{_sbindir}/rotatelogs -%{_mandir}/man8/ab.8* +%{_mandir}/man1/ab.1* %{_mandir}/man8/apachectl.8* %{_mandir}/man1/htdigest.1* -%{_mandir}/man8/logresolve.8* +%{_mandir}/man1/logresolve.1* %{_mandir}/man8/rotatelogs.8* %files devel @@ -2421,7 +2450,7 @@ fi %{_libexecdir}/build/config_vars.mk %attr(755,root,root) %{_libexecdir}/build/*.sh %{_includedir} -%{_mandir}/man8/apxs.8* +%{_mandir}/man1/apxs.1* %files mod_actions %defattr(644,root,root,755) @@ -2706,6 +2735,7 @@ fi %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 +%{_mandir}/man1/httxt2dbm.1* %files mod_setenvif %defattr(644,root,root,755)