Skip to content

musl libc detection doesn't work correctly #3852

Open
@kasper93

Description

@kasper93

Describe the bug
musl libc detection doesn't work as expected. There are some hard coded checks for Alpine Linux, but they are fragile as musl libc is not exclusive to Alpine Linux.

To Reproduce

  1. Run any action, for example.
jobs:
  chimera:
    runs-on: ubuntu-latest
    container:
      image: chimeralinux/chimera:latest

    steps:
      - uses: actions/checkout@v4
  1. Runner will download glibc version of node binaries, that fail to run, because there is no glibc available...
exec /__e/node20/bin/node: no such file or directory

no such file or directory in this case relates in this case to the glibc dynamic linker, which is not available on musl based distro.

Workaround
This is "fixable" by laying that we are Alpine, but naive checks like that are fragile and fails with any non-glibc distribution that happens to be not Alpine.

Adding this before checkout step make it work.

      - name: ...
        run: |
          # Wa are Alpine now! Apparently, only Alpine is allowed to use musl...
          # Needed for actions/checkout.
          sed '/^ID="/s/chimera/alpine/' /etc/os-release > /tmp/os-release
          mv /tmp/os-release /etc/os-release

Expected behavior
Detection on musl libc works and downloads correct node binaries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions