Skip to content

Introduce linux-headers package (transition plan from glibc) #10

Description

@sighook

Problem

Currently, Linux kernel headers are bundled inside the glibc and glibc-32 packages. This creates tight coupling: glibc owns files under /usr/include that really belong to the kernel. Updating headers or glibc independently is messy, and file conflicts are inevitable if we try to split them abruptly.


Goal

Create a dedicated linux-headers package to provide kernel headers separately, while ensuring a smooth transition that does not break builds or cause file conflicts.


Transition Strategy

  1. Install Path Separation

    • New linux-headers package installs headers under:
      /usr/include/linux-headers-<version>/
    • Glibc is configured with --with-headers=/usr/include/linux-headers-<version> so it no longer needs to ship headers itself.
    • This avoids direct overlap with glibc’s current /usr/include ownership.
  2. Temporary Duplication

    • During the transition, headers remain in glibc packages and are provided by linux-headers.
    • This ensures existing builds don’t break while we test the new separation.
    • Once validated, headers are dropped from glibc, leaving linux-headers as the sole owner.
  3. Dependency Update

    • After duplication phase, glibc and glibc-32 gain Depends on: linux-headers.
    • Builders install headers first, then glibc builds against them.
    • No file conflicts, since glibc no longer installs headers itself.

Pitfalls & Safeguards

  • Coupling: glibc must always be built against the same header set provided by linux-headers. Updating headers independently can break ABI expectations.
  • Conflict avoidance: path separation ensures no overlapping ownership of /usr/include.
  • Release timing: the split should be staged across one release cycle, with duplication in place before headers are removed from glibc.

Next Steps

  • Prototype linux-headers package with path separation.
  • Test glibc build configured against external headers.
  • Validate duplication phase (headers in both glibc and linux-headers).
  • Remove headers from glibc once stable.
  • Document coordination rules for updating headers vs. glibc baseline:

Activity

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

    enhancementNew feature or request

    Type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions