Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] patching gtk+-3 to get rid of dbus
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
xanderal
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2019
Posts: 129
Location: Germany

PostPosted: Mon Oct 21, 2019 6:59 pm    Post subject: [SOLVED] patching gtk+-3 to get rid of dbus Reply with quote

I'm splitting this from Why static /dev (old fashioned gentoo)? because it is a bit off-topic but might be interesting to someone else.

xanderal wrote:
spork_kitty wrote:
some systems are able to divorce dbus, though it takes effort and nu Linux people have gotten creative with their dependency chain. (GTK+ requires accessibility support, which is what hooks into dbus, meaning you cannot have GTK+ applications without dbus)
No kidding! This thing is really putting up a fight :evil:
I have managed to rip out almost everything that's pulling in dbus - last remaining thing is app-accessibility/at-spi2-atk which gets pulled in by x11-libs/gtk+-3.24.10 which in turn gets pulled in by
Code:
app-text/ghostscript-gpl-9.26 requires x11-libs/gtk+:3
app-text/zathura-0.4.3 requires >=x11-libs/gtk+-3.22:3
dev-libs/girara-0.3.2 requires >=x11-libs/gtk+-3.20:3
dev-libs/libpeas-1.22.0 requires >=x11-libs/gtk+-3:3[introspection]
mail-client/thunderbird-60.9.0 requires >=x11-libs/gtk+-3.4.0:3
media-plugins/gst-plugins-gtk-1.14.4 requires >=x11-libs/gtk+-3.15:3[abi_x86_64(-)], >=x11-libs/gtk+-3.15:3[X,abi_x86_64(-)]
media-sound/rhythmbox-3.4.3 requires >=x11-libs/gtk+-3.20.0:3[X,introspection]
www-client/firefox-68.1.0 requires >=x11-libs/gtk+-3.4.0:3[X]
x11-misc/redshift-1.12 requires x11-libs/gtk+:3[introspection]
x11-themes/adwaita-icon-theme-3.30.1 requires x11-libs/gtk+:3
So I went ahead with
Anon-E-moose wrote:
spork_kitty wrote:
Anon-E-moose wrote:
Note: There is a patch to keep accessibility bridge out of gtk+3 which drops the need for dbus, just because you're running gtk.
Awesome! Do you have a link? GTK is one of the last hold-outs of dbus on my machine and I intend to either zap it or patch it.
I don't know where I originally posted it but here's a current download http://dpaste.com/028P0T5 (haven't tested it since gtk+-3.24.8 ) but it should work.
I put it in /etc/portage/patches/x11-libs/gtk+:3
and put in in /etc/portage/patches/x11-libs/gtk+:3/removeaccessibilitybridge.patch, then following this guide I did
Code:
cd /usr/portage/x11-libs/gtk+
ebuild gtk+-3.24.10.ebuild clean prepare
which resulted in
Code:
 * gtk+-3.24.10.tar.xz BLAKE2B SHA512 size ;-) ...                                                [ ok ]
 * checking ebuild checksums ;-) ...                                                              [ ok ]
 * checking auxfile checksums ;-) ...                                                             [ ok ]
 * checking miscfile checksums ;-) ...                                                            [ 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 removeaccessibilitybridge.patch ...
patch unexpectedly ends in middle of line                                                         [ ok ]
 * User patches applied.
 * Disabling deprecation warnings ...                                                             [ ok ]
 * Running eautoreconf in '/var/tmp/portage/x11-libs/gtk+-3.24.10/work/gtk+-3.24.10' ...
 * Running autopoint --force ...                                                                  [ ok ]
 * Skipping 'gtkdocize --copy' due gtkdocize not installed
 * Running libtoolize --install --copy --force --automake ...                                     [ ok ]
 * Running aclocal -I m4 ...                                                                      [ ok ]
 * Running autoconf --force ...                                                                   [ ok ]
 * Running autoheader ...                                                                         [ ok ]
 * Running automake --add-missing --copy --force-missing ...                                      [ ok ]
 * Running elibtoolize in: gtk+-3.24.10/
 * Running elibtoolize in: gtk+-3.24.10/build-aux/
 *   Applying portage/1.2.0 patch ...
 *   Applying sed/1.5.6 patch ...
 *   Applying as-needed/2.4.3 patch ...
>>> Source prepared.
But after emerge -av1 gtk+ there is still that dependency and when reading /usr/portage/x11-libs/gtk+/gtk+-3.24.10.ebuild it still lists the dependency (although I don't know if that would have changed if applying the patch had worked...).
How did
Code:
 * Applying removeaccessibilitybridge.patch ...
patch unexpectedly ends in middle of line                                                         [ ok ]
happen?
Did I miss something/do something wrong? What can I try?

sorry for getting a bit off-topic here myself but I didn't think this warranted a new thread...

Anon-E-moose wrote:
xanderal wrote:
Anon-E-moose wrote:
Sorry, I forgot, copy the ebuild to your local repo and remove the dbus dependency. :oops:

Then do ebuild <ebuild name> digest to create a new digest
Ok, that goes a bit over my head right now, sry. Could you explain that?


I'm busy right this minute, but later I'll make a diff for the ebuild and list the changes. (I'll check it out on my end to make sure it works)

Thanks, I created a local repo now and added the ebuild to it. But emerging it gives me build failure:
Code:
 * Package:    x11-libs/gtk+-3.24.10
 * Repository: localrepo
 * USE:        X abi_x86_64 amd64 elibc_glibc introspection kernel_linux userland_GNU
 * FEATURES:   network-sandbox preserve-libs sandbox userpriv usersandbox
 * Applying gtk+-3.24.8-update-icon-cache.patch ...
 * ERROR: x11-libs/gtk+-3.24.10::localrepo failed (prepare phase):
 *   patch -p1  failed with /var/tmp/portage/x11-libs/gtk+-3.24.10/files/gtk+-3.24.8-update-icon-cache.patch
 *
 * Call stack:
 *               ebuild.sh, line  125:  Called src_prepare
 *             environment, line 3987:  Called eapply '/var/tmp/portage/x11-libs/gtk+-3.24.10/files/gtk+-3.24.8-update-icon-cache.patch'
 *             environment, line 1132:  Called _eapply_patch '/var/tmp/portage/x11-libs/gtk+-3.24.10/files/gtk+-3.24.8-update-icon-cache.patch'
 *             environment, line 1070:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/x11-libs/gtk+-3.24.10/files/gtk+-3.24.8-update-icon-cache.patch'
 *   isolated-functions.sh, line  112:  Called die
 * The specific snippet of code:
 *         die "$@"
 *
 * If you need support, post the output of `emerge --info '=x11-libs/gtk+-3.24.10::localrepo'`,
 * the complete build log and the output of `emerge -pqv '=x11-libs/gtk+-3.24.10::localrepo'`.
 * The complete build log is located at '/var/tmp/portage/x11-libs/gtk+-3.24.10/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/x11-libs/gtk+-3.24.10/temp/environment'.
 * Working directory: '/var/tmp/portage/x11-libs/gtk+-3.24.10/work/gtk+-3.24.10'
 * S: '/var/tmp/portage/x11-libs/gtk+-3.24.10/work/gtk+-3.24.10'


Last edited by xanderal on Sun Oct 27, 2019 11:02 pm; edited 2 times in total
Back to top
View user's profile Send private message
fedeliallalinea
Bodhisattva
Bodhisattva


Joined: 08 Mar 2003
Posts: 23496
Location: here

PostPosted: Mon Oct 21, 2019 7:09 pm    Post subject: Reply with quote

You forget to copy also files directory (where the patch are located for ebuild) in you local overlay
_________________
Questions are guaranteed in life; Answers aren't.
Back to top
View user's profile Send private message
xanderal
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2019
Posts: 129
Location: Germany

PostPosted: Mon Oct 21, 2019 7:14 pm    Post subject: Reply with quote

fedeliallalinea wrote:
You forget to copy also files directory (where the patch are located for ebuild) in you local overlay
Of course :oops: that was stupid...
It compiles now, thank you.
EDIT to add: This might not have been very elegant but I just removed the two lines referencing atk from the gtk+-3 ebuild, rebuild and depcleaned dbus. What's weird is this:
Code:
app-text/docbook-xml-dtd
    selected: 4.4-r3
   protected: none
     omitted: 4.1.2-r7 4.2-r3 4.3-r2 4.5-r2
Is there a good reason to have that many versions of this installed?
Ok back to the original patch: How would I have done this elegantly and sustainably? Or how do I do it now?
Back to top
View user's profile Send private message
Anon-E-moose
Advocate
Advocate


Joined: 23 May 2008
Posts: 4398
Location: Dallas area

PostPosted: Mon Oct 21, 2019 8:53 pm    Post subject: Reply with quote

Whoever split it off, Thanks.

Ok xanderal, I see you figured it out.


Note: I don't remove the need for atk, it's sprinkled all throughout the code, so I leave it alone, but it doesn't use dbus, so no harm.

I'm making a separate thread in Documentation, Tips & Tricks https://forums.gentoo.org/viewtopic-t-1103236.html
_________________
Asus m5a99fx, FX 8320 - nouveau, oss4, rx550 for qemu passthrough
Acer laptop E5-575, i3-7100u - i965, alsa
---both---
5.0.13 zen kernel, profile 17.1 (no-pie & modified) amd64-no-multilib
gcc 8.2.0, eudev, openrc, openbox, palemoon
Back to top
View user's profile Send private message
xanderal
Tux's lil' helper
Tux's lil' helper


Joined: 06 Mar 2019
Posts: 129
Location: Germany

PostPosted: Sun Oct 27, 2019 11:01 pm    Post subject: Reply with quote

Anon-E-moose wrote:
Whoever split it off, Thanks.
:lol: That was me - but as a non-moderator I couldn't copy the posts over, therefore the quotes.
Anon-E-moose wrote:
I'm making a separate thread in Documentation, Tips & Tricks https://forums.gentoo.org/viewtopic-t-1103236.html
Great! I think that will be appreciated - and maybe even a dev will stumble over it and do something about that dependency...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
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