Received: by mail.netbsd.org (Postfix, from userid 605) id C64DD84D99; Sun, 18 Aug 2019 21:58:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id 4DBB784D27 for ; Sun, 18 Aug 2019 21:58:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.netbsd.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id yEbeIDcteuDx for ; Sun, 18 Aug 2019 21:58:51 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id C90DF84CD4 for ; Sun, 18 Aug 2019 21:58:51 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id BC157FBF4; Sun, 18 Aug 2019 21:58:51 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_156616553178410" MIME-Version: 1.0 Date: Sun, 18 Aug 2019 21:58:51 +0000 From: "Roland Illig" Subject: CVS commit: pkgsrc/mk To: pkgsrc-changes@NetBSD.org Reply-To: rillig@netbsd.org X-Mailer: log_accum Message-Id: <20190818215851.BC157FBF4@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: pkgsrc-changes.NetBSD.org Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_156616553178410 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Module Name: pkgsrc Committed By: rillig Date: Sun Aug 18 21:58:51 UTC 2019 Modified Files: pkgsrc/mk: bsd.pkg.mk Log Message: mk/bsd.pkg.mk: prevent the WRKDIR path from containing symlinks This is the same underlying issue as in bootstrap/bootstrap from 2019-05-01. See https://mail-index.netbsd.org/pkgsrc-users/2019/08/18/msg029207.html To generate a diff of this commit: cvs rdiff -u -r1.2031 -r1.2032 pkgsrc/mk/bsd.pkg.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. --_----------=_156616553178410 Content-Disposition: inline Content-Length: 1621 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii Modified files: Index: pkgsrc/mk/bsd.pkg.mk diff -u pkgsrc/mk/bsd.pkg.mk:1.2031 pkgsrc/mk/bsd.pkg.mk:1.2032 --- pkgsrc/mk/bsd.pkg.mk:1.2031 Mon May 28 20:37:47 2018 +++ pkgsrc/mk/bsd.pkg.mk Sun Aug 18 21:58:51 2019 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.pkg.mk,v 1.2031 2018/05/28 20:37:47 rillig Exp $ +# $NetBSD: bsd.pkg.mk,v 1.2032 2019/08/18 21:58:51 rillig Exp $ # # This file is in the public domain. # @@ -573,7 +573,7 @@ all: ${_PKGSRC_BUILD_TARGETS} .endif .PHONY: makedirs -makedirs: ${WRKDIR} ${FAKEHOMEDIR} +makedirs: ${WRKDIR} ${FAKEHOMEDIR} _check-wrkdir-canonical ${WRKDIR}: .if !defined(KEEP_WRKDIR) @@ -583,9 +583,23 @@ ${WRKDIR}: .endif ${RUN} umask 077 && ${MKDIR} ${WRKDIR} +# If the WRKDIR is not canonical (such as when it contains a symlink), +# various packages such as databases/mysql57-client will not find their +# include files. See also checkarg_sane_absolute_path in bootstrap/bootstrap. +.PHONY: _check-wrkdir-canonical +_check-wrkdir-canonical: ${WRKDIR} + ${RUN} cd ${WRKDIR}; d=`exec pwd`; ${TEST} "$$d" = ${WRKDIR} \ + || ${FAIL_MSG} "[bsd.pkg.mk] The path to WRKDIR ${WRKDIR} must be canonical ($$d)." + # Create a symlink from ${WRKDIR} to the package directory if # CREATE_WRKDIR_SYMLINK is "yes". # +# This symlink is not used by pkgsrc and is only created for convenience. +# Most other pkgsrc pathnames must not contain symlinks, to prevent +# spurious build failures (see checkarg_sane_absolute_path in +# bootstrap/bootstrap). +# +# Keywords: work wrkdir symlink CREATE_WRKDIR_SYMLINK?= no .if defined(WRKOBJDIR) && !empty(CREATE_WRKDIR_SYMLINK:M[Yy][Ee][Ss]) --_----------=_156616553178410--