1 |
commit: b994f9815d7a32697fab2cc9c568a6255277d490 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Dec 8 11:36:01 2018 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 8 12:12:36 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b994f981 |
7 |
|
8 |
sys-devel/distcc: Bump to 3.3.2 |
9 |
|
10 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
11 |
|
12 |
sys-devel/distcc/Manifest | 1 + |
13 |
sys-devel/distcc/distcc-3.3.2.ebuild | 197 +++++++++++++++++++++ |
14 |
.../distcc/files/distcc-3.3.2-freedesktop.patch | 112 ++++++++++++ |
15 |
3 files changed, 310 insertions(+) |
16 |
|
17 |
diff --git a/sys-devel/distcc/Manifest b/sys-devel/distcc/Manifest |
18 |
index 1d4758855f8..5a734a064a0 100644 |
19 |
--- a/sys-devel/distcc/Manifest |
20 |
+++ b/sys-devel/distcc/Manifest |
21 |
@@ -1,2 +1,3 @@ |
22 |
DIST distcc-3.2rc1.tar.bz2 609904 BLAKE2B e6b928f3b9231524d37bdf86b39cd6a3601b6cdb1e03d913ae562286794240b4dd364d5d01da2176f9bb440809b166b4b877443459751adf8bd3ecf92ceb8476 SHA512 98b2e8423d724bbb6a615d946d170441a8e293310785f867d7a277b318c043a37b0af39ae8ed1f7a0667803de9db1d1925199bad85130cf9bd9cb347635125ee |
23 |
+DIST distcc-3.3.2.tar.gz 1008938 BLAKE2B e784002dffefd395b068d237a86203563fefc81e17a08c4d2e372eaaf62c5ac799011fc8633c8bfb717f0ebc8c8cb8b999c941e0f5f87c4077d031a9e5c4b138 SHA512 fdf11ed94ba50977b45e302179c5c4ba067cc3db37579cb8ed6d5b9487f8e3c89114f65af69333c38d374cf7634d7aef8d5a2d5c7fd8e9b1f4930c0897d6da10 |
24 |
DIST distcc-3.3.tar.gz 1171281 BLAKE2B f637cacbfdaaca6efb56e912de55fcfa49e3fffcb8f34649e339f16376250e18a20d30281a46f207992c0b300c726427a3ad5a77bd8976d2993f8f49b9b6b970 SHA512 459c175c8ac905bc70299e77ac11b6d24782bd69c9152126249c9af8fbb4c269e6f7317b02abf50cf6cc0405dd0f887e803320e19dc528a19c4c488640c615dc |
25 |
|
26 |
diff --git a/sys-devel/distcc/distcc-3.3.2.ebuild b/sys-devel/distcc/distcc-3.3.2.ebuild |
27 |
new file mode 100644 |
28 |
index 00000000000..e8c90cc81a0 |
29 |
--- /dev/null |
30 |
+++ b/sys-devel/distcc/distcc-3.3.2.ebuild |
31 |
@@ -0,0 +1,197 @@ |
32 |
+# Copyright 1999-2018 Gentoo Foundation |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=6 |
36 |
+ |
37 |
+PYTHON_COMPAT=( python3_{5,6} ) |
38 |
+ |
39 |
+inherit autotools flag-o-matic python-single-r1 systemd \ |
40 |
+ toolchain-funcs user xdg-utils prefix |
41 |
+ |
42 |
+DESCRIPTION="Distribute compilation of C code across several machines on a network" |
43 |
+HOMEPAGE="http://distcc.org/" |
44 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz" |
45 |
+ |
46 |
+LICENSE="GPL-2+" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
49 |
+IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf" |
50 |
+ |
51 |
+RESTRICT="test" |
52 |
+ |
53 |
+CDEPEND="${PYTHON_DEPS} |
54 |
+ dev-libs/popt |
55 |
+ gnome? ( |
56 |
+ >=gnome-base/libgnome-2 |
57 |
+ >=gnome-base/libgnomeui-2 |
58 |
+ x11-libs/gtk+:2 |
59 |
+ x11-libs/pango |
60 |
+ ) |
61 |
+ gssapi? ( net-libs/libgssglue ) |
62 |
+ gtk? ( x11-libs/gtk+:2 ) |
63 |
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] ) |
64 |
+" |
65 |
+DEPEND="${CDEPEND} |
66 |
+ sys-libs/binutils-libs |
67 |
+ virtual/pkgconfig" |
68 |
+RDEPEND="${CDEPEND} |
69 |
+ !net-misc/pump |
70 |
+ dev-util/shadowman |
71 |
+ >=sys-devel/gcc-config-1.4.1 |
72 |
+ selinux? ( sec-policy/selinux-distcc ) |
73 |
+ xinetd? ( sys-apps/xinetd )" |
74 |
+ |
75 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
76 |
+ |
77 |
+S="${WORKDIR}/distcc" |
78 |
+ |
79 |
+pkg_setup() { |
80 |
+ enewuser distcc 240 -1 -1 daemon |
81 |
+ python-single-r1_pkg_setup |
82 |
+} |
83 |
+ |
84 |
+src_prepare() { |
85 |
+ eapply "${FILESDIR}/${PN}-3.0-xinetd.patch" |
86 |
+ # bug #255188 |
87 |
+ eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch" |
88 |
+ # SOCKSv5 support needed for Portage, bug #537616 |
89 |
+ eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" |
90 |
+ eapply_user |
91 |
+ |
92 |
+ # Bugs #120001, #167844 and probably more. See patch for description. |
93 |
+ use hardened && eapply "${FILESDIR}/distcc-hardened.patch" |
94 |
+ |
95 |
+ sed -i \ |
96 |
+ -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ |
97 |
+ -e "s:@PYTHON@:${EPYTHON}:" \ |
98 |
+ pump.in || die "sed failed" |
99 |
+ |
100 |
+ sed \ |
101 |
+ -e "s:@EPREFIX@:${EPREFIX:-/}:" \ |
102 |
+ -e "s:@libdir@:/usr/lib:" \ |
103 |
+ "${FILESDIR}/3.2/distcc-config" > "${T}/distcc-config" || die |
104 |
+ |
105 |
+ hprefixify update-distcc-symlinks.py src/{serve,daemon}.c |
106 |
+ eautoreconf |
107 |
+} |
108 |
+ |
109 |
+src_configure() { |
110 |
+ local myconf=( |
111 |
+ --disable-Werror |
112 |
+ $(use_enable ipv6 rfc2553) |
113 |
+ $(use_with gtk) |
114 |
+ $(use_with gnome) |
115 |
+ $(use_with gssapi auth) |
116 |
+ $(use_with zeroconf avahi) |
117 |
+ ) |
118 |
+ |
119 |
+ econf "${myconf[@]}" |
120 |
+} |
121 |
+ |
122 |
+src_install() { |
123 |
+ # override GZIP_BIN to stop it from compressing manpages |
124 |
+ emake DESTDIR="${D}" GZIP_BIN=false install |
125 |
+ python_optimize |
126 |
+ |
127 |
+ newinitd "${FILESDIR}/3.2/init" distccd |
128 |
+ systemd_dounit "${FILESDIR}/distccd.service" |
129 |
+ systemd_install_serviced "${FILESDIR}/distccd.service.conf" |
130 |
+ |
131 |
+ cp "${FILESDIR}/3.2/conf" "${T}/distccd" || die |
132 |
+ if use zeroconf; then |
133 |
+ cat >> "${T}/distccd" <<-EOF || die |
134 |
+ |
135 |
+ # Enable zeroconf support in distccd |
136 |
+ DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf" |
137 |
+ EOF |
138 |
+ |
139 |
+ sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die |
140 |
+ fi |
141 |
+ doconfd "${T}/distccd" |
142 |
+ |
143 |
+ newenvd - 02distcc <<-EOF || die |
144 |
+ # This file is managed by distcc-config; use it to change these settings. |
145 |
+ # DISTCC_LOG and DISTCC_DIR should not be set. |
146 |
+ DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" |
147 |
+ DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" |
148 |
+ DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" |
149 |
+ DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" |
150 |
+ DISTCC_SSH="${DISTCC_SSH}" |
151 |
+ UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" |
152 |
+ DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" |
153 |
+ DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" |
154 |
+ EOF |
155 |
+ |
156 |
+ keepdir /usr/lib/distcc |
157 |
+ |
158 |
+ dobin "${T}/distcc-config" |
159 |
+ |
160 |
+ if use gnome || use gtk; then |
161 |
+ einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui" |
162 |
+ einfo "This is to have a little sensability in naming schemes between distccmon programs" |
163 |
+ mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die |
164 |
+ dosym distccmon-gui /usr/bin/distccmon-gnome |
165 |
+ fi |
166 |
+ |
167 |
+ if use xinetd; then |
168 |
+ insinto /etc/xinetd.d |
169 |
+ newins "doc/example/xinetd" distcc |
170 |
+ fi |
171 |
+ |
172 |
+ insinto /usr/share/shadowman/tools |
173 |
+ newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" |
174 |
+ newins - distccd <<<"${EPREFIX}/usr/lib/distcc" |
175 |
+ |
176 |
+ rm -r "${ED}/etc/default" || die |
177 |
+ rm "${ED}/etc/distcc/clients.allow" || die |
178 |
+ rm "${ED}/etc/distcc/commands.allow.sh" || die |
179 |
+} |
180 |
+ |
181 |
+pkg_postinst() { |
182 |
+ # remove the old paths when switching from libXX to lib |
183 |
+ if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ |
184 |
+ -d ${EROOT%/}/usr/$(get_libdir)/distcc ]]; then |
185 |
+ rm -r -f "${EROOT%/}/usr/$(get_libdir)/distcc" || die |
186 |
+ fi |
187 |
+ |
188 |
+ if [[ ${ROOT} == / ]]; then |
189 |
+ eselect compiler-shadow update distcc |
190 |
+ eselect compiler-shadow update distccd |
191 |
+ fi |
192 |
+ |
193 |
+ use gnome && xdg_desktop_database_update |
194 |
+ |
195 |
+ elog |
196 |
+ elog "Tips on using distcc with Gentoo can be found at" |
197 |
+ elog "https://wiki.gentoo.org/wiki/Distcc" |
198 |
+ elog |
199 |
+ elog "How to use pump mode with Gentoo:" |
200 |
+ elog "# distcc-config --set-hosts \"foo,cpp,lzo bar,cpp,lzo baz,cpp,lzo\"" |
201 |
+ elog "# echo 'FEATURES=\"\${FEATURES} distcc distcc-pump\"' >> /etc/portage/make.conf" |
202 |
+ elog "# emerge -u world" |
203 |
+ elog |
204 |
+ elog "To use the distccmon programs with Gentoo you should use this command:" |
205 |
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" |
206 |
+ |
207 |
+ if use gnome || use gtk; then |
208 |
+ elog "Or:" |
209 |
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome" |
210 |
+ fi |
211 |
+ |
212 |
+ elog |
213 |
+ elog "***SECURITY NOTICE***" |
214 |
+ elog "Since distcc-3.3, whitelist is used for what distccd could execute. The whilelist" |
215 |
+ elog "has been generated by compiler-shadow distccd. To revert to the old behavior, " |
216 |
+ elog "you need to pass --make-me-a-botnet to distccd in /etc/conf.d/distccd." |
217 |
+ elog "Cf. https://github.com/distcc/distcc/pull/243." |
218 |
+} |
219 |
+ |
220 |
+pkg_prerm() { |
221 |
+ if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then |
222 |
+ eselect compiler-shadow remove distcc |
223 |
+ fi |
224 |
+} |
225 |
+ |
226 |
+pkg_postrm() { |
227 |
+ use gnome && xdg_desktop_database_update |
228 |
+} |
229 |
|
230 |
diff --git a/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch |
231 |
new file mode 100644 |
232 |
index 00000000000..7b735ebec7f |
233 |
--- /dev/null |
234 |
+++ b/sys-devel/distcc/files/distcc-3.3.2-freedesktop.patch |
235 |
@@ -0,0 +1,112 @@ |
236 |
+From d852c808d6f470031f40edec9ebe980afc69b9b9 Mon Sep 17 00:00:00 2001 |
237 |
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o> |
238 |
+Date: Sat, 8 Dec 2018 12:50:07 +0100 |
239 |
+Subject: [PATCH] Fix desktop spec compliance of distccmon-gnome install |
240 |
+ |
241 |
+--- |
242 |
+ Makefile.in | 18 ++++++++++-------- |
243 |
+ gnome/distccmon-gnome.desktop | 7 +++---- |
244 |
+ ...mon-gnome-icon.png => distccmon-gnome.png} | Bin |
245 |
+ src/mon-gnome.c | 2 +- |
246 |
+ 4 files changed, 14 insertions(+), 13 deletions(-) |
247 |
+ rename gnome/{distccmon-gnome-icon.png => distccmon-gnome.png} (100%) |
248 |
+ |
249 |
+diff --git a/Makefile.in b/Makefile.in |
250 |
+index 6e1e467..1106559 100644 |
251 |
+--- a/Makefile.in |
252 |
++++ b/Makefile.in |
253 |
+@@ -52,13 +52,14 @@ mandir = @mandir@ |
254 |
+ includedir = @includedir@ |
255 |
+ oldincludedir = /usr/include |
256 |
+ docdir = @docdir@ |
257 |
+-pkgdatadir = $(datadir)/@PACKAGE_NAME@ |
258 |
++icondir = $(datarootdir)/pixmaps |
259 |
++desktopdir = $(datarootdir)/applications |
260 |
+ |
261 |
+ include_server_builddir = $(builddir)/_include_server |
262 |
+ |
263 |
+ # These must be done from here, not from autoconf, because they can |
264 |
+ # contain variable expansions written in Make syntax. Ew. |
265 |
+-DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DPKGDATADIR="\"${pkgdatadir}\"" |
266 |
++DIR_DEFS = -DLIBDIR="\"${libdir}\"" -DSYSCONFDIR="\"${sysconfdir}\"" -DICONDIR="\"${icondir}\"" |
267 |
+ |
268 |
+ # arguments to pkgconfig |
269 |
+ GNOME_PACKAGES = @GNOME_PACKAGES@ |
270 |
+@@ -387,7 +388,7 @@ man_HTML = man/distcc_1.html man/distccd_1.html man/distccmon_text_1.html \ |
271 |
+ man/lsdistcc_1.html man/pump_1.html man/include_server_1.html |
272 |
+ MEN = $(man1_MEN) |
273 |
+ |
274 |
+-gnome_data = gnome/distccmon-gnome-icon.png \ |
275 |
++gnome_data = gnome/distccmon-gnome.png \ |
276 |
+ gnome/distccmon-gnome.desktop |
277 |
+ |
278 |
+ popt_OBJS=popt/findme.o popt/popt.o popt/poptconfig.o \ |
279 |
+@@ -1033,7 +1034,8 @@ showpaths: |
280 |
+ @echo " programs $(DESTDIR)$(bindir)" |
281 |
+ @echo " sbin programs $(DESTDIR)$(sbindir)" |
282 |
+ @echo " system configuration $(DESTDIR)$(sysconfdir)" |
283 |
+- @echo " shared data files $(DESTDIR)$(pkgdatadir)" |
284 |
++ @echo " icon file $(DESTDIR)$(icondir)" |
285 |
++ @echo " application file $(DESTDIR)$(desktopdir)" |
286 |
+ |
287 |
+ |
288 |
+ # install-sh can't handle multiple arguments, but we don't need any |
289 |
+@@ -1129,10 +1131,10 @@ install-example: $(example_DOCS) |
290 |
+ done |
291 |
+ |
292 |
+ install-gnome-data: $(gnome_data) |
293 |
+- $(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)" |
294 |
+- for p in $(gnome_data); do \ |
295 |
+- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \ |
296 |
+- done |
297 |
++ $(mkinstalldirs) "$(DESTDIR)$(icondir)" |
298 |
++ $(mkinstalldirs) "$(DESTDIR)$(desktopdir)" |
299 |
++ $(INSTALL_DATA) gnome/distccmon-gnome.png "$(DESTDIR)$(icondir)" |
300 |
++ $(INSTALL_DATA) gnome/distccmon-gnome.desktop "$(DESTDIR)$(desktopdir)" |
301 |
+ |
302 |
+ install-conf: $(conf_files) $(default_files) |
303 |
+ $(mkinstalldirs) "$(DESTDIR)$(sysconfdir)/distcc" |
304 |
+diff --git a/gnome/distccmon-gnome.desktop b/gnome/distccmon-gnome.desktop |
305 |
+index bd1fa26..7205f5e 100644 |
306 |
+--- a/gnome/distccmon-gnome.desktop |
307 |
++++ b/gnome/distccmon-gnome.desktop |
308 |
+@@ -1,6 +1,5 @@ |
309 |
+ [Desktop Entry] |
310 |
+-Version=0.9.4 |
311 |
+-Encoding=UTF-8 |
312 |
++Version=1.0 |
313 |
+ Exec=distccmon-gnome |
314 |
+ Name=distcc monitor |
315 |
+ Name[sv]=distcc övervakare |
316 |
+@@ -8,9 +7,9 @@ GenericName=Distributed Compile Monitor |
317 |
+ GenericName[sv]=Distribuerad kompilerings-övervakare |
318 |
+ Comment=Graphical view of distributed compile tasks |
319 |
+ Comment[sv]=Grafisk vy av distribuerade kompileringsuppgifter |
320 |
+-Icon=distccmon-gnome-icon.png |
321 |
++Icon=distccmon-gnome |
322 |
+ TryExec=distccmon-gnome |
323 |
+ Terminal=false |
324 |
+ Type=Application |
325 |
+-Categories=GNOME;Application;Development; |
326 |
++Categories=GNOME;GTK;Development; |
327 |
+ StartupNotify=true |
328 |
+diff --git a/gnome/distccmon-gnome-icon.png b/gnome/distccmon-gnome.png |
329 |
+similarity index 100% |
330 |
+rename from gnome/distccmon-gnome-icon.png |
331 |
+rename to gnome/distccmon-gnome.png |
332 |
+diff --git a/src/mon-gnome.c b/src/mon-gnome.c |
333 |
+index 24681d0..bfc286d 100644 |
334 |
+--- a/src/mon-gnome.c |
335 |
++++ b/src/mon-gnome.c |
336 |
+@@ -599,7 +599,7 @@ static GtkWidget * dcc_gnome_make_mainwin (void) |
337 |
+ |
338 |
+ #if GTK_CHECK_VERSION(2,2,0) |
339 |
+ gtk_window_set_icon_from_file (GTK_WINDOW (mainwin), |
340 |
+- PKGDATADIR "/distccmon-gnome-icon.png", |
341 |
++ ICONDIR "/distccmon-gnome.png", |
342 |
+ NULL); |
343 |
+ #endif |
344 |
+ |
345 |
+-- |
346 |
+2.20.0.rc2 |
347 |
+ |