From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tobias Geerinckx-Rice Subject: bug#27735: Unbootable images with GuixSD on... "GuixSD" Date: Tue, 18 Jul 2017 17:09:08 +0200 Message-ID: <9b7cffa7-96a4-a799-c207-854bbcc7df04@tobias.gr> References: <327af9f3-fdfb-7916-f0ea-9aec0fae20f3@tobias.gr> <20170717191731.2d3ad604@scratchpost.org> <87bmoi0xua.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="rDLhNsset0PCCRPlGhGqmaXor9OmU6Hji" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47418) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dXU6Z-0005oH-1e for bug-guix@gnu.org; Tue, 18 Jul 2017 11:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dXU6V-0000Ef-MS for bug-guix@gnu.org; Tue, 18 Jul 2017 11:08:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:44096) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dXU6V-0000EW-I0 for bug-guix@gnu.org; Tue, 18 Jul 2017 11:08:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dXU6V-0006c1-D7 for bug-guix@gnu.org; Tue, 18 Jul 2017 11:08:03 -0400 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87bmoi0xua.fsf@gnu.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: ludo@gnu.org, dannym@scratchpost.org Cc: 27735@debbugs.gnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --rDLhNsset0PCCRPlGhGqmaXor9OmU6Hji Content-Type: multipart/mixed; boundary="FPVCdikmf3d20qmi4fb260e4IHUg5SHAn"; protected-headers="v1" From: Tobias Geerinckx-Rice To: ludo@gnu.org, dannym@scratchpost.org Cc: 27735@debbugs.gnu.org Message-ID: <9b7cffa7-96a4-a799-c207-854bbcc7df04@tobias.gr> Subject: Re: bug#27735: Unbootable images with GuixSD on... "GuixSD" References: <327af9f3-fdfb-7916-f0ea-9aec0fae20f3@tobias.gr> <20170717191731.2d3ad604@scratchpost.org> <87bmoi0xua.fsf@gnu.org> In-Reply-To: <87bmoi0xua.fsf@gnu.org> --FPVCdikmf3d20qmi4fb260e4IHUg5SHAn Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Ludo', On 18/07/17 13:49, Ludovic Court=C3=A8s 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 fashi= on. > + (if (string=3D? "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) 6= 0))))) > + (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 =E2=80=98--image-size=E2=80=99 (the default nowaday= s), 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=E2=80=99s hash, unfortunately, becaus= e the > UUID has to be given on the =E2=80=9Chost side.=E2=80=9D That is unfortunate, but a best-effort heuristic will do. Kind regards, T G-R --FPVCdikmf3d20qmi4fb260e4IHUg5SHAn-- --rDLhNsset0PCCRPlGhGqmaXor9OmU6Hji Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- iQFBBAEBCgArFiEEeqzfDJ8DWw5d4xcqkczbm0hUG5kFAlluJJQNHG1lQHRvYmlh cy5ncgAKCRCRzNubSFQbmfG3CACfCji9bICDRuEYF8m2FZ2LyLuboWK3CIeubA9h SAeTY8bgXAmwMqlnDS3AXj9uM3fMX4FWIlYdF8RuMm/sHve7t9BtxRI190YCWXWv ZITMQB5oxzC8yIwOzIalJUCzGEwcALgVSo4Uj/mTYOnBUUSpQnMRdUBCMkRiV1At dDC8Gw5opm6iQmlOl/UoQOf///PfSXaGrKS6UEDQHSqR+zwSucPf0iOMCteEP7Hy yFh1xvywnhJIWVzt4WQhpCS6krNlFsHhoEBKzKa84kUYsjPGgSngwKTpKOZA8RHm ktzRwnjZaF9nGlbURG8u6zwnSA5yS/8wnYzdo0T2mBo/n40o =+Imj -----END PGP SIGNATURE----- --rDLhNsset0PCCRPlGhGqmaXor9OmU6Hji--