libera/#maemo-leste/ Tuesday, 2024-01-23

diejuseI'm going to record a short video to understand each other better.00:03
Wizzupokay :)00:09
diejuseHere is: https://youtube.com/shorts/HfiyCjy5sCk?si=586iJoy1OHdaH90100:41
Wizzupdiejuse: so many maemo applications 'spawn' by sending a dbus message to maemo-launcher telling it 'start this program'00:48
Wizzupor rather, the programs themselves are a 'symlink' to the maemo-invoker (or so) program, which from argv[0] will figure out what to spawn00:48
diejuseHmm. Is there any workaround so they can start without sending the dbus message?00:53
diejuseLike Debian apps?00:53
Wizzupnot without recompiling, but you'll really want dbus to work for maemo to function properly00:53
Wizzupis it not possible to run dbus in proot?00:54
diejuseIt would be the best but I think I won't be able to do it because it doesn't seem possible in recent versions of Android.00:54
Wizzuphmm... how so?00:55
Wizzupis this because of the buggy script?00:55
diejuseHowever, I can start Devuan with another dbus. I'm confused.00:55
diejuseBecause I tried installing Devuan via proot and it works! That's why I'm confused.00:56
diejuseI don't know if the script is the culprit.00:56
diejuseI mean "dbus-launch –exit-with-session startxfce4" works00:58
diejuseon Devuan00:58
diejuseBut ""/etc/init .d/dbus start" no works00:58
Wizzupjust for the record the line you pasted has a unicode dash in it01:00
Wizzupthat won't work in the shell01:00
Wizzupwell, I think for openrc to run in a virtual environment you have to do some things? I don't fully recall01:00
WizzupI'd have to try it...01:00
Wizzupdiejuse: do you have instructions on how to set this up?01:06
diejuseI wanted to add that my ZFlip5 is rooted and via chroot the maemo apps do work and you can also see the time.01:06
diejuseBur via proot don't01:06
WizzupI think this can probably work, but this will take some careful steps to figure it out01:07
Wizzuplike, maybe the environment is unclean, or something else is up, and do you start everything in x session, or only specific things?01:07
Wizzupand what does say env|grep DBUS print01:07
diejuseI start everything from an Android terminal called Termux. First run a script with the "proot" command and a few other things. And once inside the distro, run another script with the commands that I already used with chroot (https://raw.githubusercontent.com/diejuse/chroot_Maemo-leste_on_Android/main/launchMaemo.sh)01:11
Wizzupso this is likely not your problem, but the ' &' at the end could make it so that dbus isn't started before other maemo programs that need dbus start01:13
Wizzupit looks like you're indeed already touching the softlevel file01:13
diejuse"env | grep DBUS" => Nothing01:14
Wizzupcan you check if dbus is running at all, with ps?01:14
Wizzup'ps xua | grep dbus'01:14
Wizzupsame for 'ps xua | grep maemo'01:14
Wizzupsee if maemo-launcher is running01:14
diejuseWithout & no working. The same.01:15
Wizzupyes, that won't make all the difference, it will not continue with starting the other tools01:16
Wizzupyou'll eventually need something more complicated than this, like run-parts on the xsession files or so01:17
diejuse'ps xua | grep dbus' => Error /proc must be mounted.  And this is the real problem that I mentioned before. In modern versions of Android /proc /sys is not mounted with proot. However, with older Android versions (like 7) yes.01:19
diejuseproc not mounted is the key01:19
Wizzupthat is a big problem01:20
diejuseI will focus on investigating some workaround to mount /proc with proot.01:21
diejuseAnd in the meantime I would like you to find some way to start Maemo apps without calling dbus. As we said before.01:21
Wizzupthere is none other than recompiling01:22
Wizzup(every package)01:22
Wizzupwell, wait, there is a way...01:22
Wizzuptry maemo-summoner /usr/bin/hildon-status-menu.launch01:22
Wizzupor in your case01:22
Wizzuptry maemo-summoner /usr/bin/osso-xterm.launch01:23
diejuseThe good thing about proot vs chroot is that all Android phones, new and old, could use Maemo Leste (non-native). It would be good. People don't usually root their smartphones and everyone could easily try it.01:24
diejusemaemo-summoner /usr/bin/osso-xterm.launch => "osso_initialize() failed!"01:26
WizzupI think a better approach is to try to get the maemo environment set up properly01:27
diejusemaemo-summoner /usr/bin/hildon-status-menu.launch => "Aborted"01:28
diejuseYes. It would be the best. But it is easy that nothing can be done to avoid the new restrictions on Android smartphones of new versions. That's why I'm also interested in some workaround to start those Maemo apps.01:29
Wizzupwell, you won't be able to run/use maemo without dbus01:30
Wizzupalmost everything depends on it01:30
Wizzuplike, if you wanted to have the useful instant messaging features, it won't work01:30
Wizzupor the virtual keyboard, won't work01:30
Wizzupit's all dbus01:30
diejuseI understand. And why does the dbus that starts xfce4 in Devuan work?01:31
gnarfacemost likely they've patched it01:32
gnarfacewell, actually they've absolutely certainly patched it, but my guess is that most likely the patch is why it works01:33
gnarface(didn't read the whole scrollback, but dbus is definitely one of the few debian packages that devuan has forked)01:33
gnarface(they all have "devuan" in the version string on the package)01:34
diejuseCan't the dbus that Maemo uses have the same benefits as the dbus that is used to start other distros like xfce4 or lxde?01:36
Wizzupwe use the devuan dbus fwiw01:36
Wizzuphow do you start devuan?01:36
diejuseI simply do:01:37
diejusedbus-launch --exit-with-session startxfce401:38
diejuseAnd works01:38
Wizzuphave you tried starting the maemo script like that?01:38
diejuseyes01:38
Wizzup(without starting maemo's /etc/init.d/dbus script)01:39
diejusedbus-launch --exit-with session ....... what more?01:39
Wizzupwhatever your script is to start maemo programs01:40
diejuseI tried: dbus-launch --exit-with-session maemo-launcher --send-app-died --booster gtk,cpp --daemon01:40
diejuseok, dbus-launch --exit-with-session  /usr/bin/osso-xterm.launch ?01:41
Wizzupno01:41
Wizzupdbus-launch --exit-with-session launchMaemo.sh01:41
Wizzupor something like that01:41
Wizzupbut really like I said, you'd just need something that executes everything maemo session needs, plus some of the init scripts01:41
diejuseI just tried "dbus-launch --exit-with-session launchMaemo.sh" but the result is the same.01:44
diejuseYes. It would be the best. But it would also be nice if the Maemo graphical environment could be started with "dbus-launch" in the same way as the most popular desktops (xfce4, lxde, mate...)01:46
Wizzupnot everything in maemo is part of a session, like icd201:50
Wizzupalso note that your launch maemo starts dbus twice more:01:50
Wizzup/etc/init.d/dbus start &01:50
Wizzup/usr/bin/dbus-daemon --session --print-address=2 &01:50
Wizzupboth those must go I think,01:51
Wizzupwell you would also need a system dbus I suppose01:51
Wizzupand after running dbus-session with print address, you also need to evaluate the address it pritns01:51
freemangordonWizzup: it is the system bus taht does not start, session bus is ok07:18
humanbetasorry typo yesterday, because my lapdock does not have model name on it, it is originally made for Motorola Atrix, not Altrix.09:25
humanbetaand one hint for that, if touchpad not work, touch shift of keyboard first.09:38
Wizzupfreemangordon: hm, my status menu is not showing the battery and network status icons anymore, just the time14:52
Wizzupin my vm14:52
Wizzuplet me reboot the vm14:52
Wizzupuvos: I pushed to the sphone mr, split out the spelling fixes as you asked, and added a commit to change the formatting, if you like the formatting (it is what you asked), then I will merge it into the main commit15:34
uvosWizzup: thank you18:58
uvosWizzup: so whats the status on this on generall, functionality wise18:59
uvosotherwise it looks ok now code wise, the extern "C" thing is just unessecary, please tell me if it failed to compile without it, that just means i forgot to do this in one of the headers19:00
uvosif you dont have any further concerns i would merge it now, besides the config changes that i would like for you to remove from the pr so that we can first merge it in a default disabled state so that it may be tested by simply loading it19:02
Wizzupuvos: I will fix the extern stuff, I'll fix the config comments yeah, and regarding the current state, I need to test it once more, but regular calls should work fine19:03
Wizzupsip/xmpp calls I've never had working with audio but i mostly tested on my vm19:03
uvosok19:03
uvoswell in default disabled state it cant hurt anyone19:03
uvosthis way we can test it a bit and enable it in leste-config later19:04
Wizzupagreed19:07
WizzupI'll make the changes today, I was fighting this usb modem for two hours and gave up, so I will test on my d4 instead19:10
Wizzup(fighting to test the new code)19:10
uvosok, no rush19:10
uvosi have some other code for sphone i want to put in the same release19:10
uvos(instmod and rmmod for running sphone)19:10
Wizzupuvos: ok, I made the changes, now testing on my d419:35
Wizzupuvos: the debian/control entry will need to be modified to get some -dev pkg and perhaps a recommends on the voicecallmgr package19:37
uvosone sneaky extern C still lurking in voicecallmanager.h19:37
Wizzupah ok19:37
WizzupI did grep extern *.cpp19:37
Wizzupso yeah19:37
Wizzup:D19:37
uvosyeah i think we need to change how this works generally19:38
uvosso rn sphone depends on things it dosent really need at run time only at build time.19:38
bencohhmm ... silly question, but are you removing extern C from headers? if so, why?19:39
uvosthese things should be required at build time and optional at runtime19:39
uvosbencoh: this is a c++ header19:39
bencohah19:39
Wizzupuvos: yeah some things to fix still:19:49
Wizzupsphone: faled to load module comm-voicecallmanager: missing symbol sphone_module_init19:49
uvosoh right shit im an idiot19:49
uvosthat extern c was needed since sphone_module_init and exit is looked up by symbol name19:49
Wizzupyou want the extern "C" stuff back in the header?19:49
uvosthe others are passed by function pointer19:50
uvosno just around the ones that are looked up by symbol name19:50
uvos1sex19:50
uvoser sec19:50
uvoswell either is about the same unit of time19:51
uvosput extern c back but only:19:52
uvoshttps://github.com/maemo-leste/sphone/blob/7cbb675d95269949dd73a25da029e3a9973dea99/src/utils/sphone-modules.c#L18819:52
uvoshttps://github.com/maemo-leste/sphone/blob/7cbb675d95269949dd73a25da029e3a9973dea99/src/utils/sphone-modules.c#L8719:52
uvoshttps://github.com/maemo-leste/sphone/blob/7cbb675d95269949dd73a25da029e3a9973dea99/src/utils/sphone-modules.c#L3619:52
uvosfor these symbols19:52
uvossorry about that19:52
Wizzupno worries, dinner first :)19:53
uvosthe rest should stay mangled19:53
Wizzupuvos: incoming and outgoing works, let me fix the extern stuff20:51
uvoshttps://github.com/maemo-leste/sphone/pull/4/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20aR521:08
uvoswhats with this btw21:08
uvosi presume you are mocing by target later and this can go away?21:09
Wizzupuvos: that can go I think22:02
WizzupI will remove it too.22:02
Wizzupjust remnants of me trying to make cmake work with qt22:02
Wizzupfreemangordon: what do you think, should we use fremantle group_uid for our tp logging or use our own22:11
Wizzuphuh, actually it looks like it *is* the same...22:13
WizzupI meant for sms specifically22:13
Wizzupoh no, it is not the same.22:14
Wizzupso on fremantle the group_uid for sms is the last 7 digits of a phone number22:14
Wizzupon leste it's ring/tel/account0-[full phone number here]22:15
WizzupI don't know why fremantle make it only the last 7 digits, maybe they know something we don't and it's never going to conflict (doubt it), or they tried to save space? I don't know22:15
WizzupI guess you have the full number anyway in the remote_uid22:15
Wizzupin any case, from my POV the *only* reason to make it like fremantle that I can think of is so that when you import the rtcom el db from fremantle and you continue a sms conversation, it will end up in the same group/window22:16
Wizzupso, fremantle:22:17
Wizzupsqlite> select group_uid from events order by id desc limit 2;                                                                                      608136022:17
Wizzup608136022:17
Wizzupleste (turned some digits into x to anonimise)22:17
Wizzupsqlite> select group_uid from events order by id desc limit 2;22:17
Wizzupring/tel/account0-+31623xxxxxx22:17
Wizzupring/tel/account0-+31623xxxxxx22:17
Wizzupmaybe this was nokia's way of normalising numbers with and without prefix?22:31
freemangordonI don't think it makes sense to keep ring/tel/account0 in the db22:35
freemangordonthis just gets duplicated, no?22:35
freemangordonlast 7 digits from the phone number? I guess we shall read a bit22:36
freemangordonto me id does not seem unique22:36
freemangordon*it22:36
freemangordonperhaps it is combined with something else22:37
Wizzupthis is how *all* other group ids are apart from sms fwiw22:37
Wizzupand if you have more than one modem, you probably want to know which one was used?22:37
freemangordonno, why do you care?22:37
freemangordonit is conversation with the same person, no?22:38
bencohisn't group_uid just used as some kind of index to speed up searches?22:38
Wizzupbencoh: it's not just used to speed up, I think22:38
bencoh(not that it really makes any sense in a practical way, but ....)22:38
freemangordonhave to run now, sorry22:38
Wizzupfreemangordon: I mean I care in the same way that I can have different xmpp accounts messaging the same person22:39
Wizzupthey're still different conversations I think22:39
Wizzupbencoh: I think it is used as a GROUP BY as well, I thought that is why it was called group_uid22:40
Wizzupall the code for this is open btw, so we could check, but I think if something has the same group_uid but different say remote_uid, then it will still be grouped together22:40
bencohin convs you mean?22:48
Wizzupin anything that uses rtcom-eventlogger-ui, but yes, also in conversations since it uses rtcom-eventlogger22:48
Wizzupthis is an example ui for rtcom-eventlogger-ui by nokia22:49
Wizzuphttps://github.com/maemo-leste/rtcom-eventlogger-ui/blob/master/example/example.c#L13422:49
bencohwth is happening there:    static_group_by = (1 + static_group_by) % (RTCOM_EL_QUERY_GROUP_BY_GROUP + 1);22:51
WizzupI think just an int for the different group bys for UI purposes22:52
bencohoh, nevermind, it just allows changing the group by method22:52
bencohyeah22:52
uvosWizzup: https://github.com/maemo-leste/sphone/pull/4/files#diff-80b51c8dc924426a6084f06211134017153c134d5b330f3719e0800ce8c71d87R37 memleak23:04
uvosyou mean strdupa?23:05
uvostheres also something wrong with indentation here: https://github.com/maemo-leste/sphone/pull/4/files#diff-85ebdd8b0c290e2ac6d547f92a7036e6152a4a9abb3436bbd00af52636009c58R1823:09
Wizzupuvos: does sphone make it's own copy of the backend name?23:10
WizzupI mean, I don't think toStdString().c_str() makes copies of the data that need to manually be freed, does it?23:10
uvossphone is universally function-call-dosent-change-owership aside from very few (obvious) exceptions23:11
uvosso yes it copies itself23:11
Wizzupok, in that case we can just pass along the c_str()23:11
uvosyes23:11
Wizzupso no need for strdup23:11
Wizzupuvos: note that it was freed in the module, so I don't think that's a memleak still23:12
uvosi dont see where its freed23:12
Wizzuphttps://github.com/maemo-leste/sphone/pull/4/files#diff-80b51c8dc924426a6084f06211134017153c134d5b330f3719e0800ce8c71d87R4723:13
uvosah ok, well why carry this anyhow23:13
Wizzupyes, I changed the code now locally23:14
Wizzupthe cmakelists seems to have a tabs/spaces snafu23:14
uvosinstead of just asking sphone_comm_get_backend23:14
Wizzuphm?23:15
Wizzupah, wasn't used anywhere else23:15
WizzupI just force pushed23:15
uvosif you need the name elsewhere you can just  sphone_comm_get_backend(id)->name23:15
Wizzupright23:15
uvosyou also dont need to pass a is_valid_ch function23:17
uvosthe default is everything23:17
uvosnot that it matters mutch23:17
uvossee https://github.com/maemo-leste/sphone/blob/7cbb675d95269949dd73a25da029e3a9973dea99/src/utils/comm.c#L8123:18
WizzupI was planning to eventually change that function perhaps, but good to know23:19
uvosyeah makes sense23:19
uvosfor now it could be the same as ofonos no?23:19
uvosmaybe not if sip works23:19
Wizzupfreemangordon: bencoh: maybe I should just follow fremantle group_uid for now, since we've been doing that on fremantle for years anyway, can always change it later?23:19
Wizzupsip works, just not with audio yet, but that is not sphone's fault23:19
uvosok23:19
uvossip should really be its own backend23:19
uvosie the module should register 2+23:20
Wizzupit does23:20
uvosoh ok23:20
uvosbut not with different shema23:20
Wizzupthat might need some work, but sip can also be used to call regular numbers23:20
uvosok23:20
Wizzupbtw, just stating the obvious, but the ofono and voicecallmanager module should not really be active at the same time (they can be, but telepathy-ring will mess with the plain ofono module)23:21
Wizzupin any case I think the pr maybe is ready now?23:36
uvosseams so23:36
Wizzupfreemangordon: also the group-uid not just being the phone number is also because a sip number can also call a regular number, for example23:37
uvosAdditionally, the module relies on qtvoicecall, which is a (currently23:38
uvosmaemo specific) addition to qtvoicecall23:38
uvosi dont grok this23:38
uvosnot that this is super important23:39
WizzupI probably missed a word there23:42
WizzupI think I exported some functionality of qtvoicecall because they only exported a qml class to talk to qtvoicecall23:42
Wizzupand I didn't want to use qml23:42
Wizzuphttps://github.com/maemo-leste-upstream-forks/voicecall/commit/69314e769ac459d80fb41c3b0f45e07c324d674d23:42
uvosok23:44
uvosWizzup:  i found one more issue but i will fix it myself23:48
uvoshttps://github.com/maemo-leste/sphone/blob/b1eecb4199efa2152f178be1f9bab56f0919bfa7/src/modules/voicecallmanager/CMakeLists.txt#L123:48
uvosyou get pkg-config as an optional dependancy but then expect it to be there 2 lines later23:49
uvosshould be required ofc23:49
uvosor guarded by if23:49
Wizzupcheck23:52
Wizzupyes please fix if you can23:52

Generated by irclog2html.py 2.17.0 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!