Gentoo Archives: gentoo-commits

From: "Michal Gorny (mgorny)" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-devel/distcc: distcc-3.2_rc1-r3.ebuild ChangeLog
Date: Fri, 27 Feb 2015 21:14:26
Message-Id: 20150227211421.46AEF12B06@oystercatcher.gentoo.org
1 mgorny 15/02/27 21:14:21
2
3 Modified: ChangeLog
4 Added: distcc-3.2_rc1-r3.ebuild
5 Log:
6 Add support for SOCKSv5 proxy, bug #537616. Needed for network-sandbox support in Portage.
7
8 (Portage version: 2.2.17/cvs/Linux x86_64, signed Manifest commit with key EFB4464E!)
9
10 Revision Changes Path
11 1.241 sys-devel/distcc/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/distcc/ChangeLog?rev=1.241&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/distcc/ChangeLog?rev=1.241&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/distcc/ChangeLog?r1=1.240&r2=1.241
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v
20 retrieving revision 1.240
21 retrieving revision 1.241
22 diff -u -r1.240 -r1.241
23 --- ChangeLog 24 Jan 2015 23:18:13 -0000 1.240
24 +++ ChangeLog 27 Feb 2015 21:14:21 -0000 1.241
25 @@ -1,6 +1,13 @@
26 # ChangeLog for sys-devel/distcc
27 # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.240 2015/01/24 23:18:13 mgorny Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/ChangeLog,v 1.241 2015/02/27 21:14:21 mgorny Exp $
30 +
31 +*distcc-3.2_rc1-r3 (27 Feb 2015)
32 +
33 + 27 Feb 2015; Michał Górny <mgorny@g.o> +distcc-3.2_rc1-r3.ebuild,
34 + +files/distcc-3.2_rc1-socks5.patch:
35 + Add support for SOCKSv5 proxy, bug #537616. Needed for network-sandbox support
36 + in Portage.
37
38 24 Jan 2015; Michał Górny <mgorny@g.o> distcc-3.1-r10.ebuild,
39 distcc-3.2_rc1-r2.ebuild:
40
41
42
43 1.1 sys-devel/distcc/distcc-3.2_rc1-r3.ebuild
44
45 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/distcc/distcc-3.2_rc1-r3.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-devel/distcc/distcc-3.2_rc1-r3.ebuild?rev=1.1&content-type=text/plain
47
48 Index: distcc-3.2_rc1-r3.ebuild
49 ===================================================================
50 # Copyright 1999-2015 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sys-devel/distcc/distcc-3.2_rc1-r3.ebuild,v 1.1 2015/02/27 21:14:21 mgorny Exp $
53
54 EAPI=5
55
56 PYTHON_COMPAT=( python2_7 )
57
58 inherit autotools eutils fdo-mime flag-o-matic multilib python-single-r1 systemd toolchain-funcs user
59
60 MY_P="${P/_}"
61 DESCRIPTION="Distribute compilation of C code across several machines on a network"
62 HOMEPAGE="http://distcc.org/"
63 SRC_URI="http://distcc.googlecode.com/files/${MY_P}.tar.bz2"
64
65 LICENSE="GPL-2"
66 SLOT="0"
67 KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd"
68 IUSE="avahi crossdev gnome gssapi gtk hardened ipv6 selinux xinetd"
69
70 RESTRICT="test"
71
72 CDEPEND="${PYTHON_DEPS}
73 dev-libs/popt
74 avahi? ( >=net-dns/avahi-0.6[dbus] )
75 gnome? (
76 >=gnome-base/libgnome-2
77 >=gnome-base/libgnomeui-2
78 x11-libs/gtk+:2
79 x11-libs/pango
80 )
81 gssapi? ( net-libs/libgssglue )
82 gtk? ( x11-libs/gtk+:2 )"
83 DEPEND="${CDEPEND}
84 virtual/pkgconfig"
85 RDEPEND="${CDEPEND}
86 !net-misc/pump
87 >=sys-devel/gcc-config-1.4.1
88 selinux? ( sec-policy/selinux-distcc )
89 xinetd? ( sys-apps/xinetd )"
90
91 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
92
93 S="${WORKDIR}/${MY_P}"
94
95 DCCC_PATH="/usr/$(get_libdir)/distcc/bin"
96 DISTCC_VERBOSE="0"
97
98 pkg_setup() {
99 enewuser distcc 240 -1 -1 daemon
100 python-single-r1_pkg_setup
101 }
102
103 src_prepare() {
104 epatch "${FILESDIR}/${PN}-3.0-xinetd.patch"
105 # bug #253786
106 epatch "${FILESDIR}/${PN}-3.0-fix-fortify.patch"
107 # bug #255188
108 epatch "${FILESDIR}/${PN}-3.2_rc1-freedesktop.patch"
109 # bug #258364
110 epatch "${FILESDIR}/${PN}-3.2_rc1-python.patch"
111 # for net-libs/libgssglue
112 epatch "${FILESDIR}/${PN}-3.2_rc1-gssapi.patch"
113 # SOCKSv5 support needed for Portage, bug #537616
114 epatch "${FILESDIR}/${PN}-3.2_rc1-socks5.patch"
115 epatch_user
116
117 # Bugs #120001, #167844 and probably more. See patch for description.
118 use hardened && epatch "${FILESDIR}/distcc-hardened.patch"
119
120 sed -i \
121 -e "/PATH/s:\$distcc_location:${EPREFIX}${DCCC_PATH}:" \
122 -e "s:@PYTHON@:${EPYTHON}:" \
123 pump.in || die "sed failed"
124
125 sed \
126 -e "s:@EPREFIX@:${EPREFIX:-/}:" \
127 -e "s:@libdir@:/usr/$(get_libdir):" \
128 "${FILESDIR}/distcc-config-3.2_rc1" > "${T}/distcc-config" || die
129
130 eaclocal -Im4 --output=aclocal.m4
131 eautoconf
132 }
133
134 src_configure() {
135 local myconf="--disable-Werror --with-docdir=/usr/share/doc/${PF}"
136 # More legacy stuff?
137 [ "$(gcc-major-version)" = "2" ] && filter-lfs-flags
138
139 # --disable-rfc2553 b0rked, bug #254176
140 use ipv6 && myconf="${myconf} --enable-rfc2553"
141
142 econf \
143 $(use_with avahi) \
144 $(use_with gtk) \
145 $(use_with gnome) \
146 $(use_with gssapi auth) \
147 ${myconf}
148 }
149
150 src_install() {
151 default
152 python_optimize
153
154 dobin "${FILESDIR}/3.0/distcc-config"
155
156 newinitd "${FILESDIR}/3.1/init" distccd
157 systemd_dounit "${FILESDIR}/distccd.service"
158 systemd_install_serviced "${FILESDIR}/distccd.service.conf"
159
160 cp "${FILESDIR}/3.0/conf" "${T}/distccd" || die
161 if use avahi; then
162 cat >> "${T}/distccd" <<-EOF
163
164 # Enable zeroconf support in distccd
165 DISTCCD_OPTS="\${DISTCCD_OPTS} --zeroconf"
166 EOF
167
168 sed -i '/ExecStart/ s|$| --zeroconf|' "${ED}"/usr/lib/systemd/system/distccd.service || die
169 fi
170 doconfd "${T}/distccd" || die
171
172 cat > "${T}/02distcc" <<-EOF
173 # This file is managed by distcc-config; use it to change these settings.
174 # DISTCC_LOG and DISTCC_DIR should not be set.
175 DISTCC_VERBOSE="${DISTCC_VERBOSE:-0}"
176 DISTCC_FALLBACK="${DISTCC_FALLBACK:-1}"
177 DISTCC_SAVE_TEMPS="${DISTCC_SAVE_TEMPS:-0}"
178 DISTCC_TCP_CORK="${DISTCC_TCP_CORK}"
179 DISTCC_SSH="${DISTCC_SSH}"
180 UNCACHED_ERR_FD="${UNCACHED_ERR_FD}"
181 DISTCC_ENABLE_DISCREPANCY_EMAIL="${DISTCC_ENABLE_DISCREPANCY_EMAIL}"
182 DCC_EMAILLOG_WHOM_TO_BLAME="${DCC_EMAILLOG_WHOM_TO_BLAME}"
183 EOF
184 doenvd "${T}/02distcc" || die
185
186 keepdir "${DCCC_PATH}" || die
187
188 dobin "${T}/distcc-config" || die
189
190 # create the distccd pid directory
191 keepdir /var/run/distccd || die
192 fowners distcc:daemon /var/run/distccd || die
193
194 if use gnome || use gtk; then
195 einfo "Renaming /usr/bin/distccmon-gnome to /usr/bin/distccmon-gui"
196 einfo "This is to have a little sensability in naming schemes between distccmon programs"
197 mv "${ED}/usr/bin/distccmon-gnome" "${ED}/usr/bin/distccmon-gui" || die
198 dosym distccmon-gui /usr/bin/distccmon-gnome || die
199 fi
200
201 if use xinetd; then
202 insinto /etc/xinetd.d || die
203 newins "doc/example/xinetd" distcc || die
204 fi
205
206 rm -r "${ED}/etc/default" || die
207 rm "${ED}/etc/distcc/clients.allow" || die
208 rm "${ED}/etc/distcc/commands.allow.sh" || die
209 }
210
211 pkg_postinst() {
212 if [ -x "${EPREFIX}/usr/bin/distcc-config" ] ; then
213 if use crossdev; then
214 "${EPREFIX}/usr/bin/distcc-config" --update-masquerade-with-crossdev
215 else
216 "${EPREFIX}/usr/bin/distcc-config" --update-masquerade
217 fi
218 fi
219
220 use gnome && fdo-mime_desktop_database_update
221
222 elog
223 elog "Tips on using distcc with Gentoo can be found at"
224 elog "http://www.gentoo.org/doc/en/distcc.xml"
225 elog
226 elog "How to use pump mode with Gentoo:"
227 elog "# distcc-config --set-hosts \"foo,cpp,lzo bar,cpp,lzo baz,cpp,lzo\""
228 elog "# echo 'FEATURES=\"\${FEATURES} distcc distcc-pump\"' >> /etc/make.conf"
229 elog "# emerge -u world"
230 elog
231 elog "To use the distccmon programs with Gentoo you should use this command:"
232 elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-text 5"
233
234 if use gnome || use gtk; then
235 elog "Or:"
236 elog "# DISTCC_DIR=\"${DISTCC_DIR:-${BUILD_PREFIX}/.distcc}\" distccmon-gnome"
237 fi
238
239 elog
240 elog "***SECURITY NOTICE***"
241 elog "If you are upgrading distcc please make sure to run etc-update to"
242 elog "update your /etc/conf.d/distccd and /etc/init.d/distccd files with"
243 elog "added security precautions (the --listen and --allow directives)"
244 elog
245 }
246
247 pkg_postrm() {
248 # delete the masquerade directory
249 if [ ! -f "${EPREFIX}/usr/bin/distcc" ] ; then
250 einfo "Remove masquerade symbolic links."
251 rm "${EPREFIX}${DCCC_PATH}/"*{cc,c++,gcc,g++}
252 rmdir "${EPREFIX}${DCCC_PATH}"
253 fi
254
255 use gnome && fdo-mime_desktop_database_update
256 }