diff options
author | Lars Wendler <polynomial-c@gentoo.org> | 2015-03-08 13:21:55 +0000 |
---|---|---|
committer | Lars Wendler <polynomial-c@gentoo.org> | 2015-03-08 13:21:55 +0000 |
commit | 39ffb6789fa3b4466ad23fc55f1b8cca8db3a648 (patch) | |
tree | a8475b2c38716349cf5330186660370ed9b398bf /net-fs | |
parent | Added mask for >=samba-4.2 (diff) | |
download | gentoo-2-39ffb6789fa3b4466ad23fc55f1b8cca8db3a648.tar.gz gentoo-2-39ffb6789fa3b4466ad23fc55f1b8cca8db3a648.tar.bz2 gentoo-2-39ffb6789fa3b4466ad23fc55f1b8cca8db3a648.zip |
Added samba-4.2.0 for testing. Doesn't compile yet
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0x981CA6FC)
Diffstat (limited to 'net-fs')
-rw-r--r-- | net-fs/samba/ChangeLog | 8 | ||||
-rw-r--r-- | net-fs/samba/files/4.2/samba4.confd | 38 | ||||
-rw-r--r-- | net-fs/samba/files/4.2/samba4.initd-r1 | 56 | ||||
-rw-r--r-- | net-fs/samba/samba-4.2.0.ebuild | 176 |
4 files changed, 277 insertions, 1 deletions
diff --git a/net-fs/samba/ChangeLog b/net-fs/samba/ChangeLog index b27102a771b4..06dffacbd3df 100644 --- a/net-fs/samba/ChangeLog +++ b/net-fs/samba/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-fs/samba # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.712 2015/03/03 09:24:11 dlan Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/ChangeLog,v 1.713 2015/03/08 13:21:55 polynomial-c Exp $ + +*samba-4.2.0 (08 Mar 2015) + + 08 Mar 2015; Lars Wendler <polynomial-c@gentoo.org> +samba-4.2.0.ebuild, + +files/4.2/samba4.confd, +files/4.2/samba4.initd-r1: + Added samba-4.2.0 for testing. Doesn't compile yet. 03 Mar 2015; Yixun Lan <dlan@gentoo.org> samba-4.1.17.ebuild: add arm64 support, tested on A53 board diff --git a/net-fs/samba/files/4.2/samba4.confd b/net-fs/samba/files/4.2/samba4.confd new file mode 100644 index 000000000000..58b2c7827bdf --- /dev/null +++ b/net-fs/samba/files/4.2/samba4.confd @@ -0,0 +1,38 @@ +# 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" + +#---------------------------------------------------------------------------- +# 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_start="start-stop-daemon --start --exec /usr/sbin/smbd -- ${smbd_start_options}" +smbd_stop="start-stop-daemon --stop --exec /usr/sbin/smbd" +smbd_reload="killall -HUP smbd" + +nmbd_start_options="-D" +nmbd_start="start-stop-daemon --start --exec /usr/sbin/nmbd -- ${nmbd_start_options}" +nmbd_stop="start-stop-daemon --stop --exec /usr/sbin/nmbd" +nmbd_reload="killall -HUP nmbd" + +samba4_start_options="" +samba4_start="start-stop-daemon --start --exec /usr/sbin/samba -- ${samba4_start_options}" +samba4_stop="start-stop-daemon --stop --exec /usr/sbin/samba" +samba4_reload="killall -HUP samba" + +winbind_start_options="" +winbind_start="start-stop-daemon --start --exec /usr/sbin/winbindd -- ${winbind_start_options}" +winbind_stop="start-stop-daemon --stop --exec /usr/sbin/winbindd" +winbind_reload="killall -HUP winbindd" + diff --git a/net-fs/samba/files/4.2/samba4.initd-r1 b/net-fs/samba/files/4.2/samba4.initd-r1 new file mode 100644 index 000000000000..7c41cefc5e54 --- /dev/null +++ b/net-fs/samba/files/4.2/samba4.initd-r1 @@ -0,0 +1,56 @@ +#!/sbin/runscript +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/4.2/samba4.initd-r1,v 1.1 2015/03/08 13:21:55 polynomial-c Exp $ + +extra_started_commands="reload" +piddir="/var/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/samba-4.2.0.ebuild b/net-fs/samba/samba-4.2.0.ebuild new file mode 100644 index 000000000000..f250a02ae667 --- /dev/null +++ b/net-fs/samba/samba-4.2.0.ebuild @@ -0,0 +1,176 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/samba-4.2.0.ebuild,v 1.1 2015/03/08 13:21:55 polynomial-c Exp $ + +EAPI=5 +PYTHON_COMPAT=( python2_7 ) +PYTHON_REQ_USE='threads(+)' + +inherit python-single-r1 waf-utils multilib 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" +KEYWORDS="~amd64 ~hppa ~x86" +[[ ${PV} = *_rc* ]] && KEYWORDS="" + +DESCRIPTION="Samba Suite Version 4" +HOMEPAGE="http://www.samba.org/" +LICENSE="GPL-3" + +SLOT="0" + +IUSE="acl addns ads aio avahi client cluster cups dmapi fam gnutls iprint +ldap quota selinux syslog systemd test winbind" + +# sys-apps/attr is an automagic dependency (see bug #489748) +# sys-libs/pam is an automagic dependency (see bug #489770) +CDEPEND="${PYTHON_DEPS} + >=app-crypt/heimdal-1.5[-ssl] + dev-libs/iniparser + dev-libs/popt + sys-libs/readline:= + virtual/libiconv + dev-python/subunit[${PYTHON_USEDEP}] + >=net-libs/socket_wrapper-1.1.2 + sys-apps/attr + sys-libs/libcap + >=sys-libs/ldb-1.1.20 + >=sys-libs/nss_wrapper-1.0.2 + >=sys-libs/ntdb-1.0[python,${PYTHON_USEDEP}] + >=sys-libs/talloc-2.1.1[python,${PYTHON_USEDEP}] + >=sys-libs/tdb-1.3.4[python,${PYTHON_USEDEP}] + >=sys-libs/tevent-0.9.24 + >=sys-libs/uid_wrapper-1.0.1 + sys-libs/zlib + virtual/pam + acl? ( virtual/acl ) + addns? ( net-dns/bind-tools[gssapi] ) + aio? ( dev-libs/libaio ) + cluster? ( >=dev-db/ctdb-1.0.114_p1 ) + cups? ( net-print/cups ) + dmapi? ( sys-apps/dmapi ) + fam? ( virtual/fam ) + gnutls? ( dev-libs/libgcrypt:0 + >=net-libs/gnutls-1.4.0 ) + ldap? ( net-nds/openldap ) + systemd? ( sys-apps/systemd:0= )" +DEPEND="${CDEPEND} + virtual/pkgconfig" +RDEPEND="${CDEPEND} + client? ( net-fs/cifs-utils[ads?] ) + selinux? ( sec-policy/selinux-samba ) +" + +REQUIRED_USE="ads? ( acl ldap ) + ${PYTHON_REQUIRED_USE}" + +RESTRICT="mirror" + +S="${WORKDIR}/${MY_P}" + +CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" + +WAF_BINARY="${S}/buildtools/bin/waf" + +pkg_setup() { + python-single-r1_pkg_setup + if use aio; then + if ! linux_config_exists || ! linux_chkconfig_present AIO; then + ewarn "You must enable AIO support in your kernel config, " + ewarn "to be able to support asynchronous I/O. " + ewarn "You can find it at" + ewarn + ewarn "General Support" + ewarn " Enable AIO support " + ewarn + ewarn "and recompile your kernel..." + fi + fi +} + +src_configure() { + local myconf='' + use "cluster" && myconf+=" --with-ctdb-dir=/usr" + use "test" && myconf+=" --enable-selftest" + myconf="${myconf} \ + --enable-fhs \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --with-modulesdir=/usr/$(get_libdir)/samba \ + --with-pammodulesdir=/$(get_libdir)/security \ + --with-piddir=/var/run/${PN} \ + --disable-rpath \ + --disable-rpath-install \ + --nopyc \ + --nopyo \ + --bundled-libraries=NONE \ + --builtin-libraries=NONE \ + $(use_with addns dnsupdate) \ + $(use_with acl acl-support) \ + $(use_with ads) \ + $(use_with aio aio-support) \ + $(use_enable avahi) \ + $(use_with cluster cluster-support) \ + $(use_enable cups) \ + $(use_with dmapi) \ + $(use_with fam) \ + $(use_enable gnutls) \ + $(use_enable iprint) \ + $(use_with ldap) \ + --with-pam \ + --with-pam_smbpass \ + $(use_with quota quotas) \ + $(use_with syslog) \ + $(use_with systemd) \ + $(use_with winbind) + " + use "ads" && myconf+=" --with-shared-modules=idmap_ad" + + CPPFLAGS="-I/usr/include/et ${CPPFLAGS}" \ + waf-utils_src_configure ${myconf} +} + +src_install() { + waf-utils_src_install + + # install ldap schema for server (bug #491002) + if use ldap ; then + insinto /etc/openldap/schema + doins examples/LDAP/samba.schema + fi + + # Make all .so files executable + find "${D}" -type f -name "*.so" -exec chmod +x {} + + + # 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 +} + +src_test() { + "${WAF_BINARY}" test || die "test failed" +} + +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 "http://samba.org/samba/history/${P}.html " + elog "http://samba.org/samba/history/${PN}-4.0.0.html and" + elog "http://wiki.samba.org/index.php/Samba4/HOWTO " +} |