From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Bakke Subject: bug#28445: match-error in 'device-sexp->device' while building system Date: Wed, 13 Sep 2017 17:37:50 +0200 Message-ID: <871snafw35.fsf@fastmail.com> References: <87y3pid5jw.fsf@netris.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ds9jt-0002aR-Kw for bug-guix@gnu.org; Wed, 13 Sep 2017 11:38:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ds9jo-0000v0-N1 for bug-guix@gnu.org; Wed, 13 Sep 2017 11:38:09 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:58070) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ds9jo-0000ui-Ae for bug-guix@gnu.org; Wed, 13 Sep 2017 11:38:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ds9jm-0000H0-1v for bug-guix@gnu.org; Wed, 13 Sep 2017 11:38:04 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87y3pid5jw.fsf@netris.org> List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Mark H Weaver , 28445@debbugs.gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mark H Weaver writes: > I just started getting this error while trying to build my x86_64 GuixSD > system: > > --8<---------------cut here---------------start------------->8--- > mhw@jojen ~$ guix system build -K /etc/config-new.scm > Backtrace: > 14 (primitive-load "/home/mhw/guix/scripts/guix") > In guix/ui.scm: > 1331:12 13 (run-guix-command _ . _) > In ice-9/boot-9.scm: > 837:9 12 (catch _ _ # =E2=80=A6) > 837:9 11 (catch _ _ # =E2=80=A6) > In guix/scripts/system.scm: > 1025:8 10 (_) > 908:6 9 (process-action _ _ _) > In guix/store.scm: > 1443:24 8 (run-with-store _ _ #:guile-for-build _ #:system _ # _) > In guix/scripts/system.scm: > 661:31 7 (_ _) > In srfi/srfi-1.scm: > 705:23 6 (filter-map #boot-parameters (sys=E2=80= =A6> . #) > In ice-9/boot-9.scm: > 837:9 5 (catch system-error # =E2=80=A6) > In guix/scripts/system.scm: > 385:30 4 (_) > In gnu/system.scm: > 307:17 3 (read-boot-parameters-file "/var/guix/profiles/system-9=E2= =80=A6") > In ice-9/ports.scm: > 444:17 2 (call-with-input-file _ _ #:binary _ #:encoding _ # _) > In gnu/system.scm: > 282:10 1 (read-boot-parameters _) > 238:4 0 (device-sexp->device _) > > gnu/system.scm:238:4: In procedure device-sexp->device: > gnu/system.scm:238:4: Throw to key `match-error' with args `("match" "no = matching pattern" #f)'. > --8<---------------cut here---------------end--------------->8--- [...] > ;; Specify a mapped device for the encrypted root partition. > ;; The UUID is that returned by 'cryptsetup luksUUID'. > (mapped-devices > (list (mapped-device > (source (uuid "a56c53e7-b345-4e24-a17b-6cf158dbc7d3")) > (target "jojen-root") > (type luks-device-mapping)))) > > (file-systems (cons* (file-system > ;; XXX This doesn't seem to work > ;; (device "jojen-root") > ;; (title 'label) > (device "/dev/mapper/jojen-root") > (title 'device) > (mount-point "/") > (type "btrfs") > (dependencies mapped-devices)) > %base-file-systems)) I have an identical setup, and the problem is that the parameters file contains "(store (device #f))". You can confirm this by `cat /var/guix/profiles/system-9-link/parameters`. This patch fixes the parameters generation, but you have to move away the profile symlinks that contains the broken parameters file before you can use `guix system` again). --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-system-Recognize-device-titles-when-creating-boot-pa.patch Content-Transfer-Encoding: quoted-printable From=205ca849b84c02f5d213b40c654f1449e19adb5471 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Tue, 12 Sep 2017 21:03:36 +0200 Subject: [PATCH] system: Recognize device titles when creating boot parameters. This solves a problem where the store device would be #f in profile parameters when not using uuid or labels. * gnu/system.scm (fs->boot-device): Add case for when FILE-SYSTEM-TITLE is a "device". =2D-- gnu/system.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/system.scm b/gnu/system.scm index c4404f593..767fc0784 100644 =2D-- a/gnu/system.scm +++ b/gnu/system.scm @@ -902,6 +902,7 @@ device in a ." (case (file-system-title fs) ((uuid) (file-system-device fs)) ((label) (file-system-device fs)) + ((device) (file-system-device fs)) (else #f))) =20 (define (operating-system-boot-parameters os system.drv root-device) =2D-=20 2.14.1 --=-=-= Content-Type: text/plain I wasn't sure if this solution is correct in the general case, as I also get a warning from GRUB "/dev/mapper/foo-root is not a valid boot device", but that is probably another issue. --=-=-=-- --==-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlm5UM4ACgkQoqBt8qM6 VPp1iQgAkB2vs04LeFdJK/xsqTZBHYXrPu5foK/we/Tyq+2kuHalc860Xf0uezR/ 9FRSDzLXFhL1a8TJi4lO0fl6EadjuTNJcNStZlXRUYO4OLQVPJpv2Ow7mtacodJ8 LIxqWENvQzjtGlF0WHvNIsCGHNZbe6Wuc8WqdscJJfgHMzhYjdpCJ3IgxzvSKFiw kUbSUXQFSkU+MMOFuJTaLuTLEhHmlGtRIHMe10Y5SXM9M54uBliNDrheF5v2YI4P 1OVu1AFKny/Pj7VvjcpXGhCN3REuPxPboAzSmBqWIyzGnCltRQXfXnq9+M05AVSk ZZ6hbNZOzTSqFxVCSp0kzvPkuNBI0w== =dhWw -----END PGP SIGNATURE----- --==-=-=--