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, 08 Feb 2018 13:40:22
Message-Id: 1518097198.fe37597bec3b84371f1737fcfc88588aa26edeaf.polynomial-c@gentoo
1 commit: fe37597bec3b84371f1737fcfc88588aa26edeaf
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Feb 8 13:22:36 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Feb 8 13:39:58 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fe37597b
7
8 net-fs/samba: Bump to version 4.7.5
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.7.5.ebuild | 306 ++++++++++++++++++++++++++++++++++++++++
14 2 files changed, 307 insertions(+)
15
16 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
17 index 55dd1a9bc49..0bca29a340b 100644
18 --- a/net-fs/samba/Manifest
19 +++ b/net-fs/samba/Manifest
20 @@ -7,6 +7,7 @@ DIST samba-4.6.12.tar.gz 21160637 BLAKE2B b12046423f103883fd2d9b5ce12af2bea25c2b
21 DIST samba-4.6.7-disable-python-patches.tar.xz 8896 BLAKE2B 99496f91d015f10d111e2a8738c9e66b3c1f1958c0e0894d8e9d8f3ff141fbedaa25d93699b702ab69130fda770c80c3ed4280de0af1090dedbcfd5784b72222 SHA512 c45e548a49735e17b568bebf07dc7409de3de0f93256d1dcf345d2723a27d22a51d860ed921785354fda691f83be4eca3b9d618d5c332438ebf97518a01983eb
22 DIST samba-4.7.3.tar.gz 16845436 BLAKE2B d38f58a944d19f4475ab636f09a4f9b97b92897b1d8d041efc07e1d2724d07fafa3686b5d38b847b896c4f024f5cf7330eaca4b6eb4cd34da73a32fe94e8c69e SHA512 3fd9d5f208201e3137c5966e10878ba2fc00fa80b3468e8b402e08f941b5508edd7181720033aaa25fcff0ee0ae5438619423d41a9b9b3d14dc3743fbe3f902f
23 DIST samba-4.7.4.tar.gz 16853555 BLAKE2B 3907b9ecb55f3ff02cec8bfac6e7410595ccc77baef27a2ec12ebbb94e66860497a60b4c6166bf39e580a5e4c5233780bb8117dc1498e722ac34185bd0ccde7b SHA512 50af2ed0586116171b2fabb96a05118c447cd5a165a5328b02be832fda9eb1465052a6670415831484639921164ddbf03b6ec47857244cc164ea5a9e4e39cf65
24 +DIST samba-4.7.5.tar.gz 16862398 BLAKE2B dd5fc044e70483dc04e423ee8221afaeb90b1bfaf4ace434000b89d28248b4d9c73a11c15acca31e4b81d27b89f789b59de3da4e27faa4fa5eb025cde112e824 SHA512 1cd70ebbe59e467701e6607147d19492c3fdad99371aa182ded9e4e2f37a53c76c04e796725bd747e5e1fb882bfb73d82a0d26f25de5ef135266d33be9f7fb61
25 DIST samba-4.8.0rc2.tar.gz 17619396 BLAKE2B 3fc9a7f696df012ba1e1c9d131d650aaec27296b50a2a56d7941b066d164252b34bf9dad3119bb4f99b5a09eb11501a39bfb23d64e33c72e245fa825b418b573 SHA512 215c093b2144a858e646a075eeabfdd90790c7e6eeaed39cede98b254a68fc74dd93e3be314659d60437cbcdfc604b74f3b7faa75088bcf858e23a4a34dfb105
26 DIST samba-disable-python-patches-4.2.12.tar.xz 6052 BLAKE2B 0ae755cbbd8921f4e2f5adf797cd3a77f81bb15ac2d1a65645bc9b53184c397a2bb35f83b88a0de680cc834a63b263e883e91206a7df99735f5ef8f091f54bb0 SHA512 c527d0a052d3211e5b12c17bc94db56cc5e5545189ed65a760c0656c94c22e27a4b159e6439eb0370873e1619873a741f3b3bd10d3876b38eb3914a87eace372
27 DIST samba-disable-python-patches-4.5.0_rc1.tar.xz 6204 BLAKE2B b46ea587df583ea71c8ac3d6ce3045d80bcb0cc3d7eab8fa23f812d76dcb6258e4fbec7723128da29fa5369b9372370145904798b21d4e75bb62946ddd98bc0e SHA512 920089ba3c6e8e7d913b1d7ef1017262a19d1af41215adb30cfc98a57556efc4b0116931d4ef774c01124149d8eca2be3a23814ce7e11daf0180d2c111799927
28
29 diff --git a/net-fs/samba/samba-4.7.5.ebuild b/net-fs/samba/samba-4.7.5.ebuild
30 new file mode 100644
31 index 00000000000..a17bcfa82ac
32 --- /dev/null
33 +++ b/net-fs/samba/samba-4.7.5.ebuild
34 @@ -0,0 +1,306 @@
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 +[[ ${PV} = *_rc* ]] || \
52 +KEYWORDS="~amd64 ~arm64 ~x86"
53 +
54 +DESCRIPTION="Samba Suite Version 4"
55 +HOMEPAGE="http://www.samba.org/"
56 +LICENSE="GPL-3"
57 +
58 +SLOT="0"
59 +
60 +IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg iprint ldap pam python
61 +quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
62 +
63 +MULTILIB_WRAPPED_HEADERS=(
64 + /usr/include/samba-4.0/policy.h
65 + /usr/include/samba-4.0/dcerpc_server.h
66 + /usr/include/samba-4.0/ctdb.h
67 + /usr/include/samba-4.0/ctdb_client.h
68 + /usr/include/samba-4.0/ctdb_protocol.h
69 + /usr/include/samba-4.0/ctdb_private.h
70 + /usr/include/samba-4.0/ctdb_typesafe_cb.h
71 + /usr/include/samba-4.0/ctdb_version.h
72 +)
73 +
74 +# sys-apps/attr is an automagic dependency (see bug #489748)
75 +CDEPEND="
76 + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
77 + dev-lang/perl:=
78 + dev-libs/libaio[${MULTILIB_USEDEP}]
79 + dev-libs/libbsd[${MULTILIB_USEDEP}]
80 + dev-libs/iniparser:0
81 + dev-libs/popt[${MULTILIB_USEDEP}]
82 + dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
83 + >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
84 + sys-apps/attr[${MULTILIB_USEDEP}]
85 + >=sys-libs/ldb-1.2.2[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
86 + sys-libs/libcap
87 + sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
88 + sys-libs/readline:0=
89 + >=sys-libs/talloc-2.1.9[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
90 + >=sys-libs/tdb-1.3.14[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
91 + >=sys-libs/tevent-0.9.34[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
92 + sys-libs/zlib[${MULTILIB_USEDEP}]
93 + virtual/libiconv
94 + pam? ( virtual/pam )
95 + acl? ( virtual/acl )
96 + addns? (
97 + net-dns/bind-tools[gssapi]
98 + dev-python/dnspython:=[${PYTHON_USEDEP}]
99 + )
100 + ceph? ( sys-cluster/ceph )
101 + cluster? ( !dev-db/ctdb )
102 + cups? ( net-print/cups )
103 + debug? ( dev-util/lttng-ust )
104 + dmapi? ( sys-apps/dmapi )
105 + fam? ( virtual/fam )
106 + gnutls? (
107 + dev-libs/libgcrypt:0
108 + >=net-libs/gnutls-1.4.0
109 + )
110 + gpg? ( app-crypt/gpgme )
111 + ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
112 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
113 + system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
114 + systemd? ( sys-apps/systemd:0= )"
115 +DEPEND="${CDEPEND}
116 + ${PYTHON_DEPS}
117 + app-text/docbook-xsl-stylesheets
118 + dev-libs/libxslt
119 + virtual/pkgconfig
120 + test? (
121 + !system-mitkrb5? (
122 + >=sys-libs/nss_wrapper-1.1.3
123 + >=net-dns/resolv_wrapper-1.1.4
124 + >=net-libs/socket_wrapper-1.1.7
125 + >=sys-libs/uid_wrapper-1.2.1
126 + )
127 + )"
128 +RDEPEND="${CDEPEND}
129 + python? ( ${PYTHON_DEPS} )
130 + client? ( net-fs/cifs-utils[ads?] )
131 + selinux? ( sec-policy/selinux-samba )
132 + !dev-perl/Parse-Yapp
133 +"
134 +
135 +REQUIRED_USE="addc? ( python gnutls )
136 + test? ( python )
137 + addns? ( python )
138 + ads? ( acl gnutls ldap )
139 + gpg? ( addc )
140 + ?? ( system-heimdal system-mitkrb5 )
141 + ${PYTHON_REQUIRED_USE}"
142 +
143 +# the test suite is messed, it uses system-installed samba
144 +# bits instead of what was built, tests things disabled via use
145 +# flags, and generally just fails to work in a way ebuilds could
146 +# rely on in its current state
147 +RESTRICT="test"
148 +
149 +S="${WORKDIR}/${MY_P}"
150 +
151 +PATCHES=(
152 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
153 + "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
154 + "${FILESDIR}"/talloc-disable-python.patch
155 + "${FILESDIR}/${PN}-4.7.3-krb-cross-compile.patch"
156 + "${FILESDIR}/${PN}-4.7.4-no_ads.patch"
157 +)
158 +
159 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
160 +CONFDIR="${FILESDIR}/4.4"
161 +
162 +WAF_BINARY="${S}/buildtools/bin/waf"
163 +
164 +SHAREDMODS=""
165 +
166 +pkg_setup() {
167 + python-single-r1_pkg_setup
168 + if use cluster ; then
169 + SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
170 + elif use ads ; then
171 + SHAREDMODS="idmap_ad"
172 + fi
173 +}
174 +
175 +src_prepare() {
176 + default
177 +
178 + # un-bundle dnspython
179 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
180 +
181 + # unbundle iso8601 unless tests are enabled
182 + use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
183 +
184 + # ugly hackaround for bug #592502
185 + cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
186 +
187 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
188 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
189 + || die
190 +
191 + # Friggin' WAF shit
192 + multilib_copy_sources
193 +}
194 +
195 +multilib_src_configure() {
196 + # when specifying libs for samba build you must append NONE to the end to
197 + # stop it automatically including things
198 + local bundled_libs="NONE"
199 + if ! use system-heimdal && ! use system-mitkrb5 ; then
200 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
201 + fi
202 +
203 + local myconf=()
204 + myconf=(
205 + --enable-fhs
206 + --sysconfdir="${EPREFIX}/etc"
207 + --localstatedir="${EPREFIX}/var"
208 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
209 + --with-piddir="${EPREFIX}/run/${PN}"
210 + --bundled-libraries="${bundled_libs}"
211 + --builtin-libraries=NONE
212 + --disable-rpath
213 + --disable-rpath-install
214 + --nopyc
215 + --nopyo
216 + )
217 + if multilib_is_native_abi ; then
218 + myconf+=(
219 + $(use_with acl acl-support)
220 + $(usex addc '' '--without-ad-dc')
221 + $(use_with addns dnsupdate)
222 + $(use_with ads)
223 + $(use_enable ceph cephfs)
224 + $(use_with cluster cluster-support)
225 + $(use_enable cups)
226 + $(use_with debug lttng)
227 + $(use_with dmapi)
228 + $(use_with fam)
229 + $(use_enable gnutls)
230 + $(use_with gpg gpgme)
231 + $(use_enable iprint)
232 + $(use_with ldap)
233 + $(use_with pam)
234 + $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
235 + $(use_with quota quotas)
236 + $(use_with syslog)
237 + $(use_with systemd)
238 + $(usex system-mitkrb5 '--with-system-mitkrb5' '')
239 + $(use_with winbind)
240 + $(usex python '' '--disable-python')
241 + $(usex test '--enable-selftest' '')
242 + $(use_enable zeroconf avahi)
243 + --with-shared-modules=${SHAREDMODS}
244 + )
245 + else
246 + myconf+=(
247 + --without-acl-support
248 + --without-ad-dc
249 + --without-dnsupdate
250 + --without-ads
251 + --disable-avahi
252 + --disable-cephfs
253 + --without-cluster-support
254 + --disable-cups
255 + --without-dmapi
256 + --without-fam
257 + --disable-gnutls
258 + --without-gpgme
259 + --disable-iprint
260 + $(use_with ldap)
261 + $(use_with debug lttng)
262 + --without-pam
263 + --without-quotas
264 + --without-syslog
265 + --without-systemd
266 + $(usex system-mitkrb5 '--with-system-mitkrb5' '')
267 + --without-winbind
268 + --disable-python
269 + )
270 + fi
271 +
272 + CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
273 + waf-utils_src_configure ${myconf[@]}
274 +}
275 +
276 +multilib_src_compile() {
277 + waf-utils_src_compile
278 +}
279 +
280 +multilib_src_install() {
281 + waf-utils_src_install
282 +
283 + # Make all .so files executable
284 + find "${D}" -type f -name "*.so" -exec chmod +x {} +
285 +
286 + if multilib_is_native_abi; then
287 + # install ldap schema for server (bug #491002)
288 + if use ldap ; then
289 + insinto /etc/openldap/schema
290 + doins examples/LDAP/samba.schema
291 + fi
292 +
293 + # create symlink for cups (bug #552310)
294 + if use cups ; then
295 + dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
296 + fi
297 +
298 + # install example config file
299 + insinto /etc/samba
300 + doins examples/smb.conf.default
301 +
302 + # Fix paths in example file (#603964)
303 + sed \
304 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
305 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
306 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
307 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
308 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
309 + -i "${ED%/}"/etc/samba/smb.conf.default || die
310 +
311 + # Install init script and conf.d file
312 + newinitd "${CONFDIR}/samba4.initd-r1" samba
313 + newconfd "${CONFDIR}/samba4.confd" samba
314 +
315 + systemd_dotmpfilesd "${FILESDIR}"/samba.conf
316 + systemd_dounit "${FILESDIR}"/nmbd.service
317 + systemd_dounit "${FILESDIR}"/smbd.{service,socket}
318 + systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
319 + systemd_dounit "${FILESDIR}"/winbindd.service
320 + systemd_dounit "${FILESDIR}"/samba.service
321 + fi
322 +}
323 +
324 +multilib_src_test() {
325 + if multilib_is_native_abi ; then
326 + "${WAF_BINARY}" test || die "test failed"
327 + fi
328 +}
329 +
330 +pkg_postinst() {
331 + ewarn "Be aware the this release contains the best of all of Samba's"
332 + ewarn "technology parts, both a file server (that you can reasonably expect"
333 + ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
334 + ewarn "controller work previously known as 'samba4'."
335 +
336 + elog "For further information and migration steps make sure to read "
337 + elog "http://samba.org/samba/history/${P}.html "
338 + elog "http://samba.org/samba/history/${PN}-4.5.0.html and"
339 + elog "http://wiki.samba.org/index.php/Samba4/HOWTO "
340 +}