| 7 Jun 2024 |
atemu12 | That smells like an issue we patch around where the build system copies the permissions of the src which in our case is in the nix store | 17:02:07 |
erahhal | Ok, I could have messed up the patches | 17:02:29 |
erahhal | it's one of the first things I did when I started this. I'll review those | 17:02:40 |
erahhal | I'll get the right branch of the kernel while I'm at it | 17:03:03 |
atemu12 | It could also simply be that there's now more places you need to patch | 17:03:21 |
atemu12 | I had to do that for android 13 too | 17:03:26 |
atemu12 | You need to dig into the makefile of that step to figure out what function it uses | 17:05:46 |
atemu12 | Had an idea on that patch just now; we could perhaps try to fool the build system into thinking that the our bind-mounts are rw | 17:06:34 |
atemu12 | Then we wouldn't need to patch it in all the places where it tries to copyu | 17:06:51 |
atemu12 | * Then we wouldn't need to patch it in all the places where it tries to copy | 17:06:53 |
erahhal | that sounds like it would be great if it could be made to work | 17:07:07 |
jaen | Kind of out there, but maybe overlayfs could work (though not sure how reliable ZFS' support is)? | 17:13:09 |
| 8 Jun 2024 |
atemu12 | I'm just not sure whether the nix store mounts are actually considered ro which is a necessary condition for overlayfs I think? | 08:44:50 |
jaen |
The lower filesystem can be any filesystem supported by Linux and does not need to be writable. Is what kernel docs say, so I guess it doesn't have to be r/o.
| 13:52:29 |
jaen | *
The lower filesystem can be any filesystem supported by Linux and does not need to be writable.
Is what kernel docs say, so I guess it doesn't have to be r/o.
| 13:52:40 |
jaen | *
The lower filesystem can be any filesystem supported by Linux and does not need to be writable.
Is what kernel docs say, so I guess it doesn't have to be r/o.
| 13:52:43 |
jaen | But either way it doesn't seem to help, when I modify the unpack script to use overlayfs, the files remain unwritable. I even tried to use something called bindfs (apparently it's a FUSE bind mount) to map user/permission before mounting so the file permissions "look" like they are writable hoping that would be enough (since writes will go to the upper layer anyway), but that didn't seem to help. I didn't use overlayfs much previously (so I might be doing something wrong), but at least the obvious things don't seem to work, so maybe it was a bad idea after all. | 13:52:45 |
atemu12 | The way you'd do it is to overlay and then chmod | 19:26:41 |
| 10 Jun 2024 |
jaen | Yeah, that doesn't work either because you don't already own the file and you're not a real superuser in the namespace (at least that's how I understand the failure mode). I tried a few other options (and also unearthed that robotnix actually used bindfs between 2019 and 2020 for exactly this) but so far nothing really seemed to work well. I've added some more details of my experiments to https://github.com/nix-community/robotnix/issues/240. I'll probably try and see if you can make idmappings externally to the namespace work, but if it doesn't then I'm out of ideas. | 18:09:35 |
| 11 Jun 2024 |
magic_rb | horrible idea, please dont shoot me :), but couldnt you run that step in a kvm vm? *ducks* | 18:25:28 |
atemu12 | You could but that'd probably be even slower than bindfs | 19:40:12 |
atemu12 | As everything would need to go through 9p | 19:40:26 |
atemu12 | Linus Heckemann brought a patch upstream to make it a lot faster for mounting Nix stores purposes but it's still not fast | 19:40:58 |
magic_rb | im not at all knowledgeable in the details, but my idea was that if most of the build can be done outside the VM and just a small bit needs to be done inside, then it should be good, but yeah itll probably be much slower | 20:12:17 |
atemu12 | That doesn't work; the whole build process is a single drv. | 20:14:55 |
atemu12 | Besides, this is an optimisation; we can patch the build system without any crazy mount setups fooling the build system | 20:15:28 |
jaen | Also, we could just patch cp — https://github.com/nix-community/robotnix/pull/203/files#diff-f4eb7f67d1474c710f28e1fb28333066e0b8f2352ae4da6c05d151d34761fcb0R89-R97 xD | 20:26:23 |
| 12 Jun 2024 |
| jznwscycmq joined the room. | 07:22:21 |
erahhal | Just wanted to mention that I didn't abandon that Lineage 21 branch. Just got swamped at work. | 20:34:22 |
atemu12 | No pressure | 21:03:49 |