Configuration options – showconfig

When people ask me about packages versus ports, the one main advantage of ports over packages is the ability to set the configuration options. To set the configuration options for a given port, issue this command:

make config

Configuration options are stored in /var/db/ports. For example, the options for sysutils/bacula-server are:

$ less /var/db/ports/bacula-server/options
# This file is auto-generated by 'make config'.
# No user-servicable parts inside!
# Options for bacula-server-2.0.1
_OPTIONS_READ=bacula-server-2.0.1
WITHOUT_SQLITE3=true
WITHOUT_MYSQL=true
WITH_POSTGRESQL=true
WITHOUT_MTX=true
WITH_AUTOSETEOT=true
WITHOUT_NLS=true
WITH_OPENSSL=true

Wesley Shields contacted me me and suggested that FreshPorts should display this information. Well, not quite information. He was talking about this:

$ cd /usr/ports/sysutils/bacula-server
$ make showconfig
===> The following configuration options are available for bacula-server-2.2.7:
     SQLITE3=off "Use SqLite-3 database instead of SqLite-2"
     MYSQL=off "Use MySQL database instead of SqLite"
     POSTGRESQL=on "Use PostgreSQL database instead of SqLite"
     MTX=off "Install mtx for control of autochanger devices"
     NLS=off "Native Language Support via gettext utilities"
     OPENSSL=on "Enable OpenSSL for encrypted communication"
===> Use 'make config' to modify these settings
$

I’ve altered the FreshPorts code and database to cater for this. The script to load up initial values into the database has been tested. It’s ready to go. I found a few interesting situations where the output of make showconfig is unexpected. It is in all one line. Not pretty. Pretty ugly actually.


$ cd /usr/ports/java/diablo-jdk15
$ make showconfig
===> The following configuration options are available for diablo-jdk-1.5.0.07.01_9: TZUPDATE=on (default) "Update the time zone data"===> Use 'make config' to modify these settings$

The above output is all on one line. It has been wrapped above to suit the website.

There are 6 such ports. The following links show the ugly showconfig output.

  1. java/diablo-jre15
  2. java/diablo-jdk15
  3. java/jdk14
  4. java/jdk15
  5. java/jdk16
  6. textproc/ltxml

One thing that Wesley mentioned is I need to have an empty /var/db/ports. We may be able to do this with OPTIONSFILE set to a non-existant path. FreshPorts uses the following options when pulling stuff via make:

LOCALBASE=/nonexistentlocal X11BASE=/nonexistentx

The reason we want to use a non-existant OPTIONSFILE setting is to extract the default values for the port, and not the values chosen for the ports installed on the FreshPorts system.

Wesly is looking into the ugly output problem. I’ll look into using OPTIONSFILE.

ADDENDA: Wesly figures this problem may be caused by the redefintion of ECHO_MSG to /usr/bin/printf

It would be nice if this didn’t break showconfig

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top