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