summaryrefslogtreecommitdiff
path: root/packages/net-fs/samba
diff options
context:
space:
mode:
Diffstat (limited to 'packages/net-fs/samba')
-rw-r--r--packages/net-fs/samba/files/a222b7506b53e689708834237f18877231dca589.patch43
-rw-r--r--packages/net-fs/samba/samba-4.8.2.exheres-011
-rw-r--r--packages/net-fs/samba/samba-scm.exheres-010
-rw-r--r--packages/net-fs/samba/samba.exlib252
4 files changed, 316 insertions, 0 deletions
diff --git a/packages/net-fs/samba/files/a222b7506b53e689708834237f18877231dca589.patch b/packages/net-fs/samba/files/a222b7506b53e689708834237f18877231dca589.patch
new file mode 100644
index 0000000..8bcbf3d
--- /dev/null
+++ b/packages/net-fs/samba/files/a222b7506b53e689708834237f18877231dca589.patch
@@ -0,0 +1,43 @@
+From a222b7506b53e689708834237f18877231dca589 Mon Sep 17 00:00:00 2001
+From: Volker Lendecke <vl@samba.org>
+Date: Sat, 3 Feb 2018 07:07:55 +0100
+Upstream: yes, in master
+Subject: [PATCH] libgpo: Fix the build --without-ads
+
+Signed-off-by: Volker Lendecke <vl@samba.org>
+Reviewed-by: David Disseldorp <ddiss@samba.org>
+
+Autobuild-User(master): David Disseldorp <ddiss@samba.org>
+Autobuild-Date(master): Tue Feb 6 15:36:01 CET 2018 on sn-devel-144
+---
+ libgpo/pygpo.c | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+diff --git a/libgpo/pygpo.c b/libgpo/pygpo.c
+index 7a02a0dc2aa..b6b53b76212 100644
+--- a/libgpo/pygpo.c
++++ b/libgpo/pygpo.c
+@@ -319,6 +319,7 @@ static PyObject *py_gpo_get_sysvol_gpt_version(PyObject * self,
+ return result;
+ }
+
++#ifdef HAVE_ADS
+ static ADS_STATUS find_samaccount(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx,
+ const char *samaccountname,
+ uint32_t *uac_ret, const char **dn_ret)
+@@ -468,11 +469,15 @@ static PyObject *py_ads_get_gpo_list(ADS *self, PyObject *args, PyObject *kwds)
+ return ret;
+ }
+
++#endif
++
+ static PyMethodDef ADS_methods[] = {
+ { "connect", (PyCFunction)py_ads_connect, METH_NOARGS,
+ "Connect to the LDAP server" },
++#ifdef HAVE_ADS
+ { "get_gpo_list", (PyCFunction)py_ads_get_gpo_list, METH_KEYWORDS,
+ NULL },
++#endif
+ { NULL }
+ };
+
diff --git a/packages/net-fs/samba/samba-4.8.2.exheres-0 b/packages/net-fs/samba/samba-4.8.2.exheres-0
new file mode 100644
index 0000000..118f43e
--- /dev/null
+++ b/packages/net-fs/samba/samba-4.8.2.exheres-0
@@ -0,0 +1,11 @@
+# Copyright 2011-2013 Pierre Lejeune <superheron@gmail.com>
+# Distributed under the terms of the GNU General Public License v2
+
+require samba
+
+PLATFORMS="~amd64"
+
+DEFAULT_SRC_PREPARE_PATCHES=(
+ "${FILES}"/a222b7506b53e689708834237f18877231dca589.patch
+)
+
diff --git a/packages/net-fs/samba/samba-scm.exheres-0 b/packages/net-fs/samba/samba-scm.exheres-0
new file mode 100644
index 0000000..2d800c1
--- /dev/null
+++ b/packages/net-fs/samba/samba-scm.exheres-0
@@ -0,0 +1,10 @@
+# Copyright 2011 Pierre Lejeune <superheron@gmail.com>
+# Distributed under the terms of the GNU General Public License v2
+
+SCM_REPOSITORY="git://git.samba.org/samba.git"
+
+require samba scm-git
+
+DOWNLOADS=""
+PLATFORMS="~amd64"
+
diff --git a/packages/net-fs/samba/samba.exlib b/packages/net-fs/samba/samba.exlib
new file mode 100644
index 0000000..f441150
--- /dev/null
+++ b/packages/net-fs/samba/samba.exlib
@@ -0,0 +1,252 @@
+# Copyright 2011-2012 Pierre Lejeune <superheron@gmail.com>
+# Copyright 2013-2017 Wulf C. Krueger <philantrop@exherbo.org>
+# Distributed under the terms of the GNU General Public License v2
+
+require pam wafsamba systemd-service
+
+export_exlib_phases src_prepare src_configure src_install
+
+SUMMARY="Samba provides seamless file and print services to SMB/CIFS clients, e. g. Windows"
+DESCRIPTION="
+Samba is a free software implementation of the SMB/CIFS networking protocol that
+can be run on many platforms other than Microsoft Windows. Samba uses the TCP/IP
+protocol that is installed on the host. When correctly configured, it allows
+that host to interact with a Microsoft Windows client or server as if it is a Windows
+file and print server. Additionally, it can act as a PDC, a domain member server
+or as a part of an Active Directory.
+"
+HOMEPAGE="https://www.${PN}.org"
+DOWNLOADS="mirror://samba/stable/${PNV}.tar.gz"
+
+BUGS_TO="tgurr@exherbo.org"
+
+LICENCES="GPL-3"
+SLOT="0"
+MYOPTIONS="
+ acl
+ addc [[
+ description = [ Allow Samba to act as an Active Directory Domain Controller ]
+ requires = [ gnutls ]
+ ]]
+ ads [[
+ description = [ Enable Active Directory support ]
+ requires = [ acl gnutls ldap winbind ]
+ ]]
+ avahi [[ description = [ Enable Avahi support ] ]]
+ cluster [[ description = [ Enable the Samba cluster extensions ] ]]
+ cups
+ gnutls
+ gpg [[
+ description = [ Store cleartext passwords in a PGP/OpenGPG encrypted form ]
+ requires = [ addc ]
+ ]]
+ ldap
+ quotas [[ description = [ Enables support for user quotas ] ]]
+ syslog [[ description = [ Enables support for syslog ] ]]
+ system-krb5 [[ description = [ Use krb5 instead of the bundled heimdal ] ]]
+ systemd
+ winbind [[ description = [ Enables support for the winbind auth daemon ] ]]
+"
+
+# The test are simply broken.
+RESTRICT="test"
+
+# !system-krb5? ( app-crypt/heimdal[>=1.5] )
+DEPENDENCIES="
+ build+run:
+ app-arch/libarchive[>=3.1.2]
+ dev-db/ldb[>=1.3.3][python_abis:*(-)?]
+ dev-db/tdb[>=1.3.15][python_abis:*(-)?]
+ dev-lang/perl:=
+ dev-libs/iniparser
+ dev-libs/libbsd [[ note = [ automagic ] ]]
+ dev-libs/libgcrypt
+ dev-libs/libgpg-error
+ dev-libs/popt
+ dev-libs/talloc[>=2.1.11][python_abis:*(-)?]
+ dev-libs/tevent[>=0.9.36][python_abis:*(-)?]
+ dev-perl/Parse-Yapp
+ dev-python/iso8601[python_abis:*(-)?]
+ dev-util/subunit[python_abis:*(-)?]
+ net-libs/cyrus-sasl
+ sys-apps/attr
+ sys-apps/dbus
+ sys-libs/libcap
+ sys-libs/pam
+ sys-libs/readline:=
+ acl? ( sys-apps/acl )
+ addc? ( dev-python/pycrypto[python_abis:*(-)?] )
+ ads? ( dev-python/dnspython[python_abis:*(-)?] )
+ avahi? ( net-dns/avahi )
+ cluster? ( dev-libs/ctdb )
+ cups? ( net-print/cups )
+ gnutls? ( dev-libs/gnutls )
+ gpg? (
+ app-crypt/gpgme
+ dev-python/pygpgme[python_abis:*(-)?]
+ )
+ ldap? ( net-directory/openldap )
+ syslog? ( virtual/syslog )
+ system-krb5? ( app-crypt/krb5[>=1.15.1] )
+ systemd? ( sys-apps/systemd )
+ test:
+ dev-util/cmocka[>=1.1.1]
+ sys-libs/nss_wrapper[>=1.1.3]
+ sys-libs/pam_wrapper[>=1.0.4]
+ sys-libs/resolv_wrapper[>=1.1.4]
+ sys-libs/socket_wrapper[>=1.1.9]
+ sys-libs/uid_wrapper[>=1.2.4]
+ suggestion:
+ app-antivirus/clamav [[
+ description = [ vfs_virusfilter can use ClamAV to scan for viruses ]
+ ]]
+ media-gfx/graphviz [[
+ description = [ samba-tool utilizes Graphviz for dot output and text-based heatmaps ]
+ ]]
+"
+
+WAF_SRC_CONFIGURE_PARAMS+=(
+ --builtin-libraries=NONE
+ --nopyc
+ --nopyo
+ --sbindir=/usr/x86_64-pc-linux-gnu/bin
+ --systemd-install-services
+ --enable-fhs
+ --enable-pthreadpool
+ --disable-cephfs
+ --disable-glusterfs
+ --with-iconv
+ --with-libarchive
+ --with-lockdir=/run/lock/samba
+ --with-modulesdir=/usr/$(exhost --target)/lib/samba
+ --with-pam
+ --with-pammodulesdir=$(getpam_mod_dir)
+ --with-piddir=/run
+ --with-privatedir=/var/lib/${PN}/private
+ --with-sendfile-support
+ --with-sockets-dir=/run/samba
+ --with-systemddir=${SYSTEMDSYSTEMUNITDIR}
+ --with-utmp
+ --without-automount
+ --without-dmapi
+ --without-fam
+ --without-lttng
+ --without-ntvfs-fileserver
+)
+
+if ever is_scm; then
+ DEPENDENCIES+="
+ build+run:
+ dev-db/ldb[>=1.4.0]
+ "
+ WAF_SRC_CONFIGURE_PARAMS+=(
+ --without-json-audit
+ )
+fi
+
+WAF_SRC_CONFIGURE_OPTION_ENABLES=(
+ avahi
+ cups
+ gnutls
+)
+
+WAF_SRC_CONFIGURE_OPTION_WITHS=(
+ "acl acl-support"
+ ads
+ "ads dnsupdate"
+ "cluster cluster-support"
+ "gpg gpgme"
+ ldap
+ quotas
+ syslog
+ systemd
+ winbind
+)
+
+WAF_SRC_CONFIGURE_TESTS=(
+ --enable-selftest
+)
+
+# Build failed: -> missing file: '[...]/bin/default/docs-xml/smbdotconf/parameters.all.xml'
+WAF_SRC_COMPILE_PARAMS+=( -j1 )
+
+samba_src_prepare() {
+ default
+
+ # adjust to /run
+ edo sed \
+ -e "s:/var/run:/run:g" \
+ -i packaging/systemd/samba.conf.tmp
+
+ # rpcgen hardcodes the cpp command
+ local dir=${WORKBASE}/symlinked-build-tools
+ edo mkdir -p ${dir}
+ edo ln -s /usr/host/bin/$(exhost --target)-cpp ${dir}/cpp
+ edo sed \
+ -e "s:rpcgen:rpcgen -Y ${WORKBASE}/symlinked-build-tools:g" \
+ -i source3/modules/wscript_build \
+ -i ctdb/wscript
+
+# # ensure system heimdal is used
+# if ever at_least 4.3.0; then
+# edo rm source4/heimdal_build/krb5-types.h
+# edo rm source4/heimdal/kdc/kdc.h
+# fi
+}
+
+samba_src_configure() {
+ WAF_SRC_CONFIGURE_PARAMS+=(
+ $(option system-krb5 && echo --with-system-mitkrb5)
+ $(option !addc && echo --without-ad-dc)
+ )
+
+ # Samba doesn't build with heimdal 1.5.3, 1.6_rc2 or git master
+ if ! option system-krb5; then
+ WAF_SRC_CONFIGURE_PARAMS+=(
+ --bundled-libraries=NONE,roken,wind,hx509,asn1,heimbase,hcrypto,krb5,gssapi,heimntlm,hdb,kdc,com_err,compile_et,asn1_compile
+ )
+ else
+ WAF_SRC_CONFIGURE_PARAMS+=(
+ --bundled-libraries=NONE
+ )
+ fi
+
+ waf_src_configure
+}
+
+samba_src_install() {
+ waf_src_install
+
+ python_bytecompile
+
+ option addc || edo rm "${IMAGE}"/${SYSTEMDSYSTEMUNITDIR}/samba.service
+ option winbind || edo rm "${IMAGE}"/${SYSTEMDSYSTEMUNITDIR}/winbind.service
+
+ # tmpfile is included but doesn't get installed, last checked: 4.8.0
+ insinto /usr/$(exhost --target)/lib/tmpfiles.d
+ hereins ${PN}.conf <<EOF
+d /run/samba 0755 root root -
+EOF
+
+ if option cluster; then
+ insinto /usr/$(exhost --target)/lib/tmpfiles.d
+ hereins ctdb.conf <<EOF
+d /run/ctdb 0755 root root -
+EOF
+ fi
+
+ if option cups; then
+ dodir $(cups-config --serverbin)/backend
+ dosym /usr/$(exhost --target)/bin/smbspool $(cups-config --serverbin)/backend/smb
+ fi
+
+ keepdir /var/{cache,lib,log}/samba
+ edo rmdir "${IMAGE}"/run/{lock/{samba,},{samba,}}
+
+ keepdir /var/lib/samba/bind-dns
+ keepdir /var/lib/samba/private/smbd.tmp/messaging
+
+ insinto /etc/${PN}
+ doins "${WORK}"/examples/smb.conf.default
+}
+