public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/user/ssnb:master commit in: net-fs/samba/files/, net-fs/samba/, net-fs/samba/files/4.4/
@ 2018-09-26 10:08 Samuel Bernardo
  0 siblings, 0 replies; only message in thread
From: Samuel Bernardo @ 2018-09-26 10:08 UTC (permalink / raw
  To: gentoo-commits

commit:     ce857ba46c7c9584c4b81effa3ed9c8537a0ca8f
Author:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
AuthorDate: Wed Sep 26 10:08:22 2018 +0000
Commit:     Samuel Bernardo <samuelbernardo.mail <AT> gmail <DOT> com>
CommitDate: Wed Sep 26 10:08:22 2018 +0000
URL:        https://gitweb.gentoo.org/repo/user/ssnb.git/commit/?id=ce857ba4

add samba-4.9.1-r1 with necessary patch for ffmpeg

 net-fs/samba/Manifest                              |  18 ++
 net-fs/samba/files/4.4/samba4.confd                |  45 ++++
 net-fs/samba/files/4.4/samba4.initd-r1             |  55 ++++
 net-fs/samba/files/nmbd.service                    |  12 +
 net-fs/samba/files/samba-4.4.0-pam.patch           |  29 +++
 .../samba/files/samba-4.5.1-compile_et_fix.patch   |  16 ++
 .../files/samba-4.7.3-krb-cross-compile.patch      |  40 +++
 .../files/samba-4.9.1-fix_libsmbclient_h.patch     |  11 +
 net-fs/samba/files/samba-glibc-2.26-no_rpc.patch   |  14 +
 net-fs/samba/files/samba.conf                      |   2 +
 net-fs/samba/files/samba.service                   |  10 +
 net-fs/samba/files/smbd.service                    |  12 +
 net-fs/samba/files/smbd.socket                     |   9 +
 net-fs/samba/files/smbd_at.service                 |   7 +
 net-fs/samba/files/talloc-disable-python.patch     |  34 +++
 net-fs/samba/files/winbindd.service                |  12 +
 net-fs/samba/metadata.xml                          |  32 +++
 net-fs/samba/samba-4.9.1-r1.ebuild                 | 289 +++++++++++++++++++++
 18 files changed, 647 insertions(+)

diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest
new file mode 100644
index 0000000..351c81c
--- /dev/null
+++ b/net-fs/samba/Manifest
@@ -0,0 +1,18 @@
+AUX 4.4/samba4.confd 2035 BLAKE2B a9fa538a0b259c8a184012e0370819729e24fa971de52e3d3891107bd78e6d4e074a2df80b1c424c23229ce5e84ea1da908887c8fef88dd45104eb5c6eb0e4a5 SHA512 d6a7ae560621407b7a5f94db6489d6a85c5056f4212a2a9a24210eaeb585caf4f15801282d1b8682962c0cf5642766fe09cc70c48fffafd1560de615154503af
+AUX 4.4/samba4.initd-r1 1125 BLAKE2B 204a639069495cfd711bd1c9dcd78a480e07bca7b760efdec49061f093d7e41dc6ce16b9264cc4762094bb7a796dc96d71003668416d40948036bd6fcc944a2e SHA512 982771fd7e1d260d8d4305eb18a3c15871f535b700d2b9554af24df62286e59ce6c5c76ef4ffee7a751fc01040eefaaabad71b2f67e3749ba1ee97a368b14d5a
+AUX nmbd.service 224 BLAKE2B 499598b7e80f3dddbcc0b2d3ba217774cfcd7d87cc5287bdc75b8b616e039e235f2202e4c5275421ec018911e92680da923d9403f7bfc65e1995216f4c157fef SHA512 098dfb270c5a5c29f59b4fd8d51b17931771e25e481124832f1a086677825527e2afa7276e8614e5007fbf044d253ce2eaf3a7caf7461ad5d90d0b1c7f157f9d
+AUX samba-4.4.0-pam.patch 895 BLAKE2B bdc0601527a932424d55946b2eeaa288420ce90a8fd9be2271709da5c113625e80ae3783975b725c515004382bea65336ef725241079081cec213e81cc6e3056 SHA512 5a00c6131c372fc1cc9e23e4a37314442bf9af8e420a040a7b20ec3d76a357959d456437ed13e2e17f938eb6dcb4e7c5d899ff3d670526b0a444f63e35d5262c
+AUX samba-4.5.1-compile_et_fix.patch 762 BLAKE2B 432d8380e3511c3dbb408479d0152fb0760e9e487a3033718fa39b9ca4a87a04c9cf8ac41a4b9268020a1d41dee9efa5bde3f0e71498483102fcae80749ad62c SHA512 9605751653dcbbce41be807a9b4f8e5f657db6622f843e91c4df9c4b3e4ad621b6e8e3891f2b970208d55a80801355988f253e3c844ca51a658cd6de8c373e24
+AUX samba-4.7.3-krb-cross-compile.patch 1590 BLAKE2B 34cf304441731556556e40ed386f110dd8aa26a49680fa106b550edede86842e736c5652cd4aa54f0da7955600442cbc41350031dc8b67deae11f68050a6cf7c SHA512 0f762326f5b72d10e4c553630a8c4c433de884d80024c26e4f0e46b26bc24ac53c07642d833bb327f0010b7ee0ce2df05a94dc8868f3f363f68f9851b76265c5
+AUX samba-4.9.1-fix_libsmbclient_h.patch 400 BLAKE2B c490fdf389e426337cae6094791c0657d0703e6885a7e85520ff3aa75e35a845ef9cad0213a658f73f7b1eaafd737c15500d29db847ecb5cf20a42d0c07e753c SHA512 7376ac1130c047dd48c13c74a9f1193d6681ae9dadef4387b11e2b65574d49c41d5fed852942f48c36917a28b40d2000feda744232cf189cad950030d5682e26
+AUX samba-glibc-2.26-no_rpc.patch 631 BLAKE2B 22e414bcd329d7d32381c61ad4341de69a07235447dc4116855cca9ce99d32a5ffe111602fdf6ea02c6fe9c5b3331ecaec974faa5e22e009f15964296b53825a SHA512 18a466cbe42313f096ebeb635e5738b59672e96fd5c7db80cff5aa96c0edeb359b6833967bfac09eb5c010eec4309b3b73c0f941173b520918939974fa599541
+AUX samba.conf 61 BLAKE2B fff77908503f3718cdcf04b60eda6bf717fb37628107676ed66133da235af95ac91d6209f97830de7a5bfdee9e25f850334bb445ee22110d14eb82e1b399694c SHA512 4a75185762c90d110c399215fbfc939d30804b558ffdb11cc68dee6f87a94c86cadbcd63935884db1266cf40fe24fefb75f9067fe4751ad9838d7a43e8973b9e
+AUX samba.service 199 BLAKE2B 5949503c588684a48ab0a26f5811bb053d8527eb9da2ecc8b4bd911ea6d51969bc9607b14f3f72394127ff24967849d3e829a05b6584ba3f3de5e640d240c204 SHA512 eb277917f15de958f4a0404b66c6d2cc82ae4319b85f2f442489988d523bf92e2a9d23a6051ee693cd4bcfbc67947e8028c59906ad3e537578daf5caee8a6f16
+AUX smbd.service 250 BLAKE2B 70b1bf1dfb5f099ca9880d6eeee3996f6f69cc2744e07c577b396ac973326c60dd3874129c23fc0d53b7d3a50891a607d35781a8eda1702029c3602a212bb89a SHA512 a54e3c337f7c27766a81f68ad6d8f4eb6ddb1d1aec3303f274e419a49114755bc5dd711701d5e64954ae7153a8be4a7063371af286696c0b81d543b9276703c3
+AUX smbd.socket 121 BLAKE2B 1261742bb1cd586f376ccd1027a5c57754460bcaf7aed4b800ae8afeefb663a761cae38e89da56dfef06b9b82aaafa8d98f2f7d9fb45ca52652888ec92470618 SHA512 2db4a707fcc6ef1928ac010e5e92cdaf0f6ff3ffa8aef918e0db1ce910abfb481d6a19082337f9c8444cd780d1d442fa8df2bb65e6142fc109d29657532572ed
+AUX smbd_at.service 145 BLAKE2B 729dd189fc69ff33930ec96a68cff42438645ff7f3cf0a88f2bf12f56d6cb213f58c9699c19800bed429640218bba81fdb4009882fdf7bc84fc07d0e4634acc7 SHA512 e6486c35dfa6f77ad46547a78fcae55fb71e4dad7dc7b4580c2b8c1be232c0a870f56714b2b103a1fd8717298f41347d7178fbebb90f0f2d0324fe5233f0f9f3
+AUX talloc-disable-python.patch 1706 BLAKE2B cc447f5077c82d7eb584692121b9b34c03afb5f7dda2b799ea518d08421d31ce54fe2422c5ca7efe74f66011951c97b171a326604bd67446a15ad2849bade919 SHA512 ac0bf82e8ed8b918a5efbdeb0a6cbaaef22bb72231abb09026637d62b8ce35b25212960d26c07abe63661328ab7ea8a82590cd93f04de583e23239211daf6efa
+AUX winbindd.service 240 BLAKE2B f0b96a5a1d93a3c04bb2a2b2b500718b41fc907a3c551827a459c5d8184abc3caed0ac5edcf16032650dc2d58c38b779473c7a619047956f1381415e3de4dd93 SHA512 f1ce6d035e8e0fcdc73f14e3b60c9647043777ff6b2a982a81ed07eb4df5ff245a9511e3e4a9d8163f9c8f3fb86d2a39a67621ace68392eb7c2f2e2a55d587f7
+DIST samba-4.9.1.tar.gz 18018259 BLAKE2B 783423098864c391f08b30e05b70308e922bdb4dad08b8b0b4d1112808357b9bb96aad7a094d0fe2e308f84a143d5f90be523b9c3551a3068ecdcad7347613f6 SHA512 267673b6d6ab0db59063480c20f02e5864ef96e9ad1097c23a99b2ab4b5fd2252193d7a152729b40cae0751fb9b0b108b087a190f5db11eabbd075224bd6e663
+EBUILD samba-4.9.1-r1.ebuild 8522 BLAKE2B 0de209337ad7838bff0262a2db67f9d26e2aee16ef2a1a73250943ea14c9b176f450d2004a79f552682a655f383ad596f644f6efa4c4eed6e29dca44c80c2792 SHA512 4c0fc66120050cca3578eb8d9e1e72d4ea5118b4cafb34769cbeb5cc65982f8d26a4800c059cf63392469b7c96c20b7ea3faa73703a659be2251a29e76100dc7
+MISC metadata.xml 1690 BLAKE2B d3bea05fc86c05786fe98d7298e00f91c1af33bc7c9a6ba19155bf6831a3e67318df9970baac12e67c666fd7cec8baebea50f08b178200887c05c42192b6345b SHA512 fdde3409c3455f5d6af4fd2484702178ee29e1583159ede7acd57083fca52be5811013160149449a38d0049f9c3f5327790c696963071afd34a2121223a39a06

diff --git a/net-fs/samba/files/4.4/samba4.confd b/net-fs/samba/files/4.4/samba4.confd
new file mode 100644
index 0000000..629a605
--- /dev/null
+++ b/net-fs/samba/files/4.4/samba4.confd
@@ -0,0 +1,45 @@
+# Add "winbind" to the daemon_list if you also want winbind to start.
+# Replace "smbd nmbd" by "samba4" if you want the active directory domain controller part or the ntvfs
+# file server part or the rpc proxy to start.
+# Note that samba4 controls 'smbd' by itself, thus it can't be started manually. You can, however,
+# tweak the behaviour of a samba4-controlled smbd by modifying your '/etc/samba/smb.conf' file
+# accordingly.
+daemon_list="smbd nmbd"
+
+piddir="/run/samba"
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+my_service_name="samba"
+my_service_PRE="unset TMP TMPDIR"
+my_service_POST=""
+
+#----------------------------------------------------------------------------
+# Daemons calls: <daemon_name>_<command_option>
+#----------------------------------------------------------------------------
+smbd_start_options="-D"
+smbd_command="/usr/sbin/smbd"
+smbd_start="start-stop-daemon --start --exec ${smbd_command} -- ${smbd_start_options}"
+smbd_stop="start-stop-daemon --stop --exec ${smbd_command}"
+smbd_reload="killall -HUP smbd"
+
+nmbd_start_options="-D"
+nmbd_command="/usr/sbin/nmbd"
+nmbd_start="start-stop-daemon --start --exec ${nmbd_command} -- ${nmbd_start_options}"
+nmbd_stop="start-stop-daemon --stop --exec ${nmbd_command}"
+nmbd_reload="killall -HUP nmbd"
+
+samba4_start_options=""
+samba4_command="/usr/sbin/samba"
+samba4_pidfile="${piddir}/samba.pid"
+samba4_start="start-stop-daemon --start --exec ${samba4_command} --pidfile ${samba4_pidfile} -- ${samba4_start_options}"
+samba4_stop="start-stop-daemon --stop --exec ${samba4_command} --pidfile ${samba4_pidfile}"
+samba4_reload="killall -HUP samba"
+
+winbind_start_options=""
+winbind_command="/usr/sbin/winbindd"
+winbind_start="start-stop-daemon --start --exec ${winbind_command} -- ${winbind_start_options}"
+winbind_stop="start-stop-daemon --stop --exec ${winbind_command}"
+winbind_reload="killall -HUP winbindd"
+

diff --git a/net-fs/samba/files/4.4/samba4.initd-r1 b/net-fs/samba/files/4.4/samba4.initd-r1
new file mode 100644
index 0000000..05bd1fc
--- /dev/null
+++ b/net-fs/samba/files/4.4/samba4.initd-r1
@@ -0,0 +1,55 @@
+#!/sbin/openrc-run
+# Copyright 1999-2018 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License, v2 or later
+
+extra_started_commands="reload"
+[ -z "${piddir}" ] && piddir="/run/samba"
+
+depend() {
+	after slapd
+	need net
+	use cupsd
+}
+
+DAEMONNAME="${SVCNAME##samba.}"
+[ "${DAEMONNAME}" != "samba" ] && daemon_list=${DAEMONNAME}
+
+signal_do() {
+	local signal="$1"
+	[ -z "${signal}" ] && return 0
+
+	local result=0 last_result=0 daemon= cmd_exec=
+	for daemon in ${daemon_list} ; do
+		eval cmd_exec=\$${daemon}_${signal}
+		if [ -n "${cmd_exec}" ]; then
+			ebegin "${my_service_name} -> ${signal}: ${daemon}"
+			#echo ${cmd} '->' ${!cmd}
+			${cmd_exec} > /dev/null
+			last_result=$?
+			eend ${last_result}
+		fi
+		result=$(( ${result} + ${last_result} ))
+	done
+	return ${result}
+}
+
+start() {
+	${my_service_PRE}
+	[ -d "${piddir}" ] || mkdir -p "${piddir}"
+	signal_do start && return 0
+
+	eerror "Error: starting services (see system logs)"
+	signal_do stop
+	return 1
+}
+stop() {
+	${my_service_PRE}
+	if signal_do stop ; then
+		${my_service_POST}
+		return 0
+	fi
+}
+reload() {
+	${my_service_PRE}
+	signal_do reload
+}

diff --git a/net-fs/samba/files/nmbd.service b/net-fs/samba/files/nmbd.service
new file mode 100644
index 0000000..44b4ffb
--- /dev/null
+++ b/net-fs/samba/files/nmbd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Samba NetBIOS name server
+After=network.target
+
+[Service]
+Type=forking
+PIDFile=/var/run/samba/nmbd.pid
+ExecStart=/usr/sbin/nmbd -D 
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-fs/samba/files/samba-4.4.0-pam.patch b/net-fs/samba/files/samba-4.4.0-pam.patch
new file mode 100644
index 0000000..4516013
--- /dev/null
+++ b/net-fs/samba/files/samba-4.4.0-pam.patch
@@ -0,0 +1,29 @@
+--- samba-4.4.0rc2/source3/wscript
++++ samba-4.4.0rc2/source3/wscript
+@@ -870,7 +870,7 @@
+         if conf.env.with_iconv:
+             conf.DEFINE('HAVE_ICONV', 1)
+ 
+-    if Options.options.with_pam:
++    if Options.options.with_pam != False:
+         use_pam=True
+         conf.CHECK_HEADERS('security/pam_appl.h pam/pam_appl.h')
+         if not conf.CONFIG_SET('HAVE_SECURITY_PAM_APPL_H') and not conf.CONFIG_SET('HAVE_PAM_PAM_APPL_H'):
+@@ -943,6 +943,17 @@
+             conf.DEFINE('WITH_PAM', 1)
+             conf.DEFINE('WITH_PAM_MODULES', 1)
+ 
++    else:
++        Logs.warn("PAM disabled")
++        use_pam=False
++        conf.undefine('WITH_PAM')
++        conf.undefine('WITH_PAM_MODULES')
++        conf.undefine('HAVE_SECURITY_PAM_APPL_H')
++        conf.undefine('PAM_RHOST')
++        conf.undefine('PAM_TTY')
++        conf.undefine('HAVE_PAM_PAM_APPL_H')
++
++
+     seteuid = False
+ 
+ #

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
new file mode 100644
index 0000000..463512f
--- /dev/null
+++ b/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch
@@ -0,0 +1,16 @@
+--- samba-4.5.1/source4/heimdal_build/wscript_configure
++++ samba-4.5.1/source4/heimdal_build/wscript_configure
+@@ -258,7 +258,11 @@
+ 
+ # With the proper checks in place we should be able to build against the system libtommath.
+ #if conf.CHECK_BUNDLED_SYSTEM('tommath', checkfunctions='mp_init', headers='tommath.h'):
+ #    conf.define('USING_SYSTEM_TOMMATH', 1)
+ 
+-check_system_heimdal_binary("compile_et")
+-check_system_heimdal_binary("asn1_compile")
++# comment out next line to stop Gentoo Samba build from using the compile_et in e2fsprogs-libs
++# to compile the error tables. This produces a compile error later on.
++#check_system_heimdal_binary("compile_et")
++#
++# As a precaution do the same for asn1_compile
++#check_system_heimdal_binary("asn1_compile")

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
new file mode 100644
index 0000000..9fad9fc
--- /dev/null
+++ b/net-fs/samba/files/samba-4.7.3-krb-cross-compile.patch
@@ -0,0 +1,40 @@
+https://lists.samba.org/archive/samba-technical/2017-December/124344.html
+https://git.samba.org/?p=samba.git;a=commit;h=70f92025ae504cda97ff3a130f19035450967836
+
+From 70f92025ae504cda97ff3a130f19035450967836 Mon Sep 17 00:00:00 2001
+From: Zentaro Kavanagh <zentaro@chromium.org>
+Date: Mon, 11 Dec 2017 12:41:16 -0800
+Subject: [PATCH] Remove unsupported colon from configure msg.
+
+- When cross-compiling an answers file must be supplied via
+  --cross-compile --cross-answers=<path to answers>.
+- The lines in the answer file have the form;
+    Config Msg: Answer
+- The colon is used to delimit the msg and the answer when reading
+  the answers file.
+- WAF doesn't support the message containing a colon.
+- It's not possible to override this variable so cross compile fails.
+
+Signed-off-by: Zentaro Kavanagh <zentaro@google.com>
+Reviewed-by: Uri Simchoni <uri@samba.org>
+Reviewed-by: Andrew Bartlett <abartlet@samba.org>
+---
+ wscript_configure_system_mitkrb5 | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/wscript_configure_system_mitkrb5 b/wscript_configure_system_mitkrb5
+index 9c351131ad1a..803dad7ab63b 100644
+--- a/wscript_configure_system_mitkrb5
++++ b/wscript_configure_system_mitkrb5
+@@ -282,7 +282,7 @@ conf.CHECK_CODE('''
+        ''',
+     'HAVE_WRFILE_KEYTAB',
+     headers='krb5.h', lib='krb5', execute=True,
+-    msg="Checking whether the WRFILE:-keytab is supported");
++    msg="Checking whether the WRFILE -keytab is supported");
+ # Check for KRB5_DEPRECATED handling
+ conf.CHECK_CODE('''#define KRB5_DEPRECATED 1
+        #include <krb5.h>''',
+-- 
+2.15.1
+

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
new file mode 100644
index 0000000..0dfa95b
--- /dev/null
+++ b/net-fs/samba/files/samba-4.9.1-fix_libsmbclient_h.patch
@@ -0,0 +1,11 @@
+diff -Naur a/source3/include/libsmbclient.h b/source3/include/libsmbclient.h
+--- a/source3/include/libsmbclient.h	2018-07-12 09:23:36.000000000 +0100
++++ b/source3/include/libsmbclient.h	2018-09-26 10:38:41.504132564 +0100
+@@ -79,6 +79,7 @@
+ #include <stdint.h>
+ #include <fcntl.h>
+ #include <utime.h>
++#include <time.h>
+ 
+ #define SMBC_BASE_FD        10000 /* smallest file descriptor returned */
+ 

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
new file mode 100644
index 0000000..e664468
--- /dev/null
+++ b/net-fs/samba/files/samba-glibc-2.26-no_rpc.patch
@@ -0,0 +1,14 @@
+https://attachments.samba.org/attachment.cgi?id=13172
+https://bugs.gentoo.org/637320
+
+--- a/lib/replace/wscript
++++ b/lib/replace/wscript
+@@ -71,7 +71,7 @@
+     conf.CHECK_HEADERS('sys/fileio.h sys/filesys.h sys/dustat.h sys/sysmacros.h')
+     conf.CHECK_HEADERS('xfs/libxfs.h netgroup.h')
+ 
+-    conf.CHECK_CODE('', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
++    conf.CHECK_CODE('ypstat s;', headers='rpc/rpc.h rpcsvc/yp_prot.h', define='HAVE_RPCSVC_YP_PROT_H')
+ 
+     conf.CHECK_HEADERS('valgrind.h valgrind/valgrind.h valgrind/memcheck.h')
+     conf.CHECK_HEADERS('nss_common.h nsswitch.h ns_api.h')

diff --git a/net-fs/samba/files/samba.conf b/net-fs/samba/files/samba.conf
new file mode 100644
index 0000000..e0a6f32
--- /dev/null
+++ b/net-fs/samba/files/samba.conf
@@ -0,0 +1,2 @@
+D /run/samba 0755 root root
+D /run/lock/samba 0755 root root

diff --git a/net-fs/samba/files/samba.service b/net-fs/samba/files/samba.service
new file mode 100644
index 0000000..8214ff8
--- /dev/null
+++ b/net-fs/samba/files/samba.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Samba AD server
+After=network.target winbindd.service
+Conflicts=nmbd.service smbd.service
+
+[Service]
+ExecStart=/usr/sbin/samba --interactive 
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-fs/samba/files/smbd.service b/net-fs/samba/files/smbd.service
new file mode 100644
index 0000000..5c006a4
--- /dev/null
+++ b/net-fs/samba/files/smbd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Samba SMB/CIFS server
+After=network.target nmbd.service winbindd.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/samba/smbd.pid
+ExecStart=/usr/sbin/smbd -D 
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-fs/samba/files/smbd.socket b/net-fs/samba/files/smbd.socket
new file mode 100644
index 0000000..833bf43
--- /dev/null
+++ b/net-fs/samba/files/smbd.socket
@@ -0,0 +1,9 @@
+[Unit]
+Description=Samba SMB/CIFS server socket
+
+[Socket]
+ListenStream=445
+Accept=yes
+
+[Install]
+WantedBy=sockets.target

diff --git a/net-fs/samba/files/smbd_at.service b/net-fs/samba/files/smbd_at.service
new file mode 100644
index 0000000..e1f71be
--- /dev/null
+++ b/net-fs/samba/files/smbd_at.service
@@ -0,0 +1,7 @@
+[Unit]
+Description=Samba SMB/CIFS server instance
+
+[Service]
+ExecStart=/usr/sbin/smbd -F
+ExecReload=/bin/kill -HUP $MAINPID
+StandardInput=socket

diff --git a/net-fs/samba/files/talloc-disable-python.patch b/net-fs/samba/files/talloc-disable-python.patch
new file mode 100644
index 0000000..6ef45eb
--- /dev/null
+++ b/net-fs/samba/files/talloc-disable-python.patch
@@ -0,0 +1,34 @@
+--- a/lib/talloc/wscript	2017-04-28 04:57:26.000000000 -0400
++++ b/lib/talloc/wscript	2017-07-05 14:30:42.700580464 -0400
+@@ -74,19 +74,22 @@
+                                      implied_deps='replace'):
+             conf.define('USING_SYSTEM_TALLOC', 1)
+ 
+-        using_system_pytalloc_util = True
+-        if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION,
+-                                             implied_deps='talloc replace'):
++        if conf.env.disable_python:
+             using_system_pytalloc_util = False
+-
+-        # We need to get a pytalloc-util for all the python versions
+-        # we are building for
+-        if conf.env['EXTRA_PYTHON']:
+-            name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
+-            if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
++        else:
++            using_system_pytalloc_util = True
++            if not conf.CHECK_BUNDLED_SYSTEM_PKG('pytalloc-util', minversion=VERSION,
+                                                  implied_deps='talloc replace'):
+                 using_system_pytalloc_util = False
+ 
++            # We need to get a pytalloc-util for all the python versions
++            # we are building for
++            if conf.env['EXTRA_PYTHON']:
++                name = 'pytalloc-util' + conf.all_envs['extrapython']['PYTHON_SO_ABI_FLAG']
++                if not conf.CHECK_BUNDLED_SYSTEM_PKG(name, minversion=VERSION,
++                                                     implied_deps='talloc replace'):
++                    using_system_pytalloc_util = False
++
+         if using_system_pytalloc_util:
+             conf.define('USING_SYSTEM_PYTALLOC_UTIL', 1)
+ 

diff --git a/net-fs/samba/files/winbindd.service b/net-fs/samba/files/winbindd.service
new file mode 100644
index 0000000..67a778f
--- /dev/null
+++ b/net-fs/samba/files/winbindd.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Samba Winbind daemon
+After=network.target nmbd.service
+
+[Service]
+Type=forking
+PIDFile=/var/run/samba/winbindd.pid
+ExecStart=/usr/sbin/winbindd -D 
+ExecReload=/bin/kill -HUP $MAINPID
+
+[Install]
+WantedBy=multi-user.target

diff --git a/net-fs/samba/metadata.xml b/net-fs/samba/metadata.xml
new file mode 100644
index 0000000..7796358
--- /dev/null
+++ b/net-fs/samba/metadata.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>samuelbernardo.mail@gmail.com</email>
+		<name>Samuel Bernardo</name>
+	</maintainer>
+	<longdescription>
+		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.
+	</longdescription>
+	<use>
+		<flag name="addc">Enable Active Directory Domain Controller support</flag>
+		<flag name="addns">Enable AD DNS integration</flag>
+		<flag name="ads">Enable Active Directory support</flag>
+		<flag name="ceph">Enable support for Ceph distributed filesystem via <pkg>sys-cluster/ceph</pkg></flag>
+		<flag name="client">Enables the client part</flag>
+		<flag name="cluster">Enable support for clustering</flag>
+		<flag name="dmapi">Enable support for DMAPI. This currently works only in combination with XFS.</flag>
+		<flag name="gpg">Use <pkg>app-crypt/gpgme</pkg> for AD DC</flag>
+		<flag name="json">Enable json audit support through <pkg>dev-libs/jansson</pkg></flag>
+		<flag name="iprint">Enabling iPrint technology by Novell</flag>
+		<flag name="quota">Enables support for user quotas</flag>
+		<flag name="system-heimdal">Use <pkg>app-crypt/heimdal</pkg> instead of
+			bundled heimdal.</flag>
+		<flag name="system-mitkrb5">Use <pkg>app-crypt/mit-krb5</pkg> instead of
+			<pkg>app-crypt/heimdal</pkg>.</flag>
+		<flag name="winbind">Enables support for the winbind auth daemon</flag>
+	</use>
+	<upstream>
+		<remote-id type="cpe">cpe:/a:samba:samba</remote-id>
+	</upstream>
+</pkgmetadata>

diff --git a/net-fs/samba/samba-4.9.1-r1.ebuild b/net-fs/samba/samba-4.9.1-r1.ebuild
new file mode 100644
index 0000000..0006388
--- /dev/null
+++ b/net-fs/samba/samba-4.9.1-r1.ebuild
@@ -0,0 +1,289 @@
+# Copyright 1999-2018 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 )
+PYTHON_REQ_USE='threads(+),xml(+)'
+
+inherit python-single-r1 waf-utils multilib-minimal linux-info systemd
+
+MY_PV="${PV/_rc/rc}"
+MY_P="${PN}-${MY_PV}"
+
+SRC_PATH="stable"
+[[ ${PV} = *_rc* ]] && SRC_PATH="rc"
+
+SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz"
+[[ ${PV} = *_rc* ]] || \
+KEYWORDS="~amd64 ~arm64 ~hppa ~ia64 ~x86"
+
+DESCRIPTION="Samba Suite Version 4"
+HOMEPAGE="https://www.samba.org/"
+LICENSE="GPL-3"
+
+SLOT="0"
+
+IUSE="acl addc addns ads ceph client cluster cups debug dmapi fam gnutls gpg iprint json ldap
+pam python quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf"
+
+MULTILIB_WRAPPED_HEADERS=(
+	/usr/include/samba-4.0/policy.h
+	/usr/include/samba-4.0/dcerpc_server.h
+	/usr/include/samba-4.0/ctdb.h
+	/usr/include/samba-4.0/ctdb_client.h
+	/usr/include/samba-4.0/ctdb_protocol.h
+	/usr/include/samba-4.0/ctdb_private.h
+	/usr/include/samba-4.0/ctdb_typesafe_cb.h
+	/usr/include/samba-4.0/ctdb_version.h
+)
+
+# sys-apps/attr is an automagic dependency (see bug #489748)
+CDEPEND="
+	>=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}]
+	dev-lang/perl:=
+	dev-libs/libaio[${MULTILIB_USEDEP}]
+	dev-libs/libbsd[${MULTILIB_USEDEP}]
+	dev-libs/iniparser:0
+	dev-libs/popt[${MULTILIB_USEDEP}]
+	dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+	>=dev-util/cmocka-1.1.1[${MULTILIB_USEDEP}]
+	net-libs/libnsl:=[${MULTILIB_USEDEP}]
+	sys-apps/attr[${MULTILIB_USEDEP}]
+	>=sys-libs/ldb-1.4.2[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+	<sys-libs/ldb-1.5.0[ldap(+)?,python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+	sys-libs/libcap
+	sys-libs/ncurses:0=[${MULTILIB_USEDEP}]
+	sys-libs/readline:0=
+	>=sys-libs/talloc-2.1.14[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+	>=sys-libs/tdb-1.3.16[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+	>=sys-libs/tevent-0.9.37[python?,${PYTHON_USEDEP},${MULTILIB_USEDEP}]
+	sys-libs/zlib[${MULTILIB_USEDEP}]
+	virtual/libiconv
+	pam? ( virtual/pam )
+	acl? ( virtual/acl )
+	addns? (
+		net-dns/bind-tools[gssapi]
+		dev-python/dnspython:=[${PYTHON_USEDEP}]
+	)
+	ceph? ( sys-cluster/ceph )
+	cluster? (
+		net-libs/rpcsvc-proto
+		!dev-db/ctdb
+	)
+	cups? ( net-print/cups )
+	debug? ( dev-util/lttng-ust )
+	dmapi? ( sys-apps/dmapi )
+	fam? ( virtual/fam )
+	gnutls? (
+		dev-libs/libgcrypt:0
+		>=net-libs/gnutls-1.4.0
+	)
+	gpg? ( app-crypt/gpgme )
+	json? ( dev-libs/jansson )
+	ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] )
+	system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] )
+	system-mitkrb5? ( >=app-crypt/mit-krb5-1.15.1[${MULTILIB_USEDEP}] )
+	systemd? ( sys-apps/systemd:0= )
+"
+DEPEND="${CDEPEND}
+	${PYTHON_DEPS}
+	app-text/docbook-xsl-stylesheets
+	dev-libs/libxslt
+	net-libs/libtirpc[${MULTILIB_USEDEP}]
+	virtual/pkgconfig
+	|| (
+		net-libs/rpcsvc-proto
+		<sys-libs/glibc-2.26[rpc(+)]
+	)
+	test? (
+		!system-mitkrb5? (
+			>=sys-libs/nss_wrapper-1.1.3
+			>=net-dns/resolv_wrapper-1.1.4
+			>=net-libs/socket_wrapper-1.1.7
+			>=sys-libs/uid_wrapper-1.2.1
+		)
+	)"
+RDEPEND="${CDEPEND}
+	python? ( ${PYTHON_DEPS} )
+	client? ( net-fs/cifs-utils[ads?] )
+	selinux? ( sec-policy/selinux-samba )
+	!dev-perl/Parse-Yapp
+"
+
+REQUIRED_USE="
+	addc? ( python gnutls json winbind )
+	addns? ( python )
+	ads? ( acl gnutls ldap winbind )
+	cluster? ( ads )
+	gpg? ( addc )
+	test? ( python )
+	?? ( system-heimdal system-mitkrb5 )
+	${PYTHON_REQUIRED_USE}
+"
+
+# the test suite is messed, it uses system-installed samba
+# bits instead of what was built, tests things disabled via use
+# flags, and generally just fails to work in a way ebuilds could
+# rely on in its current state
+RESTRICT="test"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=(
+	"${FILESDIR}/${PN}-4.4.0-pam.patch"
+	"${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch"
+	"${FILESDIR}/${PN}-4.9.1-fix_libsmbclient_h.patch"
+)
+
+#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)"
+CONFDIR="${FILESDIR}/4.4"
+
+WAF_BINARY="${S}/buildtools/bin/waf"
+
+SHAREDMODS=""
+
+pkg_setup() {
+	python-single-r1_pkg_setup
+	if use cluster ; then
+		SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad"
+	elif use ads ; then
+		SHAREDMODS="idmap_ad"
+	fi
+}
+
+src_prepare() {
+	default
+
+	# un-bundle dnspython
+	sed -i -e '/"dns.resolver":/d' "${S}"/third_party/wscript || die
+
+	# unbundle iso8601 unless tests are enabled
+	use test || sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die
+
+	# ugly hackaround for bug #592502
+	cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die
+
+	sed -e 's:<gpgme\.h>:<gpgme/gpgme.h>:' \
+		-i source4/dsdb/samdb/ldb_modules/password_hash.c \
+		|| die
+
+	# Friggin' WAF shit
+	multilib_copy_sources
+}
+
+multilib_src_configure() {
+	# when specifying libs for samba build you must append NONE to the end to
+	# stop it automatically including things
+	local bundled_libs="NONE"
+	if ! use system-heimdal && ! use system-mitkrb5 ; then
+		bundled_libs="heimbase,heimntlm,hdb,kdc,krb5,wind,gssapi,hcrypto,hx509,roken,asn1,com_err,NONE"
+	fi
+
+	local myconf=(
+		--enable-fhs
+		--sysconfdir="${EPREFIX}/etc"
+		--localstatedir="${EPREFIX}/var"
+		--with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba"
+		--with-piddir="${EPREFIX}/run/${PN}"
+		--bundled-libraries="${bundled_libs}"
+		--builtin-libraries=NONE
+		--disable-rpath
+		--disable-rpath-install
+		--nopyc
+		--nopyo
+		$(multilib_native_use_with acl acl-support)
+		$(multilib_native_usex addc '' '--without-ad-dc')
+		$(multilib_native_use_with addns dnsupdate)
+		$(multilib_native_use_with ads)
+		$(multilib_native_use_enable ceph cephfs)
+		$(multilib_native_use_with cluster cluster-support)
+		$(multilib_native_use_enable cups)
+		$(multilib_native_use_with dmapi)
+		$(multilib_native_use_with fam)
+		$(multilib_native_use_with gpg gpgme)
+		$(multilib_native_use_with json json-audit)
+		$(multilib_native_use_enable iprint)
+		$(multilib_native_use_with pam)
+		$(multilib_native_usex pam "--with-pammodulesdir=${EPREFIX}/$(get_libdir)/security" '')
+		$(multilib_native_use_with quota quotas)
+		$(multilib_native_use_with syslog)
+		$(multilib_native_use_with systemd)
+		$(multilib_native_use_with winbind)
+		$(multilib_native_usex python '' '--disable-python')
+		$(multilib_native_use_enable zeroconf avahi)
+		$(multilib_native_usex test '--enable-selftest' '')
+		$(usex system-mitkrb5 '--with-system-mitkrb5' '')
+		$(use_enable gnutls)
+		$(use_with debug lttng)
+		$(use_with ldap)
+	)
+	multilib_is_native_abi && myconf+=( --with-shared-modules=${SHAREDMODS} )
+
+	CPPFLAGS="-I${SYSROOT}${EPREFIX}/usr/include/et ${CPPFLAGS}" \
+		waf-utils_src_configure ${myconf[@]}
+}
+
+multilib_src_compile() {
+	waf-utils_src_compile
+}
+
+multilib_src_install() {
+	waf-utils_src_install
+
+	# Make all .so files executable
+	find "${ED}" -type f -name "*.so" -exec chmod +x {} +
+
+	if multilib_is_native_abi ; then
+		# install ldap schema for server (bug #491002)
+		if use ldap ; then
+			insinto /etc/openldap/schema
+			doins examples/LDAP/samba.schema
+		fi
+
+		# create symlink for cups (bug #552310)
+		if use cups ; then
+			dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb
+		fi
+
+		# install example config file
+		insinto /etc/samba
+		doins examples/smb.conf.default
+
+		# Fix paths in example file (#603964)
+		sed \
+			-e '/log file =/s@/usr/local/samba/var/@/var/log/samba/@' \
+			-e '/include =/s@/usr/local/samba/lib/@/etc/samba/@' \
+			-e '/path =/s@/usr/local/samba/lib/@/var/lib/samba/@' \
+			-e '/path =/s@/usr/local/samba/@/var/lib/samba/@' \
+			-e '/path =/s@/usr/spool/samba@/var/spool/samba@' \
+			-i "${ED%/}"/etc/samba/smb.conf.default || die
+
+		# Install init script and conf.d file
+		newinitd "${CONFDIR}/samba4.initd-r1" samba
+		newconfd "${CONFDIR}/samba4.confd" samba
+
+		systemd_dotmpfilesd "${FILESDIR}"/samba.conf
+		systemd_dounit "${FILESDIR}"/nmbd.service
+		systemd_dounit "${FILESDIR}"/smbd.{service,socket}
+		systemd_newunit "${FILESDIR}"/smbd_at.service 'smbd@.service'
+		systemd_dounit "${FILESDIR}"/winbindd.service
+		systemd_dounit "${FILESDIR}"/samba.service
+	fi
+}
+
+multilib_src_test() {
+	if multilib_is_native_abi ; then
+		"${WAF_BINARY}" test || die "test failed"
+	fi
+}
+
+pkg_postinst() {
+	ewarn "Be aware the this release contains the best of all of Samba's"
+	ewarn "technology parts, both a file server (that you can reasonably expect"
+	ewarn "to upgrade existing Samba 3.x releases to) and the AD domain"
+	ewarn "controller work previously known as 'samba4'."
+
+	elog "For further information and migration steps make sure to read "
+	elog "https://samba.org/samba/history/${P}.html "
+	elog "https://wiki.samba.org/index.php/Samba4/HOWTO "
+}


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-09-26 10:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-26 10:08 [gentoo-commits] repo/user/ssnb:master commit in: net-fs/samba/files/, net-fs/samba/, net-fs/samba/files/4.4/ Samuel Bernardo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox