I sometimes want to identify installed packages whose option values are different from the default. Though "make showconfig" and "make config" show the current option values, they don't tell which are same as or different from the default. Instead, I need to compare values with the value of OPTION variable in Makefile. My idea is to make "make showconfig" tell whether option values are same as the default. The patch attached implements the idea. Using this, I can easily find packages with non-default option values like this: % make showconfig-recursive | grep -v 'same as default' Fix: Patch attached with submission follows:
Responsible Changed From-To: freebsd-bugs->portmgr make this a ports PR and assign.
This will need a new patch as option framework as changed and is slightly different thus this a desired feature. regards, Bapt
Here's a mockup. http://people.freebsd.org/~bdrewery/bpm-show-default-options-in-showconfig.txt > - (~/freebsd/ports/ports-mgmt/tinderbox) $ make showconfig > ===> The following configuration options are available for tinderbox-4.0.0: > (default) CHECK_ROOT=on: Check if ./tc is run by uid 0 > (default) EMAILS=on: Support for build failure/completion emails > (default) LOG_COMPRESS=on: Support bzip'ing the logs > LSOF=off: For killMountProcesses() when using nullfs > ====> Options available for the multi DB: you have to choose at least one of them > PGSQL=off: PostgreSQL database > (default) MYSQL=on: MySQL database > SQLITE=off: SQLite database > ====> Options available for the radio WEB: you can only select none or one of them > (default) APACHE=on: Apache server > HIAWATHA=off: Hiawatha server > LIGHTTPD=off: Lighttpd server > NGINX=off: Nginx server > ===> Use 'make config' to modify these settings Note that LSOF here is OFF but it is ON by default. Since it doesn't match it doesn't show (default). Maybe it should just show a '*' and a note at the bottom that * means it matches the default? Regards, Bryan Drewery
Another mockup with a *: http://people.freebsd.org/~bdrewery/bpm-show-default-options-in-showconfig-star.txt > - (~/freebsd/ports/ports-mgmt/tinderbox) $ make showconfig > ===> The following configuration options are available for tinderbox-4.0.0: > (*) CHECK_ROOT=on: Check if ./tc is run by uid 0 > (*) EMAILS=on: Support for build failure/completion emails > (*) LOG_COMPRESS=on: Support bzip'ing the logs > LSOF=off: For killMountProcesses() when using nullfs > ====> Options available for the multi DB: you have to choose at least one of them > PGSQL=off: PostgreSQL database > (*) MYSQL=on: MySQL database > SQLITE=off: SQLite database > ====> Options available for the radio WEB: you can only select none or one of them > (*) APACHE=on: Apache server > HIAWATHA=off: Hiawatha server > LIGHTTPD=off: Lighttpd server > NGINX=off: Nginx server > ===> * = The selected value matches the default > ===> Use 'make config' to modify these settings Regards, Bryan
On Sat, Mar 09, 2013 at 05:43:17PM -0600, Bryan Drewery wrote: > Here's a mockup. > > http://people.freebsd.org/~bdrewery/bpm-show-default-options-in-showconfig.txt > > > - (~/freebsd/ports/ports-mgmt/tinderbox) $ make showconfig > > ===> The following configuration options are available for tinderbox-4.0.0: > > (default) CHECK_ROOT=on: Check if ./tc is run by uid 0 > > (default) EMAILS=on: Support for build failure/completion emails > > (default) LOG_COMPRESS=on: Support bzip'ing the logs > > LSOF=off: For killMountProcesses() when using nullfs > > ====> Options available for the multi DB: you have to choose at least one of them > > PGSQL=off: PostgreSQL database > > (default) MYSQL=on: MySQL database > > SQLITE=off: SQLite database > > ====> Options available for the radio WEB: you can only select none or one of them > > (default) APACHE=on: Apache server > > HIAWATHA=off: Hiawatha server > > LIGHTTPD=off: Lighttpd server > > NGINX=off: Nginx server > > ===> Use 'make config' to modify these settings > > > Note that LSOF here is OFF but it is ON by default. Since it doesn't > match it doesn't show (default). > > Maybe it should just show a '*' and a note at the bottom that * means it > matches the default? I like this one with (default) because explicit, you can keep the '*' for the pretty-print :) regards, Bapt
On Sat, Mar 09, 2013 at 05:43:17PM -0600, Bryan Drewery wrote: > Here's a mockup. > > http://people.freebsd.org/~bdrewery/bpm-show-default-options-in-showconfig.txt > > > - (~/freebsd/ports/ports-mgmt/tinderbox) $ make showconfig > > ===> The following configuration options are available for tinderbox-4.0.0: > > (default) CHECK_ROOT=on: Check if ./tc is run by uid 0 > > (default) EMAILS=on: Support for build failure/completion emails > > (default) LOG_COMPRESS=on: Support bzip'ing the logs > > LSOF=off: For killMountProcesses() when using nullfs > > ====> Options available for the multi DB: you have to choose at least one of them > > PGSQL=off: PostgreSQL database > > (default) MYSQL=on: MySQL database > > SQLITE=off: SQLite database > > ====> Options available for the radio WEB: you can only select none or one of them > > (default) APACHE=on: Apache server > > HIAWATHA=off: Hiawatha server > > LIGHTTPD=off: Lighttpd server > > NGINX=off: Nginx server > > ===> Use 'make config' to modify these settings > > > Note that LSOF here is OFF but it is ON by default. Since it doesn't > match it doesn't show (default). > > Maybe it should just show a '*' and a note at the bottom that * means it > matches the default? > > Regards, > Bryan Drewery > Approved with (default), please commit regards, Bapt
As we discussed privately, my patch was wrong. I had used OPTIONS_DEFAULT, but had trouble with DOCS/EXAMPLES/NLS/IPV6 and ended up incorrectly using PORT_OPTIONS. I've changed bsd.options.mk to support ALL_OPTIONS_DEFAULT which includes these. This now then compares the default value to the set value. http://people.freebsd.org/~bdrewery/bpm-show-default-options-in-showconfig-all-defaults.txt > - (~/freebsd/ports/Mk) $ make -C ../ports-mgmt/tinderbox showconfig > ===> The following configuration options are available for tinderbox-4.0.0: > (default) CHECK_ROOT=on: Check if ./tc is run by uid 0 > (default) EMAILS=on: Support for build failure/completion emails > (default) LOG_COMPRESS=on: Support bzip'ing the logs > (default) LSOF=off: For killMountProcesses() when using nullfs > ====> Options available for the multi DB: you have to choose at least one of them > (default) PGSQL=off: PostgreSQL database > (default) MYSQL=on: MySQL database > (default) SQLITE=off: SQLite database > ====> Options available for the radio WEB: you can only select none or one of them > (default) APACHE=on: Apache server > (default) HIAWATHA=off: Hiawatha server > (default) LIGHTTPD=off: Lighttpd server > (default) NGINX=off: Nginx server > ===> Use 'make config' to modify these settings After changing by selecting SQLITE and switching to HIAWATHA: > - (~/freebsd/ports/Mk) $ make -C ../ports-mgmt/tinderbox showconfig > ===> The following configuration options are available for tinderbox-4.0.0: > (default) CHECK_ROOT=on: Check if ./tc is run by uid 0 > (default) EMAILS=on: Support for build failure/completion emails > (default) LOG_COMPRESS=on: Support bzip'ing the logs > (default) LSOF=off: For killMountProcesses() when using nullfs > ====> Options available for the multi DB: you have to choose at least one of them > (default) PGSQL=off: PostgreSQL database > (default) MYSQL=on: MySQL database > SQLITE=on: SQLite database > ====> Options available for the radio WEB: you can only select none or one of them > APACHE=off: Apache server > HIAWATHA=on: Hiawatha server > (default) LIGHTTPD=off: Lighttpd server > (default) NGINX=off: Nginx server > ===> Use 'make config' to modify these settings It looks weird on the groups but does make sense IMHO. Bryan
Infrastructure PR.
That last one looks fine, please commit :-)