Skip to content

Commit f88bc9c

Browse files
authored
Merge pull request #2359 from elBoberido/iox-1176-make-acl-support-optional
iox-#1176 Make ACL support optional
2 parents 89d73e0 + 4356597 commit f88bc9c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+521
-478
lines changed

.bazelrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,11 @@ build:tsan --linkopt="-fsanitize=thread"
3737

3838
# tsan clang
3939
build:clang_tsan --config=clang --config=tsan
40+
41+
#
42+
# feature flags
43+
#
44+
45+
# value [auto, on, off]
46+
# 'auto' is platform dependent ('on' on Linux and QNX, 'off' on other OS) and the default value if the flag is not set
47+
#build --//:feature_acl=off

.cirrus.yaml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ ubuntu_22_04_aarch64_build_task:
126126
test_binaries_cache:
127127
folder: iox-tests-bin
128128
reupload_on_changes: true
129-
fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache_$CIRRUS_BRANCH
129+
fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache_${CIRRUS_BUILD_ID}
130130
build_script:
131131
<<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_ADDITIONAL_USER
132132
populate_test_binary_folder_script:
@@ -141,7 +141,7 @@ ubuntu_22_04_aarch64_test_task:
141141
test_binaries_cache:
142142
folder: iox-tests-bin
143143
reupload_on_changes: false
144-
fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache_$CIRRUS_BRANCH
144+
fingerprint_key: $CIRRUS_OS_ubuntu_22_04_aarch64_test_binaries_cache_${CIRRUS_BUILD_ID}
145145
test_script:
146146
<<: *IOX_RUN_TESTS
147147

@@ -158,7 +158,7 @@ arch_linux_x64_gcc_8_3_aka_qnx_canary_build_task:
158158
test_binaries_cache:
159159
folder: iox-tests-bin
160160
reupload_on_changes: true
161-
fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache_$CIRRUS_BRANCH
161+
fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache_${CIRRUS_BUILD_ID}
162162
env:
163163
# use GCC 8.3 which corresponds to QCC 8.3 on QNX 7.1
164164
CC: gcc-8
@@ -177,7 +177,7 @@ arch_linux_x64_gcc_8_3_aka_qnx_canary_test_task:
177177
test_binaries_cache:
178178
folder: iox-tests-bin
179179
reupload_on_changes: false
180-
fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache_$CIRRUS_BRANCH
180+
fingerprint_key: $CIRRUS_OS_archlinux_x64_gcc_8_3_aka_qnx_canary_test_binaries_cache_${CIRRUS_BUILD_ID}
181181
test_script:
182182
<<: *IOX_RUN_TESTS
183183

@@ -195,7 +195,7 @@ arch_linux_x64_build_task:
195195
test_binaries_cache:
196196
folder: iox-tests-bin
197197
reupload_on_changes: true
198-
fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache_$CIRRUS_BRANCH
198+
fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache_${CIRRUS_BUILD_ID}
199199
build_script:
200200
<<: *IOX_POSIX_CLEAN_BUILD_STRICT_WITH_ADDITIONAL_USER
201201
populate_test_binary_folder_script:
@@ -211,7 +211,7 @@ arch_linux_x64_test_task:
211211
test_binaries_cache:
212212
folder: iox-tests-bin
213213
reupload_on_changes: false
214-
fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache_$CIRRUS_BRANCH
214+
fingerprint_key: $CIRRUS_OS_archlinux_x64_test_binaries_cache_${CIRRUS_BUILD_ID}
215215
test_script:
216216
<<: *IOX_RUN_TESTS
217217

@@ -229,7 +229,7 @@ freebsd_x64_build_task:
229229
test_binaries_cache:
230230
folder: iox-tests-bin
231231
reupload_on_changes: true
232-
fingerprint_key: $CIRRUS_OS_freebsd_x64_test_binaries_cache_$CIRRUS_BRANCH
232+
fingerprint_key: $CIRRUS_OS_freebsd_x64_test_binaries_cache_${CIRRUS_BUILD_ID}
233233
setup_script:
234234
- pkg install -y cmake git ncurses bash wget
235235
- ln -s /usr/local/bin/bash /bin/bash
@@ -248,7 +248,7 @@ freebsd_x64_test_task:
248248
test_binaries_cache:
249249
folder: iox-tests-bin
250250
reupload_on_changes: false
251-
fingerprint_key: $CIRRUS_OS_freebsd_x64_test_binaries_cache_$CIRRUS_BRANCH
251+
fingerprint_key: $CIRRUS_OS_freebsd_x64_test_binaries_cache_${CIRRUS_BUILD_ID}
252252
test_script:
253253
<<: *IOX_RUN_TESTS
254254

@@ -266,7 +266,7 @@ macos_aarch64_build_task:
266266
test_binaries_cache:
267267
folder: iox-tests-bin
268268
reupload_on_changes: true
269-
fingerprint_key: $CIRRUS_OS_macOS_aarch64_test_binaries_cache_$CIRRUS_BRANCH
269+
fingerprint_key: $CIRRUS_OS_macOS_aarch64_test_binaries_cache_${CIRRUS_BUILD_ID}
270270
setup_script:
271271
- brew install ncurses
272272
build_script:
@@ -284,7 +284,7 @@ macos_aarch64_test_task:
284284
test_binaries_cache:
285285
folder: iox-tests-bin
286286
reupload_on_changes: false
287-
fingerprint_key: $CIRRUS_OS_macOS_aarch64_test_binaries_cache_$CIRRUS_BRANCH
287+
fingerprint_key: $CIRRUS_OS_macOS_aarch64_test_binaries_cache_${CIRRUS_BUILD_ID}
288288
env:
289289
# No timing tests on macOS
290290
GTEST_FILTER: "-*TimingTest*"

.github/workflows/build-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ jobs:
119119
run-integration-test:
120120
# prevent stuck jobs consuming runners for 6 hours
121121
timeout-minutes: 60
122-
runs-on: ubuntu-latest
122+
runs-on: ubuntu-22.04
123123
needs: pre-flight-check
124124
steps:
125125
- name: Setup ROS
@@ -219,7 +219,7 @@ jobs:
219219
coverage-and-docs:
220220
# prevent stuck jobs consuming runners for 6 hours
221221
timeout-minutes: 60
222-
runs-on: ubuntu-latest
222+
runs-on: ubuntu-22.04
223223
needs: pre-flight-check
224224
steps:
225225
- uses: actions/checkout@v4

.lycheeignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
https://github.com/eclipse-iceoryx/iceoryx/compare/vx.x.x...vx.x.x
22
https://github.com/eclipse-iceoryx/iceoryx/tree/vx.x.x
33
https://www.misra.org.uk/
4+
https://www.gnu.org/software/screen/
45

56

BUILD.bazel

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,20 @@
1414
#
1515
# SPDX-License-Identifier: Apache-2.0
1616

17+
load("@bazel_skylib//rules:common_settings.bzl", "string_flag")
1718
load("@buildifier_prebuilt//:rules.bzl", "buildifier")
1819

1920
exports_files(["LICENSE"])
2021

2122
exports_files(["VERSION"])
2223

24+
# values: auto, on, off
25+
string_flag(
26+
name = "feature_acl",
27+
build_setting_default = "auto",
28+
visibility = ["//visibility:public"],
29+
)
30+
2331
alias(
2432
name = "iceoryx_hoofs",
2533
actual = "//iceoryx_hoofs",

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module(
33
version = "2.95.0",
44
)
55

6+
bazel_dep(name = "bazel_skylib", version = "1.7.1")
67
bazel_dep(name = "cpptoml", version = "0.1.1")
78
bazel_dep(name = "platforms", version = "0.0.10")
89
bazel_dep(name = "rules_cc", version = "0.0.9")

bazel/configure_file.bzl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,13 @@ The configure_file rule imitates the similar CMake function for template expansi
1919
"""
2020

2121
def _configure_file_impl(ctx):
22+
config_all = dict(ctx.attr.config_constants, **ctx.attr.config_acl)
2223
ctx.actions.expand_template(
2324
template = ctx.file.src,
2425
output = ctx.outputs.out,
2526
substitutions = {
2627
"@" + k + "@": v
27-
for k, v in ctx.attr.config.items()
28+
for k, v in config_all.items()
2829
},
2930
)
3031
files = depset(direct = [ctx.outputs.out])
@@ -35,7 +36,8 @@ configure_file = rule(
3536
implementation = _configure_file_impl,
3637
provides = [DefaultInfo],
3738
attrs = {
38-
"config": attr.string_dict(mandatory = True),
39+
"config_acl": attr.string_dict(mandatory = False),
40+
"config_constants": attr.string_dict(mandatory = True),
3941
"out": attr.output(mandatory = True),
4042
"src": attr.label(mandatory = True, allow_single_file = True),
4143
},

doc/website/advanced/configuration-guide.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,46 @@ With that change, the footprint of the management segment is reduced to ~52.7 MB
3939
For larger use cases you can increase the value to avoid that samples are dropped
4040
on the subscriber side (see also [#615](https://github.com/eclipse-iceoryx/iceoryx/issues/615)).
4141

42+
## ACL Feature Flag
43+
44+
The ACL (Access Control List) feature is enabled by default on Linux and QNX platforms.
45+
If you want to disable this feature, you can control it through a build option.
46+
47+
### Using CMake
48+
49+
To disable the ACL feature in a CMake build, pass the following flag when configuring the project:
50+
51+
```
52+
-DIOX_PLATFORM_FEATURE_ACL=OFF
53+
```
54+
55+
### Using Bazel
56+
57+
To disable the ACL feature in a Bazel build, use the following flag:
58+
```
59+
--//:feature_acl=off
60+
```
61+
62+
For example:
63+
```
64+
bazel build --//:feature_acl=off //...
65+
```
66+
67+
Alternatively, you can persist this setting in a `.bazelrc` file to apply it automatically in all builds:
68+
```
69+
build --//:feature_acl=off
70+
```
71+
72+
This way, the ACL feature is disabled across builds without needing to pass the flag manually each time.
73+
74+
> [!NOTE]
75+
> When using this flag in an external repository, you must prefix it with the repository's target name. For example:
76+
> ```
77+
> --@iceoryx//:feature_acl=off
78+
> ```
79+
>
80+
> This ensures that the flag is applied to the correct target from the imported repository.
81+
4282
## Configuring Mempools for RouDi
4383
4484
RouDi supports several shared memory segments with different access rights, to

doc/website/release-notes/iceoryx-unreleased.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
- Improve introspection-client interface by adding the number of ports in parentheses [#2299](https://github.com/eclipse-iceoryx/iceoryx/issues/2299)
7070
- Add std::atomic abstraction [#2329](https://github.com/eclipse-iceoryx/iceoryx/issues/2329)
7171
- Port iceoryx to bzlmod [#2325](https://github.com/eclipse-iceoryx/iceoryx/issues/2325)
72+
- Make ACL support optional [#1176](https://github.com/eclipse-iceoryx/iceoryx/issues/1176)
7273

7374
**Bugfixes:**
7475

iceoryx_hoofs/BUILD.bazel

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ configure_file(
2121
name = "iceoryx_hoofs_deployment_hpp",
2222
src = "cmake/iceoryx_hoofs_deployment.hpp.in",
2323
out = "generated/include/iox/iceoryx_hoofs_deployment.hpp",
24-
config = {
24+
config_constants = {
2525
"IOX_MAX_NAMED_PIPE_MESSAGE_SIZE": "4096",
2626
"IOX_MAX_NAMED_PIPE_NUMBER_OF_MESSAGES": "10",
2727
# FIXME: for values see "iceoryx_hoofs/cmake/IceoryxHoofsDeployment.cmake" ... for now some nice defaults
@@ -84,14 +84,13 @@ cc_library(
8484
linkopts = select({
8585
"//iceoryx_platform:linux-clang": [
8686
"-latomic",
87-
"-lacl",
8887
],
89-
"//iceoryx_platform:linux-gcc": ["-lacl"],
88+
"//iceoryx_platform:linux-gcc": [],
9089
"//iceoryx_platform:mac": [],
9190
"//iceoryx_platform:qnx": [],
9291
"//iceoryx_platform:unix": [],
9392
"//iceoryx_platform:win": [],
94-
"//conditions:default": ["-lacl"],
93+
"//conditions:default": [],
9594
}),
9695
visibility = ["//visibility:public"],
9796
deps = ["//iceoryx_platform"],

0 commit comments

Comments
 (0)