From 57c2e006d0af9ab77ced676461d7100cade4a716 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Wed, 23 Nov 2022 01:07:24 +0000 Subject: gentoo auto-resync : 23:11:2022 - 01:07:24 --- net-fs/samba/Manifest | 5 +- .../files/samba-4.15.12-configure-clang16.patch | 117 +++++++ net-fs/samba/samba-4.15.12-r1.ebuild | 334 +++++++++++++++++++ net-fs/samba/samba-4.15.12.ebuild | 333 ------------------- net-fs/samba/samba-4.16.7-r1.ebuild | 369 +++++++++++++++++++++ net-fs/samba/samba-4.16.7.ebuild | 368 -------------------- 6 files changed, 823 insertions(+), 703 deletions(-) create mode 100644 net-fs/samba/files/samba-4.15.12-configure-clang16.patch create mode 100644 net-fs/samba/samba-4.15.12-r1.ebuild delete mode 100644 net-fs/samba/samba-4.15.12.ebuild create mode 100644 net-fs/samba/samba-4.16.7-r1.ebuild delete mode 100644 net-fs/samba/samba-4.16.7.ebuild (limited to 'net-fs/samba') diff --git a/net-fs/samba/Manifest b/net-fs/samba/Manifest index bdb6bb42168e..72352fcd61f5 100644 --- a/net-fs/samba/Manifest +++ b/net-fs/samba/Manifest @@ -2,6 +2,7 @@ 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.12-configure-clang16.patch 4275 BLAKE2B 16cd5fb091b677ca0313eb2fbbc8beda0a16e3d4903d746d5bae6457994b89bfd12bed932c326f7742d697612c51f49ba98d33a1eff3d8dc9cbf1e7fd4dc5644 SHA512 0bb00b4b0ac2037cac0666682c97a14d878ba2f02303e3ee871d1df2ddad4425450da56d4a999e4ae32a95349abd8299bed034f2a601c22958f77441c69a8690 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 @@ -10,7 +11,7 @@ AUX samba.conf 88 BLAKE2B 5bf3391fdf31b284bfa68b904370776d2e5b14fe0ce5677b4982b5 DIST samba-4.15.12.tar.gz 19339629 BLAKE2B b394767944e57dc907641c3635ccf290f48bd8a5880e5514066cf410c81eca6f1432a69b67b666ef7c052e2d90541579927456820e58e872a28b7946951f585d SHA512 6cb46bdd7eaebbcd76fb520d959cca22da924049c632338d954f9c8b16015288eebc982e20dcf9f1ed6deabd77e002dfaa920e3b2457f16a6768a1b1bea9dc3e DIST samba-4.15.9.tar.gz 19324742 BLAKE2B 36cca5ac1b449339f2ce420d4f29f25151bcd536556bfc571db6422a95e9c5daed98b9a71387babbfc61d43e5ff183a1b69255dbec966f80a1cb8fe0ad40f636 SHA512 2ee5d66f5a7c1ff5b27c959be6310335eb6484476c1eadb3b8ca1bc84fb2260487136c1318539e1dc459b81bca66f268fd979f6a816ff5f905bd605a99685004 DIST samba-4.16.7.tar.gz 30622700 BLAKE2B be35253fd8ced22533716c7190ca02e57d4b9c73ac0d54b1e987c87da9e2fcc686335b9d470902cde47b841f3b57c09f9aab16f17c760b5eb7e45e328b3b2d1c SHA512 3966ef870b24e4282ce971bdc5906fb6f64a5bb99d448d9aade3ad013551b21b3cf42f792853be7e118483ba5b6f9d4b835ada642661a90051b6c04886e10c1e -EBUILD samba-4.15.12.ebuild 9727 BLAKE2B 0aff98a4c44d966cbf28c1148f742edbac84839f73b3fcc186968e0166c21a8edd2815791ab464ec1ffc6649c5908e0ea7879fab4153db1153743d97d79aee4d SHA512 bbe417d408bf10beaa8bbccba1351c54a0f84150073a404419f378b5f61398fbc7a60627aa4386d86d487ff83ade356a10021600adbc17cc1aa829147f23e61d +EBUILD samba-4.15.12-r1.ebuild 9780 BLAKE2B 05754f6ed9f3a6e27d5dfa76500b30fcd8a104f3481597569fa6d8ebbf301cb222e598b14f92834bfd59330c661f236fe3eea68542bc84e840fab4b11070158d SHA512 932f9358a488c47b5935e92a8b206e4f5393a0145c9004ddb91b05181b601fb862d5116823abc994b49b30b28f4f908823176bca95efcf771a1b8349e61df1e0 EBUILD samba-4.15.9-r1.ebuild 9704 BLAKE2B d4abae8c0bf0455bb952dceb14f5661288b5b5af3c09f13be212130e17888f6638f236d1ab4241939a3f00e49be95b015ebea54d08247def32889bd54aa287f8 SHA512 f58b013c6babd88eb28d028c21d5bce487999feebdc69e41d383dddb7c0bd6bce68909760c3c112f2ac235b4ec4e43b5beec7396d681639e26db20750867e376 -EBUILD samba-4.16.7.ebuild 11036 BLAKE2B e21c65952f04d8c09843a8b72e2d7ca3cf7457cde06a0e92b67dd5374e8caefc854f05a36526c22ecc3d3153ff2f97174fc73d1c014447f0f02be1dd248149bb SHA512 3c665d6a6950b988358e26eb996a245586b21a4aa0024a1acf007fc56c227477208dddd93e80a6053be8c2c8070c41a75945744f235fa5620c0494119ce6d23c +EBUILD samba-4.16.7-r1.ebuild 11089 BLAKE2B 5ddecde0fffcfd4bdb01a1569b6b49abf0a7360414c378437dcad4c020ce8b0142db361de070717308d6aa96109944a3c57a8995bc52339c9c506316ec4265e8 SHA512 470f6774130b8efc276a5cf40389ebf14d0af1b4e5781aee9f036e2236022e1ec645172984946884aecc1e8f64b1f8e9fab6575ef7b499372f2911ef018b45cb MISC metadata.xml 2010 BLAKE2B b1135356db448584c1b156face08f4cfedd782bf2791b7871e97a0438e6e9dbc56d3cd05afdf27973eef9baaa87f7fe55e4a341b44419221b950b301751e8319 SHA512 b066c8fd68dc78ee569e2008c841b731ff8be339fda7f3d5c681a5aab51661f9d7e84f56e6f90c86d395435c09e920694b45a0eae76c05aa9781410354f72941 diff --git a/net-fs/samba/files/samba-4.15.12-configure-clang16.patch b/net-fs/samba/files/samba-4.15.12-configure-clang16.patch new file mode 100644 index 000000000000..0d9c919bd9eb --- /dev/null +++ b/net-fs/samba/files/samba-4.15.12-configure-clang16.patch @@ -0,0 +1,117 @@ +https://bugs.gentoo.org/870043 +https://gitlab.com/samba-team/samba/-/merge_requests/2807 + +From afc5144819e0db141aa9c58de385e5829b952096 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 21 Nov 2022 13:37:41 +0100 +Subject: [PATCH 1/3] buildtools/wafsamba: Avoid calling lib_func without a + prototype + +This is a backport of commit f4c0a750d4adebcf2342a44e85f04526c34 +("WAF: Fix detection of linker features") +to buildtools/wafsamba/samba_conftests.py. It fixes the check for +rpath support with compilers in strict C99 mode. + +Signed-off-by: Florian Weimer +--- a/buildtools/wafsamba/samba_waf18.py ++++ b/buildtools/wafsamba/samba_waf18.py +@@ -209,7 +209,8 @@ def CHECK_LIBRARY_SUPPORT(conf, rpath=False, version_script=False, msg=None): + lib_node.parent.mkdir() + lib_node.write('int lib_func(void) { return 42; }\n', 'w') + main_node = bld.srcnode.make_node('main.c') +- main_node.write('int main(void) {return !(lib_func() == 42);}', 'w') ++ main_node.write('int lib_func(void);\n' ++ 'int main(void) {return !(lib_func() == 42);}', 'w') + linkflags = [] + if version_script: + script = bld.srcnode.make_node('ldscript') +GitLab +From d8c6a9e5558085dfdb144bb64365822415affe84 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 21 Nov 2022 13:53:17 +0100 +Subject: [PATCH 2/3] source3/wscript: Fix detection of major/minor macros + +These macros are only available via as of glibc +commit e16deca62e16f645213dffd4ecd1153c37765f17 ("[BZ #19239] Don't +include sys/sysmacros.h from sys/types.h."), which went into +glibc 2.28. + +This is different from the usual C99 cleanups because it changes +the configure check result with existing compilers that usually +accept implicit function declarations. + +Signed-off-by: Florian Weimer +--- a/source3/wscript ++++ b/source3/wscript +@@ -603,11 +603,11 @@ msg.msg_accrightslen = sizeof(fd); + conf.CHECK_HEADERS('asm/types.h') + + conf.CHECK_CODE('dev_t dev; int i = major(dev); return 0', "HAVE_DEVICE_MAJOR_FN", +- headers='unistd.h sys/types.h', ++ headers='sys/sysmacros.h unistd.h sys/types.h', + msg="Checking for major macro") + + conf.CHECK_CODE('dev_t dev; int i = minor(dev); return 0', "HAVE_DEVICE_MINOR_FN", +- headers='unistd.h sys/types.h', ++ headers='sys/sysmacros.h unistd.h sys/types.h', + msg="Checking for minor macro") + + conf.CHECK_STRUCTURE_MEMBER('struct dirent', 'd_off', +GitLab +From 1f5c44d982c112e21879b64911a4184c063ba4d4 Mon Sep 17 00:00:00 2001 +From: Florian Weimer +Date: Mon, 21 Nov 2022 14:12:43 +0100 +Subject: [PATCH 3/3] source3/wscript: Remove implict int and implicit function + declarations + +This should fix the remaining C89isms in these configure checks. + +Signed-off-by: Florian Weimer +--- a/source3/wscript ++++ b/source3/wscript +@@ -1314,7 +1314,7 @@ syscall(SYS_initgroups, 16, NULL, NULL, 0); + + if conf.CHECK_CODE(''' + #include +-main() { ++int main() { + struct tm *tm; + if (sizeof(time_t) == 8) { + time_t max_time = 0x7fffffffffffffffll; +@@ -1345,7 +1345,7 @@ main() { + #if defined(HAVE_SYS_SYSMACROS_H) + #include + #endif +-main() { dev_t dev = makedev(1,2); return 0; } ++int main() { dev_t dev = makedev(1,2); return 0; } + ''', + 'HAVE_MAKEDEV', + addmain=False, +@@ -1355,12 +1355,13 @@ main() { dev_t dev = makedev(1,2); return 0; } + #include + #include + #include ++#include + + void exit_on_core(int ignored) { + exit(1); + } + +-main() { ++int main() { + char *newpath; + signal(SIGSEGV, exit_on_core); + newpath = realpath("/tmp", NULL); +@@ -1517,9 +1518,9 @@ main() { + # Check for getcwd allowing a NULL arg. + conf.CHECK_CODE(''' + #include +-main() { ++int main() { + char *s = getcwd(NULL,0); +- exit(s != NULL ? 0 : 1); ++ return s != NULL ? 0 : 1; + }''', 'GETCWD_TAKES_NULL', addmain=False, execute=True, + msg="getcwd takes a NULL argument") + +GitLab diff --git a/net-fs/samba/samba-4.15.12-r1.ebuild b/net-fs/samba/samba-4.15.12-r1.ebuild new file mode 100644 index 000000000000..9d2737f68680 --- /dev/null +++ b/net-fs/samba/samba-4.15.12-r1.ebuild @@ -0,0 +1,334 @@ +# 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 !system-mitkrb5 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" + "${FILESDIR}/${PN}-4.15.12-configure-clang16.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.12.ebuild b/net-fs/samba/samba-4.15.12.ebuild deleted file mode 100644 index 1c4025ebfcf5..000000000000 --- a/net-fs/samba/samba-4.15.12.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 ~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 !system-mitkrb5 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.16.7-r1.ebuild b/net-fs/samba/samba-4.16.7-r1.ebuild new file mode 100644 index 000000000000..36cf60e8eed0 --- /dev/null +++ b/net-fs/samba/samba-4.16.7-r1.ebuild @@ -0,0 +1,369 @@ +# 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? ( json python !system-mitkrb5 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" + "${FILESDIR}/${PN}-4.15.12-configure-clang16.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 +} diff --git a/net-fs/samba/samba-4.16.7.ebuild b/net-fs/samba/samba-4.16.7.ebuild deleted file mode 100644 index 7dff703ab008..000000000000 --- a/net-fs/samba/samba-4.16.7.ebuild +++ /dev/null @@ -1,368 +0,0 @@ -# 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? ( json python !system-mitkrb5 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