From 4821f9ed5bf65257ea0b629dd1b6c2c3c779a167 Mon Sep 17 00:00:00 2001 From: Glen Barber Date: Tue, 16 Feb 2016 20:11:00 +0000 Subject: [PATCH] Always include the kernel name in the resulting package. While functionally expected to be a no-op on big-iron hardware, embedded hardware (arm, mips) do not have a GENERIC kernel, so the KERNCONF value must be included in the package to avoid conflicting packages for the default kernel (RPI-B versus RPI2, for example). While here, correct the kernel name in the metadata. Sponsored by: The FreeBSD Foundation --- Makefile.inc1 | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index 48a41e48cc43..2f8552a1a8cc 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -1424,25 +1424,25 @@ create-kernel-packages: _pkgbootstrap .for flavor in release debug @cd ${DESTDIR}/${DISTDIR} ; \ awk -f ${SRCDIR}/release/scripts/mtree-to-plist.awk \ - -v kernel=yes \ + -v kernel=yes -v _kernconf=${INSTALLKERNEL} \ ${DESTDIR}/kernel.meta ; \ cap_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VCAP_MKDB_ENDIAN` ; \ pwd_arg=`cd ${SRCDIR}/etc ; ${MAKE} -VPWD_MKDB_ENDIAN` ; \ sed -e "s/%VERSION%/${PKG_VERSION}/" \ - -e "s/%PKGNAME%/kernel-${flavor}/" \ - -e "s/%COMMENT%/FreeBSD ${INSTKERNNAME} kernel ${flavor}/" \ - -e "s/%DESC%/FreeBSD ${INSTKERNNAME} kernel ${flavor}/" \ + -e "s/%PKGNAME%/kernel-${INSTALLKERNEL:tl}-${flavor}/" \ + -e "s/%COMMENT%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ + -e "s/%DESC%/FreeBSD ${INSTALLKERNEL} kernel ${flavor}/" \ -e "s/%CAP_MKDB_ENDIAN%/$${cap_arg}/g" \ -e "s/%PWD_MKDB_ENDIAN%/$${pwd_arg}/g" \ ${SRCDIR}/release/packages/kernel.ucl \ - > ${DESTDIR}/${DISTDIR}/kernel-${flavor}.ucl ; \ + > ${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}-${flavor}.ucl ; \ awk -F\" ' \ /name/ { printf("===> Creating %s-", $$2); next } \ /version/ {print $$2; next } ' \ - ${DESTDIR}/${DISTDIR}/kernel-${flavor}.ucl ; \ + ${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}-${flavor}.ucl ; \ pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh \ - create -M ${DESTDIR}/${DISTDIR}/kernel-${flavor}.ucl \ - -p ${DESTDIR}/${DISTDIR}/kernel-${flavor}.plist \ + create -M ${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}-${flavor}.ucl \ + -p ${DESTDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}-${flavor}.plist \ -r ${DESTDIR}/${DISTDIR} \ -o ${REPODIR}/$$(pkg -o ABI_FILE=${WSTAGEDIR}/bin/sh config ABI)/${PKG_VERSION} .endfor