diff options
author | Haixiao Yan <haixiao.yan.cn@windriver.com> | 2025-08-13 15:08:49 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-08-13 12:25:37 -0700 |
commit | f2dc694c52618c04880b28aceec48ff3a853558f (patch) | |
tree | 5652ed854f2cfd70d7bc9a9ce6481d925569cbcf | |
parent | 7b7d912e7a55d29832492726b909ba46f8de2f77 (diff) | |
download | meta-openembedded-f2dc694c52618c04880b28aceec48ff3a853558f.tar.gz |
python3-posix-ipc: upgrade 1.2.0 -> 1.3.0
Remove following patches, they have been fixed since 1.3.0.
0001-build_support-use-source-filename-instead-of-foo-for.patch
0002-build_support-handle-empty-max_priority-value-as-Non.patch
0003-build_support-use-does_build_succeed-in-compile_and_.patch
Backport a patch to fix dicsovery fails when CC contains flags
License-Update: update copyright statements to include contributors
Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r-- | meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch | 53 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-use-source-filename-instead-of-foo-for.patch | 50 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-posix-ipc/0002-build_support-handle-empty-max_priority-value-as-Non.patch | 49 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-posix-ipc/0003-build_support-use-does_build_succeed-in-compile_and_.patch | 62 | ||||
-rw-r--r-- | meta-python/recipes-devtools/python/python3-posix-ipc_1.3.0.bb (renamed from meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb) | 10 |
5 files changed, 57 insertions, 167 deletions
diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch b/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch new file mode 100644 index 0000000000..c78d4ad726 --- /dev/null +++ b/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-fix-cross-compilation-error-when-CC-is.patch | |||
@@ -0,0 +1,53 @@ | |||
1 | From 01134093c9150248f9ea8890a41e922159593a7f Mon Sep 17 00:00:00 2001 | ||
2 | From: Haixiao Yan <haixiao.yan.cn@windriver.com> | ||
3 | Date: Fri, 8 Aug 2025 19:30:16 +0800 | ||
4 | Subject: [PATCH] build_support: fix cross-compilation error when CC is a | ||
5 | multi-part command | ||
6 | |||
7 | Fix the following error when cross-compiling with an environment-defined CC | ||
8 | that includes flags: | ||
9 | |||
10 | FileNotFoundError: [Errno 2] No such file or directory: 'x86_64-wrs-linux-gcc | ||
11 | -m64 -march=nehalem -mtune=generic -mfpmath=sse -msse4.2 | ||
12 | -fstack-protector-strong -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security | ||
13 | -Werror=format-security | ||
14 | --sysroot=/build-1.3.0/tmp/work/corei7-64-wrs-linux/python3-posix-ipc/1.3.0/recipe-sysroot' | ||
15 | |||
16 | This happened because the CC environment variable was treated as a single | ||
17 | string instead of being split into arguments. The fix uses shlex.split() to | ||
18 | correctly parse CC into a list of compiler and flags, and then unpacks it when | ||
19 | forming the subprocess command. | ||
20 | |||
21 | Upstream-Status: Backport [https://github.com/osvenskan/posix_ipc/commit/0113409] | ||
22 | |||
23 | Signed-off-by: Haixiao Yan <haixiao.yan.cn@windriver.com> | ||
24 | --- | ||
25 | build_support/discover_system_info.py | 5 ++++- | ||
26 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
27 | |||
28 | diff --git a/build_support/discover_system_info.py b/build_support/discover_system_info.py | ||
29 | index d1b171e4f602..1c3741f5577c 100644 | ||
30 | --- a/build_support/discover_system_info.py | ||
31 | +++ b/build_support/discover_system_info.py | ||
32 | @@ -1,6 +1,7 @@ | ||
33 | import subprocess | ||
34 | import platform | ||
35 | import os | ||
36 | +import shlex | ||
37 | |||
38 | # Set these to None for compile/link debugging or subprocess.PIPE to silence | ||
39 | # compiler warnings and errors. | ||
40 | @@ -49,7 +50,9 @@ def does_build_succeed(filename, linker_options=""): | ||
41 | # - Some versions of Linux place the sem_xxx() functions in libpthread. | ||
42 | # Rather than testing whether or not it's needed, I just specify it | ||
43 | # everywhere since it's harmless to specify it when it's not needed. | ||
44 | - cmd = [os.getenv("CC", "cc"), | ||
45 | + cc = os.getenv("CC", "cc") | ||
46 | + cmd = [ | ||
47 | + *shlex.split(cc), | ||
48 | '-Wall', | ||
49 | '-o', | ||
50 | f'./build_support/src/{filename[:-2]}', | ||
51 | -- | ||
52 | 2.34.1 | ||
53 | |||
diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-use-source-filename-instead-of-foo-for.patch b/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-use-source-filename-instead-of-foo-for.patch deleted file mode 100644 index 8bb7267086..0000000000 --- a/meta-python/recipes-devtools/python/python3-posix-ipc/0001-build_support-use-source-filename-instead-of-foo-for.patch +++ /dev/null | |||
@@ -1,50 +0,0 @@ | |||
1 | From 09cfcf7de2aab873a13949d5a128ccfb9e54732d Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Mon, 5 May 2025 08:15:37 +0200 | ||
4 | Subject: [PATCH] build_support: use source filename instead of 'foo' for | ||
5 | discover tests | ||
6 | |||
7 | * helps when debugging the issues | ||
8 | * use the same order of CC arguments in compile_and_run and | ||
9 | does_build_succeed just for consistency | ||
10 | * use pthread in both compile_and_run and does_build_succeed functions | ||
11 | it was added only to does_build_succeed in 5ec39f7af8cfd8525d225b1302fa93f7133b3849 | ||
12 | not sure if it was intentional | ||
13 | |||
14 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
15 | Upstream-Status: Submitted [https://github.com/osvenskan/posix_ipc/pull/77] | ||
16 | --- | ||
17 | build_support/discover_system_info.py | 6 +++--- | ||
18 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
19 | |||
20 | diff --git a/build_support/discover_system_info.py b/build_support/discover_system_info.py | ||
21 | index bc4d174..6d059d9 100644 | ||
22 | --- a/build_support/discover_system_info.py | ||
23 | +++ b/build_support/discover_system_info.py | ||
24 | @@ -60,7 +60,7 @@ def does_build_succeed(filename, linker_options=""): | ||
25 | # Rather than testing whether or not it's needed, I just specify it | ||
26 | # everywhere since it's harmless to specify it when it's not needed. | ||
27 | cc = os.getenv("CC", "cc") | ||
28 | - cmd = "%s -Wall -o ./build_support/src/foo ./build_support/src/%s %s -lpthread" % (cc, filename, linker_options) | ||
29 | + cmd = "%s -Wall -o ./build_support/src/%s ./build_support/src/%s %s -lpthread" % (cc, filename[:-2], filename, linker_options) | ||
30 | |||
31 | p = subprocess.Popen(cmd, shell=True, stdout=STDOUT, stderr=STDERR) | ||
32 | |||
33 | @@ -73,7 +73,7 @@ def compile_and_run(filename, linker_options=""): | ||
34 | # Utility function that returns the stdout output from running the | ||
35 | # compiled source file; None if the compile fails. | ||
36 | cc = os.getenv("CC", "cc") | ||
37 | - cmd = "%s -Wall -o ./build_support/src/foo %s ./build_support/src/%s" % (cc, linker_options, filename) | ||
38 | + cmd = "%s -Wall -o ./build_support/src/%s ./build_support/src/%s %s -lpthread" % (cc, filename[:-2], filename, linker_options) | ||
39 | |||
40 | p = subprocess.Popen(cmd, shell=True, stdout=STDOUT, stderr=STDERR) | ||
41 | |||
42 | @@ -82,7 +82,7 @@ def compile_and_run(filename, linker_options=""): | ||
43 | return None | ||
44 | |||
45 | try: | ||
46 | - s = subprocess.Popen(["./build_support/src/foo"], | ||
47 | + s = subprocess.Popen(["./build_support/src/%s" % filename[:-2]], | ||
48 | stdout=subprocess.PIPE).communicate()[0] | ||
49 | return s.strip().decode() | ||
50 | except Exception: | ||
diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc/0002-build_support-handle-empty-max_priority-value-as-Non.patch b/meta-python/recipes-devtools/python/python3-posix-ipc/0002-build_support-handle-empty-max_priority-value-as-Non.patch deleted file mode 100644 index 54c8ddaba7..0000000000 --- a/meta-python/recipes-devtools/python/python3-posix-ipc/0002-build_support-handle-empty-max_priority-value-as-Non.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 8fc46d871639dbe799f6ff0a61b046412ef5dcc6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Mon, 5 May 2025 08:16:30 +0200 | ||
4 | Subject: [PATCH] build_support: handle empty max_priority value as None | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | When cross-compiling these tests they fail when the host cannot execute | ||
10 | the binaries built for target. | ||
11 | |||
12 | On my local ubuntu-22.04 docker container running | ||
13 | build_support/src/sniff_mq_prio_max results in: | ||
14 | posix_ipc-1.2.0 $ ./build_support/src/foo | ||
15 | bash: ./build_support/src/foo: cannot execute binary file: Exec format error | ||
16 | which triggers the Exception in compile_and_run and returns None | ||
17 | |||
18 | While on some other ubuntu-22.04 containers I see: | ||
19 | posix_ipc-1.2.0$ ./build_support/src/sniff_mq_prio_max | ||
20 | /usr/lib/ld-linux-aarch64.so.1: No such file or directory | ||
21 | |||
22 | and the compile_and_run returns | ||
23 | b'' | ||
24 | which then causes | ||
25 | posix_ipc-1.2.0/build_support/discover_system_info.py", line 244, in sniff_mq_prio_max | ||
26 | if max_priority < 0: | ||
27 | ^^^^^^^^^^^^^^^^ | ||
28 | |||
29 | Handle the empty value the same as None to avoid this. | ||
30 | |||
31 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
32 | Upstream-Status: Submitted [https://github.com/osvenskan/posix_ipc/pull/77] | ||
33 | --- | ||
34 | build_support/discover_system_info.py | 2 +- | ||
35 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
36 | |||
37 | diff --git a/build_support/discover_system_info.py b/build_support/discover_system_info.py | ||
38 | index 6d059d9..f8a3c83 100644 | ||
39 | --- a/build_support/discover_system_info.py | ||
40 | +++ b/build_support/discover_system_info.py | ||
41 | @@ -223,7 +223,7 @@ def sniff_mq_prio_max(): | ||
42 | except ValueError: | ||
43 | max_priority = None | ||
44 | |||
45 | - if max_priority is None: | ||
46 | + if not max_priority: | ||
47 | # Looking for a #define didn't work; ask sysconf() instead. | ||
48 | # Note that sys.sysconf_names doesn't exist under Cygwin. | ||
49 | if hasattr(os, "sysconf_names") and \ | ||
diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc/0003-build_support-use-does_build_succeed-in-compile_and_.patch b/meta-python/recipes-devtools/python/python3-posix-ipc/0003-build_support-use-does_build_succeed-in-compile_and_.patch deleted file mode 100644 index b36d1cdb3a..0000000000 --- a/meta-python/recipes-devtools/python/python3-posix-ipc/0003-build_support-use-does_build_succeed-in-compile_and_.patch +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | From 760374e778fc28193cfea1416a739e206f9201c6 Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Mon, 5 May 2025 08:28:56 +0200 | ||
4 | Subject: [PATCH] build_support: use does_build_succeed in compile_and_run | ||
5 | |||
6 | * avoid the duplication and building the sniff_mq_prio_max.c twice | ||
7 | |||
8 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
9 | Upstream-Status: Submitted [https://github.com/osvenskan/posix_ipc/pull/77] | ||
10 | --- | ||
11 | build_support/discover_system_info.py | 27 ++++++++++----------------- | ||
12 | 1 file changed, 10 insertions(+), 17 deletions(-) | ||
13 | |||
14 | diff --git a/build_support/discover_system_info.py b/build_support/discover_system_info.py | ||
15 | index f8a3c83..f6e6c8c 100644 | ||
16 | --- a/build_support/discover_system_info.py | ||
17 | +++ b/build_support/discover_system_info.py | ||
18 | @@ -72,22 +72,17 @@ def does_build_succeed(filename, linker_options=""): | ||
19 | def compile_and_run(filename, linker_options=""): | ||
20 | # Utility function that returns the stdout output from running the | ||
21 | # compiled source file; None if the compile fails. | ||
22 | - cc = os.getenv("CC", "cc") | ||
23 | - cmd = "%s -Wall -o ./build_support/src/%s ./build_support/src/%s %s -lpthread" % (cc, filename[:-2], filename, linker_options) | ||
24 | - | ||
25 | - p = subprocess.Popen(cmd, shell=True, stdout=STDOUT, stderr=STDERR) | ||
26 | - | ||
27 | - if p.wait(): | ||
28 | + if does_build_succeed(filename, linker_options=""): | ||
29 | + try: | ||
30 | + s = subprocess.Popen(["./build_support/src/%s" % filename[:-2]], | ||
31 | + stdout=subprocess.PIPE).communicate()[0] | ||
32 | + return s.strip().decode() | ||
33 | + except Exception: | ||
34 | + # execution resulted in an error | ||
35 | + return None | ||
36 | + else: | ||
37 | # uh-oh, compile failed | ||
38 | return None | ||
39 | - | ||
40 | - try: | ||
41 | - s = subprocess.Popen(["./build_support/src/%s" % filename[:-2]], | ||
42 | - stdout=subprocess.PIPE).communicate()[0] | ||
43 | - return s.strip().decode() | ||
44 | - except Exception: | ||
45 | - # execution resulted in an error | ||
46 | - return None | ||
47 | |||
48 | |||
49 | def get_sysctl_value(name): | ||
50 | @@ -211,11 +206,9 @@ def sniff_mq_prio_max(): | ||
51 | # ref: http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html | ||
52 | DEFAULT_PRIORITY_MAX = 32 | ||
53 | |||
54 | - max_priority = None | ||
55 | # OS X up to and including 10.8 doesn't support POSIX messages queues and | ||
56 | # doesn't define MQ_PRIO_MAX. Maybe this aggravation will cease in 10.9? | ||
57 | - if does_build_succeed("sniff_mq_prio_max.c"): | ||
58 | - max_priority = compile_and_run("sniff_mq_prio_max.c") | ||
59 | + max_priority = compile_and_run("sniff_mq_prio_max.c") | ||
60 | |||
61 | if max_priority: | ||
62 | try: | ||
diff --git a/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb b/meta-python/recipes-devtools/python/python3-posix-ipc_1.3.0.bb index 4f544c80bc..02d2e55bad 100644 --- a/meta-python/recipes-devtools/python/python3-posix-ipc_1.2.0.bb +++ b/meta-python/recipes-devtools/python/python3-posix-ipc_1.3.0.bb | |||
@@ -2,18 +2,16 @@ DESCRIPTION = "POSIX IPC primitives (semaphores, shared memory and message queue | |||
2 | HOMEPAGE = "https://semanchuk.com/philip/posix_ipc/" | 2 | HOMEPAGE = "https://semanchuk.com/philip/posix_ipc/" |
3 | SECTION = "devel/python" | 3 | SECTION = "devel/python" |
4 | LICENSE = "BSD-3-Clause" | 4 | LICENSE = "BSD-3-Clause" |
5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=1a4f3bd729df04bf68f66ef877e9c7c9" | 5 | LIC_FILES_CHKSUM = "file://LICENSE;md5=e3d8df223c2614dbf1aabdc1ca23cc10" |
6 | 6 | ||
7 | PYPI_PACKAGE = "posix_ipc" | 7 | PYPI_PACKAGE = "posix_ipc" |
8 | UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}" | 8 | UPSTREAM_CHECK_PYPI_PACKAGE = "${PYPI_PACKAGE}" |
9 | 9 | ||
10 | SRC_URI[sha256sum] = "b7444e2703c156b3cb9fcb568e85d716232f3e78f04529ebc881cfb2aedb3838" | 10 | SRC_URI[sha256sum] = "6e559ac5bb5f6f233c396103f4868e383bbd8f4e54d20876910896f47d353448" |
11 | 11 | ||
12 | SRC_URI += " \ | 12 | SRC_URI += " \ |
13 | file://0001-build_support-use-source-filename-instead-of-foo-for.patch \ | 13 | file://0001-build_support-fix-cross-compilation-error-when-CC-is.patch \ |
14 | file://0002-build_support-handle-empty-max_priority-value-as-Non.patch \ | 14 | " |
15 | file://0003-build_support-use-does_build_succeed-in-compile_and_.patch \ | ||
16 | " | ||
17 | 15 | ||
18 | # Message queue support requires librt for proper linking | 16 | # Message queue support requires librt for proper linking |
19 | LDFLAGS += "-lrt" | 17 | LDFLAGS += "-lrt" |