← Back to Pull requests

packaging: ship the LTTng sysdeps and TraceLogging in amdrocm-sysdeps #10387

Merged
bgopesh merged 16 files (186 lines) on Dec 03, 2026 16:08 UTC
View on GitHub
bgopesh bgopesh commented on Dec 01, 2026 07:03 UTC
Author

Motivation

Follow-up to #6750, which added lttng-ust, userspace-rcu, lttng-tools (with popt and libxml2) and TraceLogging as bundled sysdeps behind THEROCK_ENABLE_LTTNG, but kept them out of the release packages until the third-party license review. The review approved redistributing them, so this PR ships them.

They are what the HIP runtime's TraceLogging probes (ROCm/rocm-systems#15122) link against, and what the out-of-process collector in rocprofiler-sdk runs (lttng-sessiond, lttng-consumerd, liblttng-ctl; ROCm/rocm-systems#15449 to ROCm/rocm-systems#15485).

Technical Details

  • build_tools/packaging/linux/package.json: six entries in amdrocm-sysdeps, next to the other sysdeps:
  • | Artifact | Components | Contents |
    |---|---|---|
    | sysdeps-userspace-rcu | lib, dev, doc | liburcu |
    | sysdeps-lttng-ust | lib, dev, doc | liblttng-ust, its common and tracepoint libraries, and the LD_PRELOAD helpers |
    | sysdeps-popt | lib, dev, doc | libpopt, for lttng-tools |
    | sysdeps-libxml2 | lib, dev, doc | libxml2, for lttng-tools |
    | sysdeps-lttng-tools | lib, dev, doc | liblttng-ctl, and the lttng-sessiond and lttng-consumerd daemons and the lttng command, which its lib component carries |
    | tracelogging | dev, doc | the header-only LTTng flavour of microsoft/tracelogging and its CMake package |

  • amdrocm-sysdeps license field: MIT AND GPL AND LGPL instead of MIT.

  • tests/test_artifact_structure.py: the eleven KNOWN_UNCOVERED_COMPONENTS entries #6750 added for these artifacts are removed.

  • Artifacts: each of the six now has a doc component (therock_provide_artifact and its descriptor), and package.json ships lib, dev and doc (TraceLogging: dev and doc).

  • Licenses: lttng-tools' programs are GPL-2.0; lttng-ust, liblttng-ctl and userspace-rcu are LGPL-2.1; popt, libxml2 and TraceLogging are MIT. Each of the six artifacts gets a doc component, packaged with the rest, that holds the project's license texts in lib/rocm_sysdeps/share/doc/<name>/ (TraceLogging: share/doc/tracelogging/), as mpfr already ships its own:

  • - userspace-rcu: LICENSE and the texts it names (lgpl-2.1.txt, gpl-2.0.txt, lgpl-relicensing.txt);
    - lttng-ust and lttng-tools: LICENSE and LICENSES/, the full texts their LICENSE refers to;
    - popt: COPYING; libxml2: Copyright; TraceLogging: LICENSE.

    The autotools recipes copy them into ${CMAKE_INSTALL_DATAROOTDIR}/doc/<name> as their last step, after patch_install.py, which drops the rest of the installed documentation. TraceLogging is built from its upstream CMake project, so CMAKE_PROJECT_tracelogging_INCLUDE adds an install rule into CMAKE_INSTALL_DOCDIR (third-party/tracelogging/install_license.cmake). userspace-rcu's and lttng-ust's doc components also carry the few documentation files those projects already install there.

  • For the license review to confirm: that the public TheRock sources and the mirrored source tarballs satisfy the GPL and LGPL source requirements for these packages, and whether amdrocm-sysdeps's License field should list more: it is now MIT AND GPL AND LGPL (it was MIT, though the package already held GPL and LGPL code), and some sysdeps are under other permissive licenses (BSD).

  • Builds without LTTng: THEROCK_ENABLE_LTTNG is still off by default. The packager builds a package when any of its artifacts exists and skips missing components, so amdrocm-sysdeps is unchanged in those builds.
  • Test Plan

  • tests/test_artifact_structure.py against archives of a THEROCK_ENABLE_LTTNG=ON build of #6750's final tree.

  • The Linux packaging tool tests (build_tools/packaging/tests).
  • Test Result

  • Artifact structure: 3 of 3 pass, so every component of the six artifacts is covered by a package. Before this change, the coverage test fails without the allowlist entries.

  • Packaging tool tests: 65 pass. (promote_packages_test.py and promote_keep_list_test.py need pkginfo, which the test container lacks.)

  • package.json parses.

  • Not done: building the .deb and .rpm packages themselves.
  • Submission Checklist

  • Look over the contributing guidelines at https://github.com/ROCm/TheRock/blob/main/CONTRIBUTING.md.
  • 🤖 Generated with Claude Code

    Diff: 186 lines (+165 / -21) across 16 files Reviewer: nunnikri Review duration: 3425m
    All Vouch review confidence checks passed
    Residual risk 0.08 = Change Risk (0.63) × (1 − Review Confidence (0.88)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.63 · 186 lines diff across 16 files
    0.63
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.84 · 5 substantive comment(s)
    0.84
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 50%
    88%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.313
    Mass File Touch mass_file_touch
    0.080
    Real PR Conversation Timeline
    12 items
    therock-pr-bot[bot] therock-pr-bot[bot] commented on Dec 01, 2026 07:04 UTC
    Bot

    <!-- therock-pr-bot-policy-check -->

    ✅ All Checks Passed — Ready for Review

    | Check | Status | Details |
    |---|:---:|---|
    | 📝 PR Description | ✅ Pass | — |
    | ⛔ Forbidden Files | ✅ Pass | — |
    | 🧪 Unit Test | ✅ Pass | PR does not contain code files — Unit Test auto-passed |
    | 🔎 pre-commit | ✅ Pass | — |
    | 🚫 Draft PR | 🔜 To Be Enabled | — |
    | 🚩 Feature Flag | 🔜 To Be Enabled | — |
    | 📊 Code Coverage | 🔜 To Be Enabled | — |
    | 🤖 therock-pr-bot | ✅ Pass | — |

    🎉 All checks passed! This PR is ready for review.

    📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

    🙋 Wish to Override Policy?

    therock-pr-bot[bot] therock-pr-bot[bot] commented on Dec 01, 2026 07:04 UTC
    Bot

    <!-- therock-pr-bot-fix-policies -->
    🎉 All checks passed! This PR is ready for review.

    nunnikri nunnikri commented on code on Dec 02, 2026 20:35 UTC
    Code Review
    build_tools/packaging/linux/package.json:1
    @@ -2181,6 +2181,83 @@
               }
             ]
           },
    +      {

    I think having MIT license for amdrocm-sysdeps is a mistake, we should add GPL and LGPL to that. Can we do that as part of this change?

    nunnikri nunnikri commented on code on Dec 02, 2026 21:09 UTC
    Code Review
    third-party/sysdeps/linux/lttng-tools/CMakeLists.txt:1
    @@ -146,4 +146,15 @@ add_custom_target(
           "THEROCK_SOURCE_DIR=${THEROCK_SOURCE_DIR}"
           "Python3_EXECUTABLE=${Python3_EXECUTABLE}" --
         "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/patch_install.py" ${CMAKE_INSTALL_PREFIX}
    +  COMMAND
    +    # The license texts, shipped with the binaries (the doc component); after
    +    # patch_install.py, which drops the rest of share/doc.

    i havnt looks at the build in detail. I thought deletion of share folder was temporary and can be removed once the license review are done.

    nunnikri nunnikri commented on code on Dec 02, 2026 21:11 UTC
    Code Review
    third-party/sysdeps/linux/lttng-tools/CMakeLists.txt:1
    @@ -146,4 +146,15 @@ add_custom_target(
           "THEROCK_SOURCE_DIR=${THEROCK_SOURCE_DIR}"
           "Python3_EXECUTABLE=${Python3_EXECUTABLE}" --
         "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/patch_install.py" ${CMAKE_INSTALL_PREFIX}
    +  COMMAND
    +    # The license texts, shipped with the binaries (the doc component); after
    +    # patch_install.py, which drops the rest of share/doc.
    +    "${CMAKE_COMMAND}" -E make_directory "${CMAKE_INSTALL_PREFIX}/share/doc/lttng-tools"
    +  COMMAND
    +    "${CMAKE_COMMAND}" -E copy
    +      "${SOURCE_DIR}/LICENSE"
    +      "${CMAKE_INSTALL_PREFIX}/share/doc/lttng-tools"

    Even if we have to go this cmake command route to install license isnt better to use CMAKE_INSTALL_DOCDIR or ${CMAKE_INSTALL_DATAROOTDIR}/doc/<project-name>

    bgopesh bgopesh commented on code on Dec 03, 2026 04:23 UTC
    Code Review
    build_tools/packaging/linux/package.json:1
    @@ -2181,6 +2181,83 @@
               }
             ]
           },
    +      {

    Agreed, done in d96a0c1ed: amdrocm-sysdeps is now MIT AND GPL AND LGPL, in the style of the other packages that list several (amdrocm-debugger, amdrocm-fft-test). That covers what is in it now too (elfutils, gmp and mpfr are GPL or LGPL). Some sysdeps are under other permissive licenses (hwloc and libbacktrace BSD, zstd BSD or GPL), so the license review may want a fuller list; I've asked for that in the description.

    bgopesh bgopesh commented on code on Dec 03, 2026 04:23 UTC
    Code Review
    third-party/sysdeps/linux/lttng-tools/CMakeLists.txt:1
    @@ -146,4 +146,15 @@ add_custom_target(
           "THEROCK_SOURCE_DIR=${THEROCK_SOURCE_DIR}"
           "Python3_EXECUTABLE=${Python3_EXECUTABLE}" --
         "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/patch_install.py" ${CMAKE_INSTALL_PREFIX}
    +  COMMAND
    +    # The license texts, shipped with the binaries (the doc component); after
    +    # patch_install.py, which drops the rest of share/doc.

    Removing the deletion wouldn't ship the license texts. What the three install there themselves: lttng-tools installs LICENSE, its ChangeLog, README and seven how-tos, but not LICENSES/, the full GPL-2.0 and LGPL-2.1 texts its LICENSE refers to (those are only in the source tarball); libxml2 installs its HTML documentation but not Copyright; popt installs nothing. So the license files have to be installed explicitly either way, and keeping the deletion avoids shipping documentation nobody asked for. The copy runs after patch_install.py.

    bgopesh bgopesh commented on code on Dec 03, 2026 04:23 UTC
    Code Review
    third-party/sysdeps/linux/lttng-tools/CMakeLists.txt:1
    @@ -146,4 +146,15 @@ add_custom_target(
           "THEROCK_SOURCE_DIR=${THEROCK_SOURCE_DIR}"
           "Python3_EXECUTABLE=${Python3_EXECUTABLE}" --
         "${Python3_EXECUTABLE}" "${CMAKE_CURRENT_SOURCE_DIR}/patch_install.py" ${CMAKE_INSTALL_PREFIX}
    +  COMMAND
    +    # The license texts, shipped with the binaries (the doc component); after
    +    # patch_install.py, which drops the rest of share/doc.
    +    "${CMAKE_COMMAND}" -E make_directory "${CMAKE_INSTALL_PREFIX}/share/doc/lttng-tools"
    +  COMMAND
    +    "${CMAKE_COMMAND}" -E copy
    +      "${SOURCE_DIR}/LICENSE"
    +      "${CMAKE_INSTALL_PREFIX}/share/doc/lttng-tools"

    Done in d96a0c1ed: the five recipes include GNUInstallDirs and install into ${CMAKE_INSTALL_DATAROOTDIR}/doc/<name>. CMAKE_INSTALL_DOCDIR would have used the recipes' own project names (LTTNG_TOOLS_BUILD, ...). TraceLogging's install rule, which runs inside its own project(tracelogging), uses CMAKE_INSTALL_DOCDIR. The installed paths are unchanged; I checked the doc artifacts after a rebuild.

    nunnikri nunnikri commented on code on Dec 03, 2026 16:03 UTC
    Code Review
    build_tools/packaging/linux/package.json:1
    @@ -2181,6 +2181,83 @@
               }
             ]
           },
    +      {

    Thanks @bgopesh i think current PR license requirements are added. Adding BSD I am fine with adding in this PR or we can take care as a follow up PR.

    @raramakr

    nunnikri nunnikri approved these changes on Dec 03, 2026 16:03 UTC
    Approved Reviewer

    LGTM

    bwelton bwelton approved these changes on Dec 04, 2026 17:59 UTC
    Approved Reviewer

    LGTM. The follow-up licensing changes address the aggregate RPM license-metadata concern.

    Reviewers
    Assignees
    bgopesh bgopesh
    Labels
    risk: low confidence: 88% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 62.8% (MEDIUM) · Higher = larger blast radius
    62.8%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 88% · Lower = rushed or shallow review
    88%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 7.5% · Safe to merge
    7.5%
    Repository