Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 May 2026 14:33:49 +0000
From:      Dag-Erling=?utf-8?Q? Sm=C3=B8rg?=rav <des@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 98103f194302 - main - Mk/bsd.port.mk: Add EXTRACT_ENV
Message-ID:  <6a18524d.21e1d.19490121@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by des:

URL: https://cgit.FreeBSD.org/ports/commit/?id=98103f19430200b36e9adcb10ed8831ce9ffc42f

commit 98103f19430200b36e9adcb10ed8831ce9ffc42f
Author:     Dag-Erling Smørgrav <des@FreeBSD.org>
AuthorDate: 2026-05-28 14:33:27 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2026-05-28 14:33:27 +0000

    Mk/bsd.port.mk: Add EXTRACT_ENV
    
    Add an EXTRACT_ENV variable which defaults to LC_ALL=C.UTF-8.  We set
    LC_ALL=C globally to ensure our scripts work the way we intend them to,
    but this causes tar and unzip to fail to extract distfiles containing
    names that cannot be expressed in ASCII.  This was previously masked by
    a bug in libarchive which caused tar and unzip to fail to notice that
    these names were unconvertible and just pass them through unchanged.
    
    MFH:            2026Q2
    Reviewed by:    bapt
    Differential Revision:  https://reviews.freebsd.org/D57295
---
 Mk/bsd.port.mk | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 3d480d0346cb..46a2c6eda5e3 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -680,6 +680,7 @@ FreeBSD_MAINTAINER=	portmgr@FreeBSD.org
 #
 # For extract:
 #
+# EXTRACT_ENV	- Environment to pass to ${EXTRACT_CMD}
 # EXTRACT_CMD	- Command for extracting archive
 #				  Default: ${TAR}
 # EXTRACT_BEFORE_ARGS
@@ -2143,6 +2144,7 @@ PATCH_DIST_ARGS+=	--suffix .orig
 TAR?=	/usr/bin/tar
 
 # EXTRACT_SUFX is defined in .pre.mk section
+EXTRACT_ENV?=	LC_ALL=C.UTF-8
 EXTRACT_CMD?=	${TAR}
 EXTRACT_BEFORE_ARGS?=	-xf
 EXTRACT_AFTER_ARGS?=	--no-same-owner --no-same-permissions
@@ -3209,7 +3211,8 @@ clean-wrkdir:
 .    if !target(do-extract)
 do-extract: ${EXTRACT_WRKDIR}
 	@for file in ${EXTRACT_ONLY}; do \
-		if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
+		if ! (cd ${EXTRACT_WRKDIR} && ${EXTRACT_ENV} ${EXTRACT_CMD} \
+		    ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
 		then \
 			${ECHO_MSG} "===>  Failed to extract \"${_DISTDIR}/$$file\"."; \
 			exit 1; \


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a18524d.21e1d.19490121>