1 |
commit: 697ee04fffff6b4bf8ff12d1eeb5b5b5b7a15987 |
2 |
Author: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue May 3 09:53:47 2022 +0000 |
4 |
Commit: Lars Wendler <polynomial-c <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue May 3 09:58:13 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=697ee04f |
7 |
|
8 |
net-fs/samba: Bump to versions 4.14.13, 4.15.7 and 4.16.1 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/840407 |
11 |
Signed-off-by: Lars Wendler <polynomial-c <AT> gentoo.org> |
12 |
|
13 |
net-fs/samba/Manifest | 3 + |
14 |
net-fs/samba/samba-4.14.13.ebuild | 342 ++++++++++++++++++++++++++++++++++++++ |
15 |
net-fs/samba/samba-4.15.7.ebuild | 340 +++++++++++++++++++++++++++++++++++++ |
16 |
net-fs/samba/samba-4.16.1.ebuild | 341 +++++++++++++++++++++++++++++++++++++ |
17 |
4 files changed, 1026 insertions(+) |
18 |
|
19 |
diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest |
20 |
index d9ea8d343c84..77cdca4e0bcc 100644 |
21 |
--- a/net-fs/samba/Manifest |
22 |
+++ b/net-fs/samba/Manifest |
23 |
@@ -1,5 +1,8 @@ |
24 |
DIST samba-4.14.12.tar.gz 19145135 BLAKE2B 94ffc6dee4448e302591bf30bc34f75c5cdeab8acaa04b2d1105a0f0155ba13d366e61f2d0b38060fccb841febcc212d8ab7b6dfd860d784ae9299a375cb98c3 SHA512 6a021d61dc2a8894c646a9b6d85e38c9020b3c227f10d1820cbdf2ad6793c0beeacedd5fff5f75718d4083ec9169cb1fb58f65636e1a50e638fcefce355690d9 |
25 |
+DIST samba-4.14.13.tar.gz 19161242 BLAKE2B 068d17872536edcc0de400ee925723a9a55022dd43fd5309562cf65a92d992011f9963b4009170405394b724eafab4760c689d571884b164a63661a99b42ec4c SHA512 477a94a2b9d9eeff21055c7601f3539e9ff01ab536320c303ac9a6578d5e7f09f46e7f4f5a971594e11ad19fe9a566f209d201cc32b78c164b885c1c4d591b9b |
26 |
DIST samba-4.15.4.tar.gz 19280813 BLAKE2B 3106f2f265263e871fe3f82d3eecaac2e5f642925ff5dd2a9d163092fd13e9348a3910e40431d51cb94a1abeb3b9c32c487ce1f8caebe59a8d6d90641b4d9201 SHA512 e55473dd4971816a01880870309ca44f022625cd529511bcf386c865a2e7e79118577ee4866559f607952de47dc0d310d6426bd08dd4293db95ddbbe3982383d |
27 |
DIST samba-4.15.5.tar.gz 19279071 BLAKE2B 355970b9918e95f925636cdea919e123b072f8710134fe6310637c29b2b5e1bc55d7b66d9674a68408ce5f14545a2cb9a94f596f90204935addb2f8f6a503873 SHA512 808e0f15931bab18a1e36298528a01a1250efaef9f99508dd620d6936dd4a2fc3ccc64ab9dcc94bd73460697d16d6ca0652ccbcdbe1644ffedce0137d796d3ca |
28 |
DIST samba-4.15.6.tar.gz 19290189 BLAKE2B 14a8d3cf03de303cce54e5b336f5866f5d3dedbcc435827791929a6722797111a4ae6b9720f64cca18803a4edb0dc3590657f680686613cf9a32dc552db41180 SHA512 cd193d74173831449abc24f1769f0af2dabd5dd8a65507af7b09fde6dd5780d30336d59600add939b044cfa5781f357ec9192c7fed1a1e7278812b6c07b824e2 |
29 |
+DIST samba-4.15.7.tar.gz 19290930 BLAKE2B 4a295f79d38212d4c6917ed61a22e4204b5ea3d5e26f30b65d1e7e81842e92405870dd40fd4d05ec1126a532bdb1ddea300848387a4c64370ba5c2c1354ee8e5 SHA512 beffb09b5bcd62991398d39c7a8aec5fed0c51d550e2f0fb42b2e0a09094f4c6a8f29adf708c4969db12329f5c7343d2debd04315107b79bef59e99a4a7e4ce4 |
30 |
DIST samba-4.16.0.tar.gz 30583390 BLAKE2B 6ea27634690d00779ec7f671e48b17246285c9576221d9b9b3f9238cd72310e8aaaeb646031212e65c239d2e959deef7bd9739932db0c716b7ea79cc11f2f7b8 SHA512 cea6bab64021779d217669e58612d192b907c2c481ef30e40e449bc6b8f8993a9b7b7b5bfcfebe54d8f70b8f720893cfa77a9d674ef8e07dd45a55a0fbc673e2 |
31 |
+DIST samba-4.16.1.tar.gz 30590897 BLAKE2B 4e22b1a8bbef28116cad71c87da1aaaa39459d5eeb30e975aec6444369576ce716917d3ee89c0b328e457e2dcda17abe705d1f33d12b4205efcebdc54ba7f2fd SHA512 d82ab250e87cb64b083345b61da8c4edbb2185a13f8cef33232f823fd510822570ed27c7b260a1fefd3af3b2fc4b271257c2c3e6ab3241c8c147bebae6ab39fc |
32 |
|
33 |
diff --git a/net-fs/samba/samba-4.14.13.ebuild b/net-fs/samba/samba-4.14.13.ebuild |
34 |
new file mode 100644 |
35 |
index 000000000000..0b80891930e8 |
36 |
--- /dev/null |
37 |
+++ b/net-fs/samba/samba-4.14.13.ebuild |
38 |
@@ -0,0 +1,342 @@ |
39 |
+# Copyright 1999-2022 Gentoo Authors |
40 |
+# Distributed under the terms of the GNU General Public License v2 |
41 |
+ |
42 |
+EAPI=7 |
43 |
+ |
44 |
+PYTHON_COMPAT=( python3_{8..10} ) |
45 |
+PYTHON_REQ_USE="threads(+),xml(+)" |
46 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles |
47 |
+ |
48 |
+DESCRIPTION="Samba Suite Version 4" |
49 |
+HOMEPAGE="https://samba.org/" |
50 |
+ |
51 |
+MY_PV="${PV/_rc/rc}" |
52 |
+MY_P="${PN}-${MY_PV}" |
53 |
+if [[ ${PV} = *_rc* ]]; then |
54 |
+ SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" |
55 |
+else |
56 |
+ SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" |
57 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
58 |
+fi |
59 |
+S="${WORKDIR}/${MY_P}" |
60 |
+ |
61 |
+LICENSE="GPL-3" |
62 |
+SLOT="0" |
63 |
+IUSE="acl addc addns ads ceph client cluster cups debug fam glusterfs |
64 |
+gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux |
65 |
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind |
66 |
+zeroconf" |
67 |
+ |
68 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
69 |
+ addc? ( python json winbind ) |
70 |
+ addns? ( python ) |
71 |
+ ads? ( acl ldap winbind ) |
72 |
+ cluster? ( ads ) |
73 |
+ gpg? ( addc ) |
74 |
+ ntvfs? ( addc ) |
75 |
+ spotlight? ( json ) |
76 |
+ test? ( python ) |
77 |
+ !ads? ( !addc ) |
78 |
+ ?? ( system-heimdal system-mitkrb5 ) |
79 |
+" |
80 |
+ |
81 |
+# the test suite is messed, it uses system-installed samba |
82 |
+# bits instead of what was built, tests things disabled via use |
83 |
+# flags, and generally just fails to work in a way ebuilds could |
84 |
+# rely on in its current state |
85 |
+RESTRICT="test" |
86 |
+ |
87 |
+MULTILIB_WRAPPED_HEADERS=( |
88 |
+ /usr/include/samba-4.0/policy.h |
89 |
+ /usr/include/samba-4.0/dcerpc_server.h |
90 |
+ /usr/include/samba-4.0/ctdb.h |
91 |
+ /usr/include/samba-4.0/ctdb_client.h |
92 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
93 |
+ /usr/include/samba-4.0/ctdb_private.h |
94 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
95 |
+ /usr/include/samba-4.0/ctdb_version.h |
96 |
+) |
97 |
+ |
98 |
+COMMON_DEPEND=" |
99 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
100 |
+ dev-lang/perl:= |
101 |
+ dev-libs/icu:=[${MULTILIB_USEDEP}] |
102 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
103 |
+ dev-libs/libtasn1[${MULTILIB_USEDEP}] |
104 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
105 |
+ dev-perl/Parse-Yapp |
106 |
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] |
107 |
+ net-libs/libnsl:=[${MULTILIB_USEDEP}] |
108 |
+ >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] |
109 |
+ >=sys-libs/ldb-2.3.3[ldap(+)?,${MULTILIB_USEDEP}] |
110 |
+ <sys-libs/ldb-2.4.0[ldap(+)?,${MULTILIB_USEDEP}] |
111 |
+ sys-libs/libcap[${MULTILIB_USEDEP}] |
112 |
+ sys-libs/liburing:=[${MULTILIB_USEDEP}] |
113 |
+ sys-libs/ncurses:0= |
114 |
+ sys-libs/readline:0= |
115 |
+ >=sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}] |
116 |
+ >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}] |
117 |
+ >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}] |
118 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
119 |
+ virtual/libcrypt:=[${MULTILIB_USEDEP}] |
120 |
+ virtual/libiconv |
121 |
+ $(python_gen_cond_dep " |
122 |
+ addc? ( |
123 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
124 |
+ dev-python/markdown[\${PYTHON_USEDEP}] |
125 |
+ ) |
126 |
+ addns? ( |
127 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
128 |
+ net-dns/bind-tools[gssapi] |
129 |
+ ) |
130 |
+ ") |
131 |
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) |
132 |
+ acl? ( virtual/acl ) |
133 |
+ ceph? ( sys-cluster/ceph ) |
134 |
+ cluster? ( net-libs/rpcsvc-proto ) |
135 |
+ cups? ( net-print/cups ) |
136 |
+ debug? ( dev-util/lttng-ust ) |
137 |
+ fam? ( virtual/fam ) |
138 |
+ gpg? ( app-crypt/gpgme:= ) |
139 |
+ json? ( dev-libs/jansson:= ) |
140 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
141 |
+ pam? ( sys-libs/pam ) |
142 |
+ python? ( |
143 |
+ sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] |
144 |
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] |
145 |
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] |
146 |
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] |
147 |
+ ) |
148 |
+ snapper? ( sys-apps/dbus ) |
149 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
150 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] ) |
151 |
+ systemd? ( sys-apps/systemd:0= ) |
152 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
153 |
+" |
154 |
+DEPEND="${COMMON_DEPEND} |
155 |
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] |
156 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
157 |
+ || ( |
158 |
+ net-libs/rpcsvc-proto |
159 |
+ <sys-libs/glibc-2.26[rpc(+)] |
160 |
+ ) |
161 |
+ spotlight? ( dev-libs/glib ) |
162 |
+ test? ( |
163 |
+ $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" ) |
164 |
+ !system-mitkrb5? ( |
165 |
+ >=net-dns/resolv_wrapper-1.1.4 |
166 |
+ >=net-libs/socket_wrapper-1.1.9 |
167 |
+ >=sys-libs/nss_wrapper-1.1.3 |
168 |
+ >=sys-libs/uid_wrapper-1.2.1 |
169 |
+ ) |
170 |
+ )" |
171 |
+RDEPEND="${COMMON_DEPEND} |
172 |
+ client? ( net-fs/cifs-utils[ads?] ) |
173 |
+ python? ( ${PYTHON_DEPS} ) |
174 |
+ selinux? ( sec-policy/selinux-samba ) |
175 |
+" |
176 |
+BDEPEND="${PYTHON_DEPS} |
177 |
+ app-text/docbook-xsl-stylesheets |
178 |
+ dev-libs/libxslt |
179 |
+ virtual/pkgconfig |
180 |
+" |
181 |
+ |
182 |
+PATCHES=( |
183 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
184 |
+) |
185 |
+ |
186 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
187 |
+CONFDIR="${FILESDIR}/4.4" |
188 |
+ |
189 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
190 |
+ |
191 |
+SHAREDMODS="" |
192 |
+ |
193 |
+pkg_setup() { |
194 |
+ # Package fails to build with distcc |
195 |
+ export DISTCC_DISABLE=1 |
196 |
+ |
197 |
+ python-single-r1_pkg_setup |
198 |
+ |
199 |
+ SHAREDMODS="$(usex snapper '' '!')vfs_snapper" |
200 |
+ if use cluster ; then |
201 |
+ SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad" |
202 |
+ elif use ads ; then |
203 |
+ SHAREDMODS+=",idmap_ad" |
204 |
+ fi |
205 |
+} |
206 |
+ |
207 |
+src_prepare() { |
208 |
+ default |
209 |
+ |
210 |
+ # un-bundle dnspython |
211 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
212 |
+ |
213 |
+ # unbundle iso8601 unless tests are enabled |
214 |
+ if ! use test ; then |
215 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
216 |
+ fi |
217 |
+ |
218 |
+ ## ugly hackaround for bug #592502 |
219 |
+ #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
220 |
+ |
221 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
222 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
223 |
+ || die |
224 |
+ |
225 |
+ # Friggin' WAF shit |
226 |
+ multilib_copy_sources |
227 |
+} |
228 |
+ |
229 |
+multilib_src_configure() { |
230 |
+ # when specifying libs for samba build you must append NONE to the end to |
231 |
+ # stop it automatically including things |
232 |
+ local bundled_libs="NONE" |
233 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
234 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
235 |
+ fi |
236 |
+ |
237 |
+ local myconf=( |
238 |
+ --enable-fhs |
239 |
+ --sysconfdir="${EPREFIX}/etc" |
240 |
+ --localstatedir="${EPREFIX}/var" |
241 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
242 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
243 |
+ --bundled-libraries="${bundled_libs}" |
244 |
+ --builtin-libraries=NONE |
245 |
+ --disable-rpath |
246 |
+ --disable-rpath-install |
247 |
+ --nopyc |
248 |
+ --nopyo |
249 |
+ --without-winexe |
250 |
+ $(multilib_native_use_with acl acl-support) |
251 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
252 |
+ $(multilib_native_use_with addns dnsupdate) |
253 |
+ $(multilib_native_use_with ads) |
254 |
+ $(multilib_native_use_enable ceph cephfs) |
255 |
+ $(multilib_native_use_with cluster cluster-support) |
256 |
+ $(multilib_native_use_enable cups) |
257 |
+ --without-dmapi |
258 |
+ $(multilib_native_use_with fam) |
259 |
+ $(multilib_native_use_enable glusterfs) |
260 |
+ $(multilib_native_use_with gpg gpgme) |
261 |
+ $(multilib_native_use_with json) |
262 |
+ $(multilib_native_use_enable iprint) |
263 |
+ $(multilib_native_use_with ntvfs ntvfs-fileserver) |
264 |
+ $(multilib_native_use_with pam) |
265 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
266 |
+ $(multilib_native_use_with quota quotas) |
267 |
+ $(multilib_native_use_with regedit) |
268 |
+ $(multilib_native_use_enable spotlight) |
269 |
+ $(multilib_native_use_with syslog) |
270 |
+ $(multilib_native_use_with systemd) |
271 |
+ --systemd-install-services |
272 |
+ --with-systemddir="$(systemd_get_systemunitdir)" |
273 |
+ $(multilib_native_use_with winbind) |
274 |
+ $(multilib_native_usex python '' '--disable-python') |
275 |
+ $(multilib_native_use_enable zeroconf avahi) |
276 |
+ $(multilib_native_usex test '--enable-selftest' '') |
277 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
278 |
+ $(use_with debug lttng) |
279 |
+ $(use_with ldap) |
280 |
+ $(use_with profiling-data) |
281 |
+ # bug #683148 |
282 |
+ --jobs 1 |
283 |
+ ) |
284 |
+ |
285 |
+ if multilib_is_native_abi ; then |
286 |
+ myconf+=( --with-shared-modules=${SHAREDMODS} ) |
287 |
+ else |
288 |
+ myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) |
289 |
+ fi |
290 |
+ |
291 |
+ CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
292 |
+ waf-utils_src_configure ${myconf[@]} |
293 |
+} |
294 |
+ |
295 |
+multilib_src_compile() { |
296 |
+ waf-utils_src_compile |
297 |
+} |
298 |
+ |
299 |
+multilib_src_install() { |
300 |
+ waf-utils_src_install |
301 |
+ |
302 |
+ # Make all .so files executable |
303 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
304 |
+ |
305 |
+ if multilib_is_native_abi ; then |
306 |
+ # install ldap schema for server (bug #491002) |
307 |
+ if use ldap ; then |
308 |
+ insinto /etc/openldap/schema |
309 |
+ doins examples/LDAP/samba.schema |
310 |
+ fi |
311 |
+ |
312 |
+ # create symlink for cups (bug #552310) |
313 |
+ if use cups ; then |
314 |
+ dosym ../../../bin/smbspool \ |
315 |
+ /usr/libexec/cups/backend/smb |
316 |
+ fi |
317 |
+ |
318 |
+ # install example config file |
319 |
+ insinto /etc/samba |
320 |
+ doins examples/smb.conf.default |
321 |
+ |
322 |
+ # Fix paths in example file (#603964) |
323 |
+ sed \ |
324 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
325 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
326 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
327 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
328 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
329 |
+ -i "${ED}"/etc/samba/smb.conf.default || die |
330 |
+ |
331 |
+ # Install init script and conf.d file |
332 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
333 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
334 |
+ |
335 |
+ dotmpfiles "${FILESDIR}"/samba.conf |
336 |
+ if ! use addc ; then |
337 |
+ rm "${D}/$(systemd_get_systemunitdir)/samba.service" \ |
338 |
+ || die |
339 |
+ fi |
340 |
+ |
341 |
+ # Preserve functionality for old gentoo-specific unit names |
342 |
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" |
343 |
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" |
344 |
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" |
345 |
+ fi |
346 |
+ |
347 |
+ if use pam && use winbind ; then |
348 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
349 |
+ # bugs #376853 and #590374 |
350 |
+ insinto /etc/security |
351 |
+ doins examples/pam_winbind/pam_winbind.conf |
352 |
+ fi |
353 |
+ |
354 |
+ keepdir /var/cache/samba |
355 |
+ keepdir /var/lib/ctdb |
356 |
+ keepdir /var/lib/samba/{bind-dns,private} |
357 |
+ keepdir /var/lock/samba |
358 |
+ keepdir /var/log/samba |
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 |
+ tmpfiles_process samba.conf |
369 |
+ |
370 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
371 |
+ elog "Be aware that this release contains the best of all of Samba's" |
372 |
+ elog "technology parts, both a file server (that you can reasonably expect" |
373 |
+ elog "to upgrade existing Samba 3.x releases to) and the AD domain" |
374 |
+ elog "controller work previously known as 'samba4'." |
375 |
+ elog |
376 |
+ fi |
377 |
+ elog "For further information and migration steps make sure to read " |
378 |
+ elog "https://samba.org/samba/history/${P}.html " |
379 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
380 |
+} |
381 |
|
382 |
diff --git a/net-fs/samba/samba-4.15.7.ebuild b/net-fs/samba/samba-4.15.7.ebuild |
383 |
new file mode 100644 |
384 |
index 000000000000..bfffbd68dc99 |
385 |
--- /dev/null |
386 |
+++ b/net-fs/samba/samba-4.15.7.ebuild |
387 |
@@ -0,0 +1,340 @@ |
388 |
+# Copyright 1999-2022 Gentoo Authors |
389 |
+# Distributed under the terms of the GNU General Public License v2 |
390 |
+ |
391 |
+EAPI=7 |
392 |
+ |
393 |
+PYTHON_COMPAT=( python3_{8..10} ) |
394 |
+PYTHON_REQ_USE="threads(+),xml(+)" |
395 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles |
396 |
+ |
397 |
+DESCRIPTION="Samba Suite Version 4" |
398 |
+HOMEPAGE="https://samba.org/" |
399 |
+ |
400 |
+MY_PV="${PV/_rc/rc}" |
401 |
+MY_P="${PN}-${MY_PV}" |
402 |
+if [[ ${PV} = *_rc* ]]; then |
403 |
+ SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" |
404 |
+else |
405 |
+ SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" |
406 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
407 |
+fi |
408 |
+S="${WORKDIR}/${MY_P}" |
409 |
+ |
410 |
+LICENSE="GPL-3" |
411 |
+SLOT="0" |
412 |
+IUSE="acl addc ads ceph client cluster cpu_flags_x86_aes cups debug fam |
413 |
+glusterfs gpg iprint json ldap pam profiling-data python quota +regedit selinux |
414 |
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind |
415 |
+zeroconf" |
416 |
+ |
417 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
418 |
+ addc? ( python json winbind ) |
419 |
+ ads? ( acl ldap python winbind ) |
420 |
+ cluster? ( ads ) |
421 |
+ gpg? ( addc ) |
422 |
+ spotlight? ( json ) |
423 |
+ test? ( python ) |
424 |
+ !ads? ( !addc ) |
425 |
+ ?? ( system-heimdal system-mitkrb5 ) |
426 |
+" |
427 |
+ |
428 |
+# the test suite is messed, it uses system-installed samba |
429 |
+# bits instead of what was built, tests things disabled via use |
430 |
+# flags, and generally just fails to work in a way ebuilds could |
431 |
+# rely on in its current state |
432 |
+RESTRICT="test" |
433 |
+ |
434 |
+MULTILIB_WRAPPED_HEADERS=( |
435 |
+ /usr/include/samba-4.0/policy.h |
436 |
+ /usr/include/samba-4.0/dcerpc_server.h |
437 |
+ /usr/include/samba-4.0/ctdb.h |
438 |
+ /usr/include/samba-4.0/ctdb_client.h |
439 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
440 |
+ /usr/include/samba-4.0/ctdb_private.h |
441 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
442 |
+ /usr/include/samba-4.0/ctdb_version.h |
443 |
+) |
444 |
+ |
445 |
+COMMON_DEPEND=" |
446 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
447 |
+ dev-lang/perl:= |
448 |
+ dev-libs/icu:=[${MULTILIB_USEDEP}] |
449 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
450 |
+ dev-libs/libtasn1[${MULTILIB_USEDEP}] |
451 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
452 |
+ dev-perl/Parse-Yapp |
453 |
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] |
454 |
+ >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] |
455 |
+ >=sys-libs/ldb-2.4.2[ldap(+)?,${MULTILIB_USEDEP}] |
456 |
+ <sys-libs/ldb-2.5.0[ldap(+)?,${MULTILIB_USEDEP}] |
457 |
+ sys-libs/libcap[${MULTILIB_USEDEP}] |
458 |
+ sys-libs/liburing:=[${MULTILIB_USEDEP}] |
459 |
+ sys-libs/ncurses:0= |
460 |
+ sys-libs/readline:0= |
461 |
+ >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}] |
462 |
+ >=sys-libs/tdb-1.4.4[${MULTILIB_USEDEP}] |
463 |
+ >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}] |
464 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
465 |
+ virtual/libcrypt:=[${MULTILIB_USEDEP}] |
466 |
+ virtual/libiconv |
467 |
+ $(python_gen_cond_dep " |
468 |
+ addc? ( |
469 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
470 |
+ dev-python/markdown[\${PYTHON_USEDEP}] |
471 |
+ ) |
472 |
+ ads? ( |
473 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
474 |
+ net-dns/bind-tools[gssapi] |
475 |
+ ) |
476 |
+ ") |
477 |
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) |
478 |
+ acl? ( virtual/acl ) |
479 |
+ ceph? ( sys-cluster/ceph ) |
480 |
+ cluster? ( net-libs/rpcsvc-proto ) |
481 |
+ cups? ( net-print/cups ) |
482 |
+ debug? ( dev-util/lttng-ust ) |
483 |
+ fam? ( virtual/fam ) |
484 |
+ gpg? ( app-crypt/gpgme:= ) |
485 |
+ json? ( dev-libs/jansson:= ) |
486 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
487 |
+ pam? ( sys-libs/pam ) |
488 |
+ python? ( |
489 |
+ sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] |
490 |
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] |
491 |
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] |
492 |
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] |
493 |
+ ) |
494 |
+ snapper? ( sys-apps/dbus ) |
495 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
496 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] ) |
497 |
+ systemd? ( sys-apps/systemd:0= ) |
498 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
499 |
+" |
500 |
+DEPEND="${COMMON_DEPEND} |
501 |
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] |
502 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
503 |
+ || ( |
504 |
+ net-libs/rpcsvc-proto |
505 |
+ <sys-libs/glibc-2.26[rpc(+)] |
506 |
+ ) |
507 |
+ spotlight? ( dev-libs/glib ) |
508 |
+ test? ( |
509 |
+ $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" ) |
510 |
+ !system-mitkrb5? ( |
511 |
+ >=net-dns/resolv_wrapper-1.1.4 |
512 |
+ >=net-libs/socket_wrapper-1.1.9 |
513 |
+ >=sys-libs/nss_wrapper-1.1.3 |
514 |
+ >=sys-libs/uid_wrapper-1.2.1 |
515 |
+ ) |
516 |
+ )" |
517 |
+RDEPEND="${COMMON_DEPEND} |
518 |
+ client? ( net-fs/cifs-utils[ads?] ) |
519 |
+ python? ( ${PYTHON_DEPS} ) |
520 |
+ selinux? ( sec-policy/selinux-samba ) |
521 |
+" |
522 |
+BDEPEND="${PYTHON_DEPS} |
523 |
+ app-text/docbook-xsl-stylesheets |
524 |
+ dev-libs/libxslt |
525 |
+ virtual/pkgconfig |
526 |
+" |
527 |
+ |
528 |
+PATCHES=( |
529 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
530 |
+) |
531 |
+ |
532 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
533 |
+CONFDIR="${FILESDIR}/4.4" |
534 |
+ |
535 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
536 |
+ |
537 |
+SHAREDMODS="" |
538 |
+ |
539 |
+pkg_setup() { |
540 |
+ # Package fails to build with distcc |
541 |
+ export DISTCC_DISABLE=1 |
542 |
+ |
543 |
+ python-single-r1_pkg_setup |
544 |
+ |
545 |
+ SHAREDMODS="$(usex snapper '' '!')vfs_snapper" |
546 |
+ if use cluster ; then |
547 |
+ SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad" |
548 |
+ elif use ads ; then |
549 |
+ SHAREDMODS+=",idmap_ad" |
550 |
+ fi |
551 |
+} |
552 |
+ |
553 |
+src_prepare() { |
554 |
+ default |
555 |
+ |
556 |
+ # un-bundle dnspython |
557 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
558 |
+ |
559 |
+ # unbundle iso8601 unless tests are enabled |
560 |
+ if ! use test ; then |
561 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
562 |
+ fi |
563 |
+ |
564 |
+ ## ugly hackaround for bug #592502 |
565 |
+ #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
566 |
+ |
567 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
568 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
569 |
+ || die |
570 |
+ |
571 |
+ # Friggin' WAF shit |
572 |
+ multilib_copy_sources |
573 |
+} |
574 |
+ |
575 |
+multilib_src_configure() { |
576 |
+ # when specifying libs for samba build you must append NONE to the end to |
577 |
+ # stop it automatically including things |
578 |
+ local bundled_libs="NONE" |
579 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
580 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
581 |
+ fi |
582 |
+ |
583 |
+ local myconf=( |
584 |
+ --enable-fhs |
585 |
+ --sysconfdir="${EPREFIX}/etc" |
586 |
+ --localstatedir="${EPREFIX}/var" |
587 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
588 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
589 |
+ --bundled-libraries="${bundled_libs}" |
590 |
+ --builtin-libraries=NONE |
591 |
+ --disable-rpath |
592 |
+ --disable-rpath-install |
593 |
+ --nopyc |
594 |
+ --nopyo |
595 |
+ --without-winexe |
596 |
+ --accel-aes=$(usex cpu_flags_x86_aes intelaesni none) |
597 |
+ $(multilib_native_use_with acl acl-support) |
598 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
599 |
+ $(multilib_native_use_with ads) |
600 |
+ $(multilib_native_use_enable ceph cephfs) |
601 |
+ $(multilib_native_use_with cluster cluster-support) |
602 |
+ $(multilib_native_use_enable cups) |
603 |
+ --without-dmapi |
604 |
+ $(multilib_native_use_with fam) |
605 |
+ $(multilib_native_use_enable glusterfs) |
606 |
+ $(multilib_native_use_with gpg gpgme) |
607 |
+ $(multilib_native_use_with json) |
608 |
+ $(multilib_native_use_enable iprint) |
609 |
+ $(multilib_native_use_with pam) |
610 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
611 |
+ $(multilib_native_use_with quota quotas) |
612 |
+ $(multilib_native_use_with regedit) |
613 |
+ $(multilib_native_use_enable spotlight) |
614 |
+ $(multilib_native_use_with syslog) |
615 |
+ $(multilib_native_use_with systemd) |
616 |
+ --systemd-install-services |
617 |
+ --with-systemddir="$(systemd_get_systemunitdir)" |
618 |
+ $(multilib_native_use_with winbind) |
619 |
+ $(multilib_native_usex python '' '--disable-python') |
620 |
+ $(multilib_native_use_enable zeroconf avahi) |
621 |
+ $(multilib_native_usex test '--enable-selftest' '') |
622 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
623 |
+ $(use_with debug lttng) |
624 |
+ $(use_with ldap) |
625 |
+ $(use_with profiling-data) |
626 |
+ # bug #683148 |
627 |
+ --jobs 1 |
628 |
+ ) |
629 |
+ |
630 |
+ if multilib_is_native_abi ; then |
631 |
+ myconf+=( --with-shared-modules=${SHAREDMODS} ) |
632 |
+ else |
633 |
+ myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) |
634 |
+ fi |
635 |
+ |
636 |
+ PYTHONHASHSEED=1 CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
637 |
+ waf-utils_src_configure ${myconf[@]} |
638 |
+} |
639 |
+ |
640 |
+multilib_src_compile() { |
641 |
+ PYTHONHASHSEED=1 waf-utils_src_compile |
642 |
+} |
643 |
+ |
644 |
+multilib_src_install() { |
645 |
+ PYTHONHASHSEED=1 waf-utils_src_install |
646 |
+ |
647 |
+ # Make all .so files executable |
648 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
649 |
+ |
650 |
+ if multilib_is_native_abi ; then |
651 |
+ # install ldap schema for server (bug #491002) |
652 |
+ if use ldap ; then |
653 |
+ insinto /etc/openldap/schema |
654 |
+ doins examples/LDAP/samba.schema |
655 |
+ fi |
656 |
+ |
657 |
+ # create symlink for cups (bug #552310) |
658 |
+ if use cups ; then |
659 |
+ dosym ../../../bin/smbspool \ |
660 |
+ /usr/libexec/cups/backend/smb |
661 |
+ fi |
662 |
+ |
663 |
+ # install example config file |
664 |
+ insinto /etc/samba |
665 |
+ doins examples/smb.conf.default |
666 |
+ |
667 |
+ # Fix paths in example file (#603964) |
668 |
+ sed \ |
669 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
670 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
671 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
672 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
673 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
674 |
+ -i "${ED}"/etc/samba/smb.conf.default || die |
675 |
+ |
676 |
+ # Install init script and conf.d file |
677 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
678 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
679 |
+ |
680 |
+ dotmpfiles "${FILESDIR}"/samba.conf |
681 |
+ if ! use addc ; then |
682 |
+ rm "${D}/$(systemd_get_systemunitdir)/samba.service" \ |
683 |
+ || die |
684 |
+ fi |
685 |
+ |
686 |
+ # Preserve functionality for old gentoo-specific unit names |
687 |
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" |
688 |
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" |
689 |
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" |
690 |
+ fi |
691 |
+ |
692 |
+ if use pam && use winbind ; then |
693 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
694 |
+ # bugs #376853 and #590374 |
695 |
+ insinto /etc/security |
696 |
+ doins examples/pam_winbind/pam_winbind.conf |
697 |
+ fi |
698 |
+ |
699 |
+ keepdir /var/cache/samba |
700 |
+ keepdir /var/lib/ctdb |
701 |
+ keepdir /var/lib/samba/{bind-dns,private} |
702 |
+ keepdir /var/lock/samba |
703 |
+ keepdir /var/log/samba |
704 |
+} |
705 |
+ |
706 |
+multilib_src_test() { |
707 |
+ if multilib_is_native_abi ; then |
708 |
+ "${WAF_BINARY}" test || die "test failed" |
709 |
+ fi |
710 |
+} |
711 |
+ |
712 |
+pkg_postinst() { |
713 |
+ tmpfiles_process samba.conf |
714 |
+ |
715 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
716 |
+ elog "Be aware that this release contains the best of all of Samba's" |
717 |
+ elog "technology parts, both a file server (that you can reasonably expect" |
718 |
+ elog "to upgrade existing Samba 3.x releases to) and the AD domain" |
719 |
+ elog "controller work previously known as 'samba4'." |
720 |
+ elog |
721 |
+ fi |
722 |
+ if [[ "${PV}" != *_rc* ]] ; then |
723 |
+ elog "For further information and migration steps make sure to read " |
724 |
+ elog "https://samba.org/samba/history/${P}.html " |
725 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
726 |
+ fi |
727 |
+} |
728 |
|
729 |
diff --git a/net-fs/samba/samba-4.16.1.ebuild b/net-fs/samba/samba-4.16.1.ebuild |
730 |
new file mode 100644 |
731 |
index 000000000000..dfb87123595c |
732 |
--- /dev/null |
733 |
+++ b/net-fs/samba/samba-4.16.1.ebuild |
734 |
@@ -0,0 +1,341 @@ |
735 |
+# Copyright 1999-2022 Gentoo Authors |
736 |
+# Distributed under the terms of the GNU General Public License v2 |
737 |
+ |
738 |
+EAPI=7 |
739 |
+ |
740 |
+PYTHON_COMPAT=( python3_{8..10} ) |
741 |
+PYTHON_REQ_USE="threads(+),xml(+)" |
742 |
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles |
743 |
+ |
744 |
+DESCRIPTION="Samba Suite Version 4" |
745 |
+HOMEPAGE="https://samba.org/" |
746 |
+ |
747 |
+MY_PV="${PV/_rc/rc}" |
748 |
+MY_P="${PN}-${MY_PV}" |
749 |
+if [[ ${PV} = *_rc* ]]; then |
750 |
+ SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" |
751 |
+else |
752 |
+ SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" |
753 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" |
754 |
+fi |
755 |
+S="${WORKDIR}/${MY_P}" |
756 |
+ |
757 |
+LICENSE="GPL-3" |
758 |
+SLOT="0" |
759 |
+IUSE="acl addc ads ceph client cluster cpu_flags_x86_aes cups debug fam |
760 |
+glusterfs gpg iprint json ldap pam profiling-data python quota +regedit selinux |
761 |
+snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind |
762 |
+zeroconf" |
763 |
+ |
764 |
+REQUIRED_USE="${PYTHON_REQUIRED_USE} |
765 |
+ addc? ( python json winbind ) |
766 |
+ ads? ( acl ldap python winbind ) |
767 |
+ cluster? ( ads ) |
768 |
+ gpg? ( addc ) |
769 |
+ spotlight? ( json ) |
770 |
+ test? ( python ) |
771 |
+ !ads? ( !addc ) |
772 |
+ ?? ( system-heimdal system-mitkrb5 ) |
773 |
+" |
774 |
+ |
775 |
+# the test suite is messed, it uses system-installed samba |
776 |
+# bits instead of what was built, tests things disabled via use |
777 |
+# flags, and generally just fails to work in a way ebuilds could |
778 |
+# rely on in its current state |
779 |
+RESTRICT="test" |
780 |
+ |
781 |
+MULTILIB_WRAPPED_HEADERS=( |
782 |
+ /usr/include/samba-4.0/policy.h |
783 |
+ /usr/include/samba-4.0/dcerpc_server.h |
784 |
+ /usr/include/samba-4.0/ctdb.h |
785 |
+ /usr/include/samba-4.0/ctdb_client.h |
786 |
+ /usr/include/samba-4.0/ctdb_protocol.h |
787 |
+ /usr/include/samba-4.0/ctdb_private.h |
788 |
+ /usr/include/samba-4.0/ctdb_typesafe_cb.h |
789 |
+ /usr/include/samba-4.0/ctdb_version.h |
790 |
+) |
791 |
+ |
792 |
+COMMON_DEPEND=" |
793 |
+ >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] |
794 |
+ dev-lang/perl:= |
795 |
+ dev-libs/icu:=[${MULTILIB_USEDEP}] |
796 |
+ dev-libs/libbsd[${MULTILIB_USEDEP}] |
797 |
+ dev-libs/libtasn1[${MULTILIB_USEDEP}] |
798 |
+ dev-libs/popt[${MULTILIB_USEDEP}] |
799 |
+ dev-perl/Parse-Yapp |
800 |
+ >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] |
801 |
+ >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] |
802 |
+ >=sys-libs/ldb-2.5.0[ldap(+)?,${MULTILIB_USEDEP}] |
803 |
+ <sys-libs/ldb-2.6.0[ldap(+)?,${MULTILIB_USEDEP}] |
804 |
+ sys-libs/libcap[${MULTILIB_USEDEP}] |
805 |
+ sys-libs/liburing:=[${MULTILIB_USEDEP}] |
806 |
+ sys-libs/ncurses:0= |
807 |
+ sys-libs/readline:0= |
808 |
+ >=sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}] |
809 |
+ >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}] |
810 |
+ >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}] |
811 |
+ sys-libs/zlib[${MULTILIB_USEDEP}] |
812 |
+ virtual/libcrypt:=[${MULTILIB_USEDEP}] |
813 |
+ virtual/libiconv |
814 |
+ $(python_gen_cond_dep " |
815 |
+ addc? ( |
816 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
817 |
+ dev-python/markdown[\${PYTHON_USEDEP}] |
818 |
+ ) |
819 |
+ ads? ( |
820 |
+ dev-python/dnspython:=[\${PYTHON_USEDEP}] |
821 |
+ net-dns/bind-tools[gssapi] |
822 |
+ ) |
823 |
+ ") |
824 |
+ !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) |
825 |
+ acl? ( virtual/acl ) |
826 |
+ ceph? ( sys-cluster/ceph ) |
827 |
+ cluster? ( net-libs/rpcsvc-proto ) |
828 |
+ cups? ( net-print/cups ) |
829 |
+ debug? ( dev-util/lttng-ust ) |
830 |
+ fam? ( virtual/fam ) |
831 |
+ gpg? ( app-crypt/gpgme:= ) |
832 |
+ json? ( dev-libs/jansson:= ) |
833 |
+ ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) |
834 |
+ pam? ( sys-libs/pam ) |
835 |
+ python? ( |
836 |
+ sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] |
837 |
+ sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] |
838 |
+ sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] |
839 |
+ sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] |
840 |
+ ) |
841 |
+ snapper? ( sys-apps/dbus ) |
842 |
+ system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) |
843 |
+ system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] ) |
844 |
+ systemd? ( sys-apps/systemd:0= ) |
845 |
+ zeroconf? ( net-dns/avahi[dbus] ) |
846 |
+" |
847 |
+DEPEND="${COMMON_DEPEND} |
848 |
+ >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] |
849 |
+ dev-perl/JSON |
850 |
+ net-libs/libtirpc[${MULTILIB_USEDEP}] |
851 |
+ || ( |
852 |
+ net-libs/rpcsvc-proto |
853 |
+ <sys-libs/glibc-2.26[rpc(+)] |
854 |
+ ) |
855 |
+ spotlight? ( dev-libs/glib ) |
856 |
+ test? ( |
857 |
+ $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" ) |
858 |
+ !system-mitkrb5? ( |
859 |
+ >=net-dns/resolv_wrapper-1.1.4 |
860 |
+ >=net-libs/socket_wrapper-1.1.9 |
861 |
+ >=sys-libs/nss_wrapper-1.1.3 |
862 |
+ >=sys-libs/uid_wrapper-1.2.1 |
863 |
+ ) |
864 |
+ )" |
865 |
+RDEPEND="${COMMON_DEPEND} |
866 |
+ client? ( net-fs/cifs-utils[ads?] ) |
867 |
+ python? ( ${PYTHON_DEPS} ) |
868 |
+ selinux? ( sec-policy/selinux-samba ) |
869 |
+" |
870 |
+BDEPEND="${PYTHON_DEPS} |
871 |
+ app-text/docbook-xsl-stylesheets |
872 |
+ dev-libs/libxslt |
873 |
+ virtual/pkgconfig |
874 |
+" |
875 |
+ |
876 |
+PATCHES=( |
877 |
+ "${FILESDIR}/${PN}-4.4.0-pam.patch" |
878 |
+) |
879 |
+ |
880 |
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" |
881 |
+CONFDIR="${FILESDIR}/4.4" |
882 |
+ |
883 |
+WAF_BINARY="${S}/buildtools/bin/waf" |
884 |
+ |
885 |
+SHAREDMODS="" |
886 |
+ |
887 |
+pkg_setup() { |
888 |
+ # Package fails to build with distcc |
889 |
+ export DISTCC_DISABLE=1 |
890 |
+ |
891 |
+ python-single-r1_pkg_setup |
892 |
+ |
893 |
+ SHAREDMODS="$(usex snapper '' '!')vfs_snapper" |
894 |
+ if use cluster ; then |
895 |
+ SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad" |
896 |
+ elif use ads ; then |
897 |
+ SHAREDMODS+=",idmap_ad" |
898 |
+ fi |
899 |
+} |
900 |
+ |
901 |
+src_prepare() { |
902 |
+ default |
903 |
+ |
904 |
+ # un-bundle dnspython |
905 |
+ sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die |
906 |
+ |
907 |
+ # unbundle iso8601 unless tests are enabled |
908 |
+ if ! use test ; then |
909 |
+ sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die |
910 |
+ fi |
911 |
+ |
912 |
+ ## ugly hackaround for bug #592502 |
913 |
+ #cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die |
914 |
+ |
915 |
+ sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \ |
916 |
+ -i source4/dsdb/samdb/ldb_modules/password_hash.c \ |
917 |
+ || die |
918 |
+ |
919 |
+ # Friggin' WAF shit |
920 |
+ multilib_copy_sources |
921 |
+} |
922 |
+ |
923 |
+multilib_src_configure() { |
924 |
+ # when specifying libs for samba build you must append NONE to the end to |
925 |
+ # stop it automatically including things |
926 |
+ local bundled_libs="NONE" |
927 |
+ if ! use system-heimdal && ! use system-mitkrb5 ; then |
928 |
+ bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE" |
929 |
+ fi |
930 |
+ |
931 |
+ local myconf=( |
932 |
+ --enable-fhs |
933 |
+ --sysconfdir="${EPREFIX}/etc" |
934 |
+ --localstatedir="${EPREFIX}/var" |
935 |
+ --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" |
936 |
+ --with-piddir="${EPREFIX}/run/${PN}" |
937 |
+ --bundled-libraries="${bundled_libs}" |
938 |
+ --builtin-libraries=NONE |
939 |
+ --disable-rpath |
940 |
+ --disable-rpath-install |
941 |
+ --nopyc |
942 |
+ --nopyo |
943 |
+ --without-winexe |
944 |
+ --accel-aes=$(usex cpu_flags_x86_aes intelaesni none) |
945 |
+ $(multilib_native_use_with acl acl-support) |
946 |
+ $(multilib_native_usex addc '' '--without-ad-dc') |
947 |
+ $(multilib_native_use_with ads) |
948 |
+ $(multilib_native_use_enable ceph cephfs) |
949 |
+ $(multilib_native_use_with cluster cluster-support) |
950 |
+ $(multilib_native_use_enable cups) |
951 |
+ --without-dmapi |
952 |
+ $(multilib_native_use_with fam) |
953 |
+ $(multilib_native_use_enable glusterfs) |
954 |
+ $(multilib_native_use_with gpg gpgme) |
955 |
+ $(multilib_native_use_with json) |
956 |
+ $(multilib_native_use_enable iprint) |
957 |
+ $(multilib_native_use_with pam) |
958 |
+ $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '') |
959 |
+ $(multilib_native_use_with quota quotas) |
960 |
+ $(multilib_native_use_with regedit) |
961 |
+ $(multilib_native_use_enable spotlight) |
962 |
+ $(multilib_native_use_with syslog) |
963 |
+ $(multilib_native_use_with systemd) |
964 |
+ --systemd-install-services |
965 |
+ --with-systemddir="$(systemd_get_systemunitdir)" |
966 |
+ $(multilib_native_use_with winbind) |
967 |
+ $(multilib_native_usex python '' '--disable-python') |
968 |
+ $(multilib_native_use_enable zeroconf avahi) |
969 |
+ $(multilib_native_usex test '--enable-selftest' '') |
970 |
+ $(usex system-mitkrb5 "--with-system-mitkrb5 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') |
971 |
+ $(use_with debug lttng) |
972 |
+ $(use_with ldap) |
973 |
+ $(use_with profiling-data) |
974 |
+ # bug #683148 |
975 |
+ --jobs 1 |
976 |
+ ) |
977 |
+ |
978 |
+ if multilib_is_native_abi ; then |
979 |
+ myconf+=( --with-shared-modules=${SHAREDMODS} ) |
980 |
+ else |
981 |
+ myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) |
982 |
+ fi |
983 |
+ |
984 |
+ PYTHONHASHSEED=1 CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \ |
985 |
+ waf-utils_src_configure ${myconf[@]} |
986 |
+} |
987 |
+ |
988 |
+multilib_src_compile() { |
989 |
+ PYTHONHASHSEED=1 waf-utils_src_compile |
990 |
+} |
991 |
+ |
992 |
+multilib_src_install() { |
993 |
+ PYTHONHASHSEED=1 waf-utils_src_install |
994 |
+ |
995 |
+ # Make all .so files executable |
996 |
+ find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die |
997 |
+ |
998 |
+ if multilib_is_native_abi ; then |
999 |
+ # install ldap schema for server (bug #491002) |
1000 |
+ if use ldap ; then |
1001 |
+ insinto /etc/openldap/schema |
1002 |
+ doins examples/LDAP/samba.schema |
1003 |
+ fi |
1004 |
+ |
1005 |
+ # create symlink for cups (bug #552310) |
1006 |
+ if use cups ; then |
1007 |
+ dosym ../../../bin/smbspool \ |
1008 |
+ /usr/libexec/cups/backend/smb |
1009 |
+ fi |
1010 |
+ |
1011 |
+ # install example config file |
1012 |
+ insinto /etc/samba |
1013 |
+ doins examples/smb.conf.default |
1014 |
+ |
1015 |
+ # Fix paths in example file (#603964) |
1016 |
+ sed \ |
1017 |
+ -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \ |
1018 |
+ -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \ |
1019 |
+ -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \ |
1020 |
+ -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \ |
1021 |
+ -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \ |
1022 |
+ -i "${ED}"/etc/samba/smb.conf.default || die |
1023 |
+ |
1024 |
+ # Install init script and conf.d file |
1025 |
+ newinitd "${CONFDIR}/samba4.initd-r1" samba |
1026 |
+ newconfd "${CONFDIR}/samba4.confd" samba |
1027 |
+ |
1028 |
+ dotmpfiles "${FILESDIR}"/samba.conf |
1029 |
+ if ! use addc ; then |
1030 |
+ rm "${D}/$(systemd_get_systemunitdir)/samba.service" \ |
1031 |
+ || die |
1032 |
+ fi |
1033 |
+ |
1034 |
+ # Preserve functionality for old gentoo-specific unit names |
1035 |
+ dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" |
1036 |
+ dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" |
1037 |
+ dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" |
1038 |
+ fi |
1039 |
+ |
1040 |
+ if use pam && use winbind ; then |
1041 |
+ newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind |
1042 |
+ # bugs #376853 and #590374 |
1043 |
+ insinto /etc/security |
1044 |
+ doins examples/pam_winbind/pam_winbind.conf |
1045 |
+ fi |
1046 |
+ |
1047 |
+ keepdir /var/cache/samba |
1048 |
+ keepdir /var/lib/ctdb |
1049 |
+ keepdir /var/lib/samba/{bind-dns,private} |
1050 |
+ keepdir /var/lock/samba |
1051 |
+ keepdir /var/log/samba |
1052 |
+} |
1053 |
+ |
1054 |
+multilib_src_test() { |
1055 |
+ if multilib_is_native_abi ; then |
1056 |
+ "${WAF_BINARY}" test || die "test failed" |
1057 |
+ fi |
1058 |
+} |
1059 |
+ |
1060 |
+pkg_postinst() { |
1061 |
+ tmpfiles_process samba.conf |
1062 |
+ |
1063 |
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then |
1064 |
+ elog "Be aware that this release contains the best of all of Samba's" |
1065 |
+ elog "technology parts, both a file server (that you can reasonably expect" |
1066 |
+ elog "to upgrade existing Samba 3.x releases to) and the AD domain" |
1067 |
+ elog "controller work previously known as 'samba4'." |
1068 |
+ elog |
1069 |
+ fi |
1070 |
+ if [[ "${PV}" != *_rc* ]] ; then |
1071 |
+ elog "For further information and migration steps make sure to read " |
1072 |
+ elog "https://samba.org/samba/history/${P}.html " |
1073 |
+ elog "https://wiki.samba.org/index.php/Samba4/HOWTO " |
1074 |
+ fi |
1075 |
+} |