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, 24 Jan 2022 22:35:28
Message-Id: 1643063708.f344ed325d5eb3e86f24ea8e32250300e2c485d9.polynomial-c@gentoo
1 commit: f344ed325d5eb3e86f24ea8e32250300e2c485d9
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jan 24 22:18:59 2022 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Mon Jan 24 22:35:08 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f344ed32
7
8 net-fs/samba: Bump to version 4.16.0_rc1
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 net-fs/samba/Manifest | 1 +
13 net-fs/samba/samba-4.16.0_rc1.ebuild | 344 +++++++++++++++++++++++++++++++++++
14 2 files changed, 345 insertions(+)
15
16 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
17 index 994dcf26d3ef..5143c02908a9 100644
18 --- a/net-fs/samba/Manifest
19 +++ b/net-fs/samba/Manifest
20 @@ -2,3 +2,4 @@ DIST samba-4.14.10.tar.gz 19134066 BLAKE2B c6daebc7abbf2ed371ed694e4478d05875d55
21 DIST samba-4.15.2.tar.gz 19252338 BLAKE2B aded33cbefce69c9b20148de1be224514de5cc825404e8188fb0a96022d0fdc6595256f74a5e295fd2e1062e8520775b6c59c1d6a7bf80a52ed9fa9db412dcdd SHA512 6fdf9db0da90332afe527703066cca4ec5b0ec6bf6a5979443953f9fbc18b870a7e2445a41c9ae3d63f7738c9c0282e7ca82f6066aa68e151eec248615ea7b21
22 DIST samba-4.15.3.tar.gz 19272345 BLAKE2B ada18904ee7889209488f022daacc34ce1f41c12f9c8c48515cc24aa158072da499cc6ec484cf2b9108c6b2d4074ad734d1850063a354000aa90091faba6f7a6 SHA512 1c30cfa6cd927f4d822dd7227b89542d05d7ab4e50c2d9717eea4fcf1af5120b55d66ec628acd5c887e9bffc732c1d37ab084db953534a2b3987531b10fef63c
23 DIST samba-4.15.4.tar.gz 19280813 BLAKE2B 3106f2f265263e871fe3f82d3eecaac2e5f642925ff5dd2a9d163092fd13e9348a3910e40431d51cb94a1abeb3b9c32c487ce1f8caebe59a8d6d90641b4d9201 SHA512 e55473dd4971816a01880870309ca44f022625cd529511bcf386c865a2e7e79118577ee4866559f607952de47dc0d310d6426bd08dd4293db95ddbbe3982383d
24 +DIST samba-4.16.0rc1.tar.gz 30490862 BLAKE2B 7031266abcffbd23536bc4ec3fa606f4eb270b8a7d8d293d417993e096fe81770378b7ed5a0b15444860562dc22f53c994178d65e613a057d8b5fe9c0d3bb7d3 SHA512 48bdc4f17116b29a30c2f146ca11617af1149559e96f009e70597c93a53f734e6f719fb7a04726ce5bb6f912cf07c224518c2a8076bc1d4bceba4f6787d032d8
25
26 diff --git a/net-fs/samba/samba-4.16.0_rc1.ebuild b/net-fs/samba/samba-4.16.0_rc1.ebuild
27 new file mode 100644
28 index 000000000000..e5dff16aef51
29 --- /dev/null
30 +++ b/net-fs/samba/samba-4.16.0_rc1.ebuild
31 @@ -0,0 +1,344 @@
32 +# Copyright 1999-2022 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{8..10} )
38 +PYTHON_REQ_USE="threads(+),xml(+)"
39 +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles
40 +
41 +DESCRIPTION="Samba Suite Version 4"
42 +HOMEPAGE="https://samba.org/"
43 +
44 +MY_PV="${PV/_rc/rc}"
45 +MY_P="${PN}-${MY_PV}"
46 +if [[ ${PV} = *_rc* ]]; then
47 + SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
48 +else
49 + SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
50 + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
51 +fi
52 +S="${WORKDIR}/${MY_P}"
53 +
54 +LICENSE="GPL-3"
55 +SLOT="0"
56 +IUSE="acl addc ads ceph client cluster cpu_flags_x86_aes cups debug dmapi fam
57 +glusterfs gpg iprint json ldap pam profiling-data python quota +regedit selinux
58 +snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind
59 +zeroconf"
60 +
61 +REQUIRED_USE="${PYTHON_REQUIRED_USE}
62 + addc? ( python json winbind )
63 + ads? ( acl ldap python winbind )
64 + cluster? ( ads )
65 + gpg? ( addc )
66 + spotlight? ( json )
67 + test? ( python )
68 + !ads? ( !addc )
69 + ?? ( system-heimdal system-mitkrb5 )
70 +"
71 +
72 +# the test suite is messed, it uses system-installed samba
73 +# bits instead of what was built, tests things disabled via use
74 +# flags, and generally just fails to work in a way ebuilds could
75 +# rely on in its current state
76 +RESTRICT="test"
77 +
78 +MULTILIB_WRAPPED_HEADERS=(
79 + /usr/include/samba-4.0/policy.h
80 + /usr/include/samba-4.0/dcerpc_server.h
81 + /usr/include/samba-4.0/ctdb.h
82 + /usr/include/samba-4.0/ctdb_client.h
83 + /usr/include/samba-4.0/ctdb_protocol.h
84 + /usr/include/samba-4.0/ctdb_private.h
85 + /usr/include/samba-4.0/ctdb_typesafe_cb.h
86 + /usr/include/samba-4.0/ctdb_version.h
87 +)
88 +
89 +COMMON_DEPEND="
90 + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
91 + dev-lang/perl:=
92 + dev-libs/icu:=[${MULTILIB_USEDEP}]
93 + dev-libs/libbsd[${MULTILIB_USEDEP}]
94 + dev-libs/libtasn1[${MULTILIB_USEDEP}]
95 + dev-libs/popt[${MULTILIB_USEDEP}]
96 + dev-perl/Parse-Yapp
97 + >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
98 + || (
99 + >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}]
100 + sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
101 + )
102 + >=sys-libs/ldb-2.5.0[ldap(+)?,${MULTILIB_USEDEP}]
103 + <sys-libs/ldb-2.6.0[ldap(+)?,${MULTILIB_USEDEP}]
104 + sys-libs/libcap[${MULTILIB_USEDEP}]
105 + sys-libs/liburing:=[${MULTILIB_USEDEP}]
106 + sys-libs/ncurses:0=
107 + sys-libs/readline:0=
108 + >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
109 + >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}]
110 + >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
111 + sys-libs/zlib[${MULTILIB_USEDEP}]
112 + virtual/libcrypt:=[${MULTILIB_USEDEP}]
113 + virtual/libiconv
114 + $(python_gen_cond_dep "
115 + addc? (
116 + dev-python/dnspython:=[\${PYTHON_USEDEP}]
117 + dev-python/markdown[\${PYTHON_USEDEP}]
118 + )
119 + ads? (
120 + dev-python/dnspython:=[\${PYTHON_USEDEP}]
121 + net-dns/bind-tools[gssapi]
122 + )
123 + ")
124 + !alpha? ( !sparc? ( sys-libs/libunwind:= ) )
125 + acl? ( virtual/acl )
126 + ceph? ( sys-cluster/ceph )
127 + cluster? ( net-libs/rpcsvc-proto )
128 + cups? ( net-print/cups )
129 + debug? ( dev-util/lttng-ust )
130 + dmapi? ( sys-apps/dmapi )
131 + fam? ( virtual/fam )
132 + gpg? ( app-crypt/gpgme )
133 + json? ( dev-libs/jansson:= )
134 + ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
135 + pam? ( sys-libs/pam )
136 + python? (
137 + sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
138 + sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
139 + sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
140 + sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
141 + )
142 + snapper? ( sys-apps/dbus )
143 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
144 + system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
145 + systemd? ( sys-apps/systemd:0= )
146 + zeroconf? ( net-dns/avahi[dbus] )
147 +"
148 +DEPEND="${COMMON_DEPEND}
149 + >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
150 + net-libs/libtirpc[${MULTILIB_USEDEP}]
151 + || (
152 + net-libs/rpcsvc-proto
153 + <sys-libs/glibc-2.26[rpc(+)]
154 + )
155 + spotlight? ( dev-libs/glib )
156 + test? (
157 + $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
158 + !system-mitkrb5? (
159 + >=net-dns/resolv_wrapper-1.1.4
160 + >=net-libs/socket_wrapper-1.1.9
161 + >=sys-libs/nss_wrapper-1.1.3
162 + >=sys-libs/uid_wrapper-1.2.1
163 + )
164 + )"
165 +RDEPEND="${COMMON_DEPEND}
166 + client? ( net-fs/cifs-utils[ads?] )
167 + python? ( ${PYTHON_DEPS} )
168 + selinux? ( sec-policy/selinux-samba )
169 +"
170 +BDEPEND="${PYTHON_DEPS}
171 + app-text/docbook-xsl-stylesheets
172 + dev-libs/libxslt
173 + virtual/pkgconfig
174 +"
175 +
176 +PATCHES=(
177 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
178 +)
179 +
180 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
181 +CONFDIR="${FILESDIR}/4.4"
182 +
183 +WAF_BINARY="${S}/buildtools/bin/waf"
184 +
185 +SHAREDMODS=""
186 +
187 +pkg_setup() {
188 + # Package fails to build with distcc
189 + export DISTCC_DISABLE=1
190 +
191 + python-single-r1_pkg_setup
192 +
193 + SHAREDMODS="$(usex snapper '' '!')vfs_snapper"
194 + if use cluster ; then
195 + SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
196 + elif use ads ; then
197 + SHAREDMODS+=",idmap_ad"
198 + fi
199 +}
200 +
201 +src_prepare() {
202 + default
203 +
204 + # un-bundle dnspython
205 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
206 +
207 + # unbundle iso8601 unless tests are enabled
208 + if ! use test ; then
209 + sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
210 + fi
211 +
212 + ## ugly hackaround for bug #592502
213 + #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
214 +
215 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
216 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
217 + || die
218 +
219 + # Friggin' WAF shit
220 + multilib_copy_sources
221 +}
222 +
223 +multilib_src_configure() {
224 + # when specifying libs for samba build you must append NONE to the end to
225 + # stop it automatically including things
226 + local bundled_libs="NONE"
227 + if ! use system-heimdal && ! use system-mitkrb5 ; then
228 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
229 + fi
230 +
231 + local myconf=(
232 + --enable-fhs
233 + --sysconfdir="${EPREFIX}/etc"
234 + --localstatedir="${EPREFIX}/var"
235 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
236 + --with-piddir="${EPREFIX}/run/${PN}"
237 + --bundled-libraries="${bundled_libs}"
238 + --builtin-libraries=NONE
239 + --disable-rpath
240 + --disable-rpath-install
241 + --nopyc
242 + --nopyo
243 + --without-winexe
244 + --accel-aes=$(usex cpu_flags_x86_aes intelaesni none)
245 + $(multilib_native_use_with acl acl-support)
246 + $(multilib_native_usex addc '' '--without-ad-dc')
247 + $(multilib_native_use_with ads)
248 + $(multilib_native_use_enable ceph cephfs)
249 + $(multilib_native_use_with cluster cluster-support)
250 + $(multilib_native_use_enable cups)
251 + $(multilib_native_use_with dmapi)
252 + $(multilib_native_use_with fam)
253 + $(multilib_native_use_enable glusterfs)
254 + $(multilib_native_use_with gpg gpgme)
255 + $(multilib_native_use_with json)
256 + $(multilib_native_use_enable iprint)
257 + $(multilib_native_use_with pam)
258 + $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
259 + $(multilib_native_use_with quota quotas)
260 + $(multilib_native_use_with regedit)
261 + $(multilib_native_use_enable spotlight)
262 + $(multilib_native_use_with syslog)
263 + $(multilib_native_use_with systemd)
264 + --systemd-install-services
265 + --with-systemddir="$(systemd_get_systemunitdir)"
266 + $(multilib_native_use_with winbind)
267 + $(multilib_native_usex python '' '--disable-python')
268 + $(multilib_native_use_enable zeroconf avahi)
269 + $(multilib_native_usex test '--enable-selftest' '')
270 + $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
271 + $(use_with debug lttng)
272 + $(use_with ldap)
273 + $(use_with profiling-data)
274 + # bug #683148
275 + --jobs 1
276 + )
277 +
278 + if multilib_is_native_abi ; then
279 + myconf+=( --with-shared-modules=${SHAREDMODS} )
280 + else
281 + myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
282 + fi
283 +
284 + CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
285 + waf-utils_src_configure ${myconf[@]}
286 +}
287 +
288 +multilib_src_compile() {
289 + waf-utils_src_compile
290 +}
291 +
292 +multilib_src_install() {
293 + waf-utils_src_install
294 +
295 + # Make all .so files executable
296 + find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
297 +
298 + if multilib_is_native_abi ; then
299 + # install ldap schema for server (bug #491002)
300 + if use ldap ; then
301 + insinto /etc/openldap/schema
302 + doins examples/LDAP/samba.schema
303 + fi
304 +
305 + # create symlink for cups (bug #552310)
306 + if use cups ; then
307 + dosym ../../../bin/smbspool \
308 + /usr/libexec/cups/backend/smb
309 + fi
310 +
311 + # install example config file
312 + insinto /etc/samba
313 + doins examples/smb.conf.default
314 +
315 + # Fix paths in example file (#603964)
316 + sed \
317 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
318 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
319 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
320 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
321 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
322 + -i "${ED}"/etc/samba/smb.conf.default || die
323 +
324 + # Install init script and conf.d file
325 + newinitd "${CONFDIR}/samba4.initd-r1" samba
326 + newconfd "${CONFDIR}/samba4.confd" samba
327 +
328 + dotmpfiles "${FILESDIR}"/samba.conf
329 + if ! use addc ; then
330 + rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
331 + || die
332 + fi
333 +
334 + # Preserve functionality for old gentoo-specific unit names
335 + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
336 + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
337 + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
338 + fi
339 +
340 + if use pam && use winbind ; then
341 + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
342 + # bugs #376853 and #590374
343 + insinto /etc/security
344 + doins examples/pam_winbind/pam_winbind.conf
345 + fi
346 +
347 + keepdir /var/cache/samba
348 + keepdir /var/lib/ctdb
349 + keepdir /var/lib/samba/{bind-dns,private}
350 + keepdir /var/lock/samba
351 + keepdir /var/log/samba
352 +}
353 +
354 +multilib_src_test() {
355 + if multilib_is_native_abi ; then
356 + "${WAF_BINARY}" test || die "test failed"
357 + fi
358 +}
359 +
360 +pkg_postinst() {
361 + tmpfiles_process samba.conf
362 +
363 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
364 + elog "Be aware that this release contains the best of all of Samba's"
365 + elog "technology parts, both a file server (that you can reasonably expect"
366 + elog "to upgrade existing Samba 3.x releases to) and the AD domain"
367 + elog "controller work previously known as 'samba4'."
368 + elog
369 + fi
370 + if [[ "${PV}" != *_rc* ]] ; then
371 + elog "For further information and migration steps make sure to read "
372 + elog "https://samba.org/samba/history/${P}.html "
373 + elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
374 + fi
375 +}