patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob ec51eb12d33030255b7b4a7e74e14416f1f0659d 933 bytes (raw)
name: release/update.nix 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
# SPDX-License-Identifier: MIT
# SPDX-FileCopyrightText: 2021-2024 Alyssa Ross <hi@alyssa.is>
# SPDX-FileCopyrightText: 2025 Demi Marie Obenour <demiobenour@gmail.com>

import ../lib/call-package.nix (
{ callSpectrumPackage, config, efi
, runCommand, stdenv, rootfs
}:

runCommand "spectrum-update-directory" {
  __structuredAttrs = true;
  unsafeDiscardReferences = { out = true; };
  dontFixup = true;
  env = {
    VERSION = config.version;
    ROOTHASH = "${rootfs}/rootfs.verity.roothash";
    VERITY = "${rootfs}/rootfs.verity.superblock";
    ROOT_FS = "${rootfs}/rootfs";
    EFI = efi;
  };
} ''
  read -r roothash < "$ROOTHASH"
  mkdir -- "$out"
  cp -- "$VERITY" "$out/Spectrum_$VERSION.verity"
  cp -- "$ROOT_FS" "$out/Spectrum_$VERSION.root"
  cp -- "$EFI" "$out/Spectrum_$VERSION.efi"
  cd -- "$out"
  sha256sum -b "Spectrum_$VERSION.root" "Spectrum_$VERSION.verity" "Spectrum_$VERSION.efi" > SHA256SUMS
  ''
) (_: {})

debug log:

solving ec51eb12d33030255b7b4a7e74e14416f1f0659d ...
found ec51eb12d33030255b7b4a7e74e14416f1f0659d in https://inbox.spectrum-os.org/spectrum-devel/20251112-updates-v2-5-88d96bf81b79@gmail.com/

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20251112-updates-v2-5-88d96bf81b79@gmail.com/
diff --git a/release/update.nix b/release/update.nix
new file mode 100644
index 0000000000000000000000000000000000000000..ec51eb12d33030255b7b4a7e74e14416f1f0659d

Checking patch release/update.nix...
Applied patch release/update.nix cleanly.

index at:
100644 ec51eb12d33030255b7b4a7e74e14416f1f0659d	release/update.nix

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/crosvm
	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/nixpkgs
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock
	https://spectrum-os.org/git/www

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 NNTP newsgroup(s).