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)
Mon, Apr 29, 11:12 AM
Unknown Object (File)
Dec 20 2023, 7:31 PM
Unknown Object (File)
Dec 20 2023, 3:51 AM
Unknown Object (File)
Dec 6 2023, 5:42 AM
Unknown Object (File)
Nov 11 2023, 12:22 AM
Unknown Object (File)
Nov 7 2023, 4:02 PM
Unknown Object (File)
Nov 7 2023, 3:36 AM
Unknown Object (File)
Oct 9 2023, 11:21 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
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 10967
Build 11354: arc lint + arc unit

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.