Open Marcool04 opened 10 months ago
Hi Mark,
We ran into this issue recently when we switched over to https only when launching the new language depot. Sadly we are still using an old version of mercurial (upgrade to 6 is on the way though), however you can drop in version 3.3 and that should solve your issues. You can download the version we used here: https://github.com/sillsdev/Mercurial4Chorus/tree/v3.0.3.11/linux-x64/Mercurial as for Flatpak I'm not sure, I don't use linux so I don't know what that would take. Hopefully that works for you. You will have trouble if you try to update to 6.5 as there's some code changes in flex required for that new version, but 3.3 will work fine.
Hi Kevin,
Thanks for the quick answer, for the information and for your suggestion. I tried that, and after a few tweeks I am now stuck on mercurial complaining about there not being a fixutf8
extension enabled in mercurial.ini. The ini file contains this:
[extensions]
eol=
hgext.graphlog=
convert=
# Set fixutf8 to the correct absolute path
#fixutf8=/usr/lib/flexbridge/MercurialExtensions/fixutf8/fixutf8.py
I tried un-commenting that line and setting it to the right path, both absolute on my filesystem, and relative to the flatpack root, or relative to the ini file and mercurial executable. No luck... It still says fixutf8 is not enabled in mercurial.ini.
I also tried to replace the MercurialExtensions folder from my install with the corresponding one in the 3.0.3.11 zip I downloaded from your indications. That didn't help either...
I realize it was probably a long shot to get it to work with just a drop in like this. I'll keep on flipping tls off then back on to sync FLEx data for now if I have to.
Thanks again, Regards, Mrak.
where was the ini file you were modifying? I think there's one inside each repo under repo-name/.hg/hgrc
(no .ini extension) this hgrc file overwrites any global config you have on your machine. FLEx writes that file out so I'm guessing that's where the bad path is coming from. I think the thinking was that we dont want FLEx to enable fixutf8 for all mercurial repos on your machine, just the ones for FLEx.
So the mercurial.ini file I was modifying is the one that is here: https://github.com/sillsdev/Mercurial4Chorus/blob/v3.0.3.11/linux-x64/Mercurial/mercurial.ini, once I downloaded the zip for that version and unpacked it into the right place in the Flatpak app.
Indeed, there is an hgrc
file in the FLEx project itself, it contains:
...
fixutf8 = /app/lib/flexbridge/MercurialExtensions/fixutf8/fixutf8.py
which is uncommented. Its unclear to me what the root of that path should be. As far as I understand it, Flatpak apps are run sandboxed, probably in a chroot with the /var/lib/flatpak/etc/etc/etc
part mounted in /app
or something like that. So that path should be correct... Maybe there's another hgrc
file somewhere interfering?
@Marcool04 It may be worth searching with find ~ -name .hgrc -o -name mercurial.ini
on your machine, and in the flatpak environment with find /app -name .hgrc -o -name mercurial.ini
to find possible other hits. (You can get into the flatpak environment with something like flatpak run org.sil.FieldWorks --command=bash
)
I'm glad FieldWorks is working on Arch :).
@marksvc Yeah I had tried something similar already... no luck. The only mercurial.ini is the one in the Mercurial folder itself in the source. I don't have mercurial installed on my laptop locally so nothing anywhere else.
I am glad it's working in Arch too :) Spent too long messing around with virtualbox and a windows-based installation before I realised you were offering a Flatpack which there was every reason should work here and it does! Keep up the good work, all contributors. Will be great when you can get the toolchain updated (Mercurial, and what not...) 👍️
However... getting a shell inside the Flatpack helped me figure out the layout of things a bit better. It was the right mercurial.ini, but I had the wrong path for fixutf8, it should have been:
[extensions]
fixutf8=/app/lib/flexbridge/MercurialExtensions/fixutf8/fixutf8.py
This works now, the bridge starts fine, but I get another error when actually clicking on the "Internet" button:
Traceback (most recent call last):
File "/app/lib/flexbridge/Mercurial/hg", line 36, in <module>
mercurial.util.setbinary(fp)
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 106, in __getattribute__
self._load()
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 78, in _load
mod = _hgextimport(_import, head, globals, locals, None, level)
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 47, in _hgextimport
return importfunc(name, globals, *args)
File "/app/lib/flexbridge/Mercurial/mercurial/util.py", line 70, in <module>
statfiles = getattr(osutil, 'statfiles', platform.statfiles)
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 106, in __getattribute__
self._load()
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 78, in _load
mod = _hgextimport(_import, head, globals, locals, None, level)
File "/app/lib/flexbridge/Mercurial/mercurial/demandimport.py", line 47, in _hgextimport
return importfunc(name, globals, *args)
ImportError: /usr/lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /app/lib/flexbridge/Mercurial/mercurial/osutil.so)
which is obviously caused by mismatch between the version of glibc that is expected by my "plonked" Mercurial and the one which the Flatpak is running... So it's not possible to just drop that in there and hope it'll work unfortunately :/ Not sure this can be hacked around. The whole stack needs updating really or there's going to be an endless chain of version mismatches like this one. 🤷♂️
Hi, I have been using FieldWork Language Explorer for some time on an Archlinux machine, first via a windows virtual machine, and now with a Flatpak installation on Archlinux. I also have my own mercurial installation on a server of mine, but I am having issues with the send/receive function of FLEx, that is implemented - unless I'm very much mistaken - through chorus, hence me posting here (please let me know if this is not the right way to report this).
I have the following output on failure to sync:
Trivially, if I disable the redirect on my server from the http:// to https:// URL, then sync works fine. Also, if I allow deprecated TLSv1, it also works. However, I would rather avoid doing either of those, as they seem like bad solutions to what should be fixable on mercurial's end.
The mercurial version that is bundled in the Flatpak is obviously very very old... 3.0.1 dates back to June 2014, and we are now on 6.5.1! I understand there had probably been a lot of development going on both in Chorus and Fieldworks since then, and that this issue is likely not present in more recent version, but since they aren't available to the Flatpak installers such as myself, is there a way anybody can think of of working around this? I'm open to tinkering and testing stuff. Even rebuilding a flatpak or whatever.
Any help or suggestions would be much appreciated. Best regards, Mark.