Summary: | games-strategy/freeciv-3.1.0: incompatible packet contents | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Johannes Geiss <johannes.geiss> |
Component: | Current packages | Assignee: | Gentoo Games <games> |
Status: | CONFIRMED --- | ||
Severity: | major | CC: | johannes.geiss, kangie, rickv |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Johannes Geiss
2024-08-08 09:17:51 UTC
Can't reproduce on 3.1.4 - Are you able to check for me if this still occurs? (In reply to Matt Jolly from comment #1) > Can't reproduce on 3.1.4 - Are you able to check for me if this still occurs? I dug deeper in the problem. It seems to be a problem with the GTK variant. You can reproduce it as follows in Podman (or Docker): podman run -ti -e DISPLAY -v ~/.Xauthority:/root/.Xauthority:Z --net=host docker.io/gentoo/stage3 emerge-webrsync emerge gentoolkit euse -E X vorbis gtk3 json euse -D qt6 emerge freeciv useradd user cp /root/.Xauthority /home/user/. chmod 0666 /home/user/.Xauthority su -l --whitelist-environment DISPLAY user freeciv-gtk3.22 Select "Start New Game" => Lost connection to server: incompatible packet contents My steps above used version 3.1.3. I just updated to version 3.1.4, but the error is still there: echo >/etc/portage/package.accept_keywords/freeciv games-strategy/freeciv ~amd64 emerge -u freeciv su -l --whitelist-environment DISPLAY user freeciv-gtk3.22 Select "Start New Game" => Lost connection to server: incompatible packet contents I started experiencing this as well on v3.1.4. Rebuilding with -json fixed things for me...no clue what the json use flag does for freeciv... (In reply to rick vernam from comment #5) > I started experiencing this as well on v3.1.4. > Rebuilding with -json fixed things for me...no clue what the json use flag > does for freeciv... Interesting! USE=json controls the -Djson-protocol meson option (which uses dev-libs/jansson). https://forum.freeciv.org/f/viewtopic.php?p=81130#p81130 suggests to me that perhaps the JSON protocol is for the website mode (and interacting with those users) and that this is semi-intentional? Maybe? If that's right (and I don't know if it is, I defer to the maintainer), we should probably mask USE=json or at least add some pkg_postinst warn when it's enabled. .. though https://github.com/freeciv/freeciv/commit/40b53efb124bf8481f453868f9d3478ff05e6b42 and https://github.com/freeciv/freeciv/commit/d1fb43d496ff08cd5a3eafa43f5f06d0f370fa97 (which didn't get dropped later) imply it is runtime switchable? I can't comment on the other things you have highlighted...however, I should add that prior to upgrading to v3.1.4 I did not have the json flag on and never encountered this. So very strong anecdotal evidence, if nothing more...
> You can already compile freeciv (including client part) to use json network protocol instead of the protocol regular server/client use.
Interesting; this suggests that it _should_ work if if json-protocol is enabled... and my testing (on 9999 and 3.2.0) suggests that it does. I am able to successfully communicate with a (local) server and client built by portage and have successfully played a few turns.
Unfortunately, as suggested by this bug it's actually broken for 3.1.x, and with that info I can successfully reproduce the issue.
I'll p.use.mask it for the older versions since this seems to be fixed for 3.2.0. I can't easily identify the change that fixed this behaviour - if someone wants to bisect I'm happy to backport, but since 3.2.0 will be out in a few months (and the beta is now packaged) I'm happy to leave it at that.
Please feel free to try the later versions (with the json USE) and let me know how that goes!
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1c3ccff414a33b1dd288ba40f9fe21274d973ce9 commit 1c3ccff414a33b1dd288ba40f9fe21274d973ce9 Author: Matt Jolly <kangie@gentoo.org> AuthorDate: 2025-04-16 05:39:01 +0000 Commit: Matt Jolly <kangie@gentoo.org> CommitDate: 2025-04-16 05:52:32 +0000 profiles/base: p.use.mask games-strategy/freeciv[json] < 3.2.0 Released versions of freeciv will build a client and server that are incapable of communicating with each other. This is fixed upstream, but a non-obvious backport. Since a fixed beta is packaged already (and the JSON protocol is not in wide use) we'll mask the USE for now. Bug: https://bugs.gentoo.org/937565 Signed-off-by: Matt Jolly <kangie@gentoo.org> profiles/base/package.use.mask | 6 ++++++ 1 file changed, 6 insertions(+) |