| 29 Jul 2025 |
ElvishJerricco | I'm assuming python is too dynamic-brained to be able to statically determine which python files are needed by a given program? | 07:36:28 |
ElvishJerricco | well, I guess that's only a fraction of the problem, since you still need to include native libs and the interpreter and all that. Yea this sounds like pain | 07:37:40 |
K900 | Yeah | 07:37:57 |
Marcel | In reply to @elvishjerricco:matrix.org yea, indeed, copy_bin_and_libs ${getExe ifstate} on your branch results in a non-functional nuke-refs'd program, and using the program outside of extra-utils instead pulls in the whole closure for a whopping 75M of initrd size. Is there a reason why copy_bin_and_libs should not be working with systemd stage one? | 07:39:52 |
ElvishJerricco | copy_bin_and_libs is a extra-utils thing, which is not how systemd initrd defines its binaries. | 07:40:42 |
ElvishJerricco | See: https://github.com/NixOS/nixpkgs/blob/master/pkgs/build-support/kernel/make-initrd-ng/README.md | 07:40:44 |
ElvishJerricco | heh, that readme needs an update. | 07:43:08 |
ElvishJerricco | it describes taking pairs of paths as input but nowadays it's json | 07:43:19 |
ElvishJerricco | it also doesn't cover a couple of the dependencies it chases, namely wrapped executables and the .dlopen ELF section things that systemd uses now. | 07:44:13 |
ElvishJerricco | oh no it does mention the wrapped exes | 07:45:05 |
ElvishJerricco | oh, if you were asking why I said copy_bin_and_libs "results in a non-functional nuke-refs'd program", I meant when trying to add the program to scripted initrd. | 07:51:06 |
Marcel | But I've been using ifstate in scripted initrd for over a year without any problem. | 14:03:05 |
| 31 Jul 2025 |
| @sammy:cherrykitten.dev left the room. | 10:03:53 |
| 29 Jul 2025 |
emily | feel like we should have a "just add the normal closure" thing for systemd stage 1 | 14:03:51 |
emily | (or just do that unconditionally and trim down some closures/split outputs :P) | 14:04:04 |
Marcel | Idk do you see any alternatives that should currently be doable? Specifying every store path that's necessary? Building a static binary of ifstate? Idk if that's possible using python | 14:19:24 |
K900 | You can't build a static binary with Python | 14:19:48 |
K900 | You can probably drag all of Python into initrd | 14:19:54 |
K900 | If you're OK with having a 100MB+ initrd | 14:19:59 |
Marcel | In reply to @k900:0upti.me If you're OK with having a 100MB+ initrd I mean it wasn't a problem until now | 14:20:18 |
hexa | yeah, python is all about propagating dependencies into a pythonpath | 14:20:20 |
Marcel | In reply to @k900:0upti.me You can't build a static binary with Python Yeah I know but for windows these things exist which encapsulate you whole python stuff into one exe | 14:20:50 |
hexa | people will create their 512 MiB efi partition and then be surprised why the initrd is so damn huge | 14:20:50 |
K900 | Well then presumably you can still do that | 14:21:06 |
hexa | like this guy https://discourse.nixos.org/t/how-to-manage-the-size-of-the-boot-partition/67275?u=hexa | 14:21:16 |
emily | I think systemd stage 1 doesn't directly expose a thing for it but I'm not sure | 14:21:28 |
Marcel | In reply to @hexa:lossy.network people will create their 512 MiB efi partition and then be surprised why the initrd is so damn huge Idk adding a note to the enable option of the initrd stuff | 14:21:29 |
emily | (not sure scripted stage 1 did either) | 14:21:30 |
emily | can you use python3Minimal Marcel | 14:21:44 |
hexa | https://pyinstaller.org/en/stable/ 🤔 | 14:21:56 |