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 2A86C8046; Wed, 29 Oct 2025 10:14:26 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 4B0247F9A; Wed, 29 Oct 2025 10:14:22 +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-x1131.google.com (mail-yw1-x1131.google.com [IPv6:2607:f8b0:4864:20::1131]) by atuin.qyliss.net (Postfix) with ESMTPS id 97FA88014 for ; Wed, 29 Oct 2025 10:14:21 +0000 (UTC) Received: by mail-yw1-x1131.google.com with SMTP id 00721157ae682-783fa3af3bdso80613937b3.1 for ; Wed, 29 Oct 2025 03:14:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1761732860; x=1762337660; 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=8nN6nZiCDdq++dmILIsZ4qEUroE6HDi9MjZVdvRI87o=; b=m6JW6Mwh7n6xzCWn3FAYczIhb8WN25vY1YFIz7/g+cy8hXs1cfh6w7RbC4NhTm9+zh a3zJYczJv9WFijO4cP3ALQhYOCcRurw+cI+LXP+9n56ln2tQ4mHGv4VKAMVgKj+tAuMU W13OoFeV2o82cXdvZDiFtPJ+ROkOrb8ObySio2u1ZG9Fde7hkgBM3wLaIu2zTveNAomL U6K9uIjOtaIWXM1QGRodfPuVTgDwdHARKHhWBVCBLTjcWLd3WEFOPZjPijVSOfil5VuX IkUV+/OPlMYo2laW2Hs6iP8Eb+DqAc5CUN1F1CPLZA1fK3hfLRmcJAOMv0+CV/7O+hsp Iz4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761732860; x=1762337660; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8nN6nZiCDdq++dmILIsZ4qEUroE6HDi9MjZVdvRI87o=; b=Z3QVbNXlp5ikgLrbSlSETA9USuclSXdafzkqU5bVA9j7lqq/VfJXzMDeAaualQ5Mrg SK9e1qt/9Md1ZSeP9mIVEmrmubI0n8oelZLsqH4nSjm9ntgcUU53YAjVRxXoJkSWQxyH jn8tKvxiMrPCqIZcozUoPKl1Ydxv/xl/6HCXhM7k7EUBfNSk4hfUMPoHYXjSOlMcsKjf Cf+vSEi5nBZWkHxj7rf36P2qCyr/X4s+9fQwYO6pxvHgzzOEmkm8bPZ1/2/FzxpVBELA /7olxHg8sVoe3eiz9B+2dpkf+vdS33J2DeDt6ncgafYNznUWQMYBtjtTZAcZ5GhH3M4f 5J3g== X-Gm-Message-State: AOJu0YzKHpdWpD/5p38pvQqrs1XgGl67VAFBhrFgzeywrY3pgUjmTUqG Y/CLzRPHpNNaIvPaQ6a/kSisY5sVNoQL4DPOFxc9o0ayjgbrSrWwgd0fHCDL9g== X-Gm-Gg: ASbGnct3bsQkA56d1EUlMXHNkR0yAGqpPINSqqdqs5bRI40VIhjQHKxZ6rhE2a4qJOk tGyOa57QXf5aB3uId8pSG2hTq9qQ0KTjlmWErA65/ZS1T7NbK/DkTnFUB9bhHg1Lh6amf/eW9z5 TOoYRQBIujeZi5BsJGv9JFGMkp1ZyHVR4K47Jraesfdsm5RlSpJc97G7Xaow9lJHijtM4cMS+b/ Hzp3ClZ6NUhzvnkJwNzJkOoN3raFy+/MGRIXvmrqy6If/awF4r8mr0sOplnoUPOlCeL20TBYn+Z aXjLxFYX+JrRV87QXZ0i00bf2l/m3wxUI/m41/LzHyspNCXPyHCTDk2k5uWaI/Fisp0NewyktjX NlNa6V+a7ZbWFUY8xF31AP7cGur6yyIyQRQzyCbwuFMNotZ6btMUG8JGDPoag4KBUUuXaZt4H+x twtueIahlzHDn8QHzOpJHJZAYjFVm7EnhNLEV47K75zy2zubEYQ9+jQmjcaC3VuwnJgS6F7SXTD PtktA94z7+GNL/dj62TDd93 X-Google-Smtp-Source: AGHT+IHDMIh0PEPbFxIMb+/CfKXeWvbc9WFeQduuLfuX7gVlYHiYdbDXE4tmnm/55LLqFOb+h55m5w== X-Received: by 2002:a05:690c:9685:b0:785:ba6c:66e4 with SMTP id 00721157ae682-78628fac5b1mr22767537b3.50.1761732860248; Wed, 29 Oct 2025 03:14:20 -0700 (PDT) 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-785ed1dde2bsm35046627b3.52.2025.10.29.03.14.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Oct 2025 03:14:19 -0700 (PDT) From: Demi Marie Obenour Date: Wed, 29 Oct 2025 06:12:40 -0400 Subject: [PATCH 1/7] host/rootfs: Use full util-linux and systemd MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251029-updates-v1-1-401c1be2a11b@gmail.com> References: <20251029-updates-v1-0-401c1be2a11b@gmail.com> In-Reply-To: <20251029-updates-v1-0-401c1be2a11b@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1761732759; l=4432; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=HWOYej196qhyfLXivA0FosNoCg+/MGz0PLzw94Bh/Sc=; b=Dg/tiajH5o65WoX+QJJj8ctzlr3Rt2lxwPKxpAEs6mvYhBvmSE26YtYtyQ5rWPEIYrK19SixK 8bgrWB+wfFJC6LM/Lc7b33jN9JGKkPZAu7nk1B9jpwexHLRFhMS1GpQ X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: UV63BMGT3L56WYLRMQVOT5A7HLMYVOKJ X-Message-ID-Hash: UV63BMGT3L56WYLRMQVOT5A7HLMYVOKJ 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: Busybox provides a broken fdisk that doesn't support GPT, only MBR. The systemd built against musl doesn't include systemd-pull, so systemd-sysupdate doesn't work. Therefore, use all of util-linux's command-line tools, and use systemd built against glibc. Signed-off-by: Demi Marie Obenour --- host/rootfs/default.nix | 43 ++++++++++++++++++------------------------- 1 file changed, 18 insertions(+), 25 deletions(-) diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix index 0d79f7ca54ccc86eb0fa6e743f2011237d365f24..00052222507077b9e94a5ed0a3fbddd27caeefc3 100644 --- a/host/rootfs/default.nix +++ b/host/rootfs/default.nix @@ -4,20 +4,20 @@ import ../../lib/call-package.nix ( { callSpectrumPackage, spectrum-build-tools, src -, pkgsMusl, pkgsStatic, linux_latest +, pkgsMusl, pkgsStatic, linux_latest, systemd }: pkgsStatic.callPackage ( { busybox, cloud-hypervisor, cryptsetup, dbus, erofs-utils, execline , inkscape, inotify-tools, iproute2, jq, lib, mdevd, nixos , runCommand, s6, s6-linux-init, s6-rc, socat, spectrum-host-tools -, stdenvNoCC, util-linuxMinimal, virtiofsd, writeClosure +, stdenvNoCC, util-linux, virtiofsd, writeClosure , xdg-desktop-portal-spectrum-host, xorg }: let inherit (lib) - concatMapStringsSep concatStrings escapeShellArgs fileset - mapAttrsToList systems trivial; + concatMapStringsSep concatStrings escapeShellArg + escapeShellArgs fileset mapAttrsToList systems trivial; pkgsGui = pkgsMusl.extend ( _final: super: (lib.optionalAttrs (systems.equals pkgsMusl.stdenv.hostPlatform super.stdenv.hostPlatform) { @@ -32,7 +32,7 @@ in # systemd, so might as well use it. pkgsGui.callPackage ( { cosmic-files, crosvm, dejavu_fonts, foot, kmod, mesa -, systemd, westonLite, xdg-desktop-portal, xdg-desktop-portal-gtk +, westonLite, xdg-desktop-portal, xdg-desktop-portal-gtk }: let @@ -83,7 +83,7 @@ let # (not just their bin/* files). usrPackages = [ appvm kernel.modules firmware kmod kmod.lib - netvm mesa dejavu_fonts westonLite + netvm mesa dejavu_fonts systemd util-linux westonLite ]; appvms = { @@ -99,36 +99,29 @@ let mkdir -p $out/usr/bin $out/usr/share/dbus-1/services \ $out/usr/share/icons/hicolor/20x20/apps + for pkg in ${escapeShellArgs usrPackages}; do + lndir -ignorelinks -silent "$pkg" "$out/usr" + done + # Weston doesn't support SVG icons. inkscape -w 20 -h 20 \ -o $out/usr/share/icons/hicolor/20x20/apps/com.system76.CosmicFiles.png \ ${cosmic-files}/share/icons/hicolor/24x24/apps/com.system76.CosmicFiles.svg - ln -st $out/usr/bin \ - ${concatMapStringsSep " " (p: "${p}/bin/*") packages} \ - ${xdg-desktop-portal}/libexec/xdg-document-portal \ - ${xdg-desktop-portal-gtk}/libexec/xdg-desktop-portal-gtk + ln -sft "$out/usr/bin" \ + ${concatMapStringsSep " " (p: "${escapeShellArg p}/bin/*") packages} \ + ${escapeShellArg xdg-desktop-portal}/libexec/xdg-document-portal \ + ${escapeShellArg xdg-desktop-portal-gtk}/libexec/xdg-desktop-portal-gtk ln -st $out/usr/share/dbus-1 \ - ${dbus}/share/dbus-1/session.conf + ${escapeShellArg dbus}/share/dbus-1/session.conf ln -st $out/usr/share/dbus-1/services \ - ${xdg-desktop-portal-gtk}/share/dbus-1/services/org.freedesktop.impl.portal.desktop.gtk.service - - for pkg in ${escapeShellArgs usrPackages}; do - lndir -ignorelinks -silent "$pkg" "$out/usr" - done + ${escapeShellArg xdg-desktop-portal-gtk}/share/dbus-1/services/org.freedesktop.impl.portal.desktop.gtk.service + # clobber any conflicting files from busybox + ln -sft "$out/usr/bin" ${escapeShellArg util-linux}/bin/* ${concatStrings (mapAttrsToList (name: path: '' ln -s ${path} $out/usr/lib/spectrum/vm/${name} '') appvms)} - - # TODO: this is a hack and we should just build the util-linux - # programs we want. - # https://lore.kernel.org/util-linux/87zgrl6ufb.fsf@alyssa.is/ - ln -s ${util-linuxMinimal}/bin/{findfs,uuidgen,lsblk,mount} $out/usr/bin - - # TODO: this is another hack and it should be possible - # to build systemd without this. - ln -s -- ${lib.escapeShellArg systemd}/bin/udevadm "$out/usr/bin" ''; in -- 2.51.2