[packages/git-core-slug] Up to 0.20.0; warning: interface now is more git like

arekm arekm at pld-linux.org
Tue May 12 15:08:02 CEST 2026


commit 9b1378dcb272fc90bc1f0dfe4bc0a3c317286f3e
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Tue May 12 15:07:22 2026 +0200

    Up to 0.20.0; warning: interface now is more git like

 git-core-slug.spec | 76 +++++++++++++++++++++++++++++++++---------------------
 1 file changed, 46 insertions(+), 30 deletions(-)
---
diff --git a/git-core-slug.spec b/git-core-slug.spec
index 74b3975..b3e2fda 100644
--- a/git-core-slug.spec
+++ b/git-core-slug.spec
@@ -1,30 +1,36 @@
 %define		module	git_slug
+# Conditional build:
+%bcond_without	tests	# unit tests
+
 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.15.2
+Version:	0.20.0
 Release:	1
 License:	GPL v2
 Group:		Development/Building
-Source0:	%{name}-%{version}.tar.gz
-# Source0-md5:	eb800e7b4e5db4df2c3b31f7cc3d5710
+Source0:	git_core_slug-%{version}.tar.gz
+# Source0-md5:	70e14ee38566d13894a4313120a1d6cd
 URL:		https://git.pld-linux.org/gitweb.cgi/?p=projects/git-slug.git;a=summary
 BuildRequires:	asciidoc
 BuildRequires:	docbook-dtd45-xml
-BuildRequires:	git-core >= 2.7.1-3
-BuildRequires:	python3-modules >= 1:3.3.0
+BuildRequires:	python3-build
+BuildRequires:	python3-hatchling
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.9
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
+BuildRequires:	rpmbuild(macros) >= 2.044
 BuildRequires:	xmlto
+%if %{with tests}
+BuildRequires:	python3-pytest >= 8.0
+%endif
 Requires:	git-core
-Requires:	python3-modules
+Requires:	python3-modules >= 1:3.9
 Suggests:	openssh-clients
 Suggests:	python3-rpm
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
-%define		gitcoredir	%(git --exec-path)
-
 %description
 Python tools to interact with PLD Linux git repositories.
 
@@ -54,32 +60,40 @@ do uruchamiania na serwerze gitolite PLD.
 %setup -q -n git_core_slug-%{version}
 
 %build
-%py3_build
+%py3_build_pyproject
 %{__make} man
 
+%if %{with tests}
+PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
+%{__python3} -m pytest tests --ignore=tests/test_benchmark.py
+%endif
+
 %install
 rm -rf $RPM_BUILD_ROOT
-%py3_install \
-	--install-data=/home/services/git \
+%py3_install_pyproject
 
 %{__make} man-install \
 	DESTDIR=$RPM_BUILD_ROOT
 
-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
+echo ".so slug.1" > $RPM_BUILD_ROOT%{_mandir}/man1/git-pld.1
 
-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 -p server/slug_watch/slug_watch $RPM_BUILD_ROOT%{_bindir}/slug_watch
+install -p server/slug_watch/slug_watch-cron $RPM_BUILD_ROOT%{_bindir}/slug_watch-cron
 
-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 server/slug_watch/slug_watch.init $RPM_BUILD_ROOT/etc/rc.d/init.d/slug_watch
+install -Dp server/slug_watch/slug_watch.service $RPM_BUILD_ROOT%{systemdunitdir}/slug_watch.service
+install -Dp server/slug_watch/crontab $RPM_BUILD_ROOT/etc/cron.d/slug_watch
+install -Dp server/slug_watch/slug_watch.sysconfig $RPM_BUILD_ROOT/etc/sysconfig/slug_watch
 
-install -Dp watch/slug_watch.service $RPM_BUILD_ROOT%{systemdunitdir}/slug_watch.service
+install -d $RPM_BUILD_ROOT/home/services/git/adc/bin
+install -p server/adc/trash server/adc/move $RPM_BUILD_ROOT/home/services/git/adc/bin
+ln -s move $RPM_BUILD_ROOT/home/services/git/adc/bin/copy
+
+install -d $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common/post-receive.python.d
+install -p server/hooks/post-receive $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common
+install -p server/hooks/slug_hook.py $RPM_BUILD_ROOT/home/services/git/.gitolite/hooks/common/post-receive.python.d
+
+install -d $RPM_BUILD_ROOT/home/services/git/{watchdir,Refs}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -101,13 +115,14 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc HOWTO
-%attr(755,root,root) %{_bindir}/slug.py
-%{gitcoredir}/git-pld
+%doc README.md
+%attr(755,root,root) %{_bindir}/git-pld
 %{_mandir}/man1/git-pld.1*
-%{_mandir}/man1/slug.py.1*
+%{_mandir}/man1/slug.1*
+%{py3_sitescriptdir}/slug.py
+%{py3_sitescriptdir}/__pycache__/slug.cpython-*.py[co]
 %{py3_sitescriptdir}/%{module}
-%{py3_sitescriptdir}/git_core_slug-*.egg-info
+%{py3_sitescriptdir}/git_core_slug-%{version}.dist-info
 
 %files watch
 %defattr(644,root,root,755)
@@ -117,12 +132,13 @@ fi
 %{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
+%{_mandir}/man1/slug_watch.1*
 
 %defattr(644,git,git,755)
 %attr(755,git,git) /home/services/git/adc/bin/trash
 %attr(755,git,git) /home/services/git/adc/bin/move
 /home/services/git/adc/bin/copy
+%attr(755,git,git) /home/services/git/.gitolite/hooks/common/post-receive
 %dir /home/services/git/.gitolite/hooks/common/post-receive.python.d
 /home/services/git/.gitolite/hooks/common/post-receive.python.d/slug_hook.py
 %dir /home/services/git/watchdir
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/git-core-slug.git/commitdiff/9b1378dcb272fc90bc1f0dfe4bc0a3c317286f3e



More information about the pld-cvs-commit mailing list