From: Fabian Grünbichler Date: Wed, 8 Feb 2017 14:49:46 +0000 (+0100) Subject: fix #1276: include package version in uname information X-Git-Url: https://git.proxmox.com/?p=pve-kernel-jessie.git;a=commitdiff_plain;h=f0fefa818c58fccc1eabecebbd65276bfa7a0843 fix #1276: include package version in uname information Signed-off-by: Fabian Grünbichler --- diff --git a/Makefile b/Makefile index 132521e..ed7e307 100644 --- a/Makefile +++ b/Makefile @@ -17,6 +17,7 @@ HDRPACKAGE=pve-headers-${KVNAME} ARCH=amd64 GITVERSION:=$(shell cat .git/refs/heads/master) +CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate -lchangelog.Debian) TOP=$(shell pwd) @@ -241,7 +242,7 @@ PVE_CONFIG_OPTS= \ cp ${KERNEL_CFG_ORG} ${KERNEL_SRC}/.config cd ${KERNEL_SRC}; ./scripts/config ${PVE_CONFIG_OPTS} cd ${KERNEL_SRC}; make oldconfig - cd ${KERNEL_SRC}; make -j 8 + cd ${KERNEL_SRC}; make KBUILD_BUILD_VERSION_TIMESTAMP="PVE ${KERNEL_VER}-${PKGREL} ($(CHANGELOG_DATE))" -j 8 make -C ${KERNEL_SRC}/tools/perf prefix=/usr HAVE_CPLUS_DEMANGLE=1 NO_LIBPYTHON=1 NO_LIBPERL=1 NO_LIBCRYPTO=1 PYTHON=python2.7 make -C ${KERNEL_SRC}/tools/perf man touch $@ @@ -250,6 +251,7 @@ ${KERNEL_SRC}/README ${KERNEL_CFG_ORG}: ${KERNELSRCTAR} rm -rf ${KERNEL_SRC} tar xf ${KERNELSRCTAR} cat ${KERNEL_SRC}/debian.master/config/config.common.ubuntu ${KERNEL_SRC}/debian.master/config/amd64/config.common.amd64 ${KERNEL_SRC}/debian.master/config/amd64/config.flavour.generic > ${KERNEL_CFG_ORG} + cd ${KERNEL_SRC}; patch -p1 < ../uname-version-timestamp.patch cd ${KERNEL_SRC}; patch -p1 <../bridge-patch.diff #cd ${KERNEL_SRC}; patch -p1 <../bridge-forward-ipv6-neighbor-solicitation.patch #cd ${KERNEL_SRC}; patch -p1 <../add-empty-ndo_poll_controller-to-veth.patch diff --git a/uname-version-timestamp.patch b/uname-version-timestamp.patch new file mode 100644 index 0000000..5cd565c --- /dev/null +++ b/uname-version-timestamp.patch @@ -0,0 +1,33 @@ +From: Ben Hutchings +Subject: Make mkcompile_h accept an alternate timestamp string +Date: Tue, 12 May 2015 19:29:22 +0100 +Forwarded: not-needed + +We want to include the Debian version in the utsname::version string +instead of a full timestamp string. However, we still need to provide +a standard timestamp string for gen_initramfs_list.sh to make the +kernel image reproducible. + +Make mkcompile_h use $KBUILD_BUILD_VERSION_TIMESTAMP in preference to +$KBUILD_BUILD_TIMESTAMP. + +--- a/scripts/mkcompile_h ++++ b/scripts/mkcompile_h +@@ -37,10 +37,14 @@ else + VERSION=$KBUILD_BUILD_VERSION + fi + +-if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then +- TIMESTAMP=`date` ++if [ -z "$KBUILD_BUILD_VERSION_TIMESTAMP" ]; then ++ if [ -z "$KBUILD_BUILD_TIMESTAMP" ]; then ++ TIMESTAMP=`date` ++ else ++ TIMESTAMP=$KBUILD_BUILD_TIMESTAMP ++ fi + else +- TIMESTAMP=$KBUILD_BUILD_TIMESTAMP ++ TIMESTAMP=$KBUILD_BUILD_VERSION_TIMESTAMP + fi + if test -z "$KBUILD_BUILD_USER"; then + LINUX_COMPILE_BY=$(whoami | sed 's/\\/\\\\/')