Skip to content

e2fsprogs (GPL-2.0) required as macOS host dependency — request for configurable path and permissive alternatives #2308

Description

@adiaspace

Problem Statement

e2fsprogs (GPL-2.0) required as macOS host dependency — request for configurable path and permissive alternatives

Summary

The OpenShell sandbox rootfs (sandbox-bootstrap-rootfs-ext4-v3-openshell-*) bundles e2fsprogs binaries and libraries, some of which are licensed under GPL-2.0. We need clarification on:

  1. Why these GPL binaries are included in the rootfs
  2. What compliance obligations apply when distributing the rootfs
  3. Whether these binaries can be removed or replaced with permissively-licensed alternatives

Bundled Files

Analysis of the rootfs shows 13 filesystem entries from e2fsprogs:

File Type License
bin/mke2fs binary GPL-2.0
bin/debugfs binary GPL-2.0
bin/mkfs.ext4 symlink → mke2fs —
sbin/mke2fs binary (bit-identical to bin/mke2fs) GPL-2.0
sbin/debugfs binary (bit-identical to bin/debugfs) GPL-2.0
sbin/mkfs.ext4 symlink → mke2fs —
lib/libext2fs.2.1.dylib dylib LGPL-2.0
lib/libe2p.2.1.dylib dylib LGPL-2.0
lib/libblkid.2.0.dylib dylib LGPL-2.1
lib/libcom_err.1.1.dylib dylib MIT-derived
lib/libss.1.0.dylib dylib MIT-derived
lib/libuuid.1.1.dylib dylib BSD-3-Clause
lib/libintl.8.dylib dylib (gettext) LGPL-2.1

Environment

  • OpenShell version: 0.0.74, 0.0.83
  • Rootfs: sandbox-bootstrap-rootfs-ext4-v3-openshell-0.0.74
  • Platform: macOS (Apple Silicon)

Impact

This is blocking enterprise distribution of products built on OpenShell until compliance approach is clarified.

References

Proposed Design

Questions

  1. Purpose: What functionality in OpenShell requires mke2fs and debugfs? Are they used at runtime or only during rootfs build?

  2. Removal: Can these binaries be excluded from the distributed rootfs if they're only needed at build time?

  3. Compliance approach: If these must be distributed, what is NVIDIA's recommended compliance approach?

    • Include license text in rootfs?
    • Provide source code URL in documentation?
    • Other?
  4. Alternatives: Are there plans to replace GPL-2.0 tools with permissively-licensed alternatives (e.g., for ext4 operations)?

Alternatives Considered

GPL-2.0 Compliance Requirements

When distributing GPL-2.0 binaries, the following obligations apply:

  1. Include GPL-2.0 license text with the distribution
  2. Provide access to source code — either bundled or via written offer valid for 3 years
  3. No additional restrictions beyond the GPL

Agent Investigation

No response

Checklist

  • I've reviewed existing issues and the architecture docs
  • This is a design proposal, not a "please build this" request

Activity

  1. drew commented on Jul 17, 2026

    @drew
    Collaborator

    I think the report may be conflating macOS host dependencies with files inherited by the Linux guest image.

    • On macOS, e2fsprogs is an external host dependency used to create ext4 images; it is not bundled in OpenShell's source or official macOS release artifacts.
    • The Linux mke2fs, debugfs, and mkfs.ext4 files in the default rootfs are inherited from the Community bootstrap image's Ubuntu parent, which also includes the package's copyright metadata and GPL-2 license text.
    • The VM driver does not copy the host tools or libraries into the rootfs. A compatible custom bootstrap_image without e2fsprogs produces a rootfs without them.
    • The reported .dylib names match Homebrew's host-side dependency closure, but I found no .dylib files in the Linux rootfs artifacts I inspected. If they were observed inside rootfs.ext4, please provide the raw scanner output and image digest.
  2. removed
    state:triage-neededOpened without agent diagnostics and needs triage
    on Jul 17, 2026
  3. changed the title [-]# GPL-2.0 licensed binaries bundled in sandbox rootfs — can be replaced with permissively-licensed alternatives[/-] [+]GPL-2.0 licensed binaries bundled in sandbox rootfs — can be replaced with permissively-licensed alternatives[/+] on Jul 17, 2026
  4. changed the title [-]GPL-2.0 licensed binaries bundled in sandbox rootfs — can be replaced with permissively-licensed alternatives[/-] [+]e2fsprogs (GPL-2.0) required as macOS host dependency — request for configurable path and permissive alternatives[/+] on Jul 22, 2026
  5. adiaspace commented on Jul 22, 2026

    @adiaspace
    Author

    Thanks @drew for the thorough response — you're correct that the original report conflated macOS host dependencies with Linux rootfs contents. After a deeper investigation into both codebases, here's a more precise breakdown.

    Correction: .dylib files are macOS host-side, not inside the Linux rootfs

    The .dylib entries listed in the issue are macOS dynamic libraries from Homebrew's e2fsprogs formula. They do not exist inside the Linux guest rootfs (Linux uses .so). you are right — the Linux-side mke2fs/debugfs in the rootfs are inherited from the Ubuntu base image and ship with standard Debian/Ubuntu copyright metadata.

    Why we bundle e2fsprogs on the macOS host

    The OpenShell VM driver (openshell-driver-vm) requires mke2fs, mkfs.ext4, and debugfs at runtime on the macOS host to:

    1. Create ext4 disk images from rootfs.tar — format_ext4_image_from_dir() in [crates/openshell-driver-vm/src/rootfs.rs](https://github.com/NVIDIA/OpenShell/blob/main/crates/openshell-driver-vm/src/rootfs.rs) invokes mke2fs/mkfs.ext4
    2. Inject files into the ext4 image (TLS certs, JWT keys, init scripts) — write_rootfs_image_file() and set_rootfs_image_file_mode() invoke debugfs

    Hardcoded Homebrew paths in OpenShell source

    The driver's tool resolution function hardcodes Homebrew prefixes for both Apple Silicon and Intel Macs:

    // crates/openshell-driver-vm/src/rootfs.rs
    fn e2fs_tool_candidates(tool: &str) -> Vec<PathBuf> {
        let mut candidates = vec![PathBuf::from(tool)];
        for root in ["/opt/homebrew/opt/e2fsprogs", "/usr/local/opt/e2fsprogs"] {
            candidates.push(Path::new(root).join("sbin").join(tool));
            candidates.push(Path::new(root).join("bin").join(tool));
        }
        candidates
    }

    This means the driver searches in this order:

    1. $PATH lookup (bare tool name — e.g. mke2fs)
    2. /opt/homebrew/opt/e2fsprogs/{sbin,bin}/ (Apple Silicon Homebrew)
    3. /usr/local/opt/e2fsprogs/{sbin,bin}/ (Intel Homebrew)

    If the tool is not found anywhere, rootfs provisioning fails with:

    failed to create ext4 rootfs image: ... Install e2fsprogs (mke2fs/mkfs.ext4) and retry
    

    macOS ships no ext4 utilities natively, and for enterprise distribution we cannot assume end users have Homebrew installed. So our installer bundles precompiled e2fsprogs binaries from Homebrew into a private prefix at /usr/local/share/arc/e2fsprogs/{bin,sbin,lib}/ — never into Homebrew's own paths. At runtime, we prepend this path to PATH when spawning the gateway, so candidate Point#1 above resolves to our bundled copy.

    The bundled files and their licenses:

    File License
    bin/mke2fs, sbin/mke2fs GPL-2.0
    bin/debugfs, sbin/debugfs GPL-2.0
    bin/mkfs.ext4, sbin/mkfs.ext4 symlink → mke2fs
    lib/libext2fs.*.dylib LGPL-2.0
    lib/libe2p.*.dylib LGPL-2.0
    lib/libblkid.*.dylib LGPL-2.1
    lib/libcom_err.*.dylib MIT-derived
    lib/libss.*.dylib MIT-derived
    lib/libuuid.*.dylib BSD-3-Clause
    lib/libintl.*.dylib LGPL-2.1 (gettext)

    Dylib references are rewritten via install_name_tool to load from the bundled lib/ directory, and all binaries are re-signed ad-hoc in the postinstall script to ensure consistent code signing.

    Questions for the OpenShell team

    1. Environment variable override: Would you consider adding an OPENSHELL_E2FSPROGS_DIR (or similar) environment variable to let integrators specify a custom e2fsprogs prefix? This would let us point the driver directly at our bundled path without relying on $PATH injection.

    2. Permissive alternatives: Are there plans to replace the mke2fs/debugfs dependency with a Rust-native or permissively-licensed ext4 implementation? This would eliminate the GPL-2.0 bundling requirement entirely for downstream distributors.

    3. Compliance guidance: For distributors who must bundle these GPL-2.0 binaries — is including the GPL-2.0 license text alongside the binaries plus a source-code URL (pointing to the e2fsprogs upstream git) sufficient, or does NVIDIA recommend a specific compliance approach?


  6. drew commented on Jul 28, 2026

    @drew
    Collaborator

    Permissive alternatives: Are there plans to replace the mke2fs/debugfs dependency with a Rust-native or permissively-licensed ext4 implementation?

    No concrete plans, but I have an idea to prebuild sparse ext4 templates in CI using e2fsprogs. Then we can ship the compressed filesystem artifacts and remove the host dep. Let me give this approach a try and see if it works.

  7. github-actions commented on Aug 28, 2026

    @github-actions

    This issue has had no activity for 14 days and is now marked stale. It may be closed in 7 days if there is no further activity. Comment or remove the state:stale label to keep it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    state:staleInactive item at risk of automatic closure.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions