From 148688c743c5f3cd45cf81636eaafc5f16598eff Mon Sep 17 00:00:00 2001 From: Patrick Dahlke Date: Tue, 24 Feb 2026 16:51:02 +0100 Subject: [PATCH 1/6] [#17] Add Eclipse Dash license check for NuGet dependencies Run Eclipse Dash License Tool per-project on all third-party NuGet dependencies (Microsoft/System/NETStandard/runtime filtered out). Add check-licenses.sh script and DEPENDENCIES file. --- .gitignore | 5 +- CHANGELOG.md | 2 +- DEPENDENCIES | 12 ++++ scripts/check-licenses.sh | 122 ++++++++++++++++++++++++++++++++++++++ 4 files changed, 139 insertions(+), 2 deletions(-) create mode 100644 DEPENDENCIES create mode 100755 scripts/check-licenses.sh diff --git a/.gitignore b/.gitignore index aaf1bd4..d84a36c 100644 --- a/.gitignore +++ b/.gitignore @@ -43,4 +43,7 @@ runtimes/ # github action act artifact files -.artifacts/ \ No newline at end of file +.artifacts/ + +# Dash license tool +tools/ \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index c8422fb..0532af1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features - +- Add Eclipse Dash license check script and DEPENDENCIES file for NuGet dependency compliance ### Bugfixes diff --git a/DEPENDENCIES b/DEPENDENCIES new file mode 100644 index 0000000..b3d8e8f --- /dev/null +++ b/DEPENDENCIES @@ -0,0 +1,12 @@ +nuget/nuget/-/Newtonsoft.Json/13.0.1, MIT AND BSD-3-Clause, approved, #3266 +nuget/nuget/-/Serilog.Extensions.Logging/9.0.0, Apache-2.0, approved, #19180 +nuget/nuget/-/Serilog.Sinks.Console/6.0.0, Apache-2.0, approved, #17054 +nuget/nuget/-/Serilog/4.2.0, Apache-2.0, approved, #17774 +nuget/nuget/-/xunit.abstractions/2.0.3, Apache-2.0 AND MIT, approved, #25268 +nuget/nuget/-/xunit.analyzers/1.6.0, Apache-2.0, restricted, clearlydefined +nuget/nuget/-/xunit.assert/2.6.2, Apache-2.0, restricted, clearlydefined +nuget/nuget/-/xunit.core/2.6.2, Apache-2.0, restricted, clearlydefined +nuget/nuget/-/xunit.extensibility.core/2.6.2, Apache-2.0, restricted, clearlydefined +nuget/nuget/-/xunit.extensibility.execution/2.6.2, Apache-2.0, restricted, clearlydefined +nuget/nuget/-/xunit.runner.visualstudio/2.5.4, Apache-2.0 AND MIT, approved, #10065 +nuget/nuget/-/xunit/2.6.2, Apache-2.0, restricted, clearlydefined diff --git a/scripts/check-licenses.sh b/scripts/check-licenses.sh new file mode 100755 index 0000000..fdd4476 --- /dev/null +++ b/scripts/check-licenses.sh @@ -0,0 +1,122 @@ +#!/usr/bin/env bash +# Eclipse Dash License Check for iceoryx2-csharp +# +# Runs the Eclipse Dash License Tool per-project to verify NuGet dependency licenses. +# Usage: ./scripts/check-licenses.sh [path-to-dash-licenses.jar] +# +# Requires: Java 11+, .NET SDK, dotnet CLI + +set -euo pipefail + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" + +DASH_JAR="${1:-$REPO_ROOT/tools/org.eclipse.dash.licenses.jar}" + +if [[ ! -f "$DASH_JAR" ]]; then + echo "ERROR: Dash License Tool JAR not found at: $DASH_JAR" + echo "Download it from: https://repo.eclipse.org/service/local/artifact/maven/redirect?r=dash-licenses&g=org.eclipse.dash&a=org.eclipse.dash.licenses&v=LATEST" + exit 1 +fi + +if ! command -v java &>/dev/null; then + echo "ERROR: Java is required but not found. Install Java 11+." + exit 1 +fi + +if ! command -v dotnet &>/dev/null; then + echo "ERROR: dotnet CLI is required but not found." + exit 1 +fi + +DEPENDENCIES_FILE="$REPO_ROOT/DEPENDENCIES" + +# Projects with NuGet PackageReference dependencies to check +PROJECTS=( + "src/Iceoryx2/Iceoryx2.csproj" + "src/Iceoryx2.Reactive/Iceoryx2.Reactive.csproj" + "tests/Iceoryx2.Tests.csproj" + "examples/LoggingIntegration/LoggingIntegration.csproj" + "examples/ObservableWaitSet/ObservableWaitSet.csproj" + "examples/ReactiveExample/ReactiveExample.csproj" + "examples/ReactiveEventExample/ReactiveEventExample.csproj" +) + +# Convert dotnet list package output to ClearlyDefined format. +# Handles both top-level (3 columns: Name Requested Resolved) +# and transitive (2 columns: Name Resolved) output formats. +# Uses awk for portability (BSD sed lacks \b and \s support). +# Filters out Microsoft, NETStandard, NuGet, System, and runtime packages +# per the standard dash-licenses .NET example. +convert_to_clearlydefined() { + grep ">" \ + | grep -v -E '>\s+(Microsoft|NETStandard|NuGet|System|runtime)\.' \ + | awk '{ for(i=NF; i>=1; i--) if($i ~ /^[0-9]+\.[0-9]+\.[0-9]/) { print "nuget/nuget/-/"$2"/"$i; break } }' \ + | sort -u +} + +echo "=============================================" +echo "Eclipse Dash License Check - iceoryx2-csharp" +echo "=============================================" +echo "" + +# Collect all unique dependencies across all projects +ALL_DEPS_FILE=$(mktemp) +trap 'rm -f "$ALL_DEPS_FILE"' EXIT + +for project in "${PROJECTS[@]}"; do + project_path="$REPO_ROOT/$project" + if [[ ! -f "$project_path" ]]; then + echo "WARNING: Project not found: $project_path (skipping)" + continue + fi + + echo "--- Checking: $project ---" + + # Collect both top-level and transitive packages + dotnet list "$project_path" package --include-transitive 2>/dev/null \ + | convert_to_clearlydefined \ + >> "$ALL_DEPS_FILE" || true + + echo "" +done + +# Deduplicate +sort -u "$ALL_DEPS_FILE" -o "$ALL_DEPS_FILE" + +TOTAL=$(wc -l < "$ALL_DEPS_FILE" | tr -d ' ') +echo "Total unique dependencies to check: $TOTAL" +echo "" + +if [[ "$TOTAL" -eq 0 ]]; then + echo "No dependencies found. Nothing to check." + exit 0 +fi + +echo "Dependencies to check:" +cat "$ALL_DEPS_FILE" +echo "" +echo "Running Eclipse Dash License Tool..." +echo "" + +# Run dash-licenses with extended timeout and smaller batch size +# (ClearlyDefined API can be slow with large batches) +java -jar "$DASH_JAR" -timeout 240 -batch 20 -summary "$DEPENDENCIES_FILE" - < "$ALL_DEPS_FILE" 2>&1 + +echo "" +echo "=============================================" +echo "Results written to: $DEPENDENCIES_FILE" +echo "=============================================" + +# Check for restricted dependencies +if grep -q "restricted" "$DEPENDENCIES_FILE" 2>/dev/null; then + echo "" + echo "WARNING: Some dependencies have restricted licenses." + echo "You may need to create issues at https://gitlab.eclipse.org/eclipsefdn/emo-team/iplab" + echo "" + echo "Restricted dependencies:" + grep "restricted" "$DEPENDENCIES_FILE" +fi + +echo "" +echo "Done." From 5faebda23ff217d30423ee10751df4836a725e7d Mon Sep 17 00:00:00 2001 From: Patrick Dahlke Date: Sat, 14 Mar 2026 11:25:10 +0100 Subject: [PATCH 2/6] [#17] Address PR review findings for license check - Link ticket #17 in CHANGELOG.md entry - Reference DEPENDENCIES file from NOTICE.md third-party content section - Update test dependencies to latest versions (xunit 2.9.3, xunit.runner.visualstudio 2.8.2, Microsoft.NET.Test.Sdk 18.3.0) - Regenerate DEPENDENCIES via Eclipse Dash Tool; all 12 deps now approved --- CHANGELOG.md | 3 ++- DEPENDENCIES | 16 ++++++++-------- NOTICE.md | 4 ++++ tests/Iceoryx2.Tests.csproj | 6 +++--- 4 files changed, 17 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0532af1..c3edbe4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Features -- Add Eclipse Dash license check script and DEPENDENCIES file for NuGet dependency compliance +* Add Eclipse Dash license check script and DEPENDENCIES file for NuGet dependency compliance + [#17](https://github.com/eclipse-iceoryx/iceoryx2-csharp/issues/17) ### Bugfixes diff --git a/DEPENDENCIES b/DEPENDENCIES index b3d8e8f..83c2f9b 100644 --- a/DEPENDENCIES +++ b/DEPENDENCIES @@ -1,12 +1,12 @@ -nuget/nuget/-/Newtonsoft.Json/13.0.1, MIT AND BSD-3-Clause, approved, #3266 +nuget/nuget/-/Newtonsoft.Json/13.0.3, MIT AND BSD-3-Clause, approved, #3266 nuget/nuget/-/Serilog.Extensions.Logging/9.0.0, Apache-2.0, approved, #19180 nuget/nuget/-/Serilog.Sinks.Console/6.0.0, Apache-2.0, approved, #17054 nuget/nuget/-/Serilog/4.2.0, Apache-2.0, approved, #17774 nuget/nuget/-/xunit.abstractions/2.0.3, Apache-2.0 AND MIT, approved, #25268 -nuget/nuget/-/xunit.analyzers/1.6.0, Apache-2.0, restricted, clearlydefined -nuget/nuget/-/xunit.assert/2.6.2, Apache-2.0, restricted, clearlydefined -nuget/nuget/-/xunit.core/2.6.2, Apache-2.0, restricted, clearlydefined -nuget/nuget/-/xunit.extensibility.core/2.6.2, Apache-2.0, restricted, clearlydefined -nuget/nuget/-/xunit.extensibility.execution/2.6.2, Apache-2.0, restricted, clearlydefined -nuget/nuget/-/xunit.runner.visualstudio/2.5.4, Apache-2.0 AND MIT, approved, #10065 -nuget/nuget/-/xunit/2.6.2, Apache-2.0, restricted, clearlydefined +nuget/nuget/-/xunit.analyzers/1.18.0, Apache-2.0 AND MIT, approved, #19066 +nuget/nuget/-/xunit.assert/2.9.3, Apache-2.0, approved, #16331 +nuget/nuget/-/xunit.core/2.9.3, Apache-2.0, approved, #16330 +nuget/nuget/-/xunit.extensibility.core/2.9.3, Apache-2.0 AND MIT, approved, #16334 +nuget/nuget/-/xunit.extensibility.execution/2.9.3, Apache-2.0 AND MIT, approved, #16333 +nuget/nuget/-/xunit.runner.visualstudio/2.8.2, Apache-2.0 AND MIT, approved, #15181 +nuget/nuget/-/xunit/2.9.3, Apache-2.0 AND MIT, approved, #16327 diff --git a/NOTICE.md b/NOTICE.md index 78b35ff..25008bb 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -23,6 +23,10 @@ SPDX-License-Identifier: Apache-2.0 OR MIT This project leverages the following third party content. +The full list of third-party dependencies and their license status is maintained +in the [DEPENDENCIES](DEPENDENCIES) file, generated by the +[Eclipse Dash License Tool](https://github.com/eclipse/dash-licenses). + > **Note**: This file contains all dependencies for the entire solution, > including tests and examples. For component-specific notices, see: > diff --git a/tests/Iceoryx2.Tests.csproj b/tests/Iceoryx2.Tests.csproj index 91d0178..4ac45e5 100644 --- a/tests/Iceoryx2.Tests.csproj +++ b/tests/Iceoryx2.Tests.csproj @@ -8,9 +8,9 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all From 81dc34c5594e6f7a9fada93dba6c952873fd4d6f Mon Sep 17 00:00:00 2001 From: Patrick Dahlke Date: Sat, 14 Mar 2026 11:30:53 +0100 Subject: [PATCH 3/6] [#17] Pin macOS CI runner to macos-14 The macos-latest runner was updated to a newer macOS version where iceoryx2-pal-posix struct size assertions (sockaddr, ifaliasreq) fail. Pin to macos-14 until the iceoryx2 submodule supports the newer macOS. --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c504e24..de683cb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: - os: ubuntu-latest artifact-name: linux-x64 lib-name: libiceoryx2_ffi_c.so - - os: macos-latest + - os: macos-14 artifact-name: osx-x64 lib-name: libiceoryx2_ffi_c.dylib - os: windows-latest From ecb86a08c6a463f67dfa62c26f8f26bfce4323f3 Mon Sep 17 00:00:00 2001 From: Patrick Dahlke Date: Sat, 14 Mar 2026 11:36:42 +0100 Subject: [PATCH 4/6] [#17] Update iceoryx2 submodule to v0.8.1 Update iceoryx2 submodule from v0.8.0 to v0.8.1 which fixes the macOS build failure caused by struct size mismatches in iceoryx2-pal-posix. Revert macOS CI runner back to macos-latest since the root cause is resolved in the submodule. --- .github/workflows/build.yml | 2 +- iceoryx2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index de683cb..c504e24 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -18,7 +18,7 @@ jobs: - os: ubuntu-latest artifact-name: linux-x64 lib-name: libiceoryx2_ffi_c.so - - os: macos-14 + - os: macos-latest artifact-name: osx-x64 lib-name: libiceoryx2_ffi_c.dylib - os: windows-latest diff --git a/iceoryx2 b/iceoryx2 index 1979e6e..adf3f51 160000 --- a/iceoryx2 +++ b/iceoryx2 @@ -1 +1 @@ -Subproject commit 1979e6edf2316ebe7b30751c7172972ed3452c5b +Subproject commit adf3f519755072e1f62e6a3396cbf4cc7e514e47 From 8f287461c88ada2ee930d91c60a71cf3d86c4d19 Mon Sep 17 00:00:00 2001 From: Patrick Dahlke Date: Sat, 14 Mar 2026 11:41:32 +0100 Subject: [PATCH 5/6] [#17] Remove brew LLVM install on macOS CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The brew-installed LLVM (22.1.0) causes bindgen to generate incorrect struct sizes for sockaddr and ifaliasreq on the updated macOS runner. The upstream iceoryx2 CI does not install brew LLVM on macOS — the system clang/libclang is sufficient for building the FFI library. --- .github/workflows/build.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c504e24..0a9e8aa 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -37,12 +37,6 @@ jobs: sudo apt-get update sudo apt-get install -y libclang-dev clang - - name: Install dependencies (macOS) - if: runner.os == 'macOS' - run: | - brew install llvm - echo "LIBCLANG_PATH=$(brew --prefix llvm)/lib" >> $GITHUB_ENV - - name: Setup Rust uses: dtolnay/rust-toolchain@stable with: From ce59382f117b3ba36056177c1609a2cfee454d20 Mon Sep 17 00:00:00 2001 From: Patrick Dahlke Date: Thu, 9 Apr 2026 11:37:51 +0200 Subject: [PATCH 6/6] [#17] Add copyright header to license check script --- scripts/check-licenses.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/check-licenses.sh b/scripts/check-licenses.sh index fdd4476..5e48821 100755 --- a/scripts/check-licenses.sh +++ b/scripts/check-licenses.sh @@ -1,4 +1,16 @@ #!/usr/bin/env bash +# Copyright (c) 2026 Contributors to the Eclipse Foundation +# +# See the NOTICE file(s) distributed with this work for additional +# information regarding copyright ownership. +# +# This program and the accompanying materials are made available under the +# terms of the Apache Software License 2.0 which is available at +# https://www.apache.org/licenses/LICENSE-2.0, or the MIT license +# which is available at https://opensource.org/licenses/MIT. +# +# SPDX-License-Identifier: Apache-2.0 OR MIT + # Eclipse Dash License Check for iceoryx2-csharp # # Runs the Eclipse Dash License Tool per-project to verify NuGet dependency licenses.