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