From patchwork Thu Feb 15 22:13:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39484 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 695B8C48BF0 for ; Thu, 15 Feb 2024 22:17:25 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.web10.4915.1708035439187353618 for ; Thu, 15 Feb 2024 14:17:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=faM+XVaj; spf=pass (domain: gmail.com, ip: 209.85.128.51, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-41239bbab1aso543415e9.3 for ; Thu, 15 Feb 2024 14:17:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035437; x=1708640237; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=19bkzy+F+oR2d8MER+I4CjV+XhDWquBlzUwA9Solcro=; b=faM+XVaj31Gs6yQS4DON7JtjpqCtRiCti1KJhmojnFBpb0O47D4NcstVZDTUXpWnEf DE/yxTW9RmEANrvgqhp9C/QBS0hPnHjz2Bj2hVS3AjtKl/d8VN71murLHKxn9P8q6JL9 SHP3SIFhQ5wd1rDa6HjCHyZNKh9EBTZtYhQS/YGkshING0jn/f052tYOQv/soptVIamT wbtAmMueEkXfUE0U6PoW3buhuUvkWG/irQMeTm1fNb91heus5CDPYLycA2mfa9y0N1qN ZarzfKC3arlen+Fm5Xslown3QJY/XmAe3+5rojGHa+Ai2x+ZOsLfxYFO+x149Kg3lSx5 rLbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035437; x=1708640237; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=19bkzy+F+oR2d8MER+I4CjV+XhDWquBlzUwA9Solcro=; b=wdB++XtCw1UgrYa2MyHC48J5t2iEdXsoP0XtOGLdi4GU6wZn2g7keQxwn8qzZ7zdct zJs2I2IaElrnAEUpGyh8vEUx+fXiRWJN5tibgF7osSBYw8IfzYy4A221e8+Vzn9fKvvc 89iUkm81x29xM51b8FHE5e5KLh8H8WnJi2vPPbnGuAmBM7nm4+78aBk7FHqx7CdID7Ry K6+FWBr7/ejl4eqR/MLoLj0Q3ylomAPxmJaZSTBrwuifDDe5TbouG3YHCywfw1ATNzKw EnNh4BZo+Y7HQ3lbhP/UOBOPkstPI0zqeCJG6qbfIaWjNWZ9eErq4pPpb46DDnL3V06B wdfA== X-Gm-Message-State: AOJu0Yz8cpEdcO8l03NmX9IIJp4jspdju4gKfQO0c/1dTS9HVVXeu2HR N+Eo1P4Aj16nH/wNW+w/RJenGWJWZsnJ102Ua8n1YdkimJTq7P1d6vjnQApgs1w= X-Google-Smtp-Source: AGHT+IFV9w8tGz642i8+aiwiGcITUq4oBBQSuspN7eZxmeqQ/cYzJGmQwYWTtohJJVHm8sEkjQU6Yg== X-Received: by 2002:a5d:6652:0:b0:33d:15c1:cfcb with SMTP id f18-20020a5d6652000000b0033d15c1cfcbmr696524wrw.40.1708035437350; Thu, 15 Feb 2024 14:17:17 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:17 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Chris Laplante , Adrian Freihofer Subject: [kirkstone][PATCH 01/12] recipetool/create_buildsys_python: use importlib instead of imp Date: Thu, 15 Feb 2024 23:13:47 +0100 Message-ID: <20240215221711.332614-2-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195712 From: Chris Laplante 'imp' was deprecated in Python 3.4 and removed in 3.12. The piece of importlib we use has been around since 3.3. Signed-off-by: Chris Laplante Signed-off-by: Alexandre Belloni Signed-off-by: Richard Purdie Cherry-picked from master: 457f0dad87b4e45a53865b5ad2c150215bd74019 Signed-off-by: Adrian Freihofer --- scripts/lib/recipetool/create_buildsys_python.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/lib/recipetool/create_buildsys_python.py b/scripts/lib/recipetool/create_buildsys_python.py index 5686a62d3f..a7eed3256f 100644 --- a/scripts/lib/recipetool/create_buildsys_python.py +++ b/scripts/lib/recipetool/create_buildsys_python.py @@ -10,7 +10,7 @@ import codecs import collections import setuptools.command.build_py import email -import imp +import importlib import glob import itertools import logging @@ -561,7 +561,6 @@ class PythonRecipeHandler(RecipeHandler): return deps def parse_pkgdata_for_python_packages(self): - suffixes = [t[0] for t in imp.get_suffixes()] pkgdata_dir = tinfoil.config_data.getVar('PKGDATA_DIR') ldata = tinfoil.config_data.createCopy() @@ -585,7 +584,7 @@ class PythonRecipeHandler(RecipeHandler): continue for fn in files_info: - for suffix in suffixes: + for suffix in importlib.machinery.all_suffixes(): if fn.endswith(suffix): break else: From patchwork Thu Feb 15 22:13:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39485 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8CF40C48BF4 for ; Thu, 15 Feb 2024 22:17:25 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.web11.4901.1708035440203660369 for ; Thu, 15 Feb 2024 14:17:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=POlbit6O; spf=pass (domain: gmail.com, ip: 209.85.128.47, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-41239bbab1aso543525e9.3 for ; Thu, 15 Feb 2024 14:17:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035438; x=1708640238; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XVL8wByLrW6dg1mHYJG3likhEODBdq7COnQlgST22uo=; b=POlbit6O+jYIvYv1oVlfWt+/WA/L9smMPGJkeqoR4y8kCPo28eyeh4TcdbFBitZ8N0 K/Mo2tEHLprPIMe15d2ZfgcLOlaTR1knV3VnVAX+O2rsdgEz1mpIdpWcSMMUm3B80DXH uFJ81EOpZsmERxaBZKrNiA4KiMYcZYehPuDXcH4Vxosfda8rskI8twLl8dUSnm8AtZlY 17AwEexYM8KPgWX1zLk7bLug72GvA5M1HwpknRIMT/fI21dwc6/vjOoHiKyb10q+rDwY 56j9/1c+5hr35hq53j2U9LS9mK9ogB+QzPOrgUM/LdHSVnrRKC+giloHy+mmQaDJTqVF 6lEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035438; x=1708640238; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XVL8wByLrW6dg1mHYJG3likhEODBdq7COnQlgST22uo=; b=Zo1UCpxcEbza7BjYrmpNVQ9WgUu5r2CzlEzkPnIa2P3v4KvLwBqup2KhmgZSh27Lar hsflbdM9xPT+hQlQRzzj0HgSY9URUPDAh4X6T9M0MKtZXPqk4XV5spQmuO9nTy9zGfMa aY63AWW8hpBSULKSx2Omv3+uBin03MXMO8bser89As8ZyJZeHddQKkJ8R/J87lbvrA2L y3NJXKHZMIF+sq8NTrLDi3SmJVkhBBELXjiWgHLwBPla5BEu+wYyIHhJ9dJt0KjPoeKN PdI/uI5UCayNh3SYDJZM68hxkhzt+j09KrgTh0QIEN4zZwx4pG9rT4oDxN0fAenhnhEE 9weg== X-Gm-Message-State: AOJu0YzuE9WTLqg8jmliNiePwew01f5R10RR6jkqM80/fzWL2gyVe3Ww jhhW3hQHuNxojnva/1uuBi32RlL8MT1qQsOkrwgPepohw/96R3niFxY17i43ySo= X-Google-Smtp-Source: AGHT+IEdZ0EJTTiRK5n+PTFxnoLGnVpeWXg4iMeD+doxllWd4DSXT35p0S5nKf1Ex0MFxnEI0T0Z+w== X-Received: by 2002:a5d:658b:0:b0:33b:641e:ff5d with SMTP id q11-20020a5d658b000000b0033b641eff5dmr2098503wru.27.1708035438192; Thu, 15 Feb 2024 14:17:18 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:17 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Trevor Gamblin , Adrian Freihofer Subject: [kirkstone][PATCH 02/12] scripts/runqemu: fix regex escape sequences Date: Thu, 15 Feb 2024 23:13:48 +0100 Message-ID: <20240215221711.332614-3-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195713 From: Trevor Gamblin When invoking runqemu with Python 3.12, the following warning is encountered: |SyntaxWarning: invalid escape sequence '\.' This is because the interpreter scans the string before it is processed by the regex module, and it interprets the backslash as part of an escape sequence, but not a standard one. This will be registered as an error rather than a warning in future Python versions. To avoid the it, simply add an extra backslash so that Python doesn't misinterpret the string, while the regex parser still sees an escaped '.' character. Signed-off-by: Trevor Gamblin Signed-off-by: Richard Purdie Backported from master: 0e8a4142bb90a92d175df6b2537d24a372356f98 Signed-off-by: Adrian Freihofer --- scripts/runqemu | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/runqemu b/scripts/runqemu index 729b067a9f..b7d7c7b4e7 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -362,7 +362,7 @@ class BaseConfig(object): if p.endswith('.qemuboot.conf'): self.qemuboot = p self.qbconfload = True - elif re.search('\.bin$', p) or re.search('bzImage', p) or \ + elif re.search('\\.bin$', p) or re.search('bzImage', p) or \ re.search('zImage', p) or re.search('vmlinux', p) or \ re.search('fitImage', p) or re.search('uImage', p): self.kernel = p @@ -376,13 +376,13 @@ class BaseConfig(object): fst = t break if not fst: - m = re.search('.*\.(.*)$', self.rootfs) + m = re.search('.*\\.(.*)$', self.rootfs) if m: fst = m.group(1) if fst: self.check_arg_fstype(fst) - qb = re.sub('\.' + fst + "$", '', self.rootfs) - qb = '%s%s' % (re.sub('\.rootfs$', '', qb), '.qemuboot.conf') + qb = re.sub('\\.' + fst + "$", '', self.rootfs) + qb = '%s%s' % (re.sub('\\.rootfs$', '', qb), '.qemuboot.conf') if os.path.exists(qb): self.qemuboot = qb self.qbconfload = True From patchwork Thu Feb 15 22:13:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39486 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F11BC48BF2 for ; Thu, 15 Feb 2024 22:17:25 +0000 (UTC) Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) by mx.groups.io with SMTP id smtpd.web11.4902.1708035441082531418 for ; Thu, 15 Feb 2024 14:17:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=YRrOc+71; spf=pass (domain: gmail.com, ip: 209.85.128.51, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-411a5b8765bso8404135e9.1 for ; Thu, 15 Feb 2024 14:17:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035439; x=1708640239; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4vpudt6jNN1yAEoz/e+sUy9Utg2xomIy1upS1JCnxes=; b=YRrOc+71ULT3Dq2glBU44G9aJBA6BXqUHtbRqT3A7prgRiEtwtyEkHZDH3/18hJoUZ 7o8HkIJVXjfVTRWQf5W1e0CNWhKR4F0WbwDCZQpW0WzJ6p1IKs7UYlQ0C9ePSj2L0ANc vaobFHQJlCxkfxoeiV8ieIPf+d4kTe3FC+0z5b+iZaZpONR5iLfdXST2zK+HsyJxf/8a KkJjvJk6IfuPHEd2Fd+Qk99qTP7aYRy96ePncW90/RCEaF5Udku+nXASNxDjZJ3eku0h 0lbuy7Bpa0uJS9rbTGd8HYgcI4tSvVDwz7Bo5e4GUExWrjuHpz6+4Me8aL+FrKT2aOFL Ehzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035439; x=1708640239; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4vpudt6jNN1yAEoz/e+sUy9Utg2xomIy1upS1JCnxes=; b=YO8MI6SW7kxgycOsMZEWPoNeFwmeOALp8i5ax02gvr1Xo3I+vf/in1MRev/HPzTnt+ MiXfaZM7bl2+KZjHFIgYCfbkEsQi4cE3BmkoyJPMtPusZ7BxKrXLlVHEcnA/sEZdh6nH rZmT70bdGA/tksIMNIi4YxMIlfl/s1RBS7o087E4jITVZOfd/hwz7NDSkgvYRLOJ/gte PlxSBiNjq8gU7GLYRkXABDJhFhEboCLutkpjHwkiaXkRVhqGJ5aPeA7rzbZ9tuXEKkQ6 z3nP+K+zcREUyGQSnrHVwGxg3KVWtAFfKrGCaeKY6yWmcPdfaOBY2aQXLskHpnnX4+pK XOLQ== X-Gm-Message-State: AOJu0YzVytzWxHSjbsH9lxGs17kOO5ai+Ev8UWfOU/E2tbm5J0YG3axg RG3bvNVu0LhJttixsVp9I6zVSOozs/oZ6QtdzK0W1p+SYDd36edM4k2JLVmM/8Q= X-Google-Smtp-Source: AGHT+IHipCzBKRrCSGdyPXJFA1fbsjybbASjbucm7LVRJUm88CYge3lBP7U20UYd11PqdBy8QMd4Bg== X-Received: by 2002:a05:600c:1d81:b0:412:107d:cd69 with SMTP id p1-20020a05600c1d8100b00412107dcd69mr2819272wms.1.1708035439336; Thu, 15 Feb 2024 14:17:19 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:18 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Ross Burton , Adrian Freihofer Subject: [kirkstone][PATCH 03/12] populate_sdk_ext: use ConfigParser instead of SafeConfigParser Date: Thu, 15 Feb 2024 23:13:49 +0100 Message-ID: <20240215221711.332614-4-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195714 From: Ross Burton SafeConfigParser was renamed to ConfigParser in 3.2, and the SafeConfigParser alias will be removed in 3.12. Signed-off-by: Ross Burton Signed-off-by: Alexandre Belloni Cherry-picked from master: 71b3e7f71727137b4b996cc4160c9cc1581824b8 Signed-off-by: Adrian Freihofer --- meta/classes/populate_sdk_ext.bbclass | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/classes/populate_sdk_ext.bbclass b/meta/classes/populate_sdk_ext.bbclass index ca1b7753cb..bdd86863c6 100644 --- a/meta/classes/populate_sdk_ext.bbclass +++ b/meta/classes/populate_sdk_ext.bbclass @@ -227,7 +227,7 @@ python copy_buildsystem () { # Write out config file for devtool import configparser - config = configparser.SafeConfigParser() + config = configparser.ConfigParser() config.add_section('General') config.set('General', 'bitbake_subdir', conf_bbpath) config.set('General', 'init_path', conf_initpath) From patchwork Thu Feb 15 22:13:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39481 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6040DC48BEC for ; Thu, 15 Feb 2024 22:17:25 +0000 (UTC) Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by mx.groups.io with SMTP id smtpd.web11.4904.1708035442166007475 for ; Thu, 15 Feb 2024 14:17:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=X0OqPKgt; spf=pass (domain: gmail.com, ip: 209.85.128.46, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f46.google.com with SMTP id 5b1f17b1804b1-411e5f21c0bso11839895e9.0 for ; Thu, 15 Feb 2024 14:17:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035440; x=1708640240; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kmL470n1WLDbhnyqzyBwLr3jSk5trh2U4t5zpynb0vw=; b=X0OqPKgtB/dRhcIZzY95brphG3ReBA3yJyJ/OhMzOepKqTLh6Zq2s70eVW3Ol4qruM xBhiiUSez05spQUM3PxvS+ZXVBAKJP//hyQw6ZfuVhsh/LeaQ+3gb2qHYg2WesDqBNAD IPkZgzqWVAgEMRQWYGaxOWnZE6cEoWNbUAIoNj3dAFq8Tn3iu3xS6CZ62i4BaHUqTxk3 KZX9gAcru1A4nknZBJKdR9ib8APxOOdgr0AM4CHIb1uLqDUBJSl8DdfUeeCRzQwHJV6m DztZiRxFbmIyyd/UvBQnqApF6WF+YdyZBw/KUzHTa/PCj6l8fJcIj7bHAsXh7qFBvAvi y7HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035440; x=1708640240; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kmL470n1WLDbhnyqzyBwLr3jSk5trh2U4t5zpynb0vw=; b=GddNvhfMbgixq89i0Gvq/DUiB9AZreWdRKLAKtNJ2OflLzHUVj2F83DGwse+fyZare 1A65qGeIdd6tNVJ9oprJtBUGDeGtGgMcrN7qocmlSVX9H7tUr2wT2IBWQRr1x6e1AloV mSJZJ6auVm8Mv0OhHlE8WuYTXgf+cOkkk4lwt9QHMkFgF6DEQ41yW0nIMkJ7NJdtj6kU CXYCAJ6O8WLoAfOHFGI1ACnizr+qY4Lxhya0mvGewCHe2qP196oifz5k2rauj5eHlzeb XdHoZqpfg8L0apFKDnQYwPQzZ66ioRkg3p9GJQG+sgpqsfTbOVxhn9QAE66TodGnthf3 U18g== X-Gm-Message-State: AOJu0YwQphHJyutxukQYFWAQAt2MKCkHOn7JbkETR+sdRLcqg3sOh5Ap tzUZPRXkm+esFXk4udUK02nG4R3QxgfYYwBNVzHM3/lzC0KjpXeMqwcZj5VIrJ0= X-Google-Smtp-Source: AGHT+IHWt3Y/0/szDmEkVeGJpDZ5piYehHfJ75Bzoh+k/+N7+GhGTPX6AhCi4WJNz+frNDIvyHf5Jw== X-Received: by 2002:adf:9bd9:0:b0:33d:1412:41b5 with SMTP id e25-20020adf9bd9000000b0033d141241b5mr956298wrc.71.1708035440343; Thu, 15 Feb 2024 14:17:20 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:19 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Ross Burton , Adrian Freihofer Subject: [kirkstone][PATCH 04/12] runqemu: add qmp socket support Date: Thu, 15 Feb 2024 23:13:50 +0100 Message-ID: <20240215221711.332614-5-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195715 From: Ross Burton Add support for qmp sockets and defaults to unix:qmp.sock if unspecified Signed-off-by: Ross Burton Signed-off-by: Eilís 'pidge' Ní Fhlannagáin Signed-off-by: Richard Purdie Backported from master: 380631797f0d63124a8c21efa93ab672dbd79283 Qemu throws many warnings without qmp and many runtime tests fail without this patch also on kirkstone. Signed-off-by: Adrian Freihofer --- scripts/runqemu | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/runqemu b/scripts/runqemu index b7d7c7b4e7..b8c5adcbec 100755 --- a/scripts/runqemu +++ b/scripts/runqemu @@ -82,6 +82,7 @@ of the following environment variables (in any order): kvm-vhost - enable KVM with vhost when running x86/x86_64 (VT-capable CPU required) publicvnc - enable a VNC server open to all hosts audio - enable audio + qmp= - create a QMP socket (defaults to unix:qmp.sock if unspecified) [*/]ovmf* - OVMF firmware file or base name for booting with UEFI tcpserial= - specify tcp serial port number qemuparams= - specify custom parameters to QEMU @@ -216,6 +217,7 @@ class BaseConfig(object): self.cleaned = False # Files to cleanup after run self.cleanup_files = [] + self.qmp = None def acquire_taplock(self, error=True): logger.debug("Acquiring lockfile %s..." % self.taplock) @@ -526,6 +528,10 @@ class BaseConfig(object): elif arg == 'publicvnc': self.publicvnc = True self.qemu_opt_script += ' -vnc :0' + elif arg == "qmp": + self.qmp = "unix:qmp.sock" + elif arg.startswith("qmp="): + self.qmp = arg[len('qmp='):] elif arg.startswith('tcpserial='): self.tcpserial_portnum = '%s' % arg[len('tcpserial='):] elif arg.startswith('qemuparams='): @@ -1346,6 +1352,10 @@ class BaseConfig(object): raise RunQemuError("Failed to boot, QB_SYSTEM_NAME is NULL!") self.qemu_system = qemu_system + def setup_qmp(self): + if self.qmp: + self.qemu_opt += " -qmp %s,server,nowait" % self.qmp + def setup_vga(self): if self.nographic == True: if self.sdl == True: @@ -1476,6 +1486,7 @@ class BaseConfig(object): if self.snapshot: self.qemu_opt += " -snapshot" + self.setup_qmp() self.setup_serial() self.setup_vga() From patchwork Thu Feb 15 22:13:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39483 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6960DC48BF3 for ; Thu, 15 Feb 2024 22:17:25 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web11.4905.1708035442919325593 for ; Thu, 15 Feb 2024 14:17:23 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FteFwFMF; spf=pass (domain: gmail.com, ip: 209.85.128.49, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4122a8566e4so6217555e9.2 for ; Thu, 15 Feb 2024 14:17:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035441; x=1708640241; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=c2KvcjsvtTy/ULDFY9UAC3JY0LBu4c6+FFcTvMn+E7I=; b=FteFwFMFWNdS/jaH7/gwgfLCimgyVMVSXzRE0UA6Mk50pSyDEf/HWgEZ73REtQQgXm rEeUGQ56KHViSso5YMUphet0gmBI8877P8rn2cUMg74wEDYsSGFngGbFECGmlUKwCCJM MsuBFH/MDgMSLlmrmyCNaiiEUBF4tvL9QU4pBaYRFTo1EkouZER943qorzO7BaPMy8tH y3nvw70VB64H+GKnfCrx4lWaRTJ2Ki0SeKZkvty50MAlfggV9G3VWm+INjnJeXrU82Dp GCteq9+wOgrQA2D4rlloCFilXJr7dbeCiLsb+kds+HwNVwGgeodHPYyJVzkPot2WFlJi IgEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035441; x=1708640241; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=c2KvcjsvtTy/ULDFY9UAC3JY0LBu4c6+FFcTvMn+E7I=; b=CCHbx78ozl3ezMwqKNWUCfksNMWoFGdkPzhEhjKmYNmzuVHJqBzn1vUNxGe56kxVHn nmY0GQsPOPuXLm5bkKM3Aa0jMI3cvQbgTiX5x32hG5oCz4VPtctWRJCRFE0aTG1ANXkq YfVCOK86hXpY0xj4ZMKCh+l6/mFkeafp01QCzdWUvE1ScYzWu5rxtIZYor9+RJzKfpzf OD+UhgCanuR/zHttXUuId/BIzuFF7f7ALncUMLCVCbBpuMPNNFHnWGyLfsZaOr5AwOBn 4GMHQmV9mPJwAMgZjKaD3wbgNThUv7+FjmHK1KzBIo06Y1MOL+IjrVmPc0iIH5RFO3St Grpw== X-Gm-Message-State: AOJu0YwqUD9mdBrHKMgIq0f0E3j3rS5dMH6OpCxKG8ewLp+YcCvLjkCN Uhatl1QixPZcD7hnHMedSB3x1kae+q9/HkXTl9HxKADeZjVSRK5FPcoZuhYfVAY= X-Google-Smtp-Source: AGHT+IF3l6y9Kk7ZUIHSQQ67yeM0Ax9eoqP2Bp5UA1jMll4WQ1swd6k4aK41jsDsGHzLZCaCvmPzlA== X-Received: by 2002:a05:600c:4fc4:b0:412:913:5484 with SMTP id o4-20020a05600c4fc400b0041209135484mr2482325wmq.11.1708035441181; Thu, 15 Feb 2024 14:17:21 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:20 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Adrian Freihofer Subject: [kirkstone][PATCH 05/12] oeqa: replace deprecated assertEquals Date: Thu, 15 Feb 2024 23:13:51 +0100 Message-ID: <20240215221711.332614-6-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195716 From: Adrian Freihofer assertEquals is deprecated since Python 2.7: https://docs.python.org/2/library/unittest.html#deprecated-aliases It throws errors at least on Python 3.12. Replace it by assertEqual. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Backported from master: 68286d0b70cf09a0d2950b48945c9192fb8c8769 Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/sdk/buildtools-cases/sanity.py | 2 +- meta/lib/oeqa/selftest/cases/devtool.py | 2 +- meta/lib/oeqa/selftest/cases/liboe.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/meta/lib/oeqa/sdk/buildtools-cases/sanity.py b/meta/lib/oeqa/sdk/buildtools-cases/sanity.py index 64baaa8f84..68b19f4d47 100644 --- a/meta/lib/oeqa/sdk/buildtools-cases/sanity.py +++ b/meta/lib/oeqa/sdk/buildtools-cases/sanity.py @@ -19,4 +19,4 @@ class SanityTests(OESDKTestCase): # Canonicalise the location of this command tool_path = os.path.realpath(self._run("command -v %s" % command).strip()) # Assert that the tool was found inside the SDK root - self.assertEquals(os.path.commonprefix((sdk_base, tool_path)), sdk_base) + self.assertEqual(os.path.commonprefix((sdk_base, tool_path)), sdk_base) diff --git a/meta/lib/oeqa/selftest/cases/devtool.py b/meta/lib/oeqa/selftest/cases/devtool.py index aea2ad6561..dc0fc35062 100644 --- a/meta/lib/oeqa/selftest/cases/devtool.py +++ b/meta/lib/oeqa/selftest/cases/devtool.py @@ -919,7 +919,7 @@ class DevtoolModifyTests(DevtoolBase): runCmd('git -C %s checkout %s' % (tempdir, branch)) with open(source, "rt") as f: content = f.read() - self.assertEquals(content, expected) + self.assertEqual(content, expected) check('devtool', 'This is a test for something\n') check('devtool-no-overrides', 'This is a test for something\n') check('devtool-override-qemuarm', 'This is a test for qemuarm\n') diff --git a/meta/lib/oeqa/selftest/cases/liboe.py b/meta/lib/oeqa/selftest/cases/liboe.py index afe8f8809f..da88ff480e 100644 --- a/meta/lib/oeqa/selftest/cases/liboe.py +++ b/meta/lib/oeqa/selftest/cases/liboe.py @@ -97,6 +97,6 @@ class LibOE(OESelftestTestCase): dstcnt = len(os.listdir(dst)) srccnt = len(os.listdir(src)) - self.assertEquals(dstcnt, len(testfiles), "Number of files in dst (%s) differs from number of files in src(%s)." % (dstcnt, srccnt)) + self.assertEqual(dstcnt, len(testfiles), "Number of files in dst (%s) differs from number of files in src(%s)." % (dstcnt, srccnt)) oe.path.remove(testloc) From patchwork Thu Feb 15 22:13:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39482 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4D538C4829E for ; Thu, 15 Feb 2024 22:17:25 +0000 (UTC) Received: from mail-wr1-f47.google.com (mail-wr1-f47.google.com [209.85.221.47]) by mx.groups.io with SMTP id smtpd.web11.4906.1708035443814259821 for ; Thu, 15 Feb 2024 14:17:24 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=GZuPuAwT; spf=pass (domain: gmail.com, ip: 209.85.221.47, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f47.google.com with SMTP id ffacd0b85a97d-3394bec856fso1522924f8f.0 for ; Thu, 15 Feb 2024 14:17:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035442; x=1708640242; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=suLHWl9GSRGMw4awROsfkgEvzIn5iBeK/oebUguDTTE=; b=GZuPuAwTi4y4IiLzgUCKNh0xjQe1Eo/KxIiki5MXKmbLy0reax0k3LtGLfBPLldccm FFNeCk8xnxkG3m/aDNqGnr3OrXlUOXa4g9Wpps6WNEWoGc1jpmrJulpFtnw7m64xIYhA eFEEu2PvMZ4HKnO6Eik2zc3Dkbxfdui5m5roCwbWgv0lMrCk0lsVMYOyIrs/bpES/7Py nJGs4R8tfG5aXzR94qNakHb3B53DpdURPczkJ9TmmVULWmt5WKMl2oj5JVUufVZqHEYc FLftTQR7ewEUHQkbpuSaPmA8HLSU6w8qXoLx/ZbTeceWg7Jtd+669gZ15Nb6hLj9cmu6 WIkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035442; x=1708640242; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=suLHWl9GSRGMw4awROsfkgEvzIn5iBeK/oebUguDTTE=; b=AuNvd/iT/gKZgSOjTAyhWBhqlNAOWHTCBgwAOZoSqEFDhZ2iK0XoK8pSKQPyDFJq79 /PydTMC4ncNUT6xlaSlNlCHx9lIZ/cQooXZCGBQGhh+rk7d3a7NPRzeZW3QNoYISIGAl 4M3oOR7Y5aACX6QHnKsNqrUwgTIM6oz1jEki5wzLJLPIwyHGKwICgb8qOORFxbqGPlcc uO1q7r+kx92g/sjv+cxIKpqNgITviJrTNSimHjgAgu41Gl5NbWmtW+rGvzOA9dCWtuFQ X/gUX5vvtJYkDYJihVfACMHnLLAA6cDFCifbbS8cAnJBR5lzdPyRkPcF+xRabllyOqKZ O3IA== X-Gm-Message-State: AOJu0YymAfPQoAQ9fwckZW0CI7oi5IeQ70bNe28Ty+Xwv8sIuVHgx5YE fz7mrVR+r87yqG7ABsWEUFC3WAptfwc9FDuGmTzkN5P6dQ+IMC5OBHyqGEYsp0c= X-Google-Smtp-Source: AGHT+IE/9YYGNSqMeJzDxScqEho89VApIgNzClTPDeZB1UTkisUvmpRkwbhCcuTNfHHkmItH8wgaVQ== X-Received: by 2002:a5d:474d:0:b0:33c:e2de:acbe with SMTP id o13-20020a5d474d000000b0033ce2deacbemr2735987wrs.17.1708035442103; Thu, 15 Feb 2024 14:17:22 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:21 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Adrian Freihofer Subject: [kirkstone][PATCH 06/12] oeqa/selftest/recipetool: fix for python 3.12 Date: Thu, 15 Feb 2024 23:13:52 +0100 Message-ID: <20240215221711.332614-7-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195717 From: Adrian Freihofer test_recipetool_create_github and test_recipetool_create_github_tarball fail because the old meson version used by these tests cases does not run on Python 3.12. The issue is in the dependencies.py which comes with meson: ERROR: build/tmp/work/recipetool-3z4osyl7/source/git/mesonbuild/ dependencies.py:777: SyntaxWarning: invalid escape sequence '\.' Use meson 1.3.1 (what is currently also used on master) as a reference for these tests. With this version of meson, recipetool creates recipes named meson_git.bb or meson_1.3.1.bb. Since this looks more reasonable than e.g. python3-meson_git.bb the test gets adapted. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Backported from master: 7374a8a2810a6cf027bfefefe87691a3529123ff Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/recipetool.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index db8790b57b..db21325155 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -444,13 +444,13 @@ class RecipetoolCreateTests(RecipetoolBase): temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) recipefile = os.path.join(temprecipe, 'meson_git.bb') - srcuri = 'https://github.com/mesonbuild/meson;rev=0.32.0' + srcuri = 'https://github.com/mesonbuild/meson;rev=1.3.1' result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri]) self.assertTrue(os.path.isfile(recipefile)) checkvars = {} - checkvars['LICENSE'] = set(['Apache-2.0']) - checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=master' - inherits = ['setuptools3'] + checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) + checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=1.3' + inherits = ['python_setuptools_build_meta'] self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_python3_setuptools(self): @@ -476,15 +476,15 @@ class RecipetoolCreateTests(RecipetoolBase): # Basic test to ensure github URL mangling doesn't apply to release tarballs temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - pv = '0.32.0' + pv = '1.3.1' recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv) srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) self.assertTrue(os.path.isfile(recipefile)) checkvars = {} - checkvars['LICENSE'] = set(['Apache-2.0']) + checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz' - inherits = ['setuptools3'] + inherits = ['python_setuptools_build_meta'] self._test_recipe_contents(recipefile, checkvars, inherits) def _test_recipetool_create_git(self, srcuri, branch=None): From patchwork Thu Feb 15 22:13:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39487 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9719DC48BF5 for ; Thu, 15 Feb 2024 22:17:25 +0000 (UTC) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mx.groups.io with SMTP id smtpd.web10.4919.1708035444990423518 for ; Thu, 15 Feb 2024 14:17:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=H6deBKu2; spf=pass (domain: gmail.com, ip: 209.85.221.48, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-33b28aadb28so730320f8f.3 for ; Thu, 15 Feb 2024 14:17:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035443; x=1708640243; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=takw75URpKotd/VH8XlPoU8IBBDfkdICzITwRAppyOY=; b=H6deBKu2D+AY9spdTt1vfj9WL5KOV2EYDqo8R5QqdSIYPLLHkVK88A81HD6uF809tx J2SKhCvcNFSnEEyk2VGif7Dkvp5XU19UFQhU2NA/bCADQqYol+4mhMLtn9UdcXwlhGSz 3dkneWdMlMekyQAQqHjT6ibPR9E1YItI+md5pkegaMDMalddalU/LhqMbNrc2UaMFLkk /1TrU4v5ISbbpAJs+7R7q6QIv6OlX1IDRFN9cwjb0MaHwFyQttEo3aajrLEYuK2Smoj3 hkh8L9T4XmkSTTgejzH6hLyUblei0ZB61fFwsULdyqtZACMGOJlxHenr8XKW63rG8JEm /w6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035443; x=1708640243; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=takw75URpKotd/VH8XlPoU8IBBDfkdICzITwRAppyOY=; b=tUG98UX5iM69sM//AyferLuiC6vOQqRgSKOa1MCg+TeJuft/64W45fV4Ev+nAVvD+a Kqg9ceNerpOc88Q2MsI+LAsEaA0cCVspbe8w3BKO9k1zFH5WNWkzvWgQLC2WANsW0uoH ynMwef/3TeMao3DrtVEdPU9HS1plRhoR7mmzEnuWHj81ZkEvDC7Km1Trw6Ly4n7dGgIV qYvXdzl0xx0/519yrkCvvMXf8EwyYFIkK7PHtQhOQbXB9AbwfOfD7u5+MEKiW2nbVVS+ k4LAvGAP21+vwA67jWdCn5HCy2QGgdVM2wXgzirW7OvuegWA3ZUweg+hEjG/U2PsXuZs lFEw== X-Gm-Message-State: AOJu0YzMU/z2CfHb//9MgUiIJuPyK6Q8qNAWRHjMo4EWBFAo/xXXUzmI rdpHKymPEvmiwmfo3qd1ERSBjOXyHfgvrzmCfNYnltwytOeflZenIboDCfIRO9Y= X-Google-Smtp-Source: AGHT+IEwZA1x64/sND4FjQotZLx0zjS76FLEnOkVh1iTmfPZ9GeKzSey1sBksHl6nGiyyYWkDkyXpA== X-Received: by 2002:a5d:564f:0:b0:33c:e0a1:126d with SMTP id j15-20020a5d564f000000b0033ce0a1126dmr1932654wrw.70.1708035443153; Thu, 15 Feb 2024 14:17:23 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:22 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Ross Burton , Adrian Freihofer Subject: [kirkstone][PATCH 07/12] oeqa/selftest/recipetool: downgrade meson version to not use pyproject.toml Date: Thu, 15 Feb 2024 23:13:53 +0100 Message-ID: <20240215221711.332614-8-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:25 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195718 From: Ross Burton recipetool's pyproject.toml parsing needs tomllib (python 3.11+) or tomli (not a hard dependency), so is prone to failing depending on the host configuration. Downgrade the Meson release used for the checks to 0.52.1, which was the last release before moving to pyproject.toml. Signed-off-by: Ross Burton Signed-off-by: Richard Purdie Backported from master: 6dfe573d83687e5431841f062442b54b9fa22ff3 Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/selftest/cases/recipetool.py | 29 ++++++++++++---------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/recipetool.py b/meta/lib/oeqa/selftest/cases/recipetool.py index db21325155..c888770533 100644 --- a/meta/lib/oeqa/selftest/cases/recipetool.py +++ b/meta/lib/oeqa/selftest/cases/recipetool.py @@ -440,17 +440,19 @@ class RecipetoolCreateTests(RecipetoolBase): self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_github(self): - # Basic test to see if github URL mangling works + # Basic test to see if github URL mangling works. Deliberately use an + # older release of Meson at present so we don't need a toml parser. temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - recipefile = os.path.join(temprecipe, 'meson_git.bb') - srcuri = 'https://github.com/mesonbuild/meson;rev=1.3.1' - result = runCmd(['recipetool', 'create', '-o', temprecipe, srcuri]) - self.assertTrue(os.path.isfile(recipefile)) + recipefile = os.path.join(temprecipe, 'python3-meson_git.bb') + srcuri = 'https://github.com/mesonbuild/meson;rev=0.52.1' + cmd = ['recipetool', 'create', '-o', temprecipe, srcuri] + result = runCmd(cmd) + self.assertTrue(os.path.isfile(recipefile), msg="recipe %s not created for command %s, output %s" % (recipefile, " ".join(cmd), result.output)) checkvars = {} - checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) - checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=1.3' - inherits = ['python_setuptools_build_meta'] + checkvars['LICENSE'] = set(['Apache-2.0', "Unknown"]) + checkvars['SRC_URI'] = 'git://github.com/mesonbuild/meson;protocol=https;branch=0.52' + inherits = ['setuptools3'] self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_python3_setuptools(self): @@ -473,18 +475,19 @@ class RecipetoolCreateTests(RecipetoolBase): self._test_recipe_contents(recipefile, checkvars, inherits) def test_recipetool_create_github_tarball(self): - # Basic test to ensure github URL mangling doesn't apply to release tarballs + # Basic test to ensure github URL mangling doesn't apply to release tarballs. + # Deliberately use an older release of Meson at present so we don't need a toml parser. temprecipe = os.path.join(self.tempdir, 'recipe') os.makedirs(temprecipe) - pv = '1.3.1' - recipefile = os.path.join(temprecipe, 'meson_%s.bb' % pv) + pv = '0.52.1' + recipefile = os.path.join(temprecipe, 'python3-meson_%s.bb' % pv) srcuri = 'https://github.com/mesonbuild/meson/releases/download/%s/meson-%s.tar.gz' % (pv, pv) result = runCmd('recipetool create -o %s %s' % (temprecipe, srcuri)) self.assertTrue(os.path.isfile(recipefile)) checkvars = {} - checkvars['LICENSE'] = set(['Apache-2.0', 'Proprietary', 'Unknown']) + checkvars['LICENSE'] = set(['Apache-2.0']) checkvars['SRC_URI'] = 'https://github.com/mesonbuild/meson/releases/download/${PV}/meson-${PV}.tar.gz' - inherits = ['python_setuptools_build_meta'] + inherits = ['setuptools3'] self._test_recipe_contents(recipefile, checkvars, inherits) def _test_recipetool_create_git(self, srcuri, branch=None): From patchwork Thu Feb 15 22:13:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39488 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94B70C4829E for ; Thu, 15 Feb 2024 22:17:35 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.groups.io with SMTP id smtpd.web11.4908.1708035445664939800 for ; Thu, 15 Feb 2024 14:17:25 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=AOCyKOOt; spf=pass (domain: gmail.com, ip: 209.85.221.52, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-33d00a999b4so582105f8f.0 for ; Thu, 15 Feb 2024 14:17:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035444; x=1708640244; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=J7bhVNL8gqP7pW4LkdgBGQIDdPXEh/44XiT2BOyBBtg=; b=AOCyKOOtmMuNccpR/n+zB7DfhgR1AHcTJlRF0QZObdqv1ilrmmaYC5E0VvLcFu4C9q 0FHWqmzlnJf22mAfXynGC1avsKUdMRpo9BwY7SH6VnjK+IeY2b31oSVxwphxhSk5c3BE HIQCxHHRzR3rpmqHrtq1YJLQNGvEICYwX2W3LNM0Z1z0RcTnf9QSr9B6Zzy9tcCg5ySC 6lkJZDf8Wr8gCKzgGBOOROkMkuu1etUz54+ou6OTLqVXpjTDwQ1P+Vw711isQyCdgWYv NXwJdJPXv1qCWqRV0Jl6k9gsd4Sr+rzK7PNFbNZPfwidrU9E0AjTLpYdHeZ+g7hWySKo TtWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035444; x=1708640244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=J7bhVNL8gqP7pW4LkdgBGQIDdPXEh/44XiT2BOyBBtg=; b=bxDbhfAxSjHh4s9XyUNtK6JHr8dg1DBJQHBYzhhU98yeA2+w8Dp3kReAQDTRM92TEf X2F8kNaSbEXm+fRLzy8/CcWp6DC5nfT5zXtjiebB8OywDq4BwiowPLC+E5d/mnZDNn/W UPplPmSLnoLPbVz63/13y9OaZqSG9A4r4NnxY3wxQHBGHOWpadszR12JIhox8xu+Yu9P KMtQjDcpxcNsoi9EQSzhuJ/m+LoXCQJ2aRL1vsWNWhHtLTS0Z9+HRMFUwQn6cwB0waiT aevPnGEumrYz++ZNY9nOKEL7klhmS/QlRMii7wrncgJDsQcXwgSTjp5sSye0C2HVDK/l XLhg== X-Gm-Message-State: AOJu0YxQshU0VuvWMAf7QhED32rVylpNftiGDjag2G3XT6bvdNeLwR/Z B/I2A7U+gn6rQYDctmQNQpTtcMPC4TtiuZGhCAd4hoU053DgPuVCnezPdZF8ctM= X-Google-Smtp-Source: AGHT+IF2jxnP7n6m5Gw+0g5ADcwmVAC8lKDOZqkj0KjzfhdXnyYq6/1adKlvdkAegQaGSXONqqGBZA== X-Received: by 2002:a5d:4fc5:0:b0:33c:d9f8:9d8 with SMTP id h5-20020a5d4fc5000000b0033cd9f809d8mr2321660wrw.48.1708035443964; Thu, 15 Feb 2024 14:17:23 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:23 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Adrian Freihofer Subject: [kirkstone][PATCH 08/12] oeqa/selftest/oelib/buildhistory: git default branch Date: Thu, 15 Feb 2024 23:13:54 +0100 Message-ID: <20240215221711.332614-9-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195719 From: Adrian Freihofer On hosts with git defaulting to main branch the following exception occures: File .../buildhistory.py", line 99, in test_compare_dict_blobs_default blob1 = self.repo.heads.master.commit.tree.blobs[0] ^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.12/site-packages/git/util.py", line 1114, in __getattr__ return list.__getattribute__(self, attr) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'IterableList' object has no attribute 'master' Support main and master branch for these test cases. Note: setting the default branch with --initial-branch requires git version 2.28 or later. Some of the still supported host distros do not provide this feature yet. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Cherry-picked from master: 7df99843d8f31d8e0c2872ff625f4a5abf28f740 Signed-off-by: Adrian Freihofer --- .../oeqa/selftest/cases/oelib/buildhistory.py | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py index 33bd6df2f3..ae12aa0865 100644 --- a/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py +++ b/meta/lib/oeqa/selftest/cases/oelib/buildhistory.py @@ -28,6 +28,16 @@ class TestBlobParsing(OESelftestTestCase): import shutil shutil.rmtree(self.repo_path) + @property + def heads_default(self): + """ + Support repos defaulting to master or to main branch + """ + try: + return self.repo.heads.main + except AttributeError: + return self.repo.heads.master + def commit_vars(self, to_add={}, to_remove = [], msg="A commit message"): if len(to_add) == 0 and len(to_remove) == 0: return @@ -65,10 +75,10 @@ class TestBlobParsing(OESelftestTestCase): changesmap = { "foo-2" : ("2", "8"), "bar" : ("","4"), "bar-2" : ("","5")} self.commit_vars(to_add = { "foo" : "1", "foo-2" : "2", "foo-3" : "3" }) - blob1 = self.repo.heads.master.commit.tree.blobs[0] + blob1 = self.heads_default.commit.tree.blobs[0] self.commit_vars(to_add = { "foo-2" : "8", "bar" : "4", "bar-2" : "5" }) - blob2 = self.repo.heads.master.commit.tree.blobs[0] + blob2 = self.heads_default.commit.tree.blobs[0] change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file), blob1, blob2, False, False) @@ -84,10 +94,10 @@ class TestBlobParsing(OESelftestTestCase): defaultmap = { x : ("default", "1") for x in ["PKG", "PKGE", "PKGV", "PKGR"]} self.commit_vars(to_add = { "foo" : "1" }) - blob1 = self.repo.heads.master.commit.tree.blobs[0] + blob1 = self.heads_default.commit.tree.blobs[0] self.commit_vars(to_add = { "PKG" : "1", "PKGE" : "1", "PKGV" : "1", "PKGR" : "1" }) - blob2 = self.repo.heads.master.commit.tree.blobs[0] + blob2 = self.heads_default.commit.tree.blobs[0] change_records = compare_dict_blobs(os.path.join(self.repo_path, self.test_file), blob1, blob2, False, False) From patchwork Thu Feb 15 22:13:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39490 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B01BCC48BF2 for ; Thu, 15 Feb 2024 22:17:35 +0000 (UTC) Received: from mail-wr1-f52.google.com (mail-wr1-f52.google.com [209.85.221.52]) by mx.groups.io with SMTP id smtpd.web11.4910.1708035446360323748 for ; Thu, 15 Feb 2024 14:17:26 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HyZAW14L; spf=pass (domain: gmail.com, ip: 209.85.221.52, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-33d07ee22eeso82022f8f.0 for ; Thu, 15 Feb 2024 14:17:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035444; x=1708640244; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Y8tfzimZjDkoqv1DWfEruJTtwJF+/ErC9UenZzjdzZk=; b=HyZAW14Ld6mHT6ulinZuNiiiAxmNrVkOJrgI6qVSGHWt+2+PzLyDnHod4edGIcsSQz s1R2Ry+xqTFqwWQewzpzZhFSwNjRSWQoSVLqUjhLlqMIy2TIl9lEjcZnhixyB0H330qV bjjZsh57L+mI1sixXVzvSZbI6EwHlmkqaGRkiSyUTkLJbWpE/f4TvAsb+WfuwbKM8upl yi0GkwsDKvkEy2Oz2HDAW0iMiHXeospydn/MUICFZiPuBkmDsSBah6Ti4OFcOzxy2V0o n2WfgTtO2kiql1sJma2SuYzEAxk5gBlbtTqxYWaZ09WmvQ/ZPPsMKTWvrICOx31R1YbT 8Hag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035444; x=1708640244; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Y8tfzimZjDkoqv1DWfEruJTtwJF+/ErC9UenZzjdzZk=; b=pmPKVmSV8AuQuOrJS0lmD0V7Q3A2JSXQEeBckGu9visWFbYiUz17tSCrd0GRfwxKA+ NdZcsI6enGgbfNDS/XlVRVGumrvQag/cYgnyxeST67Www3wWbFGfRTtAupg+l0fhNO19 9VDVVj2gzSVRk2n+HacLxvcUCcdE/TTM0/v8xZyYsaO+l1LuSYm3KiFnK65EfTFT4y7+ GXyEEYLI+uLA3JxJk1GjocWQXCp1oNSMlb1tVM12EXFNB4Mcuc7WonNyMZHLspeAzMAv Xcrq4NbRCQZlur++gKCGcg9HI2ls5WQtYUIlUsc9nxbQEKKBWip4drHj3F2EdV4/MiDj A+Yg== X-Gm-Message-State: AOJu0Yz/6AHO8fnZXE1qvSNtWSWYHUXq+7yY7U8vq+LZXDLVk7/I7NTF kxe0qQwANPEq2NJiMl36JOJpFvWnQlzSpW8NmyL1Nmn4IhtFsYBLgK6/nhNjJP8= X-Google-Smtp-Source: AGHT+IF6RF0qV7lOGXb1XiNnNhmeJ1JMqGWG48Nsu7bSUgiMt3843tK+HIYFqIpLVD+rpvvjiM7XFA== X-Received: by 2002:a5d:6a8b:0:b0:33c:f0e1:6fae with SMTP id s11-20020a5d6a8b000000b0033cf0e16faemr2513414wru.43.1708035444614; Thu, 15 Feb 2024 14:17:24 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:24 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Adrian Freihofer Subject: [kirkstone][PATCH 09/12] feature-microblaze-versions.inc: python 3.12 regex Date: Thu, 15 Feb 2024 23:13:55 +0100 Message-ID: <20240215221711.332614-10-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195720 From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer feature-microblaze-versions.inc# Signed-off-by: Richard Purdie Cherry-picked from master: 662f52f1713c9f070550fc0c874eb62312218ea4 Signed-off-by: Adrian Freihofer --- .../machine/include/microblaze/feature-microblaze-versions.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc b/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc index 5c37f49abb..658e87b8cd 100644 --- a/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc +++ b/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc @@ -16,7 +16,7 @@ def microblaze_current_version(d, gcc = False): # find the current version, and convert it to major/minor integers version = None for t in (d.getVar("TUNE_FEATURES") or "").split(): - m = re.search("^v(\d+)\.(\d+)", t) + m = re.search(r"^v(\d+)\.(\d+)", t) if m: version = int(m.group(1)), int(m.group(2)) break From patchwork Thu Feb 15 22:13:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39491 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id B534CC48BF0 for ; Thu, 15 Feb 2024 22:17:35 +0000 (UTC) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) by mx.groups.io with SMTP id smtpd.web10.4922.1708035447253226455 for ; Thu, 15 Feb 2024 14:17:27 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=ZTI/18eb; spf=pass (domain: gmail.com, ip: 209.85.128.47, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-411d76c9ce3so11514685e9.3 for ; Thu, 15 Feb 2024 14:17:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035445; x=1708640245; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=oL5bbV6PegO7Hw/DFKm3cHodje+2IMFbVortKt1eA+Y=; b=ZTI/18ebyrzys5nFTENWCCjQV9dz94Z62EJNhg5maLrS33fKbE+ajCnNQMP1K/Fo6M ZkwwSbjTmKHibthQHuV2gitQN8uzcBMm+4ypgC6mPsY5inDmAGj6JaYeOB/hzXbYHwLK T0aSbBu8zqhqEZI/Bd8HP1ZWLPspFb/ZWyOU1dozlt1bw43Mtj5WzjzhdYfim/0EuoZ8 60X9BlnX42EW5GyMUM8BZZcPT4nG7QykB1rqhR405Ae7kmS8VzW7D8XtiMMGL8Q5Vm3F xdPq6ldEpwtBLfzVOzQ11xk9OwX6VGPdam9RY+GaJMe0okQ66APo0ki8avhZkPh3YtfU a/gA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035445; x=1708640245; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oL5bbV6PegO7Hw/DFKm3cHodje+2IMFbVortKt1eA+Y=; b=Gok5yN1U8luktkuSR+00TvbwfQFAsOFj0XuOixaVT9HvEn13ngA27VSnF5Kqo4bmHF amQ7ygsUkx2ZsB5mOG5dGHQ6Ppue0jZKPJgW2zKp5ypbrxc2XtD7fcRDbvYJSmJSdp/E XZjESwFhb1o8MYsnOb/N4oIwyN0uAU8mtAnh3vNZb8ZxmkIEw8cV3LEjfTnXwhpbU7AE UDmL6d/tEe2Cm3Bkb6h+zqoepmquHY+Jnj/tbiMaNle/o5BMz2IqV8PxxxNjf4xlQuH5 /VB9vZC0lsPIV8u5cabpRiKjx+TQA/qtd7uOnqbKhujd8ClGRrEpPRhv82BpaEPhpiAU PVCA== X-Gm-Message-State: AOJu0Yzp1BirHrRCH1MIlIL7NqfGf3cgYQ4qC+Wll9sdRiIUIZwOVaH9 mSK7y+aLYcFJZ6BFH69+sHkJR/vbEfLZp2wg8AWZ6iJj/Uva8My2YoC+0R2dAdA= X-Google-Smtp-Source: AGHT+IHWQxVsP+K25CUPhDFqjnqC1WQWqJYCisfxVNYerkQQsrzX1XhxMcg57lfFDdTQd6aIng7iIg== X-Received: by 2002:adf:e450:0:b0:33b:60ca:269f with SMTP id t16-20020adfe450000000b0033b60ca269fmr2108777wrm.43.1708035445384; Thu, 15 Feb 2024 14:17:25 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:24 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Adrian Freihofer Subject: [kirkstone][PATCH 10/12] meta/lib/oeqa: python 3.12 regex Date: Thu, 15 Feb 2024 23:13:56 +0100 Message-ID: <20240215221711.332614-11-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195721 From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Cherry-picked from master: 9002850f0c2e409d3bc629e36bb360b96326bb64 Signed-off-by: Adrian Freihofer --- meta/lib/oeqa/oetest.py | 2 +- meta/lib/oeqa/selftest/cases/bblayers.py | 2 +- meta/lib/oeqa/selftest/cases/fitimage.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py index 9c84466dd0..b53c611062 100644 --- a/meta/lib/oeqa/oetest.py +++ b/meta/lib/oeqa/oetest.py @@ -256,7 +256,7 @@ class TestContext(object): modules = [] for test in self.testslist: - if re.search("\w+\.\w+\.test_\S+", test): + if re.search(r"\w+\.\w+\.test_\S+", test): test = '.'.join(t.split('.')[:3]) module = pkgutil.get_loader(test) modules.append(module) diff --git a/meta/lib/oeqa/selftest/cases/bblayers.py b/meta/lib/oeqa/selftest/cases/bblayers.py index 7d74833f61..0b9f16eeae 100644 --- a/meta/lib/oeqa/selftest/cases/bblayers.py +++ b/meta/lib/oeqa/selftest/cases/bblayers.py @@ -46,7 +46,7 @@ class BitbakeLayers(OESelftestTestCase): bb_file = os.path.join(testoutdir, recipe_path, recipe_file) self.assertTrue(os.path.isfile(bb_file), msg = "Cannot find xcursor-transparent-theme_0.1.1.bb in the test_bitbakelayers_flatten local dir.") contents = ftools.read_file(bb_file) - find_in_contents = re.search("##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents) + find_in_contents = re.search(r"##### bbappended from meta-selftest #####\n(.*\n)*include test_recipe.inc", contents) self.assertTrue(find_in_contents, msg = "Flattening layers did not work. bitbake-layers flatten output: %s" % result.output) def test_bitbakelayers_add_remove(self): diff --git a/meta/lib/oeqa/selftest/cases/fitimage.py b/meta/lib/oeqa/selftest/cases/fitimage.py index d732a9020d..4d820faf92 100644 --- a/meta/lib/oeqa/selftest/cases/fitimage.py +++ b/meta/lib/oeqa/selftest/cases/fitimage.py @@ -202,7 +202,7 @@ UBOOT_MKIMAGE_SIGN_ARGS = "-c 'a smart comment'" signed_sections = {} for line in result.output.splitlines(): if line.startswith((' Configuration', ' Image')): - in_signed = re.search('\((.*)\)', line).groups()[0] + in_signed = re.search(r'\((.*)\)', line).groups()[0] elif re.match('^ *', line) in (' ', ''): in_signed = None elif in_signed: @@ -521,7 +521,7 @@ UBOOT_FIT_HASH_ALG = "sha256" signed_sections = {} for line in result.output.splitlines(): if line.startswith((' Image')): - in_signed = re.search('\((.*)\)', line).groups()[0] + in_signed = re.search(r'\((.*)\)', line).groups()[0] elif re.match(' \w', line): in_signed = None elif in_signed: @@ -675,7 +675,7 @@ FIT_SIGN_INDIVIDUAL = "1" signed_sections = {} for line in result.output.splitlines(): if line.startswith((' Image')): - in_signed = re.search('\((.*)\)', line).groups()[0] + in_signed = re.search(r'\((.*)\)', line).groups()[0] elif re.match(' \w', line): in_signed = None elif in_signed: From patchwork Thu Feb 15 22:13:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39492 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A7C7EC48BEC for ; Thu, 15 Feb 2024 22:17:35 +0000 (UTC) Received: from mail-wr1-f45.google.com (mail-wr1-f45.google.com [209.85.221.45]) by mx.groups.io with SMTP id smtpd.web11.4912.1708035448005407965 for ; Thu, 15 Feb 2024 14:17:28 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=LK+zL93U; spf=pass (domain: gmail.com, ip: 209.85.221.45, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wr1-f45.google.com with SMTP id ffacd0b85a97d-33cf6266c76so813096f8f.1 for ; Thu, 15 Feb 2024 14:17:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035446; x=1708640246; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Gz+Ij36rz0RUxKYzdXcOPNd9A/cwq/xRSzZzA3m5oG8=; b=LK+zL93U2G0taXq5SOKQw9/WcmMrYf9dXiCC52WIEVEwnZKhlWd9TTkXC6PLl4Ibae auj5Yh6ppxblBJZbE/JY3b2R03VU/IAxbzmF1fo9o1Gu0i5WQvHHUT6rYq/LR8Yt9jZ/ YiS1e7he4t+oRtcFrY09WcRHzf4ZNRzuhS71Q70ICBC7KOZ7p+ef5hP6OCvd60LHCVIf fhAAsUKUUupNyvpCQdoICHT6O7N9FP6s5K5/fqYyA0hhLwqiqVb2A8jPBNTqu78UGf3+ jw3Wat6vOp8/ms9yVZnP05+Yg9op1P9zCSqAZr/z1dPRGbESf5CYdUCj53M1Cy+jaYfo QPCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035446; x=1708640246; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Gz+Ij36rz0RUxKYzdXcOPNd9A/cwq/xRSzZzA3m5oG8=; b=bbz2INbY6rl7Ku4clhy27tq9bYuCeRhhmGoKSRZIr2M+DfvcW9fNPuvNwqJ1uJprC9 SccHGZU0okxcacy6gJHk9BIqpEqg058dlZxPfT9HnW3EprdU8JawKgZ/uznbxsI+CMxM /Lr8pgZ2zLrBjv5pVQpFOm+Q4yZ97PuZ2aEqIQRMecttSI4MsQvw1O4KVglvdf4a4E6d aIn6c/yLZg+3wU94+izXNhoyZtiF04DYZN7zjHyio6NC2yG8l9mF8plctxOkQTLsGEw6 Yl7YkS4GTkTIHOiEF0AzB7Pb4ilORMKD2r+tVG7g+xq4NGCc/ysTrvR3Oz14eBXSGsJW mGMA== X-Gm-Message-State: AOJu0Yy74i0KaYub5rBYKlX2WZp3wk8UpeANJBytlPx8GpidxecrIAt2 thVFl6mdAHXsS7YzAur9CT88bIWeaFjmDzk75/FLKcL3Kzf5U17aos7GDmjZ0Zg= X-Google-Smtp-Source: AGHT+IELCNwAbvWIZdYE1OtyCt5tuclVV6VWDNX3352cV0MnfJqu0X7q/+Lsmdn/m+zxWdgcSHLT2A== X-Received: by 2002:adf:a199:0:b0:33b:353f:6b8f with SMTP id u25-20020adfa199000000b0033b353f6b8fmr2246912wru.20.1708035446330; Thu, 15 Feb 2024 14:17:26 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:25 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Adrian Freihofer Subject: [kirkstone][PATCH 11/12] meta/recipes: python 3.12 regex Date: Thu, 15 Feb 2024 23:13:57 +0100 Message-ID: <20240215221711.332614-12-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195722 From: Adrian Freihofer Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Cherry-picked from master: f2d80817baea298b953d6e14daad65087b3b50c9 Signed-off-by: Adrian Freihofer --- meta/recipes-kernel/perf/perf/sort-pmuevents.py | 8 ++++---- meta/recipes-rt/rt-tests/files/rt_bmark.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/recipes-kernel/perf/perf/sort-pmuevents.py b/meta/recipes-kernel/perf/perf/sort-pmuevents.py index 0362f2d8fa..0a87e553ab 100755 --- a/meta/recipes-kernel/perf/perf/sort-pmuevents.py +++ b/meta/recipes-kernel/perf/perf/sort-pmuevents.py @@ -36,10 +36,10 @@ with open(infile, 'r') as file: preamble_regex = re.compile( '^(.*?)^(struct|const struct|static struct|static const struct)', re.MULTILINE | re.DOTALL ) preamble = re.search( preamble_regex, data ) -struct_block_regex = re.compile( '^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) -field_regex = re.compile( '{.*?},', re.MULTILINE | re.DOTALL ) -cpuid_regex = re.compile( '\.cpuid = (.*?),', re.MULTILINE | re.DOTALL ) -name_regex = re.compile( '\.name = (.*?),', re.MULTILINE | re.DOTALL ) +struct_block_regex = re.compile(r'^(struct|const struct|static struct|static const struct).*?(\w+) (.*?)\[\] = {(.*?)^};', re.MULTILINE | re.DOTALL ) +field_regex = re.compile(r'{.*?},', re.MULTILINE | re.DOTALL ) +cpuid_regex = re.compile(r'\.cpuid = (.*?),', re.MULTILINE | re.DOTALL ) +name_regex = re.compile(r'\.name = (.*?),', re.MULTILINE | re.DOTALL ) # create a dictionary structure to store all the structs, their # types and then their fields. diff --git a/meta/recipes-rt/rt-tests/files/rt_bmark.py b/meta/recipes-rt/rt-tests/files/rt_bmark.py index 3b84447a0f..2a4eed412f 100755 --- a/meta/recipes-rt/rt-tests/files/rt_bmark.py +++ b/meta/recipes-rt/rt-tests/files/rt_bmark.py @@ -265,7 +265,7 @@ cmd = ("cyclictest", "-d", str(interval_delta), "-l", str(loop_count) ) -rex = re.compile(b"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)") +rex = re.compile(r"C:\s*(\d+).*Min:\s*(\d+).*Avg:\s*(\d+).*Max:\s*(\d+)") def run_cyclictest_once(): res = subprocess.check_output(cmd) From patchwork Thu Feb 15 22:13:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Freihofer X-Patchwork-Id: 39489 X-Patchwork-Delegate: steve@sakoman.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A255DC48BC4 for ; Thu, 15 Feb 2024 22:17:35 +0000 (UTC) Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by mx.groups.io with SMTP id smtpd.web10.4924.1708035449358742603 for ; Thu, 15 Feb 2024 14:17:29 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JM6ICRqj; spf=pass (domain: gmail.com, ip: 209.85.128.42, mailfrom: adrian.freihofer@gmail.com) Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-41211097adcso9575025e9.3 for ; Thu, 15 Feb 2024 14:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708035447; x=1708640247; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bnHzgdDL0C2drrzxvWf0kw/Wh2Kzz4ueFuoBnaXVK60=; b=JM6ICRqjqHUsEdA7B9XbIn36dLo7tkPhc0cC3oU7hOU0ZOu/kiK3MzmZn5wBdGGJKY BItad1eDeu7OmBn9eFox5o97aSWjSTil7fIWXryThME12HCrqpK9wU98bb2r3vwQ8eR4 74lwhUTsfzin+f0pBG5O9MkwCSIyl8MDU42Tyt7SSNTZzaL6GgrPJuDtTJ3hP7N/VJFO gYahiEX5/XAxHrfYx0dp9ypZyCDY5CblULD9TpRfRVTvxpPiFiKpGGX4DUiEaVlrHBRg 8gcp32vptyJGZXUOlmh/ZHkgmcnqJ1sMvFg4gici1Mr1tM4yUlQtgOz0nPSG0YR3tuQ1 PD2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708035447; x=1708640247; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bnHzgdDL0C2drrzxvWf0kw/Wh2Kzz4ueFuoBnaXVK60=; b=BSch9jt2Kr02sPDWJYIL5GfdPE2sw7TepanqUher0q9rJM0YoiLhZgtNzq+S7+FHq6 AMh6hvg2kXzYDVQsV6sc8on8ydlBwuwdc3bV1hZ5yU706aK6lrQI1ZvKE9LNO+dO2yjO d2v8RM+Wos7/vWp3UbmH0TujMKHTmqQwVaSECzrVz4vkD1tQbsLtFn2TFWXwb+Vppvm0 3X2ok1stu0YZPSMTqAU3e7/4M7dXLiYI5ZeFfjQ6aGy7Qv/5K0sgwHeDIBQ2apqQATZp h7siNB5eoSJsK+djlIqbWt7I3Z/HY0Y7Kh0GfLeDL8CQUk1UeYdj2JUNi6HfdLNosaQ8 s4Jg== X-Gm-Message-State: AOJu0Yw2e0pTIYjaxY9EP+FkpRVVvP+dvLLiXhWSonNoakfZU0yd4tR7 fI7XiBMsWK8UD8oko5vMHwsPQpSkyuo1voTBuAxEylG82ClCHS5RbYY6YJ4/00Q= X-Google-Smtp-Source: AGHT+IGC3XkfrISgD3MfF3lqMtj4NEDi4P6bRTWsU6GGKBaZ+OPSGWlHrOF+S8S08TR6n5CLALZfDg== X-Received: by 2002:adf:fe0f:0:b0:33b:87fb:7106 with SMTP id n15-20020adffe0f000000b0033b87fb7106mr2345013wrr.55.1708035447576; Thu, 15 Feb 2024 14:17:27 -0800 (PST) Received: from wsadrian16.fritz.box ([2a02:169:59a6:0:55c4:f628:91f3:4287]) by smtp.gmail.com with ESMTPSA id e5-20020a5d65c5000000b0033cda3d3916sm335334wrw.88.2024.02.15.14.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 14:17:26 -0800 (PST) From: Adrian Freihofer X-Google-Original-From: Adrian Freihofer To: openembedded-core@lists.openembedded.org Cc: Adrian Freihofer , Adrian Freihofer Subject: [kirkstone][PATCH 12/12] scripts: python 3.12 regex Date: Thu, 15 Feb 2024 23:13:58 +0100 Message-ID: <20240215221711.332614-13-adrian.freihofer@siemens.com> X-Mailer: git-send-email 2.43.1 In-Reply-To: <20240215221711.332614-1-adrian.freihofer@siemens.com> References: <20240215221711.332614-1-adrian.freihofer@siemens.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Feb 2024 22:17:35 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/195723 From: Adrian Freihofer All the regexes throw a warning like this: WARNING: scripts/lib/recipetool/create_buildsys.py:140: SyntaxWarning: invalid escape sequence '\s' proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) Python 3 interprets string literals as Unicode strings, and therefore \s is treated as an escaped Unicode character which is not correct. Declaring the RegEx pattern as a raw string instead of unicode is required for Python 3. Signed-off-by: Adrian Freihofer Signed-off-by: Richard Purdie Backported from master: 24b0ba00d4f0b4d9834f7693ecb6032dfc534a80 Signed-off-by: Adrian Freihofer --- scripts/combo-layer | 2 +- scripts/contrib/bbvars.py | 6 ++-- scripts/contrib/convert-overrides.py | 8 ++--- scripts/lib/checklayer/__init__.py | 4 +-- scripts/lib/recipetool/create.py | 12 +++---- scripts/lib/recipetool/create_buildsys.py | 38 +++++++++++------------ scripts/oe-check-sstate | 2 +- scripts/oe-pkgdata-util | 2 +- scripts/opkg-query-helper.py | 2 +- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/scripts/combo-layer b/scripts/combo-layer index 7f2020fca7..19ad32660d 100755 --- a/scripts/combo-layer +++ b/scripts/combo-layer @@ -483,7 +483,7 @@ def check_repo_clean(repodir): exit if repo is dirty """ output=runcmd("git status --porcelain", repodir) - r = re.compile('\?\? patch-.*/') + r = re.compile(r'\?\? patch-.*/') dirtyout = [item for item in output.splitlines() if not r.match(item)] if dirtyout: logger.error("git repo %s is dirty, please fix it first", repodir) diff --git a/scripts/contrib/bbvars.py b/scripts/contrib/bbvars.py index 090133600b..a9cdf082ab 100755 --- a/scripts/contrib/bbvars.py +++ b/scripts/contrib/bbvars.py @@ -36,8 +36,8 @@ def bbvar_is_documented(var, documented_vars): def collect_documented_vars(docfiles): ''' Walk the docfiles and collect the documented variables ''' documented_vars = [] - prog = re.compile(".*($|[^A-Z_])') + prog = re.compile(r".*($|[^A-Z_])') for d in docfiles: with open(d) as f: documented_vars += var_prog.findall(f.read()) @@ -45,7 +45,7 @@ def collect_documented_vars(docfiles): return documented_vars def bbvar_doctag(var, docconf): - prog = re.compile('^%s\[doc\] *= *"(.*)"' % (var)) + prog = re.compile(r'^%s\[doc\] *= *"(.*)"' % (var)) if docconf == "": return "?" diff --git a/scripts/contrib/convert-overrides.py b/scripts/contrib/convert-overrides.py index 1939757f1b..c69acb4095 100755 --- a/scripts/contrib/convert-overrides.py +++ b/scripts/contrib/convert-overrides.py @@ -81,19 +81,19 @@ skip_ext = [".html", ".patch", ".m4", ".diff"] + args.skip_ext vars_re = {} for exp in vars: - vars_re[exp] = (re.compile('((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp), r"\1:" + exp) + vars_re[exp] = (re.compile(r'((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp), r"\1:" + exp) shortvars_re = {} for exp in shortvars: - shortvars_re[exp] = (re.compile('((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp + '([\(\'"\s:])'), r"\1:" + exp + r"\3") + shortvars_re[exp] = (re.compile(r'((^|[#\'"\s\-\+])[A-Za-z0-9_\-:${}\.]+)_' + exp + r'([\(\'"\s:])'), r"\1:" + exp + r"\3") package_re = {} for exp in packagevars: - package_re[exp] = (re.compile('(^|[#\'"\s\-\+]+)' + exp + '_' + '([$a-z"\'\s%\[<{\\\*].)'), r"\1" + exp + r":\2") + package_re[exp] = (re.compile(r'(^|[#\'"\s\-\+]+)' + exp + r'_' + r'([$a-z"\'\s%\[<{\\\*].)'), r"\1" + exp + r":\2") # Other substitutions to make subs = { - 'r = re.compile("([^:]+):\s*(.*)")' : 'r = re.compile("(^.+?):\s+(.*)")', + 'r = re.compile(r"([^:]+):\s*(.*)")' : 'r = re.compile(r"(^.+?):\s+(.*)")', "val = d.getVar('%s_%s' % (var, pkg))" : "val = d.getVar('%s:%s' % (var, pkg))", "f.write('%s_%s: %s\\n' % (var, pkg, encode(val)))" : "f.write('%s:%s: %s\\n' % (var, pkg, encode(val)))", "d.getVar('%s_%s' % (scriptlet_name, pkg))" : "d.getVar('%s:%s' % (scriptlet_name, pkg))", diff --git a/scripts/lib/checklayer/__init__.py b/scripts/lib/checklayer/__init__.py index 938805289e..53f99dce1e 100644 --- a/scripts/lib/checklayer/__init__.py +++ b/scripts/lib/checklayer/__init__.py @@ -324,8 +324,8 @@ def get_signatures(builddir, failsafe=False, machine=None, extravars=None): else: raise - sig_regex = re.compile("^(?P.*:.*):(?P.*) .$") - tune_regex = re.compile("(^|\s)SIGGEN_LOCKEDSIGS_t-(?P\S*)\s*=\s*") + sig_regex = re.compile(r"^(?P.*:.*):(?P.*) .$") + tune_regex = re.compile(r"(^|\s)SIGGEN_LOCKEDSIGS_t-(?P\S*)\s*=\s*") current_tune = None with open(sigs_file, 'r') as f: for line in f.readlines(): diff --git a/scripts/lib/recipetool/create.py b/scripts/lib/recipetool/create.py index 67894fb4d0..7b4c501456 100644 --- a/scripts/lib/recipetool/create.py +++ b/scripts/lib/recipetool/create.py @@ -1073,12 +1073,12 @@ def crunch_license(licfile): # Note: these are carefully constructed! license_title_re = re.compile(r'^#*\(? *(This is )?([Tt]he )?.{0,15} ?[Ll]icen[sc]e( \(.{1,10}\))?\)?[:\.]? ?#*$') license_statement_re = re.compile(r'^((This (project|software)|.{1,10}) is( free software)? (released|licen[sc]ed)|(Released|Licen[cs]ed)) under the .{1,10} [Ll]icen[sc]e:?$') - copyright_re = re.compile('^ *[#\*]* *(Modified work |MIT LICENSED )?Copyright ?(\([cC]\))? .*$') - disclaimer_re = re.compile('^ *\*? ?All [Rr]ights [Rr]eserved\.$') - email_re = re.compile('^.*<[\w\.-]*@[\w\.\-]*>$') - header_re = re.compile('^(\/\**!?)? ?[\-=\*]* ?(\*\/)?$') - tag_re = re.compile('^ *@?\(?([Ll]icense|MIT)\)?$') - url_re = re.compile('^ *[#\*]* *https?:\/\/[\w\.\/\-]+$') + copyright_re = re.compile(r'^ *[#\*]* *(Modified work |MIT LICENSED )?Copyright ?(\([cC]\))? .*$') + disclaimer_re = re.compile(r'^ *\*? ?All [Rr]ights [Rr]eserved\.$') + email_re = re.compile(r'^.*<[\w\.-]*@[\w\.\-]*>$') + header_re = re.compile(r'^(\/\**!?)? ?[\-=\*]* ?(\*\/)?$') + tag_re = re.compile(r'^ *@?\(?([Ll]icense|MIT)\)?$') + url_re = re.compile(r'^ *[#\*]* *https?:\/\/[\w\.\/\-]+$') crunched_md5sums = {} diff --git a/scripts/lib/recipetool/create_buildsys.py b/scripts/lib/recipetool/create_buildsys.py index 5015634476..bc4fb14a20 100644 --- a/scripts/lib/recipetool/create_buildsys.py +++ b/scripts/lib/recipetool/create_buildsys.py @@ -137,15 +137,15 @@ class CmakeRecipeHandler(RecipeHandler): deps = [] unmappedpkgs = [] - proj_re = re.compile('project\s*\(([^)]*)\)', re.IGNORECASE) - pkgcm_re = re.compile('pkg_check_modules\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?\s+([^)\s]+)\s*\)', re.IGNORECASE) - pkgsm_re = re.compile('pkg_search_module\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?((\s+[^)\s]+)+)\s*\)', re.IGNORECASE) - findpackage_re = re.compile('find_package\s*\(\s*([a-zA-Z0-9-_]+)\s*.*', re.IGNORECASE) - findlibrary_re = re.compile('find_library\s*\(\s*[a-zA-Z0-9-_]+\s*(NAMES\s+)?([a-zA-Z0-9-_ ]+)\s*.*') - checklib_re = re.compile('check_library_exists\s*\(\s*([^\s)]+)\s*.*', re.IGNORECASE) - include_re = re.compile('include\s*\(\s*([^)\s]*)\s*\)', re.IGNORECASE) - subdir_re = re.compile('add_subdirectory\s*\(\s*([^)\s]*)\s*([^)\s]*)\s*\)', re.IGNORECASE) - dep_re = re.compile('([^ ><=]+)( *[<>=]+ *[^ ><=]+)?') + proj_re = re.compile(r'project\s*\(([^)]*)\)', re.IGNORECASE) + pkgcm_re = re.compile(r'pkg_check_modules\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?\s+([^)\s]+)\s*\)', re.IGNORECASE) + pkgsm_re = re.compile(r'pkg_search_module\s*\(\s*[a-zA-Z0-9-_]+\s*(REQUIRED)?((\s+[^)\s]+)+)\s*\)', re.IGNORECASE) + findpackage_re = re.compile(r'find_package\s*\(\s*([a-zA-Z0-9-_]+)\s*.*', re.IGNORECASE) + findlibrary_re = re.compile(r'find_library\s*\(\s*[a-zA-Z0-9-_]+\s*(NAMES\s+)?([a-zA-Z0-9-_ ]+)\s*.*') + checklib_re = re.compile(r'check_library_exists\s*\(\s*([^\s)]+)\s*.*', re.IGNORECASE) + include_re = re.compile(r'include\s*\(\s*([^)\s]*)\s*\)', re.IGNORECASE) + subdir_re = re.compile(r'add_subdirectory\s*\(\s*([^)\s]*)\s*([^)\s]*)\s*\)', re.IGNORECASE) + dep_re = re.compile(r'([^ ><=]+)( *[<>=]+ *[^ ><=]+)?') def find_cmake_package(pkg): RecipeHandler.load_devel_filemap(tinfoil.config_data) @@ -423,16 +423,16 @@ class AutotoolsRecipeHandler(RecipeHandler): 'makeinfo': 'texinfo', } - pkg_re = re.compile('PKG_CHECK_MODULES\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') - pkgce_re = re.compile('PKG_CHECK_EXISTS\(\s*\[?([^,\]]*)\]?[),].*') - lib_re = re.compile('AC_CHECK_LIB\(\s*\[?([^,\]]*)\]?,.*') - libx_re = re.compile('AX_CHECK_LIBRARY\(\s*\[?[^,\]]*\]?,\s*\[?([^,\]]*)\]?,\s*\[?([a-zA-Z0-9-]*)\]?,.*') - progs_re = re.compile('_PROGS?\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') - dep_re = re.compile('([^ ><=]+)( [<>=]+ [^ ><=]+)?') - ac_init_re = re.compile('AC_INIT\(\s*([^,]+),\s*([^,]+)[,)].*') - am_init_re = re.compile('AM_INIT_AUTOMAKE\(\s*([^,]+),\s*([^,]+)[,)].*') - define_re = re.compile('\s*(m4_)?define\(\s*([^,]+),\s*([^,]+)\)') - version_re = re.compile('([0-9.]+)') + pkg_re = re.compile(r'PKG_CHECK_MODULES\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') + pkgce_re = re.compile(r'PKG_CHECK_EXISTS\(\s*\[?([^,\]]*)\]?[),].*') + lib_re = re.compile(r'AC_CHECK_LIB\(\s*\[?([^,\]]*)\]?,.*') + libx_re = re.compile(r'AX_CHECK_LIBRARY\(\s*\[?[^,\]]*\]?,\s*\[?([^,\]]*)\]?,\s*\[?([a-zA-Z0-9-]*)\]?,.*') + progs_re = re.compile(r'_PROGS?\(\s*\[?[a-zA-Z0-9_]*\]?,\s*\[?([^,\]]*)\]?[),].*') + dep_re = re.compile(r'([^ ><=]+)( [<>=]+ [^ ><=]+)?') + ac_init_re = re.compile(r'AC_INIT\(\s*([^,]+),\s*([^,]+)[,)].*') + am_init_re = re.compile(r'AM_INIT_AUTOMAKE\(\s*([^,]+),\s*([^,]+)[,)].*') + define_re = re.compile(r'\s*(m4_)?define\(\s*([^,]+),\s*([^,]+)\)') + version_re = re.compile(r'([0-9.]+)') defines = {} def subst_defines(value): diff --git a/scripts/oe-check-sstate b/scripts/oe-check-sstate index 4187e77458..0d171c4463 100755 --- a/scripts/oe-check-sstate +++ b/scripts/oe-check-sstate @@ -53,7 +53,7 @@ def check(args): cmd = ['bitbake', '--dry-run', '--runall=build'] + args.target output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, env=env) - task_re = re.compile('NOTE: Running setscene task [0-9]+ of [0-9]+ \(([^)]+)\)') + task_re = re.compile(r'NOTE: Running setscene task [0-9]+ of [0-9]+ \(([^)]+)\)') tasks = [] for line in output.decode('utf-8').splitlines(): res = task_re.match(line) diff --git a/scripts/oe-pkgdata-util b/scripts/oe-pkgdata-util index 7412cc1f47..44ae40549a 100755 --- a/scripts/oe-pkgdata-util +++ b/scripts/oe-pkgdata-util @@ -296,7 +296,7 @@ def package_info(args): extra = '' for line in f: for var in vars: - m = re.match(var + '(?::\S+)?:\s*(.+?)\s*$', line) + m = re.match(var + r'(?::\S+)?:\s*(.+?)\s*$', line) if m: vals[var] = m.group(1) pkg_version = vals['PKGV'] or '' diff --git a/scripts/opkg-query-helper.py b/scripts/opkg-query-helper.py index bc3ab43823..084d9ef684 100755 --- a/scripts/opkg-query-helper.py +++ b/scripts/opkg-query-helper.py @@ -29,7 +29,7 @@ for arg in sys.argv[1:]: args.append(arg) # Regex for removing version specs after dependency items -verregex = re.compile(' \([=<>]* [^ )]*\)') +verregex = re.compile(r' \([=<>]* [^ )]*\)') pkg = "" ver = ""