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: Fri, 24 Jun 2022 07:43:16
Message-Id: 1656056582.395e07af2a3c6de1a2c6e08a9a92fcde8f28066e.polynomial-c@gentoo
1 commit: 395e07af2a3c6de1a2c6e08a9a92fcde8f28066e
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Jun 24 07:33:09 2022 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 24 07:43:02 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=395e07af
7
8 net-fs/samba: Bump to version 4.16.2
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.2.ebuild | 343 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 344 insertions(+)
15
16 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
17 index 57fdc0a46076..840bb49530a1 100644
18 --- a/net-fs/samba/Manifest
19 +++ b/net-fs/samba/Manifest
20 @@ -5,3 +5,4 @@ DIST samba-4.15.6.tar.gz 19290189 BLAKE2B 14a8d3cf03de303cce54e5b336f5866f5d3ded
21 DIST samba-4.15.7.tar.gz 19290930 BLAKE2B 4a295f79d38212d4c6917ed61a22e4204b5ea3d5e26f30b65d1e7e81842e92405870dd40fd4d05ec1126a532bdb1ddea300848387a4c64370ba5c2c1354ee8e5 SHA512 beffb09b5bcd62991398d39c7a8aec5fed0c51d550e2f0fb42b2e0a09094f4c6a8f29adf708c4969db12329f5c7343d2debd04315107b79bef59e99a4a7e4ce4
22 DIST samba-4.16.0.tar.gz 30583390 BLAKE2B 6ea27634690d00779ec7f671e48b17246285c9576221d9b9b3f9238cd72310e8aaaeb646031212e65c239d2e959deef7bd9739932db0c716b7ea79cc11f2f7b8 SHA512 cea6bab64021779d217669e58612d192b907c2c481ef30e40e449bc6b8f8993a9b7b7b5bfcfebe54d8f70b8f720893cfa77a9d674ef8e07dd45a55a0fbc673e2
23 DIST samba-4.16.1.tar.gz 30590897 BLAKE2B 4e22b1a8bbef28116cad71c87da1aaaa39459d5eeb30e975aec6444369576ce716917d3ee89c0b328e457e2dcda17abe705d1f33d12b4205efcebdc54ba7f2fd SHA512 d82ab250e87cb64b083345b61da8c4edbb2185a13f8cef33232f823fd510822570ed27c7b260a1fefd3af3b2fc4b271257c2c3e6ab3241c8c147bebae6ab39fc
24 +DIST samba-4.16.2.tar.gz 30597031 BLAKE2B d1268cb34ef951a47bd6cd8b76fa8576f3db2a4faca1fdae90f096f25d5e90e9eaca49c73f7952a6c8cf48a200247fb9957b230efb9ec725c29a1af16d8aa37e SHA512 ed85acca0f23f9166530b600ae569f3259c2122d15e361fd3fe48a82921cd53bbb459d6c102bb60cc40b2dd811cde1262a3fb17ed6015a260432bffe5af83366
25
26 diff --git a/net-fs/samba/samba-4.16.2.ebuild b/net-fs/samba/samba-4.16.2.ebuild
27 new file mode 100644
28 index 000000000000..090a59c32be1
29 --- /dev/null
30 +++ b/net-fs/samba/samba-4.16.2.ebuild
31 @@ -0,0 +1,343 @@
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 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 + >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}]
99 + >=sys-libs/ldb-2.5.1[ldap(+)?,${MULTILIB_USEDEP}]
100 + <sys-libs/ldb-2.6.0[ldap(+)?,${MULTILIB_USEDEP}]
101 + sys-libs/libcap[${MULTILIB_USEDEP}]
102 + sys-libs/liburing:=[${MULTILIB_USEDEP}]
103 + sys-libs/ncurses:0=
104 + sys-libs/readline:0=
105 + >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
106 + >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}]
107 + >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
108 + sys-libs/zlib[${MULTILIB_USEDEP}]
109 + virtual/libcrypt:=[${MULTILIB_USEDEP}]
110 + virtual/libiconv
111 + $(python_gen_cond_dep "
112 + addc? (
113 + dev-python/dnspython:=[\${PYTHON_USEDEP}]
114 + dev-python/markdown[\${PYTHON_USEDEP}]
115 + )
116 + ads? (
117 + dev-python/dnspython:=[\${PYTHON_USEDEP}]
118 + net-dns/bind-tools[gssapi]
119 + )
120 + ")
121 + !alpha? ( !sparc? ( sys-libs/libunwind:= ) )
122 + acl? ( virtual/acl )
123 + ceph? ( sys-cluster/ceph )
124 + cluster? ( net-libs/rpcsvc-proto )
125 + cups? ( net-print/cups )
126 + debug? ( dev-util/lttng-ust )
127 + fam? ( virtual/fam )
128 + gpg? ( app-crypt/gpgme:= )
129 + json? ( dev-libs/jansson:= )
130 + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
131 + pam? ( sys-libs/pam )
132 + python? (
133 + sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
134 + sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
135 + sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
136 + sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
137 + )
138 + snapper? ( sys-apps/dbus )
139 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
140 + system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] )
141 + systemd? ( sys-apps/systemd:0= )
142 + zeroconf? ( net-dns/avahi[dbus] )
143 +"
144 +DEPEND="${COMMON_DEPEND}
145 + >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
146 + dev-perl/JSON
147 + net-libs/libtirpc[${MULTILIB_USEDEP}]
148 + || (
149 + net-libs/rpcsvc-proto
150 + <sys-libs/glibc-2.26[rpc(+)]
151 + )
152 + spotlight? ( dev-libs/glib )
153 + test? (
154 + $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
155 + !system-mitkrb5? (
156 + >=net-dns/resolv_wrapper-1.1.4
157 + >=net-libs/socket_wrapper-1.1.9
158 + >=sys-libs/nss_wrapper-1.1.3
159 + >=sys-libs/uid_wrapper-1.2.1
160 + )
161 + )"
162 +RDEPEND="${COMMON_DEPEND}
163 + client? ( net-fs/cifs-utils[ads?] )
164 + python? ( ${PYTHON_DEPS} )
165 + selinux? ( sec-policy/selinux-samba )
166 +"
167 +BDEPEND="${PYTHON_DEPS}
168 + app-text/docbook-xsl-stylesheets
169 + dev-libs/libxslt
170 + virtual/pkgconfig
171 +"
172 +
173 +PATCHES=(
174 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
175 + "${FILESDIR}/${PN}-4.16.1-netdb-defines.patch"
176 +)
177 +
178 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
179 +CONFDIR="${FILESDIR}/4.4"
180 +
181 +WAF_BINARY="${S}/buildtools/bin/waf"
182 +
183 +SHAREDMODS=""
184 +
185 +pkg_setup() {
186 + # Package fails to build with distcc
187 + export DISTCC_DISABLE=1
188 + export PYTHONHASHSEED=1
189 +
190 + python-single-r1_pkg_setup
191 +
192 + SHAREDMODS="$(usex snapper '' '!')vfs_snapper"
193 + if use cluster ; then
194 + SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
195 + elif use ads ; then
196 + SHAREDMODS+=",idmap_ad"
197 + fi
198 +}
199 +
200 +src_prepare() {
201 + default
202 +
203 + # un-bundle dnspython
204 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
205 +
206 + # unbundle iso8601 unless tests are enabled
207 + if ! use test ; then
208 + sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
209 + fi
210 +
211 + ## ugly hackaround for bug #592502
212 + #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
213 +
214 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
215 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
216 + || die
217 +
218 + # Friggin' WAF shit
219 + multilib_copy_sources
220 +}
221 +
222 +multilib_src_configure() {
223 + # when specifying libs for samba build you must append NONE to the end to
224 + # stop it automatically including things
225 + local bundled_libs="NONE"
226 + if ! use system-heimdal && ! use system-mitkrb5 ; then
227 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
228 + fi
229 +
230 + local myconf=(
231 + --enable-fhs
232 + --sysconfdir="${EPREFIX}/etc"
233 + --localstatedir="${EPREFIX}/var"
234 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
235 + --with-piddir="${EPREFIX}/run/${PN}"
236 + --bundled-libraries="${bundled_libs}"
237 + --builtin-libraries=NONE
238 + --disable-rpath
239 + --disable-rpath-install
240 + --nopyc
241 + --nopyo
242 + --without-winexe
243 + --accel-aes=$(usex cpu_flags_x86_aes intelaesni none)
244 + $(multilib_native_use_with acl acl-support)
245 + $(multilib_native_usex addc '' '--without-ad-dc')
246 + $(multilib_native_use_with ads)
247 + $(multilib_native_use_enable ceph cephfs)
248 + $(multilib_native_use_with cluster cluster-support)
249 + $(multilib_native_use_enable cups)
250 + --without-dmapi
251 + $(multilib_native_use_with fam)
252 + $(multilib_native_use_enable glusterfs)
253 + $(multilib_native_use_with gpg gpgme)
254 + $(multilib_native_use_with json)
255 + $(multilib_native_use_enable iprint)
256 + $(multilib_native_use_with pam)
257 + $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
258 + $(multilib_native_use_with quota quotas)
259 + $(multilib_native_use_with regedit)
260 + $(multilib_native_use_enable spotlight)
261 + $(multilib_native_use_with syslog)
262 + $(multilib_native_use_with systemd)
263 + --systemd-install-services
264 + --with-systemddir="$(systemd_get_systemunitdir)"
265 + $(multilib_native_use_with winbind)
266 + $(multilib_native_usex python '' '--disable-python')
267 + $(multilib_native_use_enable zeroconf avahi)
268 + $(multilib_native_usex test '--enable-selftest' '')
269 + $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
270 + $(use_with debug lttng)
271 + $(use_with ldap)
272 + $(use_with profiling-data)
273 + # bug #683148
274 + --jobs 1
275 + )
276 +
277 + if multilib_is_native_abi ; then
278 + myconf+=( --with-shared-modules=${SHAREDMODS} )
279 + else
280 + myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
281 + fi
282 +
283 + CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
284 + waf-utils_src_configure ${myconf[@]}
285 +}
286 +
287 +multilib_src_compile() {
288 + waf-utils_src_compile
289 +}
290 +
291 +multilib_src_install() {
292 + waf-utils_src_install
293 +
294 + # Make all .so files executable
295 + find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
296 +
297 + if multilib_is_native_abi ; then
298 + # install ldap schema for server (bug #491002)
299 + if use ldap ; then
300 + insinto /etc/openldap/schema
301 + doins examples/LDAP/samba.schema
302 + fi
303 +
304 + # create symlink for cups (bug #552310)
305 + if use cups ; then
306 + dosym ../../../bin/smbspool \
307 + /usr/libexec/cups/backend/smb
308 + fi
309 +
310 + # install example config file
311 + insinto /etc/samba
312 + doins examples/smb.conf.default
313 +
314 + # Fix paths in example file (#603964)
315 + sed \
316 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
317 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
318 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
319 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
320 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
321 + -i "${ED}"/etc/samba/smb.conf.default || die
322 +
323 + # Install init script and conf.d file
324 + newinitd "${CONFDIR}/samba4.initd-r1" samba
325 + newconfd "${CONFDIR}/samba4.confd" samba
326 +
327 + dotmpfiles "${FILESDIR}"/samba.conf
328 + if ! use addc ; then
329 + rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
330 + || die
331 + fi
332 +
333 + # Preserve functionality for old gentoo-specific unit names
334 + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
335 + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
336 + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
337 + fi
338 +
339 + if use pam && use winbind ; then
340 + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
341 + # bugs #376853 and #590374
342 + insinto /etc/security
343 + doins examples/pam_winbind/pam_winbind.conf
344 + fi
345 +
346 + keepdir /var/cache/samba
347 + keepdir /var/lib/ctdb
348 + keepdir /var/lib/samba/{bind-dns,private}
349 + keepdir /var/lock/samba
350 + keepdir /var/log/samba
351 +}
352 +
353 +multilib_src_test() {
354 + if multilib_is_native_abi ; then
355 + "${WAF_BINARY}" test || die "test failed"
356 + fi
357 +}
358 +
359 +pkg_postinst() {
360 + tmpfiles_process samba.conf
361 +
362 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
363 + elog "Be aware that this release contains the best of all of Samba's"
364 + elog "technology parts, both a file server (that you can reasonably expect"
365 + elog "to upgrade existing Samba 3.x releases to) and the AD domain"
366 + elog "controller work previously known as 'samba4'."
367 + elog
368 + fi
369 + if [[ "${PV}" != *_rc* ]] ; then
370 + elog "For further information and migration steps make sure to read "
371 + elog "https://samba.org/samba/history/${P}.html "
372 + elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
373 + fi
374 +}