Package Details: systemd-cron 2.3.2-1

Git Clone URL: https://aur.archlinux.org/systemd-cron.git (read-only, click to copy)
Package Base: systemd-cron
Description: systemd units to run cron scripts
Upstream URL: https://github.com/systemd-cron/systemd-cron
Keywords: cron systemd
Licenses: MIT
Conflicts: cron
Provides: cron
Submitter: dbb
Maintainer: dbb
Last Packager: dbb
Votes: 32
Popularity: 0.043112
First Submitted: 2013-05-27 20:26 (UTC)
Last Updated: 2024-02-11 21:54 (UTC)

Dependencies (3)

Required by (19)

Sources (2)

Latest Comments

1 2 3 Next › Last »

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-setgid is 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 Done

katt commented on 2021-02-09 14:42 (UTC)

Hi, could you please set a unique filename for the source?

See the warning about SRCDEST here: https://wiki.archlinux.org/index.php/PKGBUILD#source

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?

Mind commented on 2018-01-30 05:59 (UTC)

@dbb Could you merge the changes mentioned on 2016-03-27? Without them, you can't use crontab -e without permission errors.

dbb commented on 2016-03-28 13:14 (UTC)

@wilbowma Updated with your changes with some slight modifications.