From f5cc8f08a01b3fe7cf3c0c2774e5e13c67031199 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Sun, 13 Oct 2024 18:55:48 +0200 Subject: [PATCH 01/10] iox-#2310 Print values for IOX_INTERPROCESS_LOCK/_SEMAPHORE --- iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake | 2 -- iceoryx_posh/cmake/IceoryxPoshDeployment.cmake | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake b/iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake index a3404300e9..3110be87a3 100644 --- a/iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake +++ b/iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake @@ -31,6 +31,4 @@ configure_option( DEFAULT_VALUE 10 ) -message(STATUS "[i] IOX_EXPERIMENTAL_POSH_FLAG: ${IOX_EXPERIMENTAL_POSH_FLAG}") - message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_hoofs configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_posh/cmake/IceoryxPoshDeployment.cmake b/iceoryx_posh/cmake/IceoryxPoshDeployment.cmake index 864c643fed..f7dffc9e62 100644 --- a/iceoryx_posh/cmake/IceoryxPoshDeployment.cmake +++ b/iceoryx_posh/cmake/IceoryxPoshDeployment.cmake @@ -152,6 +152,8 @@ else() endif() message(STATUS "[i] IOX_EXPERIMENTAL_POSH_FLAG: ${IOX_EXPERIMENTAL_POSH_FLAG}") +message(STATUS "[i] IOX_INTERPROCESS_LOCK: ${IOX_INTERPROCESS_LOCK}") +message(STATUS "[i] IOX_INTERPROCESS_SEMAPHORE: ${IOX_INTERPROCESS_SEMAPHORE}") message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_posh configuration: >>>>>>>>>>>>>>") From 7459452fb7a58aec66d7c36293abc662d691b080 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Sun, 13 Oct 2024 20:06:43 +0200 Subject: [PATCH 02/10] iox-#1176 Add ACL feature flag --- iceoryx_platform/BUILD.bazel | 1 + .../freertos/cmake/IceoryxPlatformDeployment.cmake | 11 +++++++++++ .../freertos/cmake/platform_settings.hpp.in | 2 ++ .../linux/cmake/IceoryxPlatformDeployment.cmake | 11 +++++++++++ iceoryx_platform/linux/cmake/platform_settings.hpp.in | 2 ++ .../mac/cmake/IceoryxPlatformDeployment.cmake | 11 +++++++++++ iceoryx_platform/mac/cmake/platform_settings.hpp.in | 2 ++ .../qnx/cmake/IceoryxPlatformDeployment.cmake | 11 +++++++++++ iceoryx_platform/qnx/cmake/platform_settings.hpp.in | 2 ++ .../unix/cmake/IceoryxPlatformDeployment.cmake | 11 +++++++++++ iceoryx_platform/unix/cmake/platform_settings.hpp.in | 2 ++ .../win/cmake/IceoryxPlatformDeployment.cmake | 11 +++++++++++ iceoryx_platform/win/cmake/platform_settings.hpp.in | 2 ++ 13 files changed, 79 insertions(+) diff --git a/iceoryx_platform/BUILD.bazel b/iceoryx_platform/BUILD.bazel index 12ba0ba17e..66515e66a3 100644 --- a/iceoryx_platform/BUILD.bazel +++ b/iceoryx_platform/BUILD.bazel @@ -92,6 +92,7 @@ configure_file( "IOX_PLATFORM_LOCK_FILE_PATH_PREFIX": "/tmp/", "IOX_PLATFORM_TEMP_DIR": "/tmp/", "IOX_PLATFORM_UDS_SOCKET_PATH_PREFIX": "/tmp/", + "IOX_CFG_FEATURE_ACL": "0", }, }), ) diff --git a/iceoryx_platform/freertos/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/freertos/cmake/IceoryxPlatformDeployment.cmake index 497f3db9f3..65349ced5a 100644 --- a/iceoryx_platform/freertos/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/freertos/cmake/IceoryxPlatformDeployment.cmake @@ -34,4 +34,15 @@ configure_option( DEFAULT_VALUE "/tmp/" ) +configure_option( + NAME IOX_PLATFORM_FEATURE_ACL + DEFAULT_VALUE OFF +) + +if(IOX_PLATFORM_FEATURE_ACL) + message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") +else() + set(IOX_CFG_FEATURE_ACL "0") +endif() + message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/freertos/cmake/platform_settings.hpp.in b/iceoryx_platform/freertos/cmake/platform_settings.hpp.in index f67d17a131..8e061b1502 100644 --- a/iceoryx_platform/freertos/cmake/platform_settings.hpp.in +++ b/iceoryx_platform/freertos/cmake/platform_settings.hpp.in @@ -27,6 +27,8 @@ #define PATH_MAX (2 * NAME_MAX) #endif +#define IOX_FEATURE_ACL @IOX_CFG_FEATURE_ACL@ + namespace iox { namespace platform diff --git a/iceoryx_platform/linux/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/linux/cmake/IceoryxPlatformDeployment.cmake index 497f3db9f3..8b695eb8fe 100644 --- a/iceoryx_platform/linux/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/linux/cmake/IceoryxPlatformDeployment.cmake @@ -34,4 +34,15 @@ configure_option( DEFAULT_VALUE "/tmp/" ) +configure_option( + NAME IOX_PLATFORM_FEATURE_ACL + DEFAULT_VALUE ON +) + +if(IOX_PLATFORM_FEATURE_ACL) + set(IOX_CFG_FEATURE_ACL "1") +else() + set(IOX_CFG_FEATURE_ACL "0") +endif() + message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/linux/cmake/platform_settings.hpp.in b/iceoryx_platform/linux/cmake/platform_settings.hpp.in index 45ea283c1a..04f1a4bca5 100644 --- a/iceoryx_platform/linux/cmake/platform_settings.hpp.in +++ b/iceoryx_platform/linux/cmake/platform_settings.hpp.in @@ -19,6 +19,8 @@ #include #include +#define IOX_FEATURE_ACL @IOX_CFG_FEATURE_ACL@ + namespace iox { namespace platform diff --git a/iceoryx_platform/mac/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/mac/cmake/IceoryxPlatformDeployment.cmake index 497f3db9f3..65349ced5a 100644 --- a/iceoryx_platform/mac/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/mac/cmake/IceoryxPlatformDeployment.cmake @@ -34,4 +34,15 @@ configure_option( DEFAULT_VALUE "/tmp/" ) +configure_option( + NAME IOX_PLATFORM_FEATURE_ACL + DEFAULT_VALUE OFF +) + +if(IOX_PLATFORM_FEATURE_ACL) + message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") +else() + set(IOX_CFG_FEATURE_ACL "0") +endif() + message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/mac/cmake/platform_settings.hpp.in b/iceoryx_platform/mac/cmake/platform_settings.hpp.in index 191d086525..3cd40c27a4 100644 --- a/iceoryx_platform/mac/cmake/platform_settings.hpp.in +++ b/iceoryx_platform/mac/cmake/platform_settings.hpp.in @@ -18,6 +18,8 @@ #include +#define IOX_FEATURE_ACL @IOX_CFG_FEATURE_ACL@ + namespace iox { namespace platform diff --git a/iceoryx_platform/qnx/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/qnx/cmake/IceoryxPlatformDeployment.cmake index 171e85305f..ee40a79203 100644 --- a/iceoryx_platform/qnx/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/qnx/cmake/IceoryxPlatformDeployment.cmake @@ -34,4 +34,15 @@ configure_option( DEFAULT_VALUE "/tmp/" ) +configure_option( + NAME IOX_PLATFORM_FEATURE_ACL + DEFAULT_VALUE ON +) + +if(IOX_PLATFORM_FEATURE_ACL) + set(IOX_CFG_FEATURE_ACL "1") +else() + set(IOX_CFG_FEATURE_ACL "0") +endif() + message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/qnx/cmake/platform_settings.hpp.in b/iceoryx_platform/qnx/cmake/platform_settings.hpp.in index 481fdb3132..9d4ca5ee0d 100644 --- a/iceoryx_platform/qnx/cmake/platform_settings.hpp.in +++ b/iceoryx_platform/qnx/cmake/platform_settings.hpp.in @@ -18,6 +18,8 @@ #include +#define IOX_FEATURE_ACL @IOX_CFG_FEATURE_ACL@ + namespace iox { namespace platform diff --git a/iceoryx_platform/unix/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/unix/cmake/IceoryxPlatformDeployment.cmake index 497f3db9f3..65349ced5a 100644 --- a/iceoryx_platform/unix/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/unix/cmake/IceoryxPlatformDeployment.cmake @@ -34,4 +34,15 @@ configure_option( DEFAULT_VALUE "/tmp/" ) +configure_option( + NAME IOX_PLATFORM_FEATURE_ACL + DEFAULT_VALUE OFF +) + +if(IOX_PLATFORM_FEATURE_ACL) + message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") +else() + set(IOX_CFG_FEATURE_ACL "0") +endif() + message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/unix/cmake/platform_settings.hpp.in b/iceoryx_platform/unix/cmake/platform_settings.hpp.in index cbac71d1c7..d002394be9 100644 --- a/iceoryx_platform/unix/cmake/platform_settings.hpp.in +++ b/iceoryx_platform/unix/cmake/platform_settings.hpp.in @@ -19,6 +19,8 @@ #include #include +#define IOX_FEATURE_ACL @IOX_CFG_FEATURE_ACL@ + namespace iox { namespace platform diff --git a/iceoryx_platform/win/cmake/IceoryxPlatformDeployment.cmake b/iceoryx_platform/win/cmake/IceoryxPlatformDeployment.cmake index 2117c9a162..7bb4f51261 100644 --- a/iceoryx_platform/win/cmake/IceoryxPlatformDeployment.cmake +++ b/iceoryx_platform/win/cmake/IceoryxPlatformDeployment.cmake @@ -35,4 +35,15 @@ configure_option( DEFAULT_VALUE "" ) +configure_option( + NAME IOX_PLATFORM_FEATURE_ACL + DEFAULT_VALUE OFF +) + +if(IOX_PLATFORM_FEATURE_ACL) + message(FATAL_ERROR "ACLs are not supported on this platform! Don't use 'IOX_PLATFORM_FEATURE_ACL=ON'") +else() + set(IOX_CFG_FEATURE_ACL "0") +endif() + message(STATUS "[i] <<<<<<<<<<<<<< End iceoryx_platform configuration: >>>>>>>>>>>>>>") diff --git a/iceoryx_platform/win/cmake/platform_settings.hpp.in b/iceoryx_platform/win/cmake/platform_settings.hpp.in index 2ebaa129be..d9742acb21 100644 --- a/iceoryx_platform/win/cmake/platform_settings.hpp.in +++ b/iceoryx_platform/win/cmake/platform_settings.hpp.in @@ -18,6 +18,8 @@ #include +#define IOX_FEATURE_ACL @IOX_CFG_FEATURE_ACL@ + namespace iox { namespace platform From aa51f20213e6be4d8ac655f106c891fb678cfe2e Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Sun, 13 Oct 2024 21:23:45 +0200 Subject: [PATCH 03/10] iox-#1176 Build ACL support according to the feature flag --- iceoryx_hoofs/CMakeLists.txt | 2 +- .../posix/filesystem/source/posix_acl.cpp | 21 ++-- .../test_posix_filesystem_posix_acl.cpp | 9 +- iceoryx_platform/BUILD.bazel | 2 +- iceoryx_platform/CMakeLists.txt | 7 ++ .../freertos/include/iceoryx_platform/acl.hpp | 104 ------------------ .../include/iceoryx_platform/types.hpp | 2 + .../include/iceoryx_platform/unistd.hpp | 1 - .../include/iceoryx_platform/acl.hpp | 16 ++- .../include/iceoryx_platform/generic/acl.hpp | 87 +++++++++++++++ .../iceoryx_platform/generic/stdlib.hpp | 3 + .../generic/source/acl_feature_off.cpp | 87 +++++++++++++++ .../generic/source/acl_feature_on.cpp | 86 +++++++++++++++ .../linux/include/iceoryx_platform/types.hpp | 2 + .../linux/include/iceoryx_platform/unistd.hpp | 1 - .../mac/include/iceoryx_platform/acl.hpp | 102 ----------------- .../mac/include/iceoryx_platform/types.hpp | 2 + .../mac/include/iceoryx_platform/unistd.hpp | 1 - .../qnx/include/iceoryx_platform/acl.hpp | 22 ---- .../qnx/include/iceoryx_platform/types.hpp | 2 + .../qnx/include/iceoryx_platform/unistd.hpp | 1 - .../unix/include/iceoryx_platform/acl.hpp | 102 ----------------- .../unix/include/iceoryx_platform/types.hpp | 2 + .../unix/include/iceoryx_platform/unistd.hpp | 1 - .../win/include/iceoryx_platform/acl.hpp | 101 ----------------- 25 files changed, 309 insertions(+), 457 deletions(-) delete mode 100644 iceoryx_platform/freertos/include/iceoryx_platform/acl.hpp rename iceoryx_platform/{linux => generic}/include/iceoryx_platform/acl.hpp (64%) create mode 100644 iceoryx_platform/generic/include/iceoryx_platform/generic/acl.hpp create mode 100644 iceoryx_platform/generic/source/acl_feature_off.cpp create mode 100644 iceoryx_platform/generic/source/acl_feature_on.cpp delete mode 100644 iceoryx_platform/mac/include/iceoryx_platform/acl.hpp delete mode 100644 iceoryx_platform/qnx/include/iceoryx_platform/acl.hpp delete mode 100644 iceoryx_platform/unix/include/iceoryx_platform/acl.hpp delete mode 100644 iceoryx_platform/win/include/iceoryx_platform/acl.hpp diff --git a/iceoryx_hoofs/CMakeLists.txt b/iceoryx_hoofs/CMakeLists.txt index 7aa4487598..a9a9355bff 100644 --- a/iceoryx_hoofs/CMakeLists.txt +++ b/iceoryx_hoofs/CMakeLists.txt @@ -43,7 +43,7 @@ iox_add_library( NAMESPACE iceoryx_hoofs PROJECT_PREFIX ${PREFIX} PUBLIC_LIBS iceoryx_platform::iceoryx_platform - PRIVATE_LIBS_LINUX acl atomic ${CODE_COVERAGE_LIBS} + PRIVATE_LIBS_LINUX atomic ${CODE_COVERAGE_LIBS} BUILD_INTERFACE ${PROJECT_SOURCE_DIR}/buffer/include ${PROJECT_SOURCE_DIR}/cli/include ${PROJECT_SOURCE_DIR}/concurrent/buffer/include diff --git a/iceoryx_hoofs/posix/filesystem/source/posix_acl.cpp b/iceoryx_hoofs/posix/filesystem/source/posix_acl.cpp index 957e4c0980..69cdb58f55 100644 --- a/iceoryx_hoofs/posix/filesystem/source/posix_acl.cpp +++ b/iceoryx_hoofs/posix/filesystem/source/posix_acl.cpp @@ -64,7 +64,7 @@ bool PosixAcl::writePermissionsToFile(const int32_t fileDescriptor) const noexce } // check if acl is valid - auto aclCheckCall = IOX_POSIX_CALL(acl_valid)(workingACL.get()).successReturnValue(0).evaluate(); + auto aclCheckCall = IOX_POSIX_CALL(iox_acl_valid)(workingACL.get()).successReturnValue(0).evaluate(); if (aclCheckCall.has_error()) { @@ -73,7 +73,8 @@ bool PosixAcl::writePermissionsToFile(const int32_t fileDescriptor) const noexce } // set acl in the file given by descriptor - auto aclSetFdCall = IOX_POSIX_CALL(acl_set_fd)(fileDescriptor, workingACL.get()).successReturnValue(0).evaluate(); + auto aclSetFdCall = + IOX_POSIX_CALL(iox_acl_set_fd)(fileDescriptor, workingACL.get()).successReturnValue(0).evaluate(); if (aclSetFdCall.has_error()) { IOX_LOG(ERROR, "Error: Could not set file ACL."); @@ -86,7 +87,7 @@ bool PosixAcl::writePermissionsToFile(const int32_t fileDescriptor) const noexce expected PosixAcl::createACL(const int32_t numEntries) noexcept { // allocate memory for a new ACL - auto aclInitCall = IOX_POSIX_CALL(acl_init)(numEntries).failureReturnValue(nullptr).evaluate(); + auto aclInitCall = IOX_POSIX_CALL(iox_acl_init)(numEntries).failureReturnValue(nullptr).evaluate(); if (aclInitCall.has_error()) { @@ -95,7 +96,7 @@ expected PosixAcl::createACL(const // define how to free the memory (custom deleter for the smart pointer) function freeACL = [&](acl_t acl) { - auto aclFreeCall = IOX_POSIX_CALL(acl_free)(acl).successReturnValue(0).evaluate(); + auto aclFreeCall = IOX_POSIX_CALL(iox_acl_free)(acl).successReturnValue(0).evaluate(); // We ensure here instead of returning as this lambda will be called by unique_ptr IOX_ENFORCE(!aclFreeCall.has_error(), "Could not free ACL memory"); }; @@ -186,7 +187,7 @@ bool PosixAcl::createACLEntry(const acl_t ACL, const PermissionEntry& entry) noe acl_entry_t newEntry{}; acl_t l_ACL{ACL}; - auto aclCreateEntryCall = IOX_POSIX_CALL(acl_create_entry)(&l_ACL, &newEntry).successReturnValue(0).evaluate(); + auto aclCreateEntryCall = IOX_POSIX_CALL(iox_acl_create_entry)(&l_ACL, &newEntry).successReturnValue(0).evaluate(); if (aclCreateEntryCall.has_error()) { @@ -196,7 +197,7 @@ bool PosixAcl::createACLEntry(const acl_t ACL, const PermissionEntry& entry) noe // set tag type for new entry (user, group, ...) auto tagType = static_cast(entry.m_category); - auto aclSetTagTypeCall = IOX_POSIX_CALL(acl_set_tag_type)(newEntry, tagType).successReturnValue(0).evaluate(); + auto aclSetTagTypeCall = IOX_POSIX_CALL(iox_acl_set_tag_type)(newEntry, tagType).successReturnValue(0).evaluate(); if (aclSetTagTypeCall.has_error()) { @@ -210,7 +211,7 @@ bool PosixAcl::createACLEntry(const acl_t ACL, const PermissionEntry& entry) noe case ACL_USER: { auto aclSetQualifierCall = - IOX_POSIX_CALL(acl_set_qualifier)(newEntry, &(entry.m_id)).successReturnValue(0).evaluate(); + IOX_POSIX_CALL(iox_acl_set_qualifier)(newEntry, &(entry.m_id)).successReturnValue(0).evaluate(); if (aclSetQualifierCall.has_error()) { @@ -223,7 +224,7 @@ bool PosixAcl::createACLEntry(const acl_t ACL, const PermissionEntry& entry) noe case ACL_GROUP: { auto aclSetQualifierCall = - IOX_POSIX_CALL(acl_set_qualifier)(newEntry, &(entry.m_id)).successReturnValue(0).evaluate(); + IOX_POSIX_CALL(iox_acl_set_qualifier)(newEntry, &(entry.m_id)).successReturnValue(0).evaluate(); if (aclSetQualifierCall.has_error()) { @@ -241,7 +242,7 @@ bool PosixAcl::createACLEntry(const acl_t ACL, const PermissionEntry& entry) noe acl_permset_t entryPermissionSet{}; auto aclGetPermsetCall = - IOX_POSIX_CALL(acl_get_permset)(newEntry, &entryPermissionSet).successReturnValue(0).evaluate(); + IOX_POSIX_CALL(iox_acl_get_permset)(newEntry, &entryPermissionSet).successReturnValue(0).evaluate(); if (aclGetPermsetCall.has_error()) { @@ -280,7 +281,7 @@ bool PosixAcl::createACLEntry(const acl_t ACL, const PermissionEntry& entry) noe bool PosixAcl::addAclPermission(acl_permset_t permset, acl_perm_t perm) noexcept { - auto aclAddPermCall = IOX_POSIX_CALL(acl_add_perm)(permset, perm).successReturnValue(0).evaluate(); + auto aclAddPermCall = IOX_POSIX_CALL(iox_acl_add_perm)(permset, perm).successReturnValue(0).evaluate(); if (aclAddPermCall.has_error()) { diff --git a/iceoryx_hoofs/test/moduletests/test_posix_filesystem_posix_acl.cpp b/iceoryx_hoofs/test/moduletests/test_posix_filesystem_posix_acl.cpp index 12b4bbbd56..ef2dba5d9f 100644 --- a/iceoryx_hoofs/test/moduletests/test_posix_filesystem_posix_acl.cpp +++ b/iceoryx_hoofs/test/moduletests/test_posix_filesystem_posix_acl.cpp @@ -15,10 +15,12 @@ // // SPDX-License-Identifier: Apache-2.0 -#if defined(__linux__) +#include "iox/detail/posix_acl.hpp" + +#if IOX_FEATURE_ACL + #include "iceoryx_platform/pwd.hpp" #include "iceoryx_platform/stat.hpp" -#include "iox/detail/posix_acl.hpp" #include "iox/posix_call.hpp" #include "test.hpp" @@ -300,4 +302,5 @@ TEST_F(PosixAcl_test, addStrangeNames) EXPECT_FALSE(entryAdded); } } // namespace -#endif + +#endif // IOX_FEATURE_ACL diff --git a/iceoryx_platform/BUILD.bazel b/iceoryx_platform/BUILD.bazel index 66515e66a3..300fce60f0 100644 --- a/iceoryx_platform/BUILD.bazel +++ b/iceoryx_platform/BUILD.bazel @@ -89,10 +89,10 @@ configure_file( "IOX_PLATFORM_UDS_SOCKET_PATH_PREFIX": "", }, "//conditions:default": { + "IOX_CFG_FEATURE_ACL": "0", "IOX_PLATFORM_LOCK_FILE_PATH_PREFIX": "/tmp/", "IOX_PLATFORM_TEMP_DIR": "/tmp/", "IOX_PLATFORM_UDS_SOCKET_PATH_PREFIX": "/tmp/", - "IOX_CFG_FEATURE_ACL": "0", }, }), ) diff --git a/iceoryx_platform/CMakeLists.txt b/iceoryx_platform/CMakeLists.txt index e3a5d70782..1a46713b11 100644 --- a/iceoryx_platform/CMakeLists.txt +++ b/iceoryx_platform/CMakeLists.txt @@ -73,12 +73,19 @@ file ( GLOB_RECURSE ICEORYX_PLATFORM_FILES ${ICEORYX_PLATFORM}/source/*.cpp ) + +set(ACL_LIB) +if(IOX_PLATFORM_FEATURE_ACL) + set(ACL_LIB acl) +endif() + iox_add_library( TARGET iceoryx_platform NAMESPACE iceoryx_platform PROJECT_PREFIX ${PREFIX} EXPORT_INCLUDE_DIRS generic/include/ ${ICEORYX_PLATFORM}/include/ + PUBLIC_LIBS ${ACL_LIB} PUBLIC_LIBS_LINUX atomic rt pthread PUBLIC_LIBS_UNIX rt pthread PRIVATE_LIBS_QNX socket diff --git a/iceoryx_platform/freertos/include/iceoryx_platform/acl.hpp b/iceoryx_platform/freertos/include/iceoryx_platform/acl.hpp deleted file mode 100644 index bdf94014f4..0000000000 --- a/iceoryx_platform/freertos/include/iceoryx_platform/acl.hpp +++ /dev/null @@ -1,104 +0,0 @@ -// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. -// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. -// Copyright (c) 2023 by NXP. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// SPDX-License-Identifier: Apache-2.0 - -#ifndef IOX_HOOFS_FREERTOS_PLATFORM_ACL_HPP -#define IOX_HOOFS_FREERTOS_PLATFORM_ACL_HPP - -#include "iceoryx_platform/types.hpp" - -#define ACL_USER_OBJ 0 -#define ACL_USER 1 -#define ACL_GROUP_OBJ 2 -#define ACL_GROUP 3 -#define ACL_OTHER 4 -#define ACL_READ 5 -#define ACL_WRITE 6 -#define ACL_MASK 7 - -struct __acl_ext -{ -}; - -using acl_t = struct __acl_ext*; -using acl_permset_t = int; -using acl_perm_t = int; -using acl_entry_t = int; -using acl_tag_t = int; - -inline int acl_valid(acl_t) -{ - return 0; -} - -inline int acl_set_fd(int, acl_t) -{ - return 0; -} - -inline acl_t acl_init(int) -{ - static struct __acl_ext stub; - return &stub; -} - -inline int acl_free(void*) -{ - return 0; -} - -inline int acl_create_entry(acl_t*, acl_entry_t*) -{ - return 0; -} - -inline int acl_set_tag_type(acl_entry_t, acl_tag_t) -{ - return 0; -} - -inline int acl_set_qualifier(acl_entry_t, const void*) -{ - return 0; -} - -inline int acl_get_permset(acl_entry_t, acl_permset_t*) -{ - return 0; -} - -inline int acl_add_perm(acl_permset_t, acl_perm_t) -{ - return 0; -} - -inline char* acl_to_text(acl_t, ssize_t*) -{ - return nullptr; -} - -inline acl_t acl_from_text(const char*) -{ - return acl_t(); -} - -inline acl_t acl_get_fd(int) -{ - return acl_t(); -} - -#endif // IOX_HOOFS_FREERTOS_PLATFORM_ACL_HPP diff --git a/iceoryx_platform/freertos/include/iceoryx_platform/types.hpp b/iceoryx_platform/freertos/include/iceoryx_platform/types.hpp index 9f4d746880..ba0954a211 100644 --- a/iceoryx_platform/freertos/include/iceoryx_platform/types.hpp +++ b/iceoryx_platform/freertos/include/iceoryx_platform/types.hpp @@ -21,6 +21,8 @@ #include +using iox_ssize_t = ssize_t; + using iox_gid_t = gid_t; using iox_uid_t = uid_t; diff --git a/iceoryx_platform/freertos/include/iceoryx_platform/unistd.hpp b/iceoryx_platform/freertos/include/iceoryx_platform/unistd.hpp index 72569a1222..fdbd7a242a 100644 --- a/iceoryx_platform/freertos/include/iceoryx_platform/unistd.hpp +++ b/iceoryx_platform/freertos/include/iceoryx_platform/unistd.hpp @@ -27,7 +27,6 @@ #define IOX_SC_PAGESIZE _SC_PAGESIZE using iox_off_t = off_t; -using iox_ssize_t = ssize_t; #define IOX_F_OK F_OK #define IOX_X_OK X_OK diff --git a/iceoryx_platform/linux/include/iceoryx_platform/acl.hpp b/iceoryx_platform/generic/include/iceoryx_platform/acl.hpp similarity index 64% rename from iceoryx_platform/linux/include/iceoryx_platform/acl.hpp rename to iceoryx_platform/generic/include/iceoryx_platform/acl.hpp index 5ebf85c684..febbfa0f9e 100644 --- a/iceoryx_platform/linux/include/iceoryx_platform/acl.hpp +++ b/iceoryx_platform/generic/include/iceoryx_platform/acl.hpp @@ -1,5 +1,4 @@ -// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. -// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. +// Copyright (c) 2024 by ekxide IO GmbH. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -14,9 +13,14 @@ // limitations under the License. // // SPDX-License-Identifier: Apache-2.0 -#ifndef IOX_HOOFS_LINUX_PLATFORM_ACL_HPP -#define IOX_HOOFS_LINUX_PLATFORM_ACL_HPP -#include +#ifndef IOX_PLATFORM_ACL_HPP +#define IOX_PLATFORM_ACL_HPP -#endif // IOX_HOOFS_LINUX_PLATFORM_ACL_HPP +#if __has_include("iceoryx_platform/override/acl.hpp") +#include "iceoryx_platform/override/acl.hpp" +#else +#include "iceoryx_platform/generic/acl.hpp" +#endif // __has_include + +#endif // IOX_PLATFORM_ACL_HPP diff --git a/iceoryx_platform/generic/include/iceoryx_platform/generic/acl.hpp b/iceoryx_platform/generic/include/iceoryx_platform/generic/acl.hpp new file mode 100644 index 0000000000..7b85c0e4b7 --- /dev/null +++ b/iceoryx_platform/generic/include/iceoryx_platform/generic/acl.hpp @@ -0,0 +1,87 @@ +// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. +// Copyright (c) 2024 by ekxide IO GmbH. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +#ifndef IOX_HOOFS_GENERIC_PLATFORM_ACL_HPP +#define IOX_HOOFS_GENERIC_PLATFORM_ACL_HPP + +#include "iceoryx_platform/platform_settings.hpp" +#include "iceoryx_platform/types.hpp" + +// NOTE: The functions can be individually overwritten by setting the corresponding 'IOX_PLATFORM_OVERRIDE_*' define in +// the respective platform specific 'override/*.h' header + + +#ifndef IOX_PLATFORM_OVERRIDE_ACL_ALL + +#if IOX_FEATURE_ACL + +#include + +#else + +// NOLINTBEGIN(cppcoreguidelines-macro-usage) Macros are required for compatibility with the ones from acl.h + +#define ACL_USER_OBJ 0 +#define ACL_USER 1 +#define ACL_GROUP_OBJ 2 +#define ACL_GROUP 3 +#define ACL_OTHER 4 +#define ACL_READ 5 +#define ACL_WRITE 6 +#define ACL_MASK 7 + +// NOLINTEND(cppcoreguidelines-macro-usage) + +struct iox_internal_acl_ext +{ +}; + +using acl_t = struct iox_internal_acl_ext*; +using acl_permset_t = int; +using acl_perm_t = int; +using acl_entry_t = int; +using acl_tag_t = int; + +#endif // IOX_FEATURE_ACL + +#endif // IOX_PLATFORM_OVERRIDE_ACL_ALL + +int iox_acl_valid(acl_t /*acl*/); + +int iox_acl_set_fd(int /*fd*/, acl_t /*acl*/); + +acl_t iox_acl_init(int /*count*/); + +int iox_acl_free(void* /*obj_p*/); + +int iox_acl_create_entry(acl_t* /*acl_p*/, acl_entry_t* /*entry_p*/); + +int iox_acl_set_tag_type(acl_entry_t /*entry_d*/, acl_tag_t /*tag_type*/); + +int iox_acl_set_qualifier(acl_entry_t /*entry_d*/, const void* /*qualifier_p*/); + +int iox_acl_get_permset(acl_entry_t /*entry_d*/, acl_permset_t* /*permset_p*/); + +int iox_acl_add_perm(acl_permset_t /*permset_d*/, acl_perm_t /*perm*/); + +char* iox_acl_to_text(acl_t /*acl*/, iox_ssize_t* /*len_p*/); + +acl_t iox_acl_from_text(const char* /*buf_p*/); + +acl_t iox_acl_get_fd(int /*fd*/); + +#endif // IOX_HOOFS_GENERIC_PLATFORM_ACL_HPP diff --git a/iceoryx_platform/generic/include/iceoryx_platform/generic/stdlib.hpp b/iceoryx_platform/generic/include/iceoryx_platform/generic/stdlib.hpp index 1dbf7ee149..024fe5b3c5 100644 --- a/iceoryx_platform/generic/include/iceoryx_platform/generic/stdlib.hpp +++ b/iceoryx_platform/generic/include/iceoryx_platform/generic/stdlib.hpp @@ -19,6 +19,9 @@ #include +// NOTE: The functions can be individually overwritten by setting the corresponding 'IOX_PLATFORM_OVERRIDE_*' define in +// the respective platform specific 'override/*.h' header + /// @brief Implementation of 'getenv_s' /// @param[out] actual_size_with_null of the value of the env variable including null-termination or 0 if the /// environment variable does not exist diff --git a/iceoryx_platform/generic/source/acl_feature_off.cpp b/iceoryx_platform/generic/source/acl_feature_off.cpp new file mode 100644 index 0000000000..61b374f23e --- /dev/null +++ b/iceoryx_platform/generic/source/acl_feature_off.cpp @@ -0,0 +1,87 @@ +// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. +// Copyright (c) 2024 by ekxide IO GmbH. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +#include "iceoryx_platform/acl.hpp" + +#ifndef IOX_PLATFORM_OVERRIDE_ACL_ALL + +#if !IOX_FEATURE_ACL + +int iox_acl_valid(acl_t /*acl*/) +{ + return 0; +} + +int iox_acl_set_fd(int /*fd*/, acl_t /*acl*/) +{ + return 0; +} + +acl_t iox_acl_init(int /*count*/) +{ + static struct iox_internal_acl_ext stub; + return &stub; +} + +int iox_acl_free(void* /*obj_p*/) +{ + return 0; +} + +int iox_acl_create_entry(acl_t* /*acl_p*/, acl_entry_t* /*entry_p*/) +{ + return 0; +} + +int iox_acl_set_tag_type(acl_entry_t /*entry_d*/, acl_tag_t /*tag_type*/) +{ + return 0; +} + +int iox_acl_set_qualifier(acl_entry_t /*entry_d*/, const void* /*qualifier_p*/) +{ + return 0; +} + +int iox_acl_get_permset(acl_entry_t /*entry_d*/, acl_permset_t* /*permset_p*/) +{ + return 0; +} + +int iox_acl_add_perm(acl_permset_t /*permset_d*/, acl_perm_t /*perm*/) +{ + return 0; +} + +char* iox_acl_to_text(acl_t /*acl*/, iox_ssize_t* /*len_p*/) +{ + return nullptr; +} + +acl_t iox_acl_from_text(const char* /*buf_p*/) +{ + return acl_t(); +} + +acl_t iox_acl_get_fd(int /*fd*/) +{ + return acl_t(); +} + +#endif // !IOX_FEATURE_ACL + +#endif // IOX_PLATFORM_OVERRIDE_ACL_ALL diff --git a/iceoryx_platform/generic/source/acl_feature_on.cpp b/iceoryx_platform/generic/source/acl_feature_on.cpp new file mode 100644 index 0000000000..4261a32774 --- /dev/null +++ b/iceoryx_platform/generic/source/acl_feature_on.cpp @@ -0,0 +1,86 @@ +// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. +// Copyright (c) 2024 by ekxide IO GmbH. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// SPDX-License-Identifier: Apache-2.0 + +#include "iceoryx_platform/acl.hpp" + +#ifndef IOX_PLATFORM_OVERRIDE_ACL_ALL + +#if IOX_FEATURE_ACL + +int iox_acl_valid(acl_t acl) +{ + return acl_valid(acl); +} + +int iox_acl_set_fd(int fd, acl_t acl) +{ + return acl_set_fd(fd, acl); +} + +acl_t iox_acl_init(int count) +{ + return acl_init(count); +} + +int iox_acl_free(void* obj_p) +{ + return acl_free(obj_p); +} + +int iox_acl_create_entry(acl_t* acl_p, acl_entry_t* entry_p) +{ + return acl_create_entry(acl_p, entry_p); +} + +int iox_acl_set_tag_type(acl_entry_t entry_d, acl_tag_t tag_type) +{ + return acl_set_tag_type(entry_d, tag_type); +} + +int iox_acl_set_qualifier(acl_entry_t entry_d, const void* qualifier_p) +{ + return acl_set_qualifier(entry_d, qualifier_p); +} + +int iox_acl_get_permset(acl_entry_t entry_d, acl_permset_t* permset_p) +{ + return acl_get_permset(entry_d, permset_p); +} + +int iox_acl_add_perm(acl_permset_t permset_d, acl_perm_t perm) +{ + return acl_add_perm(permset_d, perm); +} + +char* iox_acl_to_text(acl_t acl, iox_ssize_t* len_p) +{ + return acl_to_text(acl, len_p); +} + +acl_t iox_acl_from_text(const char* buf_p) +{ + return acl_from_text(buf_p); +} + +acl_t iox_acl_get_fd(int fd) +{ + return acl_get_fd(fd); +} + +#endif // IOX_FEATURE_ACL + +#endif // IOX_PLATFORM_OVERRIDE_ACL_ALL diff --git a/iceoryx_platform/linux/include/iceoryx_platform/types.hpp b/iceoryx_platform/linux/include/iceoryx_platform/types.hpp index 3b247b4be5..f4d7d99c6d 100644 --- a/iceoryx_platform/linux/include/iceoryx_platform/types.hpp +++ b/iceoryx_platform/linux/include/iceoryx_platform/types.hpp @@ -19,6 +19,8 @@ #include +using iox_ssize_t = ssize_t; + using iox_gid_t = gid_t; using iox_uid_t = uid_t; diff --git a/iceoryx_platform/linux/include/iceoryx_platform/unistd.hpp b/iceoryx_platform/linux/include/iceoryx_platform/unistd.hpp index 3f69ac9239..d389b540cd 100644 --- a/iceoryx_platform/linux/include/iceoryx_platform/unistd.hpp +++ b/iceoryx_platform/linux/include/iceoryx_platform/unistd.hpp @@ -25,7 +25,6 @@ #define IOX_SC_PAGESIZE _SC_PAGESIZE using iox_off_t = off_t; -using iox_ssize_t = ssize_t; #define IOX_F_OK F_OK #define IOX_X_OK X_OK diff --git a/iceoryx_platform/mac/include/iceoryx_platform/acl.hpp b/iceoryx_platform/mac/include/iceoryx_platform/acl.hpp deleted file mode 100644 index 2811f4e518..0000000000 --- a/iceoryx_platform/mac/include/iceoryx_platform/acl.hpp +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. -// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// SPDX-License-Identifier: Apache-2.0 -#ifndef IOX_HOOFS_MAC_PLATFORM_ACL_HPP -#define IOX_HOOFS_MAC_PLATFORM_ACL_HPP - -#include "iceoryx_platform/types.hpp" - -#define ACL_USER_OBJ 0 -#define ACL_USER 1 -#define ACL_GROUP_OBJ 2 -#define ACL_GROUP 3 -#define ACL_OTHER 4 -#define ACL_READ 5 -#define ACL_WRITE 6 -#define ACL_MASK 7 - -struct __acl_ext -{ -}; - -using acl_t = struct __acl_ext*; -using acl_permset_t = int; -using acl_perm_t = int; -using acl_entry_t = int; -using acl_tag_t = int; - -inline int acl_valid(acl_t) -{ - return 0; -} - -inline int acl_set_fd(int, acl_t) -{ - return 0; -} - -inline acl_t acl_init(int) -{ - static struct __acl_ext stub; - return &stub; -} - -inline int acl_free(void*) -{ - return 0; -} - -inline int acl_create_entry(acl_t*, acl_entry_t*) -{ - return 0; -} - -inline int acl_set_tag_type(acl_entry_t, acl_tag_t) -{ - return 0; -} - -inline int acl_set_qualifier(acl_entry_t, const void*) -{ - return 0; -} - -inline int acl_get_permset(acl_entry_t, acl_permset_t*) -{ - return 0; -} - -inline int acl_add_perm(acl_permset_t, acl_perm_t) -{ - return 0; -} - -inline char* acl_to_text(acl_t, ssize_t*) -{ - return nullptr; -} - -inline acl_t acl_from_text(const char*) -{ - return acl_t(); -} - -inline acl_t acl_get_fd(int) -{ - return acl_t(); -} - -#endif // IOX_HOOFS_MAC_PLATFORM_ACL_HPP diff --git a/iceoryx_platform/mac/include/iceoryx_platform/types.hpp b/iceoryx_platform/mac/include/iceoryx_platform/types.hpp index 0c3929f71a..b066f3ebc7 100644 --- a/iceoryx_platform/mac/include/iceoryx_platform/types.hpp +++ b/iceoryx_platform/mac/include/iceoryx_platform/types.hpp @@ -19,6 +19,8 @@ #include +using iox_ssize_t = ssize_t; + using iox_gid_t = gid_t; using iox_uid_t = uid_t; diff --git a/iceoryx_platform/mac/include/iceoryx_platform/unistd.hpp b/iceoryx_platform/mac/include/iceoryx_platform/unistd.hpp index 6b7947f2b9..c571274164 100644 --- a/iceoryx_platform/mac/include/iceoryx_platform/unistd.hpp +++ b/iceoryx_platform/mac/include/iceoryx_platform/unistd.hpp @@ -25,7 +25,6 @@ #define IOX_SC_PAGESIZE _SC_PAGESIZE using iox_off_t = off_t; -using iox_ssize_t = ssize_t; #define IOX_F_OK F_OK #define IOX_X_OK X_OK diff --git a/iceoryx_platform/qnx/include/iceoryx_platform/acl.hpp b/iceoryx_platform/qnx/include/iceoryx_platform/acl.hpp deleted file mode 100644 index cd3a8420c8..0000000000 --- a/iceoryx_platform/qnx/include/iceoryx_platform/acl.hpp +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. -// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// SPDX-License-Identifier: Apache-2.0 -#ifndef IOX_HOOFS_QNX_PLATFORM_ACL_HPP -#define IOX_HOOFS_QNX_PLATFORM_ACL_HPP - -#include - -#endif // IOX_HOOFS_QNX_PLATFORM_ACL_HPP diff --git a/iceoryx_platform/qnx/include/iceoryx_platform/types.hpp b/iceoryx_platform/qnx/include/iceoryx_platform/types.hpp index b90aa4b9ea..258fc2b13a 100644 --- a/iceoryx_platform/qnx/include/iceoryx_platform/types.hpp +++ b/iceoryx_platform/qnx/include/iceoryx_platform/types.hpp @@ -19,6 +19,8 @@ #include +using iox_ssize_t = ssize_t; + using iox_gid_t = gid_t; using iox_uid_t = uid_t; diff --git a/iceoryx_platform/qnx/include/iceoryx_platform/unistd.hpp b/iceoryx_platform/qnx/include/iceoryx_platform/unistd.hpp index 2a699e5b31..8c0f682bf0 100644 --- a/iceoryx_platform/qnx/include/iceoryx_platform/unistd.hpp +++ b/iceoryx_platform/qnx/include/iceoryx_platform/unistd.hpp @@ -25,7 +25,6 @@ #define IOX_SC_PAGESIZE _SC_PAGESIZE using iox_off_t = off_t; -using iox_ssize_t = ssize_t; #define IOX_F_OK F_OK #define IOX_X_OK X_OK diff --git a/iceoryx_platform/unix/include/iceoryx_platform/acl.hpp b/iceoryx_platform/unix/include/iceoryx_platform/acl.hpp deleted file mode 100644 index 3ea81d2215..0000000000 --- a/iceoryx_platform/unix/include/iceoryx_platform/acl.hpp +++ /dev/null @@ -1,102 +0,0 @@ -// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. -// Copyright (c) 2021 by Apex.AI Inc. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// SPDX-License-Identifier: Apache-2.0 -#ifndef IOX_HOOFS_UNIX_PLATFORM_ACL_HPP -#define IOX_HOOFS_UNIX_PLATFORM_ACL_HPP - -#include "iceoryx_platform/types.hpp" - -#define ACL_USER_OBJ 0 -#define ACL_USER 1 -#define ACL_GROUP_OBJ 2 -#define ACL_GROUP 3 -#define ACL_OTHER 4 -#define ACL_READ 5 -#define ACL_WRITE 6 -#define ACL_MASK 7 - -struct __acl_ext -{ -}; - -using acl_t = struct __acl_ext*; -using acl_permset_t = int; -using acl_perm_t = int; -using acl_entry_t = int; -using acl_tag_t = int; - -inline int acl_valid(acl_t) -{ - return 0; -} - -inline int acl_set_fd(int, acl_t) -{ - return 0; -} - -inline acl_t acl_init(int) -{ - static struct __acl_ext stub; - return &stub; -} - -inline int acl_free(void*) -{ - return 0; -} - -inline int acl_create_entry(acl_t*, acl_entry_t*) -{ - return 0; -} - -inline int acl_set_tag_type(acl_entry_t, acl_tag_t) -{ - return 0; -} - -inline int acl_set_qualifier(acl_entry_t, const void*) -{ - return 0; -} - -inline int acl_get_permset(acl_entry_t, acl_permset_t*) -{ - return 0; -} - -inline int acl_add_perm(acl_permset_t, acl_perm_t) -{ - return 0; -} - -inline char* acl_to_text(acl_t, ssize_t*) -{ - return nullptr; -} - -inline acl_t acl_from_text(const char*) -{ - return acl_t(); -} - -inline acl_t acl_get_fd(int) -{ - return acl_t(); -} - -#endif // IOX_HOOFS_UNIX_PLATFORM_ACL_HPP diff --git a/iceoryx_platform/unix/include/iceoryx_platform/types.hpp b/iceoryx_platform/unix/include/iceoryx_platform/types.hpp index 612942deab..9d20e65743 100644 --- a/iceoryx_platform/unix/include/iceoryx_platform/types.hpp +++ b/iceoryx_platform/unix/include/iceoryx_platform/types.hpp @@ -19,6 +19,8 @@ #include +using iox_ssize_t = ssize_t; + using iox_gid_t = gid_t; using iox_uid_t = uid_t; diff --git a/iceoryx_platform/unix/include/iceoryx_platform/unistd.hpp b/iceoryx_platform/unix/include/iceoryx_platform/unistd.hpp index cd4b959c3a..1bbfaeb227 100644 --- a/iceoryx_platform/unix/include/iceoryx_platform/unistd.hpp +++ b/iceoryx_platform/unix/include/iceoryx_platform/unistd.hpp @@ -25,7 +25,6 @@ #define IOX_SC_PAGESIZE _SC_PAGESIZE using iox_off_t = off_t; -using iox_ssize_t = ssize_t; #define IOX_F_OK F_OK #define IOX_X_OK X_OK diff --git a/iceoryx_platform/win/include/iceoryx_platform/acl.hpp b/iceoryx_platform/win/include/iceoryx_platform/acl.hpp deleted file mode 100644 index 8d69c5e08a..0000000000 --- a/iceoryx_platform/win/include/iceoryx_platform/acl.hpp +++ /dev/null @@ -1,101 +0,0 @@ -// Copyright (c) 2020 by Robert Bosch GmbH. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -// SPDX-License-Identifier: Apache-2.0 -#ifndef IOX_HOOFS_WIN_PLATFORM_ACL_HPP -#define IOX_HOOFS_WIN_PLATFORM_ACL_HPP - -#include "iceoryx_platform/types.hpp" - -#define ACL_USER_OBJ 0 -#define ACL_USER 1 -#define ACL_GROUP_OBJ 2 -#define ACL_GROUP 3 -#define ACL_OTHER 4 -#define ACL_READ 5 -#define ACL_WRITE 6 -#define ACL_MASK 7 - -struct __acl_ext -{ -}; - -using acl_t = struct __acl_ext*; -using acl_permset_t = int; -using acl_perm_t = int; -using acl_entry_t = int; -using acl_tag_t = int; - -inline int acl_valid(acl_t acl) -{ - return 0; -} - -inline int acl_set_fd(int fd, acl_t acl) -{ - return 0; -} - -inline acl_t acl_init(int count) -{ - static struct __acl_ext stub; - return &stub; -} - -inline int acl_free(void*) -{ - return 0; -} - -inline int acl_create_entry(acl_t* acl_p, acl_entry_t* entry_p) -{ - return 0; -} - -inline int acl_set_tag_type(acl_entry_t entry_d, acl_tag_t tag_type) -{ - return 0; -} - -inline int acl_set_qualifier(acl_entry_t entry_d, const void* qualifier_p) -{ - return 0; -} - -inline int acl_get_permset(acl_entry_t entry_d, acl_permset_t* permset_p) -{ - return 0; -} - -inline int acl_add_perm(acl_permset_t permset_d, acl_perm_t perm) -{ - return 0; -} - -inline char* acl_to_text(acl_t acl, iox_ssize_t* len_p) -{ - return nullptr; -} - -inline acl_t acl_from_text(const char* buf_p) -{ - return acl_t(); -} - -inline acl_t acl_get_fd(int fd) -{ - return acl_t(); -} - -#endif // IOX_HOOFS_WIN_PLATFORM_ACL_HPP From 480caa59238630be719c5af2f56ee87fa8715494 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Mon, 14 Oct 2024 00:40:44 +0200 Subject: [PATCH 04/10] iox-#1176 Pin the intergration tests and coverage CI to Ubuntu 22.04 --- .github/workflows/build-test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 00f9876bf1..d718cd30c0 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -119,7 +119,7 @@ jobs: run-integration-test: # prevent stuck jobs consuming runners for 6 hours timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: pre-flight-check steps: - name: Setup ROS @@ -219,7 +219,7 @@ jobs: coverage-and-docs: # prevent stuck jobs consuming runners for 6 hours timeout-minutes: 60 - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 needs: pre-flight-check steps: - uses: actions/checkout@v4 From f0978b3cd78f62e5a285e19c709118e06c6e824f Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Mon, 14 Oct 2024 18:19:54 +0200 Subject: [PATCH 05/10] iox-#1176 Add ACL feature flag to bazel --- .bazelrc | 8 +++++ BUILD.bazel | 6 ++++ MODULE.bazel | 1 + bazel/configure_file.bzl | 6 ++-- iceoryx_hoofs/BUILD.bazel | 7 ++-- iceoryx_platform/BUILD.bazel | 63 ++++++++++++++++++++++++++++++++++-- iceoryx_posh/BUILD.bazel | 2 +- 7 files changed, 84 insertions(+), 9 deletions(-) diff --git a/.bazelrc b/.bazelrc index 5f02e04daf..5ad9311a32 100644 --- a/.bazelrc +++ b/.bazelrc @@ -37,3 +37,11 @@ build:tsan --linkopt="-fsanitize=thread" # tsan clang build:clang_tsan --config=clang --config=tsan + +# +# feature flags +# + +# value [auto, on, off] +# 'auto' is platform dependent ('on' on Linux and QNX, 'off' on other OS) and the default value if the flag is not set +#build --//:feature_acl=off diff --git a/BUILD.bazel b/BUILD.bazel index b625064181..530eea0423 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -44,6 +44,12 @@ alias( visibility = ["//visibility:public"], ) +alias( + name = "feature_acl", + actual = "//iceoryx_platform:feature_acl", + visibility = ["//visibility:public"], +) + # Execute `bazel run //:buildifier` to fix formating of all starlark files in the workspace buildifier( name = "buildifier", diff --git a/MODULE.bazel b/MODULE.bazel index 5bf9dc7e76..bb065793c6 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -3,6 +3,7 @@ module( version = "2.95.0", ) +bazel_dep(name = "bazel_skylib", version = "1.7.1") bazel_dep(name = "cpptoml", version = "0.1.1") bazel_dep(name = "platforms", version = "0.0.10") bazel_dep(name = "rules_cc", version = "0.0.9") diff --git a/bazel/configure_file.bzl b/bazel/configure_file.bzl index 9f15bed069..9f5a376d77 100644 --- a/bazel/configure_file.bzl +++ b/bazel/configure_file.bzl @@ -19,12 +19,13 @@ The configure_file rule imitates the similar CMake function for template expansi """ def _configure_file_impl(ctx): + config_all = dict(ctx.attr.config_constants, **ctx.attr.config_acl) ctx.actions.expand_template( template = ctx.file.src, output = ctx.outputs.out, substitutions = { "@" + k + "@": v - for k, v in ctx.attr.config.items() + for k, v in config_all.items() }, ) files = depset(direct = [ctx.outputs.out]) @@ -35,7 +36,8 @@ configure_file = rule( implementation = _configure_file_impl, provides = [DefaultInfo], attrs = { - "config": attr.string_dict(mandatory = True), + "config_acl": attr.string_dict(mandatory = False), + "config_constants": attr.string_dict(mandatory = True), "out": attr.output(mandatory = True), "src": attr.label(mandatory = True, allow_single_file = True), }, diff --git a/iceoryx_hoofs/BUILD.bazel b/iceoryx_hoofs/BUILD.bazel index 2213a10803..c299dad6b5 100644 --- a/iceoryx_hoofs/BUILD.bazel +++ b/iceoryx_hoofs/BUILD.bazel @@ -21,7 +21,7 @@ configure_file( name = "iceoryx_hoofs_deployment_hpp", src = "cmake/iceoryx_hoofs_deployment.hpp.in", out = "generated/include/iox/iceoryx_hoofs_deployment.hpp", - config = { + config_constants = { "IOX_MAX_NAMED_PIPE_MESSAGE_SIZE": "4096", "IOX_MAX_NAMED_PIPE_NUMBER_OF_MESSAGES": "10", # FIXME: for values see "iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake" ... for now some nice defaults @@ -84,14 +84,13 @@ cc_library( linkopts = select({ "//iceoryx_platform:linux-clang": [ "-latomic", - "-lacl", ], - "//iceoryx_platform:linux-gcc": ["-lacl"], + "//iceoryx_platform:linux-gcc": [], "//iceoryx_platform:mac": [], "//iceoryx_platform:qnx": [], "//iceoryx_platform:unix": [], "//iceoryx_platform:win": [], - "//conditions:default": ["-lacl"], + "//conditions:default": [], }), visibility = ["//visibility:public"], deps = ["//iceoryx_platform"], diff --git a/iceoryx_platform/BUILD.bazel b/iceoryx_platform/BUILD.bazel index 300fce60f0..6a98311dd9 100644 --- a/iceoryx_platform/BUILD.bazel +++ b/iceoryx_platform/BUILD.bazel @@ -14,6 +14,8 @@ # # SPDX-License-Identifier: Apache-2.0 +load("@bazel_skylib//lib:selects.bzl", "selects") +load("@bazel_skylib//rules:common_settings.bzl", "string_flag") load("@rules_cc//cc:defs.bzl", "cc_library") load("//bazel:configure_file.bzl", "configure_file") load("//bazel:configure_version.bzl", "configure_version") @@ -65,6 +67,51 @@ configure_version( version_from = "//:VERSION", ) +string_flag( + name = "feature_acl", + build_setting_default = "auto", + visibility = ["//visibility:public"], +) + +config_setting( + name = "acl_auto", + flag_values = { + ":feature_acl": "auto", + }, +) + +config_setting( + name = "acl_enabled", + flag_values = { + ":feature_acl": "on", + }, +) + +selects.config_setting_group( + name = "acl_linux_enabled", + match_all = [ + ":linux", + ":acl_auto", + ], +) + +selects.config_setting_group( + name = "acl_qnx_enabled", + match_all = [ + ":qnx", + ":acl_auto", + ], +) + +selects.config_setting_group( + name = "cfg_feature_acl", + match_any = [ + ":acl_enabled", + ":acl_linux_enabled", + ":acl_qnx_enabled", + ], +) + configure_file( name = "platform_settings_hpp", src = select({ @@ -76,7 +123,15 @@ configure_file( "//conditions:default": "linux/cmake/platform_settings.hpp.in", }), out = "generated/include/iceoryx_platform/platform_settings.hpp", - config = select({ + config_acl = select({ + ":cfg_feature_acl": { + "IOX_CFG_FEATURE_ACL": "1", + }, + "//conditions:default": { + "IOX_CFG_FEATURE_ACL": "0", + }, + }), + config_constants = select({ ":qnx": { "IOX_PLATFORM_LOCK_FILE_PATH_PREFIX": "/var/lock/", "IOX_PLATFORM_TEMP_DIR": "/tmp/", @@ -89,7 +144,6 @@ configure_file( "IOX_PLATFORM_UDS_SOCKET_PATH_PREFIX": "", }, "//conditions:default": { - "IOX_CFG_FEATURE_ACL": "0", "IOX_PLATFORM_LOCK_FILE_PATH_PREFIX": "/tmp/", "IOX_PLATFORM_TEMP_DIR": "/tmp/", "IOX_PLATFORM_UDS_SOCKET_PATH_PREFIX": "/tmp/", @@ -163,6 +217,11 @@ cc_library( "-lpthread", "-lrt", ], + }) + select({ + ":cfg_feature_acl": [ + "-lacl", + ], + "//conditions:default": [], }), visibility = ["//visibility:public"], deps = [], diff --git a/iceoryx_posh/BUILD.bazel b/iceoryx_posh/BUILD.bazel index a86d67e738..ec1e742431 100644 --- a/iceoryx_posh/BUILD.bazel +++ b/iceoryx_posh/BUILD.bazel @@ -25,7 +25,7 @@ configure_file( name = "iceoryx_posh_deployment_hpp", src = "cmake/iceoryx_posh_deployment.hpp.in", out = "include/iceoryx_posh/iceoryx_posh_deployment.hpp", - config = select({ + config_constants = select({ # FIXME: for values see "iceoryx_posh/cmake/IceoryxPoshDeployment.cmake" ... for now some nice defaults "@platforms//os:macos": { "IOX_COMMUNICATION_POLICY": "ManyToManyPolicy", From 316a3da46037ee8e5f6bd16e50f0e2a4c06d91d0 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Mon, 14 Oct 2024 18:41:31 +0200 Subject: [PATCH 06/10] iox-#1176 Add documentation for ACL feature flag --- doc/website/advanced/configuration-guide.md | 40 +++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/doc/website/advanced/configuration-guide.md b/doc/website/advanced/configuration-guide.md index ea8ea7b0a7..3e38db4275 100644 --- a/doc/website/advanced/configuration-guide.md +++ b/doc/website/advanced/configuration-guide.md @@ -39,6 +39,46 @@ With that change, the footprint of the management segment is reduced to ~52.7 MB For larger use cases you can increase the value to avoid that samples are dropped on the subscriber side (see also [#615](https://github.com/eclipse-iceoryx/iceoryx/issues/615)). +## ACL Feature Flag + +The ACL (Access Control List) feature is enabled by default on Linux and QNX platforms. +If you want to disable this feature, you can control it through a build option. + +### Using CMake + +To disable the ACL feature in a CMake build, pass the following flag when configuring the project: + +``` +-DIOX_PLATFORM_FEATURE_ACL=OFF +``` + +### Using Bazel + +To disable the ACL feature in a Bazel build, use the following flag: +``` +--//:feature_acl=off +``` + +For example: +``` +bazel build --//:feature_acl=off //... +``` + +Alternatively, you can persist this setting in a `.bazelrc` file to apply it automatically in all builds: +``` +build --//:feature_acl=off +``` + +This way, the ACL feature is disabled across builds without needing to pass the flag manually each time. + +> [!NOTE] +> When using this flag in an external repository, you must prefix it with the repository's target name. For example: +> ``` +> --@iceoryx//:feature_acl=off +> ``` +> +> This ensures that the flag is applied to the correct target from the imported repository. + ## Configuring Mempools for RouDi RouDi supports several shared memory segments with different access rights, to From 5b7b4778cb2aacba58f29455da8d3f578e9cec3a Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Mon, 14 Oct 2024 18:42:46 +0200 Subject: [PATCH 07/10] iox-#1176 Update release notes --- doc/website/release-notes/iceoryx-unreleased.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/website/release-notes/iceoryx-unreleased.md b/doc/website/release-notes/iceoryx-unreleased.md index e568e1e911..a892d7be2f 100644 --- a/doc/website/release-notes/iceoryx-unreleased.md +++ b/doc/website/release-notes/iceoryx-unreleased.md @@ -69,6 +69,7 @@ - Improve introspection-client interface by adding the number of ports in parentheses [#2299](https://github.com/eclipse-iceoryx/iceoryx/issues/2299) - Add std::atomic abstraction [#2329](https://github.com/eclipse-iceoryx/iceoryx/issues/2329) - Port iceoryx to bzlmod [#2325](https://github.com/eclipse-iceoryx/iceoryx/issues/2325) +- Make ACL support optional [#1176](https://github.com/eclipse-iceoryx/iceoryx/issues/1176) **Bugfixes:** From 4d47226c3208999673324c42310b48d64bf22f4b Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 15 Oct 2024 00:15:15 +0200 Subject: [PATCH 08/10] iox-#1176 Use Cirrus Build ID for Cirrus CI test binary cache --- .cirrus.yaml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.cirrus.yaml b/.cirrus.yaml index 56447d7d39..bee247e06e 100644 --- a/.cirrus.yaml +++ b/.cirrus.yaml @@ -126,7 +126,7 @@ ubuntu_22_04_aarch64_build_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: true - fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache_${CIRRUS_BUILD_ID} build_script: <<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_ADDITIONAL_USER populate_test_binary_folder_script: @@ -141,7 +141,7 @@ ubuntu_22_04_aarch64_test_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: false - fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache_${CIRRUS_BUILD_ID} test_script: <<: *IOX_RUN_TESTS @@ -158,7 +158,7 @@ arch_linux_x64_gcc_8_3_aka_qnx_canary_build_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: true - fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache_${CIRRUS_BUILD_ID} env: # use GCC 8.3 which corresponds to QCC 8.3 on QNX 7.1 CC: gcc-8 @@ -177,7 +177,7 @@ arch_linux_x64_gcc_8_3_aka_qnx_canary_test_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: false - fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache_${CIRRUS_BUILD_ID} test_script: <<: *IOX_RUN_TESTS @@ -195,7 +195,7 @@ arch_linux_x64_build_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: true - fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache_${CIRRUS_BUILD_ID} build_script: <<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_ADDITIONAL_USER populate_test_binary_folder_script: @@ -211,7 +211,7 @@ arch_linux_x64_test_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: false - fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache_${CIRRUS_BUILD_ID} test_script: <<: *IOX_RUN_TESTS @@ -229,7 +229,7 @@ freebsd_x64_build_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: true - fingerprint_key: $CIRRUS_OS_freebsd_x64_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_freebsd_x64_test_binaries_cache_${CIRRUS_BUILD_ID} setup_script: - pkg install -y cmake git ncurses bash wget - ln -s /usr/local/bin/bash /bin/bash @@ -248,7 +248,7 @@ freebsd_x64_test_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: false - fingerprint_key: $CIRRUS_OS_freebsd_x64_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_freebsd_x64_test_binaries_cache_${CIRRUS_BUILD_ID} test_script: <<: *IOX_RUN_TESTS @@ -266,7 +266,7 @@ macos_aarch64_build_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: true - fingerprint_key: $CIRRUS_OS_macOS_aarch64_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_macOS_aarch64_test_binaries_cache_${CIRRUS_BUILD_ID} setup_script: - brew install ncurses build_script: @@ -284,7 +284,7 @@ macos_aarch64_test_task: test_binaries_cache: folder: iox-tests-bin reupload_on_changes: false - fingerprint_key: $CIRRUS_OS_macOS_aarch64_test_binaries_cache_$CIRRUS_BRANCH + fingerprint_key: $CIRRUS_OS_macOS_aarch64_test_binaries_cache_${CIRRUS_BUILD_ID} env: # No timing tests on macOS GTEST_FILTER: "-*TimingTest*" From 8ccb733c18133cf8fd1cd3c131464ccc448ff53c Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 15 Oct 2024 01:45:26 +0200 Subject: [PATCH 09/10] iox-#1176 Add gnu.org/software/screen to linkchecker ignore lists ('Too Many Requests' Error) --- .lycheeignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.lycheeignore b/.lycheeignore index fba2101f45..53dcddd963 100644 --- a/.lycheeignore +++ b/.lycheeignore @@ -1,5 +1,6 @@ https://github.com/eclipse-iceoryx/iceoryx/compare/vx.x.x...vx.x.x https://github.com/eclipse-iceoryx/iceoryx/tree/vx.x.x https://www.misra.org.uk/ +https://www.gnu.org/software/screen/ iceoryx-dev@eclipse.org From 4356597cefcaff3c1dff08a98cdcde5d18b9d4a1 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 15 Oct 2024 13:05:54 +0200 Subject: [PATCH 10/10] iox-#1176 Improve compatibility with bazel 6.2 --- BUILD.bazel | 14 ++++++++------ iceoryx_platform/BUILD.bazel | 11 ++--------- 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/BUILD.bazel b/BUILD.bazel index 530eea0423..a43f9a1021 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -14,12 +14,20 @@ # # SPDX-License-Identifier: Apache-2.0 +load("@bazel_skylib//rules:common_settings.bzl", "string_flag") load("@buildifier_prebuilt//:rules.bzl", "buildifier") exports_files(["LICENSE"]) exports_files(["VERSION"]) +# values: auto, on, off +string_flag( + name = "feature_acl", + build_setting_default = "auto", + visibility = ["//visibility:public"], +) + alias( name = "iceoryx_hoofs", actual = "//iceoryx_hoofs", @@ -44,12 +52,6 @@ alias( visibility = ["//visibility:public"], ) -alias( - name = "feature_acl", - actual = "//iceoryx_platform:feature_acl", - visibility = ["//visibility:public"], -) - # Execute `bazel run //:buildifier` to fix formating of all starlark files in the workspace buildifier( name = "buildifier", diff --git a/iceoryx_platform/BUILD.bazel b/iceoryx_platform/BUILD.bazel index 6a98311dd9..d7e66aff92 100644 --- a/iceoryx_platform/BUILD.bazel +++ b/iceoryx_platform/BUILD.bazel @@ -15,7 +15,6 @@ # SPDX-License-Identifier: Apache-2.0 load("@bazel_skylib//lib:selects.bzl", "selects") -load("@bazel_skylib//rules:common_settings.bzl", "string_flag") load("@rules_cc//cc:defs.bzl", "cc_library") load("//bazel:configure_file.bzl", "configure_file") load("//bazel:configure_version.bzl", "configure_version") @@ -67,23 +66,17 @@ configure_version( version_from = "//:VERSION", ) -string_flag( - name = "feature_acl", - build_setting_default = "auto", - visibility = ["//visibility:public"], -) - config_setting( name = "acl_auto", flag_values = { - ":feature_acl": "auto", + "//:feature_acl": "auto", }, ) config_setting( name = "acl_enabled", flag_values = { - ":feature_acl": "on", + "//:feature_acl": "on", }, )