[packages/mcron] - up to 1.1.3; still not ready as system cron for PLD (missing system crontab, no /etc/cron.d suppor

qboosh qboosh at pld-linux.org
Mon Jan 20 19:53:31 CET 2020


commit ebec51bbfbff568d50c700a7e70db8db20cd1165
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jan 20 19:53:34 2020 +0100

    - up to 1.1.3; still not ready as system cron for PLD (missing system crontab, no /etc/cron.d support)
    - added guile patch (allow guile 2.2.x)
    - added info patch (unify direntry with PLD info directory)

 mcron-guile.patch | 11 ++++++++
 mcron-info.patch  | 15 ++++++++++
 mcron.spec        | 83 +++++++++++++++++++++++++++++++++----------------------
 3 files changed, 76 insertions(+), 33 deletions(-)
---
diff --git a/mcron.spec b/mcron.spec
index 093616b..3ef6027 100644
--- a/mcron.spec
+++ b/mcron.spec
@@ -1,23 +1,28 @@
 # TODO
-# - mcron.{init,crontab} not in CVS
+# - teach mcron to use /etc/cron.d
+# - mcron.{init,crontab} not in git
 Summary:	Cron daemon
 Summary(fr.UTF-8):	Démon cron
 Summary(pl.UTF-8):	Demon cron
 Name:		mcron
-Version:	1.0.6
-Release:	1
-License:	GPL
+Version:	1.1.3
+Release:	0.1
+License:	GPL v3+
 Group:		Daemons
-Source0:	http://ftp.gnu.org/gnu/mcron/%{name}-%{version}.tar.gz
-# Source0-md5:	c228b01d14673e8d181376b9549eb1f8
+Source0:	https://ftp.gnu.org/gnu/mcron/%{name}-%{version}.tar.gz
+# Source0-md5:	53d138f8569bc8c6269791aeb5fa3789
 #Source1:	%{name}.init
 Source2:	cron.logrotate
 Source3:	cron.sysconfig
 #Source4:	%{name}.crontab
+Patch0:		%{name}-guile.patch
+Patch1:		%{name}-info.patch
 URL:		http://www.gnu.org/software/mcron/
-BuildRequires:	autoconf
-BuildRequires:	automake
-BuildRequires:	guile-devel
+BuildRequires:	autoconf >= 2.61
+BuildRequires:	automake >= 1:1.11
+BuildRequires:	guile-devel >= 5:2.0
+BuildRequires:	help2man
+BuildRequires:	pkgconfig
 BuildRequires:	rpmbuild(macros) >= 1.268
 BuildRequires:	sed >= 4.0
 BuildRequires:	texinfo
@@ -45,49 +50,55 @@ infinite flexibility in specifying when jobs should be run.
 Pakiet GNU mcron (Mellor's cron) jest w 100% kompatybilnym
 zamiennikiem Vixie crona. Jest napisany w czystym Guile i pozwala na
 pisanie plików konfiguracyjnych w scheme (a także w oryginalnym
-formacie Vixie) dla nieskończonej elastyczności w podawaniu zadań do
-uruchomienia.
+formacie Vixie), co daje nieskończoną elastyczność w określaniu zadań
+do uruchomienia.
 
 %prep
 %setup -q
-sed -i -e 's#/etc/crontab#/etc/cron.d/system#g' *
+%patch0 -p1
+%patch1 -p1
+
+# XXX: this is wrong, /etc/cron.d _directory_ should be processed instead of single file!
+%{__sed} -i -e 's#/etc/crontab#/etc/cron.d/crontab#g' \
+	src/mcron/scripts/cron.scm \
+	src/mcron/utils.scm \
+	src/mcron/vixie-specification.scm \
+	doc/cron.8 \
+	doc/mcron.texi
 
 %build
 %{__aclocal}
 %{__autoconf}
 %{__automake}
 %configure \
-	--with-spool-dir=/var/spool/cron \
-	--with-socket-file=/var/run/mcron.sock \
+	--disable-silent-rules \
 	--with-allow-file=/etc/cron/cron.allow \
-	--with-deny-file=/etc/cron/cron.deny
+	--with-deny-file=/etc/cron/cron.deny \
+	--with-sendmail="/usr/lib/sendmail -t" \
+	--with-socket-file=/var/run/mcron.sock \
+	--with-spool-dir=/var/spool/cron
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT/var/{log,spool/cron} \
-	$RPM_BUILD_ROOT{%{_bindir},%{_sbindir},%{_infodir}} \
-	$RPM_BUILD_ROOT/etc/{rc.d/init.d,logrotate.d,sysconfig} \
-	$RPM_BUILD_ROOT%{_sysconfdir}/{cron,cron.{d,hourly,daily,weekly,monthly}}
+	$RPM_BUILD_ROOT/etc/{cron,cron.{d,hourly,daily,weekly,monthly},rc.d/init.d,logrotate.d,sysconfig} \
+
+%{__make} install \
+	DESTDIR=$RPM_BUILD_ROOT
 
 #install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/crond
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
-install %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/logrotate.d/cron
+cp -p %{SOURCE3} $RPM_BUILD_ROOT/etc/sysconfig/cron
 #install %{SOURCE4} $RPM_BUILD_ROOT/etc/cron.d/crontab
 
-install mcron $RPM_BUILD_ROOT%{_sbindir}
-ln -s mcron $RPM_BUILD_ROOT%{_sbindir}/crond
-ln -s ../sbin/mcron $RPM_BUILD_ROOT%{_bindir}/crontab
-
-install mcron.info $RPM_BUILD_ROOT%{_infodir}/%{name}.info
-
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.allow << 'EOF'
+cat > $RPM_BUILD_ROOT/etc/cron/cron.allow << 'EOF'
 # cron.allow	This file describes the names of the users which are
 #		allowed to use the local cron daemon
 root
 EOF
 
-cat > $RPM_BUILD_ROOT%{_sysconfdir}/cron/cron.deny << 'EOF'
+cat > $RPM_BUILD_ROOT/etc/cron/cron.deny << 'EOF'
 # cron.deny	This file describes the names of the users which are
 #		NOT allowed to use the local cron daemon
 EOF
@@ -121,13 +132,19 @@ fi
 
 %files
 %defattr(644,root,root,755)
-%doc AUTHORS NEWS ChangeLog README TODO
-%attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.allow
-%attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) %{_sysconfdir}/cron/cron.deny
+%doc AUTHORS ChangeLog NEWS README TODO
+%dir /etc/cron
+%attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron/cron.allow
+%attr(640,root,crontab) %config(noreplace,missingok) %verify(not md5 mtime size) /etc/cron/cron.deny
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/logrotate.d/cron
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/cron
 %attr(755,root,root) %{_bindir}/crontab
-%attr(755,root,root) %{_sbindir}/crond
-%attr(755,root,root) %{_sbindir}/mcron
+%attr(755,root,root) %{_bindir}/mcron
+%attr(755,root,root) %{_sbindir}/cron
+%{_libdir}/guile/2.*/site-ccache/mcron
+%{_datadir}/guile/site/2.*/mcron
 %dir %attr(1730,root,root) /var/spool/cron
+%{_mandir}/man1/crontab.1*
+%{_mandir}/man1/mcron.1*
+%{_mandir}/man8/cron.8*
 %{_infodir}/mcron.info*
diff --git a/mcron-guile.patch b/mcron-guile.patch
new file mode 100644
index 0000000..6c92567
--- /dev/null
+++ b/mcron-guile.patch
@@ -0,0 +1,11 @@
+--- mcron-1.1.3/configure.ac.orig	2019-11-17 12:20:30.000000000 +0100
++++ mcron-1.1.3/configure.ac	2020-01-20 15:47:35.541864072 +0100
+@@ -35,7 +35,7 @@
+ AM_PROG_AR
+ 
+ # Check for Guile 2.x. development files
+-GUILE_PKG([2.0])
++GUILE_PKG([2.2 2.0])
+ 
+ # Set Guile flags without using GUILE_FLAGS which is requiring the unused
+ # 'config.rpath' script.
diff --git a/mcron-info.patch b/mcron-info.patch
new file mode 100644
index 0000000..2196160
--- /dev/null
+++ b/mcron-info.patch
@@ -0,0 +1,15 @@
+--- mcron-1.1.3/doc/mcron.texi.orig	2020-01-20 18:36:08.587077007 +0100
++++ mcron-1.1.3/doc/mcron.texi	2020-01-20 19:01:48.668733670 +0100
+@@ -27,10 +27,10 @@
+ 
+ @ifinfo
+ 
+- at dircategory Individual utilities
++ at dircategory Miscellaneous:
+ 
+ @direntry
+-* mcron: (mcron).       Run jobs at scheduled times.
++* mcron: (mcron).			Run jobs at scheduled times
+ @end direntry
+ 
+ @end ifinfo
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/mcron.git/commitdiff/ebec51bbfbff568d50c700a7e70db8db20cd1165



More information about the pld-cvs-commit mailing list