From owner-svn-src-head@freebsd.org Fri Jan 8 00:05:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 53BD8A67B74; Fri, 8 Jan 2016 00:05:29 +0000 (UTC) (envelope-from imp@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 mx1.freebsd.org (Postfix) with ESMTPS id 272631EA0; Fri, 8 Jan 2016 00:05:29 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0805Sha003711; Fri, 8 Jan 2016 00:05:28 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0805Siw003710; Fri, 8 Jan 2016 00:05:28 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201601080005.u0805Siw003710@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Fri, 8 Jan 2016 00:05:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r293398 - head/tools/tools/nanobsd/embedded X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Jan 2016 00:05:29 -0000 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