View previous topic :: View next topic |
Author |
Message |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5097 Location: Dallas area
|
Posted: Tue Oct 22, 2019 4:30 pm Post subject: Remove the need for dbus when compiling gtk+:3 |
|
|
For those who don't want to pull in dbus when compiling gtk+:3 there is a way to fix it.
-------------Warning--------------
This has been added to further clarify who should use this:
If you are already using dbus for other things, then you should not use this.
This is for those people not running gnome/kde and for those who do not want to have dbus on their system.
-------------------------------------
New directions thanks to charles17 question below (much easier)
edit /etc/portage/profile/package.provided and add app-accessibility/at-spi2-atk-2.5.3
Note: if newer ebuilds require a version greater than 2.5.3 then that needs to be added.
mkdir /etc/portage/patches/x11-libs/gtk+:3 (you can specify version if you desire, but I've found the patch has worked well going back to 3.19)
copy following patch to the directory (call it what you want, a good name would be at-sp2-atk-removal.patch or atk-bridge-removal.patch)
emerge and enjoy your gtk:+3 without dbus being needed.
Code: | ## Remove gtk3-atk-bridge support to avoid unwanted dbus dependency.
--- 1/configure.ac.orig 2018-10-22 09:23:08.542046885 -0500
+++ 2/configure.ac 2018-10-22 09:37:03.335514971 -0500
@@ -1390,14 +1390,10 @@
########################################
-# Check for Accessibility Toolkit flags
+# Removed the at-spi (atk-bridge) support
########################################
-if test x$enable_x11_backend = xyes; then
- ATK_PACKAGES="atk atk-bridge-2.0"
-else
- ATK_PACKAGES="atk"
-fi
+ATK_PACKAGES="atk"
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
## Remove gtk3-atk-bridge support to avoid unwanted dbus dependency.
--- 1/gtk/a11y/gtkaccessibility.c.orig 2018-10-22 09:23:50.806564701 -0500
+++ 2/gtk/a11y/gtkaccessibility.c 2018-10-22 09:33:39.019965471 -0500
@@ -37,10 +37,6 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkaccessible.h>
-#ifdef GDK_WINDOWING_X11
-#include <atk-bridge.h>
-#endif
-
static gboolean gail_focus_watcher (GSignalInvocationHint *ihint,
guint n_param_values,
const GValue *param_values,
@@ -988,9 +984,5 @@
_gtk_accessibility_override_atk_util ();
do_window_event_initialization ();
-#ifdef GDK_WINDOWING_X11
- atk_bridge_adaptor_init (NULL, NULL);
-#endif
-
atk_misc_instance = g_object_new (GTK_TYPE_MISC_IMPL, NULL);
}
|
It's just that simple (well until the devs modify the ebuild/eclasses again)
Note: This is intended for those not using gnome/kde or those simply wanting a dbus free system.
I mention gnome/kde, because there are lots of other wm related packages pulling in dbus.
Old way - kept for historical reasons.
go to PORTDIR/x11-libs/gtk+/
look for all patches listed in the ebuild
copy those patches to your local repo files directory
copy the ebuild to your local repo
edit the ebuild, save changes, and create digest
create user patch directory and put the patch file there
emerge and enjoy
I'll use gtk+-3.24.10.ebuild as the example (since it's the current stable one)
PORTDIR in my case is /usr/portage and local repo is /usr/local/portage (modify paths for your particular system)
cd /usr/portage/x11-libs/gtk+
grep -i patch gtk+-3.24.10.ebuild (in this case there are 2 files)
cp files/gtk+-3.22.20-libcloudproviders-automagic.patch /usr/local/portage/x11-libs/gtk+/files
cp files/gtk+-3.24.8-update-icon-cache.patch /usr/local/portage/x11-libs/gtk+/files
cp gtk+-3.24.10.ebuild /usr/local/portage/x11-libs/gtk+
cd /usr/local/portage/x11-libs/gtk+
edit gtk+-3.24.10.ebuild and remove dependency line with app-accessibility/at-spi2-atk on it and save file
ebuild gtk+-3.24.10.ebuild digest (create the digest so portage knows about it and associated files in /files directory) _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW
Last edited by Anon-E-moose on Tue Oct 29, 2019 9:48 am; edited 4 times in total |
|
Back to top |
|
 |
Ant P. Watchman

Joined: 18 Apr 2009 Posts: 6921
|
Posted: Wed Oct 23, 2019 1:31 am Post subject: |
|
|
Seems like a lot of manual work when there's been up-to-date ebuilds with USE=accessibility in various overlays for several months. |
|
Back to top |
|
 |
sitquietly Tux's lil' helper


Joined: 23 Oct 2010 Posts: 114 Location: On the Wolf River, Tennessee
|
Posted: Wed Oct 23, 2019 6:24 am Post subject: |
|
|
Ant P. wrote: | ...there's been up-to-date ebuilds with USE=accessibility in various overlays for several months. |
Thank you, I found your flussence repository and the debloated gtk+3, also very nice gtk2 gucharmap. I'm very glad to find those, and the audacious and quiterss ebuilds (and runit support!). |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5097 Location: Dallas area
|
Posted: Wed Oct 23, 2019 9:33 am Post subject: |
|
|
Ant P. wrote: | Seems like a lot of manual work when there's been up-to-date ebuilds with USE=accessibility in various overlays for several months. |
Well, I don't routinely run around checking all the overlays to see what's going on.
This thread is still useful if someone wants to know how to do it or like me doesn't follow overlays. _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
Posted: Wed Oct 23, 2019 11:28 am Post subject: Re: Remove the need for dbus when compiling gtk+:3 |
|
|
Anon-E-moose wrote: | For those who don't want to pull in dbus when compiling gtk+:3 there is a way to fix it.
go to PORTDIR/x11-libs/gtk+/
look for all patches listed in the ebuild
copy those patches to your local repo files directory
copy the ebuild to your local repo
edit the ebuild, save changes, and create digest
create user patch directory and put the patch file there
emerge and enjoy
I'll use gtk+-3.24.10.ebuild as the example (since it's the current stable one)
PORTDIR in my case is /usr/portage and local repo is /usr/local/portage (modify paths for your particular system)
cd /usr/portage/x11-libs/gtk+
grep -i patch gtk+-3.24.10.ebuild (in this case there are 2 files)
cp files/gtk+-3.22.20-libcloudproviders-automagic.patch /usr/local/portage/x11-libs/gtk+/files
cp files/gtk+-3.24.8-update-icon-cache.patch /usr/local/portage/x11-libs/gtk+/files
cp gtk+-3.24.10.ebuild /usr/local/portage/x11-libs/gtk+
cd /usr/local/portage/x11-libs/gtk+
edit gtk+-3.24.10.ebuild and remove dependency line with app-accessibility/at-spi2-atk on it and save file
ebuild gtk+-3.24.10.ebuild digest (create the digest so portage knows about it and associated files in /files directory)
mkdir /etc/portage/patches/x11-libs/gtk+:3 (you can specify version if you desire, but I've found the patch has worked well going back to 3.19)
copy following patch to the directory (call it what you want, a good name would be at-sp2-atk-removal.patch or atk-bridge-removal.patch) |
Why put it in /etc/portage/patches instead of listing it in the PATCHES array and having it in the ebuild's files directory? |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5097 Location: Dallas area
|
Posted: Wed Oct 23, 2019 12:02 pm Post subject: Re: Remove the need for dbus when compiling gtk+:3 |
|
|
charles17 wrote: | Why put it in /etc/portage/patches instead of listing it in the PATCHES array and having it in the ebuild's files directory? |
One less modification to the ebuild.
And I still have hopes to convince the devs to put a use flag around the at-spi2-atk pkg. Which would mean no modifications to the ebuild.
Although, putting app-accessibility/at-spi2-atk in package.provided might provide the same result without the need to modify the ebuild at all.
I'll check it out later.
Edit to add: Thanks to charles17 question I thought of a much easier way (less changes needed), add file to package provided and drop patch in /etc/portage/patches. _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW |
|
Back to top |
|
 |
duane Tux's lil' helper

Joined: 03 Jun 2002 Posts: 146 Location: Oklahoma City
|
Posted: Thu Oct 24, 2019 7:35 am Post subject: |
|
|
I couldn't get package.provided to work on my systems:
Code: | #
app-accessibility/at-spi2-atk-2.30.1
app-accessibility/at-spi2-core-2.30.1
|
But, the old method still works fine. Thanks. |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5097 Location: Dallas area
|
Posted: Thu Oct 24, 2019 9:58 am Post subject: |
|
|
duane wrote: | I couldn't get package.provided to work on my systems:
Code: | #
app-accessibility/at-spi2-atk-2.30.1
app-accessibility/at-spi2-core-2.30.1
|
But, the old method still works fine. Thanks. |
It should have worked, I just tried and using that version works for me. Although I like to use the minimum required instead.
What does find /etc/portage -name package.provided -ls return _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW |
|
Back to top |
|
 |
duane Tux's lil' helper

Joined: 03 Jun 2002 Posts: 146 Location: Oklahoma City
|
Posted: Thu Oct 24, 2019 3:02 pm Post subject: |
|
|
Anon-E-moose wrote: | It should have worked, I just tried and using that version works for me. Although I like to use the minimum required instead.
What does find /etc/portage -name package.provided -ls return |
Code: | # find /etc/portage -name package.provided -ls
95423822 4 -rw-r--r-- 1 root root 77 Oct 24 02:34 /etc/portage/package.provided |
When I try to emerge, I get this. dbus is masked, and the patched gtk+ is already installed, but I moved the gtk+ directory out of my repository and copied the patch into the patches directory.
Code: | # emerge -1pv gtk+
These are the packages that would be merged, in order:
Calculating dependencies... done!
[ebuild N ] acct-group/messagebus-0::gentoo 0 KiB
[ebuild N ] acct-user/messagebus-0::gentoo 0 KiB
[ebuild NS ] app-text/docbook-xml-dtd-4.4-r3:4.4::gentoo [4.1.2-r7:4.1.2::ge
ntoo, 4.3-r2:4.3::gentoo] 94 KiB
[ebuild NS ] app-text/docbook-xml-dtd-4.2-r3:4.2::gentoo [4.1.2-r7:4.1.2::ge
ntoo, 4.3-r2:4.3::gentoo] 77 KiB
[ebuild N ] app-text/xmlto-0.0.28-r1::gentoo USE="-latex -text" 125 KiB
[ebuild N #] sys-apps/dbus-1.12.16::gentoo USE="-X -debug -doc -elogind (-s
elinux) -static-libs -systemd -test -user-session" ABI_X86="(64) -32 (-x32)" 2,0
45 KiB
[ebuild N ] app-accessibility/at-spi2-core-2.30.1:2::gentoo USE="introspection -X -gtk-doc -test" ABI_X86="(64) -32 (-x32)" 184 KiB
[ebuild N ] app-accessibility/at-spi2-atk-2.30.1:2::gentoo USE="-test" ABI_X86="(64) -32 (-x32)" 93 KiB
[ebuild UD ] x11-libs/gtk+-3.24.10:3::gentoo [3.24.10-r9:3::duane] USE="X introspection (-aqua) -broadway -cloudprint -colord -cups -examples -gtk-doc -test -vim-syntax -wayland -xinerama (-atk-bridge%)" ABI_X86="(64) -32 (-x32)" 0 KiB
Total: 9 packages (1 downgrade, 6 new, 2 in new slots), Size of downloads: 2,616 KiB
The following mask changes are necessary to proceed:
(see "package.unmask" in the portage(5) man page for more details)
# required by app-accessibility/at-spi2-core-2.30.1::gentoo
# required by app-accessibility/at-spi2-atk-2.30.1::gentoo
# required by x11-libs/gtk+-3.24.10::gentoo[X]
# required by gtk+ (argument)
# /etc/portage/package.mask/zzz:
#
=sys-apps/dbus-1.12.16 |
|
|
Back to top |
|
 |
Perfect Gentleman Veteran

Joined: 18 May 2014 Posts: 1035
|
Posted: Thu Oct 24, 2019 3:23 pm Post subject: |
|
|
check mv-overlay |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5097 Location: Dallas area
|
Posted: Thu Oct 24, 2019 3:40 pm Post subject: |
|
|
duane wrote: | Anon-E-moose wrote: | It should have worked, I just tried and using that version works for me. Although I like to use the minimum required instead.
What does find /etc/portage -name package.provided -ls return |
Code: | # find /etc/portage -name package.provided -ls
95423822 4 -rw-r--r-- 1 root root 77 Oct 24 02:34 /etc/portage/package.provided |
|
package.provided is in /etc/portage/profile/ on my system.
man portage, doesn't specify that it needs to be in profile ... but the wiki does https://wiki.gentoo.org/wiki//etc/portage/profile/package.provided _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5097 Location: Dallas area
|
Posted: Thu Oct 24, 2019 3:44 pm Post subject: |
|
|
So far I know of flussence and mv-overlay that also contain patched ebuilds for gtk+:3 ... any others? _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW |
|
Back to top |
|
 |
duane Tux's lil' helper

Joined: 03 Jun 2002 Posts: 146 Location: Oklahoma City
|
Posted: Fri Oct 25, 2019 1:21 am Post subject: |
|
|
Anon-E-moose wrote: | package.provided is in /etc/portage/profile/ on my system. |
That fixed it. I should have paid more attention to the man page and your instructions.
Edit: Nothing but timeouts when I try to post, then eight posts... |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
Posted: Fri Oct 25, 2019 3:36 pm Post subject: Re: Remove the need for dbus when compiling gtk+:3 |
|
|
Anon-E-moose wrote: | charles17 wrote: | Why put it in /etc/portage/patches instead of listing it in the PATCHES array and having it in the ebuild's files directory? |
One less modification to the ebuild.
And I still have hopes to convince the devs to put a use flag around the at-spi2-atk pkg. Which would mean no modifications to the ebuild.
Although, putting app-accessibility/at-spi2-atk in package.provided might provide the same result without the need to modify the ebuild at all.
I'll check it out later.
Edit to add: Thanks to charles17 question I thought of a much easier way (less changes needed), add file to package provided and drop patch in /etc/portage/patches. |
Thanks for the solution. The patch applies and everything works.
emerge -1avt x11-libs/gtk+:3::gentoo: | These are the packages that would be merged, in reverse order:
Calculating dependencies... done!
[ebuild R ] x11-libs/gtk+-3.24.10:3::gentoo USE="X cups (-aqua) -broadway -cloudprint -colord -examples -gtk-doc -introspection -test -vim-syntax -wayland -xinerama" ABI_X86="(64) -32 (-x32)" 0 KiB
Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Would you like to merge these packages? [Yes/No]
>>> Verifying ebuild manifests
>>> Emerging (1 of 1) x11-libs/gtk+-3.24.10::gentoo
* gtk+-3.24.10.tar.xz BLAKE2B SHA512 size ;-) ... [ ok ]
>>> Unpacking source...
>>> Unpacking gtk+-3.24.10.tar.xz to /var/tmp/portage/x11-libs/gtk+-3.24.10/work
>>> Source unpacked in /var/tmp/portage/x11-libs/gtk+-3.24.10/work
>>> Preparing source in /var/tmp/portage/x11-libs/gtk+-3.24.10/work/gtk+-3.24.10 ...
* Applying gtk+-3.24.8-update-icon-cache.patch ... [ ok ]
* Applying gtk+-3.22.20-libcloudproviders-automagic.patch ... [ ok ]
* Applying atk-bridge-removal.patch ... [ ok ]
* User patches applied.
|
|
|
Back to top |
|
 |
xanderal Tux's lil' helper


Joined: 06 Mar 2019 Posts: 129 Location: Germany
|
Posted: Mon Oct 28, 2019 10:53 pm Post subject: |
|
|
What do you guys think about this forum topic? It was referenced in the package.provided wiki entry.
When I first read about package.provided I kinda thought the same thing Genone wrote in the above topic: Genone wrote: | Also "pretending" that a package is installed while it is not can cause [...] runtime errors. |
|
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5097 Location: Dallas area
|
Posted: Mon Oct 28, 2019 11:04 pm Post subject: |
|
|
One should never indiscriminately use package.provided.
You have to be aware of why you are putting an entry there and the ramifications of it.
In the case of at-spi2-atk and gtk:3 with the patch there is no problem.
Because if you are using at-spi2-atk for some other package, then you wouldn't use the patch or entry in package.provided, there wouldn't be a need to.
Putting something like gcc in package.provided would produce interesting results. I can think of a few packages that would be foolish to put there.
It all boils down to understanding what you're doing, why you're doing it, and the consequences (positive and negative) _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW |
|
Back to top |
|
 |
charles17 Advocate

Joined: 02 Mar 2008 Posts: 3631
|
Posted: Fri Aug 28, 2020 8:12 am Post subject: Re: Remove the need for dbus when compiling gtk+:3 |
|
|
Anon-E-moose wrote: | edit /etc/portage/profile/package.provided and add app-accessibility/at-spi2-atk-2.5.3
Note: if newer ebuilds require a version greater than 2.5.3 then that needs to be added.
mkdir /etc/portage/patches/x11-libs/gtk+:3 (you can specify version if you desire, but I've found the patch has worked well going back to 3.19)
copy following patch to the directory (call it what you want, a good name would be at-sp2-atk-removal.patch or atk-bridge-removal.patch)
emerge and enjoy your gtk:+3 without dbus being needed.
Code: | ## Remove gtk3-atk-bridge support to avoid unwanted dbus dependency.
--- 1/configure.ac.orig 2018-10-22 09:23:08.542046885 -0500
+++ 2/configure.ac 2018-10-22 09:37:03.335514971 -0500
@@ -1390,14 +1390,10 @@
########################################
-# Check for Accessibility Toolkit flags
+# Removed the at-spi (atk-bridge) support
########################################
-if test x$enable_x11_backend = xyes; then
- ATK_PACKAGES="atk atk-bridge-2.0"
-else
- ATK_PACKAGES="atk"
-fi
+ATK_PACKAGES="atk"
PKG_CHECK_MODULES(ATK, $ATK_PACKAGES)
## Remove gtk3-atk-bridge support to avoid unwanted dbus dependency.
--- 1/gtk/a11y/gtkaccessibility.c.orig 2018-10-22 09:23:50.806564701 -0500
+++ 2/gtk/a11y/gtkaccessibility.c 2018-10-22 09:33:39.019965471 -0500
@@ -37,10 +37,6 @@
#include <gtk/gtktogglebutton.h>
#include <gtk/gtkaccessible.h>
-#ifdef GDK_WINDOWING_X11
-#include <atk-bridge.h>
-#endif
-
static gboolean gail_focus_watcher (GSignalInvocationHint *ihint,
guint n_param_values,
const GValue *param_values,
@@ -988,9 +984,5 @@
_gtk_accessibility_override_atk_util ();
do_window_event_initialization ();
-#ifdef GDK_WINDOWING_X11
- atk_bridge_adaptor_init (NULL, NULL);
-#endif
-
atk_misc_instance = g_object_new (GTK_TYPE_MISC_IMPL, NULL);
}
|
|
Could you send that patch upstream like you did with topic 1101168?
Then, if upstream accepts, Gentoo devs could add th dbus USE flag. |
|
Back to top |
|
 |
Anon-E-moose Watchman


Joined: 23 May 2008 Posts: 5097 Location: Dallas area
|
Posted: Fri Aug 28, 2020 9:25 am Post subject: |
|
|
I think it unlikely that upstream gtk will accept the patch, as the patch was originally in an early version of gtk3, and they removed it the next minor bump.
But I'll see what I can do.
Edit to add: mv runs an overlay with the patches applied for gtk3 (mv-overlay)
ETA2: I was just looking at the bug report that I started a couple of years ago https://bugs.gentoo.org/669234
while it's highly unlikely that I could get upstream gtk devs to add the patch back it might be possible to push for it in gentoo itself, although it would require testing and proving that it doesn't cripple those people who do choose to install the bridge and might require someone to be the maintainer of said patch.
And even the gentoo devs misunderstood the removal of atk vs at-spi2-atk, the patch does not remove the use of atk, just the bridge part which pulls in dbus itself, so the underlying disability code is still there and working just the dbus/notification stuff is missing, and unless you're using gnome or gnome derivative, you won't care. _________________ PRIME x570-pro, 3700x, RX 550 - 5.8 zen kernel
Acer E5-575 (laptop), i3-7100u - i965 - 5.5 zen kernel
---both---
gcc 9.3.0, profile 17.1 (no-pie) amd64-no-multilib, eudev, openrc, openbox
The New OTW |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|