Page MenuHomeFreeBSD

Ensure .CURDIR contains the absolute pathname without a trailing slash, otherwise a port may fail to build
ClosedPublic

Authored by jrm on Aug 9 2017, 2:18 PM.
Tags
None
Referenced Files
Unknown Object (File)
Jan 25 2025, 8:14 PM
Unknown Object (File)
Jan 25 2025, 7:29 PM
Unknown Object (File)
Dec 30 2024, 6:43 PM
Unknown Object (File)
Dec 29 2024, 2:41 PM
Unknown Object (File)
Dec 28 2024, 2:20 PM
Unknown Object (File)
Dec 27 2024, 3:55 AM
Unknown Object (File)
Dec 17 2024, 5:03 PM
Unknown Object (File)
Nov 21 2024, 5:11 PM
Subscribers

Details

Summary

Example breakage:
make -C /usr/ports/audio/teamspeak3-server/

I think using ${.CURDIR:tA} is preferred to ${.CURDIR:C/\/$//}, because similiar
problems can occur when the argument to -C contains symbolic links.

See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=221296

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

jrm retitled this revision from Ensure .CURDIR contains the absolute pathname of the port directory without a trailing slash, otherwise a port may fail to build. to Ensure .CURDIR contains the absolute pathname without a trailing slash, otherwise a port may fail to build..Aug 9 2017, 2:23 PM
jrm retitled this revision from Ensure .CURDIR contains the absolute pathname without a trailing slash, otherwise a port may fail to build. to Ensure .CURDIR contains the absolute pathname without a trailing slash, otherwise a port may fail to build.
bdrewery requested changes to this revision.Aug 9 2017, 5:52 PM
bdrewery added a reviewer: sjg.
bdrewery added a subscriber: bdrewery.

This may cause problems for symlinked ${PORTSDIR} checkouts (I am merely guessing and haven't thought about it heavily).

I think this is the wrong fix... Either bmake should be doing this itself or whatever is *failing* due to the trailing _/_ needs to be fixed.

This revision now requires changes to proceed.Aug 9 2017, 5:52 PM

This may cause problems for symlinked ${PORTSDIR} checkouts (I am merely guessing and haven't thought about it heavily).

I think this is the wrong fix... Either bmake should be doing this itself or whatever is *failing* due to the trailing _/_ needs to be fixed.

It certainly would be cleaner if bmake did the right thing (call GETCWD(3) on .CURDIR ?). Note that the problem isn't just with trailing /'s; see the PR linked to in the description. "[W]hatever is *failing* [...] _/_ needs to be fixed" may still apply.

The change to leaving -C arg "as is" is fairly recent, I've fixed a few bugs caused by it...

​.CURDIR:= ${.CURDIR:tA}

should be reasonably harmless, if and is essentially what bmake used to do.

This revision is now accepted and ready to land.Sep 15 2017, 3:10 PM
This revision was automatically updated to reflect the committed changes.