!UUYziobKGGxpovWyAN:nixos.org

Robotnix

243 Members
Build Android (AOSP) using Nix | https://github.com/danielfullmer/robotnix75 Servers

Load older messages


SenderMessageTime
7 Jun 2024
@atemu12:matrix.orgatemu12That 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 store17:02:07
@erahhal:matrix.orgerahhalOk, I could have messed up the patches17:02:29
@erahhal:matrix.orgerahhalit's one of the first things I did when I started this. I'll review those17:02:40
@erahhal:matrix.orgerahhalI'll get the right branch of the kernel while I'm at it17:03:03
@atemu12:matrix.orgatemu12It could also simply be that there's now more places you need to patch 17:03:21
@atemu12:matrix.orgatemu12I had to do that for android 13 too17:03:26
@atemu12:matrix.orgatemu12You need to dig into the makefile of that step to figure out what function it uses17:05:46
@atemu12:matrix.orgatemu12Had an idea on that patch just now; we could perhaps try to fool the build system into thinking that the our bind-mounts are rw17:06:34
@atemu12:matrix.orgatemu12Then we wouldn't need to patch it in all the places where it tries to copyu17:06:51
@atemu12:matrix.orgatemu12 * Then we wouldn't need to patch it in all the places where it tries to copy17:06:53
@erahhal:matrix.orgerahhalthat sounds like it would be great if it could be made to work17:07:07
@jaen:matrix.orgjaenKind of out there, but maybe overlayfs could work (though not sure how reliable ZFS' support is)?17:13:09
8 Jun 2024
@atemu12:matrix.orgatemu12 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:matrix.orgjaen

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:matrix.orgjaen *

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:matrix.orgjaen *

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:matrix.orgjaen 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:matrix.orgatemu12The way you'd do it is to overlay and then chmod19:26:41
10 Jun 2024
@jaen:matrix.orgjaen 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:matrix.redalder.orgmagic_rb horrible idea, please dont shoot me :), but couldnt you run that step in a kvm vm? *ducks* 18:25:28
@atemu12:matrix.orgatemu12You could but that'd probably be even slower than bindfs19:40:12
@atemu12:matrix.orgatemu12As everything would need to go through 9p19:40:26
@atemu12:matrix.orgatemu12 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:matrix.redalder.orgmagic_rbim 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 slower20:12:17
@atemu12:matrix.orgatemu12That doesn't work; the whole build process is a single drv.20:14:55
@atemu12:matrix.orgatemu12Besides, this is an optimisation; we can patch the build system without any crazy mount setups fooling the build system20:15:28
@jaen:matrix.orgjaen 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:matrix.orgjznwscycmq joined the room.07:22:21
@erahhal:matrix.orgerahhalJust wanted to mention that I didn't abandon that Lineage 21 branch. Just got swamped at work.20:34:22
@atemu12:matrix.orgatemu12No pressure21:03:49

Show newer messages


Back to Room ListRoom Version: 6