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)
Thu, Jan 22, 4:18 AM
Unknown Object (File)
Wed, Jan 14, 5:18 PM
Unknown Object (File)
Dec 17 2025, 1:39 PM
Unknown Object (File)
Dec 14 2025, 11:20 PM
Unknown Object (File)
Dec 12 2025, 1:19 PM
Unknown Object (File)
Nov 28 2025, 1:42 AM
Unknown Object (File)
Nov 26 2025, 8:18 AM
Unknown Object (File)
Nov 24 2025, 11:34 PM
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
R11 FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 68632
Build 65515: 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.

In D30315#1226268, @mat wrote:
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.

Right, so it seems there are two next steps here:

  • Remove concurrent from Ansible ports as Python 2 is no longer relevant
  • Use ?= for the different *DIR variables instead of introducing UNIQUE_*.