From patchwork Mon Jul 5 15:41:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Tropin X-Patchwork-Id: 31505 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 5B2DA27BC78; Mon, 19 Jul 2021 18:16:23 +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_H4,RCVD_IN_MSPIKE_WL,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 23F5327BC6B for ; Mon, 19 Jul 2021 18:16:23 +0100 (BST) Received: from localhost ([::1]:51316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5WsQ-0000c2-6d for patchwork@mira.cbaines.net; Mon, 19 Jul 2021 13:16:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:42808) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5WsC-0000FL-0K for guix-patches@gnu.org; Mon, 19 Jul 2021 13:16:09 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48673) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5Ws7-0004bG-4v for guix-patches@gnu.org; Mon, 19 Jul 2021 13:16:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m5Ws7-0000w1-15 for guix-patches@gnu.org; Mon, 19 Jul 2021 13:16:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49419] [PATCH v3 3/4] home-services: Add home-provenance-service-type References: <87y2akhiz1.fsf@trop.in> Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 19 Jul 2021 17:16: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.16267149412246 (code B ref 49419); Mon, 19 Jul 2021 17:16:02 +0000 Received: (at 49419) by debbugs.gnu.org; 19 Jul 2021 17:15:41 +0000 Received: from localhost ([127.0.0.1]:60213 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Wrl-0000Zp-FJ for submit@debbugs.gnu.org; Mon, 19 Jul 2021 13:15:41 -0400 Received: from mail-lj1-f174.google.com ([209.85.208.174]:33589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5Wrj-0000S1-IC for 49419@debbugs.gnu.org; Mon, 19 Jul 2021 13:15:39 -0400 Received: by mail-lj1-f174.google.com with SMTP id u14so27428649ljh.0 for <49419@debbugs.gnu.org>; Mon, 19 Jul 2021 10:15:39 -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:date:message-id:mime-version; bh=a/lytMsQTL/htua872I/xvcPbS8lCGq8gJM10eGky7s=; b=T82znJX8JdtklC7TfbGZ2Zy2j87YQqaih6YsZydELQ4uLG3z01jT6zFTTFywNnTesL S8CxKNpL4+0uvR9BkWIUj/McLJR0UDC3bbeC4K/K5AYPYURzkPTwcZXBW7mD+PHPBiBs AdPMnEpZQHvc8WT4ELlC2JEeN/eRLEoN+puJnHbJduFgpvGrXq3px8LTTfbR5jtn2pfV IuDD7hJfb43gFiplwMKh0tsvd/m7AcSxWogeuE0yAug/R9e9LSmz7t062cOhm+B8gCFv eE3kiPCV4ohkqqLR2FXWBPwmwqSmlGosFNCCIa1RxsTBNP3GAPWhQjc7ZJemHPSC4e5O PKsw== 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:date:message-id :mime-version; bh=a/lytMsQTL/htua872I/xvcPbS8lCGq8gJM10eGky7s=; b=aMvGxuOJVmEgAJHvEZLz1gX5JSLc5HVphmPX2NZOKSvC9VNRSomUOya5GloloAN8Zh JNkhPuhRgyE9upSrWBLWknyEoq80znS05Em00SJSQfrokIjzhXCz3w0YjVpK19WtBy+O pLAl4ESvY33jfDFVlPiOVlrkJ+ZV8Fr4Qc37teNj+4fyKOsePkpTD7QwEuHikJGR4wgI aHiXJ7AHi86zvSbZdBIkhs/vHA9oRcCpnV/AwOQCer2tJYIxMIBqm3OriKczhiAwPtlj takywOkRZxFnptTGGErezGf5n2H3fJIpOjU7cvWYTb+HkvpZzmJ4GgZZmLsyysqMquyL CyeA== X-Gm-Message-State: AOAM5322dowmOoPzBxtjs1GfQ4l93tOjGLffib8BJFowSwmpB1X0utWM 3Y1wUiospkf+3Usu3fK1qNRCFaSgHggdJQ== X-Google-Smtp-Source: ABdhPJzunp2iNMuxxslQkuLfknJatkrIexBf53E+zbv7usaQJGdwwzpekouBWATJS4OD+yhujGUvgw== X-Received: by 2002:a2e:9a8e:: with SMTP id p14mr12927665lji.69.1626714933401; Mon, 19 Jul 2021 10:15:33 -0700 (PDT) Received: from localhost ([85.249.24.60]) by smtp.gmail.com with ESMTPSA id p13sm1337910lfr.7.2021.07.19.10.15.32 for <49419@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Jul 2021 10:15:32 -0700 (PDT) From: Andrew Tropin In-Reply-To: <87v956g1g5.fsf@trop.in> Date: Mon, 5 Jul 2021 18:41:07 +0300 Message-ID: <87r1fug18l.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 bcb6dd80df..8aa9adeaaf 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 @@ -424,3 +427,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)