G
gcooper
Guest
This is an advanced guide. If you aren't willing to spend the time figuring out how this works, wait until the plugins code is available and there's a properly documented API / procedure on how to accomplish this!
Preconditions:
This document assumes:
1. That you're running a version of FreeNAS pre-8.2.0 .
2. That you're not scared of make, shell scripts, Makefiles, and reading logs.
3. You are familiar with FreeBSD and FreeBSD ports.
4. You're running FreeBSD when you're doing this development.
5. You've pulled the entire FreeNAS workspace at least once.
Steps:
1. cd FreeBSD/ports .
2. cd to your port directory; search through freshports.net for the port if you don't know the exact path.
3. Run the following command with all your desired options (replace $OPTIONS with 'WITHOUT_X11=y', etc) on the directory:
4. Edit freenas-common to add the lines printed out with the above command and the options you specified.
5. Run the build once to get a fat image and build the packages.
6. Run the build again to produce a thin image and sanity check the dependencies; the second pass will fail if you miss dependencies; you'll need to adjust freenas-common after adding the missing dependencies and try again. Repeat steps 4., 5., and 6. until the build passes.
Stripped down example of step 3. with nagios:
TODO:
1. Add directions on how to debug trivial scenarios.
2. Make a more complete example
Preconditions:
This document assumes:
1. That you're running a version of FreeNAS pre-8.2.0 .
2. That you're not scared of make, shell scripts, Makefiles, and reading logs.
3. You are familiar with FreeBSD and FreeBSD ports.
4. You're running FreeBSD when you're doing this development.
5. You've pulled the entire FreeNAS workspace at least once.
Steps:
1. cd FreeBSD/ports .
2. cd to your port directory; search through freshports.net for the port if you don't know the exact path.
3. Run the following command with all your desired options (replace $OPTIONS with 'WITHOUT_X11=y', etc) on the directory:
Code:
make describe $OPTIONS | cut -d'|' -f 12 | sed -e 's,/usr/ports/,,g' | tr ' ' '\n' | sed -E -e 's/^/add_port /g'
4. Edit freenas-common to add the lines printed out with the above command and the options you specified.
5. Run the build once to get a fat image and build the packages.
6. Run the build again to produce a thin image and sanity check the dependencies; the second pass will fail if you miss dependencies; you'll need to adjust freenas-common after adding the missing dependencies and try again. Repeat steps 4., 5., and 6. until the build passes.
Stripped down example of step 3. with nagios:
Code:
$ cd /usr/ports $ cd net-mgmt/nagios $ make describe WITHOUT_EMBEDDED_PERL=y | cut -d'|' -f 12 | sed -e 's,/usr/ports/,,g' | tr ' ' '\n' | sed -E -e 's/^/add_port /g' add_port converters/libiconv add_port devel/libltdl add_port graphics/gd add_port lang/php5 add_port net-mgmt/nagios-plugins
TODO:
1. Add directions on how to debug trivial scenarios.
2. Make a more complete example