Merge pull request #74174 from raboof/fix-74047-stable-gpt-disk-guid
make-iso9660-image: produce stable GPT disk GUID
This commit is contained in:
commit
830a8d6ee1
2 changed files with 7 additions and 11 deletions
|
@ -1,4 +1,4 @@
|
||||||
{ stdenv, closureInfo, xorriso, syslinux
|
{ stdenv, closureInfo, xorriso, syslinux, libossp_uuid
|
||||||
|
|
||||||
, # The file name of the resulting ISO image.
|
, # The file name of the resulting ISO image.
|
||||||
isoName ? "cd.iso"
|
isoName ? "cd.iso"
|
||||||
|
@ -48,7 +48,7 @@ assert usbBootable -> isohybridMbrImage != "";
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = isoName;
|
name = isoName;
|
||||||
builder = ./make-iso9660-image.sh;
|
builder = ./make-iso9660-image.sh;
|
||||||
buildInputs = [ xorriso syslinux zstd ];
|
buildInputs = [ xorriso syslinux zstd libossp_uuid ];
|
||||||
|
|
||||||
inherit isoName bootable bootImage compressImage volumeID efiBootImage efiBootable isohybridMbrImage usbBootable;
|
inherit isoName bootable bootImage compressImage volumeID efiBootImage efiBootable isohybridMbrImage usbBootable;
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,12 @@ done
|
||||||
|
|
||||||
mkdir -p $out/iso
|
mkdir -p $out/iso
|
||||||
|
|
||||||
|
# daed2280-b91e-42c0-aed6-82c825ca41f3 is an arbitrary namespace, to prevent
|
||||||
|
# independent applications from generating the same UUID for the same value.
|
||||||
|
# (the chance of that being problematic seem pretty slim here, but that's how
|
||||||
|
# version-5 UUID's work)
|
||||||
xorriso="xorriso
|
xorriso="xorriso
|
||||||
|
-boot_image any gpt_disk_guid=$(uuid -v 5 daed2280-b91e-42c0-aed6-82c825ca41f3 $out | tr -d -)
|
||||||
-as mkisofs
|
-as mkisofs
|
||||||
-iso-level 3
|
-iso-level 3
|
||||||
-volid ${volumeID}
|
-volid ${volumeID}
|
||||||
|
@ -118,15 +123,6 @@ xorriso="xorriso
|
||||||
|
|
||||||
$xorriso -output $out/iso/$isoName
|
$xorriso -output $out/iso/$isoName
|
||||||
|
|
||||||
if test -n "$usbBootable"; then
|
|
||||||
echo "Making image hybrid..."
|
|
||||||
if test -n "$efiBootable"; then
|
|
||||||
isohybrid --uefi $out/iso/$isoName
|
|
||||||
else
|
|
||||||
isohybrid $out/iso/$isoName
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test -n "$compressImage"; then
|
if test -n "$compressImage"; then
|
||||||
echo "Compressing image..."
|
echo "Compressing image..."
|
||||||
zstd -T$NIX_BUILD_CORES --rm $out/iso/$isoName
|
zstd -T$NIX_BUILD_CORES --rm $out/iso/$isoName
|
||||||
|
|
Loading…
Reference in a new issue