diff options
author | imp <imp@FreeBSD.org> | 2016-01-08 00:05:28 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2016-01-08 00:05:28 +0000 |
commit | 1beafb16d5ead967d0523ebd068ffa6a16414ce4 (patch) | |
tree | 0898bda9534ce0d74305be9fa539d323ae9afdb2 /tools | |
parent | acacb5074b2237806e9955d5aeafb3cbac26a80d (diff) | |
download | FreeBSD-src-1beafb16d5ead967d0523ebd068ffa6a16414ce4.zip FreeBSD-src-1beafb16d5ead967d0523ebd068ffa6a16414ce4.tar.gz |
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.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/tools/nanobsd/embedded/common | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/tools/nanobsd/embedded/common b/tools/tools/nanobsd/embedded/common index 6347911..a1d401a 100644 --- a/tools/tools/nanobsd/embedded/common +++ b/tools/tools/nanobsd/embedded/common @@ -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 |