From 8f2bdb37ae6525015602bc20f99e1341f594c2ea Mon Sep 17 00:00:00 2001 From: Pawel Rutka Date: Thu, 12 Feb 2026 11:20:52 +0100 Subject: [PATCH] Revert "Update patches for baselibs and remove deprecated feature flag (#95)" This reverts commit 399c00b454ec5f7e2af9689be9096ea2c50f7d4c. --- .bazelrc | 1 + .../baselibs/0001-RH-exception-header.patch | 12 ++ .../baselibs/0001-fixes-for-aarch64.patch | 189 ------------------ .../baselibs/0002-RH-algorithm-header.patch | 36 ++++ .../baselibs/003-acl-fixes-for-aarch64.patch | 65 ++++++ .../baselibs/fix_hard_coded_amd64.patch | 32 +++ score_modules.MODULE.bazel | 4 - 7 files changed, 146 insertions(+), 193 deletions(-) create mode 100644 integration/patches/baselibs/0001-RH-exception-header.patch delete mode 100644 integration/patches/baselibs/0001-fixes-for-aarch64.patch create mode 100644 integration/patches/baselibs/0002-RH-algorithm-header.patch create mode 100644 integration/patches/baselibs/003-acl-fixes-for-aarch64.patch create mode 100644 integration/patches/baselibs/fix_hard_coded_amd64.patch diff --git a/.bazelrc b/.bazelrc index fdcf72c6a5..ddd24a4ed9 100644 --- a/.bazelrc +++ b/.bazelrc @@ -17,6 +17,7 @@ common --registry=https://bcr.bazel.build # Flags needed by score_baselibs and communication modules. # Do not add more! +common --@score_baselibs//score/mw/log/flags:KRemote_Logging=False common --@score_baselibs//score/json:base_library=nlohmann common --@score_communication//score/mw/com/flags:tracing_library=stub common --@score_baselibs//score/memory/shared/flags:use_typedshmd=False diff --git a/integration/patches/baselibs/0001-RH-exception-header.patch b/integration/patches/baselibs/0001-RH-exception-header.patch new file mode 100644 index 0000000000..d48191eab2 --- /dev/null +++ b/integration/patches/baselibs/0001-RH-exception-header.patch @@ -0,0 +1,12 @@ +diff --git a/score/concurrency/clock.h b/score/concurrency/clock.h +index 0fa7719..365a003 100644 +--- a/score/concurrency/clock.h ++++ b/score/concurrency/clock.h +@@ -15,6 +15,7 @@ + + #include + #include ++#include + + namespace score + { diff --git a/integration/patches/baselibs/0001-fixes-for-aarch64.patch b/integration/patches/baselibs/0001-fixes-for-aarch64.patch deleted file mode 100644 index f15e4d01f2..0000000000 --- a/integration/patches/baselibs/0001-fixes-for-aarch64.patch +++ /dev/null @@ -1,189 +0,0 @@ -diff --git a/MODULE.bazel b/MODULE.bazel -index 7b6f319e..b4c77340 100644 ---- a/MODULE.bazel -+++ b/MODULE.bazel -@@ -98,6 +98,13 @@ deb( - visibility = ["//visibility:public"], - ) - -+deb( -+ name = "acl-deb-aarch64", -+ build = "//third_party/acl:acl.BUILD", -+ urls = ["https://ports.ubuntu.com/pool/main/a/acl/libacl1-dev_2.3.1-1_arm64.deb"], -+ visibility = ["//visibility:public"], -+) -+ - deb( - name = "valgrind-deb", - build = "//third_party/valgrind:valgrind.BUILD", -@@ -118,6 +125,19 @@ deb( - visibility = ["//visibility:public"], - ) - -+deb( -+ name = "libcap2-deb-aarch64", -+ urls = ["https://ports.ubuntu.com/pool/main/libc/libcap2/libcap2_2.25-1.2_arm64.deb"], -+ visibility = ["//visibility:public"], -+) -+ -+deb( -+ name = "libcap2-dev-deb-aarch64", -+ build = "//third_party/libcap2:libcap2.BUILD", -+ urls = ["https://ports.ubuntu.com/pool/main/libc/libcap2/libcap-dev_2.25-1.2_arm64.deb"], -+ visibility = ["//visibility:public"], -+) -+ - deb( - name = "libseccomp2-deb", - urls = ["https://archive.ubuntu.com/ubuntu/pool/main/libs/libseccomp/libseccomp2_2.5.1-1ubuntu1~18.04.2_amd64.deb"], -@@ -131,6 +151,19 @@ deb( - visibility = ["//visibility:public"], - ) - -+deb( -+ name = "libseccomp2-deb-aarch64", -+ urls = ["https://ports.ubuntu.com/pool/main/libs/libseccomp/libseccomp2_2.5.3-2ubuntu2_arm64.deb"], -+ visibility = ["//visibility:public"], -+) -+ -+deb( -+ name = "libseccomp2-dev-deb-aarch64", -+ build = "//third_party/libseccomp2:libseccomp2.BUILD", -+ urls = ["https://ports.ubuntu.com/pool/main/libs/libseccomp/libseccomp-dev_2.5.3-2ubuntu2_arm64.deb"], -+ visibility = ["//visibility:public"], -+) -+ - bazel_dep(name = "nlohmann_json", version = "3.11.3") - bazel_dep(name = "bazel_skylib", version = "1.8.2") - -diff --git a/score/language/safecpp/test/test_std_arithmetic_types.cpp b/score/language/safecpp/test/test_std_arithmetic_types.cpp -index b09415b4..5c4ed8a5 100644 ---- a/score/language/safecpp/test/test_std_arithmetic_types.cpp -+++ b/score/language/safecpp/test/test_std_arithmetic_types.cpp -@@ -46,18 +46,6 @@ TEST(StdFloatTypes, IECConformance) - - TEST(StdIntegralTypes, signess_and_bytes_number) - { --// Test identifies implementation defined behavior. --// As the standard does not specify if plain char is signed or unsigned. --// char on QNX is considered as unsigned char and on GCC and Clang is considered as signed. --#if defined(__QNX__) -- // As the signess of char depends on using qemu or the real hardware, this line got commented until we decide -- // How to move forward in this ticket Ticket-141110 -- // static_assert(std::numeric_limits::is_signed == false, -- // "it is expected a 'char' to be unsigned in a QNX environment"); --#else -- static_assert(std::numeric_limits::is_signed == true, -- "it is expected a 'char' to be signed in a linux environment"); --#endif - // Test identifies number of bytes - static_assert(sizeof(char) == 1, "it is expected a char bytes' number to be 1"); - -diff --git a/third_party/acl/BUILD b/third_party/acl/BUILD -index b71d5df1..da079950 100644 ---- a/third_party/acl/BUILD -+++ b/third_party/acl/BUILD -@@ -1,5 +1,8 @@ - alias( - name = "acl", -- actual = "@acl-deb//:acl", -+ actual = select({ -+ "@platforms//cpu:aarch64": "@acl-deb-aarch64//:acl", -+ "//conditions:default": "@acl-deb//:acl", -+ }), - visibility = ["//visibility:public"], - ) -diff --git a/third_party/acl/acl.BUILD b/third_party/acl/acl.BUILD -index 718726c6..b695a6ac 100644 ---- a/third_party/acl/acl.BUILD -+++ b/third_party/acl/acl.BUILD -@@ -1,8 +1,9 @@ - cc_library( - name = "acl", -- srcs = [ -- "usr/lib/libacl.a", -- ], -+ srcs = select({ -+ "@platforms//cpu:aarch64": ["usr/lib/aarch64-linux-gnu/libacl.a"], -+ "//conditions:default": ["usr/lib/libacl.a"], -+ }), - hdrs = [ - "usr/include/acl/libacl.h", - "usr/include/sys/acl.h", -diff --git a/third_party/libcap2/BUILD b/third_party/libcap2/BUILD -index c74930f1..4704ee73 100644 ---- a/third_party/libcap2/BUILD -+++ b/third_party/libcap2/BUILD -@@ -1,5 +1,8 @@ - alias( - name = "libcap2", -- actual = "@libcap2-dev-deb//:libcap2", -+ actual = select({ -+ "@platforms//cpu:aarch64": "@libcap2-dev-deb-aarch64//:libcap2", -+ "//conditions:default": "@libcap2-dev-deb//:libcap2", -+ }), - visibility = ["//visibility:public"], - ) -diff --git a/third_party/libcap2/libcap2.BUILD b/third_party/libcap2/libcap2.BUILD -index 05f504a6..489cefb4 100644 ---- a/third_party/libcap2/libcap2.BUILD -+++ b/third_party/libcap2/libcap2.BUILD -@@ -1,9 +1,15 @@ - cc_library( - name = "libcap2", -- srcs = [ -- "@libcap2-deb//:lib/x86_64-linux-gnu/libcap.so.2", -- "@libcap2-deb//:lib/x86_64-linux-gnu/libcap.so.2.25", -- ], -+ srcs = select({ -+ "@platforms//cpu:aarch64": [ -+ "@libcap2-deb-aarch64//:lib/aarch64-linux-gnu/libcap.so.2", -+ "@libcap2-deb-aarch64//:lib/aarch64-linux-gnu/libcap.so.2.25", -+ ], -+ "//conditions:default": [ -+ "@libcap2-deb//:lib/x86_64-linux-gnu/libcap.so.2", -+ "@libcap2-deb//:lib/x86_64-linux-gnu/libcap.so.2.25", -+ ], -+ }), - hdrs = [ - "usr/include/sys/capability.h", - ], -diff --git a/third_party/libseccomp2/BUILD b/third_party/libseccomp2/BUILD -index dd0c1848..bc9a2cc5 100644 ---- a/third_party/libseccomp2/BUILD -+++ b/third_party/libseccomp2/BUILD -@@ -1,5 +1,8 @@ - alias( - name = "libseccomp2", -- actual = "@libseccomp2-dev-deb//:libseccomp2", -+ actual = select({ -+ "@platforms//cpu:aarch64": "@libseccomp2-dev-deb-aarch64//:libseccomp2", -+ "//conditions:default": "@libseccomp2-dev-deb//:libseccomp2", -+ }), - visibility = ["//visibility:public"], - ) -diff --git a/third_party/libseccomp2/libseccomp2.BUILD b/third_party/libseccomp2/libseccomp2.BUILD -index 1d6c5d9d..4ce426f5 100644 ---- a/third_party/libseccomp2/libseccomp2.BUILD -+++ b/third_party/libseccomp2/libseccomp2.BUILD -@@ -1,9 +1,15 @@ - cc_library( - name = "libseccomp2", -- srcs = [ -- "@libseccomp2-deb//:lib/x86_64-linux-gnu/libseccomp.so.2", -- "@libseccomp2-deb//:lib/x86_64-linux-gnu/libseccomp.so.2.5.1", -- ], -+ srcs = select({ -+ "@platforms//cpu:aarch64": [ -+ "@libseccomp2-deb-aarch64//:usr/lib/aarch64-linux-gnu/libseccomp.so.2", -+ "@libseccomp2-deb-aarch64//:usr/lib/aarch64-linux-gnu/libseccomp.so.2.5.3", -+ ], -+ "//conditions:default": [ -+ "@libseccomp2-deb//:lib/x86_64-linux-gnu/libseccomp.so.2", -+ "@libseccomp2-deb//:lib/x86_64-linux-gnu/libseccomp.so.2.5.1", -+ ], -+ }), - hdrs = [ - "usr/include/seccomp.h", - "usr/include/seccomp-syscalls.h", - diff --git a/integration/patches/baselibs/0002-RH-algorithm-header.patch b/integration/patches/baselibs/0002-RH-algorithm-header.patch new file mode 100644 index 0000000000..70fc3780a9 --- /dev/null +++ b/integration/patches/baselibs/0002-RH-algorithm-header.patch @@ -0,0 +1,36 @@ +diff --git a/score/language/futurecpp/tests/member_iterator_test.cpp b/score/language/futurecpp/tests/member_iterator_test.cpp +index bea1361..6d649d2 100644 +--- a/score/language/futurecpp/tests/member_iterator_test.cpp ++++ b/score/language/futurecpp/tests/member_iterator_test.cpp +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + #include + +diff --git a/score/language/futurecpp/tests/multi_span_test.cpp b/score/language/futurecpp/tests/multi_span_test.cpp +index 9b57903..c0da98b 100644 +--- a/score/language/futurecpp/tests/multi_span_test.cpp ++++ b/score/language/futurecpp/tests/multi_span_test.cpp +@@ -11,6 +11,7 @@ + #include + #include + #include ++#include + + #include + +diff --git a/score/mw/log/detail/logging_identifier.h b/score/mw/log/detail/logging_identifier.h +index ec02bac..b15bdfa 100644 +--- a/score/mw/log/detail/logging_identifier.h ++++ b/score/mw/log/detail/logging_identifier.h +@@ -19,6 +19,7 @@ + + #include + #include ++#include + + namespace score + { diff --git a/integration/patches/baselibs/003-acl-fixes-for-aarch64.patch b/integration/patches/baselibs/003-acl-fixes-for-aarch64.patch new file mode 100644 index 0000000000..95ea478477 --- /dev/null +++ b/integration/patches/baselibs/003-acl-fixes-for-aarch64.patch @@ -0,0 +1,65 @@ +From 37a6329193e94d93fef91fc184e95e9a8b67a98b Mon Sep 17 00:00:00 2001 +From: Pawel Rutka +Date: Mon, 9 Feb 2026 14:51:53 +0100 +Subject: [PATCH] T + +Signed-off-by: Pawel Rutka +--- + MODULE.bazel | 7 +++++++ + third_party/acl/BUILD | 6 +++++- + third_party/acl/acl.BUILD | 7 ++++--- + 3 files changed, 16 insertions(+), 4 deletions(-) + +diff --git a/MODULE.bazel b/MODULE.bazel +index f7991cb..b78d618 100644 +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -64,6 +64,13 @@ deb( + visibility = ["//visibility:public"], + ) + ++deb( ++ name = "acl-deb-aarch64", ++ build = "//third_party/acl:acl.BUILD", ++ urls = ["https://launchpadlibrarian.net/581258948/libacl1-dev_2.3.1-1_arm64.deb"], ++ visibility = ["//visibility:public"], ++) ++ + deb( + name = "valgrind-deb", + build = "//third_party/valgrind:valgrind.BUILD", +diff --git a/third_party/acl/BUILD b/third_party/acl/BUILD +index dfcac1e..c76bee3 100644 +--- a/third_party/acl/BUILD ++++ b/third_party/acl/BUILD +@@ -1,5 +1,9 @@ + alias( + name = "acl", +- actual = "@acl-deb//:acl", ++ actual = select({ ++ "@platforms//cpu:aarch64": "@acl-deb-aarch64//:acl", ++ "//conditions:default": "@acl-deb//:acl", ++ }), + visibility = ["//visibility:public"], + ) ++ +diff --git a/third_party/acl/acl.BUILD b/third_party/acl/acl.BUILD +index 2163068..d86c7f7 100644 +--- a/third_party/acl/acl.BUILD ++++ b/third_party/acl/acl.BUILD +@@ -1,8 +1,9 @@ + cc_library( + name = "acl", +- srcs = [ +- "usr/lib/libacl.a", +- ], ++ srcs = select({ ++ "@platforms//cpu:aarch64": ["usr/lib/aarch64-linux-gnu/libacl.a"], ++ "//conditions:default": ["usr/lib/libacl.a"], ++ }), + hdrs = [ + "usr/include/acl/libacl.h", + "usr/include/sys/acl.h", +-- +2.43.0 + diff --git a/integration/patches/baselibs/fix_hard_coded_amd64.patch b/integration/patches/baselibs/fix_hard_coded_amd64.patch new file mode 100644 index 0000000000..91892e1b20 --- /dev/null +++ b/integration/patches/baselibs/fix_hard_coded_amd64.patch @@ -0,0 +1,32 @@ +diff --git a/MODULE.bazel b/MODULE.bazel +index 16776ba..683c131 100644 +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -70,7 +70,7 @@ deb = use_repo_rule("@download_utils//download/deb:defs.bzl", "download_deb") + deb( + name = "acl-deb", + build = "//third_party/acl:acl.BUILD", +- urls = ["https://archive.ubuntu.com/ubuntu/pool/main/a/acl/libacl1-dev_2.2.52-3build1_amd64.deb"], ++ urls = ["https://launchpadlibrarian.net/581258948/libacl1-dev_2.3.1-1_arm64.deb"], + visibility = ["//visibility:public"], + ) + +diff --git a/third_party/acl/acl.BUILD b/third_party/acl/acl.BUILD +index 718726c..710befd 100644 +--- a/third_party/acl/acl.BUILD ++++ b/third_party/acl/acl.BUILD +@@ -1,7 +1,7 @@ + cc_library( + name = "acl", + srcs = [ +- "usr/lib/libacl.a", ++ "usr/lib/aarch64-linux-gnu/libacl.a", + ], + hdrs = [ + "usr/include/acl/libacl.h", +@@ -9,4 +9,4 @@ cc_library( + ], + includes = ["usr/include/"], + visibility = ["//visibility:public"], +-) ++) diff --git a/score_modules.MODULE.bazel b/score_modules.MODULE.bazel index 32b2c45245..8c2d99b2e0 100644 --- a/score_modules.MODULE.bazel +++ b/score_modules.MODULE.bazel @@ -19,10 +19,6 @@ git_override( module_name = "score_baselibs", remote = "https://github.com/eclipse-score/baselibs.git", commit = "ffd1c812213c66a436ed982632f6942528b58be8", - patch_strip = 1, - patches = [ - "//integration/patches/baselibs:0001-fixes-for-aarch64.patch", - ], ) bazel_dep(name = "score_baselibs_rust")