From patchwork Wed Oct 25 20:52:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Kadir Yilmaz X-Patchwork-Id: 1855324 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=buildroot.org (client-ip=140.211.166.133; helo=smtp2.osuosl.org; envelope-from=buildroot-bounces@buildroot.org; receiver=patchwork.ozlabs.org) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SG1N06Z3gz23jr for ; Thu, 26 Oct 2023 07:52:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id EE2FB404D8; Wed, 25 Oct 2023 20:52:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org EE2FB404D8 X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RkLSiSTvgl4Y; Wed, 25 Oct 2023 20:52:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp2.osuosl.org (Postfix) with ESMTP id B15DE404E0; Wed, 25 Oct 2023 20:52:44 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org B15DE404E0 X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 433041BF476 for ; Wed, 25 Oct 2023 20:52:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 28D204180B for ; Wed, 25 Oct 2023 20:52:43 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 28D204180B X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id abp3Q5R2OC-e for ; Wed, 25 Oct 2023 20:52:42 +0000 (UTC) Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0008741803 for ; Wed, 25 Oct 2023 20:52:41 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0008741803 Received: by mail-ed1-x52f.google.com with SMTP id 4fb4d7f45d1cf-53d9b94731aso234436a12.1 for ; Wed, 25 Oct 2023 13:52:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698267160; x=1698871960; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=R4vW4541C7hno4j8Rike1CuCBoDQ/B0UuVNx3Cus4Eg=; b=HYhX7prDDIhP1C3FMiarR76vchp4nFeGd7NMBz/MCqHyTTsenDBlY3O/iaNtgkJHF9 wObIa1/XYKuRhDHxKATvWDYW6wmnF+VgLNgX6y0Gv4oe3O4rHtupvCfW52TRicm1j93r UDnIP6ulGIm4Y9zW9hmymo6lw2QXi+qNBcpMsMWq/pAynNuUoLeXupkIcv1sa7yoViaN 7sAsq+UMgF8nJmm6ANokr8vwhVgUFFo43bE6Bbeo3lFxBcTqeXhA69+ITQKez9AvnaBU aezVg42WhIUqPxVptVSKnlhYmR2kevMArU8l23BsYfpVsuD8C5HXqWiJy/KbyxFNOFWO G6rg== X-Gm-Message-State: AOJu0YybhDg7cf/g5/VizdtThoCs/yRep0qMcJpiSqBYoHkyJbkfcXs4 xm6TnbGIMUqBFQ0aqjSKwW1760TPIjEcOg== X-Google-Smtp-Source: AGHT+IH1i4QoAZ1oDQYx6QYe5akfihAy21FkC9ltlZ0Uo+mMe+GKhSHeaw5TkInTIUcUA0H84xzrYQ== X-Received: by 2002:a17:907:3f09:b0:9b0:552c:b36c with SMTP id hq9-20020a1709073f0900b009b0552cb36cmr14234475ejc.21.1698267159330; Wed, 25 Oct 2023 13:52:39 -0700 (PDT) Received: from p15.dynamic.ziggo.nl (2001-1c00-0f38-4500-3e41-8c79-4e8a-6bec.cable.dynamic.v6.ziggo.nl. [2001:1c00:f38:4500:3e41:8c79:4e8a:6bec]) by smtp.gmail.com with ESMTPSA id l17-20020a17090612d100b0099cd1c0cb21sm10350038ejb.129.2023.10.25.13.52.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 13:52:38 -0700 (PDT) From: Kadir Yilmaz To: buildroot@buildroot.org Date: Wed, 25 Oct 2023 22:52:33 +0200 Message-Id: <20231025205233.1925727-1-kadir.c.yilmaz@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1698267160; x=1698871960; darn=buildroot.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=R4vW4541C7hno4j8Rike1CuCBoDQ/B0UuVNx3Cus4Eg=; b=UQOGlhgLTvTRpWrJE/MwfQhuKcw9rBOUAIrV7X/JHA0QOovTxxT5pigRC5m+RmXH4Z oktpP94hJP4RIG/ZRDNAV8DQFtPQtE9beWFwjAwcw2/pERhN2zPQrMa3CtU8o04ifE04 Iz1Cfm6Y+SJiJTBN1NtKIlTNmjdOp3xBz7ZFlA6DUrJw/2WgTrStXr5cB/46cIQEVLn4 qBJC1HJKDQ1xNKk5/wPjOPMfrXr5Gw0jyHzQOY3uVfbOZq/z5oE2698ycj8l4vs/Jf/E Vh+HH/lMtgY2G+Gwd0xJANjfKdz1d8zObQfh6/jH8VLQ6WV8j9Zk0gwsfM2dpnvmBWZ6 CJZA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=UQOGlhgL Subject: [Buildroot] [PATCH 1/1] package/qt5webengine-chromium: fix python3.11 build errors X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Giulio Benetti , Kadir Yilmaz , Julien Corjon Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" qt5webengine fails to build due to changes introduced in python3.11: - [864/23192] ACTION //services/metrics/public/cpp:gen_ukm_builders(/ho me/vagrant/output_raspberrypi3_qt5we/build/qt5webengine-5.15.8/src/to olchain:target) ... re.error: global flags not at the start of the expression at position 1 https://docs.python.org/3.11/library/re.html (?aiLmsux) Changed in version 3.11: This construction can only be used at the start of the expression. - [3742/22323] ACTION //chrome/app:chromium_strings_grit(/home/vagrant/ output_raspberrypi3_qt5we/build/qt5webengine-5.15.8/src/toolchain:tar get) ... ValueError: invalid mode: 'rU' open(), io.open(), codecs.open() and fileinput.FileInput no longer accept 'U' (“universal newline”) in the file mode. In Python 3, “universal newline” mode is used by default whenever a file is opened in text mode, and the 'U' flag has been deprecated since Python 3.3. The newline parameter to these functions controls how universal newlines work. (Contributed by Victor Stinner in bpo-37330.) Signed-off-by: Kadir Yilmaz --- ...x-build-tools-to-run-with-python3.11.patch | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch diff --git a/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch b/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch new file mode 100644 index 0000000000..44c8337f80 --- /dev/null +++ b/package/qt5/qt5webengine-chromium/0003-Fix-build-tools-to-run-with-python3.11.patch @@ -0,0 +1,72 @@ +From 82c9b1d3f4383cd8059690bd34c9d7fa86398b78 Mon Sep 17 00:00:00 2001 +From: Kadir Yilmaz +Date: Sat, 21 Oct 2023 22:45:03 +0200 +Subject: [PATCH] Fix build tools to run with python3.11 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Upstream: N/A buildroot uses python3.11 which apparently is not yet +supported by upstream + +- re error: global flags not at the start + + https://docs.python.org/3/library/re.html#re-syntax + (?aiLmsux) + .... + Changed in version 3.11: This construction can only be used at the + start of the expression + +- ValueError: invalid mode: 'rU' + + open(), io.open(), codecs.open() and fileinput.FileInput no longer + accept 'U' (“universal newline”) in the file mode. In Python 3, + “universal newline” mode is used by default whenever a file is + opened in text mode, and the 'U' flag has been deprecated since + Python 3.3. The newline parameter to these functions controls how + universal newlines work. (Contributed by Victor Stinner in bpo-37330.) + +Signed-off-by: Kadir Yilmaz +--- + chromium/tools/grit/grit/util.py | 2 +- + chromium/tools/metrics/ukm/ukm_model.py | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/chromium/tools/grit/grit/util.py b/chromium/tools/grit/grit/util.py +index 528d766ad6b..6e8cdb0ebfa 100644 +--- a/chromium/tools/grit/grit/util.py ++++ b/chromium/tools/grit/grit/util.py +@@ -211,7 +211,7 @@ def ReadFile(filename, encoding): + mode = 'rb' + encoding = None + else: +- mode = 'rU' ++ mode = 'r' + + with io.open(abs(filename), mode, encoding=encoding) as f: + return f.read() +diff --git a/chromium/tools/metrics/ukm/ukm_model.py b/chromium/tools/metrics/ukm/ukm_model.py +index ec24dd57360..57decab3ccc 100644 +--- a/chromium/tools/metrics/ukm/ukm_model.py ++++ b/chromium/tools/metrics/ukm/ukm_model.py +@@ -42,7 +42,7 @@ _INDEX_TYPE = models.ObjectNodeType( + _STATISTICS_TYPE = models.ObjectNodeType( + 'statistics', + attributes=[ +- ('export', str, r'^(?i)(|true|false)$'), ++ ('export', str, r'(?i)^(|true|false)$'), + ], + children=[ + models.ChildType(_QUANTILES_TYPE.tag, _QUANTILES_TYPE, multiple=False), +@@ -94,7 +94,7 @@ _EVENT_TYPE = models.ObjectNodeType( + 'event', + attributes=[ + ('name', str, r'^[A-Za-z0-9.]+$'), +- ('singular', str, r'^(?i)(|true|false)$'), ++ ('singular', str, r'(?i)^(|true|false)$'), + ], + alphabetization=[ + (_OBSOLETE_TYPE.tag, _KEEP_ORDER), +-- +2.25.1 +