[packages/git-core-slug] - up to 0.15
baggins
baggins at pld-linux.org
Wed Dec 31 15:41:39 CET 2025
commit 4bcc12a2894af31ad953fedb162bc390704e6e95
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Dec 31 17:41:40 2025 +0100
- up to 0.15
crontab | 5 ----
git-core-slug.spec | 28 ++++++++++---------
slug_watch-cron | 9 -------
slug_watch.init | 76 ----------------------------------------------------
slug_watch.sysconfig | 6 -----
5 files changed, 16 insertions(+), 108 deletions(-)
---
diff --git a/git-core-slug.spec b/git-core-slug.spec
index fb537d7..2e2352d 100644
--- a/git-core-slug.spec
+++ b/git-core-slug.spec
@@ -2,16 +2,12 @@
Summary: Tools to interact with PLD Linux git repositories
Summary(pl.UTF-8): Narzędzia do pracy z repozytoriami gita w PLD Linuksa
Name: git-core-slug
-Version: 0.14
-Release: 5
+Version: 0.15
+Release: 1
License: GPL v2
Group: Development/Building
-Source0: %{name}-%{version}.tar.gz
-# Source0-md5: 94d40c83999c0ea1d085fb436beede19
-Source1: slug_watch.init
-Source2: crontab
-Source3: slug_watch.sysconfig
-Source4: slug_watch-cron
+Source0: %{name}-%{version}.tar.xz
+# Source0-md5: 6cdb2ba9c6d0270c68160ec57bc2bfae
URL: https://git.pld-linux.org/gitweb.cgi/?p=projects/git-slug.git;a=summary
BuildRequires: asciidoc
BuildRequires: docbook-dtd45-xml
@@ -73,15 +69,17 @@ install -d $RPM_BUILD_ROOT%{gitcoredir}
ln -s %{_bindir}/slug.py $RPM_BUILD_ROOT%{gitcoredir}/git-pld
echo ".so slug.py.1" > $RPM_BUILD_ROOT%{_mandir}/man1/git-pld.1
-install -Dp %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/slug_watch
+install -Dp watch/slug_watch.init $RPM_BUILD_ROOT/etc/rc.d/init.d/slug_watch
install -d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
cp -rp post-receive.python.d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
install -d $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
touch $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
-install -Dp %{SOURCE2} $RPM_BUILD_ROOT/etc/cron.d/slug_watch
-install -Dp %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/slug_watch
-install -Dp %{SOURCE4} $RPM_BUILD_ROOT%{_bindir}
+install -Dp watch/crontab $RPM_BUILD_ROOT/etc/cron.d/slug_watch
+install -Dp watch/slug_watch.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/slug_watch
+install -Dp watch/slug_watch-cron $RPM_BUILD_ROOT%{_bindir}
+
+install -Dp watch/slug_watch.service $RPM_BUILD_ROOT%{systemdunitdir}/slug_watch.service
%clean
rm -rf $RPM_BUILD_ROOT
@@ -89,12 +87,17 @@ rm -rf $RPM_BUILD_ROOT
%post watch
/sbin/chkconfig --add slug_watch
%service slug_watch restart
+%systemd_post slug_watch.service
%preun watch
if [ "$1" = "0" ]; then
%service -q slug_watch stop
/sbin/chkconfig --del slug_watch
fi
+%systemd_preun slug_watch.service
+
+%postun watch
+%systemd_postun_with_restart slug_watch.service
%files
%defattr(644,root,root,755)
@@ -111,6 +114,7 @@ fi
%attr(755,root,root) %{_bindir}/slug_watch
%attr(755,root,root) %{_bindir}/slug_watch-cron
%attr(754,root,root) /etc/rc.d/init.d/slug_watch
+%{systemdunitdir}/slug_watch.service
%config(noreplace) %verify(not md5 mtime size) /etc/cron.d/slug_watch
%config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/slug_watch
%{py3_sitescriptdir}/Daemon
diff --git a/crontab b/crontab
deleted file mode 100644
index c4efb0a..0000000
--- a/crontab
+++ /dev/null
@@ -1,5 +0,0 @@
-SHELL=/bin/sh
-MAILTO=root
-
-03 5 * * * git /usr/bin/slug_watch-cron --aggressive
-*/15 * * * * git /usr/bin/slug_watch-cron
diff --git a/slug_watch-cron b/slug_watch-cron
deleted file mode 100644
index 258accf..0000000
--- a/slug_watch-cron
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if [ -f /etc/sysconfig/slug_watch ]; then
- . /etc/sysconfig/slug_watch
-fi
-
-if [ -n "$REFREPODIR" ]; then
- git --git-dir="$REFREPODIR/Refs.git" gc "$@"
-fi
diff --git a/slug_watch.init b/slug_watch.init
deleted file mode 100644
index ce90822..0000000
--- a/slug_watch.init
+++ /dev/null
@@ -1,76 +0,0 @@
-#!/bin/sh
-#
-# slug_watch daemon to update Refs list
-#
-# chkconfig: 345 99 01
-#
-# description: daemon for PLD gitolite setup
-#
-# processname: slug_watch
-# pidfile: /var/run/slug_watch.pid
-#
-# $Id$
-
-# 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?
- if [ -f /var/lock/subsys/slug_watch ]; then
- msg_already_running "slug_watch"
- return
- fi
-
- msg_starting "slug_watch"
- 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
-}
-
-stop() {
- if [ ! -f /var/lock/subsys/slug_watch ]; then
- msg_not_running "slug_watch"
- return
- fi
-
- # Stop daemons.
- msg_stopping "slug_watch"
- killproc slug_watch
- rm -f /var/lock/subsys/slug_watch
-}
-
-
-RETVAL=0
-# See how we were called.
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- restart)
- stop
- start
- ;;
- status)
- status --pidfile $pidfile slug_watch
- RETVAL=$?
- ;;
- *)
- msg_usage "$0 {start|stop|restart|status}"
- exit 3
-esac
-
-exit $RETVAL
diff --git a/slug_watch.sysconfig b/slug_watch.sysconfig
deleted file mode 100644
index 299c62c..0000000
--- a/slug_watch.sysconfig
+++ /dev/null
@@ -1,6 +0,0 @@
-# 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 root -s git"
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/git-core-slug.git/commitdiff/4bcc12a2894af31ad953fedb162bc390704e6e95
More information about the pld-cvs-commit
mailing list