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