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 465C5CCDD; Sat, 22 Nov 2025 01:27:39 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 176AFCC50; Sat, 22 Nov 2025 01:27:34 +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-xb12e.google.com (mail-yx1-xb12e.google.com [IPv6:2607:f8b0:4864:20::b12e]) by atuin.qyliss.net (Postfix) with ESMTPS id 4CEB1CC49 for ; Sat, 22 Nov 2025 01:27:33 +0000 (UTC) Received: by mail-yx1-xb12e.google.com with SMTP id 956f58d0204a3-63f9beb2730so2091089d50.0 for ; Fri, 21 Nov 2025 17:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763774851; x=1764379651; darn=spectrum-os.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=rh9El682kopXm2GCMrnMXfGcQVQNQ1Lv1iIKq59Qa/4=; b=ZuBvQRzXG7nBam1n7e/NhJ0aLBsViCNgAQVzQ7gOpV0iA1JPsptcJkHHJZCqxzOnm6 fVp9UDQTsvWWSONSG4qgSEfnDTJGl2/dhBgv8jswgontozfOM5s1u2w1vGrZtdHb7xEU xN2jdsvwAPo4HJZp4B1PHKIn8mirttkOle0GEc9h6WqSrGN3nw0HbLPQ3gomgfNThFDP O3DPjrCXQn4xSHYfegdHIQ7x1CJFs2yZd5ntSsnzBSpjTs6w8DzDiMGg+isfPUStLb8A AOwydtYmS5j5o4XrhCi7YYxsQa4fH0KFhdtubCs2c+NUK4KAWuce6EJ1xICSso9hTLPz FHsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763774851; x=1764379651; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=rh9El682kopXm2GCMrnMXfGcQVQNQ1Lv1iIKq59Qa/4=; b=aMLvAANhUbxnT2mLHDc34+lze3gFRgrgAxyj2PAf28U+MfucRPiIT5tDpgwB8j2kTg enAG4rWd2WjW2DNH7/eBKrMS9BXyhqCsKv7fgxqQhrHW6SwBZ8nsr9+ZuryM7HLEzduv zs19JwA1mtau4ttO3uScgb1Y0aMEnzlzIu1FZmVMtKOL6dcscxKeSzt57ZLS3ZghHJ/S nzH60FeSvUnOJzPQL5xM9DrWYNmdxijF7eQXuu/yT8h1Nx5B5R2P8O2liiwleJ1I6GKm bALGShBUbZIVPXSYlLmW/Pjd0toiztVxUUATxaR4ckELl1S1qzIwUZF3NL/Xs2hEbu5T eQXw== X-Gm-Message-State: AOJu0YzsTHr3fEEk9xr4VWbYkVNbIpalddpG+zQvOX2UGJpTrNVJwS22 56m8vTm7gH8fKGAmzs+OCurkMJ0c5hsW8lRcKGfU69CTN9vxD8aQmP+GX+N26g== X-Gm-Gg: ASbGncu1yJd60eXnu6yheFTjIXZQVHBKHBQQpLj52Y3hRF0kiFaWK5IUkruTnWo/x4d vRHQkGep+gcistiAKYft1hmT5cqHgQ5QDjJEYpD4IzC9iWPteJgHheVKGm78qLuBcpSeHYGLr5o XX0ry5NYriR7IPY8RKIgMQrjuqGvkPIo/Zn9RWJiVpxSHxcfcRr3aoX1NzfPex5neQuhMC8M0Qo gGV9aR6Q3ZL1CwSuuPBAhZHHlSz6KUIX6L68vg95kbsVQKcUk947m7/9u8RdMTEtkTiQCJVdd3j ZetW2KC+e+UT5AL/kcR/rdcxbGNSgEhSUTOZZvRq1zHDh+VqI7uh1hQhAUHRqtQsWtssgSKnBat g+c1cB6SyphFjmdsPnHaYMqCjYSoH52UjvdLwudlADLo4nyHLnUjMYhliy33YiH6FZ6/m36s2iF cW7NbAF/ub2XH+ZrBZKWwd5rWY8KpqZrnvQLVm7aMm/vVpQuyqkuurACN+xIARk5KtCCPqdEGNr piimRC8Zb83Go7bBZ7FLTQUXvJSYiwE/H+9lju8ITPD3g== X-Google-Smtp-Source: AGHT+IEHVo2Udvb69D2Hwa1r3+pDcE1lexOftNIB0jDWznime4aK4vKbwnkZe0UXtv8vqSJgIUs1jg== X-Received: by 2002:a05:690e:1513:b0:641:e6aa:583f with SMTP id 956f58d0204a3-64302a90a9emr3327207d50.15.1763774851105; Fri, 21 Nov 2025 17:27:31 -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 00721157ae682-78a7987e889sm20755267b3.7.2025.11.21.17.27.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Nov 2025 17:27:30 -0800 (PST) From: Demi Marie Obenour Date: Fri, 21 Nov 2025 20:23:24 -0500 Subject: [PATCH v4 02/14] host/rootfs: Install systemd-pull MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251121-updates-v4-2-d4561c42776e@gmail.com> References: <20251121-updates-v4-0-d4561c42776e@gmail.com> In-Reply-To: <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=1763774602; l=3168; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=GCuAnvJfV+QM5cHGoVneHfIJIbULRRHoGHxpy8wKcY4=; b=sCXlFkk2ZIdeRpKQ5j8AhiXYeq5rn7FgOh7IXbM15yRHY4Ixh+NOoe6OESoVQcICjWvAX0QuP DA76dGY/ZLoD+mGRWL3QMds/NNKrxaLDfTx1Lc0EwOY5bZTnBLHmPgX X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: FXRQ5GH6EOPQUCXXHCCAPHF4W5AYLS5G X-Message-ID-Hash: FXRQ5GH6EOPQUCXXHCCAPHF4W5AYLS5G 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: Due to a systemd bug [1], building systemd-sysupdate does not require that systemd-pull is built as well. However, systemd-sysupdate has a run-time dependency on systemd-pull. Therefore, override the systemd derivation so that systemd-pull is built. Confusingly, this requires enabling systemd-importd. If systemd-pull or systemd-sysupdate is not built, the resulting image will be broken and users will not be able to recover without either a reinstall or reverting to the previous version. Therefore, add a check to ensure that both are in fact built. Use 'cat' rather than just 'stat' to catch broken symlinks and the like. The override can be removed once https://github.com/NixOS/nixpkgs/pull/461277 is merged, which builds systemd-importd by default on musl. The tests will be preserved to catch any regressions. [1]: https://github.com/systemd/systemd/issues/39635 Signed-off-by: Demi Marie Obenour --- Changes since v2: - Add link to upstream Nixpkgs issue. --- host/rootfs/default.nix | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix index dc7786a2afa74abbe5146894f73f5860b5c0ef8f..cd61c78b1f1668e7bc9c84c638ff6e7d8b6de140 100644 --- a/host/rootfs/default.nix +++ b/host/rootfs/default.nix @@ -43,7 +43,8 @@ let }) # Take kmod from pkgsGui since we use pkgsGui.kmod.lib below anyway. - ] ++ (with pkgsGui; [ cosmic-files crosvm foot fuse3 kmod systemd ]); + ] ++ (with pkgsGui; [ cosmic-files crosvm foot fuse3 kmod ]); + nixosAllHardware = nixos ({ modulesPath, ... }: { imports = [ (modulesPath + "/profiles/all-hardware.nix") ]; @@ -64,7 +65,16 @@ let # https://inbox.vuxu.org/musl/20251017-dlopen-use-rpath-of-caller-dso-v1-1-46c69eda1473@iscas.ac.cn/ usrPackages = [ appvm kernel.modules firmware netvm - ] ++ (with pkgsGui; [ dejavu_fonts kmod.lib mesa westonLite ]); + ] ++ (with pkgsGui; [ + dejavu_fonts kmod.lib mesa westonLite + # Work around NixOS/nixpkgs#459020: without "withImportd = true" + # systemd-pull doesn't get built, so systemd-sysupdate doesn't work. + # TODO: remove this when NixOS/nixpkgs#461277 is merged. + (systemd.override { + withImportd = true; + withSysupdate = true; + }) + ]); appvms = { appvm-firefox = callSpectrumPackage ../../vm/app/firefox.nix {}; @@ -85,6 +95,16 @@ let lndir -ignorelinks -silent "$pkg" "$out/usr" done + # If systemd-pull is missing systemd-sysupdate will fail with a + # very confusing error message. If systemd-sysupdate doesn't work, + # users will not be able to receive an update that fixes the problem. + for i in sysupdate pull; do + if ! cat -- "$out/usr/lib/systemd/systemd-$i" > /dev/null; then + echo "link to systemd-$i didn't get installed" >&2 + exit 1 + fi + done + # Weston doesn't support SVG icons. inkscape -w 20 -h 20 \ -o $out/usr/share/icons/hicolor/20x20/apps/com.system76.CosmicFiles.png \ -- 2.52.0