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