1 |
commit: 03f83461cb459de29dae1ee9f8f37aff480b872b |
2 |
Author: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 3 16:12:51 2017 +0000 |
4 |
Commit: Gilles Dartiguelongue <eva <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 3 16:15:32 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=03f83461 |
7 |
|
8 |
x11-libs/libgksu: fix build with format-security, bug #517614 |
9 |
|
10 |
Bump to EAPI=6. Fix .desktop file validation, bug #512364. Apply select Debian patches. |
11 |
|
12 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=512364 |
13 |
Closes: https://bugs.gentoo.org/show_bug.cgi?id=517614 |
14 |
|
15 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
16 |
|
17 |
.../libgksu-2.0.12-correct_colormap_get.patch | 12 ++++ |
18 |
.../files/libgksu-2.0.12-desktop-validation.patch | 16 +++++ |
19 |
.../files/libgksu-2.0.12-fix-make-3.82.patch | 6 +- |
20 |
.../files/libgksu-2.0.12-format_security.patch | 28 ++++++++ |
21 |
...u-2.0.12-g_markup_escape_text_for_command.patch | 21 ++++++ |
22 |
.../files/libgksu-2.0.12-missing-libs.patch | 22 ++++++ |
23 |
.../files/libgksu-2.0.12-sudo_keep_env.patch | 15 ++++ |
24 |
x11-libs/libgksu/libgksu-2.0.12-r3.ebuild | 81 ++++++++++++++++++++++ |
25 |
8 files changed, 199 insertions(+), 2 deletions(-) |
26 |
|
27 |
diff --git a/x11-libs/libgksu/files/libgksu-2.0.12-correct_colormap_get.patch b/x11-libs/libgksu/files/libgksu-2.0.12-correct_colormap_get.patch |
28 |
new file mode 100644 |
29 |
index 00000000000..5c34cae5613 |
30 |
--- /dev/null |
31 |
+++ b/x11-libs/libgksu/files/libgksu-2.0.12-correct_colormap_get.patch |
32 |
@@ -0,0 +1,12 @@ |
33 |
+=== modified file 'libgksu/libgksu.c' |
34 |
+--- a/libgksu/libgksu.c |
35 |
++++ b/libgksu/libgksu.c |
36 |
+@@ -426,7 +426,7 @@ |
37 |
+ attr.height = fadeout->area.height; |
38 |
+ attr.wclass = GDK_INPUT_OUTPUT; |
39 |
+ attr.visual = gdk_screen_get_system_visual (fadeout->screen); |
40 |
+- attr.colormap = gdk_screen_get_default_colormap (fadeout->screen); |
41 |
++ attr.colormap = gdk_screen_get_system_colormap (fadeout->screen); |
42 |
+ attr.override_redirect = TRUE; |
43 |
+ attr_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP | GDK_WA_NOREDIR; |
44 |
+ |
45 |
|
46 |
diff --git a/x11-libs/libgksu/files/libgksu-2.0.12-desktop-validation.patch b/x11-libs/libgksu/files/libgksu-2.0.12-desktop-validation.patch |
47 |
new file mode 100644 |
48 |
index 00000000000..15de910474b |
49 |
--- /dev/null |
50 |
+++ b/x11-libs/libgksu/files/libgksu-2.0.12-desktop-validation.patch |
51 |
@@ -0,0 +1,16 @@ |
52 |
+Fix validation |
53 |
+ |
54 |
+--- a/gksu-properties/gksu-properties.desktop.in 2017-09-03 16:41:57.872594752 +0200 |
55 |
++++ b/gksu-properties/gksu-properties.desktop.in 2017-09-03 16:44:40.835919489 +0200 |
56 |
+@@ -3,9 +3,9 @@ |
57 |
+ _Name=Privilege granting |
58 |
+ _Comment=Configure behavior of the privilege-granting tool |
59 |
+ Exec=gksu-properties |
60 |
+-Icon=gksu.png |
61 |
++Icon=gksu |
62 |
+ StartupNotify=true |
63 |
+ Terminal=false |
64 |
+ Type=Application |
65 |
+-Categories=GNOME;GTK;Application;Settings;AdvancedSettings; |
66 |
++Categories=GNOME;GTK;Settings; |
67 |
+ OnlyShowIn=GNOME;XFCE; |
68 |
|
69 |
diff --git a/x11-libs/libgksu/files/libgksu-2.0.12-fix-make-3.82.patch b/x11-libs/libgksu/files/libgksu-2.0.12-fix-make-3.82.patch |
70 |
index 0a7c5f14289..05ff3e0b0ad 100644 |
71 |
--- a/x11-libs/libgksu/files/libgksu-2.0.12-fix-make-3.82.patch |
72 |
+++ b/x11-libs/libgksu/files/libgksu-2.0.12-fix-make-3.82.patch |
73 |
@@ -1,5 +1,7 @@ |
74 |
---- Makefile.am-orig 2010-08-22 16:11:19.872577459 -0500 |
75 |
-+++ Makefile.am 2010-08-22 16:11:55.289599110 -0500 |
76 |
+Fix indentation of Makefile.am |
77 |
+ |
78 |
+--- a/Makefile.am 2010-08-22 16:11:19.872577459 -0500 |
79 |
++++ b/Makefile.am 2010-08-22 16:11:55.289599110 -0500 |
80 |
@@ -17,11 +17,11 @@ |
81 |
|
82 |
if GCONF_SCHEMAS_INSTALL |
83 |
|
84 |
diff --git a/x11-libs/libgksu/files/libgksu-2.0.12-format_security.patch b/x11-libs/libgksu/files/libgksu-2.0.12-format_security.patch |
85 |
new file mode 100644 |
86 |
index 00000000000..d39bbafd67a |
87 |
--- /dev/null |
88 |
+++ b/x11-libs/libgksu/files/libgksu-2.0.12-format_security.patch |
89 |
@@ -0,0 +1,28 @@ |
90 |
+Description: Fix build failure with [-Werror=format-security] |
91 |
+Author: Michael Biebl <biebl@××××××.org> |
92 |
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=643423 |
93 |
+ |
94 |
+Let chunk stripped due to Gentoo revert-forkpty patch. |
95 |
+ |
96 |
+Index: libgksu-2.0.13~pre1/libgksu/libgksu.c |
97 |
+=================================================================== |
98 |
+--- libgksu-2.0.13~pre1.orig/libgksu/libgksu.c 2011-12-07 11:01:18.351654566 +0100 |
99 |
++++ libgksu-2.0.13~pre1/libgksu/libgksu.c 2011-12-07 11:01:41.231654725 +0100 |
100 |
+@@ -1276,7 +1276,7 @@ |
101 |
+ context->dir = g_strdup (mkdtemp(template)); |
102 |
+ if (!context->dir) |
103 |
+ { |
104 |
+- fprintf (stderr, strerror(errno)); |
105 |
++ fprintf (stderr, "%s", strerror(errno)); |
106 |
+ return FALSE; |
107 |
+ } |
108 |
+ |
109 |
+@@ -2247,7 +2247,7 @@ |
110 |
+ " %s"), converted_str, "gksu: waiting"); |
111 |
+ g_free (converted_str); |
112 |
+ |
113 |
+- g_set_error (error, gksu_quark, GKSU_ERROR_HELPER, emsg); |
114 |
++ g_set_error_literal (error, gksu_quark, GKSU_ERROR_HELPER, emsg); |
115 |
+ g_free (emsg); |
116 |
+ |
117 |
+ if (context->debug) |
118 |
|
119 |
diff --git a/x11-libs/libgksu/files/libgksu-2.0.12-g_markup_escape_text_for_command.patch b/x11-libs/libgksu/files/libgksu-2.0.12-g_markup_escape_text_for_command.patch |
120 |
new file mode 100644 |
121 |
index 00000000000..de3ab6806ee |
122 |
--- /dev/null |
123 |
+++ b/x11-libs/libgksu/files/libgksu-2.0.12-g_markup_escape_text_for_command.patch |
124 |
@@ -0,0 +1,21 @@ |
125 |
+Escape text for display in password prompt. |
126 |
+ |
127 |
+From the Debian patch stack. |
128 |
+ |
129 |
+--- a/libgksu/libgksu.c |
130 |
++++ b/libgksu/libgksu.c |
131 |
+@@ -994,12 +994,12 @@ |
132 |
+ "The application '%s' lets you " |
133 |
+ "modify essential parts of your " |
134 |
+ "system."), |
135 |
+- command); |
136 |
++ g_markup_escape_text(command, -1)); |
137 |
+ else |
138 |
+ msg = g_strdup_printf (_("<b><big>Enter your password to run " |
139 |
+ "the application '%s' as user %s" |
140 |
+ "</big></b>"), |
141 |
+- command, context->user); |
142 |
++ g_markup_escape_text(command, -1), context->user); |
143 |
+ } |
144 |
+ else |
145 |
+ { |
146 |
|
147 |
diff --git a/x11-libs/libgksu/files/libgksu-2.0.12-missing-libs.patch b/x11-libs/libgksu/files/libgksu-2.0.12-missing-libs.patch |
148 |
new file mode 100644 |
149 |
index 00000000000..955f455b9f8 |
150 |
--- /dev/null |
151 |
+++ b/x11-libs/libgksu/files/libgksu-2.0.12-missing-libs.patch |
152 |
@@ -0,0 +1,22 @@ |
153 |
+Add missing libs to relevant targets |
154 |
+ |
155 |
+--- a/configure.ac 2017-09-03 17:10:57.552216900 +0200 |
156 |
++++ b/configure.ac 2017-09-03 17:16:39.674036975 +0200 |
157 |
+@@ -4,7 +4,7 @@ |
158 |
+ AC_PREREQ(2.57) |
159 |
+ |
160 |
+ AC_INIT(libgksu, 2.0.12, kov@××××××.org) |
161 |
+-AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) |
162 |
++AM_INIT_AUTOMAKE([foreign]) |
163 |
+ AC_CONFIG_SRCDIR(libgksu/libgksu.c) |
164 |
+ AC_CONFIG_HEADERS(config.h) |
165 |
+ |
166 |
+@@ -44,7 +44,7 @@ |
167 |
+ PKG_CHECK_MODULES(GKSU_PROPERTIES, [gtk+-2.0 >= 2.12, gconf-2.0]) |
168 |
+ |
169 |
+ PKG_CHECK_MODULES(GLIB, [glib-2.0 gthread-2.0]) |
170 |
+-PKG_CHECK_MODULES(GTK, [gtk+-2.0 gconf-2.0]) |
171 |
++PKG_CHECK_MODULES(GTK, [gtk+-2.0 gconf-2.0 x11]) |
172 |
+ |
173 |
+ # Checks for library functions. |
174 |
+ ALL_LINGUAS="ca cs da de es eu fr hu it ko lt pl pt_BR ro ru sk sv nb nl th zh_CN" |
175 |
|
176 |
diff --git a/x11-libs/libgksu/files/libgksu-2.0.12-sudo_keep_env.patch b/x11-libs/libgksu/files/libgksu-2.0.12-sudo_keep_env.patch |
177 |
new file mode 100644 |
178 |
index 00000000000..a51a1623deb |
179 |
--- /dev/null |
180 |
+++ b/x11-libs/libgksu/files/libgksu-2.0.12-sudo_keep_env.patch |
181 |
@@ -0,0 +1,15 @@ |
182 |
+--- a/libgksu/libgksu.c |
183 |
++++ b/libgksu/libgksu.c |
184 |
+@@ -2704,6 +2704,12 @@ |
185 |
+ cmd[argcount] = g_strdup("-H"); |
186 |
+ argcount++; |
187 |
+ } |
188 |
++ else |
189 |
++ { |
190 |
++ /* Preserve the environment, if sudo will let us */ |
191 |
++ cmd[argcount] = g_strdup("-E"); |
192 |
++ argcount++; |
193 |
++ } |
194 |
+ |
195 |
+ /* Make sudo read from stdin */ |
196 |
+ cmd[argcount] = g_strdup("-S"); |
197 |
|
198 |
diff --git a/x11-libs/libgksu/libgksu-2.0.12-r3.ebuild b/x11-libs/libgksu/libgksu-2.0.12-r3.ebuild |
199 |
new file mode 100644 |
200 |
index 00000000000..0568909e0b6 |
201 |
--- /dev/null |
202 |
+++ b/x11-libs/libgksu/libgksu-2.0.12-r3.ebuild |
203 |
@@ -0,0 +1,81 @@ |
204 |
+# Copyright 1999-2017 Gentoo Foundation |
205 |
+# Distributed under the terms of the GNU General Public License v2 |
206 |
+ |
207 |
+EAPI=6 |
208 |
+GNOME2_EAUTORECONF="yes" |
209 |
+ |
210 |
+inherit gnome2 |
211 |
+ |
212 |
+DESCRIPTION="A library for integration of su into applications" |
213 |
+HOMEPAGE="http://www.nongnu.org/gksu/" |
214 |
+SRC_URI="https://people.debian.org/~kov/gksu/${P}.tar.gz" |
215 |
+ |
216 |
+LICENSE="LGPL-2" |
217 |
+SLOT="2" |
218 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~x86-fbsd" |
219 |
+IUSE="nls static-libs" |
220 |
+ |
221 |
+COMMON_DEPEND=" |
222 |
+ >=x11-libs/gtk+-2.12:2 |
223 |
+ x11-libs/libX11 |
224 |
+ >=gnome-base/gconf-2 |
225 |
+ gnome-base/libgnome-keyring |
226 |
+ x11-libs/startup-notification |
227 |
+ >=gnome-base/libgtop-2:2= |
228 |
+ nls? ( >=sys-devel/gettext-0.14.1 ) |
229 |
+" |
230 |
+DEPEND="${COMMON_DEPEND} |
231 |
+ dev-util/gtk-doc-am |
232 |
+ >=dev-util/intltool-0.35.5 |
233 |
+ virtual/pkgconfig |
234 |
+" |
235 |
+RDEPEND="${COMMON_DEPEND} |
236 |
+ app-admin/sudo |
237 |
+" |
238 |
+ |
239 |
+PATCHES=( |
240 |
+ # Fix compilation on bsd |
241 |
+ "${FILESDIR}"/${PN}-2.0.0-fbsd.patch |
242 |
+ |
243 |
+ # Fix wrong usage of LDFLAGS, bug #226837 |
244 |
+ "${FILESDIR}"/${PN}-2.0.7-libs.patch |
245 |
+ |
246 |
+ # Use po/LINGUAS |
247 |
+ "${FILESDIR}"/${PN}-2.0.7-polinguas.patch |
248 |
+ |
249 |
+ # Don't forkpty; bug #298289 |
250 |
+ "${FILESDIR}"/${P}-revert-forkpty.patch |
251 |
+ |
252 |
+ # Make this gmake-3.82 compliant, bug #333961 |
253 |
+ "${FILESDIR}"/${P}-fix-make-3.82.patch |
254 |
+ |
255 |
+ # Do not build test programs that are never executed; also fixes bug |
256 |
+ # #367397 (underlinking issues). |
257 |
+ "${FILESDIR}"/${P}-notests.patch |
258 |
+ |
259 |
+ # Fix automake-1.11.2 compatibility, bug #397411 |
260 |
+ "${FILESDIR}"/${P}-automake-1.11.2.patch |
261 |
+ "${FILESDIR}"/${P}-missing-libs.patch |
262 |
+ |
263 |
+ # Fix build with format-security, bug #517614 |
264 |
+ "${FILESDIR}"/${P}-format_security.patch |
265 |
+ |
266 |
+ # Fix .desktop file validation, bug #512364 |
267 |
+ "${FILESDIR}"/${P}-desktop-validation.patch |
268 |
+ |
269 |
+ # Collection of patches from Debian |
270 |
+ "${FILESDIR}"/${P}-g_markup_escape_text_for_command.patch |
271 |
+ "${FILESDIR}"/${P}-sudo_keep_env.patch |
272 |
+ "${FILESDIR}"/${P}-correct_colormap_get.patch |
273 |
+) |
274 |
+ |
275 |
+src_prepare() { |
276 |
+ sed -i -e 's:AM_CONFIG_HEADER:AC_CONFIG_HEADERS:' configure.ac || die #467026 |
277 |
+ gnome2_src_prepare |
278 |
+} |
279 |
+ |
280 |
+src_configure() { |
281 |
+ gnome2_src_configure \ |
282 |
+ $(use_enable nls) \ |
283 |
+ $(use_enable static-libs static) |
284 |
+} |