Date: Thu, 3 Mar 2016 18:08:58 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r296353 - head/share/mk Message-ID: <201603031808.u23I8ws0026671@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201603031808.u23I8ws0026671>