SPECS: pykota.spec - added pykota user/group - install config file...

baggins baggins at pld-linux.org
Sat Dec 8 22:40:14 CET 2007


Author: baggins                      Date: Sat Dec  8 21:40:14 2007 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- added pykota user/group
- install config files in sane location

---- Files affected:
SPECS:
   pykota.spec (1.20 -> 1.21) 

---- Diffs:

================================================================
Index: SPECS/pykota.spec
diff -u SPECS/pykota.spec:1.20 SPECS/pykota.spec:1.21
--- SPECS/pykota.spec:1.20	Sat Dec  8 19:55:31 2007
+++ SPECS/pykota.spec	Sat Dec  8 22:40:09 2007
@@ -31,6 +31,8 @@
 Requires:	%{name}-storage
 Suggests:	net-snmp-utils
 Suggests:	netatalk
+Provides:	group(pykota)
+Provides:	user(pykota)
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define		schemadir	/usr/share/openldap/schema
@@ -128,7 +130,8 @@
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{schemadir}
+install -d $RPM_BUILD_ROOT{%{schemadir},%{_sysconfdir}/%{name}} \
+	$RPM_BUILD_ROOT/var/lib/%{name}
 
 python setup.py install \
 	--root=$RPM_BUILD_ROOT \
@@ -137,14 +140,26 @@
 %py_postclean
 
 install initscripts/ldap/pykota.schema $RPM_BUILD_ROOT%{schemadir}
+install conf/pykota.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pykota.conf
+install conf/pykotadmin.conf.sample $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/pykotadmin.conf
 
-rm -rf $RPM_BUILD_ROOT%{_datadir}/{doc/%{name},%{name}/{ldap,mysql,postgresql,sqlite}}
+rm -rf $RPM_BUILD_ROOT%{_datadir}/{doc/%{name},%{name}/{conf,ldap,mysql,postgresql,sqlite}}
 
 %find_lang %{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%post
+%groupadd -r -g 193 pykota
+%useradd -r -u 193 -d /usr/share/empty -s /bin/false -c "PyKota User" -g pykota pykota
+
+%postun
+if [ "$1" = "0" ]; then
+	%userremove %{name}
+	%groupremove %{name}
+fi
+
 %post -n openldap-schema-pykota
 # dependant schemas: cosine(uid) inetorgperson(displayName) nis(gidNumber)
 %openldap_schema_register %{schemadir}/pykota.schema -d cosine,inetorgperson,nis
@@ -160,6 +175,8 @@
 %defattr(644,root,root,755)
 %doc CREDITS FAQ LICENSE README SECURITY TODO
 %doc openoffice qa-assistant docs/*.sxi docs/*.pdf docs/html 
+%attr(660,pykota,pykota) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/pykota.conf
+%attr(660,pykota,pykota) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/%{name}/pykotadmin.conf
 %attr(755,root,root) %{_bindir}/*
 %dir %{py_sitescriptdir}/%{name}
 %{py_sitescriptdir}/%{name}/*.py[co]
@@ -216,6 +233,7 @@
 %defattr(644,root,root,755)
 %doc initscripts/sqlite/*
 %{py_sitescriptdir}/%{name}/storages/sqlite*.py[co]
+/var/lib/%{name}
 
 %files -n openldap-schema-pykota
 %defattr(644,root,root,755)
@@ -228,6 +246,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.21  2007-12-08 21:40:09  baggins
+- added pykota user/group
+- install config files in sane location
+
 Revision 1.20  2007-12-08 18:55:31  baggins
 - cosmetics
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/pykota.spec?r1=1.20&r2=1.21&f=u



More information about the pld-cvs-commit mailing list