#180 F34: Drop gtk2 from Workstation default install
Closed: Fixed 3 years ago by kalev. Opened 3 years ago by kalev.

I think it's time to let gtk2 go from the default Workstation install. Last things that require it are:

18:16 < cmurf> adwaita-gtk2-theme
18:16 < cmurf> anaconda-live
18:16 < cmurf> firefox
18:16 < cmurf> ibus-gtk2
18:16 < cmurf> kdump-anaconda-addon
18:16 < cmurf> libcanberra-gtk2
18:16 < cmurf> pinentry-gtk

I think it looks realistic to do that for Fedora 34. We have firefox (for the gtk2 plugin loader) and anaconda (unknown reasons) pulling it in. Firefox's gtk2 plugin loader should be possibly to split into a subpackage for people who really need it and not install it in the default install any more. Anaconda is also probably possible to clean up as well if we have a goal to do that for F34.

We should do a proper change proposal etc to get everyone on board with this.


Metadata Update from @chrismurphy:
- Issue set to the milestone: Fedora 34

3 years ago

+1 from me.

@stransky @xhorak would it be possible to do what @kalev is suggesting for Firefox?

@jkonecny do you have an idea why Anaconda still requires gtk2?

+1 from me.

@stransky @xhorak would it be possible to do what @kalev is suggesting for Firefox?

No, we're no going to do any work here as we have lot of more important task to do.
Firefox will drop gtk2 support when flash support is removed which is planned to end of 2020 or so.

No, we're no going to do any work here as we have lot of more important task to do.
Firefox will drop gtk2 support when flash support is removed which is planned to end of 2020 or so.

Do you have a link to some Mozilla tracker, where we can follow the Flash support removal? If you say end of 2020, then no action will really be required.

Hi, finally I was able to find the dependency tree to gtk2.

It's like this:
anaconda-live
anaconda-gui
blivet-gui-runtime
lxpolkit
gtk2

So the first dependency from Anaconda dragging in gtk2 is blivet-gui-runtime. @vtrefny could you please look if you can get rid of this dependency?

Hi, finally I was able to find the dependency tree to gtk2.

It's like this:
anaconda-live
anaconda-gui
blivet-gui-runtime
lxpolkit

Instead of using lxpolkit, could https://src.fedoraproject.org/rpms/polkit-gnome be used?

blivet-gui-runtime specifically asks for PolicyKit-authentication-agent, which polkit-gnome identifies as a provider for. So if our gnome-desktop group already includes that, then Anaconda won't pull it in and it won't need GTK2.

blivet-gui-runtime specifically asks for PolicyKit-authentication-agent, which polkit-gnome identifies as a provider for. So if our gnome-desktop group already includes that, then Anaconda won't pull it in and it won't need GTK2.

It isn't there..

Sounds like we should add it to our comps groups, which is something we should do even for F33...

I can move the polkit dependency from blivet-gui-runtime to blivet-gui. It isn't really needed for the runtime package, I need it to start the application so it's not needed when running from Anaconda.

Regardless of where it is, we should have polkit-gnome installed in Fedora Workstation media so that it uses that instead of installing lxpolkit.

Of course, but Anaconda depends only on blivet-gui-runtime not on blivet-gui so moving the dependency would also fix the issue for default installation.

blivet-gui depended directly on polkit-gnome in the past, but that meant installing blivet-gui in KDE or Xfce systems pulled in a lot of GNOME specific dependencies.

Regardless of where it is, we should have polkit-gnome installed in Fedora Workstation media so that it uses that instead of installing lxpolkit.

No. gnome-shell already provides a policykit authentication agent. polkit-gnome is obsolete and not needed for Fedora Workstation.

No, we're no going to do any work here as we have lot of more important task to do.
Firefox will drop gtk2 support when flash support is removed which is planned to end of 2020 or so.

Do you have a link to some Mozilla tracker, where we can follow the Flash support removal? If you say end of 2020, then no action will really be required.

I can help with the required firefox packaging work to subpackage the flash support if they should decide to keep it alive past the end of 2020.

Regardless of where it is, we should have polkit-gnome installed in Fedora Workstation media so that it uses that instead of installing lxpolkit.

No. gnome-shell already provides a policykit authentication agent. polkit-gnome is obsolete and not needed for Fedora Workstation.

Then gnome-shell should Provides: PolicyKit-authentication-agent if that's actually true.

No. gnome-shell already provides a policykit authentication agent. polkit-gnome is obsolete and not needed for Fedora Workstation.

Then gnome-shell should Provides: PolicyKit-authentication-agent if that's actually true.

Done: https://src.fedoraproject.org/rpms/gnome-shell/c/cd9369de85703b98ededeee30f9a421bbb7ebc30?branch=master

... and I went ahead and requested a F33 freeze exception for the change so that we can get rid of lxpolkit for the beta release: https://bugzilla.redhat.com/show_bug.cgi?id=1872686

Fedora-Workstation-Live-x86_64-Rawhide-20210116.n.1.iso has the following:

adwaita-gtk2-theme-3.28-9.fc33.x86_64
gtk2-2.24.33-2.fc34.x86_64
ibus-gtk2-1.5.23-2.fc34.x86_64
libcanberra-gtk2-0.30-23.fc33.x86_64

Removing gtk2 removes the above and also removes:

firefox
pinentry-gtk
libva

Rawhide currently has firefox 84, which is the last version to support flash. Firefox 85 is expected to be released Jan 26.

But I'm not sure about the other two.

pinentry-gtk: Pinentry is a collection of simple PIN or passphrase entry dialogs which utilize the Assuan protocol as described by the aegypten project; see http://www.gnupg.org/aegypten/ for details.
I really don't know why it's preinstalled.

Regarding libva - I don't see it depends on gtk2 (https://koji.fedoraproject.org/koji/rpminfo?rpmID=24298475). I think that firefox depends on it and libva is removed when you remove firefox - see the "Recommends" in https://koji.fedoraproject.org/koji/rpminfo?rpmID=24615895.

We should be using pinentry-gnome3 (it's listed in comps) instead of pinentry-gtk. I am not sure what pulls it in (probably some kind of conditional dep), but hopefully it goes away when the rest of gtk2 is gone from the default install. If not, we can investigate it further.

Comps PR to drop libcanberra-gtk2: https://pagure.io/fedora-comps/pull-request/589

The rest is just firefox pulling in gtk2 as much as I can tell, and should go away as soon as next firefox build hits the repos, if I understand firefox changes correctly.

Action: Tomas to talk to @stransky about removing the GTK2 dependency (including gtk2-plugin-container or what else)

The PR has been merged. Now we should check a new compose and see if it is indeed gone.

gtk2 was still not gone in the latest compose. I did some debugging and it turned out that evolution-data-server was pulling in pinentry-gtk, (gtk2-based), so we had both pinentry-gtk and pinentry-gnome3 (this is the one we want) installed.

I went ahead and changed the dep in to pinentry-gui virtual provide, which should hopefully make it so that we only have pinentry-gnome3 installed on the media.

https://src.fedoraproject.org/rpms/evolution-data-server/c/f2629ec293caa0c964725431ee01b7cc7542e224?branch=rawhide

Need to check again after next compose to see if this was now enough to get rid of gtk2 :)

This still didn't drop gtk2 from install media, so I tracked down one more place that pulls it in: gnome-themes-extra. Should be fixed in https://src.fedoraproject.org/rpms/gnome-themes-extra/c/137cf9f5579324439a7ced863293aa02eb1eff5d?branch=rawhide

Is there any point in including gnome-themes-extra at this point ?

From what I can see, it has a bunch of HighContrast app icons - don't we just use symbolics for that nowadays?

I'll double-check with Jakub

It also ships an empty /usr/share/themes/Adwaita/gtk-3.0/gtk.css which I believe gnome-tweaks uses to show which themes are available. Can we just put the empty file in gtk3 ?

This is the code from gnome-tweaks:

    def _get_valid_themes(self):
        """ Only shows themes that have variations for gtk3"""
        gtk_ver = Gtk.MINOR_VERSION
        if gtk_ver % 2: # Want even number
            gtk_ver += 1

        valid = ['Adwaita', 'HighContrast', 'HighContrastInverse']
        valid += walk_directories(get_resource_dirs("themes"), lambda d:
                    os.path.exists(os.path.join(d, "gtk-3.0", "gtk.css")) or \
                         os.path.exists(os.path.join(d, "gtk-3.{}".format(gtk_ver))))
        return set(valid)

I don't see any problem with moving that css file to gtk3

gnome-tweaks could just know that Adwaita + HighContrast is always going to be available (since it links against gtk3, which includes those themes), but sure, why not

I think I remember discussion around this a few years ago and back then gnome-tweaks developers said that they didn't want to hardcode a theme list because this (the existence of gtk.css) is the only API they have or something. (I suspect the real reason was Ubuntu maybe included extra themes that would have complicated things).

Woohoo, looks like gtk2 is finally gone from today's rawhide compose.

... and gtk2 is back, due to the switch to ibus-anthy that pulls in kasumi-unicode which in turn pulls in gtk2. I've filed https://bugzilla.redhat.com/show_bug.cgi?id=1928410

Looks like that should be fixed and we just need to verify again that it's really gone.

It's a shame this has to be done manually. Ideally we would have some automated unwanted package test that would fail if a particular package is installed....

Metadata Update from @catanzaro:
- Issue tagged with: pending-action

3 years ago

It's a shame this has to be done manually. Ideally we would have some automated unwanted package test that would fail if a particular package is installed....

Adam has offered to create an openqa test to ensure gtk2 doesn't return. We could add other unwanted packages too, if desired.

Metadata Update from @kalev:
- Issue untagged with: pending-action
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

I have nothing to add except that this decision somewhat broke HexChat UI compared to Fedora 32/33. See: https://bugzilla.redhat.com/show_bug.cgi?id=1963223

We could maybe make gtk2 recommend adwaita-gtk2-theme. @mclasen, what do you think?

You could set a rich supplements on adwaita-gtk2-theme so that it's pulled in only when gtk2 is being installed on a GNOME environment. KDE does something similar with breeze-gtk-gtk2.

From breeze-gtk spec:

%package gtk2
Summary:        Breeze widget theme for GTK 2
Requires:       gtk2-engines
Requires:       %{name}-common = %{version}-%{release}
Supplements:    (plasma-breeze and gtk2)
%description gtk2
%{summary}.

On today's update (at least on Silverblue) the gtk2 is back together with the whole gimp:

Added:
LibRaw-0.20.2-2.fc34.x86_64
SDL2-2.0.14-3.fc34.x86_64
aalib-libs-1.4.0-0.41.rc5.fc34.x86_64
adwaita-gtk2-theme-3.28-12.fc34.x86_64
annobin-9.72-2.fc34.x86_64
babl-0.1.86-1.fc34.x86_64
dwz-0.14-1.fc34.x86_64
efi-srpm-macros-5-2.fc34.noarch
flexiblas-3.0.4-3.fc34.x86_64
flexiblas-netlib-3.0.4-3.fc34.x86_64
flexiblas-openblas-openmp-3.0.4-3.fc34.x86_64
fonts-srpm-macros-1:2.0.5-5.fc34.noarch
fpc-srpm-macros-1.3-3.fc34.noarch
gegl04-0.4.30-1.fc34.x86_64
ghc-srpm-macros-1.5.0-4.fc34.noarch
ghostscript-tools-fonts-9.53.3-6.fc34.x86_64
ghostscript-tools-printing-9.53.3-6.fc34.x86_64
gimp-2:2.10.24-1.fc34.x86_64
gimp-jxl-plugin-0.3.7-2.fc34.x86_64
gimp-libs-2:2.10.24-1.fc34.x86_64
gnat-srpm-macros-4-13.fc34.noarch
go-srpm-macros-3.0.10-1.fc34.noarch
gperftools-libs-2.9.1-1.fc34.x86_64
gtk2-2.24.33-4.fc34.x86_64
ibus-gtk2-1.5.24-5.fc34.x86_64
jasper-libs-2.0.32-1.fc34.x86_64
jpegxl-libs-0.3.7-2.fc34.x86_64
jxl-pixbuf-loader-0.3.7-2.fc34.x86_64
kernel-srpm-macros-1.0-4.fc34.noarch
libcanberra-gtk2-0.30-24.fc34.x86_64
libgfortran-11.1.1-3.fc34.x86_64
libmng-2.0.3-13.fc34.x86_64
libmypaint-1.6.1-3.fc34.x86_64
libquadmath-11.1.1-3.fc34.x86_64
libwmf-0.2.12-5.fc34.x86_64
libwmf-lite-0.2.12-5.fc34.x86_64
lua-srpm-macros-1-4.fc34.noarch
mypaint-brushes-1.3.1-3.fc34.noarch
nim-srpm-macros-3-4.fc34.noarch
ocaml-srpm-macros-6-4.fc34.noarch
openblas-0.3.15-1.fc34.x86_64
openblas-openmp-0.3.15-1.fc34.x86_64
openblas-srpm-macros-2-9.fc34.noarch
openexr-libs-2.5.5-1.fc34.x86_64
perl-srpm-macros-1-39.fc34.noarch
pygobject2-2.28.7-12.fc34.x86_64
pygtk2-2.24.0-34.fc34.x86_64
python-srpm-macros-3.9-36.fc34.noarch
python2-cairo-1.18.2-8.fc34.x86_64
python2.7-2.7.18-11.fc34.x86_64
python3-tkinter-3.9.5-2.fc34.x86_64
qt5-srpm-macros-5.15.2-2.fc34.noarch
redhat-rpm-config-183-1.fc34.noarch
rpmautospec-rpm-macros-0.2.1-1.fc34.noarch
rust-srpm-macros-17-2.fc34.noarch
suitesparse-5.4.0-6.fc34.x86_64
tbb-2020.3-5.fc34.x86_64
tix-1:8.4.3-31.fc34.x86_64
tk-1:8.6.10-6.fc34.x86_64

$ rpm -q --whatrequires gimp
gimp-jxl-plugin-0.3.7-2.fc34.x86_64
$ rpm -q --whatrequires gimp-jxl-plugin
no package requires gimp-jxl-plugin
$ rpm -q --whatrequires gimp-jxl-plugin
no package requires gimp-jxl-plugin
$ rpm -q --whatsuggests gimp-jxl-plugin
no package suggests gimp-jxl-plugin
$ rpm -q --whatrecommends gimp-jxl-plugin
jpegxl-libs-0.3.7-2.fc34.x86_64
$ rpm -q --whatrequires jpegxl-libs
no package requires jpegxl-libs
$ rpm -q --whatsuggests jpegxl-libs
no package suggests jpegxl-libs
$ rpm -q --whatrecommends jpegxl-libs
no package recommends jpegxl-libs

@adamwill the checks that you've done won't prevent these kind of updates (I think that this should affect Workstation compose as well)?

We could maybe make gtk2 recommend adwaita-gtk2-theme. @mclasen, what do you think?

Submitted: https://src.fedoraproject.org/rpms/gtk2/pull-request/5

Login to comment on this ticket.

Metadata