Bug 260296 - irc/hexchat: sysinfo plugin calls df with nonexistent option --exclude-type=squashfs
Summary: irc/hexchat: sysinfo plugin calls df with nonexistent option --exclude-type=s...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Piotr Kubaj
URL:
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2021-12-09 20:43 UTC by Pau Amma
Modified: 2022-04-18 21:43 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (pkubaj)
pauamma: maintainer-feedback?


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pau Amma 2021-12-09 20:43:52 UTC
Should probably be "-t nosquashfs" instead (df is fine with that even if the filesystem isn't known to the kernel, at least for 12.2, as shown by "df -t nofnord").

Reported by WoC in IRC #freebsd.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2022-01-03 12:07:09 UTC
# df -k -l -P -t nosquashfs --exclude-type=devtmpfs --exclude-type=tmpfs
df: -l and -t are mutually exclusive.
Comment 2 Pau Amma 2022-01-04 02:04:58 UTC
(In reply to Piotr Kubaj from comment #1)
That's arguably a design flaw in df since it makes sense to me to use "-l -t nofoo" to restrict filesystem types further than "all local" (and even if it's not, it should be mentioned in df(1)). But that's neither here nor there. Unless and until that's changed, the solution/workaround is probably to get rid of all uses of --exclude-type.
Comment 3 Stefan Eßer freebsd_committer freebsd_triage 2022-01-04 13:22:54 UTC
I have added a patch to PR 260921 that allows -l and -t to be used together.

The example command:

# df -k -l -P -t nosquashfs --exclude-type=devtmpfs --exclude-type=tmpfs

could be specified as:

# df -k -l -t nosquashfs,devtmpfs,tmpfs

in df with the suggested patch applied.
Comment 4 Pau Amma 2022-04-07 21:08:44 UTC
(In reply to Stefan Eßer from comment #3)

Since that was MFC'd to 13 but not 12, I still think the port needs a workaround until 12 EOLs.
Comment 5 Piotr Kubaj freebsd_committer freebsd_triage 2022-04-07 21:53:47 UTC
Do you have a patch for the port? Per my understanding, using "df -k -l -t nosquashfs,devtmpfs,tmpfs" still won't work on stable/12.
Comment 6 Pau Amma 2022-04-08 01:04:47 UTC
(In reply to Piotr Kubaj from comment #5)
Not right now, but I made a note to try supplying one when I have a moment unless someone beats me to it.
Comment 7 Pau Amma 2022-04-18 21:43:05 UTC
(In reply to Piotr Kubaj from comment #5)
I just got confirmation that https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=260921 won't get MFC'd to 12, so someone (maybe me if and when I have the time, but don't hold your breath) needs to submit a patch.