From 43a34d06967260a5ba7d65447bb86cfa8168e9ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fabian=20Gr=C3=BCnbichler?= Date: Mon, 5 Mar 2018 15:08:29 +0100 Subject: [PATCH] initial commit based on proxmox-ve.git and pve-kernel.git --- Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ debian/changelog | 5 +++++ debian/compat | 1 + debian/control.in | 27 +++++++++++++++++++++++++++ debian/copyright | 21 +++++++++++++++++++++ debian/postinst.in | 15 +++++++++++++++ debian/postrm.in | 18 ++++++++++++++++++ debian/rules | 27 +++++++++++++++++++++++++++ 8 files changed, 155 insertions(+) create mode 100644 Makefile create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control.in create mode 100644 debian/copyright create mode 100755 debian/postinst.in create mode 100755 debian/postrm.in create mode 100755 debian/rules diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..367cf20 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +RELEASE=5.1 +PKGREL=42 + +export KERNEL_VER=4.13 +export KERNEL_ABI=4.13.13-6-pve + +PACKAGE=pve-kernel-${KERNEL_VER} + +GITVERSION:=$(shell git rev-parse HEAD) + +KERNEL_DEB=pve-kernel-${KERNEL_VER}_${RELEASE}-${PKGREL}_all.deb +HEADERS_DEB=pve-headers-${KERNEL_VER}_${RELEASE}-${PKGREL}_all.deb + +BUILD_DIR=build + +DEBS=${KERNEL_DEB} ${HEADERS_DEB} + +all: deb +deb: ${DEBS} + +${HEADERS_DEB}: ${KERNEL_DEB} +${KERNEL_DEB}: debian + rm -rf ${BUILD_DIR} + mkdir -p ${BUILD_DIR}/debian + cp -ar debian/* ${BUILD_DIR}/debian/ + cd ${BUILD_DIR}; debian/rules debian/control + echo "git clone git://git.proxmox.com/git/pve-kernel-meta.git\\ngit checkout ${GITVERSION}" > ${BUILD_DIR}/debian/SOURCE + cd ${BUILD_DIR}; dpkg-buildpackage -b -uc -us + lintian ${KERNEL_DEB} + lintian ${HEADERS_DEB} + +.PHONY: upload +upload: ${DEBS} + tar cf - ${DEBS}|ssh repoman@repo.proxmox.com -- upload --product pve,pmg --dist stretch --arch ${ARCH} + +.PHONY: distclean +distclean: clean + +.PHONY: clean +clean: + rm -rf *~ ${BUILD_DIR} *.deb *.dsc *.changes *.buildinfo diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..9502cca --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +pve-kernel-4.13 (5.1-42) unstable; urgency=medium + + * add new meta packages pve-kernel-4.13 and pve-headers-4.13 + + -- Proxmox Support Team Mon, 5 Mar 2018 15:05:49 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..f599e28 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +10 diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 0000000..4972ea7 --- /dev/null +++ b/debian/control.in @@ -0,0 +1,27 @@ +Source: pve-kernel-@KERNEL_VER@ +Section: admin +Priority: optional +Build-Depends: debhelper (>=10~), + lintian, + sed, +Maintainer: Proxmox Support Team + +Package: pve-headers-@KERNEL_VER@ +Architecture: all +Section: admin +Priority: optional +Depends: pve-headers-@KERNEL_ABI@, +Description: Latest Proxmox VE Kernel Headers + This is a virtual package which will install the kernel headers + for the latest available proxmox kernel from the @KERNEL_VER@ + series. + +Package: pve-kernel-@KERNEL_VER@ +Architecture: all +Section: admin +Priority: optional +Depends: pve-firmware, + pve-kernel-@KERNEL_ABI@, +Description: Latest Proxmox VE Kernel Image + This is a virtual package which will install the latest available + proxmox kernel from the @KERNEL_VER@ series. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..4627afc --- /dev/null +++ b/debian/copyright @@ -0,0 +1,21 @@ +Copyright (C) 2016 Proxmox Server Solutions GmbH + +This software is written by Proxmox Server Solutions GmbH + + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, + MA 02110-1301 USA + +The complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. diff --git a/debian/postinst.in b/debian/postinst.in new file mode 100755 index 0000000..a0d87bb --- /dev/null +++ b/debian/postinst.in @@ -0,0 +1,15 @@ +#! /bin/sh + +# Abort if any command returns an error value +set -e + +case "$1" in + configure) + # setup kernel links for installation CD (rescue boot) + mkdir -p /boot/pve + ln -sf /boot/vmlinuz-@KERNEL_ABI@ /boot/pve/vmlinuz-@KERNEL_VER@ + ln -sf /boot/initrd.img-@KERNEL_ABI@ /boot/pve/initrd.img-@KERNEL_VER@ + ;; +esac + +exit 0 diff --git a/debian/postrm.in b/debian/postrm.in new file mode 100755 index 0000000..3df001d --- /dev/null +++ b/debian/postrm.in @@ -0,0 +1,18 @@ +#! /bin/sh + +# Abort if any command returns an error value +set -e + +case "$1" in + purge|remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + # remove kernel symlinks + rm -f /boot/pve/vmlinuz-@KERNEL_ABI@ + rm -f /boot/pve/initrd.img-@KERNEL_ABI@ + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..1592fb5 --- /dev/null +++ b/debian/rules @@ -0,0 +1,27 @@ +#!/usr/bin/make -f +# -*- makefile -*- + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +debian/control: $(wildcard debian/*.in) + sed -e 's/@KERNEL_ABI@/${KERNEL_ABI}/g' < debian/postrm.in > debian/pve-kernel-${KERNEL_VER}.postrm + sed -e 's/@KERNEL_ABI@/${KERNEL_ABI}/g' -e 's/@KERNEL_VER@/${KERNEL_VER}/g' < debian/postinst.in > debian/pve-kernel-${KERNEL_VER}.postinst + sed -e 's/@KERNEL_ABI@/${KERNEL_ABI}/g' -e 's/@KERNEL_VER@/${KERNEL_VER}/g' < debian/control.in > debian/control + + +install: + dh_installdocs -A debian/SOURCE debian/copyright + dh_installchangelogs + dh_strip_nondeterminism + dh_compress + dh_fixperms + +binary: install + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +.PHONY: build clean +build clean: -- 2.39.2