Received: (at 32184) by debbugs.gnu.org; 19 Oct 2018 16:43:34 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 19 12:43:34 2018 Received: from localhost ([127.0.0.1]:59703 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1gDXs6-0006DS-6z for submit <at> debbugs.gnu.org; Fri, 19 Oct 2018 12:43:34 -0400 Received: from eggs.gnu.org ([208.118.235.92]:60893) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1gDXs4-0006DG-PZ for 32184 <at> debbugs.gnu.org; Fri, 19 Oct 2018 12:43:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1gDXrw-0005TG-FF for 32184 <at> debbugs.gnu.org; Fri, 19 Oct 2018 12:43:27 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1gDXrv-0005Rp-Q6; Fri, 19 Oct 2018 12:43:23 -0400 Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=47404 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1gDXro-00075B-E3; Fri, 19 Oct 2018 12:43:22 -0400 From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Chris Marusich <cmmarusich@HIDDEN> Subject: Re: bug#32184: =?utf-8?Q?=E2=80=98guix?= pack =?utf-8?Q?--bootstr?= =?utf-8?Q?ap=E2=80=99?= is ineffective References: <87k1pu9pv3.fsf@HIDDEN> <87r2k1ul77.fsf@HIDDEN> Date: Fri, 19 Oct 2018 18:43:14 +0200 In-Reply-To: <87r2k1ul77.fsf@HIDDEN> (Chris Marusich's message of "Tue, 17 Jul 2018 23:11:56 -0700") Message-ID: <87va5xevkt.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 32184 Cc: 32184 <at> debbugs.gnu.org X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -6.0 (------) Hi Chris, Chris Marusich <cmmarusich@HIDDEN> skribis: > ludo@HIDDEN (Ludovic Court=C3=A8s) writes: > >> While preparing the 0.15 release I realized that =E2=80=98guix pack --bo= otstrap=E2=80=99 >> had become ineffective. Concretely, =E2=80=98tests/guix-pack.sh=E2=80= =99 would attempt >> to build the world. >> >> This is a consequence of c45477d2a1a651485feede20fe0f3d15aec48b39w, which >> introduced a dependency on guile-sqlite3 in derivations that build >> packs, even if they don=E2=80=99t actually produce a =E2=80=98db.sqlite= =E2=80=99 file in there. [...] > Basically, we're manually doing dependency injection here depending on > whether or not --bootstrap was given, right? Instead of parameterizing > the dependencies, what if we used a dependency injector (or "oracle", or > "container", or whatever you want to call it) that, when invoked, would > give us the dependency that is appropriate for the current context? > Perhaps we could control the context via a single parameter. For > example, something like this: > > (parameterize ((test-environment? #t)) > (injector-get-dependency guile)) > > would return the bootstrap guile, but something like this: > > (parameterize ((test-environment? #f)) > (injector-get-dependency guile)) > > would return the usual guile. This isn't much different from using > parameters like we're already doing, except that it might save us from > having to remember multiple parameters, and it might make the code > cleaner by hiding the dependency selection/construction logic behind the > injector abstraction. > > What do you think of that idea? It was sad to see these tests were not running so I decided to bite the bullet. :-) In commit 19c924af4f3726688ca155a905ebf1cb9acdfca2, I went for a different solution: now these =E2=80=98guix pack=E2=80=99 tests run using t= he user=E2=80=99s store (normally /gnu/store) rather than the test store ($builddir/test-tmp), when possible. This allows us to run these tests and possibly write other more complex tests. WDYT? At this point I think we can remove =E2=80=98--bootstrap=E2=80=99 from =E2= =80=98guix pack=E2=80=99 altogether. Thoughts? Thanks, Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#32184
; Package guix
.
Full text available.Received: (at submit) by debbugs.gnu.org; 26 Jul 2018 13:27:10 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Thu Jul 26 09:27:10 2018 Received: from localhost ([127.0.0.1]:58584 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1figIP-0004sT-OK for submit <at> debbugs.gnu.org; Thu, 26 Jul 2018 09:27:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59318) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1figIO-0004sD-2l for submit <at> debbugs.gnu.org; Thu, 26 Jul 2018 09:27:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1figIF-000662-V3 for submit <at> debbugs.gnu.org; Thu, 26 Jul 2018 09:27:02 -0400 Received: from lists.gnu.org ([2001:4830:134:3::11]:58592) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1figIF-00065W-RU for submit <at> debbugs.gnu.org; Thu, 26 Jul 2018 09:26:59 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:50277) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1figIC-0003r8-KN for bug-guix@HIDDEN; Thu, 26 Jul 2018 09:26:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1figI9-0005oC-KF for bug-guix@HIDDEN; Thu, 26 Jul 2018 09:26:56 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:54303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1figI9-0005ni-Fb; Thu, 26 Jul 2018 09:26:53 -0400 Received: from [193.50.110.221] (port=54000 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1figI7-0003IT-SH; Thu, 26 Jul 2018 09:26:52 -0400 From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Chris Marusich <cmmarusich@HIDDEN> Subject: Re: =?utf-8?Q?=E2=80=98guix?= pack =?utf-8?Q?--bootstrap=E2=80=99?= is ineffective References: <87k1pu9pv3.fsf@HIDDEN> <87r2k1ul77.fsf@HIDDEN> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 8 Thermidor an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 26 Jul 2018 15:26:50 +0200 In-Reply-To: <87r2k1ul77.fsf@HIDDEN> (Chris Marusich's message of "Tue, 17 Jul 2018 23:11:56 -0700") Message-ID: <87r2jqyvol.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: bug-guix@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -6.0 (------) Hi Chris, Chris Marusich <cmmarusich@HIDDEN> skribis: > Basically, we're manually doing dependency injection here depending on > whether or not --bootstrap was given, right? Instead of parameterizing > the dependencies, what if we used a dependency injector (or "oracle", or > "container", or whatever you want to call it) that, when invoked, would > give us the dependency that is appropriate for the current context? > Perhaps we could control the context via a single parameter. For > example, something like this: > > (parameterize ((test-environment? #t)) > (injector-get-dependency guile)) > > would return the bootstrap guile, but something like this: > > (parameterize ((test-environment? #f)) > (injector-get-dependency guile)) > > would return the usual guile. This isn't much different from using > parameters like we're already doing, except that it might save us from > having to remember multiple parameters, and it might make the code > cleaner by hiding the dependency selection/construction logic behind the > injector abstraction. > > What do you think of that idea? Yes, that makes sense. Or we could simply have something like: (define (lookup-package name) (if (test-environment?) (match name ("guile" =E2=80=A6) =E2=80=A6) (match name =E2=80=A6))) Another option that comes to mind is using the little-known =E2=80=98map-derivation=E2=80=99 procedure: we would compute the =E2=80=98g= uix pack=E2=80=99 derivation as usual, but at the end we=E2=80=99d call =E2=80=98map-derivation=E2=80=99= to replace libgcrypt.drv, guile-sqlite3.drv, etc. with dummy variants. That might turn out to be more complicated that the above solution, though. Ludo=E2=80=99.
bug-guix@HIDDEN
:bug#32184
; Package guix
.
Full text available.Received: (at submit) by debbugs.gnu.org; 18 Jul 2018 06:12:15 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Wed Jul 18 02:12:15 2018 Received: from localhost ([127.0.0.1]:46088 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1fffh9-0000je-GD for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 02:12:15 -0400 Received: from eggs.gnu.org ([208.118.235.92]:43951) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <cmmarusich@HIDDEN>) id 1fffh8-0000jQ-Et for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 02:12:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <cmmarusich@HIDDEN>) id 1fffh1-0003k7-NY for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 02:12:08 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:60818) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <cmmarusich@HIDDEN>) id 1fffh1-0003k3-K0 for submit <at> debbugs.gnu.org; Wed, 18 Jul 2018 02:12:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <cmmarusich@HIDDEN>) id 1fffh0-0001K5-0Z for bug-guix@HIDDEN; Wed, 18 Jul 2018 02:12:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <cmmarusich@HIDDEN>) id 1fffgy-0003eV-1n for bug-guix@HIDDEN; Wed, 18 Jul 2018 02:12:05 -0400 Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]:36717) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <cmmarusich@HIDDEN>) id 1fffgx-0003bw-Nf; Wed, 18 Jul 2018 02:12:03 -0400 Received: by mail-pf0-x22b.google.com with SMTP id d14-v6so1694000pfo.3; Tue, 17 Jul 2018 23:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:message-id:user-agent :mime-version; bh=IzX/RXbZRe2DhzpXJ4jT16FxFdN4nONqPrzakHxYWhA=; b=PmQsXGxSGVWhQZf7HK00PZCyNn/2l3hZC/tPitgPru1Nw9y+U62x/SONe0FVRHtOcf 91ITHuG4eg2foTJtw8+NyHxkPtoRn6pzykTbEVNujdoqcL3RUApsyDm1q1NiMz/a9HVy SN2fe3vUU/e7aEl/EQPu+8oYuGiz6/eDNifiB0FZv/xaG21Nve0xvEllHbkdaFZAqt9H BDs5z5okAobyBYNg0nlVyKW87tyemaVvRulV2xOI8KWg3xOF++hr3bocv+OEJWcB6M/X jBt5TsQJ3MThsPYXUKAo4ABHtWfnqTnvpV7D/qix59Wzo5NpPmXxrQ4WkH4cI30SG043 wBwQ== 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:references:date:message-id :user-agent:mime-version; bh=IzX/RXbZRe2DhzpXJ4jT16FxFdN4nONqPrzakHxYWhA=; b=n0q07V9zoCBd7NQqMckRfKkavyqdTkbH3sNgBbuE2VuEvQvflaFJBBK2+4E0va2bBM Q5UrFNXhEW1mhURllrGybpyLDYDaEJOVOtI+EQBd7IMZ2k/mhx3jSpS1QvHSBtDjDqIv XzIJlINo/DgIcM3afjZlLnOcqYc7Aiynq40WtLEw2ORct1MA8bQxZHUmxX4IRaWNPqXO 3hUX19OdV0SVT3AY5fC/yn8edqwxReopUwnHJ8DL85LJ3MqYYR5FcEK8hQXih6ROvXU1 QeOFSkF5pJstx/3I1eWZr7V3e0leJ5t6X/hSgNcXMHYZ+yslXtmGwABD2ksYucQIojNq joyw== X-Gm-Message-State: AOUpUlHzcoj19Z6bP7px0kBDRD8//4uVO6rehQhwKFXHp0PnqChrs3kX KFqcw+PJYE5mPWiQHt3CBZmHLg== X-Google-Smtp-Source: AAOMgpcNNECwIXX7fDWMDeJlmi1X/M9WBvR0N05Cv08pj2lsT5mYPPiGs/3K3VecjPIcotloRRvvsw== X-Received: by 2002:a62:404e:: with SMTP id n75-v6mr3844622pfa.232.1531894322088; Tue, 17 Jul 2018 23:12:02 -0700 (PDT) Received: from garuda.local ([2601:602:9d02:4725:6495:ba21:1ebe:620a]) by smtp.gmail.com with ESMTPSA id c12-v6sm8313147pfl.20.2018.07.17.23.12.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 17 Jul 2018 23:12:00 -0700 (PDT) From: Chris Marusich <cmmarusich@HIDDEN> To: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: =?utf-8?Q?=E2=80=98guix?= pack =?utf-8?Q?--bootstrap=E2=80=99?= is ineffective References: <87k1pu9pv3.fsf@HIDDEN> Date: Tue, 17 Jul 2018 23:11:56 -0700 Message-ID: <87r2k1ul77.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit Cc: bug-guix@HIDDEN X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -5.0 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@HIDDEN (Ludovic Court=C3=A8s) writes: > While preparing the 0.15 release I realized that =E2=80=98guix pack --boo= tstrap=E2=80=99 > had become ineffective. Concretely, =E2=80=98tests/guix-pack.sh=E2=80=99= would attempt > to build the world. > > This is a consequence of c45477d2a1a651485feede20fe0f3d15aec48b39w, which > introduced a dependency on guile-sqlite3 in derivations that build > packs, even if they don=E2=80=99t actually produce a =E2=80=98db.sqlite= =E2=80=99 file in there. > > I started looking for solutions, which led me to the patch below. > That=E2=80=99s quite intrusive and it doesn=E2=80=99t work because then w= e have a > similar issue with (guix hash) trying to dlopen libgcrypt. > > [...] > > diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm > index 6d5d745bc..45eeb2e7b 100644 > --- a/guix/scripts/pack.scm > +++ b/guix/scripts/pack.scm > > [...] >=20 > @@ -717,6 +734,9 @@ Create a bundle of PACKAGE.\n")) > (set-build-options-from-command-line store opts) >=20=20 > (parameterize ((%graft? (assoc-ref opts 'graft?)) > + (guile-sqlite3&co (if (assoc-ref opts 'bootstrap?) > + (list guile-sqlite3/mock) > + (guile-sqlite3&co))) > (%guile-for-build (package-derivation > store > (if (assoc-ref opts 'bootstrap?) You mentioned that you felt this change is "quite intrusive." How is this more intrusive than using parameters for %graft? and %guile-for-build to control how things get built? At first blush, this seems no worse than what we already doing here. You also mentioned that the proposed patch doesn't actually work, since we run into a similar problem with (guix hash) trying to dlopen libgcrypt. I applied your patch and ran the test, and I think I see what you mean. Somehow (I have to admit, I'm not sure how), the normal libgcrypt gets pulled in by the derivation, so we have to build it... Although I suppose it isn't ideal, maybe we can get away with working around it via similar parameterize tricks? If the intent of --bootstrap is to enable the tool to run quickly in tests, then it seems we MUST either find a way to substitute every heavy dependency (including libgcrypt) with a light replacement (e.g. the guile-sqlite3/mock you made), or find another way to short-circuit the build. Basically, we're manually doing dependency injection here depending on whether or not --bootstrap was given, right? Instead of parameterizing the dependencies, what if we used a dependency injector (or "oracle", or "container", or whatever you want to call it) that, when invoked, would give us the dependency that is appropriate for the current context? Perhaps we could control the context via a single parameter. For example, something like this: (parameterize ((test-environment? #t)) (injector-get-dependency guile)) would return the bootstrap guile, but something like this: (parameterize ((test-environment? #f)) (injector-get-dependency guile)) would return the usual guile. This isn't much different from using parameters like we're already doing, except that it might save us from having to remember multiple parameters, and it might make the code cleaner by hiding the dependency selection/construction logic behind the injector abstraction. What do you think of that idea? > I=E2=80=99m not sure how to best address it. Another approach would be t= o do > away with =E2=80=98--bootstrap=E2=80=99 and instead write those tests as = =E2=80=9Csystem tests=E2=80=9D > in a VM, though that=E2=80=99s maybe less satisfactory. If we ran these tests in a VM as "system tests" (instead of turning guile-sqlite3&co into a parameter), would we still need to build the world? =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAltO2i0ACgkQ3UCaFdgi Rp2guRAAwz4xVqKDOD1wLZ7ikSnrHEPd5sIPBKoCF8UuAy8i4pcBgr0CS2nEZWIF FztGu4CJxHzimornKeExAnuy3X56PYCVcEPncgOoqQM2tqGJzIIMomb+f6lXYuPx BVkfMODeZ7YzyVsDK8c4LlxhHpbNEP3/WTa5hNmqn8dKY48clKFyTFL6yUlrhbWl bsBgkNnivKcYOS4BlkhqhiBMKP/wlTURqe44mLoPE2tqnbpvA+RHBu2ubqUyM/0n Y5owDUWCLi+Fvl8BwKKs0l9sgXXKEmJABrY340ldmGTMObztsE+iQ5O1OBqQTkly xFBtF2k9CiZtKm+ZLUccByFwMnklXuqNckn5cfCHpKT88Y0i/AVTTi2i35zjrKDk GJUNld3faqUsIfw3NBTwihOFBfxKEhLTfQo0+9NvcprxCBxu3vGBDdplvCl0lrBz thlTGjn8V3VcV8trARilPtWlDntBDS1Qenq5hkPXnnEWeVpJlbbHVK5flhypWsp8 9qh6BwpMzPumzyp3CKoHJiOI+kiZoP5THeXn7skx0nYhPPdoC7iL9NufsByP1nD9 p0bNZ/AFHqlmc9+fm3q9byDKXF1Nfz0KD3v5zQcZEyrdHXJWQdS3PTBjLbtUzQgc lPlSL4ta0yAEeysjnSx3CLkAfEqAXwoRlaHRwKpkD/iNQXHrqPI= =ZaHH -----END PGP SIGNATURE----- --=-=-=--
bug-guix@HIDDEN
:bug#32184
; Package guix
.
Full text available.Received: (at submit) by debbugs.gnu.org; 17 Jul 2018 09:24:51 +0000 From debbugs-submit-bounces <at> debbugs.gnu.org Tue Jul 17 05:24:51 2018 Received: from localhost ([127.0.0.1]:44421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>) id 1ffMDz-0000qo-2E for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 05:24:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57250) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <ludo@HIDDEN>) id 1ffMDw-0000qW-Kr for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 05:24:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1ffMDq-0007gD-HW for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 05:24:43 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20 autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:55924) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1ffMDq-0007g2-Cd for submit <at> debbugs.gnu.org; Tue, 17 Jul 2018 05:24:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48210) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1ffMDo-0007Ly-Su for bug-guix@HIDDEN; Tue, 17 Jul 2018 05:24:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1ffMDo-0007em-09 for bug-guix@HIDDEN; Tue, 17 Jul 2018 05:24:40 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:34705) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <ludo@HIDDEN>) id 1ffMDj-0007c5-95; Tue, 17 Jul 2018 05:24:35 -0400 Received: from [193.50.110.117] (port=45494 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1ffMDi-0002hl-QV; Tue, 17 Jul 2018 05:24:35 -0400 From: ludo@HIDDEN (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: bug-guix@HIDDEN Subject: =?utf-8?Q?=E2=80=98guix?= pack =?utf-8?Q?--bootstrap=E2=80=99?= is ineffective X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 29 Messidor an 226 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Tue, 17 Jul 2018 11:24:32 +0200 Message-ID: <87k1pu9pv3.fsf@HIDDEN> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit Cc: Chris Marusich <cmmarusich@HIDDEN> X-BeenThere: debbugs-submit <at> debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: <debbugs-submit.debbugs.gnu.org> List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe> List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/> List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org> List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help> List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe> Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org> X-Spam-Score: -6.0 (------) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hello, While preparing the 0.15 release I realized that =E2=80=98guix pack --boots= trap=E2=80=99 had become ineffective. Concretely, =E2=80=98tests/guix-pack.sh=E2=80=99 w= ould attempt to build the world. This is a consequence of c45477d2a1a651485feede20fe0f3d15aec48b39, which introduced a dependency on guile-sqlite3 in derivations that build packs, even if they don=E2=80=99t actually produce a =E2=80=98db.sqlite=E2= =80=99 file in there. I started looking for solutions, which led me to the patch below. That=E2=80=99s quite intrusive and it doesn=E2=80=99t work because then we = have a similar issue with (guix hash) trying to dlopen libgcrypt. I=E2=80=99m not sure how to best address it. Another approach would be to = do away with =E2=80=98--bootstrap=E2=80=99 and instead write those tests as = =E2=80=9Csystem tests=E2=80=9D in a VM, though that=E2=80=99s maybe less satisfactory. Thoughts? Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 6d5d745bc..45eeb2e7b 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -98,8 +98,25 @@ found." (define guile-sqlite3&co ;; Guile-SQLite3 and its propagated inputs. - (cons guile-sqlite3 - (package-transitive-propagated-inputs guile-sqlite3))) + (make-parameter + (cons guile-sqlite3 + (package-transitive-propagated-inputs guile-sqlite3)))) + +(define guile-sqlite3/mock + ;; Mock of Guile-SQLite3 used by '--bootstrap', for testing purposes. + (computed-file "guile-sqlite3-mock" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + + (let ((modules (string-append + #$output "/share/guile/site/2.0"))) + (mkdir-p modules) + (call-with-output-file (string-append modules + "/sqlite3.scm") + (lambda (port) + (display "(define-module (sqlite3))\n" port)))))) + #:guile %bootstrap-guile)) (define* (self-contained-tarball name profile #:key target @@ -134,7 +151,7 @@ added to the pack." (guix build store-copy) (gnu build install)) #:select? not-config?)) - (with-extensions guile-sqlite3&co + (with-extensions (guile-sqlite3&co) #~(begin (use-modules (guix build utils) ((guix build union) #:select (relative-file-name)) @@ -267,7 +284,7 @@ added to the pack." (guix build store-copy) (gnu build install)) #:select? not-config?)) - (with-extensions guile-sqlite3&co + (with-extensions (guile-sqlite3&co) #~(begin (use-modules (guix build utils) (gnu build install) @@ -717,6 +734,9 @@ Create a bundle of PACKAGE.\n")) (set-build-options-from-command-line store opts) (parameterize ((%graft? (assoc-ref opts 'graft?)) + (guile-sqlite3&co (if (assoc-ref opts 'bootstrap?) + (list guile-sqlite3/mock) + (guile-sqlite3&co))) (%guile-for-build (package-derivation store (if (assoc-ref opts 'bootstrap?) --=-=-=--
ludo@HIDDEN (Ludovic Courtès)
:bug-guix@HIDDEN
.
Full text available.bug-guix@HIDDEN
:bug#32184
; Package guix
.
Full text available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997 nCipher Corporation Ltd,
1994-97 Ian Jackson.