Gentoo Archives: gentoo-commits

From: Samuel Bernardo <samuelbernardo.mail@×××××.com>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/user/ssnb:master commit in: net-fs/samba/files/, net-fs/samba/, net-fs/samba/files/4.4/
Date: Wed, 26 Sep 2018 10:08:46
Message-Id: 1537956502.ce857ba46c7c9584c4b81effa3ed9c8537a0ca8f.samuelbernardo@gentoo
1 commit: ce857ba46c7c9584c4b81effa3ed9c8537a0ca8f
2 Author: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
3 AuthorDate: Wed Sep 26 10:08:22 2018 +0000
4 Commit: Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
5 CommitDate: Wed Sep 26 10:08:22 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=ce857ba4
7
8 add samba-4.9.1-r1 with necessary patch for ffmpeg
9
10 net-fs/samba/Manifest | 18 ++
11 net-fs/samba/files/4.4/samba4.confd | 45 ++++
12 net-fs/samba/files/4.4/samba4.initd-r1 | 55 ++++
13 net-fs/samba/files/nmbd.service | 12 +
14 net-fs/samba/files/samba-4.4.0-pam.patch | 29 +++
15 .../samba/files/samba-4.5.1-compile_et_fix.patch | 16 ++
16 .../files/samba-4.7.3-krb-cross-compile.patch | 40 +++
17 .../files/samba-4.9.1-fix_libsmbclient_h.patch | 11 +
18 net-fs/samba/files/samba-glibc-2.26-no_rpc.patch | 14 +
19 net-fs/samba/files/samba.conf | 2 +
20 net-fs/samba/files/samba.service | 10 +
21 net-fs/samba/files/smbd.service | 12 +
22 net-fs/samba/files/smbd.socket | 9 +
23 net-fs/samba/files/smbd_at.service | 7 +
24 net-fs/samba/files/talloc-disable-python.patch | 34 +++
25 net-fs/samba/files/winbindd.service | 12 +
26 net-fs/samba/metadata.xml | 32 +++
27 net-fs/samba/samba-4.9.1-r1.ebuild | 289 +++++++++++++++++++++
28 18 files changed, 647 insertions(+)
29
30 diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
31 new file mode 100644
32 index 0000000..351c81c
33 --- /dev/null
34 +++ b/net-fs/samba/Manifest
35 @@ -0,0 +1,18 @@
36 +AUX 4.4/samba4.confd 2035 BLAKE2B a9fa538a0b259c8a184012e0370819729e24fa971de52e3d3891107bd78e6d4e074a2df80b1c424c23229ce5e84ea1da908887c8fef88dd45104eb5c6eb0e4a5 SHA512 d6a7ae560621407b7a5f94db6489d6a85c5056f4212a2a9a24210eaeb585caf4f15801282d1b8682962c0cf5642766fe09cc70c48fffafd1560de615154503af
37 +AUX 4.4/samba4.initd-r1 1125 BLAKE2B 204a639069495cfd711bd1c9dcd78a480e07bca7b760efdec49061f093d7e41dc6ce16b9264cc4762094bb7a796dc96d71003668416d40948036bd6fcc944a2e SHA512 982771fd7e1d260d8d4305eb18a3c15871f535b700d2b9554af24df62286e59ce6c5c76ef4ffee7a751fc01040eefaaabad71b2f67e3749ba1ee97a368b14d5a
38 +AUX nmbd.service 224 BLAKE2B 499598b7e80f3dddbcc0b2d3ba217774cfcd7d87cc5287bdc75b8b616e039e235f2202e4c5275421ec018911e92680da923d9403f7bfc65e1995216f4c157fef SHA512 098dfb270c5a5c29f59b4fd8d51b17931771e25e481124832f1a086677825527e2afa7276e8614e5007fbf044d253ce2eaf3a7caf7461ad5d90d0b1c7f157f9d
39 +AUX samba-4.4.0-pam.patch 895 BLAKE2B bdc0601527a932424d55946b2eeaa288420ce90a8fd9be2271709da5c113625e80ae3783975b725c515004382bea65336ef725241079081cec213e81cc6e3056 SHA512 5a00c6131c372fc1cc9e23e4a37314442bf9af8e420a040a7b20ec3d76a357959d456437ed13e2e17f938eb6dcb4e7c5d899ff3d670526b0a444f63e35d5262c
40 +AUX samba-4.5.1-compile_et_fix.patch 762 BLAKE2B 432d8380e3511c3dbb408479d0152fb0760e9e487a3033718fa39b9ca4a87a04c9cf8ac41a4b9268020a1d41dee9efa5bde3f0e71498483102fcae80749ad62c SHA512 9605751653dcbbce41be807a9b4f8e5f657db6622f843e91c4df9c4b3e4ad621b6e8e3891f2b970208d55a80801355988f253e3c844ca51a658cd6de8c373e24
41 +AUX samba-4.7.3-krb-cross-compile.patch 1590 BLAKE2B 34cf304441731556556e40ed386f110dd8aa26a49680fa106b550edede86842e736c5652cd4aa54f0da7955600442cbc41350031dc8b67deae11f68050a6cf7c SHA512 0f762326f5b72d10e4c553630a8c4c433de884d80024c26e4f0e46b26bc24ac53c07642d833bb327f0010b7ee0ce2df05a94dc8868f3f363f68f9851b76265c5
42 +AUX samba-4.9.1-fix_libsmbclient_h.patch 400 BLAKE2B c490fdf389e426337cae6094791c0657d0703e6885a7e85520ff3aa75e35a845ef9cad0213a658f73f7b1eaafd737c15500d29db847ecb5cf20a42d0c07e753c SHA512 7376ac1130c047dd48c13c74a9f1193d6681ae9dadef4387b11e2b65574d49c41d5fed852942f48c36917a28b40d2000feda744232cf189cad950030d5682e26
43 +AUX samba-glibc-2.26-no_rpc.patch 631 BLAKE2B 22e414bcd329d7d32381c61ad4341de69a07235447dc4116855cca9ce99d32a5ffe111602fdf6ea02c6fe9c5b3331ecaec974faa5e22e009f15964296b53825a SHA512 18a466cbe42313f096ebeb635e5738b59672e96fd5c7db80cff5aa96c0edeb359b6833967bfac09eb5c010eec4309b3b73c0f941173b520918939974fa599541
44 +AUX samba.conf 61 BLAKE2B fff77908503f3718cdcf04b60eda6bf717fb37628107676ed66133da235af95ac91d6209f97830de7a5bfdee9e25f850334bb445ee22110d14eb82e1b399694c SHA512 4a75185762c90d110c399215fbfc939d30804b558ffdb11cc68dee6f87a94c86cadbcd63935884db1266cf40fe24fefb75f9067fe4751ad9838d7a43e8973b9e
45 +AUX samba.service 199 BLAKE2B 5949503c588684a48ab0a26f5811bb053d8527eb9da2ecc8b4bd911ea6d51969bc9607b14f3f72394127ff24967849d3e829a05b6584ba3f3de5e640d240c204 SHA512 eb277917f15de958f4a0404b66c6d2cc82ae4319b85f2f442489988d523bf92e2a9d23a6051ee693cd4bcfbc67947e8028c59906ad3e537578daf5caee8a6f16
46 +AUX smbd.service 250 BLAKE2B 70b1bf1dfb5f099ca9880d6eeee3996f6f69cc2744e07c577b396ac973326c60dd3874129c23fc0d53b7d3a50891a607d35781a8eda1702029c3602a212bb89a SHA512 a54e3c337f7c27766a81f68ad6d8f4eb6ddb1d1aec3303f274e419a49114755bc5dd711701d5e64954ae7153a8be4a7063371af286696c0b81d543b9276703c3
47 +AUX smbd.socket 121 BLAKE2B 1261742bb1cd586f376ccd1027a5c57754460bcaf7aed4b800ae8afeefb663a761cae38e89da56dfef06b9b82aaafa8d98f2f7d9fb45ca52652888ec92470618 SHA512 2db4a707fcc6ef1928ac010e5e92cdaf0f6ff3ffa8aef918e0db1ce910abfb481d6a19082337f9c8444cd780d1d442fa8df2bb65e6142fc109d29657532572ed
48 +AUX smbd_at.service 145 BLAKE2B 729dd189fc69ff33930ec96a68cff42438645ff7f3cf0a88f2bf12f56d6cb213f58c9699c19800bed429640218bba81fdb4009882fdf7bc84fc07d0e4634acc7 SHA512 e6486c35dfa6f77ad46547a78fcae55fb71e4dad7dc7b4580c2b8c1be232c0a870f56714b2b103a1fd8717298f41347d7178fbebb90f0f2d0324fe5233f0f9f3
49 +AUX talloc-disable-python.patch 1706 BLAKE2B cc447f5077c82d7eb584692121b9b34c03afb5f7dda2b799ea518d08421d31ce54fe2422c5ca7efe74f66011951c97b171a326604bd67446a15ad2849bade919 SHA512 ac0bf82e8ed8b918a5efbdeb0a6cbaaef22bb72231abb09026637d62b8ce35b25212960d26c07abe63661328ab7ea8a82590cd93f04de583e23239211daf6efa
50 +AUX winbindd.service 240 BLAKE2B f0b96a5a1d93a3c04bb2a2b2b500718b41fc907a3c551827a459c5d8184abc3caed0ac5edcf16032650dc2d58c38b779473c7a619047956f1381415e3de4dd93 SHA512 f1ce6d035e8e0fcdc73f14e3b60c9647043777ff6b2a982a81ed07eb4df5ff245a9511e3e4a9d8163f9c8f3fb86d2a39a67621ace68392eb7c2f2e2a55d587f7
51 +DIST samba-4.9.1.tar.gz 18018259 BLAKE2B 783423098864c391f08b30e05b70308e922bdb4dad08b8b0b4d1112808357b9bb96aad7a094d0fe2e308f84a143d5f90be523b9c3551a3068ecdcad7347613f6 SHA512 267673b6d6ab0db59063480c20f02e5864ef96e9ad1097c23a99b2ab4b5fd2252193d7a152729b40cae0751fb9b0b108b087a190f5db11eabbd075224bd6e663
52 +EBUILD samba-4.9.1-r1.ebuild 8522 BLAKE2B 0de209337ad7838bff0262a2db67f9d26e2aee16ef2a1a73250943ea14c9b176f450d2004a79f552682a655f383ad596f644f6efa4c4eed6e29dca44c80c2792 SHA512 4c0fc66120050cca3578eb8d9e1e72d4ea5118b4cafb34769cbeb5cc65982f8d26a4800c059cf63392469b7c96c20b7ea3faa73703a659be2251a29e76100dc7
53 +MISC metadata.xml 1690 BLAKE2B d3bea05fc86c05786fe98d7298e00f91c1af33bc7c9a6ba19155bf6831a3e67318df9970baac12e67c666fd7cec8baebea50f08b178200887c05c42192b6345b SHA512 fdde3409c3455f5d6af4fd2484702178ee29e1583159ede7acd57083fca52be5811013160149449a38d0049f9c3f5327790c696963071afd34a2121223a39a06
54
55 diff --git a/net-fs/samba/files/4.4/samba4.confd b/net-fs/samba/files/4.4/samba4.confd
56 new file mode 100644
57 index 0000000..629a605
58 --- /dev/null
59 +++ b/net-fs/samba/files/4.4/samba4.confd
60 @@ -0,0 +1,45 @@
61 +# Add "winbind" to the daemon_list if you also want winbind to start.
62 +# Replace "smbd nmbd" by "samba4" if you want the active directory domain controller part or the ntvfs
63 +# file server part or the rpc proxy to start.
64 +# Note that samba4 controls 'smbd' by itself, thus it can't be started manually. You can, however,
65 +# tweak the behaviour of a samba4-controlled smbd by modifying your '/etc/samba/smb.conf' file
66 +# accordingly.
67 +daemon_list="smbd nmbd"
68 +
69 +piddir="/run/samba"
70 +
71 +#----------------------------------------------------------------------------
72 +# Daemons calls: <daemon_name>_<command_option>
73 +#----------------------------------------------------------------------------
74 +my_service_name="samba"
75 +my_service_PRE="unset TMP TMPDIR"
76 +my_service_POST=""
77 +
78 +#----------------------------------------------------------------------------
79 +# Daemons calls: <daemon_name>_<command_option>
80 +#----------------------------------------------------------------------------
81 +smbd_start_options="-D"
82 +smbd_command="/usr/sbin/smbd"
83 +smbd_start="start-stop-daemon --start --exec ${smbd_command} -- ${smbd_start_options}"
84 +smbd_stop="start-stop-daemon --stop --exec ${smbd_command}"
85 +smbd_reload="killall -HUP smbd"
86 +
87 +nmbd_start_options="-D"
88 +nmbd_command="/usr/sbin/nmbd"
89 +nmbd_start="start-stop-daemon --start --exec ${nmbd_command} -- ${nmbd_start_options}"
90 +nmbd_stop="start-stop-daemon --stop --exec ${nmbd_command}"
91 +nmbd_reload="killall -HUP nmbd"
92 +
93 +samba4_start_options=""
94 +samba4_command="/usr/sbin/samba"
95 +samba4_pidfile="${piddir}/samba.pid"
96 +samba4_start="start-stop-daemon --start --exec ${samba4_command} --pidfile ${samba4_pidfile} -- ${samba4_start_options}"
97 +samba4_stop="start-stop-daemon --stop --exec ${samba4_command} --pidfile ${samba4_pidfile}"
98 +samba4_reload="killall -HUP samba"
99 +
100 +winbind_start_options=""
101 +winbind_command="/usr/sbin/winbindd"
102 +winbind_start="start-stop-daemon --start --exec ${winbind_command} -- ${winbind_start_options}"
103 +winbind_stop="start-stop-daemon --stop --exec ${winbind_command}"
104 +winbind_reload="killall -HUP winbindd"
105 +
106
107 diff --git a/net-fs/samba/files/4.4/samba4.initd-r1 b/net-fs/samba/files/4.4/samba4.initd-r1
108 new file mode 100644
109 index 0000000..05bd1fc
110 --- /dev/null
111 +++ b/net-fs/samba/files/4.4/samba4.initd-r1
112 @@ -0,0 +1,55 @@
113 +#!/sbin/openrc-run
114 +# Copyright 1999-2018 Gentoo Foundation
115 +# Distributed under the terms of the GNU General Public License, v2 or later
116 +
117 +extra_started_commands="reload"
118 +[ -z "${piddir}" ] && piddir="/run/samba"
119 +
120 +depend() {
121 + after slapd
122 + need net
123 + use cupsd
124 +}
125 +
126 +DAEMONNAME="${SVCNAME##samba.}"
127 +[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}
128 +
129 +signal_do() {
130 + local signal="$1"
131 + [ -z "${signal}" ] && return 0
132 +
133 + local result=0 last_result=0 daemon= cmd_exec=
134 + for daemon in ${daemon_list} ; do
135 + eval cmd_exec=\$${daemon}_${signal}
136 + if [ -n "${cmd_exec}" ]; then
137 + ebegin "${my_service_name} -> ${signal}: ${daemon}"
138 + #echo ${cmd} '->' ${!cmd}
139 + ${cmd_exec} > /dev/null
140 + last_result=$?
141 + eend ${last_result}
142 + fi
143 + result=$(( ${result} + ${last_result} ))
144 + done
145 + return ${result}
146 +}
147 +
148 +start() {
149 + ${my_service_PRE}
150 + [ -d "${piddir}" ] || mkdir -p "${piddir}"
151 + signal_do start && return 0
152 +
153 + eerror "Error: starting services (see system logs)"
154 + signal_do stop
155 + return 1
156 +}
157 +stop() {
158 + ${my_service_PRE}
159 + if signal_do stop ; then
160 + ${my_service_POST}
161 + return 0
162 + fi
163 +}
164 +reload() {
165 + ${my_service_PRE}
166 + signal_do reload
167 +}
168
169 diff --git a/net-fs/samba/files/nmbd.service b/net-fs/samba/files/nmbd.service
170 new file mode 100644
171 index 0000000..44b4ffb
172 --- /dev/null
173 +++ b/net-fs/samba/files/nmbd.service
174 @@ -0,0 +1,12 @@
175 +[Unit]
176 +Description=Samba NetBIOS name server
177 +After=network.target
178 +
179 +[Service]
180 +Type=forking
181 +PIDFile=/var/run/samba/nmbd.pid
182 +ExecStart=/usr/sbin/nmbd -D
183 +ExecReload=/bin/kill -HUP $MAINPID
184 +
185 +[Install]
186 +WantedBy=multi-user.target
187
188 diff --git a/net-fs/samba/files/samba-4.4.0-pam.patch b/net-fs/samba/files/samba-4.4.0-pam.patch
189 new file mode 100644
190 index 0000000..4516013
191 --- /dev/null
192 +++ b/net-fs/samba/files/samba-4.4.0-pam.patch
193 @@ -0,0 +1,29 @@
194 +--- samba-4.4.0rc2/source3/wscript
195 ++++ samba-4.4.0rc2/source3/wscript
196 +@@ -870,7 +870,7 @@
197 + if conf.env.with_iconv:
198 + conf.DEFINE('HAVE_ICONV', 1)
199 +
200 +- if Options.options.with_pam:
201 ++ if Options.options.with_pam != False:
202 + use_pam=True
203 + conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
204 + if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
205 +@@ -943,6 +943,17 @@
206 + conf.DEFINE('WITH_PAM', 1)
207 + conf.DEFINE('WITH_PAM_MODULES', 1)
208 +
209 ++ else:
210 ++ Logs.warn("PAM disabled")
211 ++ use_pam=False
212 ++ conf.undefine('WITH_PAM')
213 ++ conf.undefine('WITH_PAM_MODULES')
214 ++ conf.undefine('HAVE_SECURITY_PAM_APPL_H')
215 ++ conf.undefine('PAM_RHOST')
216 ++ conf.undefine('PAM_TTY')
217 ++ conf.undefine('HAVE_PAM_PAM_APPL_H')
218 ++
219 ++
220 + seteuid = False
221 +
222 + #
223
224 diff --git a/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch b/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch
225 new file mode 100644
226 index 0000000..463512f
227 --- /dev/null
228 +++ b/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch
229 @@ -0,0 +1,16 @@
230 +--- samba-4.5.1/source4/heimdal_build/wscript_configure
231 ++++ samba-4.5.1/source4/heimdal_build/wscript_configure
232 +@@ -258,7 +258,11 @@
233 +
234 + # With the proper checks in place we should be able to build against the system libtommath.
235 + #if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):
236 + # conf.define('USING_SYSTEM_TOMMATH', 1)
237 +
238 +-check_system_heimdal_binary("compile_et")
239 +-check_system_heimdal_binary("asn1_compile")
240 ++# comment out next line to stop Gentoo Samba build from using the compile_et in e2fsprogs-libs
241 ++# to compile the error tables. This produces a compile error later on.
242 ++#check_system_heimdal_binary("compile_et")
243 ++#
244 ++# As a precaution do the same for asn1_compile
245 ++#check_system_heimdal_binary("asn1_compile")
246
247 diff --git a/net-fs/samba/files/samba-4.7.3-krb-cross-compile.patch b/net-fs/samba/files/samba-4.7.3-krb-cross-compile.patch
248 new file mode 100644
249 index 0000000..9fad9fc
250 --- /dev/null
251 +++ b/net-fs/samba/files/samba-4.7.3-krb-cross-compile.patch
252 @@ -0,0 +1,40 @@
253 +https://lists.samba.org/archive/samba-technical/2017-December/124344.html
254 +https://git.samba.org/?p=samba.git;a=commit;h=70f92025ae504cda97ff3a130f19035450967836
255 +
256 +From 70f92025ae504cda97ff3a130f19035450967836 Mon Sep 17 00:00:00 2001
257 +From: Zentaro Kavanagh <zentaro@××××××××.org>
258 +Date: Mon, 11 Dec 2017 12:41:16 -0800
259 +Subject: [PATCH] Remove unsupported colon from configure msg.
260 +
261 +- When cross-compiling an answers file must be supplied via
262 + --cross-compile --cross-answers=<path to answers>.
263 +- The lines in the answer file have the form;
264 + Config Msg: Answer
265 +- The colon is used to delimit the msg and the answer when reading
266 + the answers file.
267 +- WAF doesn't support the message containing a colon.
268 +- It's not possible to override this variable so cross compile fails.
269 +
270 +Signed-off-by: Zentaro Kavanagh <zentaro@××××××.com>
271 +Reviewed-by: Uri Simchoni <uri@×××××.org>
272 +Reviewed-by: Andrew Bartlett <abartlet@×××××.org>
273 +---
274 + wscript_configure_system_mitkrb5 | 2 +-
275 + 1 file changed, 1 insertion(+), 1 deletion(-)
276 +
277 +diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
278 +index 9c351131ad1a..803dad7ab63b 100644
279 +--- a/wscript_configure_system_mitkrb5
280 ++++ b/wscript_configure_system_mitkrb5
281 +@@ -282,7 +282,7 @@ conf.CHECK_CODE('''
282 + ''',
283 + 'HAVE_WRFILE_KEYTAB',
284 + headers='krb5.h', lib='krb5', execute=True,
285 +- msg="Checking whether the WRFILE:-keytab is supported");
286 ++ msg="Checking whether the WRFILE -keytab is supported");
287 + # Check for KRB5_DEPRECATED handling
288 + conf.CHECK_CODE('''#define KRB5_DEPRECATED 1
289 + #include <krb5.h>''',
290 +--
291 +2.15.1
292 +
293
294 diff --git a/net-fs/samba/files/samba-4.9.1-fix_libsmbclient_h.patch b/net-fs/samba/files/samba-4.9.1-fix_libsmbclient_h.patch
295 new file mode 100644
296 index 0000000..0dfa95b
297 --- /dev/null
298 +++ b/net-fs/samba/files/samba-4.9.1-fix_libsmbclient_h.patch
299 @@ -0,0 +1,11 @@
300 +diff -Naur a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h
301 +--- a/source3/include/libsmbclient.h 2018-07-12 09:23:36.000000000 +0100
302 ++++ b/source3/include/libsmbclient.h 2018-09-26 10:38:41.504132564 +0100
303 +@@ -79,6 +79,7 @@
304 + #include <stdint.h>
305 + #include <fcntl.h>
306 + #include <utime.h>
307 ++#include <time.h>
308 +
309 + #define SMBC_BASE_FD 10000 /* smallest file descriptor returned */
310 +
311
312 diff --git a/net-fs/samba/files/samba-glibc-2.26-no_rpc.patch b/net-fs/samba/files/samba-glibc-2.26-no_rpc.patch
313 new file mode 100644
314 index 0000000..e664468
315 --- /dev/null
316 +++ b/net-fs/samba/files/samba-glibc-2.26-no_rpc.patch
317 @@ -0,0 +1,14 @@
318 +https://attachments.samba.org/attachment.cgi?id=13172
319 +https://bugs.gentoo.org/637320
320 +
321 +--- a/lib/replace/wscript
322 ++++ b/lib/replace/wscript
323 +@@ -71,7 +71,7 @@
324 + conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
325 + conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
326 +
327 +- conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
328 ++ conf.CHECK_CODE('ypstat s;', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
329 +
330 + conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
331 + conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')
332
333 diff --git a/net-fs/samba/files/samba.conf b/net-fs/samba/files/samba.conf
334 new file mode 100644
335 index 0000000..e0a6f32
336 --- /dev/null
337 +++ b/net-fs/samba/files/samba.conf
338 @@ -0,0 +1,2 @@
339 +D /run/samba 0755 root root
340 +D /run/lock/samba 0755 root root
341
342 diff --git a/net-fs/samba/files/samba.service b/net-fs/samba/files/samba.service
343 new file mode 100644
344 index 0000000..8214ff8
345 --- /dev/null
346 +++ b/net-fs/samba/files/samba.service
347 @@ -0,0 +1,10 @@
348 +[Unit]
349 +Description=Samba AD server
350 +After=network.target winbindd.service
351 +Conflicts=nmbd.service smbd.service
352 +
353 +[Service]
354 +ExecStart=/usr/sbin/samba --interactive
355 +
356 +[Install]
357 +WantedBy=multi-user.target
358
359 diff --git a/net-fs/samba/files/smbd.service b/net-fs/samba/files/smbd.service
360 new file mode 100644
361 index 0000000..5c006a4
362 --- /dev/null
363 +++ b/net-fs/samba/files/smbd.service
364 @@ -0,0 +1,12 @@
365 +[Unit]
366 +Description=Samba SMB/CIFS server
367 +After=network.target nmbd.service winbindd.service
368 +
369 +[Service]
370 +Type=forking
371 +PIDFile=/var/run/samba/smbd.pid
372 +ExecStart=/usr/sbin/smbd -D
373 +ExecReload=/bin/kill -HUP $MAINPID
374 +
375 +[Install]
376 +WantedBy=multi-user.target
377
378 diff --git a/net-fs/samba/files/smbd.socket b/net-fs/samba/files/smbd.socket
379 new file mode 100644
380 index 0000000..833bf43
381 --- /dev/null
382 +++ b/net-fs/samba/files/smbd.socket
383 @@ -0,0 +1,9 @@
384 +[Unit]
385 +Description=Samba SMB/CIFS server socket
386 +
387 +[Socket]
388 +ListenStream=445
389 +Accept=yes
390 +
391 +[Install]
392 +WantedBy=sockets.target
393
394 diff --git a/net-fs/samba/files/smbd_at.service b/net-fs/samba/files/smbd_at.service
395 new file mode 100644
396 index 0000000..e1f71be
397 --- /dev/null
398 +++ b/net-fs/samba/files/smbd_at.service
399 @@ -0,0 +1,7 @@
400 +[Unit]
401 +Description=Samba SMB/CIFS server instance
402 +
403 +[Service]
404 +ExecStart=/usr/sbin/smbd -F
405 +ExecReload=/bin/kill -HUP $MAINPID
406 +StandardInput=socket
407
408 diff --git a/net-fs/samba/files/talloc-disable-python.patch b/net-fs/samba/files/talloc-disable-python.patch
409 new file mode 100644
410 index 0000000..6ef45eb
411 --- /dev/null
412 +++ b/net-fs/samba/files/talloc-disable-python.patch
413 @@ -0,0 +1,34 @@
414 +--- a/lib/talloc/wscript 2017-04-28 04:57:26.000000000 -0400
415 ++++ b/lib/talloc/wscript 2017-07-05 14:30:42.700580464 -0400
416 +@@ -74,19 +74,22 @@
417 + implied_deps='replace'):
418 + conf.define('USING_SYSTEM_TALLOC', 1)
419 +
420 +- using_system_pytalloc_util = True
421 +- if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION,
422 +- implied_deps='talloc replace'):
423 ++ if conf.env.disable_python:
424 + using_system_pytalloc_util = False
425 +-
426 +- # We need to get a pytalloc-util for all the python versions
427 +- # we are building for
428 +- if conf.env['EXTRA_PYTHON']:
429 +- name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
430 +- if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
431 ++ else:
432 ++ using_system_pytalloc_util = True
433 ++ if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION,
434 + implied_deps='talloc replace'):
435 + using_system_pytalloc_util = False
436 +
437 ++ # We need to get a pytalloc-util for all the python versions
438 ++ # we are building for
439 ++ if conf.env['EXTRA_PYTHON']:
440 ++ name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
441 ++ if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
442 ++ implied_deps='talloc replace'):
443 ++ using_system_pytalloc_util = False
444 ++
445 + if using_system_pytalloc_util:
446 + conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1)
447 +
448
449 diff --git a/net-fs/samba/files/winbindd.service b/net-fs/samba/files/winbindd.service
450 new file mode 100644
451 index 0000000..67a778f
452 --- /dev/null
453 +++ b/net-fs/samba/files/winbindd.service
454 @@ -0,0 +1,12 @@
455 +[Unit]
456 +Description=Samba Winbind daemon
457 +After=network.target nmbd.service
458 +
459 +[Service]
460 +Type=forking
461 +PIDFile=/var/run/samba/winbindd.pid
462 +ExecStart=/usr/sbin/winbindd -D
463 +ExecReload=/bin/kill -HUP $MAINPID
464 +
465 +[Install]
466 +WantedBy=multi-user.target
467
468 diff --git a/net-fs/samba/metadata.xml b/net-fs/samba/metadata.xml
469 new file mode 100644
470 index 0000000..7796358
471 --- /dev/null
472 +++ b/net-fs/samba/metadata.xml
473 @@ -0,0 +1,32 @@
474 +<?xml version="1.0" encoding="UTF-8"?>
475 +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
476 +<pkgmetadata>
477 + <maintainer type="person">
478 + <email>samuelbernardo.mail@×××××.com</email>
479 + <name>Samuel Bernardo</name>
480 + </maintainer>
481 + <longdescription>
482 + Samba is an Open Source/Free Software suite that provides seamless file and print services to SMB/CIFS clients. Integration with various accounting and antivirus backends. License: GNU General Public License.
483 + </longdescription>
484 + <use>
485 + <flag name="addc">Enable Active Directory Domain Controller support</flag>
486 + <flag name="addns">Enable AD DNS integration</flag>
487 + <flag name="ads">Enable Active Directory support</flag>
488 + <flag name="ceph">Enable support for Ceph distributed filesystem via <pkg>sys-cluster/ceph</pkg></flag>
489 + <flag name="client">Enables the client part</flag>
490 + <flag name="cluster">Enable support for clustering</flag>
491 + <flag name="dmapi">Enable support for DMAPI. This currently works only in combination with XFS.</flag>
492 + <flag name="gpg">Use <pkg>app-crypt/gpgme</pkg> for AD DC</flag>
493 + <flag name="json">Enable json audit support through <pkg>dev-libs/jansson</pkg></flag>
494 + <flag name="iprint">Enabling iPrint technology by Novell</flag>
495 + <flag name="quota">Enables support for user quotas</flag>
496 + <flag name="system-heimdal">Use <pkg>app-crypt/heimdal</pkg> instead of
497 + bundled heimdal.</flag>
498 + <flag name="system-mitkrb5">Use <pkg>app-crypt/mit-krb5</pkg> instead of
499 + <pkg>app-crypt/heimdal</pkg>.</flag>
500 + <flag name="winbind">Enables support for the winbind auth daemon</flag>
501 + </use>
502 + <upstream>
503 + <remote-id type="cpe">cpe:/a:samba:samba</remote-id>
504 + </upstream>
505 +</pkgmetadata>
506
507 diff --git a/net-fs/samba/samba-4.9.1-r1.ebuild b/net-fs/samba/samba-4.9.1-r1.ebuild
508 new file mode 100644
509 index 0000000..0006388
510 --- /dev/null
511 +++ b/net-fs/samba/samba-4.9.1-r1.ebuild
512 @@ -0,0 +1,289 @@
513 +# Copyright 1999-2018 Gentoo Authors
514 +# Distributed under the terms of the GNU General Public License v2
515 +
516 +EAPI=6
517 +PYTHON_COMPAT=( python2_7 )
518 +PYTHON_REQ_USE='threads(+),xml(+)'
519 +
520 +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd
521 +
522 +MY_PV="${PV/_rc/rc}"
523 +MY_P="${PN}-${MY_PV}"
524 +
525 +SRC_PATH="stable"
526 +[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
527 +
528 +SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz"
529 +[[ ${PV} = *_rc* ]] || \
530 +KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~x86"
531 +
532 +DESCRIPTION="Samba Suite Version 4"
533 +HOMEPAGE="https://www.samba.org/"
534 +LICENSE="GPL-3"
535 +
536 +SLOT="0"
537 +
538 +IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg iprint json ldap
539 +pam python quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
540 +
541 +MULTILIB_WRAPPED_HEADERS=(
542 + /usr/include/samba-4.0/policy.h
543 + /usr/include/samba-4.0/dcerpc_server.h
544 + /usr/include/samba-4.0/ctdb.h
545 + /usr/include/samba-4.0/ctdb_client.h
546 + /usr/include/samba-4.0/ctdb_protocol.h
547 + /usr/include/samba-4.0/ctdb_private.h
548 + /usr/include/samba-4.0/ctdb_typesafe_cb.h
549 + /usr/include/samba-4.0/ctdb_version.h
550 +)
551 +
552 +# sys-apps/attr is an automagic dependency (see bug #489748)
553 +CDEPEND="
554 + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
555 + dev-lang/perl:=
556 + dev-libs/libaio[${MULTILIB_USEDEP}]
557 + dev-libs/libbsd[${MULTILIB_USEDEP}]
558 + dev-libs/iniparser:0
559 + dev-libs/popt[${MULTILIB_USEDEP}]
560 + dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
561 + >=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
562 + net-libs/libnsl:=[${MULTILIB_USEDEP}]
563 + sys-apps/attr[${MULTILIB_USEDEP}]
564 + >=sys-libs/ldb-1.4.2[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
565 + <sys-libs/ldb-1.5.0[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
566 + sys-libs/libcap
567 + sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
568 + sys-libs/readline:0=
569 + >=sys-libs/talloc-2.1.14[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
570 + >=sys-libs/tdb-1.3.16[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
571 + >=sys-libs/tevent-0.9.37[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
572 + sys-libs/zlib[${MULTILIB_USEDEP}]
573 + virtual/libiconv
574 + pam? ( virtual/pam )
575 + acl? ( virtual/acl )
576 + addns? (
577 + net-dns/bind-tools[gssapi]
578 + dev-python/dnspython:=[${PYTHON_USEDEP}]
579 + )
580 + ceph? ( sys-cluster/ceph )
581 + cluster? (
582 + net-libs/rpcsvc-proto
583 + !dev-db/ctdb
584 + )
585 + cups? ( net-print/cups )
586 + debug? ( dev-util/lttng-ust )
587 + dmapi? ( sys-apps/dmapi )
588 + fam? ( virtual/fam )
589 + gnutls? (
590 + dev-libs/libgcrypt:0
591 + >=net-libs/gnutls-1.4.0
592 + )
593 + gpg? ( app-crypt/gpgme )
594 + json? ( dev-libs/jansson )
595 + ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
596 + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
597 + system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
598 + systemd? ( sys-apps/systemd:0= )
599 +"
600 +DEPEND="${CDEPEND}
601 + ${PYTHON_DEPS}
602 + app-text/docbook-xsl-stylesheets
603 + dev-libs/libxslt
604 + net-libs/libtirpc[${MULTILIB_USEDEP}]
605 + virtual/pkgconfig
606 + || (
607 + net-libs/rpcsvc-proto
608 + <sys-libs/glibc-2.26[rpc(+)]
609 + )
610 + test? (
611 + !system-mitkrb5? (
612 + >=sys-libs/nss_wrapper-1.1.3
613 + >=net-dns/resolv_wrapper-1.1.4
614 + >=net-libs/socket_wrapper-1.1.7
615 + >=sys-libs/uid_wrapper-1.2.1
616 + )
617 + )"
618 +RDEPEND="${CDEPEND}
619 + python? ( ${PYTHON_DEPS} )
620 + client? ( net-fs/cifs-utils[ads?] )
621 + selinux? ( sec-policy/selinux-samba )
622 + !dev-perl/Parse-Yapp
623 +"
624 +
625 +REQUIRED_USE="
626 + addc? ( python gnutls json winbind )
627 + addns? ( python )
628 + ads? ( acl gnutls ldap winbind )
629 + cluster? ( ads )
630 + gpg? ( addc )
631 + test? ( python )
632 + ?? ( system-heimdal system-mitkrb5 )
633 + ${PYTHON_REQUIRED_USE}
634 +"
635 +
636 +# the test suite is messed, it uses system-installed samba
637 +# bits instead of what was built, tests things disabled via use
638 +# flags, and generally just fails to work in a way ebuilds could
639 +# rely on in its current state
640 +RESTRICT="test"
641 +
642 +S="${WORKDIR}/${MY_P}"
643 +
644 +PATCHES=(
645 + "${FILESDIR}/${PN}-4.4.0-pam.patch"
646 + "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
647 + "${FILESDIR}/${PN}-4.9.1-fix_libsmbclient_h.patch"
648 +)
649 +
650 +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
651 +CONFDIR="${FILESDIR}/4.4"
652 +
653 +WAF_BINARY="${S}/buildtools/bin/waf"
654 +
655 +SHAREDMODS=""
656 +
657 +pkg_setup() {
658 + python-single-r1_pkg_setup
659 + if use cluster ; then
660 + SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
661 + elif use ads ; then
662 + SHAREDMODS="idmap_ad"
663 + fi
664 +}
665 +
666 +src_prepare() {
667 + default
668 +
669 + # un-bundle dnspython
670 + sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
671 +
672 + # unbundle iso8601 unless tests are enabled
673 + use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
674 +
675 + # ugly hackaround for bug #592502
676 + cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
677 +
678 + sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
679 + -i source4/dsdb/samdb/ldb_modules/password_hash.c \
680 + || die
681 +
682 + # Friggin' WAF shit
683 + multilib_copy_sources
684 +}
685 +
686 +multilib_src_configure() {
687 + # when specifying libs for samba build you must append NONE to the end to
688 + # stop it automatically including things
689 + local bundled_libs="NONE"
690 + if ! use system-heimdal && ! use system-mitkrb5 ; then
691 + bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
692 + fi
693 +
694 + local myconf=(
695 + --enable-fhs
696 + --sysconfdir="${EPREFIX}/etc"
697 + --localstatedir="${EPREFIX}/var"
698 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
699 + --with-piddir="${EPREFIX}/run/${PN}"
700 + --bundled-libraries="${bundled_libs}"
701 + --builtin-libraries=NONE
702 + --disable-rpath
703 + --disable-rpath-install
704 + --nopyc
705 + --nopyo
706 + $(multilib_native_use_with acl acl-support)
707 + $(multilib_native_usex addc '' '--without-ad-dc')
708 + $(multilib_native_use_with addns dnsupdate)
709 + $(multilib_native_use_with ads)
710 + $(multilib_native_use_enable ceph cephfs)
711 + $(multilib_native_use_with cluster cluster-support)
712 + $(multilib_native_use_enable cups)
713 + $(multilib_native_use_with dmapi)
714 + $(multilib_native_use_with fam)
715 + $(multilib_native_use_with gpg gpgme)
716 + $(multilib_native_use_with json json-audit)
717 + $(multilib_native_use_enable iprint)
718 + $(multilib_native_use_with pam)
719 + $(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
720 + $(multilib_native_use_with quota quotas)
721 + $(multilib_native_use_with syslog)
722 + $(multilib_native_use_with systemd)
723 + $(multilib_native_use_with winbind)
724 + $(multilib_native_usex python '' '--disable-python')
725 + $(multilib_native_use_enable zeroconf avahi)
726 + $(multilib_native_usex test '--enable-selftest' '')
727 + $(usex system-mitkrb5 '--with-system-mitkrb5' '')
728 + $(use_enable gnutls)
729 + $(use_with debug lttng)
730 + $(use_with ldap)
731 + )
732 + multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} )
733 +
734 + CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
735 + waf-utils_src_configure ${myconf[@]}
736 +}
737 +
738 +multilib_src_compile() {
739 + waf-utils_src_compile
740 +}
741 +
742 +multilib_src_install() {
743 + waf-utils_src_install
744 +
745 + # Make all .so files executable
746 + find "${ED}" -type f -name "*.so" -exec chmod +x {} +
747 +
748 + if multilib_is_native_abi ; then
749 + # install ldap schema for server (bug #491002)
750 + if use ldap ; then
751 + insinto /etc/openldap/schema
752 + doins examples/LDAP/samba.schema
753 + fi
754 +
755 + # create symlink for cups (bug #552310)
756 + if use cups ; then
757 + dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
758 + fi
759 +
760 + # install example config file
761 + insinto /etc/samba
762 + doins examples/smb.conf.default
763 +
764 + # Fix paths in example file (#603964)
765 + sed \
766 + -e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
767 + -e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
768 + -e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
769 + -e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
770 + -e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
771 + -i "${ED%/}"/etc/samba/smb.conf.default || die
772 +
773 + # Install init script and conf.d file
774 + newinitd "${CONFDIR}/samba4.initd-r1" samba
775 + newconfd "${CONFDIR}/samba4.confd" samba
776 +
777 + systemd_dotmpfilesd "${FILESDIR}"/samba.conf
778 + systemd_dounit "${FILESDIR}"/nmbd.service
779 + systemd_dounit "${FILESDIR}"/smbd.{service,socket}
780 + systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
781 + systemd_dounit "${FILESDIR}"/winbindd.service
782 + systemd_dounit "${FILESDIR}"/samba.service
783 + fi
784 +}
785 +
786 +multilib_src_test() {
787 + if multilib_is_native_abi ; then
788 + "${WAF_BINARY}" test || die "test failed"
789 + fi
790 +}
791 +
792 +pkg_postinst() {
793 + ewarn "Be aware the this release contains the best of all of Samba's"
794 + ewarn "technology parts, both a file server (that you can reasonably expect"
795 + ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
796 + ewarn "controller work previously known as 'samba4'."
797 +
798 + elog "For further information and migration steps make sure to read "
799 + elog "https://samba.org/samba/history/${P}.html "
800 + elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
801 +}