From owner-svn-src-all@freebsd.org Sat Nov 2 10:15:35 2019 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 10A3417DE6E; Sat, 2 Nov 2019 10:15:35 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 474w1L6kncz4RwD; Sat, 2 Nov 2019 10:15:34 +0000 (UTC) (envelope-from phk@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CA99E21E11; Sat, 2 Nov 2019 10:15:34 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xA2AFYO0006912; Sat, 2 Nov 2019 10:15:34 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xA2AFY8t006911; Sat, 2 Nov 2019 10:15:34 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201911021015.xA2AFY8t006911@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Sat, 2 Nov 2019 10:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354251 - head/tools/tools/nanobsd X-SVN-Group: head X-SVN-Commit-Author: phk X-SVN-Commit-Paths: head/tools/tools/nanobsd X-SVN-Commit-Revision: 354251 X-SVN-Commit-Repository: base 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.29 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: Sat, 02 Nov 2019 10:15:35 -0000 Author: phk Date: Sat Nov 2 10:15:34 2019 New Revision: 354251 URL: https://svnweb.freebsd.org/changeset/base/354251 Log: If /usr/obj is a symlink, cpio(1) needs persuation to DTRT. Modified: head/tools/tools/nanobsd/defaults.sh Modified: head/tools/tools/nanobsd/defaults.sh ============================================================================== --- head/tools/tools/nanobsd/defaults.sh Sat Nov 2 10:14:15 2019 (r354250) +++ head/tools/tools/nanobsd/defaults.sh Sat Nov 2 10:15:34 2019 (r354251) @@ -193,6 +193,9 @@ NANO_DATADIR="" SRCCONF=/dev/null SRC_ENV_CONF=/dev/null +# Comment this out if /usr/obj is a symlink +# CPIO_SYMLINK=--insecure + ####################################################################### # # The functions which do the real work. @@ -523,7 +526,7 @@ setup_nanobsd ( ) ( if [ -d usr/local/etc ] ; then ( cd usr/local/etc - find . -print | cpio -dumpl ../../../etc/local + find . -print | cpio ${CPIO_SYMLINK} -dumpl ../../../etc/local cd .. rm -xrf etc ) @@ -542,7 +545,7 @@ setup_nanobsd ( ) ( # we use hard links so we have them both places. # the files in /$d will be hidden by the mount. mkdir -p conf/base/$d conf/default/$d - find $d -print | cpio -dumpl conf/base/ + find $d -print | cpio ${CPIO_SYMLINK} -dumpl conf/base/ done echo "$NANO_RAM_ETCSIZE" > conf/base/etc/md_size @@ -623,7 +626,7 @@ populate_slice ( ) ( if [ -n "${dir}" -a -d "${dir}" ]; then echo "Populating ${lbl} from ${dir}" cd "${dir}" - find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio -dumpv ${mnt} + find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio ${CPIO_SYMLINK} -dumpv ${mnt} fi df -i ${mnt} nano_umount ${mnt} @@ -731,7 +734,7 @@ cust_allow_ssh_root ( ) ( cust_install_files ( ) ( cd "${NANO_TOOLS}/Files" - find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio -Ldumpv ${NANO_WORLDDIR} + find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio ${CPIO_SYMLINK} -Ldumpv ${NANO_WORLDDIR} if [ -n "${NANO_CUST_FILES_MTREE}" -a -f ${NANO_CUST_FILES_MTREE} ]; then CR "mtree -eiU -p /" <${NANO_CUST_FILES_MTREE}