[arch-commits] Commit in cronie/repos (7 files)

Christian Hesse eworm at archlinux.org
Mon Oct 14 12:10:24 UTC 2019


    Date: Monday, October 14, 2019 @ 12:10:23
  Author: eworm
Revision: 364797

archrelease: copy trunk to testing-x86_64

Added:
  cronie/repos/testing-x86_64/
  cronie/repos/testing-x86_64/0001-do-not-log-carriage-return.patch
    (from rev 364796, cronie/trunk/0001-do-not-log-carriage-return.patch)
  cronie/repos/testing-x86_64/80-cronie.hook
    (from rev 364796, cronie/trunk/80-cronie.hook)
  cronie/repos/testing-x86_64/PKGBUILD
    (from rev 364796, cronie/trunk/PKGBUILD)
  cronie/repos/testing-x86_64/deny
    (from rev 364796, cronie/trunk/deny)
  cronie/repos/testing-x86_64/pam.d
    (from rev 364796, cronie/trunk/pam.d)
  cronie/repos/testing-x86_64/service
    (from rev 364796, cronie/trunk/service)

---------------------------------------+
 0001-do-not-log-carriage-return.patch |   35 +++++++++++++++
 80-cronie.hook                        |    9 ++++
 PKGBUILD                              |   72 ++++++++++++++++++++++++++++++++
 deny                                  |    1 
 pam.d                                 |   10 ++++
 service                               |   11 ++++
 6 files changed, 138 insertions(+)

Copied: cronie/repos/testing-x86_64/0001-do-not-log-carriage-return.patch (from rev 364796, cronie/trunk/0001-do-not-log-carriage-return.patch)
===================================================================
--- testing-x86_64/0001-do-not-log-carriage-return.patch	                        (rev 0)
+++ testing-x86_64/0001-do-not-log-carriage-return.patch	2019-10-14 12:10:23 UTC (rev 364797)
@@ -0,0 +1,35 @@
+From cdc44c2b78ae88bf62bb870969ba814d3a79e71c Mon Sep 17 00:00:00 2001
+From: Christian Hesse <mail at eworm.de>
+Date: Mon, 9 Sep 2019 10:17:32 +0200
+Subject: [PATCH 1/1] do not log carriage return
+
+Some commands (like ssh) end their output with carriage return (\r) and
+new line (\n). Just cutting the new line before sending to syslog may
+have undesired effects of unprintable characters. Reading cronie logs
+with journalctl I can see:
+
+Sep 06 16:50:01 linux CROND[152575]: [96B blob data]
+
+Adding switch --all for unprintable characters it shows:
+
+Sep 06 16:50:01 linux CROND[152575]: (root) CMDOUT (Warning: Permanently
+added '10.52.33.217' (ED25519) to the list of known hosts.^M)
+
+Just skip carriage return for syslog to prevent this.
+---
+ src/do_command.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/src/do_command.c b/src/do_command.c
+index 45c49f7..ed56775 100644
+--- a/src/do_command.c
++++ b/src/do_command.c
+@@ -506,6 +506,8 @@ static int child_process(entry * e, char **jobenv) {
+ 			 */
+ 
+ 			while (EOF != (ch = getc(in))) {
++				if (ch == '\r')
++					continue;
+ 				bytes++;
+ 				if (mail)
+ 					putc(ch, mail);

Copied: cronie/repos/testing-x86_64/80-cronie.hook (from rev 364796, cronie/trunk/80-cronie.hook)
===================================================================
--- testing-x86_64/80-cronie.hook	                        (rev 0)
+++ testing-x86_64/80-cronie.hook	2019-10-14 12:10:23 UTC (rev 364797)
@@ -0,0 +1,9 @@
+[Trigger]
+Operation = Upgrade
+Type = Package
+Target = glibc
+
+[Action]
+Description = Restarting cronie for libc upgrade...
+When = PostTransaction
+Exec = /usr/bin/systemctl try-restart cronie.service

Copied: cronie/repos/testing-x86_64/PKGBUILD (from rev 364796, cronie/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2019-10-14 12:10:23 UTC (rev 364797)
@@ -0,0 +1,72 @@
+# Contributor: Kaiting Chen <kaiting.chen at kiwilight.com>
+# Maintainer: Gaetan Bisson <bisson at archlinux.org>
+
+pkgname='cronie'
+pkgver=1.5.4
+pkgrel=3
+pkgdesc='Daemon that runs specified programs at scheduled times and related tools'
+url='https://github.com/cronie-crond/cronie/'
+license=('custom:BSD')
+arch=('x86_64')
+depends=('pam' 'bash' 'run-parts')
+optdepends=('smtp-server: send job output via email'
+            'smtp-forwarder: forward job output to email server')
+conflicts=('cron')
+provides=('cron')
+source=("https://github.com/cronie-crond/cronie/releases/download/${pkgname}-${pkgver}-final/${pkgname}-${pkgver}.tar.gz"
+        '0001-do-not-log-carriage-return.patch'
+        '80-cronie.hook'
+        'service'
+        'pam.d'
+        'deny')
+sha256sums=('af8970559cad4262f8ffd7ec72abf682d2dcce04fdfb8f206a71d96566aba882'
+            '595e96997afe506ad93a98896830f3651667f56406a5ae67f4bcf513cfcb45ad'
+            'f85e9a68bf3bf446f8a6167f068371c06afffe11ca71935d8ee5487b38b2c9db'
+            'ac3ff3c8a5ce1b6367b06877b4b12ff74e7f18a3c510fb9f80d6ea6b6321e3b1'
+            '00864268b491bab8c66400a4a4b4bf85f168a6e44e85676105e084940924090c'
+            'ae6e533ecdfc1bd2dd80a9e25acb0260cbe9f00c4e4abee93d552b3660f263fc')
+backup=('etc/cron.deny'
+        'etc/pam.d/crond'
+        'etc/cron.d/0hourly'
+        'etc/anacrontab')
+
+prepare() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+
+	patch -Np1 < ../0001-do-not-log-carriage-return.patch
+}
+
+build() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+
+	./configure \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--localstatedir=/var \
+		--sbindir=/usr/bin \
+		--enable-anacron \
+		--with-inotify \
+		--with-pam
+	make
+}
+
+package() {
+	cd "${srcdir}/${pkgname}-${pkgver}"
+
+	make DESTDIR="${pkgdir}" install
+
+	chmod u+s "${pkgdir}"/usr/bin/crontab
+	install -d "${pkgdir}"/var/spool/{ana,}cron
+	install -d "${pkgdir}"/etc/cron.{d,hourly,daily,weekly,monthly}
+
+	install -Dm0644 ../deny "${pkgdir}"/etc/cron.deny
+	install -Dm0644 ../pam.d "${pkgdir}"/etc/pam.d/crond
+	install -Dm0644 ../service "${pkgdir}"/usr/lib/systemd/system/cronie.service
+	install -Dm0644 ../80-cronie.hook "${pkgdir}"/usr/share/libalpm/hooks/80-cronie.hook
+
+	install -Dm0644 contrib/anacrontab "${pkgdir}"/etc/anacrontab
+	install -Dm0644 contrib/0hourly "${pkgdir}"/etc/cron.d/0hourly
+	install -Dm0755 contrib/0anacron "${pkgdir}"/etc/cron.hourly/0anacron
+
+	install -Dm0644 COPYING "${pkgdir}"/usr/share/licenses/cronie/COPYING
+}

Copied: cronie/repos/testing-x86_64/deny (from rev 364796, cronie/trunk/deny)
===================================================================
--- testing-x86_64/deny	                        (rev 0)
+++ testing-x86_64/deny	2019-10-14 12:10:23 UTC (rev 364797)
@@ -0,0 +1 @@
+# without this file, only users listed in /etc/cron.allow can use crontab

Copied: cronie/repos/testing-x86_64/pam.d (from rev 364796, cronie/trunk/pam.d)
===================================================================
--- testing-x86_64/pam.d	                        (rev 0)
+++ testing-x86_64/pam.d	2019-10-14 12:10:23 UTC (rev 364797)
@@ -0,0 +1,10 @@
+auth      required    pam_unix.so
+auth      required    pam_env.so
+
+account   required    pam_access.so
+account   required    pam_unix.so
+account   required    pam_time.so
+
+session    required   pam_loginuid.so
+session   required    pam_limits.so
+session   required    pam_unix.so

Copied: cronie/repos/testing-x86_64/service (from rev 364796, cronie/trunk/service)
===================================================================
--- testing-x86_64/service	                        (rev 0)
+++ testing-x86_64/service	2019-10-14 12:10:23 UTC (rev 364797)
@@ -0,0 +1,11 @@
+[Unit]
+Description=Periodic Command Scheduler
+
+[Service]
+ExecStart=/usr/bin/crond -n
+ExecReload=/usr/bin/kill -HUP $MAINPID
+KillMode=process
+Restart=always
+
+[Install]
+WantedBy=multi-user.target



More information about the arch-commits mailing list