SPECS: apache.spec - cgi demo/test programs print-env and test-cgi...

twittner twittner at pld-linux.org
Thu Jun 30 22:18:28 CEST 2005


Author: twittner                     Date: Thu Jun 30 20:18:28 2005 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- cgi demo/test programs print-env and test-cgi have been
  release in separate subpackage `apache-cgi-test' and
  added appropriate configs and info about it
- mv print-env and test-cgi to /usr/lib/cgi-bin/apache dir
- Req: FHS >= 2.3-12 (always use /usr/lib/cgi-bin dir even
  on archs with /usr/lib64
- rel. 3

---- Files affected:
SPECS:
   apache.spec (1.395 -> 1.396) 

---- Diffs:

================================================================
Index: SPECS/apache.spec
diff -u SPECS/apache.spec:1.395 SPECS/apache.spec:1.396
--- SPECS/apache.spec:1.395	Sat Jun  4 02:53:51 2005
+++ SPECS/apache.spec	Thu Jun 30 22:18:23 2005
@@ -35,7 +35,7 @@
 Summary(tr):	Lider WWW tarayýcý
 Name:		apache
 Version:	2.0.54
-Release:	2
+Release:	3
 License:	Apache Group License
 Group:		Networking/Daemons
 Source0:	http://www.apache.org/dist/httpd/httpd-%{version}.tar.gz
@@ -118,6 +118,7 @@
 Requires:	/etc/mime.types
 Requires:	apr >= 1:1.0.0-2
 Requires:	%{name}-apxs = %{version}-%{release}
+Requires:	FHS >= 2.3-12
 Requires:	mailcap
 Requires:	psmisc >= 20.1
 Provides:	apache(modules-api) = %{_apache_modules_api}
@@ -148,6 +149,7 @@
 %define		_includedir	%{_prefix}/include/apache
 %define		_datadir	/home/services/httpd
 %define		_libexecdir	%{_libdir}/apache
+%define		_cgibindir	%{_prefix}/lib/cgi-bin/%{name}
 
 %description
 Apache is a powerful, full-featured, efficient and freely-available
@@ -733,6 +735,18 @@
 Apache'a 2; ta wersja obsługuje hasła zapisane czystym tekstem oraz
 zakodowane algorytmami CRYPT (domyślnym), MD5 i SHA1.
 
+%package cgi_test
+Summary:	cgi test/demo programs
+Summary(pl):	Programy testowe/przykładowe cgi
+Group:		Networking/Utilities
+Requires:	%{name} = %{version}-%{release}
+
+%description cgi_test
+Two cgi test/demo programs: test-cgi and print-env.
+
+%description cgi_test -l pl
+Dwa programy testowe/przykładowe cgi: test-cgi and print-env.
+
 %prep
 %setup -q -n httpd-%{version}
 %patch0 -p1
@@ -867,7 +881,8 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/etc/{logrotate.d,rc.d/init.d,sysconfig,monit} \
-	$RPM_BUILD_ROOT%{_var}/{log/{httpd,archiv/httpd},{run,cache}/apache,lock/mod_dav}
+	$RPM_BUILD_ROOT%{_var}/{log/{httpd,archiv/httpd},{run,cache}/apache,lock/mod_dav} \
+	$RPM_BUILD_ROOT%{_datadir}/cgi-bin
 
 # prefork is default one
 %{__make} -C buildmpm-prefork install \
@@ -879,7 +894,7 @@
 	errordir=%{_datadir}/error \
 	htdocsdir=%{_datadir}/html \
 	manualdir=%{_datadir}/manual \
-	cgidir=%{_datadir}/cgi-bin \
+	cgidir=%{_cgibindir} \
 	runtimedir=%{_var}/run \
 	logdir=%{_var}/log/httpd \
 	proxycachedir=%{_var}/cache/httpd
@@ -965,6 +980,12 @@
 mv $RPM_BUILD_ROOT%{_sbindir}/htpasswd $RPM_BUILD_ROOT%{_bindir}/
 ln -sf %{_bindir}/htpasswd $RPM_BUILD_ROOT%{_sbindir}/
 
+# cgi_test: create config file with ScriptAlias
+cat << EOF > $CFG/09_cgi_test.conf
+ScriptAlias /cgi-bin/printenv %{_cgibindir}/printenv
+ScriptAlias /cgi-bin/test-cgi %{_cgibindir}/test-cgi
+EOF
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -1004,6 +1025,19 @@
 echo "poldek --upgrade %{name}-mod_autoindex"
 echo
 
+%triggerpostun -- %{name} <= 2.0.54-2
+echo '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+!!!                                                      !!!
+!!! WARNING!!!                                           !!!
+!!!                                                      !!!
+!!! CGI demo/test programs -  printenv, test-cgi  - have !!!
+!!! been released form package apache into separate      !!!
+!!! subpackage apache-cgi_test. If you need printenv     !!!
+!!! and/or test-cgi, please install apache-cgi_test      !!!
+!!! package, e.g. by running poldek -Uv apache-cgi_test  !!!
+!!!                                                      !!!
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!'
+
 %post mod_actions
 if [ -f /var/lock/subsys/httpd ]; then
 	/etc/rc.d/init.d/httpd restart 1>&2
@@ -1340,6 +1374,20 @@
 	fi
 fi
 
+%post cgi_test
+if [ -f /var/lock/subsys/httpd ]; then
+	/etc/rc.d/init.d/httpd restart 1>&2
+else
+	echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache HTTP daemon."
+fi
+
+%preun cgi_test
+if [ "$1" = "0" ]; then
+	if [ -f /var/lock/subsys/httpd ]; then
+		/etc/rc.d/init.d/httpd restart 1>&2
+	fi
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc ABOUT_APACHE CHANGES README
@@ -1408,10 +1456,9 @@
 
 %dir %{_datadir}
 
-%attr(755,root,root) %dir %{_datadir}/html
+%dir %{_datadir}/cgi-bin
+%dir %{_datadir}/html
 %{_datadir}/icons
-%attr(755,root,root) %{_datadir}/cgi-bin
-
 %{_datadir}/error
 
 %files doc
@@ -1765,12 +1812,27 @@
 %{_sbindir}/htpasswd
 %{_mandir}/man1/htpasswd.1*
 
+%files cgi_test
+%defattr(644,root,root,755)
+%dir %{_cgibindir}
+%attr(755,root,root) %{_cgibindir}/*
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/httpd.conf/09_cgi_test.conf
+
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
 * %{date} PLD Team <feedback at pld-linux.org>
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.396  2005/06/30 20:18:23  twittner
+- cgi demo/test programs print-env and test-cgi have been
+  release in separate subpackage `apache-cgi-test' and
+  added appropriate configs and info about it
+- mv print-env and test-cgi to /usr/lib/cgi-bin/apache dir
+- Req: FHS >= 2.3-12 (always use /usr/lib/cgi-bin dir even
+  on archs with /usr/lib64
+- rel. 3
+
 Revision 1.395  2005/06/04 00:53:51  twittner
 - rc-scripts version >= 0.4.0.15 is needed by `--waitforname' which is used
   by apache initscript
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/apache.spec?r1=1.395&r2=1.396&f=u




More information about the pld-cvs-commit mailing list