Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/samba/
Date: Fri, 30 Sep 2022 03:04:17
Message-Id: 1664506674.fd1a74c762f9b0230115cd23aaf9a51897213505.sam@gentoo
1 commit: fd1a74c762f9b0230115cd23aaf9a51897213505
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 30 02:54:21 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 30 02:57:54 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd1a74c7
7
8 net-fs/samba: add 4.16.5
9
10 Signed-off-by: Sam James <sam <AT> gentoo.org>
11
12 net-fs/samba/Manifest | 1 +
13 net-fs/samba/samba-4.16.5.ebuild | 338 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 339 insertions(+)
15
16 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
17 index ecaa179e0587..1009c7746975 100644
18 --- a/net-fs/samba/Manifest
19 +++ b/net-fs/samba/Manifest
20 @@ -4,3 +4,4 @@ DIST samba-4.15.10.tar.gz 19333317 BLAKE2B 20b414d51f915cfdcd50a10dd9d315d3be23a
21 DIST samba-4.15.7.tar.gz 19290930 BLAKE2B 4a295f79d38212d4c6917ed61a22e4204b5ea3d5e26f30b65d1e7e81842e92405870dd40fd4d05ec1126a532bdb1ddea300848387a4c64370ba5c2c1354ee8e5 SHA512 beffb09b5bcd62991398d39c7a8aec5fed0c51d550e2f0fb42b2e0a09094f4c6a8f29adf708c4969db12329f5c7343d2debd04315107b79bef59e99a4a7e4ce4
22 DIST samba-4.15.9.tar.gz 19324742 BLAKE2B 36cca5ac1b449339f2ce420d4f29f25151bcd536556bfc571db6422a95e9c5daed98b9a71387babbfc61d43e5ff183a1b69255dbec966f80a1cb8fe0ad40f636 SHA512 2ee5d66f5a7c1ff5b27c959be6310335eb6484476c1eadb3b8ca1bc84fb2260487136c1318539e1dc459b81bca66f268fd979f6a816ff5f905bd605a99685004
23 DIST samba-4.16.4.tar.gz 30605121 BLAKE2B e685511a76770272cabd1292f36d2b005e2d21212e4782cdf4fd05039f7667b35501873cffa9a53547d523805b2a91ffeba0881aaee905304968c42efef22dfa SHA512 9754275ace30755b75f747e201f8ad4550a823c8606e550c0ce6b3ccbaf048dd895bf2c21127271298304be7f80de9b6451091c4949ebe267ee1cf3ab497cd85
24 +DIST samba-4.16.5.tar.gz 30613439 BLAKE2B 7f6eabb8817d0101d7f95b668ea352fe3a2a9291814b42a303ea89dd19b1bd192e719930485d721b90dcedb180e86e42a87083ae42166bf5b07e8383c85436c6 SHA512 9c4cd2ccbb6a4910d0da220e24bf3bf2cf25acaaebb5aa7358d8910016fac29b8ed1889f8ee0b4953d695583ff04d8de7bfffc2d97ae30aa7730e157aa7acfcf
25
26 diff --git a/net-fs/samba/samba-4.16.5.ebuild b/net-fs/samba/samba-4.16.5.ebuild
27 new file mode 100644
28 index 000000000000..6dc422deafb4
29 --- /dev/null
30 +++ b/net-fs/samba/samba-4.16.5.ebuild
31 @@ -0,0 +1,338 @@
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 ~loong ~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 llvm-libunwind pam profiling-data python quota +regedit selinux
58 +snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test unwind 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.2[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 + acl? ( virtual/acl )
122 + ceph? ( sys-cluster/ceph )
123 + cluster? ( net-libs/rpcsvc-proto )
124 + cups? ( net-print/cups )
125 + debug? ( dev-util/lttng-ust )
126 + fam? ( virtual/fam )
127 + gpg? ( app-crypt/gpgme:= )
128 + json? ( dev-libs/jansson:= )
129 + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] )
130 + pam? ( sys-libs/pam )
131 + python? (
132 + sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
133 + sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
134 + sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
135 + sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
136 + )
137 + snapper? ( sys-apps/dbus )
138 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
139 + system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] )
140 + systemd? ( sys-apps/systemd:0= )
141 + unwind? (
142 + llvm-libunwind? ( sys-libs/llvm-libunwind:= )
143 + !llvm-libunwind? ( sys-libs/libunwind:= )
144 + )
145 + zeroconf? ( net-dns/avahi[dbus] )
146 +"
147 +DEPEND="${COMMON_DEPEND}
148 + >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
149 + dev-perl/JSON
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 + "${FILESDIR}/${PN}-4.16.1-netdb-defines.patch"
179 + "${FILESDIR}/${PN}-4.16.2-fix-musl-without-innetgr.patch"
180 + "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.patch"
181 + "${FILESDIR}/${P}-glibc-2.36.patch"
182 + "${FILESDIR}/${PN}-4.15.9-libunwind-automagic.patch"
183 +)
184 +
185 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
186 +CONFDIR="${FILESDIR}/4.4"
187 +
188 +WAF_BINARY="${S}/buildtools/bin/waf"
189 +
190 +SHAREDMODS=""
191 +
192 +pkg_setup() {
193 + # Package fails to build with distcc
194 + export DISTCC_DISABLE=1
195 + export PYTHONHASHSEED=1
196 +
197 + python-single-r1_pkg_setup
198 +
199 + SHAREDMODS="$(usex snapper '' '!')vfs_snapper"
200 + if use cluster ; then
201 + SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
202 + elif use ads ; then
203 + SHAREDMODS+=",idmap_ad"
204 + fi
205 +}
206 +
207 +src_prepare() {
208 + default
209 +
210 + # un-bundle dnspython
211 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
212 +
213 + # unbundle iso8601 unless tests are enabled
214 + if ! use test ; then
215 + sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
216 + fi
217 +
218 + ## ugly hackaround for bug #592502
219 + #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
220 +
221 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
222 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
223 + || die
224 +
225 + # Friggin' WAF shit
226 + multilib_copy_sources
227 +}
228 +
229 +multilib_src_configure() {
230 + # when specifying libs for samba build you must append NONE to the end to
231 + # stop it automatically including things
232 + local bundled_libs="NONE"
233 + if ! use system-heimdal && ! use system-mitkrb5 ; then
234 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
235 + fi
236 +
237 + local myconf=(
238 + --enable-fhs
239 + --sysconfdir="${EPREFIX}/etc"
240 + --localstatedir="${EPREFIX}/var"
241 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
242 + --with-piddir="${EPREFIX}/run/${PN}"
243 + --bundled-libraries="${bundled_libs}"
244 + --builtin-libraries=NONE
245 + --disable-rpath
246 + --disable-rpath-install
247 + --nopyc
248 + --nopyo
249 + --without-winexe
250 + --accel-aes=$(usex cpu_flags_x86_aes intelaesni none)
251 + $(multilib_native_use_with acl acl-support)
252 + $(multilib_native_usex addc '' '--without-ad-dc')
253 + $(multilib_native_use_with ads)
254 + $(multilib_native_use_enable ceph cephfs)
255 + $(multilib_native_use_with cluster cluster-support)
256 + $(multilib_native_use_enable cups)
257 + --without-dmapi
258 + $(multilib_native_use_with fam)
259 + $(multilib_native_use_enable glusterfs)
260 + $(multilib_native_use_with gpg gpgme)
261 + $(multilib_native_use_with json)
262 + $(multilib_native_use_enable iprint)
263 + $(multilib_native_use_with pam)
264 + $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
265 + $(multilib_native_use_with quota quotas)
266 + $(multilib_native_use_with regedit)
267 + $(multilib_native_use_enable spotlight)
268 + $(multilib_native_use_with syslog)
269 + $(multilib_native_use_with systemd)
270 + --systemd-install-services
271 + --with-systemddir="$(systemd_get_systemunitdir)"
272 + $(multilib_native_use_with unwind libunwind)
273 + $(multilib_native_use_with winbind)
274 + $(multilib_native_usex python '' '--disable-python')
275 + $(multilib_native_use_enable zeroconf avahi)
276 + $(multilib_native_usex test '--enable-selftest' '')
277 + $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
278 + $(use_with debug lttng)
279 + $(use_with ldap)
280 + $(use_with profiling-data)
281 + # bug #683148
282 + --jobs 1
283 + )
284 +
285 + if multilib_is_native_abi ; then
286 + myconf+=( --with-shared-modules=${SHAREDMODS} )
287 + else
288 + myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
289 + fi
290 +
291 + CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \
292 + waf-utils_src_configure ${myconf[@]}
293 +}
294 +
295 +multilib_src_compile() {
296 + waf-utils_src_compile
297 +}
298 +
299 +multilib_src_install() {
300 + waf-utils_src_install
301 +
302 + # Make all .so files executable
303 + find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
304 +
305 + if multilib_is_native_abi ; then
306 + # install ldap schema for server (bug #491002)
307 + if use ldap ; then
308 + insinto /etc/openldap/schema
309 + doins examples/LDAP/samba.schema
310 + fi
311 +
312 + # create symlink for cups (bug #552310)
313 + if use cups ; then
314 + dosym ../../../bin/smbspool \
315 + /usr/libexec/cups/backend/smb
316 + fi
317 +
318 + # install example config file
319 + insinto /etc/samba
320 + doins examples/smb.conf.default
321 +
322 + # Fix paths in example file (#603964)
323 + sed \
324 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
325 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
326 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
327 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
328 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
329 + -i "${ED}"/etc/samba/smb.conf.default || die
330 +
331 + # Install init script and conf.d file
332 + newinitd "${CONFDIR}/samba4.initd-r1" samba
333 + newconfd "${CONFDIR}/samba4.confd" samba
334 +
335 + dotmpfiles "${FILESDIR}"/samba.conf
336 + if ! use addc ; then
337 + rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
338 + || die
339 + fi
340 +
341 + # Preserve functionality for old gentoo-specific unit names
342 + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
343 + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
344 + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
345 + fi
346 +
347 + if use pam && use winbind ; then
348 + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
349 + # bugs #376853 and #590374
350 + insinto /etc/security
351 + doins examples/pam_winbind/pam_winbind.conf
352 + fi
353 +
354 + keepdir /var/cache/samba
355 + keepdir /var/lib/ctdb
356 + keepdir /var/lib/samba/{bind-dns,private}
357 + keepdir /var/lock/samba
358 + keepdir /var/log/samba
359 +}
360 +
361 +multilib_src_test() {
362 + if multilib_is_native_abi ; then
363 + "${WAF_BINARY}" test || die "test failed"
364 + fi
365 +}
366 +
367 +pkg_postinst() {
368 + tmpfiles_process samba.conf
369 +}