Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/samba/
Date: Thu, 15 Feb 2018 08:57:43
Message-Id: 1518684868.668f518cbb5c99e751f22408fddc77f96a3323d9.polynomial-c@gentoo
1 commit: 668f518cbb5c99e751f22408fddc77f96a3323d9
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 15 08:54:28 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 15 08:54:28 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=668f518c
7
8 net-fs/samba: Bump to version 4.6.13
9
10 Package-Manager: Portage-2.3.24, Repoman-2.3.6
11
12 net-fs/samba/Manifest | 1 +
13 net-fs/samba/samba-4.6.13.ebuild | 308 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 309 insertions(+)
15
16 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
17 index 4d88f95cc3d..1996e4e11eb 100644
18 --- a/net-fs/samba/Manifest
19 +++ b/net-fs/samba/Manifest
20 @@ -4,6 +4,7 @@ DIST samba-4.5.11-disable-python-patches.tar.xz 6292 BLAKE2B c2a32a1059a02bc1c87
21 DIST samba-4.5.15.tar.gz 21020181 BLAKE2B 0d113c4d3147102e2cc192a14d145c46930b8f772683bc27e90b264e43c5660298e468c494de41e80fb2dcd80a0dbef0b9ce1f74dc9e89eca52865ceba605382 SHA512 e77d746767d55ff933cddbb4d6e0f97f0b12e630c564852bee02f5f9764633167f1c098df7606af2a1930a9bdd4665fb79d7748ff07532db4e9a581fb639450c
22 DIST samba-4.6.11.tar.gz 21157318 BLAKE2B 7784b898fdf5bf96f3d0b0d3786be20aab55b05a76f4ccafe77c8882aa980e74a39a8747ef68d80965010c6bc316e3c271c942594a8874801f9358721c8fdbe9 SHA512 8acb0620cc7fa87692edfa1b42883384b1ae88c6b9d75432169d53c1c6f20415ed4980b2ba9d023cc69a8a1b457bcb25ecea9bdf427accfe9fc05431c3480283
23 DIST samba-4.6.12.tar.gz 21160637 BLAKE2B b12046423f103883fd2d9b5ce12af2bea25c2b26bf8c039619359b789e675f963aec044e11443a8f6a865ea8564d58fe12d5268f00d71c9544e1abd27e9647f7 SHA512 e45a6ee43bcb2fba224bf38771d30daace46ad92b05f580a261aaacf7de9eca3d71cb4f4b2f956d83d84df489cb6f015b3b7abb42702ed2936bf92faa945340c
24 +DIST samba-4.6.13.tar.gz 21160952 BLAKE2B 6d7927f00c8d013f8ce702168f5810fb112b0e89f3e298178d6e7bf98f0cb8182e54eb9efe2b74c41d16af751ced0a536e08c93b0527c5c88502b7e1f908042b SHA512 bc6ef2558cbdd3d093f5d29e5a79b069b6a4dabdad4becaf0010514c5d67646f5e6ec8d8dbefa1e6ba7891b3e0eb728bcb91522ba910947f90841437b9fe7dda
25 DIST samba-4.6.7-disable-python-patches.tar.xz 8896 BLAKE2B 99496f91d015f10d111e2a8738c9e66b3c1f1958c0e0894d8e9d8f3ff141fbedaa25d93699b702ab69130fda770c80c3ed4280de0af1090dedbcfd5784b72222 SHA512 c45e548a49735e17b568bebf07dc7409de3de0f93256d1dcf345d2723a27d22a51d860ed921785354fda691f83be4eca3b9d618d5c332438ebf97518a01983eb
26 DIST samba-4.7.4.tar.gz 16853555 BLAKE2B 3907b9ecb55f3ff02cec8bfac6e7410595ccc77baef27a2ec12ebbb94e66860497a60b4c6166bf39e580a5e4c5233780bb8117dc1498e722ac34185bd0ccde7b SHA512 50af2ed0586116171b2fabb96a05118c447cd5a165a5328b02be832fda9eb1465052a6670415831484639921164ddbf03b6ec47857244cc164ea5a9e4e39cf65
27 DIST samba-4.7.5.tar.gz 16862398 BLAKE2B dd5fc044e70483dc04e423ee8221afaeb90b1bfaf4ace434000b89d28248b4d9c73a11c15acca31e4b81d27b89f789b59de3da4e27faa4fa5eb025cde112e824 SHA512 1cd70ebbe59e467701e6607147d19492c3fdad99371aa182ded9e4e2f37a53c76c04e796725bd747e5e1fb882bfb73d82a0d26f25de5ef135266d33be9f7fb61
28
29 diff --git a/net-fs/samba/samba-4.6.13.ebuild b/net-fs/samba/samba-4.6.13.ebuild
30 new file mode 100644
31 index 00000000000..ff66041de15
32 --- /dev/null
33 +++ b/net-fs/samba/samba-4.6.13.ebuild
34 @@ -0,0 +1,308 @@
35 +# Copyright 1999-2018 Gentoo Foundation
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=6
39 +PYTHON_COMPAT=( python2_7 )
40 +PYTHON_REQ_USE='threads(+),xml(+)'
41 +
42 +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils
43 +
44 +MY_PV="${PV/_rc/rc}"
45 +MY_P="${PN}-${MY_PV}"
46 +
47 +SRC_PATH="stable"
48 +[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
49 +
50 +SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz
51 + https://dev.gentoo.org/~axs/samba-4.6.7-disable-python-patches.tar.xz"
52 +[[ ${PV} = *_rc* ]] || \
53 +KEYWORDS="~amd64 ~arm64 ~x86"
54 +
55 +DESCRIPTION="Samba Suite Version 4"
56 +HOMEPAGE="http://www.samba.org/"
57 +LICENSE="GPL-3"
58 +
59 +SLOT="0"
60 +
61 +IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg iprint ldap pam python
62 +quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
63 +
64 +MULTILIB_WRAPPED_HEADERS=(
65 + /usr/include/samba-4.0/policy.h
66 + /usr/include/samba-4.0/dcerpc_server.h
67 + /usr/include/samba-4.0/ctdb.h
68 + /usr/include/samba-4.0/ctdb_client.h
69 + /usr/include/samba-4.0/ctdb_protocol.h
70 + /usr/include/samba-4.0/ctdb_private.h
71 + /usr/include/samba-4.0/ctdb_typesafe_cb.h
72 + /usr/include/samba-4.0/ctdb_version.h
73 +)
74 +
75 +# sys-apps/attr is an automagic dependency (see bug #489748)
76 +CDEPEND="
77 + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
78 + dev-lang/perl:=
79 + dev-libs/libaio[${MULTILIB_USEDEP}]
80 + dev-libs/libbsd[${MULTILIB_USEDEP}]
81 + dev-libs/iniparser:0
82 + dev-libs/popt[${MULTILIB_USEDEP}]
83 + dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
84 + >=dev-util/cmocka-1.0.0[${MULTILIB_USEDEP}]
85 + sys-apps/attr[${MULTILIB_USEDEP}]
86 + ~sys-libs/ldb-1.1.29[ldap(+)?,python(+),${PYTHON_USEDEP},${MULTILIB_USEDEP}]
87 + sys-libs/libcap
88 + sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
89 + sys-libs/readline:0=
90 + >=sys-libs/talloc-2.1.9[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
91 + >=sys-libs/tdb-1.3.12[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
92 + >=sys-libs/tevent-0.9.34[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
93 + sys-libs/zlib[${MULTILIB_USEDEP}]
94 + virtual/libiconv
95 + pam? ( virtual/pam )
96 + acl? ( virtual/acl )
97 + addns? (
98 + net-dns/bind-tools[gssapi]
99 + dev-python/dnspython:=[${PYTHON_USEDEP}]
100 + )
101 + ceph? ( sys-cluster/ceph )
102 + cluster? ( !dev-db/ctdb )
103 + cups? ( net-print/cups )
104 + debug? ( dev-util/lttng-ust )
105 + dmapi? ( sys-apps/dmapi )
106 + fam? ( virtual/fam )
107 + gnutls? (
108 + dev-libs/libgcrypt:0
109 + >=net-libs/gnutls-1.4.0
110 + )
111 + gpg? ( app-crypt/gpgme )
112 + ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
113 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
114 + system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] )
115 + systemd? ( sys-apps/systemd:0= )"
116 +DEPEND="${CDEPEND}
117 + ${PYTHON_DEPS}
118 + app-text/docbook-xsl-stylesheets
119 + dev-libs/libxslt
120 + virtual/pkgconfig
121 + test? (
122 + !system-mitkrb5? (
123 + >=sys-libs/nss_wrapper-1.1.3
124 + >=net-dns/resolv_wrapper-1.1.4
125 + >=net-libs/socket_wrapper-1.1.7
126 + >=sys-libs/uid_wrapper-1.2.1
127 + )
128 + )"
129 +RDEPEND="${CDEPEND}
130 + python? ( ${PYTHON_DEPS} )
131 + client? ( net-fs/cifs-utils[ads?] )
132 + selinux? ( sec-policy/selinux-samba )
133 + !dev-perl/Parse-Yapp
134 +"
135 +
136 +REQUIRED_USE="addc? ( python gnutls !system-mitkrb5 )
137 + test? ( python )
138 + addns? ( python )
139 + ads? ( acl gnutls ldap )
140 + gpg? ( addc )
141 + ?? ( system-heimdal system-mitkrb5 )
142 + ${PYTHON_REQUIRED_USE}"
143 +
144 +# the test suite is messed, it uses system-installed samba
145 +# bits instead of what was built, tests things disabled via use
146 +# flags, and generally just fails to work in a way ebuilds could
147 +# rely on in its current state
148 +RESTRICT="test"
149 +
150 +S="${WORKDIR}/${MY_P}"
151 +
152 +PATCHES=(
153 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
154 + "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
155 + "${FILESDIR}/${PN}-glibc-2.26-no_rpc.patch" #637320
156 +)
157 +
158 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
159 +CONFDIR="${FILESDIR}/4.4"
160 +
161 +WAF_BINARY="${S}/buildtools/bin/waf"
162 +
163 +SHAREDMODS=""
164 +
165 +pkg_setup() {
166 + python-single-r1_pkg_setup
167 + if use cluster ; then
168 + SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
169 + elif use ads ; then
170 + SHAREDMODS="idmap_ad"
171 + fi
172 +}
173 +
174 +src_prepare() {
175 + default
176 +
177 + # install the patches from tarball(s)
178 + eapply "${WORKDIR}/patches"
179 +
180 + # un-bundle dnspython
181 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
182 +
183 + # unbundle iso8601 unless tests are enabled
184 + use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
185 +
186 + # ugly hackaround for bug #592502
187 + cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
188 +
189 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
190 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
191 + || die
192 +
193 + # Friggin' WAF shit
194 + multilib_copy_sources
195 +}
196 +
197 +multilib_src_configure() {
198 + # when specifying libs for samba build you must append NONE to the end to
199 + # stop it automatically including things
200 + local bundled_libs="NONE"
201 + if ! use system-heimdal && ! use system-mitkrb5 ; then
202 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
203 + fi
204 +
205 + local myconf=()
206 + myconf=(
207 + --enable-fhs
208 + --sysconfdir="${EPREFIX}/etc"
209 + --localstatedir="${EPREFIX}/var"
210 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
211 + --with-piddir="${EPREFIX}/run/${PN}"
212 + --bundled-libraries="${bundled_libs}"
213 + --builtin-libraries=NONE
214 + --disable-rpath
215 + --disable-rpath-install
216 + --nopyc
217 + --nopyo
218 + )
219 + if multilib_is_native_abi ; then
220 + myconf+=(
221 + $(use_with acl acl-support)
222 + $(usex addc '' '--without-ad-dc')
223 + $(use_with addns dnsupdate)
224 + $(use_with ads)
225 + $(use_enable ceph cephfs)
226 + $(use_with cluster cluster-support)
227 + $(use_enable cups)
228 + $(use_with debug lttng)
229 + $(use_with dmapi)
230 + $(use_with fam)
231 + $(use_enable gnutls)
232 + $(use_with gpg gpgme)
233 + $(use_enable iprint)
234 + $(use_with ldap)
235 + $(use_with pam)
236 + $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
237 + $(use_with quota quotas)
238 + $(use_with syslog)
239 + $(use_with systemd)
240 + $(usex system-mitkrb5 '--with-system-mitkrb5' '')
241 + $(use_with winbind)
242 + $(usex python '' '--disable-python')
243 + $(usex test '--enable-selftest' '')
244 + $(use_enable zeroconf avahi)
245 + --with-shared-modules=${SHAREDMODS}
246 + )
247 + else
248 + myconf+=(
249 + --without-acl-support
250 + --without-ad-dc
251 + --without-dnsupdate
252 + --without-ads
253 + --disable-avahi
254 + --disable-cephfs
255 + --without-cluster-support
256 + --disable-cups
257 + --without-dmapi
258 + --without-fam
259 + --disable-gnutls
260 + --without-gpgme
261 + --disable-iprint
262 + $(use_with ldap)
263 + $(use_with debug lttng)
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 ../../../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 +}