From patchwork Fri Oct 6 15:54:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paolo Pisati X-Patchwork-Id: 822500 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) by ozlabs.org (Postfix) with ESMTP id 3y7vMV50Rtz9s7G; Sat, 7 Oct 2017 02:54:14 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1e0Uwy-0003UA-BJ; Fri, 06 Oct 2017 15:54:08 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.86_2) (envelope-from ) id 1e0Uwx-0003Ts-Ro for kernel-team@lists.ubuntu.com; Fri, 06 Oct 2017 15:54:07 +0000 Received: from 1.general.ppisati.uk.vpn ([10.172.193.134] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1e0Uwx-0000kJ-JR for kernel-team@lists.ubuntu.com; Fri, 06 Oct 2017 15:54:07 +0000 From: Paolo Pisati To: kernel-team@lists.ubuntu.com Subject: [PATCH v2] deb to snap: use apt-pinning to install just the kernel from -proposed Date: Fri, 6 Oct 2017 17:54:07 +0200 Message-Id: <1507305247-20239-1-git-send-email-paolo.pisati@canonical.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1d293ea3-bb77-9f34-e38d-16b6e748dc47@canonical.com> References: <1d293ea3-bb77-9f34-e38d-16b6e748dc47@canonical.com> X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" In the target kernel branch (e.g. pc-kernel), enable the proposed repository and point the kernel version to the one present in proposed: Acked-by: Kleber Sacilotto de Souza Acked-by: Stefan Bader --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1,5 +1,5 @@ name: pc-kernel -version: 4.4.0.96.101 +version: 4.4.0.97.102 summary: generic linux kernel description: The generic Ubuntu kernel package as a snap type: kernel @@ -13,6 +13,7 @@ parts: plugin: make make-parameters: - KERNEL=linux-pc-image + - PROPOSED=true build-packages: - debootstrap - lsb-release Signed-off-by: Paolo Pisati --- Makefile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/Makefile b/Makefile index 98c5a48..2dc47ca 100644 --- a/Makefile +++ b/Makefile @@ -25,6 +25,24 @@ $(error linux-pc-image is a meta package only used in i386 or amd64, abort) endif endif +define APTPREF +Package: * +Pin: release a=$(RELEASE); +Pin-Priority: 700 + +Package: * +Pin: release a=$(RELEASE)-updates +Pin-Priority: 700 + +Package: * +Pin: release a=$(RELEASE)-security +Pin-Priority: 700 + +Package: * +Pin: release a=$(RELEASE)-proposed +Pin-Priority: 650 +endef +export APTPREF install : KVERS = $(shell ls -1 chroot/boot/vmlinuz-*| tail -1 |sed 's/^.*vmlinuz-//;s/.efi.signed$$//') @@ -35,6 +53,7 @@ all: if [ "$(PROPOSED)" = "true" ]; then \ echo "deb http://$(MIRROR) $(RELEASE)-proposed main restricted" >> chroot/etc/apt/sources.list; \ echo "deb http://$(MIRROR) $(RELEASE)-proposed universe" >> chroot/etc/apt/sources.list; \ + echo "$${APTPREF}" > chroot/etc/apt/preferences.d/01proposedkernel; \ fi mkdir -p chroot/etc/initramfs-tools/conf.d echo "COMPRESS=lzma" >chroot/etc/initramfs-tools/conf.d/ubuntu-core.conf