Gentoo Archives: gentoo-commits

From: Ian Stakenvicius <axs@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/samba/
Date: Tue, 14 Feb 2017 20:42:21
Message-Id: 1487104919.82a66c83bd36d3eadeababd26b47e98083ab87ed.axs@gentoo
1 commit: 82a66c83bd36d3eadeababd26b47e98083ab87ed
2 Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
3 AuthorDate: Wed Feb 8 22:37:52 2017 +0000
4 Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 14 20:41:59 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=82a66c83
7
8 net-fs/samba-4.6.0_rc3: bump, python useflag, disable tests, etc
9
10 -Added python useflag to allow builds that don't require python at runtime
11 -Disabled tests since the test suite just doesn't work in ebuild
12 -Added some missing test dependencies (for when tests are sorted later)
13 -Updated the disable-python patchset to match what was submitted upstream
14 -Use waf-utils_src_compile instead of emake for better output.
15
16 Package-Manager: portage-2.3.3
17
18 net-fs/samba/Manifest | 2 +
19 net-fs/samba/samba-4.6.0_rc3.ebuild | 300 ++++++++++++++++++++++++++++++++++++
20 2 files changed, 302 insertions(+)
21
22 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
23 index 9cbb4df2b7..509db60d5f 100644
24 --- a/net-fs/samba/Manifest
25 +++ b/net-fs/samba/Manifest
26 @@ -3,7 +3,9 @@ DIST samba-4.2.14.tar.gz 20883281 SHA256 db820a9947e44f04b0eb25e4aa0c3db32c4042f
27 DIST samba-4.5.4.tar.gz 20958348 SHA256 1800d10ea14cabef67c83cc56a0f37f4f30ba5df218b3a1e7c874069a08c0f40 SHA512 7b24227e17ab091e6165c605f28af19fa846de63f3f24508411db2b509d942e599702dd278c8430481d7a404c5a97005148286ea4e94a35b57a1ec303b1a4409 WHIRLPOOL a1b84726b0a0addb1ca2de8d84429280a82001bf2fb0fbd7524dd2499fb18370d19e099b0852b93cb105b3db45583688b107533d404703ac635c2e6e8e2cb81b
28 DIST samba-4.5.5.tar.gz 20953640 SHA256 bff02762b3e4ee030f02266c6e24a0b888248b387246219b7fbe3e1758ef2184 SHA512 dd9bd2cdd16ef9289c46583b9809fb2757f821bcfedacbac384718b977f981a20d011065087b2fa985c57082512b9cc5d5e19daede3fc6c7e063e04a66349b4a WHIRLPOOL 0dcffe3071ef2e621a2bc5b317e05036b5a75c6a0231538026bdee76bb43743d72acff128025e7957791a65856794cbfa2bfbca203b5f0a685455e1798b29f40
29 DIST samba-4.6.0rc2.tar.gz 20956751 SHA256 e05a941d6d089a4781a51eb758661d66ce9c23b7e6286da756f5910424de22d5 SHA512 e66d9f50f0bda315c1a57cf94c5c06811bf5d0c709ebc513488635c1e044865abc27af9f60023e5ae4ae0c08f819bfc46886bd408be0c63aa8a09a945efa67e0 WHIRLPOOL 6fc370fbb4dc5501a3c134725bebe89869bb57d6d54c713d1920056ebe558ee378046e9fa1a6b70af6e23885b92ca4c3dde85e574e482e7a101b334cf0dc9705
30 +DIST samba-4.6.0rc3.tar.gz 20969909 SHA256 42a0105317d3d7e96a8bbc1aa4ecefdfdb0eb12eac7bd6fd67b48bf92e22d224 SHA512 7c1f76f482654256974f85d9b44e527e4b780be99e45c1c6e6be3efdaceab4484c2443efa2460e155db534dc76e614d25f47e4bb542779395182d7cbbf94927a WHIRLPOOL e400e72d59e3ede98983a2948507e043daa84c248af50e4114c71a15a7e9190708f6fa4cc6116fa664c8a6e1ebaf1e1eb2e5b22ed1ebcbfc41b3adb726a76bc4
31 DIST samba-disable-python-patches-4.2.12.tar.xz 6052 SHA256 8903eacbabdfaf7b64cbde03d7c367d1efdc92e54090f0f4b9ed5d2a462b1c18 SHA512 c527d0a052d3211e5b12c17bc94db56cc5e5545189ed65a760c0656c94c22e27a4b159e6439eb0370873e1619873a741f3b3bd10d3876b38eb3914a87eace372 WHIRLPOOL ad63db55d5dc96f56e6c9b30c2092e2f6e206b0ed5d13c249879d10753c8db2f475c5d4e651e2fc042ad992b648d3b4465f1b28c6b4bbf821cf503d27f741f7e
32 DIST samba-disable-python-patches-4.2.9.tar.xz 6016 SHA256 222d0153f03dddde28a0b906ee2b27076223ac88b84a998aaa285f658861edfa SHA512 02fc666a36f8e733e522663d80775d130fabee9d5fb4e1c261d28815e07be425ae8977213f9216c7af62dd8b2619e7e13d71f9a25780b058c8119901c2115a18 WHIRLPOOL ebba3a6d41a41844621759672aa8c984d26f44d12007c8e929405470c381bc262523ec68d3972e86cf675c45f092fa287496167e42940e70d704790753e47b03
33 DIST samba-disable-python-patches-4.5.0_rc1.tar.xz 6204 SHA256 fa0d776e04e3222c0dc4761e376717f4154937cdcb85f4117b8978dfb770a78e SHA512 920089ba3c6e8e7d913b1d7ef1017262a19d1af41215adb30cfc98a57556efc4b0116931d4ef774c01124149d8eca2be3a23814ce7e11daf0180d2c111799927 WHIRLPOOL 6d55710895435ad012e23f8c252e5276966241014710349ca7fa9cf037e8742030b8e053f7cb71309a0a45f48d2235d55393243bf4d19476a22dd39bb1b7748d
34 +DIST samba-disable-python-patches-4.6.0.tar.xz 7464 SHA256 79a27f4fe08dde75491dd48cf4b4629b2a4e9b1d988919e4482faa268f90d839 SHA512 fc194c91b6aee418011fc855da4ffd7a3a41c332acb530a862fa082f7866fdd90246483ecc99d7e7a52792df8d73e19cccbe8589b71ce1dad79eafba307cfb69 WHIRLPOOL 75d6850f97dee94326183011cac0e3edd62c6cab5a0eba21008559d718dfac766224a1563c3ddc8a58849e31b3b6ce852fca286a660777e606b24ff23aaa6d22
35 DIST samba-disable-python-patches-4.6.0_rc1.tar.xz 6208 SHA256 9d013d65759c66db89d99c6017c618f2eff9928c2d761e5865dd125c6ca2ba1b SHA512 f11faaab3ca92d7ca5e3b43fc0d9d8360c0773cfd085ab273622be8ea8769ec4783e8a81ecee005bdb73dc07e45073248b24a3c52da5455f3ff0c9416295188f WHIRLPOOL 7712e5d7af563da12c4cf8a06bb64eca021e5b7a390a7b64f209e304c365847013fc9be6381397b203bc9c4040b3d838afd0be8b72bc1bed4099f6ed21f70860
36
37 diff --git a/net-fs/samba/samba-4.6.0_rc3.ebuild b/net-fs/samba/samba-4.6.0_rc3.ebuild
38 new file mode 100644
39 index 0000000000..79fb8a7f44
40 --- /dev/null
41 +++ b/net-fs/samba/samba-4.6.0_rc3.ebuild
42 @@ -0,0 +1,300 @@
43 +# Copyright 1999-2017 Gentoo Foundation
44 +# Distributed under the terms of the GNU General Public License v2
45 +# $Id$
46 +
47 +EAPI=6
48 +PYTHON_COMPAT=( python2_7 )
49 +PYTHON_REQ_USE='threads(+),xml(+)'
50 +
51 +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils
52 +
53 +MY_PV="${PV/_rc/rc}"
54 +MY_P="${PN}-${MY_PV}"
55 +
56 +SRC_PATH="stable"
57 +[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
58 +
59 +SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz
60 + https://dev.gentoo.org/~axs/distfiles/samba-disable-python-patches-4.6.0.tar.xz"
61 +[[ ${PV} = *_rc* ]] || \
62 +KEYWORDS="~amd64 ~hppa ~x86"
63 +
64 +DESCRIPTION="Samba Suite Version 4"
65 +HOMEPAGE="http://www.samba.org/"
66 +LICENSE="GPL-3"
67 +
68 +SLOT="0"
69 +
70 +IUSE="acl addc addns ads client cluster cups dmapi fam gnutls gpg iprint ldap pam python
71 +quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
72 +
73 +MULTILIB_WRAPPED_HEADERS=(
74 + /usr/include/samba-4.0/policy.h
75 + /usr/include/samba-4.0/dcerpc_server.h
76 + /usr/include/samba-4.0/ctdb.h
77 + /usr/include/samba-4.0/ctdb_client.h
78 + /usr/include/samba-4.0/ctdb_protocol.h
79 + /usr/include/samba-4.0/ctdb_private.h
80 + /usr/include/samba-4.0/ctdb_typesafe_cb.h
81 + /usr/include/samba-4.0/ctdb_version.h
82 +)
83 +
84 +# sys-apps/attr is an automagic dependency (see bug #489748)
85 +CDEPEND="
86 + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
87 + dev-lang/perl:=
88 + dev-libs/libaio[${MULTILIB_USEDEP}]
89 + dev-libs/libbsd[${MULTILIB_USEDEP}]
90 + dev-libs/iniparser:0
91 + dev-libs/popt[${MULTILIB_USEDEP}]
92 + dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
93 + >=dev-util/cmocka-1.0.0[${MULTILIB_USEDEP}]
94 + sys-apps/attr[${MULTILIB_USEDEP}]
95 + >=sys-libs/ldb-1.1.27[ldap(+)?,python(+)?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
96 + sys-libs/libcap
97 + sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
98 + sys-libs/readline:0=
99 + >=sys-libs/talloc-2.1.8[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
100 + >=sys-libs/tdb-1.3.10[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
101 + >=sys-libs/tevent-0.9.31-r1[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
102 + sys-libs/zlib[${MULTILIB_USEDEP}]
103 + virtual/libiconv
104 + pam? ( virtual/pam )
105 + acl? ( virtual/acl )
106 + addns? (
107 + net-dns/bind-tools[gssapi]
108 + dev-python/dnspython[${PYTHON_USEDEP}]
109 + )
110 + cluster? ( !dev-db/ctdb )
111 + cups? ( net-print/cups )
112 + dmapi? ( sys-apps/dmapi )
113 + fam? ( virtual/fam )
114 + gnutls? (
115 + dev-libs/libgcrypt:0
116 + >=net-libs/gnutls-1.4.0
117 + )
118 + gpg? ( app-crypt/gpgme )
119 + ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
120 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
121 + system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] )
122 + systemd? ( sys-apps/systemd:0= )
123 + test? (
124 + !system-mitkrb5? (
125 + >=sys-libs/nss_wrapper-1.1.3
126 + >=net-dns/resolv_wrapper-1.1.4
127 + >=net-libs/socket_wrapper-1.1.7
128 + >=sys-libs/uid_wrapper-1.2.1
129 + )
130 + )"
131 +DEPEND="${CDEPEND}
132 + ${PYTHON_DEPS}
133 + virtual/pkgconfig"
134 +RDEPEND="${CDEPEND}
135 + python? ( ${PYTHON_DEPS} )
136 + client? ( net-fs/cifs-utils[ads?] )
137 + selinux? ( sec-policy/selinux-samba )
138 + !dev-perl/Parse-Yapp
139 +"
140 +
141 +REQUIRED_USE="addc? ( python gnutls !system-mitkrb5 )
142 + test? ( python )
143 + addns? ( python )
144 + ads? ( acl gnutls ldap )
145 + gpg? ( addc )
146 + ?? ( system-heimdal system-mitkrb5 )
147 + ${PYTHON_REQUIRED_USE}"
148 +
149 +# the test suite is messed, it uses system-installed samba
150 +# bits instead of what was built, tests things disabled via use
151 +# flags, and generally just fails to work in a way ebuilds could
152 +# rely on in its current state
153 +RESTRICT="test"
154 +
155 +S="${WORKDIR}/${MY_P}"
156 +
157 +PATCHES=(
158 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
159 + "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
160 +)
161 +
162 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
163 +CONFDIR="${FILESDIR}/4.4"
164 +
165 +WAF_BINARY="${S}/buildtools/bin/waf"
166 +
167 +SHAREDMODS=""
168 +
169 +pkg_setup() {
170 + python-single-r1_pkg_setup
171 + if use cluster ; then
172 + SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
173 + elif use ads ; then
174 + SHAREDMODS="idmap_ad"
175 + fi
176 +}
177 +
178 +src_prepare() {
179 + default
180 +
181 + # install the patches from tarball(s)
182 + eapply "${WORKDIR}/patches"
183 +
184 + # un-bundle dnspython
185 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
186 +
187 + # unbundle iso8601 unless tests are enabled
188 + use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
189 +
190 + # ugly hackaround for bug #592502
191 + cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
192 +
193 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
194 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
195 + || die
196 +
197 + # Friggin' WAF shit
198 + multilib_copy_sources
199 +}
200 +
201 +multilib_src_configure() {
202 + # when specifying libs for samba build you must append NONE to the end to
203 + # stop it automatically including things
204 + local bundled_libs="NONE"
205 + if ! use system-heimdal && ! use system-mitkrb5 ; then
206 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
207 + fi
208 +
209 + local myconf=()
210 + myconf=(
211 + --enable-fhs
212 + --sysconfdir="${EPREFIX}/etc"
213 + --localstatedir="${EPREFIX}/var"
214 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
215 + --with-piddir="${EPREFIX}/run/${PN}"
216 + --bundled-libraries="${bundled_libs}"
217 + --builtin-libraries=NONE
218 + --disable-rpath
219 + --disable-rpath-install
220 + --nopyc
221 + --nopyo
222 + )
223 + if multilib_is_native_abi ; then
224 + myconf+=(
225 + $(use_with acl acl-support)
226 + $(usex addc '' '--without-ad-dc')
227 + $(use_with addns dnsupdate)
228 + $(use_with ads)
229 + $(use_with cluster cluster-support)
230 + $(use_enable cups)
231 + $(use_with dmapi)
232 + $(use_with fam)
233 + $(use_enable gnutls)
234 + $(use_with gpg gpgme)
235 + $(use_enable iprint)
236 + $(use_with ldap)
237 + $(use_with pam)
238 + $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
239 + $(use_with quota quotas)
240 + $(use_with syslog)
241 + $(use_with systemd)
242 + $(usex system-mitkrb5 '--with-system-mitkrb5' '')
243 + $(use_with winbind)
244 + $(usex python '' '--disable-python')
245 + $(usex test '--enable-selftest' '')
246 + $(use_enable zeroconf avahi)
247 + --with-shared-modules=${SHAREDMODS}
248 + )
249 + else
250 + myconf+=(
251 + --without-acl-support
252 + --without-ad-dc
253 + --without-dnsupdate
254 + --without-ads
255 + --disable-avahi
256 + --without-cluster-support
257 + --disable-cups
258 + --without-dmapi
259 + --without-fam
260 + --disable-gnutls
261 + --without-gpgme
262 + --disable-iprint
263 + $(use_with ldap)
264 + --without-pam
265 + --without-quotas
266 + --without-syslog
267 + --without-systemd
268 + $(usex system-mitkrb5 '--with-system-mitkrb5' '')
269 + --without-winbind
270 + --disable-python
271 + )
272 + fi
273 +
274 + CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
275 + waf-utils_src_configure ${myconf[@]}
276 +}
277 +
278 +multilib_src_compile() {
279 + waf-utils_src_compile
280 +}
281 +
282 +multilib_src_install() {
283 + waf-utils_src_install
284 +
285 + # Make all .so files executable
286 + find "${D}" -type f -name "*.so" -exec chmod +x {} +
287 +
288 + if multilib_is_native_abi; then
289 + # install ldap schema for server (bug #491002)
290 + if use ldap ; then
291 + insinto /etc/openldap/schema
292 + doins examples/LDAP/samba.schema
293 + fi
294 +
295 + # create symlink for cups (bug #552310)
296 + if use cups ; then
297 + dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb
298 + fi
299 +
300 + # install example config file
301 + insinto /etc/samba
302 + doins examples/smb.conf.default
303 +
304 + # Fix paths in example file (#603964)
305 + sed \
306 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
307 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
308 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
309 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
310 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
311 + -i "${ED%/}"/etc/samba/smb.conf.default || die
312 +
313 + # Install init script and conf.d file
314 + newinitd "${CONFDIR}/samba4.initd-r1" samba
315 + newconfd "${CONFDIR}/samba4.confd" samba
316 +
317 + systemd_dotmpfilesd "${FILESDIR}"/samba.conf
318 + systemd_dounit "${FILESDIR}"/nmbd.service
319 + systemd_dounit "${FILESDIR}"/smbd.{service,socket}
320 + systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
321 + systemd_dounit "${FILESDIR}"/winbindd.service
322 + systemd_dounit "${FILESDIR}"/samba.service
323 + fi
324 +}
325 +
326 +multilib_src_test() {
327 + if multilib_is_native_abi ; then
328 + "${WAF_BINARY}" test || die "test failed"
329 + fi
330 +}
331 +
332 +pkg_postinst() {
333 + ewarn "Be aware the this release contains the best of all of Samba's"
334 + ewarn "technology parts, both a file server (that you can reasonably expect"
335 + ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
336 + ewarn "controller work previously known as 'samba4'."
337 +
338 + elog "For further information and migration steps make sure to read "
339 + elog "http://samba.org/samba/history/${P}.html "
340 + elog "http://samba.org/samba/history/${PN}-4.5.0.html and"
341 + elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
342 +}