From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id CHElNBtARWVQAgAA9RJhRA:P1 (envelope-from ) for ; Fri, 03 Nov 2023 19:46:51 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id CHElNBtARWVQAgAA9RJhRA (envelope-from ) for ; Fri, 03 Nov 2023 19:46:51 +0100 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 66B3859708 for ; Fri, 3 Nov 2023 19:46:44 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Tvm+KrA1; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699037204; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=1R7wPfS6TywZPH85XNykCrBMjztg6VhW4NuslQOV9y8=; b=syxsGR6PcRdTzlg/DsK4uBVaTVt5LI+QUcU2UtXTBS51FnWWa3dAZ74Zh27zXWBHwYSJy8 5fB6x9GJwR83x6EMf/ydopUnAXIfiI5nJLx6XmucsK6qrZioZ8INRmAxDFswvM8LqxXWc0 fjskzQSoYq8cEhTBNQb0tMCtxJO6rO3KhP2EKhkJCu7Gi418GI74aNses1qjDYAYfAxsca 8ueDRZJMRYpMYA6htGRzM66OE+7a1peDPOcaSgd1anOFn4r3OMBPMtW5u415E5ONiI3zRI MmrFVBtDMB4M/ZY55KBvBcKIkQSwWouO87beYVsPYFJ+as3ASxDTEzLiHIJqgw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Tvm+KrA1; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699037204; a=rsa-sha256; cv=none; b=Dom5kSkLBz1kmx/oK7jYepF0YIC0wvKvhE7Y86xyBlxKdWJiybHLvnhYYtx9Me2Fq/OTki tz/YB2Q0ZGb/+nWES8cnn2vZakazx4jmsGkXvxDQ/LViAgM4cCP8Fw3hj3OpmAGFynwdkW K0yqT12X6nrwZAuKmAKy909WCGYOgAQuMYWN7j2LEiDtgpno6+K4X2kD2vR3madfsku3IA kFS1+PvUIZd+z1y0TBEr0ZlLXizfRgfZYIHti1i7RNjsxCw1x1yBWpcVCrJjAb7ZvrKZ7/ ZMhHDY3gCjMcl8wVLpHy30BSbFIzXjcEHvkgx9mrtNGAUdH5jNOCG6Ggir4vOQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qyzBL-0007Ay-By; Fri, 03 Nov 2023 14:46:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qyzBI-0007A5-5n for guix-devel@gnu.org; Fri, 03 Nov 2023 14:46:08 -0400 Received: from mail-lf1-x133.google.com ([2a00:1450:4864:20::133]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qyzBF-000313-Ix for guix-devel@gnu.org; Fri, 03 Nov 2023 14:46:07 -0400 Received: by mail-lf1-x133.google.com with SMTP id 2adb3069b0e04-50944102316so700689e87.1 for ; Fri, 03 Nov 2023 11:46:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699037164; x=1699641964; darn=gnu.org; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:from:to:cc:subject:date:message-id :reply-to; bh=1R7wPfS6TywZPH85XNykCrBMjztg6VhW4NuslQOV9y8=; b=Tvm+KrA1EAe4f0u+FvZzPNb5DDlZeBZyMUcM13y2BEpKtfxsYyXb9FiiLWgn4Z0l7w SA7nHsjum49gR1YlrqW6Gik9jghf+jwgBQQfXt82Mcu9dglXr8XP7LWT6Kd4SuFlJKwI 1nm+Ic6qInxmXcTaTVMe2groVmd888d5KLbCm52xIJr9eduaH2Pb/Cv6ix1s5j7q2bpr 3q/GeUit0UtrzQc71wt0kxKG6W0vb2kdNd6WVVczQ011LwIiUk1YPub2yWXVQ+cnflFQ lJCu7AukPD+npfSseeNsBxtQ3tA6+tnXqhnCsgRTDIs4x+Hr6Z3CcU+iFnlb3DaL6OzK xA5w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699037164; x=1699641964; h=content-transfer-encoding:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1R7wPfS6TywZPH85XNykCrBMjztg6VhW4NuslQOV9y8=; b=bqk9sZnOL89ij2H3urJBRVRf+OKWfHK6dmPLZeEAWza8VX3uhaBG7/hJNno/lz52jy RLBA+aDgvjCVsnYwAvtM0uTlx3Gp0jSLBgwXFctac3+VftGSg5P9Goxv9f895XEHC62d frgDb6K3H68pPQ0wr957B0uMxXduawAFIrDadgBbFdllja4suSDlHnM4lFmbbFxvlPtD yPITa69ao7I/D3FIj6xu/5Wc7Oe4ykHRya5M8dEi96vbcdzSMIWjWZeYdj2PrT0P5U1g z9q/8iQa0WYruG3UtlqpC/tPYWSzGBvaOvbwwR40NDK41HRqHFMydR6APjPPRv2bQIB8 thcA== X-Gm-Message-State: AOJu0Yz882FzjblZGAijpB7rxFoJRipb2DS3vRo45mHmUcVd2G9AgVAY pMOcom4Zz3N/iVXwMtiN29CE+vNMzeA= X-Google-Smtp-Source: AGHT+IH1VlSOPlzhkC0WF17Gk08DsoRTq9nQs1U6jwVLtyL6O4yVDT2XCZako8ASv4yMwy5eyR9Bcg== X-Received: by 2002:a05:6512:3f10:b0:509:4aae:f2b4 with SMTP id y16-20020a0565123f1000b005094aaef2b4mr3995347lfa.1.1699037163374; Fri, 03 Nov 2023 11:46:03 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id m1-20020a056000180100b0031980783d78sm2471665wrh.54.2023.11.03.11.46.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 11:46:02 -0700 (PDT) From: Simon Tournier To: =?utf-8?Q?Cl=C3=A9ment?= Lassieur , Christopher Baines Cc: guix-devel@gnu.org Subject: G-expressions and chroot environment? (was Re: branch master updated: gnu: Add passff.) In-Reply-To: <87a5s2bxeg.fsf@lassieur.org> References: <169826674567.18633.11885829962706141651@vcs2.savannah.gnu.org> <87lebmztz3.fsf@cbaines.net> <87a5s2bxeg.fsf@lassieur.org> Date: Fri, 03 Nov 2023 19:46:00 +0100 Message-ID: <87y1feu13r.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::133; envelope-from=zimon.toutoune@gmail.com; helo=mail-lf1-x133.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, T_SCC_BODY_TEXT_LINE=-0.01, WEIRD_QUOTING=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -9.42 X-Spam-Score: -9.42 X-Migadu-Queue-Id: 66B3859708 X-Migadu-Scanner: mx13.migadu.com X-TUID: ngwaOBYKP15v Hi, On Sat, 28 Oct 2023 at 17:05, Cl=C3=A9ment Lassieur = wrote: >> ./pre-inst-env guix show passff-host >> name: passff-host >> version: 1.2.3 >> outputs: >> + out: everything >> systems: x86_64-linux mips64el-linux aarch64-linux powerpc64le-linux r= iscv64-linux >> + i686-linux armhf-linux i586-gnu powerpc-linux >> dependencies:=20 > > I imagine it's a bug in `guix show`? It is not a bug of =E2=80=99guix show=E2=80=99 because =E2=80=99guix show= =E2=80=99 accesses to the fields of the package record. And Cl=C3=A9ment=E2=80=99s patch is an =E2= =80=9Cabuse=E2=80=9D of the G-expressions machinery. :-) > As doc says: > > =E2=80=A2 Gexps carry information about the packages or derivations th= ey > refer to, and these dependencies are automatically added as inputs > to the build processes that use them. Well, this is correct from my understanding. ;-) However, there is still something that I am missing. The derivations tracks all and that=E2=80=99s expected; thanks G-expression machinery. :-) However, I miss how the builder works with the chrooted environment if nothing is passed to it. The derivation reads, --8<---------------cut here---------------start------------->8--- Derive ([("out","/gnu/store/0amanwyzx3jylyw7bz5nmszpybxll8ww-passff-host-1.2.3",""= ,"")] ,[("/gnu/store/070vbkzbs0dn6w9mhz0xw8fi5hfp92rg-make-4.3.drv",["out"]) ,("/gnu/store/2i4781y3mmnm2jlx3awa4mwbqam2ar80-python-3.10.7.drv",["out"= ]) ,("/gnu/store/ax7wdlbxhcz7w8nfyrxkb1pqai80niw6-sed-4.8.drv",["out"]) ,("/gnu/store/gb247cil5nlnx175dhqmgg67q7ng7n2h-which-2.21.drv",["out"]) ,("/gnu/store/ghwl0z5ci5sssbrzixxji8l0x3j9i3dv-bash-minimal-5.1.16.drv",= ["out"]) ,("/gnu/store/mqmnsly3nm0a7hj46apf2hfm7j8wk56h-module-import-compiled.dr= v",["out"]) ,("/gnu/store/raay3plnbzadwqc0yv8yw8pjr929pkqd-coreutils-9.1.drv",["out"= ]) ,("/gnu/store/rnphhzpwkz82zf1il1cg52041myvp3d4-password-store-1.7.4.drv"= ,["out"]) ,("/gnu/store/y6871hl8lklcslvw57wj4bnyysxlv2np-passff-host-1.2.3-checkou= t.drv",["out"]) ,("/gnu/store/y9l0jnyxssx1glbyg3cav78js2fm7j50-grep-3.8.drv",["out"]) ,("/gnu/store/zraigp7miin3vzr5dcbr4i9rvds0i07r-guile-3.0.9.drv",["out"])] ,["/gnu/store/8nam67byqnpvbfn4anpgg5pb2qrqhs3v-passff-host-1.2.3-builder",= "/gnu/store/pj751v3199vmv6i6sf0szp185ryzcfdg-module-import"] ,"x86_64-linux","/gnu/store/g8p09w6r78hhkl2rv1747pcp9zbk6fxv-guile-3.0.9/b= in/guile",["--no-auto-compile","-L","/gnu/store/pj751v3199vmv6i6sf0szp185ry= zcfdg-module-import","-C","/gnu/store/2gbsk55kwag577skxwsxrfy3l4cl03xh-modu= le-import-compiled","/gnu/store/8nam67byqnpvbfn4anpgg5pb2qrqhs3v-passff-hos= t-1.2.3-builder"] ,[("out","/gnu/store/0amanwyzx3jylyw7bz5nmszpybxll8ww-passff-host-1.2.3")]) --8<---------------cut here---------------end--------------->8--- However the builder reads, --8<---------------cut here---------------start------------->8--- (begin (define %build-inputs (quote (("source" . "/gnu/store/fjnkcv14qb61623lm16kq1mgb4bsxivl-passff-host-= 1.2.3-checkout")))) (define %outputs (list (cons "out" ((@ (guile) getenv) "out")))) (define %output (assoc-ref %outputs "out")) (begin (use-modules (guix build utils)) (setenv "PATH" (string-join (list "/gnu/store/yr39rh6wihd1wv6gzf7w4w687dwzf3vb-coreutils-9= .1/bin" "/gnu/store/ixr7c3jadiqg640b8pz3njqhhm5zzmvj-grep-3.8/bin" "/gnu/st= ore/sj794a2709pxsi4mgvi619qdpi1g32aa-password-store-1.7.4/bin" "/gnu/store/= dy3xh053ahkhrp2jamggq8cpsyvp8mg0-python-3.10.7/bin" "/gnu/store/fyy3wkjkix1= 6sb1ginqw2kbji74cwl2b-sed-4.8/bin" "/gnu/store/6vxk0i5j9w8mik4l6gx3cbw33f9x= 4l24-which-2.21/bin") ":")) (copy-recursively "/gnu/store/fjnkcv14qb61623lm16kq1mgb4bsxivl-passff-h= ost-1.2.3-checkout" ".") (substitute* "src/install_host_app.sh" (("#!/usr/bin/env sh") "/gnu/store/9vw5slrffp27rzy2i2plnw7xfqjyk7m4-bash-minimal-5.1.16/bin= /sh") (("(TARGET_DIR_FIREFOX=3D).*" all var) (string-append var ((@ (guile) getenv) "out") "/lib/icecat/native-messaging-hosts"))) (invoke "/gnu/store/vq4g8390wbz2434m678v010mkpnkjb2w-make-4.3/bin/make" (string-append "VERSION=3D" "1.2.3") "install-unix"))) --8<---------------cut here---------------end--------------->8--- and I would have expect that it fails because of the isolated environment. How is it possible that the builder script is able to run that? For another example using the gnu-build system. --8<---------------cut here---------------start------------->8--- (define-module (appendix) #:use-module (guix packages) #:use-module (gnu packages base) #:use-module (guix utils) #:use-module (guix gexp) #:use-module (gnu packages emacs)) (define-public bye (package (inherit hello) (name "bye") (arguments (list #:phases #~(modify-phases %standard-phases (add-after 'install 'do-something-with-emacs (lambda _ (invoke #$(file-append emacs-minimal "/bin/emacs") "--version")))))))) --8<---------------cut here---------------end--------------->8--- Considering the builder of this, I miss how, in an isolated environment, =E2=80=99gnu-build=E2=80=99 access to the store item =E2=80=99emacs-minimal= =E2=80=99 if it is not listed in =E2=80=99%build-inputs=E2=80=99. Is it a bug? Or someone could help me to understand what I miss with the chrooted environment. Cheers, simon