[Bug 246196] Mk/bsd.port.mk: github groups conflict with WRKSRC_SUBDIR
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon May 4 21:23:24 UTC 2020
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=246196
Bug ID: 246196
Summary: Mk/bsd.port.mk: github groups conflict with
WRKSRC_SUBDIR
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: ports-bugs at FreeBSD.org
Reporter: svysh.fbsd at gmail.com
Created attachment 214127
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=214127&action=edit
patch to fix bsd.port.mk
Problem: Using github groups
(see 5.4.3.1. "Fetching Multiple Files from GitHub" of Porter's Handbook)
along with non-empty WRKSRC_SUBDIR
leads to garbage in WRKSRC variable.
Consider hypotetical port from Example 5.15 of Porter's Handbook,
with addition of non-empty WRKSRC_SUBDIR.
security/foo/Makefile:
--------------------------
PORTNAME= foo
DISTVERSION= 1.0.2
CATEGORIES= security
USE_GITHUB= yes
GH_ACCOUNT= bar:icons,contrib
GH_PROJECT= foo-icons:icons foo-contrib:contrib
GH_TAGNAME= 1.0:icons fa579bc:contrib
WRKSRC_SUBDIR= core/server/
.include <bsd.port.mk>
--------------------------
Experiment 1. With original file Mk/bsd.port.mk.orig:
$ cd /usr/ports/security/foo
$ make -V WRKSRC
/usr/ports/security/foo/work/foo-icons:icons
foo-contrib:contrib-1.0.2/core/server/
which definitely puts garbage into WRKSRC variable.
Experiment 2. With patched file Mk/bsd.port.mk:
$ cd /usr/ports/security/foo
$ make -V WRKSRC
/usr/ports/security/foo/work/foo-1.0.2/core/server/
which works as intended.
The reason of failure with original file Mk/bsd.port.mk.orig is in its lines
1725-1727:
.if defined(WRKSRC_SUBDIR)
WRKSRC:= ${WRKSRC}/${WRKSRC_SUBDIR}
.endif
which come earlier, than line 2245:
.include "${PORTSDIR}/Mk/bsd.sites.mk"
Hence value of GH_PROJECT in line 1705:
WRKSRC?= ${WRKDIR}/${GH_PROJECT}-${GH_TAGNAME_EXTRACT}
contains a list of data:
GH_PROJECT== foo-icons:icons foo-contrib:contrib
instead of needed value:
GH_PROJECT== foo
Proposed change to line 1705, that is substitute
GH_PROJECT ---> GH_PROJECT_DEFAULT
solves the problem, because GH_PROJECT_DEFAULT==foo
during all stages of "make" operation.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list