]> git.proxmox.com Git - pve-kernel.git/commitdiff
buildsys: convert to submodules
authorFabian Grünbichler <f.gruenbichler@proxmox.com>
Wed, 15 Mar 2017 14:21:54 +0000 (15:21 +0100)
committerFabian Grünbichler <f.gruenbichler@proxmox.com>
Fri, 24 Mar 2017 12:03:07 +0000 (13:03 +0100)
.gitignore [new file with mode: 0644]
.gitmodules [new file with mode: 0644]
Makefile
submodules/ubuntu-zesty [new submodule]
submodules/zfs [new submodule]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..9ce9b07
--- /dev/null
@@ -0,0 +1 @@
+ubuntu-zesty
diff --git a/.gitmodules b/.gitmodules
new file mode 100644 (file)
index 0000000..618de8d
--- /dev/null
@@ -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
index 0caa63200e0ee3b165dd9c92d6120a9776a2917d..3ec2625f2016ede060125ccaa3d5064e1455077c 100644 (file)
--- 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 (submodule)
index 0000000..aa033b4
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit aa033b4cfc08f19c4907d999c32ec6f6ccd4de89
diff --git a/submodules/zfs b/submodules/zfs
new file mode 160000 (submodule)
index 0000000..1e88a70
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 1e88a708021d04beec91c3f2c6c8be9a12ca7677