packages: apache/apache.spec - rel 3 - cleanup sysvinit/systemd hacks

baggins baggins at pld-linux.org
Fri Feb 17 19:25:08 CET 2012


Author: baggins                      Date: Fri Feb 17 18:25:08 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- rel 3
- cleanup sysvinit/systemd hacks

---- Files affected:
packages/apache:
   apache.spec (1.641 -> 1.642) 

---- Diffs:

================================================================
Index: packages/apache/apache.spec
diff -u packages/apache/apache.spec:1.641 packages/apache/apache.spec:1.642
--- packages/apache/apache.spec:1.641	Wed Feb  1 20:43:11 2012
+++ packages/apache/apache.spec	Fri Feb 17 19:25:02 2012
@@ -45,7 +45,7 @@
 Summary(tr.UTF-8):	Lider WWW tarayıcı
 Name:		apache
 Version:	2.2.22
-Release:	2
+Release:	3
 License:	Apache v2.0
 Group:		Networking/Daemons/HTTP
 Source0:	http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
@@ -121,7 +121,7 @@
 BuildRequires:	rpm >= 4.4.9-56
 BuildRequires:	rpm-build >= 4.4.0
 BuildRequires:	rpm-perlprov >= 4.1-13
-BuildRequires:	rpmbuild(macros) >= 1.639
+BuildRequires:	rpmbuild(macros) >= 1.647
 BuildRequires:	sed >= 4.0
 BuildRequires:	zlib-devel
 Requires:	%{name}-errordocs = %{version}-%{release}
@@ -145,19 +145,6 @@
 %define		_libexecdir	%{_libdir}/apache
 %define		_cgibindir	%{_prefix}/lib/cgi-bin/%{name}
 
-%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
@@ -2254,18 +2241,21 @@
 # main package are very important for all this to work.
 
 # restart webserver at the end of transaction
-%httpd_restart
+%service httpd restart
+%systemd_service_restart httpd.service
 
 # macro called at module post scriptlet
 %define	module_post \
 if [ "$1" = "1" ]; then \
-	%httpd_restart \
+	%service -q httpd restart \
+	%systemd_service_restart httpd.service
 fi
 
 # macro called at module postun scriptlet
 %define	module_postun \
 if [ "$1" = "0" ]; then \
-	%httpd_restart \
+	%service -q httpd restart \
+	%systemd_service_restart httpd.service
 fi
 
 # it's sooo annoying to write them
@@ -2344,22 +2334,26 @@
 
 %post cgi_test
 if [ "$1" = "1" ]; then
-	%httpd_reload
+	%service -q httpd reload
+	%systemd_service_reload httpd.service
 fi
 
 %postun cgi_test
 if [ "$1" = "0" ]; then
-	%httpd_reload
+	%service -q httpd reload
+	%systemd_service_reload httpd.service
 fi
 
 %post errordocs
 if [ "$1" = "1" ]; then
-	%httpd_reload
+	%service -q httpd reload
+	%systemd_service_reload httpd.service
 fi
 
 %postun errordocs
 if [ "$1" = "0" ]; then
-	%httpd_reload
+	%service -q httpd reload
+	%systemd_service_reload httpd.service
 fi
 
 %files
@@ -2823,6 +2817,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.642  2012/02/17 18:25:02  baggins
+- rel 3
+- cleanup sysvinit/systemd hacks
+
 Revision 1.641  2012/02/01 19:43:11  qboosh
 - more verbose files in system-wide dirs
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/apache/apache.spec?r1=1.641&r2=1.642&f=u



More information about the pld-cvs-commit mailing list