package/python-iptables: fix _find_library()
PATCH v2 1/17 package/python-iptables: fix _find_library()
While the commit [1] already fixed some runtime issue with uClibc toolchain, the same test TestPythonPy3Iptables fail with Glibc toolchain.
xtables_version = 12
if xtables_version:
_searchlib = "libxtables.so.%s" % (xtables_version,)
else:
_searchlib = "xtables"
_lib_xtables, xtables_version = find_library(_searchlib)
_lib_xtables and xtables_version are null with glibc
The implementation of find_library() rely on the custom _find_library() that try to use the IPTABLES_LIBDIR environment variable (that does not exist in the context of Buildroot).
Within the scope of buildroot we can determine what IPTABLES_LIBDIR should be at build time and replace the calls to os.environ.get('IPTABLES_LIBDIR', None) with the correct value.
[1] d341ec035067120b456f669a826e26eb594c0237
---
I don't know why TestPythonPy3Iptables pass succesfully with a uClibc toolchain but not with a glibc toolchain. The current python code searching for xtables, modules and libraries seems fragile...
--- package/python-iptables/python-iptables.mk | 1 + 1 file changed, 1 insertion(+)
package/python-iptables/python-iptables.mk +1 -0
@@ -15,6 +15,7 @@ define PYTHON_IPTABLES_SET_XTABLES_ENV_VARS XTABLES_VERSION=`awk '/XTABLES_VERSION_CODE/ {print $$NF}' $(STAGING_DIR)/usr/include/xtables-version.h`; \ sed -i "s%os.getenv(\"PYTHON_IPTABLES_XTABLES_VERSION\")%$$XTABLES_VERSION%" $(@D)/iptc/xtables.py sed -i "s%os.getenv(\"XTABLES_LIBDIR\")%\"/usr/lib/xtables\"%" $(@D)/iptc/xtables.py + sed -i "s%os.environ.get('IPTABLES_LIBDIR', None)%\"/usr/lib\"%" $(@D)/iptc/util.py endef PYTHON_IPTABLES_PRE_BUILD_HOOKS += PYTHON_IPTABLES_SET_XTABLES_ENV_VARS
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 2/17 support/testing: TestPythonPy3S3transfer: increase ext2 size to 250M
We are going to update the toolchain used by the Buildroot testsuite and this update will increase the size of the rootfs over 120M.
--- support/testing/tests/package/test_python_s3transfer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/testing/tests/package/test_python_s3transfer.py +1 -1
@@ -9,7 +9,7 @@ class TestPythonPy3S3transfer(TestPythonPackageBase): BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_S3TRANSFER=y BR2_TARGET_ROOTFS_EXT2=y - BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + BR2_TARGET_ROOTFS_EXT2_SIZE="250M" """ sample_scripts = ["tests/package/sample_python_s3transfer.py"] timeout = 10
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 3/17 support/testing: TestPythonPy3Boto3: increase ext2 size to 250M
In reply to Romain NaourWe are going to update the toolchain used by the Buildroot testsuite and this update will increase the size of the rootfs over 120M.
--- support/testing/tests/package/test_python_boto3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/testing/tests/package/test_python_boto3.py +1 -1
@@ -9,7 +9,7 @@ class TestPythonPy3Boto3(TestPythonPackageBase): BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_BOTO3=y BR2_TARGET_ROOTFS_EXT2=y - BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + BR2_TARGET_ROOTFS_EXT2_SIZE="250M" """ sample_scripts = ["tests/package/sample_python_boto3.py"] timeout = 10
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 4/17 support/testing: TestPythonPy3Botocore: increase ext2 size to 250M
In reply to Romain NaourWe are going to update the toolchain used by the Buildroot testsuite and this update will increase the size of the rootfs over 120M.
--- support/testing/tests/package/test_python_botocore.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/testing/tests/package/test_python_botocore.py +1 -1
@@ -9,7 +9,7 @@ class TestPythonPy3Botocore(TestPythonPackageBase): BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_BOTOCORE=y BR2_TARGET_ROOTFS_EXT2=y - BR2_TARGET_ROOTFS_EXT2_SIZE="120M" + BR2_TARGET_ROOTFS_EXT2_SIZE="250M" """ sample_scripts = ["tests/package/sample_python_botocore.py"] timeout = 30
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 5/17 support/testing: TestSELinuxSystemd: kernel bump 6.1.26
In reply to Romain NaourWe are going to update the toolchain used by the Buildroot testsuite and this update will break the kernel build with the Bootlin stable toolchain due to an latent issue.
Fixes:arch/x86/entry/thunk_64.o: warning: objtool: missing symbol table make[4]: *** [scripts/Makefile.build:361: arch/x86/entry/thunk_64.o] Error 1 make[4]: *** Deleting file 'arch/x86/entry/thunk_64.o'
make[4]: *** Waiting for unfinished jobs....
[fixed since kernel 6.0]
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=de979c83574abf6e78f3fa65b716515c91b2613d
--- support/testing/tests/init/test_systemd_selinux.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
support/testing/tests/init/test_systemd_selinux.py +1 -1
@@ -12,7 +12,7 @@ class TestSELinuxSystemd(infra.basetest.BRTest): BR2_INIT_SYSTEMD=y BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y - BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.8.12" + BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="6.1.26" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/qemu/x86_64/linux.config" BR2_PACKAGE_LIBSELINUX=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 6/17 support/testing/infra/basetest.py: use Bootlin toolchain stable 2022.08-1
In reply to Romain NaourFrom: Sebastian Weyer <[email protected]>
This patch updates the default toolchain used for runtime tests. The last time this toolchain was updated was in commit 0207a65323fc73fe9570f3d7e03bbfed4ab6d477 3 years ago. Since then, multiple things have changed:
Firstly, it used uclibc-ng as the libc whereas since commit 4057e36ca9665edd5248512e4edba2c243b8f4be, glibc is used as the default library.
And secondly, since commit 531b2a10cda6bae78ecc141c9fe48f2024f71dbc, buildroot dropped the support for gcc 8 and it cannot be built internally anymore. So the testsuite was executed using a toolchain that can't be built by the Buildroot internal toolchain backend anymore.
This new Bootlin toolchain stable 2022.08-1 is based on gcc 11.3.0, linux headers 4.9.327, glibc 2.35 and binutils 2.38.
The previous toolchain bleeding edge 2018.11-1 is based on gcc 8.2.0, linux headers 4.14.80, uclibc 1.0.30 and binutils 2.31.1
Nowadays Bootlin toolchains are packaged in Buildroot and we can directly select them from BASIC_TOOLCHAIN_CONFIG and avoid setting the toolchain parameters (BR2_TOOLCHAIN_EXTERNAL_CUSTOM...).
The switch to Glibc requires to update some tests for the following reasons:
- TestPython3Py, TestPython3Pyc and TestPython3PyPyc has been updated since they use the libc binary file name in their test (uClibc: libc.so.1 vs Glibc: libc.so.6).
- TestTmux needs at least one locale to pass (as stated in tmux help text "tmux needs a working UTF-8 locale"), so use "C.UTF-8".
- TestOpenSsh needs a toolchain >= 5.x due to a openssh issue (Similar to: https://bugs.busybox.net/show_bug.cgi?id=13671)
Use the Bootlin toolchain bleeding-edge 2022.08-1 rhat provide kernel headers 5.4
- TestShadow needs a toolchain >= 4.14
Use the Bootlin toolchain bleeding-edge 2022.08-1 rhat provide kernel headers 5.4
Runtime tested on the gcc farm server.
--- support/testing/infra/basetest.py | 10 ++-------- support/testing/tests/package/test_openssh.py | 8 +++++++- support/testing/tests/package/test_python.py | 2 +- support/testing/tests/package/test_shadow.py | 7 ++++++- support/testing/tests/package/test_tmux.py | 1 + 5 files changed, 17 insertions(+), 11 deletions(-)
support/testing/infra/basetest.py +2 -8
@@ -9,14 +9,8 @@ BASIC_TOOLCHAIN_CONFIG = \ """ BR2_arm=y BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y - BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y - BR2_TOOLCHAIN_EXTERNAL_URL="https://toolchains.bootlin.com/downloads/releases/toolchains/armv5-eabi/tarballs/armv5-eabi--uclibc--bleeding-edge-2018.11-1.tar.bz2" - BR2_TOOLCHAIN_EXTERNAL_GCC_8=y - BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_14=y - BR2_TOOLCHAIN_EXTERNAL_LOCALE=y - BR2_TOOLCHAIN_HAS_THREADS_DEBUG=y - BR2_TOOLCHAIN_EXTERNAL_CXX=y + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y """ MINIMAL_CONFIG = \
support/testing/tests/package/test_openssh.py +7 -1
@@ -32,9 +32,13 @@ class TestOpensshBase(infra.basetest.BRTest): class TestOpenSshuClibc(TestOpensshBase): - config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ + config = \ TestOpensshBase.opensshconfig + \ """ + BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_UCLIBC_STABLE=y BR2_TARGET_ROOTFS_CPIO=y """
@@ -43,12 +47,14 @@ class TestOpenSshuClibc(TestOpensshBase): class TestOpenSshGlibc(TestOpensshBase): + config = \ TestOpensshBase.opensshconfig + \ """ BR2_arm=y BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_BLEEDING_EDGE=y BR2_PACKAGE_RNG_TOOLS=y BR2_TARGET_ROOTFS_CPIO=y """
support/testing/tests/package/test_python.py +1 -1
@@ -29,7 +29,7 @@ class TestPythonBase(infra.basetest.BRTest): def libc_time_test(self, timeout=-1): cmd = self.interpreter + " -c '" cmd += "import ctypes;" - cmd += "libc = ctypes.cdll.LoadLibrary(\"libc.so.1\");" + cmd += "libc = ctypes.cdll.LoadLibrary(\"libc.so.6\");" cmd += "print(libc.time(None))'" self.assertRunOk(cmd, timeout)
support/testing/tests/package/test_shadow.py +6 -1
@@ -5,9 +5,14 @@ from infra.basetest import BRTest, BASIC_TOOLCHAIN_CONFIG class TestShadow(BRTest): username = 'user_test' - config = BASIC_TOOLCHAIN_CONFIG + \ + # Need to use a different toolchain than the default due to + # shadow package requiring a toolchain w/ headers >= 4.14 + config = \ """ BR2_arm=y + BR2_TOOLCHAIN_EXTERNAL=y + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y + BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_BLEEDING_EDGE=y BR2_PACKAGE_SHADOW=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y
support/testing/tests/package/test_tmux.py +1 -0
@@ -9,6 +9,7 @@ class TestTmux(infra.basetest.BRTest): BR2_PACKAGE_TMUX=y BR2_TARGET_ROOTFS_CPIO=y # BR2_TARGET_ROOTFS_TAR is not set + BR2_GENERATE_LOCALE="C.UTF-8" """ def test_run(self):
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 7/17 support/testing: TestMtools: use base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
--- support/testing/tests/package/test_mtools.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_mtools.py +1 -7
@@ -4,14 +4,8 @@ import infra.basetest class TestMtools(infra.basetest.BRTest): - # We use a glibc toolchain to have iconv conversion working for - # codepage 850. - config = \ + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_MTOOLS=y BR2_TARGET_ROOTFS_CPIO=y # BR2_TARGET_ROOTFS_TAR is not set
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 8/17 support/testing: TestZ3: use base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
--- support/testing/tests/package/test_z3.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_z3.py +1 -7
@@ -4,14 +4,8 @@ import infra.basetest class TestZ3(infra.basetest.BRTest): - # Need to use a different toolchain than the default due to - # z3 requiring fenv.h not provided by uclibc. - config = \ + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_Z3=y BR2_PACKAGE_Z3_PYTHON=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 9/17 support/testing: Test{No, All, NonDefaultLimited}Timezone: use base configuration
In reply to Romain NaourWhile at it remove Glibc from the test name since all Timezone now use a Glibc toolchain.
--- support/testing/tests/core/test_timezone.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-)
support/testing/tests/core/test_timezone.py +4 -8
@@ -26,11 +26,9 @@ class TestNoTimezone(infra.basetest.BRTest): self.assertEqual(tz[0].strip(), "UTC") -class TestGlibcAllTimezone(infra.basetest.BRTest): - config = \ +class TestAllTimezone(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y BR2_TARGET_TZ_INFO=y BR2_TARGET_ROOTFS_CPIO=y # BR2_TARGET_ROOTFS_TAR is not set
@@ -48,11 +46,9 @@ class TestGlibcAllTimezone(infra.basetest.BRTest): self.assertEqual(tz[0].strip(), "CET") -class TestGlibcNonDefaultLimitedTimezone(infra.basetest.BRTest): - config = \ +class TestNonDefaultLimitedTimezone(infra.basetest.BRTest): + config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y BR2_TARGET_TZ_INFO=y BR2_TARGET_TZ_ZONELIST="northamerica" BR2_TARGET_LOCALTIME="America/New_York"
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 10/17 support/testing: TestPythonPy3SciPy: use python base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
---
v2: use TestPythonPackageBase.config
--- support/testing/tests/package/test_python_scipy.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_python_scipy.py +1 -7
@@ -5,14 +5,8 @@ from tests.package.test_python import TestPythonPackageBase class TestPythonPy3SciPy(TestPythonPackageBase): __test__ = True - # We can't use the base configuration, as we need a glibc - # toolchain for scipy - config = \ + config = TestPythonPackageBase.config + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_SCIPY=y BR2_TARGET_ROOTFS_EXT2=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 11/17 support/testing: TestPythonPy3Autobahn: use python base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
---
v2: use TestPythonPackageBase.config
--- support/testing/tests/package/test_python_autobahn.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_python_autobahn.py +1 -7
@@ -3,14 +3,8 @@ from tests.package.test_python import TestPythonPackageBase class TestPythonPy3Autobahn(TestPythonPackageBase): __test__ = True - # Need to use a different toolchain than the default due to - # python-cryptography using Rust (not available with uclibc) - config = \ + config = TestPythonPackageBase.config + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_AUTOBAHN=y BR2_TARGET_ROOTFS_CPIO=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 12/17 support/testing: TestPythonPy3Crossbar: use python base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
---
v2: use TestPythonPackageBase.config
--- support/testing/tests/package/test_python_crossbar.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_python_crossbar.py +1 -7
@@ -4,14 +4,8 @@ import os class TestPythonPy3Crossbar(TestPythonPackageBase): __test__ = True - # Need to use a different toolchain than the default due to - # python-cryptography using Rust (not available with uclibc) - config = \ + config = TestPythonPackageBase.config + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_CROSSBAR=y BR2_TARGET_ROOTFS_EXT2=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 13/17 support/testing: TestPythonPy3Cryptography: use python base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
---
v2: use TestPythonPackageBase.config
--- support/testing/tests/package/test_python_cryptography.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_python_cryptography.py +1 -7
@@ -3,14 +3,8 @@ from tests.package.test_python import TestPythonPackageBase class TestPythonPy3Cryptography(TestPythonPackageBase): __test__ = True - # Need to use a different toolchain than the default due to - # python-cryptography using Rust (not available with uclibc) - config = \ + config = TestPythonPackageBase.config + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y BR2_TARGET_ROOTFS_CPIO=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 14/17 support/testing: TestPythonPy3MagicWormhole: use python base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
---
v2: use TestPythonPackageBase.config
--- .../testing/tests/package/test_python_magic_wormhole.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_python_magic_wormhole.py +1 -7
@@ -5,14 +5,8 @@ from tests.package.test_python import TestPythonPackageBase class TestPythonPy3MagicWormhole(TestPythonPackageBase): __test__ = True - # Need to use a different toolchain than the default due to - # python-cryptography using Rust (not available with uclibc) - config = \ + config = TestPythonPackageBase.config + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_MAGIC_WORMHOLE=y BR2_PACKAGE_PYTHON_MAGIC_WORMHOLE_MAILBOX_SERVER=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 15/17 support/testing: TestPythonPy3ServiceIdentity: use python base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
---
v2: use TestPythonPackageBase.config
--- .../testing/tests/package/test_python_service_identity.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_python_service_identity.py +1 -7
@@ -3,14 +3,8 @@ from tests.package.test_python import TestPythonPackageBase class TestPythonPy3ServiceIdentity(TestPythonPackageBase): __test__ = True - # Need to use a different toolchain than the default due to - # python-cryptography using Rust (not available with uclibc) - config = \ + config = TestPythonPackageBase.config + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_SERVICE_IDENTITY=y BR2_TARGET_ROOTFS_CPIO=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 16/17 support/testing: TestPythonPy3Treq: use python base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
---
v2: use TestPythonPackageBase.config
--- support/testing/tests/package/test_python_treq.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_python_treq.py +1 -7
@@ -14,14 +14,8 @@ class TestPythonTreq(TestPythonPackageBase): class TestPythonPy3Treq(TestPythonTreq): __test__ = True - # Need to use a different toolchain than the default due to - # python-cryptography using Rust (not available with uclibc) - config = \ + config = TestPythonPackageBase.config + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_TREQ=y BR2_TARGET_ROOTFS_CPIO=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH v2 17/17 support/testing: TestPythonPy3Txtorcon: use python base configuration
In reply to Romain NaourThe base configuration now provide a glibc toolchain, we can safely switch to it.
---
v2: use TestPythonPackageBase.config
--- support/testing/tests/package/test_python_txtorcon.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-)
support/testing/tests/package/test_python_txtorcon.py +1 -7
@@ -3,14 +3,8 @@ from tests.package.test_python import TestPythonPackageBase class TestPythonPy3Txtorcon(TestPythonPackageBase): __test__ = True - # Need to use a different toolchain than the default due to - # python-cryptography using Rust (not available with uclibc) - config = \ + config = TestPythonPackageBase.config + \ """ - BR2_arm=y - BR2_TOOLCHAIN_EXTERNAL=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN=y - BR2_TOOLCHAIN_EXTERNAL_BOOTLIN_ARMV5_EABI_GLIBC_STABLE=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_TXTORCON=y BR2_TARGET_ROOTFS_CPIO=y
Signature · 6 lines
2.34.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 26 lines · On Fri, 9 Jun 2023 01:28:43 +0200 Romain Naour <[email protected]> wrote:
While the commit [1] already fixed some runtime issue with uClibc toolchain, the same test TestPythonPy3Iptables fail with Glibc toolchain.
xtables_version= 12
ifxtables_version:
_searchlib= "libxtables.so.%s" % (xtables_version,)
else:
_searchlib= "xtables"
_lib_xtables,xtables_version=find_library(_searchlib)
_lib_xtablesandxtables_versionare null with glibcThe implementation of
find_library()rely on the custom_find_library()that try to use theIPTABLES_LIBDIRenvironment variable (that does not exist in the context of Buildroot).Within the scope of buildroot we can determine what
IPTABLES_LIBDIRshould be at build time and replace the calls toos.environ.get('IPTABLES_LIBDIR', None)with the correct value.[1]
d341ec035067120b456f669a826e26eb594c0237Signed-off-by Romain Naour <[email protected]>
Quoted 8 lines
---
I don't know why TestPythonPy3Iptables pass succesfully with a uClibc toolchain but not with a glibc toolchain. The current python code searching for xtables, modules and libraries seems fragile...--- package/python-iptables/python-iptables.mk | 1 + 1 file changed, 1 insertion(+)
There hasn't been much feedback on the overall principle, but I found it reasonable: we're using glibc as the default C library now, so it kind of makes sense to use it primarily in our test cases.
So I've applied the entire series, thanks for this work!
Thomas
Signature · 7 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
While the commit [1] already fixed some runtime issue with uClibc toolchain, the same test TestPythonPy3Iptables fail with Glibc toolchain.
xtables_version= 12
ifxtables_version:
_searchlib= "libxtables.so.%s" % (xtables_version,)
else:
_searchlib= "xtables"
_lib_xtables,xtables_version=find_library(_searchlib)
_lib_xtablesandxtables_versionare null with glibcThe implementation of
find_library()rely on the custom_find_library()that try to use theIPTABLES_LIBDIRenvironment variable (that does not exist in the context of Buildroot).Within the scope of buildroot we can determine what
IPTABLES_LIBDIRshould be at build time and replace the calls toos.environ.get('IPTABLES_LIBDIR', None)with the correct value.
Quoted 8 lines
[1]
d341ec035067120b456f669a826e26eb594c0237Signed-off-by Romain Naour <[email protected]>---
I don't know why TestPythonPy3Iptables pass succesfully with a uClibc toolchain but not with a glibc toolchain. The current python code searching for xtables, modules and libraries seems fragile...
Committed to 2023.02.x and 2023.05.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot