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: Wed, 21 Apr 2021 07:39:06
Message-Id: 1618990719.4f51531934c802f6df3819a3706f686de5c1db72.polynomial-c@gentoo
1 commit: 4f51531934c802f6df3819a3706f686de5c1db72
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Wed Apr 21 07:35:59 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Wed Apr 21 07:38:39 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4f515319
7
8 net-fs/samba: Bump to version 4.14.3
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.14.3.ebuild | 336 +++++++++++++++++++++++++++++++++++++++
14 2 files changed, 337 insertions(+)
15
16 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
17 index 02922d9182a..0fb00324195 100644
18 --- a/net-fs/samba/Manifest
19 +++ b/net-fs/samba/Manifest
20 @@ -2,3 +2,4 @@ DIST samba-4.12.14.tar.gz 18260926 BLAKE2B 0a90d481b8c7ad44b5ceeb3586cc246f038c2
21 DIST samba-4.12.9.tar.gz 18236198 BLAKE2B e19cbbbb8416626ca2fe769bf26f3645e94f23781538b3c5e1f94ce618efb807d0732e5591525ec066a31cc0211463b9b66105d1d499989012d624edaa2a132c SHA512 8bd3122bcaab2f5a16a73902a9b628384063a8116a08f0254541e05c148016839b3215c60ff0d3291a332e7884708950ad64137204b0ac19801012d3b6684fa6
22 DIST samba-4.13.7.tar.gz 18432921 BLAKE2B 55e5a470a594bc56c942daa394e2d8e8b90dd0d1408236f7d69a60c609f1f4b1d5389209ef57e245ca326b271fba0b58fceea47681a90ab09828a4e68e40693a SHA512 eac0c0b60d50591ecd8e730bd6f24ec3d5731a9dd4172640259d841cca988f20265e5a57967a070713ab7b4bd95766a21247cc8e6b32177b79eb766520a3288a
23 DIST samba-4.14.2.tar.gz 18636757 BLAKE2B 51b0b2a1543256cbd1ab121f0b90e6546761f2c0377256d3f9e804368ce73d07f6bfdc0cbb6725d438358e1e92e8e2f59f0b54e6fff52f8c07ff25398728e9da SHA512 8dd97abb14d531c3865747512abdf4d2db84b4daa5c15b67cd4f03326e30270d947ba0154493c5897aaa357039b472cfa669c80698b0f572e46d730f70a29b43
24 +DIST samba-4.14.3.tar.gz 18643265 BLAKE2B 244e6d98e987956560342c29f26138524d5067221ab345310bd3ff792922ad43d667febd12e5b6361f516b037979096a31481cc55843584c8db99768e085bfd7 SHA512 b8cd12c65d2a34c71a40c18eb2c74e86b75be734437ba71106e41352691359fbaf7e5ce7e386846fd84d4c19d100e02ea74dfd6f1ec34f66a10e5c20c0fb3cc6
25
26 diff --git a/net-fs/samba/samba-4.14.3.ebuild b/net-fs/samba/samba-4.14.3.ebuild
27 new file mode 100644
28 index 00000000000..d21397f5844
29 --- /dev/null
30 +++ b/net-fs/samba/samba-4.14.3.ebuild
31 @@ -0,0 +1,336 @@
32 +# Copyright 1999-2021 Gentoo Authors
33 +# Distributed under the terms of the GNU General Public License v2
34 +
35 +EAPI=7
36 +
37 +PYTHON_COMPAT=( python3_{7..9} )
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 ~sparc ~x86"
51 +fi
52 +S="${WORKDIR}/${MY_P}"
53 +
54 +LICENSE="GPL-3"
55 +SLOT="0"
56 +IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs
57 +gpg iprint json ldap ntvfs 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 + addns? ( python )
64 + ads? ( acl ldap winbind )
65 + cluster? ( ads )
66 + gpg? ( addc )
67 + ntvfs? ( addc )
68 + spotlight? ( json )
69 + test? ( python )
70 + !ads? ( !addc )
71 + ?? ( system-heimdal system-mitkrb5 )
72 +"
73 +
74 +# the test suite is messed, it uses system-installed samba
75 +# bits instead of what was built, tests things disabled via use
76 +# flags, and generally just fails to work in a way ebuilds could
77 +# rely on in its current state
78 +RESTRICT="test"
79 +
80 +MULTILIB_WRAPPED_HEADERS=(
81 + /usr/include/samba-4.0/policy.h
82 + /usr/include/samba-4.0/dcerpc_server.h
83 + /usr/include/samba-4.0/ctdb.h
84 + /usr/include/samba-4.0/ctdb_client.h
85 + /usr/include/samba-4.0/ctdb_protocol.h
86 + /usr/include/samba-4.0/ctdb_private.h
87 + /usr/include/samba-4.0/ctdb_typesafe_cb.h
88 + /usr/include/samba-4.0/ctdb_version.h
89 +)
90 +
91 +COMMON_DEPEND="
92 + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
93 + dev-lang/perl:=
94 + dev-libs/icu:=[${MULTILIB_USEDEP}]
95 + dev-libs/libbsd[${MULTILIB_USEDEP}]
96 + dev-libs/libtasn1[${MULTILIB_USEDEP}]
97 + dev-libs/popt[${MULTILIB_USEDEP}]
98 + dev-perl/Parse-Yapp
99 + >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
100 + net-libs/libnsl:=[${MULTILIB_USEDEP}]
101 + sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
102 + >=sys-libs/ldb-2.3.0[ldap(+)?,${MULTILIB_USEDEP}]
103 + <sys-libs/ldb-2.4.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.2[${MULTILIB_USEDEP}]
109 + >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}]
110 + >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}]
111 + sys-libs/zlib[${MULTILIB_USEDEP}]
112 + virtual/libiconv
113 + $(python_gen_cond_dep "
114 + dev-python/subunit[\${PYTHON_MULTI_USEDEP},${MULTILIB_USEDEP}]
115 + addc? (
116 + dev-python/dnspython:=[\${PYTHON_MULTI_USEDEP}]
117 + dev-python/markdown[\${PYTHON_MULTI_USEDEP}]
118 + )
119 + addns? (
120 + dev-python/dnspython:=[\${PYTHON_MULTI_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 + !system-mitkrb5? (
158 + >=net-dns/resolv_wrapper-1.1.4
159 + >=net-libs/socket_wrapper-1.1.9
160 + >=sys-libs/nss_wrapper-1.1.3
161 + >=sys-libs/uid_wrapper-1.2.1
162 + )
163 + )"
164 +RDEPEND="${COMMON_DEPEND}
165 + client? ( net-fs/cifs-utils[ads?] )
166 + python? ( ${PYTHON_DEPS} )
167 + selinux? ( sec-policy/selinux-samba )
168 +"
169 +BDEPEND="${PYTHON_DEPS}
170 + app-text/docbook-xsl-stylesheets
171 + dev-libs/libxslt
172 + virtual/pkgconfig
173 +"
174 +
175 +PATCHES=(
176 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
177 +)
178 +
179 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
180 +CONFDIR="${FILESDIR}/4.4"
181 +
182 +WAF_BINARY="${S}/buildtools/bin/waf"
183 +
184 +SHAREDMODS=""
185 +
186 +pkg_setup() {
187 + # Package fails to build with distcc
188 + export DISTCC_DISABLE=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 + $(multilib_native_use_with acl acl-support)
244 + $(multilib_native_usex addc '' '--without-ad-dc')
245 + $(multilib_native_use_with addns dnsupdate)
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 + $(multilib_native_use_with 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 ntvfs ntvfs-fileserver)
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 /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 + use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die
329 +
330 + # Preserve functionality for old gentoo-specific unit names
331 + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
332 + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
333 + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
334 + fi
335 +
336 + if use pam && use winbind ; then
337 + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
338 + # bugs #376853 and #590374
339 + insinto /etc/security
340 + doins examples/pam_winbind/pam_winbind.conf
341 + fi
342 +
343 + keepdir /var/cache/samba
344 + keepdir /var/lib/ctdb
345 + keepdir /var/lib/samba/{bind-dns,private}
346 + keepdir /var/lock/samba
347 + keepdir /var/log/samba
348 +}
349 +
350 +multilib_src_test() {
351 + if multilib_is_native_abi ; then
352 + "${WAF_BINARY}" test || die "test failed"
353 + fi
354 +}
355 +
356 +pkg_postinst() {
357 + if [[ -z ${REPLACING_VERSIONS} ]] ; then
358 + elog "Be aware that this release contains the best of all of Samba's"
359 + elog "technology parts, both a file server (that you can reasonably expect"
360 + elog "to upgrade existing Samba 3.x releases to) and the AD domain"
361 + elog "controller work previously known as 'samba4'."
362 + elog
363 + fi
364 + elog "For further information and migration steps make sure to read "
365 + elog "https://samba.org/samba/history/${P}.html "
366 + elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
367 +}