Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 21 Mar 2018 15:43:57 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r331308 - in stable/11: . release/packages
Message-ID:  <201803211543.w2LFhvUL022812@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Wed Mar 21 15:43:57 2018
New Revision: 331308
URL: https://svnweb.freebsd.org/changeset/base/331308

Log:
  MFC r330929: 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.

Modified:
  stable/11/Makefile.inc1
  stable/11/release/packages/kernel.ucl
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/Makefile.inc1
==============================================================================
--- stable/11/Makefile.inc1	Wed Mar 21 15:42:29 2018	(r331307)
+++ stable/11/Makefile.inc1	Wed Mar 21 15:43:57 2018	(r331308)
@@ -1495,6 +1495,7 @@ _debug=-debug
 	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" \
@@ -1527,6 +1528,7 @@ _debug=-debug
 	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" \

Modified: stable/11/release/packages/kernel.ucl
==============================================================================
--- stable/11/release/packages/kernel.ucl	Wed Mar 21 15:42:29 2018	(r331307)
+++ stable/11/release/packages/kernel.ucl	Wed Mar 21 15:43:57 2018	(r331308)
@@ -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
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803211543.w2LFhvUL022812>