1 |
commit: 9a6b6ae2b6542b104fc5618f46c6d3636ac089ce |
2 |
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 9 08:28:51 2018 +0000 |
4 |
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 9 08:29:03 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a6b6ae2 |
7 |
|
8 |
sys-devel/distcc: revbump, fix whitelist libdir |
9 |
|
10 |
pass --libdir=/usr/lib to configure unconditionally |
11 |
|
12 |
distcc was looking for whitelist symlinks in lib64 |
13 |
(dcc_check_compiler_whitelist) CRITICAL! no /usr/lib64/distcc |
14 |
|
15 |
Package-Manager: Portage-2.3.52, Repoman-2.3.12 |
16 |
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org> |
17 |
|
18 |
sys-devel/distcc/distcc-3.3.2-r3.ebuild | 197 ++++++++++++++++++++++++++++++++ |
19 |
1 file changed, 197 insertions(+) |
20 |
|
21 |
diff --git a/sys-devel/distcc/distcc-3.3.2-r3.ebuild b/sys-devel/distcc/distcc-3.3.2-r3.ebuild |
22 |
new file mode 100644 |
23 |
index 00000000000..1266d913df9 |
24 |
--- /dev/null |
25 |
+++ b/sys-devel/distcc/distcc-3.3.2-r3.ebuild |
26 |
@@ -0,0 +1,197 @@ |
27 |
+# Copyright 1999-2018 Gentoo Authors |
28 |
+# Distributed under the terms of the GNU General Public License v2 |
29 |
+ |
30 |
+EAPI=6 |
31 |
+ |
32 |
+PYTHON_COMPAT=( python3_{5,6} ) |
33 |
+ |
34 |
+inherit autotools flag-o-matic python-single-r1 systemd \ |
35 |
+ toolchain-funcs user xdg-utils prefix |
36 |
+ |
37 |
+DESCRIPTION="Distribute compilation of C code across several machines on a network" |
38 |
+HOMEPAGE="http://distcc.org/" |
39 |
+SRC_URI="https://github.com/${PN}/${PN}/releases/download/v${PV}/${P}.tar.gz" |
40 |
+ |
41 |
+LICENSE="GPL-2+" |
42 |
+SLOT="0" |
43 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
44 |
+IUSE="gnome gssapi gtk hardened ipv6 selinux xinetd zeroconf" |
45 |
+ |
46 |
+RESTRICT="test" |
47 |
+ |
48 |
+CDEPEND="${PYTHON_DEPS} |
49 |
+ dev-libs/popt |
50 |
+ gnome? ( |
51 |
+ >=gnome-base/libgnome-2 |
52 |
+ >=gnome-base/libgnomeui-2 |
53 |
+ x11-libs/gtk+:2 |
54 |
+ x11-libs/pango |
55 |
+ ) |
56 |
+ gssapi? ( net-libs/libgssglue ) |
57 |
+ gtk? ( x11-libs/gtk+:2 ) |
58 |
+ zeroconf? ( >=net-dns/avahi-0.6[dbus] ) |
59 |
+" |
60 |
+DEPEND="${CDEPEND} |
61 |
+ sys-libs/binutils-libs |
62 |
+ virtual/pkgconfig" |
63 |
+RDEPEND="${CDEPEND} |
64 |
+ !net-misc/pump |
65 |
+ dev-util/shadowman |
66 |
+ >=sys-devel/gcc-config-1.4.1 |
67 |
+ selinux? ( sec-policy/selinux-distcc ) |
68 |
+ xinetd? ( sys-apps/xinetd )" |
69 |
+ |
70 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE}" |
71 |
+ |
72 |
+S="${WORKDIR}/distcc" |
73 |
+ |
74 |
+pkg_setup() { |
75 |
+ enewuser distcc 240 -1 -1 daemon |
76 |
+ python-single-r1_pkg_setup |
77 |
+} |
78 |
+ |
79 |
+src_prepare() { |
80 |
+ eapply "${FILESDIR}/${PN}-3.0-xinetd.patch" |
81 |
+ # bug #255188 |
82 |
+ eapply "${FILESDIR}/${PN}-3.3.2-freedesktop.patch" |
83 |
+ # SOCKSv5 support needed for Portage, bug #537616 |
84 |
+ eapply "${FILESDIR}/${PN}-3.2_rc1-socks5.patch" |
85 |
+ eapply_user |
86 |
+ |
87 |
+ # Bugs #120001, #167844 and probably more. See patch for description. |
88 |
+ use hardened && eapply "${FILESDIR}/distcc-hardened.patch" |
89 |
+ |
90 |
+ sed -i \ |
91 |
+ -e "/PATH/s:\$distcc_location:${EPREFIX}/usr/lib/distcc/bin:" \ |
92 |
+ -e "s:@PYTHON@:${EPYTHON}:" \ |
93 |
+ pump.in || die "sed failed" |
94 |
+ |
95 |
+ sed \ |
96 |
+ -e "s:@EPREFIX@:${EPREFIX:-/}:" \ |
97 |
+ -e "s:@libdir@:/usr/lib:" \ |
98 |
+ "${FILESDIR}/distcc-config" > "${T}/distcc-config" || die |
99 |
+ |
100 |
+ hprefixify update-distcc-symlinks.py src/{serve,daemon}.c |
101 |
+ python_fix_shebang update-distcc-symlinks.py "${T}/distcc-config" |
102 |
+ eautoreconf |
103 |
+} |
104 |
+ |
105 |
+src_configure() { |
106 |
+ local myconf=( |
107 |
+ --disable-Werror |
108 |
+ --libdir=/usr/lib |
109 |
+ $(use_enable ipv6 rfc2553) |
110 |
+ $(use_with gtk) |
111 |
+ $(use_with gnome) |
112 |
+ $(use_with gssapi auth) |
113 |
+ $(use_with zeroconf avahi) |
114 |
+ ) |
115 |
+ |
116 |
+ econf "${myconf[@]}" |
117 |
+} |
118 |
+ |
119 |
+src_install() { |
120 |
+ # override GZIP_BIN to stop it from compressing manpages |
121 |
+ emake DESTDIR="${D}" GZIP_BIN=false install |
122 |
+ python_optimize |
123 |
+ |
124 |
+ newinitd "${FILESDIR}/distccd.initd" distccd |
125 |
+ systemd_dounit "${FILESDIR}/distccd.service" |
126 |
+ systemd_install_serviced "${FILESDIR}/distccd.service.conf" |
127 |
+ |
128 |
+ cp "${FILESDIR}/distccd.confd" "${T}/distccd" || die |
129 |
+ if use zeroconf; then |
130 |
+ cat >> "${T}/distccd" <<-EOF || die |
131 |
+ |
132 |
+ # Enable zeroconf support in distccd |
133 |
+ DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf" |
134 |
+ EOF |
135 |
+ |
136 |
+ sed -i '/ExecStart/ s|$| --zeroconf|' "${D}$(systemd_get_systemunitdir)"/distccd.service || die |
137 |
+ fi |
138 |
+ doconfd "${T}/distccd" |
139 |
+ |
140 |
+ newenvd - 02distcc <<-EOF || die |
141 |
+ # This file is managed by distcc-config; use it to change these settings. |
142 |
+ # DISTCC_LOG and DISTCC_DIR should not be set. |
143 |
+ DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}" |
144 |
+ DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}" |
145 |
+ DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}" |
146 |
+ DISTCC_TCP_CORK="${DISTCC_TCP_CORK}" |
147 |
+ DISTCC_SSH="${DISTCC_SSH}" |
148 |
+ UNCACHED_ERR_FD="${UNCACHED_ERR_FD}" |
149 |
+ DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}" |
150 |
+ DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}" |
151 |
+ EOF |
152 |
+ |
153 |
+ keepdir /usr/lib/distcc |
154 |
+ |
155 |
+ dobin "${T}/distcc-config" |
156 |
+ |
157 |
+ if use gnome || use gtk; then |
158 |
+ einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui" |
159 |
+ einfo "This is to have a little sensability in naming schemes between distccmon programs" |
160 |
+ mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die |
161 |
+ dosym distccmon-gui /usr/bin/distccmon-gnome |
162 |
+ fi |
163 |
+ |
164 |
+ if use xinetd; then |
165 |
+ insinto /etc/xinetd.d |
166 |
+ newins "doc/example/xinetd" distcc |
167 |
+ fi |
168 |
+ |
169 |
+ insinto /usr/share/shadowman/tools |
170 |
+ newins - distcc <<<"${EPREFIX}/usr/lib/distcc/bin" |
171 |
+ newins - distccd <<<"${EPREFIX}/usr/lib/distcc" |
172 |
+ |
173 |
+ rm -r "${ED}/etc/default" || die |
174 |
+ rm "${ED}/etc/distcc/clients.allow" || die |
175 |
+ rm "${ED}/etc/distcc/commands.allow.sh" || die |
176 |
+} |
177 |
+ |
178 |
+pkg_postinst() { |
179 |
+ # remove the old paths when switching from libXX to lib |
180 |
+ if [[ $(get_libdir) != lib && ${SYMLINK_LIB} != yes && \ |
181 |
+ -d ${EROOT%/}/usr/$(get_libdir)/distcc ]]; then |
182 |
+ rm -r -f "${EROOT%/}/usr/$(get_libdir)/distcc" || die |
183 |
+ fi |
184 |
+ |
185 |
+ if [[ ${ROOT} == / ]]; then |
186 |
+ eselect compiler-shadow update distcc |
187 |
+ eselect compiler-shadow update distccd |
188 |
+ fi |
189 |
+ |
190 |
+ use gnome && xdg_desktop_database_update |
191 |
+ |
192 |
+ elog |
193 |
+ elog "Tips on using distcc with Gentoo can be found at" |
194 |
+ elog "https://wiki.gentoo.org/wiki/Distcc" |
195 |
+ elog |
196 |
+ elog "distcc-pump is known to cause breakage with multiple packages." |
197 |
+ elog "Do NOT enable it globally." |
198 |
+ elog |
199 |
+ elog "To use the distccmon programs with Gentoo you should use this command:" |
200 |
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5" |
201 |
+ |
202 |
+ if use gnome || use gtk; then |
203 |
+ elog "Or:" |
204 |
+ elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome" |
205 |
+ fi |
206 |
+ |
207 |
+ elog |
208 |
+ elog "***SECURITY NOTICE***" |
209 |
+ elog "Since distcc-3.3, whitelist is used for what distccd could execute. The whilelist" |
210 |
+ elog "has been generated by compiler-shadow distccd. To revert to the old behavior, " |
211 |
+ elog "you need to pass --make-me-a-botnet to distccd in /etc/conf.d/distccd." |
212 |
+ elog "Cf. https://github.com/distcc/distcc/pull/243." |
213 |
+} |
214 |
+ |
215 |
+pkg_prerm() { |
216 |
+ if [[ -z ${REPLACED_BY_VERSION} && ${ROOT} == / ]]; then |
217 |
+ eselect compiler-shadow remove distcc |
218 |
+ fi |
219 |
+} |
220 |
+ |
221 |
+pkg_postrm() { |
222 |
+ use gnome && xdg_desktop_database_update |
223 |
+} |