From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C9529138334 for ; Sun, 3 Mar 2019 02:02:05 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9E80DE0922; Sun, 3 Mar 2019 02:02:02 +0000 (UTC) Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 415E6E091F for ; Sun, 3 Mar 2019 02:02:02 +0000 (UTC) Received: by mail-pf1-f179.google.com with SMTP id s22so772836pfh.4 for ; Sat, 02 Mar 2019 18:02:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=P3RyI82g3EW5xHi2boU3IopFixX0vit5fBtF0wvqCVo=; b=BnKzSnz7vHlclehODld/is/pPbC7yCKa8l9X79/zOwIiM9rDAVGk/r3Sxw9J/sU+pG aqBD0AMbMrVmWXLycCT196eqYwwdTr7U+APxDkDzOLGm3cbE0I8qfF6hHnJdHKidC5Ge 7uUp+E3IWEOTnKsClYx0auZEALMHsqw92tVe8sG27BazkF7AJnxxmy00SHrHh7CjlDsI /qNtDFkt2Wesf/PcNBpPAuwwU6anXAORrrItz/WaeKNVZ9v8HO+11+lvdaIBu3REDPgs /SvLRmC0IhwjYMa1wvPBpLD0aQ5DlYabZ0Zy/vbgtNKMXzwJtk7zHmf41CI2OV9xIpSW kYAQ== X-Gm-Message-State: APjAAAW+wF3iZjvwTFu7uv2RzUedSSWYrOuk6KSQs/vJfDzvfvd1897X pbtnemH3dmtTDKQnIF2+iWeRmk/c3EDQOzoka2+QsQ== X-Google-Smtp-Source: APXvYqycWqeH2ny8F56SqResZHoovHQoaL4rsI3IKR27EtOIQikRE1bBg7cpQ82/zIrXUGwxXAVIntoRnWDkJ4umzl8= X-Received: by 2002:a63:455f:: with SMTP id u31mr12052568pgk.241.1551578520582; Sat, 02 Mar 2019 18:02:00 -0800 (PST) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 References: <20190303000509.GA31885@linux1.home> <76144c09-e742-0bd0-18ad-819a52e29a4e@gentoo.org> <48d49f64-0fe6-af86-9fe8-5f754371b489@gentoo.org> In-Reply-To: <48d49f64-0fe6-af86-9fe8-5f754371b489@gentoo.org> From: Rich Freeman Date: Sat, 2 Mar 2019 21:01:49 -0500 Message-ID: Subject: Re: [gentoo-dev] rfc: cron.* and modern cron implementations To: gentoo-dev Content-Type: text/plain; charset="UTF-8" X-Archives-Salt: 6a0e2ddd-4973-4e8c-a1f8-46874ae6f3c8 X-Archives-Hash: ee8521f5488a13620e0b3a2b0716be1a On Sat, Mar 2, 2019 at 8:25 PM Michael Orlitzky wrote: > > Using run-parts in /etc/crontab also has its problems, but I don't have > a solution handy for that one. Using run-parts runs those daily, weekly, > etc. jobs as root, which may not be what you want if you're operating on > user-controlled data (e.g. bug 662438). The best way to solve this would > be to let packages install their own crontab entries into a directory > like /etc/cron.d, but that location isn't standard. > So, the problem with cron.d is that you're now using crontab syntax, and for compatibility you have to use the lowest common denominator which is vixie. That means your jobs are STILL running as root, so the only problem you had with run-parts isn't solved. In addition you lose the ability to cover the desktop use case of non-24x7 systems running infrequent tasks. If you used vixie cron syntax for a monthly job it might never run at all on a typical desktop, as it would have one opportunity to run in a month, at one time of day. The crontab syntax also forces each package maintainer to pick the time of day their jobs run at, vs just letting the sysadmin choose the time the entire set of scripts is run. I'm sure there are alternatives like adding a compatibility layer (which is basically what run-crons already is), or some kind of helper where an ebuild can give it a set of parameters and it installs the task for whatever cron implementation eselect points it at. I'm just not sure that they are worth the complexity or provide much more value than the existing solutions. This is also somewhat orthogonal to run-crons, where you still are left with the choice around whether to use it with vixie or other implementations that don't support more desktop-oriented use cases. This is of course why that bug has been fairly intractable. -- Rich