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 KPVrEhs7I2A6XgAA0tVLHw (envelope-from ) for ; Wed, 10 Feb 2021 01:47:07 +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 GDRzDhs7I2ApaQAA1q6Kng (envelope-from ) for ; Wed, 10 Feb 2021 01:47:07 +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 AEA319404C8 for ; Wed, 10 Feb 2021 01:47:03 +0000 (UTC) Received: from localhost ([::1]:53030 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l9eas-0007Ht-Fh for larch@yhetil.org; Tue, 09 Feb 2021 20:47:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:49262) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l9ead-0007He-GU for guix-devel@gnu.org; Tue, 09 Feb 2021 20:46:47 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:42338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l9eaY-00038P-6Y; Tue, 09 Feb 2021 20:46:44 -0500 Received: by mail-wr1-x432.google.com with SMTP id r21so675434wrr.9; Tue, 09 Feb 2021 17:46:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=3pkootkmkJpPvF525wo9+oDLMh+aT3svNeCaRUlZvNk=; b=me8P48jCHuIdj+noIaPOy84ioPkv1qAYQOLyqgWLwQ5NTEeYilbcXwPkdZCr8avAwN KNq4rR7JM+JNTW4n9aZjT5V+u2YXGYLflye5kqob5SkhXiB1WjJLEvq9cOtpxh3MYbIa xjZYnSH71aaRiuXglhj8ZAYK6GSAd20vTTCUeNneoUxlJtB8u+ING9DDkzmHXebRlaXe B5I5zY3Qp+zI5NHVNgv81TuVf5nPVfA0e/ajrN9R7JZp/wny7mh212JRy9BOxb9KMfAt DJZxXTM1inSxBriOPic6QKNz20RabTBy5TaoeV3S9+EHyzHz7P9MpHQKhjWk8WpcV69G OB2A== 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:date:message-id:mime-version :content-transfer-encoding; bh=3pkootkmkJpPvF525wo9+oDLMh+aT3svNeCaRUlZvNk=; b=Cl4yI8kDMBLKq5EP6F/haYMYhCVJf5zaY1r9m9WPYLHSFAfh633WWyc56q6BLAsI7S 1MT/DPsf0NI965PWZlyPYIB5M7d7OQoF/TRZ7um6nNP7l32JlSigwRi4tq9t9WUjBkHZ rtXDKxoeoqyrX7VTxC1CPfnXL/B18sDWufwVopgndmmwc+2XOg2MaMJdbcu/0l3sXoDS go2AhXM4z1Kr0yiHevj+qiK1Gfr5ZPkqsaXZ9pKj2Qg+rXNsoFWVx1Yxm2e//6U5DZ41 ncZvqx/QrZF2KZNCvbQ6IS2V2+xfe5eTDYbJN8COGL8GU9+GW+pWo60AwNgKhP+NDd45 OaWQ== X-Gm-Message-State: AOAM530CdKUpvOlwDpM5jwBr3E74V1CEdfO1is0zFVHBFnLi8h6YXptD 0Hwm1BV2Iaot3XblVX4Z+UXEU2/Z23o= X-Google-Smtp-Source: ABdhPJwCeaHqjC9iVJ9oNXSA+mWBEHVK+MhxtFbpaD6ImAGSVRhPRnvxco1RGBKvkwU4NGF0184y/g== X-Received: by 2002:adf:b357:: with SMTP id k23mr870219wrd.354.1612921595898; Tue, 09 Feb 2021 17:46:35 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id o17sm684521wrm.52.2021.02.09.17.46.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 17:46:35 -0800 (PST) From: zimoun To: Guix Devel , Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Unexpected --export-manifest with simple transformations Date: Wed, 10 Feb 2021 02:36:10 +0100 Message-ID: <868s7wbt6d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x432.google.com 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=ham autolearn_force=no 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: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -1.56 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=me8P48jC; dmarc=pass (policy=none) header.from=gmail.com; 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-Migadu-Queue-Id: AEA319404C8 X-Spam-Score: -1.56 X-Migadu-Scanner: scn0.migadu.com X-TUID: qGKTmWCYVGIu Hi, If the transformations are in the manifest.scm file, then they are lost. For example, consider: --8<---------------cut here---------------start------------->8--- $ guix package \ -p /tmp/profile-cli \ -i python python-numpy \ hello --with-c-toolchain=3Dhello=3Dgcc-toolchain@10 guix package: warning: transformation 'with-c-toolchain' had no effect on p= ython@3.8.2 guix package: warning: transformation 'with-c-toolchain' had no effect on p= ython-numpy@1.17.3 [...] $ guix package -p /tmp/profile-cli --export-manifest > /tmp/manifest.scm $ cat /tmp/manifest.scm ;; This "manifest" file can be passed to 'guix package -m' to reproduce ;; the content of your profile. This is "symbolic": it only specifies ;; package names. To reproduce the exact same profile, you also need to ;; capture the channels being used, as returned by "guix describe". ;; See the "Replicating Guix" section in the manual. (use-modules (guix transformations)) (define transform1 (options->transformation '((with-c-toolchain . "hello=3Dgcc-toolchain@10")))) (packages->manifest (list (transform1 (specification->package "hello")) (specification->package "python-numpy") (specification->package "python"))) --8<---------------cut here---------------end--------------->8--- So far, so good. Then let use this manifest to create a profile. $ guix package -p /tmp/profile-exported -m /tmp/manifest.scm and the issue is that =E2=80=99/tmp/profile-exported/manifest=E2=80=99 does= not contain the transformation. Other said: --8<---------------cut here---------------start------------->8--- $ guix package -p /tmp/profile-exported --export-manifest ;; This "manifest" file can be passed to 'guix package -m' to reproduce ;; the content of your profile. This is "symbolic": it only specifies ;; package names. To reproduce the exact same profile, you also need to ;; capture the channels being used, as returned by "guix describe". ;; See the "Replicating Guix" section in the manual. (specifications->manifest (list "hello" "python-numpy" "python")) --8<---------------cut here---------------end--------------->8--- Note that obviously: --8<---------------cut here---------------start------------->8--- $ ls -l /tmp/profile-{cli,exported}/bin/ | grep hello lrwxrwxrwx 3 root root 64 Jan 1 1970 hello -> /gnu/store/qi7pqqsxhbwmy75h= l43j7l0aw1xr7r42-hello-2.10/bin/hello lrwxrwxrwx 3 root root 64 Jan 1 1970 hello -> /gnu/store/qi7pqqsxhbwmy75h= l43j7l0aw1xr7r42-hello-2.10/bin/hello --8<---------------cut here---------------end--------------->8--- Well, is it a bug or a feature? ;-) >From my understanding, it makes sense to save the transformations from a manifest. But it is not clear what should be the good solution for that because it is not easy; again from my understanding. The obvious answer is: do not loose the manifest.scm file! :-) Sure, I am working in the context where Alice produced a Docker image with =E2=80= =9Cguix pack -f docker --save-provenance -m manifest.scm=E2=80=9D where manifest.scm uses transformations. Then since Alice is post-doc and goes doing other stuff elsewhere, the source probably vanishes. Bob wants to rebuild the Docker image. It is possible for simple case as I already illustrated it. :-) To be concrete, I am trying to write down a non-trivial example using a custom package and a transformation for a blog post and/or Cookbook recipe. Cheers, simon