Dear BSD users,
I could use some help with the following. I'm working on a solution to automate port building for my project, ZFSguru. Previously I used scripts that do this semi automated, but now I'm working on a solution with full automation.
The actual building of the ports works great. But what about the port options? Typically,
The solutions I have looked at:
Now I don't want to make things too complicated. All I really want is this:
1)
2) the default port options are chosen, and written to the /var/db/ports directory
This allows me to grab /var/db/ports and compare it with the stored options to see if any option has changed. If there is a change, then the human operator must decide about the option before the build process is started again for that port.
The problem is,
So all I want is to use
Would love some suggestions on how to resolve this.
Your help is much appreciated!
Kind regards,
sub.mesa / Jason
I could use some help with the following. I'm working on a solution to automate port building for my project, ZFSguru. Previously I used scripts that do this semi automated, but now I'm working on a solution with full automation.
The actual building of the ports works great. But what about the port options? Typically,
make config
is used to set option knobs. This can only be used interactively. And I want a scripted solution.The solutions I have looked at:
- Usage of the BATCH argument as in
make -DBATCH
. This works, but will build all ports with default knobs. - Usage of
make config
or just plainmake install
using a non-interactive terminal (script). This works much the same as the BATCH solution above. - Read the MakeFile from applicable ports and create a substitute of
make config
just for my purpose. - Patch/Modify
dialog4ports
so that I extract the options from the Input (stdin).
Now I don't want to make things too complicated. All I really want is this:
1)
make config
or similar command executed by script2) the default port options are chosen, and written to the /var/db/ports directory
This allows me to grab /var/db/ports and compare it with the stored options to see if any option has changed. If there is a change, then the human operator must decide about the option before the build process is started again for that port.
The problem is,
make config
when used in non-interactive shell, will indeed choose the default port options and continue with the port build process. However, it does NOT write the default port knobs in /var/db/ports directory. It only creates an empty directory such as /var/db/ports/devel_gmake. What is missing is the /var/db/ports/devel_gmake/options file with things like:
Code:
# This file is auto-generated by 'make config'.
# Options for gmake-3.82_1
_OPTIONS_READ=gmake-3.82_1
_FILE_COMPLETE_OPTIONS_LIST=NLS
OPTIONS_FILE_SET+=NLS
So all I want is to use
make config
in a scripted environment, equivalent to an interactive shell using make config
and pressing the Enter key when presented with the port options. This will choose the defaults and write the chosen options to the options file located in /var/db/ports directory. But this is not working in a non-interactive shell because no options file is created.Would love some suggestions on how to resolve this.
Your help is much appreciated!
Kind regards,
sub.mesa / Jason