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