- Cleanup init/unit decision making and provide just systemd service
on systemd systems OBS-URL: https://build.opensuse.org/package/show/Apache/apache2?expand=0&rev=435
This commit is contained in:
parent
75383b5f81
commit
8b05757aa0
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Feb 25 15:59:26 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
- Cleanup init/unit decision making and provide just systemd service
|
||||||
|
on systemd systems
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Wed Feb 25 13:53:16 UTC 2015 - tchvatal@suse.com
|
Wed Feb 25 13:53:16 UTC 2015 - tchvatal@suse.com
|
||||||
|
|
||||||
|
18
apache2.spec
18
apache2.spec
@ -529,15 +529,17 @@ install -m 755 %{SOURCE25} %{buildroot}/%{_bindir}/
|
|||||||
tar xjf %{SOURCE29} -C %{buildroot}/%{sysconfdir}
|
tar xjf %{SOURCE29} -C %{buildroot}/%{sysconfdir}
|
||||||
#
|
#
|
||||||
# init script and friends
|
# init script and friends
|
||||||
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
|
||||||
install -m 744 $RPM_SOURCE_DIR/rc.%{pname} %{buildroot}%{_initddir}/%{pname}
|
|
||||||
install -m 700 $RPM_SOURCE_DIR/start_apache2 %{buildroot}%{_sbindir}/start_apache2
|
install -m 700 $RPM_SOURCE_DIR/start_apache2 %{buildroot}%{_sbindir}/start_apache2
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
mkdir -p %{buildroot}%{_unitdir}/
|
mkdir -p %{buildroot}%{_unitdir}/
|
||||||
install -m 700 $RPM_SOURCE_DIR/apache2-systemd-ask-pass %{buildroot}%{_sbindir}/apache2-systemd-ask-pass
|
install -m 700 $RPM_SOURCE_DIR/apache2-systemd-ask-pass %{buildroot}%{_sbindir}/apache2-systemd-ask-pass
|
||||||
install -m 644 $RPM_SOURCE_DIR/apache2.service %{buildroot}%{_unitdir}/apache2.service
|
install -m 644 $RPM_SOURCE_DIR/apache2.service %{buildroot}%{_unitdir}/apache2.service
|
||||||
%endif
|
ln -sf service %{buildroot}/%{_sbindir}/rc%{pname}
|
||||||
|
%else
|
||||||
|
mkdir -p %{buildroot}%{_sysconfdir}/init.d
|
||||||
|
install -m 744 $RPM_SOURCE_DIR/rc.%{pname} %{buildroot}%{_initddir}/%{pname}
|
||||||
ln -sf ../..%{_initddir}/%{pname} %{buildroot}/%{_sbindir}/rc%{pname}
|
ln -sf ../..%{_initddir}/%{pname} %{buildroot}/%{_sbindir}/rc%{pname}
|
||||||
|
%endif
|
||||||
install -m 755 $RPM_SOURCE_DIR/load_configuration %{buildroot}/%{_datadir}/%{pname}/
|
install -m 755 $RPM_SOURCE_DIR/load_configuration %{buildroot}/%{_datadir}/%{pname}/
|
||||||
install -m 755 $RPM_SOURCE_DIR/find_mpm %{buildroot}/%{_datadir}/%{pname}/
|
install -m 755 $RPM_SOURCE_DIR/find_mpm %{buildroot}/%{_datadir}/%{pname}/
|
||||||
install -m 755 $RPM_SOURCE_DIR/get_includes %{buildroot}/%{_datadir}/%{pname}/
|
install -m 755 $RPM_SOURCE_DIR/get_includes %{buildroot}/%{_datadir}/%{pname}/
|
||||||
@ -771,10 +773,11 @@ mv %{buildroot}/%{sysconfdir}/original .
|
|||||||
%dir %{sysconfdir}/sysconfig.d
|
%dir %{sysconfdir}/sysconfig.d
|
||||||
%config(noreplace) %{_sysconfdir}/logrotate.d/%{pname}
|
%config(noreplace) %{_sysconfdir}/logrotate.d/%{pname}
|
||||||
%{_datadir}/omc/svcinfo.d/apache2.xml
|
%{_datadir}/omc/svcinfo.d/apache2.xml
|
||||||
%{_initddir}/%{pname}
|
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
%{_unitdir}/%{pname}.service
|
%{_unitdir}/%{pname}.service
|
||||||
%{_sbindir}/apache2-systemd-ask-pass
|
%{_sbindir}/apache2-systemd-ask-pass
|
||||||
|
%else
|
||||||
|
%{_initddir}/%{pname}
|
||||||
%endif
|
%endif
|
||||||
%{_sbindir}/rc%{pname}
|
%{_sbindir}/rc%{pname}
|
||||||
%{_sbindir}/apache%{vers}ctl
|
%{_sbindir}/apache%{vers}ctl
|
||||||
@ -1244,8 +1247,9 @@ exit 0
|
|||||||
%postun
|
%postun
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
%service_del_postun apache2.service
|
%service_del_postun apache2.service
|
||||||
%endif
|
%else
|
||||||
%insserv_cleanup
|
%insserv_cleanup
|
||||||
|
%endif
|
||||||
|
|
||||||
%post
|
%post
|
||||||
%if 0%{?suse_version} <= 1130
|
%if 0%{?suse_version} <= 1130
|
||||||
@ -1265,10 +1269,12 @@ if test -s etc/sysconfig/%{pname} && grep -q "^LOADMODULES" etc/sysconfig/%{pnam
|
|||||||
sed "s/LOADMODULES/APACHE_MODULES/" etc/sysconfig/%{pname} >| $tmpfile \
|
sed "s/LOADMODULES/APACHE_MODULES/" etc/sysconfig/%{pname} >| $tmpfile \
|
||||||
&& cp $tmpfile etc/sysconfig/%{pname}
|
&& cp $tmpfile etc/sysconfig/%{pname}
|
||||||
fi
|
fi
|
||||||
|
%{fillup_only apache2}
|
||||||
%if 0%{?suse_version} >= 1210
|
%if 0%{?suse_version} >= 1210
|
||||||
%service_add_post apache2.service
|
%service_add_post apache2.service
|
||||||
%endif
|
%else
|
||||||
%{fillup_and_insserv apache2}
|
%{fillup_and_insserv apache2}
|
||||||
|
%endif
|
||||||
# Update ?
|
# Update ?
|
||||||
if [ $1 -gt 1 ]; then
|
if [ $1 -gt 1 ]; then
|
||||||
# update from package with the old near-monolithic conf file?
|
# update from package with the old near-monolithic conf file?
|
||||||
|
Loading…
Reference in New Issue
Block a user