From owner-svn-src-head@freebsd.org Thu Mar 3 18:08:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1DEFA94C42; Thu, 3 Mar 2016 18:08:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A313FEDD; Thu, 3 Mar 2016 18:08:59 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u23I8wfg026673; Thu, 3 Mar 2016 18:08:58 GMT (envelope-from bdrewery@FreeBSD.org) Received: (from bdrewery@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u23I8ws0026671; Thu, 3 Mar 2016 18:08:58 GMT (envelope-from bdrewery@FreeBSD.org) Message-Id: <201603031808.u23I8ws0026671@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bdrewery set sender to bdrewery@FreeBSD.org using -f From: Bryan Drewery Date: Thu, 3 Mar 2016 18:08:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296353 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Mar 2016 18:08:59 -0000 Author: bdrewery Date: Thu Mar 3 18:08:58 2016 New Revision: 296353 URL: https://svnweb.freebsd.org/changeset/base/296353 Log: DEBUG_FILES: Create the DEBUGFILEDIR if it doesn't exist on install. Currently the base.txz distribution does not get the BSD.debug.dist mtree extracted into it. So if you start from that and then try to build a 3rd-party application outside of buildworld it will by-default try installing the debug files into a missing directory if they are being installed into /usr/lib. Check for the existence before forcing the directory to be created rather than the older way of running a shell command with test -d || mkdir -p always. Reported by: HardenedBSD (https://github.com/HardenedBSD/secadm/issues/23) Sponsored by: EMC / Isilon Storage Division Differential Revision: https://reviews.freebsd.org/D5411 Modified: head/share/mk/bsd.lib.mk head/share/mk/bsd.prog.mk Modified: head/share/mk/bsd.lib.mk ============================================================================== --- head/share/mk/bsd.lib.mk Thu Mar 3 17:46:38 2016 (r296352) +++ head/share/mk/bsd.lib.mk Thu Mar 3 18:08:58 2016 (r296353) @@ -141,6 +141,8 @@ SHLIB_NAME_FULL=${SHLIB_NAME}.full DEBUGFILEDIR=${DEBUGDIR}${_SHLIBDIR} .else DEBUGFILEDIR=${_SHLIBDIR}/.debug +.endif +.if !exists(${DESTDIR}${DEBUGFILEDIR}) DEBUGMKDIR= .endif .else Modified: head/share/mk/bsd.prog.mk ============================================================================== --- head/share/mk/bsd.prog.mk Thu Mar 3 17:46:38 2016 (r296352) +++ head/share/mk/bsd.prog.mk Thu Mar 3 18:08:58 2016 (r296353) @@ -63,6 +63,8 @@ PROG_FULL=${PROG}.full DEBUGFILEDIR= ${DEBUGDIR}${BINDIR} .else DEBUGFILEDIR?= ${BINDIR}/.debug +.endif +.if !exists(${DESTDIR}${DEBUGFILEDIR}) DEBUGMKDIR= .endif .else