Message ID | 20220406081837.2222008-13-sbabic@denx.de |
---|---|
State | Accepted |
Headers | show
Return-Path: <swupdate+bncBCXPLOXJ6IKRB4UZWWJAMGQERJDICEI@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=YqhNrreg; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::33a; helo=mail-wm1-x33a.google.com; envelope-from=swupdate+bncbcxploxj6ikrb4uzwwjamgqerjdicei@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-wm1-x33a.google.com (mail-wm1-x33a.google.com [IPv6:2a00:1450:4864:20::33a]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KYHTx2zbvz9sFq for <incoming@patchwork.ozlabs.org>; Wed, 6 Apr 2022 18:19:01 +1000 (AEST) Received: by mail-wm1-x33a.google.com with SMTP id t2-20020a7bc3c2000000b003528fe59cb9sf972973wmj.5 for <incoming@patchwork.ozlabs.org>; Wed, 06 Apr 2022 01:19:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1649233139; cv=pass; d=google.com; s=arc-20160816; b=vslk/iUEfUHoJTJDLfWQklA3muYddiwZ5gQrnopiwYMwvwAVA4vnDuCU3ntt52U4+A vRgcW1BhzY1QpfjX98YDJMIn0sjPJxmtaUc6yCXQs23baTiEQAwrsk5xtudGjsPqIoKD yEiLnt8rJh+1QbTGTqfZPat12FONZT5W6E876o/j5YlSFwkxQwb/h6G6nb7h17mKXgyX uqMhFp96BBn3rUh1Vc6v6ruEoFWpli8HbpCrOKzJE8bzZZ0QsLG0PV4gQiFOYY/SlEsM 2AybZwpVm2kf/iIeqN7eRv53r7eIuvUf7Rul4ZK9u53WVHYFgyeZq/e4LlmLUmkDbau6 OAEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:dkim-signature; bh=xiNdKDeaoN1shUgRZ5v9tdrtfTY5IDqQrOFf6BkFZC4=; b=LconSy/XMD6UJSo5gTf1PLLSz9cVPPdg4mZe2paL1SR3xkJYMPs3n3ctRG2//vEodT OUay+Moxp/Wbs/fwZ6T7cLsPLMzSZ/jyTvPfMJLWHdYEtAd7TfW34u2XRTtLCWvs31cy 0iut8TM7KyAG2SCAP61ouaNQ8MxZs618TuYE5i3sweoEMtDXQx1yGmWqLJuRQbSvs13H OPbUaOHUqavmB2DTgU2Aui9G3MDFoC6pFKkz8U8k294ZqQAMyHGJeGo2j5lYRIvlkbJ3 mYsee5IvQTEuUx5KRIUeefo++UIa2am2bjOL+7HZhf6/a7udSwuN0hj0Vy5/kE5S2RMn 9mdw== ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=xiNdKDeaoN1shUgRZ5v9tdrtfTY5IDqQrOFf6BkFZC4=; b=YqhNrreg0mTH+SBdBf7v9Ecejo45umEaI9b1epd9LAao+H1LLb3kJtRghoXAYuxKyO yGoEDKt9U/L07w16HoAgpoiDwpZvxSf3YG68M7T9dpxeiLmqm4e5W/JB/3qzH7tYbvXC mt1PXmv9gjVBcGr5f+Ozrmz5tkHp5EeLxm/iANFJz8xfDiPzNSbg0L2UvfMtAN58HIgo fDeuRNgZ6L7E1yg86bOFVWy1DRLcqHGj99HqyiCe41mJlLxzXjVP9oBCHUHMuHpzMz9H 3xQdfeC/ke5141NyNZEfkjP5hqbETb1wMvyd3Kkz4t0LHHhDBeXWpVhqbW2+RK8fedWx gn6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=xiNdKDeaoN1shUgRZ5v9tdrtfTY5IDqQrOFf6BkFZC4=; b=bs/DT146pSpcuK4bGIuoHpe0cE5vv3Sd5DDCYhkHgqisnvk9+CjoObjenJiDu88ga3 b98mL7bWm5IKuhnmypytaIZEvcsC9MmHlY1pbN/UYEv0KI04+gmPgcb8/bWg2e8QlBaR PZaW9G49JqL0FKLDI1g8OeUnFlahZsbfWEgiSKZebN+3ivx8cEOAwVmqB9i3stM8LfkR I5XVNOOFz4XY0mAMFPkMx9V5vDsfab+HdiOiZNz/qehkDnASTHfauA2yCyHprOtiLyhO CYv9IzfbwIx6yatTvpZFtKTk09v5xNG3M5znYMleJtBmxd3nTPPTlTtLn64YK6KRLIh8 MNjA== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM530OuMVnzQJjaqHOzDSOJmI3ZSz/rROtVrjv+aBzQTvQrj0seWvp oI3WBtYCGTJmmZZBXOy693A= X-Google-Smtp-Source: ABdhPJzJ19hl2TMOXhSUfFIlg2OZlPEhziwj1+qK/uYgNinGDBl4Ddfb70sab5vuypGUY4+ZUBTlAA== X-Received: by 2002:a05:6000:11ce:b0:206:100d:ba01 with SMTP id i14-20020a05600011ce00b00206100dba01mr5718130wrx.558.1649233138740; Wed, 06 Apr 2022 01:18:58 -0700 (PDT) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a5d:5306:0:b0:206:e61:ce02 with SMTP id e6-20020a5d5306000000b002060e61ce02ls1061455wrv.2.gmail; Wed, 06 Apr 2022 01:18:58 -0700 (PDT) X-Received: by 2002:adf:efcb:0:b0:206:1b0a:5270 with SMTP id i11-20020adfefcb000000b002061b0a5270mr5654794wrp.322.1649233137975; Wed, 06 Apr 2022 01:18:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649233137; cv=none; d=google.com; s=arc-20160816; b=S5A4/+fMN3XZDRtGew5UtyT7hFw+W5bYm5i9PQQcQ8KkWu2kYtL6iBagHRsvsLCNP0 Ifa3AkYhVEnTfIH72bkicuaitevBttRafhzIBGXZAT6uSjWBFuIc8TY3Ky436b9HzfwE y8MjygBSmjDUjsqXJZlanNweDgsfPxwYGB+TR3m8UwMgK5XRl214SmwhyD9BSPS0FsvF BGhSb1EbdhQLtltEFh+dffxnkrM0hp4nZYmqP4NE77ep5KpOfmSs943BO9ric7XcL7tZ wJfYYBSadaKboKCYLfSPhIYrWcHHSGUSo3blXl3BpWbA/aQbjot1IfDPAjskYQZFbrXR xzxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=ADnVgWfWlyZrEtBvsgF3wUZLK9MQtzatCfBJ3dq10CM=; b=vd0wbZLJ3koFQqh7pJkY6HrPBKGzNL/H83aYJTUw5kgi3boj68SVyPtu7RZ+GWDuJp Rs+K2LNX3mNvGnDUJaZSibzV5jyLbkZ9kgVxfIo94jrvejs1xQIVyH8VUSnlH+65e9lN 6VqYFBNg26dFN1BZoiIeBgSWkk3PXAnq8Sqe1BuZHNRjxdqryOEwwtXJmLKRNWjRuoHo 8c5c9w6dXCru0r5pqvkrgn+Z8IUJbRhX/XBtSN3TTZvpr6+cgtKORYESTcPRGc9W2Yxp MpZOH+OaQjIfupM2cpqnD5xxOKn2g1uAm57ujTh+vdYvvGFJwroLo8KsjTQ0oMOSt67e /9KA== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Received: from mail-out.m-online.net (mail-out.m-online.net. [212.18.0.9]) by gmr-mx.google.com with ESMTPS id y11-20020a05600015cb00b00205db67de65si788161wry.2.2022.04.06.01.18.57 for <swupdate@googlegroups.com> (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 06 Apr 2022 01:18:57 -0700 (PDT) Received-SPF: neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) client-ip=212.18.0.9; Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4KYHTs5vNlz1r1ff; Wed, 6 Apr 2022 10:18:57 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4KYHTs5hsQz1qqkB; Wed, 6 Apr 2022 10:18:57 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 2kKG6C6d2AJ6; Wed, 6 Apr 2022 10:18:57 +0200 (CEST) Received: from babic.homelinux.org (host-88-217-136-221.customer.m-online.net [88.217.136.221]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Wed, 6 Apr 2022 10:18:57 +0200 (CEST) Received: from localhost (mail.babic.homelinux.org [127.0.0.1]) by babic.homelinux.org (Postfix) with ESMTP id B71C345400DB; Wed, 6 Apr 2022 10:18:56 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at babic.homelinux.org Received: from babic.homelinux.org ([IPv6:::1]) by localhost (mail.babic.homelinux.org [IPv6:::1]) (amavisd-new, port 10024) with ESMTP id EccIZwnRl_xI; Wed, 6 Apr 2022 10:18:54 +0200 (CEST) Received: from paperino.fritz.box (paperino.fritz.box [192.168.178.48]) by babic.homelinux.org (Postfix) with ESMTP id 4EEEA4542D00; Wed, 6 Apr 2022 10:18:40 +0200 (CEST) From: Stefano Babic <sbabic@denx.de> To: swupdate@googlegroups.com Cc: Stefano Babic <sbabic@denx.de> Subject: [swupdate] [meta swupdate] [V2 12/12] Raise a warning if old syntax for sha256 is used Date: Wed, 6 Apr 2022 10:18:37 +0200 Message-Id: <20220406081837.2222008-13-sbabic@denx.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220406081837.2222008-1-sbabic@denx.de> References: <20220406081837.2222008-1-sbabic@denx.de> MIME-Version: 1.0 X-Original-Sender: sbabic@denx.de X-Original-Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 212.18.0.9 is neither permitted nor denied by domain of sbabic@denx.de) smtp.mailfrom=sbabic@denx.de Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Support to call functions inside sw-description
|
expand
|
diff --git a/classes/swupdate-common.bbclass b/classes/swupdate-common.bbclass index 1ee241d..37403c0 100644 --- a/classes/swupdate-common.bbclass +++ b/classes/swupdate-common.bbclass @@ -57,10 +57,10 @@ def swupdate_write_sha256(s): with open(os.path.join(s, "sw-description"), 'r') as f: for line in f: shastr = r"sha256.+=.+@(.+\")" - #m = re.match(r"^(?P<before_placeholder>.+)sha256.+=.+(?P<filename>\w+)", line) m = re.match(r"^(?P<before_placeholder>.+)(sha256|version).+[=:].*(?P<quote>[\'\"])@(?P<filename>.*)(?P=quote)", line) if m: filename = m.group('filename') + bb.warn("Syntax for sha256 changed, please use $swupdate_get_sha256(%s)" % filename) hash = swupdate_get_sha256(None, s, filename) write_lines.append(line.replace("@%s" % (filename), hash)) else:
Generation of attributes in sw-description should be done by separate function. The old syntax with '@<artifact name>' is still allowed for compatibility reason, but it will be removed in future. Signed-off-by: Stefano Babic <sbabic@denx.de> --- classes/swupdate-common.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)