From 16398a1141de7696775b88cba9d14c780faf1d42 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Wed, 9 Aug 2017 19:16:54 +0000 Subject: [PATCH] Add a dependency on the kernel package for the runtime package. The idea here is that, provided upstream pkg(8) maintainers accept the proposed change, the kernel.ucl will contain a post-install script causing pkg(8) to emit a message informing to reboot the system after the kernel is upgraded using 'pkg upgrade', so the new userland is installed on the running new kernel. At present, this functionality does not exist in pkg(8), but will help ensure the upgrade path follows that from UPDATING. To work around this for now, evaluate ASSUME_ALWAYS_YES, and prompt the user if they wish to proceed if not set to true. Since there is a kernel dependency, and a non-GENERIC kernel may be in use, update Makefile.inc1 to replace '%KERNCONF%' in the runtime.ucl with the first-built kernel set either via command line or in make.conf(5). MFC after: 5 days Sponsored by: The FreeBSD Foundation --- Makefile.inc1 | 5 ++++- release/packages/kernel.ucl | 33 +++++++++++++++++++++++++++++++++ release/packages/runtime.ucl | 4 ++++ 3 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index ed9388610f17..74a3b84081d0 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1618,7 +1618,10 @@ create-world-package-${pkgname}: .PHONY @awk -F\" ' \ /^name/ { printf("===> Creating %s-", $$2); next } \ /^version/ { print $$2; next } \ - ' ${WSTAGEDIR}/${pkgname}.ucl ; \ + ' ${WSTAGEDIR}/${pkgname}.ucl ; + @if [ "${pkgname}" == "runtime" ]; then \ + sed -i '' -e "s/%KERNCONF%/${INSTALLKERNEL:tl}/" ${WSTAGEDIR}/${pkgname}.ucl ; \ + fi ${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/bin/sh -o ALLOW_BASE_SHLIBS=yes \ create -M ${WSTAGEDIR}/${pkgname}.ucl \ -p ${WSTAGEDIR}/${pkgname}.plist \ diff --git a/release/packages/kernel.ucl b/release/packages/kernel.ucl index c89cea6d3f59..67d7bf53db5d 100644 --- a/release/packages/kernel.ucl +++ b/release/packages/kernel.ucl @@ -16,6 +16,39 @@ desc = <