1 |
commit: 9bff52af5c52b8bf616d5816804e2edfa796700b |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Jan 31 13:11:31 2022 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 31 13:12:17 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9bff52af |
7 |
|
8 |
net-fs/samba: Bump to versions 4.14.12 and 4.15.5 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/831503 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
net-fs/samba/Manifest | 2 + |
14 |
net-fs/samba/samba-4.14.12.ebuild | 346 ++++++++++++++++++++++++++++++++++++++ |
15 |
net-fs/samba/samba-4.15.5.ebuild | 344 +++++++++++++++++++++++++++++++++++++ |
16 |
3 files changed, 692 insertions(+) |
17 |
|
18 |
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest |
19 |
index 5143c02908a9..d2f27cade860 100644 |
20 |
--- a/net-fs/samba/Manifest |
21 |
+++ b/net-fs/samba/Manifest |
22 |
@@ -1,5 +1,7 @@ |
23 |
DIST samba-4.14.10.tar.gz 19134066 BLAKE2B c6daebc7abbf2ed371ed694e4478d05875d55f7c5a9f83461932eebd7fe9089ff15e0530555d468e64f897d4cadab86e8c0acbfbd20938b3be842cb4324486e2 SHA512 0e1dd386d185cf77a2be4155646e98b3218316b5c290358684ec8eed747ffea67aa7db0937edc971fb791dc47f0f51306db33eb3b8cb65cca8787f18fd4b7f1c |
24 |
+DIST samba-4.14.12.tar.gz 19145135 BLAKE2B 94ffc6dee4448e302591bf30bc34f75c5cdeab8acaa04b2d1105a0f0155ba13d366e61f2d0b38060fccb841febcc212d8ab7b6dfd860d784ae9299a375cb98c3 SHA512 6a021d61dc2a8894c646a9b6d85e38c9020b3c227f10d1820cbdf2ad6793c0beeacedd5fff5f75718d4083ec9169cb1fb58f65636e1a50e638fcefce355690d9 |
25 |
DIST samba-4.15.2.tar.gz 19252338 BLAKE2B aded33cbefce69c9b20148de1be224514de5cc825404e8188fb0a96022d0fdc6595256f74a5e295fd2e1062e8520775b6c59c1d6a7bf80a52ed9fa9db412dcdd SHA512 6fdf9db0da90332afe527703066cca4ec5b0ec6bf6a5979443953f9fbc18b870a7e2445a41c9ae3d63f7738c9c0282e7ca82f6066aa68e151eec248615ea7b21 |
26 |
DIST samba-4.15.3.tar.gz 19272345 BLAKE2B ada18904ee7889209488f022daacc34ce1f41c12f9c8c48515cc24aa158072da499cc6ec484cf2b9108c6b2d4074ad734d1850063a354000aa90091faba6f7a6 SHA512 1c30cfa6cd927f4d822dd7227b89542d05d7ab4e50c2d9717eea4fcf1af5120b55d66ec628acd5c887e9bffc732c1d37ab084db953534a2b3987531b10fef63c |
27 |
DIST samba-4.15.4.tar.gz 19280813 BLAKE2B 3106f2f265263e871fe3f82d3eecaac2e5f642925ff5dd2a9d163092fd13e9348a3910e40431d51cb94a1abeb3b9c32c487ce1f8caebe59a8d6d90641b4d9201 SHA512 e55473dd4971816a01880870309ca44f022625cd529511bcf386c865a2e7e79118577ee4866559f607952de47dc0d310d6426bd08dd4293db95ddbbe3982383d |
28 |
+DIST samba-4.15.5.tar.gz 19279071 BLAKE2B 355970b9918e95f925636cdea919e123b072f8710134fe6310637c29b2b5e1bc55d7b66d9674a68408ce5f14545a2cb9a94f596f90204935addb2f8f6a503873 SHA512 808e0f15931bab18a1e36298528a01a1250efaef9f99508dd620d6936dd4a2fc3ccc64ab9dcc94bd73460697d16d6ca0652ccbcdbe1644ffedce0137d796d3ca |
29 |
DIST samba-4.16.0rc1.tar.gz 30490862 BLAKE2B 7031266abcffbd23536bc4ec3fa606f4eb270b8a7d8d293d417993e096fe81770378b7ed5a0b15444860562dc22f53c994178d65e613a057d8b5fe9c0d3bb7d3 SHA512 48bdc4f17116b29a30c2f146ca11617af1149559e96f009e70597c93a53f734e6f719fb7a04726ce5bb6f912cf07c224518c2a8076bc1d4bceba4f6787d032d8 |
30 |
|
31 |
diff --git a/net-fs/samba/samba-4.14.12.ebuild b/net-fs/samba/samba-4.14.12.ebuild |
32 |
new file mode 100644 |
33 |
index 000000000000..7d4245f87268 |
34 |
--- /dev/null |
35 |
+++ b/net-fs/samba/samba-4.14.12.ebuild |
36 |
@@ -0,0 +1,346 @@ |
37 |
+# Copyright 1999-2022 Gentoo Authors |
38 |
+# Distributed under the terms of the GNU General Public License v2 |
39 |
+ |
40 |
+EAPI=7 |
41 |
+ |
42 |
+PYTHON_COMPAT=( python3_{8..9} ) |
43 |
+PYTHON_REQ_USE="threads(+),xml(+)" |
44 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles |
45 |
+ |
46 |
+DESCRIPTION="Samba Suite Version 4" |
47 |
+HOMEPAGE="https://samba.org/" |
48 |
+ |
49 |
+MY_PV="${PV/_rc/rc}" |
50 |
+MY_P="${PN}-${MY_PV}" |
51 |
+if [[ ${PV} = *_rc* ]]; then |
52 |
+ SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" |
53 |
+else |
54 |
+ SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" |
55 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
56 |
+fi |
57 |
+S="${WORKDIR}/${MY_P}" |
58 |
+ |
59 |
+LICENSE="GPL-3" |
60 |
+SLOT="0" |
61 |
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam glusterfs |
62 |
+gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux |
63 |
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind |
64 |
+zeroconf" |
65 |
+ |
66 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
67 |
+ addc? ( python json winbind ) |
68 |
+ addns? ( python ) |
69 |
+ ads? ( acl ldap winbind ) |
70 |
+ cluster? ( ads ) |
71 |
+ gpg? ( addc ) |
72 |
+ ntvfs? ( addc ) |
73 |
+ spotlight? ( json ) |
74 |
+ test? ( python ) |
75 |
+ !ads? ( !addc ) |
76 |
+ ?? ( system-heimdal system-mitkrb5 ) |
77 |
+" |
78 |
+ |
79 |
+# the test suite is messed, it uses system-installed samba |
80 |
+# bits instead of what was built, tests things disabled via use |
81 |
+# flags, and generally just fails to work in a way ebuilds could |
82 |
+# rely on in its current state |
83 |
+RESTRICT="test" |
84 |
+ |
85 |
+MULTILIB_WRAPPED_HEADERS=( |
86 |
+ /usr/include/samba-4.0/policy.h |
87 |
+ /usr/include/samba-4.0/dcerpc_server.h |
88 |
+ /usr/include/samba-4.0/ctdb.h |
89 |
+ /usr/include/samba-4.0/ctdb_client.h |
90 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
91 |
+ /usr/include/samba-4.0/ctdb_private.h |
92 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
93 |
+ /usr/include/samba-4.0/ctdb_version.h |
94 |
+) |
95 |
+ |
96 |
+COMMON_DEPEND=" |
97 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
98 |
+ dev-lang/perl:= |
99 |
+ dev-libs/icu:=[${MULTILIB_USEDEP}] |
100 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
101 |
+ dev-libs/libtasn1[${MULTILIB_USEDEP}] |
102 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
103 |
+ dev-perl/Parse-Yapp |
104 |
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] |
105 |
+ net-libs/libnsl:=[${MULTILIB_USEDEP}] |
106 |
+ || ( |
107 |
+ >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] |
108 |
+ sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}] |
109 |
+ ) |
110 |
+ >=sys-libs/ldb-2.3.2[ldap(+)?,${MULTILIB_USEDEP}] |
111 |
+ <sys-libs/ldb-2.4.0[ldap(+)?,${MULTILIB_USEDEP}] |
112 |
+ sys-libs/libcap[${MULTILIB_USEDEP}] |
113 |
+ sys-libs/liburing:=[${MULTILIB_USEDEP}] |
114 |
+ sys-libs/ncurses:0= |
115 |
+ sys-libs/readline:0= |
116 |
+ >=sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}] |
117 |
+ >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}] |
118 |
+ >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}] |
119 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
120 |
+ virtual/libcrypt:=[${MULTILIB_USEDEP}] |
121 |
+ virtual/libiconv |
122 |
+ $(python_gen_cond_dep " |
123 |
+ addc? ( |
124 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
125 |
+ dev-python/markdown[\${PYTHON_USEDEP}] |
126 |
+ ) |
127 |
+ addns? ( |
128 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
129 |
+ net-dns/bind-tools[gssapi] |
130 |
+ ) |
131 |
+ ") |
132 |
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) |
133 |
+ acl? ( virtual/acl ) |
134 |
+ ceph? ( sys-cluster/ceph ) |
135 |
+ cluster? ( net-libs/rpcsvc-proto ) |
136 |
+ cups? ( net-print/cups ) |
137 |
+ debug? ( dev-util/lttng-ust ) |
138 |
+ dmapi? ( sys-apps/dmapi ) |
139 |
+ fam? ( virtual/fam ) |
140 |
+ gpg? ( app-crypt/gpgme ) |
141 |
+ json? ( dev-libs/jansson:= ) |
142 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
143 |
+ pam? ( sys-libs/pam ) |
144 |
+ python? ( |
145 |
+ sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] |
146 |
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] |
147 |
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] |
148 |
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] |
149 |
+ ) |
150 |
+ snapper? ( sys-apps/dbus ) |
151 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
152 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
153 |
+ systemd? ( sys-apps/systemd:0= ) |
154 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
155 |
+" |
156 |
+DEPEND="${COMMON_DEPEND} |
157 |
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] |
158 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
159 |
+ || ( |
160 |
+ net-libs/rpcsvc-proto |
161 |
+ <sys-libs/glibc-2.26[rpc(+)] |
162 |
+ ) |
163 |
+ spotlight? ( dev-libs/glib ) |
164 |
+ test? ( |
165 |
+ $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" ) |
166 |
+ !system-mitkrb5? ( |
167 |
+ >=net-dns/resolv_wrapper-1.1.4 |
168 |
+ >=net-libs/socket_wrapper-1.1.9 |
169 |
+ >=sys-libs/nss_wrapper-1.1.3 |
170 |
+ >=sys-libs/uid_wrapper-1.2.1 |
171 |
+ ) |
172 |
+ )" |
173 |
+RDEPEND="${COMMON_DEPEND} |
174 |
+ client? ( net-fs/cifs-utils[ads?] ) |
175 |
+ python? ( ${PYTHON_DEPS} ) |
176 |
+ selinux? ( sec-policy/selinux-samba ) |
177 |
+" |
178 |
+BDEPEND="${PYTHON_DEPS} |
179 |
+ app-text/docbook-xsl-stylesheets |
180 |
+ dev-libs/libxslt |
181 |
+ virtual/pkgconfig |
182 |
+" |
183 |
+ |
184 |
+PATCHES=( |
185 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
186 |
+) |
187 |
+ |
188 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
189 |
+CONFDIR="${FILESDIR}/4.4" |
190 |
+ |
191 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
192 |
+ |
193 |
+SHAREDMODS="" |
194 |
+ |
195 |
+pkg_setup() { |
196 |
+ # Package fails to build with distcc |
197 |
+ export DISTCC_DISABLE=1 |
198 |
+ |
199 |
+ python-single-r1_pkg_setup |
200 |
+ |
201 |
+ SHAREDMODS="$(usex snapper '' '!')vfs_snapper" |
202 |
+ if use cluster ; then |
203 |
+ SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad" |
204 |
+ elif use ads ; then |
205 |
+ SHAREDMODS+=",idmap_ad" |
206 |
+ fi |
207 |
+} |
208 |
+ |
209 |
+src_prepare() { |
210 |
+ default |
211 |
+ |
212 |
+ # un-bundle dnspython |
213 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
214 |
+ |
215 |
+ # unbundle iso8601 unless tests are enabled |
216 |
+ if ! use test ; then |
217 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
218 |
+ fi |
219 |
+ |
220 |
+ ## ugly hackaround for bug #592502 |
221 |
+ #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
222 |
+ |
223 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
224 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
225 |
+ || die |
226 |
+ |
227 |
+ # Friggin' WAF shit |
228 |
+ multilib_copy_sources |
229 |
+} |
230 |
+ |
231 |
+multilib_src_configure() { |
232 |
+ # when specifying libs for samba build you must append NONE to the end to |
233 |
+ # stop it automatically including things |
234 |
+ local bundled_libs="NONE" |
235 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
236 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
237 |
+ fi |
238 |
+ |
239 |
+ local myconf=( |
240 |
+ --enable-fhs |
241 |
+ --sysconfdir="${EPREFIX}/etc" |
242 |
+ --localstatedir="${EPREFIX}/var" |
243 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
244 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
245 |
+ --bundled-libraries="${bundled_libs}" |
246 |
+ --builtin-libraries=NONE |
247 |
+ --disable-rpath |
248 |
+ --disable-rpath-install |
249 |
+ --nopyc |
250 |
+ --nopyo |
251 |
+ --without-winexe |
252 |
+ $(multilib_native_use_with acl acl-support) |
253 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
254 |
+ $(multilib_native_use_with addns dnsupdate) |
255 |
+ $(multilib_native_use_with ads) |
256 |
+ $(multilib_native_use_enable ceph cephfs) |
257 |
+ $(multilib_native_use_with cluster cluster-support) |
258 |
+ $(multilib_native_use_enable cups) |
259 |
+ $(multilib_native_use_with dmapi) |
260 |
+ $(multilib_native_use_with fam) |
261 |
+ $(multilib_native_use_enable glusterfs) |
262 |
+ $(multilib_native_use_with gpg gpgme) |
263 |
+ $(multilib_native_use_with json) |
264 |
+ $(multilib_native_use_enable iprint) |
265 |
+ $(multilib_native_use_with ntvfs ntvfs-fileserver) |
266 |
+ $(multilib_native_use_with pam) |
267 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
268 |
+ $(multilib_native_use_with quota quotas) |
269 |
+ $(multilib_native_use_with regedit) |
270 |
+ $(multilib_native_use_enable spotlight) |
271 |
+ $(multilib_native_use_with syslog) |
272 |
+ $(multilib_native_use_with systemd) |
273 |
+ --systemd-install-services |
274 |
+ --with-systemddir="$(systemd_get_systemunitdir)" |
275 |
+ $(multilib_native_use_with winbind) |
276 |
+ $(multilib_native_usex python '' '--disable-python') |
277 |
+ $(multilib_native_use_enable zeroconf avahi) |
278 |
+ $(multilib_native_usex test '--enable-selftest' '') |
279 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
280 |
+ $(use_with debug lttng) |
281 |
+ $(use_with ldap) |
282 |
+ $(use_with profiling-data) |
283 |
+ # bug #683148 |
284 |
+ --jobs 1 |
285 |
+ ) |
286 |
+ |
287 |
+ if multilib_is_native_abi ; then |
288 |
+ myconf+=( --with-shared-modules=${SHAREDMODS} ) |
289 |
+ else |
290 |
+ myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) |
291 |
+ fi |
292 |
+ |
293 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
294 |
+ waf-utils_src_configure ${myconf[@]} |
295 |
+} |
296 |
+ |
297 |
+multilib_src_compile() { |
298 |
+ waf-utils_src_compile |
299 |
+} |
300 |
+ |
301 |
+multilib_src_install() { |
302 |
+ waf-utils_src_install |
303 |
+ |
304 |
+ # Make all .so files executable |
305 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
306 |
+ |
307 |
+ if multilib_is_native_abi ; then |
308 |
+ # install ldap schema for server (bug #491002) |
309 |
+ if use ldap ; then |
310 |
+ insinto /etc/openldap/schema |
311 |
+ doins examples/LDAP/samba.schema |
312 |
+ fi |
313 |
+ |
314 |
+ # create symlink for cups (bug #552310) |
315 |
+ if use cups ; then |
316 |
+ dosym ../../../bin/smbspool \ |
317 |
+ /usr/libexec/cups/backend/smb |
318 |
+ fi |
319 |
+ |
320 |
+ # install example config file |
321 |
+ insinto /etc/samba |
322 |
+ doins examples/smb.conf.default |
323 |
+ |
324 |
+ # Fix paths in example file (#603964) |
325 |
+ sed \ |
326 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
327 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
328 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
329 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
330 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
331 |
+ -i "${ED}"/etc/samba/smb.conf.default || die |
332 |
+ |
333 |
+ # Install init script and conf.d file |
334 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
335 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
336 |
+ |
337 |
+ dotmpfiles "${FILESDIR}"/samba.conf |
338 |
+ if ! use addc ; then |
339 |
+ rm "${D}/$(systemd_get_systemunitdir)/samba.service" \ |
340 |
+ || die |
341 |
+ fi |
342 |
+ |
343 |
+ # Preserve functionality for old gentoo-specific unit names |
344 |
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" |
345 |
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" |
346 |
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" |
347 |
+ fi |
348 |
+ |
349 |
+ if use pam && use winbind ; then |
350 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
351 |
+ # bugs #376853 and #590374 |
352 |
+ insinto /etc/security |
353 |
+ doins examples/pam_winbind/pam_winbind.conf |
354 |
+ fi |
355 |
+ |
356 |
+ keepdir /var/cache/samba |
357 |
+ keepdir /var/lib/ctdb |
358 |
+ keepdir /var/lib/samba/{bind-dns,private} |
359 |
+ keepdir /var/lock/samba |
360 |
+ keepdir /var/log/samba |
361 |
+} |
362 |
+ |
363 |
+multilib_src_test() { |
364 |
+ if multilib_is_native_abi ; then |
365 |
+ "${WAF_BINARY}" test || die "test failed" |
366 |
+ fi |
367 |
+} |
368 |
+ |
369 |
+pkg_postinst() { |
370 |
+ tmpfiles_process samba.conf |
371 |
+ |
372 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
373 |
+ elog "Be aware that this release contains the best of all of Samba's" |
374 |
+ elog "technology parts, both a file server (that you can reasonably expect" |
375 |
+ elog "to upgrade existing Samba 3.x releases to) and the AD domain" |
376 |
+ elog "controller work previously known as 'samba4'." |
377 |
+ elog |
378 |
+ fi |
379 |
+ elog "For further information and migration steps make sure to read " |
380 |
+ elog "https://samba.org/samba/history/${P}.html " |
381 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
382 |
+} |
383 |
|
384 |
diff --git a/net-fs/samba/samba-4.15.5.ebuild b/net-fs/samba/samba-4.15.5.ebuild |
385 |
new file mode 100644 |
386 |
index 000000000000..189af1340a9c |
387 |
--- /dev/null |
388 |
+++ b/net-fs/samba/samba-4.15.5.ebuild |
389 |
@@ -0,0 +1,344 @@ |
390 |
+# Copyright 1999-2022 Gentoo Authors |
391 |
+# Distributed under the terms of the GNU General Public License v2 |
392 |
+ |
393 |
+EAPI=7 |
394 |
+ |
395 |
+PYTHON_COMPAT=( python3_{8..10} ) |
396 |
+PYTHON_REQ_USE="threads(+),xml(+)" |
397 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles |
398 |
+ |
399 |
+DESCRIPTION="Samba Suite Version 4" |
400 |
+HOMEPAGE="https://samba.org/" |
401 |
+ |
402 |
+MY_PV="${PV/_rc/rc}" |
403 |
+MY_P="${PN}-${MY_PV}" |
404 |
+if [[ ${PV} = *_rc* ]]; then |
405 |
+ SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" |
406 |
+else |
407 |
+ SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" |
408 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
409 |
+fi |
410 |
+S="${WORKDIR}/${MY_P}" |
411 |
+ |
412 |
+LICENSE="GPL-3" |
413 |
+SLOT="0" |
414 |
+IUSE="acl addc ads ceph client cluster cpu_flags_x86_aes cups debug dmapi fam |
415 |
+glusterfs gpg iprint json ldap pam profiling-data python quota +regedit selinux |
416 |
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind |
417 |
+zeroconf" |
418 |
+ |
419 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
420 |
+ addc? ( python json winbind ) |
421 |
+ ads? ( acl ldap python winbind ) |
422 |
+ cluster? ( ads ) |
423 |
+ gpg? ( addc ) |
424 |
+ spotlight? ( json ) |
425 |
+ test? ( python ) |
426 |
+ !ads? ( !addc ) |
427 |
+ ?? ( system-heimdal system-mitkrb5 ) |
428 |
+" |
429 |
+ |
430 |
+# the test suite is messed, it uses system-installed samba |
431 |
+# bits instead of what was built, tests things disabled via use |
432 |
+# flags, and generally just fails to work in a way ebuilds could |
433 |
+# rely on in its current state |
434 |
+RESTRICT="test" |
435 |
+ |
436 |
+MULTILIB_WRAPPED_HEADERS=( |
437 |
+ /usr/include/samba-4.0/policy.h |
438 |
+ /usr/include/samba-4.0/dcerpc_server.h |
439 |
+ /usr/include/samba-4.0/ctdb.h |
440 |
+ /usr/include/samba-4.0/ctdb_client.h |
441 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
442 |
+ /usr/include/samba-4.0/ctdb_private.h |
443 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
444 |
+ /usr/include/samba-4.0/ctdb_version.h |
445 |
+) |
446 |
+ |
447 |
+COMMON_DEPEND=" |
448 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
449 |
+ dev-lang/perl:= |
450 |
+ dev-libs/icu:=[${MULTILIB_USEDEP}] |
451 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
452 |
+ dev-libs/libtasn1[${MULTILIB_USEDEP}] |
453 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
454 |
+ dev-perl/Parse-Yapp |
455 |
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] |
456 |
+ || ( |
457 |
+ >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] |
458 |
+ sys-libs/e2fsprogs-libs[${MULTILIB_USEDEP}] |
459 |
+ ) |
460 |
+ >=sys-libs/ldb-2.4.1[ldap(+)?,${MULTILIB_USEDEP}] |
461 |
+ <sys-libs/ldb-2.5.0[ldap(+)?,${MULTILIB_USEDEP}] |
462 |
+ sys-libs/libcap[${MULTILIB_USEDEP}] |
463 |
+ sys-libs/liburing:=[${MULTILIB_USEDEP}] |
464 |
+ sys-libs/ncurses:0= |
465 |
+ sys-libs/readline:0= |
466 |
+ >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}] |
467 |
+ >=sys-libs/tdb-1.4.4[${MULTILIB_USEDEP}] |
468 |
+ >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}] |
469 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
470 |
+ virtual/libcrypt:=[${MULTILIB_USEDEP}] |
471 |
+ virtual/libiconv |
472 |
+ $(python_gen_cond_dep " |
473 |
+ addc? ( |
474 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
475 |
+ dev-python/markdown[\${PYTHON_USEDEP}] |
476 |
+ ) |
477 |
+ ads? ( |
478 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
479 |
+ net-dns/bind-tools[gssapi] |
480 |
+ ) |
481 |
+ ") |
482 |
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) |
483 |
+ acl? ( virtual/acl ) |
484 |
+ ceph? ( sys-cluster/ceph ) |
485 |
+ cluster? ( net-libs/rpcsvc-proto ) |
486 |
+ cups? ( net-print/cups ) |
487 |
+ debug? ( dev-util/lttng-ust ) |
488 |
+ dmapi? ( sys-apps/dmapi ) |
489 |
+ fam? ( virtual/fam ) |
490 |
+ gpg? ( app-crypt/gpgme ) |
491 |
+ json? ( dev-libs/jansson:= ) |
492 |
+ ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) |
493 |
+ pam? ( sys-libs/pam ) |
494 |
+ python? ( |
495 |
+ sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] |
496 |
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] |
497 |
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] |
498 |
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] |
499 |
+ ) |
500 |
+ snapper? ( sys-apps/dbus ) |
501 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
502 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
503 |
+ systemd? ( sys-apps/systemd:0= ) |
504 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
505 |
+" |
506 |
+DEPEND="${COMMON_DEPEND} |
507 |
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] |
508 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
509 |
+ || ( |
510 |
+ net-libs/rpcsvc-proto |
511 |
+ <sys-libs/glibc-2.26[rpc(+)] |
512 |
+ ) |
513 |
+ spotlight? ( dev-libs/glib ) |
514 |
+ test? ( |
515 |
+ $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" ) |
516 |
+ !system-mitkrb5? ( |
517 |
+ >=net-dns/resolv_wrapper-1.1.4 |
518 |
+ >=net-libs/socket_wrapper-1.1.9 |
519 |
+ >=sys-libs/nss_wrapper-1.1.3 |
520 |
+ >=sys-libs/uid_wrapper-1.2.1 |
521 |
+ ) |
522 |
+ )" |
523 |
+RDEPEND="${COMMON_DEPEND} |
524 |
+ client? ( net-fs/cifs-utils[ads?] ) |
525 |
+ python? ( ${PYTHON_DEPS} ) |
526 |
+ selinux? ( sec-policy/selinux-samba ) |
527 |
+" |
528 |
+BDEPEND="${PYTHON_DEPS} |
529 |
+ app-text/docbook-xsl-stylesheets |
530 |
+ dev-libs/libxslt |
531 |
+ virtual/pkgconfig |
532 |
+" |
533 |
+ |
534 |
+PATCHES=( |
535 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
536 |
+) |
537 |
+ |
538 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
539 |
+CONFDIR="${FILESDIR}/4.4" |
540 |
+ |
541 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
542 |
+ |
543 |
+SHAREDMODS="" |
544 |
+ |
545 |
+pkg_setup() { |
546 |
+ # Package fails to build with distcc |
547 |
+ export DISTCC_DISABLE=1 |
548 |
+ |
549 |
+ python-single-r1_pkg_setup |
550 |
+ |
551 |
+ SHAREDMODS="$(usex snapper '' '!')vfs_snapper" |
552 |
+ if use cluster ; then |
553 |
+ SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad" |
554 |
+ elif use ads ; then |
555 |
+ SHAREDMODS+=",idmap_ad" |
556 |
+ fi |
557 |
+} |
558 |
+ |
559 |
+src_prepare() { |
560 |
+ default |
561 |
+ |
562 |
+ # un-bundle dnspython |
563 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
564 |
+ |
565 |
+ # unbundle iso8601 unless tests are enabled |
566 |
+ if ! use test ; then |
567 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
568 |
+ fi |
569 |
+ |
570 |
+ ## ugly hackaround for bug #592502 |
571 |
+ #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
572 |
+ |
573 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
574 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
575 |
+ || die |
576 |
+ |
577 |
+ # Friggin' WAF shit |
578 |
+ multilib_copy_sources |
579 |
+} |
580 |
+ |
581 |
+multilib_src_configure() { |
582 |
+ # when specifying libs for samba build you must append NONE to the end to |
583 |
+ # stop it automatically including things |
584 |
+ local bundled_libs="NONE" |
585 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
586 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
587 |
+ fi |
588 |
+ |
589 |
+ local myconf=( |
590 |
+ --enable-fhs |
591 |
+ --sysconfdir="${EPREFIX}/etc" |
592 |
+ --localstatedir="${EPREFIX}/var" |
593 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
594 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
595 |
+ --bundled-libraries="${bundled_libs}" |
596 |
+ --builtin-libraries=NONE |
597 |
+ --disable-rpath |
598 |
+ --disable-rpath-install |
599 |
+ --nopyc |
600 |
+ --nopyo |
601 |
+ --without-winexe |
602 |
+ --accel-aes=$(usex cpu_flags_x86_aes intelaesni none) |
603 |
+ $(multilib_native_use_with acl acl-support) |
604 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
605 |
+ $(multilib_native_use_with ads) |
606 |
+ $(multilib_native_use_enable ceph cephfs) |
607 |
+ $(multilib_native_use_with cluster cluster-support) |
608 |
+ $(multilib_native_use_enable cups) |
609 |
+ $(multilib_native_use_with dmapi) |
610 |
+ $(multilib_native_use_with fam) |
611 |
+ $(multilib_native_use_enable glusterfs) |
612 |
+ $(multilib_native_use_with gpg gpgme) |
613 |
+ $(multilib_native_use_with json) |
614 |
+ $(multilib_native_use_enable iprint) |
615 |
+ $(multilib_native_use_with pam) |
616 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
617 |
+ $(multilib_native_use_with quota quotas) |
618 |
+ $(multilib_native_use_with regedit) |
619 |
+ $(multilib_native_use_enable spotlight) |
620 |
+ $(multilib_native_use_with syslog) |
621 |
+ $(multilib_native_use_with systemd) |
622 |
+ --systemd-install-services |
623 |
+ --with-systemddir="$(systemd_get_systemunitdir)" |
624 |
+ $(multilib_native_use_with winbind) |
625 |
+ $(multilib_native_usex python '' '--disable-python') |
626 |
+ $(multilib_native_use_enable zeroconf avahi) |
627 |
+ $(multilib_native_usex test '--enable-selftest' '') |
628 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
629 |
+ $(use_with debug lttng) |
630 |
+ $(use_with ldap) |
631 |
+ $(use_with profiling-data) |
632 |
+ # bug #683148 |
633 |
+ --jobs 1 |
634 |
+ ) |
635 |
+ |
636 |
+ if multilib_is_native_abi ; then |
637 |
+ myconf+=( --with-shared-modules=${SHAREDMODS} ) |
638 |
+ else |
639 |
+ myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) |
640 |
+ fi |
641 |
+ |
642 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
643 |
+ waf-utils_src_configure ${myconf[@]} |
644 |
+} |
645 |
+ |
646 |
+multilib_src_compile() { |
647 |
+ waf-utils_src_compile |
648 |
+} |
649 |
+ |
650 |
+multilib_src_install() { |
651 |
+ waf-utils_src_install |
652 |
+ |
653 |
+ # Make all .so files executable |
654 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
655 |
+ |
656 |
+ if multilib_is_native_abi ; then |
657 |
+ # install ldap schema for server (bug #491002) |
658 |
+ if use ldap ; then |
659 |
+ insinto /etc/openldap/schema |
660 |
+ doins examples/LDAP/samba.schema |
661 |
+ fi |
662 |
+ |
663 |
+ # create symlink for cups (bug #552310) |
664 |
+ if use cups ; then |
665 |
+ dosym ../../../bin/smbspool \ |
666 |
+ /usr/libexec/cups/backend/smb |
667 |
+ fi |
668 |
+ |
669 |
+ # install example config file |
670 |
+ insinto /etc/samba |
671 |
+ doins examples/smb.conf.default |
672 |
+ |
673 |
+ # Fix paths in example file (#603964) |
674 |
+ sed \ |
675 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
676 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
677 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
678 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
679 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
680 |
+ -i "${ED}"/etc/samba/smb.conf.default || die |
681 |
+ |
682 |
+ # Install init script and conf.d file |
683 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
684 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
685 |
+ |
686 |
+ dotmpfiles "${FILESDIR}"/samba.conf |
687 |
+ if ! use addc ; then |
688 |
+ rm "${D}/$(systemd_get_systemunitdir)/samba.service" \ |
689 |
+ || die |
690 |
+ fi |
691 |
+ |
692 |
+ # Preserve functionality for old gentoo-specific unit names |
693 |
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" |
694 |
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" |
695 |
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" |
696 |
+ fi |
697 |
+ |
698 |
+ if use pam && use winbind ; then |
699 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
700 |
+ # bugs #376853 and #590374 |
701 |
+ insinto /etc/security |
702 |
+ doins examples/pam_winbind/pam_winbind.conf |
703 |
+ fi |
704 |
+ |
705 |
+ keepdir /var/cache/samba |
706 |
+ keepdir /var/lib/ctdb |
707 |
+ keepdir /var/lib/samba/{bind-dns,private} |
708 |
+ keepdir /var/lock/samba |
709 |
+ keepdir /var/log/samba |
710 |
+} |
711 |
+ |
712 |
+multilib_src_test() { |
713 |
+ if multilib_is_native_abi ; then |
714 |
+ "${WAF_BINARY}" test || die "test failed" |
715 |
+ fi |
716 |
+} |
717 |
+ |
718 |
+pkg_postinst() { |
719 |
+ tmpfiles_process samba.conf |
720 |
+ |
721 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
722 |
+ elog "Be aware that this release contains the best of all of Samba's" |
723 |
+ elog "technology parts, both a file server (that you can reasonably expect" |
724 |
+ elog "to upgrade existing Samba 3.x releases to) and the AD domain" |
725 |
+ elog "controller work previously known as 'samba4'." |
726 |
+ elog |
727 |
+ fi |
728 |
+ if [[ "${PV}" != *_rc* ]] ; then |
729 |
+ elog "For further information and migration steps make sure to read " |
730 |
+ elog "https://samba.org/samba/history/${P}.html " |
731 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
732 |
+ fi |
733 |
+} |