Skip to content

DRAFT: CLI: Add "tar.gz" packaging support and exercise with Holoscan GStreamer#1604

Open
tbirdso wants to merge 4 commits into
nvidia-holoscan:mainfrom
tbirdso:holoscan-gstreamer-tgz
Open

DRAFT: CLI: Add "tar.gz" packaging support and exercise with Holoscan GStreamer#1604
tbirdso wants to merge 4 commits into
nvidia-holoscan:mainfrom
tbirdso:holoscan-gstreamer-tgz

Conversation

@tbirdso

@tbirdso tbirdso commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Goal

  • Support ".tar.gz" package generation with CPack for general HoloHub packages / Holoscan Modules
  • Onboard Holoscan GStreamer with "tar.gz" format while preserving wheel and Debian formats

Changes

CLI

  • Update HoloHub CLI "./holohub package" to support CPack TGZ generator format
  • Update CMAKE_INSTALL_LIBDIR to install to "lib/<cuda_version>" folder when using TGZ format
  • Add unit tests

Holoscan GStreamer

  • Add TGZ configuration files and align installation components to "holoscan-gstreamer" naming
  • Validate wheel, TGZ

Results

./holohub package holoscan-gstreamer --pkg-generator TGZ
Details
...
CPack: Create package using TGZ
CPack: Install projects
CPack: - Install project: Holohub []
CPack: Create package
CPack: - package: /workspace/holohub/holoscan_gstreamer-linux-x86_64-1.0.0.tar.gz generated.

$ tar tf holoscan_gstreamer-linux-x86_64-1.0.0.tar.gz
holoscan_gstreamer/
holoscan_gstreamer/share/
holoscan_gstreamer/share/doc/
holoscan_gstreamer/share/doc/holoscan-gstreamer/
holoscan_gstreamer/share/doc/holoscan-gstreamer/NOTICE.md
holoscan_gstreamer/LICENSE
holoscan_gstreamer/lib/
holoscan_gstreamer/lib/13/
holoscan_gstreamer/lib/13/libholoscan_gstreamer_bridge.so
holoscan_gstreamer/lib/13/cmake/
holoscan_gstreamer/lib/13/cmake/holoscan-gstreamer/
holoscan_gstreamer/lib/13/cmake/holoscan-gstreamer/holoscan-gstreamer-config-version.cmake
holoscan_gstreamer/lib/13/cmake/holoscan-gstreamer/holoscan-gstreamer-targets-release.cmake
holoscan_gstreamer/lib/13/cmake/holoscan-gstreamer/holoscan-gstreamer-targets.cmake
holoscan_gstreamer/lib/13/cmake/holoscan-gstreamer/holoscan-gstreamer-config.cmake
holoscan_gstreamer/include/
holoscan_gstreamer/include/holoscan/
holoscan_gstreamer/include/holoscan/operators/
holoscan_gstreamer/include/holoscan/operators/gstreamer/
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_src_bridge.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_wait_group.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_video_recorder_op.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_sink_bridge.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_src_resource.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/element.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/app_sink.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/error.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/memory.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/object.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/app_src.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/pad.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/message.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/pipeline.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/wrapper_base.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/caps.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/cuda_context.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/buffer.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/sample.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/bus.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/video_info.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/config.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/allocator.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst/mini_object.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_sink_op.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_pipeline_bus_monitor.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_src_op.hpp
holoscan_gstreamer/include/holoscan/operators/gstreamer/gst_sink_resource.hpp
./holohub package holoscan-gstreamer --pkg-generator=WHEEL
Details
...
*** Making wheel...
*** Created holoscan_gstreamer-1.0.0-cp312-cp312-linux_x86_64.whl
Successfully built holoscan_gstreamer-1.0.0-cp312-cp312-linux_x86_64.whl

$ unzip -l build/dist/holoscan_gstreamer-1.0.0-cp312-cp312-linux_x86_64.whl
Archive:  build/dist/holoscan_gstreamer-1.0.0-cp312-cp312-linux_x86_64.whl
  Length      Date    Time    Name
---------  ---------- -----   ----
    11357  2026-01-16 20:10   LICENSE
     2509  2026-06-09 19:04   holoscan/gstreamer/__init__.py
   846520  2026-06-09 19:05   holoscan/gstreamer/_gstreamer.cpython-312-x86_64-linux-gnu.so
     7468  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/allocator.hpp
     2974  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/app_sink.hpp
     2656  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/app_src.hpp
     3462  2026-02-18 15:45   include/holoscan/operators/gstreamer/gst/buffer.hpp
     3151  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/bus.hpp
     4323  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/caps.hpp
     1248  2026-02-18 15:45   include/holoscan/operators/gstreamer/gst/config.hpp
     2349  2026-02-18 15:45   include/holoscan/operators/gstreamer/gst/cuda_context.hpp
     6061  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/element.hpp
     2061  2026-02-18 15:45   include/holoscan/operators/gstreamer/gst/error.hpp
     3187  2026-02-18 15:45   include/holoscan/operators/gstreamer/gst/memory.hpp
     3237  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/message.hpp
     4108  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/mini_object.hpp
    13987  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/object.hpp
     2590  2026-02-18 15:45   include/holoscan/operators/gstreamer/gst/pad.hpp
     5240  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/pipeline.hpp
     1901  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/sample.hpp
     4041  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst/video_info.hpp
     1716  2026-03-16 10:45   include/holoscan/operators/gstreamer/gst/wrapper_base.hpp
     5664  2026-03-16 10:45   include/holoscan/operators/gstreamer/gst_pipeline_bus_monitor.hpp
     6287  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst_sink_bridge.hpp
     2410  2026-03-16 10:45   include/holoscan/operators/gstreamer/gst_sink_op.hpp
     3136  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst_sink_resource.hpp
     5923  2026-03-16 10:45   include/holoscan/operators/gstreamer/gst_src_bridge.hpp
     2500  2026-03-16 10:45   include/holoscan/operators/gstreamer/gst_src_op.hpp
     3912  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst_src_resource.hpp
     5879  2026-02-19 22:51   include/holoscan/operators/gstreamer/gst_video_recorder_op.hpp
     3991  2026-03-16 10:45   include/holoscan/operators/gstreamer/gst_wait_group.hpp
     2762  2026-06-09 19:04   lib/cmake/holoscan-gstreamer/holoscan-gstreamer-config-version.cmake
     2098  2026-06-09 19:04   lib/cmake/holoscan-gstreamer/holoscan-gstreamer-config.cmake
      998  2026-06-09 19:04   lib/cmake/holoscan-gstreamer/holoscan-gstreamer-targets-release.cmake
     5437  2026-06-09 19:04   lib/cmake/holoscan-gstreamer/holoscan-gstreamer-targets.cmake
   951792  2026-06-09 19:05   lib/libholoscan_gstreamer_bridge.so
     6821  2026-05-28 19:30   share/doc/holoscan-gstreamer/NOTICE.md
     7108  2026-06-09 19:05   holoscan_gstreamer-1.0.0.dist-info/METADATA
      109  2026-06-09 19:05   holoscan_gstreamer-1.0.0.dist-info/WHEEL
     6821  2026-06-09 19:05   holoscan_gstreamer-1.0.0.dist-info/licenses/NOTICE.md
     4395  2026-06-09 19:05   holoscan_gstreamer-1.0.0.dist-info/RECORD
---------                     -------
  1964189                     41 files

Summary by CodeRabbit

  • New Features

    • Added TGZ archive format support to the packaging system for broader distribution options.
  • Chores

    • Updated packaging infrastructure and reorganized installation components.
    • Enhanced the packaging CLI tool with improved generator-specific configuration handling and multi-format support.
    • Expanded test coverage for packaging functionality.

tbirdso added 4 commits June 9, 2026 10:05
Goal: Support source archive packaging for Holoscan Modules adhering to
an internal specification, focusing on "holoscan-gstreamer"

- Add "holohub_configure_tgz.cmake" CPack helper to create CPack TGZ
  generator configurations. Adhere to internal naming specifications and
  support component filtering to drop Python components.
  Matches existing Deb generator support.
- Add TGZ to CLI packaging handling
- Tag Python module install with COMPONENT holohub-python and operator installs
  with COMPONENT holoscan-gstreamer to enable per-component archive filtering

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com>
Addresses two findings from code review of MR !423.

- Fix CTest install fixture to use --component holoscan-gstreamer (was
  --component gstreamer) so artifacts are installed when BUILD_TESTING
  is enabled
- Add hard-fail in holohub.py when no CPack configs exist after a real
  build (non-dryrun path)
- Add hard-fail when no config is found for a specific requested
  generator, listing available generator-specific configs in the error

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com>
New coverage for holohub_configure_tgz / CLI packaging changes.

- test_package_tgz_invokes_cpack_tgz: verifies -G TGZ is passed to
  cpack when --pkg-generator TGZ is requested
- test_package_multi_generator_deb_tgz: verifies two separate cpack
  calls are made for DEB,TGZ (one per generator)
- test_package_tgz_routes_to_generator_specific_config: verifies
  CPackConfig-*-TGZ.cmake is used for TGZ and the base config for DEB
- test_package_missing_cpack_configs_fatal: verifies fatal() is called
  when the build dir contains no CPack configs (non-dryrun path)
- test_package_missing_generator_config_fatal: verifies fatal() lists
  available generators when the requested one has no matching config

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com>
Address divergent path requirements:
- wheel and Deb format expect "lib/holoscan_gstreamer_bridge.so"
- TGZ format expects "lib/<cuda_version>/holoscan_gstreamer_bridge.so"

Update TGZ handling as follows:
- Revert the operator library install to DESTINATION ${CMAKE_INSTALL_LIBDIR};
  holohub_configure_tgz now overrides CMAKE_INSTALL_LIBDIR to lib/<cuda_major>
  via the cmake cache when HOLOHUB_PKG_TGZ=ON, exploiting HoloHub's
  modules-before-operators build order so operator install() rules pick it up
- CLI passes -DHOLOHUB_PKG_TGZ=ON to cmake configure only when TGZ is in the
  requested generators, leaving DEB, WHEEL, and standalone builds unaffected
- Update CMAKE_INSTALL_DEFAULT_COMPONENT_NAME to holoscan-gstreamer (was
  gstreamer) and add unit tests asserting the flag is present for TGZ builds
  and absent for DEB-only builds

Assisted-by: Claude:claude-sonnet-4-6
Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com>
@tbirdso tbirdso marked this pull request as ready for review June 9, 2026 19:06
@tbirdso tbirdso requested review from a team and wyli June 9, 2026 19:06
@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR adds TGZ (tar.gz) packaging support to the HoloHub CLI and CPack build system, and onboards the Holoscan GStreamer module with TGZ configuration while also renaming component labels from gstreamer to holoscan-gstreamer for consistency across DEB, TGZ, and wheel packaging.

  • New holohub_configure_tgz CMake function generates a KitMaker-format TGZ CPack config, placing libraries under lib/<cuda_major>/ via a forced CMAKE_INSTALL_LIBDIR override when HOLOHUB_PKG_TGZ=ON.
  • CLI routing logic (holohub.py) now separates generator-specific CPack configs (e.g. CPackConfig-*-TGZ.cmake) from base configs and dispatches each generator to its correct config file; HOLOHUB_PKG_TGZ=ON is passed to cmake whenever TGZ is among the requested generators, which affects CMAKE_INSTALL_LIBDIR for all generators in the same build.
  • Holoscan GStreamer gains a holohub_configure_tgz() call and aligns all install() component names to holoscan-gstreamer; six new unit tests cover the new CLI paths.

Confidence Score: 3/5

The CLI change that sets HOLOHUB_PKG_TGZ=ON at cmake configure time would silently produce a malformed DEB package when DEB and TGZ are both requested in the same run, because the library install path is changed globally for all generators.

The CMAKE_INSTALL_LIBDIR forced override in holohub_configure_tgz is intentional for TGZ builds, but the CLI applies it unconditionally whenever TGZ appears in the generator list — even alongside DEB. Since both generators share the same cmake configure step, the DEB package would get lib/13/ instead of the expected lib/ layout. This is a real defect on a reachable user-facing code path (--pkg-generator DEB,TGZ), and no existing test exercises the DEB output path in a mixed build to catch the regression.

utilities/cli/holohub.py (the HOLOHUB_PKG_TGZ=ON flag assignment) and cmake/modules/holohub_configure_tgz.cmake (the CMAKE_INSTALL_LIBDIR override and EXPORT_NAME path logic) warrant the most attention.

Important Files Changed

Filename Overview
utilities/cli/holohub.py Adds TGZ generator routing: separates generator-specific CPack configs from base configs and passes HOLOHUB_PKG_TGZ=ON to cmake; the flag is also set for mixed DEB,TGZ runs which causes the DEB package to get the wrong lib/<cuda_version>/ install path
cmake/modules/holohub_configure_tgz.cmake New module generating a KitMaker-format TGZ CPack config; correctly handles component filtering and archive layout, but the EXPORT_NAME path is hardcoded to lib/cmake/ rather than ${CMAKE_INSTALL_LIBDIR}/cmake/ (which diverges when the LIBDIR override is active), and the LIBDIR cache mutation occurs before argument validation
modules/holoscan-gstreamer/CMakeLists.txt Adds TGZ configuration and aligns component names from "gstreamer" to "holoscan-gstreamer"; NOTICE.md and LICENSE installs look correct
operators/gstreamer/CMakeLists.txt Renames all install() component references from "gstreamer" to "holoscan-gstreamer" for consistency; straightforward rename with no logic changes
utilities/cli/tests/test_cli.py Adds six new test cases covering TGZ invocation, multi-generator routing, missing config detection, and generator-specific config selection; none of the tests validate the install path side effect of HOLOHUB_PKG_TGZ=ON on DEB packages in a mixed build
CMakeLists.txt Adds COMPONENT holohub-python to the Python module install() rule; correct and minimal change

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["holohub package module\n--pkg-generator DEB,TGZ"] --> B{cpack_generators\nnon-empty?}
    B -- yes --> C["cmake configure\n-DBUILD_ALL=OFF -DMODULE_*=ON"]
    C --> D{TGZ in\ngenerators?}
    D -- yes --> E["Append -DHOLOHUB_PKG_TGZ=ON\nforces CMAKE_INSTALL_LIBDIR\n= lib/cuda_major/ globally"]
    D -- no --> F["CMAKE_INSTALL_LIBDIR\n= lib/ (default)"]
    E --> G["cmake build"]
    F --> G
    G --> H["Scan pkg/CPackConfig-*.cmake"]
    H --> I["Classify: gen-specific vs base"]
    I --> J{for each generator}
    J --> K["DEB uses base config"]
    J --> L["TGZ uses TGZ-specific config"]
    K --> M["cpack -G DEB\nlib path = lib/13/ if TGZ also requested"]
    L --> N["cpack -G TGZ\nlib path = lib/13/"]
    B -- WHEEL only --> O["python -m build --wheel"]
Loading

Reviews (1): Last reviewed commit: "Module: Fix wheel rpath and scope KitMak..." | Re-trigger Greptile

Comment thread utilities/cli/holohub.py
Comment on lines +2287 to +2288
if "TGZ" in cpack_generators:
cmake_args.append("-DHOLOHUB_PKG_TGZ=ON")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 DEB package gets wrong lib path when combined with TGZ

-DHOLOHUB_PKG_TGZ=ON is appended whenever TGZ is among the requested generators, which causes holohub_configure_tgz to force CMAKE_INSTALL_LIBDIR to lib/<cuda_major>/ for the entire configure step. All install() rules using ${CMAKE_INSTALL_LIBDIR} — including those for the DEB component — then install the library to lib/13/ instead of the expected lib/. Running --pkg-generator DEB,TGZ therefore silently produces a malformed Debian package with the wrong library path.

Comment on lines +68 to +89
NAMESPACE holoscan::
COMPONENT ${export_component}
)
include(CMakePackageConfigHelpers)
configure_package_config_file("${CMAKE_CURRENT_FUNCTION_LIST_DIR}/Config.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}Config.cmake"
INSTALL_DESTINATION ${config_install_dir}
NO_SET_AND_CHECK_MACRO
NO_CHECK_REQUIRED_COMPONENTS_MACRO
)
write_basic_package_version_file(
"${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}ConfigVersion.cmake"
VERSION "${ARG_VERSION}"
COMPATIBILITY AnyNewerVersion
)
install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}Config.cmake
${CMAKE_CURRENT_BINARY_DIR}/${ARG_NAME}ConfigVersion.cmake
DESTINATION ${config_install_dir}
COMPONENT ${export_component}
)
endif()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 EXPORT_NAME cmake config path diverges from CMAKE_INSTALL_LIBDIR

When HOLOHUB_PKG_TGZ=ON, the CMAKE_INSTALL_LIBDIR override runs at the top of the function and sets it to lib/<cuda_major>/. The EXPORT_NAME block then hardcodes config_install_dir to lib/cmake/${ARG_NAME}, which no longer matches ${CMAKE_INSTALL_LIBDIR}/cmake/${ARG_NAME}. Any downstream consumer using find_package() against the TGZ tree would fail because the library is at lib/13/ but the config is at lib/cmake/. Consider using ${CMAKE_INSTALL_LIBDIR}/cmake/${ARG_NAME} for config_install_dir when in TGZ mode.

Comment on lines +43 to +50
# Only active when the CLI sets HOLOHUB_PKG_TGZ=ON (i.e. --pkg-generator TGZ);
# all other builds (normal installs, DEB, wheel) keep the default lib/ path.
if(HOLOHUB_PKG_TGZ)
find_package(CUDAToolkit QUIET)
if(CUDAToolkit_FOUND)
set(CMAKE_INSTALL_LIBDIR "lib/${CUDAToolkit_VERSION_MAJOR}"
CACHE STRING "Library install directory (KitMaker multi-variant layout)" FORCE)
endif()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Cache modification runs before argument validation

The CMAKE_INSTALL_LIBDIR cache override with FORCE executes unconditionally (when HOLOHUB_PKG_TGZ is set) before the required-argument check that follows. If a caller omits NAME or VERSION, the global cache is already mutated before message(FATAL_ERROR) fires. While FATAL_ERROR prevents the build from proceeding, a partially modified cache can cause surprising behavior on the next reconfigure attempt. Consider moving argument validation before any side-effecting cache writes.

@coderabbitai

coderabbitai Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR adds TGZ (tar.gz) archive packaging support to HoloHub. It introduces a CMake module for CPack TGZ configuration, applies TGZ packaging to the holoscan-gstreamer module, standardizes install component naming, updates CLI tooling to execute generator-specific packaging, and adds comprehensive test coverage for the new TGZ workflow.

Changes

TGZ Packaging Support

Layer / File(s) Summary
TGZ CMake configuration module
cmake/modules/holohub_configure_tgz.cmake
New holohub_configure_tgz() function configures CPack for TGZ generation, handles CUDA library path normalization, selects install components, builds CPack project entries, and sets KitMaker-compliant naming conventions.
Holoscan-gstreamer module TGZ packaging
modules/holoscan-gstreamer/CMakeLists.txt
Configures holoscan-gstreamer module to generate TGZ packages via holohub_configure_tgz(), establishes default component name, and ensures NOTICE and LICENSE files are packaged under consistent holoscan-gstreamer component.
Gstreamer operator component naming
operators/gstreamer/CMakeLists.txt
Renames all install components from gstreamer to holoscan-gstreamer across library target, CMake exports, config files, and headers; updates install test fixture to validate against correct component.
CLI TGZ generator support
utilities/cli/holohub.py
Updates package command help text to list TGZ, adds -DHOLOHUB_PKG_TGZ=ON CMake flag when TGZ selected, and refactors CPack config discovery to route generator-specific configs (e.g., CPackConfig-*-TGZ.cmake) while validating availability per requested generator.
TGZ packaging test coverage
utilities/cli/tests/test_cli.py
Adds DEB test assertion excluding TGZ flag, new TGZ single-generator test, multi-generator test (DEB,TGZ) verifying correct config routing, and error-path tests for missing/incomplete CPack configs.
Python artifacts component
CMakeLists.txt
Adds holohub-python install component name to generated Python modules directory, enabling selective packaging.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • nvidia-holoscan/holohub#1569: Introduces componentized installs and cmake --install --component gstreamer behavior for the GStreamer bridge; this PR renames the component to holoscan-gstreamer and extends packaging beyond Debian.
  • nvidia-holoscan/holohub#1582: Modifies handle_package() packaging flow; the TGZ-enabled packaging logic in this PR builds on the module scaffolding and package-command behavior established there.

Suggested reviewers

  • GilShpr
  • wyli
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the main change: adding TGZ packaging support and validating it with Holoscan GStreamer.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
utilities/cli/holohub.py (1)

482-487: ⚡ Quick win

Validate --pkg-generator values at parse time

The help text documents DEB, TGZ, WHEEL, but invalid values currently pass through and fail later in packaging. Add explicit validation so users get immediate, actionable errors.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@utilities/cli/holohub.py` around lines 482 - 487, The --pkg-generator
add_argument currently allows any string; update the parser call that defines
"--pkg-generator" (dest="pkg_generator") to validate values at parse time by
either (a) using argparse.choices for single-value input or (b) implementing a
custom type/validator that splits the comma-separated string and verifies each
token is one of {"DEB","TGZ","WHEEL"}, raising argparse.ArgumentTypeError on
invalid entries; ensure the help text remains the same and the stored value is
normalized (e.g., uppercase list or comma-joined string) so downstream packaging
logic receives validated inputs.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@utilities/cli/holohub.py`:
- Around line 2287-2288: The current logic sets HOLOHUB_PKG_TGZ in the global
cmake_args when "TGZ" is present in cpack_generators causing TGZ-specific
CMAKE_INSTALL_LIBDIR to leak into DEB builds; instead, detect TGZ in
cpack_generators and run a separate configure/generate/install flow for TGZ
without mutating the shared cmake_args used for DEB (i.e., do not append
"-DHOLOHUB_PKG_TGZ=ON" to the global cmake_args); update holohub.py to keep
cmake_args immutable for non-TGZ generators and create a copy or new
cmake_args_tgz with "-DHOLOHUB_PKG_TGZ=ON" only when invoking the TGZ
configure/generate steps so CMAKE_INSTALL_LIBDIR remains correct for DEB builds.

---

Nitpick comments:
In `@utilities/cli/holohub.py`:
- Around line 482-487: The --pkg-generator add_argument currently allows any
string; update the parser call that defines "--pkg-generator"
(dest="pkg_generator") to validate values at parse time by either (a) using
argparse.choices for single-value input or (b) implementing a custom
type/validator that splits the comma-separated string and verifies each token is
one of {"DEB","TGZ","WHEEL"}, raising argparse.ArgumentTypeError on invalid
entries; ensure the help text remains the same and the stored value is
normalized (e.g., uppercase list or comma-joined string) so downstream packaging
logic receives validated inputs.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c1ed2b25-7e13-49c0-8453-43af4f58a33a

📥 Commits

Reviewing files that changed from the base of the PR and between ddb31e5 and eaeb342.

📒 Files selected for processing (6)
  • CMakeLists.txt
  • cmake/modules/holohub_configure_tgz.cmake
  • modules/holoscan-gstreamer/CMakeLists.txt
  • operators/gstreamer/CMakeLists.txt
  • utilities/cli/holohub.py
  • utilities/cli/tests/test_cli.py

Comment thread utilities/cli/holohub.py
Comment on lines +2287 to +2288
if "TGZ" in cpack_generators:
cmake_args.append("-DHOLOHUB_PKG_TGZ=ON")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Split TGZ and non-TGZ configure paths to avoid mutating DEB layout

Line 2287 enables HOLOHUB_PKG_TGZ for the whole configure when --pkg-generator DEB,TGZ is used. Because TGZ mode forces CMAKE_INSTALL_LIBDIR globally during configure, the DEB package from the same build can inherit TGZ-specific install paths. This breaks generator isolation.

Suggested fix direction
- if "TGZ" in cpack_generators:
-     cmake_args.append("-DHOLOHUB_PKG_TGZ=ON")
- holohub_cli_util.run_command(cmake_args, ...)
- holohub_cli_util.run_command(build_cmd, ...)
- # then cpack for all generators
+ # configure/build per generator class to isolate install layout
+ # (e.g., one build dir with HOLOHUB_PKG_TGZ=ON for TGZ, another without it for DEB/RPM/ZIP)
+ # then run cpack against each generator’s corresponding config set
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@utilities/cli/holohub.py` around lines 2287 - 2288, The current logic sets
HOLOHUB_PKG_TGZ in the global cmake_args when "TGZ" is present in
cpack_generators causing TGZ-specific CMAKE_INSTALL_LIBDIR to leak into DEB
builds; instead, detect TGZ in cpack_generators and run a separate
configure/generate/install flow for TGZ without mutating the shared cmake_args
used for DEB (i.e., do not append "-DHOLOHUB_PKG_TGZ=ON" to the global
cmake_args); update holohub.py to keep cmake_args immutable for non-TGZ
generators and create a copy or new cmake_args_tgz with "-DHOLOHUB_PKG_TGZ=ON"
only when invoking the TGZ configure/generate steps so CMAKE_INSTALL_LIBDIR
remains correct for DEB builds.

@tbirdso

tbirdso commented Jun 10, 2026

Copy link
Copy Markdown
Contributor Author

Moving CLI updates to holoscan-cli: nvidia-holoscan/holoscan-cli#188

tbirdso added a commit to tbirdso/holoscan-cli that referenced this pull request Jun 10, 2026
Migrate TGZ generator support from holohub-internal
tbirdso/holoscan-gstreamer-tgz branch to holoscan-cli:

- Add TGZ to --pkg-generator help text alongside DEB and WHEEL
- Pass -DHOLOHUB_PKG_TGZ=ON to cmake configure when TGZ is requested;
  this lets modules set CMAKE_INSTALL_LIBDIR to lib/<cuda_major>/ for the
  KitMaker multi-variant layout without affecting DEB/WHEEL builds
- Route each generator to its matching CPackConfig-*-<GEN>.cmake if one
  exists, falling back to the base CPackConfig-*.cmake; this lets modules
  emit generator-specific CPack configs with different install layouts
- Synthesize generator-specific filenames in dry-run so routing is
  consistent with real builds
- Hard-fail with clear messages when no CPack configs were generated or
  when the requested generator has no matching config
- Add six unit tests covering the new TGZ paths and error cases

Ported from: nvidia-holoscan/holohub#1604

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Tom Birdsong <tbirdsong@nvidia.com>
@tbirdso tbirdso changed the title CLI: Add "tar.gz" packaging support and exercise with Holoscan GStreamer DRAFT: CLI: Add "tar.gz" packaging support and exercise with Holoscan GStreamer Jun 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants