[pve-devel] [PATCH v2 1/3] build-sys: replace fixed architecture use where possible
Thomas Lamprecht
t.lamprecht at proxmox.com
Wed May 10 16:33:45 CEST 2017
---
changes v1 -> v2:
* do not use ${ARCH} for locating the bzImage as we need to map the variable
for x86_64 (I do it in a later patch)
* use ${ARCH} also for producing the kernels .config file
Makefile | 10 +++++-----
control.in | 2 +-
control.tools | 2 +-
headers-control.in | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/Makefile b/Makefile
index 2deadfa..5b04e94 100644
--- a/Makefile
+++ b/Makefile
@@ -15,7 +15,7 @@ KVNAME=${KERNEL_VER}${EXTRAVERSION}
PACKAGE=pve-kernel-${KVNAME}
HDRPACKAGE=pve-headers-${KVNAME}
-ARCH=amd64
+ARCH=$(shell dpkg-architecture -qDEB_BUILD_ARCH)
GITVERSION:=$(shell cat .git/refs/heads/master)
CHANGELOG_DATE:=$(shell dpkg-parsechangelog -SDate -lchangelog.Debian)
export SOURCE_DATE_EPOCH ?= $(shell dpkg-parsechangelog -STimestamp -lchangelog.Debian)
@@ -50,7 +50,7 @@ VIRTUALHDRPACKAGE=pve-headers
VIRTUAL_HDR_DEB=${VIRTUALHDRPACKAGE}_${RELEASE}-${PKGREL}_all.deb
LINUX_TOOLS_PKG=linux-tools-4.10
-LINUX_TOOLS_DEB=${LINUX_TOOLS_PKG}_${KERNEL_VER}-${PKGREL}_amd64.deb
+LINUX_TOOLS_DEB=${LINUX_TOOLS_PKG}_${KERNEL_VER}-${PKGREL}_${ARCH}.deb
DEBS=${DST_DEB} ${HDR_DEB} ${PVE_DEB} ${VIRTUAL_HDR_DEB} ${LINUX_TOOLS_DEB}
@@ -92,7 +92,7 @@ endif
${DST_DEB}: data control.in prerm.in postinst.in postrm.in copyright changelog.Debian | fwcheck abicheck
mkdir -p data/DEBIAN
- sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' <control.in >data/DEBIAN/control
+ sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' -e 's/@ARCH@/${ARCH}/' <control.in >data/DEBIAN/control
sed -e 's/@@KVNAME@@/${KVNAME}/g' <prerm.in >data/DEBIAN/prerm
chmod 0755 data/DEBIAN/prerm
sed -e 's/@@KVNAME@@/${KVNAME}/g' <postinst.in >data/DEBIAN/postinst
@@ -216,7 +216,7 @@ PVE_CONFIG_OPTS= \
${KERNEL_SRC}/README ${KERNEL_CFG_ORG}: ${KERNEL_SRC_SUBMODULE} | submodules
rm -rf ${KERNEL_SRC}
cp -a ${KERNEL_SRC_SUBMODULE} ${KERNEL_SRC}
- 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}
+ cat ${KERNEL_SRC}/debian.master/config/config.common.ubuntu ${KERNEL_SRC}/debian.master/config/${ARCH}/config.common.${ARCH} ${KERNEL_SRC}/debian.master/config/${ARCH}/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
@@ -292,7 +292,7 @@ headers_dir := $(headers_tmp)/usr/src/linux-headers-${KVNAME}
${HDR_DEB} hdr: .compile_mark headers-control.in headers-postinst.in
rm -rf $(headers_tmp)
install -d $(headers_tmp)/DEBIAN $(headers_dir)/include/
- sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' <headers-control.in >$(headers_tmp)/DEBIAN/control
+ sed -e 's/@KERNEL_VER@/${KERNEL_VER}/' -e 's/@KVNAME@/${KVNAME}/' -e 's/@PKGREL@/${PKGREL}/' -e 's/@ARCH@/${ARCH}/' <headers-control.in >$(headers_tmp)/DEBIAN/control
sed -e 's/@@KVNAME@@/${KVNAME}/g' <headers-postinst.in >$(headers_tmp)/DEBIAN/postinst
chmod 0755 $(headers_tmp)/DEBIAN/postinst
install -D -m 644 copyright $(headers_tmp)/usr/share/doc/${HDRPACKAGE}/copyright
diff --git a/control.in b/control.in
index 61ece86..df434a1 100644
--- a/control.in
+++ b/control.in
@@ -2,7 +2,7 @@ Package: pve-kernel- at KVNAME@
Version: @KERNEL_VER at -@PKGREL@
Section: admin
Priority: optional
-Architecture: amd64
+Architecture: @ARCH@
Provides: linux-image, linux-image-2.6
Suggests: pve-firmware
Depends: grub-pc | grub-efi-amd64 | grub-efi-ia32, initramfs-tools, busybox
diff --git a/control.tools b/control.tools
index db61d55..3ad6c27 100644
--- a/control.tools
+++ b/control.tools
@@ -2,7 +2,7 @@ Source: pve-kernel
Maintainer: Proxmox Support Team <support at proxmox.com>
Package: linux-tools-4.10
-Architecture: amd64
+Architecture: any
Section: devel
Priority: optional
Depends: ${misc:Depends}, ${shlibs:Depends}, linux-base
diff --git a/headers-control.in b/headers-control.in
index efccbe2..c9a7cf3 100644
--- a/headers-control.in
+++ b/headers-control.in
@@ -2,7 +2,7 @@ Package: pve-headers- at KVNAME@
Version: @KERNEL_VER at -@PKGREL@
Section: devel
Priority: optional
-Architecture: amd64
+Architecture: @ARCH@
Provides: linux-headers, linux-headers-2.6
Depends: coreutils | fileutils (>= 4.0)
Maintainer: Proxmox Support Team <support at proxmox.com>
--
2.11.0
More information about the pve-devel
mailing list