#1 2019-10-14 11:45:45

zerker
Member
Registered: 2019-10-14
Posts: 10

libgtk2-perl (and thus gcstar) removed in Debian Testing

I had the unfortunate experience of seeing gcstar get removed from Debian Testing because they are removing libgtk2-perl bindings. See the following bug listing:
https://bugs.debian.org/cgi-bin/bugrepo … bug=912860

Automated removal mail for gcstar:
https://tracker.debian.org/news/1001164 … m-testing/

From the libgt2-perl bug report, it seems like the only way forward for compatibility with future Debian (and Ubuntu) distributions will be a migration to GTK3.

I'm a long-time gcstar user, so I am invested in keeping this software usable. I have just created a gitlab account and have a moderate Perl background (though not my preferred language). Please let me know how I can help and/or a good division of work for the conversion.

Offline

 

#2 2019-10-14 13:16:57

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

I contacted some months ago the GCstar debian package maintainer on Launchpad to make sure that it would be based on the latest version of GCstar on Gitlab after the initial SVN repo closed. I'd didn't received any answer at that time. So currently the GCstar on Debian is outdated and it may become worse when GTK2 is removed!

Migrating to GTK3 may be tricky : GCstar is a multi-OS application running on Linux, Windows and MacOS. We thus have to make sure that the move can be done on all platforms and check that the Perl bindings are available and usable. I can check on Windows and some Linux distribution but not on MacOS.

In the meantime, I hope that the libgtk2-perl package will be available from unofficial or legacy repository so it can be declared as a dependency for GCstar.

Anybody wanting to help can fork the Git repo and create a new branch to propose evolutions of the source code.

Offline

 

#3 2019-10-14 15:17:59

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

I guess we'll see about someone else stepping up for libgtk2-perl, but for the long-term solution, I've started a branch and got the install wizard working at least:

https://gitlab.com/zerker/GCstar/commits/gtk3

I started with a blanket search replace of Gtk2 to Gtk3 (plus other case variations), then fixed a few compatibility issues that showed up in the migration. I think I'll break for now and start on the main application later.

How do you want to handle merging these changes? It will be a fair bit when it's all done; do you want to me to periodically submit merge requests to pull them into a similar gtk3 branch in your repo so you can track them piecemeal?

I also submitted a merge request for some issues I noticed with the installer that aren't related to the GTK3 migration.

Offline

 

#4 2019-10-14 16:38:13

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Thanks for investigating this issue!

I'd rather let you work alone on the gtk3 branch and merge it without review by default. We will only merge it to the main branch if we're sure it's cross-platform or if it's a condition to be officially supported again in major Linux distribs.

Before that, you may do merge requests that fixes things in the current version and are not directly related to the GTK3 migration.

Offline

 

#5 2019-11-05 17:04:07

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

I couldn't resist starting to investigate the Gtk3 migration. The current status is being able to launch the main windows but with an empty content, sometimes by commenting out lines with error! The work is available in the Gtk3 branch.

Offline

 

#6 2019-11-05 23:13:06

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Great, thanks! I have been a bit distracted learning all about containers to run the existing version in Docker for the time being, but I will have some time to contribute on the GTK3 port again probably sometime next week. I guess to divide workload, I may as well start on the Preferences dialogue and we'll see how things go.

Offline

 

#7 2019-11-06 15:01:16

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

On a fresh Debian Burster distribution, I checked that manually installing the Gtk2 deb package allows to continue to use GCstar and doesn't seems to create unwanted side effects. In a French forum, the advice was to use Snap or FlatPak, avoiding to dive into containers or VMs.

Thanks for the help proposal on the preferences window. There is yet some work to do on the GCstar menus to make it appear!

Offline

 

#8 2019-11-06 23:05:01

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Oh, sorry. I wasn't clear on my configuration. I'm leaning a bit ahead and running on the Testing repo (what will become Bullseye), so I see the issue before most people. On the plus side, it gives us time to fix it ahead of time! The Buster packages are no longer compatible in my case.

Looking into Snap or Flatpak was also an option, but there are no packages presently and I didn't want to dig too deeply into learning them... yet. I did want to learn about containers for a while, so it was an excuse. Not the intended use case, but it works for me smile

Offline

 

#9 2019-11-08 12:57:59

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

I'm curious to know how you configured Docker to be used as an app and how the dockerfile compares to the .gitlab-ci.yml I created to help package GCstar using Gitlab CI (based on Alpine).

Offline

 

#10 2019-11-08 22:13:41

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Sure. I went for simplicity of setup rather than minimal disk usage, so I based it on the Debian (stretch) base image. Because I had two apps to package (gmusicbrowser is in the same boat), I made a common image with libgtk2-perl included (plus deps).

Dockerfile for that (I named the image perl-gtk2:latest)

Code:

FROM debian:stretch
RUN apt-get update && apt-get install -y libgtk2-perl

For the actual gcstar docker, I created a local user. To keep integration seemless, I made the user (and uid) match my external user.

Here's the gcstar dockerfile:

Code:

FROM perl-gtk2:latest
ENV LOCALUSER=zerker
ENV LOCALUID=1001
RUN useradd $LOCALUSER -m -u $LOCALUID && \
    mkdir /home/$LOCALUSER/.config
RUN apt-get update && apt-get install -y gcstar
USER $LOCALUSER
CMD /usr/bin/gcstar

Then, I create a shell script to launch it properly for my setup, mapping enough stuff for X11 to work, and so I could access my collections and gcstar config:

Code:

docker container run \
    -v $HOME/Collections:$HOME/Collections \
    -v $HOME/.config/gcstar:$HOME/.config/gcstar \
    -v $HOME/.Xauthority:$HOME/.Xauthority \
    -v /tmp/.X11-unix:/tmp/.X11-unix \
    -e DISPLAY \
    --net=host \
    --rm \
    gcstar

This is pared down from a guide I found online, but that made some iffy decisions... like manually editing passwd and putting the user in the sudoers file. Plus it had some holes, which were mentioned in the comments section but never fixed in the blog.
   
There's also the x11docker project, but that seemed too complicated for what I wanted. Complete security isolation wasn't a goal for me.

Last edited by zerker (2019-11-08 22:14:02)

Offline

 

#11 2019-11-09 08:56:56

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Thanks for sharing. This method may be useful to solve compatibility issues or to test GCstar for various OS and distributions.

Offline

 

#12 2019-11-10 03:35:29

vikin
Member
Registered: 2008-10-20
Posts: 159

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Bonsoir kerenoc.
Pourquoi vouloir modifier .Xauthority ? Le truc risque de poser un problème .

Je pense que le problème de menu vient de l .

Je ne suis un spécialiste mais je connais assez bien les systèmes GNU/LInux et X11 est obsolète.
La dernière version est la 7.7

Offline

 

#13 2019-11-10 10:21:34

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Je ne pratique pas Docker mais peut-être que par défaut l'application containeurisée n'a pas les bonnes permission pour accéder   l'écran.

Offline

 

#14 2019-11-10 12:53:28

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

That's exactly it. X11 is still very much in use for GTK2 applications, even with XWayland on Wayland systems. It's really only read access that is needed for Xauthority, so I probably could have locked down the bind mount security a bit more than that. There's also a way to use xhost and xauth to explicitly allow certain connections, but I didn't want to do too much digging for this particular container.

Also, 7.7 is the last combined release of X11. Since then, they've been updating the individual components as separate releases. For example, for xorg-server itself, version 1.20 was released in May, 2018 while the most recent point release 1.20.5 was released in May this year.

Last edited by zerker (2019-11-10 13:04:03)

Offline

 

#15 2019-11-10 18:24:52

vikin
Member
Registered: 2008-10-20
Posts: 159

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Bonsoir kerenoc.
Ok. Mon anglais est un peu rouillé  mais j'avais en partie compris le message de zerker.
Thank You zerker. wink

Offline

 

#16 2019-11-11 10:01:12

BMHD
Member
Registered: 2009-01-08
Posts: 64

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Bonjour,
Je suis sous Debian Buster/unstable et c'est le passage de PERL 5.28 en 5.30 qui me demande la désinstallation de la dernière version test de GCStar.
N'y-a-t'il pas un endroit où indiquer l'utilisation d'une version supérieure de PERL dans GStar, si possible ?
Merci   tous

Offline

 

#17 2019-11-11 21:32:49

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

That's the main problem I ran into. Even the version of libgtk2-perl in the sid repository has dependency problems with the newer version of Perl. I did a little bit of searching today on the Ubuntu package repos for 19.10. They do package libgtk2-perl, but they are still on Perl 5.28, so it won't help.

I also tried installing libgtk2-perl via CPAN, but it failed its unit tests and didn't install. I didn't look into this further.

The other option is to download the existing source packages from Debian, fix the control files yourself to change the Perl dependency version, and re-build.

Or use Docker, per above.

Or lead the charge to get GCstar running with Flatpak/Appimage/Snaps? smile

Last edited by zerker (2019-11-11 23:18:08)

Offline

 

#18 2019-11-12 09:03:06

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

I used PAR Packer to create an executable that could embed Perl and  some necessary dependencies, to be launched in the "bin" directory of GCstar from the Gitlab Test branch, after setting the execution permission.

I tested it on a fresh Debian 10.1 but not on sid/testing.

Last edited by kerenoc (2019-11-12 09:05:14)

Offline

 

#19 2019-11-13 23:35:50

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

I have confirmed it works for me, although it's weird having an ELF executable with a file extension of .exe smile

Offline

 

#20 2019-11-14 22:59:10

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

I choose gcstar.exe to avoid colliding with the Perl script : one can rename it a.out if it seems less strange wink .

Offline

 

#21 2019-11-17 14:56:51

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

I did a small amount of investigation this morning and posted a fix for the enable_model_drag_source/dest lines as a small merge request. This gets GCStar started in loading a collection.

However, It stalls halfway through the load and I'm not having much luck figuring out the cause. I installed EPIC into Eclipse, but the debugger seems to be hit-or-miss. It's great at specific breakpoints, but doesn't seem to automatically break at exceptions (or even report them!). It also can't just pause execution and break "wherever it is now".

When I run in non-debug mode, I get the following
*** unhandled exception in callback:
***   expected a blessed reference at /usr/lib/x86_64-linux-gnu/perl5/5.30/Glib/Object/Introspection.pm line 67.
***  ignoring at /usr/share/perl5/Gtk3.pm line 572.

But I have had no luck tracing down which specific callback is causing the issue. Setting a breakpoint in the Introspection line hits for every normal callback too, which is too much noise to step through.

Offline

 

#22 2019-11-18 13:34:06

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Thanks for the modification : it's now merged in the GTK3.

There seems to be some limits to the use of EPIC for GCstar as you noticed. It may come from the fact that some processing is launched asynchronously using timers?

To debug, I sometime find it useful to launch the app with
% perl -w -d gcstar

That seems to produce the maximum level of debugging information, including the call stack for some exceptions.

In my environment, some collections open correctly while others produce an error in the XML backend, a part that shouldn't be impacted by the GTK3 migration!

I'm currently trying to make the image list mode work.

Offline

 

#23 2019-12-04 18:49:13

kerenoc
Member
Registered: 2016-03-19
Posts: 283
Website

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

The Gtk3 port begins to be functional on Debian and Windows and testing in more environments is now welcome to track the fixes that are still required. The look and feel was not customized and is based on the plain Gtk3 widgets.

This version is available in a dedicated Git branch.

Warning : don't forget to backup your collections and configuration files before using this version of GCstar.

Offline

 

#24 2019-12-04 23:17:50

zerker
Member
Registered: 2019-10-14
Posts: 10

Re: libgtk2-perl (and thus gcstar) removed in Debian Testing

Wow, thanks so much. Sorry I haven't been more help; I was a bit discouraged by my previous stumbling block and started working on other projects instead.

Now with a more functional base, I will hopefully be able to poke at it a bit more to help out again.

Offline

 



Should you have a problem using GCstar, you can open a bug report or request some support on GCstar forums.