Page MenuHomeFreeBSD

uniquefiles.mk: Let ports override directories
Needs ReviewPublic

Authored by 0mp on May 17 2021, 3:06 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Oct 19, 11:17 AM
Unknown Object (File)
Sun, Oct 19, 11:17 AM
Unknown Object (File)
Sun, Oct 19, 5:39 AM
Unknown Object (File)
Sat, Oct 18, 9:41 PM
Unknown Object (File)
Sep 4 2025, 3:44 AM
Unknown Object (File)
Sep 3 2025, 11:35 PM
Unknown Object (File)
Sep 3 2025, 3:05 PM
Unknown Object (File)
Sep 3 2025, 8:33 AM
Subscribers
None

Details

Reviewers
mat
pizzamig
Group Reviewers
portmgr
Summary

This patch makes it possible to override directory manually names when
USES=uniquefiles:dirs is used. Some ports like Ansible have to override
values of ETCDIR and DATADIR in order to preserve the defaults and POLA.
Currently, Ansible ports override ETCDIR and DATADIR after including
bsd.port.mk, which feels like a hack.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 39245
Build 36134: arc lint + arc unit

Event Timeline

0mp requested review of this revision.May 17 2021, 3:06 PM

Idea: Alternatively, maybe we can use ?= instead of = to assign those *DIR variables so that uniquefile.mk does not assign values if the port already did that.

sysutils/ansible/Makefile is still using that ugly workaround:

.include <bsd.port.mk>

# Make sure that we override the unique DATADIR and ETCDIR set
# by the implicit USES=uniquefiles.
DATADIR=	${ANSIBLE_DATADIR}
ETCDIR=		${ANSIBLE_ETCDIR}

Let me know if I can land it.

I'd rather we used ?= here.

Also, ansible ahould probably not be using USE_PYTHON=concurrent

In D30315#1225899, @mat wrote:

Also, ansible ahould probably not be using USE_PYTHON=concurrent

And I know I am the one who added it, but at the time, we did produce two packages for ansible, one for python 2 and one for python 3.

As we don't produce python 2 ports any more, concurrent should probably be removed from ports like ansible.