Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: xfce-base/xfce4-session/, xfce-base/xfce4-session/files/
Date: Wed, 10 Jan 2018 09:03:05
Message-Id: 1515574969.b3ce9a81ab6ed752bfd0a5eeee0dd3daf9b920e0.mgorny@gentoo
1 commit: b3ce9a81ab6ed752bfd0a5eeee0dd3daf9b920e0
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 10 09:01:51 2018 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 10 09:02:49 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b3ce9a81
7
8 xfce-base/xfce4-session: Backport autostart dialog segv fix
9
10 Closes: https://bugs.gentoo.org/628324
11
12 ...e4-session-4.13.0-add-edit-autostart-segv.patch | 57 ++++++++++++++++
13 .../xfce4-session/xfce4-session-4.13.0-r1.ebuild | 78 ++++++++++++++++++++++
14 2 files changed, 135 insertions(+)
15
16 diff --git a/xfce-base/xfce4-session/files/xfce4-session-4.13.0-add-edit-autostart-segv.patch b/xfce-base/xfce4-session/files/xfce4-session-4.13.0-add-edit-autostart-segv.patch
17 new file mode 100644
18 index 00000000000..ff5b805d322
19 --- /dev/null
20 +++ b/xfce-base/xfce4-session/files/xfce4-session-4.13.0-add-edit-autostart-segv.patch
21 @@ -0,0 +1,57 @@
22 +From 193b09a9c159d1d16ad69e4298f48c2b531e9392 Mon Sep 17 00:00:00 2001
23 +From: Eric Koegel <eric.koegel@×××××.com>
24 +Date: Mon, 1 May 2017 06:55:05 +0300
25 +Subject: Add/Edit Application Autostart Entries (Bug #13271)
26 +
27 +With xfce4-session built from git (after the gtk3
28 +migration work), trying to add or edit an application
29 +autostart entry results in a segmentation fault after a
30 +"(xfce4-session-settings:9094): Gtk-CRITICAL **:
31 +gtk_entry_get_text: assertion 'GTK_IS_ENTRY (entry)'
32 +failed" message.
33 +
34 +It appears that when the "notify::text" signal callbacks
35 +for the "command_entry" and "name_entry" GtkEntry objects
36 +are created, they are called immediately, before the second
37 +GtkEntry object is created resulting in a failure in the
38 +xfae_dialog_update() function to properly process the objects.
39 +Thanks to ToZ for reporting and providing the fix.
40 +---
41 + settings/xfae-dialog.c | 11 +++++++----
42 + 1 file changed, 7 insertions(+), 4 deletions(-)
43 +
44 +diff --git a/settings/xfae-dialog.c b/settings/xfae-dialog.c
45 +index af860b9..7442634 100644
46 +--- a/settings/xfae-dialog.c
47 ++++ b/settings/xfae-dialog.c
48 +@@ -98,8 +98,7 @@ xfae_dialog_init (XfaeDialog *dialog)
49 + dialog->name_entry = g_object_new (GTK_TYPE_ENTRY,
50 + "activates-default", TRUE,
51 + NULL);
52 +- g_signal_connect_swapped (G_OBJECT (dialog->name_entry), "notify::text",
53 +- G_CALLBACK (xfae_dialog_update), dialog);
54 ++
55 + gtk_grid_attach (GTK_GRID (grid), dialog->name_entry, 1, 0, 1, 1);
56 + gtk_widget_show (dialog->name_entry);
57 +
58 +@@ -132,11 +131,15 @@ xfae_dialog_init (XfaeDialog *dialog)
59 + dialog->command_entry = g_object_new (GTK_TYPE_ENTRY,
60 + "activates-default", TRUE,
61 + NULL);
62 +- g_signal_connect_swapped (G_OBJECT (dialog->command_entry), "notify::text",
63 +- G_CALLBACK (xfae_dialog_update), dialog);
64 ++
65 + gtk_box_pack_start (GTK_BOX (hbox), dialog->command_entry, TRUE, TRUE, 0);
66 + gtk_widget_show (dialog->command_entry);
67 +
68 ++ g_signal_connect_swapped (G_OBJECT (dialog->name_entry), "notify::text",
69 ++ G_CALLBACK (xfae_dialog_update), dialog);
70 ++ g_signal_connect_swapped (G_OBJECT (dialog->command_entry), "notify::text",
71 ++ G_CALLBACK (xfae_dialog_update), dialog);
72 ++
73 + button = g_object_new (GTK_TYPE_BUTTON,
74 + "can-default", FALSE,
75 + NULL);
76 +--
77 +cgit v1.1
78 +
79
80 diff --git a/xfce-base/xfce4-session/xfce4-session-4.13.0-r1.ebuild b/xfce-base/xfce4-session/xfce4-session-4.13.0-r1.ebuild
81 new file mode 100644
82 index 00000000000..2d045a1e7c0
83 --- /dev/null
84 +++ b/xfce-base/xfce4-session/xfce4-session-4.13.0-r1.ebuild
85 @@ -0,0 +1,78 @@
86 +# Copyright 1999-2018 Gentoo Foundation
87 +# Distributed under the terms of the GNU General Public License v2
88 +
89 +EAPI=6
90 +
91 +inherit gnome2-utils
92 +
93 +DESCRIPTION="A session manager for the Xfce desktop environment"
94 +HOMEPAGE="https://docs.xfce.org/xfce/xfce4-session/start"
95 +SRC_URI="mirror://xfce/src/xfce/${PN}/${PV%.*}/${P}.tar.bz2"
96 +
97 +LICENSE="GPL-2"
98 +SLOT="0"
99 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~amd64-linux ~x86-linux ~x86-solaris"
100 +IUSE="nls policykit systemd +xscreensaver"
101 +
102 +COMMON_DEPEND="x11-apps/iceauth
103 + x11-libs/gtk+:3=
104 + x11-libs/libSM:=
105 + x11-libs/libwnck:3=
106 + x11-libs/libX11:=
107 + >=xfce-base/libxfce4util-4.12:=
108 + >=xfce-base/libxfce4ui-4.12.1:=[gtk3(+)]
109 + >=xfce-base/xfconf-4.12:=
110 + policykit? ( >=sys-auth/polkit-0.102:= )"
111 +RDEPEND="${COMMON_DEPEND}
112 + x11-apps/xrdb
113 + nls? ( x11-misc/xdg-user-dirs )
114 + xscreensaver? ( || (
115 + >=x11-misc/xscreensaver-5.26
116 + x11-misc/light-locker
117 + >=x11-misc/xlockmore-5.43
118 + x11-misc/slock
119 + x11-misc/alock[pam]
120 + ) )"
121 +DEPEND="${COMMON_DEPEND}
122 + dev-util/intltool
123 + sys-devel/gettext
124 + virtual/pkgconfig"
125 +
126 +REQUIRED_USE="systemd? ( policykit )"
127 +
128 +PATCHES=(
129 + "${FILESDIR}"/${PN}-4.10.1-alock_support_to_xflock4.patch
130 +# TODO: this patch needs updating for the new version, and finding
131 +# upstream bug.
132 +# "${FILESDIR}"/${PN}-4.12.1-light-locker_support_to_xflock4.patch
133 +
134 + "${FILESDIR}"/${P}-add-edit-autostart-segv.patch
135 +)
136 +
137 +src_configure() {
138 + local myconf=(
139 + $(use_enable policykit polkit)
140 + --with-xsession-prefix="${EPREFIX}"/usr
141 + )
142 +
143 + econf "${myconf[@]}"
144 +}
145 +
146 +src_install() {
147 + default
148 + find "${ED}" -name '*.la' -delete || die
149 +
150 + local sessiondir=/etc/X11/Sessions
151 + echo startxfce4 > "${T}"/Xfce4 || die
152 + exeinto ${sessiondir}
153 + doexe "${T}"/Xfce4
154 + dosym Xfce4 ${sessiondir}/Xfce
155 +}
156 +
157 +pkg_postinst() {
158 + gnome2_icon_cache_update
159 +}
160 +
161 +pkg_postrm() {
162 + gnome2_icon_cache_update
163 +}