aboutsummaryrefslogtreecommitdiff
path: root/release
diff options
context:
space:
mode:
Diffstat (limited to 'release')
-rw-r--r--release/Makefile29
-rw-r--r--release/Makefile.mirrors50
-rwxr-xr-xrelease/packages/generate-set-ucl.lua2
-rwxr-xr-xrelease/packages/generate-ucl.lua2
-rw-r--r--release/packages/ucl/ctf-all.ucl2
-rw-r--r--release/packages/ucl/fetch-all.ucl4
-rw-r--r--release/packages/ucl/openssl-all.ucl2
-rw-r--r--release/packages/ucl/ufs-all.ucl2
-rw-r--r--release/packages/ucl/xz-all.ucl2
-rw-r--r--release/packages/ucl/zfs-all.ucl2
-rwxr-xr-xrelease/scripts/make-pkg-package.sh7
-rw-r--r--release/tools/ec2-builder.conf7
-rw-r--r--release/tools/ec2-small.conf7
-rw-r--r--release/tools/vagrant.conf25
-rw-r--r--release/tools/vmimage.subr22
15 files changed, 119 insertions, 46 deletions
diff --git a/release/Makefile b/release/Makefile
index 76a99ffdf3f3..12f5114f8b22 100644
--- a/release/Makefile
+++ b/release/Makefile
@@ -116,7 +116,10 @@ DISTRIBUTIONS+= ports.txz
DISTRIBUTIONS+= src.txz
.endif
-RELEASE_TARGETS= ftp
+RELEASE_TARGETS=
+.if !defined(NODISTSETS) || empty(NODISTSETS)
+RELEASE_TARGETS+= ftp
+.endif
IMAGES=
.if exists(${.CURDIR}/${TARGET}/mkisoimages.sh)
RELEASE_TARGETS+= cdrom
@@ -132,6 +135,9 @@ RELEASE_TARGETS+= mini-memstick.img
IMAGES+= memstick.img
IMAGES+= mini-memstick.img
.endif
+.if !defined(NOPKGBASE) || empty(NOPKGBASE)
+RELEASE_TARGETS+= pkgbase-repo.tar
+.endif
CLEANFILES= packagesystem *.txz MANIFEST release ${IMAGES}
.if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES)
@@ -142,7 +148,7 @@ CLEANFILES+= ${I}.xz
.if defined(WITH_DVD) && !empty(WITH_DVD)
CLEANFILES+= pkg-stage
.endif
-CLEANDIRS= dist pkgdb-dvd pkgdb-disc1 pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd
+CLEANDIRS= dist pkgdb-dvd pkgdb-disc1 pkgbase-repo pkgbase-repo-dir ftp disc1 disc1-disc1 disc1-memstick bootonly bootonly-bootonly bootonly-memstick dvd pkgbase-repo.tar
beforeclean:
chflags -R noschg .
.include <bsd.obj.mk>
@@ -196,7 +202,7 @@ packagesystem: ${DISTRIBUTIONS}
sh ${.CURDIR}/scripts/make-manifest.sh $$(ls *.txz | grep -v container) > MANIFEST
touch ${.TARGET}
-.if !defined(NODISTSETS)
+.if !defined(NODISTSETS) || empty(NODISTSETS)
disc1: packagesystem
bootonly: packagesystem
dvd: packagesystem
@@ -213,6 +219,9 @@ pkgbase-repo:
( ${IMAKE} -C ${WORLDDIR} packages REPODIR=${.OBJDIR}/pkgbase-repo \
INCLUDE_PKG_IN_PKGBASE_REPO=YES BOOTSTRAP_PKG_FROM_PORTS=YES )
+pkgbase-repo.tar: pkgbase-repo
+ tar -cf pkgbase-repo.tar -C pkgbase-repo .
+
pkgbase-repo-dir: pkgbase-repo
mkdir -p pkgbase-repo-dir
printf "FreeBSD-base: { url: "file://%s", enabled: yes }" \
@@ -242,7 +251,7 @@ disc1:
mtree -C -k type,mode,link,size | \
sed 's|^\.|./usr/freebsd-packages|g' >> ${.TARGET}/METALOG
.endif
-.if !defined(NODISTSETS)
+.if !defined(NODISTSETS) || empty(NODISTSETS)
# Copy MANIFEST to provide legacy dist checksums in both modes
mkdir -p ${.TARGET}/usr/freebsd-dist
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
@@ -295,7 +304,7 @@ bootonly:
MK_TOOLCHAIN=no \
MK_RESCUE=no MK_DICT=no \
MK_KERNEL_SYMBOLS=no MK_TESTS=no MK_DEBUG_FILES=no)
-.if !defined(NODISTSETS)
+.if !defined(NODISTSETS) || empty(NODISTSETS)
# Copy manifest only (no distfiles) to get checksums
mkdir -p ${.TARGET}/usr/freebsd-dist
cp MANIFEST ${.TARGET}/usr/freebsd-dist
@@ -347,7 +356,7 @@ dvd:
mtree -C -k type,mode,link,size | \
sed 's|^\.|./usr/freebsd-packages|g' >> ${.TARGET}/METALOG
.endif
-.if !defined(NODISTSETS)
+.if !defined(NODISTSETS) || empty(NODISTSETS)
# Copy MANIFEST to provide legacy dist checksums in both modes
mkdir -p ${.TARGET}/usr/freebsd-dist
echo "./usr/freebsd-dist type=dir uname=root gname=wheel mode=0755" >> ${.TARGET}/METALOG
@@ -449,7 +458,9 @@ release-install:
.if defined(DESTDIR) && !empty(DESTDIR)
mkdir -p ${DESTDIR}
.endif
+.if !defined(NODISTSETS) || empty(NODISTSETS)
cp -a ftp ${DESTDIR}/
+.endif
.if !empty(IMAGES)
.for I in ${IMAGES}
cp -p ${I} ${DESTDIR}/${OSRELEASE}-${I}
@@ -460,6 +471,12 @@ release-install:
( cd ${DESTDIR} && sha512 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA512 )
( cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 )
.endif
+.if !defined (NOPKGBASE) || empty(NOPKGBASE)
+ mkdir -p ${DESTDIR}/pkgbase
+ cp -p pkgbase-repo.tar ${DESTDIR}/pkgbase/
+ ( cd ${DESTDIR}/pkgbase && sha256 pkgbase-repo.tar > CHECKSUM.SHA256 )
+ ( cd ${DESTDIR}/pkgbase && sha512 pkgbase-repo.tar > CHECKSUM.SHA512 )
+.endif
.include "${.CURDIR}/Makefile.inc1"
.include "${.CURDIR}/Makefile.vm"
diff --git a/release/Makefile.mirrors b/release/Makefile.mirrors
index 5e65bfbe8b3f..ed9420e926ce 100644
--- a/release/Makefile.mirrors
+++ b/release/Makefile.mirrors
@@ -63,6 +63,13 @@ STAGE_TARGETS+= oci-images-stage
OCI_DIR= ${TLD}/OCI-IMAGES/${REVISION}-${BRANCH}/${TARGET_ARCH}
.endif
+.if !defined(EMBEDDED) || empty(EMBEDDED)
+.if !defined(NOPKGBASE) || empty(NOPKGBASE)
+STAGE_TARGETS+= pkgbase-repo-stage
+PKGBASE_DIR= ${TLD}/PKGBASE-REPOS/${REVISION}-${BRANCH}/${TARGET_ARCH}
+.endif
+.endif
+
CLEANFILES+= ${STAGE_TARGETS}
CHECKSUM_FILES?= SHA512 SHA256
SNAP_SUFFIX!= echo ${_SNAP_SUFFIX:S,^-,,1} | tr -d ' '
@@ -366,5 +373,48 @@ oci-images-stage:
. endfor
.endif
+pkgbase-repo-stage:
+ mkdir -p ${PKGBASE_DIR}
+.if defined(SNAPSHOT) && !empty(SNAPSHOT)
+. if exists(${PKGBASE_DIR}/Latest)
+ rm -rf ${PKGBASE_DIR}/Latest
+. endif
+ mkdir -p ${PKGBASE_DIR}/Latest
+ mkdir -p ${PKGBASE_DIR}/${BUILDDATE}
+ cd ${RELEASEDIR}/pkgbase && \
+ mv pkgbase-repo.tar ${OSRELEASE}-pkgbase-repo-${SNAP_SUFFIX}.tar
+ cp -p ${RELEASEDIR}/pkgbase/${OSRELEASE}-pkgbase-repo-${SNAP_SUFFIX}.tar \
+ ${PKGBASE_DIR}/${BUILDDATE}/${OSRELEASE}-pkgbase-repo-${SNAP_SUFFIX}.tar
+ cd ${PKGBASE_DIR}/Latest && \
+ ln -s ../${BUILDDATE}/${OSRELEASE}-pkgbase-repo-${SNAP_SUFFIX}.tar \
+ ${OSRELEASE}-pkgbase-repo.tar
+ cd ${RELEASEDIR}/pkgbase && rm -f CHECKSUM.*
+. for CHECKSUM in ${CHECKSUM_FILES}
+ cd ${RELEASEDIR}/pkgbase && \
+ ${CHECKSUM:tl} ${OSRELEASE}-pkgbase-repo-*.tar > CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX}
+ cp -p ${RELEASEDIR}/pkgbase/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \
+ ${PKGBASE_DIR}/${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX}
+ cd ${PKGBASE_DIR}/Latest && \
+ ln -s ../${BUILDDATE}/CHECKSUM.${CHECKSUM}-${SNAP_SUFFIX} \
+ CHECKSUM.${CHECKSUM}
+. endfor
+.else # not snapshot
+. if exists(${PKGBASE_DIR}/Latest)
+ rm -rf ${PKGBASE_DIR}/Latest
+. endif
+ mkdir -p ${PKGBASE_DIR}/Latest
+ cd ${RELEASEDIR}/pkgbase && \
+ mv pkgbase-repo.tar ${OSRELEASE}-pkgbase-repo.tar
+ cp -p ${RELEASEDIR}/pkgbase/${OSRELEASE}-pkgbase-repo.tar \
+ ${PKGBASE_DIR}/Latest/${OSRELEASE}-pkgbase-repo.tar
+. endfor
+. for CHECKSUM in ${CHECKSUM_FILES}
+ cd ${RELEASEDIR}/pkgbase && \
+ ${CHECKSUM:tl} ${OSRELEASE}-pkgbase-repo.tar > CHECKSUM.${CHECKSUM}
+ cp -p ${RELEASEDIR}/pkgbase/CHECKSUM.${CHECKSUM} \
+ ${PKGBASE_DIR}/Latest/CHECKSUM.${CHECKSUM}
+. endfor
+.endif
+
ftp-stage: remove-old-bits ${STAGE_TARGETS}
diff --git a/release/packages/generate-set-ucl.lua b/release/packages/generate-set-ucl.lua
index b1b70053b02a..3c8474bf8e68 100755
--- a/release/packages/generate-set-ucl.lua
+++ b/release/packages/generate-set-ucl.lua
@@ -1,7 +1,7 @@
#!/usr/libexec/flua
--[[ usage:
-generare-set-ucl.lua <template> [<variablename> <variablevalue>]
+generate-set-ucl.lua <template> [<variablename> <variablevalue>]
Generate the UCL for a set metapackage. The variables provided will be
substituted as UCL variables.
diff --git a/release/packages/generate-ucl.lua b/release/packages/generate-ucl.lua
index ea3743894740..c61cbb251d8b 100755
--- a/release/packages/generate-ucl.lua
+++ b/release/packages/generate-ucl.lua
@@ -1,7 +1,7 @@
#!/usr/libexec/flua
--[[ usage:
-generare-ucl.lua [<variablename> <variablevalue>]... <sourceucl> <destucl>
+generate-ucl.lua [<variablename> <variablevalue>]... <sourceucl> <destucl>
Build a package's UCL configuration by loading the template UCL file
<sourceucl>, replacing any $VARIABLES in the UCL based on the provided
diff --git a/release/packages/ucl/ctf-all.ucl b/release/packages/ucl/ctf-all.ucl
index 941990908373..970ac3ffb4fa 100644
--- a/release/packages/ucl/ctf-all.ucl
+++ b/release/packages/ucl/ctf-all.ucl
@@ -30,7 +30,7 @@ CTF is intended specifically for runtime program analyzers such as DTrace.
This package provides the ctfconvert(1), ctfdump(1) and ctfmerge(1) utilities
which are used to work with CTF data, and the libctf library which allows
-application to access CTF debugging information programatically.
+applications to access CTF debugging information programmatically.
EOD
licenses = [ "CDDL-1.0" ]
diff --git a/release/packages/ucl/fetch-all.ucl b/release/packages/ucl/fetch-all.ucl
index d14f22cb74a5..5a3c0be826fa 100644
--- a/release/packages/ucl/fetch-all.ucl
+++ b/release/packages/ucl/fetch-all.ucl
@@ -19,13 +19,13 @@
comment = "Retrieve a file from a remote URL"
desc = <<EOD
-The fetch(1) utility retieves one or more files from a remote URL via
+The fetch(1) utility retrieves one or more files from a remote URL via
HTTP or FTP. fetch(1) includes support for TLS, HTTP proxies, .netrc
files, and includes a "mirror" mode which only downloads files which
are newer on the remote site.
Also provided is fetch(3), a library which allows applications to use
-this functionality programatically.
+this functionality programmatically.
EOD
annotations {
diff --git a/release/packages/ucl/openssl-all.ucl b/release/packages/ucl/openssl-all.ucl
index 24a83ab6b9ba..4c393efe3b89 100644
--- a/release/packages/ucl/openssl-all.ucl
+++ b/release/packages/ucl/openssl-all.ucl
@@ -26,7 +26,7 @@ protocols such as HTTP, SMTP and DNS.
OpenSSL provides openssl(1), a command-line utility used for testing TLS
clients and servers, managing certificate used in TLS authentication, and
-performing various miscallenous cryptographic operations.
+performing various miscellaneous cryptographic operations.
Also provided are two libraries, libcrypto and libssl, which can be used by
applications to provide generic cryptographic functionality, and to implement
diff --git a/release/packages/ucl/ufs-all.ucl b/release/packages/ucl/ufs-all.ucl
index d9302bd0e3f9..b35e0f3d1dc7 100644
--- a/release/packages/ucl/ufs-all.ucl
+++ b/release/packages/ucl/ufs-all.ucl
@@ -32,7 +32,7 @@ utilities used to check the consistency of an existing filesystem after
an unclean shutdown or panic.
The libufs library is also provided, which allows applications to access
-UFS filesystems programatically.
+UFS filesystems programmatically.
EOD
annotations {
diff --git a/release/packages/ucl/xz-all.ucl b/release/packages/ucl/xz-all.ucl
index 16da8b76f0ac..8a7c33bcce46 100644
--- a/release/packages/ucl/xz-all.ucl
+++ b/release/packages/ucl/xz-all.ucl
@@ -21,7 +21,7 @@ comment = "LZMA2 data compression"
desc = <<EOD
xz compresses data using the LZMA2 data compression algorithm. This package
provides the front-end xz(1) utility, and the liblzma library which allows
-applications to use this functionality programatically.
+applications to use this functionality programmatically.
EOD
annotations {
diff --git a/release/packages/ucl/zfs-all.ucl b/release/packages/ucl/zfs-all.ucl
index 70ebcdacdb57..9d166452188d 100644
--- a/release/packages/ucl/zfs-all.ucl
+++ b/release/packages/ucl/zfs-all.ucl
@@ -39,7 +39,7 @@ This package provides the zfs(8) and zpool(8) utilities used to manage
ZFS filesystems, the zfsd(8) self-healing daemon, and several other
utilities, as well as the runtime libraries used internally by ZFS
itself, and the libzfs_core library providing a stable interface for
-managing ZFS programatically.
+managing ZFS programmatically.
EOD
licenses = [ "CDDL-1.0" ]
diff --git a/release/scripts/make-pkg-package.sh b/release/scripts/make-pkg-package.sh
index a1e006bd6964..3a1b163bd591 100755
--- a/release/scripts/make-pkg-package.sh
+++ b/release/scripts/make-pkg-package.sh
@@ -8,6 +8,13 @@ PKG_ABI=$(${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)
unset PKG_VERSION
unset MAKEFLAGS
unset PKGBASE
+# Ports interprets CROSS_TOOLCHAIN differently from src, and having this set
+# breaks the package-pkg build. For now, forcibly unset this and hope ports
+# can find a working compiler.
+if [ -n "$CROSS_TOOLCHAIN" ]; then
+ printf >&2 '%s: WARNING: CROSS_TOOLCHAIN will be ignored for the pkg build.\n' "$0"
+ unset CROSS_TOOLCHAIN
+fi
export WRKDIRPREFIX=/tmp/ports.${TARGET}
export DISTDIR=/tmp/distfiles
export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg I_DONT_CARE_IF_MY_BUILDS_TARGET_THE_WRONG_RELEASE=YES -V WRKDIR)
diff --git a/release/tools/ec2-builder.conf b/release/tools/ec2-builder.conf
index cf4276fc80ec..a55485fec0cd 100644
--- a/release/tools/ec2-builder.conf
+++ b/release/tools/ec2-builder.conf
@@ -7,17 +7,16 @@
export VMSIZE=8000m
# Flags to installworld/kernel: We don't want debug symbols (kernel or
-# userland), 32-bit libraries, tests, or the debugger.
+# userland), 32-bit libraries, or tests.
export INSTALLOPTS="WITHOUT_DEBUG_FILES=YES WITHOUT_KERNEL_SYMBOLS=YES \
- WITHOUT_LIB32=YES WITHOUT_TESTS=YES WITHOUT_LLDB=YES"
+ WITHOUT_LIB32=YES WITHOUT_TESTS=YES"
# Equivalent to INSTALLOPTS for pkgbase
vm_extra_filter_base_packages() {
grep -v \
-e '.*-dbg$' \
-e '.*-lib32$' \
- -e '^FreeBSD-tests.*' \
- -e '^FreeBSD-lldb.*'
+ -e '^FreeBSD-set-tests'
}
# Packages to install into the image we're creating. In addition to packages
diff --git a/release/tools/ec2-small.conf b/release/tools/ec2-small.conf
index 32d02cbb79e4..acaffbbc0c42 100644
--- a/release/tools/ec2-small.conf
+++ b/release/tools/ec2-small.conf
@@ -10,17 +10,16 @@
export VMSIZE=5000m
# Flags to installworld/kernel: We don't want debug symbols (kernel or
-# userland), 32-bit libraries, tests, or the debugger.
+# userland), 32-bit libraries, or tests.
export INSTALLOPTS="WITHOUT_DEBUG_FILES=YES WITHOUT_KERNEL_SYMBOLS=YES \
- WITHOUT_LIB32=YES WITHOUT_TESTS=YES WITHOUT_LLDB=YES"
+ WITHOUT_LIB32=YES WITHOUT_TESTS=YES"
# Equivalent to INSTALLOPTS for pkgbase
vm_extra_filter_base_packages() {
grep -v \
-e '.*-dbg$' \
-e '.*-lib32$' \
- -e '^FreeBSD-tests.*' \
- -e '^FreeBSD-lldb.*'
+ -e '^FreeBSD-set-tests'
}
# Packages to install into the image we're creating. In addition to packages
diff --git a/release/tools/vagrant.conf b/release/tools/vagrant.conf
index 7ab0e1238693..5b0f38b740a6 100644
--- a/release/tools/vagrant.conf
+++ b/release/tools/vagrant.conf
@@ -14,14 +14,16 @@ export VM_EXTRA_PACKAGES="${VM_EXTRA_PACKAGES} shells/bash \
export VM_RC_LIST="firstboot_freebsd_update firstboot_pkgs growfs"
vagrant_common () {
- # The firstboot_pkgs rc.d script will download the repository
- # catalogue and install or update pkg when the instance first
- # launches, so these files would just be replaced anyway; removing
- # them from the image allows it to boot faster.
- env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} clean -y -a
- env ASSUME_ALWAYS_YES=yes pkg -c ${DESTDIR} delete -f -y pkg
- rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports
- rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods
+ if [ -z "${NO_ROOT}" ]; then
+ # The firstboot_pkgs rc.d script will download the repository
+ # catalogue and install or update pkg when the instance first
+ # launches, so these files would just be replaced anyway;
+ # removing them from the image allows it to boot faster.
+ pkg -c ${DESTDIR} clean -y -a
+ pkg -c ${DESTDIR} delete -f -y pkg
+ rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports
+ rm -r ${DESTDIR}/var/db/pkg/repos/FreeBSD-ports-kmods
+ fi
# Vagrant instances use DHCP to get their network configuration.
echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf
@@ -40,8 +42,7 @@ vagrant_common () {
# Create the vagrant user with a password of vagrant
/usr/sbin/pw -R ${DESTDIR} \
groupadd vagrant -g 1001
- chroot ${DESTDIR} mkdir -p /home/vagrant
- /usr/sbin/pw -R ${DESTDIR} \
+ /usr/sbin/pw -R ${DESTDIR} -M ${DESTDIR}/METALOG \
useradd vagrant \
-m -M 0755 -w yes -n vagrant -u 1001 -g 1001 -G 0 \
-c 'Vagrant User' -d '/home/vagrant' -s '/bin/csh'
@@ -58,11 +59,11 @@ vagrant_common () {
echo "ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6NF8iallvQVp22WDkTkyrtvp9eWW6A8YVr+kz4TjGYe7gHzIw+niNltGEFHzD8+v1I2YJ6oXevct1YeS0o9HZyN1Q9qgCgzUFtdOKLv6IedplqoPkcmF0aYet2PkEDo3MlTBckFXPITAMzF8dJSIFo9D8HfdOV0IAdx4O7PtixWKn5y2hMNG0zQPyUecp4pzC6kivAIhyfHilFR61RGL+GPXQ2MWZWFYbAGjyiYJnAmCP3NOTd0jMZEnDkbUvxhMmBYSdETk1rRgm+R4LOzFUGaHqHDLKLX+FIPKcF96hrucXzcWyLbIbEgE98OHlnVYCzRdK8jlqm8tehUc9c9WhQ== vagrant insecure public key" > ${DESTDIR}/home/vagrant/.ssh/authorized_keys
echo "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIN1YdxBpNlzxDqfJyw/QKow1F+wvG9hXGoqiysfJOn5Y vagrant insecure public key" >> ${DESTDIR}/home/vagrant/.ssh/authorized_keys
chmod 600 ${DESTDIR}/home/vagrant/.ssh/authorized_keys
- metalog_add_data ./home/vagrant/.ssh/authorized_keys 0600
chmod 700 ${DESTDIR}/home/vagrant/.ssh
chown -R 1001 ${DESTDIR}/home/vagrant/.ssh
- echo "./home/vagrant/.ssh type=dir uid=1001 gid=1001 mode=0700" >> METALOG
+ echo "./home/vagrant/.ssh type=dir uid=1001 gid=1001 mode=0700" >> ${DESTDIR}/METALOG
+ echo "./home/vagrant/.ssh/authorized_keys type=file uid=1001 gid=1001 mode=0600" >> ${DESTDIR}/METALOG
# Reboot quickly, Don't wait at the panic screen
echo 'debug.trace_on_panic=1' >> ${DESTDIR}/etc/sysctl.conf
diff --git a/release/tools/vmimage.subr b/release/tools/vmimage.subr
index 3b0519c21dbc..131ebe37db6c 100644
--- a/release/tools/vmimage.subr
+++ b/release/tools/vmimage.subr
@@ -70,15 +70,15 @@ vm_copy_base() {
return 0
}
-vm_filter_base_packages() {
- # Reads a list of all base system packages from stdin.
- # Writes a list of base system packages to install to stdout.
- grep -v -e '^FreeBSD-src.*' -e '^FreeBSD-kernel.*'
- # There are several kernel variants available in separate packages.
- # For VMs it is sufficient to install only the generic kernel.
- echo "FreeBSD-kernel-man"
- echo "FreeBSD-kernel-generic"
- echo "FreeBSD-kernel-generic-dbg"
+vm_base_packages_list() {
+ # Output a list of package sets equivalent to what we get from
+ # "installworld installkernel distribution", aka. the full base
+ # system.
+ for S in base lib32 kernels; do
+ echo FreeBSD-set-$S
+ echo FreeBSD-set-$S-dbg
+ done
+ echo FreeBSD-set-tests
}
vm_extra_filter_base_packages() {
@@ -99,8 +99,7 @@ vm_install_base() {
pkg_cmd="$pkg_cmd -o METALOG=METALOG"
fi
$pkg_cmd update
- selected=$($pkg_cmd rquery -U -r FreeBSD-base %n | \
- vm_filter_base_packages | vm_extra_filter_base_packages)
+ selected=$(vm_base_packages_list | vm_extra_filter_base_packages)
$pkg_cmd install -U -r FreeBSD-base $selected
else
cd ${WORLDDIR} && \
@@ -256,6 +255,7 @@ vm_extra_pkg_rmcache() {
if [ -n "${NO_ROOT}" ]; then
${PKG_CMD} \
-o ASSUME_ALWAYS_YES=yes \
+ -o INSTALL_AS_USER=yes \
-r ${DESTDIR} \
clean -y -a
else