From patchwork Thu Aug 5 05:46:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Tropin X-Patchwork-Id: 31838 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id D0C3627BC6B; Thu, 5 Aug 2021 06:49:18 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 5CF2227BC78 for ; Thu, 5 Aug 2021 06:49:18 +0100 (BST) Received: from localhost ([::1]:46984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mBWFp-0002CV-Ey for patchwork@mira.cbaines.net; Thu, 05 Aug 2021 01:49:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36734) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mBWFb-0001l3-Co for guix-patches@gnu.org; Thu, 05 Aug 2021 01:49:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34107) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mBWFb-0001B9-6q for guix-patches@gnu.org; Thu, 05 Aug 2021 01:49:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mBWFb-0006o3-1W for guix-patches@gnu.org; Thu, 05 Aug 2021 01:49:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49419] [PATCH v4 3/4] home-services: Add home-provenance-service-type Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 05 Aug 2021 05:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49419 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49419@debbugs.gnu.org Received: via spool by 49419-submit@debbugs.gnu.org id=B49419.162814250826072 (code B ref 49419); Thu, 05 Aug 2021 05:49:02 +0000 Received: (at 49419) by debbugs.gnu.org; 5 Aug 2021 05:48:28 +0000 Received: from localhost ([127.0.0.1]:45644 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBWF2-0006mS-At for submit@debbugs.gnu.org; Thu, 05 Aug 2021 01:48:28 -0400 Received: from mail-lf1-f41.google.com ([209.85.167.41]:33615) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mBWF1-0006lx-4Q for 49419@debbugs.gnu.org; Thu, 05 Aug 2021 01:48:27 -0400 Received: by mail-lf1-f41.google.com with SMTP id p38so8936078lfa.0 for <49419@debbugs.gnu.org>; Wed, 04 Aug 2021 22:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop-in.20150623.gappssmtp.com; s=20150623; h=from:to:subject:in-reply-to:references:date:message-id:mime-version; bh=snZ4ZNwtRzA2+DvxEtESiaS3qrykzVqCJe6xThrel2w=; b=UMJENF2b6HXZO3WwdyFqM0qf8RsKRJiZ7AYtmWiAyI7dtxyUBsrUwy5DtscpCJLky4 Vu3vioFFr5hll/7dykl1oj/XAc/RfaoLDGzN/kqFWTJlMIalUhX/XwXFGx7jxt6Bfj4+ QZ7kkA9ylE81AcKPdwXPlct8XF1mtLZ+ipN0B6ZJt8bLtGme8DKsIifVNsU3+B2g4OQe au8VgxT9Ci6vDogcwmtXRdz/ekzLpTLoJEJPa8CLwn2UikBl2xnfaDM/n7nRDGCSxWKK O1S7WDL98JFvAM/Yv41xz6+UQy+1DAeoV8ZnTo8lOcfVCu5wgG9jlZcv7JSI29Cy/oey 8nMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version; bh=snZ4ZNwtRzA2+DvxEtESiaS3qrykzVqCJe6xThrel2w=; b=Ho9XSRH5fLvHvHPKZxL0B79IzGe8eAtOqSdDn3ktvewOeqarzTun53v2dkUpgE9G6J 2CpqJVbcCdJTgnmgH8wzCJ8hmyU25JUo4x64YVt04VcHH4PT5idLo1L9lUjmhToQHj5b XnLiOmZWPQfFffpm19UkiR9h5H23cCNNKJ2ksJhJayzUzw5qnpuU9N2lk9x5otldA23B xAKLgsUQ+edPmQ2JgI9s1pZPmoNCeQ/GuwkMjvC0Tgz7VKJIuas58Z9UoXvwAo1kTBPO i8tx/5OF8tBLmhvnUhRhb93UGeF9Pae7KRH7jsj5FIlrlxlaON8fGR0p/tYzNsAjHVj4 MQrw== X-Gm-Message-State: AOAM533CDrn/NWYyVnzNY6z2F2zioVU8nlj4I50CAqRp9VBWmuN1A1Tu o9g66If5iZHUAG3xpT1Ando7SshWdbzC8EPB X-Google-Smtp-Source: ABdhPJz0fWli93xb/8+Q6VU4tbl7h9xDR19Ily9RyjoB55cvkk8kESO7y8qDyXBzzccHz/bbxYk8hQ== X-Received: by 2002:ac2:4c0d:: with SMTP id t13mr2289892lfq.118.1628142501090; Wed, 04 Aug 2021 22:48:21 -0700 (PDT) Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92]) by smtp.gmail.com with ESMTPSA id l21sm320046ljc.94.2021.08.04.22.48.19 for <49419@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Aug 2021 22:48:20 -0700 (PDT) From: Andrew Tropin In-Reply-To: <87tuk4mors.fsf@trop.in> References: <87y2akhiz1.fsf@trop.in> <87tuk4mors.fsf@trop.in> Date: Thu, 05 Aug 2021 08:46:58 +0300 Message-ID: <87k0l0moj1.fsf@trop.in> MIME-Version: 1.0 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+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/home-services.scm (home-provenance-service-type, sexp->home-provenance, home-provenance): New variables. --- gnu/home-services.scm | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/gnu/home-services.scm b/gnu/home-services.scm index 32b59f55df..d320d3a44d 100644 --- a/gnu/home-services.scm +++ b/gnu/home-services.scm @@ -38,7 +38,10 @@ home-files-service-type home-run-on-first-login-service-type home-activation-service-type - home-run-on-change-service-type) + home-run-on-change-service-type + home-provenance-service-type + + fold-home-service-types) #:re-export (service service-type @@ -467,3 +470,25 @@ G-expressions to run if the specified files have changed since the last generation. The extension should be a list of lists where the first element is the pattern for file or directory that expected to be changed, and the second element is the G-expression to be evaluated."))) + + +;;; +;;; Provenance tracking. +;;; + +(define home-provenance-service-type + (service-type + (name 'home-provenance) + (extensions + (list (service-extension + home-service-type + (service-extension-compute + (first (service-type-extensions provenance-service-type)))))) + (default-value #f) ;the HE config file + (description "\ +Store provenance information about the home environment in the home +environment itself: the channels used when building the home +environment, and its configuration file, when available."))) + +(define sexp->home-provenance sexp->system-provenance) +(define home-provenance system-provenance)