Gentoo Archives: gentoo-commits

From: Lars Wendler <polynomial-c@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-fs/samba/
Date: Thu, 11 Oct 2018 08:32:19
Message-Id: 1539246717.89880d2b18e407023df1dba6f4be8a862ce0695e.polynomial-c@gentoo
1 commit: 89880d2b18e407023df1dba6f4be8a862ce0695e
2 Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 11 07:58:58 2018 +0000
4 Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 11 08:31:57 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=89880d2b
7
8 net-fs/samba: Bump to version 4.8.6
9
10 Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org>
11 Package-Manager: Portage-2.3.51, Repoman-2.3.11
12
13 net-fs/samba/Manifest | 1 +
14 net-fs/samba/samba-4.8.6.ebuild | 286 ++++++++++++++++++++++++++++++++++++++++
15 2 files changed, 287 insertions(+)
16
17 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
18 index 1e0ddac50da..2144b3e909e 100644
19 --- a/net-fs/samba/Manifest
20 +++ b/net-fs/samba/Manifest
21 @@ -2,5 +2,6 @@ DIST samba-4.5.11-disable-python-patches.tar.xz 6292 BLAKE2B c2a32a1059a02bc1c87
22 DIST samba-4.5.16.tar.gz 21024396 BLAKE2B e737559fb748044076608fa233700eb54c7e1c56bc234763f062b6341a179cc78a4a8cdf9f3d6f4d7f3cf8a79f846852ddd5cc753a468c3adb3a0451e1809ed9 SHA512 de8a41013cfb5ef3adcb290efd97a78a5de876d90ad05764d631f14e663a1849bb53e4ac394b46c906f1109be5748fee9316407a659c57007d36851ae8adcd7f
23 DIST samba-4.7.10.tar.gz 16911799 BLAKE2B e8ee8763c9843d048589cb17c1b78a3e3983ff8766b2981a7da0c2e6f8425a85c97f2619a9a8259a94ccd07d7aa55bb9bf928261959c04eb0b7fdfe318fc2433 SHA512 4165cf9ec1c6355d0832fb4e17939f8f1544802e6e144d51a4f6030ad54660bb468b586d3db488f5e13f3d451fe4e2af94b748d2432da62ce256eb2467d3a51c
24 DIST samba-4.8.5.tar.gz 17715401 BLAKE2B fc1aef2f5362fff1870abe40eebfe932f5ca347e65d1a2502ee19c9fce8cbf71e3f4181a18056d8d6b3e92d2515f946e3dc746b00f2398d91f88b1172e91cd43 SHA512 23a88c48214c3bf4cbc135cb84873bb8d12f32187ccbda47b02495fa4a12458f103de5e968e8f9a5958c116f618332cfffbf54d084e4f1e363fbf079b897e3a0
25 +DIST samba-4.8.6.tar.gz 17723841 BLAKE2B 38da52e14b4417f26462eef2226c4498e54d2c276b4056e8c6d6c66079f33bcda24c1eab30b29bc7413280ec89a74a55e043e8274ac50f9a25bae7563717ff34 SHA512 f6afab5ca466bd8653a56c205b71ce94ecf0ad0c6e4c9d64cbba7b1e56f1987bc2022e6b629d87eb6078e3f6ba53833c19cfb41e40b6d589e4317ea9d85de273
26 DIST samba-4.9.0.tar.gz 18014609 BLAKE2B d91eca23402d9e4940f806c2bf81a28d9739f9a3c054be2776c923ea75d1a837a14d932fa080bd1ef1ac07b8cab92ea4e4b652a66c645873921fffca973cf673 SHA512 436743aff6415dbdd3495dff8a5264df16833fc5678539c4294a0de755f34661b660ce7a7b4bbb02a808ff1ca046f34072a30b9e89391034f2f391d3884ea630
27 DIST samba-4.9.1.tar.gz 18018259 BLAKE2B 783423098864c391f08b30e05b70308e922bdb4dad08b8b0b4d1112808357b9bb96aad7a094d0fe2e308f84a143d5f90be523b9c3551a3068ecdcad7347613f6 SHA512 267673b6d6ab0db59063480c20f02e5864ef96e9ad1097c23a99b2ab4b5fd2252193d7a152729b40cae0751fb9b0b108b087a190f5db11eabbd075224bd6e663
28
29 diff --git a/net-fs/samba/samba-4.8.6.ebuild b/net-fs/samba/samba-4.8.6.ebuild
30 new file mode 100644
31 index 00000000000..9befc0e2119
32 --- /dev/null
33 +++ b/net-fs/samba/samba-4.8.6.ebuild
34 @@ -0,0 +1,286 @@
35 +# Copyright 1999-2018 Gentoo Authors
36 +# Distributed under the terms of the GNU General Public License v2
37 +
38 +EAPI=6
39 +PYTHON_COMPAT=( python2_7 )
40 +PYTHON_REQ_USE='threads(+),xml(+)'
41 +
42 +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd
43 +
44 +MY_PV="${PV/_rc/rc}"
45 +MY_P="${PN}-${MY_PV}"
46 +
47 +SRC_PATH="stable"
48 +[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
49 +
50 +SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz"
51 +[[ ${PV} = *_rc* ]] || \
52 +KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~x86"
53 +
54 +DESCRIPTION="Samba Suite Version 4"
55 +HOMEPAGE="https://www.samba.org/"
56 +LICENSE="GPL-3"
57 +
58 +SLOT="0"
59 +
60 +IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg iprint ldap pam python
61 +quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
62 +
63 +MULTILIB_WRAPPED_HEADERS=(
64 + /usr/include/samba-4.0/policy.h
65 + /usr/include/samba-4.0/dcerpc_server.h
66 + /usr/include/samba-4.0/ctdb.h
67 + /usr/include/samba-4.0/ctdb_client.h
68 + /usr/include/samba-4.0/ctdb_protocol.h
69 + /usr/include/samba-4.0/ctdb_private.h
70 + /usr/include/samba-4.0/ctdb_typesafe_cb.h
71 + /usr/include/samba-4.0/ctdb_version.h
72 +)
73 +
74 +# sys-apps/attr is an automagic dependency (see bug #489748)
75 +CDEPEND="
76 + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
77 + dev-lang/perl:=
78 + dev-libs/libaio[${MULTILIB_USEDEP}]
79 + dev-libs/libbsd[${MULTILIB_USEDEP}]
80 + dev-libs/iniparser:0
81 + dev-libs/popt[${MULTILIB_USEDEP}]
82 + dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
83 + >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
84 + net-libs/libnsl:=[${MULTILIB_USEDEP}]
85 + sys-apps/attr[${MULTILIB_USEDEP}]
86 + >=sys-libs/ldb-1.3.6[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
87 + <sys-libs/ldb-1.4.0[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
88 + sys-libs/libcap
89 + sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
90 + sys-libs/readline:0=
91 + >=sys-libs/talloc-2.1.11[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
92 + >=sys-libs/tdb-1.3.15[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
93 + >=sys-libs/tevent-0.9.36[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
94 + sys-libs/zlib[${MULTILIB_USEDEP}]
95 + virtual/libiconv
96 + pam? ( virtual/pam )
97 + acl? ( virtual/acl )
98 + addns? (
99 + net-dns/bind-tools[gssapi]
100 + dev-python/dnspython:=[${PYTHON_USEDEP}]
101 + )
102 + ceph? ( sys-cluster/ceph )
103 + cluster? (
104 + net-libs/rpcsvc-proto
105 + !dev-db/ctdb
106 + )
107 + cups? ( net-print/cups )
108 + debug? ( dev-util/lttng-ust )
109 + dmapi? ( sys-apps/dmapi )
110 + fam? ( virtual/fam )
111 + gnutls? (
112 + dev-libs/libgcrypt:0
113 + >=net-libs/gnutls-1.4.0
114 + )
115 + gpg? ( app-crypt/gpgme )
116 + ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
117 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
118 + system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
119 + systemd? ( sys-apps/systemd:0= )
120 +"
121 +DEPEND="${CDEPEND}
122 + ${PYTHON_DEPS}
123 + app-text/docbook-xsl-stylesheets
124 + dev-libs/libxslt
125 + net-libs/libtirpc[${MULTILIB_USEDEP}]
126 + virtual/pkgconfig
127 + || (
128 + net-libs/rpcsvc-proto
129 + <sys-libs/glibc-2.26[rpc(+)]
130 + )
131 + test? (
132 + !system-mitkrb5? (
133 + >=sys-libs/nss_wrapper-1.1.3
134 + >=net-dns/resolv_wrapper-1.1.4
135 + >=net-libs/socket_wrapper-1.1.7
136 + >=sys-libs/uid_wrapper-1.2.1
137 + )
138 + )"
139 +RDEPEND="${CDEPEND}
140 + python? ( ${PYTHON_DEPS} )
141 + client? ( net-fs/cifs-utils[ads?] )
142 + selinux? ( sec-policy/selinux-samba )
143 + !dev-perl/Parse-Yapp
144 +"
145 +
146 +REQUIRED_USE="
147 + addc? ( python gnutls winbind )
148 + addns? ( python )
149 + ads? ( acl gnutls ldap winbind )
150 + cluster? ( ads )
151 + gpg? ( addc )
152 + test? ( python )
153 + ?? ( system-heimdal system-mitkrb5 )
154 + ${PYTHON_REQUIRED_USE}
155 +"
156 +
157 +# the test suite is messed, it uses system-installed samba
158 +# bits instead of what was built, tests things disabled via use
159 +# flags, and generally just fails to work in a way ebuilds could
160 +# rely on in its current state
161 +RESTRICT="test"
162 +
163 +S="${WORKDIR}/${MY_P}"
164 +
165 +PATCHES=(
166 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
167 + "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
168 +)
169 +
170 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
171 +CONFDIR="${FILESDIR}/4.4"
172 +
173 +WAF_BINARY="${S}/buildtools/bin/waf"
174 +
175 +SHAREDMODS=""
176 +
177 +pkg_setup() {
178 + python-single-r1_pkg_setup
179 + if use cluster ; then
180 + SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
181 + elif use ads ; then
182 + SHAREDMODS="idmap_ad"
183 + fi
184 +}
185 +
186 +src_prepare() {
187 + default
188 +
189 + # un-bundle dnspython
190 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
191 +
192 + # unbundle iso8601 unless tests are enabled
193 + use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
194 +
195 + # ugly hackaround for bug #592502
196 + cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
197 +
198 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
199 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
200 + || die
201 +
202 + # Friggin' WAF shit
203 + multilib_copy_sources
204 +}
205 +
206 +multilib_src_configure() {
207 + # when specifying libs for samba build you must append NONE to the end to
208 + # stop it automatically including things
209 + local bundled_libs="NONE"
210 + if ! use system-heimdal && ! use system-mitkrb5 ; then
211 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
212 + fi
213 +
214 + local myconf=(
215 + --enable-fhs
216 + --sysconfdir="${EPREFIX}/etc"
217 + --localstatedir="${EPREFIX}/var"
218 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
219 + --with-piddir="${EPREFIX}/run/${PN}"
220 + --bundled-libraries="${bundled_libs}"
221 + --builtin-libraries=NONE
222 + --disable-rpath
223 + --disable-rpath-install
224 + --nopyc
225 + --nopyo
226 + $(multilib_native_use_with acl acl-support)
227 + $(multilib_native_usex addc '' '--without-ad-dc')
228 + $(multilib_native_use_with addns dnsupdate)
229 + $(multilib_native_use_with ads)
230 + $(multilib_native_use_enable ceph cephfs)
231 + $(multilib_native_use_with cluster cluster-support)
232 + $(multilib_native_use_enable cups)
233 + $(multilib_native_use_with dmapi)
234 + $(multilib_native_use_with fam)
235 + $(multilib_native_use_with gpg gpgme)
236 + $(multilib_native_use_enable iprint)
237 + $(multilib_native_use_with pam)
238 + $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
239 + $(multilib_native_use_with quota quotas)
240 + $(multilib_native_use_with syslog)
241 + $(multilib_native_use_with systemd)
242 + $(multilib_native_use_with winbind)
243 + $(multilib_native_usex python '' '--disable-python')
244 + $(multilib_native_use_enable zeroconf avahi)
245 + $(multilib_native_usex test '--enable-selftest' '')
246 + $(usex system-mitkrb5 '--with-system-mitkrb5' '')
247 + $(use_enable gnutls)
248 + $(use_with debug lttng)
249 + $(use_with ldap)
250 + )
251 + multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} )
252 +
253 + CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
254 + waf-utils_src_configure ${myconf[@]}
255 +}
256 +
257 +multilib_src_compile() {
258 + waf-utils_src_compile
259 +}
260 +
261 +multilib_src_install() {
262 + waf-utils_src_install
263 +
264 + # Make all .so files executable
265 + find "${ED}" -type f -name "*.so" -exec chmod +x {} +
266 +
267 + if multilib_is_native_abi ; then
268 + # install ldap schema for server (bug #491002)
269 + if use ldap ; then
270 + insinto /etc/openldap/schema
271 + doins examples/LDAP/samba.schema
272 + fi
273 +
274 + # create symlink for cups (bug #552310)
275 + if use cups ; then
276 + dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
277 + fi
278 +
279 + # install example config file
280 + insinto /etc/samba
281 + doins examples/smb.conf.default
282 +
283 + # Fix paths in example file (#603964)
284 + sed \
285 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
286 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
287 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
288 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
289 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
290 + -i "${ED%/}"/etc/samba/smb.conf.default || die
291 +
292 + # Install init script and conf.d file
293 + newinitd "${CONFDIR}/samba4.initd-r1" samba
294 + newconfd "${CONFDIR}/samba4.confd" samba
295 +
296 + systemd_dotmpfilesd "${FILESDIR}"/samba.conf
297 + systemd_dounit "${FILESDIR}"/nmbd.service
298 + systemd_dounit "${FILESDIR}"/smbd.{service,socket}
299 + systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
300 + systemd_dounit "${FILESDIR}"/winbindd.service
301 + systemd_dounit "${FILESDIR}"/samba.service
302 + fi
303 +}
304 +
305 +multilib_src_test() {
306 + if multilib_is_native_abi ; then
307 + "${WAF_BINARY}" test || die "test failed"
308 + fi
309 +}
310 +
311 +pkg_postinst() {
312 + ewarn "Be aware the this release contains the best of all of Samba's"
313 + ewarn "technology parts, both a file server (that you can reasonably expect"
314 + ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
315 + ewarn "controller work previously known as 'samba4'."
316 +
317 + elog "For further information and migration steps make sure to read "
318 + elog "https://samba.org/samba/history/${P}.html "
319 + elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
320 +}