!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

82 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5126 Servers

Load older messages


SenderMessageTime
19 Mar 2022
@bobvanderlinden_:matrix.orgbobvanderlindenthe tool doesn't write to files/directories anymore09:33:06
@elvishjerricco:matrix.org@elvishjerricco:matrix.org bobvanderlinden: Sure, but that's not what I meant 09:34:19
@elvishjerricco:matrix.org@elvishjerricco:matrix.org it's just searching for any /nix/store/XXXXXXX... path in any file and adding that to the list, right? 09:34:34
@bobvanderlinden_:matrix.orgbobvanderlindenah, yes, if it is not an ELF file, it will do that. I gathered it can be optimized a bit by detecting a text-file for instance09:35:20
@bobvanderlinden_:matrix.orgbobvanderlinden * ah, yes, if it is not an ELF file, it will do that. I gathered it can be optimized a bit by detecting a text-file for instance, but I haven't implemented that yet.09:35:38
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgHmm... I dunno whether or not that's a good idea09:35:39
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt could definitely lead to excessive inclusions09:35:51
@elvishjerricco:matrix.org@elvishjerricco:matrix.organd initramfs really needs to be lean09:36:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgNot even close to as bad as copying whole nix closure of course, but I'd be curious to know if it tends to make the initramfs noticeably bigger09:36:55
@bobvanderlinden_:matrix.orgbobvanderlinden Well, the idea was that if you refer to files in initramfs.systemd.services (directly or indirectly), it'll copy those automatically. You only need to add things to initramfs.contents if those files were missed. That shouldn't happen that often. 09:37:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea, I was going to add stuff specifically for parsing Exec* options in service files to make sure it was as minimal as possible, rather than just any referenced path09:38:14
@bobvanderlinden_:matrix.orgbobvanderlinden I see that as an optimization ;) it's good to do so. My solution is crude indeed, but it does get the job done, also for things like initramfs.systemd.services.myservice.script = "... ${somePackage}/bin/something ..."; where ExecStart refers to a bash script, that refers to a bin file. It can go deep I guess 😅 09:40:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwe'll have to play with it and see the size consequences09:41:35
@bobvanderlinden_:matrix.orgbobvanderlindenThe initramfs of mine was 30M last time I ran it09:41:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgOof. Last time I was making progress on this stuff I wasn't happy that it was up to 20M09:42:17
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgOld is like 10M09:42:25
@bobvanderlinden_:matrix.orgbobvanderlinden I thought first get everything working with the reusable initramfs.systemd.services. See what else needs to go in contents (hopefully only the /etc and /bin symlinks). Once that works, see whether the find-dependencies can be optimized more without missing any dependencies 09:42:50
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI think size takes priority over find-dependencies finding everything09:43:24
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgit's not such a big deal if we have to add some manual paths09:43:31
@bobvanderlinden_:matrix.orgbobvanderlindenAh! I compared with the original initrd, it seemed those were similar.09:43:42
@bobvanderlinden_:matrix.orgbobvanderlindenagreed 👍️09:43:51
@bobvanderlinden_:matrix.orgbobvanderlindenit's fine to remove the dependency finding in arbitrary files09:44:44
@elvishjerricco:matrix.org@elvishjerricco:matrix.org We should definitely be getting rid of all the stuff like extraUnits and stuff that I did in favor of reusing the systemd modules though. 09:46:17
@bobvanderlinden_:matrix.orgbobvanderlinden it get a bit messy anyway when we want to support boot.initrd.extraUtilsCommands 09:46:18
@elvishjerricco:matrix.org@elvishjerricco:matrix.org We do not want to support stuff like boot.initrd.*Commands I'm pretty sure 09:46:37
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThat's going to be a road that leads only to madness09:46:45
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgGiven that this should be an opt-in optional initrd, it should be clean slate09:46:56
@bobvanderlinden_:matrix.orgbobvanderlindenI think it eases the migration from initrd to initramfs.systemd. Helps keep the PR smallish and easier to merge09:47:54
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgWell09:48:01
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt should come in stages.09:48:10

Show newer messages


Back to Room ListRoom Version: 6