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