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: 31384 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 B3DF327BC82; Tue, 13 Jul 2021 19:19: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 816C327BC6B for ; Tue, 13 Jul 2021 19:19:23 +0100 (BST) Received: from localhost ([::1]:54092 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m3N06-0005DV-Km for patchwork@mira.cbaines.net; Tue, 13 Jul 2021 14:19:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Mzn-0004ge-Vu for guix-patches@gnu.org; Tue, 13 Jul 2021 14:19:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:58655) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3Mzn-0007kd-CP for guix-patches@gnu.org; Tue, 13 Jul 2021 14:19:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m3Mzn-0000Vp-9J for guix-patches@gnu.org; Tue, 13 Jul 2021 14:19:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49548] [PATCH v2 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: Tue, 13 Jul 2021 18:19:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49548 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49548@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16262003051875 (code B ref -1); Tue, 13 Jul 2021 18:19:03 +0000 Received: (at submit) by debbugs.gnu.org; 13 Jul 2021 18:18:25 +0000 Received: from localhost ([127.0.0.1]:41962 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3MzA-0000U6-N9 for submit@debbugs.gnu.org; Tue, 13 Jul 2021 14:18:25 -0400 Received: from lists.gnu.org ([209.51.188.17]:40884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m3Mz8-0000Tx-ED for submit@debbugs.gnu.org; Tue, 13 Jul 2021 14:18:22 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:36700) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m3Mz8-0004OD-8H for guix-patches@gnu.org; Tue, 13 Jul 2021 14:18:22 -0400 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]:43780) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m3Mz5-0007GK-RO for guix-patches@gnu.org; Tue, 13 Jul 2021 14:18:22 -0400 Received: by mail-lj1-x22d.google.com with SMTP id r20so31330399ljd.10 for ; Tue, 13 Jul 2021 11:18:19 -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=JNmk8SBqP9V9Iy5rMbBqYemUyGchx/1P+h8VkN8PBK0=; b=E2js3qIy2ZoH7uUQsUo8U3kd84mYbGk+nghCXldIlwyOyqmmnW+c3Yb28U40qVaPF0 gYg2re+n167k2a/LUw9+qjpBGNCfHMfr5iU6CXzSxOMPgcuru3vWEZk06aKEU8QKfJun 4/0CF0HrwbtVFtmGgyJSKJ5thaKoN1Mc3oLTQwiW30egFMdT4aRoje6mvlgNgMeWK5Ho uqWKCcxhFGSqcf/Ds90S0DI8OpHbPAnibauH5Ou/HaHUCABRyvYVmnh5nuOjihil8LFC 9KTaM6M9Yu+4igT0uOxV5bqEedMKCduj30S+YZRKiOEE0VeLED9SxzaDoyRgscQK2KYD G4QQ== 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=JNmk8SBqP9V9Iy5rMbBqYemUyGchx/1P+h8VkN8PBK0=; b=N70Lh7IeDZN7k3vsObJbwHbR2DCRrHMFVycNTtS1sXf6QT9DOY4JTd51Ip5w/tAyvx fhttdCHoon2ysHxT1lvvE6YC/i2M3WqfsOzGHPPeZhR9g2dLhx2oXqXgyR5RUPNIZH/6 g0fmyuHEnZD6DPuwIzk7vR1Rzz9JdYTM2fn/0XrStIuZTtr5W1P8If0jCUwJw7BE3/eE JWTbOsq2vaBIAXnmsG8l37Uk8r67DXEMLt0JeFOXy+OMDUxzcx5oxspOuku8a2aoVVmm Dgh5Sz1A4nX2K8AYIR+x+cFe9pPhqSFuOGEAmQVc8QKJF+SGapRSgzM6cHgF7c9oxK7/ PRxw== X-Gm-Message-State: AOAM531C9euJZvCstKptpIXRCxtR2SxeK/lyWgmLVkZRAf8OK9XDCHgK Txg1zEvlkGVazuO033R7iB6hYx5LAKEbpg== X-Google-Smtp-Source: ABdhPJwVM5lYa51rcRIPaqkIiW1UcCcCWLw0c/mX3Fmd7jf7YVY31AUVqBhyBpiIGL4YgQlAQXXR9A== X-Received: by 2002:a2e:854e:: with SMTP id u14mr5250281ljj.466.1626200297761; Tue, 13 Jul 2021 11:18:17 -0700 (PDT) Received: from localhost (109-252-93-92.nat.spd-mgts.ru. [109.252.93.92]) by smtp.gmail.com with ESMTPSA id a25sm2002746ljj.114.2021.07.13.11.18.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jul 2021 11:18:17 -0700 (PDT) From: Andrew Tropin In-Reply-To: <87bl76m6b7.fsf@trop.in> Date: Mon, 5 Jul 2021 18:41:07 +0300 Message-ID: <871r82m66t.fsf@trop.in> MIME-Version: 1.0 Received-SPF: none client-ip=2a00:1450:4864:20::22d; envelope-from=andrew@trop.in; helo=mail-lj1-x22d.google.com X-Spam_score_int: 15 X-Spam_score: 1.5 X-Spam_bar: + X-Spam_report: (1.5 / 5.0 requ) BAYES_00=-1.9, DATE_IN_PAST_96_XX=3.405, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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 fadad3133e..ffcee22bb8 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 @@ -419,3 +422,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)