From patchwork Wed Jul 28 14:18:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1510875 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=k8XNtZge; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GZbPW1DPdz9sX5; Thu, 29 Jul 2021 00:18:55 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1m8kOZ-0004A7-VY; Wed, 28 Jul 2021 14:18:51 +0000 Received: from smtp-relay-canonical-1.internal ([10.131.114.174] helo=smtp-relay-canonical-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1m8kOY-00049k-0e for kernel-team@lists.ubuntu.com; Wed, 28 Jul 2021 14:18:50 +0000 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-1.canonical.com (Postfix) with ESMTPS id D97143F246 for ; Wed, 28 Jul 2021 14:18:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627481929; bh=cRTtjigMun+8yy7o4Clgxd9AJFqwnvMnfTNMqI1FVgw=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=k8XNtZgeoqMyVegmMJeDhByE2OlSn/INQBUw1zb+A2bg1YenUrK9JnyM0zd+awo9Q L1w6Aci5pv+3WLWoJ5QGYtLLyoEowE7Q+O24o5gpToyEqvzcVXjAMS91J9WsAXd29M jqnu0jcBSOOaVXvi4xPlLwIr3V4yPmHY0jvANH3O33ooDfHqZW9FyynBGfCH9jvR2P bMDK96Bso5/RH21RObw0ui+rFR0OPHpVgF943SqDT7X9HCogyJblHlO9zCVkGA5nIL 85bJgWWTE1eoUJiyjZ6a3rjQU6GWryDfTDLssatjbKUcV++PbqZztWw69B217VosZK kFv57xpL7zXKA== Received: by mail-pj1-f70.google.com with SMTP id gk17-20020a17090b1191b02901775097f98dso1082691pjb.6 for ; Wed, 28 Jul 2021 07:18:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cRTtjigMun+8yy7o4Clgxd9AJFqwnvMnfTNMqI1FVgw=; b=DJlh05tLxtzxkV5/Hp28U2320S/KmNbCAxxEjlt1xO+dlX4zi1mW3+FBMP0caV5KW1 KmQPzYW3vJlZpD157Z0z5dj4IiDveEvGfywhkKHNFBoRt6IyiK/av8UrjA9rOYXhDH7j O41oFktR80nzHxaj+Ufy8iS6L1896WOjG9KmtLU0CKdAC0aVKs/EXeFv1zqkFANnOGDB GkdNjJPMRovKeK8eURKPe8FXTADlRdDO1ey4pdnlDd1AHSuzOWdr7/PLG/+agMJ8uy5n 2yc5zyyUfb10h4uCeWLMR4g6/Y2ReCa/MsDaUcAqp7kVrw9MW0U1kf6XkpRCepxvj5JM kAvQ== X-Gm-Message-State: AOAM533R3QzKvKXyjloEeKS/VB0VtL8fg2r4HbczVzwflmbTLR8sS4DV ebdyLjODxvceMjq6LKAXg55TY+I0tIsrGVwQxUoLBeid8RoqB89hNYeqDMVV3pjKyhxnafEMMi6 kHtfyjrrnt91e3iA794HmwX19vnY6GU3keXaLLZubCA== X-Received: by 2002:a63:1656:: with SMTP id 22mr37454pgw.163.1627481928090; Wed, 28 Jul 2021 07:18:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwtu12tZHEbcFKOHFq9ho15wBqKKcsiC9/K7mUVOUiQBruHRotvir/Qs2hs054eg2498+fshw== X-Received: by 2002:a63:1656:: with SMTP id 22mr37437pgw.163.1627481927791; Wed, 28 Jul 2021 07:18:47 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:e33:f6e1:b52d:11a8]) by smtp.gmail.com with ESMTPSA id o8sm6363096pjm.21.2021.07.28.07.18.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 07:18:47 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/2][FOCAL linux-signed-uc20-efi] UBUNTU: [Packaging] Add depends on firmware and modules Date: Wed, 28 Jul 2021 15:18:23 +0100 Message-Id: <20210728141824.67699-2-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210728141824.67699-1-dimitri.ledkov@canonical.com> References: <20210728141824.67699-1-dimitri.ledkov@canonical.com> MIME-Version: 1.0 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Add required firmware, wireless-regdb, modules dependencies to the image meta. CPU microcode is not needed, as it is already included in the signed kernel.efi. This will enable to use `stage-packages:` directive in snapcraft.yaml when packaging the kernel snap without any makefiles or heuristics. Signed-off-by: Dimitri John Ledkov --- debian/control.stub | 2 ++ 1 file changed, 2 insertions(+) diff --git a/debian/control.stub b/debian/control.stub index 25333f876b..9f72ac368a 100644 --- a/debian/control.stub +++ b/debian/control.stub @@ -11,12 +11,14 @@ Standards-Version: 3.9.4 Package: linux-image-uc20-efi-generic Architecture: amd64 +Depends: linux-firmware, wireless-regdb, linux-modules-@ABI@-generic, linux-modules-extra-@ABI@-generic Description: Signed UC20 kernel image generic A kernel image for generic UC20. This version of it is signed with Canonical's UEFI signing key. Package: linux-image-uc20-efi-lowlatency Architecture: amd64 +Depends: linux-firmware, wireless-regdb, linux-modules-@ABI@-lowlatency Description: Signed UC20 kernel image generic A kernel image for generic UC20. This version of it is signed with Canonical's UEFI signing key. From patchwork Wed Jul 28 14:18:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1510876 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=B0xmg9Bw; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GZbPd1R5Lz9sSs; Thu, 29 Jul 2021 00:19:01 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1m8kOg-0004Bp-8U; Wed, 28 Jul 2021 14:18:58 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1m8kOe-0004BR-DA for kernel-team@lists.ubuntu.com; Wed, 28 Jul 2021 14:18:56 +0000 Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPS id 441613F237 for ; Wed, 28 Jul 2021 14:18:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1627481936; bh=vpU97zzsZmU4NfWahPd2Ve5O6zEV5A5+6Qfrk6yf6BQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=B0xmg9Bw/H3Z8CYmkXVo/uttcl5nn1DcLZ2lBuCnxFYzBxG3a1slXBnidyWf1h1vE L6QrX7I//DV1Z2nx1oqfoAwWJJwu6zUv977kf/NUxlBYRl3alXfgAT+Xy7yIseouc2 6rbMiDrql8zxt9fCREKUA2sYX92SvN4tRdfmJwJ17TbO4cJEEyPXvJm4hInO1X3NEa 2RBVCGJd6xBrXvb42Kk6cGRBFDn5qkNXmHWM4xcvarKC0y/Py3khyG3Tb+tkey+eh/ 5Hr+qz0gJgC7wKg/uUlrvDKxCD3jKqCISPWOpKtveRogPzFEQl9q9NUP84mbkxkF6I 9Zp4AKc7ZaMlw== Received: by mail-pl1-f198.google.com with SMTP id p7-20020a170902b087b029012c2879a885so2125452plr.6 for ; Wed, 28 Jul 2021 07:18:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vpU97zzsZmU4NfWahPd2Ve5O6zEV5A5+6Qfrk6yf6BQ=; b=JlkaVAp9SVHpkhvWn7pZXsDkMS6191t+ycbh4a0ut5l4NubsJxO7w++rFvusF44e2q VjMa9ASHk/wpJzmUSzI4GedWJF8itZpu0ucAaLDtfMvi6bzEaTzWBxFJCXvH6eGPhAoP E8y/sniVYYuNyQ6kVLFwbUbLOIhpySxIQ0cFob39rt1QKLGsqM4BUIKbMFB9IFiPSnck IQrx8dCoCl5hwmcCfv12PriqSlPXQUA842r/ajupcpufNX2r55IMIl2q6WBgm4/Mz46p 0qhiQq0z+JccLW7nrnsGa9v7T0mzXlc27OPUJJb7KaNcZE2QP6am3aWsr5EwH7RwPJtJ DBmg== X-Gm-Message-State: AOAM532x27ZKD7Vcmug41x8s0cJ0GVkAfxT53d9D/Eaf+fb4d3siprne DKG8KC8pDj8ubcIZ1Cwk259QOAdUvHtYAaH5dnfdPfEbdc5fenT5Z2WG+FtfBlHr1jSU5ePOc6b dVUJO4GBSyL5SqRR/RsFFBZg24DcU1LGGwMYxdbZing== X-Received: by 2002:aa7:8d10:0:b029:303:8d17:7b8d with SMTP id j16-20020aa78d100000b02903038d177b8dmr28368960pfe.26.1627481934478; Wed, 28 Jul 2021 07:18:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy/H7YIErhJH3kK5MhGoXXZ0NU8Ffe+8c8+Gi4fcS9GC7sS3f0a7ZFlSXh4tjMNwAWCo6eTSg== X-Received: by 2002:aa7:8d10:0:b029:303:8d17:7b8d with SMTP id j16-20020aa78d100000b02903038d177b8dmr28368936pfe.26.1627481934231; Wed, 28 Jul 2021 07:18:54 -0700 (PDT) Received: from localhost ([2a01:4b00:85fd:d700:e33:f6e1:b52d:11a8]) by smtp.gmail.com with ESMTPSA id e23sm151992pfd.26.2021.07.28.07.18.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Jul 2021 07:18:53 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2][FOCAL kernel-snaps-uc20] pc-lowlatency: snapcraft.yaml use pure snapcraft syntax Date: Wed, 28 Jul 2021 15:18:24 +0100 Message-Id: <20210728141824.67699-3-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210728141824.67699-1-dimitri.ledkov@canonical.com> References: <20210728141824.67699-1-dimitri.ledkov@canonical.com> MIME-Version: 1.0 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: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" Use pure snapcraft syntax to package debs into a snap, with declarative syntax for additional PPA repositories, packages to stage, and reorg inside the kernel snap. This removes dependency on the Makefiles, and makes the snap always buildable as ABI version is automatically selected. This makes it possible to build this snapcraft.yaml in ESM and embargoed PPAs ahead of public releases without cranking, simply by doing requestbuilds() via API or launchpad WebUI. Once can still do empty git commit and push to trigger builds with a code change. One can also build it locally with multipass or lxd providers, remotely with remote-build, or push to launchpad and create snap build there. Sample build at https://launchpad.net/~xnox/+snap/xnox-lowlatency/+build/1478574 Differences versus current snap: - different locations of the copyright and license files - lack of lib/{modules|firmware} ../{modules|firmware} symlinks, which are unused (?!) Signed-off-by: Dimitri John Ledkov --- snapcraft.yaml | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/snapcraft.yaml b/snapcraft.yaml index acf96d8636..283ef172e6 100644 --- a/snapcraft.yaml +++ b/snapcraft.yaml @@ -1,23 +1,42 @@ name: pc-lowlatency-kernel -version: 5.4.0-80.90.1 +adopt-info: kernel summary: lowlatency linux kernel description: The lowlatency Ubuntu kernel package as a snap type: kernel +grade: stable confinement: strict build-base: core20 +# In addition to these repositories, the /+snap/ page on launchpad may +# also build with ESM repositories enabled, or built in a particular +# PPA, which will also be used. +package-repositories: + - type: apt + ppa: canonical-kernel-team/uc20-release + - type: apt + ppa: canonical-kernel-team/uc20-staging + - type: apt + ppa: canonical-kernel-team/proposed parts: kernel: - source: git://git.launchpad.net/~canonical-kernel-snaps/+git/kernel-snaps-uc20 - source-type: git - source-branch: master - plugin: make - make-parameters: - - KERNEL_SOURCE=focal:linux-uc20-efi - - KERNEL=linux-image-uc20-efi-lowlatency - - KERNEL_IMAGE_FORMAT=efi - - PROPOSED=true + plugin: nil + override-pull: | + snapcraftctl pull + snapcraftctl set-version "$(apt show linux-image-uc20-efi-lowlatency 2>/dev/null | sed -n 's/^Version: //p')" build-packages: - - gnupg - kmod - - lsb-release + stage-packages: + - linux-image-uc20-efi-lowlatency + override-build: | + snapcraftctl build + depmod -b $SNAPCRAFT_PART_INSTALL $(ls $SNAPCRAFT_PART_INSTALL/lib/modules) + mv $SNAPCRAFT_PART_INSTALL/boot/kernel.efi* $SNAPCRAFT_PART_INSTALL/boot/kernel.efi + organize: + boot/: / + lib/modules: modules + lib/firmware: firmware + stage: + - -usr/share/man + - -usr/lib/linux + - -lib/crda + - -lib/modprobe.d