From patchwork Thu Jan 15 08:29:09 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 78770 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 5AF1FD33A08 for ; Thu, 15 Jan 2026 08:29:21 +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.msgproc02-g2.31222.1768465759118358319 for ; Thu, 15 Jan 2026 00:29:19 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=eyJlyQ0d; spf=pass (domain: gmail.com, ip: 209.85.221.48, mailfrom: skandigraun@gmail.com) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-42fbc305914so374016f8f.0 for ; Thu, 15 Jan 2026 00:29:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768465757; x=1769070557; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=xZDUDvXPvhB1DnqY6it35KhtY48RsEmXT0/cs3MxuXU=; b=eyJlyQ0dBD0TD7LMjNx96IXnVF1tUgMAjQLLSe9PqG84a7BttFvO5D3+p5PlK+F6/X GPgFXtmmrqG91JiUDeo4SUwF6yhSNfFKyVDR6NPLt3suujtP7U4Q+lSg/L3qu8LkdZ3f sg8kIiWX7H2HyaRV+wfrgYsHh4xYo2ity1IpTjWvQ/qGzDRavg/oNZlAjzN9veqZtJzC Lik3R0Ah5HHfXPG1RMHb53/vxkbZJVFni/fsigDBabR+/law/vrDBOkYIFCFW8aihVMM Ts/Z1zNwin6El5itoywUp1pSOHQsKcLbQo9ujuSMdUD1zHjD/9Wqd5wmvGd4BmPb874V TpnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768465757; x=1769070557; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xZDUDvXPvhB1DnqY6it35KhtY48RsEmXT0/cs3MxuXU=; b=EuH92mOVUwr/XXlZNStIi8z+/duLyV4zYFZAI+9SlyXiwx4yUkfp9IEiF4SFd4Ss3f Lzacbjd9ldB7lszpJ7lEnGN99+yuXlAXVX2kfCzChxqKx+QDgTYYFIvZDGsu+f3XCU51 b2ofUGLBSl5mt+5zyFjtrOSCGuvo6VWpaxUmU08zLmU4XVhYSXx/HXeZrxaV+Zd2/7Fw r3zDbK1Q6MvYQrd+CEnq+Fw9wXDuxoOJisOgodb6MpxWol/H9LCtGwaOxX/a/Onj9x8Q f3ahZIlfE5T4m+UW1yoP8nGO2q1KmS2RrkMelRmE7EI2JEj+SNtdn7s48iZuix10cd+t MbMg== X-Gm-Message-State: AOJu0YxUeXyEW+tXXXYFS8FV8ZXwKxmE2nOQ5/r+8lxV5YtrMH1mLKvs 3kLpAglQBqYS1WD4OoNDrN4r51VRk0wdgpOp4jBFHekyjJuqfBgkH8rVipckCQ== X-Gm-Gg: AY/fxX6aF6GSB/CWlko2Wj5BD1L6Esx414GjX90gWWFhGnaUbP0RzSsm69gA/ok9wbn nuKRSwi9NMVogRpXpe3dfYCN8ze2w/5KWSToPezA2P1t3zJgjY60+9yk2aDESnYO7PswE2nar4v HG+P9BgHdAGBQod89mw/8n9H7TiE4s9+0PgChpDplAs9iB7FujORV4DFzDtMyE7W8ocmCzF4wkA 2B+/ZAxZ0l94w88yg0JEWJQOxgJARrL7sqfRCX2ObBXj4MMbtjlC7yvpTpvnlOdnTp7Hlf2MYIW 9J2Kd5ao4k0313aJzmLm6lBHejiWP1jIQaYNOCX4tdfp7HkbbcGEqWjuM5d1M+AsIUM6GsfGwlu JWvLcJOwuLtymQXF4YgsRiaW62De3//HPSIp03w3NhRugJLrOBiRQoAY0aM2DIXVq9c/B3GlapR jvyx1wT3nY X-Received: by 2002:a05:6000:2389:b0:430:f463:b6ac with SMTP id ffacd0b85a97d-4342c56caadmr6160842f8f.44.1768465757190; Thu, 15 Jan 2026 00:29:17 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-434af6d90aasm4310083f8f.29.2026.01.15.00.29.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 00:29:16 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-oe][kirkstone][PATCH 1/5] exiv2: add ptest support Date: Thu, 15 Jan 2026 09:29:09 +0100 Message-ID: <20260115082915.2357544-1-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Jan 2026 08:29:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/123493 The project has extensive runtime- and unittest suite - make use of it. It takes around 10 seconds to run both suites. Added two patches: One is needed to convert python unittest output into automake output. The other is required to be able to configure test data folder at compile time - otherwise the tests are looking for the test-data with absolute paths from the build machine. Signed-off-by: Gyorgy Sarvari Signed-off-by: Khem Raj (cherry picked from commit 35bc4860f18cd56a80ee29d492540acfcb620b59) Adapted to Kirkstone. (It also required an extra patch to be able to compile with the current googletest library) Signed-off-by: Gyorgy Sarvari --- ...1-Allow-test-data-path-configuration.patch | 30 ++++++++++++++++ .../0001-Fix-build-with-gtest-1.11.patch | 35 +++++++++++++++++++ meta-oe/recipes-support/exiv2/exiv2/run-ptest | 6 ++++ meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb | 33 +++++++++++++++-- 4 files changed, 102 insertions(+), 2 deletions(-) create mode 100644 meta-oe/recipes-support/exiv2/exiv2/0001-Allow-test-data-path-configuration.patch create mode 100644 meta-oe/recipes-support/exiv2/exiv2/0001-Fix-build-with-gtest-1.11.patch create mode 100644 meta-oe/recipes-support/exiv2/exiv2/run-ptest diff --git a/meta-oe/recipes-support/exiv2/exiv2/0001-Allow-test-data-path-configuration.patch b/meta-oe/recipes-support/exiv2/exiv2/0001-Allow-test-data-path-configuration.patch new file mode 100644 index 0000000000..9d6072a799 --- /dev/null +++ b/meta-oe/recipes-support/exiv2/exiv2/0001-Allow-test-data-path-configuration.patch @@ -0,0 +1,30 @@ +From 2483e51df6e02ad0ad5ae636767279fa230da44f Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Sun, 23 Nov 2025 11:52:24 +0100 +Subject: [PATCH] Allow test data path configuration + +The unittests expect to the executed in the source folder before/after build, +and they expect the test data to be in the source folder. However for ptests +these folders are not available. + +This patch allows the test data folders to be configuration during build time. + +Upstream-Status: Inappropriate [ptest-specific] +Signed-off-by: Gyorgy Sarvari +--- + unitTests/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/unitTests/CMakeLists.txt b/unitTests/CMakeLists.txt +index 51040c0e2..e2604d4a7 100644 +--- a/unitTests/CMakeLists.txt ++++ b/unitTests/CMakeLists.txt +@@ -40,7 +40,7 @@ add_executable(unit_tests + target_compile_definitions(unit_tests + PRIVATE + exiv2lib_STATIC +- TESTDATA_PATH="${PROJECT_SOURCE_DIR}/test/data" ++ TESTDATA_PATH="${TEST_FOLDER}/test/data" + ) + + if (exiv2lib_COMPILE_DEFINITIONS) diff --git a/meta-oe/recipes-support/exiv2/exiv2/0001-Fix-build-with-gtest-1.11.patch b/meta-oe/recipes-support/exiv2/exiv2/0001-Fix-build-with-gtest-1.11.patch new file mode 100644 index 0000000000..fd4c88f062 --- /dev/null +++ b/meta-oe/recipes-support/exiv2/exiv2/0001-Fix-build-with-gtest-1.11.patch @@ -0,0 +1,35 @@ +From 14d482f9e2353e195149fff196e65cb3a6b46e25 Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Fri, 18 Jun 2021 18:53:46 +0200 +Subject: [PATCH] Fix build with gtest 1.11 + +From: Antonio Rojas + +INSTANTIATE_TYPED_TEST_CASE_P requires a non-empty prefix now + +Upstream-Status: Backport [https://github.com/Exiv2/exiv2/commit/c069e36605f05e8e58bf964e5ecbde04efb90a20] +Signed-off-by: Gyorgy Sarvari +--- + unitTests/test_slice.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/unitTests/test_slice.cpp b/unitTests/test_slice.cpp +index bbc6785..ab51cda 100644 +--- a/unitTests/test_slice.cpp ++++ b/unitTests/test_slice.cpp +@@ -422,12 +422,12 @@ REGISTER_TYPED_TEST_CASE_P(slice, atAccess, iteratorAccess, constructionFailsFro + constMethodsPreserveConst); + + typedef ::testing::Types, std::vector, int*, const int*> test_types_t; +-INSTANTIATE_TYPED_TEST_CASE_P(, slice, test_types_t); ++INSTANTIATE_TYPED_TEST_CASE_P(slice, slice, test_types_t); + + REGISTER_TYPED_TEST_CASE_P(mutableSlice, iterators, at); + typedef ::testing::Types, int*> mut_test_types_t; +-INSTANTIATE_TYPED_TEST_CASE_P(, mutableSlice, mut_test_types_t); ++INSTANTIATE_TYPED_TEST_CASE_P(slice, mutableSlice, mut_test_types_t); + + REGISTER_TYPED_TEST_CASE_P(dataBufSlice, successfulConstruction, failedConstruction); + typedef ::testing::Types data_buf_types_t; +-INSTANTIATE_TYPED_TEST_CASE_P(, dataBufSlice, data_buf_types_t); ++INSTANTIATE_TYPED_TEST_CASE_P(slice, dataBufSlice, data_buf_types_t); diff --git a/meta-oe/recipes-support/exiv2/exiv2/run-ptest b/meta-oe/recipes-support/exiv2/exiv2/run-ptest new file mode 100644 index 0000000000..d7ed07d7c9 --- /dev/null +++ b/meta-oe/recipes-support/exiv2/exiv2/run-ptest @@ -0,0 +1,6 @@ +#!/bin/sh +cd tests +python3 ./runner.py -v 2>&1 | sed -e '/\.\.\. ok/ s/^/PASS: /g' -e '/\.\.\. [ERROR|FAIL]/ s/^/FAIL: /g' -e '/\.\.\. skipped/ s/^/SKIP: /g' -e 's/ \.\.\. ok//g' -e 's/ \.\.\. ERROR//g' -e 's/ \.\.\. FAIL//g' -e 's/ \.\.\. skipped//g' + +cd .. +./build/bin/unit_tests --gtest_print_time=0 | sed -E '/^\[ RUN/d ; s/\[ OK \]/PASS: / ; s/\[ DISABLED \]/SKIP: / ; s/\[ FAILED \]/FAIL: /' diff --git a/meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb b/meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb index 1c1c05dfaa..0b70c3b235 100644 --- a/meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb +++ b/meta-oe/recipes-support/exiv2/exiv2_0.27.3.bb @@ -2,10 +2,13 @@ SUMMARY = "Exif, Iptc and XMP metadata manipulation library and tools" LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=625f055f41728f84a8d7938acc35bdc2" -DEPENDS = "zlib expat" +DEPENDS = "zlib expat ${@bb.utils.contains('PTEST_ENABLED', '1', 'googletest', '', d)}" SRC_URI = "https://github.com/Exiv2/${BPN}/releases/download/v${PV}/${BP}-Source.tar.gz \ + file://run-ptest \ + file://0001-Allow-test-data-path-configuration.patch \ file://0001-Use-compiler-fcf-protection-only-if-compiler-arch-su.patch \ + file://0001-Fix-build-with-gtest-1.11.patch \ file://CVE-2021-29457.patch \ file://CVE-2021-29458.patch \ file://CVE-2021-29463.patch \ @@ -26,8 +29,34 @@ SRC_URI = "https://github.com/Exiv2/${BPN}/releases/download/v${PV}/${BP}-Source SRC_URI[sha256sum] = "a79f5613812aa21755d578a297874fb59a85101e793edc64ec2c6bd994e3e778" # Once patch is obsolete (project should be aware due to PRs), dos2unix can be removed either -inherit dos2unix +inherit dos2unix ptest S = "${WORKDIR}/${BPN}-${PV}-Source" inherit cmake gettext + +RDEPENDS:${PN}-ptest += " \ + python3-html \ + python3-lxml \ + python3-multiprocessing \ + python3-shell \ + python3-unittest" + +EXTRA_OECMAKE = "\ + ${@bb.utils.contains('PTEST_ENABLED', \ + '1', \ + '-DEXIV2_BUILD_SAMPLES=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DTEST_FOLDER=${PTEST_PATH}', \ + '', \ + d)} \ +" + +do_install_ptest(){ + cp -r ${S}/tests ${D}${PTEST_PATH}/ + cp -r ${S}/test ${D}${PTEST_PATH}/ + + install -d ${D}${PTEST_PATH}/build/bin + install ${B}/bin/* ${D}${PTEST_PATH}/build/bin + + install -d ${D}${PTEST_PATH}/src + install ${S}/src/canonmn_int.cpp ${D}${PTEST_PATH}/src +} From patchwork Thu Jan 15 08:29:10 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 78768 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 5A1A3D33A07 for ; Thu, 15 Jan 2026 08:29:21 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.msgproc02-g2.31224.1768465759834192662 for ; Thu, 15 Jan 2026 00:29:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=IvY2fPel; spf=pass (domain: gmail.com, ip: 209.85.128.50, mailfrom: skandigraun@gmail.com) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-47d59da3d81so6946645e9.0 for ; Thu, 15 Jan 2026 00:29:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768465758; x=1769070558; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FHss6UzGuo6QWJYYtXAMVuoDaNho7aHoGpozh4VjrIo=; b=IvY2fPel1/2gccxAXhCDXJ5qmhlQoJ8pQMl4qiyURmuFfhSWT8b8MDsDjgEDhDjyOY /EqSwwnM1/k0w7hob7cmp02u1gv9g3IxyAs4Yvk/bOt+yPEFXhiYkgooztg1PCZIxt/i qno0h/UXUzpNKknbN5yLIs+nYDA3D1irURg2ppP/YquOyFKgsNapHwssk+n+I2qJ2AZQ jjyR2bQmgf2NprWOjdlub7ux6/8jfHouwyV4taTKrssV7iGP2Y+Qb71YiVBC5B/0HV3X rpxCvGszFU+Wm6zYlRq47pR1wpeOg+PfduK32SyfY9omWioDHz3RMohBCYUnmQrNJe4p 189w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768465758; x=1769070558; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=FHss6UzGuo6QWJYYtXAMVuoDaNho7aHoGpozh4VjrIo=; b=EhWyWwKNgQS11EZ3WEr/gWzTkDaJwnxznpiSZ1z0zjJ9trzJbzQVYVOMEN8IzRe87v mMKgjuL2s5zT32YmSGxkOO7fAlvsFvIap+vGpK3TCuaTfZQa4CIP0SdHt5Ex7osvhnOS 46o7U3XG5Ls7XGfhE+I7iZaWry54CYABbWw1GI3Ntedf0bBHjHdZ/MpdUn+5WR2PyTfW C9s8+vk+V32mgrtyM4hAAECacQoCKNbRB0wLGm5y6fTSeHKauYM6w03SZHXLuYIJocK4 7WPZUJBMAXq8eRvUHLmBDEoxrVEfxQGwrx+7gDB8413hMD2qmXh1+/MudpcfyEt1j+p6 XkrA== X-Gm-Message-State: AOJu0Yw+ckfby17cpFDjJtfBl8boFbaSRN7JCdwoC3JjAySrdlX0Pn2Q 6D/6aux5sCv63Z3Pv85IBGa4WxNh0HzssNusAvOlP5p+0za1FpHZiyEtksu0Hg== X-Gm-Gg: AY/fxX7F1/LPgkXsY4IQO586/b88xVCX0nD0lp3dfnp/RcZzq38VW3OqUFAo00+4vO8 7qnzXgEsn1dOcWMpgLNLcoCTojpSNCFdzxVtOS/9jmNMnLzOHXP8lbG9I/WXNy+5xBK/yFFcFoM +9SQ0IZYbGukT1MSxO7Drtcft1isphmRNsvh1cLgsOYZFsdgpI0kZJ6/rZs3C8c4DKKFJ6oAeHr /kl+o9UL14sC4fcak1loiyH/1zw1Ef57Dy1huKlvKPokbIT++z7GsupQHq/tQhlCwwalciiUkbR S0qm/mjmlB3wlF6OogllflC6adNpqS2d2Mz3az5Hlc9CNqZRCJjB7lwxBJbBNs9Lea3EicJdL48 LKk0uHtvgIYNrSaHTWT76oVAOQaIwO4J/8ELMQpYu6/u184Z1JEcXdP0zn/xeo6XlK9Ih2/lM1p dyz6EeHF8W X-Received: by 2002:a05:6000:2082:b0:432:dcb1:68bc with SMTP id ffacd0b85a97d-434df0ed27fmr2494346f8f.23.1768465757974; Thu, 15 Jan 2026 00:29:17 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-434af6d90aasm4310083f8f.29.2026.01.15.00.29.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 00:29:17 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-python][kirkstone][PATCH 2/5] python3-django: handle non-existing import from CVE patch Date: Thu, 15 Jan 2026 09:29:10 +0100 Message-ID: <20260115082915.2357544-2-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115082915.2357544-1-skandigraun@gmail.com> References: <20260115082915.2357544-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Jan 2026 08:29:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/123494 This change is for python3-django_2.2.28. During backporting a patch for CVE-2024-56374, an import got into the patch for v2.2.28 that does not exist yet in that version. This patch handles this import with a fallback to prevent throwing and ImportError. Signed-off-by: Gyorgy Sarvari --- .../python3-django/0001-fix-ipv6-test.patch | 34 +++++++++++++++++++ .../python/python3-django_2.2.28.bb | 3 +- 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch diff --git a/meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch b/meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch new file mode 100644 index 0000000000..57f2a073cc --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-fix-ipv6-test.patch @@ -0,0 +1,34 @@ +From b56516c12f05cf56e65cc960f865d5ebdae733e2 Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Wed, 14 Jan 2026 11:05:36 +0100 +Subject: [PATCH] fix ipv6 test + +During backporting a patch for CVE-2024-56374, an import got into +the patch for v2.2.28 that does not exist yet in that version. + +This patch handles this import with a fallback to prevent throwing +and ImportError. + +Upstream-Status: Inappropriate [Backport specific] +Signed-off-by: Gyorgy Sarvari +--- + tests/utils_tests/test_ipv6.py | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/tests/utils_tests/test_ipv6.py b/tests/utils_tests/test_ipv6.py +index 1ac6763..3b21948 100644 +--- a/tests/utils_tests/test_ipv6.py ++++ b/tests/utils_tests/test_ipv6.py +@@ -8,8 +8,10 @@ from django.utils.ipv6 import ( + clean_ipv6_address, + is_valid_ipv6_address, + ) +-from django.utils.version import PY310 +- ++try: ++ from django.utils.version import PY310 ++except ImportError: ++ PY310 = None + + class TestUtilsIPv6(SimpleTestCase): + diff --git a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb index 3b5491cd5e..3dd64a5507 100644 --- a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb +++ b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb @@ -36,7 +36,8 @@ SRC_URI += "file://CVE-2023-31047.patch \ file://Fix-missing-JSONField-in-django.db.mo.patch \ file://0001-Fixed-35172-Fixed-intcomma-for-string-floats.patch \ file://0001-implement-group-method-for-FakeMatch.patch \ - " + file://0001-fix-ipv6-test.patch \ + " SRC_URI[sha256sum] = "0200b657afbf1bc08003845ddda053c7641b9b24951e52acd51f6abda33a7413" From patchwork Thu Jan 15 08:29:11 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 78769 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 5C660D33A02 for ; Thu, 15 Jan 2026 08:29:21 +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.msgproc02-g2.31225.1768465760350602610 for ; Thu, 15 Jan 2026 00:29:20 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=iPYX609B; spf=pass (domain: gmail.com, ip: 209.85.128.47, mailfrom: skandigraun@gmail.com) Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-47d493a9b96so3606935e9.1 for ; Thu, 15 Jan 2026 00:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768465759; x=1769070559; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bT2CUh+WeYg/HizhxPLNhQnOTr97WwLRp76vi/xrwhQ=; b=iPYX609BMTQ/UxSi87ZRWcknS5NH/hdwqJ0wcHxKgt/Wwcd4EHa6lFYo76u222aKtq i/IKNlAxAnA2hLPoHagwROeynyjlM0weJ49G/tNKFaDakJJ5oyZH/mjcZYvyv573TvCV pIhRcmkqPOXgxe7/FoLoof4crKNlvZg/w6tBqKKlrhbmdLs0+jnyEgBC8zD8pIY4RsCX 3rOMJzvY0CBYKjLsijzDOJELUPkg6eJlIzHRH5vvo0MZFzwhEkRMj/2xUdvtsEhWGFSK VC3Y72ahxRJt7uAkISgkLxzyabOYyCablFZSHpyc3b+GRUYPqyItS9iYG+aspH8xWMT0 SQZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768465759; x=1769070559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=bT2CUh+WeYg/HizhxPLNhQnOTr97WwLRp76vi/xrwhQ=; b=nGK0wlL36/6YF0NWk2pb3lnYpOuLN4O/aRYAqQiY16Us1BRqY0WKBo2y2/p0NvjCsg chJD8QEFswzv83B4Q9egZiGVbjsFwt2VGpagNbVjhXHDRWGTTAoidye1dvd8Y39WoHjC +tZlmktiIrjaESwbMii2LBGctnwRW1AcGnlzxp18bgVjHefo2DRds8QTr7tiDqCwB14r lDUZfczLT8jPAJb7w6IsDUzjBpq94wnyx7meV2B5eCNl6iweY6rLJzAF28CJgDoq5x5v DW3+QNeRoDhDjqk4rVuuqXJHv0riifcWhq2yQs5/8huJaicgDup0IFZHyFhY9yXUbu+6 Eh2Q== X-Gm-Message-State: AOJu0Ywo8pl3t9V0gX4zVf+Kcb3Lh7cqxtCoS/Z/WIqCfTvK65MU3l8M G5xBKFqn4O8tJdX1BOpwawgH3qPgHeZX/f86aZBUJU5Ym69sQok6i4nAB8Eo7A== X-Gm-Gg: AY/fxX5GMJ7bvsYreq9Zc83MguKytF7Z2oVocbDDxWW1sAwpw30j6vO7pinjHF6pce1 +9HxGnJsiDkfqEUMIoZ0v0wWxrKBcaxWBK2Njy2zVxKC2kSVWySPs72TaryEAKFFvN3QjWirLMQ ze6lzkC9uoFTvTfYj3q0z2u3Mosr4Wgj5/RL55DB5YmbX+dZX7QU9GX36w7PsKKOhRYtrd9uZfm GS6rCAGEna7yXJSAsQ8PWe0oIYnWvtNrAnqLJavKNrAPCoQ6vM8jkiVxqbaQxPPNlMewmPz4FqS ghq7YEZceTa7bPlrV5OgQvlHqMhRm+wI9G4IFOE1BkW61X8F5sM3wQEwaULa85ijJE/WVUV4Ljx jgtqgWar7QpSYW3olZKgxIPQii9A7xJfXzGb9YZLeYPdLbu9QhxfDIJnPgLMbIXIPSaFg8SLXpk cfwYXGLnmduQ+w3ABqeSo= X-Received: by 2002:a05:600c:c0ca:b0:47e:e575:a33e with SMTP id 5b1f17b1804b1-47ee575a747mr34803255e9.33.1768465758687; Thu, 15 Jan 2026 00:29:18 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-434af6d90aasm4310083f8f.29.2026.01.15.00.29.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 00:29:18 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-python][kirkstone][PATCH 3/5] python3-django: fix hostname length validation in URLvalidator Date: Thu, 15 Jan 2026 09:29:11 +0100 Message-ID: <20260115082915.2357544-3-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115082915.2357544-1-skandigraun@gmail.com> References: <20260115082915.2357544-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Jan 2026 08:29:21 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/123495 This patch is for python3-django_2.2.28 The hostname's length has been incorrectly validated, it was checking an incorrect section of the URL, this made a testcase fail. This backported patch mitigates this issue. Signed-off-by: Gyorgy Sarvari --- ...d-URLValidator-hostname-length-valid.patch | 30 +++++++++++++++++++ .../python/python3-django_2.2.28.bb | 1 + 2 files changed, 31 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-Fixed-32298-Fixed-URLValidator-hostname-length-valid.patch diff --git a/meta-python/recipes-devtools/python/python3-django/0001-Fixed-32298-Fixed-URLValidator-hostname-length-valid.patch b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-32298-Fixed-URLValidator-hostname-length-valid.patch new file mode 100644 index 0000000000..8cab678a36 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-32298-Fixed-URLValidator-hostname-length-valid.patch @@ -0,0 +1,30 @@ +From ee35cb8dd2f903ddde115ca10186e162ffd8dc62 Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Sat, 26 Dec 2020 20:52:44 +0530 +Subject: [PATCH] Fixed #32298 -- Fixed URLValidator hostname length + validation. + +From: Akshat1Nar + +URLValidator now validates the maximum length of a hostname without +the userinfo and port. + +Upstream-Status: Backport [https://github.com/django/django/commit/b41d38ae26b1da9519a6cd765bc2f2ce7d355007] +Signed-off-by: Gyorgy Sarvari +--- + django/core/validators.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/django/core/validators.py b/django/core/validators.py +index 2dbd3bf..94cc3bf 100644 +--- a/django/core/validators.py ++++ b/django/core/validators.py +@@ -151,7 +151,7 @@ class URLValidator(RegexValidator): + # section 3.1. It's defined to be 255 bytes or less, but this includes + # one byte for the length of the name and one byte for the trailing dot + # that's used to indicate absolute names in DNS. +- if len(urlsplit(value).netloc) > 253: ++ if len(urlsplit(value).hostname) > 253: + raise ValidationError(self.message, code=self.code) + + diff --git a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb index 3dd64a5507..bf7e182aba 100644 --- a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb +++ b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb @@ -37,6 +37,7 @@ SRC_URI += "file://CVE-2023-31047.patch \ file://0001-Fixed-35172-Fixed-intcomma-for-string-floats.patch \ file://0001-implement-group-method-for-FakeMatch.patch \ file://0001-fix-ipv6-test.patch \ + file://0001-Fixed-32298-Fixed-URLValidator-hostname-length-valid.patch \ " SRC_URI[sha256sum] = "0200b657afbf1bc08003845ddda053c7641b9b24951e52acd51f6abda33a7413" From patchwork Thu Jan 15 08:29:12 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 78771 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 3C746D33A07 for ; Thu, 15 Jan 2026 08:29:31 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.msgproc01-g2.31198.1768465761073337537 for ; Thu, 15 Jan 2026 00:29:21 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=T1LOBDyP; spf=pass (domain: gmail.com, ip: 209.85.128.43, mailfrom: skandigraun@gmail.com) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-47ee4539adfso5641855e9.3 for ; Thu, 15 Jan 2026 00:29:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768465759; x=1769070559; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=iqnoN430bXi8WmvGm0hV9jz1+BGAL5ffoIO/ycLu+lo=; b=T1LOBDyPGclJXzMU0K7XQCgjBKpnAilpBSqHj1MNByZ676pA7ySAdbBZFEpvo5J+wT n5NzaH/AJ6UZxke5DlzWVmvrCyB7sCfYlO2FNexAaZxu9URS4gTYZzQO3jkDK1zn9os4 WWUWMGlmfyQHNebP/z9zPpNLYWFA7t5Gp7DUBw1MXxAqz1VWo0krRtsF7Ds7ku8O1nTm B6d6nw3VunlJsgeLZriuu5Z07nNIRk61hzhCZnHUMoiak7fgiXyLJgjO0meoUC2t0Mg5 w/7AaQa8K92A3RA9lc06VQe0QB+7h8jwLJJtMz8MMw2q+BfnnlGx2bg5LXXb6ECyBnkU Z69w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768465759; x=1769070559; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=iqnoN430bXi8WmvGm0hV9jz1+BGAL5ffoIO/ycLu+lo=; b=k7nH5IC3s9rJS545U7ZmgxsTCaceSbkSmpTeKm+M0zJgI/tajQcbATeDOWVDWJTVKO pGglf/DX2mTRrSScgkaV7dyy9IMWHG5onUa1P1ouER5Xh6sX38qZHKMeKUz1Gsg2jRku MySZCizeDARi5X64vqRtGFeeqgEdFjORsRHzeQ4II4fVv3z7bJKau7DdZ08f3SuGuL9Q /HEIpzKUM96b/wy6A+m1eJy9Zujaj0FBjcmwWRIHbNgtJNZNhdao1TQuXTW2F+qHn5nU VoLxLyG7/G+B4zrwbCTyRglzroe5XlgTBslsN9AGzwiZb42CFdRR+iSUZNmECS2Q/xFa 3umg== X-Gm-Message-State: AOJu0YxsiBvkIJFvt7nZXAjt5egA56dhhahQY1EUZvNaThxRrpXIUP80 y8eH+WixBNbr7V51N7tgLDYssiD/dqd77RLDZphCI9XbS44mmrt1rRn6sWjDlQ== X-Gm-Gg: AY/fxX6Nj2wCmOtgP2x41Yp4kl1tvmh6sQ2wjnNnXJ+GzEWDZ/JpoUDjShv5igxW4+E vBCv5CI8oh/e48Hkv+5ULk3p2Nr53MbgU5vzQWRo4vc0Jf3A42TDECmbYo+yS0yp6HogtXqqCIP KIJLBFwlrjHm4o1EXdlhRIlfTP71NkGAL3/FWqOCMsuUtjyGT4Vg+UuAQYrKsp6Gt+qUtWlbSnR Hd27sgfj+QS6xpFS1zebnzkQyulHv6Fbk5J/jvm47PeDJh6R4emcCTaOuaC4RXjKdhveHua+mJY SDne4Jit/+XZyIHuMZ99+dji9s7yjeQLoOy6kxtLOZdmya16Ed6sUtznDZNd2Yls5daTrLByxXf /0LOZMnrWwCi04XH5AZ+KwCaJvEY0Pr12o+OVzPgn3fK98NYhiVtndYpa6Dz6WYli8IqFBAOyrz U7TYNYt0Tv X-Received: by 2002:adf:8b83:0:b0:431:855:c79a with SMTP id ffacd0b85a97d-4342c503310mr5109291f8f.27.1768465759354; Thu, 15 Jan 2026 00:29:19 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-434af6d90aasm4310083f8f.29.2026.01.15.00.29.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 00:29:18 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-python][kirkstone][PATCH 4/5] python3-django: fix ipv6 validation Date: Thu, 15 Jan 2026 09:29:12 +0100 Message-ID: <20260115082915.2357544-4-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115082915.2357544-1-skandigraun@gmail.com> References: <20260115082915.2357544-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Jan 2026 08:29:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/123496 This patch is only for python3-django_2.2.28. The URL validator didn't detect invalid IPv6 addresses, treating them as correct ones, making a testcase fail. (Also, according to the comment, it could also crash in some cases, though I haven't encountered that) This backported patch mitigates this behavior. Signed-off-by: Gyorgy Sarvari --- ...d-URLValidator-crash-in-some-edge-ca.patch | 57 +++++++++++++++++++ .../python/python3-django_2.2.28.bb | 1 + 2 files changed, 58 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-Fixed-33367-Fixed-URLValidator-crash-in-some-edge-ca.patch diff --git a/meta-python/recipes-devtools/python/python3-django/0001-Fixed-33367-Fixed-URLValidator-crash-in-some-edge-ca.patch b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-33367-Fixed-URLValidator-crash-in-some-edge-ca.patch new file mode 100644 index 0000000000..549e761ec3 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-33367-Fixed-URLValidator-crash-in-some-edge-ca.patch @@ -0,0 +1,57 @@ +From 065b10e2757af671f3e64f0c8714e6f2e4eca727 Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Wed, 15 Dec 2021 11:55:19 -0300 +Subject: [PATCH] Fixed #33367 -- Fixed URLValidator crash in some edge cases. + +From: mendespedro + +Upstream-Status: Backport [https://github.com/django/django/commit/e8b4feddc34ffe5759ec21da8fa027e86e653f1c] +Signed-off-by: Gyorgy Sarvari +--- + django/core/validators.py | 14 ++++++++------ + 1 file changed, 8 insertions(+), 6 deletions(-) + +diff --git a/django/core/validators.py b/django/core/validators.py +index 94cc3bf..03cd9b8 100644 +--- a/django/core/validators.py ++++ b/django/core/validators.py +@@ -120,15 +120,17 @@ class URLValidator(RegexValidator): + raise ValidationError(self.message, code=self.code) + + # Then check full URL ++ ++ try: ++ splitted_url = urlsplit(value) ++ except ValueError: ++ raise ValidationError(self.message, code=self.code, params={'value': value}) + try: + super().__call__(value) + except ValidationError as e: + # Trivial case failed. Try for possible IDN domain + if value: +- try: +- scheme, netloc, path, query, fragment = urlsplit(value) +- except ValueError: # for example, "Invalid IPv6 URL" +- raise ValidationError(self.message, code=self.code) ++ scheme, netloc, path, query, fragment = splitted_url + try: + netloc = netloc.encode('idna').decode('ascii') # IDN -> ACE + except UnicodeError: # invalid domain part +@@ -139,7 +141,7 @@ class URLValidator(RegexValidator): + raise + else: + # Now verify IPv6 in the netloc part +- host_match = re.search(r'^\[(.+)\](?::\d{2,5})?$', urlsplit(value).netloc) ++ host_match = re.search(r'^\[(.+)\](?::\d{2,5})?$', splitted_url.netloc) + if host_match: + potential_ip = host_match.groups()[0] + try: +@@ -151,7 +153,7 @@ class URLValidator(RegexValidator): + # section 3.1. It's defined to be 255 bytes or less, but this includes + # one byte for the length of the name and one byte for the trailing dot + # that's used to indicate absolute names in DNS. +- if len(urlsplit(value).hostname) > 253: ++ if splitted_url.hostname is None or len(splitted_url.hostname) > 253: + raise ValidationError(self.message, code=self.code) + + diff --git a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb index bf7e182aba..0f6f8fc4d0 100644 --- a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb +++ b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb @@ -38,6 +38,7 @@ SRC_URI += "file://CVE-2023-31047.patch \ file://0001-implement-group-method-for-FakeMatch.patch \ file://0001-fix-ipv6-test.patch \ file://0001-Fixed-32298-Fixed-URLValidator-hostname-length-valid.patch \ + file://0001-Fixed-33367-Fixed-URLValidator-crash-in-some-edge-ca.patch \ " SRC_URI[sha256sum] = "0200b657afbf1bc08003845ddda053c7641b9b24951e52acd51f6abda33a7413" From patchwork Thu Jan 15 08:29:13 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Gyorgy Sarvari X-Patchwork-Id: 78772 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 42EE9D33A09 for ; Thu, 15 Jan 2026 08:29:31 +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.msgproc01-g2.31199.1768465761957947650 for ; Thu, 15 Jan 2026 00:29:22 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20230601 header.b=JgSeeGsf; spf=pass (domain: gmail.com, ip: 209.85.221.52, mailfrom: skandigraun@gmail.com) Received: by mail-wr1-f52.google.com with SMTP id ffacd0b85a97d-4327555464cso314668f8f.1 for ; Thu, 15 Jan 2026 00:29:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768465760; x=1769070560; darn=lists.openembedded.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=HLnidfzDQQENQVOtccrD8CC7KKoprRKmu9qbXvFhZik=; b=JgSeeGsfOtGu/+yjr7VO4CmSk+fxf46RYTwu107dlE1sjXkOvjK3I4PsaILaZJnh41 GRLHFsSbEN1Y17TZHdkzZvZy0/CKV6QSvYvH3OaPFUCPxzBnRIQyFjEvHQB0tNrBvoi3 +2kZXIUwgSE8UkHYDd9mKDqwIIMBpjg3JItHjPtwPWBDbDjQfJC8ZjT0izwd+s4YXuov Ymbe/iFqwY83jKME5LAGLWJpqYHRedoY/c5Yz3XIvhKMhH2SnIaocZiE/der9FwxAuL2 MNVkx6IUcSiwGbL/FGfqEqFIs5zNKwe71VDtqUZDW+5x1UcRSLzNXlL8Mt1YqPzJnfzY fubg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768465760; x=1769070560; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=HLnidfzDQQENQVOtccrD8CC7KKoprRKmu9qbXvFhZik=; b=QxYJogZHGJ55swVHpayt1GJBEARI9vEF3g4FrUrb1n4dagt2hCqyjOC9qJ2CBNbGlu NTTYucXTptzvXQ1IlKJC0evoU5qpEhv0aUvRVEe9Jlk/xGG+WPWLPdXrDqpDQ6NR4wi9 x2qOJXs0arg19HM71b6m4d5Qh3TFwo8vt53RTeooGMO6UjIe4AfUcYymEoMqePhBdDSB wKtEzO2frIAQtWJr6boIIq46f2yKew769/wx4Ppx6GnnSwZeZU21GqAIPCWSKWgOmdpu vz9tE9cO9WA/H3KgdHpH9/LdG0uXBHtel/kbTSFMhOIkYO0kb1lMFVbgKnN1vmABfa21 JiQA== X-Gm-Message-State: AOJu0YxGIz0IT8K2pHXRiANAKXO0ieXf1vqtB9CJi4jKDknJJFexSF6m QDdS95YkkYZuNUOKDC+yw9ii6xn1GoQvyw8vcbISKafNX0WI8NH8mOsLsdMyMw== X-Gm-Gg: AY/fxX6TbzIdLX+JdIM9BtWhXJZ0gsW9zjTXPdlKPRmd00K9i2ZwtUyD+f/UzslSXKa U/leAsVlIQwyVskXJIjjgECTlUMLMbymzUU9p858FprI5sfT+Fcttj89n7PMPIw2BNchwJ+72eM ww6lXLJmLo1jS+RQeWn7o/CPO3jbQmPXfbAJiHw2bDJdXo838/k5y86VNSCFDqLu+iuuf2ChUTM vR38HgZ6RYFoceMs/k1aEbvA8vEnfodGxd1sHczHBIvxUZyqetOeRtDEuDfvX1B7Ny+uywbGbmL 9HhtrIok/u1hdG0+hJtMdXoOksTEbrxev7nJjCJbHR6kdSo76P13Jov2+RJ1u5FL3qV9V2dq2Rp wgFF7rUIynN7IrdWk3f+N0RFFqYkaivu1ZiHDE0oFPmomDyojd2fcrtdxRE4tda8Nku+KngiafR VB2qpFarFf X-Received: by 2002:a05:6000:2284:b0:42b:3b55:8929 with SMTP id ffacd0b85a97d-4342c4f492cmr6419934f8f.19.1768465760060; Thu, 15 Jan 2026 00:29:20 -0800 (PST) Received: from desktop ([51.154.145.205]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-434af6d90aasm4310083f8f.29.2026.01.15.00.29.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Jan 2026 00:29:19 -0800 (PST) From: Gyorgy Sarvari To: openembedded-devel@lists.openembedded.org Subject: [meta-python][kirkstone][PATCH 5/5] python3-django: fix tests Date: Thu, 15 Jan 2026 09:29:13 +0100 Message-ID: <20260115082915.2357544-5-skandigraun@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260115082915.2357544-1-skandigraun@gmail.com> References: <20260115082915.2357544-1-skandigraun@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from 45-33-107-173.ip.linodeusercontent.com [45.33.107.173] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 15 Jan 2026 08:29:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-devel/message/123497 These patches are for python3-django_2.2.28 These patches only touch the tests folder, which is normally not installed. Most of these changes are backported patches, that adapt tests to modern(er) Python environment than they were written for, and some other just fix a bug in the tests that were always present. 0001-Fix-tag_strip-tests.patch: The html parser's behavior in Python has changed since 3.9, making this testcase fail. This is a partial backport of the patch, which handles only the Python version that is shipped with oe-core (The original patch handles both old and new versions) 0001-Fixed-inspectdb.tests.InspectDBTestCase.test_custom_.patch: SQLite3's behavior has changed also since the tests were written, making some testcases fail. This backported patch fixes that. 0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch: this backported patch makes a test-verification conform to html5 standard. Previously the test failed. 0001-Made-RemoteTestResultTest.test_pickle_errors_detecti.patch: This backported patch once again adapts a test to an evolved library. tblib's behavior has changed in a way that the tests couldn't pickle the exceptions from the library, and the tests that verify exceptions were failing due to this. 0001-fix-quote-type-in-expected-error-message.patch: This is not a backported patch. Error messages are localized, and a test verifies an error message that contains a quote. The test expects double quotes, but the default locale used with the testimage is using single quotes. Since the test and the expected error message are correct otherwise, just changed this expected quote in the test. Signed-off-by: Gyorgy Sarvari --- .../0001-Fix-tag_strip-tests.patch | 37 ++++++++++++ ...tests.InspectDBTestCase.test_custom_.patch | 45 ++++++++++++++ ....tests.HTMLEqualTests.test_parsing_e.patch | 32 ++++++++++ ...esultTest.test_pickle_errors_detecti.patch | 59 +++++++++++++++++++ ...quote-type-in-expected-error-message.patch | 31 ++++++++++ .../python/python3-django_2.2.28.bb | 5 ++ 6 files changed, 209 insertions(+) create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-Fix-tag_strip-tests.patch create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-Fixed-inspectdb.tests.InspectDBTestCase.test_custom_.patch create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-Made-RemoteTestResultTest.test_pickle_errors_detecti.patch create mode 100644 meta-python/recipes-devtools/python/python3-django/0001-fix-quote-type-in-expected-error-message.patch diff --git a/meta-python/recipes-devtools/python/python3-django/0001-Fix-tag_strip-tests.patch b/meta-python/recipes-devtools/python/python3-django/0001-Fix-tag_strip-tests.patch new file mode 100644 index 0000000000..be5d11e0ba --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-Fix-tag_strip-tests.patch @@ -0,0 +1,37 @@ +From bd3ffbbacceef7fabd3135ca90eba1397e2b5901 Mon Sep 17 00:00:00 2001 +From: Your Name +Date: Tue, 13 Jan 2026 20:07:35 +0000 +Subject: [PATCH] Fix tag_strip tests + +Python's htmlparser behavior changed between python versions, and +the tests expect incorrect result due to this. + +This patch is a partial backport, to use only the results that are +valid for the OE Python version. + +Upstream-Status: Backport [https://github.com/django/django/commit/2980627502c84a9fd09272e1349dc574a2ff1fb1] +Signed-off-by: Gyorgy Sarvari +--- + tests/utils_tests/test_html.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/tests/utils_tests/test_html.py b/tests/utils_tests/test_html.py +index 86f5562..71757ad 100644 +--- a/tests/utils_tests/test_html.py ++++ b/tests/utils_tests/test_html.py +@@ -89,10 +89,10 @@ class TestUtilsHtml(SimpleTestCase): + ('&gotcha&#;<>', '&gotcha&#;<>'), + ('ript>test</script>', 'ript>test'), + ('&h', 'alert()h'), +- ('>'), + ('X<<<
br>br>br>X', 'XX'), + ("<" * 50 + "a>" * 50, ""), +- (">" + "" + "" + ""), + (" +Date: Thu, 9 Dec 2021 20:24:38 +0100 +Subject: [PATCH] Fixed inspectdb.tests.InspectDBTestCase.test_custom_fields() + on SQLite 3.37+. + +From: Mariusz Felisiak + +Use FlexibleFieldLookupDict which is case-insensitive mapping because +SQLite 3.37+ returns some data type names upper-cased e.g. TEXT. + +Upstream-Status: Backport [https://github.com/django/django/commit/974e3b8750fe96c16c9c0b115a72ee4a2171df34] +Signed-off-by: Gyorgy Sarvari +--- + tests/inspectdb/tests.py | 11 +++++------ + 1 file changed, 5 insertions(+), 6 deletions(-) + +diff --git a/tests/inspectdb/tests.py b/tests/inspectdb/tests.py +index bb5e457..a2519cf 100644 +--- a/tests/inspectdb/tests.py ++++ b/tests/inspectdb/tests.py +@@ -256,18 +256,17 @@ class InspectDBTestCase(TestCase): + Introspection of columns with a custom field (#21090) + """ + out = StringIO() +- orig_data_types_reverse = connection.introspection.data_types_reverse +- try: +- connection.introspection.data_types_reverse = { ++ with mock.patch( ++ 'django.db.connection.introspection.data_types_reverse.base_data_types_reverse', ++ { + 'text': 'myfields.TextField', + 'bigint': 'BigIntegerField', +- } ++ }, ++ ): + call_command('inspectdb', 'inspectdb_columntypes', stdout=out) + output = out.getvalue() + self.assertIn("text_field = myfields.TextField()", output) + self.assertIn("big_int_field = models.BigIntegerField()", output) +- finally: +- connection.introspection.data_types_reverse = orig_data_types_reverse + + def test_introspection_errors(self): + """ diff --git a/meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch new file mode 100644 index 0000000000..a84a118bcb --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch @@ -0,0 +1,32 @@ +From 744927154e6748db08f5232de78ee0d4a8be61a5 Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Mon, 21 Jul 2025 15:23:32 -0300 +Subject: [PATCH] Fixed test_utils.tests.HTMLEqualTests.test_parsing_errors + following Python's HTMLParser fixed parsing. + +From: Natalia <124304+nessita@users.noreply.github.com> + +Further details about Python changes can be found in: +https://github.com/python/cpython/commit/0243f97cbadec8d985e63b1daec5d1cbc850cae3. + +Thank you Clifford Gama for the thorough review! + +Upstream-Status: Backport [https://github.com/django/django/commit/e4515dad7a6d953c0bd2414127ba36e1446ff41a] +Signed-off-by: Gyorgy Sarvari +--- + tests/test_utils/tests.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/test_utils/tests.py b/tests/test_utils/tests.py +index a1a113a..d1a1e35 100644 +--- a/tests/test_utils/tests.py ++++ b/tests/test_utils/tests.py +@@ -736,7 +736,7 @@ class HTMLEqualTests(SimpleTestCase): + "('Unexpected end tag `div` (Line 1, Column 6)', (1, 6))" + ) + with self.assertRaisesMessage(AssertionError, error_msg): +- self.assertHTMLEqual('< div>', '
') ++ self.assertHTMLEqual('< div>', '
') + with self.assertRaises(HTMLParseError): + parse_html('

') + diff --git a/meta-python/recipes-devtools/python/python3-django/0001-Made-RemoteTestResultTest.test_pickle_errors_detecti.patch b/meta-python/recipes-devtools/python/python3-django/0001-Made-RemoteTestResultTest.test_pickle_errors_detecti.patch new file mode 100644 index 0000000000..f515494254 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-Made-RemoteTestResultTest.test_pickle_errors_detecti.patch @@ -0,0 +1,59 @@ +From 80d06be0a5dc82d8cf8dd8105b6734c188743fae Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Tue, 21 Oct 2025 21:11:44 +0200 +Subject: [PATCH] Made RemoteTestResultTest.test_pickle_errors_detection() + compatible with tblib 3.2+. + +From: Mariusz Felisiak + +tblib 3.2+ makes exception subclasses with __init__() and the default +__reduce__() picklable. This broke the test for +RemoteTestResult._confirm_picklable(), which expects a specific +exception to fail unpickling. + +https://github.com/ionelmc/python-tblib/blob/master/CHANGELOG.rst#320-2025-10-21 + +This fix defines ExceptionThatFailsUnpickling.__reduce__() in a way +that pickle.dumps(obj) succeeds, but pickle.loads(pickle.dumps(obj)) +raises TypeError. + +Refs #27301. This preserves the intent of the regression test from +52188a5ca6bafea0a66f17baacb315d61c7b99cd without skipping it. + +Upstream-Status: Backport [https://github.com/django/django/commit/548209e620b3ca34396a360453f07c8dbb8aa6c7] +Signed-off-by: Gyorgy Sarvari +--- + tests/test_runner/test_parallel.py | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/tests/test_runner/test_parallel.py b/tests/test_runner/test_parallel.py +index c1a89bd..7c72216 100644 +--- a/tests/test_runner/test_parallel.py ++++ b/tests/test_runner/test_parallel.py +@@ -1,3 +1,4 @@ ++import pickle + import unittest + + from django.test import SimpleTestCase +@@ -18,6 +19,12 @@ class ExceptionThatFailsUnpickling(Exception): + def __init__(self, arg): + super().__init__() + ++ def __reduce__(self): ++ # tblib 3.2+ makes exception subclasses picklable by default. ++ # Return (cls, ()) so the constructor fails on unpickle, preserving ++ # the needed behavior for test_pickle_errors_detection. ++ return (self.__class__, ()) ++ + + class ParallelTestRunnerTest(SimpleTestCase): + """ +@@ -59,6 +66,8 @@ class RemoteTestResultTest(SimpleTestCase): + result = RemoteTestResult() + result._confirm_picklable(picklable_error) + ++ # The exception can be pickled but not unpickled. ++ pickle.dumps(not_unpicklable_error) + msg = '__init__() missing 1 required positional argument' + with self.assertRaisesMessage(TypeError, msg): + result._confirm_picklable(not_unpicklable_error) diff --git a/meta-python/recipes-devtools/python/python3-django/0001-fix-quote-type-in-expected-error-message.patch b/meta-python/recipes-devtools/python/python3-django/0001-fix-quote-type-in-expected-error-message.patch new file mode 100644 index 0000000000..617d63aa35 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-django/0001-fix-quote-type-in-expected-error-message.patch @@ -0,0 +1,31 @@ +From 5cae184e0d57dacae25439e533c4e1ef6f6c4cae Mon Sep 17 00:00:00 2001 +From: Gyorgy Sarvari +Date: Tue, 13 Jan 2026 23:31:06 +0100 +Subject: [PATCH] fix quote type in expected error message + +Instead of double quotes the error is returned with single quotes. +This is localization dependent, comes from a po file - some locales use +single quotes, other are translated with double quotes. The default +locale used with the OE ptest image uses single quotes - adapt the test +to this. + +Upstream-Status: Inappropriate [This is not a nice solution. Hardcoding single quotes is not better than the original] + +Signed-off-by: Gyorgy Sarvari +--- + tests/forms_tests/field_tests/test_filefield.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/forms_tests/field_tests/test_filefield.py b/tests/forms_tests/field_tests/test_filefield.py +index ba559ee..3880e11 100644 +--- a/tests/forms_tests/field_tests/test_filefield.py ++++ b/tests/forms_tests/field_tests/test_filefield.py +@@ -144,7 +144,7 @@ class MultipleFileFieldTest(SimpleTestCase): + evil_files[i:] + evil_files[:i] # Rotate by i. + for i in range(len(evil_files)) + ) +- msg = "File extension “sh” is not allowed. Allowed extensions are: " ++ msg = "File extension 'sh' is not allowed. Allowed extensions are: " + for rotated_evil_files in evil_rotations: + with self.assertRaisesMessage(ValidationError, msg): + f.clean(rotated_evil_files) diff --git a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb index 0f6f8fc4d0..dedb2498cb 100644 --- a/meta-python/recipes-devtools/python/python3-django_2.2.28.bb +++ b/meta-python/recipes-devtools/python/python3-django_2.2.28.bb @@ -39,6 +39,11 @@ SRC_URI += "file://CVE-2023-31047.patch \ file://0001-fix-ipv6-test.patch \ file://0001-Fixed-32298-Fixed-URLValidator-hostname-length-valid.patch \ file://0001-Fixed-33367-Fixed-URLValidator-crash-in-some-edge-ca.patch \ + file://0001-Fix-tag_strip-tests.patch \ + file://0001-Fixed-inspectdb.tests.InspectDBTestCase.test_custom_.patch \ + file://0001-Fixed-test_utils.tests.HTMLEqualTests.test_parsing_e.patch \ + file://0001-Made-RemoteTestResultTest.test_pickle_errors_detecti.patch \ + file://0001-fix-quote-type-in-expected-error-message.patch \ " SRC_URI[sha256sum] = "0200b657afbf1bc08003845ddda053c7641b9b24951e52acd51f6abda33a7413"