FreeBSD Bugzilla – Attachment 141109 Details for
Bug 187838
[patch] Add support for mtree(8) to populate_data_slice and cust_install_files, unify variable names.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 3.05 KB, created by
Lev A. Serebryakov
on 2014-03-22 11:20:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Lev A. Serebryakov
Created:
2014-03-22 11:20:00 UTC
Size:
3.05 KB
patch
obsolete
>Index: tools/tools/nanobsd/nanobsd.sh >=================================================================== >--- tools/tools/nanobsd/nanobsd.sh (revision 263618) >+++ tools/tools/nanobsd/nanobsd.sh (working copy) >@@ -45,10 +45,6 @@ > # Where nanobsd additional files live under the source tree > NANO_TOOLS=tools/tools/nanobsd > >-# Where cust_pkg() finds packages to install >-NANO_PACKAGE_DIR=${NANO_SRC}/${NANO_TOOLS}/Pkg >-NANO_PACKAGE_LIST="*" >- > # Object tree directory > # default is subdir of /usr/obj > #NANO_OBJ="" >@@ -157,6 +153,13 @@ > > NANO_ARCH=`uname -p` > >+# Where cust_install_files finds files to install >+NANO_FILESDIR=${NANO_TOOLS}/Files >+ >+# Where cust_pkg() finds packages to install >+NANO_PACKAGEDIR=${NANO_SRC}/${NANO_TOOLS}/Pkg >+NANO_PACKAGE_LIST="*" >+ > # Directory to populate /cfg from > NANO_CFGDIR="" > >@@ -447,7 +450,20 @@ > ) > > populate_data_slice ( ) ( >- populate_slice "$1" "$2" "$3" "$4" >+ local dev dir mnt lbl >+ dev=$1 >+ dir=$2 >+ mnt=$3 >+ lbl=$4 >+ >+ populate_slice "$dev" "$dir" "$mnt" "$lbl" >+ >+ find ${mnt} -type f -name .mtree -delete >+ cd ${dir} >+ find . -type f -name .mtree -print | while read fn ; do >+ fdir=`dirname ${fn}` >+ mtree -Ueq -f ${fn} -p ${mnt}/${fdir} >+ done > ) > > create_i386_diskimage ( ) ( >@@ -704,17 +720,21 @@ > # Install the stuff under ./Files > > cust_install_files () ( >- cd ${NANO_TOOLS}/Files >- find . -print | grep -Ev '/(CVS|\.svn)' | cpio -Ldumpv ${NANO_WORLDDIR} >+ cd ${NANO_FILESDIR} >+ find . -print | grep -Ev '/(CVS|\.svn|.mtree)' | cpio -dumpv ${NANO_WORLDDIR} >+ find . -type f -name .mtree -print | while read fn ; do >+ dir=`dirname ${fn}` >+ mtree -Ueq -f ${fn} -p ${NANO_WORLDDIR}/${dir} >+ done > ) > > ####################################################################### >-# Install packages from ${NANO_PACKAGE_DIR} >+# Install packages from ${NANO_PACKAGEDIR} > > cust_pkg () ( > > # If the package directory doesn't exist, we're done. >- if [ ! -d ${NANO_PACKAGE_DIR} ]; then >+ if [ ! -d ${NANO_PACKAGEDIR} ]; then > echo "DONE 0 packages" > return 0 > fi >@@ -722,7 +742,7 @@ > # Copy packages into chroot > mkdir -p ${NANO_WORLDDIR}/Pkg > ( >- cd ${NANO_PACKAGE_DIR} >+ cd ${NANO_PACKAGEDIR} > find ${NANO_PACKAGE_LIST} -print | > cpio -Ldumpv ${NANO_WORLDDIR}/Pkg > ) >@@ -764,16 +784,16 @@ > cust_pkgng () ( > > # If the package directory doesn't exist, we're done. >- if [ ! -d ${NANO_PACKAGE_DIR} ]; then >+ if [ ! -d ${NANO_PACKAGEDIR} ]; then > echo "DONE 0 packages" > return 0 > fi > > # Find a pkg-* package >- for x in `find -s ${NANO_PACKAGE_DIR} -iname 'pkg-*'`; do >+ for x in `find -s ${NANO_PACKAGEDIR} -iname 'pkg-*'`; do > _NANO_PKG_PACKAGE=`basename "$x"` > done >- if [ -z "${_NANO_PKG_PACKAGE}" -o ! -f "${NANO_PACKAGE_DIR}/${_NANO_PKG_PACKAGE}" ]; then >+ if [ -z "${_NANO_PKG_PACKAGE}" -o ! -f "${NANO_PACKAGEDIR}/${_NANO_PKG_PACKAGE}" ]; then > echo "FAILED: need a pkg/ package for bootstrapping" > exit 2 > fi >@@ -781,7 +801,7 @@ > # Copy packages into chroot > mkdir -p ${NANO_WORLDDIR}/Pkg > ( >- cd ${NANO_PACKAGE_DIR} >+ cd ${NANO_PACKAGEDIR} > find ${NANO_PACKAGE_LIST} -print | > cpio -Ldumpv ${NANO_WORLDDIR}/Pkg > )
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 187838
: 141109