SPECS: pld-builder.spec - added initscript (template) for performi...

twittner twittner at pld-linux.org
Mon Apr 3 18:00:29 CEST 2006


Author: twittner                     Date: Mon Apr  3 16:00:29 2006 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added initscript (template) for performing administrator's tasks
  for pld-builder such as mounting /proc in builder chroots,
  installing/removing crontables for non-standalone builders

---- Files affected:
SPECS:
   pld-builder.spec (1.22 -> 1.23) 

---- Diffs:

================================================================
Index: SPECS/pld-builder.spec
diff -u SPECS/pld-builder.spec:1.22 SPECS/pld-builder.spec:1.23
--- SPECS/pld-builder.spec:1.22	Thu Nov  3 01:29:18 2005
+++ SPECS/pld-builder.spec	Mon Apr  3 18:00:24 2006
@@ -9,6 +9,8 @@
 Group:		Development/Building
 Source0:	%{name}.new-%{_snap}.tar.bz2
 # Source0-md5:	935e8edd4613686cfc88b793bfb6a6b6
+Source1:	%{name}.init
+Source2:	%{name}.sysconfig
 URL:		http://cvs.pld-linux.org/cgi-bin/cvsweb/pld-builder.new/
 BuildRequires:	python
 Requires:	python-pld-builder = %{version}-%{release}
@@ -97,11 +99,24 @@
 cp -a admin/*.sh $RPM_BUILD_ROOT%{_datadir}/admin
 
 # dirs
-install -d $RPM_BUILD_ROOT%{_sharedstatedir}/%{name}/{spool/{builds,ftp},lock,www/{s,}rpms}
+install -d $RPM_BUILD_ROOT{%{_sharedstatedir}/%{name}/{spool/{builds,ftp},lock,www/{s,}rpms},/etc/{sysconfig,rc.d/init.d}}
+
+install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/pld-builder
+install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/pld-builder
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+/sbin/chkconfig --add %{name}
+%service %{name} restart "pld-builder"
+
+%preun
+if [ "$1" = "0" ]; then
+        %service %{name} stop
+        /sbin/chkconfig --del %{name}
+fi
+
 %files
 %defattr(644,root,root,755)
 %doc README TODO
@@ -124,6 +139,9 @@
 %dir %{_sharedstatedir}/%{name}/www/rpms
 %dir %{_sharedstatedir}/%{name}/www/srpms
 
+%attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/pld-builder
+%attr(754,root,root) /etc/rc.d/init.d/pld-builder
+
 %files client
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_bindir}/%{name}-make-request
@@ -138,6 +156,11 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.23  2006/04/03 16:00:24  twittner
+- added initscript (template) for performing administrator's tasks
+  for pld-builder such as mounting /proc in builder chroots,
+  installing/removing crontables for non-standalone builders
+
 Revision 1.22  2005/11/03 00:29:18  qboosh
 - updated pl
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SPECS/pld-builder.spec?r1=1.22&r2=1.23&f=u



More information about the pld-cvs-commit mailing list