freemangordon | hmm, we have a nasty issue with tinymail - it has the so-called camel-lite library, which seems to be copy-pasted code from some unknown eds version | 08:17 |
---|---|---|
freemangordon | it would all be fine if both libcamel-lite-1.2.so.0.0.0 and libcamel-1.2.so.62.0.0 were not exporting the same symbols :( | 08:18 |
freemangordon | hmm, maybe I shall symply fix the soname | 08:19 |
freemangordon | if that even matters | 08:20 |
freemangordon | sonames are fine | 08:22 |
freemangordon | I wonder if it makes sense | 08:32 |
freemangordon | to port to libcamel | 08:32 |
freemangordon | I don't understand what is so 'lite' in libcamel-lite | 08:33 |
freemangordon | anyway we pull eds | 08:33 |
Wizzup | freemangordon: heh | 09:55 |
freemangordon | yeah | 09:55 |
freemangordon | the issue is that osso-abook pulls eds libs and they try to init their own camel implementation, but camel-lite get called instead :) | 09:56 |
freemangordon | and it becomes a mess | 09:56 |
freemangordon | trying to port tinymail to eds libcamel ATM | 09:56 |
Wizzup | ok | 09:57 |
freemangordon | seems not that hard, but wonder if we are going to lose something | 09:57 |
lel | nxdefiant opened an issue: https://github.com/maemo-leste/bugtracker/issues/610 (21hildon-desktop-wait should not wait indefinitely ) | 10:13 |
Wizzup | hmm | 12:16 |
Wizzup | it shouldn't be booted to in rescue mode I think | 12:16 |
humpelstilzchen[ | not really a rescue mode, but it broken X should not prevent network or getty to run | 12:32 |
Wizzup | mhm | 12:32 |
Wizzup | how would you connect to wifi with X not running? | 12:33 |
humpelstilzchen[ | On the pine I can attach an USB-Ethernet | 12:33 |
Wizzup | ok | 12:34 |
Wizzup | btw, usbnet should work | 12:34 |
Wizzup | but how does usb-ethernet help you | 12:34 |
Wizzup | I don't think it would auto connect? | 12:35 |
humpelstilzchen[ | it does, probably because I configured it do so. Don't think this configuration is default. | 12:36 |
humpelstilzchen[ | Well worst case is to login on tty and run "dhclient eth0" | 12:36 |
Wizzup | ok | 12:36 |
humpelstilzchen[ | tty1 | 12:36 |
Wizzup | on recovery mode there is also the tty keyboard | 12:36 |
Wizzup | does that work on pine? | 12:36 |
humpelstilzchen[ | have not tested that yet | 12:37 |
freemangordon | hmm, porting to libcamel is not that easy as I initially thought :( | 14:37 |
freemangordon | maybe will do a static link | 14:37 |
freemangordon | Wizzup: we have a task - port tinymail-camel to upstream libcamel (for leste only that is) | 17:31 |
freemangordon | it is not that hard, I would guess a week should be enough | 17:33 |
Wizzup | can you make an issue for it as well? | 17:37 |
freemangordon | ok | 17:37 |
freemangordon | yeah, LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcamel-lite-1.2.so.0 ./lib/test_contact_chooser makes it crash :( | 17:39 |
freemangordon | Wizzup: what do you think, instead of porting, could we just rename the functions? | 17:40 |
freemangordon | I know this is ugly, but at least temporarily | 17:40 |
freemangordon | I was so excited that modes compiles with osso-abook enabled and now this :( | 17:41 |
Wizzup | freemangordon: I will look in 30mins | 17:52 |
bencoh | freemangordon: what about renaming the symbols? (bsed?) | 17:52 |
bencoh | ohwell, looks like you reached that conclusion as well | 17:54 |
freemangordon | bencoh: what is bsed? | 18:08 |
freemangordon | some mass rename? | 18:08 |
bencoh | bbe* (a binary sed), I thought I only had blob libs | 18:13 |
bencoh | s/I only/you only/ | 18:13 |
freemangordon | seems objdump can do similar thing, but they say it is not a good idea to do it for .so files | 18:14 |
freemangordon | but we have the source here, so we can rename | 18:14 |
freemangordon | the problem is that it is about hondreds of symbols :( | 18:14 |
bencoh | well, you need to be careful with string size to keep proper offsets | 18:14 |
freemangordon | *hundreds | 18:14 |
bencoh | so I'd only replace a few chars in the name | 18:15 |
bencoh | I mean, I'd replace all the symbol names, but make sure it retains the same size | 18:15 |
freemangordon | ah, I see | 18:15 |
bencoh | we're talking about a C-only lib, right? no C++ involved? | 18:16 |
freemangordon | c-only | 18:16 |
freemangordon | oh, it is objcopy, not objdump | 18:16 |
bencoh | at least you don't have to worry about c++ (de)mangling | 18:16 |
bencoh | I think you should be fine | 18:16 |
freemangordon | yeah | 18:16 |
bencoh | I didn't know objcopy could do that, but I doubt it would allow mass-renaming anyway | 18:17 |
freemangordon | could you help me with sed? | 18:17 |
freemangordon | like, do you know how I shall invoke it | 18:17 |
bencoh | with bbe* you mean ... here is an example: bbe -e 's/amd64/armhf/' /var/lib/lxc/maemo-leste-armhf/rootfs/amd64/usr/bin/dpkg | 18:17 |
freemangordon | thanks | 18:17 |
bencoh | you might need to append 'g' at the end (like sed), I'd need to check that | 18:18 |
bencoh | no need for 'g' | 18:18 |
freemangordon | ok | 18:18 |
bencoh | slightly offtopic, but I'd love to hear your thoughts on radare2/retdec/ghidra vs IDA, assuming you ever tried either of those (I know you use IDA :) ) | 18:20 |
freemangordon | yep, tried it about an year ago | 18:21 |
freemangordon | maybe I am used to IDA, but I think it goes circles about ghydra | 18:21 |
bencoh | ah | 18:21 |
freemangordon | it might have improved since then | 18:21 |
freemangordon | last version I tried was ghidra 9.2.3.PUBLIC | 18:22 |
freemangordon | keep in mind I fed it with complex .so (not sure which one, maybe abook) | 18:22 |
freemangordon | also, the fault could be on my side by not knowing how to use it properly | 18:23 |
bencoh | I've used radare2 on various occasions for analysis, and retdec/r2ghidra for decompiling, but the decompilation output really feels ... disappointing | 18:23 |
bencoh | I somehow recalled IDA giving better results | 18:23 |
freemangordon | yeah, I am talking about the decompiler | 18:23 |
bencoh | ah :) | 18:23 |
freemangordon | also, I exported a project from IDA and imported in ghidra | 18:24 |
bencoh | (I'm mostly feeding it bootloaders and similar blobs here) | 18:24 |
freemangordon | it failed to recognize lots of types | 18:24 |
freemangordon | but again, ghidra directory date is 25 may 2021 :) | 18:25 |
bencoh | yeah, it might have improved since then ... although your feedback is quite similar to what I just experienced with r2ghidra | 18:26 |
bencoh | (ghidra decompiler integration into radare2) | 18:26 |
freemangordon | not that I know what radare2 is :) | 18:27 |
bencoh | yet another SRE / binary analysis framework | 18:27 |
freemangordon | anyway, lemme see if I can make modest work with abook | 18:27 |
bencoh | :) | 18:27 |
freemangordon | bencoh: umm, ' bbe -e 's/camel_/goose_/' /usr/lib/x86_64-linux-gnu/libcamel-lite-1.2.so.0' dumped the binary to the screen | 18:33 |
Wizzup | freemangordon: maybe jut rename for now I think | 18:59 |
freemangordon | does not work :( | 19:01 |
Wizzup | hm | 19:02 |
Wizzup | that's odd? | 19:02 |
freemangordon | user@devuan:~/maemo/git/abook/osso-abook$ LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libcamel-lite-1.2.so.0.0.0 ./lib/test_contact_chooser | 19:02 |
freemangordon | ./lib/test_contact_chooser: symbol lookup error: /usr/lib/x86_64-linux-gnu/libcamel-lite-1.2.so.0.0.0: undefined symbol: goose_sasl_ntlm_authtype | 19:02 |
freemangordon | I renamed with bbe -e 's/camel_/goose_/' /usr/lib/x86_64-linux-gnu/libcamel-lite-1.2.so.0.0.0 > libcamel-lite-1.2.so.0.0.0 and then copied the file | 19:03 |
freemangordon | maybe I am missing something obvious, but still | 19:03 |
Wizzup | but wait, why can't you rename the src files that have the conflicting names? | 19:03 |
freemangordon | Wizzup: because we talk about hundreds of functions | 19:24 |
freemangordon | it is not about renaming th efilesd | 19:24 |
freemangordon | *files | 19:24 |
freemangordon | we have conflicting symbols (functions) | 19:25 |
Wizzup | ok | 19:25 |
freemangordon | oh, bbe does not support regexes | 19:46 |
uvos | how is binary patching the so a sane approche here | 19:50 |
freemangordon | it is not | 19:51 |
freemangordon | I want it just for testing | 19:52 |
freemangordon | uvos: if you have a better idea, please... | 19:52 |
freemangordon | yessss! | 21:07 |
freemangordon | https://ibb.co/ncVhFm6 :) | 21:09 |
Wizzup | woo :) | 21:12 |
freemangordon | yep, "new contact" and "merge" work as well :) | 21:13 |
freemangordon | yipee | 21:14 |
freemangordon | and they are immediately available in evolution | 21:14 |
freemangordon | I can believe this works | 21:16 |
freemangordon | *can't | 21:16 |
Wizzup | sweet | 21:22 |
Wizzup | :) | 21:22 |
freemangordon | mhm | 21:23 |
freemangordon | now I only have to find why it hangs if I try to unref ESourceRegistry | 21:24 |
freemangordon | Wizzup: ok, I renamed camel_xxx stuff to goose_xxx stuff and it works, but honestly I am not sure how to push that to repos | 22:04 |
Wizzup | I do not fully comprehend the problem and the solution yet | 22:05 |
freemangordon | maybe some temp branch for tinymail/modest only, until it is using camel from EDS | 22:05 |
Wizzup | ok | 22:05 |
Wizzup | sure, that can work | 22:06 |
freemangordon | the problem is that both libcamel-lite (provided by tinymail) and libcamel (provided by EDS) use exactly the same function names | 22:06 |
Wizzup | and we can't rename the tinymail functions? | 22:06 |
freemangordon | we can | 22:06 |
freemangordon | that's what I did | 22:06 |
freemangordon | but, it is (almost) the same code | 22:07 |
freemangordon | the one un tinymail is older | 22:07 |
freemangordon | *in | 22:07 |
freemangordon | but thre is 95%match | 22:07 |
freemangordon | it makes no sense to keep both copies | 22:07 |
freemangordon | sec | 22:07 |
Wizzup | right | 22:08 |
Wizzup | so no binary patching? | 22:08 |
freemangordon | this https://github.com/maemo-leste/evolution-data-server/tree/master/src/camel | 22:08 |
freemangordon | ant this https://github.com/maemo-leste/tinymail/tree/master/libtinymail-camel/camel-lite/camel | 22:08 |
freemangordon | obviously tinymail borrowed that code back then | 22:09 |
Wizzup | aha | 22:09 |
freemangordon | no binary patching, no | 22:09 |
freemangordon | but, we have to port tinymail to use eds code | 22:10 |
freemangordon | I made some progress | 22:10 |
freemangordon | and maybe will finish it, dunno | 22:10 |
freemangordon | unless we find a volunteer to finish it | 22:10 |
freemangordon | so I can go back to abook | 22:11 |
freemangordon | anyway, enough for today :) | 22:11 |
* freemangordon goes afk | 22:11 | |
Wizzup | ttyl | 22:12 |
bencoh | freemangordon: wait, what did you mean by bbe not supporting that regex of yours? it's a pretty basic one, afaict it should work (?) | 23:29 |
bencoh | ah, it's not really regex, right | 23:30 |
bencoh | but still, that replace command should work | 23:30 |
Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!