On 22/08/2023 05:34, Warner Losh wrote:

    How might I use /etc/src.conf to achieve much the same, with a
    different port?



I thought stuff like this went in ports.conf...

…

Warner solves another mystery. Thanks!

Honestly, I was oblivious to the possibility:

% man -P cat 5 ports.conf
No manual entry for ports.conf
% apropos ports.conf
apropos: nothing appropriate
% rg -i -e 'ports\.conf' /usr/doc/website/content/en
% rg -i -e 'ports\.conf' /usr/doc/documentation/content/en
%

– and so on. As far as I can tell, it's not documented in the usual places.

Eventually, Google helped to remind me of a 2021 comment <https://github.com/freebsd/poudriere/issues/835#issuecomment-962728743>, where part of the previous person's comment had never sunk in. I wrote:

(I never used ports-mgmt/portconf, and so on.)


So:


% gh repo sync grahamperrin/freebsd-ports && git -C /usr/ports pull --ff-only --quiet && git -C /usr/ports pull --ff-only freebsd main
✓Synced the "grahamperrin:main" branch from "freebsd:main"
Updating files: 100% (35/35), done.
From https://git.freebsd.org/ports
* branch                      main       -> FETCH_HEAD
  15a5c70847f1..355374a1f6be  main       -> freebsd/main
Already up to date.
% sudo pkg install ports-mgmt/portconf
grahamperrin's password:
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating poudriere repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01
Fetching packagesite.pkg: 100%    2 KiB   2.2kB/s    00:01
The provides database is up-to-date.
Processing entries: 100%
poudriere repository update completed. 7 packages processed.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
       portconf: 1.6_1 [FreeBSD]

Number of packages to be installed: 1

2 KiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching portconf-1.6_1.pkg: 100%    2 KiB   2.3kB/s    00:01
Checking integrity... done (0 conflicting)
[1/1] Installing portconf-1.6_1...
[1/1] Extracting portconf-1.6_1: 100%
Spamming /etc/make.conf... Done.
=====
Message from portconf-1.6_1:

--
To set port-specific make variables, create the
/usr/local/etc/ports.conf configuration file
with the following syntax:


# this is a comment
*: NOPORTDOCS
editors/openoffice-3: WITH_CCACHE|LOCALIZED_LANG=it
print/ghostscript-* print/lpr-wrapper: A4
sysutils/fusefs-kmod*: !KERNCONF | !NOPORTDOCS
www/firefox-i18n: WITHOUT_SWITCHER | FIREFOX_I18N=fr it
x11/fakeport: CONFIGURE_ARGS=--with-modules="aaa bbb ccc"


Global port directory patterns and blanks around the
pipe "|" symbol are allowed.
Values shouldn't be quoted even if they contain spaces.
Lines beginning with a '#' are comments.
% apropos ports.conf
apropos: nothing appropriate
% rg --count -e 'ports\.conf' /usr/ports
/usr/ports/net-mgmt/ocsinventory-ocsreports/files/pkg-message.in:1
/usr/ports/ports-mgmt/portconf/files/pkg-message.in:1
/usr/ports/ports-mgmt/portconf/files/portconf.sh.in:1
^C
% sudo nano /usr/local/etc/ports.conf
grahamperrin's password:
% cat /usr/local/etc/ports.conf
graphics/gpu-firmware-radeon-kmod: FLAVORS=btc sumo turks
%


Still, there's guesswork. I have /no/ idea whether the FLAVORS part of that last line is valid :-)

Time will tell.

Reply via email to