Build and install a port in FreeNAS jail/FreeBSD from source

HowTo build and install a port in FreeNAS jail/FreeBSD from source

Make sure that the local ports repository is up-to-date:

  1. (Only the first time: portsnap fetch extract)
  2. All other times: portsnap update

(https://www.freebsd.org/doc/handbook/ports-using.html)

Possibly install/update synth if not already done

  1. cd /usr/ports/ports-mgmt/synth && make install clean
  2. Only update: synth install ports-mgmt/synth

Make and install the port using synth

  1. To build with non default configurations:
    1. Synth uses cached options if they have been saved. Synth will scan these options file before starting a build, and if any are obsolete (number of options don’t match the current port, the option names are different, etc) then it will print out the problematic ports and halt, recommending that the cached options either be removed or re-saved to something valid. To build a package with non-default options, just run “make -C /usr/ports/[category]/[portname] config” before staring a build.
  2. After you’ve configured the port or to just build and install with default configuration: synth install [category]/[portname]

ReadMe about Synth: https://github.com/jrmarino/synth
FreeBSD forum: https://forums.freebsd.org/threads/54690/

Leave a comment

Your email address will not be published. Required fields are marked *