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
This commit is contained in:
parent
7b194b3d3b
commit
fb6d3be5db
@ -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" \
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user