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 15F87871A; Wed, 29 Oct 2025 11:36:56 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 1A0F187C2; Wed, 29 Oct 2025 11:36:53 +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.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_MISSING,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from fhigh-b2-smtp.messagingengine.com (fhigh-b2-smtp.messagingengine.com [202.12.124.153]) by atuin.qyliss.net (Postfix) with ESMTPS id 5737087C0 for ; Wed, 29 Oct 2025 11:36:51 +0000 (UTC) Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 2A4827A0157; Wed, 29 Oct 2025 07:36:50 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Wed, 29 Oct 2025 07:36:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=alyssa.is; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1761737810; x=1761824210; bh=qvml6zcsHP tRIa0AfX1Wnm/ZAV3kYh6tdDFJ3DRXOug=; b=Clx4p7O2o+N6KNBkq2LdBSp7u7 mkFGrWSMKka+fl3Sz2eCWyBcTZSyka7SvkxZ9YJFXNrW2YGBG7pM9rCqeRF7K8vJ vzF5wb1mjE4S2LeIAz5nTNqMVuFXI0DXj1nq98Ozrw7YgPoaPvb2mLbV4/j4OpzY lqlD6OiTHix+riEVO9j6K+FRksYlxuqNf6/XcfADIQrUQlPPbU0k8cfddCEd5TnN 59WaMr5mYVACLNcT2Xy7M4clhAp08QUzPXVExkZishJt8SW3iR1zBOuJuaq2yesD cZI1j2om+jHN7r1sMBGS3BTQNUbjjp4VGFvGvIpA1HE1/bOf2BFBSU11T3WQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1761737810; x=1761824210; bh=qvml6zcsHPtRIa0AfX1Wnm/ZAV3kYh6tdDF J3DRXOug=; b=lkLMsafAgUah+siOOyallnnVrkBRH64/l6Vdg+j8QWrD1Zkkgxg rq2c/xZ0BcFtOsOi5byGEQLhArcX6JGG4SDNka/PAn4vRXX6u3ukQXGLPLHmEzVk 7rvfCisdDdhFGxqdbZAEM098FXk6YF2Wq5wBr2y8xOQlSOxuT9bt4mzTRLHjBgUX wBLI+YgAMVW81RjMdyyqhBs5izmgy1HgoktfmN7L9KWk5AY4kqnBiuQkbCAcpJMV oAazOCEBuRljL+jqLuYSaCTInoP9Kr4tjDQda/r202r3MZcDa4TdQ/KxxTuhjnh4 H1J6ULQGHMaUtebzVEEV2YOTyigpCJdE3DQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduieefieefucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtsehgtderredttdejnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpedtkedvfe dvvdetheehueeifeelieeggeefgedtvefgvdfhvdethedvkedtheevvdenucffohhmrghi nhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhephhhisegrlhihshhsrgdrihhspdhnsggprhgtphhtthhopedvpdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopeguvghmihhosggvnhhouhhrsehgmhgrih hlrdgtohhmpdhrtghpthhtohepuggvvhgvlhesshhpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 29 Oct 2025 07:36:49 -0400 (EDT) Received: by fw12.qyliss.net (Postfix, from userid 1000) id E0C655210D5; Wed, 29 Oct 2025 12:36:37 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH 1/7] host/rootfs: Use full util-linux and systemd In-Reply-To: <20251029-updates-v1-1-401c1be2a11b@gmail.com> References: <20251029-updates-v1-0-401c1be2a11b@gmail.com> <20251029-updates-v1-1-401c1be2a11b@gmail.com> Date: Wed, 29 Oct 2025 12:36:36 +0100 Message-ID: <87y0ouj5x7.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: EWKA7UUZFVSEC7YK5JMPW2UTNOSPPUGY X-Message-ID-Hash: EWKA7UUZFVSEC7YK5JMPW2UTNOSPPUGY X-MailFrom: hi@alyssa.is 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: Spectrum OS Development 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: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > 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. That's a problem that's going to need to be fixed. We're not mixing two different libcs on the host. > Signed-off-by: Demi Marie Obenour > --- > host/rootfs/default.nix | 43 ++++++++++++++++++------------------------- > 1 file changed, 18 insertions(+), 25 deletions(-) Okay idea overall. I like the idea of less busybox. Busybox =E2=86=92 util-linux should probably be a patch of its own. > diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix > index 0d79f7ca54ccc86eb0fa6e743f2011237d365f24..00052222507077b9e94a5ed0a= 3fbddd27caeefc3 100644 > --- a/host/rootfs/default.nix > +++ b/host/rootfs/default.nix > @@ -4,20 +4,20 @@ >=20=20 > import ../../lib/call-package.nix ( > { callSpectrumPackage, spectrum-build-tools, src > -, pkgsMusl, pkgsStatic, linux_latest > +, pkgsMusl, pkgsStatic, linux_latest, systemd > }: > pkgsStatic.callPackage ( >=20=20 > { 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 util-linuxMinimal =3D util-linux.override { cryptsetupSupport =3D false; nlsSupport =3D false; ncursesSupport =3D false; pamSupport =3D false; shadowSupport =3D false; systemdSupport =3D false; translateManpages =3D false; }; So how come we need the non-minimal version? > # Weston doesn't support SVG icons. > inkscape -w 20 -h 20 \ > -o $out/usr/share/icons/hicolor/20x20/apps/com.system76.CosmicFi= les.png \ > ${cosmic-files}/share/icons/hicolor/24x24/apps/com.system76.Cosm= icFiles.svg >=20=20 > - 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/*") packa= ges} \ > + ${escapeShellArg xdg-desktop-portal}/libexec/xdg-document-portal= \ > + ${escapeShellArg xdg-desktop-portal-gtk}/libexec/xdg-desktop-por= tal-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/o= rg.freedesktop.impl.portal.desktop.gtk.service Unrelated changes. We don't need to escape Nix store paths, because we rely on Nixpkgs, which would break if store paths had weird characters in them. > + # clobber any conflicting files from busybox > + ln -sft "$out/usr/bin" ${escapeShellArg util-linux}/bin/* The approach we've taken so far is to disable those tools in Busybox, and avoid conflicting symlinks, and I like that better. Alternatively, if you want to figure out which Busybox tools are actually needed, we could switch to a minimal build and enable only what we use. >=20=20 > ${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 >=20=20 > > --=20 > 2.51.2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQQGoGac7QfI+H5ZtFCZddwkt31pFQUCaQH8RQAKCRCZddwkt31p FRUkAQCy75zUQXsqw4atN8Nnim0JcyBH36taNNYeWKbJnrGmDwD/YWnqXnW+4IRH gErIKizrkwgK9DHAPCuhMwDdcYQuvgM= =ggNA -----END PGP SIGNATURE----- --=-=-=--