OPNsense Forum

English Forums => General Discussion => Topic started by: squirk on November 27, 2023, 04:52:44 PM

Title: opnsense ports/package vs freebsd (vs mimugmail)
Post by: squirk on November 27, 2023, 04:52:44 PM
My goal: I'm trying to get Homebridge running.

I'm using mimugmail's pkg repo (thanks!) to set up a few other plugins (adguard, etc) and it provides an outdated version of nodejs and after hunting around, I think I need to build node20 and others from ports. 

I'm not sure how opnsense differs from the base freebsd.  I don't see anything special in make.conf or src.conf... It's been a long time since I've built ports (having switched to pkg a long time ago).   Is there a decent Getting Started primer documented somewhere?
Title: Re: opnsense ports/package vs freebsd (vs mimugmail)
Post by: squirk on November 28, 2023, 12:55:50 PM
Maybe more to the point: why is the FreeBSD package repo specifically disabled ( "{enabled=no}" in /usr/local/etc/pkg/repos)? 

Why not just leave it enabled with the OPNSense repo with preferred priority?  Assuming an up-to-date opnsense system, wouldn't the freebsd package be ok?
Title: Re: opnsense ports/package vs freebsd (vs mimugmail)
Post by: mimugmail on November 28, 2023, 01:03:31 PM
I can add node20 to my build if it helps :)
Title: Re: opnsense ports/package vs freebsd (vs mimugmail)
Post by: franco on November 28, 2023, 01:16:18 PM
Repo priorities in pkg-ugrade are fluent and make.conf options differ for us, see:

https://github.com/opnsense/tools/blob/master/config/23.7/make.conf


Cheers,
Franco
Title: Re: opnsense ports/package vs freebsd (vs mimugmail)
Post by: squirk on November 28, 2023, 01:17:30 PM
Adding it would be great, thanks.  But in the spirit of teach-a-man-to-fish, I'd love to know what your recipe is so that I could do it myself if needed.
Title: Re: opnsense ports/package vs freebsd (vs mimugmail)
Post by: mimugmail on November 28, 2023, 05:46:44 PM
No recipie, I just use the build tools and add additonal ports. You can do this on your own of course :)
Title: Re: opnsense ports/package vs freebsd (vs mimugmail)
Post by: squirk on December 13, 2023, 05:08:26 PM
I've been noodling around with this a bit and am finally trying to get this to work.  I'm using a FreeBSD 13.2-stable system as a build host, fwiw.

I'm having a bit of trouble grok'ing how things are set up.  Currently stuck very early in the `make ports` process:
Installed pkg version '1.20' does not match required version '1.19'

That seems really odd that the source has an old version of ports-mgmt/pkg - the 2023Q4, on my running opnsense server, both /usr/sbin/pkg & /usr/local/sbin/pkg report `1.20.8` (build host reports 1.20.9).

I *think* I followed the setup instructions properly... is there a step I missed?  I think I'm using the correct source, my ports clone is from `https://github.com/opnsense/ports`

gusnbrew# pwd
/usr/opnsense/ports
gusnbrew# git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master
  remotes/origin/pkg_update


opnsense tools:
gusnbrew# pwd
/usr/opnsense/tools
gusnbrew# git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/master


Is there a good conversation somewhere there some of the source & build management rationale is discussed?