aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2018-03-14 14:45:57 +0000
committerKyle Evans <kevans@FreeBSD.org>2018-03-14 14:45:57 +0000
commitfb6d3be5db866009b5a1b5e438203521328b7219 (patch)
tree42141a5940c17426ce396b83f9d02a8b8d762318
parent7b194b3d3bcd108f85e2430901ddea6ac2698f56 (diff)
downloadsrc-fb6d3be5db866009b5a1b5e438203521328b7219.tar.gz
src-fb6d3be5db866009b5a1b5e438203521328b7219.zip
pkgbase: Fix post-install script for kernel packages
kernel.ucl uses a hardcoded boot/kernel for kldxref, which is the incorrect directory when we're installing extra kernels that aren't the "default" kernel (placed at boot/kernel). Fix this by instead using a new %KERNELDIR% that we now replace in Makefile.inc1 with "kernel" for the default kernel and "kernel.${_kernel}" for these extra kernels so that, e.g. /boot/kernel.SHIVA, will get properly kldxref'd upon update and avoid outdated linker.hints. Reviewed by: gjb MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D14689
Notes
Notes: svn path=/head/; revision=330929
-rw-r--r--Makefile.inc12
-rw-r--r--release/packages/kernel.ucl2
2 files changed, 3 insertions, 1 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1
index fd372d9b724a..09018e048694 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -1698,6 +1698,7 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}${flavor}/" \
+ -e "s/%KERNELDIR%/kernel/" \
-e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
-e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
@@ -1733,6 +1734,7 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne
pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \
sed -e "s/%VERSION%/${PKG_VERSION}/" \
-e "s/%PKGNAME%/kernel-${_kernel:tl}${flavor}/" \
+ -e "s/%KERNELDIR%/kernel.${_kernel}/" \
-e "s/%COMMENT%/FreeBSD ${_kernel} kernel ${flavor}/" \
-e "s/%DESC%/FreeBSD ${_kernel} kernel ${flavor}/" \
-e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \
diff --git a/release/packages/kernel.ucl b/release/packages/kernel.ucl
index 5c169d2365d0..f9ee3643e1d1 100644
--- a/release/packages/kernel.ucl
+++ b/release/packages/kernel.ucl
@@ -17,6 +17,6 @@ desc = <<EOD
EOD
scripts: {
post-install = <<EOD
- /usr/sbin/kldxref ${PKG_ROOTDIR}/boot/kernel
+ /usr/sbin/kldxref ${PKG_ROOTDIR}/boot/%KERNELDIR%
EOD
}