Bläddra i källkod

buildsys: convert to submodules

Fabian Grünbichler 8 år sedan
förälder
incheckning
32054ef45a
5 ändrade filer med 25 tillägg och 13 borttagningar
  1. 1 0
      .gitignore
  2. 6 0
      .gitmodules
  3. 16 13
      Makefile
  4. 1 0
      submodules/ubuntu-zesty
  5. 1 0
      submodules/zfs

+ 1 - 0
.gitignore

@@ -0,0 +1 @@
+ubuntu-zesty

+ 6 - 0
.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

+ 16 - 13
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}

+ 1 - 0
submodules/ubuntu-zesty

@@ -0,0 +1 @@
+Subproject commit aa033b4cfc08f19c4907d999c32ec6f6ccd4de89

+ 1 - 0
submodules/zfs

@@ -0,0 +1 @@
+Subproject commit 1e88a708021d04beec91c3f2c6c8be9a12ca7677