1 |
commit: 2d0f1cbc1346bacb2f4ccab22db5847a0a4bb2a4 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Nov 5 14:34:32 2019 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 5 14:37:43 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2d0f1cbc |
7 |
|
8 |
net-fs/samba: Bump to versions 4.9.15, 4.10.10 and 4.11.2 |
9 |
|
10 |
Package-Manager: Portage-2.3.78, Repoman-2.3.17 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
net-fs/samba/Manifest | 3 + |
14 |
net-fs/samba/samba-4.10.10.ebuild | 315 ++++++++++++++++++++++++++++++++++++++ |
15 |
net-fs/samba/samba-4.11.2.ebuild | 311 +++++++++++++++++++++++++++++++++++++ |
16 |
net-fs/samba/samba-4.9.15.ebuild | 308 +++++++++++++++++++++++++++++++++++++ |
17 |
4 files changed, 937 insertions(+) |
18 |
|
19 |
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest |
20 |
index 2c6a45762bf..eb3ee425653 100644 |
21 |
--- a/net-fs/samba/Manifest |
22 |
+++ b/net-fs/samba/Manifest |
23 |
@@ -1,9 +1,12 @@ |
24 |
+DIST samba-4.10.10.tar.gz 18335638 BLAKE2B f8c215b82fea4ef69b9baf8ffac417e8530b17e4974c249fbf566c231374c299f4de9a1fd9ba5027fdf41d59f3e275456a6e1e435edd4bebba35eacbaa9a9c1a SHA512 d82f96af5754d484673d3497b2837d9df06352d7be4810fe6d812d64db5b95d588ed42d5565bf0f6f7c305bb9c6d3274e740ea9acd75b32aad75d0b38e4d2bc9 |
25 |
DIST samba-4.10.2.tar.gz 18280710 BLAKE2B f15b117d1159dfa6cd279c5011629d688fcfba94a2ca8184a827d0787a31f76a38f46b355454b916f2e62c0a88109b86664f6bb16fc0e23d0f61d09908e587cd SHA512 3d146ea12567ebb02a7babcad779b82339ffbfb19f6f2be5cac33eb18af2c9b546dc1cd910072a5c9e152ba9c4a632ed6870c48a8f6ad9d04304b130f240a4bf |
26 |
DIST samba-4.10.8.tar.gz 18316560 BLAKE2B a1b89169a13eb96202e846e9e501b364235d61459a5d2f2e443af569d8a754df8546b5fb52e9e1b9629535d838a7fdfd9cd1fb631870880dad9981587c14be5f SHA512 14d463dfba36473f4a1d2b306ff2a18c664e1a01bc8077ef62afc6796cf4dd65461d72b519b8df3a777eaf322cb98653b416468d770541cd21fab2383c8dce66 |
27 |
DIST samba-4.11.0.tar.gz 18507455 BLAKE2B 20a39b1f8e5f54494cde6519021d24abf9c2832917033a638c9318f866c1c65a56536926906a0caa8a18b6f02b924c90e7cf05ea7401d9b1c9407d74d903c047 SHA512 3cdb7a0fd5b31a84e9e16587da94ad544adcbda4e0ab9f89e3038580329b1149eeab80e073db7bb121b2c355ecb00350f682887443de0dd30611722fe44817dd |
28 |
DIST samba-4.11.1.tar.gz 18516111 BLAKE2B d2f557f0e53782783189c415cd086065a37b6808707dc0ec5096175a75eab9d6045b41ac1597ca1ea2d463a8261d7b299602f2da5dfecf5dddaf03d89ea1056a SHA512 3a711b11254cff4c0d74f883d8bc6e454094ba2c6a10fb0d08e85cbed11a1326bb39f0e47600380a5f293a14a6463dbd09be7404305923ac579b6f85072309c8 |
29 |
+DIST samba-4.11.2.tar.gz 18516056 BLAKE2B 2b2a11e9b72deec54cf19830a402a5f2ae0dc2c3437116a636823d29e55c68842fce2434d196d567a8250b59e5bdffe9af367592c6949496f63caccbf4a5cb6f SHA512 f91053f019c9f979d7e29af00ea9b03a79c6f8efe91413ac2d6dca823f45ca9c30686264fdc0545dddabc687ad369a80c9ec78ebe75d1787dfc9b834233e12c1 |
30 |
DIST samba-4.5.11-disable-python-patches.tar.xz 6292 BLAKE2B c2a32a1059a02bc1c87ce5f604cbc5878c654b8f693c8486b5ba63b37513444915a7b6389fe82b7e31ab2f9577dd8462eddba60b4f4f756b4ed1145ce7bd90ae SHA512 f0e3076e3e1ecaae3f06b3ef30efc81719fb3f63a1041dcbdae4b62ca4cf693732f9eb16f047d046d4930136fed82194e82b455ea888e12cf845b3e6a122d57d |
31 |
DIST samba-4.5.16.tar.gz 21024396 BLAKE2B e737559fb748044076608fa233700eb54c7e1c56bc234763f062b6341a179cc78a4a8cdf9f3d6f4d7f3cf8a79f846852ddd5cc753a468c3adb3a0451e1809ed9 SHA512 de8a41013cfb5ef3adcb290efd97a78a5de876d90ad05764d631f14e663a1849bb53e4ac394b46c906f1109be5748fee9316407a659c57007d36851ae8adcd7f |
32 |
DIST samba-4.8.12.tar.gz 17764832 BLAKE2B d2c0c8b9090da7c94b9343fd3f416e9aafad64273abc9be0639b011f71072926a0b303cf53e63c4e470aeb168e8ec23003b5f4ed4258aac8d6b3d029f71fba6f SHA512 f29595f6390d01860cb6acd750d2e36b4d207dd1da16465c21c8d6d732ce27bd0582a0f34296081e2659638d839c8b12f28deccc31982afa94650da8bce8df8b |
33 |
DIST samba-4.8.6.tar.gz 17723841 BLAKE2B 38da52e14b4417f26462eef2226c4498e54d2c276b4056e8c6d6c66079f33bcda24c1eab30b29bc7413280ec89a74a55e043e8274ac50f9a25bae7563717ff34 SHA512 f6afab5ca466bd8653a56c205b71ce94ecf0ad0c6e4c9d64cbba7b1e56f1987bc2022e6b629d87eb6078e3f6ba53833c19cfb41e40b6d589e4317ea9d85de273 |
34 |
DIST samba-4.9.13.tar.gz 18109481 BLAKE2B 948ef6b0e1a9796c70635119f5aea5887e9f1c1d2a5264d072f3f3d218dfae3b6a16c640233063c9df0670dc7835a92a8c97447f57518aa9d387bc5d04831675 SHA512 ce80486c9ab093d44ee68b0e2ab28f9af97c7ed00cca1b8a0c65de18254ae40759a1e9fcb9a0ba18006aa296c6a6fbadf53dcd730785a96ac0c167efdbe9d3ae |
35 |
+DIST samba-4.9.15.tar.gz 18110369 BLAKE2B fb09601f424b7e0368328023a80c3dbfcfc48e6d66d59bf13b828e9706d3e663b8fc80f0baecdc6b646855750e64f96d961edbeaf2110b6432568f600f9ddad6 SHA512 6eb589ad3a5070b5649f1c76bafd2d691c3efbef264a100f5cdda457ccdb633fcbe64a9c4f7f0b8a5422fa08aa73534dc6f87248c6c871a1fa09577364e962c0 |
36 |
|
37 |
diff --git a/net-fs/samba/samba-4.10.10.ebuild b/net-fs/samba/samba-4.10.10.ebuild |
38 |
new file mode 100644 |
39 |
index 00000000000..d24131ca91c |
40 |
--- /dev/null |
41 |
+++ b/net-fs/samba/samba-4.10.10.ebuild |
42 |
@@ -0,0 +1,315 @@ |
43 |
+# Copyright 1999-2019 Gentoo Authors |
44 |
+# Distributed under the terms of the GNU General Public License v2 |
45 |
+ |
46 |
+EAPI=6 |
47 |
+PYTHON_COMPAT=( python3_{5,6,7} ) |
48 |
+PYTHON_REQ_USE='threads(+),xml(+)' |
49 |
+ |
50 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam |
51 |
+ |
52 |
+MY_PV="${PV/_rc/rc}" |
53 |
+MY_P="${PN}-${MY_PV}" |
54 |
+ |
55 |
+SRC_PATH="stable" |
56 |
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc" |
57 |
+ |
58 |
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz" |
59 |
+[[ ${PV} = *_rc* ]] || \ |
60 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
61 |
+ |
62 |
+DESCRIPTION="Samba Suite Version 4" |
63 |
+HOMEPAGE="https://www.samba.org/" |
64 |
+LICENSE="GPL-3" |
65 |
+ |
66 |
+SLOT="0" |
67 |
+ |
68 |
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg |
69 |
+iprint json ldap pam profiling-data python quota selinux syslog system-heimdal |
70 |
++system-mitkrb5 systemd test winbind zeroconf" |
71 |
+ |
72 |
+MULTILIB_WRAPPED_HEADERS=( |
73 |
+ /usr/include/samba-4.0/policy.h |
74 |
+ /usr/include/samba-4.0/dcerpc_server.h |
75 |
+ /usr/include/samba-4.0/ctdb.h |
76 |
+ /usr/include/samba-4.0/ctdb_client.h |
77 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
78 |
+ /usr/include/samba-4.0/ctdb_private.h |
79 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
80 |
+ /usr/include/samba-4.0/ctdb_version.h |
81 |
+) |
82 |
+ |
83 |
+# sys-apps/attr is an automagic dependency (see bug #489748) |
84 |
+CDEPEND=" |
85 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
86 |
+ dev-lang/perl:= |
87 |
+ dev-libs/libaio[${MULTILIB_USEDEP}] |
88 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
89 |
+ dev-libs/iniparser:0 |
90 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
91 |
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
92 |
+ >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}] |
93 |
+ net-libs/libnsl:=[${MULTILIB_USEDEP}] |
94 |
+ sys-apps/attr[${MULTILIB_USEDEP}] |
95 |
+ >=sys-libs/ldb-1.5.6[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
96 |
+ <sys-libs/ldb-1.6.0[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
97 |
+ sys-libs/libcap |
98 |
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}] |
99 |
+ sys-libs/readline:0= |
100 |
+ >=sys-libs/talloc-2.1.16[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
101 |
+ >=sys-libs/tdb-1.3.18[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
102 |
+ >=sys-libs/tevent-0.9.39[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
103 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
104 |
+ virtual/libiconv |
105 |
+ pam? ( sys-libs/pam ) |
106 |
+ acl? ( virtual/acl ) |
107 |
+ addns? ( |
108 |
+ net-dns/bind-tools[gssapi] |
109 |
+ dev-python/dnspython:=[${PYTHON_USEDEP}] |
110 |
+ ) |
111 |
+ ceph? ( sys-cluster/ceph ) |
112 |
+ cluster? ( |
113 |
+ net-libs/rpcsvc-proto |
114 |
+ !dev-db/ctdb |
115 |
+ ) |
116 |
+ cups? ( net-print/cups ) |
117 |
+ debug? ( dev-util/lttng-ust ) |
118 |
+ dmapi? ( sys-apps/dmapi ) |
119 |
+ fam? ( virtual/fam ) |
120 |
+ gnutls? ( |
121 |
+ dev-libs/libgcrypt:0 |
122 |
+ >=net-libs/gnutls-1.4.0 |
123 |
+ ) |
124 |
+ gpg? ( app-crypt/gpgme ) |
125 |
+ json? ( dev-libs/jansson ) |
126 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
127 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
128 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
129 |
+ systemd? ( sys-apps/systemd:0= ) |
130 |
+ zeroconf? ( net-dns/avahi ) |
131 |
+" |
132 |
+DEPEND="${CDEPEND} |
133 |
+ ${PYTHON_DEPS} |
134 |
+ app-text/docbook-xsl-stylesheets |
135 |
+ dev-libs/libxslt |
136 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
137 |
+ virtual/pkgconfig |
138 |
+ || ( |
139 |
+ net-libs/rpcsvc-proto |
140 |
+ <sys-libs/glibc-2.26[rpc(+)] |
141 |
+ ) |
142 |
+ test? ( |
143 |
+ !system-mitkrb5? ( |
144 |
+ >=sys-libs/nss_wrapper-1.1.3 |
145 |
+ >=net-dns/resolv_wrapper-1.1.4 |
146 |
+ >=net-libs/socket_wrapper-1.1.9 |
147 |
+ >=sys-libs/uid_wrapper-1.2.1 |
148 |
+ ) |
149 |
+ )" |
150 |
+RDEPEND="${CDEPEND} |
151 |
+ python? ( ${PYTHON_DEPS} ) |
152 |
+ client? ( net-fs/cifs-utils[ads?] ) |
153 |
+ selinux? ( sec-policy/selinux-samba ) |
154 |
+ !dev-perl/Parse-Yapp |
155 |
+" |
156 |
+ |
157 |
+REQUIRED_USE=" |
158 |
+ addc? ( python gnutls json winbind ) |
159 |
+ addns? ( python ) |
160 |
+ ads? ( acl gnutls ldap winbind ) |
161 |
+ cluster? ( ads ) |
162 |
+ gpg? ( addc ) |
163 |
+ test? ( python ) |
164 |
+ ?? ( system-heimdal system-mitkrb5 ) |
165 |
+ ${PYTHON_REQUIRED_USE} |
166 |
+" |
167 |
+ |
168 |
+# the test suite is messed, it uses system-installed samba |
169 |
+# bits instead of what was built, tests things disabled via use |
170 |
+# flags, and generally just fails to work in a way ebuilds could |
171 |
+# rely on in its current state |
172 |
+RESTRICT="test" |
173 |
+ |
174 |
+S="${WORKDIR}/${MY_P}" |
175 |
+ |
176 |
+PATCHES=( |
177 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
178 |
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch" |
179 |
+ "${FILESDIR}/${PN}-4.9.2-timespec.patch" |
180 |
+) |
181 |
+ |
182 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
183 |
+CONFDIR="${FILESDIR}/4.4" |
184 |
+ |
185 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
186 |
+ |
187 |
+SHAREDMODS="" |
188 |
+ |
189 |
+pkg_setup() { |
190 |
+ python-single-r1_pkg_setup |
191 |
+ if use cluster ; then |
192 |
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad" |
193 |
+ elif use ads ; then |
194 |
+ SHAREDMODS="idmap_ad" |
195 |
+ fi |
196 |
+} |
197 |
+ |
198 |
+src_prepare() { |
199 |
+ default |
200 |
+ |
201 |
+ # un-bundle dnspython |
202 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
203 |
+ |
204 |
+ # unbundle iso8601 unless tests are enabled |
205 |
+ if ! use test ; then |
206 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
207 |
+ fi |
208 |
+ |
209 |
+ # ugly hackaround for bug #592502 |
210 |
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
211 |
+ |
212 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
213 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
214 |
+ || die |
215 |
+ |
216 |
+ # Friggin' WAF shit |
217 |
+ multilib_copy_sources |
218 |
+} |
219 |
+ |
220 |
+multilib_src_configure() { |
221 |
+ # when specifying libs for samba build you must append NONE to the end to |
222 |
+ # stop it automatically including things |
223 |
+ local bundled_libs="NONE" |
224 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
225 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
226 |
+ fi |
227 |
+ |
228 |
+ local myconf=( |
229 |
+ --enable-fhs |
230 |
+ --sysconfdir="${EPREFIX}/etc" |
231 |
+ --localstatedir="${EPREFIX}/var" |
232 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
233 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
234 |
+ --bundled-libraries="${bundled_libs}" |
235 |
+ --builtin-libraries=NONE |
236 |
+ --disable-rpath |
237 |
+ --disable-rpath-install |
238 |
+ --nopyc |
239 |
+ --nopyo |
240 |
+ $(multilib_native_use_with acl acl-support) |
241 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
242 |
+ $(multilib_native_use_with addns dnsupdate) |
243 |
+ $(multilib_native_use_with ads) |
244 |
+ $(multilib_native_use_enable ceph cephfs) |
245 |
+ $(multilib_native_use_with cluster cluster-support) |
246 |
+ $(multilib_native_use_enable cups) |
247 |
+ $(multilib_native_use_with dmapi) |
248 |
+ $(multilib_native_use_with fam) |
249 |
+ $(multilib_native_use_with gpg gpgme) |
250 |
+ $(multilib_native_use_with json) |
251 |
+ $(multilib_native_use_enable iprint) |
252 |
+ $(multilib_native_use_with pam) |
253 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
254 |
+ $(multilib_native_use_with quota quotas) |
255 |
+ $(multilib_native_use_with syslog) |
256 |
+ $(multilib_native_use_with systemd) |
257 |
+ $(multilib_native_use_with winbind) |
258 |
+ $(multilib_native_usex python '' '--disable-python') |
259 |
+ $(multilib_native_use_enable zeroconf avahi) |
260 |
+ $(multilib_native_usex test '--enable-selftest' '') |
261 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
262 |
+ $(use_enable gnutls) |
263 |
+ $(use_with debug lttng) |
264 |
+ $(use_with ldap) |
265 |
+ $(use_with profiling-data) |
266 |
+ ) |
267 |
+ |
268 |
+ multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} ) |
269 |
+ |
270 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
271 |
+ waf-utils_src_configure ${myconf[@]} |
272 |
+} |
273 |
+ |
274 |
+multilib_src_compile() { |
275 |
+ waf-utils_src_compile |
276 |
+} |
277 |
+ |
278 |
+multilib_src_install() { |
279 |
+ waf-utils_src_install |
280 |
+ |
281 |
+ # Make all .so files executable |
282 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
283 |
+ |
284 |
+ if multilib_is_native_abi ; then |
285 |
+ # install ldap schema for server (bug #491002) |
286 |
+ if use ldap ; then |
287 |
+ insinto /etc/openldap/schema |
288 |
+ doins examples/LDAP/samba.schema |
289 |
+ fi |
290 |
+ |
291 |
+ # create symlink for cups (bug #552310) |
292 |
+ if use cups ; then |
293 |
+ dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb |
294 |
+ fi |
295 |
+ |
296 |
+ # install example config file |
297 |
+ insinto /etc/samba |
298 |
+ doins examples/smb.conf.default |
299 |
+ |
300 |
+ # Fix paths in example file (#603964) |
301 |
+ sed \ |
302 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
303 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
304 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
305 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
306 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
307 |
+ -i "${ED%/}"/etc/samba/smb.conf.default || die |
308 |
+ |
309 |
+ # Install init script and conf.d file |
310 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
311 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
312 |
+ |
313 |
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf |
314 |
+ systemd_dounit "${FILESDIR}"/nmbd.service |
315 |
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket} |
316 |
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service' |
317 |
+ systemd_dounit "${FILESDIR}"/winbindd.service |
318 |
+ systemd_dounit "${FILESDIR}"/samba.service |
319 |
+ fi |
320 |
+ |
321 |
+ if use pam && use winbind ; then |
322 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
323 |
+ # bugs #376853 and #590374 |
324 |
+ insinto /etc/security |
325 |
+ doins examples/pam_winbind/pam_winbind.conf || die |
326 |
+ fi |
327 |
+ |
328 |
+ keepdir /var/cache/samba |
329 |
+ keepdir /var/lib/ctdb |
330 |
+ keepdir /var/lib/samba/{bind-dns,private} |
331 |
+ keepdir /var/lock/samba |
332 |
+ keepdir /var/log/samba |
333 |
+ keepdir /var/run/{ctdb,samba} |
334 |
+} |
335 |
+ |
336 |
+multilib_src_install_all() { |
337 |
+ # Attempt to fix bug #673168 |
338 |
+ find "${ED}" -type d -name "Yapp" -print0 \ |
339 |
+ | xargs -0 --no-run-if-empty rm -r || die |
340 |
+} |
341 |
+ |
342 |
+multilib_src_test() { |
343 |
+ if multilib_is_native_abi ; then |
344 |
+ "${WAF_BINARY}" test || die "test failed" |
345 |
+ fi |
346 |
+} |
347 |
+ |
348 |
+pkg_postinst() { |
349 |
+ ewarn "Be aware the this release contains the best of all of Samba's" |
350 |
+ ewarn "technology parts, both a file server (that you can reasonably expect" |
351 |
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain" |
352 |
+ ewarn "controller work previously known as 'samba4'." |
353 |
+ |
354 |
+ elog "For further information and migration steps make sure to read " |
355 |
+ elog "https://samba.org/samba/history/${P}.html " |
356 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
357 |
+} |
358 |
|
359 |
diff --git a/net-fs/samba/samba-4.11.2.ebuild b/net-fs/samba/samba-4.11.2.ebuild |
360 |
new file mode 100644 |
361 |
index 00000000000..e971356a350 |
362 |
--- /dev/null |
363 |
+++ b/net-fs/samba/samba-4.11.2.ebuild |
364 |
@@ -0,0 +1,311 @@ |
365 |
+# Copyright 1999-2019 Gentoo Authors |
366 |
+# Distributed under the terms of the GNU General Public License v2 |
367 |
+ |
368 |
+EAPI=6 |
369 |
+PYTHON_COMPAT=( python3_{5,6,7} ) |
370 |
+PYTHON_REQ_USE='threads(+),xml(+)' |
371 |
+ |
372 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam |
373 |
+ |
374 |
+MY_PV="${PV/_rc/rc}" |
375 |
+MY_P="${PN}-${MY_PV}" |
376 |
+ |
377 |
+SRC_PATH="stable" |
378 |
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc" |
379 |
+ |
380 |
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz" |
381 |
+[[ ${PV} = *_rc* ]] || \ |
382 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
383 |
+ |
384 |
+DESCRIPTION="Samba Suite Version 4" |
385 |
+HOMEPAGE="https://www.samba.org/" |
386 |
+LICENSE="GPL-3" |
387 |
+ |
388 |
+SLOT="0" |
389 |
+ |
390 |
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gpg iprint |
391 |
+json ldap pam profiling-data python quota selinux syslog system-heimdal |
392 |
++system-mitkrb5 systemd test winbind zeroconf" |
393 |
+ |
394 |
+MULTILIB_WRAPPED_HEADERS=( |
395 |
+ /usr/include/samba-4.0/policy.h |
396 |
+ /usr/include/samba-4.0/dcerpc_server.h |
397 |
+ /usr/include/samba-4.0/ctdb.h |
398 |
+ /usr/include/samba-4.0/ctdb_client.h |
399 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
400 |
+ /usr/include/samba-4.0/ctdb_private.h |
401 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
402 |
+ /usr/include/samba-4.0/ctdb_version.h |
403 |
+) |
404 |
+ |
405 |
+# sys-apps/attr is an automagic dependency (see bug #489748) |
406 |
+CDEPEND=" |
407 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
408 |
+ dev-lang/perl:= |
409 |
+ dev-libs/libaio[${MULTILIB_USEDEP}] |
410 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
411 |
+ dev-libs/libgcrypt:0 |
412 |
+ dev-libs/iniparser:0 |
413 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
414 |
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
415 |
+ >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}] |
416 |
+ >=net-libs/gnutls-3.2.0 |
417 |
+ net-libs/libnsl:=[${MULTILIB_USEDEP}] |
418 |
+ sys-apps/attr[${MULTILIB_USEDEP}] |
419 |
+ >=sys-libs/ldb-2.0.7[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
420 |
+ <sys-libs/ldb-2.2.0[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
421 |
+ sys-libs/libcap |
422 |
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}] |
423 |
+ sys-libs/readline:0= |
424 |
+ >=sys-libs/talloc-2.2.0[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
425 |
+ >=sys-libs/tdb-1.4.2[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
426 |
+ >=sys-libs/tevent-0.10.0[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
427 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
428 |
+ virtual/libiconv |
429 |
+ pam? ( sys-libs/pam ) |
430 |
+ acl? ( virtual/acl ) |
431 |
+ addns? ( |
432 |
+ net-dns/bind-tools[gssapi] |
433 |
+ dev-python/dnspython:=[${PYTHON_USEDEP}] |
434 |
+ ) |
435 |
+ ceph? ( sys-cluster/ceph ) |
436 |
+ cluster? ( |
437 |
+ net-libs/rpcsvc-proto |
438 |
+ !dev-db/ctdb |
439 |
+ ) |
440 |
+ cups? ( net-print/cups ) |
441 |
+ debug? ( dev-util/lttng-ust ) |
442 |
+ dmapi? ( sys-apps/dmapi ) |
443 |
+ fam? ( virtual/fam ) |
444 |
+ gpg? ( app-crypt/gpgme ) |
445 |
+ json? ( dev-libs/jansson ) |
446 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
447 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
448 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
449 |
+ systemd? ( sys-apps/systemd:0= ) |
450 |
+ zeroconf? ( net-dns/avahi ) |
451 |
+" |
452 |
+DEPEND="${CDEPEND} |
453 |
+ ${PYTHON_DEPS} |
454 |
+ app-text/docbook-xsl-stylesheets |
455 |
+ dev-libs/libxslt |
456 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
457 |
+ virtual/pkgconfig |
458 |
+ || ( |
459 |
+ net-libs/rpcsvc-proto |
460 |
+ <sys-libs/glibc-2.26[rpc(+)] |
461 |
+ ) |
462 |
+ test? ( |
463 |
+ !system-mitkrb5? ( |
464 |
+ >=sys-libs/nss_wrapper-1.1.3 |
465 |
+ >=net-dns/resolv_wrapper-1.1.4 |
466 |
+ >=net-libs/socket_wrapper-1.1.9 |
467 |
+ >=sys-libs/uid_wrapper-1.2.1 |
468 |
+ ) |
469 |
+ )" |
470 |
+RDEPEND="${CDEPEND} |
471 |
+ python? ( ${PYTHON_DEPS} ) |
472 |
+ client? ( net-fs/cifs-utils[ads?] ) |
473 |
+ selinux? ( sec-policy/selinux-samba ) |
474 |
+ !dev-perl/Parse-Yapp |
475 |
+" |
476 |
+ |
477 |
+REQUIRED_USE=" |
478 |
+ addc? ( python json winbind ) |
479 |
+ addns? ( python ) |
480 |
+ ads? ( acl ldap winbind ) |
481 |
+ cluster? ( ads ) |
482 |
+ gpg? ( addc ) |
483 |
+ test? ( python ) |
484 |
+ ?? ( system-heimdal system-mitkrb5 ) |
485 |
+ ${PYTHON_REQUIRED_USE} |
486 |
+" |
487 |
+ |
488 |
+# the test suite is messed, it uses system-installed samba |
489 |
+# bits instead of what was built, tests things disabled via use |
490 |
+# flags, and generally just fails to work in a way ebuilds could |
491 |
+# rely on in its current state |
492 |
+RESTRICT="test" |
493 |
+ |
494 |
+S="${WORKDIR}/${MY_P}" |
495 |
+ |
496 |
+PATCHES=( |
497 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
498 |
+ "${FILESDIR}/${PN}-4.9.2-timespec.patch" |
499 |
+) |
500 |
+ |
501 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
502 |
+CONFDIR="${FILESDIR}/4.4" |
503 |
+ |
504 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
505 |
+ |
506 |
+SHAREDMODS="" |
507 |
+ |
508 |
+pkg_setup() { |
509 |
+ python-single-r1_pkg_setup |
510 |
+ if use cluster ; then |
511 |
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad" |
512 |
+ elif use ads ; then |
513 |
+ SHAREDMODS="idmap_ad" |
514 |
+ fi |
515 |
+} |
516 |
+ |
517 |
+src_prepare() { |
518 |
+ default |
519 |
+ |
520 |
+ # un-bundle dnspython |
521 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
522 |
+ |
523 |
+ # unbundle iso8601 unless tests are enabled |
524 |
+ if ! use test ; then |
525 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
526 |
+ fi |
527 |
+ |
528 |
+ # ugly hackaround for bug #592502 |
529 |
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
530 |
+ |
531 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
532 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
533 |
+ || die |
534 |
+ |
535 |
+ # Friggin' WAF shit |
536 |
+ multilib_copy_sources |
537 |
+} |
538 |
+ |
539 |
+multilib_src_configure() { |
540 |
+ # when specifying libs for samba build you must append NONE to the end to |
541 |
+ # stop it automatically including things |
542 |
+ local bundled_libs="NONE" |
543 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
544 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
545 |
+ fi |
546 |
+ |
547 |
+ local myconf=( |
548 |
+ --enable-fhs |
549 |
+ --sysconfdir="${EPREFIX}/etc" |
550 |
+ --localstatedir="${EPREFIX}/var" |
551 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
552 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
553 |
+ --bundled-libraries="${bundled_libs}" |
554 |
+ --builtin-libraries=NONE |
555 |
+ --disable-rpath |
556 |
+ --disable-rpath-install |
557 |
+ --nopyc |
558 |
+ --nopyo |
559 |
+ $(multilib_native_use_with acl acl-support) |
560 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
561 |
+ $(multilib_native_use_with addns dnsupdate) |
562 |
+ $(multilib_native_use_with ads) |
563 |
+ $(multilib_native_use_enable ceph cephfs) |
564 |
+ $(multilib_native_use_with cluster cluster-support) |
565 |
+ $(multilib_native_use_enable cups) |
566 |
+ $(multilib_native_use_with dmapi) |
567 |
+ $(multilib_native_use_with fam) |
568 |
+ $(multilib_native_use_with gpg gpgme) |
569 |
+ $(multilib_native_use_with json) |
570 |
+ $(multilib_native_use_enable iprint) |
571 |
+ $(multilib_native_use_with pam) |
572 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
573 |
+ $(multilib_native_use_with quota quotas) |
574 |
+ $(multilib_native_use_with syslog) |
575 |
+ $(multilib_native_use_with systemd) |
576 |
+ $(multilib_native_use_with winbind) |
577 |
+ $(multilib_native_usex python '' '--disable-python') |
578 |
+ $(multilib_native_use_enable zeroconf avahi) |
579 |
+ $(multilib_native_usex test '--enable-selftest' '') |
580 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
581 |
+ $(use_with debug lttng) |
582 |
+ $(use_with ldap) |
583 |
+ $(use_with profiling-data) |
584 |
+ ) |
585 |
+ |
586 |
+ multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} ) |
587 |
+ |
588 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
589 |
+ waf-utils_src_configure ${myconf[@]} |
590 |
+} |
591 |
+ |
592 |
+multilib_src_compile() { |
593 |
+ waf-utils_src_compile |
594 |
+} |
595 |
+ |
596 |
+multilib_src_install() { |
597 |
+ waf-utils_src_install |
598 |
+ |
599 |
+ # Make all .so files executable |
600 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
601 |
+ |
602 |
+ if multilib_is_native_abi ; then |
603 |
+ # install ldap schema for server (bug #491002) |
604 |
+ if use ldap ; then |
605 |
+ insinto /etc/openldap/schema |
606 |
+ doins examples/LDAP/samba.schema |
607 |
+ fi |
608 |
+ |
609 |
+ # create symlink for cups (bug #552310) |
610 |
+ if use cups ; then |
611 |
+ dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb |
612 |
+ fi |
613 |
+ |
614 |
+ # install example config file |
615 |
+ insinto /etc/samba |
616 |
+ doins examples/smb.conf.default |
617 |
+ |
618 |
+ # Fix paths in example file (#603964) |
619 |
+ sed \ |
620 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
621 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
622 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
623 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
624 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
625 |
+ -i "${ED%/}"/etc/samba/smb.conf.default || die |
626 |
+ |
627 |
+ # Install init script and conf.d file |
628 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
629 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
630 |
+ |
631 |
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf |
632 |
+ systemd_dounit "${FILESDIR}"/nmbd.service |
633 |
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket} |
634 |
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service' |
635 |
+ systemd_dounit "${FILESDIR}"/winbindd.service |
636 |
+ systemd_dounit "${FILESDIR}"/samba.service |
637 |
+ fi |
638 |
+ |
639 |
+ if use pam && use winbind ; then |
640 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
641 |
+ # bugs #376853 and #590374 |
642 |
+ insinto /etc/security |
643 |
+ doins examples/pam_winbind/pam_winbind.conf || die |
644 |
+ fi |
645 |
+ |
646 |
+ keepdir /var/cache/samba |
647 |
+ keepdir /var/lib/ctdb |
648 |
+ keepdir /var/lib/samba/{bind-dns,private} |
649 |
+ keepdir /var/lock/samba |
650 |
+ keepdir /var/log/samba |
651 |
+ keepdir /var/run/{ctdb,samba} |
652 |
+} |
653 |
+ |
654 |
+multilib_src_install_all() { |
655 |
+ # Attempt to fix bug #673168 |
656 |
+ find "${ED}" -type d -name "Yapp" -print0 \ |
657 |
+ | xargs -0 --no-run-if-empty rm -r || die |
658 |
+} |
659 |
+ |
660 |
+multilib_src_test() { |
661 |
+ if multilib_is_native_abi ; then |
662 |
+ "${WAF_BINARY}" test || die "test failed" |
663 |
+ fi |
664 |
+} |
665 |
+ |
666 |
+pkg_postinst() { |
667 |
+ ewarn "Be aware the this release contains the best of all of Samba's" |
668 |
+ ewarn "technology parts, both a file server (that you can reasonably expect" |
669 |
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain" |
670 |
+ ewarn "controller work previously known as 'samba4'." |
671 |
+ |
672 |
+ elog "For further information and migration steps make sure to read " |
673 |
+ elog "https://samba.org/samba/history/${P}.html " |
674 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
675 |
+} |
676 |
|
677 |
diff --git a/net-fs/samba/samba-4.9.15.ebuild b/net-fs/samba/samba-4.9.15.ebuild |
678 |
new file mode 100644 |
679 |
index 00000000000..0253eb32433 |
680 |
--- /dev/null |
681 |
+++ b/net-fs/samba/samba-4.9.15.ebuild |
682 |
@@ -0,0 +1,308 @@ |
683 |
+# Copyright 1999-2019 Gentoo Authors |
684 |
+# Distributed under the terms of the GNU General Public License v2 |
685 |
+ |
686 |
+EAPI=6 |
687 |
+PYTHON_COMPAT=( python2_7 ) |
688 |
+PYTHON_REQ_USE='threads(+),xml(+)' |
689 |
+ |
690 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam |
691 |
+ |
692 |
+MY_PV="${PV/_rc/rc}" |
693 |
+MY_P="${PN}-${MY_PV}" |
694 |
+ |
695 |
+SRC_PATH="stable" |
696 |
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc" |
697 |
+ |
698 |
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz" |
699 |
+[[ ${PV} = *_rc* ]] || \ |
700 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
701 |
+ |
702 |
+DESCRIPTION="Samba Suite Version 4" |
703 |
+HOMEPAGE="https://www.samba.org/" |
704 |
+LICENSE="GPL-3" |
705 |
+ |
706 |
+SLOT="0" |
707 |
+ |
708 |
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg |
709 |
+iprint json ldap pam profiling-data python quota selinux syslog system-heimdal |
710 |
++system-mitkrb5 systemd test winbind zeroconf" |
711 |
+ |
712 |
+MULTILIB_WRAPPED_HEADERS=( |
713 |
+ /usr/include/samba-4.0/policy.h |
714 |
+ /usr/include/samba-4.0/dcerpc_server.h |
715 |
+ /usr/include/samba-4.0/ctdb.h |
716 |
+ /usr/include/samba-4.0/ctdb_client.h |
717 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
718 |
+ /usr/include/samba-4.0/ctdb_private.h |
719 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
720 |
+ /usr/include/samba-4.0/ctdb_version.h |
721 |
+) |
722 |
+ |
723 |
+# sys-apps/attr is an automagic dependency (see bug #489748) |
724 |
+CDEPEND=" |
725 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
726 |
+ dev-lang/perl:= |
727 |
+ dev-libs/libaio[${MULTILIB_USEDEP}] |
728 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
729 |
+ dev-libs/iniparser:0 |
730 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
731 |
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
732 |
+ >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}] |
733 |
+ net-libs/libnsl:=[${MULTILIB_USEDEP}] |
734 |
+ sys-apps/attr[${MULTILIB_USEDEP}] |
735 |
+ >=sys-libs/ldb-1.4.8[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
736 |
+ <sys-libs/ldb-1.5.0[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
737 |
+ sys-libs/libcap |
738 |
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}] |
739 |
+ sys-libs/readline:0= |
740 |
+ >=sys-libs/talloc-2.1.14[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
741 |
+ >=sys-libs/tdb-1.3.16[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
742 |
+ >=sys-libs/tevent-0.9.37[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
743 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
744 |
+ virtual/libiconv |
745 |
+ pam? ( sys-libs/pam ) |
746 |
+ acl? ( virtual/acl ) |
747 |
+ addns? ( |
748 |
+ net-dns/bind-tools[gssapi] |
749 |
+ dev-python/dnspython:=[${PYTHON_USEDEP}] |
750 |
+ ) |
751 |
+ ceph? ( sys-cluster/ceph ) |
752 |
+ cluster? ( |
753 |
+ net-libs/rpcsvc-proto |
754 |
+ !dev-db/ctdb |
755 |
+ ) |
756 |
+ cups? ( net-print/cups ) |
757 |
+ debug? ( dev-util/lttng-ust ) |
758 |
+ dmapi? ( sys-apps/dmapi ) |
759 |
+ fam? ( virtual/fam ) |
760 |
+ gnutls? ( |
761 |
+ dev-libs/libgcrypt:0 |
762 |
+ >=net-libs/gnutls-1.4.0 |
763 |
+ ) |
764 |
+ gpg? ( app-crypt/gpgme ) |
765 |
+ json? ( dev-libs/jansson ) |
766 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
767 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
768 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
769 |
+ systemd? ( sys-apps/systemd:0= ) |
770 |
+ zeroconf? ( net-dns/avahi ) |
771 |
+" |
772 |
+DEPEND="${CDEPEND} |
773 |
+ ${PYTHON_DEPS} |
774 |
+ app-text/docbook-xsl-stylesheets |
775 |
+ dev-libs/libxslt |
776 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
777 |
+ virtual/pkgconfig |
778 |
+ || ( |
779 |
+ net-libs/rpcsvc-proto |
780 |
+ <sys-libs/glibc-2.26[rpc(+)] |
781 |
+ ) |
782 |
+ test? ( |
783 |
+ !system-mitkrb5? ( |
784 |
+ >=sys-libs/nss_wrapper-1.1.3 |
785 |
+ >=net-dns/resolv_wrapper-1.1.4 |
786 |
+ >=net-libs/socket_wrapper-1.1.9 |
787 |
+ >=sys-libs/uid_wrapper-1.2.1 |
788 |
+ ) |
789 |
+ )" |
790 |
+RDEPEND="${CDEPEND} |
791 |
+ python? ( ${PYTHON_DEPS} ) |
792 |
+ client? ( net-fs/cifs-utils[ads?] ) |
793 |
+ selinux? ( sec-policy/selinux-samba ) |
794 |
+ !dev-perl/Parse-Yapp |
795 |
+" |
796 |
+ |
797 |
+REQUIRED_USE=" |
798 |
+ addc? ( python gnutls json winbind ) |
799 |
+ addns? ( python ) |
800 |
+ ads? ( acl gnutls ldap winbind ) |
801 |
+ cluster? ( ads ) |
802 |
+ gpg? ( addc ) |
803 |
+ test? ( python ) |
804 |
+ ?? ( system-heimdal system-mitkrb5 ) |
805 |
+ ${PYTHON_REQUIRED_USE} |
806 |
+" |
807 |
+ |
808 |
+# the test suite is messed, it uses system-installed samba |
809 |
+# bits instead of what was built, tests things disabled via use |
810 |
+# flags, and generally just fails to work in a way ebuilds could |
811 |
+# rely on in its current state |
812 |
+RESTRICT="test" |
813 |
+ |
814 |
+S="${WORKDIR}/${MY_P}" |
815 |
+ |
816 |
+PATCHES=( |
817 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
818 |
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch" |
819 |
+ "${FILESDIR}/${PN}-4.9.2-timespec.patch" |
820 |
+) |
821 |
+ |
822 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
823 |
+CONFDIR="${FILESDIR}/4.4" |
824 |
+ |
825 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
826 |
+ |
827 |
+SHAREDMODS="" |
828 |
+ |
829 |
+pkg_setup() { |
830 |
+ python-single-r1_pkg_setup |
831 |
+ if use cluster ; then |
832 |
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad" |
833 |
+ elif use ads ; then |
834 |
+ SHAREDMODS="idmap_ad" |
835 |
+ fi |
836 |
+} |
837 |
+ |
838 |
+src_prepare() { |
839 |
+ default |
840 |
+ |
841 |
+ # un-bundle dnspython |
842 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
843 |
+ |
844 |
+ # unbundle iso8601 unless tests are enabled |
845 |
+ if ! use test ; then |
846 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
847 |
+ fi |
848 |
+ |
849 |
+ # ugly hackaround for bug #592502 |
850 |
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
851 |
+ |
852 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
853 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
854 |
+ || die |
855 |
+ |
856 |
+ # Friggin' WAF shit |
857 |
+ multilib_copy_sources |
858 |
+} |
859 |
+ |
860 |
+multilib_src_configure() { |
861 |
+ # when specifying libs for samba build you must append NONE to the end to |
862 |
+ # stop it automatically including things |
863 |
+ local bundled_libs="NONE" |
864 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
865 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
866 |
+ fi |
867 |
+ |
868 |
+ local myconf=( |
869 |
+ --enable-fhs |
870 |
+ --sysconfdir="${EPREFIX}/etc" |
871 |
+ --localstatedir="${EPREFIX}/var" |
872 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
873 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
874 |
+ --bundled-libraries="${bundled_libs}" |
875 |
+ --builtin-libraries=NONE |
876 |
+ --disable-rpath |
877 |
+ --disable-rpath-install |
878 |
+ --nopyc |
879 |
+ --nopyo |
880 |
+ $(multilib_native_use_with acl acl-support) |
881 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
882 |
+ $(multilib_native_use_with addns dnsupdate) |
883 |
+ $(multilib_native_use_with ads) |
884 |
+ $(multilib_native_use_enable ceph cephfs) |
885 |
+ $(multilib_native_use_with cluster cluster-support) |
886 |
+ $(multilib_native_use_enable cups) |
887 |
+ $(multilib_native_use_with dmapi) |
888 |
+ $(multilib_native_use_with fam) |
889 |
+ $(multilib_native_use_with gpg gpgme) |
890 |
+ $(multilib_native_use_with json json-audit) |
891 |
+ $(multilib_native_use_enable iprint) |
892 |
+ $(multilib_native_use_with pam) |
893 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
894 |
+ $(multilib_native_use_with quota quotas) |
895 |
+ $(multilib_native_use_with syslog) |
896 |
+ $(multilib_native_use_with systemd) |
897 |
+ $(multilib_native_use_with winbind) |
898 |
+ $(multilib_native_usex python '' '--disable-python') |
899 |
+ $(multilib_native_use_enable zeroconf avahi) |
900 |
+ $(multilib_native_usex test '--enable-selftest' '') |
901 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
902 |
+ $(use_enable gnutls) |
903 |
+ $(use_with debug lttng) |
904 |
+ $(use_with ldap) |
905 |
+ $(use_with profiling-data) |
906 |
+ ) |
907 |
+ multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} ) |
908 |
+ |
909 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
910 |
+ waf-utils_src_configure ${myconf[@]} |
911 |
+} |
912 |
+ |
913 |
+multilib_src_compile() { |
914 |
+ waf-utils_src_compile |
915 |
+} |
916 |
+ |
917 |
+multilib_src_install() { |
918 |
+ waf-utils_src_install |
919 |
+ |
920 |
+ # Make all .so files executable |
921 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
922 |
+ |
923 |
+ if multilib_is_native_abi ; then |
924 |
+ # install ldap schema for server (bug #491002) |
925 |
+ if use ldap ; then |
926 |
+ insinto /etc/openldap/schema |
927 |
+ doins examples/LDAP/samba.schema |
928 |
+ fi |
929 |
+ |
930 |
+ # create symlink for cups (bug #552310) |
931 |
+ if use cups ; then |
932 |
+ dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb |
933 |
+ fi |
934 |
+ |
935 |
+ # install example config file |
936 |
+ insinto /etc/samba |
937 |
+ doins examples/smb.conf.default |
938 |
+ |
939 |
+ # Fix paths in example file (#603964) |
940 |
+ sed \ |
941 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
942 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
943 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
944 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
945 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
946 |
+ -i "${ED%/}"/etc/samba/smb.conf.default || die |
947 |
+ |
948 |
+ # Install init script and conf.d file |
949 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
950 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
951 |
+ |
952 |
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf |
953 |
+ systemd_dounit "${FILESDIR}"/nmbd.service |
954 |
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket} |
955 |
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service' |
956 |
+ systemd_dounit "${FILESDIR}"/winbindd.service |
957 |
+ systemd_dounit "${FILESDIR}"/samba.service |
958 |
+ fi |
959 |
+ |
960 |
+ if use pam && use winbind ; then |
961 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
962 |
+ # bugs #376853 and #590374 |
963 |
+ insinto /etc/security |
964 |
+ doins examples/pam_winbind/pam_winbind.conf || die |
965 |
+ fi |
966 |
+ |
967 |
+ keepdir /var/cache/samba |
968 |
+ keepdir /var/lib/ctdb |
969 |
+ keepdir /var/lib/samba/{bind-dns,private} |
970 |
+ keepdir /var/lock/samba |
971 |
+ keepdir /var/log/samba |
972 |
+ keepdir /var/run/{ctdb,samba} |
973 |
+} |
974 |
+ |
975 |
+multilib_src_test() { |
976 |
+ if multilib_is_native_abi ; then |
977 |
+ "${WAF_BINARY}" test || die "test failed" |
978 |
+ fi |
979 |
+} |
980 |
+ |
981 |
+pkg_postinst() { |
982 |
+ ewarn "Be aware the this release contains the best of all of Samba's" |
983 |
+ ewarn "technology parts, both a file server (that you can reasonably expect" |
984 |
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain" |
985 |
+ ewarn "controller work previously known as 'samba4'." |
986 |
+ |
987 |
+ elog "For further information and migration steps make sure to read " |
988 |
+ elog "https://samba.org/samba/history/${P}.html " |
989 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
990 |
+} |