From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0GqHBp39615zbQAA0tVLHw (envelope-from ) for ; Thu, 18 Jun 2020 23:49:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id APpxAp39615bKAAA1q6Kng (envelope-from ) for ; Thu, 18 Jun 2020 23:49:49 +0000 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 C8A8C94053C for ; Thu, 18 Jun 2020 23:49:48 +0000 (UTC) Received: from localhost ([::1]:59014 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jm4Hz-0003TC-Ox for larch@yhetil.org; Thu, 18 Jun 2020 19:49:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jm4Hj-0003St-93 for guix-devel@gnu.org; Thu, 18 Jun 2020 19:49:31 -0400 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:38984) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jm4Hh-0004IW-Ja; Thu, 18 Jun 2020 19:49:30 -0400 Received: by mail-wr1-x42d.google.com with SMTP id t18so7898395wru.6; Thu, 18 Jun 2020 16:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version; bh=l7Nv7Y3ssMA0uXqy4eLaiBD1SjmcixqMNz3g+xWEHzA=; b=fQCZhWIBCucIdQgzaiGrQ0Ag2r/qOyiQIL9kPzQ09HwVuPKuk38Qp4BK1tKK43ng3+ gvKp7hCMYY9qajwuM1RQdrmSbxFntOU2RomWw4i1TqWzL9tmkP4Kvk8wJffzIrYd+RcW EpOo41oB9xcNXv77AuyJPY4kHtZGWkDZJtDEzRtSB5gKNKNo9bwQYxm+ruAggEUG75Uw Sf8UxgSAY71F6X4HRBiVHLXnNCihUQYT/cIOw0j+ZI1qgdqMHeuB5dbE00wSTwZ1OOlu Te8jMvGRpjQBwZxvnyu9s5l5EV/vu0h+v79jrWZmdm7+BNRt4/qh3PbrOgLqebI84FFl F6Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version; bh=l7Nv7Y3ssMA0uXqy4eLaiBD1SjmcixqMNz3g+xWEHzA=; b=UMmmPDfq/fLIzMJgvaxtWkO6cw2bwj00hP8g0z1vBDqRqh7ggZf1C+VoAh2xBrMiIS 4lzZkJKYyCWS1/18V23tFu7fKue3Br90FFDXYFj5s2QeCiAFupC4h5KlTE8MloKdNIQq s9p5R0mzFiDaxkjr1et4dvy5mOdKjzRmFgW26yKVE2wGD0o/0EkLMGo9iyvxSqC7bxP0 KpKXt/t+avbLZ6t1mERqVuPrVbPFML/98ZTP+GtCznpSD3D5sZ9s2BCvWbDzOyNAJFBC AveS4eFX0R28f2WCXAme7BZE5Unpz4YeFSRZKrX7SRI9XYAa+Lv9zX5b1ZMmyExnkdHk eCbg== X-Gm-Message-State: AOAM5335kberGgCz+lxrJRyyghWk4qrnQxHHLYtFM070HsqLXHbw6cIR hJo6VIXiwoOERTfMWvyEqssYFCHSj04= X-Google-Smtp-Source: ABdhPJwm8LsjWTQRmRCXPYj9TBXQuof2vM19aVtDZAW05o3rkgBbalXg6rvmTT2l/653syNfwx4CmQ== X-Received: by 2002:a05:6000:87:: with SMTP id m7mr967082wrx.306.1592524166720; Thu, 18 Jun 2020 16:49:26 -0700 (PDT) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id c2sm5242657wrv.47.2020.06.18.16.49.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jun 2020 16:49:26 -0700 (PDT) From: zimoun To: elaexuotee@wilsonb.com Subject: Re: how to "guix pack" a profile? In-Reply-To: <35VODTGT3A8OP.2ZYCBD56EYVPN@wilsonb.com> References: <338KGSFKQGP1E.23382XUCMS8T3@wilsonb.com> <87v9juwvn0.fsf@gnu.org> <87d062ne8a.fsf@ambrevar.xyz> <87y2opu0ue.fsf@gnu.org> <86lfko92fj.fsf@gmail.com> <871rmfwdfp.fsf@gnu.org> <2AU8F0YU6YV9A.3KVDEJ754D654@wilsonb.com> <86sgevqg8q.fsf@gmail.com> <268B906X3RZH5.3NHG3ABUCOVPN@wilsonb.com> <861rmexgwf.fsf@gmail.com> <35VODTGT3A8OP.2ZYCBD56EYVPN@wilsonb.com> Date: Fri, 19 Jun 2020 01:49:24 +0200 Message-ID: <861rmcvssb.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=fQCZhWIB; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: 1.09 X-TUID: kliU+rYpo69c Dear, On Thu, 18 Jun 2020 at 18:20, elaexuotee@wilsonb.com wrote: > By `profile', I mean any store output named like /gnu/store/-profile. > These outputs are created by `guix package' invocations as well as `guix > environment' ones. > > By `user profile', I mean the (non-static) contents pointed to by > ~/.guix-profile. These contents get updated on `guix package' invocations (by > updating the ~/.guix-profile symlink). Well, from my understanding, any profile point to /gnu/store/-profile. --8<---------------cut here---------------start------------->8--- $ readlink -f ~/.guix-profile /gnu/store/192k3kck2w3g2ms43dry41la9lwrqf37-profile $ guix package -i hello -p /tmp/hello $ readlink -f /tmp/hello /gnu/store/p196x4m6ix33mgsbfacvqaw60129pndw-profile --8<---------------cut here---------------end--------------->8--- > Using this terminology, we both agree than managing your `user profile' via > "manifest.scm" (and "channels.scm") is the way to go. Those two files provide a > specification which guix *resolves* into a concrete `profile'. > > The imminently practical issue that you, Ludo, and Pierre seem to be working on > is a way of easing the transition from imperative to declarative `user profile' > management. > > In contrast, I am proposing making `profiles' first class. By this I mean a > file under /gnu/store/-profile that contains the code capable of > completely and deterministically rebuilding that exact profile, and that > profile *only*. For which use case? Well, let say there is a profile which could be a mess and I only see two usages currently uncovered: 1. create an environment based on this profile; either to temporarily extend it (which is AFAIK already more or less covered), either to isolate it, 2. pack it for sharing with your colleague. > Just for the sake of argument, let's call this file "recipe.scm", and let's > choose a profile, /gnu/store/123abc-profile. Then the following should be true: > > $ guix package --manifest /gnu/store/123abc-profile/recipe.scm > $ readlink -f ~/guix-profile > /gnu/store/123abc-profile > > I.e. that `guix package' invocation would have the effect of setting the > current user generation to that exact profile. > > Of course, if we had such a "recipe.scm" then the following would Just Work: > > # Containerize a profile. > $ guix pack --manifest /gnu/store/123abc-profile/recipe.scm > > # Share profiles with your Guix friends. > $ guix environment --manifest ~/downloads/friends-awesome-profile.scm > > And it plays well with potential future features: > > # Copy whole profiles between Guix stores > $ guix archive --manifest /gnu/store/123abc-profile/recipe.scm > > Hopefully my generalized idea is clearer now. What you describe here is exactly what Pierre and other have proposed. And the work-to-do is to prototype the format of what you called "recipe.scm", which means equivalently in the previous emails change the format of /manifest. All the best, simon