1 |
commit: f10d6e6b8d366ca8b4cf89205f0e08e67b8de0bc |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Apr 29 20:46:06 2021 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Apr 29 20:50:00 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f10d6e6b |
7 |
|
8 |
net-fs/samba: Bump to versions 4.12.15, 4.13.8 and 4.14.4 |
9 |
|
10 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
11 |
|
12 |
net-fs/samba/Manifest | 3 + |
13 |
net-fs/samba/samba-4.12.15.ebuild | 329 +++++++++++++++++++++++++++++++++++++ |
14 |
net-fs/samba/samba-4.13.8.ebuild | 332 +++++++++++++++++++++++++++++++++++++ |
15 |
net-fs/samba/samba-4.14.4.ebuild | 336 ++++++++++++++++++++++++++++++++++++++ |
16 |
4 files changed, 1000 insertions(+) |
17 |
|
18 |
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest |
19 |
index 0fb00324195..ed6a5c2cf19 100644 |
20 |
--- a/net-fs/samba/Manifest |
21 |
+++ b/net-fs/samba/Manifest |
22 |
@@ -1,5 +1,8 @@ |
23 |
DIST samba-4.12.14.tar.gz 18260926 BLAKE2B 0a90d481b8c7ad44b5ceeb3586cc246f038c21c0dffbeded76707ac9f6993edac3dc469a37742c02bcb9e1808cad0df3dc6a4277c71422323c05d111bad5fe7e SHA512 40561c5cbf5988c45166e21a1eadf7050026083a0ad7aef8076c9b8a053113bbe9397b1a507abd75b52eb4e69dcdbf8bc2404ac72c515c5ee62c30fba4c768f0 |
24 |
+DIST samba-4.12.15.tar.gz 18259918 BLAKE2B 69ce22c6f8570d3b55f960bc9225af8867d731ec827e2723e233b65be3dd68710de9b15839aea80b6dc8cadc38608319d1d153ba78322f4cc503e7b6a7d9f6e1 SHA512 89852e541d08af399578d497c873271dbe1f88e96e60a7e186209d165ef1525a79e57b5d24ee312e44056bb9d1b9b4e2caa18a771a387edf776a05a133372d84 |
25 |
DIST samba-4.12.9.tar.gz 18236198 BLAKE2B e19cbbbb8416626ca2fe769bf26f3645e94f23781538b3c5e1f94ce618efb807d0732e5591525ec066a31cc0211463b9b66105d1d499989012d624edaa2a132c SHA512 8bd3122bcaab2f5a16a73902a9b628384063a8116a08f0254541e05c148016839b3215c60ff0d3291a332e7884708950ad64137204b0ac19801012d3b6684fa6 |
26 |
DIST samba-4.13.7.tar.gz 18432921 BLAKE2B 55e5a470a594bc56c942daa394e2d8e8b90dd0d1408236f7d69a60c609f1f4b1d5389209ef57e245ca326b271fba0b58fceea47681a90ab09828a4e68e40693a SHA512 eac0c0b60d50591ecd8e730bd6f24ec3d5731a9dd4172640259d841cca988f20265e5a57967a070713ab7b4bd95766a21247cc8e6b32177b79eb766520a3288a |
27 |
+DIST samba-4.13.8.tar.gz 18438995 BLAKE2B 55ec8f94fa238d67d4fde33addfe65d14fcca66c0b67c7d5866d150314be39e2844c69fb1ac2c410a6143f5a9aba168e396a3984e2083cf073ba2630e523a334 SHA512 b8704097b5c20f2d5eb04f41b4519205f1b554215b396e558715a3039aeaece6ad776928c9aa7be84a3bc98994cdfdb0b7e3787c31832eb0e025eb796fe06bae |
28 |
DIST samba-4.14.2.tar.gz 18636757 BLAKE2B 51b0b2a1543256cbd1ab121f0b90e6546761f2c0377256d3f9e804368ce73d07f6bfdc0cbb6725d438358e1e92e8e2f59f0b54e6fff52f8c07ff25398728e9da SHA512 8dd97abb14d531c3865747512abdf4d2db84b4daa5c15b67cd4f03326e30270d947ba0154493c5897aaa357039b472cfa669c80698b0f572e46d730f70a29b43 |
29 |
DIST samba-4.14.3.tar.gz 18643265 BLAKE2B 244e6d98e987956560342c29f26138524d5067221ab345310bd3ff792922ad43d667febd12e5b6361f516b037979096a31481cc55843584c8db99768e085bfd7 SHA512 b8cd12c65d2a34c71a40c18eb2c74e86b75be734437ba71106e41352691359fbaf7e5ce7e386846fd84d4c19d100e02ea74dfd6f1ec34f66a10e5c20c0fb3cc6 |
30 |
+DIST samba-4.14.4.tar.gz 18645552 BLAKE2B 4fbf4b000496b66c7c464a4b522108fde12df30dda90d0a86143c2a9ffa9d8907bbeab1bbad8974f87d4851f0afc31315ab52f27b23d19131934e89659c4e270 SHA512 200b2b2b08b369915e045f22ee993d5deea7a2533c6c582d4b88c614adcad5529109d449e843a2a1f292e5cfb1877d66421b5b0801ad988896cbe5413717e4dc |
31 |
|
32 |
diff --git a/net-fs/samba/samba-4.12.15.ebuild b/net-fs/samba/samba-4.12.15.ebuild |
33 |
new file mode 100644 |
34 |
index 00000000000..45fc3a27650 |
35 |
--- /dev/null |
36 |
+++ b/net-fs/samba/samba-4.12.15.ebuild |
37 |
@@ -0,0 +1,329 @@ |
38 |
+# Copyright 1999-2021 Gentoo Authors |
39 |
+# Distributed under the terms of the GNU General Public License v2 |
40 |
+ |
41 |
+EAPI=6 |
42 |
+ |
43 |
+PYTHON_COMPAT=( python3_{7,8} ) |
44 |
+PYTHON_REQ_USE='threads(+),xml(+)' |
45 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles |
46 |
+ |
47 |
+MY_PV="${PV/_rc/rc}" |
48 |
+MY_P="${PN}-${MY_PV}" |
49 |
+ |
50 |
+SRC_PATH="stable" |
51 |
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc" |
52 |
+ |
53 |
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz" |
54 |
+[[ ${PV} = *_rc* ]] || \ |
55 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
56 |
+ |
57 |
+DESCRIPTION="Samba Suite Version 4" |
58 |
+HOMEPAGE="https://www.samba.org/" |
59 |
+LICENSE="GPL-3" |
60 |
+ |
61 |
+SLOT="0" |
62 |
+ |
63 |
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs |
64 |
+gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux |
65 |
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind |
66 |
+zeroconf" |
67 |
+ |
68 |
+MULTILIB_WRAPPED_HEADERS=( |
69 |
+ /usr/include/samba-4.0/policy.h |
70 |
+ /usr/include/samba-4.0/dcerpc_server.h |
71 |
+ /usr/include/samba-4.0/ctdb.h |
72 |
+ /usr/include/samba-4.0/ctdb_client.h |
73 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
74 |
+ /usr/include/samba-4.0/ctdb_private.h |
75 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
76 |
+ /usr/include/samba-4.0/ctdb_version.h |
77 |
+) |
78 |
+ |
79 |
+CDEPEND=" |
80 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
81 |
+ dev-lang/perl:= |
82 |
+ dev-libs/icu:=[${MULTILIB_USEDEP}] |
83 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
84 |
+ dev-libs/libtasn1[${MULTILIB_USEDEP}] |
85 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
86 |
+ dev-perl/Parse-Yapp |
87 |
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] |
88 |
+ net-libs/libnsl:=[${MULTILIB_USEDEP}] |
89 |
+ sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}] |
90 |
+ >=sys-libs/ldb-2.1.5[ldap(+)?,python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}] |
91 |
+ <sys-libs/ldb-2.2.0[ldap(+)?,python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}] |
92 |
+ sys-libs/libcap[${MULTILIB_USEDEP}] |
93 |
+ sys-libs/liburing:=[${MULTILIB_USEDEP}] |
94 |
+ sys-libs/ncurses:0= |
95 |
+ sys-libs/readline:0= |
96 |
+ >=sys-libs/talloc-2.3.1[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}] |
97 |
+ >=sys-libs/tdb-1.4.3[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}] |
98 |
+ >=sys-libs/tevent-0.10.2[python?,${PYTHON_SINGLE_USEDEP},${MULTILIB_USEDEP}] |
99 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
100 |
+ virtual/libiconv |
101 |
+ $(python_gen_cond_dep " |
102 |
+ dev-python/subunit[\${PYTHON_MULTI_USEDEP},${MULTILIB_USEDEP}] |
103 |
+ addns? ( |
104 |
+ net-dns/bind-tools[gssapi] |
105 |
+ dev-python/dnspython:=[\${PYTHON_MULTI_USEDEP}] |
106 |
+ ) |
107 |
+ ") |
108 |
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) |
109 |
+ acl? ( virtual/acl ) |
110 |
+ ceph? ( sys-cluster/ceph ) |
111 |
+ cluster? ( |
112 |
+ net-libs/rpcsvc-proto |
113 |
+ !dev-db/ctdb |
114 |
+ ) |
115 |
+ cups? ( net-print/cups ) |
116 |
+ debug? ( dev-util/lttng-ust ) |
117 |
+ dmapi? ( sys-apps/dmapi ) |
118 |
+ fam? ( virtual/fam ) |
119 |
+ gpg? ( app-crypt/gpgme ) |
120 |
+ json? ( dev-libs/jansson ) |
121 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
122 |
+ pam? ( sys-libs/pam ) |
123 |
+ snapper? ( sys-apps/dbus ) |
124 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
125 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
126 |
+ systemd? ( sys-apps/systemd:0= ) |
127 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
128 |
+" |
129 |
+DEPEND="${CDEPEND} |
130 |
+ ${PYTHON_DEPS} |
131 |
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] |
132 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
133 |
+ virtual/pkgconfig |
134 |
+ || ( |
135 |
+ net-libs/rpcsvc-proto |
136 |
+ <sys-libs/glibc-2.26[rpc(+)] |
137 |
+ ) |
138 |
+ spotlight? ( dev-libs/glib ) |
139 |
+ test? ( |
140 |
+ !system-mitkrb5? ( |
141 |
+ >=sys-libs/nss_wrapper-1.1.3 |
142 |
+ >=net-dns/resolv_wrapper-1.1.4 |
143 |
+ >=net-libs/socket_wrapper-1.1.9 |
144 |
+ >=sys-libs/uid_wrapper-1.2.1 |
145 |
+ ) |
146 |
+ )" |
147 |
+RDEPEND="${CDEPEND} |
148 |
+ python? ( ${PYTHON_DEPS} ) |
149 |
+ client? ( net-fs/cifs-utils[ads?] ) |
150 |
+ selinux? ( sec-policy/selinux-samba ) |
151 |
+" |
152 |
+ |
153 |
+BDEPEND=" |
154 |
+ app-text/docbook-xsl-stylesheets |
155 |
+ dev-libs/libxslt |
156 |
+" |
157 |
+ |
158 |
+REQUIRED_USE=" |
159 |
+ addc? ( python json winbind ) |
160 |
+ addns? ( python ) |
161 |
+ ads? ( acl ldap winbind ) |
162 |
+ cluster? ( ads ) |
163 |
+ gpg? ( addc ) |
164 |
+ ntvfs? ( addc ) |
165 |
+ spotlight? ( json ) |
166 |
+ test? ( python ) |
167 |
+ ?? ( system-heimdal system-mitkrb5 ) |
168 |
+ ${PYTHON_REQUIRED_USE} |
169 |
+" |
170 |
+ |
171 |
+# the test suite is messed, it uses system-installed samba |
172 |
+# bits instead of what was built, tests things disabled via use |
173 |
+# flags, and generally just fails to work in a way ebuilds could |
174 |
+# rely on in its current state |
175 |
+RESTRICT="test" |
176 |
+ |
177 |
+S="${WORKDIR}/${MY_P}" |
178 |
+ |
179 |
+PATCHES=( |
180 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
181 |
+ "${FILESDIR}/${PN}-4.9.2-timespec.patch" |
182 |
+ "${FILESDIR}/${PN}-4.13-vfs_snapper_configure_option.patch" |
183 |
+) |
184 |
+ |
185 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
186 |
+CONFDIR="${FILESDIR}/4.4" |
187 |
+ |
188 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
189 |
+ |
190 |
+SHAREDMODS="" |
191 |
+ |
192 |
+pkg_setup() { |
193 |
+ # Package fails to build with distcc |
194 |
+ export DISTCC_DISABLE=1 |
195 |
+ |
196 |
+ python-single-r1_pkg_setup |
197 |
+ if use cluster ; then |
198 |
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad" |
199 |
+ elif use ads ; then |
200 |
+ SHAREDMODS="idmap_ad" |
201 |
+ fi |
202 |
+} |
203 |
+ |
204 |
+src_prepare() { |
205 |
+ default |
206 |
+ |
207 |
+ # un-bundle dnspython |
208 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
209 |
+ |
210 |
+ # unbundle iso8601 unless tests are enabled |
211 |
+ if ! use test ; then |
212 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
213 |
+ fi |
214 |
+ |
215 |
+ ## ugly hackaround for bug #592502 |
216 |
+ #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
217 |
+ |
218 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
219 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
220 |
+ || die |
221 |
+ |
222 |
+ # Friggin' WAF shit |
223 |
+ multilib_copy_sources |
224 |
+} |
225 |
+ |
226 |
+multilib_src_configure() { |
227 |
+ # when specifying libs for samba build you must append NONE to the end to |
228 |
+ # stop it automatically including things |
229 |
+ local bundled_libs="NONE" |
230 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
231 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
232 |
+ fi |
233 |
+ |
234 |
+ local myconf=( |
235 |
+ --enable-fhs |
236 |
+ --sysconfdir="${EPREFIX}/etc" |
237 |
+ --localstatedir="${EPREFIX}/var" |
238 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
239 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
240 |
+ --bundled-libraries="${bundled_libs}" |
241 |
+ --builtin-libraries=NONE |
242 |
+ --disable-rpath |
243 |
+ --disable-rpath-install |
244 |
+ --nopyc |
245 |
+ --nopyo |
246 |
+ --without-winexe |
247 |
+ $(multilib_native_use_with acl acl-support) |
248 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
249 |
+ $(multilib_native_use_with addns dnsupdate) |
250 |
+ $(multilib_native_use_with ads) |
251 |
+ $(multilib_native_use_enable ceph cephfs) |
252 |
+ $(multilib_native_use_with cluster cluster-support) |
253 |
+ $(multilib_native_use_enable cups) |
254 |
+ $(multilib_native_use_with dmapi) |
255 |
+ $(multilib_native_use_with fam) |
256 |
+ $(multilib_native_use_enable glusterfs) |
257 |
+ $(multilib_native_use_with gpg gpgme) |
258 |
+ $(multilib_native_use_with json) |
259 |
+ $(multilib_native_use_enable iprint) |
260 |
+ $(multilib_native_use_with ntvfs ntvfs-fileserver) |
261 |
+ $(multilib_native_use_with pam) |
262 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
263 |
+ $(multilib_native_use_with quota quotas) |
264 |
+ $(multilib_native_use_with regedit) |
265 |
+ $(multilib_native_use_enable snapper) |
266 |
+ $(multilib_native_use_enable spotlight) |
267 |
+ $(multilib_native_use_with syslog) |
268 |
+ $(multilib_native_use_with systemd) |
269 |
+ --systemd-install-services |
270 |
+ --with-systemddir="$(systemd_get_systemunitdir)" |
271 |
+ $(multilib_native_use_with winbind) |
272 |
+ $(multilib_native_usex python '' '--disable-python') |
273 |
+ $(multilib_native_use_enable zeroconf avahi) |
274 |
+ $(multilib_native_usex test '--enable-selftest' '') |
275 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
276 |
+ $(use_with debug lttng) |
277 |
+ $(use_with ldap) |
278 |
+ $(use_with profiling-data) |
279 |
+ # bug #683148 |
280 |
+ --jobs 1 |
281 |
+ ) |
282 |
+ |
283 |
+ multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} ) |
284 |
+ |
285 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
286 |
+ waf-utils_src_configure ${myconf[@]} |
287 |
+} |
288 |
+ |
289 |
+multilib_src_compile() { |
290 |
+ waf-utils_src_compile |
291 |
+} |
292 |
+ |
293 |
+multilib_src_install() { |
294 |
+ waf-utils_src_install |
295 |
+ |
296 |
+ # Make all .so files executable |
297 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
298 |
+ |
299 |
+ if multilib_is_native_abi ; then |
300 |
+ # install ldap schema for server (bug #491002) |
301 |
+ if use ldap ; then |
302 |
+ insinto /etc/openldap/schema |
303 |
+ doins examples/LDAP/samba.schema |
304 |
+ fi |
305 |
+ |
306 |
+ # create symlink for cups (bug #552310) |
307 |
+ if use cups ; then |
308 |
+ dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb |
309 |
+ fi |
310 |
+ |
311 |
+ # install example config file |
312 |
+ insinto /etc/samba |
313 |
+ doins examples/smb.conf.default |
314 |
+ |
315 |
+ # Fix paths in example file (#603964) |
316 |
+ sed \ |
317 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
318 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
319 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
320 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
321 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
322 |
+ -i "${ED%/}"/etc/samba/smb.conf.default || die |
323 |
+ |
324 |
+ # Install init script and conf.d file |
325 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
326 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
327 |
+ |
328 |
+ dotmpfiles "${FILESDIR}"/samba.conf |
329 |
+ use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die |
330 |
+ |
331 |
+ # Preserve functionality for old gentoo-specific unit names |
332 |
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" |
333 |
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" |
334 |
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" |
335 |
+ fi |
336 |
+ |
337 |
+ if use pam && use winbind ; then |
338 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
339 |
+ # bugs #376853 and #590374 |
340 |
+ insinto /etc/security |
341 |
+ doins examples/pam_winbind/pam_winbind.conf |
342 |
+ fi |
343 |
+ |
344 |
+ keepdir /var/cache/samba |
345 |
+ keepdir /var/lib/ctdb |
346 |
+ keepdir /var/lib/samba/{bind-dns,private} |
347 |
+ keepdir /var/lock/samba |
348 |
+ keepdir /var/log/samba |
349 |
+} |
350 |
+ |
351 |
+multilib_src_test() { |
352 |
+ if multilib_is_native_abi ; then |
353 |
+ "${WAF_BINARY}" test || die "test failed" |
354 |
+ fi |
355 |
+} |
356 |
+ |
357 |
+pkg_postinst() { |
358 |
+ ewarn "Be aware that this release contains the best of all of Samba's" |
359 |
+ ewarn "technology parts, both a file server (that you can reasonably expect" |
360 |
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain" |
361 |
+ ewarn "controller work previously known as 'samba4'." |
362 |
+ |
363 |
+ elog "For further information and migration steps make sure to read " |
364 |
+ elog "https://samba.org/samba/history/${P}.html " |
365 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
366 |
+} |
367 |
|
368 |
diff --git a/net-fs/samba/samba-4.13.8.ebuild b/net-fs/samba/samba-4.13.8.ebuild |
369 |
new file mode 100644 |
370 |
index 00000000000..27e9151d648 |
371 |
--- /dev/null |
372 |
+++ b/net-fs/samba/samba-4.13.8.ebuild |
373 |
@@ -0,0 +1,332 @@ |
374 |
+# Copyright 1999-2021 Gentoo Authors |
375 |
+# Distributed under the terms of the GNU General Public License v2 |
376 |
+ |
377 |
+EAPI=7 |
378 |
+ |
379 |
+PYTHON_COMPAT=( python3_{7..9} ) |
380 |
+PYTHON_REQ_USE="threads(+),xml(+)" |
381 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles |
382 |
+ |
383 |
+DESCRIPTION="Samba Suite Version 4" |
384 |
+HOMEPAGE="https://samba.org/" |
385 |
+ |
386 |
+MY_PV="${PV/_rc/rc}" |
387 |
+MY_P="${PN}-${MY_PV}" |
388 |
+if [[ ${PV} = *_rc* ]]; then |
389 |
+ SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" |
390 |
+else |
391 |
+ SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" |
392 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
393 |
+fi |
394 |
+S="${WORKDIR}/${MY_P}" |
395 |
+ |
396 |
+LICENSE="GPL-3" |
397 |
+SLOT="0" |
398 |
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs |
399 |
+gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux |
400 |
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind |
401 |
+zeroconf" |
402 |
+ |
403 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
404 |
+ addc? ( python json winbind ) |
405 |
+ addns? ( python ) |
406 |
+ ads? ( acl ldap winbind ) |
407 |
+ cluster? ( ads ) |
408 |
+ gpg? ( addc ) |
409 |
+ ntvfs? ( addc ) |
410 |
+ spotlight? ( json ) |
411 |
+ test? ( python ) |
412 |
+ !ads? ( !addc ) |
413 |
+ ?? ( system-heimdal system-mitkrb5 ) |
414 |
+" |
415 |
+ |
416 |
+# the test suite is messed, it uses system-installed samba |
417 |
+# bits instead of what was built, tests things disabled via use |
418 |
+# flags, and generally just fails to work in a way ebuilds could |
419 |
+# rely on in its current state |
420 |
+RESTRICT="test" |
421 |
+ |
422 |
+MULTILIB_WRAPPED_HEADERS=( |
423 |
+ /usr/include/samba-4.0/policy.h |
424 |
+ /usr/include/samba-4.0/dcerpc_server.h |
425 |
+ /usr/include/samba-4.0/ctdb.h |
426 |
+ /usr/include/samba-4.0/ctdb_client.h |
427 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
428 |
+ /usr/include/samba-4.0/ctdb_private.h |
429 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
430 |
+ /usr/include/samba-4.0/ctdb_version.h |
431 |
+) |
432 |
+ |
433 |
+COMMON_DEPEND=" |
434 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
435 |
+ dev-lang/perl:= |
436 |
+ dev-libs/icu:=[${MULTILIB_USEDEP}] |
437 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
438 |
+ dev-libs/libtasn1[${MULTILIB_USEDEP}] |
439 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
440 |
+ dev-perl/Parse-Yapp |
441 |
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] |
442 |
+ net-libs/libnsl:=[${MULTILIB_USEDEP}] |
443 |
+ sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}] |
444 |
+ >=sys-libs/ldb-2.2.1[ldap(+)?,${MULTILIB_USEDEP}] |
445 |
+ <sys-libs/ldb-2.3.0[ldap(+)?,${MULTILIB_USEDEP}] |
446 |
+ sys-libs/libcap[${MULTILIB_USEDEP}] |
447 |
+ sys-libs/liburing:=[${MULTILIB_USEDEP}] |
448 |
+ sys-libs/ncurses:0= |
449 |
+ sys-libs/readline:0= |
450 |
+ >=sys-libs/talloc-2.3.1[${MULTILIB_USEDEP}] |
451 |
+ >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}] |
452 |
+ >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}] |
453 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
454 |
+ virtual/libiconv |
455 |
+ $(python_gen_cond_dep " |
456 |
+ dev-python/subunit[\${PYTHON_MULTI_USEDEP},${MULTILIB_USEDEP}] |
457 |
+ addns? ( |
458 |
+ dev-python/dnspython:=[\${PYTHON_MULTI_USEDEP}] |
459 |
+ net-dns/bind-tools[gssapi] |
460 |
+ ) |
461 |
+ ") |
462 |
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) |
463 |
+ acl? ( virtual/acl ) |
464 |
+ ceph? ( sys-cluster/ceph ) |
465 |
+ cluster? ( net-libs/rpcsvc-proto ) |
466 |
+ cups? ( net-print/cups ) |
467 |
+ debug? ( dev-util/lttng-ust ) |
468 |
+ dmapi? ( sys-apps/dmapi ) |
469 |
+ fam? ( virtual/fam ) |
470 |
+ gpg? ( app-crypt/gpgme ) |
471 |
+ json? ( dev-libs/jansson ) |
472 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
473 |
+ pam? ( sys-libs/pam ) |
474 |
+ python? ( |
475 |
+ sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] |
476 |
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] |
477 |
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] |
478 |
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] |
479 |
+ ) |
480 |
+ snapper? ( sys-apps/dbus ) |
481 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
482 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
483 |
+ systemd? ( sys-apps/systemd:0= ) |
484 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
485 |
+" |
486 |
+DEPEND="${COMMON_DEPEND} |
487 |
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] |
488 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
489 |
+ || ( |
490 |
+ net-libs/rpcsvc-proto |
491 |
+ <sys-libs/glibc-2.26[rpc(+)] |
492 |
+ ) |
493 |
+ spotlight? ( dev-libs/glib ) |
494 |
+ test? ( |
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 addns dnsupdate) |
584 |
+ $(multilib_native_use_with ads) |
585 |
+ $(multilib_native_use_enable ceph cephfs) |
586 |
+ $(multilib_native_use_with cluster cluster-support) |
587 |
+ $(multilib_native_use_enable cups) |
588 |
+ $(multilib_native_use_with dmapi) |
589 |
+ $(multilib_native_use_with fam) |
590 |
+ $(multilib_native_use_enable glusterfs) |
591 |
+ $(multilib_native_use_with gpg gpgme) |
592 |
+ $(multilib_native_use_with json) |
593 |
+ $(multilib_native_use_enable iprint) |
594 |
+ $(multilib_native_use_with ntvfs ntvfs-fileserver) |
595 |
+ $(multilib_native_use_with pam) |
596 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
597 |
+ $(multilib_native_use_with quota quotas) |
598 |
+ $(multilib_native_use_with regedit) |
599 |
+ $(multilib_native_use_enable spotlight) |
600 |
+ $(multilib_native_use_with syslog) |
601 |
+ $(multilib_native_use_with systemd) |
602 |
+ --systemd-install-services |
603 |
+ --with-systemddir="$(systemd_get_systemunitdir)" |
604 |
+ $(multilib_native_use_with winbind) |
605 |
+ $(multilib_native_usex python '' '--disable-python') |
606 |
+ $(multilib_native_use_enable zeroconf avahi) |
607 |
+ $(multilib_native_usex test '--enable-selftest' '') |
608 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
609 |
+ $(use_with debug lttng) |
610 |
+ $(use_with ldap) |
611 |
+ $(use_with profiling-data) |
612 |
+ # bug #683148 |
613 |
+ --jobs 1 |
614 |
+ ) |
615 |
+ |
616 |
+ if multilib_is_native_abi ; then |
617 |
+ myconf+=( --with-shared-modules=${SHAREDMODS} ) |
618 |
+ else |
619 |
+ myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) |
620 |
+ fi |
621 |
+ |
622 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
623 |
+ waf-utils_src_configure ${myconf[@]} |
624 |
+} |
625 |
+ |
626 |
+multilib_src_compile() { |
627 |
+ waf-utils_src_compile |
628 |
+} |
629 |
+ |
630 |
+multilib_src_install() { |
631 |
+ waf-utils_src_install |
632 |
+ |
633 |
+ # Make all .so files executable |
634 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
635 |
+ |
636 |
+ if multilib_is_native_abi ; then |
637 |
+ # install ldap schema for server (bug #491002) |
638 |
+ if use ldap ; then |
639 |
+ insinto /etc/openldap/schema |
640 |
+ doins examples/LDAP/samba.schema |
641 |
+ fi |
642 |
+ |
643 |
+ # create symlink for cups (bug #552310) |
644 |
+ if use cups ; then |
645 |
+ dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb |
646 |
+ fi |
647 |
+ |
648 |
+ # install example config file |
649 |
+ insinto /etc/samba |
650 |
+ doins examples/smb.conf.default |
651 |
+ |
652 |
+ # Fix paths in example file (#603964) |
653 |
+ sed \ |
654 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
655 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
656 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
657 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
658 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
659 |
+ -i "${ED}"/etc/samba/smb.conf.default || die |
660 |
+ |
661 |
+ # Install init script and conf.d file |
662 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
663 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
664 |
+ |
665 |
+ dotmpfiles "${FILESDIR}"/samba.conf |
666 |
+ use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die |
667 |
+ |
668 |
+ # Preserve functionality for old gentoo-specific unit names |
669 |
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" |
670 |
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" |
671 |
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" |
672 |
+ fi |
673 |
+ |
674 |
+ if use pam && use winbind ; then |
675 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
676 |
+ # bugs #376853 and #590374 |
677 |
+ insinto /etc/security |
678 |
+ doins examples/pam_winbind/pam_winbind.conf |
679 |
+ fi |
680 |
+ |
681 |
+ keepdir /var/cache/samba |
682 |
+ keepdir /var/lib/ctdb |
683 |
+ keepdir /var/lib/samba/{bind-dns,private} |
684 |
+ keepdir /var/lock/samba |
685 |
+ keepdir /var/log/samba |
686 |
+} |
687 |
+ |
688 |
+multilib_src_test() { |
689 |
+ if multilib_is_native_abi ; then |
690 |
+ "${WAF_BINARY}" test || die "test failed" |
691 |
+ fi |
692 |
+} |
693 |
+ |
694 |
+pkg_postinst() { |
695 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
696 |
+ elog "Be aware that this release contains the best of all of Samba's" |
697 |
+ elog "technology parts, both a file server (that you can reasonably expect" |
698 |
+ elog "to upgrade existing Samba 3.x releases to) and the AD domain" |
699 |
+ elog "controller work previously known as 'samba4'." |
700 |
+ elog |
701 |
+ fi |
702 |
+ elog "For further information and migration steps make sure to read " |
703 |
+ elog "https://samba.org/samba/history/${P}.html " |
704 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
705 |
+} |
706 |
|
707 |
diff --git a/net-fs/samba/samba-4.14.4.ebuild b/net-fs/samba/samba-4.14.4.ebuild |
708 |
new file mode 100644 |
709 |
index 00000000000..d21397f5844 |
710 |
--- /dev/null |
711 |
+++ b/net-fs/samba/samba-4.14.4.ebuild |
712 |
@@ -0,0 +1,336 @@ |
713 |
+# Copyright 1999-2021 Gentoo Authors |
714 |
+# Distributed under the terms of the GNU General Public License v2 |
715 |
+ |
716 |
+EAPI=7 |
717 |
+ |
718 |
+PYTHON_COMPAT=( python3_{7..9} ) |
719 |
+PYTHON_REQ_USE="threads(+),xml(+)" |
720 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles |
721 |
+ |
722 |
+DESCRIPTION="Samba Suite Version 4" |
723 |
+HOMEPAGE="https://samba.org/" |
724 |
+ |
725 |
+MY_PV="${PV/_rc/rc}" |
726 |
+MY_P="${PN}-${MY_PV}" |
727 |
+if [[ ${PV} = *_rc* ]]; then |
728 |
+ SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" |
729 |
+else |
730 |
+ SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" |
731 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
732 |
+fi |
733 |
+S="${WORKDIR}/${MY_P}" |
734 |
+ |
735 |
+LICENSE="GPL-3" |
736 |
+SLOT="0" |
737 |
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs |
738 |
+gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux |
739 |
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind |
740 |
+zeroconf" |
741 |
+ |
742 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
743 |
+ addc? ( python json winbind ) |
744 |
+ addns? ( python ) |
745 |
+ ads? ( acl ldap winbind ) |
746 |
+ cluster? ( ads ) |
747 |
+ gpg? ( addc ) |
748 |
+ ntvfs? ( addc ) |
749 |
+ spotlight? ( json ) |
750 |
+ test? ( python ) |
751 |
+ !ads? ( !addc ) |
752 |
+ ?? ( system-heimdal system-mitkrb5 ) |
753 |
+" |
754 |
+ |
755 |
+# the test suite is messed, it uses system-installed samba |
756 |
+# bits instead of what was built, tests things disabled via use |
757 |
+# flags, and generally just fails to work in a way ebuilds could |
758 |
+# rely on in its current state |
759 |
+RESTRICT="test" |
760 |
+ |
761 |
+MULTILIB_WRAPPED_HEADERS=( |
762 |
+ /usr/include/samba-4.0/policy.h |
763 |
+ /usr/include/samba-4.0/dcerpc_server.h |
764 |
+ /usr/include/samba-4.0/ctdb.h |
765 |
+ /usr/include/samba-4.0/ctdb_client.h |
766 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
767 |
+ /usr/include/samba-4.0/ctdb_private.h |
768 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
769 |
+ /usr/include/samba-4.0/ctdb_version.h |
770 |
+) |
771 |
+ |
772 |
+COMMON_DEPEND=" |
773 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
774 |
+ dev-lang/perl:= |
775 |
+ dev-libs/icu:=[${MULTILIB_USEDEP}] |
776 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
777 |
+ dev-libs/libtasn1[${MULTILIB_USEDEP}] |
778 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
779 |
+ dev-perl/Parse-Yapp |
780 |
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] |
781 |
+ net-libs/libnsl:=[${MULTILIB_USEDEP}] |
782 |
+ sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}] |
783 |
+ >=sys-libs/ldb-2.3.0[ldap(+)?,${MULTILIB_USEDEP}] |
784 |
+ <sys-libs/ldb-2.4.0[ldap(+)?,${MULTILIB_USEDEP}] |
785 |
+ sys-libs/libcap[${MULTILIB_USEDEP}] |
786 |
+ sys-libs/liburing:=[${MULTILIB_USEDEP}] |
787 |
+ sys-libs/ncurses:0= |
788 |
+ sys-libs/readline:0= |
789 |
+ >=sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}] |
790 |
+ >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}] |
791 |
+ >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}] |
792 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
793 |
+ virtual/libiconv |
794 |
+ $(python_gen_cond_dep " |
795 |
+ dev-python/subunit[\${PYTHON_MULTI_USEDEP},${MULTILIB_USEDEP}] |
796 |
+ addc? ( |
797 |
+ dev-python/dnspython:=[\${PYTHON_MULTI_USEDEP}] |
798 |
+ dev-python/markdown[\${PYTHON_MULTI_USEDEP}] |
799 |
+ ) |
800 |
+ addns? ( |
801 |
+ dev-python/dnspython:=[\${PYTHON_MULTI_USEDEP}] |
802 |
+ net-dns/bind-tools[gssapi] |
803 |
+ ) |
804 |
+ ") |
805 |
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) |
806 |
+ acl? ( virtual/acl ) |
807 |
+ ceph? ( sys-cluster/ceph ) |
808 |
+ cluster? ( net-libs/rpcsvc-proto ) |
809 |
+ cups? ( net-print/cups ) |
810 |
+ debug? ( dev-util/lttng-ust ) |
811 |
+ dmapi? ( sys-apps/dmapi ) |
812 |
+ fam? ( virtual/fam ) |
813 |
+ gpg? ( app-crypt/gpgme ) |
814 |
+ json? ( dev-libs/jansson ) |
815 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
816 |
+ pam? ( sys-libs/pam ) |
817 |
+ python? ( |
818 |
+ sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] |
819 |
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] |
820 |
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] |
821 |
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] |
822 |
+ ) |
823 |
+ snapper? ( sys-apps/dbus ) |
824 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
825 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
826 |
+ systemd? ( sys-apps/systemd:0= ) |
827 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
828 |
+" |
829 |
+DEPEND="${COMMON_DEPEND} |
830 |
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] |
831 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
832 |
+ || ( |
833 |
+ net-libs/rpcsvc-proto |
834 |
+ <sys-libs/glibc-2.26[rpc(+)] |
835 |
+ ) |
836 |
+ spotlight? ( dev-libs/glib ) |
837 |
+ test? ( |
838 |
+ !system-mitkrb5? ( |
839 |
+ >=net-dns/resolv_wrapper-1.1.4 |
840 |
+ >=net-libs/socket_wrapper-1.1.9 |
841 |
+ >=sys-libs/nss_wrapper-1.1.3 |
842 |
+ >=sys-libs/uid_wrapper-1.2.1 |
843 |
+ ) |
844 |
+ )" |
845 |
+RDEPEND="${COMMON_DEPEND} |
846 |
+ client? ( net-fs/cifs-utils[ads?] ) |
847 |
+ python? ( ${PYTHON_DEPS} ) |
848 |
+ selinux? ( sec-policy/selinux-samba ) |
849 |
+" |
850 |
+BDEPEND="${PYTHON_DEPS} |
851 |
+ app-text/docbook-xsl-stylesheets |
852 |
+ dev-libs/libxslt |
853 |
+ virtual/pkgconfig |
854 |
+" |
855 |
+ |
856 |
+PATCHES=( |
857 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
858 |
+) |
859 |
+ |
860 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
861 |
+CONFDIR="${FILESDIR}/4.4" |
862 |
+ |
863 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
864 |
+ |
865 |
+SHAREDMODS="" |
866 |
+ |
867 |
+pkg_setup() { |
868 |
+ # Package fails to build with distcc |
869 |
+ export DISTCC_DISABLE=1 |
870 |
+ |
871 |
+ python-single-r1_pkg_setup |
872 |
+ |
873 |
+ SHAREDMODS="$(usex snapper '' '!')vfs_snapper" |
874 |
+ if use cluster ; then |
875 |
+ SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad" |
876 |
+ elif use ads ; then |
877 |
+ SHAREDMODS+=",idmap_ad" |
878 |
+ fi |
879 |
+} |
880 |
+ |
881 |
+src_prepare() { |
882 |
+ default |
883 |
+ |
884 |
+ # un-bundle dnspython |
885 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
886 |
+ |
887 |
+ # unbundle iso8601 unless tests are enabled |
888 |
+ if ! use test ; then |
889 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
890 |
+ fi |
891 |
+ |
892 |
+ ## ugly hackaround for bug #592502 |
893 |
+ #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
894 |
+ |
895 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
896 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
897 |
+ || die |
898 |
+ |
899 |
+ # Friggin' WAF shit |
900 |
+ multilib_copy_sources |
901 |
+} |
902 |
+ |
903 |
+multilib_src_configure() { |
904 |
+ # when specifying libs for samba build you must append NONE to the end to |
905 |
+ # stop it automatically including things |
906 |
+ local bundled_libs="NONE" |
907 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
908 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
909 |
+ fi |
910 |
+ |
911 |
+ local myconf=( |
912 |
+ --enable-fhs |
913 |
+ --sysconfdir="${EPREFIX}/etc" |
914 |
+ --localstatedir="${EPREFIX}/var" |
915 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
916 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
917 |
+ --bundled-libraries="${bundled_libs}" |
918 |
+ --builtin-libraries=NONE |
919 |
+ --disable-rpath |
920 |
+ --disable-rpath-install |
921 |
+ --nopyc |
922 |
+ --nopyo |
923 |
+ --without-winexe |
924 |
+ $(multilib_native_use_with acl acl-support) |
925 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
926 |
+ $(multilib_native_use_with addns dnsupdate) |
927 |
+ $(multilib_native_use_with ads) |
928 |
+ $(multilib_native_use_enable ceph cephfs) |
929 |
+ $(multilib_native_use_with cluster cluster-support) |
930 |
+ $(multilib_native_use_enable cups) |
931 |
+ $(multilib_native_use_with dmapi) |
932 |
+ $(multilib_native_use_with fam) |
933 |
+ $(multilib_native_use_enable glusterfs) |
934 |
+ $(multilib_native_use_with gpg gpgme) |
935 |
+ $(multilib_native_use_with json) |
936 |
+ $(multilib_native_use_enable iprint) |
937 |
+ $(multilib_native_use_with ntvfs ntvfs-fileserver) |
938 |
+ $(multilib_native_use_with pam) |
939 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
940 |
+ $(multilib_native_use_with quota quotas) |
941 |
+ $(multilib_native_use_with regedit) |
942 |
+ $(multilib_native_use_enable spotlight) |
943 |
+ $(multilib_native_use_with syslog) |
944 |
+ $(multilib_native_use_with systemd) |
945 |
+ --systemd-install-services |
946 |
+ --with-systemddir="$(systemd_get_systemunitdir)" |
947 |
+ $(multilib_native_use_with winbind) |
948 |
+ $(multilib_native_usex python '' '--disable-python') |
949 |
+ $(multilib_native_use_enable zeroconf avahi) |
950 |
+ $(multilib_native_usex test '--enable-selftest' '') |
951 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
952 |
+ $(use_with debug lttng) |
953 |
+ $(use_with ldap) |
954 |
+ $(use_with profiling-data) |
955 |
+ # bug #683148 |
956 |
+ --jobs 1 |
957 |
+ ) |
958 |
+ |
959 |
+ if multilib_is_native_abi ; then |
960 |
+ myconf+=( --with-shared-modules=${SHAREDMODS} ) |
961 |
+ else |
962 |
+ myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) |
963 |
+ fi |
964 |
+ |
965 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
966 |
+ waf-utils_src_configure ${myconf[@]} |
967 |
+} |
968 |
+ |
969 |
+multilib_src_compile() { |
970 |
+ waf-utils_src_compile |
971 |
+} |
972 |
+ |
973 |
+multilib_src_install() { |
974 |
+ waf-utils_src_install |
975 |
+ |
976 |
+ # Make all .so files executable |
977 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
978 |
+ |
979 |
+ if multilib_is_native_abi ; then |
980 |
+ # install ldap schema for server (bug #491002) |
981 |
+ if use ldap ; then |
982 |
+ insinto /etc/openldap/schema |
983 |
+ doins examples/LDAP/samba.schema |
984 |
+ fi |
985 |
+ |
986 |
+ # create symlink for cups (bug #552310) |
987 |
+ if use cups ; then |
988 |
+ dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb |
989 |
+ fi |
990 |
+ |
991 |
+ # install example config file |
992 |
+ insinto /etc/samba |
993 |
+ doins examples/smb.conf.default |
994 |
+ |
995 |
+ # Fix paths in example file (#603964) |
996 |
+ sed \ |
997 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
998 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
999 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
1000 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
1001 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
1002 |
+ -i "${ED}"/etc/samba/smb.conf.default || die |
1003 |
+ |
1004 |
+ # Install init script and conf.d file |
1005 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
1006 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
1007 |
+ |
1008 |
+ dotmpfiles "${FILESDIR}"/samba.conf |
1009 |
+ use addc || rm "${D}/$(systemd_get_systemunitdir)/samba.service" || die |
1010 |
+ |
1011 |
+ # Preserve functionality for old gentoo-specific unit names |
1012 |
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" |
1013 |
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" |
1014 |
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" |
1015 |
+ fi |
1016 |
+ |
1017 |
+ if use pam && use winbind ; then |
1018 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
1019 |
+ # bugs #376853 and #590374 |
1020 |
+ insinto /etc/security |
1021 |
+ doins examples/pam_winbind/pam_winbind.conf |
1022 |
+ fi |
1023 |
+ |
1024 |
+ keepdir /var/cache/samba |
1025 |
+ keepdir /var/lib/ctdb |
1026 |
+ keepdir /var/lib/samba/{bind-dns,private} |
1027 |
+ keepdir /var/lock/samba |
1028 |
+ keepdir /var/log/samba |
1029 |
+} |
1030 |
+ |
1031 |
+multilib_src_test() { |
1032 |
+ if multilib_is_native_abi ; then |
1033 |
+ "${WAF_BINARY}" test || die "test failed" |
1034 |
+ fi |
1035 |
+} |
1036 |
+ |
1037 |
+pkg_postinst() { |
1038 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
1039 |
+ elog "Be aware that this release contains the best of all of Samba's" |
1040 |
+ elog "technology parts, both a file server (that you can reasonably expect" |
1041 |
+ elog "to upgrade existing Samba 3.x releases to) and the AD domain" |
1042 |
+ elog "controller work previously known as 'samba4'." |
1043 |
+ elog |
1044 |
+ fi |
1045 |
+ elog "For further information and migration steps make sure to read " |
1046 |
+ elog "https://samba.org/samba/history/${P}.html " |
1047 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
1048 |
+} |