From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id MA5HOfk7sGSw3AAASxT56A (envelope-from ) for ; Thu, 13 Jul 2023 20:01:30 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id SFZkOfk7sGQMaAEA9RJhRA (envelope-from ) for ; Thu, 13 Jul 2023 20:01:29 +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 5F4D7665F4 for ; Thu, 13 Jul 2023 20:01:29 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=none; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1689271289; a=rsa-sha256; cv=none; b=AJx8KHhIpac5l9KoDbjGgDwUGMVqk12zMgVYwwtSTZkm+svFUjzbTmO+t3iFhun8Beoaso mTBn7gZX25HtYQ9EO2CoRoq73lq2Hl7qGZfGiHDaIaSZYO6r3fqHXXfb4Uct7eGaRDh7eO x1FFxODgbvVJF1dANuktvS//I1QzjP/63rnW7to1oZMEumVZfa8/JfpppouO4C4dg3gzo2 f3ylpz1hiqO5Yp86iXWwUvjoQA1xJ/oMxttpKWacgsG3s7P61mh/FJoSUYG7t9EtJkeGmh NASZquh64LctHcghnCOIHKjf/Z8pSEExtzKwwXbTqskZ8bfwSdTvg0TqldwcdA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1689271289; 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; bh=9HvCzg2qyYrOyUyWwZKKg/SkKC6Es2hZQTJMiWga8mg=; b=P6dhS6t3davNwlgcTcLe89DPKMDz1AUL+Q1rGTFiT1455d0wda7qm14YGmZ+zX73D9cQ2h T0G+2v2aiLVkn6ivJRbY1hjUixvzn15gR/j4IhknNpNeNJYaMiQWfCwOatvHx58nw3d1yf e/viaIXobLKjRcMkC6mJBN5QrzHLw/pBOAZFrIzcNKQ4eASf4GWRf689idJHx7zCjdmp4T yiN6yrrWPxQI2ah7TL/ex0qfpbqXMcjnfHhpkKI3hakr4sbtSRo4txan+Xu5xXQNy+w+sk pbFvyUSI9VjBbqTOt1oLkJNNw6B/Jn0NJUqif59RIJyWOIG/qXbygmUA+rRI/g== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qK0cl-0000cP-DU; Thu, 13 Jul 2023 14:01:07 -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 1qK0cg-0000c7-OF for guix-patches@gnu.org; Thu, 13 Jul 2023 14:01:02 -0400 Received: from [2001:470:142:5::43] (helo=debbugs.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qK0cg-00075Q-GO for guix-patches@gnu.org; Thu, 13 Jul 2023 14:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qK0cg-0001oL-30 for guix-patches@gnu.org; Thu, 13 Jul 2023 14:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#64471] [PATCH 1/2] services: Add 'file-database' service. Resent-From: Bruno Victal Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Jul 2023 18:01:02 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 64471@debbugs.gnu.org Received: via spool by 64471-submit@debbugs.gnu.org id=B64471.16892712586945 (code B ref 64471); Thu, 13 Jul 2023 18:01:02 +0000 Received: (at 64471) by debbugs.gnu.org; 13 Jul 2023 18:00:58 +0000 Received: from localhost ([127.0.0.1]:40820 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qK0cc-0001nx-7e for submit@debbugs.gnu.org; Thu, 13 Jul 2023 14:00:58 -0400 Received: from smtpmciv4.myservices.hosting ([185.26.107.240]:54012) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qK0cX-0001nl-ES for 64471@debbugs.gnu.org; Thu, 13 Jul 2023 14:00:56 -0400 Received: from mail1.netim.hosting (unknown [185.26.106.173]) by smtpmciv4.myservices.hosting (Postfix) with ESMTP id BA22F20781; Thu, 13 Jul 2023 20:00:51 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by mail1.netim.hosting (Postfix) with ESMTP id 0E1138009B; Thu, 13 Jul 2023 20:00:51 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at mail1.netim.hosting Received: from mail1.netim.hosting ([127.0.0.1]) by localhost (mail1-2.netim.hosting [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 7iqC9KcD8hrF; Thu, 13 Jul 2023 20:00:50 +0200 (CEST) Received: from [192.168.1.116] (unknown [10.192.1.83]) (Authenticated sender: lumen@makinata.eu) by mail1.netim.hosting (Postfix) with ESMTPSA id 9B4CB80099; Thu, 13 Jul 2023 20:00:50 +0200 (CEST) Message-ID: Date: Thu, 13 Jul 2023 19:00:46 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Content-Language: en-US References: From: Bruno Victal In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: mx0.migadu.com X-Migadu-Spam-Score: -4.61 X-Spam-Score: -4.61 X-Migadu-Queue-Id: 5F4D7665F4 X-TUID: Hxxu3w+/zfZf Hi Ludo’, On 2023-07-05 11:16, Ludovic Courtès 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 pulling 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-directories))) How about using define-configuration instead to have the documentation neatly in sync with the fields? > + > +(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=" > + (string-join > + excluded-directories)))))) > + (list #~(job #$schedule #$updatedb))))) I'm afraid #$schedule might be insufficient if this is a _mcron_ time-spec. There's an elaborate dance done by fstrim-service-type to handle the more exotic mcron time expressions, perhaps you can reuse it here? -- Furthermore, I consider that nonfree software must be eradicated. Cheers, Bruno.