[pve-devel] [PATCH kernel 4.15 1/3] refactor variable names and remove hardcoded major.minor version
Stoiko Ivanov
s.ivanov at proxmox.com
Mon May 28 11:04:46 CEST 2018
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
Makefile | 13 ++++++++++---
debian/rules | 4 ++--
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index c7fe717..b913e89 100644
--- a/Makefile
+++ b/Makefile
@@ -1,11 +1,17 @@
RELEASE=5.1
# also update pve-kernel-meta.git if either of these change
-KERNEL_VER=4.15.17
+KERNEL_MAJ=4
+KERNEL_MIN=15
+KERNEL_PATCHLEVEL=17
+
KREL=2
PKGREL=10
+KERNEL_MAJMIN=$(KERNEL_MAJ).$(KERNEL_MIN)
+KERNEL_VER=$(KERNEL_MAJMIN).$(KERNEL_PATCHLEVEL)
+
EXTRAVERSION=-${KREL}-pve
KVNAME=${KERNEL_VER}${EXTRAVERSION}
PACKAGE=pve-kernel-${KVNAME}
@@ -33,7 +39,7 @@ endif
BUILD_DIR=build
KERNEL_SRC=ubuntu-bionic
-KERNEL_SRC_SUBMODULE=submodules/ubuntu-bionic
+KERNEL_SRC_SUBMODULE=submodules/$(KERNEL_SRC)
KERNEL_CFG_ORG=config-${KERNEL_VER}.org
E1000EDIR=e1000e-3.3.6
@@ -61,7 +67,7 @@ DIRS=KERNEL_SRC E1000EDIR IGBDIR IXGBEDIR SPLDIR ZFSDIR MODULES
DST_DEB=${PACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
HDR_DEB=${HDRPACKAGE}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
-LINUX_TOOLS_DEB=linux-tools-4.15_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
+LINUX_TOOLS_DEB=linux-tools-$(KERNEL_MAJMIN)_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
DEBS=${DST_DEB} ${HDR_DEB} ${LINUX_TOOLS_DEB}
@@ -96,6 +102,7 @@ debian.prepared: debian
echo "git clone git://git.proxmox.com/git/pve-kernel.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE
@$(foreach dir, ${DIRS},echo "${dir}=${${dir}}" >> ${BUILD_DIR}/debian/rules.d/env.mk;)
echo "KVNAME=${KVNAME}" >> ${BUILD_DIR}/debian/rules.d/env.mk
+ echo "KERNEL_MAJMIN=${KERNEL_MAJMIN}" >> ${BUILD_DIR}/debian/rules.d/env.mk
cd ${BUILD_DIR}; debian/rules debian/control
touch $@
diff --git a/debian/rules b/debian/rules
index bc6c867..bb9f330 100755
--- a/debian/rules
+++ b/debian/rules
@@ -15,7 +15,7 @@ CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate)
PVE_KERNEL_PKG=pve-kernel-${KVNAME}
PVE_HEADER_PKG=pve-headers-${KVNAME}
-LINUX_TOOLS_PKG=linux-tools-4.15
+LINUX_TOOLS_PKG=linux-tools-${KERNEL_MAJMIN}
KERNEL_SRC_COPY=${KERNEL_SRC}_tmp
# TODO: split for archs, move to files?
@@ -142,7 +142,7 @@ binary: install
rm -rf debian/${LINUX_TOOLS_PKG}
mkdir -p debian/${LINUX_TOOLS_PKG}/usr/bin
mkdir -p debian/${LINUX_TOOLS_PKG}/usr/share/man/man1
- install -m 755 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/perf debian/${LINUX_TOOLS_PKG}/usr/bin/perf_4.15
+ install -m 755 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/perf debian/${LINUX_TOOLS_PKG}/usr/bin/perf_$(KERNEL_MAJMIN)
install -m644 ${BUILD_DIR}/${KERNEL_SRC}/tools/perf/Documentation/*.1 debian/${LINUX_TOOLS_PKG}/usr/share/man/man1
touch $@
--
2.11.0
More information about the pve-devel
mailing list