Question for the devs - why the fork of the FreeBSD ports tree?

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Hey folks,

while working on the collectd plugin for OPNsense I stumbled across the fact that the collectd plugin "cputemp" is not included in the FreeBSD port.
Though I know that it is present in FreeNAS. And, heck, temperatures are the single one most important metric to monitor in my book!

A quick pointer to how you implemented that would be great!

Thanks in advance,
Patrick
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
To be more specific: I have no clue where /usr/lib/collectd/cputemp.ko is coming from. It is not in the FreeBSD port and I could not find the code that installs it after cloning the "build" and the "freenas" git repo.

Where the ... does that module get installed and how? It's not even on the collectd wiki!
I want this in OPNsense ...

Thanks,
Patrick
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Got it. Thanks!

But that leads to the next question. So in case of the port I am interested in iXsystems devs
  • apparently forked the entire FreeBSD ports tree for FreeNAS
  • added lots of interesting things to the collectd5 port
  • under what is essentially a BSD two clause license
  • and decided not to upstream those patches
Why? How do you keep your modifications and upstream updates in sync? I really don't understand why anyone would not upstream, like, everything eligible - because that way you get it off your desk, right?
Maintaining a local modified copy of ports sucks rocks. BTDT!

My initial motivation is that I want a cputemp measurement in OPNsense. What would you suggest I do?
  • pick the iXsystems additions that I think are useful in a general context, and upstream them to FreeBSD myself? Of course giving proper credit - just leave the copyright notice in. It's all BSD, right?
  • import just the cputemp plugin into OPNsense?
I think the latter doesn't make much sense because contrary to FreeNAS OPNsense seems to use the FreeBSD ports tree as is, while relying on HardenedBSD for the base OS.

Difficult ...

Any comments appreciated.

Take care,
Patrick
 
Last edited:

ornias

Wizard
Joined
Mar 6, 2020
Messages
1,458
apparently forked the entire FreeBSD ports tree for FreeNAS

I can think a few reasons to fork it (if they keep it in sync) such as:
- pre-building ports and distributing the fork across offices to test changes before upstreaming
- changes that are specific to TrueNAS that they don't expect them to get accepted upstream

  • added lots of interesting things to the collectd5 port
Well, as you also found them interesting, I think that describes why they did them, doesn't it ;)

  • under what is essentially a BSD two clause license
What does the licence have to do with this?

decided not to upstream those patches
I Agree: Thats kinda a big no-no, upstreaming isn't really required, but one can at least give it a try (even if it is just to keep up appearances)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
What does the licence have to do with this?
It means that a third party (me) could take these changes and upstream them to FreeBSD. It just feels odd. That's why I ask.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
I gave up using the ports tree for doing serious work a long time ago, because it would continue what I deemed to be a bad strategy, which is that it spams stuff into the host OS. This makes it nearly impossible to determine what dependencies are, especially if you have a host that is performing multiple functions, and it also makes it very difficult to independently update things like OpenSSL or to choose alternative implementations but only for a single service.
That's the point I don't get. All ports install into /usr/local by default. None of the base OS utilities touch anything in there, neither do the ports touch anything outside. What do you mean by "spams"?

rm -rf /usr/local /var/db/pkg/* --> mostly virgin OS.
 

Tigersharke

BOfH in User's clothing
Administrator
Moderator
Joined
May 18, 2016
Messages
892
Some tangential discussion mostly on the topic of FreeBSD ports and packages has been moved to its own thread.

What do you mean by "spams"?
Answered here:
 
Last edited:
Top