all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: GuixSD bootable ISO-9669 image
Date: Fri, 12 May 2017 01:30:19 +0200	[thread overview]
Message-ID: <20170512013019.49c3d33d@scratchpost.org> (raw)
In-Reply-To: <87wp9rmo4d.fsf@gnu.org>

Hi Ludo,

>I’d prefer to add a special ‘iso-9660-uuid’ form similar to ‘uuid’ 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 bytevector=?.

So all these forms should continue to be bytevectors.  Then it would work fine 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, then print the uuid using the right printer into a string typical-for-this-filesystem.  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 then?
- 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 actually how Linux writes them?  I misplaced my USB stick... where is it? *mumbles*)
- ISO9660 UUID-string: 16 Byte (fixed-length numerals).  That's the same length 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

  reply	other threads:[~2017-05-11 23:30 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-18 14:17 GuixSD on servers [Fwd: [rtracker.1984.is #131647] A question about VServer system specific requirements] ng0
2017-04-18 15:16 ` Chris Marusich
2017-04-19 20:59   ` Ludovic Courtès
2017-04-23  4:52     ` Chris Marusich
2017-04-24  5:11       ` GuixSD bootable ISO-9669 image (was: Re: GuixSD on servers [Fwd: [rtracker.1984.is #131647] A question about VServer system specific requirements]) Chris Marusich
2017-04-27 13:42         ` GuixSD bootable ISO-9669 image Ludovic Courtès
2017-04-27 17:08         ` GuixSD bootable ISO-9669 image (was: Re: GuixSD on servers [Fwd: [rtracker.1984.is #131647] A question about VServer system specific requirements]) Danny Milosavljevic
2017-04-27 20:00           ` Danny Milosavljevic
2017-04-28  8:18             ` Danny Milosavljevic
2017-05-02 12:37               ` GuixSD bootable ISO-9669 image Ludovic Courtès
2017-05-02 12:53                 ` ng0
2017-05-03  6:26                   ` Mark H Weaver
2017-05-02 20:09                 ` Danny Milosavljevic
2017-05-02 21:11                   ` Ludovic Courtès
2017-05-07 19:37                     ` Danny Milosavljevic
2017-05-08 14:14                       ` Ludovic Courtès
2017-05-11 23:30                         ` Danny Milosavljevic [this message]
2017-05-12 15:33                           ` Ludovic Courtès
2017-05-14 21:25                             ` Danny Milosavljevic
2017-05-16  8:31                               ` Ludovic Courtès
2017-06-06  9:35                                 ` Danny Milosavljevic
2017-06-08 12:25                                   ` Ludovic Courtès
2017-05-02 20:12                 ` Danny Milosavljevic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170512013019.49c3d33d@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.