From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: GuixSD bootable ISO-9669 image Date: Fri, 12 May 2017 01:30:19 +0200 Message-ID: <20170512013019.49c3d33d@scratchpost.org> References: <20170418141719.llp77itz7vyq5rij@abyayala> <87k26hwxt0.fsf@gmail.com> <8760i0m7vg.fsf@gnu.org> <87pog3u3ms.fsf@gmail.com> <87k26afl07.fsf_-_@gmail.com> <20170427190840.79bcaa76@scratchpost.org> <20170427220009.1d0d4607@scratchpost.org> <20170428101844.540ce399@scratchpost.org> <87efw7igen.fsf@gnu.org> <20170502220904.3f27ce9f@scratchpost.org> <871ss72cd2.fsf@gnu.org> <20170507213711.4eaec310@scratchpost.org> <87wp9rmo4d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35094) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d8xXR-0001i8-RQ for guix-devel@gnu.org; Thu, 11 May 2017 19:30:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d8xXM-0006Go-TP for guix-devel@gnu.org; Thu, 11 May 2017 19:30:29 -0400 In-Reply-To: <87wp9rmo4d.fsf@gnu.org> 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+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Ludovic =?ISO-8859-1?Q?Court=E8s?= Cc: guix-devel@gnu.org Hi Ludo, >I=E2=80=99d prefer to add a special =E2=80=98iso-9660-uuid=E2=80=99 form s= imilar to =E2=80=98uuid=E2=80=99 in (gnu system file-systems). > That way we could detect that we get a valid UUID at macro-expansion > time or system-instantiation time, rather than end up with an error at > boot time. Hmm, I've never seen that macro before. Should it be used in config.scm ? Right now config.scm could have: (file-systems (cons* (file-system (device "1234-5678-....") (title 'uuid) (mount-point "/") (type "ext4") (needed-for-boot? #t)) Which kind of UUID is it then? Should string->uuid try to be clever about = it? Or a new function string->uuid-like ? find-partition-by-uuid right now uses read-partition-uuid and then uses byt= evector=3D?. So all these forms should continue to be bytevectors. Then it would work f= ine without lots of changes. So something like this? - Add "string->uuid-like" and use it in canonical-title (instead of using "= string->uuid"). - string->uuid-like would have a case analysis by some weird markers, then = parse the uuid using the right parser into a bytevector with length typical= -for-this-filesystem-but-not-unique. - Modify uuid->string to have a case analysis by the bytevector length, the= n print the uuid using the right printer into a string typical-for-this-fil= esystem. This will fail to detect ISO9660 correctly because these are the = same length as real uuids (Linux uses 16 bytes of the 17-byte iso9660-uuid) - Leave the uuid macro as-is since it should already do the right thing the= n? - Add a new macro fat32-uuid, and a new macro iso9660-uuid. String lengths: - FAT32 UUID-string: 3 Byte to 9 Byte (variable-length numerals. Is that a= ctually how Linux writes them? I misplaced my USB stick... where is it? *m= umbles*) - ISO9660 UUID-string: 16 Byte (fixed-length numerals). That's the same le= ngth as the ISO9660 bytevector since it's actually the same content - Real UUID-string: 36 Byte Bytevector lengths (right now): - FAT32 UUID: 4 Byte - ISO9660 UUID: 16 Byte (oops...) - Real UUID: 16 Byte