AUR (en) - systemd-cron
micwoj92 commented on 2025-10-24 01:49 (UTC)
brody commented on 2025-01-19 16:29 (UTC) (edited on 2025-01-19 16:31 (UTC) by brody)
The sysusers.conf file is already part in the code base as https://github.com/systemd-cron/systemd-cron/blob/master/src/lib/sysusers.d/crontab.conf. So I updated the package for myself: Adding a prepare function, removing the sysusers.conf file and its usage in the source, sha256sums and package function.
prepare() {
cd ${pkgname}-${pkgver}/src/lib/sysusers.d
sed -i 's|/usr/sbin/nologin|/usr/bin/nologin|g' systemd-cron.conf
cat crontab.conf >>systemd-cron.conf
}
Beethoven-n commented on 2023-09-08 00:17 (UTC) (edited on 2023-09-08 00:18 (UTC) by Beethoven-n)
this package is a few releases old, and i was able to make release 2.0.2 work with this PKGBUILD.
# Maintainer: Dwayne Bent <dbb@dbb.io>
pkgname=systemd-cron
pkgver=2.0.2
pkgrel=1
pkgdesc='systemd units to run cron scripts'
arch=(any)
url='https://github.com/systemd-cron/systemd-cron'
license=('MIT')
depends=('systemd>=236')
optdepends=('smtp-forwarder: sending emails')
provides=('cron')
conflicts=('cron' 'systemd-cron-next' 'systemd-cron-next-git')
source=("${pkgname}-${pkgver}.tar.gz::https://github.com/systemd-cron/${pkgname}/archive/refs/tags/v${pkgver}.tar.gz"
'sysusers.conf')
install=${pkgname}.install
sha256sums=('SKIP'
'SKIP')
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
./configure --prefix=/usr --confdir=/etc --libexecdir=/usr/lib \
--enable-minutely --enable-quarterly --enable-semi_annually \
--enable-runparts=no
make
}
package() {
cd "${srcdir}/${pkgname}-${pkgver}"
make DESTDIR="${pkgdir}" install
install -d "${pkgdir}"/etc/cron.{boot,minutely,hourly,daily,weekly,monthly,quarterly,semi-annually,yearly}
install -dm1730 "${pkgdir}/var/spool/cron"
cat "${srcdir}/sysusers.conf" >> "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
}
- python is no longer a dependency, as 2.0.2 is in c++
-
should probably have had some extra conflicts
-
run-parts is no longer a dependency and is not recommended as a config, so
--enable-runparts=no. otherwise, services and timers are not added, noted and fixed in this issue https://github.com/systemd-cron/systemd-cron/issues/115 -
--enable-setgidis no longer a valid configure option, so removed that -
/var/spool/cron is expected to have permissions set to 1730 rather than 755, so
install -dm1730 "${pkgdir}/var/spool/cron"
pull request pls
also feel free to regenerate the sums, i just didn't bother with it
gothmog.todi commented on 2022-05-15 19:41 (UTC)
With release 1.5.18 upstream has added their own version of sysusers.d/systemd-cron.conf, which is overwritten by your version. I think they should be merged.
dbb commented on 2021-02-09 20:22 (UTC)
katt commented on 2021-02-09 14:42 (UTC)
einalex commented on 2019-02-07 19:53 (UTC)
Works! Thank you so much! :)
dbb commented on 2019-02-07 15:36 (UTC)
@einalex Just updated, try the new version.
einalex commented on 2019-02-07 15:05 (UTC) (edited on 2019-02-07 15:09 (UTC) by einalex)
@dbb the errors I'm getting are these:
% crontab -e
Traceback (most recent call last):
File "/usr/bin/crontab", line 161, in edit
with open(cron_file, 'r') as inp:
FileNotFoundError: [Errno 2] No such file or directory: '/var/spool/cron/einalex'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/bin/crontab", line 339, in <module> action(cron_file, args) File "/usr/bin/crontab", line 164, in edit if e.errno == os.errno.ENOENT: AttributeError: module 'os' has no attribute 'errno'
% sudo touch /var/spool/cron/einalex
% crontab -e
Traceback (most recent call last): File "/usr/bin/crontab", line 201, in edit prefix=args.user + '.', delete=False) File "/usr/lib/python3.7/tempfile.py", line 547, in NamedTemporaryFile (fd, name) = _mkstemp_inner(dir, prefix, suffix, flags, output_type) File "/usr/lib/python3.7/tempfile.py", line 258, in _mkstemp_inner fd = _os.open(file, flags, 0o600) PermissionError: [Errno 13] Permission denied: '/var/spool/cron/einalex.7amp2t42'
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/usr/bin/crontab", line 339, in <module> action(cron_file, args) File "/usr/bin/crontab", line 208, in edit if e.errno == os.errno.ENOSPC: AttributeError: module 'os' has no attribute 'errno'
Ownership and permissions:
% ls -l /usr/lib/systemd-cron/crontab_setgid
-rwxr-sr-x 1 root crontab 14K Feb 7 14:57 /usr/lib/systemd-cron/crontab_setgid
% ll /var/spool/cron
drwxrwxr-x 2 root crontab 4.0K Feb 7 14:58 .
dbb commented on 2018-01-30 14:22 (UTC)
@Mind Those changes were incorporated the next day on 2016-03-28. crontab -e is working fine on my system. What errors are you seeing and what are the ownership and permissions on /usr/lib/systemd-cron/crontab_setgid and /var/spool/cron?
Please install license file.