From eba9b95ba8976f2938bafa5789c1b50611bb3459 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 30 Sep 2022 09:24:14 +0100 Subject: gentoo auto-resync : 30:09:2022 - 09:24:13 --- net-fs/Manifest.gz | Bin 3520 -> 3523 bytes net-fs/cifs-utils/Manifest | 7 +- net-fs/cifs-utils/cifs-utils-6.13-r1.ebuild | 141 -------- net-fs/cifs-utils/cifs-utils-6.15-r1.ebuild | 2 +- net-fs/cifs-utils/cifs-utils-7.0.ebuild | 142 ++++++++ net-fs/samba/Manifest | 23 +- .../files/samba-4.15.9-libunwind-automagic.patch | 118 +++++++ net-fs/samba/metadata.xml | 1 + net-fs/samba/samba-4.14.12-r3.ebuild | 342 ------------------- net-fs/samba/samba-4.15.10.ebuild | 333 +++++++++++++++++++ net-fs/samba/samba-4.15.4-r3.ebuild | 340 ------------------- net-fs/samba/samba-4.15.6-r1.ebuild | 340 ------------------- net-fs/samba/samba-4.15.9-r1.ebuild | 333 +++++++++++++++++++ net-fs/samba/samba-4.15.9.ebuild | 328 ------------------ net-fs/samba/samba-4.16.0-r1.ebuild | 341 ------------------- net-fs/samba/samba-4.16.1.ebuild | 342 ------------------- net-fs/samba/samba-4.16.2.ebuild | 344 ------------------- net-fs/samba/samba-4.16.4-r1.ebuild | 338 +++++++++++++++++++ net-fs/samba/samba-4.16.4.ebuild | 333 ------------------- net-fs/samba/samba-4.16.5-r1.ebuild | 368 +++++++++++++++++++++ 20 files changed, 1645 insertions(+), 2871 deletions(-) delete mode 100644 net-fs/cifs-utils/cifs-utils-6.13-r1.ebuild create mode 100644 net-fs/cifs-utils/cifs-utils-7.0.ebuild create mode 100644 net-fs/samba/files/samba-4.15.9-libunwind-automagic.patch delete mode 100644 net-fs/samba/samba-4.14.12-r3.ebuild create mode 100644 net-fs/samba/samba-4.15.10.ebuild delete mode 100644 net-fs/samba/samba-4.15.4-r3.ebuild delete mode 100644 net-fs/samba/samba-4.15.6-r1.ebuild create mode 100644 net-fs/samba/samba-4.15.9-r1.ebuild delete mode 100644 net-fs/samba/samba-4.15.9.ebuild delete mode 100644 net-fs/samba/samba-4.16.0-r1.ebuild delete mode 100644 net-fs/samba/samba-4.16.1.ebuild delete mode 100644 net-fs/samba/samba-4.16.2.ebuild create mode 100644 net-fs/samba/samba-4.16.4-r1.ebuild delete mode 100644 net-fs/samba/samba-4.16.4.ebuild create mode 100644 net-fs/samba/samba-4.16.5-r1.ebuild (limited to 'net-fs') diff --git a/net-fs/Manifest.gz b/net-fs/Manifest.gz index 9808a615fc59..00f6ccd231de 100644 Binary files a/net-fs/Manifest.gz and b/net-fs/Manifest.gz differ diff --git a/net-fs/cifs-utils/Manifest b/net-fs/cifs-utils/Manifest index 96b61dbac16b..8bb173bedab1 100644 --- a/net-fs/cifs-utils/Manifest +++ b/net-fs/cifs-utils/Manifest @@ -1,10 +1,9 @@ AUX cifs-utils-6.12-ln_in_destdir.patch 629 BLAKE2B aa901b00c41a58ae21d948b3eece79914dc78782fcd49afc27ba8d7fa061f8aec43d187ce1302d67b5e5fc2cce113906545b9ae9920704f29ad3758a71079994 SHA512 354e33c91b0678e08ba9dabd989a5afdb2e558fa71dc427b283f9b987f94908d9b696c95a7e608e13f26497a52e7e8bf973290a84b2024ac9bc817ba512adf26 AUX cifs-utils-6.15-musl.patch 2215 BLAKE2B 251be73f341d4573aa509915e364680fc6d85ed720ad5682812cd6ba418a64bd7c397bd742cd999cea52fda0e07d668e796383f034c5ccb1639764f93d050e9e SHA512 902deb413bbc7f34d9933fcae9c48c73bb2fb2aaca22b5ef3efd394bb2d550456548c08087db41a96a60f3e1ed945127ba242dc980b286dbf3abad1b0694c605 AUX cifs-utils-6.7-heimdal.patch 904 BLAKE2B de816117010e71ced5ad094e8ed3537b672b37a0e8ac0b999aa7aaf180ac051f6745ee68373948b266ad359e1ba3b58552eda6314b5a4339673bd04656ab6090 SHA512 e3364e05fba6aff57ea2f09b530692f4f5ec95213e91794388fff9382d210db9bacb28dae1440d3b35a570c0b3bc21084a067e0ce8333febd5246c52aa9260ae -DIST cifs-utils-6.13-kerberos_mount_regression_fix.patch.xz 4336 BLAKE2B de268f815ee4fbb750bf8b7d7110a69a808682c239a7c9196468ecc4d55a26eed3b63f8d8539569e16131060f57de389ef92e1063283eb2f41e65be00ed21bb1 SHA512 13d1fb8ff7c31100bfa481e647e9d3b90d61633173b3a71683246d7bb4b68c7e147d21697a17b7ad60e1ac8da2d48d6f4b51762370536a32d14da6c9a6db7e5e -DIST cifs-utils-6.13.tar.bz2 414584 BLAKE2B 5133ea39fc65acaf2a9791f8ac97dee681dd12f509e0abd095542ce663e7c62002b033dcf35f0a8eec214cb9940597fb568fd50d4cfe5271ca4e433afbe1a7bc SHA512 1337ac4b69f0c3e8d0241eb608207ba81dfa35f84c661649d25da78637882c4d73467b0f632be0bd120362e0b786e40eb340bffcf21c8a09629c441100fd10de DIST cifs-utils-6.15.tar.bz2 416592 BLAKE2B 8af926bf255c5b3a66bf52ccca99632aacb9ed1c83ad7db5543b32df2f3bcd4be9a9cd17b744ec115d1568d07084e2bd2d03849aa9ab97cff2862f39bcf137b8 SHA512 eedb8066563db584595a8ba7cb7a603e6b763ac2c1261430d605c327fcc5a831acd48b58ea55dd243af778dfdc827ab8c6daf4015764ff550dcffc2182773510 -EBUILD cifs-utils-6.13-r1.ebuild 3634 BLAKE2B 306cfc34bd2e8bab67f221bac8abcac52d5b57556f1e10ed3a9248ce83345d2269276e5727cc5f134af13431ff61b95ba9a3637dd4d91cb7ee2e51a8a0541223 SHA512 50d15605ff770799c16d8c0acc9b55199620f89ed1a62d7056e59da7359989174ccccca4fa18169219dd3dd72ecd1b429b733030245758232aec1c8b6e87655f -EBUILD cifs-utils-6.15-r1.ebuild 3610 BLAKE2B 02a15ac4708cbae6954f69f5d0740d2f00f153a5c8da3d905babf4b7c90ee8a9e59f0e49550a79698f74fc4a6a1cdfd538f09c2dfac080a2e2c1b15a097df496 SHA512 c4beb9202a5752db3a1c751144f2b731e573ef402299c32151fb0878d5605e84d72d8c88b3e93aae5f4a258325c6b343b13b796d870d0f3e4682d9034c43a764 +DIST cifs-utils-7.0.tar.bz2 418638 BLAKE2B 514d35f243d0ef7b866068a9a53a4b1704d2856d491d56aa469e8e3919b4030cb920a7f60d08851b0a23d28a020d1ddf7daa8b9ac412f1567a0a60d2f6ee6774 SHA512 4c57741af0c4567a78f352c73caca998881666a5ed36536275cfa775efd66ff1a44ebe539a8ed96c409c5b08a1378266964ce667a27e9fc7f2d43999c63dd0eb +EBUILD cifs-utils-6.15-r1.ebuild 3609 BLAKE2B 6defe1df914d6201f1c6b70d106fb829c1c918c3a16d94eaa5a2f2034081afed06aa5bc07fa109976de80b4192aed730721929bc4070cfc9d5847528192a2f66 SHA512 8e09e45b1fbf465a8a27e9e09bcc8d1e6cef645d2e7a79fdb347ebdae59fce70cfa283ea4c71a365bd7b265cbb399bfc9498915e1ef18bea3d17b9adfc3cb7eb EBUILD cifs-utils-6.15.ebuild 3485 BLAKE2B 691f8b6be41701110de819a67f9fa064e693757bcb9ad99d17b0da7dae4ee2e176455da08f16adc324c11d3eb9ea2dba5aab077049d42832db85b9532e2ba59c SHA512 5381c672478fd3bf506272f1cda66b5bf0a8bb1fec2435c1f84bb74fc56a67f909dfcbd9fba8415e166a6f73edadbfc6c6c6afdcf774238e15d26adf4348af6c +EBUILD cifs-utils-7.0.ebuild 3610 BLAKE2B 02a15ac4708cbae6954f69f5d0740d2f00f153a5c8da3d905babf4b7c90ee8a9e59f0e49550a79698f74fc4a6a1cdfd538f09c2dfac080a2e2c1b15a097df496 SHA512 c4beb9202a5752db3a1c751144f2b731e573ef402299c32151fb0878d5605e84d72d8c88b3e93aae5f4a258325c6b343b13b796d870d0f3e4682d9034c43a764 MISC metadata.xml 967 BLAKE2B dc6654b412c77f2e95cad9cfa2d4e4465d3292b546d55ddc04ad1b3d5b8220bbe4ef0b0d1409fb2f5da99851d45567667935057f5d5c15dad4e2cf26e3ce0e00 SHA512 c6b0fbdd9d776695032cd4a3e109717dfa7cd07b1456da8264dc0688fcfa158d1f4a73758ee24ba318f14e7a321811bd24f688ca3c39156b304028566315b650 diff --git a/net-fs/cifs-utils/cifs-utils-6.13-r1.ebuild b/net-fs/cifs-utils/cifs-utils-6.13-r1.ebuild deleted file mode 100644 index 49a473b376ae..000000000000 --- a/net-fs/cifs-utils/cifs-utils-6.13-r1.ebuild +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..10} ) - -inherit autotools bash-completion-r1 linux-info multilib pam python-single-r1 - -DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems" -HOMEPAGE="https://wiki.samba.org/index.php/LinuxCIFS_utils" -SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2" - -SRC_URI+=" https://dev.gentoo.org/~polynomial-c/${P}-kerberos_mount_regression_fix.patch.xz" - -LICENSE="GPL-3" -SLOT="0" -KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~mips ~ppc ppc64 ~riscv ~s390 ~sparc x86 ~x86-linux" -IUSE="+acl +ads +caps creds pam +python systemd" - -RDEPEND=" - !net-fs/mount-cifs - sys-apps/keyutils:= - ads? ( - sys-libs/talloc - virtual/krb5 - ) - caps? ( sys-libs/libcap-ng ) - pam? ( sys-libs/pam ) - python? ( ${PYTHON_DEPS} ) -" -DEPEND="${RDEPEND}" -BDEPEND="dev-python/docutils" -PDEPEND=" - acl? ( >=net-fs/samba-4.0.0_alpha1 ) -" - -REQUIRED_USE=" - acl? ( ads ) - python? ( ${PYTHON_REQUIRED_USE} ) -" - -DOCS="doc/linux-cifs-client-guide.odt" - -PATCHES=( - "${FILESDIR}/${PN}-6.12-ln_in_destdir.patch" #766594 - "${WORKDIR}/${P}-kerberos_mount_regression_fix.patch" #809023 -) - -pkg_setup() { - linux-info_pkg_setup - - if ! linux_config_exists || ! linux_chkconfig_present CIFS; then - ewarn "You must enable CIFS support in your kernel config, " - ewarn "to be able to mount samba shares. You can find it at" - ewarn - ewarn " File systems" - ewarn " Network File Systems" - ewarn " CIFS support" - ewarn - ewarn "and recompile your kernel ..." - fi - - use python && python-single-r1_pkg_setup -} - -src_prepare() { - default - - if has_version app-crypt/heimdal ; then - # https://bugs.gentoo.org/612584 - eapply "${FILESDIR}/${PN}-6.7-heimdal.patch" - fi - - eautoreconf -} - -src_configure() { - local myeconfargs=( - --enable-man - --enable-smbinfo - $(use_enable acl cifsacl cifsidmap) - $(use_enable ads cifsupcall) - $(use_with caps libcap) - $(use_enable creds cifscreds) - $(use_enable pam) - $(use_with pam pamdir $(getpam_mod_dir)) - $(use_enable python pythontools) - # mount.cifs can get passwords from systemd - $(use_enable systemd) - ) - ROOTSBINDIR="${EPREFIX}"/sbin \ - econf "${myeconfargs[@]}" -} - -src_install() { - default - - # remove empty directories - find "${ED}" -type d -empty -delete || die - - if use acl ; then - dodir /etc/cifs-utils - dosym ../../usr/$(get_libdir)/cifs-utils/idmapwb.so \ - /etc/cifs-utils/idmap-plugin - dodir /etc/request-key.d - echo 'create cifs.idmap * * /usr/sbin/cifs.idmap %k' \ - > "${ED}/etc/request-key.d/cifs.idmap.conf" - fi - - if use ads ; then - dodir /etc/request-key.d - echo 'create dns_resolver * * /usr/sbin/cifs.upcall %k' \ - > "${ED}/etc/request-key.d/cifs.upcall.conf" - echo 'create cifs.spnego * * /usr/sbin/cifs.upcall %k' \ - > "${ED}/etc/request-key.d/cifs.spnego.conf" - fi - - dobashcomp bash-completion/smbinfo - use python && python_fix_shebang "${ED}" -} - -pkg_postinst() { - # Inform about set-user-ID bit of mount.cifs - ewarn "setuid use flag was dropped due to multiple security implications" - ewarn "such as CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586" - ewarn "You are free to set setuid flags by yourself" - - # Inform about upcall usage - if use acl ; then - einfo "The cifs.idmap utility has been enabled by creating the" - einfo "configuration file /etc/request-key.d/cifs.idmap.conf" - einfo "This enables you to get and set CIFS acls." - fi - - if use ads ; then - einfo "The cifs.upcall utility has been enabled by creating the" - einfo "configuration file /etc/request-key.d/cifs.upcall.conf" - einfo "This enables you to mount DFS shares." - fi -} diff --git a/net-fs/cifs-utils/cifs-utils-6.15-r1.ebuild b/net-fs/cifs-utils/cifs-utils-6.15-r1.ebuild index a40518d230cb..521a23c9272a 100644 --- a/net-fs/cifs-utils/cifs-utils-6.15-r1.ebuild +++ b/net-fs/cifs-utils/cifs-utils-6.15-r1.ebuild @@ -13,7 +13,7 @@ SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2" LICENSE="GPL-3" SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" +KEYWORDS="~alpha ~amd64 arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" IUSE="+acl +ads +caps creds pam +python systemd" RDEPEND=" diff --git a/net-fs/cifs-utils/cifs-utils-7.0.ebuild b/net-fs/cifs-utils/cifs-utils-7.0.ebuild new file mode 100644 index 000000000000..a40518d230cb --- /dev/null +++ b/net-fs/cifs-utils/cifs-utils-7.0.ebuild @@ -0,0 +1,142 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..11} ) + +inherit autotools bash-completion-r1 linux-info pam python-single-r1 + +DESCRIPTION="Tools for Managing Linux CIFS Client Filesystems" +HOMEPAGE="https://wiki.samba.org/index.php/LinuxCIFS_utils https://git.samba.org/cifs-utils.git/?p=cifs-utils.git" +SRC_URI="https://ftp.samba.org/pub/linux-cifs/${PN}/${P}.tar.bz2" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x86-linux" +IUSE="+acl +ads +caps creds pam +python systemd" + +RDEPEND=" + ads? ( + sys-apps/keyutils:= + sys-libs/talloc + virtual/krb5 + ) + caps? ( sys-libs/libcap-ng ) + creds? ( sys-apps/keyutils:= ) + pam? ( + sys-apps/keyutils:= + sys-libs/pam + ) + python? ( ${PYTHON_DEPS} ) +" +DEPEND="${RDEPEND}" +BDEPEND="dev-python/docutils" +PDEPEND=" + acl? ( >=net-fs/samba-4.0.0_alpha1 ) +" + +REQUIRED_USE=" + acl? ( ads ) + python? ( ${PYTHON_REQUIRED_USE} ) +" + +DOCS="doc/linux-cifs-client-guide.odt" + +PATCHES=( + "${FILESDIR}/${PN}-6.12-ln_in_destdir.patch" #766594 + "${FILESDIR}/${PN}-6.15-musl.patch" +) + +pkg_setup() { + linux-info_pkg_setup + + if ! linux_config_exists || ! linux_chkconfig_present CIFS; then + ewarn "You must enable CIFS support in your kernel config, " + ewarn "to be able to mount samba shares. You can find it at" + ewarn + ewarn " File systems" + ewarn " Network File Systems" + ewarn " CIFS support" + ewarn + ewarn "and recompile your kernel ..." + fi + + use python && python-single-r1_pkg_setup +} + +src_prepare() { + default + + if has_version app-crypt/heimdal ; then + # https://bugs.gentoo.org/612584 + eapply "${FILESDIR}/${PN}-6.7-heimdal.patch" + fi + + eautoreconf +} + +src_configure() { + local myeconfargs=( + --enable-man + --enable-smbinfo + $(use_enable acl cifsacl cifsidmap) + $(use_enable ads cifsupcall) + $(use_with caps libcap) + $(use_enable creds cifscreds) + $(use_enable pam) + $(use_with pam pamdir $(getpam_mod_dir)) + $(use_enable python pythontools) + # mount.cifs can get passwords from systemd + $(use_enable systemd) + ) + ROOTSBINDIR="${EPREFIX}"/sbin \ + econf "${myeconfargs[@]}" +} + +src_install() { + default + + # remove empty directories + find "${ED}" -type d -empty -delete || die + + if use acl ; then + dodir /etc/cifs-utils + dosym ../../usr/$(get_libdir)/cifs-utils/idmapwb.so \ + /etc/cifs-utils/idmap-plugin + dodir /etc/request-key.d + echo 'create cifs.idmap * * /usr/sbin/cifs.idmap %k' \ + > "${ED}/etc/request-key.d/cifs.idmap.conf" + fi + + if use ads ; then + dodir /etc/request-key.d + echo 'create dns_resolver * * /usr/sbin/cifs.upcall %k' \ + > "${ED}/etc/request-key.d/cifs.upcall.conf" + echo 'create cifs.spnego * * /usr/sbin/cifs.upcall %k' \ + > "${ED}/etc/request-key.d/cifs.spnego.conf" + fi + + dobashcomp bash-completion/smbinfo + use python && python_fix_shebang "${ED}" +} + +pkg_postinst() { + # Inform about set-user-ID bit of mount.cifs + ewarn "setuid use flag was dropped due to multiple security implications" + ewarn "such as CVE-2009-2948, CVE-2011-3585 and CVE-2012-1586" + ewarn "You are free to set setuid flags by yourself" + + # Inform about upcall usage + if use acl ; then + einfo "The cifs.idmap utility has been enabled by creating the" + einfo "configuration file /etc/request-key.d/cifs.idmap.conf" + einfo "This enables you to get and set CIFS acls." + fi + + if use ads ; then + einfo "The cifs.upcall utility has been enabled by creating the" + einfo "configuration file /etc/request-key.d/cifs.upcall.conf" + einfo "This enables you to mount DFS shares." + fi +} diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest index cad8d0047f3a..4782e21bb789 100644 --- a/net-fs/samba/Manifest +++ b/net-fs/samba/Manifest @@ -2,31 +2,24 @@ AUX 4.4/samba4.confd 2035 BLAKE2B a9fa538a0b259c8a184012e0370819729e24fa971de52e AUX 4.4/samba4.initd-r1 1112 BLAKE2B 91d28710ccd512e19307bfd5ba97710ca071b478696d8e933d90b385f0c958a493ab684436915630de2884383e24eb1c9955ebd2b526b0b8f30438d9204dcb57 SHA512 3bfa4c8e0d77994fbca25eb0e12617166909c4d6742d1800c73f5640a7c39ee760988a315d39ddf8a575097df3d3c6fe3f308e8ca1cd698018544a9060176f4e AUX 4.4/system-auth-winbind.pam 590 BLAKE2B d8c0190dff88c5b65f7f01b3a84fd776194d3b4ce5c973bd1145e6a12750f01882b2873be03b537e9a68899c0a19fee7a4834385961090e4cb69dda7ae1763c0 SHA512 0886cfd99b3c3dc117b2a83b04bf59d080ebf77d6ea91f24cfc4d8be7af9db377e0efc2216e7c1f8a180b09fb425476ef6874180d9f0fa47e4889faf1d429679 AUX ldb-2.5.2-skip-wav-tevent-check.patch 606 BLAKE2B 9cfe1afd1adfca20e1fcdead2f2a60f52a64f181b85c227be6cf9c9373a64528afbe4e9db1970e8316d5bddf76ba9395a75b194f27bcf25eb4d2e7695c5530eb SHA512 19028447cbde09a425f1a07fe2d9a2a6f16cada1785e6e9684a8b573db5705b6694a29cd6f5480047360920562fcc654fc10faad39e73c565f7d475558cb57c8 +AUX samba-4.15.9-libunwind-automagic.patch 5309 BLAKE2B d06f4a6aef435854ea7ae1a3dc9862f088aee6790ab759babae2e7d268e02acbb353388ff775642126611732b7283c488e78fc5cf488b4188bd315a71222d45f SHA512 562d614eb5f338dca38c6a329f0b2df6ad05b3132d4750103fa40b8bee6ac1c7c761052849a3bad3b3096275ff778cc5431b4c40b6c4625b1772889f4c13b9b2 AUX samba-4.16.1-netdb-defines.patch 546 BLAKE2B eb42eb3429a221d700cc53381cda2a2dbff72cf43a0c3d5d8564d5e264a1ffaff15e3fd13f9647dd0a76e99323d656c07f26cf9c941f7407769c1a986c8c9025 SHA512 3802cf51d1dbcdf631ab4ffdc115ea58ad8d7bf1a23600e91eff2a70fcffb80161a3e87c360f7c961dae99c8f0267bf8f9feed739b388d012ece32bcf97c1dcf AUX samba-4.16.2-fix-musl-without-innetgr.patch 779 BLAKE2B cf6ba59edd10b6540f052dd9702d2e541cf8a7c864195485a5ab1bcf7acde8b1df875b8eded3f111eb1e71818ba88aa4df95482334563179f31e8dcc31bb9a3e SHA512 123c8885957c75893bebf8362778d978ad69102763fd87439cdd265316f72a60f7df86e4a1219ccb37df365ff3e54308f8b6c5cf6c0aa9189f17e0e9568737aa AUX samba-4.16.4-glibc-2.36.patch 1555 BLAKE2B 10a7c10cd3c29e83c975932534258583403c8634ed4ba4b72d4d8b0baee04a26c8ecfb6ca96591f8b3a47a5deb94cdbc1a0fc4ec500d166ea6df26a4fa2155ff SHA512 ec9f1a3bd8b6821186988285be7fb2c8b35a32c6592e7e7797a5a0513d6d45788a8253fc54c04b59c68105e441ff241d142fb151c2e571bb9240e429d1fce792 AUX samba-4.4.0-pam.patch 895 BLAKE2B bdc0601527a932424d55946b2eeaa288420ce90a8fd9be2271709da5c113625e80ae3783975b725c515004382bea65336ef725241079081cec213e81cc6e3056 SHA512 5a00c6131c372fc1cc9e23e4a37314442bf9af8e420a040a7b20ec3d76a357959d456437ed13e2e17f938eb6dcb4e7c5d899ff3d670526b0a444f63e35d5262c 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.10.tar.gz 19333317 BLAKE2B 20b414d51f915cfdcd50a10dd9d315d3be23a43d35051aa6ff8cdc3c07f430d96d933765a96882db0350792e740a4a4a18963cb7e8baa198c606180b9da273c3 SHA512 68e0096df9e348fdf389a11433391cd85606f075e9402ce64f2228daf126d794caf0050463eb2245933551b299735b25d5d5036c4ac78aba3e23c2fc2dce9ef6 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 +DIST samba-4.16.5.tar.gz 30613439 BLAKE2B 7f6eabb8817d0101d7f95b668ea352fe3a2a9291814b42a303ea89dd19b1bd192e719930485d721b90dcedb180e86e42a87083ae42166bf5b07e8383c85436c6 SHA512 9c4cd2ccbb6a4910d0da220e24bf3bf2cf25acaaebb5aa7358d8910016fac29b8ed1889f8ee0b4953d695583ff04d8de7bfffc2d97ae30aa7730e157aa7acfcf EBUILD samba-4.14.13.ebuild 10032 BLAKE2B d7cdcb67afe6dbb05e9a7fa8c3b9f5d3749cf91ed035c7581c504ad5db8c01dc21d8bf69a6a07e61e4d0a0db680677b7f51c5774b3d0ef5eb8758b91b0bd773a SHA512 1f96a484968fccb76e3985025701fd3ac97d191377ac3295212f78eeec5160af9919bd0738d8278f3a7bf0adb2ecbd04b9cc5e7405485f0e1a07c659e25d5c9b EBUILD samba-4.14.14.ebuild 9660 BLAKE2B 41e039e313b8794ab054cecda9725a0aa7ded062dc1e425606ffbbbd328254419f6fb5166bf77d7f8f6463147ba1050db0ceee09886e76b788440b81d5bc7352 SHA512 e736824251e9a8d5f1fb71856bd5d96afbafc65ae69caff045b6fb4285613a25a6d4340c9b97787574eb8096ca5ef94806266d8796fbe17d8bba91641afcff82 -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.10.ebuild 9711 BLAKE2B 531086649c51497214bd00c02a7e68d11e9140804140036b36422b521b4df401bceedcd3f55e8ef3e9d6964e48ecd86d900f09d10c94ba313e580162979d61b7 SHA512 27d69d6abeef174e949fe7657c1544f54c22aa23cbd59d118928d5f1ec56ab3e0b0263592aa55159a04f47a940b0f6ead6a5c8ce5b5be7e3720b50d7ae4653e9 EBUILD samba-4.15.7.ebuild 10015 BLAKE2B 2c9fb60746e70d5fb0582f75da7b0af11a51ba4f1b080716fb82c8dbc62de22b340d99e715e5bbee2f7c05cc8eb95ab414bca68f6a37eb1cd696878bc54fd717 SHA512 07e02a792279cb9a7a2db43722b9f2c6652fb67b52c0adaf3c894fc5c88a43f294a51ab32fc8bc403e6fa03661c16dc4aefb0950837c8135414225ac802a9157 -EBUILD samba-4.15.9.ebuild 9528 BLAKE2B 364955632155cb169220bce3b4f2e55b0398ef3a8f9ff9c1b2084e61b1825cb93d175bc655fedfa9701a603d11ccd9b31e1e097057a843a821a4b4865725a382 SHA512 2c2584924a79793408bc94d665a86af02babce0dbd86545c1831ef44a323dccb7866199adb93173c38beeae610ee90f281515ceccecbf7a601e423b11a223281 -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 9667 BLAKE2B f481f7460d981d48b8b498f1a30444534afa3fe3722a733369bea37c96a1885b685d1effb88e96142bbc46b87bf99b8c0b43141ec56cfc5f3859e0cc28cd9a0b SHA512 4c02fcc83f31544c17b0115530c1652048c5ecb8dd5fec1737652cea21beaead81f845139959b2f19eeff2d91bff42ecfce6f264f008c3e85d1a1dc88f8b55b9 -MISC metadata.xml 2061 BLAKE2B b6232fb0408426e595b8569a26aba4938e2e0edd61cf4d73650ee4eed48725ca3181c212003515ef573a95bd73659fe482d964e26fef3ff61a66e06f0566b600 SHA512 301d931501a67d7189881fb269c31f75790b99c3c6c74caea963507ca5a60e5ae39bfd97f8d7e2f3096ae71645c8d7abea36d70ae621017c72cb20c9ec51d2d8 +EBUILD samba-4.15.9-r1.ebuild 9711 BLAKE2B 531086649c51497214bd00c02a7e68d11e9140804140036b36422b521b4df401bceedcd3f55e8ef3e9d6964e48ecd86d900f09d10c94ba313e580162979d61b7 SHA512 27d69d6abeef174e949fe7657c1544f54c22aa23cbd59d118928d5f1ec56ab3e0b0263592aa55159a04f47a940b0f6ead6a5c8ce5b5be7e3720b50d7ae4653e9 +EBUILD samba-4.16.4-r1.ebuild 9850 BLAKE2B 229ac02531ab50bfa809fced527d3a8623e9c6087423ed2d28ee383f849b260bdd0f7f3dffda34304b2ec62feeb8a2504ba89c78144258b046be8cf139884c22 SHA512 92acc8aec6d6fc72d2eb41c89f6fdfc31e6c92fc9cea9f2effd3136f7fad4255b6ccb9ca119f7671e3604334caddd5fff5bcd5c05908e48c45876e6bb12ab662 +EBUILD samba-4.16.5-r1.ebuild 11020 BLAKE2B 7f563e44bb34582b7ef4f527e41de6b5be576920ab6e6dbc578449e0add505ed65cbec97bca30ee2306cf9f3b1f0576b29a70c087fe9930e6619f8f77ee3a5aa SHA512 aa990ecc7345353ba5f32797f6c22e1da3b3afc2d8f3cfeeaa158abfbf29676a4f1bce65428224ac4d25720672696fdb1bc243808a4065a8c092490b9bb43ab4 +MISC metadata.xml 2128 BLAKE2B c8b257313263ba01322d2840b823a3356d7252e60e6cc5ce5650c114f33b7aaf3078413fb5519903b0ba624ea921097a77f643a4ca2ebf7443e802bbd111e960 SHA512 a9152beaf1360acaaacebef66166512f71806f72ba124e3c1af35109581a00b09328225d0071d84291b7cc2632d20659773278c4ea5265f3277b94ca9c137f73 diff --git a/net-fs/samba/files/samba-4.15.9-libunwind-automagic.patch b/net-fs/samba/files/samba-4.15.9-libunwind-automagic.patch new file mode 100644 index 000000000000..c3a2c802e6e9 --- /dev/null +++ b/net-fs/samba/files/samba-4.15.9-libunwind-automagic.patch @@ -0,0 +1,118 @@ +https://gitlab.com/samba-team/samba/-/commit/14feb93d481011765f62614ab49b304e17e4f6fd +https://gitlab.com/samba-team/samba/-/merge_requests/2401?commit_id=ac8064cb0d79db377df75a22a240632dbc37f99f +https://bugs.gentoo.org/791349 + +From 14feb93d481011765f62614ab49b304e17e4f6fd Mon Sep 17 00:00:00 2001 +From: Andrew Bartlett +Date: Tue, 7 Jun 2022 15:07:59 +1200 +Subject: [PATCH] lib/util: Prefer backtrace_symbols() for internal backtraces + +Backtraces when Samba is in PANIC state are better with +backtrace_symbols() than with libunwind on Ubuntu 20.04 x86_64 +so move libunwind to a off-by-default option, prompted for +if backtrace_symbols() is not available. + +Based on a request by Fco Javier Felix + +Signed-off-by: Andrew Bartlett +Reviewed-by: Joseph Sutton +--- a/lib/util/fault.c ++++ b/lib/util/fault.c +@@ -222,9 +222,13 @@ _PUBLIC_ void smb_panic(const char *why) + void log_stack_trace(void) + { + #ifdef HAVE_LIBUNWIND +- /* Try to use libunwind before any other technique since on ia64 +- * libunwind correctly walks the stack in more circumstances than +- * backtrace. ++ /* ++ * --with-libunwind is required to use libunwind, the ++ * backtrace_symbols() code below is the default. ++ * ++ * This code is available because a previous version of this ++ * comment asserted that on ia64 libunwind correctly walks the ++ * stack in more circumstances than backtrace. + */ + unw_cursor_t cursor; + unw_context_t uc; +--- a/lib/util/wscript ++++ b/lib/util/wscript +@@ -2,6 +2,15 @@ def options(opt): + ''' This is a bit strange, but disable is the flag, not enable. ''' + opt.add_option('--disable-fault-handling', action='store_true', dest='disable_fault_handling', help=('disable the fault handlers'), default=False) + ++ # We do not want libunwind by default (backtrace_symbols() in ++ # glibc is better) but allow (eg) IA-64 to build with it where it ++ # might be better (per old comment in fault.c) ++ opt.samba_add_onoff_option('libunwind', ++ default=None, ++ help='''Use libunwind instead of the default backtrace_symbols() ++ from libc, for example on IA-64 where it might give a better ++ backtrace.''') ++ + opt.add_option('--with-systemd', + help=("Enable systemd integration"), + action='store_true', dest='enable_systemd') +--- a/lib/util/wscript_configure ++++ b/lib/util/wscript_configure +@@ -1,23 +1,35 @@ + #!/usr/bin/env python +-from waflib import Logs, Options ++from waflib import Logs, Options, Errors + + import os, sys + + if Options.options.disable_fault_handling: + conf.DEFINE('HAVE_DISABLE_FAULT_HANDLING',1) + +-# backtrace could be in libexecinfo or in libc ++# backtrace could be in libexecinfo or in libc. ++# This is our preferred backtrace handler (more useful output than libunwind as at Ubuntu 20.04 x86_64) + conf.CHECK_FUNCS_IN('backtrace backtrace_symbols', 'execinfo', checklibc=True, headers='execinfo.h') + conf.CHECK_HEADERS('execinfo.h') + + conf.SET_TARGET_TYPE('LIBUNWIND', 'EMPTY') +-if conf.check_cfg(package='libunwind-generic', +- args='--cflags --libs', +- msg='Checking for libunwind', +- uselib_store='LIBUNWIND', +- mandatory=False): +- if conf.CHECK_HEADERS('libunwind.h'): +- conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB') ++if Options.options.with_libunwind: ++ if conf.check_cfg(package='libunwind-generic', ++ args='--cflags --libs', ++ msg='Checking for libunwind', ++ uselib_store='LIBUNWIND', ++ mandatory=False): ++ if conf.CHECK_HEADERS('libunwind.h'): ++ conf.SET_TARGET_TYPE('LIBUNWIND', 'SYSLIB') ++ else: ++ raise Errors.WafError('--with-libunwind specified but libunwind not found') ++elif Options.options.with_libunwind == None: ++ if not conf.CONFIG_SET('HAVE_BACKTRACE_SYMBOLS') \ ++ and not Options.options.disable_fault_handling: ++ raise Errors.WafError( ++'''backtrace_symbols() not found but ++--with-libunwind not specified. ++Use --without-libunwind to build without internal backtrace support or ++--disable-fault-handling to totally defer fault handling to the OS.''') + + conf.CHECK_STRUCTURE_MEMBER('struct statvfs', 'f_frsize', define='HAVE_FRSIZE', headers='sys/statvfs.h') + +--- a/script/autobuild.py ++++ b/script/autobuild.py +@@ -480,10 +480,11 @@ tasks = { + # MIT Kerberos from the current system. Runtime behaviour is + # confirmed via the ktest (static ccache and keytab) environment + ++ # This environment also used to confirm we can still build with --with-libunwind + "samba-ktest-mit": { + "sequence": [ + ("random-sleep", random_sleep(300, 900)), +- ("configure", "./configure.developer --without-ad-dc --with-system-mitkrb5 " + samba_configure_params), ++ ("configure", "./configure.developer --without-ad-dc --with-libunwind --with-system-mitkrb5 " + samba_configure_params), + ("make", "make -j"), + ("test", make_test(include_envs=[ + "ktest", # ktest is also tested in fileserver, samba and +GitLab diff --git a/net-fs/samba/metadata.xml b/net-fs/samba/metadata.xml index 0430625e206a..eedfdee5aad4 100644 --- a/net-fs/samba/metadata.xml +++ b/net-fs/samba/metadata.xml @@ -29,6 +29,7 @@ bundled heimdal. Use app-crypt/mit-krb5 instead of app-crypt/heimdal. + Enable libunwind usage for backtraces Enables support for the winbind auth daemon diff --git a/net-fs/samba/samba-4.14.12-r3.ebuild b/net-fs/samba/samba-4.14.12-r3.ebuild deleted file mode 100644 index fbb716f96f4d..000000000000 --- a/net-fs/samba/samba-4.14.12-r3.ebuild +++ /dev/null @@ -1,342 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -PYTHON_COMPAT=( python3_{8..9} ) -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.2[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.10.ebuild b/net-fs/samba/samba-4.15.10.ebuild new file mode 100644 index 000000000000..6042a3515c40 --- /dev/null +++ b/net-fs/samba/samba-4.15.10.ebuild @@ -0,0 +1,333 @@ +# 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 llvm-libunwind pam profiling-data python quota +regedit selinux +snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test unwind 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] + ) + ") + 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= ) + unwind? ( + llvm-libunwind? ( sys-libs/llvm-libunwind:= ) + !llvm-libunwind? ( sys-libs/libunwind:= ) + ) + 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" + "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.patch" + "${FILESDIR}/${PN}-4.15.9-libunwind-automagic.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 unwind libunwind) + $(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 +} diff --git a/net-fs/samba/samba-4.15.4-r3.ebuild b/net-fs/samba/samba-4.15.4-r3.ebuild deleted file mode 100644 index 117c8a7ef117..000000000000 --- a/net-fs/samba/samba-4.15.4-r3.ebuild +++ /dev/null @@ -1,340 +0,0 @@ -# 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.1[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 - - 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 -} diff --git a/net-fs/samba/samba-4.15.6-r1.ebuild b/net-fs/samba/samba-4.15.6-r1.ebuild deleted file mode 100644 index aa3c460800e1..000000000000 --- a/net-fs/samba/samba-4.15.6-r1.ebuild +++ /dev/null @@ -1,340 +0,0 @@ -# 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.2[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.15.9-r1.ebuild b/net-fs/samba/samba-4.15.9-r1.ebuild new file mode 100644 index 000000000000..6042a3515c40 --- /dev/null +++ b/net-fs/samba/samba-4.15.9-r1.ebuild @@ -0,0 +1,333 @@ +# 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 llvm-libunwind pam profiling-data python quota +regedit selinux +snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test unwind 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] + ) + ") + 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= ) + unwind? ( + llvm-libunwind? ( sys-libs/llvm-libunwind:= ) + !llvm-libunwind? ( sys-libs/libunwind:= ) + ) + 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" + "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.patch" + "${FILESDIR}/${PN}-4.15.9-libunwind-automagic.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 unwind libunwind) + $(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 +} diff --git a/net-fs/samba/samba-4.15.9.ebuild b/net-fs/samba/samba-4.15.9.ebuild deleted file mode 100644 index 3ea8aa274e59..000000000000 --- a/net-fs/samba/samba-4.15.9.ebuild +++ /dev/null @@ -1,328 +0,0 @@ -# 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" - "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.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 -} diff --git a/net-fs/samba/samba-4.16.0-r1.ebuild b/net-fs/samba/samba-4.16.0-r1.ebuild deleted file mode 100644 index a7d3fa8bb5d3..000000000000 --- a/net-fs/samba/samba-4.16.0-r1.ebuild +++ /dev/null @@ -1,341 +0,0 @@ -# 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.0[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" -) - -#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.1.ebuild b/net-fs/samba/samba-4.16.1.ebuild deleted file mode 100644 index 8b16a80d66cb..000000000000 --- a/net-fs/samba/samba-4.16.1.ebuild +++ /dev/null @@ -1,342 +0,0 @@ -# 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.0[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" -) - -#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.2.ebuild b/net-fs/samba/samba-4.16.2.ebuild deleted file mode 100644 index e5115c4e9c41..000000000000 --- a/net-fs/samba/samba-4.16.2.ebuild +++ /dev/null @@ -1,344 +0,0 @@ -# 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.1[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 -} diff --git a/net-fs/samba/samba-4.16.4-r1.ebuild b/net-fs/samba/samba-4.16.4-r1.ebuild new file mode 100644 index 000000000000..6dc422deafb4 --- /dev/null +++ b/net-fs/samba/samba-4.16.4-r1.ebuild @@ -0,0 +1,338 @@ +# 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 ~loong ~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 llvm-libunwind pam profiling-data python quota +regedit selinux +snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test unwind 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] + ) + ") + 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= ) + unwind? ( + llvm-libunwind? ( sys-libs/llvm-libunwind:= ) + !llvm-libunwind? ( sys-libs/libunwind:= ) + ) + 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" + "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.patch" + "${FILESDIR}/${P}-glibc-2.36.patch" + "${FILESDIR}/${PN}-4.15.9-libunwind-automagic.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 unwind libunwind) + $(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 +} diff --git a/net-fs/samba/samba-4.16.4.ebuild b/net-fs/samba/samba-4.16.4.ebuild deleted file mode 100644 index ae46c2cab18c..000000000000 --- a/net-fs/samba/samba-4.16.4.ebuild +++ /dev/null @@ -1,333 +0,0 @@ -# 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 ~loong ~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" - "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.patch" - "${FILESDIR}/${P}-glibc-2.36.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 -} diff --git a/net-fs/samba/samba-4.16.5-r1.ebuild b/net-fs/samba/samba-4.16.5-r1.ebuild new file mode 100644 index 000000000000..4ece5b887999 --- /dev/null +++ b/net-fs/samba/samba-4.16.5-r1.ebuild @@ -0,0 +1,368 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +PYTHON_COMPAT=( python3_{8..10} ) +PYTHON_REQ_USE="threads(+),xml(+)" +inherit python-single-r1 flag-o-matic 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 ~loong ~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" +IUSE+=" iprint json ldap llvm-libunwind pam profiling-data python quota +regedit selinux" +IUSE+=" snapper spotlight syslog system-heimdal +system-mitkrb5 systemd test unwind winbind" +IUSE+=" 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 +) + +TALLOC_VERSION="2.3.3" +TDB_VERSION="1.4.6" +TEVENT_VERSION="0.11.0" + +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-${TALLOC_VERSION}[${MULTILIB_USEDEP}] + >=sys-libs/tdb-${TDB_VERSION}[${MULTILIB_USEDEP}] + >=sys-libs/tevent-${TEVENT_VERSION}[${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] + ) + ') + 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:= ) + unwind? ( + llvm-libunwind? ( sys-libs/llvm-libunwind:= ) + !llvm-libunwind? ( sys-libs/libunwind:= ) + ) + zeroconf? ( net-dns/avahi[dbus] ) +" +DEPEND="${COMMON_DEPEND} + dev-perl/JSON + net-libs/libtirpc[${MULTILIB_USEDEP}] + net-libs/rpcsvc-proto + spotlight? ( dev-libs/glib ) + test? ( + >=dev-util/cmocka-1.1.3[${MULTILIB_USEDEP}] + $(python_gen_cond_dep "dev-python/subunit[\${PYTHON_USEDEP},${MULTILIB_USEDEP}]" ) + !system-mitkrb5? ( + >=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" + "${FILESDIR}/ldb-2.5.2-skip-wav-tevent-check.patch" + "${FILESDIR}/${PN}-4.15.9-libunwind-automagic.patch" +) + +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="$(usev !snapper '!')vfs_snapper" + if use cluster ; then + SHAREDMODS+=",idmap_rid,idmap_tdb2,idmap_ad" + elif use ads ; then + SHAREDMODS+=",idmap_ad" + fi +} + +check_samba_dep_versions() { + actual_talloc_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/talloc/wscript || die) + if [[ ${actual_talloc_version} != ${TALLOC_VERSION} ]] ; then + eerror "Source talloc version: ${TALLOC_VERSION}" + eerror "Ebuild talloc version: ${actual_talloc_version}" + die "Ebuild needs to fix TALLOC_VERSION!" + fi + + actual_tdb_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tdb/wscript || die) + if [[ ${actual_tdb_version} != ${TDB_VERSION} ]] ; then + eerror "Source tdb version: ${TDB_VERSION}" + eerror "Ebuild tdb version: ${actual_tdb_version}" + die "Ebuild needs to fix TDB_VERSION!" + fi + + actual_tevent_version=$(sed -En '/^VERSION =/{s/[^0-9.]//gp}' lib/tevent/wscript || die) + if [[ ${actual_tevent_version} != ${TEVENT_VERSION} ]] ; then + eerror "Source tevent version: ${TEVENT_VERSION}" + eerror "Ebuild tevent version: ${actual_tevent_version}" + die "Ebuild needs to fix TEVENT_VERSION!" + fi +} + +src_prepare() { + default + + check_samba_dep_versions + + # Unbundle 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 + + # WAF + 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 + + # We "use" bundled cmocka when we're not running tests as we're + # not using it anyway. Means we avoid making users install it for + # no reason. bug #802531 + if ! use test ; then + bundled_libs="cmocka,${bundled_libs}" + 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 unwind libunwind) + $(multilib_native_use_with winbind) + $(multilib_native_usex python '' '--disable-python') + $(multilib_native_use_enable zeroconf avahi) + $(multilib_native_usex test '--enable-selftest' '') + $(usev 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 + + append-cppflags "-I${ESYSROOT}/usr/include/et" + + waf-utils_src_configure ${myconf[@]} +} + +multilib_src_compile() { + waf-utils_src_compile +} + +multilib_src_test() { + if multilib_is_native_abi ; then + "${WAF_BINARY}" test || die "Test failed" + fi +} + +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 (bug #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 +} + +pkg_postinst() { + tmpfiles_process samba.conf +} -- cgit v1.2.3