From owner-svn-src-all@freebsd.org Wed Apr 6 23:17:06 2016 Return-Path: Delivered-To: svn-src-all@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 5A305B0309E; Wed, 6 Apr 2016 23:17:06 +0000 (UTC) (envelope-from glebius@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 2735B1C52; Wed, 6 Apr 2016 23:17:06 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u36NH5cP027118; Wed, 6 Apr 2016 23:17:05 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u36NH5cK027117; Wed, 6 Apr 2016 23:17:05 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201604062317.u36NH5cK027117@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Wed, 6 Apr 2016 23:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r297628 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2016 23:17:06 -0000 Author: glebius Date: Wed Apr 6 23:17:05 2016 New Revision: 297628 URL: https://svnweb.freebsd.org/changeset/base/297628 Log: Add optional configuration knob NANO_CUST_FILES_MTREE. If set, it will require an entry in custom mtree definition for every custom installed file. Obtained from: Netflix Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Wed Apr 6 23:11:03 2016 (r297627) +++ head/tools/tools/nanobsd/defaults.sh Wed Apr 6 23:17:05 2016 (r297628) @@ -52,6 +52,11 @@ NANO_PACKAGE_LIST="*" # where package metadata gets placed NANO_PKG_META_BASE=/var/db +# Path to mtree file to apply to anything copied by cust_install_files(). +# If you specify this, the mtree file *must* have an entry for every file and +# directory located in Files. +#NANO_CUST_FILES_MTREE="" + # Object tree directory # default is subdir of /usr/obj #NANO_OBJ="" @@ -909,6 +914,10 @@ cust_allow_ssh_root ( ) ( cust_install_files ( ) ( cd "${NANO_TOOLS}/Files" find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)' | cpio -Ldumpv ${NANO_WORLDDIR} + + if [ -f ${NANO_CUST_FILES_MTREE} ]; then + CR "mtree -eiU -p /" <${NANO_CUST_FILES_MTREE} + fi ) #######################################################################