OPNsense Forum

English Forums => General Discussion => Topic started by: Greg_E on May 10, 2024, 10:34:18 PM

Title: OPnsense code base?
Post by: Greg_E on May 10, 2024, 10:34:18 PM
I thought I read this somewhere, but couldn't find it again... How much of the code base in OPNense is still taken from the pfsense code?

I'm not talking about the different parts and bits that are common in BSD itself, just trying to see how much of the fork is still left in the OPNsense code.

I thought that I read, not very much if anything is left from the fork those almost 10 years ago, but I couldn't find that link anywhere.
Title: Re: OPnsense code base?
Post by: mimugmail on May 11, 2024, 03:07:55 PM
There is no public tracker, I'd guess around 20%?
Title: Re: OPnsense code base?
Post by: guest43464 on May 12, 2024, 02:36:33 AM
https://docs.opnsense.org/history/thefork.html

QuoteWelcome to about the fork. This page is intended to explain the original motivation for forking, but keep in mind that currently less than 10% of the original legacy code base remains.
Title: Re: OPnsense code base?
Post by: Greg_E on May 12, 2024, 09:42:15 AM
I skimmed that again when I was searching and didn't see it, might have been an old version that I found. Feeding a forum war in another forum where someone said OPN would be dead if PFsense closed its source, and I knew better but wanted proof.
Title: Re: OPnsense code base?
Post by: mimugmail on May 12, 2024, 11:57:51 AM
Quote from: Greg_E on May 12, 2024, 09:42:15 AM
I skimmed that again when I was searching and didn't see it, might have been an old version that I found. Feeding a forum war in another forum where someone said OPN would be dead if PFsense closed its source, and I knew better but wanted proof.

The usual drama
Title: Re: OPnsense code base?
Post by: Greg_E on May 13, 2024, 03:42:43 PM
Yes, the usual garbage. But setting the record straight is important, fact is that closing PF sources down would only (maybe) slow OPN down a bit for a time period until they overcame that hurdle.

My only concern, and that is also mirrored by others that keep a calm head, is the lack of new developers in BSD. Truenas is slowly going to end up on Linux only, most of the work is going into Truenas Scale right now and Core is being very slow. Rumor is that PF will be going to Linux, but that might have been an April Fools thing that just didn't get taken down.

Directly porting OPN to Linux isn't really possible, but after a long process might be a working solution. And it might be one that needs to be made as BSD development falls off even more. Oracle (the new champion of open source) should bring Open Solaris back to contribute to the BSD base. But notice that Oracle is pushing their Linux, not reviving Open Solaris.
Title: Re: OPnsense code base?
Post by: bimbar on May 13, 2024, 03:54:42 PM
Quote from: Greg_E on May 13, 2024, 03:42:43 PM
Yes, the usual garbage. But setting the record straight is important, fact is that closing PF sources down would only (maybe) slow OPN down a bit for a time period until they overcame that hurdle.

My only concern, and that is also mirrored by others that keep a calm head, is the lack of new developers in BSD. Truenas is slowly going to end up on Linux only, most of the work is going into Truenas Scale right now and Core is being very slow. Rumor is that PF will be going to Linux, but that might have been an April Fools thing that just didn't get taken down.

Directly porting OPN to Linux isn't really possible, but after a long process might be a working solution. And it might be one that needs to be made as BSD development falls off even more. Oracle (the new champion of open source) should bring Open Solaris back to contribute to the BSD base. But notice that Oracle is pushing their Linux, not reviving Open Solaris.

Also, FreeBSD ist fairly slow compared to Linux.
Title: Re: OPnsense code base?
Post by: franco on May 13, 2024, 04:33:45 PM
> Also, FreeBSD ist fairly slow compared to Linux.

This was (and should be) discussed elsewhere.

> But setting the record straight is important, fact is that closing PF sources down would only (maybe) slow OPN down a bit for a time period until they overcame that hurdle.

For context, pfSense was limiting / hiding tools.git access by asking to mail an SSH key to them to be granted access in 2014. This was likely done to prevent misuse/forking/external contributions, but eventually had no effect and in late 2015 it was back again...

Longer story here: https://lastsummer.de/pfsense-freebsd-source-and-ports-repositories-are-back/

Meanwhile we had to fork (there were at least two fork propositions actually) and OPNsense made it through mostly by cutting through the engineering mistakes of the parent project's past which multiple people were working on willing to upstream but never accomplished, adopting flatter Git source code management spanning several repositories, rewriting the build tools from scratch (which back then were based on heavily modified FreeSBIE) and so on and so forth.

If anything the owners of pfSense thought they could accomplish crushing competition but ended up trying in vain for many years and were actually forced to improve their product and appearance and business practice. I don't think it ever matured fully given the scandals that keep happening (WireGuard kernel module, Plus no longer free, new online-only installers just to name the most recent ones), but to some degree it could have been much worse if OPNsense would not have prevailed.

As for FreeBSD it seems BSD use is converging a bit in the direction of FreeBSD (haters please hate, but I think it's true and a bit sad), but the fairy tale of a dying BSD is as undying as BSD itself with all of its pros and cons.


Cheers,
Franco
Title: Re: OPnsense code base?
Post by: franco on May 13, 2024, 04:54:26 PM
PS: To answer the original question... it's difficult to derive meaningful statistics to compare but I'd say about 25% code is still shared between projects. However, only about 5% remains unchanged from the time of the fork for various reasons.

From a core perspective since the fork at least 70% of static PHP GUI pages have been converted to MVC/API so we are slowly closing in on our long term goal of removing these GUI parts completely and reaching a point where we can achieve privilege separation between PHP and the root user in the web server.
Title: Re: OPnsense code base?
Post by: Greg_E on May 13, 2024, 05:45:34 PM
I guess I should try and end this so things don't get out of hand...

There are pros and cons to each and there will be people that favor one over the other. There is enough space for both and you can choose based on your philosophical reasons. I made my choice after reading back to the beginning, some of this is mentioned in Franco's post and I think the link he gave. I started digging when it became obvious that PF was going to let the CE version slowly differ from the + version and eventually (probably) stop updating it altogether. At that time I started reading up on OPN, and read way back into 2014-15 and decided I didn't like something I read. I coupled that with the way the responded to that issue that had raised it's head and determined a pattern. I was done at that point.

I should also point out that OPN business license was cheaper for me, so win/win as far as I'm concerned.

We can probably close this now, again, I don't want things to get out of hand like they sometimes can with threads like this.
Title: Re: OPnsense code base?
Post by: franco on May 13, 2024, 08:36:49 PM
Hey Greg,

I don't mind a discussion. I just don't want this valid discussion be tainted by Linux vs. BSD because it's off topic (and a number of these threads exist).

> There are pros and cons to each and there will be people that favor one over the other. There is enough space for both and you can choose based on your philosophical reasons.

I concur. Also for technical reasons. Both have their strengths. Use what works for you. That's the freedom of choice. :)


Cheers,
Franco