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