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: Wed, 06 May 2020 08:14:39
Message-Id: 1588752863.994661d64258ec3161f548ba83fc4e8cfd316c69.polynomial-c@gentoo
1 commit: 994661d64258ec3161f548ba83fc4e8cfd316c69
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed May 6 08:14:23 2020 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed May 6 08:14:23 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=994661d6
7
8 net-fs/samba: Bump to version 4.11.9
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 net-fs/samba/Manifest | 1 +
14 net-fs/samba/samba-4.11.9.ebuild | 314 +++++++++++++++++++++++++++++++++++++++
15 2 files changed, 315 insertions(+)
16
17 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
18 index 4d64378143e..74a3812fbc9 100644
19 --- a/net-fs/samba/Manifest
20 +++ b/net-fs/samba/Manifest
21 @@ -1,4 +1,5 @@
22 DIST samba-4.11.6.tar.gz 18541566 BLAKE2B 2b4a40be7cec8a9706cbc344796885f59403aa11ca3d8a7dc40b3d287ec222c11d7395fd193c4b66c4116f1bffd869caf444a950d508f5a9a596db32553e1461 SHA512 3815080a1693c596a126371a5ea4e8534317a7266803c7de13a7e5b3ee9757dfbf13c0de20d498a6683d3aaf56941ed42f289e3c24f88713529a5f047a691af2
23 DIST samba-4.11.8.tar.gz 18571308 BLAKE2B 024920789ac8fcedfc79f4d094a47e4c1399a0bbc3ad79908f66b9bbabd765865795763c1017cc0caba18dbc11ce6a7e25231804d7dff11ab3d97a599ab8d9ed SHA512 a036c46e060d9edc11bf4e45e0449042fe44b74ff083d305779c68dad943f87fb6d2680f3a68e6bbcd0b19c8c397ec9fc5794229a311c25dad9efc366add613a
24 +DIST samba-4.11.9.tar.gz 18576961 BLAKE2B 584e62df96bd7de6c0ff93f8fb45b85583b048c300cae020e1e1b467e773b4198c215cbef3b9c34ddf2e138118cca1dd7002ab9c671d111606e735ba8595f720 SHA512 77c1e928d23115eed0cc20f5836b02e73a26b0c23b2061c6148177fbf5b140e3d3a7a9fabfee3a2306158bc157708636c58c6655a57a64f0ff9a20c1a91e4f23
25 DIST samba-4.12.1.tar.gz 18159628 BLAKE2B aff697383ed53f4e8d7506ca284d160e76747ea49849c32bfe712fff83cd1a66a835c8da4f325a78599e53dc29f59e626fc7b285c67c5364f180491c3ba62f7d SHA512 2645f72dcc4718bd2e85af73a54b3e6d0ca9e11bd6991a47a6c17a8b89b69f294a0875ef9762dde28a25d1ff030e0e2d0e073a6993e2df0d6b17e75b72d1cd26
26 DIST samba-4.12.2.tar.gz 18192360 BLAKE2B 1ef1b128dc628d5b8b69183fa99eceac27feaea54207eb2e5e2af5882cdf17d2819efbfc9f91cf73a9c744b5ef17c6b8dcd135783da9a36d8c41246d2c4515d0 SHA512 c1d5f62ea2e43c246988aa65c4b690de232f73c0213cbc5d532e43c8cfbea17f1ac92435526b64c9a85c582b29381eecfb57713861efc32f6e6257000c393562
27
28 diff --git a/net-fs/samba/samba-4.11.9.ebuild b/net-fs/samba/samba-4.11.9.ebuild
29 new file mode 100644
30 index 00000000000..3b297505873
31 --- /dev/null
32 +++ b/net-fs/samba/samba-4.11.9.ebuild
33 @@ -0,0 +1,314 @@
34 +# Copyright 1999-2020 Gentoo Authors
35 +# Distributed under the terms of the GNU General Public License v2
36 +
37 +EAPI=6
38 +
39 +PYTHON_COMPAT=( python3_{6,7,8} )
40 +PYTHON_REQ_USE='threads(+),xml(+)'
41 +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam
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="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
52 +
53 +DESCRIPTION="Samba Suite Version 4"
54 +HOMEPAGE="https://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 gpg iprint
60 +json ldap pam profiling-data python quota selinux syslog system-heimdal
61 ++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 +CDEPEND="
75 + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
76 + dev-lang/perl:=
77 + dev-libs/libbsd[${MULTILIB_USEDEP}]
78 + dev-libs/libtasn1[${MULTILIB_USEDEP}]
79 + dev-libs/popt[${MULTILIB_USEDEP}]
80 + >=net-libs/gnutls-3.2.0[${MULTILIB_USEDEP}]
81 + net-libs/libnsl:=[${MULTILIB_USEDEP}]
82 + sys-apps/dbus[${MULTILIB_USEDEP}]
83 + sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
84 + >=sys-libs/ldb-2.0.10[ldap(+)?,python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
85 + <sys-libs/ldb-2.1.0[ldap(+)?,python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
86 + sys-libs/libcap
87 + sys-libs/ncurses:0=
88 + sys-libs/readline:0=
89 + >=sys-libs/talloc-2.2.0[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
90 + >=sys-libs/tdb-1.4.2[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
91 + >=sys-libs/tevent-0.10.0[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}]
92 + sys-libs/zlib[${MULTILIB_USEDEP}]
93 + virtual/libiconv
94 + pam? ( sys-libs/pam )
95 + acl? ( virtual/acl )
96 + $(python_gen_cond_dep "
97 + dev-python/subunit[\${PYTHON_MULTI_USEDEP},${MULTILIB_USEDEP}]
98 + addns? (
99 + net-dns/bind-tools[gssapi]
100 + dev-python/dnspython:=[\${PYTHON_MULTI_USEDEP}]
101 + )
102 + ")
103 + ceph? ( sys-cluster/ceph )
104 + cluster? (
105 + net-libs/rpcsvc-proto
106 + !dev-db/ctdb
107 + )
108 + cups? ( net-print/cups )
109 + debug? ( dev-util/lttng-ust )
110 + dmapi? ( sys-apps/dmapi )
111 + fam? ( virtual/fam )
112 + gpg? ( app-crypt/gpgme )
113 + json? ( dev-libs/jansson )
114 + ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
115 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
116 + system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
117 + systemd? ( sys-apps/systemd:0= )
118 + zeroconf? ( net-dns/avahi )
119 +"
120 +DEPEND="${CDEPEND}
121 + ${PYTHON_DEPS}
122 + app-text/docbook-xsl-stylesheets
123 + dev-libs/libxslt
124 + >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
125 + net-libs/libtirpc[${MULTILIB_USEDEP}]
126 + virtual/pkgconfig
127 + || (
128 + net-libs/rpcsvc-proto
129 + <sys-libs/glibc-2.26[rpc(+)]
130 + )
131 + test? (
132 + !system-mitkrb5? (
133 + >=sys-libs/nss_wrapper-1.1.3
134 + >=net-dns/resolv_wrapper-1.1.4
135 + >=net-libs/socket_wrapper-1.1.9
136 + >=sys-libs/uid_wrapper-1.2.1
137 + )
138 + )"
139 +RDEPEND="${CDEPEND}
140 + python? ( ${PYTHON_DEPS} )
141 + client? ( net-fs/cifs-utils[ads?] )
142 + selinux? ( sec-policy/selinux-samba )
143 + !dev-perl/Parse-Yapp
144 +"
145 +
146 +REQUIRED_USE="
147 + addc? ( python json winbind )
148 + addns? ( python )
149 + ads? ( acl ldap winbind )
150 + cluster? ( ads )
151 + gpg? ( addc )
152 + test? ( python )
153 + ?? ( system-heimdal system-mitkrb5 )
154 + ${PYTHON_REQUIRED_USE}
155 +"
156 +
157 +# the test suite is messed, it uses system-installed samba
158 +# bits instead of what was built, tests things disabled via use
159 +# flags, and generally just fails to work in a way ebuilds could
160 +# rely on in its current state
161 +RESTRICT="test"
162 +
163 +S="${WORKDIR}/${MY_P}"
164 +
165 +PATCHES=(
166 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
167 + "${FILESDIR}/${PN}-4.9.2-timespec.patch"
168 +)
169 +
170 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
171 +CONFDIR="${FILESDIR}/4.4"
172 +
173 +WAF_BINARY="${S}/buildtools/bin/waf"
174 +
175 +SHAREDMODS=""
176 +
177 +pkg_setup() {
178 + python-single-r1_pkg_setup
179 + if use cluster ; then
180 + SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
181 + elif use ads ; then
182 + SHAREDMODS="idmap_ad"
183 + fi
184 +}
185 +
186 +src_prepare() {
187 + default
188 +
189 + # un-bundle dnspython
190 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
191 +
192 + # unbundle iso8601 unless tests are enabled
193 + if ! use test ; then
194 + sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
195 + fi
196 +
197 + ## ugly hackaround for bug #592502
198 + #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
199 +
200 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
201 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
202 + || die
203 +
204 + # Friggin' WAF shit
205 + multilib_copy_sources
206 +}
207 +
208 +multilib_src_configure() {
209 + # when specifying libs for samba build you must append NONE to the end to
210 + # stop it automatically including things
211 + local bundled_libs="NONE"
212 + if ! use system-heimdal && ! use system-mitkrb5 ; then
213 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
214 + fi
215 +
216 + local myconf=(
217 + --enable-fhs
218 + --sysconfdir="${EPREFIX}/etc"
219 + --localstatedir="${EPREFIX}/var"
220 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
221 + --with-piddir="${EPREFIX}/run/${PN}"
222 + --bundled-libraries="${bundled_libs}"
223 + --builtin-libraries=NONE
224 + --disable-rpath
225 + --disable-rpath-install
226 + --nopyc
227 + --nopyo
228 + $(multilib_native_use_with acl acl-support)
229 + $(multilib_native_usex addc '' '--without-ad-dc')
230 + $(multilib_native_use_with addns dnsupdate)
231 + $(multilib_native_use_with ads)
232 + $(multilib_native_use_enable ceph cephfs)
233 + $(multilib_native_use_with cluster cluster-support)
234 + $(multilib_native_use_enable cups)
235 + $(multilib_native_use_with dmapi)
236 + $(multilib_native_use_with fam)
237 + $(multilib_native_use_with gpg gpgme)
238 + $(multilib_native_use_with json)
239 + $(multilib_native_use_enable iprint)
240 + $(multilib_native_use_with pam)
241 + $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
242 + $(multilib_native_use_with quota quotas)
243 + $(multilib_native_use_with syslog)
244 + $(multilib_native_use_with systemd)
245 + --systemd-install-services
246 + --with-systemddir="$(systemd_get_systemunitdir)"
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_with debug lttng)
253 + $(use_with ldap)
254 + $(use_with profiling-data)
255 + # bug #683148
256 + --jobs 1
257 + )
258 +
259 + multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} )
260 +
261 + CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
262 + waf-utils_src_configure ${myconf[@]}
263 +}
264 +
265 +multilib_src_compile() {
266 + waf-utils_src_compile
267 +}
268 +
269 +multilib_src_install() {
270 + waf-utils_src_install
271 +
272 + # Make all .so files executable
273 + find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
274 +
275 + if multilib_is_native_abi ; then
276 + # install ldap schema for server (bug #491002)
277 + if use ldap ; then
278 + insinto /etc/openldap/schema
279 + doins examples/LDAP/samba.schema
280 + fi
281 +
282 + # create symlink for cups (bug #552310)
283 + if use cups ; then
284 + dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
285 + fi
286 +
287 + # install example config file
288 + insinto /etc/samba
289 + doins examples/smb.conf.default
290 +
291 + # Fix paths in example file (#603964)
292 + sed \
293 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
294 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
295 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
296 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
297 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
298 + -i "${ED%/}"/etc/samba/smb.conf.default || die
299 +
300 + # Install init script and conf.d file
301 + newinitd "${CONFDIR}/samba4.initd-r1" samba
302 + newconfd "${CONFDIR}/samba4.confd" samba
303 +
304 + systemd_dotmpfilesd "${FILESDIR}"/samba.conf
305 + use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die
306 +
307 + # Preserve functionality for old gentoo-specific unit names
308 + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
309 + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
310 + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
311 + fi
312 +
313 + if use pam && use winbind ; then
314 + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
315 + # bugs #376853 and #590374
316 + insinto /etc/security
317 + doins examples/pam_winbind/pam_winbind.conf
318 + fi
319 +
320 + keepdir /var/cache/samba
321 + keepdir /var/lib/ctdb
322 + keepdir /var/lib/samba/{bind-dns,private}
323 + keepdir /var/log/samba
324 +}
325 +
326 +multilib_src_install_all() {
327 + # Attempt to fix bug #673168
328 + find "${ED}" -type d -name "Yapp" -print0 \
329 + | xargs -0 --no-run-if-empty rm -r || die
330 +}
331 +
332 +multilib_src_test() {
333 + if multilib_is_native_abi ; then
334 + "${WAF_BINARY}" test || die "test failed"
335 + fi
336 +}
337 +
338 +pkg_postinst() {
339 + ewarn "Be aware that this release contains the best of all of Samba's"
340 + ewarn "technology parts, both a file server (that you can reasonably expect"
341 + ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
342 + ewarn "controller work previously known as 'samba4'."
343 +
344 + elog "For further information and migration steps make sure to read "
345 + elog "https://samba.org/samba/history/${P}.html "
346 + elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
347 +}