Bug 257071 - sysutils/linuxfdisk usage hints should be for fdisk-linux, not for fdisk
Summary: sysutils/linuxfdisk usage hints should be for fdisk-linux, not for fdisk
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-09 03:51 UTC by Graham Perrin
Modified: 2021-07-09 21:08 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (netch)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Graham Perrin freebsd_committer freebsd_triage 2021-07-09 03:51:01 UTC
% /usr/local/sbin/fdisk-linux

Usage: fdisk [-l] [-b SSZ] [-u] device
E.g.: fdisk /dev/ad0  (for the first IDE disk)
  or: fdisk /dev/da0  (for the third SCSI disk)
  ...
% file /usr/local/sbin/fdisk-linux
/usr/local/sbin/fdisk-linux: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 14.0 (1400005), FreeBSD-style, stripped
% which fdisk
/sbin/fdisk
% file /sbin/fdisk
/sbin/fdisk: ELF 64-bit LSB pie executable, x86-64, version 1 (FreeBSD), dynamically linked, interpreter /libexec/ld-elf.so.1, for FreeBSD 14.0 (1400024), FreeBSD-style, stripped
% apropos fdisk
cfdisk-linux, cfdisk(8) - Curses based disk partition table manipulator for Linux
fdisk(8) - PC slice table maintenance utility
fdisk-linux, fdisk(8) - Partition table manipulator for Linux
sfdisk-linux, sfdisk(8) - Partition table manipulator for Linux
% man 8 fdisk
%
Comment 1 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-07-09 09:05:21 UTC
Indeed, it also uses old adX for ATA disks and enumerates SCSI ones incorrectly in the example:

> Usage: fdisk [-l] [-b SSZ] [-u] device
> E.g.: fdisk /dev/ad0  (for the first IDE disk)
>  or: fdisk /dev/da0  (for the third SCSI disk)
Third SCSI disk is not da0, but da2.  I'll see what I can do.
Comment 2 commit-hook freebsd_committer freebsd_triage 2021-07-09 10:36:59 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2602a64fe76069a5467c3b2ecc9dc38f49857b2b

commit 2602a64fe76069a5467c3b2ecc9dc38f49857b2b
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-07-09 10:34:36 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-07-09 10:34:41 +0000

    sysutils/linuxfdisk: the port had been further improved (+)

    - When printing usage information, give proper references to the
      programs installed by this port, to avoid possible confusion with
      similarly named FreeBSD native ones
    - Use modern /dev/adaX names for ATA disks in the examples rather
      than legacy /dev/adX which do not exist since 2015
    - Do not hardcode UTIL_LINUX_VERSION, its value is correctly passed
      on the command line during the build

    PR:     257071

 sysutils/linuxfdisk/files/patch-FreeBSD | 144 ++++++++++++++++++++++----------
 1 file changed, 99 insertions(+), 45 deletions(-)
Comment 3 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-07-09 10:39:50 UTC
Should be fixed now, I believe; please let me know if I've missed anything.
Comment 4 Graham Perrin freebsd_committer freebsd_triage 2021-07-09 21:08:29 UTC
Thanks for fixing so quickly!