From 32054ef45a6e0c8f23c2a16c30011372d2cb0b27 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Wed, 15 Mar 2017 15:21:54 +0100 Subject: [PATCH] buildsys: convert to submodules --- .gitignore | 1 + .gitmodules | 6 ++++++ Makefile | 29 ++++++++++++++++------------- submodules/ubuntu-zesty | 1 + submodules/zfs | 1 + 5 files changed, 25 insertions(+), 13 deletions(-) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 160000 submodules/ubuntu-zesty create mode 160000 submodules/zfs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9ce9b07 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +ubuntu-zesty diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..618de8d --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "submodules/ubuntu-zesty"] + path = submodules/ubuntu-zesty + url = ../mirror_ubuntu-zesty-kernel +[submodule "submodules/zfs"] + path = submodules/zfs + url = ../zfsonlinux diff --git a/Makefile b/Makefile index 0caa632..3ec2625 100644 --- a/Makefile +++ b/Makefile @@ -8,7 +8,7 @@ PKGREL=2 KREL=2 KERNEL_SRC=ubuntu-zesty -KERNELSRCTAR=${KERNEL_SRC}.tgz +KERNEL_SRC_SUBMODULE=submodules/ubuntu-zesty EXTRAVERSION=-${KREL}-pve KVNAME=${KERNEL_VER}${EXTRAVERSION} @@ -66,9 +66,9 @@ HPSASRC=${HPSADIR}-140.tar.bz2 #RR272XDIR=rr272x_1x-linux-src-v1.5 SPLDIR=pkg-spl -SPLSRC=pkg-spl.tar.gz +SPLSRC=submodules/zfs/pkg-spl.tar.gz ZFSDIR=pkg-zfs -ZFSSRC=pkg-zfs.tar.gz +ZFSSRC=submodules/zfs/pkg-zfs.tar.gz ZFS_MODULES=zfs.ko zavl.ko znvpair.ko zunicode.ko zcommon.ko zpios.ko SPL_MODULES=spl.ko splat.ko @@ -120,14 +120,6 @@ ${VIRTUAL_HDR_DEB} pve-headers: proxmox-ve/pve-headers.control gzip -n --best proxmox-ve/data/usr/share/doc/${VIRTUALHDRPACKAGE}/changelog.Debian dpkg-deb --build proxmox-ve/data ${VIRTUAL_HDR_DEB} -# see https://wiki.ubuntu.com/Kernel/Dev/KernelGitGuide -.PHONY: download -download: - rm -rf ${KERNEL_SRC} ${KERNELSRCTAR} - #git clone git://kernel.ubuntu.com/ubuntu/ubuntu-vivid.git - git clone --single-branch -b Ubuntu-4.10.0-13.15 git://kernel.ubuntu.com/ubuntu/ubuntu-zesty.git ${KERNEL_SRC} - tar czf ${KERNELSRCTAR} --exclude .git ${KERNEL_SRC} - check_gcc: ifeq ($(CC), cc) gcc --version|grep "6\.3" || false @@ -244,9 +236,9 @@ PVE_CONFIG_OPTS= \ make -C ${KERNEL_SRC}/tools/perf man touch $@ -${KERNEL_SRC}/README ${KERNEL_CFG_ORG}: ${KERNELSRCTAR} +${KERNEL_SRC}/README ${KERNEL_CFG_ORG}: ${KERNEL_SRC_SUBMODULE} | submodules rm -rf ${KERNEL_SRC} - tar xf ${KERNELSRCTAR} + 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} cd ${KERNEL_SRC}; patch -p1 < ../uname-version-timestamp.patch cd ${KERNEL_SRC}; patch -p1 <../bridge-patch.diff @@ -448,6 +440,17 @@ upload: ${DEBS} distclean: clean rm -rf linux-firmware.git dvb-firmware.git ${KERNEL_SRC}.org +# upgrade to current master +.PHONY: update_modules +update_modules: submodules + git submodule foreach 'git pull --ff-only origin master' + +# make sure submodules were initialized +.PHONY: submodules +submodules ${SPLSRC} ${ZFSSRC}: + test -f "${KERNEL_SRC_SUBMODULE}/README" || git submodule update --init + + .PHONY: clean clean: rm -rf *~ .compile_mark watchdog-blacklist.tmp ${KERNEL_CFG_ORG} ${KERNEL_SRC} ${KERNEL_SRC}.tmp ${KERNEL_CFG_ORG} ${KERNEL_SRC}.org orig tmp data proxmox-ve/data *.deb ${headers_tmp} fwdata fwlist.tmp *.ko fwlist-${KVNAME} ${ZFSDIR} ${SPLDIR} ${SPL_MODULES} ${ZFS_MODULES} hpsa.ko ${HPSADIR} ${DRBDDIR} drbd-9.0 ${IGBDIR} igb.ko ${IXGBEDIR} ixgbe.ko ${E1000EDIR} e1000e.ko linux-tools ${LINUX_TOOLS_DEB} diff --git a/submodules/ubuntu-zesty b/submodules/ubuntu-zesty new file mode 160000 index 0000000..aa033b4 --- /dev/null +++ b/submodules/ubuntu-zesty @@ -0,0 +1 @@ +Subproject commit aa033b4cfc08f19c4907d999c32ec6f6ccd4de89 diff --git a/submodules/zfs b/submodules/zfs new file mode 160000 index 0000000..1e88a70 --- /dev/null +++ b/submodules/zfs @@ -0,0 +1 @@ +Subproject commit 1e88a708021d04beec91c3f2c6c8be9a12ca7677 -- 2.39.2