!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
23 May 2023
@arianvp:matrix.orgArianwhat is unreproducible about it?14:07:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @arianvp:matrix.org
we don't support user namespaces inside the build sandbox do we? or do we these days?
we do
14:07:51
@nikstur:matrix.org@nikstur:matrix.orgIf there is no machine-id systemd-repart creates random UUIDs for partitions14:08:06
@nikstur:matrix.org@nikstur:matrix.organd I think timestamps might be an issue14:08:13
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgin fact I've used that to do FHS style builds in a nix build14:08:14
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @nikstur:matrix.org
If there is no machine-id systemd-repart creates random UUIDs for partitions
You can also pass --seed
14:09:04
@arianvp:matrix.orgArian oh yeh that stuff. Just put a /buildroot/etc/machine-id file . should work 14:09:28
@arianvp:matrix.orgArian or --seed. yheh 14:09:33
@arianvp:matrix.orgArian

hmmmm without fakeroot my build fails with:

 > Failed to copy symlink 'sbin', ignoring: Permission denied
       > Failed to copy '/nix/store/049705cr0z1mzjfngjr4vlybp3z5n1wx-bcache-tools-1.0.7' to '/build/.#repartabde6bac7950c286/nix/store/049705cr0z1mzjfngjr4vlybp3z5n1wx-bcache-tools-1.0.7': Invalid argument
14:11:01
@arianvp:matrix.orgArian but works with fakeroot woohoo. (What does fakeroot do? 14:14:06
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @arianvp:matrix.org
but works with fakeroot woohoo. (What does fakeroot do?
It pretends you're root
14:15:06
@arianvp:matrix.orgArian that I understand. but how does it do that? 14:15:25
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de
In reply to @arianvp:matrix.org
that I understand. but how does it do that?

This is done by setting LD_PRELOAD to libfakeroot.so, which provides wrappers around getuid, chown, chmod, mknod, stat, and so on, thereby creating a fake root environment.

14:15:56
@mberndt:matrix.org@mberndt:matrix.org ElvishJerricco, thanks for your review. I've responded to your comments…
https://github.com/NixOS/nixpkgs/pull/229767
14:19:15
@elvishjerricco:matrix.org@elvishjerricco:matrix.orguser namespaces are better though. Are there still holdout distros that disable that?14:21:27
@aloisw:kde.org@aloisw:kde.org
In reply to @elvishjerricco:matrix.org
user namespaces are better though. Are there still holdout distros that disable that?
Our own "hardened" kernel does that, at least.
14:36:43
@aloisw:kde.org@aloisw:kde.org There's also proot -0. 14:37:49
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

No, Stratis is unrelated to LVM and a simpler design

mberndt Huh. For some reason I thought stratis was a management tool for a variety of underlying tech like lvm

16:16:08
@gdamjan:spodeli.org@gdamjan:spodeli.orgstratis is an opinionated subset of LVM + XFS (I think)18:11:14
@gdamjan:spodeli.org@gdamjan:spodeli.orgdoesn't even do raid :/18:11:24
@mberndt:matrix.org@mberndt:matrix.org
In reply to @gdamjan:spodeli.org
stratis is an opinionated subset of LVM + XFS (I think)
It's not based on LVM.
18:56:12
@mberndt:matrix.org@mberndt:matrix.orgIt uses DM though. 18:56:23
@arianvp:matrix.orgArian hmm. I think doing NixOS activation in the initrd was a mistake. You can't boot images with systemd-nspawn anymore that use systemd initrd 21:43:35
@arianvp:matrix.orgArianWe should move it to early stage-221:44:09
@arianvp:matrix.orgArian Using a DefaultDependencies=no systemd unit 21:44:31
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgCouple things21:44:41
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
  1. we literally can't move it early enough in stage 2 unless it's pre-systemd, because it sets up etc and therefore the systemd units
21:45:08
@arianvp:matrix.orgArian for systemd units we can use the SYSTEMD_UNITS env var 21:45:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
  1. It gets us a lot to have it in stage 1. Like if anything in activation fails we get a proper recovery environment
21:45:40
@arianvp:matrix.orgArian(This is documented and stable)21:45:44

Show newer messages


Back to Room ListRoom Version: 6