I have noticed that the default ETCDIR for sysutils/py-mqttwarn is: [11:57 mydev dvl /usr/ports/sysutils/py-mqttwarn] % make -V ETCDIR /usr/local/etc/py311-mqttwarn I expect this to not contain the Python prefix. There is not reason for this to be a Python-specific directory. However, changing that default is awkward. This doesn't work: .include <bsd.port.pre.mk> ETCDIR=${PREFIX}/etc/${PORTNAME} .include <bsd.port.post.mk> % make -V ETCDIR /usr/local/etc/py311-mqttwarn This does work: .include <bsd.port.mk> ETCDIR=${PREFIX}/etc/${PORTNAME} % make -V ETCDIR /usr/local/etc/mqttwarn But makes portlint unhappy: FATAL: Makefile: the last line of Makefile has to be .include <bsd.port(.post).mk> (or .endif in the case of a conditional) I note a few major ports do take this last approach: * sysutils/py-ansible-core * sysutils/py-ansible-core219 Am I doing this wrong and I should be using the python-prefixed ETCDIR? Is something else broken? What's up please?
Did you tried: ETCDIR=${PREFIX}/etc/${PORTNAME} .include <bsd.port.pre.mk> ... .include <bsd.port.post.mk> ?
(In reply to Vladimir Druzenko from comment #1) No, but here that is: [15:08 pkg01 dvl ~/ports/head/sysutils/py-mqttwarn] % make -V ETCDIR /usr/local/etc/py311-mqttwarn [15:08 pkg01 dvl ~/ports/head/sysutils/py-mqttwarn] % tail Makefile ETCDIR=${PREFIX}/etc/${PORTNAME} .include <bsd.port.pre.mk> .include <bsd.port.post.mk>
(In reply to Dan Langille from comment #2) Mk/Uses/uniquefiles.mk(90): ETCDIR= ${PREFIX}/etc/${UNIQUE_PREFIX}${PORTNAME} Mk/Uses/python.mk(60): # concurrent - Indicates that the port can be installed for # different python versions at the same time. The port # is supposed to use a unique prefix for certain # directories using USES=uniquefiles:dirs (see the # uniquefiles.mk Uses for details about the # directories), if set to yes. Binaries receive an # additional suffix, based on ${PYTHON_VER}. This port can be installed on same host multiple times with different python versions. Each instance have separate ETCDIR.
(In reply to Vladimir Druzenko from comment #3) You win all the points. [15:26 mydev dvl /usr/ports/sysutils/py-mqttwarn] % make -V ETCDIR /usr/local/etc/mqttwarn [15:27 mydev dvl /usr/ports/sysutils/py-mqttwarn] % git diff diff --git a/sysutils/py-mqttwarn/Makefile b/sysutils/py-mqttwarn/Makefile index 03829d2f1bba..c3bad17c67eb 100644 --- a/sysutils/py-mqttwarn/Makefile +++ b/sysutils/py-mqttwarn/Makefile @@ -29,7 +29,7 @@ RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}attrs>=19.3.0:devel/py-attrs@${PY_FLAVOR} \ USES= python shebangfix -USE_PYTHON= autoplist concurrent pep517 +USE_PYTHON= autoplist pep517 SHEBANG_REGEX= '.*\.py$$' NO_ARCH= yes [15:27 mydev dvl /usr/ports/sysutils/py-mqttwarn] % I added concurrent back in 2020, but do not know why. https://cgit.freebsd.org/ports/commit/sysutils/py-mqttwarn/Makefile?id=b46669dca631f099fa9ee1ff36a85f32bd05db87
(In reply to Dan Langille from comment #4) Happy to help!
Can this be closed or is there a patch on its way?
(In reply to Mateusz Piotrowski from comment #6) My immediate block is resolved.
I see now. I've developed a patch to allow overriding USES=uniquefiles which seems to be related: https://reviews.freebsd.org/D30315
I know it's probably a bit late to the party, but it does not feel like ETCDIR for py- ports should be versioned.