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 90CA91EDD9; Thu, 13 Nov 2025 12:35:27 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 70C0D1EE1D; Thu, 13 Nov 2025 12:35:23 +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-a2-smtp.messagingengine.com (fhigh-a2-smtp.messagingengine.com [103.168.172.153]) by atuin.qyliss.net (Postfix) with ESMTPS id 83FEE1EDBE for ; Thu, 13 Nov 2025 12:35:22 +0000 (UTC) Received: from phl-compute-04.internal (phl-compute-04.internal [10.202.2.44]) by mailfhigh.phl.internal (Postfix) with ESMTP id 4D38B140020B; Thu, 13 Nov 2025 07:35:21 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-04.internal (MEProxy); Thu, 13 Nov 2025 07:35:21 -0500 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=1763037321; x=1763123721; bh=EYW4910qF5 KNqD1JIkX2P/DdLfrX6Ms2ojrshiZwGu0=; b=YAepB0cgRjLZEdj3/a/wAHRCzc zAHlB/oxpETiYBYTYyP507dNUzoyhgoadVw0LRbM8KT961LelRD/8MMkrIbZrYhk xNXgMwxqyEKm54ulN1ykp+2AT27scdCjHAbFw/F/W6iS/bw4RBjJtObe3G5q9W7e qv14a/hPb0Zff+lh7KIVmeowzsOLHe1dhomkORrX0dflxLiDkEcjAXMa3gieWQ7G 4lB1nDnkHiHX0SJHdzqMODIvp0s7UAQGFFKRPZm6rofUKigNRli6ZMI5FlZ93/fO AmuWNwvM8ArQbf2BZ8kWk9TSoBRXvzt2vnysJ13QDPQ/02dQLi1T7Ol2YYdw== 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= 1763037321; x=1763123721; bh=EYW4910qF5KNqD1JIkX2P/DdLfrX6Ms2ojr shiZwGu0=; b=C9IEHVOFQEDTX1rLePcvEVSBX12QQO4wtGM7yDbgQlO1LnyhBF1 KAghsIUwbVO9vNOxfJyJNLAXcakHRbPzh6Ey4XB995khDhA/7m6e5OhLsjshLas7 OtWDK5zdcYuv8a0sfF+cofVfG2kuoIpO9DW4Bzo7t0urwf1G3y0pOCf5U9CpHT25 HiAShVbm2PwSseq7f8VlZqCOzVw2xEi3oifrwMhaaIFku1yg8FXrANc0puEHTnZs vh5tZzT0dCFrJFk44hsJsQaR/QF+DNkLoxEdYRUbxg0lLMdR5RvqeBwXfkp2rX40 q0ah0oOhqHVMcJAk16fpfiImfG8/CDUc55g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvtdeileehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhephffvvefujghffffkgggtsehgtderredttddtnecuhfhrohhmpeetlhihshhsrgcu tfhoshhsuceohhhisegrlhihshhsrgdrihhsqeenucggtffrrghtthgvrhhnpedttdektd dvledtueefteehffejtdejkedtgedugeejudejhfevvedtkeeujeegjeenucffohhmrghi nhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhephhhisegrlhihshhsrgdrihhspdhnsggprhgtphhtthhopedvpdhm ohguvgepshhmthhpohhuthdprhgtphhtthhopeguvghmihhosggvnhhouhhrsehgmhgrih hlrdgtohhmpdhrtghpthhtohepuggvvhgvlhesshhpvggtthhruhhmqdhoshdrohhrgh X-ME-Proxy: Feedback-ID: i12284293:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 13 Nov 2025 07:35:20 -0500 (EST) Received: by mbp.qyliss.net (Postfix, from userid 1000) id 0ACB46966F38; Thu, 13 Nov 2025 13:35:20 +0100 (CET) From: Alyssa Ross To: Demi Marie Obenour Subject: Re: [PATCH v2 1/8] host/rootfs: Install all programs from util-linuxMinimal In-Reply-To: <20251112-updates-v2-1-88d96bf81b79@gmail.com> References: <20251112-updates-v2-0-88d96bf81b79@gmail.com> <20251112-updates-v2-1-88d96bf81b79@gmail.com> Date: Thu, 13 Nov 2025 13:35:19 +0100 Message-ID: <87ldkaglfc.fsf@alyssa.is> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Message-ID-Hash: UK3663R5YFQWISAWC7ZNUPMN3W5FJWGC X-Message-ID-Hash: UK3663R5YFQWISAWC7ZNUPMN3W5FJWGC 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 Content-Transfer-Encoding: quoted-printable Demi Marie Obenour writes: > Busybox fdisk doesn't support GPT, only MBR. Busybox programs are also > often buggy, so use the util-linux version where possible. This > requires disabling a lot of Busybox applets, so move the Busybox config > to a separate file that Nix loads via builtins.readFile. > > Signed-off-by: Demi Marie Obenour > --- > host/rootfs/busybox-config | 134 +++++++++++++++++++++++++++++++= ++++++ > host/rootfs/busybox-config.license | 4 ++ > host/rootfs/default.nix | 36 +++------- > 3 files changed, 147 insertions(+), 27 deletions(-) > diff --git a/host/rootfs/busybox-config.license b/host/rootfs/busybox-con= fig.license > new file mode 100644 > index 0000000000000000000000000000000000000000..ba50b647fbfac9b79ecb29f33= a36c07d3e332ba2 > --- /dev/null > +++ b/host/rootfs/busybox-config.license > @@ -0,0 +1,4 @@ > +# SPDX-License-Identifier: MIT > +# SPDX-FileCopyrightText: 2021-2025 Alyssa Ross > +# SPDX-FileCopyrightText: 2022 Unikie > +# SPDX-FileCopyrightText: 2025 Demi Marie Obenour > diff --git a/host/rootfs/default.nix b/host/rootfs/default.nix > index eb6c64067091ef3802596ce581f82f322f5bfe34..aea2e46bb5998176eb6d9b8ae= f802ae270fdd28c 100644 > --- a/host/rootfs/default.nix > +++ b/host/rootfs/default.nix > @@ -38,25 +38,8 @@ let > virtiofsd xdg-desktop-portal-spectrum-host >=20=20 > (busybox.override { > - extraConfig =3D '' > - CONFIG_CHATTR n > - CONFIG_DEPMOD n > - CONFIG_FINDFS n > - CONFIG_HALT n > - CONFIG_INIT n > - CONFIG_INSMOD n > - CONFIG_IP n > - CONFIG_LSATTR n > - CONFIG_LSMOD n > - CONFIG_MKE2FS n > - CONFIG_MKFS_EXT2 n > - CONFIG_MODINFO n > - CONFIG_MODPROBE n > - CONFIG_MOUNT n > - CONFIG_POWEROFF n > - CONFIG_REBOOT n > - CONFIG_RMMOD n > - ''; > + # Use a separate file as it is a bit too big. > + extraConfig =3D builtins.readFile ./busybox-config; > }) >=20=20 > # Take kmod from pkgsGui since we use pkgsGui.kmod.lib below anyway. > @@ -96,6 +79,12 @@ let > mkdir -p $out/usr/bin $out/usr/share/dbus-1/services \ > $out/usr/share/icons/hicolor/20x20/apps >=20=20 > + # lndir silently ignores existing links, so run it before ln > + # so that ln catches any duplicates. > + 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.CosmicFi= les.png \ > @@ -110,18 +99,11 @@ let > ln -st $out/usr/share/dbus-1/services \ > ${pkgsGui.xdg-desktop-portal-gtk}/share/dbus-1/services/org.free= desktop.impl.portal.desktop.gtk.service >=20=20 > - for pkg in ${escapeShellArgs usrPackages}; do > - lndir -ignorelinks -silent "$pkg" "$out/usr" > - done > + ln -st "$out/usr/bin" ${util-linuxMinimal}/bin/* Why not just add it to packages? >=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 > ''; > in >=20=20 > > --=20 > 2.51.2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRV/neXydHjZma5XLJbRZGEIw/wogUCaRXQhwAKCRBbRZGEIw/w ohARAP4lzGXXCJDQG9LcA/i/8+Cy61W+6JHiGuM1cKJQYR9tTAD/bilBzgvuMoiL IOi9eFPwLUbEFc3i5d82iMHMk+ALRQM= =nzNv -----END PGP SIGNATURE----- --=-=-=--