From nobody Fri Jan 26 09:37:55 2024 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TLt0S25xPz580gq for ; Fri, 26 Jan 2024 09:38:00 +0000 (UTC) (envelope-from se@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TLt0S1VMKz4nPl; Fri, 26 Jan 2024 09:38:00 +0000 (UTC) (envelope-from se@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706261880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9feZkA1Yw+5bIimCHAR0bEWMSBWBRVgG925yEe5zkBo=; b=slNBpjiZFe6+nw8ZUQRK6YSzBu2Mo5bzuw65cu3R5hvWS4bzre9NERGVAw5zNFovQ48/gA yL6jqGIwV9J0c/557dlISnLr+09FlHMEflGsu+swnEmXdasaL/zWN1UKwlmYu8UVt1nQTS arRrXioQGV3aK7XcEPnzPn6A4OatbiNfF1xlfsMqu/gEzJY6i8APqTwUN6a6QjZ39k9BfX gUYdaH4N/Jmg4o9GF+aQP0L4LCtQKLJrje8m6iNnW7rCakr8YzHgCkPphJOZzujLdvRApv dWgn30O9ykz0M1gihTddpYIyeLcfLLZd5b5w3W9Tt2dhk8VhOkORCDO0TciFfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1706261880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9feZkA1Yw+5bIimCHAR0bEWMSBWBRVgG925yEe5zkBo=; b=wzVSFDy8SJKQQtpLgwTP/FcZh2Apz5aj9d7hj2+27cZexbn2syfkqqYdBRXYzig7hBjRts yMbKUgoGgP/y6gebidWk9wtvzmT+iWJn5COXeHQ+zOktoHWqeeyO2h7IjN356LBCNeN124 bfBXxoM7Kzy7Y6IxUfbaBHykBIxglZfejt8zuztgSGtC8RnxjKrZTUtpVCACd+IlGdCQiQ tZgSy9Ag4dDWLTgbEKbSzIYTbvyVAq4cUwAqFUMz9RadX8r9ssKTzGQQUaTLkHI85UZNmQ 98zURVSG1BHl5ja8kFU+6zdU1vcMXMPrcHFcHraUdSqrE2c2/NGdgjwBt8e7Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1706261880; a=rsa-sha256; cv=none; b=GKxnhUxmfP7uvpIPnN6flUqsyfW82jHxwMijkJ/Jlp6LPTztQ9vTCbIUZMJlIyktB4orfp lh1GPB3btnwtSoRh+zWFDKZB+JhtwdgNMnIPKsloj1USf4QpuO34fnpv4kEPOUC4DBQvzD Lp+f+kdf18i+vFTwTLrisHXcfTaBeRAco/9gH1MYwLiz12812xgmDPNkmyuVFyHG+eJgSO vt0vIdN0P4ik7V+Zy5gBbQCkEqkQJF/IhmcCif6+qdHzkO/VzJ2D9IOMNtuYlqT41EUqxe v2IwH4IxrUezVG/FFvZUIUIu0RJq8IbwRxJnYz4lu9QFvsqwC33jXfYvyjCosA== Received: from [IPV6:2003:cd:5f2c:9d00:fc60:6ac1:1a5b:ca5] (p200300cd5f2c9d00fc606ac11a5b0ca5.dip0.t-ipconnect.de [IPv6:2003:cd:5f2c:9d00:fc60:6ac1:1a5b:ca5]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: se/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4TLt0R0Xt2zRMf; Fri, 26 Jan 2024 09:37:58 +0000 (UTC) (envelope-from se@FreeBSD.org) Message-ID: Date: Fri, 26 Jan 2024 10:37:55 +0100 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Stefan Esser Subject: Re: Removing fdisk and bsdlabel (legacy partition tools) Content-Language: de-DE To: Ed Maste , Warner Losh References: Cc: FreeBSD CURRENT In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Am 25.01.24 um 16:38 schrieb Ed Maste: > On Wed, 24 Jan 2024 at 12:30, Warner Losh wrote: >> >> Those are the only users in the tree, but not for long :) > > I have some reviews open to remove some old fdisk / diskabel / > bsdlabel invocations from the tree. > > With those applied, for fdisk I see the following references > (excluding sbin/fdisk/* and comments, old examples, etc.): > > contrib/netbsd-tests/sbin/gpt/t_gpt.sh This test contains NetBSD specific details and will not run on FreeBSD. > tests/sys/cddl/zfs/bin/zpool_smi.ksh More than 99% of the tests in tests/sys/cddl/zfs are skipped, including this one, which relies on commands that do not exist on FreeBSD. > For bsdlabel / disklabel: > > sbin/growfs/tests/legacy_test.pl This test could easily be changed to use gpart. > tools/regression/msdosfs/msdosfstest-2.sh Trivially fixed. > tools/regression/tmpfs/t_vnd Trivially fixed. > tools/tools/nanobsd/legacy.sh Does already use gpart and could easily be fixed. > contrib/netbsd-tests/kernel/t_umount.sh > contrib/netbsd-tests/kernel/t_umountstress.sh > contrib/netbsd-tests/sbin/gpt/t_gpt.sh These are unused and won't run without modification. > sbin/newfs/runtest00.sh > sbin/newfs/runtest01.sh Unused and do not run on a current version of FreeBSD. > These will need to be addressed before actually removing any of these > binaries, of course. I could fix those that are actually usable and installed on a current FreeBSD system within at most 1 hour. >> I wouldn't object to making these ports, but both these programs use 'sekret' >> bits from the kernel that might not remain exposed as we clean things up. >> Though the IOCTLs they do (or used to do) may no longer be relevant. It's >> been so long that I've forgotten.... > > If we eventually stop exporting those kernel interfaces the tools > would fail anyway, so IMO we can keep providing the kernel interfaces > along with the headers etc, and keep building from source until/unless > we drop support altogether. The bsdlabel/disklabel/fdisk programs could be rewritten using gpart without too much effort, at least for the use cases that have not become obsolete (e.g. CHS specifications) and only for use in scripts (i.e. no fdisk interactive edit mode). Even parsing of the disktab format and a conversion to gpart backup format for use by gpart restore should not be too hard. That would keep the commands available for those that use them in scripts outside the FreeBSD sources, but would also allow to remove the kernel interfaces used by those legacy tools. I'd be willing to write those emulations of legacy tools, if there is interest in going that way ... Regards, STefan