1 |
commit: 0a2e00c977a208bb929489f763798bcdd321b3b3 |
2 |
Author: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Aug 11 21:20:26 2017 +0000 |
4 |
Commit: Ian Stakenvicius <axs <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Aug 11 21:23:04 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0a2e00c9 |
7 |
|
8 |
net-fs/samba: add 4.7.0_rc3 |
9 |
|
10 |
Adding a first draft of samba-4.7 |
11 |
|
12 |
There may be patches available upstream or already included that will allow |
13 |
Active Directory flag to be enabled while retaining system-mitkrb5; future |
14 |
revisions will make the necessary adjustments if it can be made to work. |
15 |
|
16 |
Package-Manager: Portage-2.3.6, Repoman-2.3.1 |
17 |
|
18 |
net-fs/samba/Manifest | 1 + |
19 |
net-fs/samba/files/talloc-disable-python.patch | 34 +++ |
20 |
net-fs/samba/samba-4.7.0_rc3.ebuild | 296 +++++++++++++++++++++++++ |
21 |
3 files changed, 331 insertions(+) |
22 |
|
23 |
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest |
24 |
index 5ab51c9735d..54da080958e 100644 |
25 |
--- a/net-fs/samba/Manifest |
26 |
+++ b/net-fs/samba/Manifest |
27 |
@@ -6,5 +6,6 @@ DIST samba-4.6.0-disable-python-patches.tar.xz 7544 SHA256 508adeea65604ef8f4da0 |
28 |
DIST samba-4.6.6.tar.gz 21120791 SHA256 fc31c809f7d85ae30f2b7dcddcb8404201b626047458cb5f2b743d4f6f3f1a8e SHA512 e06bdc83f44c449212f2e45a902e2ca547505a75e970166259b91d2093fb442cdfd456e724d0e842b674b4b8d5bdbe9072996d768c08ebd979a44b2494a59799 WHIRLPOOL eee4bc7e6d5a102b4ab7146354afd7501bc4ad6a3af1aa63ffecf7eb54dc04f113248048157ca9e8c9cd3c21a0931b0fae1d8dc7232e29a92ebbf5d6cccd4c55 |
29 |
DIST samba-4.6.7-disable-python-patches.tar.xz 8896 SHA256 33702adba80e9886625fda8cba46d4017ae603f5d9cf9d3dc78e5ef30ff6f5eb SHA512 c45e548a49735e17b568bebf07dc7409de3de0f93256d1dcf345d2723a27d22a51d860ed921785354fda691f83be4eca3b9d618d5c332438ebf97518a01983eb WHIRLPOOL 1cb176480b8583369e1085c8e122958112c0d13aa8ba78cd57dfd04b17c7d8f0a0664a43d277deba86775f1944eab052f4fb9459f64506215ae25184c86cbe40 |
30 |
DIST samba-4.6.7.tar.gz 21137329 SHA256 9ef24393de08390f236cabccd6a420b5cea304e959cbf1a99ff317325db3ddfa SHA512 394c28204bae4134e6a9d2e5b8f087a425dc4ac4ceecd8b29315acff1a92349d40ef0b6a9cc34f5ad18ff5ec9979199837c87f687858cb4e6687968284303aa5 WHIRLPOOL 14282c4a88a22f932099ef47dc50f57c5fef87d6909d529d3eb837b6e958f490a5fd64ce1a5dfdd36eab5ac82b41583736953be2be279f70f0491c61fd1d0d92 |
31 |
+DIST samba-4.7.0rc3.tar.gz 16789893 SHA256 b162e861889d92024a9083a5ef63d22a06f5065c3d48ee8f5e103f886428b89e SHA512 f943f41e45bda040e8b7e4c4ed170fcad10694d46a530ff4d3e049f3b7d9566ffd92dfb7654df9a9ad2ba65e813dc2a186624a241f6b1d774108c7541009bded WHIRLPOOL 9bea73b5f6db8f3d453b24c0dfebb5396b28efc811f3dfe54ca8914764624be61f7f6fdcb9f8b0d3c8463fc7a39cb6e6eadefa08e900db8f025c63ae38705fde |
32 |
DIST samba-disable-python-patches-4.2.12.tar.xz 6052 SHA256 8903eacbabdfaf7b64cbde03d7c367d1efdc92e54090f0f4b9ed5d2a462b1c18 SHA512 c527d0a052d3211e5b12c17bc94db56cc5e5545189ed65a760c0656c94c22e27a4b159e6439eb0370873e1619873a741f3b3bd10d3876b38eb3914a87eace372 WHIRLPOOL ad63db55d5dc96f56e6c9b30c2092e2f6e206b0ed5d13c249879d10753c8db2f475c5d4e651e2fc042ad992b648d3b4465f1b28c6b4bbf821cf503d27f741f7e |
33 |
DIST samba-disable-python-patches-4.5.0_rc1.tar.xz 6204 SHA256 fa0d776e04e3222c0dc4761e376717f4154937cdcb85f4117b8978dfb770a78e SHA512 920089ba3c6e8e7d913b1d7ef1017262a19d1af41215adb30cfc98a57556efc4b0116931d4ef774c01124149d8eca2be3a23814ce7e11daf0180d2c111799927 WHIRLPOOL 6d55710895435ad012e23f8c252e5276966241014710349ca7fa9cf037e8742030b8e053f7cb71309a0a45f48d2235d55393243bf4d19476a22dd39bb1b7748d |
34 |
|
35 |
diff --git a/net-fs/samba/files/talloc-disable-python.patch b/net-fs/samba/files/talloc-disable-python.patch |
36 |
new file mode 100644 |
37 |
index 00000000000..6ef45eb37fb |
38 |
--- /dev/null |
39 |
+++ b/net-fs/samba/files/talloc-disable-python.patch |
40 |
@@ -0,0 +1,34 @@ |
41 |
+--- a/lib/talloc/wscript 2017-04-28 04:57:26.000000000 -0400 |
42 |
++++ b/lib/talloc/wscript 2017-07-05 14:30:42.700580464 -0400 |
43 |
+@@ -74,19 +74,22 @@ |
44 |
+ implied_deps='replace'): |
45 |
+ conf.define('USING_SYSTEM_TALLOC', 1) |
46 |
+ |
47 |
+- using_system_pytalloc_util = True |
48 |
+- if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, |
49 |
+- implied_deps='talloc replace'): |
50 |
++ if conf.env.disable_python: |
51 |
+ using_system_pytalloc_util = False |
52 |
+- |
53 |
+- # We need to get a pytalloc-util for all the python versions |
54 |
+- # we are building for |
55 |
+- if conf.env['EXTRA_PYTHON']: |
56 |
+- name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG'] |
57 |
+- if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION, |
58 |
++ else: |
59 |
++ using_system_pytalloc_util = True |
60 |
++ if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION, |
61 |
+ implied_deps='talloc replace'): |
62 |
+ using_system_pytalloc_util = False |
63 |
+ |
64 |
++ # We need to get a pytalloc-util for all the python versions |
65 |
++ # we are building for |
66 |
++ if conf.env['EXTRA_PYTHON']: |
67 |
++ name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG'] |
68 |
++ if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION, |
69 |
++ implied_deps='talloc replace'): |
70 |
++ using_system_pytalloc_util = False |
71 |
++ |
72 |
+ if using_system_pytalloc_util: |
73 |
+ conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1) |
74 |
+ |
75 |
|
76 |
diff --git a/net-fs/samba/samba-4.7.0_rc3.ebuild b/net-fs/samba/samba-4.7.0_rc3.ebuild |
77 |
new file mode 100644 |
78 |
index 00000000000..6a8a94e557e |
79 |
--- /dev/null |
80 |
+++ b/net-fs/samba/samba-4.7.0_rc3.ebuild |
81 |
@@ -0,0 +1,296 @@ |
82 |
+# Copyright 1999-2017 Gentoo Foundation |
83 |
+# Distributed under the terms of the GNU General Public License v2 |
84 |
+ |
85 |
+EAPI=6 |
86 |
+PYTHON_COMPAT=( python2_7 ) |
87 |
+PYTHON_REQ_USE='threads(+),xml(+)' |
88 |
+ |
89 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd eutils |
90 |
+ |
91 |
+MY_PV="${PV/_rc/rc}" |
92 |
+MY_P="${PN}-${MY_PV}" |
93 |
+ |
94 |
+SRC_PATH="stable" |
95 |
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc" |
96 |
+ |
97 |
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz" |
98 |
+[[ ${PV} = *_rc* ]] || \ |
99 |
+KEYWORDS="~amd64 ~arm64 ~hppa ~x86" |
100 |
+ |
101 |
+DESCRIPTION="Samba Suite Version 4" |
102 |
+HOMEPAGE="http://www.samba.org/" |
103 |
+LICENSE="GPL-3" |
104 |
+ |
105 |
+SLOT="0" |
106 |
+ |
107 |
+IUSE="acl addc addns ads client cluster cups dmapi fam gnutls gpg iprint ldap pam python |
108 |
+quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf" |
109 |
+ |
110 |
+MULTILIB_WRAPPED_HEADERS=( |
111 |
+ /usr/include/samba-4.0/policy.h |
112 |
+ /usr/include/samba-4.0/dcerpc_server.h |
113 |
+ /usr/include/samba-4.0/ctdb.h |
114 |
+ /usr/include/samba-4.0/ctdb_client.h |
115 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
116 |
+ /usr/include/samba-4.0/ctdb_private.h |
117 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
118 |
+ /usr/include/samba-4.0/ctdb_version.h |
119 |
+) |
120 |
+ |
121 |
+# sys-apps/attr is an automagic dependency (see bug #489748) |
122 |
+CDEPEND=" |
123 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
124 |
+ dev-lang/perl:= |
125 |
+ dev-libs/libaio[${MULTILIB_USEDEP}] |
126 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
127 |
+ dev-libs/iniparser:0 |
128 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
129 |
+ dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
130 |
+ >=dev-util/cmocka-1.0.0[${MULTILIB_USEDEP}] |
131 |
+ sys-apps/attr[${MULTILIB_USEDEP}] |
132 |
+ >=sys-libs/ldb-1.2.1[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
133 |
+ sys-libs/libcap |
134 |
+ sys-libs/ncurses:0=[${MULTILIB_USEDEP}] |
135 |
+ sys-libs/readline:0= |
136 |
+ >=sys-libs/talloc-2.1.9[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
137 |
+ >=sys-libs/tdb-1.3.14[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
138 |
+ >=sys-libs/tevent-0.9.33[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}] |
139 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
140 |
+ virtual/libiconv |
141 |
+ pam? ( virtual/pam ) |
142 |
+ acl? ( virtual/acl ) |
143 |
+ addns? ( |
144 |
+ net-dns/bind-tools[gssapi] |
145 |
+ dev-python/dnspython:=[${PYTHON_USEDEP}] |
146 |
+ ) |
147 |
+ cluster? ( !dev-db/ctdb ) |
148 |
+ cups? ( net-print/cups ) |
149 |
+ dmapi? ( sys-apps/dmapi ) |
150 |
+ fam? ( virtual/fam ) |
151 |
+ gnutls? ( |
152 |
+ dev-libs/libgcrypt:0 |
153 |
+ >=net-libs/gnutls-1.4.0 |
154 |
+ ) |
155 |
+ gpg? ( app-crypt/gpgme ) |
156 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
157 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
158 |
+ system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] ) |
159 |
+ systemd? ( sys-apps/systemd:0= )" |
160 |
+DEPEND="${CDEPEND} |
161 |
+ ${PYTHON_DEPS} |
162 |
+ virtual/pkgconfig |
163 |
+ test? ( |
164 |
+ !system-mitkrb5? ( |
165 |
+ >=sys-libs/nss_wrapper-1.1.3 |
166 |
+ >=net-dns/resolv_wrapper-1.1.4 |
167 |
+ >=net-libs/socket_wrapper-1.1.7 |
168 |
+ >=sys-libs/uid_wrapper-1.2.1 |
169 |
+ ) |
170 |
+ )" |
171 |
+RDEPEND="${CDEPEND} |
172 |
+ python? ( ${PYTHON_DEPS} ) |
173 |
+ client? ( net-fs/cifs-utils[ads?] ) |
174 |
+ selinux? ( sec-policy/selinux-samba ) |
175 |
+ !dev-perl/Parse-Yapp |
176 |
+" |
177 |
+ |
178 |
+REQUIRED_USE="addc? ( python gnutls !system-mitkrb5 ) |
179 |
+ test? ( python ) |
180 |
+ addns? ( python ) |
181 |
+ ads? ( acl gnutls ldap ) |
182 |
+ gpg? ( addc ) |
183 |
+ ?? ( system-heimdal system-mitkrb5 ) |
184 |
+ ${PYTHON_REQUIRED_USE}" |
185 |
+ |
186 |
+# the test suite is messed, it uses system-installed samba |
187 |
+# bits instead of what was built, tests things disabled via use |
188 |
+# flags, and generally just fails to work in a way ebuilds could |
189 |
+# rely on in its current state |
190 |
+RESTRICT="test" |
191 |
+ |
192 |
+S="${WORKDIR}/${MY_P}" |
193 |
+ |
194 |
+PATCHES=( |
195 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
196 |
+ "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch" |
197 |
+ "${FILESDIR}"/talloc-disable-python.patch |
198 |
+) |
199 |
+ |
200 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
201 |
+CONFDIR="${FILESDIR}/4.4" |
202 |
+ |
203 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
204 |
+ |
205 |
+SHAREDMODS="" |
206 |
+ |
207 |
+pkg_setup() { |
208 |
+ python-single-r1_pkg_setup |
209 |
+ if use cluster ; then |
210 |
+ SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad" |
211 |
+ elif use ads ; then |
212 |
+ SHAREDMODS="idmap_ad" |
213 |
+ fi |
214 |
+} |
215 |
+ |
216 |
+src_prepare() { |
217 |
+ default |
218 |
+ |
219 |
+ # un-bundle dnspython |
220 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
221 |
+ |
222 |
+ # unbundle iso8601 unless tests are enabled |
223 |
+ use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
224 |
+ |
225 |
+ # ugly hackaround for bug #592502 |
226 |
+ cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
227 |
+ |
228 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
229 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
230 |
+ || die |
231 |
+ |
232 |
+ # Friggin' WAF shit |
233 |
+ multilib_copy_sources |
234 |
+} |
235 |
+ |
236 |
+multilib_src_configure() { |
237 |
+ # when specifying libs for samba build you must append NONE to the end to |
238 |
+ # stop it automatically including things |
239 |
+ local bundled_libs="NONE" |
240 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
241 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
242 |
+ fi |
243 |
+ |
244 |
+ local myconf=() |
245 |
+ myconf=( |
246 |
+ --enable-fhs |
247 |
+ --sysconfdir="${EPREFIX}/etc" |
248 |
+ --localstatedir="${EPREFIX}/var" |
249 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
250 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
251 |
+ --bundled-libraries="${bundled_libs}" |
252 |
+ --builtin-libraries=NONE |
253 |
+ --disable-rpath |
254 |
+ --disable-rpath-install |
255 |
+ --nopyc |
256 |
+ --nopyo |
257 |
+ ) |
258 |
+ if multilib_is_native_abi ; then |
259 |
+ myconf+=( |
260 |
+ $(use_with acl acl-support) |
261 |
+ $(usex addc '' '--without-ad-dc') |
262 |
+ $(use_with addns dnsupdate) |
263 |
+ $(use_with ads) |
264 |
+ $(use_with cluster cluster-support) |
265 |
+ $(use_enable cups) |
266 |
+ $(use_with dmapi) |
267 |
+ $(use_with fam) |
268 |
+ $(use_enable gnutls) |
269 |
+ $(use_with gpg gpgme) |
270 |
+ $(use_enable iprint) |
271 |
+ $(use_with ldap) |
272 |
+ $(use_with pam) |
273 |
+ $(usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
274 |
+ $(use_with quota quotas) |
275 |
+ $(use_with syslog) |
276 |
+ $(use_with systemd) |
277 |
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '') |
278 |
+ $(use_with winbind) |
279 |
+ $(usex python '' '--disable-python') |
280 |
+ $(usex test '--enable-selftest' '') |
281 |
+ $(use_enable zeroconf avahi) |
282 |
+ --with-shared-modules=${SHAREDMODS} |
283 |
+ ) |
284 |
+ else |
285 |
+ myconf+=( |
286 |
+ --without-acl-support |
287 |
+ --without-ad-dc |
288 |
+ --without-dnsupdate |
289 |
+ --without-ads |
290 |
+ --disable-avahi |
291 |
+ --without-cluster-support |
292 |
+ --disable-cups |
293 |
+ --without-dmapi |
294 |
+ --without-fam |
295 |
+ --disable-gnutls |
296 |
+ --without-gpgme |
297 |
+ --disable-iprint |
298 |
+ $(use_with ldap) |
299 |
+ --without-pam |
300 |
+ --without-quotas |
301 |
+ --without-syslog |
302 |
+ --without-systemd |
303 |
+ $(usex system-mitkrb5 '--with-system-mitkrb5' '') |
304 |
+ --without-winbind |
305 |
+ --disable-python |
306 |
+ ) |
307 |
+ fi |
308 |
+ |
309 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
310 |
+ waf-utils_src_configure ${myconf[@]} |
311 |
+} |
312 |
+ |
313 |
+multilib_src_compile() { |
314 |
+ waf-utils_src_compile |
315 |
+} |
316 |
+ |
317 |
+multilib_src_install() { |
318 |
+ waf-utils_src_install |
319 |
+ |
320 |
+ # Make all .so files executable |
321 |
+ find "${D}" -type f -name "*.so" -exec chmod +x {} + |
322 |
+ |
323 |
+ if multilib_is_native_abi; then |
324 |
+ # install ldap schema for server (bug #491002) |
325 |
+ if use ldap ; then |
326 |
+ insinto /etc/openldap/schema |
327 |
+ doins examples/LDAP/samba.schema |
328 |
+ fi |
329 |
+ |
330 |
+ # create symlink for cups (bug #552310) |
331 |
+ if use cups ; then |
332 |
+ dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb |
333 |
+ fi |
334 |
+ |
335 |
+ # install example config file |
336 |
+ insinto /etc/samba |
337 |
+ doins examples/smb.conf.default |
338 |
+ |
339 |
+ # Fix paths in example file (#603964) |
340 |
+ sed \ |
341 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
342 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
343 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
344 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
345 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
346 |
+ -i "${ED%/}"/etc/samba/smb.conf.default || die |
347 |
+ |
348 |
+ # Install init script and conf.d file |
349 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
350 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
351 |
+ |
352 |
+ systemd_dotmpfilesd "${FILESDIR}"/samba.conf |
353 |
+ systemd_dounit "${FILESDIR}"/nmbd.service |
354 |
+ systemd_dounit "${FILESDIR}"/smbd.{service,socket} |
355 |
+ systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service' |
356 |
+ systemd_dounit "${FILESDIR}"/winbindd.service |
357 |
+ systemd_dounit "${FILESDIR}"/samba.service |
358 |
+ fi |
359 |
+} |
360 |
+ |
361 |
+multilib_src_test() { |
362 |
+ if multilib_is_native_abi ; then |
363 |
+ "${WAF_BINARY}" test || die "test failed" |
364 |
+ fi |
365 |
+} |
366 |
+ |
367 |
+pkg_postinst() { |
368 |
+ ewarn "Be aware the this release contains the best of all of Samba's" |
369 |
+ ewarn "technology parts, both a file server (that you can reasonably expect" |
370 |
+ ewarn "to upgrade existing Samba 3.x releases to) and the AD domain" |
371 |
+ ewarn "controller work previously known as 'samba4'." |
372 |
+ |
373 |
+ elog "For further information and migration steps make sure to read " |
374 |
+ elog "http://samba.org/samba/history/${P}.html " |
375 |
+ elog "http://samba.org/samba/history/${PN}-4.5.0.html and" |
376 |
+ elog "http://wiki.samba.org/index.php/Samba4/HOWTO " |
377 |
+} |