packages: pld-gitolite/pld-gitolite.spec - make loginname configurable - gi...

draenog draenog at pld-linux.org
Sun Jun 24 22:51:27 CEST 2012


Author: draenog                      Date: Sun Jun 24 20:51:27 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- make loginname configurable
- git at git looks better then gitolite at git

---- Files affected:
packages/pld-gitolite:
   pld-gitolite.spec (1.8 -> 1.9) 

---- Diffs:

================================================================
Index: packages/pld-gitolite/pld-gitolite.spec
diff -u packages/pld-gitolite/pld-gitolite.spec:1.8 packages/pld-gitolite/pld-gitolite.spec:1.9
--- packages/pld-gitolite/pld-gitolite.spec:1.8	Sun Jun 17 00:08:00 2012
+++ packages/pld-gitolite/pld-gitolite.spec	Sun Jun 24 22:51:22 2012
@@ -1,6 +1,9 @@
 # $Revision$, $Date$
 # TODO:
 # - real webapps integration
+
+%define gituser   git
+
 Summary:	Gitolite setup used by PLD
 Name:		pld-gitolite
 Version:	0.8
@@ -18,8 +21,8 @@
 Requires:	git-core-slug
 Requires:	gitolite
 Requires:	perl-RPC-XML
-Provides:	group(gitolite)
-Provides:	user(gitolite)
+Provides:	group(%gituser)
+Provides:	user(%gituser)
 Requires(postun):	/usr/sbin/groupdel
 Requires(pre):	/usr/bin/getgid
 Requires(pre):	/usr/sbin/groupadd
@@ -41,14 +44,14 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 # create directories if necessary
-install -d $RPM_BUILD_ROOT/home/services/gitolite/repositories
-install -d $RPM_BUILD_ROOT/home/services/gitolite/.gitolite/{conf,hooks/common}
+install -d $RPM_BUILD_ROOT/home/services/%gituser/repositories
+install -d $RPM_BUILD_ROOT/home/services/%gituser/.gitolite/{conf,hooks/common}
 
-cp -p %{SOURCE1} %{SOURCE5} $RPM_BUILD_ROOT/home/services/gitolite/.gitolite/conf
-cp -p %{SOURCE2} $RPM_BUILD_ROOT/home/services/gitolite/.gitolite.rc
-cp -p %{SOURCE3} $RPM_BUILD_ROOT/home/services/gitolite/.gitconfig
-cp -a hooks/* $RPM_BUILD_ROOT/home/services/gitolite/.gitolite/hooks/common
-cp -a adc $RPM_BUILD_ROOT/home/services/gitolite
+cp -p %{SOURCE1} %{SOURCE5} $RPM_BUILD_ROOT/home/services/%gituser/.gitolite/conf
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/home/services/%gituser/.gitolite.rc
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/home/services/%gituser/.gitconfig
+cp -a hooks/* $RPM_BUILD_ROOT/home/services/%gituser/.gitolite/hooks/common
+cp -a adc $RPM_BUILD_ROOT/home/services/%gituser
 
 install -D %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/webapps/gitweb/gitweb-pld.conf
 
@@ -56,48 +59,48 @@
 rm -rf $RPM_BUILD_ROOT
 
 %pre
-%groupadd -g 264 gitolite
-%useradd -u 264 -d /home/services/gitolite -s /bin/sh -g gitolite -c "PLD Gitolite User" gitolite
+%groupadd -g 264 %gituser
+%useradd -u 264 -d /home/services/%gituser -s /bin/sh -g %gituser -c "PLD Gitolite User" %gituser
 
 %postun
 if [ "$1" = "0" ]; then
-	%userremove gitolite
-	%groupremove gitolite
+	%userremove %gituser
+	%groupremove %gituser
 fi
 
 %files
 %defattr(644,root,root,755)
 %attr(640,root,http) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/webapps/gitweb/gitweb-pld.conf
 
-# all files owned by gitolite:gitolite
-%defattr(644,gitolite,gitolite,755)
+# all files owned by %gituser:%gituser
+%defattr(644,%gituser,%gituser,755)
 
-%dir /home/services/gitolite
-%dir /home/services/gitolite/repositories
-%config(noreplace) %verify(not md5 mtime size) /home/services/gitolite/.gitconfig
-
-%dir /home/services/gitolite/.gitolite
-%config(noreplace) %verify(not md5 mtime size) /home/services/gitolite/.gitolite.rc
-
-%dir /home/services/gitolite/.gitolite/conf
-%config(noreplace) %verify(not md5 mtime size) /home/services/gitolite/.gitolite/conf/gitolite.conf
-%config(noreplace) %verify(not md5 mtime size) /home/services/gitolite/.gitolite/conf/pld-developers
-
-%dir /home/services/gitolite/.gitolite/hooks
-%dir /home/services/gitolite/.gitolite/hooks/common
-%attr(744,gitolite,gitolite) /home/services/gitolite/.gitolite/hooks/common/update.secondary
-%attr(744,gitolite,gitolite) /home/services/gitolite/.gitolite/hooks/common/post-receive
-%dir /home/services/gitolite/.gitolite/hooks/common/post-receive.d
-%attr(744,gitolite,gitolite) /home/services/gitolite/.gitolite/hooks/common/post-receive.d/mailnotification
-%attr(744,gitolite,gitolite) /home/services/gitolite/.gitolite/hooks/common/post-receive.d/setdescription.sh
-/home/services/gitolite/.gitolite/hooks/common/post-receive.python.d
-%dir /home/services/gitolite/.gitolite/hooks/common/post-receive.d/misc
-%attr(744,gitolite,gitolite) /home/services/gitolite/.gitolite/hooks/common/post-receive.d/misc/ciabot.pl
-%dir /home/services/gitolite/adc
-%dir /home/services/gitolite/adc/bin
-%attr(744,gitolite,gitolite) /home/services/gitolite/adc/bin/create
-%attr(744,gitolite,gitolite) /home/services/gitolite/adc/bin/sskm
-/home/services/gitolite/adc/bin/adc.common-functions
+%dir /home/services/%gituser
+%dir /home/services/%gituser/repositories
+%config(noreplace) %verify(not md5 mtime size) /home/services/%gituser/.gitconfig
+
+%dir /home/services/%gituser/.gitolite
+%config(noreplace) %verify(not md5 mtime size) /home/services/%gituser/.gitolite.rc
+
+%dir /home/services/%gituser/.gitolite/conf
+%config(noreplace) %verify(not md5 mtime size) /home/services/%gituser/.gitolite/conf/gitolite.conf
+%config(noreplace) %verify(not md5 mtime size) /home/services/%gituser/.gitolite/conf/pld-developers
+
+%dir /home/services/%gituser/.gitolite/hooks
+%dir /home/services/%gituser/.gitolite/hooks/common
+%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/update.secondary
+%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/post-receive
+%dir /home/services/%gituser/.gitolite/hooks/common/post-receive.d
+%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/post-receive.d/mailnotification
+%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/post-receive.d/setdescription.sh
+/home/services/%gituser/.gitolite/hooks/common/post-receive.python.d
+%dir /home/services/%gituser/.gitolite/hooks/common/post-receive.d/misc
+%attr(744,%gituser,%gituser) /home/services/%gituser/.gitolite/hooks/common/post-receive.d/misc/ciabot.pl
+%dir /home/services/%gituser/adc
+%dir /home/services/%gituser/adc/bin
+%attr(744,%gituser,%gituser) /home/services/%gituser/adc/bin/create
+%attr(744,%gituser,%gituser) /home/services/%gituser/adc/bin/sskm
+/home/services/%gituser/adc/bin/adc.common-functions
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
 %changelog
@@ -105,6 +108,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.9  2012/06/24 20:51:22  draenog
+- make loginname configurable
+- git at git looks better then gitolite at git
+
 Revision 1.8  2012/06/16 22:08:00  draenog
 - up to 0.8
 - don't use @all group with sskm, as it can result in commits authored by
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/pld-gitolite/pld-gitolite.spec?r1=1.8&r2=1.9



More information about the pld-cvs-commit mailing list