Bug 257072 - sysutils/linuxfdisk sfdisk-linux -s cannot open /proc/partitions
Summary: sysutils/linuxfdisk sfdisk-linux -s cannot open /proc/partitions
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 07:01 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 07:01:33 UTC
root@mowa219-gjp4-8570p:~ # sfdisk-linux -s
cannot open /proc/partitions
total: 0 blocks
root@mowa219-gjp4-8570p:~ # sfdisk-linux -s /dev/da2
15155200
root@mowa219-gjp4-8570p:~ # mount | grep proc
procfs on /proc (procfs, local)
linprocfs on /compat/linux/proc (linprocfs, local)
linprocfs on /compat/ubuntu/proc (linprocfs, local)
root@mowa219-gjp4-8570p:~ # uname -KrU
14.0-CURRENT 1400025 1400025
root@mowa219-gjp4-8570p:~ # pkg query '%o %v %R' linuxfdisk
sysutils/linuxfdisk 2.11z FreeBSD
root@mowa219-gjp4-8570p:~ # % man 8 sfdisk-linux

…
SFDISK(8)                  Linux Programmer's Manual                 SFDISK(8)

…
       If the partition argument is omitted, sfdisk will list the sizes of all
       disks, and the total:
              % sfdisk-linux -s
              /dev/ad0: 208896
              /dev/ad1: 1025136
              /dev/ad2: 1031063
              /dev/da0: 8877895
              /dev/da1: 1758927
              total: 12901917 blocks
              %
Comment 1 commit-hook freebsd_committer freebsd_triage 2021-07-09 08:06:33 UTC
A commit in branch main references this bug:

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

commit f23c04a72db50cb8ce679caf4a7997cde166afdf
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2021-07-09 08:03:48 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2021-07-09 08:03:42 +0000

    sysutils/linuxfdisk: use better PROC_PARTITIONS path on FreeBSD

    Originating from GNU/Linux, this code had naturally defined the
    PROC_PARTITIONS macro as "/proc/partitions", while we typically
    mount this file system under "/compat/linux/proc/partitions" on
    FreeBSD.  Fix two (out of four) definitions which appear in the
    generated executables, so e.g. `sfdisk-linux -s' would now work
    correctly so long as linprocfs(5) is mounted.  While at it, set
    the LICENSE (GPLv2+) and bump PORTREVISION so users could enjoy
    less buggy package.

    PR:     257072

 sysutils/linuxfdisk/Makefile            |  3 +++
 sysutils/linuxfdisk/files/patch-FreeBSD | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2021-07-09 08:08:01 UTC
Should be fixed now, thanks for reporting!
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2021-07-09 21:08:59 UTC
Thanks for fixing so quickly!