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, 05 Nov 2021 12:15:41
Message-Id: 1636114518.1877182404b65b802baa3b0e493bed2ad4a8f024.polynomial-c@gentoo
1 commit: 1877182404b65b802baa3b0e493bed2ad4a8f024
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Fri Nov 5 12:13:00 2021 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Fri Nov 5 12:15:18 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=18771824
7
8 net-fs/samba: Security cleanup
9
10 Bug: https://bugs.gentoo.org/820566
11 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
12
13 net-fs/samba/Manifest | 3 -
14 net-fs/samba/samba-4.13.12.ebuild | 335 -----------------------------------
15 net-fs/samba/samba-4.13.9-r3.ebuild | 335 -----------------------------------
16 net-fs/samba/samba-4.14.8.ebuild | 339 ------------------------------------
17 4 files changed, 1012 deletions(-)
18
19 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
20 index 02a6ed1377d..7bce04e7271 100644
21 --- a/net-fs/samba/Manifest
22 +++ b/net-fs/samba/Manifest
23 @@ -1,6 +1,3 @@
24 -DIST samba-4.13.12.tar.gz 18586809 BLAKE2B e6cfc942c5c10314b9d92510785f26a21c27cc66de3379cb2133af2ac4dd38bcd8cc72063ebcc6f97f9f45d2f4ef4cd5bbfa4f75b81414c08b9a93acdbb25b97 SHA512 6447733e4c07669bd2dd95a0056be92c507fa4f8c29dd0bc86881004cc24206d9c2c49ace1cb00c4fc7f08109cbf110015f51cd3ab77f2fa95818bcebc437974
25 -DIST samba-4.13.9.tar.gz 18443813 BLAKE2B 24046586f666e9db02e1dd71d7eb854691f39e6b575b9652a8b7c1aa5569c856dfd48911e3f221de74f9deec5808152fa2836d03bb9810d55d4f526f1567574b SHA512 35c98979c1141fe4bd700e3c8f2439ec08876697faeaced6668ea6a9fea1d8303ca34e82123499aa4a41054b9ed6e1260ae779ea8d59978ba6de6b5861f21948
26 -DIST samba-4.14.8.tar.gz 19039206 BLAKE2B f0ae6a3476c9f7b33e260cb379bbccdf5294b8694f44f37c6c06df849d34d9090379e20e105919e26a2e2e51a75ecf50dcb43ee90e0a88e113964dccaf51ba81 SHA512 e5d5f26eeee92e1d7d3e70b389debe331b2d14d4f5ca7796f850275897fdf16e96b507b6862c8fc4bab1bfca312ea22b60b090d881149cd1e9725fe9877dabfd
27 DIST samba-4.14.9.tar.gz 19063803 BLAKE2B 157665aba6d2449781ad3781deb2cdb3ae325879a796b8ba07a9d981ed93aaccd7f098841136a3be9d4e304ecba00b7ecb0c4a84cdfc6593172d4bc66cb38c69 SHA512 e7eb8b55656f51d94d99358dbe39869a74e34b2c69e14ac813c2387a4b2a10d8a5c22ad9b6a3a3ed4dcec4c13df810f577e22d7f1cc903176c0962e412496deb
28 DIST samba-4.15.0.tar.gz 18895040 BLAKE2B ac560e280d5fbea6499547de480f973bf1987558ce6b832fe0f6e5bad8cd58180731e7d1a37f85fce82c52bf735106aedec3ccfda09fa430a5c435e2437994f9 SHA512 5fcd8797f0ac2821f1bb213c9a39c0928847905f701003618f9f160eaa98f3fea25e3d8d4047658b0bd164f3e6a2a63fd7b0133317e536997c764acf7803950d
29 DIST samba-4.15.1.tar.gz 19192249 BLAKE2B 1348e1fd8ba69c2b4d9a70418805c4a893d2198d8571d4ee66953b8326cb18245f54053eb873accf59b82edb5ee82305f4933451ce35842e598863bc1d54040c SHA512 caa6365f26b2b19c96732252b4f8446e82a1f12f08e4ad7803709d8a10b9cc4f1075723f0249419f387b2a8de9020f68cbf0ca780f0e56efbe11fb7ddb32ebf6
30
31 diff --git a/net-fs/samba/samba-4.13.12.ebuild b/net-fs/samba/samba-4.13.12.ebuild
32 deleted file mode 100644
33 index ca82cc436a8..00000000000
34 --- a/net-fs/samba/samba-4.13.12.ebuild
35 +++ /dev/null
36 @@ -1,335 +0,0 @@
37 -# Copyright 1999-2021 Gentoo Authors
38 -# Distributed under the terms of the GNU General Public License v2
39 -
40 -EAPI=7
41 -
42 -PYTHON_COMPAT=( python3_{8..9} )
43 -PYTHON_REQ_USE="threads(+),xml(+)"
44 -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles
45 -
46 -DESCRIPTION="Samba Suite Version 4"
47 -HOMEPAGE="https://samba.org/"
48 -
49 -MY_PV="${PV/_rc/rc}"
50 -MY_P="${PN}-${MY_PV}"
51 -if [[ ${PV} = *_rc* ]]; then
52 - SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
53 -else
54 - SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
55 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
56 -fi
57 -S="${WORKDIR}/${MY_P}"
58 -
59 -LICENSE="GPL-3"
60 -SLOT="0"
61 -IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs
62 -gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux
63 -snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind
64 -zeroconf"
65 -
66 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
67 - addc? ( python json winbind )
68 - addns? ( python )
69 - ads? ( acl ldap winbind )
70 - cluster? ( ads )
71 - gpg? ( addc )
72 - ntvfs? ( addc )
73 - spotlight? ( json )
74 - test? ( python )
75 - !ads? ( !addc )
76 - ?? ( system-heimdal system-mitkrb5 )
77 -"
78 -
79 -# the test suite is messed, it uses system-installed samba
80 -# bits instead of what was built, tests things disabled via use
81 -# flags, and generally just fails to work in a way ebuilds could
82 -# rely on in its current state
83 -RESTRICT="test"
84 -
85 -MULTILIB_WRAPPED_HEADERS=(
86 - /usr/include/samba-4.0/policy.h
87 - /usr/include/samba-4.0/dcerpc_server.h
88 - /usr/include/samba-4.0/ctdb.h
89 - /usr/include/samba-4.0/ctdb_client.h
90 - /usr/include/samba-4.0/ctdb_protocol.h
91 - /usr/include/samba-4.0/ctdb_private.h
92 - /usr/include/samba-4.0/ctdb_typesafe_cb.h
93 - /usr/include/samba-4.0/ctdb_version.h
94 -)
95 -
96 -COMMON_DEPEND="
97 - >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
98 - dev-lang/perl:=
99 - dev-libs/icu:=[${MULTILIB_USEDEP}]
100 - dev-libs/libbsd[${MULTILIB_USEDEP}]
101 - dev-libs/libtasn1[${MULTILIB_USEDEP}]
102 - dev-libs/popt[${MULTILIB_USEDEP}]
103 - dev-perl/Parse-Yapp
104 - >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
105 - net-libs/libnsl:=[${MULTILIB_USEDEP}]
106 - sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
107 - >=sys-libs/ldb-2.2.1[ldap(+)?,${MULTILIB_USEDEP}]
108 - <sys-libs/ldb-2.3.0[ldap(+)?,${MULTILIB_USEDEP}]
109 - sys-libs/libcap[${MULTILIB_USEDEP}]
110 - sys-libs/liburing:=[${MULTILIB_USEDEP}]
111 - sys-libs/ncurses:0=
112 - sys-libs/readline:0=
113 - >=sys-libs/talloc-2.3.1[${MULTILIB_USEDEP}]
114 - >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}]
115 - >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}]
116 - sys-libs/zlib[${MULTILIB_USEDEP}]
117 - virtual/libcrypt:=[${MULTILIB_USEDEP}]
118 - virtual/libiconv
119 - $(python_gen_cond_dep "
120 - addns? (
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 - $(multilib_native_use_with acl acl-support)
246 - $(multilib_native_usex addc '' '--without-ad-dc')
247 - $(multilib_native_use_with addns dnsupdate)
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 ntvfs ntvfs-fileserver)
259 - $(multilib_native_use_with pam)
260 - $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
261 - $(multilib_native_use_with quota quotas)
262 - $(multilib_native_use_with regedit)
263 - $(multilib_native_use_enable spotlight)
264 - $(multilib_native_use_with syslog)
265 - $(multilib_native_use_with systemd)
266 - --systemd-install-services
267 - --with-systemddir="$(systemd_get_systemunitdir)"
268 - $(multilib_native_use_with winbind)
269 - $(multilib_native_usex python '' '--disable-python')
270 - $(multilib_native_use_enable zeroconf avahi)
271 - $(multilib_native_usex test '--enable-selftest' '')
272 - $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
273 - $(use_with debug lttng)
274 - $(use_with ldap)
275 - $(use_with profiling-data)
276 - # bug #683148
277 - --jobs 1
278 - )
279 -
280 - if multilib_is_native_abi ; then
281 - myconf+=( --with-shared-modules=${SHAREDMODS} )
282 - else
283 - myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
284 - fi
285 -
286 - CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
287 - waf-utils_src_configure ${myconf[@]}
288 -}
289 -
290 -multilib_src_compile() {
291 - waf-utils_src_compile
292 -}
293 -
294 -multilib_src_install() {
295 - waf-utils_src_install
296 -
297 - # Make all .so files executable
298 - find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
299 -
300 - if multilib_is_native_abi ; then
301 - # install ldap schema for server (bug #491002)
302 - if use ldap ; then
303 - insinto /etc/openldap/schema
304 - doins examples/LDAP/samba.schema
305 - fi
306 -
307 - # create symlink for cups (bug #552310)
308 - if use cups ; then
309 - dosym ../../../bin/smbspool /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 - use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die
331 -
332 - # Preserve functionality for old gentoo-specific unit names
333 - dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
334 - dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
335 - dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
336 - fi
337 -
338 - if use pam && use winbind ; then
339 - newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
340 - # bugs #376853 and #590374
341 - insinto /etc/security
342 - doins examples/pam_winbind/pam_winbind.conf
343 - fi
344 -
345 - keepdir /var/cache/samba
346 - keepdir /var/lib/ctdb
347 - keepdir /var/lib/samba/{bind-dns,private}
348 - keepdir /var/lock/samba
349 - keepdir /var/log/samba
350 -}
351 -
352 -multilib_src_test() {
353 - if multilib_is_native_abi ; then
354 - "${WAF_BINARY}" test || die "test failed"
355 - fi
356 -}
357 -
358 -pkg_postinst() {
359 - tmpfiles_process samba.conf
360 -
361 - if [[ -z ${REPLACING_VERSIONS} ]] ; then
362 - elog "Be aware that this release contains the best of all of Samba's"
363 - elog "technology parts, both a file server (that you can reasonably expect"
364 - elog "to upgrade existing Samba 3.x releases to) and the AD domain"
365 - elog "controller work previously known as 'samba4'."
366 - elog
367 - fi
368 - elog "For further information and migration steps make sure to read "
369 - elog "https://samba.org/samba/history/${P}.html "
370 - elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
371 -}
372
373 diff --git a/net-fs/samba/samba-4.13.9-r3.ebuild b/net-fs/samba/samba-4.13.9-r3.ebuild
374 deleted file mode 100644
375 index 5ae6e673876..00000000000
376 --- a/net-fs/samba/samba-4.13.9-r3.ebuild
377 +++ /dev/null
378 @@ -1,335 +0,0 @@
379 -# Copyright 1999-2021 Gentoo Authors
380 -# Distributed under the terms of the GNU General Public License v2
381 -
382 -EAPI=7
383 -
384 -PYTHON_COMPAT=( python3_{8..9} )
385 -PYTHON_REQ_USE="threads(+),xml(+)"
386 -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles
387 -
388 -DESCRIPTION="Samba Suite Version 4"
389 -HOMEPAGE="https://samba.org/"
390 -
391 -MY_PV="${PV/_rc/rc}"
392 -MY_P="${PN}-${MY_PV}"
393 -if [[ ${PV} = *_rc* ]]; then
394 - SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
395 -else
396 - SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
397 - KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ppc ppc64 sparc x86"
398 -fi
399 -S="${WORKDIR}/${MY_P}"
400 -
401 -LICENSE="GPL-3"
402 -SLOT="0"
403 -IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs
404 -gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux
405 -snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind
406 -zeroconf"
407 -
408 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
409 - addc? ( python json winbind )
410 - addns? ( python )
411 - ads? ( acl ldap winbind )
412 - cluster? ( ads )
413 - gpg? ( addc )
414 - ntvfs? ( addc )
415 - spotlight? ( json )
416 - test? ( python )
417 - !ads? ( !addc )
418 - ?? ( system-heimdal system-mitkrb5 )
419 -"
420 -
421 -# the test suite is messed, it uses system-installed samba
422 -# bits instead of what was built, tests things disabled via use
423 -# flags, and generally just fails to work in a way ebuilds could
424 -# rely on in its current state
425 -RESTRICT="test"
426 -
427 -MULTILIB_WRAPPED_HEADERS=(
428 - /usr/include/samba-4.0/policy.h
429 - /usr/include/samba-4.0/dcerpc_server.h
430 - /usr/include/samba-4.0/ctdb.h
431 - /usr/include/samba-4.0/ctdb_client.h
432 - /usr/include/samba-4.0/ctdb_protocol.h
433 - /usr/include/samba-4.0/ctdb_private.h
434 - /usr/include/samba-4.0/ctdb_typesafe_cb.h
435 - /usr/include/samba-4.0/ctdb_version.h
436 -)
437 -
438 -COMMON_DEPEND="
439 - >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
440 - dev-lang/perl:=
441 - dev-libs/icu:=[${MULTILIB_USEDEP}]
442 - dev-libs/libbsd[${MULTILIB_USEDEP}]
443 - dev-libs/libtasn1[${MULTILIB_USEDEP}]
444 - dev-libs/popt[${MULTILIB_USEDEP}]
445 - dev-perl/Parse-Yapp
446 - >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
447 - net-libs/libnsl:=[${MULTILIB_USEDEP}]
448 - sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
449 - >=sys-libs/ldb-2.2.1[ldap(+)?,${MULTILIB_USEDEP}]
450 - <sys-libs/ldb-2.3.0[ldap(+)?,${MULTILIB_USEDEP}]
451 - sys-libs/libcap[${MULTILIB_USEDEP}]
452 - sys-libs/liburing:=[${MULTILIB_USEDEP}]
453 - sys-libs/ncurses:0=
454 - sys-libs/readline:0=
455 - >=sys-libs/talloc-2.3.1[${MULTILIB_USEDEP}]
456 - >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}]
457 - >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}]
458 - sys-libs/zlib[${MULTILIB_USEDEP}]
459 - virtual/libcrypt:=[${MULTILIB_USEDEP}]
460 - virtual/libiconv
461 - $(python_gen_cond_dep "
462 - addns? (
463 - dev-python/dnspython:=[\${PYTHON_USEDEP}]
464 - net-dns/bind-tools[gssapi]
465 - )
466 - ")
467 - !alpha? ( !sparc? ( sys-libs/libunwind:= ) )
468 - acl? ( virtual/acl )
469 - ceph? ( sys-cluster/ceph )
470 - cluster? ( net-libs/rpcsvc-proto )
471 - cups? ( net-print/cups )
472 - debug? ( dev-util/lttng-ust )
473 - dmapi? ( sys-apps/dmapi )
474 - fam? ( virtual/fam )
475 - gpg? ( app-crypt/gpgme )
476 - json? ( dev-libs/jansson:= )
477 - ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
478 - pam? ( sys-libs/pam )
479 - python? (
480 - sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
481 - sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
482 - sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
483 - sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
484 - )
485 - snapper? ( sys-apps/dbus )
486 - system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
487 - system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
488 - systemd? ( sys-apps/systemd:0= )
489 - zeroconf? ( net-dns/avahi[dbus] )
490 -"
491 -DEPEND="${COMMON_DEPEND}
492 - >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
493 - net-libs/libtirpc[${MULTILIB_USEDEP}]
494 - || (
495 - net-libs/rpcsvc-proto
496 - <sys-libs/glibc-2.26[rpc(+)]
497 - )
498 - spotlight? ( dev-libs/glib )
499 - test? (
500 - $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
501 - !system-mitkrb5? (
502 - >=net-dns/resolv_wrapper-1.1.4
503 - >=net-libs/socket_wrapper-1.1.9
504 - >=sys-libs/nss_wrapper-1.1.3
505 - >=sys-libs/uid_wrapper-1.2.1
506 - )
507 - )"
508 -RDEPEND="${COMMON_DEPEND}
509 - client? ( net-fs/cifs-utils[ads?] )
510 - python? ( ${PYTHON_DEPS} )
511 - selinux? ( sec-policy/selinux-samba )
512 -"
513 -BDEPEND="${PYTHON_DEPS}
514 - app-text/docbook-xsl-stylesheets
515 - dev-libs/libxslt
516 - virtual/pkgconfig
517 -"
518 -
519 -PATCHES=(
520 - "${FILESDIR}/${PN}-4.4.0-pam.patch"
521 -)
522 -
523 -#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
524 -CONFDIR="${FILESDIR}/4.4"
525 -
526 -WAF_BINARY="${S}/buildtools/bin/waf"
527 -
528 -SHAREDMODS=""
529 -
530 -pkg_setup() {
531 - # Package fails to build with distcc
532 - export DISTCC_DISABLE=1
533 -
534 - python-single-r1_pkg_setup
535 -
536 - SHAREDMODS="$(usex snapper '' '!')vfs_snapper"
537 - if use cluster ; then
538 - SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
539 - elif use ads ; then
540 - SHAREDMODS+=",idmap_ad"
541 - fi
542 -}
543 -
544 -src_prepare() {
545 - default
546 -
547 - # un-bundle dnspython
548 - sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
549 -
550 - # unbundle iso8601 unless tests are enabled
551 - if ! use test ; then
552 - sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
553 - fi
554 -
555 - ## ugly hackaround for bug #592502
556 - #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
557 -
558 - sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
559 - -i source4/dsdb/samdb/ldb_modules/password_hash.c \
560 - || die
561 -
562 - # Friggin' WAF shit
563 - multilib_copy_sources
564 -}
565 -
566 -multilib_src_configure() {
567 - # when specifying libs for samba build you must append NONE to the end to
568 - # stop it automatically including things
569 - local bundled_libs="NONE"
570 - if ! use system-heimdal && ! use system-mitkrb5 ; then
571 - bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
572 - fi
573 -
574 - local myconf=(
575 - --enable-fhs
576 - --sysconfdir="${EPREFIX}/etc"
577 - --localstatedir="${EPREFIX}/var"
578 - --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
579 - --with-piddir="${EPREFIX}/run/${PN}"
580 - --bundled-libraries="${bundled_libs}"
581 - --builtin-libraries=NONE
582 - --disable-rpath
583 - --disable-rpath-install
584 - --nopyc
585 - --nopyo
586 - --without-winexe
587 - $(multilib_native_use_with acl acl-support)
588 - $(multilib_native_usex addc '' '--without-ad-dc')
589 - $(multilib_native_use_with addns dnsupdate)
590 - $(multilib_native_use_with ads)
591 - $(multilib_native_use_enable ceph cephfs)
592 - $(multilib_native_use_with cluster cluster-support)
593 - $(multilib_native_use_enable cups)
594 - $(multilib_native_use_with dmapi)
595 - $(multilib_native_use_with fam)
596 - $(multilib_native_use_enable glusterfs)
597 - $(multilib_native_use_with gpg gpgme)
598 - $(multilib_native_use_with json)
599 - $(multilib_native_use_enable iprint)
600 - $(multilib_native_use_with ntvfs ntvfs-fileserver)
601 - $(multilib_native_use_with pam)
602 - $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
603 - $(multilib_native_use_with quota quotas)
604 - $(multilib_native_use_with regedit)
605 - $(multilib_native_use_enable spotlight)
606 - $(multilib_native_use_with syslog)
607 - $(multilib_native_use_with systemd)
608 - --systemd-install-services
609 - --with-systemddir="$(systemd_get_systemunitdir)"
610 - $(multilib_native_use_with winbind)
611 - $(multilib_native_usex python '' '--disable-python')
612 - $(multilib_native_use_enable zeroconf avahi)
613 - $(multilib_native_usex test '--enable-selftest' '')
614 - $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
615 - $(use_with debug lttng)
616 - $(use_with ldap)
617 - $(use_with profiling-data)
618 - # bug #683148
619 - --jobs 1
620 - )
621 -
622 - if multilib_is_native_abi ; then
623 - myconf+=( --with-shared-modules=${SHAREDMODS} )
624 - else
625 - myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
626 - fi
627 -
628 - CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
629 - waf-utils_src_configure ${myconf[@]}
630 -}
631 -
632 -multilib_src_compile() {
633 - waf-utils_src_compile
634 -}
635 -
636 -multilib_src_install() {
637 - waf-utils_src_install
638 -
639 - # Make all .so files executable
640 - find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
641 -
642 - if multilib_is_native_abi ; then
643 - # install ldap schema for server (bug #491002)
644 - if use ldap ; then
645 - insinto /etc/openldap/schema
646 - doins examples/LDAP/samba.schema
647 - fi
648 -
649 - # create symlink for cups (bug #552310)
650 - if use cups ; then
651 - dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
652 - fi
653 -
654 - # install example config file
655 - insinto /etc/samba
656 - doins examples/smb.conf.default
657 -
658 - # Fix paths in example file (#603964)
659 - sed \
660 - -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
661 - -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
662 - -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
663 - -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
664 - -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
665 - -i "${ED}"/etc/samba/smb.conf.default || die
666 -
667 - # Install init script and conf.d file
668 - newinitd "${CONFDIR}/samba4.initd-r1" samba
669 - newconfd "${CONFDIR}/samba4.confd" samba
670 -
671 - dotmpfiles "${FILESDIR}"/samba.conf
672 - use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die
673 -
674 - # Preserve functionality for old gentoo-specific unit names
675 - dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
676 - dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
677 - dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
678 - fi
679 -
680 - if use pam && use winbind ; then
681 - newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
682 - # bugs #376853 and #590374
683 - insinto /etc/security
684 - doins examples/pam_winbind/pam_winbind.conf
685 - fi
686 -
687 - keepdir /var/cache/samba
688 - keepdir /var/lib/ctdb
689 - keepdir /var/lib/samba/{bind-dns,private}
690 - keepdir /var/lock/samba
691 - keepdir /var/log/samba
692 -}
693 -
694 -multilib_src_test() {
695 - if multilib_is_native_abi ; then
696 - "${WAF_BINARY}" test || die "test failed"
697 - fi
698 -}
699 -
700 -pkg_postinst() {
701 - tmpfiles_process samba.conf
702 -
703 - if [[ -z ${REPLACING_VERSIONS} ]] ; then
704 - elog "Be aware that this release contains the best of all of Samba's"
705 - elog "technology parts, both a file server (that you can reasonably expect"
706 - elog "to upgrade existing Samba 3.x releases to) and the AD domain"
707 - elog "controller work previously known as 'samba4'."
708 - elog
709 - fi
710 - elog "For further information and migration steps make sure to read "
711 - elog "https://samba.org/samba/history/${P}.html "
712 - elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
713 -}
714
715 diff --git a/net-fs/samba/samba-4.14.8.ebuild b/net-fs/samba/samba-4.14.8.ebuild
716 deleted file mode 100644
717 index 3ca6d2708a4..00000000000
718 --- a/net-fs/samba/samba-4.14.8.ebuild
719 +++ /dev/null
720 @@ -1,339 +0,0 @@
721 -# Copyright 1999-2021 Gentoo Authors
722 -# Distributed under the terms of the GNU General Public License v2
723 -
724 -EAPI=7
725 -
726 -PYTHON_COMPAT=( python3_{8..9} )
727 -PYTHON_REQ_USE="threads(+),xml(+)"
728 -inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles
729 -
730 -DESCRIPTION="Samba Suite Version 4"
731 -HOMEPAGE="https://samba.org/"
732 -
733 -MY_PV="${PV/_rc/rc}"
734 -MY_P="${PN}-${MY_PV}"
735 -if [[ ${PV} = *_rc* ]]; then
736 - SRC_URI="mirror://samba/rc/${MY_P}.tar.gz"
737 -else
738 - SRC_URI="mirror://samba/stable/${MY_P}.tar.gz"
739 - KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86"
740 -fi
741 -S="${WORKDIR}/${MY_P}"
742 -
743 -LICENSE="GPL-3"
744 -SLOT="0"
745 -IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs
746 -gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux
747 -snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind
748 -zeroconf"
749 -
750 -REQUIRED_USE="${PYTHON_REQUIRED_USE}
751 - addc? ( python json winbind )
752 - addns? ( python )
753 - ads? ( acl ldap winbind )
754 - cluster? ( ads )
755 - gpg? ( addc )
756 - ntvfs? ( addc )
757 - spotlight? ( json )
758 - test? ( python )
759 - !ads? ( !addc )
760 - ?? ( system-heimdal system-mitkrb5 )
761 -"
762 -
763 -# the test suite is messed, it uses system-installed samba
764 -# bits instead of what was built, tests things disabled via use
765 -# flags, and generally just fails to work in a way ebuilds could
766 -# rely on in its current state
767 -RESTRICT="test"
768 -
769 -MULTILIB_WRAPPED_HEADERS=(
770 - /usr/include/samba-4.0/policy.h
771 - /usr/include/samba-4.0/dcerpc_server.h
772 - /usr/include/samba-4.0/ctdb.h
773 - /usr/include/samba-4.0/ctdb_client.h
774 - /usr/include/samba-4.0/ctdb_protocol.h
775 - /usr/include/samba-4.0/ctdb_private.h
776 - /usr/include/samba-4.0/ctdb_typesafe_cb.h
777 - /usr/include/samba-4.0/ctdb_version.h
778 -)
779 -
780 -COMMON_DEPEND="
781 - >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
782 - dev-lang/perl:=
783 - dev-libs/icu:=[${MULTILIB_USEDEP}]
784 - dev-libs/libbsd[${MULTILIB_USEDEP}]
785 - dev-libs/libtasn1[${MULTILIB_USEDEP}]
786 - dev-libs/popt[${MULTILIB_USEDEP}]
787 - dev-perl/Parse-Yapp
788 - >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}]
789 - net-libs/libnsl:=[${MULTILIB_USEDEP}]
790 - sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}]
791 - >=sys-libs/ldb-2.3.0[ldap(+)?,${MULTILIB_USEDEP}]
792 - <sys-libs/ldb-2.4.0[ldap(+)?,${MULTILIB_USEDEP}]
793 - sys-libs/libcap[${MULTILIB_USEDEP}]
794 - sys-libs/liburing:=[${MULTILIB_USEDEP}]
795 - sys-libs/ncurses:0=
796 - sys-libs/readline:0=
797 - >=sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}]
798 - >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}]
799 - >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}]
800 - sys-libs/zlib[${MULTILIB_USEDEP}]
801 - virtual/libcrypt:=[${MULTILIB_USEDEP}]
802 - virtual/libiconv
803 - $(python_gen_cond_dep "
804 - addc? (
805 - dev-python/dnspython:=[\${PYTHON_USEDEP}]
806 - dev-python/markdown[\${PYTHON_USEDEP}]
807 - )
808 - addns? (
809 - dev-python/dnspython:=[\${PYTHON_USEDEP}]
810 - net-dns/bind-tools[gssapi]
811 - )
812 - ")
813 - !alpha? ( !sparc? ( sys-libs/libunwind:= ) )
814 - acl? ( virtual/acl )
815 - ceph? ( sys-cluster/ceph )
816 - cluster? ( net-libs/rpcsvc-proto )
817 - cups? ( net-print/cups )
818 - debug? ( dev-util/lttng-ust )
819 - dmapi? ( sys-apps/dmapi )
820 - fam? ( virtual/fam )
821 - gpg? ( app-crypt/gpgme )
822 - json? ( dev-libs/jansson:= )
823 - ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
824 - pam? ( sys-libs/pam )
825 - python? (
826 - sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}]
827 - sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}]
828 - sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}]
829 - sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}]
830 - )
831 - snapper? ( sys-apps/dbus )
832 - system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
833 - system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
834 - systemd? ( sys-apps/systemd:0= )
835 - zeroconf? ( net-dns/avahi[dbus] )
836 -"
837 -DEPEND="${COMMON_DEPEND}
838 - >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}]
839 - net-libs/libtirpc[${MULTILIB_USEDEP}]
840 - || (
841 - net-libs/rpcsvc-proto
842 - <sys-libs/glibc-2.26[rpc(+)]
843 - )
844 - spotlight? ( dev-libs/glib )
845 - test? (
846 - $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" )
847 - !system-mitkrb5? (
848 - >=net-dns/resolv_wrapper-1.1.4
849 - >=net-libs/socket_wrapper-1.1.9
850 - >=sys-libs/nss_wrapper-1.1.3
851 - >=sys-libs/uid_wrapper-1.2.1
852 - )
853 - )"
854 -RDEPEND="${COMMON_DEPEND}
855 - client? ( net-fs/cifs-utils[ads?] )
856 - python? ( ${PYTHON_DEPS} )
857 - selinux? ( sec-policy/selinux-samba )
858 -"
859 -BDEPEND="${PYTHON_DEPS}
860 - app-text/docbook-xsl-stylesheets
861 - dev-libs/libxslt
862 - virtual/pkgconfig
863 -"
864 -
865 -PATCHES=(
866 - "${FILESDIR}/${PN}-4.4.0-pam.patch"
867 -)
868 -
869 -#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
870 -CONFDIR="${FILESDIR}/4.4"
871 -
872 -WAF_BINARY="${S}/buildtools/bin/waf"
873 -
874 -SHAREDMODS=""
875 -
876 -pkg_setup() {
877 - # Package fails to build with distcc
878 - export DISTCC_DISABLE=1
879 -
880 - python-single-r1_pkg_setup
881 -
882 - SHAREDMODS="$(usex snapper '' '!')vfs_snapper"
883 - if use cluster ; then
884 - SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad"
885 - elif use ads ; then
886 - SHAREDMODS+=",idmap_ad"
887 - fi
888 -}
889 -
890 -src_prepare() {
891 - default
892 -
893 - # un-bundle dnspython
894 - sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
895 -
896 - # unbundle iso8601 unless tests are enabled
897 - if ! use test ; then
898 - sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
899 - fi
900 -
901 - ## ugly hackaround for bug #592502
902 - #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
903 -
904 - sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
905 - -i source4/dsdb/samdb/ldb_modules/password_hash.c \
906 - || die
907 -
908 - # Friggin' WAF shit
909 - multilib_copy_sources
910 -}
911 -
912 -multilib_src_configure() {
913 - # when specifying libs for samba build you must append NONE to the end to
914 - # stop it automatically including things
915 - local bundled_libs="NONE"
916 - if ! use system-heimdal && ! use system-mitkrb5 ; then
917 - bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
918 - fi
919 -
920 - local myconf=(
921 - --enable-fhs
922 - --sysconfdir="${EPREFIX}/etc"
923 - --localstatedir="${EPREFIX}/var"
924 - --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
925 - --with-piddir="${EPREFIX}/run/${PN}"
926 - --bundled-libraries="${bundled_libs}"
927 - --builtin-libraries=NONE
928 - --disable-rpath
929 - --disable-rpath-install
930 - --nopyc
931 - --nopyo
932 - --without-winexe
933 - $(multilib_native_use_with acl acl-support)
934 - $(multilib_native_usex addc '' '--without-ad-dc')
935 - $(multilib_native_use_with addns dnsupdate)
936 - $(multilib_native_use_with ads)
937 - $(multilib_native_use_enable ceph cephfs)
938 - $(multilib_native_use_with cluster cluster-support)
939 - $(multilib_native_use_enable cups)
940 - $(multilib_native_use_with dmapi)
941 - $(multilib_native_use_with fam)
942 - $(multilib_native_use_enable glusterfs)
943 - $(multilib_native_use_with gpg gpgme)
944 - $(multilib_native_use_with json)
945 - $(multilib_native_use_enable iprint)
946 - $(multilib_native_use_with ntvfs ntvfs-fileserver)
947 - $(multilib_native_use_with pam)
948 - $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
949 - $(multilib_native_use_with quota quotas)
950 - $(multilib_native_use_with regedit)
951 - $(multilib_native_use_enable spotlight)
952 - $(multilib_native_use_with syslog)
953 - $(multilib_native_use_with systemd)
954 - --systemd-install-services
955 - --with-systemddir="$(systemd_get_systemunitdir)"
956 - $(multilib_native_use_with winbind)
957 - $(multilib_native_usex python '' '--disable-python')
958 - $(multilib_native_use_enable zeroconf avahi)
959 - $(multilib_native_usex test '--enable-selftest' '')
960 - $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '')
961 - $(use_with debug lttng)
962 - $(use_with ldap)
963 - $(use_with profiling-data)
964 - # bug #683148
965 - --jobs 1
966 - )
967 -
968 - if multilib_is_native_abi ; then
969 - myconf+=( --with-shared-modules=${SHAREDMODS} )
970 - else
971 - myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper )
972 - fi
973 -
974 - CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
975 - waf-utils_src_configure ${myconf[@]}
976 -}
977 -
978 -multilib_src_compile() {
979 - waf-utils_src_compile
980 -}
981 -
982 -multilib_src_install() {
983 - waf-utils_src_install
984 -
985 - # Make all .so files executable
986 - find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die
987 -
988 - if multilib_is_native_abi ; then
989 - # install ldap schema for server (bug #491002)
990 - if use ldap ; then
991 - insinto /etc/openldap/schema
992 - doins examples/LDAP/samba.schema
993 - fi
994 -
995 - # create symlink for cups (bug #552310)
996 - if use cups ; then
997 - dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
998 - fi
999 -
1000 - # install example config file
1001 - insinto /etc/samba
1002 - doins examples/smb.conf.default
1003 -
1004 - # Fix paths in example file (#603964)
1005 - sed \
1006 - -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
1007 - -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
1008 - -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
1009 - -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
1010 - -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
1011 - -i "${ED}"/etc/samba/smb.conf.default || die
1012 -
1013 - # Install init script and conf.d file
1014 - newinitd "${CONFDIR}/samba4.initd-r1" samba
1015 - newconfd "${CONFDIR}/samba4.confd" samba
1016 -
1017 - dotmpfiles "${FILESDIR}"/samba.conf
1018 - use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die
1019 -
1020 - # Preserve functionality for old gentoo-specific unit names
1021 - dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service"
1022 - dosym smb.service "$(systemd_get_systemunitdir)/smbd.service"
1023 - dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service"
1024 - fi
1025 -
1026 - if use pam && use winbind ; then
1027 - newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind
1028 - # bugs #376853 and #590374
1029 - insinto /etc/security
1030 - doins examples/pam_winbind/pam_winbind.conf
1031 - fi
1032 -
1033 - keepdir /var/cache/samba
1034 - keepdir /var/lib/ctdb
1035 - keepdir /var/lib/samba/{bind-dns,private}
1036 - keepdir /var/lock/samba
1037 - keepdir /var/log/samba
1038 -}
1039 -
1040 -multilib_src_test() {
1041 - if multilib_is_native_abi ; then
1042 - "${WAF_BINARY}" test || die "test failed"
1043 - fi
1044 -}
1045 -
1046 -pkg_postinst() {
1047 - tmpfiles_process samba.conf
1048 -
1049 - if [[ -z ${REPLACING_VERSIONS} ]] ; then
1050 - elog "Be aware that this release contains the best of all of Samba's"
1051 - elog "technology parts, both a file server (that you can reasonably expect"
1052 - elog "to upgrade existing Samba 3.x releases to) and the AD domain"
1053 - elog "controller work previously known as 'samba4'."
1054 - elog
1055 - fi
1056 - elog "For further information and migration steps make sure to read "
1057 - elog "https://samba.org/samba/history/${P}.html "
1058 - elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
1059 -}