pkgbase: propagate SRCRELDATE to the packages correctly

MFC After:		3 days
Reviewed by:		manu
Differential Revision:	https://reviews.freebsd.org/D42892
This commit is contained in:
Baptiste Daroussin 2023-12-04 09:22:02 +01:00
parent 7893419d49
commit 5faaa602ce
2 changed files with 11 additions and 2 deletions

View File

@ -2013,6 +2013,7 @@ package-pkg: .PHONY
env ${WMAKEENV:Q} SRCDIR=${.CURDIR} PORTSDIR=${PORTSDIR} REVISION=${_REVISION} \
PKG_CMD=${PKG_CMD} PKG_VERSION=${PKG_VERSION} REPODIR=${REPODIR} \
WSTAGEDIR=${WSTAGEDIR} \
OSVERSION="${SRCRELDATE}" \
sh ${.CURDIR}/release/scripts/make-pkg-package.sh
real-packages: stage-packages create-packages sign-packages .PHONY
@ -2108,12 +2109,16 @@ create-source-packages: _pkgbootstrap .PHONY
-e "s|%PKG_WWW%|${PKG_WWW}|" \
${SRCDIR}/release/packages/src-sys.ucl \
> ${SSTAGEDIR}/src-sys.ucl
${PKG_CMD} -o ABI=${PKG_ABI} create -f ${PKG_FORMAT} \
${PKG_CMD} -o ABI=${PKG_ABI} \
-o OSVERSION="${SRCRELDATE}" \
create -f ${PKG_FORMAT} \
-M ${SSTAGEDIR}/src.ucl \
-p ${SSTAGEDIR}/src.plist \
-r ${SRCDIR} \
-o ${REPODIR}/${PKG_ABI}/${PKG_OUTPUT_DIR}
${PKG_CMD} -o ABI=${PKG_ABI} create -f ${PKG_FORMAT} \
${PKG_CMD} -o ABI=${PKG_ABI} \
-o OSVERSION="${SRCRELDATE}" \
create -f ${PKG_FORMAT} \
-M ${SSTAGEDIR}/src-sys.ucl \
-p ${SSTAGEDIR}/src-sys.plist \
-r ${SRCDIR} \
@ -2153,6 +2158,7 @@ create-world-package-${pkgname}: .PHONY
sed -i '' -e "s/%VCS_REVISION%/${VCS_REVISION}/" ${WSTAGEDIR}/${pkgname}.ucl ; \
fi
${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname -o ALLOW_BASE_SHLIBS=yes \
-o OSVERSION="${SRCRELDATE}" \
create -f ${PKG_FORMAT} -M ${WSTAGEDIR}/${pkgname}.ucl \
-p ${WSTAGEDIR}/${pkgname}.plist \
-r ${WSTAGEDIR} \
@ -2188,6 +2194,7 @@ create-kernel-packages-flavor${flavor:C,^""$,${_default_flavor},}: _pkgbootstrap
/version/ {print $$2; next } ' \
${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl ; \
${PKG_CMD} -o ABI=${PKG_ABI} -o ALLOW_BASE_SHLIBS=yes \
-o OSVERSION="${SRCRELDATE}" \
create -f ${PKG_FORMAT} \
-M ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.ucl \
-p ${KSTAGEDIR}/${DISTDIR}/kernel.${INSTALLKERNEL}${flavor}.plist \
@ -2224,6 +2231,7 @@ create-kernel-packages-extra-flavor${flavor:C,^""$,${_default_flavor},}-${_kerne
/version/ {print $$2; next } ' \
${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl ; \
${PKG_CMD} -o ABI_FILE=${WSTAGEDIR}/usr/bin/uname -o ALLOW_BASE_SHLIBS=yes \
-o OSVERSION="${SRCRELDATE}" \
create -f ${PKG_FORMAT} \
-M ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.ucl \
-p ${KSTAGEDIR}/kernel.${_kernel}/kernel.${_kernel}${flavor}.plist \

View File

@ -9,6 +9,7 @@ export WSTAGEDIR=${WSTAGEDIR}
export REPODIR=${REPODIR}
export PKG_CMD=${PKG_CMD}
export PKG_VERSION=${PKG_VERSION}
export OSVERSION=${OSVERSION}
export WRKDIR=$(make -C ${PORTSDIR}/ports-mgmt/pkg -V WRKDIR)
make -C ${PORTSDIR}/ports-mgmt/pkg TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \