!ayCRiZriCVtuCUpeLp:nixos.org

Nix Cross Compiling

568 Members
124 Servers

Load older messages


SenderMessageTime
19 Oct 2025
@dramforever:matrix.orgdramforeverunfortunately it does seem that you need to patch musl to get it16:49:08
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)its just a shim, i can inline the shim16:49:27
@dramforever:matrix.orgdramforeverokay you tricked me you wrote fgetspent_r twice 😆16:49:49
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) *

Yeah, i found that a few hours ago, alpine uses something like that: https://gitlab.alpinelinux.org/alpine/aports/-/blob/3.22-stable/community/accountsservice/musl-fgetspent_r.patch

But fgetpwent_r is broken the same way

16:49:54
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)OH16:49:59
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)shit16:50:00
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)sorry16:50:04
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) *

matthewcroughan: i have copied the nixosTests.login and added security.enableWrappers = false + pwaccess stuff, and the test is succeeding. Its screaming at me and i am definitely doing things wrong, but this might be progress?

Bad news is, pwaccess uses fgetspent_r / ~~fgetspent_r~~ fgetpwent_r which are unavailable on musl. Not sure yet how i'll fix that pain

16:50:18
@dramforever:matrix.orgdramforeverokay but16:50:29
@dramforever:matrix.orgdramforeverthis alpine fgetspent_r is not _r16:50:42
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)yeah....16:50:51
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)we love hacks16:51:13
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all) anyways, if matthewcroughan has an idea to make pwaccess work on musl (e.g. writing a similar shim for fgetpwent_r too) then we may have an suidless musl login 17:11:50
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)i won't poke the musl part of this too hard for now17:12:06
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)if you wanted to, then matthewcroughan.cachix.org has a lot of cache 17:12:25
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)I want to host and sign a musl hydra at some point 17:12:40
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)this needs basically no cache, its like 25 packages (admittedly systemdLibs takes a few minutes, but still very manageable). I don't have a setup to run musl VM tests, i am missing nix expressions for that, not necessarily cache17:13:21
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)But do I even need to run hydra? Can't I just run something like https://git.snix.dev/snix/snix/src/branch/canon/ops/machines/snix-cache ?17:13:17
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)There is no way to run a musl vm test because of only one thing17:13:38
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)pytest breakage on staging-next17:13:45
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)https://git.snix.dev/snix/snix/src/branch/canon/ops/machines/snix-cache17:13:52
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)* https://github.com/MatthewCroughan/nixos-musl17:13:57
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)fair17:14:06
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192) this repo has inside legacyPackages.vmtest-gnu-musl which would do it if pytest weren't broken by https://github.com/NixOS/nixpkgs/pull/451506 17:14:18
@grimmauld:grapevine.grimmauld.deGrimmauld (any/all)anyways, you have suid-less login, if you make that musl-compatible then give me a shout17:14:24
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Where's the code for that exactly?17:15:02
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Ah here 17:15:13
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)If you want to test it too, you'll first need https://github.com/MatthewCroughan/nixpkgs/tree/mc/conditional-glibcsystemdinitrd because that is the only thing in nixpkgs that isn't overridable atm 17:16:16
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)other than this, you can just do everything via overlays 17:16:42
@matthewcroughan:defenestrate.itmatthewcroughan @ 39c3 (DECT 94667 or 97340 or 67192)Or you can use the old scripted initrd, but that's quite broken by now 17:17:27

Show newer messages


Back to Room ListRoom Version: 6