aboutsummaryrefslogtreecommitdiff
path: root/release/packages
diff options
context:
space:
mode:
authorGlen Barber <gjb@FreeBSD.org>2017-08-09 19:16:54 +0000
committerGlen Barber <gjb@FreeBSD.org>2017-08-09 19:16:54 +0000
commit16398a1141de7696775b88cba9d14c780faf1d42 (patch)
tree56aba66dd2c6f86070c154a0914af3c1b90782e1 /release/packages
parent39901227a580c9f814a53d23afb54f96021a0277 (diff)
downloadsrc-16398a1141de7696775b88cba9d14c780faf1d42.tar.gz
src-16398a1141de7696775b88cba9d14c780faf1d42.zip
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
Notes
Notes: svn path=/head/; revision=322327
Diffstat (limited to 'release/packages')
-rw-r--r--release/packages/kernel.ucl33
-rw-r--r--release/packages/runtime.ucl4
2 files changed, 37 insertions, 0 deletions
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 = <<EOD
%DESC%
EOD
scripts: {
+ pre-install = <<EOD
+ case ${ASSUME_ALWAYS_YES} in
+ [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee])
+ exit 0
+ ;;
+ *)
+ continue
+ ;;
+ esac
+ echo "****************************************************************"
+ echo "It is recommended to install the FreeBSD-%PKGNAME% package"
+ echo "with:"
+ echo
+ echo " pkg install FreeBSD-%PKGNAME%"
+ echo
+ echo "and rebooting the system into the new kernel before upgrading"
+ echo "with:"
+ echo
+ echo " pkg upgrade"
+ echo
+ echo "****************************************************************"
+ echo
+ echo "Do you want to continue anyway?"
+ echo "[Enter] to continue, ^C to cancel."
+ echo
+ read ANSWER
+ case ${ANSWER} in
+ *)
+ continue
+ ;;
+ esac
+EOD
+
post-install = <<EOD
/usr/sbin/kldxref ${PKG_ROOTDIR}/boot/kernel
EOD
diff --git a/release/packages/runtime.ucl b/release/packages/runtime.ucl
index f55f1c8fef5c..4d7d0fc14f60 100644
--- a/release/packages/runtime.ucl
+++ b/release/packages/runtime.ucl
@@ -27,6 +27,10 @@ deps: {
"FreeBSD-clibs": {
origin: "base"
version: "%VERSION%"
+ },
+ "FreeBSD-kernel-%KERNCONF%": {
+ origin: "base"
+ version: "%VERSION%"
}
}
directories {