packaging: ship the LTTng sysdeps and TraceLogging in amdrocm-sysdeps #10387
<!-- 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.
<!-- therock-pr-bot-fix-policies -->
🎉 All checks passed! This PR is ready for review.
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?
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.
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>
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.
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.
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.
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
LGTM
LGTM. The follow-up licensing changes address the aggregate RPM license-metadata concern.
nunnikri
bgopesh
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 inamdrocm-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 theLD_PRELOADhelpers ||
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 thelttng-sessiondandlttng-consumerddaemons and thelttngcommand, which itslibcomponent carries ||
tracelogging| dev, doc | the header-only LTTng flavour of microsoft/tracelogging and its CMake package |amdrocm-sysdepslicense field:MIT AND GPL AND LGPLinstead ofMIT.tests/test_artifact_structure.py: the elevenKNOWN_UNCOVERED_COMPONENTSentries #6750 added for these artifacts are removed.doccomponent (therock_provide_artifactand its descriptor), andpackage.jsonshipslib,devanddoc(TraceLogging:devanddoc).doccomponent, packaged with the rest, that holds the project's license texts inlib/rocm_sysdeps/share/doc/<name>/(TraceLogging:share/doc/tracelogging/), as mpfr already ships its own:- userspace-rcu:
LICENSEand the texts it names (lgpl-2.1.txt,gpl-2.0.txt,lgpl-relicensing.txt);- lttng-ust and lttng-tools:
LICENSEandLICENSES/, the full texts theirLICENSErefers to;- popt:
COPYING; libxml2:Copyright; TraceLogging:LICENSE.The autotools recipes copy them into
${CMAKE_INSTALL_DATAROOTDIR}/doc/<name>as their last step, afterpatch_install.py, which drops the rest of the installed documentation. TraceLogging is built from its upstream CMake project, soCMAKE_PROJECT_tracelogging_INCLUDEadds an install rule intoCMAKE_INSTALL_DOCDIR(third-party/tracelogging/install_license.cmake). userspace-rcu's and lttng-ust'sdoccomponents also carry the few documentation files those projects already install there.amdrocm-sysdeps'sLicensefield should list more: it is nowMIT AND GPL AND LGPL(it wasMIT, though the package already held GPL and LGPL code), and some sysdeps are under other permissive licenses (BSD).THEROCK_ENABLE_LTTNGis still off by default. The packager builds a package when any of its artifacts exists and skips missing components, soamdrocm-sysdepsis unchanged in those builds.Test Plan
tests/test_artifact_structure.pyagainst archives of aTHEROCK_ENABLE_LTTNG=ONbuild of #6750's final tree.build_tools/packaging/tests).Test Result
promote_packages_test.pyandpromote_keep_list_test.pyneedpkginfo, which the test container lacks.)package.jsonparses..deband.rpmpackages themselves.Submission Checklist
🤖 Generated with Claude Code