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)
Mon, Nov 24, 11:34 PM
Unknown Object (File)
Mon, Nov 24, 4:29 AM
Unknown Object (File)
Sun, Nov 23, 5:00 AM
Unknown Object (File)
Sat, Nov 22, 1:18 AM
Unknown Object (File)
Fri, Nov 21, 2:38 PM
Unknown Object (File)
Thu, Nov 20, 10:20 AM
Unknown Object (File)
Wed, Nov 19, 10:24 AM
Unknown Object (File)
Tue, Nov 18, 6:25 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.

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_*.