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, 28 Nov 2019 16:54:38
Message-Id: 1574960065.6a52c0653ca9327faa6f040edec3ab7d51561f0b.polynomial-c@gentoo
1 commit: 6a52c0653ca9327faa6f040edec3ab7d51561f0b
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 28 16:53:55 2019 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 28 16:54:25 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6a52c065
7
8 net-fs/samba: Bump to version 4.9.16
9
10 Package-Manager: Portage-2.3.80, Repoman-2.3.19
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 net-fs/samba/Manifest | 1 +
14 net-fs/samba/samba-4.9.16.ebuild | 308 +++++++++++++++++++++++++++++++++++++++
15 2 files changed, 309 insertions(+)
16
17 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
18 index d01ae4811d0..c98d5997b9a 100644
19 --- a/net-fs/samba/Manifest
20 +++ b/net-fs/samba/Manifest
21 @@ -9,3 +9,4 @@ DIST samba-4.8.12.tar.gz 17764832 BLAKE2B d2c0c8b9090da7c94b9343fd3f416e9aafad64
22 DIST samba-4.8.6.tar.gz 17723841 BLAKE2B 38da52e14b4417f26462eef2226c4498e54d2c276b4056e8c6d6c66079f33bcda24c1eab30b29bc7413280ec89a74a55e043e8274ac50f9a25bae7563717ff34 SHA512 f6afab5ca466bd8653a56c205b71ce94ecf0ad0c6e4c9d64cbba7b1e56f1987bc2022e6b629d87eb6078e3f6ba53833c19cfb41e40b6d589e4317ea9d85de273
23 DIST samba-4.9.13.tar.gz 18109481 BLAKE2B 948ef6b0e1a9796c70635119f5aea5887e9f1c1d2a5264d072f3f3d218dfae3b6a16c640233063c9df0670dc7835a92a8c97447f57518aa9d387bc5d04831675 SHA512 ce80486c9ab093d44ee68b0e2ab28f9af97c7ed00cca1b8a0c65de18254ae40759a1e9fcb9a0ba18006aa296c6a6fbadf53dcd730785a96ac0c167efdbe9d3ae
24 DIST samba-4.9.15.tar.gz 18110369 BLAKE2B fb09601f424b7e0368328023a80c3dbfcfc48e6d66d59bf13b828e9706d3e663b8fc80f0baecdc6b646855750e64f96d961edbeaf2110b6432568f600f9ddad6 SHA512 6eb589ad3a5070b5649f1c76bafd2d691c3efbef264a100f5cdda457ccdb633fcbe64a9c4f7f0b8a5422fa08aa73534dc6f87248c6c871a1fa09577364e962c0
25 +DIST samba-4.9.16.tar.gz 18110660 BLAKE2B 5a75fb9b0010ce7a2eec00e911744a2b180525eea06ca08126bbfd558928e4165ed32da449ee31ee8e7f1bc705949548b9a6da8ed60de23a616bdb0acd020690 SHA512 bd9e7ee68351f0a7d006b47ed102bbd2984c08b483b20f4cf1db0354bef725d2e77816f7f3c3a20da46f69c4c9a476a18d22b8197414ea427abbd3acf6be6db0
26
27 diff --git a/net-fs/samba/samba-4.9.16.ebuild b/net-fs/samba/samba-4.9.16.ebuild
28 new file mode 100644
29 index 00000000000..0253eb32433
30 --- /dev/null
31 +++ b/net-fs/samba/samba-4.9.16.ebuild
32 @@ -0,0 +1,308 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=6
37 +PYTHON_COMPAT=( python2_7 )
38 +PYTHON_REQ_USE='threads(+),xml(+)'
39 +
40 +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam
41 +
42 +MY_PV="${PV/_rc/rc}"
43 +MY_P="${PN}-${MY_PV}"
44 +
45 +SRC_PATH="stable"
46 +[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
47 +
48 +SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz"
49 +[[ ${PV} = *_rc* ]] || \
50 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
51 +
52 +DESCRIPTION="Samba Suite Version 4"
53 +HOMEPAGE="https://www.samba.org/"
54 +LICENSE="GPL-3"
55 +
56 +SLOT="0"
57 +
58 +IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg
59 +iprint json ldap pam profiling-data python quota selinux syslog system-heimdal
60 ++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 + net-libs/libnsl:=[${MULTILIB_USEDEP}]
84 + sys-apps/attr[${MULTILIB_USEDEP}]
85 + >=sys-libs/ldb-1.4.8[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
86 + <sys-libs/ldb-1.5.0[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.14[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
91 + >=sys-libs/tdb-1.3.16[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
92 + >=sys-libs/tevent-0.9.37[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
93 + sys-libs/zlib[${MULTILIB_USEDEP}]
94 + virtual/libiconv
95 + pam? ( sys-libs/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? (
103 + net-libs/rpcsvc-proto
104 + !dev-db/ctdb
105 + )
106 + cups? ( net-print/cups )
107 + debug? ( dev-util/lttng-ust )
108 + dmapi? ( sys-apps/dmapi )
109 + fam? ( virtual/fam )
110 + gnutls? (
111 + dev-libs/libgcrypt:0
112 + >=net-libs/gnutls-1.4.0
113 + )
114 + gpg? ( app-crypt/gpgme )
115 + json? ( dev-libs/jansson )
116 + ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
117 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
118 + system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
119 + systemd? ( sys-apps/systemd:0= )
120 + zeroconf? ( net-dns/avahi )
121 +"
122 +DEPEND="${CDEPEND}
123 + ${PYTHON_DEPS}
124 + app-text/docbook-xsl-stylesheets
125 + dev-libs/libxslt
126 + net-libs/libtirpc[${MULTILIB_USEDEP}]
127 + virtual/pkgconfig
128 + || (
129 + net-libs/rpcsvc-proto
130 + <sys-libs/glibc-2.26[rpc(+)]
131 + )
132 + test? (
133 + !system-mitkrb5? (
134 + >=sys-libs/nss_wrapper-1.1.3
135 + >=net-dns/resolv_wrapper-1.1.4
136 + >=net-libs/socket_wrapper-1.1.9
137 + >=sys-libs/uid_wrapper-1.2.1
138 + )
139 + )"
140 +RDEPEND="${CDEPEND}
141 + python? ( ${PYTHON_DEPS} )
142 + client? ( net-fs/cifs-utils[ads?] )
143 + selinux? ( sec-policy/selinux-samba )
144 + !dev-perl/Parse-Yapp
145 +"
146 +
147 +REQUIRED_USE="
148 + addc? ( python gnutls json winbind )
149 + addns? ( python )
150 + ads? ( acl gnutls ldap winbind )
151 + cluster? ( ads )
152 + gpg? ( addc )
153 + test? ( python )
154 + ?? ( system-heimdal system-mitkrb5 )
155 + ${PYTHON_REQUIRED_USE}
156 +"
157 +
158 +# the test suite is messed, it uses system-installed samba
159 +# bits instead of what was built, tests things disabled via use
160 +# flags, and generally just fails to work in a way ebuilds could
161 +# rely on in its current state
162 +RESTRICT="test"
163 +
164 +S="${WORKDIR}/${MY_P}"
165 +
166 +PATCHES=(
167 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
168 + "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
169 + "${FILESDIR}/${PN}-4.9.2-timespec.patch"
170 +)
171 +
172 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
173 +CONFDIR="${FILESDIR}/4.4"
174 +
175 +WAF_BINARY="${S}/buildtools/bin/waf"
176 +
177 +SHAREDMODS=""
178 +
179 +pkg_setup() {
180 + python-single-r1_pkg_setup
181 + if use cluster ; then
182 + SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
183 + elif use ads ; then
184 + SHAREDMODS="idmap_ad"
185 + fi
186 +}
187 +
188 +src_prepare() {
189 + default
190 +
191 + # un-bundle dnspython
192 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
193 +
194 + # unbundle iso8601 unless tests are enabled
195 + if ! use test ; then
196 + sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
197 + fi
198 +
199 + # ugly hackaround for bug #592502
200 + cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
201 +
202 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
203 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
204 + || die
205 +
206 + # Friggin' WAF shit
207 + multilib_copy_sources
208 +}
209 +
210 +multilib_src_configure() {
211 + # when specifying libs for samba build you must append NONE to the end to
212 + # stop it automatically including things
213 + local bundled_libs="NONE"
214 + if ! use system-heimdal && ! use system-mitkrb5 ; then
215 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
216 + fi
217 +
218 + local myconf=(
219 + --enable-fhs
220 + --sysconfdir="${EPREFIX}/etc"
221 + --localstatedir="${EPREFIX}/var"
222 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
223 + --with-piddir="${EPREFIX}/run/${PN}"
224 + --bundled-libraries="${bundled_libs}"
225 + --builtin-libraries=NONE
226 + --disable-rpath
227 + --disable-rpath-install
228 + --nopyc
229 + --nopyo
230 + $(multilib_native_use_with acl acl-support)
231 + $(multilib_native_usex addc '' '--without-ad-dc')
232 + $(multilib_native_use_with addns dnsupdate)
233 + $(multilib_native_use_with ads)
234 + $(multilib_native_use_enable ceph cephfs)
235 + $(multilib_native_use_with cluster cluster-support)
236 + $(multilib_native_use_enable cups)
237 + $(multilib_native_use_with dmapi)
238 + $(multilib_native_use_with fam)
239 + $(multilib_native_use_with gpg gpgme)
240 + $(multilib_native_use_with json json-audit)
241 + $(multilib_native_use_enable iprint)
242 + $(multilib_native_use_with pam)
243 + $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
244 + $(multilib_native_use_with quota quotas)
245 + $(multilib_native_use_with syslog)
246 + $(multilib_native_use_with systemd)
247 + $(multilib_native_use_with winbind)
248 + $(multilib_native_usex python '' '--disable-python')
249 + $(multilib_native_use_enable zeroconf avahi)
250 + $(multilib_native_usex test '--enable-selftest' '')
251 + $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
252 + $(use_enable gnutls)
253 + $(use_with debug lttng)
254 + $(use_with ldap)
255 + $(use_with profiling-data)
256 + )
257 + multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} )
258 +
259 + CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
260 + waf-utils_src_configure ${myconf[@]}
261 +}
262 +
263 +multilib_src_compile() {
264 + waf-utils_src_compile
265 +}
266 +
267 +multilib_src_install() {
268 + waf-utils_src_install
269 +
270 + # Make all .so files executable
271 + find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
272 +
273 + if multilib_is_native_abi ; then
274 + # install ldap schema for server (bug #491002)
275 + if use ldap ; then
276 + insinto /etc/openldap/schema
277 + doins examples/LDAP/samba.schema
278 + fi
279 +
280 + # create symlink for cups (bug #552310)
281 + if use cups ; then
282 + dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
283 + fi
284 +
285 + # install example config file
286 + insinto /etc/samba
287 + doins examples/smb.conf.default
288 +
289 + # Fix paths in example file (#603964)
290 + sed \
291 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
292 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
293 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
294 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
295 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
296 + -i "${ED%/}"/etc/samba/smb.conf.default || die
297 +
298 + # Install init script and conf.d file
299 + newinitd "${CONFDIR}/samba4.initd-r1" samba
300 + newconfd "${CONFDIR}/samba4.confd" samba
301 +
302 + systemd_dotmpfilesd "${FILESDIR}"/samba.conf
303 + systemd_dounit "${FILESDIR}"/nmbd.service
304 + systemd_dounit "${FILESDIR}"/smbd.{service,socket}
305 + systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
306 + systemd_dounit "${FILESDIR}"/winbindd.service
307 + systemd_dounit "${FILESDIR}"/samba.service
308 + fi
309 +
310 + if use pam && use winbind ; then
311 + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
312 + # bugs #376853 and #590374
313 + insinto /etc/security
314 + doins examples/pam_winbind/pam_winbind.conf || die
315 + fi
316 +
317 + keepdir /var/cache/samba
318 + keepdir /var/lib/ctdb
319 + keepdir /var/lib/samba/{bind-dns,private}
320 + keepdir /var/lock/samba
321 + keepdir /var/log/samba
322 + keepdir /var/run/{ctdb,samba}
323 +}
324 +
325 +multilib_src_test() {
326 + if multilib_is_native_abi ; then
327 + "${WAF_BINARY}" test || die "test failed"
328 + fi
329 +}
330 +
331 +pkg_postinst() {
332 + ewarn "Be aware the this release contains the best of all of Samba's"
333 + ewarn "technology parts, both a file server (that you can reasonably expect"
334 + ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
335 + ewarn "controller work previously known as 'samba4'."
336 +
337 + elog "For further information and migration steps make sure to read "
338 + elog "https://samba.org/samba/history/${P}.html "
339 + elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
340 +}