diff --git a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/Manifest b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/Manifest index 8e3f1d2a04..0890df53b1 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/Manifest +++ b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/Manifest @@ -1,2 +1,2 @@ -DIST samba-4.5.1.tar.gz 20930661 SHA256 b0a703e069677ff3182e5da3a91e018db344e3b54e0a43ed43dbfd8eb7d3f085 SHA512 636c0d2c68f2e041c6961013365314192b5bdb670281fad52c6a7d9ae8e617d0c678f382cde4132cda694c8c5f0552d681ea45ae98bf6f339fa149227d75a3f2 WHIRLPOOL 5c978b03878cd08beff98ac91213c5ac52da8c41527a1c32150a81a142ec4f2f7911c888dd8a70f8ffbdb4e82508856deefbf0c39fd225db6f324518fdedba80 -DIST samba-disable-python-patches-4.5.0_rc1.tar.xz 6204 SHA256 fa0d776e04e3222c0dc4761e376717f4154937cdcb85f4117b8978dfb770a78e SHA512 920089ba3c6e8e7d913b1d7ef1017262a19d1af41215adb30cfc98a57556efc4b0116931d4ef774c01124149d8eca2be3a23814ce7e11daf0180d2c111799927 WHIRLPOOL 6d55710895435ad012e23f8c252e5276966241014710349ca7fa9cf037e8742030b8e053f7cb71309a0a45f48d2235d55393243bf4d19476a22dd39bb1b7748d +DIST samba-4.5.11-disable-python-patches.tar.xz 6292 SHA256 8db451910c3d46fc715203e0b674c49846528cf864c381520dc93de20a3637d3 SHA512 f0e3076e3e1ecaae3f06b3ef30efc81719fb3f63a1041dcbdae4b62ca4cf693732f9eb16f047d046d4930136fed82194e82b455ea888e12cf845b3e6a122d57d WHIRLPOOL 641d429fc4865e12e89bad28110b03ca87c6b658f59943f4d44c0b3a91fc49b5dc90e496a8a9d391c2897aec87fc43ea1c9a26084f3394b1883ad9755fd0eca3 +DIST samba-4.5.16.tar.gz 21024396 SHA256 3a3356faab1694680e2ccd7fdf051ab1bbd3b0d058fc1f671e135dd2d1eae1aa SHA512 de8a41013cfb5ef3adcb290efd97a78a5de876d90ad05764d631f14e663a1849bb53e4ac394b46c906f1109be5748fee9316407a659c57007d36851ae8adcd7f WHIRLPOOL 28b95f4e57fc7630adaa503eadbb8e53950876d9954df10cceab154021390d6bb45c8f54b6fe6cc61a128a2b9c58f01d542b434ea0c75b8121ebd7c07605fe53 diff --git a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/4.4/samba4.initd-r1 b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/4.4/samba4.initd-r1 index bf162ad745..52a9b68bba 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/4.4/samba4.initd-r1 +++ b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/4.4/samba4.initd-r1 @@ -1,7 +1,6 @@ #!/sbin/openrc-run # Copyright 1999-2016 Gentoo Foundation # Distributed under the terms of the GNU General Public License, v2 or later -# $Id$ extra_started_commands="reload" piddir="/run/samba" diff --git a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/samba-4.5.1-compile_et_fix.patch new file mode 100644 index 0000000000..463512f9a9 --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/samba-glibc-2.26-no_rpc.patch b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/files/samba-glibc-2.26-no_rpc.patch new file mode 100644 index 0000000000..e66446845f --- /dev/null +++ b/sdk_container/src/third_party/coreos-overlay/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/sdk_container/src/third_party/coreos-overlay/net-fs/samba/metadata.xml b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/metadata.xml index b367f4d2c3..2a3bd677e0 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/metadata.xml +++ b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/metadata.xml @@ -10,22 +10,23 @@ Enable Active Directory Domain Controller support - Enable Active Directory support - Enables support for swat configuration gui - Enables support for the winbind auth daemon - Enables the client part - Enables the server part - Enable building of netapi bits Enable AD DNS integration + Enable Active Directory support Enable asynchronous IO support + Enable support for Ceph distributed filesystem via sys-cluster/ceph + Enables the client part Enable support for clustering Enable support for DMAPI. This currently works only in combination with XFS. - Enable the ldb tools + Use app-crypt/gpgme for AD DC + Enabling iPrint technology by Novell Enables support for user quotas - Enable smbclient tool - Enable special smb share modes (?) + Use app-crypt/heimdal instead of + bundled heimdal. Use app-crypt/mit-krb5 instead of app-crypt/heimdal. - Enabling iPrint technology by Novell + Enables support for the winbind auth daemon + + cpe:/a:samba:samba + diff --git a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.5.1.ebuild b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.5.16.ebuild similarity index 60% rename from sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.5.1.ebuild rename to sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.5.16.ebuild index 4773633386..7c80d9db44 100644 --- a/sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.5.1.ebuild +++ b/sdk_container/src/third_party/coreos-overlay/net-fs/samba/samba-4.5.16.ebuild @@ -1,6 +1,5 @@ -# Copyright 1999-2016 Gentoo Foundation +# Copyright 1999-2018 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Id$ EAPI=6 PYTHON_COMPAT=( python2_7 ) @@ -15,9 +14,9 @@ SRC_PATH="stable" [[ ${PV} = *_rc* ]] && SRC_PATH="rc" SRC_URI="mirror://samba/${SRC_PATH}/${MY_P}.tar.gz - https://dev.gentoo.org/~polynomial-c/samba-disable-python-patches-4.5.0_rc1.tar.xz" + https://dev.gentoo.org/~polynomial-c/samba-4.5.11-disable-python-patches.tar.xz" [[ ${PV} = *_rc* ]] || \ -KEYWORDS="amd64 arm64 ~hppa ~x86" +KEYWORDS="alpha amd64 arm ~arm64 ~hppa ia64 ppc ppc64 sparc x86" DESCRIPTION="Samba Suite Version 4" HOMEPAGE="http://www.samba.org/" @@ -25,8 +24,14 @@ LICENSE="GPL-3" SLOT="0" -IUSE="acl addc addns ads client cluster cups dmapi fam gnutls iprint ldap -+minimal pam quota selinux syslog +system-mitkrb5 systemd test winbind zeroconf" +IUSE="acl addc addns ads client cluster cups dmapi fam gnutls gpg iprint ldap pam +quota selinux syslog system-heimdal +system-mitkrb5 systemd test winbind zeroconf" + +# 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" MULTILIB_WRAPPED_HEADERS=( /usr/include/samba-4.0/policy.h @@ -40,48 +45,75 @@ MULTILIB_WRAPPED_HEADERS=( ) # sys-apps/attr is an automagic dependency (see bug #489748) -CDEPEND=" +CDEPEND="${PYTHON_DEPS} >=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}] - sys-libs/readline:= - virtual/libiconv + dev-python/subunit[${PYTHON_USEDEP},${MULTILIB_USEDEP}] + net-libs/libnsl:=[${MULTILIB_USEDEP}] sys-apps/attr[${MULTILIB_USEDEP}] + >=sys-libs/ldb-1.1.27[ldap(+)?,python(+),${MULTILIB_USEDEP}] + =sys-libs/talloc-2.1.8[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}] + >=sys-libs/tdb-1.3.10[python,${PYTHON_USEDEP},${MULTILIB_USEDEP}] + >=sys-libs/tevent-0.9.31-r1[${MULTILIB_USEDEP}] sys-libs/zlib[${MULTILIB_USEDEP}] + virtual/libiconv pam? ( virtual/pam ) acl? ( virtual/acl ) addns? ( net-dns/bind-tools[gssapi] ) - cluster? ( !dev-db/ctdb ) + cluster? ( + net-libs/rpcsvc-proto + !dev-db/ctdb + ) cups? ( net-print/cups ) dmapi? ( sys-apps/dmapi ) fam? ( virtual/fam ) - gnutls? ( dev-libs/libgcrypt:0 - >=net-libs/gnutls-1.4.0 ) + gnutls? ( + dev-libs/libgcrypt:0 + >=net-libs/gnutls-1.4.0 + ) + gpg? ( app-crypt/gpgme ) ldap? ( net-nds/openldap[${MULTILIB_USEDEP}] ) + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) system-mitkrb5? ( app-crypt/mit-krb5[${MULTILIB_USEDEP}] ) - !system-mitkrb5? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) systemd? ( sys-apps/systemd:0= )" DEPEND="${CDEPEND} - dev-lang/perl:= - virtual/pkgconfig" + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig + test? ( + >=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} client? ( net-fs/cifs-utils[ads?] ) selinux? ( sec-policy/selinux-samba ) !dev-perl/Parse-Yapp " -REQUIRED_USE="addc? ( gnutls !system-mitkrb5 ) +REQUIRED_USE=" + addc? ( gnutls !system-mitkrb5 ) ads? ( acl gnutls ldap ) - " + cluster? ( ads ) + gpg? ( addc ) + ?? ( system-heimdal system-mitkrb5 ) + ${PYTHON_REQUIRED_USE}" S="${WORKDIR}/${MY_P}" PATCHES=( "${FILESDIR}/${PN}-4.4.0-pam.patch" + "${FILESDIR}/${PN}-4.5.1-compile_et_fix.patch" + "${FILESDIR}/${PN}-glibc-2.26-no_rpc.patch" #637320 ) #CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" @@ -94,7 +126,9 @@ SHAREDMODS="" pkg_setup() { python-single-r1_pkg_setup if use cluster ; then - SHAREDMODS="${SHAREDMODS}idmap_rid,idmap_tdb2,idmap_ad" + SHAREDMODS="idmap_rid,idmap_tdb2,idmap_ad" + elif use ads ; then + SHAREDMODS="idmap_ad" fi } @@ -102,12 +136,27 @@ src_prepare() { default # install the patches from tarball(s) - eapply "${WORKDIR}/patches/" + eapply "${WORKDIR}/patches" + # ugly hackaround for bug #592502 + cp /usr/include/tevent_internal.h "${S}"/lib/tevent/ || die + + sed -e 's:::' \ + -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=() myconf=( --enable-fhs @@ -115,13 +164,14 @@ multilib_src_configure() { --localstatedir="${EPREFIX}/var" --with-modulesdir="${EPREFIX}/usr/$(get_libdir)/samba" --with-piddir="${EPREFIX}/run/${PN}" - --bundled-libraries=ALL + --without-lttng + --bundled-libraries="${bundled_libs}" --builtin-libraries=NONE --disable-rpath --disable-rpath-install - --disable-python --nopyc --nopyo + --disable-cephfs ) if multilib_is_native_abi ; then myconf+=( @@ -129,12 +179,12 @@ multilib_src_configure() { $(usex addc '' '--without-ad-dc') $(use_with addns dnsupdate) $(use_with ads) - $(usex ads '--with-shared-modules=idmap_ad' '') $(use_with cluster cluster-support) $(use_enable cups) $(use_with dmapi) $(use_with fam) $(use_enable gnutls) + $(use_with gpg gpgme) $(use_enable iprint) $(use_with ldap) $(use_with pam) @@ -160,6 +210,7 @@ multilib_src_configure() { --without-dmapi --without-fam --disable-gnutls + --without-gpgme --disable-iprint $(use_with ldap) --without-pam @@ -168,6 +219,7 @@ multilib_src_configure() { --without-systemd $(usex system-mitkrb5 '--with-system-mitkrb5' '') --without-winbind + --disable-python ) fi @@ -175,6 +227,10 @@ multilib_src_configure() { waf-utils_src_configure ${myconf[@]} } +multilib_src_compile() { + waf-utils_src_compile +} + multilib_src_install() { waf-utils_src_install @@ -190,36 +246,33 @@ multilib_src_install() { # create symlink for cups (bug #552310) if use cups ; then - dosym /usr/bin/smbspool /usr/libexec/cups/backend/smb + dosym ../../../bin/smbspool /usr/libexec/cups/backend/smb fi # install example config file insinto /etc/samba doins examples/smb.conf.default - if ! use minimal ; then - systemd_dotmpfilesd "${FILESDIR}"/samba.conf - fi + # 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 - rm ${D}/usr/lib*/samba/ldb/* - rm ${D}/etc/samba/smb.conf.default - - if use minimal ; then - mv ${D}/usr/bin/net ${T} - rm ${D}/usr/bin/* - mv ${T}/net ${D}/usr/bin/net - rm ${D}/usr/sbin/* - rm -rf ${D}/lib*/security - rm -rf ${D}/usr/lib/systemd - rm -rf ${D}/var/ - rm -rf ${D}/usr/lib*/perl5 - rm -rf ${D}/usr/lib*/python2.7 - fi } multilib_src_test() { @@ -236,6 +289,6 @@ pkg_postinst() { 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.2.0.html and" + elog "http://samba.org/samba/history/${PN}-4.5.0.html and" elog "http://wiki.samba.org/index.php/Samba4/HOWTO " }