| 30 Jul 2022 |
@linus:schreibt.jetzt | feel free to cherry-pick that to your branch if you find it sensible, K900 :) | 13:45:14 |
K900 | Nice | 13:45:14 |
K900 | Linux Hackerman: picked | 14:04:40 |
K900 | So are we actually going with this or what? | 18:43:27 |
@elvishjerricco:matrix.org | Janne Heß: How do you feel about the prospect of adding external deps to make-initrd-ng? | 18:44:04 |
K900 | I can take a look and see if I can get rid of some of the deps | 18:44:07 |
@janne.hess:helsinki-systems.de | In reply to @elvishjerricco:matrix.org Janne Heß: How do you feel about the prospect of adding external deps to make-initrd-ng? Who updates them? | 18:44:27 |
@elvishjerricco:matrix.org | That's a good question | 18:44:39 |
K900 | It's Rust deps so we can update them whenever | 18:44:51 |
@janne.hess:helsinki-systems.de | In reply to @k900:0upti.me It's Rust deps so we can update them whenever So never | 18:45:02 |
K900 | Well at least it's not security critical, so we don't really lose anything by not updating | 18:46:47 |
K900 | For a bit more context, the dependency I'm thinking of is an ELF parser, so we don't have to shell out to ldd/patchelf/etc | 18:47:38 |
@janne.hess:helsinki-systems.de | In reply to @janne.hess:helsinki-systems.de Who updates them? Anyway, that's my only opinion and concern about that topic | 18:47:41 |
K900 | Because right now it's kind of a mess | 18:47:50 |
@elvishjerricco:matrix.org | FWIW we could check for valid ELF-ness by calling patchelf instead of ldd, which would fix the original problem. But it is mighty nice to have that lib... and allowing deps means we can change the input to JSON instead of this really bad lines format | 18:49:26 |
@elvishjerricco:matrix.org | I dunno, I'm torn | 18:49:38 |
K900 | I am pretty sure (native) patchelf does not work correctly for cross | 18:49:49 |
K900 | So we might need a cross patchelf | 18:49:56 |
K900 | Or rather we might need to drag a cross patchelf into the closure | 18:50:13 |
@elvishjerricco:matrix.org | I thought Linux Hackerman managed to use it to fix their problem before trying your fix | 18:50:13 |
@elvishjerricco:matrix.org | It would surprise me if patchelf even had any cross-dependent behavior | 18:50:42 |
K900 | It might work across different bit width, but I'm pretty sure it doesn't work across endianness | 18:51:02 |
@elvishjerricco:matrix.org | hm | 18:51:20 |
K900 | Because it just does #include <elf.h> which is wrong | 18:51:22 |
@elvishjerricco:matrix.org | gotcha | 18:51:28 |
K900 | Well, wrong if you're dealing with something that's not the same endianness | 18:51:38 |
K900 | https://github.com/NixOS/patchelf/blob/master/src/patchelf.cc#L213 | 18:51:59 |
K900 | And yep it just casts things around | 18:52:02 |
@elvishjerricco:matrix.org | yea. that does mean that we can't use it for cross stuff like this though... Which, wait, doesn't make sense. Because we do use patchelf in fixup phase and whatnot when cross building | 18:52:07 |
K900 | I'm pretty sure it's a cross patchelf | 18:52:18 |