Re: ports-mgmt/portconf – not src.conf(5) – to specify multiple flavours of a port for buildkernel purposes

2023-08-22 Thread Graham Perrin


On 22/08/2023 06:42, Graham Perrin wrote:


…
% 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.

/me tails /var/log/buildkernel.log, rocks with laughter at innumerable 
warnings, cancels,


…
make[4028]: "/usr/ports/Mk/bsd.port.mk" line 5393: warning: duplicate 
script for target "sumo" ignored
make[4028]: "/usr/ports/Mk/Uses/kmod.mk" line 74: warning: using 
previous script for "sumo" defined here
make[4028]: "/usr/ports/Mk/bsd.port.mk" line 5402: warning: duplicate 
script for target 
"/usr/obj/usr/src/amd64.amd64/sys/GENERIC/usr/ports/graphics/gpu-firmware-radeon-kmod/work-"btc" 
ignored
make[4028]: "/usr/ports/Mk/Uses/kmod.mk" line 74: warning: using 
previous script for 
"/usr/obj/usr/src/amd64.amd64/sys/GENERIC/usr/ports/graphics/gpu-firmware-radeon-kmod/work-"btc" 
defined here
make[4028]: "/usr/ports/Mk/bsd.port.mk" line 5402: warning: duplicate 
script for target "sumo" ignored
make[4028]: "/usr/ports/Mk/Uses/kmod.mk" line 74: warning: using 
previous script for "sumo" defined here

env: sumo: No such file or directory
^C
%


, begins a new build that excludes GPU firmware whilst ignoring the 
relevance of 
, intends to 
build the modules with poudriere-devel after the OS is updated, 
rebelliously  begins a paragraph with a comma and makes a whitespace 
error that should be barely visible in the HTML version of this email 
that will not be seen in an archive :-)


ports-mgmt/portconf – not src.conf(5) – to specify multiple flavours of a port for buildkernel purposes

2023-08-21 Thread Graham Perrin

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 
, 
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.