From 9403c20e10161812ed5231e7fd14464ca484aa09 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 28 Jul 2022 21:05:25 +0100 Subject: gentoo auto-resync : 28:07:2022 - 21:05:25 --- net-fs/Manifest.gz | Bin 3519 -> 3524 bytes net-fs/samba/Manifest | 6 + net-fs/samba/samba-4.14.14.ebuild | 342 +++++++++++++++++++++++++++++++++++++ net-fs/samba/samba-4.15.9.ebuild | 340 +++++++++++++++++++++++++++++++++++++ net-fs/samba/samba-4.16.4.ebuild | 344 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 1032 insertions(+) create mode 100644 net-fs/samba/samba-4.14.14.ebuild create mode 100644 net-fs/samba/samba-4.15.9.ebuild create mode 100644 net-fs/samba/samba-4.16.4.ebuild (limited to 'net-fs') diff --git a/net-fs/Manifest.gz b/net-fs/Manifest.gz index d1d873a385b7..abae1c753eb8 100644 Binary files a/net-fs/Manifest.gz and b/net-fs/Manifest.gz differ diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest index 72c4f0a410ee..afe3c1c5a0b3 100644 --- a/net-fs/samba/Manifest +++ b/net-fs/samba/Manifest @@ -7,18 +7,24 @@ AUX samba-4.4.0-pam.patch 895 BLAKE2B bdc0601527a932424d55946b2eeaa288420ce90a8f AUX samba.conf 88 BLAKE2B 5bf3391fdf31b284bfa68b904370776d2e5b14fe0ce5677b4982b54da379e504cf9a3c9563438ce262b9634140a1192ecf00f57a66da2e42d52c351ae9972d4e SHA512 b26251050e29571e6a567d8516aa0ea82fe7fdaa25726677b6cad20d0e25b9fec350d755d26c778855a1444d20852930a47c06340c213dac441375a2c424fdb2 DIST samba-4.14.12.tar.gz 19145135 BLAKE2B 94ffc6dee4448e302591bf30bc34f75c5cdeab8acaa04b2d1105a0f0155ba13d366e61f2d0b38060fccb841febcc212d8ab7b6dfd860d784ae9299a375cb98c3 SHA512 6a021d61dc2a8894c646a9b6d85e38c9020b3c227f10d1820cbdf2ad6793c0beeacedd5fff5f75718d4083ec9169cb1fb58f65636e1a50e638fcefce355690d9 DIST samba-4.14.13.tar.gz 19161242 BLAKE2B 068d17872536edcc0de400ee925723a9a55022dd43fd5309562cf65a92d992011f9963b4009170405394b724eafab4760c689d571884b164a63661a99b42ec4c SHA512 477a94a2b9d9eeff21055c7601f3539e9ff01ab536320c303ac9a6578d5e7f09f46e7f4f5a971594e11ad19fe9a566f209d201cc32b78c164b885c1c4d591b9b +DIST samba-4.14.14.tar.gz 19174363 BLAKE2B 5714ab40bc22d2692c81502fd6b05e222099818ebb3b7f26a91a89c78a6a2bfd8044b81f053a958b41ec156bb5a55e245af70a28eb315cc51292857f34858730 SHA512 77b9a51e8d542e4535eacf25b653dc21732f4608505507690d3ac3e8f8657c09e4f8b9c5bb9a24381d8e5316d712a914b021bb18dc4c464ee9a00755f6f7956f DIST samba-4.15.4.tar.gz 19280813 BLAKE2B 3106f2f265263e871fe3f82d3eecaac2e5f642925ff5dd2a9d163092fd13e9348a3910e40431d51cb94a1abeb3b9c32c487ce1f8caebe59a8d6d90641b4d9201 SHA512 e55473dd4971816a01880870309ca44f022625cd529511bcf386c865a2e7e79118577ee4866559f607952de47dc0d310d6426bd08dd4293db95ddbbe3982383d DIST samba-4.15.6.tar.gz 19290189 BLAKE2B 14a8d3cf03de303cce54e5b336f5866f5d3dedbcc435827791929a6722797111a4ae6b9720f64cca18803a4edb0dc3590657f680686613cf9a32dc552db41180 SHA512 cd193d74173831449abc24f1769f0af2dabd5dd8a65507af7b09fde6dd5780d30336d59600add939b044cfa5781f357ec9192c7fed1a1e7278812b6c07b824e2 DIST samba-4.15.7.tar.gz 19290930 BLAKE2B 4a295f79d38212d4c6917ed61a22e4204b5ea3d5e26f30b65d1e7e81842e92405870dd40fd4d05ec1126a532bdb1ddea300848387a4c64370ba5c2c1354ee8e5 SHA512 beffb09b5bcd62991398d39c7a8aec5fed0c51d550e2f0fb42b2e0a09094f4c6a8f29adf708c4969db12329f5c7343d2debd04315107b79bef59e99a4a7e4ce4 +DIST samba-4.15.9.tar.gz 19324742 BLAKE2B 36cca5ac1b449339f2ce420d4f29f25151bcd536556bfc571db6422a95e9c5daed98b9a71387babbfc61d43e5ff183a1b69255dbec966f80a1cb8fe0ad40f636 SHA512 2ee5d66f5a7c1ff5b27c959be6310335eb6484476c1eadb3b8ca1bc84fb2260487136c1318539e1dc459b81bca66f268fd979f6a816ff5f905bd605a99685004 DIST samba-4.16.0.tar.gz 30583390 BLAKE2B 6ea27634690d00779ec7f671e48b17246285c9576221d9b9b3f9238cd72310e8aaaeb646031212e65c239d2e959deef7bd9739932db0c716b7ea79cc11f2f7b8 SHA512 cea6bab64021779d217669e58612d192b907c2c481ef30e40e449bc6b8f8993a9b7b7b5bfcfebe54d8f70b8f720893cfa77a9d674ef8e07dd45a55a0fbc673e2 DIST samba-4.16.1.tar.gz 30590897 BLAKE2B 4e22b1a8bbef28116cad71c87da1aaaa39459d5eeb30e975aec6444369576ce716917d3ee89c0b328e457e2dcda17abe705d1f33d12b4205efcebdc54ba7f2fd SHA512 d82ab250e87cb64b083345b61da8c4edbb2185a13f8cef33232f823fd510822570ed27c7b260a1fefd3af3b2fc4b271257c2c3e6ab3241c8c147bebae6ab39fc DIST samba-4.16.2.tar.gz 30597031 BLAKE2B d1268cb34ef951a47bd6cd8b76fa8576f3db2a4faca1fdae90f096f25d5e90e9eaca49c73f7952a6c8cf48a200247fb9957b230efb9ec725c29a1af16d8aa37e SHA512 ed85acca0f23f9166530b600ae569f3259c2122d15e361fd3fe48a82921cd53bbb459d6c102bb60cc40b2dd811cde1262a3fb17ed6015a260432bffe5af83366 +DIST samba-4.16.4.tar.gz 30605121 BLAKE2B e685511a76770272cabd1292f36d2b005e2d21212e4782cdf4fd05039f7667b35501873cffa9a53547d523805b2a91ffeba0881aaee905304968c42efef22dfa SHA512 9754275ace30755b75f747e201f8ad4550a823c8606e550c0ce6b3ccbaf048dd895bf2c21127271298304be7f80de9b6451091c4949ebe267ee1cf3ab497cd85 EBUILD samba-4.14.12-r3.ebuild 10031 BLAKE2B ef98c98e96c6bc442ae917f5ea98eac20ad8b47e5cf95d629c3c057885a5e0d2b15c57d435c792b2a4edc5d8e75a76a4b0903d08efab1b9832e8a324c23d1357 SHA512 e73d8c96e32582e5c7fb80dfa89f4c1506106e8dc9bdb07e17ab676c1d8c2a9b319e1f4e5d2cf76046dfc5b78868484fca5c32b1835ca06701e6719be754b635 EBUILD samba-4.14.13.ebuild 10032 BLAKE2B d7cdcb67afe6dbb05e9a7fa8c3b9f5d3749cf91ed035c7581c504ad5db8c01dc21d8bf69a6a07e61e4d0a0db680677b7f51c5774b3d0ef5eb8758b91b0bd773a SHA512 1f96a484968fccb76e3985025701fd3ac97d191377ac3295212f78eeec5160af9919bd0738d8278f3a7bf0adb2ecbd04b9cc5e7405485f0e1a07c659e25d5c9b +EBUILD samba-4.14.14.ebuild 10039 BLAKE2B 45ebf1d86df61fc705e0298cf9e15cd7bf679222d338ba5f7109ef6f76d5cd75ae974c9407d2cf3887e139b7dc0993df1a719a2a130df6418552939c20530009 SHA512 26b1b775bd3a8c2e9bc71b27b0b85ac5549adf19bdcc3b50a18589a597b22602a7f75ffb1b10370042c28c2e8bc3ae00c77f5e498b5f765b6b4efc73fbc5d788 EBUILD samba-4.15.4-r3.ebuild 9964 BLAKE2B 33e95d71e3a5d3172fc8dae76807e198b2ef4100d32d5e8bee2964dd41b2a9f3396c3b9b9d2a93e75ec47b94365871c6005ceca35a153f42f5e143b8fe2c24aa SHA512 bacfa5b5a1c29f8eefaea6b5b31134ce8a0059b2365987453cf14994ae0122cca4e241445e600689072eab27ca1809347c0321515728da792a166aad37801fe1 EBUILD samba-4.15.6-r1.ebuild 10022 BLAKE2B 0588e5c12f2c4d31bc8e34c50de2cc8894d7eb62df1d55f243f067e0938408fea6fa0cba01d47606ad132e560214a76f2771f2197318b2757c988255a18d0a3a SHA512 45f04624f8a88acbc4b3939d7192c38bc3e86495a4ce2e16095aeb66b7eda7ae68ff4f920fa50577cf27a16791edfa621497094f287c13bb758f5e0117bd9788 EBUILD samba-4.15.7.ebuild 10015 BLAKE2B 2c9fb60746e70d5fb0582f75da7b0af11a51ba4f1b080716fb82c8dbc62de22b340d99e715e5bbee2f7c05cc8eb95ab414bca68f6a37eb1cd696878bc54fd717 SHA512 07e02a792279cb9a7a2db43722b9f2c6652fb67b52c0adaf3c894fc5c88a43f294a51ab32fc8bc403e6fa03661c16dc4aefb0950837c8135414225ac802a9157 +EBUILD samba-4.15.9.ebuild 10022 BLAKE2B 29e5d9bc88635df131f2ed64ef0c271932f1f39601ca5714be1ace27bec18a33269d86059d47d26b05c280652fb0ec00089d1545377ed054b9da3a38b3114f66 SHA512 a85457c41f014f1a4f014ea8d9abab8a2546de733a1463a73fca21c391c4e6b20f2608f601d7e056103b1390dd56434042abf2e338af969eb239cc5d68f27cc2 EBUILD samba-4.16.0-r1.ebuild 10037 BLAKE2B 8679d1dbc9fe6a550eecfb86fb32ab26297c9b02eccc8a36621bcc13be96c70450e25759d9ffb810f87a43b6768e2bdbc459a990bbf4fbc261ff5bee5bac2ddf SHA512 75ff78eae02920315c40d74d7348a5ff98d5d20abc463a615e572602d2daf6e61f6fa66fbd910933c883ca9e7731360441d1fe575b2643926dace994fb59a549 EBUILD samba-4.16.1.ebuild 10085 BLAKE2B e652f81751b0e4971ba0f1850cdf6a629732b998f0a97a91f4a623a28a6ef1e67cb0d949144bd8e62f46cf1b970d62b4d5db73deec39420b68e0b913c71dbe4d SHA512 82f77c0504b778265c346347b1f9ca1955fbb436c23cb285985f0271013a221c121aba707eb055ec4215137d7a998356d8199fef100a811fe5a4156d2f1224ee EBUILD samba-4.16.2.ebuild 10117 BLAKE2B a11e7d116874f83589503eaeb3b5f689ab01e0c884d89665cd8586800599f7bd7dec1068e174cfaafe77f18add3a7f89cc4581a4a71319b68ad8e7478f52bf14 SHA512 59ec9c24962ae778c7b4928bbbd27bd0083fb13b5510e611aa3b5383334db77fedd2b97449b2f17e6ea76309fe61d7d89e8878add620f2333cda3199ddd5bc7e +EBUILD samba-4.16.4.ebuild 10117 BLAKE2B c6716648f6f610c1f378d8d9d34ed4e6ea8fff59ef9fc7bc7ba880eda5253d55932de22d11a24d65519c91e5c27a764ac7a81ee03da58a256902e4e7db353e20 SHA512 837eacab1cc4017f22049b1ff2bfcd57e1f5a1363dac582a33180909ef26628c8a17222f576708e8f1291bab0dc6d312adc5d63b3c9c7c078d92cf7bf1d69f37 MISC metadata.xml 2061 BLAKE2B b6232fb0408426e595b8569a26aba4938e2e0edd61cf4d73650ee4eed48725ca3181c212003515ef573a95bd73659fe482d964e26fef3ff61a66e06f0566b600 SHA512 301d931501a67d7189881fb269c31f75790b99c3c6c74caea963507ca5a60e5ae39bfd97f8d7e2f3096ae71645c8d7abea36d70ae621017c72cb20c9ec51d2d8 diff --git a/net-fs/samba/samba-4.14.14.ebuild b/net-fs/samba/samba-4.14.14.ebuild new file mode 100644 index 000000000000..d7e8bd93a28f --- /dev/null +++ b/net-fs/samba/samba-4.14.14.ebuild @@ -0,0 +1,342 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_REQ_USE="threads(+),xml(+)" +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles + +DESCRIPTION="Samba Suite Version 4" +HOMEPAGE="https://samba.org/" + +MY_PV="${PV/_rc/rc}" +MY_P="${PN}-${MY_PV}" +if [[ ${PV} = *_rc* ]]; then + SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" +else + SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-3" +SLOT="0" +IUSE="acl addc addns ads ceph client cluster cups debug fam glusterfs +gpg iprint json ldap ntvfs pam profiling-data python quota +regedit selinux +snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind +zeroconf" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + addc? ( python json winbind ) + addns? ( python ) + ads? ( acl ldap winbind ) + cluster? ( ads ) + gpg? ( addc ) + ntvfs? ( addc ) + spotlight? ( json ) + test? ( python ) + !ads? ( !addc ) + ?? ( system-heimdal system-mitkrb5 ) +" + +# 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 + /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 +) + +COMMON_DEPEND=" + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] + dev-lang/perl:= + dev-libs/icu:=[${MULTILIB_USEDEP}] + dev-libs/libbsd[${MULTILIB_USEDEP}] + dev-libs/libtasn1[${MULTILIB_USEDEP}] + dev-libs/popt[${MULTILIB_USEDEP}] + dev-perl/Parse-Yapp + >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] + net-libs/libnsl:=[${MULTILIB_USEDEP}] + >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] + >=sys-libs/ldb-2.3.4[ldap(+)?,${MULTILIB_USEDEP}] + =sys-libs/talloc-2.3.2[${MULTILIB_USEDEP}] + >=sys-libs/tdb-1.4.3[${MULTILIB_USEDEP}] + >=sys-libs/tevent-0.10.2[${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + virtual/libiconv + $(python_gen_cond_dep " + addc? ( + dev-python/dnspython:=[\${PYTHON_USEDEP}] + dev-python/markdown[\${PYTHON_USEDEP}] + ) + addns? ( + dev-python/dnspython:=[\${PYTHON_USEDEP}] + net-dns/bind-tools[gssapi] + ) + ") + !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) + acl? ( virtual/acl ) + ceph? ( sys-cluster/ceph ) + cluster? ( net-libs/rpcsvc-proto ) + cups? ( net-print/cups ) + debug? ( dev-util/lttng-ust ) + fam? ( virtual/fam ) + gpg? ( app-crypt/gpgme:= ) + json? ( dev-libs/jansson:= ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + pam? ( sys-libs/pam ) + python? ( + sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] + ) + snapper? ( sys-apps/dbus ) + 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= ) + zeroconf? ( net-dns/avahi[dbus] ) +" +DEPEND="${COMMON_DEPEND} + >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] + net-libs/libtirpc[${MULTILIB_USEDEP}] + || ( + net-libs/rpcsvc-proto + =net-dns/resolv_wrapper-1.1.4 + >=net-libs/socket_wrapper-1.1.9 + >=sys-libs/nss_wrapper-1.1.3 + >=sys-libs/uid_wrapper-1.2.1 + ) + )" +RDEPEND="${COMMON_DEPEND} + client? ( net-fs/cifs-utils[ads?] ) + python? ( ${PYTHON_DEPS} ) + selinux? ( sec-policy/selinux-samba ) +" +BDEPEND="${PYTHON_DEPS} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.4.0-pam.patch" +) + +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" +CONFDIR="${FILESDIR}/4.4" + +WAF_BINARY="${S}/buildtools/bin/waf" + +SHAREDMODS="" + +pkg_setup() { + # Package fails to build with distcc + export DISTCC_DISABLE=1 + + python-single-r1_pkg_setup + + SHAREDMODS="$(usex snapper '' '!')vfs_snapper" + 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 + if ! use test ; then + sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die + fi + + ## 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=( + --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 + --without-winexe + $(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) + --without-dmapi + $(multilib_native_use_with fam) + $(multilib_native_use_enable glusterfs) + $(multilib_native_use_with gpg gpgme) + $(multilib_native_use_with json) + $(multilib_native_use_enable iprint) + $(multilib_native_use_with ntvfs ntvfs-fileserver) + $(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 regedit) + $(multilib_native_use_enable spotlight) + $(multilib_native_use_with syslog) + $(multilib_native_use_with systemd) + --systemd-install-services + --with-systemddir="$(systemd_get_systemunitdir)" + $(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 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') + $(use_with debug lttng) + $(use_with ldap) + $(use_with profiling-data) + # bug #683148 + --jobs 1 + ) + + if multilib_is_native_abi ; then + myconf+=( --with-shared-modules=${SHAREDMODS} ) + else + myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) + fi + + CPPFLAGS="-I${ESYSROOT}/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 {} + || die + + 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 + + dotmpfiles "${FILESDIR}"/samba.conf + if ! use addc ; then + rm "${D}/$(systemd_get_systemunitdir)/samba.service" \ + || die + fi + + # Preserve functionality for old gentoo-specific unit names + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" + fi + + if use pam && use winbind ; then + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind + # bugs #376853 and #590374 + insinto /etc/security + doins examples/pam_winbind/pam_winbind.conf + fi + + keepdir /var/cache/samba + keepdir /var/lib/ctdb + keepdir /var/lib/samba/{bind-dns,private} + keepdir /var/lock/samba + keepdir /var/log/samba +} + +multilib_src_test() { + if multilib_is_native_abi ; then + "${WAF_BINARY}" test || die "test failed" + fi +} + +pkg_postinst() { + tmpfiles_process samba.conf + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "Be aware that this release contains the best of all of Samba's" + elog "technology parts, both a file server (that you can reasonably expect" + elog "to upgrade existing Samba 3.x releases to) and the AD domain" + elog "controller work previously known as 'samba4'." + elog + fi + 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 " +} diff --git a/net-fs/samba/samba-4.15.9.ebuild b/net-fs/samba/samba-4.15.9.ebuild new file mode 100644 index 000000000000..a2c269deaa76 --- /dev/null +++ b/net-fs/samba/samba-4.15.9.ebuild @@ -0,0 +1,340 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_REQ_USE="threads(+),xml(+)" +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles + +DESCRIPTION="Samba Suite Version 4" +HOMEPAGE="https://samba.org/" + +MY_PV="${PV/_rc/rc}" +MY_P="${PN}-${MY_PV}" +if [[ ${PV} = *_rc* ]]; then + SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" +else + SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-3" +SLOT="0" +IUSE="acl addc ads ceph client cluster cpu_flags_x86_aes cups debug fam +glusterfs gpg iprint json ldap pam profiling-data python quota +regedit selinux +snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind +zeroconf" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + addc? ( python json winbind ) + ads? ( acl ldap python winbind ) + cluster? ( ads ) + gpg? ( addc ) + spotlight? ( json ) + test? ( python ) + !ads? ( !addc ) + ?? ( system-heimdal system-mitkrb5 ) +" + +# 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 + /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 +) + +COMMON_DEPEND=" + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] + dev-lang/perl:= + dev-libs/icu:=[${MULTILIB_USEDEP}] + dev-libs/libbsd[${MULTILIB_USEDEP}] + dev-libs/libtasn1[${MULTILIB_USEDEP}] + dev-libs/popt[${MULTILIB_USEDEP}] + dev-perl/Parse-Yapp + >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] + >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] + >=sys-libs/ldb-2.4.4[ldap(+)?,${MULTILIB_USEDEP}] + =sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}] + >=sys-libs/tdb-1.4.4[${MULTILIB_USEDEP}] + >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + virtual/libiconv + $(python_gen_cond_dep " + addc? ( + dev-python/dnspython:=[\${PYTHON_USEDEP}] + dev-python/markdown[\${PYTHON_USEDEP}] + ) + ads? ( + dev-python/dnspython:=[\${PYTHON_USEDEP}] + net-dns/bind-tools[gssapi] + ) + ") + !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) + acl? ( virtual/acl ) + ceph? ( sys-cluster/ceph ) + cluster? ( net-libs/rpcsvc-proto ) + cups? ( net-print/cups ) + debug? ( dev-util/lttng-ust ) + fam? ( virtual/fam ) + gpg? ( app-crypt/gpgme:= ) + json? ( dev-libs/jansson:= ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + pam? ( sys-libs/pam ) + python? ( + sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] + ) + snapper? ( sys-apps/dbus ) + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) + system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd:0= ) + zeroconf? ( net-dns/avahi[dbus] ) +" +DEPEND="${COMMON_DEPEND} + >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] + net-libs/libtirpc[${MULTILIB_USEDEP}] + || ( + net-libs/rpcsvc-proto + =net-dns/resolv_wrapper-1.1.4 + >=net-libs/socket_wrapper-1.1.9 + >=sys-libs/nss_wrapper-1.1.3 + >=sys-libs/uid_wrapper-1.2.1 + ) + )" +RDEPEND="${COMMON_DEPEND} + client? ( net-fs/cifs-utils[ads?] ) + python? ( ${PYTHON_DEPS} ) + selinux? ( sec-policy/selinux-samba ) +" +BDEPEND="${PYTHON_DEPS} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.4.0-pam.patch" +) + +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" +CONFDIR="${FILESDIR}/4.4" + +WAF_BINARY="${S}/buildtools/bin/waf" + +SHAREDMODS="" + +pkg_setup() { + # Package fails to build with distcc + export DISTCC_DISABLE=1 + + python-single-r1_pkg_setup + + SHAREDMODS="$(usex snapper '' '!')vfs_snapper" + 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 + if ! use test ; then + sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die + fi + + ## 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=( + --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 + --without-winexe + --accel-aes=$(usex cpu_flags_x86_aes intelaesni none) + $(multilib_native_use_with acl acl-support) + $(multilib_native_usex addc '' '--without-ad-dc') + $(multilib_native_use_with ads) + $(multilib_native_use_enable ceph cephfs) + $(multilib_native_use_with cluster cluster-support) + $(multilib_native_use_enable cups) + --without-dmapi + $(multilib_native_use_with fam) + $(multilib_native_use_enable glusterfs) + $(multilib_native_use_with gpg gpgme) + $(multilib_native_use_with json) + $(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 regedit) + $(multilib_native_use_enable spotlight) + $(multilib_native_use_with syslog) + $(multilib_native_use_with systemd) + --systemd-install-services + --with-systemddir="$(systemd_get_systemunitdir)" + $(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 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') + $(use_with debug lttng) + $(use_with ldap) + $(use_with profiling-data) + # bug #683148 + --jobs 1 + ) + + if multilib_is_native_abi ; then + myconf+=( --with-shared-modules=${SHAREDMODS} ) + else + myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) + fi + + PYTHONHASHSEED=1 CPPFLAGS="-I${ESYSROOT}/usr/include/et ${CPPFLAGS}" \ + waf-utils_src_configure ${myconf[@]} +} + +multilib_src_compile() { + PYTHONHASHSEED=1 waf-utils_src_compile +} + +multilib_src_install() { + PYTHONHASHSEED=1 waf-utils_src_install + + # Make all .so files executable + find "${ED}" -type f -name "*.so" -exec chmod +x {} + || die + + 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 + + dotmpfiles "${FILESDIR}"/samba.conf + if ! use addc ; then + rm "${D}/$(systemd_get_systemunitdir)/samba.service" \ + || die + fi + + # Preserve functionality for old gentoo-specific unit names + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" + fi + + if use pam && use winbind ; then + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind + # bugs #376853 and #590374 + insinto /etc/security + doins examples/pam_winbind/pam_winbind.conf + fi + + keepdir /var/cache/samba + keepdir /var/lib/ctdb + keepdir /var/lib/samba/{bind-dns,private} + keepdir /var/lock/samba + keepdir /var/log/samba +} + +multilib_src_test() { + if multilib_is_native_abi ; then + "${WAF_BINARY}" test || die "test failed" + fi +} + +pkg_postinst() { + tmpfiles_process samba.conf + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "Be aware that this release contains the best of all of Samba's" + elog "technology parts, both a file server (that you can reasonably expect" + elog "to upgrade existing Samba 3.x releases to) and the AD domain" + elog "controller work previously known as 'samba4'." + elog + fi + if [[ "${PV}" != *_rc* ]] ; then + 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 " + fi +} diff --git a/net-fs/samba/samba-4.16.4.ebuild b/net-fs/samba/samba-4.16.4.ebuild new file mode 100644 index 000000000000..6aa50af58785 --- /dev/null +++ b/net-fs/samba/samba-4.16.4.ebuild @@ -0,0 +1,344 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_REQ_USE="threads(+),xml(+)" +inherit python-single-r1 waf-utils multilib-minimal linux-info systemd pam tmpfiles + +DESCRIPTION="Samba Suite Version 4" +HOMEPAGE="https://samba.org/" + +MY_PV="${PV/_rc/rc}" +MY_P="${PN}-${MY_PV}" +if [[ ${PV} = *_rc* ]]; then + SRC_URI="mirror://samba/rc/${MY_P}.tar.gz" +else + SRC_URI="mirror://samba/stable/${MY_P}.tar.gz" + KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +fi +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-3" +SLOT="0" +IUSE="acl addc ads ceph client cluster cpu_flags_x86_aes cups debug fam +glusterfs gpg iprint json ldap pam profiling-data python quota +regedit selinux +snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test winbind +zeroconf" + +REQUIRED_USE="${PYTHON_REQUIRED_USE} + addc? ( python json winbind ) + ads? ( acl ldap python winbind ) + cluster? ( ads ) + gpg? ( addc ) + spotlight? ( json ) + test? ( python ) + !ads? ( !addc ) + ?? ( system-heimdal system-mitkrb5 ) +" + +# 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 + /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 +) + +COMMON_DEPEND=" + >=app-arch/libarchive-3.1.2[${MULTILIB_USEDEP}] + dev-lang/perl:= + dev-libs/icu:=[${MULTILIB_USEDEP}] + dev-libs/libbsd[${MULTILIB_USEDEP}] + dev-libs/libtasn1[${MULTILIB_USEDEP}] + dev-libs/popt[${MULTILIB_USEDEP}] + dev-perl/Parse-Yapp + >=net-libs/gnutls-3.4.7[${MULTILIB_USEDEP}] + >=sys-fs/e2fsprogs-1.46.4-r51[${MULTILIB_USEDEP}] + >=sys-libs/ldb-2.5.2[ldap(+)?,${MULTILIB_USEDEP}] + =sys-libs/talloc-2.3.3[${MULTILIB_USEDEP}] + >=sys-libs/tdb-1.4.6[${MULTILIB_USEDEP}] + >=sys-libs/tevent-0.11.0[${MULTILIB_USEDEP}] + sys-libs/zlib[${MULTILIB_USEDEP}] + virtual/libcrypt:=[${MULTILIB_USEDEP}] + virtual/libiconv + $(python_gen_cond_dep " + addc? ( + dev-python/dnspython:=[\${PYTHON_USEDEP}] + dev-python/markdown[\${PYTHON_USEDEP}] + ) + ads? ( + dev-python/dnspython:=[\${PYTHON_USEDEP}] + net-dns/bind-tools[gssapi] + ) + ") + !alpha? ( !sparc? ( sys-libs/libunwind:= ) ) + acl? ( virtual/acl ) + ceph? ( sys-cluster/ceph ) + cluster? ( net-libs/rpcsvc-proto ) + cups? ( net-print/cups ) + debug? ( dev-util/lttng-ust ) + fam? ( virtual/fam ) + gpg? ( app-crypt/gpgme:= ) + json? ( dev-libs/jansson:= ) + ldap? ( net-nds/openldap:=[${MULTILIB_USEDEP}] ) + pam? ( sys-libs/pam ) + python? ( + sys-libs/ldb[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/talloc[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/tdb[python,${PYTHON_SINGLE_USEDEP}] + sys-libs/tevent[python,${PYTHON_SINGLE_USEDEP}] + ) + snapper? ( sys-apps/dbus ) + system-heimdal? ( >=app-crypt/heimdal-1.5[-ssl,${MULTILIB_USEDEP}] ) + system-mitkrb5? ( >=app-crypt/mit-krb5-1.19[${MULTILIB_USEDEP}] ) + systemd? ( sys-apps/systemd:0= ) + zeroconf? ( net-dns/avahi[dbus] ) +" +DEPEND="${COMMON_DEPEND} + >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] + dev-perl/JSON + net-libs/libtirpc[${MULTILIB_USEDEP}] + || ( + net-libs/rpcsvc-proto + =net-dns/resolv_wrapper-1.1.4 + >=net-libs/socket_wrapper-1.1.9 + >=sys-libs/nss_wrapper-1.1.3 + >=sys-libs/uid_wrapper-1.2.1 + ) + )" +RDEPEND="${COMMON_DEPEND} + client? ( net-fs/cifs-utils[ads?] ) + python? ( ${PYTHON_DEPS} ) + selinux? ( sec-policy/selinux-samba ) +" +BDEPEND="${PYTHON_DEPS} + app-text/docbook-xsl-stylesheets + dev-libs/libxslt + virtual/pkgconfig +" + +PATCHES=( + "${FILESDIR}/${PN}-4.4.0-pam.patch" + "${FILESDIR}/${PN}-4.16.1-netdb-defines.patch" + "${FILESDIR}/${PN}-4.16.2-fix-musl-without-innetgr.patch" +) + +#CONFDIR="${FILESDIR}/$(get_version_component_range 1-2)" +CONFDIR="${FILESDIR}/4.4" + +WAF_BINARY="${S}/buildtools/bin/waf" + +SHAREDMODS="" + +pkg_setup() { + # Package fails to build with distcc + export DISTCC_DISABLE=1 + export PYTHONHASHSEED=1 + + python-single-r1_pkg_setup + + SHAREDMODS="$(usex snapper '' '!')vfs_snapper" + 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 + if ! use test ; then + sed -i -e '/"iso8601":/d' "${S}"/third_party/wscript || die + fi + + ## 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=( + --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 + --without-winexe + --accel-aes=$(usex cpu_flags_x86_aes intelaesni none) + $(multilib_native_use_with acl acl-support) + $(multilib_native_usex addc '' '--without-ad-dc') + $(multilib_native_use_with ads) + $(multilib_native_use_enable ceph cephfs) + $(multilib_native_use_with cluster cluster-support) + $(multilib_native_use_enable cups) + --without-dmapi + $(multilib_native_use_with fam) + $(multilib_native_use_enable glusterfs) + $(multilib_native_use_with gpg gpgme) + $(multilib_native_use_with json) + $(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 regedit) + $(multilib_native_use_enable spotlight) + $(multilib_native_use_with syslog) + $(multilib_native_use_with systemd) + --systemd-install-services + --with-systemddir="$(systemd_get_systemunitdir)" + $(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 $(multilib_native_usex addc --with-experimental-mit-ad-dc '')" '') + $(use_with debug lttng) + $(use_with ldap) + $(use_with profiling-data) + # bug #683148 + --jobs 1 + ) + + if multilib_is_native_abi ; then + myconf+=( --with-shared-modules=${SHAREDMODS} ) + else + myconf+=( --with-shared-modules=DEFAULT,!vfs_snapper ) + fi + + CPPFLAGS="-I${ESYSROOT}/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 {} + || die + + 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 + + dotmpfiles "${FILESDIR}"/samba.conf + if ! use addc ; then + rm "${D}/$(systemd_get_systemunitdir)/samba.service" \ + || die + fi + + # Preserve functionality for old gentoo-specific unit names + dosym nmb.service "$(systemd_get_systemunitdir)/nmbd.service" + dosym smb.service "$(systemd_get_systemunitdir)/smbd.service" + dosym winbind.service "$(systemd_get_systemunitdir)/winbindd.service" + fi + + if use pam && use winbind ; then + newpamd "${CONFDIR}/system-auth-winbind.pam" system-auth-winbind + # bugs #376853 and #590374 + insinto /etc/security + doins examples/pam_winbind/pam_winbind.conf + fi + + keepdir /var/cache/samba + keepdir /var/lib/ctdb + keepdir /var/lib/samba/{bind-dns,private} + keepdir /var/lock/samba + keepdir /var/log/samba +} + +multilib_src_test() { + if multilib_is_native_abi ; then + "${WAF_BINARY}" test || die "test failed" + fi +} + +pkg_postinst() { + tmpfiles_process samba.conf + + if [[ -z ${REPLACING_VERSIONS} ]] ; then + elog "Be aware that this release contains the best of all of Samba's" + elog "technology parts, both a file server (that you can reasonably expect" + elog "to upgrade existing Samba 3.x releases to) and the AD domain" + elog "controller work previously known as 'samba4'." + elog + fi + if [[ "${PV}" != *_rc* ]] ; then + 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 " + fi +} -- cgit v1.2.3