From patchwork Fri Feb 1 16:57:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Whitcroft X-Patchwork-Id: 1034993 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=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43rjvJ1phYz9sDr; Sat, 2 Feb 2019 03:57:16 +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 1gpc7l-0003XJ-WD; Fri, 01 Feb 2019 16:57:05 +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 1gpc7k-0003Vy-KG for kernel-team@lists.ubuntu.com; Fri, 01 Feb 2019 16:57:04 +0000 Received: from 1.general.apw.uk.vpn ([10.172.192.78] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1gpc7k-0001rH-B0 for kernel-team@lists.ubuntu.com; Fri, 01 Feb 2019 16:57:04 +0000 Date: Fri, 1 Feb 2019 16:57:03 +0000 From: Andy Whitcroft To: Ubuntu Kernel Team Subject: [PATCH] UBUNTU: [Packaging] download-signed -- fix downloader component and handle versions correctly Message-ID: <20190201165703.GL4659@brain> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) 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" While testing some new signing packages I have found a couple of bugs that need fixing across the board. Firstly we are dropping out of the version search after the first record unconditionally which means if the kernel we are looking for is not the newest version it will fail. Secondly (as we have noticed before) we can only build correctly for kernels in main. This is because the signing bits always drop into main in dists regardless of where the source is; hard wire this. This patch is applicable to any modern signed kernel using raw-signing (rather than raw-efi) custom uploads, which does not already have this patch. Proposing for SRU to everywhere. Signed-off-by: Andy Whitcroft Acked-by: Seth Forshee Acked-by: Kleber Sacilotto de Souza --- download-signed | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/download-signed b/download-signed index 0e2e953..bed284e 100755 --- a/download-signed +++ b/download-signed @@ -44,7 +44,7 @@ class SignedDownloader: for version in cache[package_name].versions: if version.version == self.package_version: self.package = version - break + break if not self.package: raise KeyError("{0}: package version not found".format(self.package_name)) @@ -52,7 +52,7 @@ class SignedDownloader: origin = self.package.origins[0] pool_parsed = urlparse(self.package.uri) self.package_dir = "%s/%s/%s/%s-%s/%s/" % ( - origin.archive, origin.component, 'signed', + origin.archive, 'main', 'signed', self.src_package, self.package.architecture, self.package_version) # Prepare the master url stem and pull out any username/password. If present