libera/#maemo-leste/ Friday, 2021-10-01

freemangordonhmm, looks like w have problem with glib08:32
freemangordonand that's the reason why modest cannot open pdfs08:33
parazydWhat is it with glib?08:34
freemangordonparazyd: https://pastebin.com/WzwsmXTW08:34
freemangordonsee default: osso_pdfviewer.desktop08:35
freemangordonit should be hildon-osso_pdfviewer.desktop, (as are recommended and installed)08:35
freemangordonalso, the same thing on fremantle returns hildon-osso_pdfviewer.desktop08:36
parazydSo we rename it here? https://github.com/maemo-leste/osso-pdf-viewer/tree/master/data08:36
freemangordonwhat do you mean?08:37
parazydIt's called osso_pdfviewer.desktop08:37
freemangordonbut, it is in hildon folder08:37
freemangordonso g_app_info_get_id() must prefix it with hildon-08:37
parazydhmm08:37
parazydSo what file is it actually looking for?08:38
parazydhildon-osso_pdfviewer.desktop or osso_pdfviewer.desktop08:39
freemangordonsorry, could you rephrase? who is the one looking?08:39
freemangordonsee https://github.com/maemo-leste/libhildonmime/blob/master/libhildonmime/hildon-mime-open.c#L16508:40
freemangordong_app_info_get_id returns "osso_pdfviewer.desktop" but should return "hildon-osso_pdfviewer.desktop"08:41
parazydYeah that's what I asked08:42
parazydhmm ok08:42
parazydMaybe we need to provide our own mimeapps.list?08:44
freemangordonno, mimeapps.list is fine08:44
freemangordonhmm, wait, where is that?08:44
parazydhttps://help.gnome.org/admin/system-admin-guide/stable/mime-types-application-user.html.en08:45
freemangordonalso, see what is returned by 'gio mime" for "Registered applications:" and "Recommended applications:"08:45
parazydYeah I see08:45
parazydOn my vm I get nothing08:45
freemangordondo you have pdfviewer installed?08:46
parazyduser@devuan:~$ gio mime application/pdf08:46
parazydNo default applications for “application/pdf”08:46
parazydYes08:46
freemangordonweird08:46
freemangordonmaybe run update-desktop-database08:46
parazydah ok, it appears after I install desktop-file-utils08:47
freemangordonwe must have that installed, please add it to some metapackage08:48
parazydI get the same output as you08:48
parazydok08:48
freemangordonapplication/pdf=hildon-osso_pdfviewer.desktop; is in mimeinfo.cache08:48
freemangordonso glibe removes hildon- for some reason08:48
freemangordon*glib08:48
parazydfreemangordon: oh also08:51
parazyduser@devuan:/etc/xdg$ sudo update-desktop-database08:51
parazydCould not parse file "/usr/share/applications/hildon-control-panel/apporder/applets.desktop": Key file does not have group ?Desktop Entry?08:51
freemangordonyeah, but it just complains, it doesn;t make it abort08:51
parazydtrue08:51
freemangordonI would guess this commit https://github.com/frida/glib/commit/86ce3bf48e40756a360b13e18493a15d8d1bf5ae#diff-701d9161328a7d2d899267a0806bea98b198f0bfa1365891494fb0b04a224dba breaks it08:52
freemangordonbut have no more time to dig now08:52
freemangordonon fremantle, glib 2.24 returns correct id08:53
freemangordonI lookt at the fremantle glib, it is almost not patched08:53
freemangordonat least those parts of the code are intact08:53
freemangordonso this looks like bug.08:54
parazydBut in general, how does it work if it shows a non-existent .desktop file?08:56
freemangordonit is not shown08:56
freemangordonthis is used only as an id08:56
freemangordonalso, there is a logic that nows to replace '-' with '/'08:57
freemangordonin glib that is08:57
parazydWeird08:58
freemangordoncould be, but that's what it is08:59
freemangordonproblem is that it is broken08:59
parazydCould we not just use the proper .desktop file if a mime handler is set?09:01
freemangordonhow to find it?09:02
parazydDefault application for “application/pdf”: osso_pdfviewer.desktop09:02
parazydThere it is09:02
freemangordonand it is where?09:02
parazydWhy does it matter?09:02
freemangordonin /usr/share/applications/hildon09:02
freemangordonhow to parse that file if you don't know where it is?09:03
parazydhmm I'd assume gio/glib knows how to find it09:04
freemangordonnot really sure, seems xdg-open fails too09:04
* freemangordon checks09:04
parazydfreemangordon: xdg-open works here for pdf, albeit it just opens the program, not the file.09:15
parazydProbably because some %u (or similar) is missing in https://github.com/maemo-leste/osso-pdf-viewer/blob/master/data/osso_pdfviewer.desktop.in#L709:15
freemangordonparazyd: see documantation for g_app_info_get_id09:22
freemangordon"Gets the ID of an application. An id is a string that identifies the application. The exact format of the id is platform dependent. For instance, on Unix this is the desktop file id from the xdg menu specification. "09:27
freemangordondesktop file id from the xdg menu specification is defined as "The id to identify a desktop entry with.            For example, if /usr/share/applications is           specified as an <AppDir>, and /opt/ude           as <LegacyDir prefix="foo-">           then            /usr/share/applications/foo/bar.desktop,            /usr/share/applications/foo-bar.desktop           and           /opt/ude/Settings/bar.desktop all have           the same desktop-f09:27
freemangordongtg, ttyl09:27
freemangordonparazyd: this has nothing to do with the .desktop file itsef09:28
freemangordonparazyd: do we ship our own glib?10:36
parazydNot since ascii10:36
parazyderr, since beowulf10:37
parazydWe had our own in ascii10:37
freemangordonis my patch there?10:37
parazydYes10:37
freemangordonok10:37
martijnb1o/11:15
Wizzupmartijnb1: yo11:16
parazydHey11:16
martijnb1nice presentation :D11:16
Wizzupthanks, didn't really prepare it much, but it was within the time limit at least :D11:16
martijnb1hmm joining here with the libera matrix bridge seems bork11:17
* martijnb1 is not nervous at all for the pmos presentation11:18
Wizzuphehe11:18
WizzupI was quite nervous but then seeing the other ones made me less stressed11:18
Wizzupif you catch my drift11:18
* Wizzup is looking forward to it11:19
martijnb1heh yes11:20
martijnb1so the matrix channel name on the wiki is wrong, it's #maemo-leste:libera.chat now11:20
Wizzupwhich wiki?11:22
Wizzupours?11:22
martijnb1yes11:22
MartijnBraam[m]https://leste.maemo.org/IRC_channel11:22
WizzupAh here: https://leste.maemo.org/IRC_channel11:22
Wizzupso I'll change #libera_#maemo-leste:matrix.org to #maemo-leste:libera.chat?11:23
martijnb1yes11:24
Wizzupdone, ty11:25
Wizzupgood luck in a bit btw11:25
martijnb1thankfully oliver will do most of the presentation :), he's a lot better at this than me11:29
Wizzupwill try to be around and see it11:30
Wizzup(have to leave around 1200, so perfect timing)11:30
parazydVery nice12:01
Wizzupyeah12:03
martijnb1pfew, the perfect moment to have connetion issues :D12:03
Wizzupbetter at that point than 5 mins earlier though12:03
martijnb1definetly, the business part of the presentation was definetly the least prepared part12:04
uvosfreemangordon: osso_pdfviewer .destkop file is missing %f but it would not help12:08
uvosbecause i just dosent appear to have support for opening files via cli12:08
uvososso_pdfviewer $somefile dosent work12:09
uvosand there is no --help12:09
uvosalso no -f12:09
Wizzupthat's fixable :)12:09
uvosyeah but that beggs the question how it ever worked12:09
Wizzupcould be using dbus12:10
uvospresentation?12:12
uvosfreemangordon: oh btw the missing %* in .desktop files will be a constant scourge12:14
uvosfreemangordon: because hildon launcher was very broken and just passed %* in exec lines to applications cmdline - breaking them12:14
uvosfreemangordon: nokias awnser to this was simply to remove all the  % parameters instead of fixing thair shit12:15
uvosso its broken everywhere12:15
uvosno idea how fremantle opend anything based on a mime12:15
uvosmust be hardcoded somewhere12:15
uvosi fixed h-d recently so you can add the parameters now12:16
uvosalso ofc any logic for translateing the formates %u %f %F %k etc is missing in hildon12:20
Wizzupuvos: yeah, we had to give one for the https://maemo-leste.github.io/funding-from-ngi-eu.html12:22
Wizzupnow, *finally* onto the news post ... :)12:22
uvosis it public somewhere?12:22
uvosjust cuourious12:23
Wizzupuvos: this one is not, but I can share the slides and videos with you if you want12:23
Wizzupit was just a 10 mins 'pitch' (their required format)12:23
uvosok12:23
Wizzupvideos would be demo videos - hang on12:23
Wizzuphttps://wizzup.org/tordemo.mp4 https://wizzup.org/wgdemo.mp4 https://wizzup.org/ovpndemo.mp4 https://wizzup.org/cpademo.mp412:24
uvosthx12:24
WizzupI need to rush to my appointment, back in ~2-3 hrs12:24
uvosok12:24
uvosso news post d3, modest, ngi stuff, sphone i presume12:24
Wizzupthere'll be more, will reply when I get back12:25
Wizzupit's been so long other things happened too12:25
parazydoh many news12:25
Wizzupbut yeah those are major ones12:25
parazydAlso this https://github.com/maemo-leste/maemo-leste.github.io/commit/a385309a746a89de70866351fc8ce223061eaf9512:25
uvosparazyd: could you let me modify that, id have some small corrections and post links related media (video demonstations and so on)12:28
uvosor i can just make it commen too12:29
parazydThat's just an outline of what we'll write12:29
uvosi know12:29
parazydSend what you want to add to Wizzup12:29
uvosok12:29
WizzupI have some local changes12:32
Wizzupif you can hold off a few hours I can push those and you can add/change what you'd like of course12:32
Wizzupor just a list/text is fine12:32
Wizzupup to you12:32
Wizzupafk12:32
uvoshttp://uvos.xyz/maserati/newspost-notes.diff13:07
lelclort81 opened an issue: https://github.com/maemo-leste/bugtracker/issues/575 (Qalendar issues.)17:23
freemangordonuvos: 'they' use dbus to call executables18:28
freemangordonbut still, the issue is somewhere in glib18:29
freemangordonlater on I will try to debug18:29
uvosfreemangordon: where is this code that calls a mime?18:29
uvosfreemangordon: we need to support spec compliant .desktop files ofc18:30
freemangordonhttps://github.com/maemo-leste/libhildonmime/blob/master/libhildonmime/hildon-mime-open.c#L16518:31
freemangordondunno if you read it, so I'll repost18:31
Wizzupuvos: wrt not newsworthy, usually I just try to exhaustively (but briefly) list prs we've closed18:31
freemangordong_app_info_get_id (info) returns 'osso_pdfviewer.desktop' instead of 'hildon-osso_pdfviewer.desktop'18:32
freemangordonuvos: ^^^18:32
freemangordonwhich is a bug IMO18:33
uvosfreemangordon: ok thats a problem18:33
freemangordonmhm18:33
uvosyeah spec saies that / is to be replaced with -18:33
uvosbelow applications/18:33
uvosbut im more questioning this dbus thing18:33
uvosim wondering why they did this instead of just calling the applicaiton18:34
uvosbecasue this way everything that supports opening the something needs a dbus service18:34
freemangordonuvos: every hildon application is a dbus service as well18:35
freemangordonhildon API does this for us18:35
freemangordonthat way you can have singleton applications too18:35
uvosyou can have sigleton applications either way18:35
freemangordonit is really hard to achieve in a non-racy way18:35
uvosthere are upsream apis for this18:36
freemangordonI won;t argue what is the best way though18:36
uvosunique for gtk218:36
uvosand glib has something built in since gtk3 era18:36
freemangordonbut, I guess Nokia did it that way because you get dbus service for free and singleton app for free18:36
uvosanyhow we must ofc support normal applicaitons too18:37
freemangordonand having dbus servce for free is very good thing, for example you may extend systemui menu with simple xml that calls dbus18:37
uvosso we need to decide somehow if we want to call the dbus interface18:37
uvosor the xdg spec18:37
uvosfreemangordon: sure18:37
freemangordonlets first fix glib18:37
uvosor rather you fix glib im currently not adding anything other than comments on how stuff works18:38
freemangordonalso, for example alarmd calls dbus callbacks, so modest is basically 'woken up' that way18:38
uvossure thats all fine a good18:38
uvosbut opening via dbus vs regular mime should support regular mimes on both ends18:38
freemangordonsure18:39
freemangordonbut I guess xdg-open just needs proper .desktop file, no?18:39
uvoswell for the pdf viewer the main problem is18:39
freemangordonI mean - we shall just add whatever it needs18:39
uvosit simply dosent support listing the file on cmdline18:39
uvosso xdg-open cant work18:39
freemangordonhmm, I see18:40
uvosfreemangordon: right otherwise you just have to add the % parameters to the exec line18:40
freemangordonok, I am cooking dinner ATM, will look at glib later on18:40
freemangordonttyl18:40
uvosttyl18:40
uvosWizzup: sure that point just stuck out to me18:41
uvosWizzup: because everything else was more important18:41
Wizzupuvos: yeah, the list is not completed, that's why it's in a tmp file18:41
Wizzupthanks for the diff, I'll go over it today or tomorrow and then start working on the news post18:42
uvosoh btw how do you turn of html rendering in modest?18:58
uvosi cant seam to make it show plain text email only18:59
freemangordonwhat do you mean?18:59
freemangordonand? who html emails are going to be shown?18:59
freemangordon*how18:59
uvosif i click on an email in the inbox it allways chooses the html version19:00
uvosi want it show the plaintext version only19:00
freemangordonI don;t think that's possible, but not really sure19:00
uvoshmm thats not great given the very out of date html engine19:01
uvosbesides the security issue it also missrenders some files19:01
uvosso the plaintext version would be more usable even i suspect19:01
freemangordonuvos: sure, but I think we already discussed that (html engine) :)19:02
uvosyeah sure19:02
uvosi thought rendering was a runtime option19:02
uvosit is for sending a email19:02
freemangordonbut, search in settings, there might be one19:02
freemangordonor, look in the code on how it chooses what version to show19:02
uvosmodest compiles without html engine too right?19:03
freemangordonno, afaik19:03
uvosok19:03
uvosmhh19:03
uvosthx19:03
freemangordonuvos: https://github.com/frida/glib/commit/c0af442909e1304b799a4b6c145f8444c752e3da :(19:26
freemangordonparazyd: unfortunately, we'll have to provide our own glib20:29
freemangordonI'll send a patch upstream, but I guess it won;t make it to stable20:29
parazydCan you explain what actually has to happen? Maybe we can think of some way around it.20:32
parazydI mean, it's nbd to build it, but it's cumbersome to maintain updates20:32
freemangordonI know, but I don;t think we have an option20:32
parazydMy goal is to have less upstream forks20:32
freemangordongimme a minute, I'll provide backtrace and will explain20:32
parazydok20:32
freemangordonparazyd: https://pastebin.com/BaKLriL420:34
freemangordong_app_info_get_default_for_type shall return GAppInfo of the application for content_type, in this particular case this is "application/pdf"20:35
freemangordonas you can see from the backtrace, glibe correctly finds desktop file id to be "hildon-osso_pdfviewer.desktop", see frame 2 and above20:36
freemangordonhowever, at some point there is a call to g_desktop_app_info_new_from_filename(), which just takes basename to be desktop_id, so self->desktop_id becomes "osso_pdfviewer.desktop"20:37
freemangordonthis clearly breaks the specs and what is worse, prevents libhildonmime from finding the application to handle mime type20:38
freemangordonparazyd: ^^^20:38
parazydRight, I see20:39
parazydBut why does libhildonmime need the path?20:39
freemangordonbecause it wants to parse the .desktop file20:39
parazydIsn't there some glib machinery that handles this?20:39
parazydah20:39
freemangordonfor X-OSSO- stuff20:40
parazydRight20:40
parazydSo maybe the right way to patch glib is to offer something that returns the full path?20:41
parazydThinking in terms so it's not specific to Hildon20:41
freemangordonno, we have a hash table that maps desktop ids to filenames20:41
freemangordonI can do a reverse search on that table20:41
freemangordonto map file name to desktop id20:42
freemangordonand if that fails, then use basename as a fallback20:42
Wizzuplooks like glib has a big though20:43
Wizzupbug20:43
freemangordonmhm20:43
Wizzupso we have a way to fix it already20:43
freemangordonI have an idea how to fix it20:43
freemangordonit is not so simple, because the hastable in question is protected by mutexes, but I'll deal with it20:43
freemangordon*hashtable20:44
parazydSurprising that glib does by have something that resolves the full path to a given desktop file20:44
freemangordonnot, it is on the opposite, but I can hack around with g_hashtable_foreach20:45
freemangordonit maps desktop_id to filename20:45
freemangordonthat's why you see the correct desktop_id in calls to desktop_file_dir_get_app etc20:45
parazydYeah20:46
freemangordonso, shall I fix that or you have a better idea20:46
freemangordon?20:46
parazydNot rn, but I can think about it tomorrow20:52
freemangordonI'll make a patch in the meanwhile :)20:52
parazydok, cool20:52
parazydPick our version btw20:52
freemangordonhmm?20:53
freemangordondo we have one?20:53
parazydNot master upstream, but the one in Devuan Beowulf20:53
freemangordonI did apt-get source20:53
parazydGreat20:53
parazydThat's it20:53
freemangordonok20:53
uvoswell check if its fixed upstream first20:53
uvosalso gnome applications have thair own X- whatever special options in .desktop files20:56
freemangordonalready did, it is not20:56
uvosso there must be some way to access them in glib20:57
uvosmaybe not by opening the file and parsing it yourself20:57
freemangordondo you think gnome places stuff in applications/gnome?20:57
uvosno20:57
uvosbut other apps do this20:57
uvosand gnome picks them up too20:57
uvosso something has to give here20:58
freemangordonI am not sure I want to waste time on trying to find how $UNKNOWN app works around glib bugs20:58
freemangordonI'd rather fix and send patch upstream20:59
freemangordonparazyd: https://pastebin.com/FnjmaqYn21:54
freemangordonwith this clicking on pdf attachment makes it open in pdf viewer21:54
freemangordonWTF is meson and how I use it to build glib?!?22:28
freemangordonhttps://gitlab.gnome.org/GNOME/glib/-/merge_requests/228322:47
Wizzupfreemangordon: some hip new build system23:04
freemangordonhip?23:04
uvos__popular23:05
uvos__lots off stuff is switching to it23:05
uvos__xorg for instance23:05
freemangordonoh, because they fixed all the other issues it seems23:05
uvos__its not bad really23:05
freemangordonI see23:05
freemangordonand what is wrong with make? lemme guess, it is old, right?23:06
uvos__no make is way to basic23:06
uvos__who uses plain make?23:06
freemangordonme?23:06
uvos__plain make dosent really scale well...23:06
freemangordonok23:06
uvos__so most use something on top of make23:06
uvos__like cmake or autotools23:06
uvos__meson is really the idea that if everyone uses something else to generate make files23:07
freemangordonso we have CMake, autofu, meson/ninja, qmake... what else?23:07
uvos__make dosent really need to exist since its just a midle man23:07
uvos__other than tose you named all other build systems are pretty niche23:08
freemangordonah, and lets not forget M$ build system23:08
uvos__unless you include language specific build systems23:08
freemangordonbut yeah, I guess sript kiddies need to feel useful23:09
freemangordonsorry, was dealing with angularjs lately :)23:09
uvos__i dont see why the existance of multiple buildsystems would cause ire23:09
uvos__i mean lots of languages also exist23:09
uvos__its kinda the same23:10
freemangordonsorry, as I said I am grumpy because of angularjs shit, kinda looks the same23:11
freemangordonreinventing the wheel over and over, but each time with less angles23:11
Wizzuptry building tensorflow23:13
Wizzupyou'll appreciate even meson23:13
uvos__why what build system dose that use?23:13
freemangordonuvos__: see, glib has 874 open issues and 58 merge requests pending, is it really the build system of such a high priority so they must change it before fixing all the bugs?23:13
Wizzupuvos__: bazel23:14
uvos__freemangordon: idk maybe the existing system showed some kind of defficancy23:14
freemangordonautotools? I doubt23:15
uvos__autotools certenly has its rough edges23:15
freemangordonanyway23:15
uvos__especcaly in multiplat23:15
freemangordonok, could be, I don;t know meson so maybe it is better23:15
freemangordonstill, 874 open issues23:16
Wizzupjust more to learn and remember for our overloaded brains :)23:16
freemangordonyeah23:16
uvos__lets reimplment hildon in rust23:17
freemangordon:D23:17
freemangordonno, in angularjs/nodejs, that way we will be sure noone knows what happens23:18
freemangordonand we can bet before first time we start h-d on how long it will take for it to start - 2 or 3 days :)23:19
uvos__:P23:19

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