packages: git-core-slug/crontab, git-core-slug/git-core-slug.spec, git-core...

draenog draenog at pld-linux.org
Wed Jun 27 19:14:39 CEST 2012


Author: draenog                      Date: Wed Jun 27 17:14:39 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- up to 0.10
- change user from gitolite to git

---- Files affected:
packages/git-core-slug:
   crontab (1.2 -> 1.3) , git-core-slug.spec (1.17 -> 1.18) , slug_watch.init (1.1 -> 1.2) , slug_watch.sysconfig (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/git-core-slug/crontab
diff -u packages/git-core-slug/crontab:1.2 packages/git-core-slug/crontab:1.3
--- packages/git-core-slug/crontab:1.2	Tue Mar 27 09:00:38 2012
+++ packages/git-core-slug/crontab	Wed Jun 27 19:14:34 2012
@@ -1,5 +1,5 @@
 SHELL=/bin/sh
 MAILTO=root
 
-03 5 * * * gitolite git --git-dir=/home/services/gitolite/repositories/Refs.git gc --aggressive
-33 * * * *    gitolite git --git-dir=/home/services/gitolite/repositories/Refs.git gc
+03 5 * * *      git  git --git-dir=/home/services/git/repositories/Refs.git gc --aggressive
+*/15 * * * *    git  git --git-dir=/home/services/git/repositories/Refs.git gc

================================================================
Index: packages/git-core-slug/git-core-slug.spec
diff -u packages/git-core-slug/git-core-slug.spec:1.17 packages/git-core-slug/git-core-slug.spec:1.18
--- packages/git-core-slug/git-core-slug.spec:1.17	Mon Apr  2 15:26:42 2012
+++ packages/git-core-slug/git-core-slug.spec	Wed Jun 27 19:14:34 2012
@@ -3,14 +3,15 @@
 %define 	module	git_slug
 Summary:	Tools to interact with PLD git repositories
 Name:		git-core-slug
-Version:	0.9.1
+Version:	0.10
 Release:	1
 License:	GPL v2
 Group:		Development/Building
 Source0:	https://github.com/draenog/slug/tarball/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	90e6432d62dc01647f64311c3db017ae
+# Source0-md5:	e265b4e966a6a51c0b183cc5d1e3e028
 Source1:	slug_watch.init
 Source2:	crontab
+Source3:	slug_watch.sysconfig
 URL:		https://github.com/draenog/slug
 BuildRequires:	asciidoc
 BuildRequires:	docbook-dtd45-xml
@@ -27,15 +28,16 @@
 Python tools to interact with PLD git repositories.
 
 %package watch
-Summary:	Cron job to update Refs repository for git-slug
+Summary:	Daemon to update Refs repository for git-slug
 Group:		Development/Building
+Requires:	git-core-slug
 Requires:	pld-gitolite
 Requires(post,preun):	/sbin/chkconfig
 Requires:	rc-scripts
 
 %description watch
-Cron job to update Refs repository for git-slug. It is to be run on
-PLD gitolite server.
+Daemon to update Refs repository for git-slug. It is to be run on PLD
+gitolite server.
 
 %prep
 %setup -qc
@@ -48,6 +50,7 @@
 %install
 rm -rf $RPM_BUILD_ROOT
 %{__python3} setup.py install \
+	--install-data=/home/services/git \
 	--skip-build \
 	--optimize=2 \
 	--root=$RPM_BUILD_ROOT
@@ -59,13 +62,14 @@
 echo ".so slug.py.1" > $RPM_BUILD_ROOT%{_mandir}/man1/git-pld.1
 
 install -D %SOURCE1 $RPM_BUILD_ROOT/etc/rc.d/init.d/slug_watch
-install -d $RPM_BUILD_ROOT/home/services/gitolite/.gitolite/hooks/common
-cp -r post-receive.python.d $RPM_BUILD_ROOT/home/services/gitolite/.gitolite/hooks/common
-install -d $RPM_BUILD_ROOT/home/services/gitolite/{watchdir,Refs}
-install -d $RPM_BUILD_ROOT/home/services/gitolite/Attic
-touch $RPM_BUILD_ROOT/home/services/gitolite/{watchdir,Refs}
+install -d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
+cp -r post-receive.python.d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
+install -d $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
+install -d $RPM_BUILD_ROOT/home/services/git/Attic
+touch $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
 
 install -D %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/slug_watch
+install -D %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/slug_watch
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -87,8 +91,6 @@
 %{_libdir}/git-core/git-pld
 %{_mandir}/man1/*.1*
 %{py3_sitescriptdir}/%{module}
-%exclude %{py3_sitescriptdir}/%{module}/serverconst.py
-%exclude %{py3_sitescriptdir}/%{module}/*/serverconst.*
 %if "%{py_ver}" > "2.4"
 %{py3_sitescriptdir}/git_core_slug-*.egg-info
 %endif
@@ -98,14 +100,14 @@
 %attr(755,root,root) %{_bindir}/slug_watch
 %attr(754,root,root) /etc/rc.d/init.d/slug_watch
 /etc/cron.d/slug_watch
-%attr(755,gitolite,gitolite) /home/services/gitolite/adc/bin/trash
+%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/slug_watch
+%attr(755,git,git) /home/services/git/adc/bin/trash
+%attr(755,git,git) /home/services/git/adc/bin/move
 %{py3_sitescriptdir}/Daemon
-%{py3_sitescriptdir}/%{module}//serverconst.py
-%{py3_sitescriptdir}/%{module}/*/serverconst.*
-%attr(644,gitolite,gitolite) /home/services/gitolite/.gitolite/hooks/common/post-receive.python.d/slug_hook.py
-%attr(744,gitolite,gitolite) %dir /home/services/gitolite/Attic
-%attr(744,gitolite,gitolite) %dir /home/services/gitolite/watchdir
-%attr(744,gitolite,gitolite) %dir /home/services/gitolite/Refs
+%attr(644,git,git) /home/services/git/.gitolite/hooks/common/post-receive.python.d/slug_hook.py
+%attr(744,git,git) %dir /home/services/git/Attic
+%attr(744,git,git) %dir /home/services/git/watchdir
+%attr(744,git,git) %dir /home/services/git/Refs
 
 
 %define date	%(echo `LC_ALL="C" date +"%a %b %d %Y"`)
@@ -114,6 +116,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.18  2012/06/27 17:14:34  draenog
+- up to 0.10
+- change user from gitolite to git
+
 Revision 1.17  2012/04/02 13:26:42  draenog
 - fix Source0-md5
 

================================================================
Index: packages/git-core-slug/slug_watch.init
diff -u packages/git-core-slug/slug_watch.init:1.1 packages/git-core-slug/slug_watch.init:1.2
--- packages/git-core-slug/slug_watch.init:1.1	Fri Mar 16 21:12:59 2012
+++ packages/git-core-slug/slug_watch.init	Wed Jun 27 19:14:34 2012
@@ -14,9 +14,16 @@
 # Source function library
 . /etc/rc.d/init.d/functions
 
+# Source slug_watch configuration
+. /etc/sysconfig/slug_watch
+
 
 pidfile="/var/run/slug_watch.pid"
 
+if [ ! -n "$WATCHDIR"  -o ! -n "$REFREPODIR" ]; then
+	echo "WATCHDIR or REFREPODIR variable not set"
+	exit 1
+fi
 
 start() {
 	# Check if the service is already running?
@@ -26,7 +33,7 @@
 	fi
 
 	msg_starting "slug_watch"
-	daemon /usr/bin/slug_watch -u gitolite -d start 
+	daemon /usr/bin/slug_watch -u git -w "$WATCHDIR" -r "$REFREPODIR" $OTHER_OPTIONS -d start 
 	RETVAL=$?
 	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/slug_watch
 }

================================================================
Index: packages/git-core-slug/slug_watch.sysconfig
diff -u /dev/null packages/git-core-slug/slug_watch.sysconfig:1.1
--- /dev/null	Wed Jun 27 19:14:40 2012
+++ packages/git-core-slug/slug_watch.sysconfig	Wed Jun 27 19:14:34 2012
@@ -0,0 +1,6 @@
+# If the path is not absolute it is interpret in respect of home directory of
+# user running slug_watch daemon
+WATCHDIR="watchdir"
+REFREPODIR="repositories"
+
+OTHER_OPTIONS="-m git"
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/git-core-slug/crontab?r1=1.2&r2=1.3
    http://cvs.pld-linux.org/packages/git-core-slug/git-core-slug.spec?r1=1.17&r2=1.18
    http://cvs.pld-linux.org/packages/git-core-slug/slug_watch.init?r1=1.1&r2=1.2



More information about the pld-cvs-commit mailing list