diff options
-rw-r--r-- | exlibs/wafsamba.exlib | 51 | ||||
-rw-r--r-- | metadata/categories.conf | 2 | ||||
-rw-r--r-- | packages/dev-db/ldb/ldb-1.4.0.exheres-0 | 47 | ||||
-rw-r--r-- | packages/net-fs/samba/files/a222b7506b53e689708834237f18877231dca589.patch | 43 | ||||
-rw-r--r-- | packages/net-fs/samba/samba-4.8.2.exheres-0 | 11 | ||||
-rw-r--r-- | packages/net-fs/samba/samba-scm.exheres-0 | 10 | ||||
-rw-r--r-- | packages/net-fs/samba/samba.exlib | 252 |
7 files changed, 416 insertions, 0 deletions
diff --git a/exlibs/wafsamba.exlib b/exlibs/wafsamba.exlib new file mode 100644 index 0000000..802d6ac --- /dev/null +++ b/exlibs/wafsamba.exlib @@ -0,0 +1,51 @@ +# Copyright 2011 Pierre Lejeune <superheron@gmail.com> +# Distributed under the terms of the GNU General Public License v2 + +myexparam wafdir='./'buildtools/bin + +require waf [ waf_executable="python2 $(exparam wafdir)/waf" ] +require python [ blacklist='3' multibuild=false ] + +export_exlib_phases src_prepare src_configure + +DEPENDENCIES=" + build: + app-text/docbook-xml-dtd:4.2 + app-text/docbook-xsl-stylesheets + dev-libs/libxslt +" + +EWAF_ENVIRONMENT=( + PATH="$(exparam wafdir)${PATH+:}${PATH}" + LD_LIBRARY_PATH="bin/default${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}" +) + +# You should add items to +# WAF_SRC_CONFIGURE_PARAMS using += +WAF_SRC_CONFIGURE_PARAMS=( + --bundled-libraries=NONE + --mandir=/usr/share/man + --infodir=/usr/share/info + --docdir=/usr/share/doc/${PNVR} + --localstatedir=/var + --sysconfdir=/etc + --disable-dependency-tracking + --disable-rpath + --disable-rpath-install +) + +wafsamba_src_prepare() { + default + + if test -f buildtools/wafadmin/Tools/config_c.py; then + # use prefixed pkg-config + edo sed -i \ + -e "s:pkg-config:$(exhost --tool-prefix)&:" \ + buildtools/wafadmin/Tools/config_c.py + fi +} + +wafsamba_src_configure() { + PYTHONARCHDIR="$(python_get_sitedir)" \ + waf_src_configure +} diff --git a/metadata/categories.conf b/metadata/categories.conf index 4a15749..4282c4b 100644 --- a/metadata/categories.conf +++ b/metadata/categories.conf @@ -24,3 +24,5 @@ x11-apps app-misc app-emulation sys-libs +dev-db +net-fs diff --git a/packages/dev-db/ldb/ldb-1.4.0.exheres-0 b/packages/dev-db/ldb/ldb-1.4.0.exheres-0 new file mode 100644 index 0000000..c569360 --- /dev/null +++ b/packages/dev-db/ldb/ldb-1.4.0.exheres-0 @@ -0,0 +1,47 @@ +# Copyright 2011-2012 Pierre Lejeune <superheron@gmail.com> +# Distributed under the terms of the GNU General Public License v2 + +require wafsamba + +SUMMARY="LDAP-like embedded database" +DESCRIPTION=" +ldb is a LDAP-like embedded database. It is not at all LDAP standards compliant, so if you want a +standards compliant database then please see the excellent OpenLDAP project. + +What ldb does is provide a fast database with an LDAP-like API designed to be used within an +application. In some ways it can be seen as a intermediate solution between key-value pair databases +and a real LDAP database. + +ldb is the database engine used in Samba4. +" +HOMEPAGE="https://${PN}.samba.org" +DOWNLOADS="mirror://samba/../${PN}/${PNV}.tar.gz" + +LICENCES="LGPL-3" +SLOT="0" +PLATFORMS="~amd64 ~armv7 ~x86" +MYOPTIONS="" + +DEPENDENCIES=" + build+run: + dev-db/tdb[>=1.3.15] + dev-libs/popt + dev-libs/talloc[>=2.1.11] + dev-libs/tevent[>=0.9.36] + build+test: + dev-util/cmocka[>=1.1.1] + recommendation: + net-directory/openldap [[ description = [ ldb can use OpenLDAP as a backend ] ]] +" + +WAF_SRC_CONFIGURE_PARAMS+=( --with-modulesdir=/usr/$(exhost --target)/lib ) +WAF_SRC_COMPILE_PARAMS+=( -j1 ) + +src_test() { + # https://bugzilla.samba.org/show_bug.cgi?id=9787 + edo ln -s libldb.so bin/default/libldb.so.$(ever major) + edo ln -s libpyldb-util.so bin/default/libpyldb-util.so.$(ever major) + + waf_src_test +} + 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 +} + |