From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id QNhTLy2jtWTMFQEASxT56A (envelope-from ) for ; Mon, 17 Jul 2023 22:23:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id kH1fLi2jtWQwXAEAG6o9tA (envelope-from ) for ; Mon, 17 Jul 2023 22:23:09 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6BC5954078 for ; Mon, 17 Jul 2023 22:23:09 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=fCl9atmY; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689625389; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=eJGLbrkkwASLealseZFrWqZt2RG8z2lXqAvOibKdPiE=; b=Qbo0Ye928i4slH96clSQuc0w8tG3LgxovSZnFlu9VRsqXQtmE0wOkQY9O0BfJRaLwg+C/z ivcT32ZTIA4auY+FyOFyg163c5ObcJB8cgWnjkqWiRRP/Lazav6CEoHy1MHVdJjRslznA7 nmbx6OFHAw6u1KgKib1S21iHSFiXrZdji3Yg0GW3+dduMulBylm3otGEjUAM6DRaJSbQ/i R9ADNBiKJKiAep0uwTZoJNQGAwxXI9vScl2Qd8zSZjZjna0I+z95Y6OGQbsR/ldMu9SNjB 8Vh7lxuq45w9HjuVAUZ9R/7E8m8TrhimdUDUkU/fodVYCXUB38czVr6nrQvN1w== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689625389; a=rsa-sha256; cv=none; b=S9KWWyyulsmrmuMO14iyyvgMwhNi8CGWQVnFwy7TIzy3z5Ef1jwMZ8O6wugiqWBptI+SUG LJ9DwzAKJiQHROR8AoQjQHR9y9sLujiCiO1pcQTEmsRpX2XxWoQmASYuxKXapfVgAknE5b 907p+5Q2O/47wzN9J2J8J+OCdSKhJzI4lvGlZTb0yOk5RYXh6zw1jDB1xzpqb0nvhPDWLQ N4jdoOiCQimIugSlE/m/Eh6Ow61cXUgDuYuUFcTd5xeHhu5GKMn1H8++D9o0g+nlIsB2dB pWQvy1SNCYNKOwdMLa+XuYVn2q2cBRYvw+Ipkd2p+BPtapmrn/kbaKqnNagJzA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=fCl9atmY; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qLUkL-0005XG-4v; Mon, 17 Jul 2023 16:23:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLUkI-0005Wu-AF for guix-patches@gnu.org; Mon, 17 Jul 2023 16:23:02 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qLUkI-0000ui-1S for guix-patches@gnu.org; Mon, 17 Jul 2023 16:23:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qLUkH-0007ws-TF for guix-patches@gnu.org; Mon, 17 Jul 2023 16:23:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64471] [PATCH 0/2] File database update services Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 17 Jul 2023 20:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64471 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Bruno Victal Cc: 64471@debbugs.gnu.org Received: via spool by 64471-submit@debbugs.gnu.org id=B64471.168962534430503 (code B ref 64471); Mon, 17 Jul 2023 20:23:01 +0000 Received: (at 64471) by debbugs.gnu.org; 17 Jul 2023 20:22:24 +0000 Received: from localhost ([127.0.0.1]:50994 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLUjg-0007vv-8p for submit@debbugs.gnu.org; Mon, 17 Jul 2023 16:22:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qLUje-0007vi-4x for 64471@debbugs.gnu.org; Mon, 17 Jul 2023 16:22:23 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLUjY-0000lO-Ux; Mon, 17 Jul 2023 16:22:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=eJGLbrkkwASLealseZFrWqZt2RG8z2lXqAvOibKdPiE=; b=fCl9atmYGzHZ2/pZ9GbH XBj7w7bnh2IrqPQcKNZLf1jzP+4yP2qHEVKviKiXfpI5caFdFLRcALZJxE6o8OMmLGRC0kFIwHMzJ wXN3iLX4msKpBtbkBMU2CKKmrpwU1VG9wH/DSPphQWjPtAlLftPwyqHNXyAX+rLCNMdkQ1pOStMKV SdR5AT5RaV78mmRVhB/fp5al6Orb5bD3r6bIoaOj0pB0jurlfPgzIzHew+PHdQP17tVub7QUWQ5Ix jaZw5w6j6uzJNHwASShE6J8fPVmQP3BenhU6MqW17nY8rLZO7CLJ/KFM/ZP6LfZwPP55y8cSmZy/z ofAyX8cRuxxeyg==; Received: from 91-160-117-201.subs.proxad.net ([91.160.117.201] helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qLUjY-00059j-IT; Mon, 17 Jul 2023 16:22:16 -0400 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: Date: Mon, 17 Jul 2023 22:22:14 +0200 In-Reply-To: (Bruno Victal's message of "Thu, 13 Jul 2023 19:00:46 +0100") Message-ID: <87o7kanv9l.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx2.migadu.com X-Migadu-Spam-Score: -6.84 X-Spam-Score: -6.84 X-Migadu-Queue-Id: 6BC5954078 X-TUID: KmEUWtiB0Ny0 Hello, Bruno Victal skribis: > On 2023-07-05 11:16, Ludovic Court=C3=A8s wrote: >> +(define-record-type* >> + file-database-configuration make-file-database-configuration >> + file-database-configuration? >> + (package file-database-configuration-package >> + (default >> + (let-system (system target) >> + ;; Unless we're cross-compiling, avoid pull= ing a >> + ;; second copy of findutils. >> + (if target >> + findutils >> + (canonical-package findutils))))) >> + (schedule file-database-configuration-schedule >> + (default %default-file-database-update-schedule= )) >> + (excluded-directories file-database-configuration-excluded-directories >> + (default %default-file-database-excluded-direct= ories))) > > How about using define-configuration instead to have the documentation ne= atly > in sync with the fields? Hmm, good point, I=E2=80=99ll take a look. >> +(define (file-database-mcron-jobs configuration) >> + (match-record configuration >> + (package schedule excluded-directories) >> + (let ((updatedb (program-file >> + "updatedb" >> + #~(execl #$(file-append package "/bin/updatedb") >> + "updatedb" >> + #$(string-append "--prunepaths=3D" >> + (string-join >> + excluded-directories)))= ))) >> + (list #~(job #$schedule #$updatedb))))) > > I'm afraid #$schedule might be insufficient if this is a _mcron_ time-spe= c. > There's an elaborate dance done by fstrim-service-type to handle the more= exotic > mcron time expressions, perhaps you can reuse it here? I=E2=80=99m not sure what fstrim-service-type is trying to achieve with thi= s: #~(job ;; Note: The =E2=80=9Cif=E2=80=9D below is to ensure that ;; lists are ungexp'd correctly since @var{schedule} ;; can be either a procedure, a string or a list. #$(if (list? schedule) #~'(#$@schedule) schedule) =E2=80=A6") If we simply have: #~(job #$schedule =E2=80=A6) then =E2=80=98schedule=E2=80=99 can be anything you might expect, like: =E2=80=A2 "0 * * * *" ;string =E2=80=A2 #~(next-hour =E2=80=A6) ;gexp =E2=80=A2 #~(lambda (x) =E2=80=A6) ;another gexp What=E2=80=99s the problem? :-) Ludo=E2=80=99.