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 252551AC2D; Wed, 12 Nov 2025 22:18:17 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 5D0FA1ABE0; Wed, 12 Nov 2025 22:18:04 +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-yw1-x112e.google.com (mail-yw1-x112e.google.com [IPv6:2607:f8b0:4864:20::112e]) by atuin.qyliss.net (Postfix) with ESMTPS id 700A41AB32 for ; Wed, 12 Nov 2025 22:17:56 +0000 (UTC) Received: by mail-yw1-x112e.google.com with SMTP id 00721157ae682-7880686d178so2299207b3.1 for ; Wed, 12 Nov 2025 14:17:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1762985875; x=1763590675; 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=PcP31gX4R0PMghMsrXIW8k9f964imvP9GivjGvDx1fY=; b=NAgaJ0kvVvwHTxPar6F1ulQ7P1tXlkbAIrmD8MHLkTo4/MhDtCAEdPvqgZeBtid2DU lr7Xvr6afdkeDI3nbWcMUgMjsJhEK3Q0QmqVCYQn8Rh0JZ6s/YVrvWl2IDmQ0Z7rWPTX vE6OEocdJbQaeTtP+TP19hx0xfEK5go+TxtNhrBoKlxpgWJacXh2/5w0ReXAos1ZZFbP 84U92SZ1q8wqQfR6+7/j0mCudYRSRwaSLW5E9lbzULodEDF9NCE4bvjkcwLCzYEc7UVn WUbD8jmXC9ahBE3bl3Izz662csOvQGVOdgMosD7t7x8ACl/YVO3ypO1nZTe804o+GggV g8lg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762985875; x=1763590675; 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=PcP31gX4R0PMghMsrXIW8k9f964imvP9GivjGvDx1fY=; b=KmBWIlSINoIiy7d4TZbVofCFSffRNlYs0r8O02gLAmu4H2rMbOSowwesYgbdU5lUlD W1xqrkDhE8uv9MkkydSNxX8FzgOvX71QlTEldabim/SN37kWw+mXiyZH1CLc3hVf/fKG 1NyW+9tTvaAYRC2OHNsSKl8E36mMDNQIzGUek/FzWfPLQR73EaiEZdU2xkY9qhPYV8cw 28fJ6jr3Ky+jjHEbclrEQHEfAbwFdhOs6pXNj7/kGtOCduk9TKJSDT4PuNrWPUZ6bFek tlPWn0J30SQ0nqoSE1WUjpn25ninulCdsRleHrCVOozLJVSIktKuAt2i4q/M0hRQcUHj PhQw== X-Gm-Message-State: AOJu0Ywc8niv+uUmXt9+5u88TOxWyRjT2RLSAoSt8AYwlHUSyKVkqhnP PgXwjXB9UGjHdlzDb/jqt6sfbq8i1vb/Y6CmTIFRj7CmQpBnUsLb8gE5DSt9MeKC X-Gm-Gg: ASbGncvFwIPdA3extxDgH929rA+YzFIKvcRVIwo6ohsrzfU2Czqhp1/hkccBn6xrLEW ynufKAMqkV1ZV4JZQ4RcKBIo+z0y9DjD1uflVXjBSpP/N/Y50OF2cgVcqJm89Q6pIwoQSiWpavV O0WKEDm1GpDmun7bAxPlI4xJIvCsTLJ8zXB3/niueUhP9I9y1qtuunduWHrsGeM8ohsQsaaHGxI MtLU60HIEaNS0cfQjdZQmdnd1rfW/Fhk6ek0XVHosfLlVQB3CulGo/kEp9RrO0IY6/zoqWMWlsR KbAPkexckky7WJjAU6FLIaTqPO4bhLJsV7edKgMmTYJWF5zcaYF1ECeNQd3q9KT21yj9fbrXA9H yOd5lwcxBUaQMwF2iUHJAIKiEnPMDBzlZMHaG/eXB/99rbNG8XOEQXvHKGK5zS+WKSR1u4mVVkD VmL88oq9yxQAyuJBLAMfa5veo4L6yfe2Za8pUX6HktMdHIPQEpYW7V6BcOZdqQxjyIuHYMkehKR HEGJdoYoS5RiTdYGW7NtoTy X-Google-Smtp-Source: AGHT+IHdnG8r3Gh3xklIf+vYgzBibv08W9oOx2+ZWbZ84l7q1UMZKMQs5GpDjsL85PV9jlQuqpINdQ== X-Received: by 2002:a05:690c:6f06:b0:786:827f:6fe8 with SMTP id 00721157ae682-788136b6419mr34149567b3.58.1762985874605; Wed, 12 Nov 2025 14:17:54 -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-78822150ec3sm863617b3.48.2025.11.12.14.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Nov 2025 14:17:54 -0800 (PST) From: Demi Marie Obenour Date: Wed, 12 Nov 2025 17:14:56 -0500 Subject: [PATCH v2 2/8] host/rootfs: Install systemd-pull MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251112-updates-v2-2-88d96bf81b79@gmail.com> References: <20251112-updates-v2-0-88d96bf81b79@gmail.com> In-Reply-To: <20251112-updates-v2-0-88d96bf81b79@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1762985694; l=2784; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=wqhCD8aicbkpEJD0uJrPZ+JO8+mWWl5fLrLutvcP6kc=; b=OQAqYQNRaFcKi8tyrxc73Z2s5ezgeYZjR1MftIeCYrGl2oxBHN+GIUPBqnFZi8oNNbZtpr61G UFLZPzWG7zhBP0rOxfNdrb+rFZ6bBJy4BRR6zBtuZNFihO+EmSgQlTM X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: S47YQBCTY2LBNDBXICZE67AN3ILTRLZK X-Message-ID-Hash: S47YQBCTY2LBNDBXICZE67AN3ILTRLZK 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. Signed-off-by: Demi Marie Obenour --- host/rootfs/default.nix | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix index aea2e46bb5998176eb6d9b8aef802ae270fdd28c..c2045ad96cca37a1bf1a7b82aa35a583cc5aee93 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,15 @@ 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. + (systemd.override { + withImportd = true; + withSysupdate = true; + }) + ]); appvms = { appvm-firefox = callSpectrumPackage ../../vm/app/firefox.nix {}; @@ -85,6 +94,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.51.2