From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id 81FC5B6F9; Wed, 26 Nov 2025 19:41:46 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id A2AE4B6E9; Wed, 26 Nov 2025 19:41:44 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-yx1-xb131.google.com (mail-yx1-xb131.google.com [IPv6:2607:f8b0:4864:20::b131]) by atuin.qyliss.net (Postfix) with ESMTPS id EB21BB739 for ; Wed, 26 Nov 2025 19:41:43 +0000 (UTC) Received: by mail-yx1-xb131.google.com with SMTP id 956f58d0204a3-63f996d4e1aso178944d50.0 for ; Wed, 26 Nov 2025 11:41:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764186102; x=1764790902; darn=spectrum-os.org; h=cc:to:references:in-reply-to:content-transfer-encoding:mime-version :message-id:date:subject:from:from:to:cc:subject:date:message-id :reply-to; bh=yBXM8sLCCCB78lRcIChnPwveJHW8PwH/aFbAWQ8A9NI=; b=O0Tx2epLMslJXlWy8c01kSWToZBxaqlsCq1t8THY/lQo5nr6ZmUDCJjvdPBLoL6qs9 MeoV3dcUbEgWTXtf6jK2LgMLBRE7Pd4r01YXQLtiFpIgsoMT8PazskXSakEeuK/7avOX KLFbWy+Ylh8i8NojDfAsyisPA+Sj2L3ZDOO9JlojbKg+CwVaENSgOWsYFnMcSK/5SWeF yrk4dULXEMeMOQ1NJEQgX2mnkL5/5jnD476GmsvFhb9QNuqWMPloArpijThmwVeXvSch FAnrmq0n0ufl6DaTbSy7sItWcCjWD4LVXZJHRe6cl9Wg2bvHz8UpY6UAq60ffR5rwP4l ZGtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764186102; x=1764790902; h=cc:to:references:in-reply-to:content-transfer-encoding:mime-version :message-id:date:subject:from:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yBXM8sLCCCB78lRcIChnPwveJHW8PwH/aFbAWQ8A9NI=; b=f0uAQkKa7GecJkiPrh3gARX6zJPLAQi2sFlF0+mmF/w58ffOPMYgwMBSl/PMIl4c61 XDe9S7YDCkPBU0D3noPnnLofDyvKMtLnZRraZAEDBN1yA58YI812iHtg9vGfmmDqjAM3 yUH4mkZh+CojKGjtMgRiF1J8JiRfKsc6Cf1XP0BqJRWl8LRtKFLeJqCMw+iDF34zjfnx tOAE5Y0wq8OLnK6IvHP05ry0sZTW6A8pSL8fr1qm1g3EeL4TrD3m3aQ+aSQbJZqGOL9N 1Eda75WeYclrtMVEdopzo4WHobrf4Dd/xooIsdzMHU+WpbFuyE2emgBYLbDvMUXf26KA N99w== X-Gm-Message-State: AOJu0Yws3JiVzZt7lzFAHmSlu4mPpYERWyvTbUgf4JgKU+EjQWOx0AQM b7gtNFxs/+wPZPPWTnMekasZ/s5qjZjpzL02N8tBYXpo3JHzVWHQEs/m2wGnJA== X-Gm-Gg: ASbGnctZq/isMugKkZeRWX/MexUqFf3jHc+9NlR/Kub6Yc8SsJpw/cMvnYQjyGBaxSd HSExc2CIsiiO5e4jTHdqs0me3U9tNfAFXc+sT38TWKXB09sY5CdGE10M972E/5cK+5UKi3aU++g FAoxE+ocmyaEuUq808ha7BId3eiX8+oZw6+Yuo6o8J0H6u1mVWSmu1MuzRh7QHC2m5/MW3hfKQE L2MYukcJzp7Rw8g0YJZVFiNSerkFTsUbAMnzbLfBtrqT/7ReL5eHqa+A5WPs0sza+lho4oeHm+t IH6V6L7FZ6fzjfrvarhY/H8UTyOyoIm7D68n5D3CLqqMzF57/6gHMRj+v7ctHdgIuBc+/2owQ8V p/70TzTKE74jPIxU9ko9neObLUhS3bvQ1KWqEPvh5lJPf36RF1J1NLhCzz7+rvI/nVqQMGVrdj3 aIGFpx5a+qc7uwTL0iwjAzVB5EKGJ7vjkjnSqkkFif+4eV1mQAhTEAsjCE8gokMKF7On405ZNUX HVbcCa+tTTCc6kWWZCtRBlrFBZGQxXVYX0= X-Google-Smtp-Source: AGHT+IEfOeZD1V9Q6whtDMohF7mkIIPmRPhAGM6oTVrJJqZGsxNAyZ3UmMjFdcGUeznpuzWoSQUNUw== X-Received: by 2002:a05:690e:2519:10b0:642:836:f27 with SMTP id 956f58d0204a3-64302ac0275mr12637504d50.44.1764186101508; Wed, 26 Nov 2025 11:41:41 -0800 (PST) Received: from localhost.localdomain (h96-60-249-169.cncrtn.broadband.dynamic.tds.net. [96.60.249.169]) by smtp.gmail.com with UTF8SMTPSA id 956f58d0204a3-642f718b7c3sm7589390d50.19.2025.11.26.11.41.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 11:41:40 -0800 (PST) From: Demi Marie Obenour Subject: [PATCH v5 00/13] System updates based on systemd-sysupdate Date: Wed, 26 Nov 2025 14:40:40 -0500 Message-Id: <20251126-updates-v5-0-fd746748febd@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIALhXJ2kC/13Q3W7CMAwF4FdBuV6n2HWamKu9x7SL/DgQaVDWl moT4t0XigQVl47yHcvnokYZioxqu7moQeYylv5YB/O2UXHvjztpSqqzQo1GM7rmfEp+krFhFGZ HLNiCqr9Pg+TyuyR9ftV5X8apH/6W4Blur0sGaORHxgyNbkhDhCDoAcLH7uDL93vsD+qWMePTA eDTYXXOJe5CdhAsv7p27Vb72uqCc56ZwdR7Xh2tHMLTUXWJTAeR0NpO1u56P36Qn3Ntb7o3oE5 +ivva3XYTKIJNWlOXtRC0IRorPls2OebOODSuZXJ6KfGhtPPGgEWmhCFa6ioz9bOWRBRzmzBmc UnX/dd/SSuDkcUBAAA= X-Change-ID: 20250928-updates-92e99849e231 In-Reply-To: <20251121-updates-v4-0-d4561c42776e@gmail.com> References: <20251121-updates-v4-0-d4561c42776e@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1764186040; l=6402; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=cUIFAL3FbbxAnLVxnVQA28vaaj3pYIVU2qXqMqjPYDw=; b=AYixlsrgRNmCyeWkA+c3l9QFxHDFBJ1atSW1yU9AeMQ6o/PEwHXE0DQjLx7axbdXJUWyHsjrv CIur1j75TjbDCz/fljRr0a+kCKt7Vs+jWchhn27wsMndGOEQuzTJk/O X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: Q2A3IQNTWESCBWFSN2WEPZYUHQL3U5WM X-Message-ID-Hash: Q2A3IQNTWESCBWFSN2WEPZYUHQL3U5WM X-MailFrom: demiobenour@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Demi Marie Obenour , Alyssa Ross X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This implements updates via systemd-sysupdate. See individual commit messages for details. This depends on "Move verity and EFI creation to separate Nix derivations", at . Signed-off-by: Demi Marie Obenour --- Changes in v5: - Fix broken shell.nix files in intermediate patches. - See individual patches messages for more details. - Link to v4: https://spectrum-os.org/lists/archives/spectrum-devel/20251121-updates-v4-0-d4561c42776e@gmail.com Changes in v4: - Fix build errors in intermediate patches. - Apply suggestions from code review. - Link to v3: https://spectrum-os.org/lists/archives/spectrum-devel/20251119-updates-v3-0-b88a99915509@gmail.com Changes in v3: - See individual commits for details. There are too many to mention here. - Link to v2: https://spectrum-os.org/lists/archives/spectrum-devel/20251112-updates-v2-0-88d96bf81b79@gmail.com Changes in v2: - updates-dir-check: - Do not check that there is a SHA256SUMS or SHA256SUMS.gpg file in the update directory. systemd-sysupdate will fail if it cannot find a manifest or its signature. - Follow symlinks in opening the directory. The path is from a trusted source and will always point to a BTRFS snapshot, never a symlink. The only exception is the last component, which is still checked to not be a symlink. - VM: - Link SHA256SUMS.sha256.asc to SHA256SUMS.gpg. Recent systemd-sysupdate seems to use the former name. - Get update URL from host. - Use an execline script instead of a shell script. - Update script: - Unmount shared directory if already mounted. This avoids errors when mounting it again. - Delete old snapshot if present. - Provide the VM information with a different directory layout. - Do not bind-mount the information passed into the VM into the shared VM folder. Instead rely on this folder being read-only to the guest. This is enforced by a read-only bind mount in virtiofs's mount namespace. - Testing: - Lots of manual update testing. - Disable the test for the live image as it doesn't work anymore. - Nix: - Move validation to a separate low-priority patch. - Documentation: - Document that updating the system is now possible. - Installer: - Remove the "Try Spectrum" button. - Link to v1: https://spectrum-os.org/lists/archives/spectrum-devel/20251029-updates-v1-0-401c1be2a11b@gmail.com --- Demi Marie Obenour (13): tools: Add directory checker for updates scripts: port make-gpt.sh to bash scripts/make-gpt.sh: Allow specifying partition size Port scripts/format-uuid.sh to awk Use set and a command substitution to set UUID variables scripts: Use shell expansion to get partition path release: Compress installation images and remove live image Use OS version to set partition labels and UKI name Add B partitions to installation images release: Create directory with system update Support updates via systemd-sysupdate Documentation: Update support Validate configuration parameters Documentation/development/build-configuration.adoc | 15 +++ Documentation/development/index.adoc | 2 + Documentation/development/updates.adoc | 42 +++++++ Documentation/development/uuid-reference.adoc | 8 ++ Documentation/installation/getting-spectrum.adoc | 44 ++++--- Documentation/installation/index.adoc | 6 +- host/initramfs/Makefile | 18 +-- host/initramfs/etc/probe | 20 --- host/initramfs/shell.nix | 2 + host/rootfs/Makefile | 27 ++++- host/rootfs/default.nix | 21 +++- host/rootfs/file-list.mk | 7 ++ host/rootfs/image/etc/fstab | 1 + .../image/etc/sysupdate.d/50-verity.transfer | 20 +++ host/rootfs/image/etc/sysupdate.d/60-root.transfer | 20 +++ .../image/etc/sysupdate.d/70-kernel.transfer | 20 +++ .../image/etc/vm-sysupdate.d/50-verity.transfer | 18 +++ .../image/etc/vm-sysupdate.d/60-root.transfer | 18 +++ .../image/etc/vm-sysupdate.d/70-kernel.transfer | 18 +++ host/rootfs/image/usr/bin/spectrum-update | 92 ++++++++++++++ host/rootfs/os-release.in | 15 +++ host/rootfs/shell.nix | 2 + img/app/Makefile | 2 +- lib/config.default.nix | 3 + lib/config.nix | 27 ++++- lib/fake-update-signing-key.gpg | 3 + release.nix | 2 + release/checks/integration/meson.build | 2 +- release/checks/integration/try.c | 29 ----- release/combined/eosimages.nix | 8 +- release/combined/grub.cfg.in | 5 - release/live/Makefile | 17 ++- release/live/default.nix | 5 +- release/live/shell.nix | 3 +- release/update.nix | 33 +++++ scripts/format-uuid.awk | 19 +++ scripts/format-uuid.sh | 19 --- scripts/make-gpt.sh | 30 ++--- tools/default.nix | 1 + tools/meson.build | 4 + tools/updates-dir-check.c | 134 +++++++++++++++++++++ vm/app/systemd-sysupdate/default.nix | 26 ++++ vm/app/systemd-sysupdate/download-update | 68 +++++++++++ vm/sys/net/Makefile | 2 +- 44 files changed, 733 insertions(+), 145 deletions(-) --- base-commit: 64131d7c2c0e5af7ee3a8ee45f3003ba7b71a771 change-id: 20250928-updates-92e99849e231 prerequisite-patch-id: b4c17d0046f0e413bc57eaf795fcf65825839480 prerequisite-patch-id: 08a5517294d2bc746bc555820ed44cf3d2cfe8d0 -- Sincerely, Demi Marie Obenour (she/her/hers)