]> git.ipfire.org Git - people/arne_f/ipfire-3.x.git/commitdiff
cronie: Update to 1.4.8.
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 10 Jun 2012 18:00:24 +0000 (20:00 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 10 Jun 2012 18:03:39 +0000 (20:03 +0200)
* Enable support for audit, pam and selinux.
* Add systemd service file.

Fixes #10135.

cronie/cronie.nm
cronie/systemd/cronie.service [new file with mode: 0644]

index ae94fa5be5a222c40c11b745753d46e72e7da86b..0ad2b6ebb8cf28c14fb81027c80f32f2ae15840d 100644 (file)
@@ -4,35 +4,71 @@
 ###############################################################################
 
 name       = cronie
-version    = 1.4.7
+version    = 1.4.8
 release    = 1
 
 groups     = System/Environment/Base
-url        = https://fedorahosted.org/releases/c/r/cronie/
+url        = https://fedorahosted.org/cronie/
 license    = MIT and BSD and ISC and GPLv2
 summary    = Cron daemon for executing programs at set times
 
 description
-       Cronie contains the standard UNIX daemon crond that runs specified programs at \
-       scheduled times and related tools. It is a fork of the \
-       original vixie-cron and has security and configuration enhancements like \
+       Cronie contains the standard UNIX daemon crond that runs specified programs at
+       scheduled times and related tools. It is a fork of the
+       original vixie-cron and has security and configuration enhancements like
        the ability to use pam and SELinux.
 end
 
-source_dl  =
+source_dl  = https://fedorahosted.org/releases/c/r/cronie/
 
 build
        requires
+               audit-devel
                bison
                libcap-devel
                libedit-devel
+               libselinux-devel
+               pam-devel
                readline-devel
                texinfo
        end
+
+       configure_options += \
+               --with-pam \
+               --with-audit \
+               --with-selinux
+
+       install_cmds
+               mkdir -pv %{BUILDROOT}%{localstatedir}/spool/cron
+       end
 end
 
 packages
        package %{name}
+               # Just search for new unit files that were just installed.
+               script postin
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+
+                       # Enable cronie on startup.
+                       systemctl enable cronie.service >/dev/null 2>&1 || :
+               end
+
+               # Disable the service that is to be removed and stop it if it is still running.
+               script preun
+                       systemctl --no-reload disable cronie.service >/dev/null 2>&1 || :
+                       systemctl stop cronie.service >/dev/null 2>&1 || :
+               end
+
+               # Just tell systemd that unitfiles have been removed.
+               script postun
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+
+               # Try to restart the service if it is running.
+               script postup
+                       systemctl daemon-reload >/dev/null 2>&1 || :
+                       systemctl try-restart cronie.service >/dev/null 2>&1 || :
+               end
        end
 
        package %{name}-debuginfo
diff --git a/cronie/systemd/cronie.service b/cronie/systemd/cronie.service
new file mode 100644 (file)
index 0000000..16730c3
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=Command Scheduler
+After=syslog.target auditd.service systemd-user-sessions.service
+
+[Service]
+ExecStart=/usr/sbin/crond -n
+
+[Install]
+WantedBy=multi-user.target