Page MenuHomeFreeBSD

Uses/inotify.mk: Create
Needs ReviewPublic

Authored by adamw on Dec 7 2025, 11:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jan 10, 4:10 PM
Unknown Object (File)
Sat, Jan 10, 4:55 AM
Unknown Object (File)
Wed, Dec 31, 9:20 PM
Unknown Object (File)
Tue, Dec 30, 3:09 PM
Unknown Object (File)
Mon, Dec 29, 3:50 PM
Unknown Object (File)
Fri, Dec 26, 4:52 AM
Unknown Object (File)
Thu, Dec 18, 7:29 AM
Unknown Object (File)
Dec 15 2025, 6:51 PM

Details

Reviewers
None
Group Reviewers
portmgr
Summary

FreeBSD 15 added inotify support into libc, meaning that the libinotify port is only needed conditionally.

A quick and dirty grep suggests that we have somewhere around 100 ports that use it:

[1825.05 adamw@apnoea /usr/ports] rg :devel/libinotify | sort | uniq | wc -l
     103

The included diff is based largely off of iconv.h, but is much simpler. It determines what to do based on capability (presence of the associated header) rather than looking at OSVERSION. Because of pkgbase, I don't know whether we can rely on checking OSVERSION for these sorts of things.

Test Plan

I'll separately add a group of ports that are representative of the scope of libinotify, Based on my tests it's working well so far.

Diff Detail

Repository
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

adamw requested review of this revision.Dec 7 2025, 11:29 PM
adamw created this revision.

@portmgr: I've not submitted one of these before. Could you please take a gander and let me know if I'm on the right path and should continue putting work into this? Or is there a better approach that I overlooked?

It feels ok to me, yes.
Maybe there is a need to add some autotools env variables too, or maybe those should go in Templates/config.site.

Mk/Uses/inotify.mk
12

When writing .if/.else, the .if condition should be positive to make it easier to read.
Could you invert the condition and swap the two code blocks.

26โ€“28

Is this really needed? it feels like it should not be used as we have an implementation in the base system.

30โ€“35

Should this be outside of the .if/.else?
It feels like it should work in both cases.

How many ports does this actually affect as in does it make sense to add yet another USES helper? Ahh... about a hundred temporarily, I'm not sure if it's worth the effort then and handbook entry is missing too.

How many ports does this actually affect as in does it make sense to add yet another USES helper? Ahh... about a hundred temporarily, I'm not sure if it's worth the effort then and handbook entry is missing too.

If this were just a USES helper to simplify a dependency, I'd agree with you there. But this exists to make sure that the base library is used in the correct versions of FreeBSD, which means that each of those 100 ports (and any future ports that use inotify) would need that logic. North of 100 ports passes the bar for cost vs. DRY benefit for me personally. What feels like the right number for you, and also what would you recommend as an alternative?

This looks good, could my comments be addressed ?