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, 03 Dec 2021 15:39:25
Message-Id: 1638545946.d0017a6d642877a364510850cc8a8fbe44314103.polynomial-c@gentoo
1 commit: d0017a6d642877a364510850cc8a8fbe44314103
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Dec 3 15:38:04 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Dec 3 15:39:06 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d0017a6d
7
8 net-fs/samba: Removed old
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11
12 net-fs/samba/samba-4.14.10.ebuild | 343 --------------------------------------
13 net-fs/samba/samba-4.15.2.ebuild | 340 -------------------------------------
14 2 files changed, 683 deletions(-)
15
16 diff --git a/net-fs/samba/samba-4.14.10.ebuild b/net-fs/samba/samba-4.14.10.ebuild
17 deleted file mode 100644
18 index 5752eec7a717..000000000000
19 --- a/net-fs/samba/samba-4.14.10.ebuild
20 +++ /dev/null
21 @@ -1,343 +0,0 @@
22 -# Copyright 1999-2021 Gentoo Authors
23 -# Distributed under the terms of the GNU General Public License v2
24 -
25 -EAPI=7
26 -
27 -PYTHON_COMPAT=( python3_{8..9} )
28 -PYTHON_REQ_USE="threads(+),xml(+)"
29 -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles
30 -
31 -DESCRIPTION="Samba Suite Version 4"
32 -HOMEPAGE="https://samba.org/"
33 -
34 -MY_PV="${PV/_rc/rc}"
35 -MY_P="${PN}-${MY_PV}"
36 -if [[ ${PV} = *_rc* ]]; then
37 - SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
38 -else
39 - SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
40 - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 ~riscv sparc x86"
41 -fi
42 -S="${WORKDIR}/${MY_P}"
43 -
44 -LICENSE="GPL-3"
45 -SLOT="0"
46 -IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs
47 -gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux
48 -snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind
49 -zeroconf"
50 -
51 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
52 - addc? ( python json winbind )
53 - addns? ( python )
54 - ads? ( acl ldap winbind )
55 - cluster? ( ads )
56 - gpg? ( addc )
57 - ntvfs? ( addc )
58 - spotlight? ( json )
59 - test? ( python )
60 - !ads? ( !addc )
61 - ?? ( system-heimdal system-mitkrb5 )
62 -"
63 -
64 -# the test suite is messed, it uses system-installed samba
65 -# bits instead of what was built, tests things disabled via use
66 -# flags, and generally just fails to work in a way ebuilds could
67 -# rely on in its current state
68 -RESTRICT="test"
69 -
70 -MULTILIB_WRAPPED_HEADERS=(
71 - /usr/include/samba-4.0/policy.h
72 - /usr/include/samba-4.0/dcerpc_server.h
73 - /usr/include/samba-4.0/ctdb.h
74 - /usr/include/samba-4.0/ctdb_client.h
75 - /usr/include/samba-4.0/ctdb_protocol.h
76 - /usr/include/samba-4.0/ctdb_private.h
77 - /usr/include/samba-4.0/ctdb_typesafe_cb.h
78 - /usr/include/samba-4.0/ctdb_version.h
79 -)
80 -
81 -COMMON_DEPEND="
82 - >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
83 - dev-lang/perl:=
84 - dev-libs/icu:=[${MULTILIB_USEDEP}]
85 - dev-libs/libbsd[${MULTILIB_USEDEP}]
86 - dev-libs/libtasn1[${MULTILIB_USEDEP}]
87 - dev-libs/popt[${MULTILIB_USEDEP}]
88 - dev-perl/Parse-Yapp
89 - >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
90 - net-libs/libnsl:=[${MULTILIB_USEDEP}]
91 - sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
92 - >=sys-libs/ldb-2.3.2[ldap(+)?,${MULTILIB_USEDEP}]
93 - <sys-libs/ldb-2.4.0[ldap(+)?,${MULTILIB_USEDEP}]
94 - sys-libs/libcap[${MULTILIB_USEDEP}]
95 - sys-libs/liburing:=[${MULTILIB_USEDEP}]
96 - sys-libs/ncurses:0=
97 - sys-libs/readline:0=
98 - >=sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}]
99 - >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}]
100 - >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}]
101 - sys-libs/zlib[${MULTILIB_USEDEP}]
102 - virtual/libcrypt:=[${MULTILIB_USEDEP}]
103 - virtual/libiconv
104 - $(python_gen_cond_dep "
105 - addc? (
106 - dev-python/dnspython:=[\${PYTHON_USEDEP}]
107 - dev-python/markdown[\${PYTHON_USEDEP}]
108 - )
109 - addns? (
110 - dev-python/dnspython:=[\${PYTHON_USEDEP}]
111 - net-dns/bind-tools[gssapi]
112 - )
113 - ")
114 - !alpha? ( !sparc? ( sys-libs/libunwind:= ) )
115 - acl? ( virtual/acl )
116 - ceph? ( sys-cluster/ceph )
117 - cluster? ( net-libs/rpcsvc-proto )
118 - cups? ( net-print/cups )
119 - debug? ( dev-util/lttng-ust )
120 - dmapi? ( sys-apps/dmapi )
121 - fam? ( virtual/fam )
122 - gpg? ( app-crypt/gpgme )
123 - json? ( dev-libs/jansson:= )
124 - ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
125 - pam? ( sys-libs/pam )
126 - python? (
127 - sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
128 - sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
129 - sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
130 - sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
131 - )
132 - snapper? ( sys-apps/dbus )
133 - system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
134 - system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
135 - systemd? ( sys-apps/systemd:0= )
136 - zeroconf? ( net-dns/avahi[dbus] )
137 -"
138 -DEPEND="${COMMON_DEPEND}
139 - >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
140 - net-libs/libtirpc[${MULTILIB_USEDEP}]
141 - || (
142 - net-libs/rpcsvc-proto
143 - <sys-libs/glibc-2.26[rpc(+)]
144 - )
145 - spotlight? ( dev-libs/glib )
146 - test? (
147 - $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
148 - !system-mitkrb5? (
149 - >=net-dns/resolv_wrapper-1.1.4
150 - >=net-libs/socket_wrapper-1.1.9
151 - >=sys-libs/nss_wrapper-1.1.3
152 - >=sys-libs/uid_wrapper-1.2.1
153 - )
154 - )"
155 -RDEPEND="${COMMON_DEPEND}
156 - client? ( net-fs/cifs-utils[ads?] )
157 - python? ( ${PYTHON_DEPS} )
158 - selinux? ( sec-policy/selinux-samba )
159 -"
160 -BDEPEND="${PYTHON_DEPS}
161 - app-text/docbook-xsl-stylesheets
162 - dev-libs/libxslt
163 - virtual/pkgconfig
164 -"
165 -
166 -PATCHES=(
167 - "${FILESDIR}/${PN}-4.4.0-pam.patch"
168 -)
169 -
170 -#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
171 -CONFDIR="${FILESDIR}/4.4"
172 -
173 -WAF_BINARY="${S}/buildtools/bin/waf"
174 -
175 -SHAREDMODS=""
176 -
177 -pkg_setup() {
178 - # Package fails to build with distcc
179 - export DISTCC_DISABLE=1
180 -
181 - python-single-r1_pkg_setup
182 -
183 - SHAREDMODS="$(usex snapper '' '!')vfs_snapper"
184 - if use cluster ; then
185 - SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
186 - elif use ads ; then
187 - SHAREDMODS+=",idmap_ad"
188 - fi
189 -}
190 -
191 -src_prepare() {
192 - default
193 -
194 - # un-bundle dnspython
195 - sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
196 -
197 - # unbundle iso8601 unless tests are enabled
198 - if ! use test ; then
199 - sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
200 - fi
201 -
202 - ## ugly hackaround for bug #592502
203 - #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
204 -
205 - sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
206 - -i source4/dsdb/samdb/ldb_modules/password_hash.c \
207 - || die
208 -
209 - # Friggin' WAF shit
210 - multilib_copy_sources
211 -}
212 -
213 -multilib_src_configure() {
214 - # when specifying libs for samba build you must append NONE to the end to
215 - # stop it automatically including things
216 - local bundled_libs="NONE"
217 - if ! use system-heimdal && ! use system-mitkrb5 ; then
218 - bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
219 - fi
220 -
221 - local myconf=(
222 - --enable-fhs
223 - --sysconfdir="${EPREFIX}/etc"
224 - --localstatedir="${EPREFIX}/var"
225 - --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
226 - --with-piddir="${EPREFIX}/run/${PN}"
227 - --bundled-libraries="${bundled_libs}"
228 - --builtin-libraries=NONE
229 - --disable-rpath
230 - --disable-rpath-install
231 - --nopyc
232 - --nopyo
233 - --without-winexe
234 - $(multilib_native_use_with acl acl-support)
235 - $(multilib_native_usex addc '' '--without-ad-dc')
236 - $(multilib_native_use_with addns dnsupdate)
237 - $(multilib_native_use_with ads)
238 - $(multilib_native_use_enable ceph cephfs)
239 - $(multilib_native_use_with cluster cluster-support)
240 - $(multilib_native_use_enable cups)
241 - $(multilib_native_use_with dmapi)
242 - $(multilib_native_use_with fam)
243 - $(multilib_native_use_enable glusterfs)
244 - $(multilib_native_use_with gpg gpgme)
245 - $(multilib_native_use_with json)
246 - $(multilib_native_use_enable iprint)
247 - $(multilib_native_use_with ntvfs ntvfs-fileserver)
248 - $(multilib_native_use_with pam)
249 - $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
250 - $(multilib_native_use_with quota quotas)
251 - $(multilib_native_use_with regedit)
252 - $(multilib_native_use_enable spotlight)
253 - $(multilib_native_use_with syslog)
254 - $(multilib_native_use_with systemd)
255 - --systemd-install-services
256 - --with-systemddir="$(systemd_get_systemunitdir)"
257 - $(multilib_native_use_with winbind)
258 - $(multilib_native_usex python '' '--disable-python')
259 - $(multilib_native_use_enable zeroconf avahi)
260 - $(multilib_native_usex test '--enable-selftest' '')
261 - $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
262 - $(use_with debug lttng)
263 - $(use_with ldap)
264 - $(use_with profiling-data)
265 - # bug #683148
266 - --jobs 1
267 - )
268 -
269 - if multilib_is_native_abi ; then
270 - myconf+=( --with-shared-modules=${SHAREDMODS} )
271 - else
272 - myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
273 - fi
274 -
275 - CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
276 - waf-utils_src_configure ${myconf[@]}
277 -}
278 -
279 -multilib_src_compile() {
280 - waf-utils_src_compile
281 -}
282 -
283 -multilib_src_install() {
284 - waf-utils_src_install
285 -
286 - # Make all .so files executable
287 - find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
288 -
289 - if multilib_is_native_abi ; then
290 - # install ldap schema for server (bug #491002)
291 - if use ldap ; then
292 - insinto /etc/openldap/schema
293 - doins examples/LDAP/samba.schema
294 - fi
295 -
296 - # create symlink for cups (bug #552310)
297 - if use cups ; then
298 - dosym ../../../bin/smbspool \
299 - /usr/libexec/cups/backend/smb
300 - fi
301 -
302 - # install example config file
303 - insinto /etc/samba
304 - doins examples/smb.conf.default
305 -
306 - # Fix paths in example file (#603964)
307 - sed \
308 - -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
309 - -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
310 - -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
311 - -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
312 - -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
313 - -i "${ED}"/etc/samba/smb.conf.default || die
314 -
315 - # Install init script and conf.d file
316 - newinitd "${CONFDIR}/samba4.initd-r1" samba
317 - newconfd "${CONFDIR}/samba4.confd" samba
318 -
319 - dotmpfiles "${FILESDIR}"/samba.conf
320 - if ! use addc ; then
321 - rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
322 - || die
323 - fi
324 -
325 - # Preserve functionality for old gentoo-specific unit names
326 - dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
327 - dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
328 - dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
329 - fi
330 -
331 - if use pam && use winbind ; then
332 - newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
333 - # bugs #376853 and #590374
334 - insinto /etc/security
335 - doins examples/pam_winbind/pam_winbind.conf
336 - fi
337 -
338 - keepdir /var/cache/samba
339 - keepdir /var/lib/ctdb
340 - keepdir /var/lib/samba/{bind-dns,private}
341 - keepdir /var/lock/samba
342 - keepdir /var/log/samba
343 -}
344 -
345 -multilib_src_test() {
346 - if multilib_is_native_abi ; then
347 - "${WAF_BINARY}" test || die "test failed"
348 - fi
349 -}
350 -
351 -pkg_postinst() {
352 - tmpfiles_process samba.conf
353 -
354 - if [[ -z ${REPLACING_VERSIONS} ]] ; then
355 - elog "Be aware that this release contains the best of all of Samba's"
356 - elog "technology parts, both a file server (that you can reasonably expect"
357 - elog "to upgrade existing Samba 3.x releases to) and the AD domain"
358 - elog "controller work previously known as 'samba4'."
359 - elog
360 - fi
361 - elog "For further information and migration steps make sure to read "
362 - elog "https://samba.org/samba/history/${P}.html "
363 - elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
364 -}
365
366 diff --git a/net-fs/samba/samba-4.15.2.ebuild b/net-fs/samba/samba-4.15.2.ebuild
367 deleted file mode 100644
368 index 05c071ebef13..000000000000
369 --- a/net-fs/samba/samba-4.15.2.ebuild
370 +++ /dev/null
371 @@ -1,340 +0,0 @@
372 -# Copyright 1999-2021 Gentoo Authors
373 -# Distributed under the terms of the GNU General Public License v2
374 -
375 -EAPI=7
376 -
377 -PYTHON_COMPAT=( python3_{8..10} )
378 -PYTHON_REQ_USE="threads(+),xml(+)"
379 -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles
380 -
381 -DESCRIPTION="Samba Suite Version 4"
382 -HOMEPAGE="https://samba.org/"
383 -
384 -MY_PV="${PV/_rc/rc}"
385 -MY_P="${PN}-${MY_PV}"
386 -if [[ ${PV} = *_rc* ]]; then
387 - SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
388 -else
389 - SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
390 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
391 -fi
392 -S="${WORKDIR}/${MY_P}"
393 -
394 -LICENSE="GPL-3"
395 -SLOT="0"
396 -IUSE="acl addc ads ceph client cluster cups debug dmapi fam glusterfs
397 -gpg iprint json ldap pam profiling-data python quota +regedit selinux
398 -snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind
399 -zeroconf"
400 -
401 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
402 - addc? ( python json winbind )
403 - ads? ( acl ldap python winbind )
404 - cluster? ( ads )
405 - gpg? ( addc )
406 - spotlight? ( json )
407 - test? ( python )
408 - !ads? ( !addc )
409 - ?? ( system-heimdal system-mitkrb5 )
410 -"
411 -
412 -# the test suite is messed, it uses system-installed samba
413 -# bits instead of what was built, tests things disabled via use
414 -# flags, and generally just fails to work in a way ebuilds could
415 -# rely on in its current state
416 -RESTRICT="test"
417 -
418 -MULTILIB_WRAPPED_HEADERS=(
419 - /usr/include/samba-4.0/policy.h
420 - /usr/include/samba-4.0/dcerpc_server.h
421 - /usr/include/samba-4.0/ctdb.h
422 - /usr/include/samba-4.0/ctdb_client.h
423 - /usr/include/samba-4.0/ctdb_protocol.h
424 - /usr/include/samba-4.0/ctdb_private.h
425 - /usr/include/samba-4.0/ctdb_typesafe_cb.h
426 - /usr/include/samba-4.0/ctdb_version.h
427 -)
428 -
429 -COMMON_DEPEND="
430 - >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
431 - dev-lang/perl:=
432 - dev-libs/icu:=[${MULTILIB_USEDEP}]
433 - dev-libs/libbsd[${MULTILIB_USEDEP}]
434 - dev-libs/libtasn1[${MULTILIB_USEDEP}]
435 - dev-libs/popt[${MULTILIB_USEDEP}]
436 - dev-perl/Parse-Yapp
437 - >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
438 - sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
439 - >=sys-libs/ldb-2.4.1[ldap(+)?,${MULTILIB_USEDEP}]
440 - <sys-libs/ldb-2.5.0[ldap(+)?,${MULTILIB_USEDEP}]
441 - sys-libs/libcap[${MULTILIB_USEDEP}]
442 - sys-libs/liburing:=[${MULTILIB_USEDEP}]
443 - sys-libs/ncurses:0=
444 - sys-libs/readline:0=
445 - >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}]
446 - >=sys-libs/tdb-1.4.4[${MULTILIB_USEDEP}]
447 - >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}]
448 - sys-libs/zlib[${MULTILIB_USEDEP}]
449 - virtual/libcrypt:=[${MULTILIB_USEDEP}]
450 - virtual/libiconv
451 - $(python_gen_cond_dep "
452 - addc? (
453 - dev-python/dnspython:=[\${PYTHON_USEDEP}]
454 - dev-python/markdown[\${PYTHON_USEDEP}]
455 - )
456 - ads? (
457 - dev-python/dnspython:=[\${PYTHON_USEDEP}]
458 - net-dns/bind-tools[gssapi]
459 - )
460 - ")
461 - !alpha? ( !sparc? ( sys-libs/libunwind:= ) )
462 - acl? ( virtual/acl )
463 - ceph? ( sys-cluster/ceph )
464 - cluster? ( net-libs/rpcsvc-proto )
465 - cups? ( net-print/cups )
466 - debug? ( dev-util/lttng-ust )
467 - dmapi? ( sys-apps/dmapi )
468 - fam? ( virtual/fam )
469 - gpg? ( app-crypt/gpgme )
470 - json? ( dev-libs/jansson:= )
471 - ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
472 - pam? ( sys-libs/pam )
473 - python? (
474 - sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
475 - sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
476 - sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
477 - sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
478 - )
479 - snapper? ( sys-apps/dbus )
480 - system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
481 - system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
482 - systemd? ( sys-apps/systemd:0= )
483 - zeroconf? ( net-dns/avahi[dbus] )
484 -"
485 -DEPEND="${COMMON_DEPEND}
486 - >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
487 - net-libs/libtirpc[${MULTILIB_USEDEP}]
488 - || (
489 - net-libs/rpcsvc-proto
490 - <sys-libs/glibc-2.26[rpc(+)]
491 - )
492 - spotlight? ( dev-libs/glib )
493 - test? (
494 - $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
495 - !system-mitkrb5? (
496 - >=net-dns/resolv_wrapper-1.1.4
497 - >=net-libs/socket_wrapper-1.1.9
498 - >=sys-libs/nss_wrapper-1.1.3
499 - >=sys-libs/uid_wrapper-1.2.1
500 - )
501 - )"
502 -RDEPEND="${COMMON_DEPEND}
503 - client? ( net-fs/cifs-utils[ads?] )
504 - python? ( ${PYTHON_DEPS} )
505 - selinux? ( sec-policy/selinux-samba )
506 -"
507 -BDEPEND="${PYTHON_DEPS}
508 - app-text/docbook-xsl-stylesheets
509 - dev-libs/libxslt
510 - virtual/pkgconfig
511 -"
512 -
513 -PATCHES=(
514 - "${FILESDIR}/${PN}-4.4.0-pam.patch"
515 -)
516 -
517 -#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
518 -CONFDIR="${FILESDIR}/4.4"
519 -
520 -WAF_BINARY="${S}/buildtools/bin/waf"
521 -
522 -SHAREDMODS=""
523 -
524 -pkg_setup() {
525 - # Package fails to build with distcc
526 - export DISTCC_DISABLE=1
527 -
528 - python-single-r1_pkg_setup
529 -
530 - SHAREDMODS="$(usex snapper '' '!')vfs_snapper"
531 - if use cluster ; then
532 - SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
533 - elif use ads ; then
534 - SHAREDMODS+=",idmap_ad"
535 - fi
536 -}
537 -
538 -src_prepare() {
539 - default
540 -
541 - # un-bundle dnspython
542 - sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
543 -
544 - # unbundle iso8601 unless tests are enabled
545 - if ! use test ; then
546 - sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
547 - fi
548 -
549 - ## ugly hackaround for bug #592502
550 - #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
551 -
552 - sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
553 - -i source4/dsdb/samdb/ldb_modules/password_hash.c \
554 - || die
555 -
556 - # Friggin' WAF shit
557 - multilib_copy_sources
558 -}
559 -
560 -multilib_src_configure() {
561 - # when specifying libs for samba build you must append NONE to the end to
562 - # stop it automatically including things
563 - local bundled_libs="NONE"
564 - if ! use system-heimdal && ! use system-mitkrb5 ; then
565 - bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
566 - fi
567 -
568 - local myconf=(
569 - --enable-fhs
570 - --sysconfdir="${EPREFIX}/etc"
571 - --localstatedir="${EPREFIX}/var"
572 - --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
573 - --with-piddir="${EPREFIX}/run/${PN}"
574 - --bundled-libraries="${bundled_libs}"
575 - --builtin-libraries=NONE
576 - --disable-rpath
577 - --disable-rpath-install
578 - --nopyc
579 - --nopyo
580 - --without-winexe
581 - $(multilib_native_use_with acl acl-support)
582 - $(multilib_native_usex addc '' '--without-ad-dc')
583 - $(multilib_native_use_with ads)
584 - $(multilib_native_use_enable ceph cephfs)
585 - $(multilib_native_use_with cluster cluster-support)
586 - $(multilib_native_use_enable cups)
587 - $(multilib_native_use_with dmapi)
588 - $(multilib_native_use_with fam)
589 - $(multilib_native_use_enable glusterfs)
590 - $(multilib_native_use_with gpg gpgme)
591 - $(multilib_native_use_with json)
592 - $(multilib_native_use_enable iprint)
593 - $(multilib_native_use_with pam)
594 - $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
595 - $(multilib_native_use_with quota quotas)
596 - $(multilib_native_use_with regedit)
597 - $(multilib_native_use_enable spotlight)
598 - $(multilib_native_use_with syslog)
599 - $(multilib_native_use_with systemd)
600 - --systemd-install-services
601 - --with-systemddir="$(systemd_get_systemunitdir)"
602 - $(multilib_native_use_with winbind)
603 - $(multilib_native_usex python '' '--disable-python')
604 - $(multilib_native_use_enable zeroconf avahi)
605 - $(multilib_native_usex test '--enable-selftest' '')
606 - $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
607 - $(use_with debug lttng)
608 - $(use_with ldap)
609 - $(use_with profiling-data)
610 - # bug #683148
611 - --jobs 1
612 - )
613 -
614 - if multilib_is_native_abi ; then
615 - myconf+=( --with-shared-modules=${SHAREDMODS} )
616 - else
617 - myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
618 - fi
619 -
620 - CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
621 - waf-utils_src_configure ${myconf[@]}
622 -}
623 -
624 -multilib_src_compile() {
625 - waf-utils_src_compile
626 -}
627 -
628 -multilib_src_install() {
629 - waf-utils_src_install
630 -
631 - # Make all .so files executable
632 - find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
633 -
634 - if multilib_is_native_abi ; then
635 - # install ldap schema for server (bug #491002)
636 - if use ldap ; then
637 - insinto /etc/openldap/schema
638 - doins examples/LDAP/samba.schema
639 - fi
640 -
641 - # create symlink for cups (bug #552310)
642 - if use cups ; then
643 - dosym ../../../bin/smbspool \
644 - /usr/libexec/cups/backend/smb
645 - fi
646 -
647 - # install example config file
648 - insinto /etc/samba
649 - doins examples/smb.conf.default
650 -
651 - # Fix paths in example file (#603964)
652 - sed \
653 - -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
654 - -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
655 - -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
656 - -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
657 - -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
658 - -i "${ED}"/etc/samba/smb.conf.default || die
659 -
660 - # Install init script and conf.d file
661 - newinitd "${CONFDIR}/samba4.initd-r1" samba
662 - newconfd "${CONFDIR}/samba4.confd" samba
663 -
664 - dotmpfiles "${FILESDIR}"/samba.conf
665 - if ! use addc ; then
666 - rm "${D}/$(systemd_get_systemunitdir)/samba.service" \
667 - || die
668 - fi
669 -
670 - # Preserve functionality for old gentoo-specific unit names
671 - dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
672 - dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
673 - dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
674 - fi
675 -
676 - if use pam && use winbind ; then
677 - newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
678 - # bugs #376853 and #590374
679 - insinto /etc/security
680 - doins examples/pam_winbind/pam_winbind.conf
681 - fi
682 -
683 - keepdir /var/cache/samba
684 - keepdir /var/lib/ctdb
685 - keepdir /var/lib/samba/{bind-dns,private}
686 - keepdir /var/lock/samba
687 - keepdir /var/log/samba
688 -}
689 -
690 -multilib_src_test() {
691 - if multilib_is_native_abi ; then
692 - "${WAF_BINARY}" test || die "test failed"
693 - fi
694 -}
695 -
696 -pkg_postinst() {
697 - tmpfiles_process samba.conf
698 -
699 - if [[ -z ${REPLACING_VERSIONS} ]] ; then
700 - elog "Be aware that this release contains the best of all of Samba's"
701 - elog "technology parts, both a file server (that you can reasonably expect"
702 - elog "to upgrade existing Samba 3.x releases to) and the AD domain"
703 - elog "controller work previously known as 'samba4'."
704 - elog
705 - fi
706 - if [[ "${PV}" != *_rc* ]] ; then
707 - elog "For further information and migration steps make sure to read "
708 - elog "https://samba.org/samba/history/${P}.html "
709 - elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
710 - fi
711 -}