2026-05-08 11:15:50 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2026-03-23 11:42:17 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2026-05-08 11:12:26 +00:00
2026-03-23 12:12:00 +00:00
2025-05-19 18:54:26 +00:00
2025-06-18 01:34:16 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2025-06-18 01:34:50 +00:00
2025-08-16 12:09:07 +00:00
2026-03-23 12:14:41 +00:00
2026-03-23 12:15:49 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2026-04-06 22:09:23 +00:00
2025-05-19 18:54:26 +00:00
2026-04-06 21:47:07 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2026-05-08 11:12:44 +00:00
2026-03-23 13:12:50 +00:00
2026-03-23 13:45:30 +00:00
2025-05-19 18:54:26 +00:00
2026-04-03 17:13:07 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2026-03-23 12:50:28 +00:00
2026-03-23 12:49:34 +00:00
2025-05-19 18:54:26 +00:00
2026-03-31 17:56:39 +00:00
2025-08-16 12:08:44 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2026-05-08 11:13:05 +00:00
2026-03-23 12:54:34 +00:00
2025-08-16 11:59:55 +00:00
2026-03-23 12:55:53 +00:00
2025-05-19 18:54:26 +00:00
2025-05-19 18:54:26 +00:00
2026-03-23 12:57:50 +00:00
2025-03-15 18:54:31 +00:00
2025-09-30 15:05:58 +00:00
2026-05-08 11:15:50 +00:00

muslcrux overlay

Replacing glibc with musl in the CRUX distribution is not a simple matter of swapping out one port and recompiling. Instead, many ports require patching to make them work with musl. Some of those patched ports have been collected in this repository, which can therefore serve as an overlay (masking the official ports on your CRUX-MUSL installation).

Many of the patches are not very drastic, altering only the footprint where the libc provider is incorporated into a filename. The exact string appearing in a filename is somewhat predictable (x86_64-linux-gnu versus x86_64-linux-musl), so an easier approach is to rewrite internal pkgmk functions instead:

check_footprint() {
    local CN CM
    local TRUTH="$PKGMK_ROOT/.footprint"; local diffs=0; local severity=error;
    [ -f "$PKGMK_PACKAGE_DIR/$name#$version-$release.pkg.tar.$PKGMK_COMPRESSION_MODE" || \
        { error "$package not found. Cannot check footprint."; exit "$E_FOOTPRINT"; }

    if [ -f "$TRUTH" ]; then
        diff -w -t -U 0 <(sed "s;x86_64-linux-\(gnu\|musl\);x86_64-linux-LIBC;" "$TRUTH" | sort) \
                <(make_footprint | sed "s;x86_64-linux-\(gnu\|musl\);x86_64-linux-LIBC;" | sort) | \
        sed '/^@@/d; /^+++/d; /^---/d; s/^+/NEW    /g; s/^-/MISSING /g' > ".footprint.diff"
        if [ -s ".footprint.diff" ]; then
            CN=$(grep -c ^NEW ".footprint.diff"); CM=$(grep -c ^MISSING ".footprint.diff")
            [ "$PKGMK_IGNORE_MISSING" = "yes" ] || diffs=$CM
            [ "$PKGMK_IGNORE_FOOTPRINT" = "yes" ] && diffs=0 || diffs=$(( diffs+CN ))
            (( diffs == 0 )) && severity=warning
            $severity "footprint mismatch found:"; cat ".footprint.diff" >&2
        fi
        rm ".footprint.diff"
    else
        warning "footprint not found, creating new."; make_footprint > "$TRUTH"
    fi
    (( diffs == 0 )) || { [ "$PKGMK_KEEP_WORK" = "yes" ] || rm -rf "$PKGMK_WORK_DIR";
                          exit $E_FOOTPRINT; }
}

Even after trimming this overlay to drop the dups that can be handled by patching pkgmk, other dups will still remain. These include not only the ports that require actual modifications of their code to compile with musl, but also those ports we opted to build with fewer dependencies (e.g., omitting libxcrypt and linux-pam). If the dependency in the official port is only auto-detected (not explicitly enabled with an argument passed to configure), then you don't actually need the dup in this overlay; you can run prt-get lock glibc libxcrypt linux-pam, and then those ports will never be included when prt-get resolves dependencies. As not all users will want their /var/lib/prt-get.locker to be repurposed in this manner, we provide in this collection even the dups whose only difference is the "Depends on:" header.

Feel free to propose additions to this repository, as you discover new ports that need patching to work with musl (or without libxcrypt and linux-pam). Most of the CRUX-MUSL contributors hang out in the #opencrux IRC channel, or you can open a new issue through Gitea.

Description
overlay needed when replacing glibc with musl
Readme 1.1 MiB
Languages
C 92.3%
Roff 4.2%
Shell 3.2%
Makefile 0.3%