View | Details | Raw Unified | Return to bug 269884 | Differences between
and this patch

Collapse All | Expand All

(-)b/tools/tools/nanobsd/defaults.sh (-17 / +6 lines)
Lines 276-291 tgt_dir2symlink ( ) ( Link Here
276
	fi
276
	fi
277
)
277
)
278
278
279
# run in the world chroot, errors fatal
280
CR ( ) {
281
	chroot "${NANO_WORLDDIR}" /bin/sh -exc "$*"
282
}
283
284
# run in the world chroot, errors not fatal
285
CR0 ( ) {
286
	chroot "${NANO_WORLDDIR}" /bin/sh -c "$*" || true
287
}
288
289
clean_build ( ) (
279
clean_build ( ) (
290
	pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})"
280
	pprint 2 "Clean and create object directory (${MAKEOBJDIRPREFIX})"
291
281
Lines 498-504 run_late_customize ( ) ( Link Here
498
# a user's cfg file would override this.
488
# a user's cfg file would override this.
499
#
489
#
500
fixup_before_diskimage ( ) (
490
fixup_before_diskimage ( ) (
501
	# Run the deduplication script that takes the matalog journal and
491
	# Run the deduplication script that takes the metalog journal and
502
	# combines multiple entries for the same file (see source for
492
	# combines multiple entries for the same file (see source for
503
	# details). We take the extra step of removing the size keywords. This
493
	# details). We take the extra step of removing the size keywords. This
504
	# script, and many of the user scripts, copies, appeneds and otherwise
494
	# script, and many of the user scripts, copies, appeneds and otherwise
Lines 739-745 cust_install_files ( ) ( Link Here
739
	find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio ${CPIO_SYMLINK} -Ldumpv ${NANO_WORLDDIR}
729
	find . -print | grep -Ev '/(CVS|\.svn|\.hg|\.git)/' | cpio ${CPIO_SYMLINK} -Ldumpv ${NANO_WORLDDIR}
740
730
741
	if [ -n "${NANO_CUST_FILES_MTREE}" -a -f ${NANO_CUST_FILES_MTREE} ]; then
731
	if [ -n "${NANO_CUST_FILES_MTREE}" -a -f ${NANO_CUST_FILES_MTREE} ]; then
742
		CR "mtree -eiU -p /" <${NANO_CUST_FILES_MTREE}
732
		chroot "${NANO_WORLDDIR}" /bin/sh -exc "mtree -eiU -p / <${NANO_CUST_FILES_MTREE}"
743
	fi
733
	fi
744
)
734
)
745
735
Lines 749-755 cust_install_files ( ) ( Link Here
749
cust_pkgng ( ) (
739
cust_pkgng ( ) (
750
	mkdir -p ${NANO_WORLDDIR}/usr/local/etc
740
	mkdir -p ${NANO_WORLDDIR}/usr/local/etc
751
	local PKG_CONF="${NANO_WORLDDIR}/usr/local/etc/pkg.conf"
741
	local PKG_CONF="${NANO_WORLDDIR}/usr/local/etc/pkg.conf"
752
	local PKGCMD="env BATCH=YES ASSUME_ALWAYS_YES=YES PKG_DBDIR=${NANO_PKG_META_BASE}/pkg SIGNATURE_TYPE=none /usr/sbin/pkg"
742
	local PKGCMD="env BATCH=YES ASSUME_ALWAYS_YES=YES PKG_DBDIR=${NANO_PKG_META_BASE}/pkg SIGNATURE_TYPE=none pkg -c ${NANO_WORLDDIR}"
753
743
754
	# Ensure pkg.conf points pkg to where the package meta data lives.
744
	# Ensure pkg.conf points pkg to where the package meta data lives.
755
	touch ${PKG_CONF}
745
	touch ${PKG_CONF}
Lines 782-788 cust_pkgng ( ) ( Link Here
782
	trap "umount ${NANO_WORLDDIR}/dev; umount ${NANO_WORLDDIR}/_.p ; rm -xrf ${NANO_WORLDDIR}/_.p" 1 2 15 EXIT
772
	trap "umount ${NANO_WORLDDIR}/dev; umount ${NANO_WORLDDIR}/_.p ; rm -xrf ${NANO_WORLDDIR}/_.p" 1 2 15 EXIT
783
773
784
	# Install pkg-* package
774
	# Install pkg-* package
785
	CR "${PKGCMD} add /_.p/${_NANO_PKG_PACKAGE}"
775
	${PKGCMD} add /_.p/${_NANO_PKG_PACKAGE}
786
776
787
	(
777
	(
788
		# Expand any glob characters in pacakge list
778
		# Expand any glob characters in pacakge list
Lines 797-807 cust_pkgng ( ) ( Link Here
797
787
798
		# Install packages
788
		# Install packages
799
		for _PKG in $_PKGS; do
789
		for _PKG in $_PKGS; do
800
			CR "${PKGCMD} add /_.p/${_PKG}"
790
			${PKGCMD} add /_.p/${_PKG}
801
		done
791
		done
802
	)
792
	)
803
793
804
	CR0 "${PKGCMD} info"
794
	${PKGCMD} info || true
805
795
806
	trap - 1 2 15 EXIT
796
	trap - 1 2 15 EXIT
807
	umount ${NANO_WORLDDIR}/dev
797
	umount ${NANO_WORLDDIR}/dev
808
- 

Return to bug 269884