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 ECDE51B56D; Wed, 19 Nov 2025 08:21:19 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 8A2131B521; Wed, 19 Nov 2025 08:21:13 +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-x112c.google.com (mail-yw1-x112c.google.com [IPv6:2607:f8b0:4864:20::112c]) by atuin.qyliss.net (Postfix) with ESMTPS id C11131B4B6 for ; Wed, 19 Nov 2025 08:21:12 +0000 (UTC) Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-7866aca9ff4so65672607b3.3 for ; Wed, 19 Nov 2025 00:21:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763540471; x=1764145271; 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=BB+ufJxnV0Uzn8rKXOOHqpcizmKLLdD+AbRggn5NKpk=; b=ZhucbXiQzb4dDTTMmzkYZI7HtUQDXM56vkxGvcKoKeEVSrwqdjUlN/IopH1dMZOPBa gQ87OOwggzYXU6SEMtKUjTfK2j6M4fRfoA1A3NWn2DSdzddNjcFEeaRUfh17wK49KOUP 6BptbLjmr/VKeeG8z/D9LA7u9F7BRl0Jqhh9EbqtrMS4vR4Bv7hNhSJ9D9E+f/cgwIUQ 15lfdbs5es+hGW+2mjGL8tb2TjZxhTy6l2OegyEyykABBAnVj2zPfPHYITj0vHyN9ohn SfZru5VrWgnsETFLbImXdomYfoqrB2jJ9xgB+QYLOdigAyyAF0VghyQ+Om6INdC8IjMt qA0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763540471; x=1764145271; 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=BB+ufJxnV0Uzn8rKXOOHqpcizmKLLdD+AbRggn5NKpk=; b=iU6+CJVWqHekLL8K7m8hpAwhiDGBOTA4fIq8ySNiaYiDpkZbttstu+c8DaL3mqnSKa +56iWoKjvimSB9FTo1UXvAv1ZHtYAlKPt8XMDaAR0ZY5fmGzX/7YzzrTv/rHe2AKmc0o 2zBxFv6cnD/zIxjLA4bMuR1nXUohMouzwLpwvaUyV3yyy5hlP3QDL1AKkh02Zes4i4Ex q553yfftjEtA/iKzbqaAOpDpbHkSX6wofXeRXuxGLSEeMhUloRhpFc5Kccq06XyEh5or e7/dDwPHXtBWLjswUkRwQ+h/rhgHQDrJcjwkE4Q+vqvXpNuwiTr56cSh23kQCKP+T7RI B35g== X-Gm-Message-State: AOJu0Ywt3bUW7mV/J0onqy9iq6OCLFL44ZDcAjFaa2CKvmyNcYvpYybT 4ZQIUxQorSWe44iscBTncKyIXZXpOCkRs4nR/ZUjbLreoduUt0h69pTx85HMyw== X-Gm-Gg: ASbGnctW5pOGQDo/2flwPUfxbUTIGdMTqMzGHBJTbnvmKucbo858RdD+CzYXIoUIL3m +s4+cOGWpNjPyMhA1tG+WHY8YHdpUCyW2UZRKAjS2O/Vvs0+SEPFEVB7uYCFZSmDOC3CK4XjVWg MmLlasjLhbqIf82bjHIxi60sa7T5B/ed+l8v8qLFHH+bkaygy0yL2NhHsuY5H60rm8QoX+5+HNo cjubK96gZfsIjJ1wA2RgbJfnSfathJXhB+wgimqCNZ1128aPhdSPmRoCrwohyWhJtimcYRLedX1 EqdXMwSRO+xYmxNcyD+bo5fAQOhmXLFoXkcIWUAlR7aKKiIKVVsaGnSAC2hAYKK2aPJOqztMt+v D9sUE5o4PyOSNP4JwoKwzBiz0K+taEZfFiZMSXVVtd/DdOHKUDXG56jJ8Pd+dqxzb/7jFOrhYVp qB9LNe80oGvUAZFGZqZ6CYbElC/4tgNERn1KGiOzEBnvxb9L9pzD0tu31o2/WZaRxfzTPcc/yMO VXC8hHeM7UAFhSGDZJ10FjVxAsRnlDCxlgQxe9NN2LfyA== X-Google-Smtp-Source: AGHT+IEEI89Vr1ChH1/rzvEmqh2GrxcYtMAzGzVrqzfSQ7lbclM+WO2UVG/SzYOFxjBmq59vNahIQg== X-Received: by 2002:a05:690c:6f12:b0:788:284:39cd with SMTP id 00721157ae682-78a6c906318mr15466157b3.15.1763540470569; Wed, 19 Nov 2025 00:21:10 -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-78822128160sm60626267b3.32.2025.11.19.00.21.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Nov 2025 00:21:10 -0800 (PST) From: Demi Marie Obenour Date: Wed, 19 Nov 2025 03:18:25 -0500 Subject: [PATCH v3 02/14] host/rootfs: Install systemd-pull MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251119-updates-v3-2-b88a99915509@gmail.com> References: <20251119-updates-v3-0-b88a99915509@gmail.com> In-Reply-To: <20251119-updates-v3-0-b88a99915509@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1763540303; l=3168; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=hAFZ1JD9G6auRVno5Vbm5IZTTkJrDzsoHXFOP3DCso4=; b=X7hVM3KgjdO5cNaih1w0e2B32+4H1Gfbsa9ozyS8dPrznnwS3cMZ1eyl+iP63ACIU3SJZXK44 GGgkmpfdPODADNQbH/1slKY9dws7BJdRiBRbKGzqqknOJKq5dkgAcLM X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: 3GOR7XILNANSRTRRK7SMZM3U4ZHXUSFQ X-Message-ID-Hash: 3GOR7XILNANSRTRRK7SMZM3U4ZHXUSFQ 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 84b536eda397adfab0fbb0122a5765571d7d678e..26d6dc3f9a63680bf1867c9769f807dc562c81c9 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