unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Tobias Geerinckx-Rice <me@tobias.gr>
To: ludo@gnu.org, dannym@scratchpost.org
Cc: 27735@debbugs.gnu.org
Subject: bug#27735: Unbootable images with GuixSD on... "GuixSD"
Date: Tue, 18 Jul 2017 17:09:08 +0200	[thread overview]
Message-ID: <9b7cffa7-96a4-a799-c207-854bbcc7df04@tobias.gr> (raw)
In-Reply-To: <87bmoi0xua.fsf@gnu.org>


[-- Attachment #1.1: Type: text/plain, Size: 1483 bytes --]

Ludo',

On 18/07/17 13:49, Ludovic Courtès wrote:
> What about generating a UUID in a deterministic yet somewhat unique
> fashion along these lines (untested):

Not great, but I can't think of a better way. :-)

> +  (define root-uuid
> +    ;; UUID of the root file system, computed in a deterministic fashion.
> +    (if (string=? "iso9660" file-system-type)
> +        (let ((pad (compose (cut string-pad <> 2 #\0)
> +                            number->string)))
> +          (string->iso9660-uuid
> +           (string-append "1970-01-01-"
> +                          (pad (hash name 24))
> +                          (pad (hash file-system-type 60))
> +                          (pad (hash (operating-system-host-name os) 60)))))
> +        (uint-list->bytevector
> +         (list (hash (string-append file-system-type name)
> +                     (expt 2 64))
> +               (hash (operating-system-host-name os)
> +                     (expt 2 64)))
> +         (endianness little)
> +         8)))
> +

Why not throw SIZE into this mix as well?

When building without ‘--image-size’ (the default nowadays), it's a
function of the exact size of the entire graph and reasonably sensitive
to most kinds of input changes.

> We cannot use the store file name’s hash, unfortunately, because the
> UUID has to be given on the “host side.”

That is unfortunate, but a best-effort heuristic will do.

Kind regards,

T G-R


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 504 bytes --]

  reply	other threads:[~2017-07-18 15:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-17 14:40 bug#27735: Unbootable images with GuixSD on... "GuixSD" Tobias Geerinckx-Rice
2017-07-17 14:51 ` bug#27735: [PATCH 1/2] build, vm: Use a slightly less generic label Tobias Geerinckx-Rice
2017-07-17 17:20   ` Danny Milosavljevic
2017-07-17 17:58     ` Tobias Geerinckx-Rice
2017-07-18 10:09     ` Ludovic Courtès
2017-07-18 12:30       ` Tobias Geerinckx-Rice
2017-07-18 13:48         ` Danny Milosavljevic
2017-07-17 17:17 ` bug#27735: Unbootable images with GuixSD on... "GuixSD" Danny Milosavljevic
2017-07-17 18:12   ` Tobias Geerinckx-Rice
2017-07-17 18:37     ` Tobias Geerinckx-Rice
2017-07-18 11:49   ` Ludovic Courtès
2017-07-18 15:09     ` Tobias Geerinckx-Rice [this message]
2017-07-18 18:59       ` Ludovic Courtès
2017-07-18 20:42         ` Tobias Geerinckx-Rice
2017-07-19 19:11     ` Danny Milosavljevic
2017-07-19 22:32       ` bug#27735: Lookup by UUID Ludovic Courtès
2017-07-20 17:38         ` Danny Milosavljevic
2017-07-20 20:32           ` Ludovic Courtès
2017-07-20 21:51             ` Danny Milosavljevic
2017-08-05 17:50             ` 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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=9b7cffa7-96a4-a799-c207-854bbcc7df04@tobias.gr \
    --to=me@tobias.gr \
    --cc=27735@debbugs.gnu.org \
    --cc=dannym@scratchpost.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).