Date: Fri, 8 Jan 2016 00:05:28 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293398 - head/tools/tools/nanobsd/embedded Message-ID: <201601080005.u0805Siw003710@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Jan 8 00:05:28 2016 New Revision: 293398 URL: https://svnweb.freebsd.org/changeset/base/293398 Log: Setup /pkg as a spot for pkg to operate. This is for testing purposes only. You need to remount / rw and export TMPDIR=/pkg/tmp. pkg will then work. It's slow though: 15 minutes to pkg install git on an RPi 2 with a decently fast SD card. Since this is for testing, we set DEFAULT_ALWAYS_YES and ASSUME_ALWAYS_YES to YES. Modified: head/tools/tools/nanobsd/embedded/common Modified: head/tools/tools/nanobsd/embedded/common ============================================================================== --- head/tools/tools/nanobsd/embedded/common Fri Jan 8 00:05:20 2016 (r293397) +++ head/tools/tools/nanobsd/embedded/common Fri Jan 8 00:05:28 2016 (r293398) @@ -449,6 +449,28 @@ typical_embedded ( ) ( ) customize_cmd typical_embedded +fix_pkg ( ) ( + chdir ${NANO_WORLDDIR} + mkdir -p pkg + mkdir -p pkg/db + mkdir -p pkg/cache + mkdir -p pkg/tmp # Needed for pkg bootstrap + mkdir -p usr/local/etc # Will get moved to local/etc + ( + echo 'PKG_DBDIR = "/pkg/db"' + echo 'PKG_CACHEDIR = "/pkg/cache"' + echo 'DEFAULT_ALWAYS_YES = "yes"' + echo 'ASSUME_ALWAYS_YES = "yes"' + ) >> usr/local/etc/pkg.conf + [ -z ${NANO_NOPRIV_BUILD} ] || ( + echo "./pkg type=dir uname=root gname=wheel mode=0755" + echo "./pkg/cache type=dir uname=root gname=wheel mode=0755" + echo "./pkg/db type=dir uname=root gname=wheel mode=0755" + echo "./pkg/tmp type=dir uname=root gname=wheel mode=0755" + ) >> ${NANO_METALOG} +) +customize_cmd fix_pkg + save_build ( ) ( VERSION_FILE=${NANO_WORLDDIR}/etc/version if [ "${SVNREVISION}" = "${REVISION}" ]; then
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601080005.u0805Siw003710>