From 401101f9c8077911929d3f2b60a37098460a5d89 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 24 Mar 2022 23:59:54 +0000 Subject: gentoo resync : 25.03.2022 --- net-nds/389-ds-base/389-ds-base-1.4.4.19-r1.ebuild | 324 --------- net-nds/389-ds-base/389-ds-base-1.4.4.19-r2.ebuild | 324 +++++++++ net-nds/389-ds-base/389-ds-base-2.1.0-r1.ebuild | 321 +++++++++ net-nds/389-ds-base/389-ds-base-2.1.0.ebuild | 321 --------- net-nds/389-ds-base/Manifest | 4 +- net-nds/Manifest.gz | Bin 2563 -> 2560 bytes net-nds/adtool/Manifest | 2 +- net-nds/adtool/adtool-1.3.3-r1.ebuild | 29 - net-nds/adtool/adtool-1.3.3-r2.ebuild | 30 + net-nds/ldapvi/Manifest | 2 +- net-nds/ldapvi/ldapvi-1.7_p20101214-r2.ebuild | 52 -- net-nds/ldapvi/ldapvi-1.7_p20101214-r3.ebuild | 52 ++ net-nds/openldap/Manifest | 39 +- .../files/openldap-2.2.14-perlthreadsfix.patch | 5 +- .../openldap/files/openldap-2.4.11-libldap_r.patch | 5 +- .../openldap/files/openldap-2.4.15-ppolicy.patch | 4 +- net-nds/openldap/files/openldap-2.4.17-gcc44.patch | 5 +- .../openldap/files/openldap-2.4.28-fix-dash.patch | 2 - .../files/openldap-2.4.28-gnutls-gcrypt.patch | 4 +- .../files/openldap-2.4.35-contrib-samba4.patch | 5 +- .../files/openldap-2.4.35-contrib-smbk5pwd.patch | 5 +- .../files/openldap-2.4.42-mdb-unbundle.patch | 16 +- ...enldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch | 4 +- .../openldap/files/openldap-2.4.47-warnings.patch | 6 - .../files/openldap-2.4.6-evolution-ntlm.patch | 15 +- net-nds/openldap/files/openldap-2.6.1-cloak.patch | 4 - .../openldap-2.6.1-fix-bashism-configure.patch | 11 + .../files/openldap-2.6.1-fix-missing-mapping.patch | 6 - net-nds/openldap/files/openldap-2.6.1-flags.patch | 64 -- .../openldap/files/openldap-2.6.1-system-mdb.patch | 8 - net-nds/openldap/files/slapd-initd | 8 +- net-nds/openldap/files/slapd-initd-2.4.40-r2 | 2 +- net-nds/openldap/openldap-2.6.1-r1.ebuild | 799 +++++++++++++++++++++ net-nds/openldap/openldap-2.6.1.ebuild | 794 -------------------- 34 files changed, 1596 insertions(+), 1676 deletions(-) delete mode 100644 net-nds/389-ds-base/389-ds-base-1.4.4.19-r1.ebuild create mode 100644 net-nds/389-ds-base/389-ds-base-1.4.4.19-r2.ebuild create mode 100644 net-nds/389-ds-base/389-ds-base-2.1.0-r1.ebuild delete mode 100644 net-nds/389-ds-base/389-ds-base-2.1.0.ebuild delete mode 100644 net-nds/adtool/adtool-1.3.3-r1.ebuild create mode 100644 net-nds/adtool/adtool-1.3.3-r2.ebuild delete mode 100644 net-nds/ldapvi/ldapvi-1.7_p20101214-r2.ebuild create mode 100644 net-nds/ldapvi/ldapvi-1.7_p20101214-r3.ebuild create mode 100644 net-nds/openldap/files/openldap-2.6.1-fix-bashism-configure.patch create mode 100644 net-nds/openldap/openldap-2.6.1-r1.ebuild delete mode 100644 net-nds/openldap/openldap-2.6.1.ebuild (limited to 'net-nds') diff --git a/net-nds/389-ds-base/389-ds-base-1.4.4.19-r1.ebuild b/net-nds/389-ds-base/389-ds-base-1.4.4.19-r1.ebuild deleted file mode 100644 index f7b6df4f5029..000000000000 --- a/net-nds/389-ds-base/389-ds-base-1.4.4.19-r1.ebuild +++ /dev/null @@ -1,324 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -CRATES=" - ahash-0.7.6 - ansi_term-0.11.0 - ansi_term-0.12.1 - atty-0.2.14 - autocfg-1.0.1 - base64-0.13.0 - bitflags-1.2.1 - bitflags-1.3.2 - byteorder-1.4.3 - cbindgen-0.9.1 - cc-1.0.72 - cfg-if-0.1.10 - cfg-if-1.0.0 - clap-2.33.3 - clap-2.34.0 - concread-0.2.21 - crossbeam-0.8.1 - crossbeam-channel-0.5.2 - crossbeam-deque-0.8.1 - crossbeam-epoch-0.9.6 - crossbeam-queue-0.3.3 - crossbeam-utils-0.8.6 - fastrand-1.7.0 - fernet-0.1.4 - foreign-types-0.3.2 - foreign-types-shared-0.1.1 - getrandom-0.1.16 - getrandom-0.2.4 - hashbrown-0.11.2 - hermit-abi-0.1.17 - hermit-abi-0.1.19 - instant-0.1.12 - itoa-0.4.7 - itoa-1.0.1 - jobserver-0.1.24 - lazy_static-1.4.0 - libc-0.2.113 - libc-0.2.82 - lock_api-0.4.5 - log-0.4.13 - log-0.4.14 - lru-0.7.2 - memoffset-0.6.5 - once_cell-1.9.0 - openssl-0.10.38 - openssl-sys-0.9.72 - parking_lot-0.11.2 - parking_lot_core-0.8.5 - paste-0.1.18 - paste-impl-0.1.18 - pin-project-lite-0.2.8 - pkg-config-0.3.24 - ppv-lite86-0.2.10 - ppv-lite86-0.2.16 - proc-macro2-1.0.24 - proc-macro2-1.0.36 - proc-macro-hack-0.5.19 - quote-1.0.15 - quote-1.0.8 - rand-0.7.3 - rand-0.8.4 - rand_chacha-0.2.2 - rand_chacha-0.3.1 - rand_core-0.5.1 - rand_core-0.6.3 - rand_hc-0.2.0 - rand_hc-0.3.1 - redox_syscall-0.1.57 - redox_syscall-0.2.10 - remove_dir_all-0.5.3 - ryu-1.0.5 - ryu-1.0.9 - scopeguard-1.1.0 - serde-1.0.119 - serde-1.0.135 - serde_derive-1.0.119 - serde_derive-1.0.135 - serde_json-1.0.61 - serde_json-1.0.78 - smallvec-1.8.0 - strsim-0.8.0 - syn-1.0.58 - syn-1.0.86 - synstructure-0.12.6 - tempfile-3.1.0 - tempfile-3.3.0 - textwrap-0.11.0 - tokio-1.15.0 - tokio-macros-1.7.0 - toml-0.5.8 - unicode-width-0.1.8 - unicode-width-0.1.9 - unicode-xid-0.2.1 - unicode-xid-0.2.2 - uuid-0.8.2 - vcpkg-0.2.15 - vec_map-0.8.2 - version_check-0.9.4 - wasi-0.10.2+wasi-snapshot-preview1 - wasi-0.9.0+wasi-snapshot-preview1 - winapi-0.3.9 - winapi-i686-pc-windows-gnu-0.4.0 - winapi-x86_64-pc-windows-gnu-0.4.0 - zeroize-1.5.0 - zeroize_derive-1.3.1 -" - -PYTHON_COMPAT=( python3_{8,9,10} ) - -DISTUTILS_SINGLE_IMPL=1 -DISTUTILS_USE_SETUPTOOLS=rdepend - -inherit autotools distutils-r1 systemd tmpfiles db-use cargo - -DESCRIPTION="389 Directory Server (core libraries and daemons)" -HOMEPAGE="https://directory.fedoraproject.org/" -SRC_URI="https://github.com/389ds/${PN}/archive/refs/tags/${P}.tar.gz - $(cargo_crate_uris ${CRATES})" -LICENSE="GPL-3+ Apache-2.0 BSD MIT MPL-2.0" -SLOT="$(ver_cut 1-2)/0" -KEYWORDS="~amd64" -IUSE_PLUGINS="+accountpolicy +bitwise +dna +pam-passthru" -IUSE="${IUSE_PLUGINS} +autobind auto-dn-suffix debug doc +ldapi selinux systemd" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -# lib389 tests (which is most of the suite) can't find their own modules. -RESTRICT="test" - -# always list newer first -# Do not add any AGPL-3 BDB here! -# See bug 525110, comment 15. -BERKDB_SLOTS=( 5.3 ) - -DEPEND=" - >=app-crypt/mit-krb5-1.7-r100[openldap] - >=dev-libs/cyrus-sasl-2.1.19:2[kerberos] - >=dev-libs/icu-60.2:= - dev-libs/nspr - >=dev-libs/nss-3.22[utils] - dev-libs/libevent:= - dev-libs/libpcre:3 - dev-libs/openssl:0= - >=net-analyzer/net-snmp-5.1.2:= - net-nds/openldap[sasl] - || ( - $(for slot in ${BERKDB_SLOTS[@]} ; do printf '%s\n' "sys-libs/db:${slot}" ; done) - ) - sys-libs/cracklib - || ( sys-fs/e2fsprogs sys-libs/e2fsprogs-libs ) - pam-passthru? ( sys-libs/pam ) - selinux? ( - $(python_gen_cond_dep ' - sys-libs/libselinux[python,${PYTHON_USEDEP}] - ') - ) - systemd? ( >=sys-apps/systemd-244 ) - virtual/libcrypt:= - " - -BDEPEND=">=sys-devel/autoconf-2.69-r5 - virtual/pkgconfig - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/argparse-manpage[${PYTHON_USEDEP}] - ') - doc? ( app-doc/doxygen ) - test? ( dev-util/cmocka ) -" - -# perl dependencies are for logconv.pl -RDEPEND="${DEPEND} - !net-nds/389-ds-base:2.1 - acct-user/dirsrv - acct-group/dirsrv - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/pyasn1[${PYTHON_USEDEP}] - dev-python/pyasn1-modules[${PYTHON_USEDEP}] - dev-python/argcomplete[${PYTHON_USEDEP}] - dev-python/python-dateutil[${PYTHON_USEDEP}] - dev-python/python-ldap[sasl,${PYTHON_USEDEP}] - dev-python/distro[${PYTHON_USEDEP}] - ') - virtual/perl-Archive-Tar - virtual/perl-DB_File - virtual/perl-IO - virtual/perl-Getopt-Long - virtual/perl-IO-Compress - virtual/perl-MIME-Base64 - virtual/perl-Scalar-List-Utils - virtual/perl-Time-Local - virtual/logger - selinux? ( sec-policy/selinux-dirsrv ) -" - -S="${WORKDIR}/${PN}-${P}" - -PATCHES=( - "${FILESDIR}/${PN}-db-gentoo.patch" -) - -distutils_enable_tests pytest - -src_prepare() { - # https://github.com/389ds/389-ds-base/issues/4292 - if use !systemd; then - sed -i \ - -e 's|WITH_SYSTEMD = 1|WITH_SYSTEMD = 0|' \ - Makefile.am || die - fi - - default - - eautoreconf -} - -src_configure() { - local myeconfargs=( - $(use_enable accountpolicy acctpolicy) - $(use_enable bitwise) - $(use_enable dna) - $(use_enable pam-passthru) - $(use_enable autobind) - $(use_enable auto-dn-suffix) - $(use_enable debug) - $(use_enable ldapi) - $(use_with selinux) - $(use_with systemd) - $(use_with systemd systemdgroupname "dirsrv.target") - $(use_with systemd tmpfiles-d "/usr/lib/tmpfiles.d") - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - $(use_with !systemd initddir "/etc/init.d") - $(use_enable test cmocka) - --enable-rust - --enable-rust-offline - --with-pythonexec="${PYTHON}" - --with-fhs - --with-openldap - --with-db-inc="$(db_includedir)" - --disable-cockpit - ) - - econf "${myeconfargs[@]}" - - rm "${S}"/.cargo/config || die -} - -src_compile() { - export CARGO_HOME="${ECARGO_HOME}" - - default - - if use doc; then - doxygen "${S}"/docs/slapi.doxy || die - fi - - cd "${S}"/src/lib389 || die - distutils-r1_src_compile - - # argparse-manpage dynamic man pages have hardcoded man v1 in header - sed -i \ - "1s/\"1\"/\"8\"/" \ - "${S}"/src/lib389/man/{openldap_to_ds,ds{conf,ctl,idm,create}}.8 || die -} - -src_test () { - emake check - cd "${S}"/src/lib389 || die - distutils-r1_src_test -} - -src_install() { - # -j1 is a temporary workaround for bug #605432 - emake -j1 DESTDIR="${D}" install - - # Install gentoo style init script - # Get these merged upstream - newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds - newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp - - dotmpfiles "${FILESDIR}"/389-ds-base.conf - - # cope with libraries being in /usr/lib/dirsrv - dodir /etc/env.d - echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${ED}"/etc/env.d/08dirsrv || die - - if use doc; then - cd "${S}" || die - docinto html/ - dodoc -r html/. - fi - - cd "${S}"/src/lib389 || die - distutils-r1_src_install - python_fix_shebang "${ED}" - - find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die -} - -pkg_postinst() { - tmpfiles_process 389-ds-base.conf - - echo - elog "If you are planning to use 389-ds-snmp (ldap-agent)," - elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf" - elog "adding proper 'server' entries, and adding the lines below to" - elog " => /etc/snmp/snmpd.conf" - elog - elog "master agentx" - elog "agentXSocket /var/agentx/master" - elog - elog "To start 389 Directory Server (LDAP service) at boot:" - elog - elog " rc-update add 389-ds default" - elog - echo -} diff --git a/net-nds/389-ds-base/389-ds-base-1.4.4.19-r2.ebuild b/net-nds/389-ds-base/389-ds-base-1.4.4.19-r2.ebuild new file mode 100644 index 000000000000..bae1ed6a51d4 --- /dev/null +++ b/net-nds/389-ds-base/389-ds-base-1.4.4.19-r2.ebuild @@ -0,0 +1,324 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +CRATES=" + ahash-0.7.6 + ansi_term-0.11.0 + ansi_term-0.12.1 + atty-0.2.14 + autocfg-1.0.1 + base64-0.13.0 + bitflags-1.2.1 + bitflags-1.3.2 + byteorder-1.4.3 + cbindgen-0.9.1 + cc-1.0.72 + cfg-if-0.1.10 + cfg-if-1.0.0 + clap-2.33.3 + clap-2.34.0 + concread-0.2.21 + crossbeam-0.8.1 + crossbeam-channel-0.5.2 + crossbeam-deque-0.8.1 + crossbeam-epoch-0.9.6 + crossbeam-queue-0.3.3 + crossbeam-utils-0.8.6 + fastrand-1.7.0 + fernet-0.1.4 + foreign-types-0.3.2 + foreign-types-shared-0.1.1 + getrandom-0.1.16 + getrandom-0.2.4 + hashbrown-0.11.2 + hermit-abi-0.1.17 + hermit-abi-0.1.19 + instant-0.1.12 + itoa-0.4.7 + itoa-1.0.1 + jobserver-0.1.24 + lazy_static-1.4.0 + libc-0.2.113 + libc-0.2.82 + lock_api-0.4.5 + log-0.4.13 + log-0.4.14 + lru-0.7.2 + memoffset-0.6.5 + once_cell-1.9.0 + openssl-0.10.38 + openssl-sys-0.9.72 + parking_lot-0.11.2 + parking_lot_core-0.8.5 + paste-0.1.18 + paste-impl-0.1.18 + pin-project-lite-0.2.8 + pkg-config-0.3.24 + ppv-lite86-0.2.10 + ppv-lite86-0.2.16 + proc-macro2-1.0.24 + proc-macro2-1.0.36 + proc-macro-hack-0.5.19 + quote-1.0.15 + quote-1.0.8 + rand-0.7.3 + rand-0.8.4 + rand_chacha-0.2.2 + rand_chacha-0.3.1 + rand_core-0.5.1 + rand_core-0.6.3 + rand_hc-0.2.0 + rand_hc-0.3.1 + redox_syscall-0.1.57 + redox_syscall-0.2.10 + remove_dir_all-0.5.3 + ryu-1.0.5 + ryu-1.0.9 + scopeguard-1.1.0 + serde-1.0.119 + serde-1.0.135 + serde_derive-1.0.119 + serde_derive-1.0.135 + serde_json-1.0.61 + serde_json-1.0.78 + smallvec-1.8.0 + strsim-0.8.0 + syn-1.0.58 + syn-1.0.86 + synstructure-0.12.6 + tempfile-3.1.0 + tempfile-3.3.0 + textwrap-0.11.0 + tokio-1.15.0 + tokio-macros-1.7.0 + toml-0.5.8 + unicode-width-0.1.8 + unicode-width-0.1.9 + unicode-xid-0.2.1 + unicode-xid-0.2.2 + uuid-0.8.2 + vcpkg-0.2.15 + vec_map-0.8.2 + version_check-0.9.4 + wasi-0.10.2+wasi-snapshot-preview1 + wasi-0.9.0+wasi-snapshot-preview1 + winapi-0.3.9 + winapi-i686-pc-windows-gnu-0.4.0 + winapi-x86_64-pc-windows-gnu-0.4.0 + zeroize-1.5.0 + zeroize_derive-1.3.1 +" + +PYTHON_COMPAT=( python3_{8,9,10} ) + +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit autotools distutils-r1 systemd tmpfiles db-use cargo + +DESCRIPTION="389 Directory Server (core libraries and daemons)" +HOMEPAGE="https://directory.fedoraproject.org/" +SRC_URI="https://github.com/389ds/${PN}/archive/refs/tags/${P}.tar.gz + $(cargo_crate_uris ${CRATES})" +LICENSE="GPL-3+ Apache-2.0 BSD MIT MPL-2.0" +SLOT="$(ver_cut 1-2)/0" +KEYWORDS="~amd64" +IUSE_PLUGINS="+accountpolicy +bitwise +dna +pam-passthru" +IUSE="${IUSE_PLUGINS} +autobind auto-dn-suffix debug doc +ldapi selinux systemd" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# lib389 tests (which is most of the suite) can't find their own modules. +RESTRICT="test" + +# always list newer first +# Do not add any AGPL-3 BDB here! +# See bug 525110, comment 15. +BERKDB_SLOTS=( 5.3 ) + +DEPEND=" + >=app-crypt/mit-krb5-1.7-r100[openldap] + >=dev-libs/cyrus-sasl-2.1.19:2[kerberos] + >=dev-libs/icu-60.2:= + dev-libs/nspr + >=dev-libs/nss-3.22[utils] + dev-libs/libevent:= + dev-libs/libpcre:3 + dev-libs/openssl:0= + >=net-analyzer/net-snmp-5.1.2:= + net-nds/openldap:=[sasl] + || ( + $(for slot in ${BERKDB_SLOTS[@]} ; do printf '%s\n' "sys-libs/db:${slot}" ; done) + ) + sys-libs/cracklib + || ( sys-fs/e2fsprogs sys-libs/e2fsprogs-libs ) + pam-passthru? ( sys-libs/pam ) + selinux? ( + $(python_gen_cond_dep ' + sys-libs/libselinux[python,${PYTHON_USEDEP}] + ') + ) + systemd? ( >=sys-apps/systemd-244 ) + virtual/libcrypt:= + " + +BDEPEND=">=sys-devel/autoconf-2.69-r5 + virtual/pkgconfig + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/argparse-manpage[${PYTHON_USEDEP}] + ') + doc? ( app-doc/doxygen ) + test? ( dev-util/cmocka ) +" + +# perl dependencies are for logconv.pl +RDEPEND="${DEPEND} + !net-nds/389-ds-base:2.1 + acct-user/dirsrv + acct-group/dirsrv + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/pyasn1[${PYTHON_USEDEP}] + dev-python/pyasn1-modules[${PYTHON_USEDEP}] + dev-python/argcomplete[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/python-ldap[sasl,${PYTHON_USEDEP}] + dev-python/distro[${PYTHON_USEDEP}] + ') + virtual/perl-Archive-Tar + virtual/perl-DB_File + virtual/perl-IO + virtual/perl-Getopt-Long + virtual/perl-IO-Compress + virtual/perl-MIME-Base64 + virtual/perl-Scalar-List-Utils + virtual/perl-Time-Local + virtual/logger + selinux? ( sec-policy/selinux-dirsrv ) +" + +S="${WORKDIR}/${PN}-${P}" + +PATCHES=( + "${FILESDIR}/${PN}-db-gentoo.patch" +) + +distutils_enable_tests pytest + +src_prepare() { + # https://github.com/389ds/389-ds-base/issues/4292 + if use !systemd; then + sed -i \ + -e 's|WITH_SYSTEMD = 1|WITH_SYSTEMD = 0|' \ + Makefile.am || die + fi + + default + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable accountpolicy acctpolicy) + $(use_enable bitwise) + $(use_enable dna) + $(use_enable pam-passthru) + $(use_enable autobind) + $(use_enable auto-dn-suffix) + $(use_enable debug) + $(use_enable ldapi) + $(use_with selinux) + $(use_with systemd) + $(use_with systemd systemdgroupname "dirsrv.target") + $(use_with systemd tmpfiles-d "/usr/lib/tmpfiles.d") + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + $(use_with !systemd initddir "/etc/init.d") + $(use_enable test cmocka) + --enable-rust + --enable-rust-offline + --with-pythonexec="${PYTHON}" + --with-fhs + --with-openldap + --with-db-inc="$(db_includedir)" + --disable-cockpit + ) + + econf "${myeconfargs[@]}" + + rm "${S}"/.cargo/config || die +} + +src_compile() { + export CARGO_HOME="${ECARGO_HOME}" + + default + + if use doc; then + doxygen "${S}"/docs/slapi.doxy || die + fi + + cd "${S}"/src/lib389 || die + distutils-r1_src_compile + + # argparse-manpage dynamic man pages have hardcoded man v1 in header + sed -i \ + "1s/\"1\"/\"8\"/" \ + "${S}"/src/lib389/man/{openldap_to_ds,ds{conf,ctl,idm,create}}.8 || die +} + +src_test () { + emake check + cd "${S}"/src/lib389 || die + distutils-r1_src_test +} + +src_install() { + # -j1 is a temporary workaround for bug #605432 + emake -j1 DESTDIR="${D}" install + + # Install gentoo style init script + # Get these merged upstream + newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds + newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp + + dotmpfiles "${FILESDIR}"/389-ds-base.conf + + # cope with libraries being in /usr/lib/dirsrv + dodir /etc/env.d + echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${ED}"/etc/env.d/08dirsrv || die + + if use doc; then + cd "${S}" || die + docinto html/ + dodoc -r html/. + fi + + cd "${S}"/src/lib389 || die + distutils-r1_src_install + python_fix_shebang "${ED}" + + find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die +} + +pkg_postinst() { + tmpfiles_process 389-ds-base.conf + + echo + elog "If you are planning to use 389-ds-snmp (ldap-agent)," + elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf" + elog "adding proper 'server' entries, and adding the lines below to" + elog " => /etc/snmp/snmpd.conf" + elog + elog "master agentx" + elog "agentXSocket /var/agentx/master" + elog + elog "To start 389 Directory Server (LDAP service) at boot:" + elog + elog " rc-update add 389-ds default" + elog + echo +} diff --git a/net-nds/389-ds-base/389-ds-base-2.1.0-r1.ebuild b/net-nds/389-ds-base/389-ds-base-2.1.0-r1.ebuild new file mode 100644 index 000000000000..42d9bf5bd2a5 --- /dev/null +++ b/net-nds/389-ds-base/389-ds-base-2.1.0-r1.ebuild @@ -0,0 +1,321 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +CRATES=" + ahash-0.7.6 + ansi_term-0.11.0 + ansi_term-0.12.1 + atty-0.2.14 + autocfg-1.0.1 + base64-0.13.0 + bitflags-1.2.1 + bitflags-1.3.2 + byteorder-1.4.3 + cbindgen-0.9.1 + cc-1.0.72 + cfg-if-0.1.10 + cfg-if-1.0.0 + clap-2.33.3 + clap-2.34.0 + concread-0.2.21 + crossbeam-0.8.1 + crossbeam-channel-0.5.2 + crossbeam-deque-0.8.1 + crossbeam-epoch-0.9.6 + crossbeam-queue-0.3.3 + crossbeam-utils-0.8.6 + fastrand-1.7.0 + fernet-0.1.4 + foreign-types-0.3.2 + foreign-types-shared-0.1.1 + getrandom-0.1.16 + getrandom-0.2.4 + hashbrown-0.11.2 + hermit-abi-0.1.17 + hermit-abi-0.1.19 + instant-0.1.12 + itoa-0.4.7 + itoa-1.0.1 + jobserver-0.1.24 + lazy_static-1.4.0 + libc-0.2.113 + libc-0.2.82 + lock_api-0.4.5 + log-0.4.13 + log-0.4.14 + lru-0.7.2 + memoffset-0.6.5 + once_cell-1.9.0 + openssl-0.10.38 + openssl-sys-0.9.72 + parking_lot-0.11.2 + parking_lot_core-0.8.5 + paste-0.1.18 + paste-impl-0.1.18 + pin-project-lite-0.2.8 + pkg-config-0.3.24 + ppv-lite86-0.2.10 + ppv-lite86-0.2.16 + proc-macro2-1.0.24 + proc-macro2-1.0.36 + proc-macro-hack-0.5.19 + quote-1.0.15 + quote-1.0.8 + rand-0.7.3 + rand-0.8.4 + rand_chacha-0.2.2 + rand_chacha-0.3.1 + rand_core-0.5.1 + rand_core-0.6.3 + rand_hc-0.2.0 + rand_hc-0.3.1 + redox_syscall-0.1.57 + redox_syscall-0.2.10 + remove_dir_all-0.5.3 + ryu-1.0.5 + ryu-1.0.9 + scopeguard-1.1.0 + serde-1.0.119 + serde-1.0.135 + serde_derive-1.0.119 + serde_derive-1.0.135 + serde_json-1.0.61 + serde_json-1.0.78 + smallvec-1.8.0 + strsim-0.8.0 + syn-1.0.58 + syn-1.0.86 + synstructure-0.12.6 + tempfile-3.1.0 + tempfile-3.3.0 + textwrap-0.11.0 + tokio-1.15.0 + tokio-macros-1.7.0 + toml-0.5.8 + unicode-width-0.1.8 + unicode-width-0.1.9 + unicode-xid-0.2.1 + unicode-xid-0.2.2 + uuid-0.8.2 + vcpkg-0.2.15 + vec_map-0.8.2 + version_check-0.9.4 + wasi-0.10.2+wasi-snapshot-preview1 + wasi-0.9.0+wasi-snapshot-preview1 + winapi-0.3.9 + winapi-i686-pc-windows-gnu-0.4.0 + winapi-x86_64-pc-windows-gnu-0.4.0 + zeroize-1.5.0 + zeroize_derive-1.3.1 +" + +PYTHON_COMPAT=( python3_{8,9,10} ) + +DISTUTILS_SINGLE_IMPL=1 +DISTUTILS_USE_SETUPTOOLS=rdepend + +inherit autotools distutils-r1 systemd tmpfiles cargo + +DESCRIPTION="389 Directory Server (core libraries and daemons)" +HOMEPAGE="https://directory.fedoraproject.org/" +SRC_URI="https://github.com/389ds/${PN}/archive/refs/tags/${P}.tar.gz + $(cargo_crate_uris ${CRATES})" +LICENSE="GPL-3+ Apache-2.0 BSD MIT MPL-2.0" +SLOT="$(ver_cut 1-2)/0" +KEYWORDS="~amd64" +IUSE_PLUGINS="+accountpolicy +bitwise +dna +pam-passthru" +IUSE="${IUSE_PLUGINS} +autobind auto-dn-suffix debug doc +ldapi selinux systemd" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +# lib389 tests (which is most of the suite) can't find their own modules. +RESTRICT="test" + +# Do not add any AGPL-3 BDB here! +# See bug 525110, comment 15. + +DEPEND=" + >=app-crypt/mit-krb5-1.7-r100[openldap] + dev-db/lmdb:= + >=dev-libs/cyrus-sasl-2.1.19:2[kerberos] + >=dev-libs/icu-60.2:= + dev-libs/nspr + >=dev-libs/nss-3.22[utils] + dev-libs/libevent:= + dev-libs/libpcre:3 + dev-libs/openssl:0= + >=net-analyzer/net-snmp-5.1.2:= + net-nds/openldap:=[sasl] + sys-libs/cracklib + sys-libs/db:5.3 + || ( sys-fs/e2fsprogs sys-libs/e2fsprogs-libs ) + pam-passthru? ( sys-libs/pam ) + selinux? ( + $(python_gen_cond_dep ' + sys-libs/libselinux[python,${PYTHON_USEDEP}] + ') + ) + systemd? ( >=sys-apps/systemd-244 ) + virtual/libcrypt:= + " + +BDEPEND=">=sys-devel/autoconf-2.69-r5 + virtual/pkgconfig + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/argparse-manpage[${PYTHON_USEDEP}] + ') + doc? ( app-doc/doxygen ) + test? ( dev-util/cmocka ) +" + +# perl dependencies are for logconv.pl +RDEPEND="${DEPEND} + !net-nds/389-ds-base:1.4 + acct-user/dirsrv + acct-group/dirsrv + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/pyasn1[${PYTHON_USEDEP}] + dev-python/pyasn1-modules[${PYTHON_USEDEP}] + dev-python/argcomplete[${PYTHON_USEDEP}] + dev-python/python-dateutil[${PYTHON_USEDEP}] + dev-python/python-ldap[sasl,${PYTHON_USEDEP}] + dev-python/distro[${PYTHON_USEDEP}] + ') + virtual/perl-Archive-Tar + virtual/perl-DB_File + virtual/perl-IO + virtual/perl-Getopt-Long + virtual/perl-IO-Compress + virtual/perl-MIME-Base64 + virtual/perl-Scalar-List-Utils + virtual/perl-Time-Local + virtual/logger + selinux? ( sec-policy/selinux-dirsrv ) +" + +S="${WORKDIR}/${PN}-${P}" + +PATCHES=( + "${FILESDIR}/${PN}-db-gentoo.patch" +) + +distutils_enable_tests pytest + +src_prepare() { + # https://github.com/389ds/389-ds-base/issues/4292 + if use !systemd; then + sed -i \ + -e 's|WITH_SYSTEMD = 1|WITH_SYSTEMD = 0|' \ + Makefile.am || die + fi + + default + + eautoreconf +} + +src_configure() { + local myeconfargs=( + $(use_enable accountpolicy acctpolicy) + $(use_enable bitwise) + $(use_enable dna) + $(use_enable pam-passthru) + $(use_enable autobind) + $(use_enable auto-dn-suffix) + $(use_enable debug) + $(use_enable ldapi) + $(use_with selinux) + $(use_with systemd) + $(use_with systemd systemdgroupname "dirsrv.target") + $(use_with systemd tmpfiles-d "/usr/lib/tmpfiles.d") + --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" + $(use_with !systemd initddir "/etc/init.d") + $(use_enable test cmocka) + --enable-rust + --enable-rust-offline + --with-pythonexec="${PYTHON}" + --with-fhs + --with-openldap + --with-db-inc="${EPREFIX}"/usr/include/db5.3 + --disable-cockpit + ) + + econf "${myeconfargs[@]}" + + rm "${S}"/.cargo/config || die +} + +src_compile() { + export CARGO_HOME="${ECARGO_HOME}" + + default + + if use doc; then + doxygen "${S}"/docs/slapi.doxy || die + fi + + cd "${S}"/src/lib389 || die + distutils-r1_src_compile + + # argparse-manpage dynamic man pages have hardcoded man v1 in header + sed -i \ + "1s/\"1\"/\"8\"/" \ + "${S}"/src/lib389/man/{openldap_to_ds,ds{conf,ctl,idm,create}}.8 || die +} + +src_test () { + emake check + cd "${S}"/src/lib389 || die + distutils-r1_src_test +} + +src_install() { + # -j1 is a temporary workaround for bug #605432 + emake -j1 DESTDIR="${D}" install + + # Install gentoo style init script + # Get these merged upstream + newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds + newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp + + dotmpfiles "${FILESDIR}"/389-ds-base.conf + + # cope with libraries being in /usr/lib/dirsrv + dodir /etc/env.d + echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${ED}"/etc/env.d/08dirsrv || die + + if use doc; then + cd "${S}" || die + docinto html/ + dodoc -r html/. + fi + + cd "${S}"/src/lib389 || die + distutils-r1_src_install + python_fix_shebang "${ED}" + + find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die +} + +pkg_postinst() { + tmpfiles_process 389-ds-base.conf + + echo + elog "If you are planning to use 389-ds-snmp (ldap-agent)," + elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf" + elog "adding proper 'server' entries, and adding the lines below to" + elog " => /etc/snmp/snmpd.conf" + elog + elog "master agentx" + elog "agentXSocket /var/agentx/master" + elog + elog "To start 389 Directory Server (LDAP service) at boot:" + elog + elog " rc-update add 389-ds default" + elog + echo +} diff --git a/net-nds/389-ds-base/389-ds-base-2.1.0.ebuild b/net-nds/389-ds-base/389-ds-base-2.1.0.ebuild deleted file mode 100644 index 2a2646b7dd3a..000000000000 --- a/net-nds/389-ds-base/389-ds-base-2.1.0.ebuild +++ /dev/null @@ -1,321 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -CRATES=" - ahash-0.7.6 - ansi_term-0.11.0 - ansi_term-0.12.1 - atty-0.2.14 - autocfg-1.0.1 - base64-0.13.0 - bitflags-1.2.1 - bitflags-1.3.2 - byteorder-1.4.3 - cbindgen-0.9.1 - cc-1.0.72 - cfg-if-0.1.10 - cfg-if-1.0.0 - clap-2.33.3 - clap-2.34.0 - concread-0.2.21 - crossbeam-0.8.1 - crossbeam-channel-0.5.2 - crossbeam-deque-0.8.1 - crossbeam-epoch-0.9.6 - crossbeam-queue-0.3.3 - crossbeam-utils-0.8.6 - fastrand-1.7.0 - fernet-0.1.4 - foreign-types-0.3.2 - foreign-types-shared-0.1.1 - getrandom-0.1.16 - getrandom-0.2.4 - hashbrown-0.11.2 - hermit-abi-0.1.17 - hermit-abi-0.1.19 - instant-0.1.12 - itoa-0.4.7 - itoa-1.0.1 - jobserver-0.1.24 - lazy_static-1.4.0 - libc-0.2.113 - libc-0.2.82 - lock_api-0.4.5 - log-0.4.13 - log-0.4.14 - lru-0.7.2 - memoffset-0.6.5 - once_cell-1.9.0 - openssl-0.10.38 - openssl-sys-0.9.72 - parking_lot-0.11.2 - parking_lot_core-0.8.5 - paste-0.1.18 - paste-impl-0.1.18 - pin-project-lite-0.2.8 - pkg-config-0.3.24 - ppv-lite86-0.2.10 - ppv-lite86-0.2.16 - proc-macro2-1.0.24 - proc-macro2-1.0.36 - proc-macro-hack-0.5.19 - quote-1.0.15 - quote-1.0.8 - rand-0.7.3 - rand-0.8.4 - rand_chacha-0.2.2 - rand_chacha-0.3.1 - rand_core-0.5.1 - rand_core-0.6.3 - rand_hc-0.2.0 - rand_hc-0.3.1 - redox_syscall-0.1.57 - redox_syscall-0.2.10 - remove_dir_all-0.5.3 - ryu-1.0.5 - ryu-1.0.9 - scopeguard-1.1.0 - serde-1.0.119 - serde-1.0.135 - serde_derive-1.0.119 - serde_derive-1.0.135 - serde_json-1.0.61 - serde_json-1.0.78 - smallvec-1.8.0 - strsim-0.8.0 - syn-1.0.58 - syn-1.0.86 - synstructure-0.12.6 - tempfile-3.1.0 - tempfile-3.3.0 - textwrap-0.11.0 - tokio-1.15.0 - tokio-macros-1.7.0 - toml-0.5.8 - unicode-width-0.1.8 - unicode-width-0.1.9 - unicode-xid-0.2.1 - unicode-xid-0.2.2 - uuid-0.8.2 - vcpkg-0.2.15 - vec_map-0.8.2 - version_check-0.9.4 - wasi-0.10.2+wasi-snapshot-preview1 - wasi-0.9.0+wasi-snapshot-preview1 - winapi-0.3.9 - winapi-i686-pc-windows-gnu-0.4.0 - winapi-x86_64-pc-windows-gnu-0.4.0 - zeroize-1.5.0 - zeroize_derive-1.3.1 -" - -PYTHON_COMPAT=( python3_{8,9,10} ) - -DISTUTILS_SINGLE_IMPL=1 -DISTUTILS_USE_SETUPTOOLS=rdepend - -inherit autotools distutils-r1 systemd tmpfiles cargo - -DESCRIPTION="389 Directory Server (core libraries and daemons)" -HOMEPAGE="https://directory.fedoraproject.org/" -SRC_URI="https://github.com/389ds/${PN}/archive/refs/tags/${P}.tar.gz - $(cargo_crate_uris ${CRATES})" -LICENSE="GPL-3+ Apache-2.0 BSD MIT MPL-2.0" -SLOT="$(ver_cut 1-2)/0" -KEYWORDS="~amd64" -IUSE_PLUGINS="+accountpolicy +bitwise +dna +pam-passthru" -IUSE="${IUSE_PLUGINS} +autobind auto-dn-suffix debug doc +ldapi selinux systemd" - -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -# lib389 tests (which is most of the suite) can't find their own modules. -RESTRICT="test" - -# Do not add any AGPL-3 BDB here! -# See bug 525110, comment 15. - -DEPEND=" - >=app-crypt/mit-krb5-1.7-r100[openldap] - dev-db/lmdb:= - >=dev-libs/cyrus-sasl-2.1.19:2[kerberos] - >=dev-libs/icu-60.2:= - dev-libs/nspr - >=dev-libs/nss-3.22[utils] - dev-libs/libevent:= - dev-libs/libpcre:3 - dev-libs/openssl:0= - >=net-analyzer/net-snmp-5.1.2:= - net-nds/openldap[sasl] - sys-libs/cracklib - sys-libs/db:5.3 - || ( sys-fs/e2fsprogs sys-libs/e2fsprogs-libs ) - pam-passthru? ( sys-libs/pam ) - selinux? ( - $(python_gen_cond_dep ' - sys-libs/libselinux[python,${PYTHON_USEDEP}] - ') - ) - systemd? ( >=sys-apps/systemd-244 ) - virtual/libcrypt:= - " - -BDEPEND=">=sys-devel/autoconf-2.69-r5 - virtual/pkgconfig - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/argparse-manpage[${PYTHON_USEDEP}] - ') - doc? ( app-doc/doxygen ) - test? ( dev-util/cmocka ) -" - -# perl dependencies are for logconv.pl -RDEPEND="${DEPEND} - !net-nds/389-ds-base:1.4 - acct-user/dirsrv - acct-group/dirsrv - ${PYTHON_DEPS} - $(python_gen_cond_dep ' - dev-python/pyasn1[${PYTHON_USEDEP}] - dev-python/pyasn1-modules[${PYTHON_USEDEP}] - dev-python/argcomplete[${PYTHON_USEDEP}] - dev-python/python-dateutil[${PYTHON_USEDEP}] - dev-python/python-ldap[sasl,${PYTHON_USEDEP}] - dev-python/distro[${PYTHON_USEDEP}] - ') - virtual/perl-Archive-Tar - virtual/perl-DB_File - virtual/perl-IO - virtual/perl-Getopt-Long - virtual/perl-IO-Compress - virtual/perl-MIME-Base64 - virtual/perl-Scalar-List-Utils - virtual/perl-Time-Local - virtual/logger - selinux? ( sec-policy/selinux-dirsrv ) -" - -S="${WORKDIR}/${PN}-${P}" - -PATCHES=( - "${FILESDIR}/${PN}-db-gentoo.patch" -) - -distutils_enable_tests pytest - -src_prepare() { - # https://github.com/389ds/389-ds-base/issues/4292 - if use !systemd; then - sed -i \ - -e 's|WITH_SYSTEMD = 1|WITH_SYSTEMD = 0|' \ - Makefile.am || die - fi - - default - - eautoreconf -} - -src_configure() { - local myeconfargs=( - $(use_enable accountpolicy acctpolicy) - $(use_enable bitwise) - $(use_enable dna) - $(use_enable pam-passthru) - $(use_enable autobind) - $(use_enable auto-dn-suffix) - $(use_enable debug) - $(use_enable ldapi) - $(use_with selinux) - $(use_with systemd) - $(use_with systemd systemdgroupname "dirsrv.target") - $(use_with systemd tmpfiles-d "/usr/lib/tmpfiles.d") - --with-systemdsystemunitdir="$(systemd_get_systemunitdir)" - $(use_with !systemd initddir "/etc/init.d") - $(use_enable test cmocka) - --enable-rust - --enable-rust-offline - --with-pythonexec="${PYTHON}" - --with-fhs - --with-openldap - --with-db-inc="${EPREFIX}"/usr/include/db5.3 - --disable-cockpit - ) - - econf "${myeconfargs[@]}" - - rm "${S}"/.cargo/config || die -} - -src_compile() { - export CARGO_HOME="${ECARGO_HOME}" - - default - - if use doc; then - doxygen "${S}"/docs/slapi.doxy || die - fi - - cd "${S}"/src/lib389 || die - distutils-r1_src_compile - - # argparse-manpage dynamic man pages have hardcoded man v1 in header - sed -i \ - "1s/\"1\"/\"8\"/" \ - "${S}"/src/lib389/man/{openldap_to_ds,ds{conf,ctl,idm,create}}.8 || die -} - -src_test () { - emake check - cd "${S}"/src/lib389 || die - distutils-r1_src_test -} - -src_install() { - # -j1 is a temporary workaround for bug #605432 - emake -j1 DESTDIR="${D}" install - - # Install gentoo style init script - # Get these merged upstream - newinitd "${FILESDIR}"/389-ds.initd-r1 389-ds - newinitd "${FILESDIR}"/389-ds-snmp.initd 389-ds-snmp - - dotmpfiles "${FILESDIR}"/389-ds-base.conf - - # cope with libraries being in /usr/lib/dirsrv - dodir /etc/env.d - echo "LDPATH=/usr/$(get_libdir)/dirsrv" > "${ED}"/etc/env.d/08dirsrv || die - - if use doc; then - cd "${S}" || die - docinto html/ - dodoc -r html/. - fi - - cd "${S}"/src/lib389 || die - distutils-r1_src_install - python_fix_shebang "${ED}" - - find "${ED}" -type f \( -name "*.a" -o -name "*.la" \) -delete || die -} - -pkg_postinst() { - tmpfiles_process 389-ds-base.conf - - echo - elog "If you are planning to use 389-ds-snmp (ldap-agent)," - elog "make sure to properly configure: /etc/dirsrv/config/ldap-agent.conf" - elog "adding proper 'server' entries, and adding the lines below to" - elog " => /etc/snmp/snmpd.conf" - elog - elog "master agentx" - elog "agentXSocket /var/agentx/master" - elog - elog "To start 389 Directory Server (LDAP service) at boot:" - elog - elog " rc-update add 389-ds default" - elog - echo -} diff --git a/net-nds/389-ds-base/Manifest b/net-nds/389-ds-base/Manifest index f24754a3e052..7511945521b0 100644 --- a/net-nds/389-ds-base/Manifest +++ b/net-nds/389-ds-base/Manifest @@ -109,6 +109,6 @@ DIST winapi-i686-pc-windows-gnu-0.4.0.crate 2918815 BLAKE2B 4d357e4d30f955297217 DIST winapi-x86_64-pc-windows-gnu-0.4.0.crate 2947998 BLAKE2B 2ad1ea8b5fa07d544e910ccba043ae925269b76b26c9da356305b34b86741dd8b9aff0b9ffe3d562db4fcd7d7c46a11ce9e3168b782b1d89ae6881742b7ede82 SHA512 4a654af6a5d649dc87e00497245096b35a2894ae66f155cb62389902c3b93ddcc5cf7d0d8b9dd97b291d2d80bc686af2298e80abef6ac69883f4a54e79712513 DIST zeroize-1.5.0.crate 17017 BLAKE2B a729d12a0a97e59d80dd024fd351c434829dc2819d9c3179c6d0781d5d80dffac10bf431d6e36ed14444680ef6d3328ab1ea6c4077eb2c31cb6f077d3552ccaf SHA512 6b6d1c5f85111f0f83ee02c633effb0bad87bb8b334d3f4e13d8722cf9c4ff252fc15c73de044c33d11ff62cbf3d2b6d33834cf08830e5b9ce9c8c298442a05c DIST zeroize_derive-1.3.1.crate 10268 BLAKE2B cfca89267374c562dc89dbddcad9bc889b33a489d2519fce69b74cbf95d7e8a6b29641a660635f77d303a5f785133caad59560e44b4973f2def52b610f364b9e SHA512 070619a664c404610cac48ad4a831e3f449a2b022c5e55c9f0ba3b19ecb0f737445ae5577f7cb9c314661efeb19801488b158961a9db0cf16e636c2df8758503 -EBUILD 389-ds-base-1.4.4.19-r1.ebuild 7051 BLAKE2B 137be7b4e3887cc1754cec20055ab03fb207c5126fc83f6e66824b02649928457c4d3a878ca510fbd2dbf7468bfc32861b092497a6f30a258176ff208de9f6df SHA512 1f6e3631c58532a713b50ed80a3aa76ac23eb1abcbd04f0ded0a2f1d3f76da4da2e87f2eff4e224dd4804d01cb9a3a945f5fa4ceea4b5a026e02f3986f9d7b87 -EBUILD 389-ds-base-2.1.0.ebuild 6948 BLAKE2B dfbfbbf56adaf06885bf39ff27564dbe426140af7a633bb6e3b5924f403aabed1ba1be67bf1111dfe9435f1efbe6c04ae30c994d6fec00020ea196e48a2e76c8 SHA512 16653751be7a6afc6960b63818e335cae9821eb51b7a1223b59a12b8493c5a0e5c7f9049e2e7e12e184aa408ffe182d3983972588a3af92c14682a7f81a35b51 +EBUILD 389-ds-base-1.4.4.19-r2.ebuild 7053 BLAKE2B da4092d1ec34570f8f9ec42416ceab335dec3c81deb5e3b10032ebfdfb39bc936b743041411b37e639c3c9b9dbe3011263e409fe481389ead9bad4383ebcd89a SHA512 396f93fcad61a0bbbe774ed7a8ef4b7169cba4affc53507d29278ed114c35afd017b3d0292a25cb3c216cc23340f7cc1d543749f79ad12712a31b6b6bbe072c6 +EBUILD 389-ds-base-2.1.0-r1.ebuild 6950 BLAKE2B dbc03da839ed55acc8a2ab6e21eae9dc94994ac30dd663dd7276c7c166a9d66d27bf1c2bce52cc8ce13196439957bbba01949fc6fd55b4190ed24e66e85f3c06 SHA512 ad3e98ad0253d744db3c665dfecf6968629d34190d31be358938baf7ca49c511df4d68bb70aa84daf53994fb4683dd5748bf78edd7268899a041cb7904f5c56c MISC metadata.xml 1582 BLAKE2B b29c4633cc0264cfc762327d8b24f21abed6a0e7b92d093d46826945f500d73898a488003d00a4c1fd2feef469a095ef3fc3d55c710f1c6543fb469e088ce2fd SHA512 6413a53a8494cb491bfdabfb4f097f657f86163e33e60ea0c7c1f02079a44d2e487ab2fd72a15f0e34d66ce840d52f058212b97213e45f50069d333a910dc83f diff --git a/net-nds/Manifest.gz b/net-nds/Manifest.gz index 4589f42ad244..943ab8cfcf31 100644 Binary files a/net-nds/Manifest.gz and b/net-nds/Manifest.gz differ diff --git a/net-nds/adtool/Manifest b/net-nds/adtool/Manifest index fb55b6973099..b0c40f1b509e 100644 --- a/net-nds/adtool/Manifest +++ b/net-nds/adtool/Manifest @@ -2,5 +2,5 @@ AUX adtool-1.3.3-automake.patch 306 BLAKE2B 34947a79d78ff15b218d4a152e31a1e28d36 AUX adtool-1.3.3-bfr-overflow.patch 587 BLAKE2B ea6322d2dcc26575676ba26f048db2755012e63f2132b6b2c0e339bedd415e7d5a73d955be60c89329829c8cf0e30f4c96a6c1ed85a9c864e2aa8556c8366eaf SHA512 4ac3772f261f5a6e57a982d3985830083b227b87246bdc0909e5c75d47eee3cf62572b1de67b296368124e5007181988466832ff2333dcf74dcfae54e2db0ad4 AUX adtool-1.3.3-fno-common.patch 528 BLAKE2B eca0e12bb41b9d52e634fee7670caa8c9b4f2b7b51ab5b1631d827b36a0cd5f705d44b1c044a71aaedd75de7564f5a7d90869d06252cf1dc01a44b652dcdcf2a SHA512 26f1b8fcba21b925c496090d90e4fe13f8f5d584ac24d40e218d1ba0e9b16a2c0cf088bbae6e43706a5737c0537c7b50bf32605747c2a411f8ac52003693756a DIST adtool-1.3.3.tar.gz 334767 BLAKE2B 401f10df2708a2e2b7384354192337145739d4a8df2f0366171d0989836c9795263dba9d95d597d3e129b72bfcd53df2532c55a62d126e773bcf79cac909df52 SHA512 800a9fd19481b2c986991c27674e24b40bd6f4d58d7cbcf94532acb88f6c36de1f18d4165d6a2dcffd7d5baeac86aaf6f0ff1ef1b46d93ffc28b826b3d857251 -EBUILD adtool-1.3.3-r1.ebuild 580 BLAKE2B c017a841de408e0c2bd596b9a1e02d0a067e41b0e6ab099be7e446219808f37d85ff45b4f10499cd3bb26f17fe95c267f83e8a3a2edc1e07a015f0d2946702fe SHA512 9000ed0995ff8d505d65cfb4d3c9bed2161ad84eeb9c5bdf6c65b67999ca3e392208cd5710a6479f552a68537cfa8cd78f6de0319f426f6e2157779072c59068 +EBUILD adtool-1.3.3-r2.ebuild 629 BLAKE2B 2887dfd2ce00c35117051ffde2945580874078ea379449d1b3bd4c7c9197a0b525829b5c4b0b10447f0bdbb82058c46d98c0798b2f06a69e7f26087015e30024 SHA512 2d493cb72ca05da8dba6db2b37cde8c0ae3a7baf6d254fb03569a320be90f1cb75abc316d93c9049a189cd7e6f2d7e4749b5a6f327c3f4689356731b42244ad1 MISC metadata.xml 317 BLAKE2B 5aed0c4e8afe6ff6146e11ceb5666c3ae1016d6569cb539d536cbad8273915b99acdc9036c0f90e37154c1fb8c11b7dea942e20eceb53f14837e7ea9a876202b SHA512 36de6a092c0a74713e2ade79bb3abb3ec1990f6405f016125896a763ae20c157055e6319c23a1d6534e7b92449ff68be95045d42333c570912708ded0e279dc3 diff --git a/net-nds/adtool/adtool-1.3.3-r1.ebuild b/net-nds/adtool/adtool-1.3.3-r1.ebuild deleted file mode 100644 index 014b4436dca9..000000000000 --- a/net-nds/adtool/adtool-1.3.3-r1.ebuild +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools out-of-source - -DESCRIPTION="Utility for Active Directory administration" -HOMEPAGE="http://gp2x.org/adtool/" -SRC_URI="http://gp2x.org/adtool/${P}.tar.gz" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="~amd64 ~ppc ~x86" - -RDEPEND="net-nds/openldap" -DEPEND="${RDEPEND}" - -PATCHES=( - "${FILESDIR}"/${P}-bfr-overflow.patch - "${FILESDIR}"/${P}-fno-common.patch - "${FILESDIR}"/${P}-automake.patch -) - -src_prepare() { - default - mv configure.{in,ac} || die - eautoreconf -} diff --git a/net-nds/adtool/adtool-1.3.3-r2.ebuild b/net-nds/adtool/adtool-1.3.3-r2.ebuild new file mode 100644 index 000000000000..cb955c1edee4 --- /dev/null +++ b/net-nds/adtool/adtool-1.3.3-r2.ebuild @@ -0,0 +1,30 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools out-of-source + +DESCRIPTION="Utility for Active Directory administration" +HOMEPAGE="http://gp2x.org/adtool/" +SRC_URI="http://gp2x.org/adtool/${P}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~x86" + +# Older OpenLDAP for bug #835649 (ldap_r) +RDEPEND=" #endif diff --git a/net-nds/openldap/files/openldap-2.4.28-fix-dash.patch b/net-nds/openldap/files/openldap-2.4.28-fix-dash.patch index d15c3d2231f4..bca213dbc6ce 100644 --- a/net-nds/openldap/files/openldap-2.4.28-fix-dash.patch +++ b/net-nds/openldap/files/openldap-2.4.28-fix-dash.patch @@ -11,8 +11,6 @@ Patch unbreaks build when /bin/sh points to dash: eval: 1: base_compile+= x86_64-pc-linux-gnu-gcc: not found ... make[2]: *** [decode.lo] Error 1 -diff --git a/build/top.mk b/build/top.mk -index 6fea488..ea324e3 100644 --- a/build/top.mk +++ b/build/top.mk @@ -20,7 +20,7 @@ VERSION= @VERSION@ diff --git a/net-nds/openldap/files/openldap-2.4.28-gnutls-gcrypt.patch b/net-nds/openldap/files/openldap-2.4.28-gnutls-gcrypt.patch index aeecb0f40132..0d9b88f47627 100644 --- a/net-nds/openldap/files/openldap-2.4.28-gnutls-gcrypt.patch +++ b/net-nds/openldap/files/openldap-2.4.28-gnutls-gcrypt.patch @@ -1,5 +1,5 @@ ---- openldap-2.4.28/configure.in.orig 2012-02-11 22:40:36.004360795 +0000 -+++ openldap-2.4.28/configure.in 2012-02-11 22:40:13.410986851 +0000 +--- a/configure.in ++++ b/configure.in @@ -1214,7 +1214,7 @@ ol_with_tls=gnutls ol_link_tls=yes diff --git a/net-nds/openldap/files/openldap-2.4.35-contrib-samba4.patch b/net-nds/openldap/files/openldap-2.4.35-contrib-samba4.patch index 4312dc7c55ea..8ee3891f3cb6 100644 --- a/net-nds/openldap/files/openldap-2.4.35-contrib-samba4.patch +++ b/net-nds/openldap/files/openldap-2.4.35-contrib-samba4.patch @@ -1,6 +1,5 @@ -diff -Nuar openldap-2.4.35.orig/contrib/slapd-modules/samba4/Makefile openldap-2.4.35/contrib/slapd-modules/samba4/Makefile ---- openldap-2.4.35.orig/contrib/slapd-modules/samba4/Makefile 2013-03-28 15:41:51.000000000 +0000 -+++ openldap-2.4.35/contrib/slapd-modules/samba4/Makefile 2013-04-16 02:16:40.651868432 +0000 +--- a/contrib/slapd-modules/samba4/Makefile ++++ b/contrib/slapd-modules/samba4/Makefile @@ -20,7 +20,8 @@ LIBTOOL = $(LDAP_BUILD)/libtool diff --git a/net-nds/openldap/files/openldap-2.4.35-contrib-smbk5pwd.patch b/net-nds/openldap/files/openldap-2.4.35-contrib-smbk5pwd.patch index 4383802a0ead..ca02404c8812 100644 --- a/net-nds/openldap/files/openldap-2.4.35-contrib-smbk5pwd.patch +++ b/net-nds/openldap/files/openldap-2.4.35-contrib-smbk5pwd.patch @@ -1,6 +1,5 @@ -diff -Nuar openldap-2.4.35.orig/contrib/slapd-modules/smbk5pwd/Makefile openldap-2.4.35/contrib/slapd-modules/smbk5pwd/Makefile ---- openldap-2.4.35.orig/contrib/slapd-modules/smbk5pwd/Makefile 2013-03-28 15:41:51.000000000 +0000 -+++ openldap-2.4.35/contrib/slapd-modules/smbk5pwd/Makefile 2013-04-16 02:13:38.939913119 +0000 +--- a/contrib/slapd-modules/smbk5pwd/Makefile ++++ b/contrib/slapd-modules/smbk5pwd/Makefile @@ -21,16 +21,23 @@ SSL_INC = SSL_LIB = -lcrypto diff --git a/net-nds/openldap/files/openldap-2.4.42-mdb-unbundle.patch b/net-nds/openldap/files/openldap-2.4.42-mdb-unbundle.patch index 9265a01701ab..6ec68885b5e7 100644 --- a/net-nds/openldap/files/openldap-2.4.42-mdb-unbundle.patch +++ b/net-nds/openldap/files/openldap-2.4.42-mdb-unbundle.patch @@ -1,5 +1,5 @@ ---- ./build/top.mk.orig 2014-10-24 14:34:59.260827298 +0200 -+++ ./build/top.mk 2014-10-24 14:35:25.281168893 +0200 +--- a/build/top.mk ++++ b/build/top.mk @@ -160,6 +160,7 @@ LTHREAD_LIBS = @LTHREAD_LIBS@ @@ -8,8 +8,8 @@ SLAPD_NDB_LIBS = @SLAPD_NDB_LIBS@ LDAP_LIBLBER_LA = $(LDAP_LIBDIR)/liblber/liblber.la ---- ./build/openldap.m4.orig 2014-10-24 10:52:02.837221734 +0200 -+++ ./build/openldap.m4 2014-10-24 11:31:02.748087966 +0200 +--- ./build/openldap.m4.orig ++++ ./build/openldap.m4 @@ -563,6 +563,38 @@ ], [ol_cv_bdb_compat=yes], [ol_cv_bdb_compat=no])]) ]) @@ -49,8 +49,8 @@ dnl dnl ==================================================================== dnl Check POSIX Thread version ---- ./servers/slapd/back-mdb/Makefile.in.orig 2014-10-24 10:31:30.860931076 +0200 -+++ ./servers/slapd/back-mdb/Makefile.in 2014-10-24 14:33:33.803705424 +0200 +--- a/servers/slapd/back-mdb/Makefile.in ++++ b/servers/slapd/back-mdb/Makefile.in @@ -25,11 +25,10 @@ extended.lo operational.lo \ attr.lo index.lo key.lo filterindex.lo \ @@ -85,8 +85,8 @@ - veryclean-local-lib: FORCE $(RM) $(XXHEADERS) $(XXSRCS) .links ---- ./configure.in.orig 2014-10-24 10:46:53.289139847 +0200 -+++ ./configure.in 2014-10-24 10:51:34.372846374 +0200 +--- a/configure.in ++++ b/configure.in @@ -519,6 +519,7 @@ dnl Initialize vars LDAP_LIBS= diff --git a/net-nds/openldap/files/openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch b/net-nds/openldap/files/openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch index 29688fcb14c8..05e515cd47d1 100644 --- a/net-nds/openldap/files/openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch +++ b/net-nds/openldap/files/openldap-2.4.45-fix-lmpasswd-gnutls-symbols.patch @@ -7,8 +7,8 @@ X-Gentoo-Bug: http://bugs.gentoo.org/show_bug.cgi?id=233633 X-Upstream-Bug: http://www.openldap.org/its/index.cgi/Software%20Enhancements?id=4997 X-Debian-Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=245341 ---- openldap-2.4.17.orig/libraries/liblutil/passwd.c 2009-07-27 18:59:19.635995474 -0700 -+++ openldap-2.4.17/libraries/liblutil/passwd.c 2009-07-27 19:01:13.588069010 -0700 +--- a/libraries/liblutil/passwd.c ++++ b/libraries/liblutil/passwd.c @@ -51,6 +51,26 @@ typedef unsigned char des_data_block[8]; typedef PK11Context *des_context[1]; #define DES_ENCRYPT CKA_ENCRYPT diff --git a/net-nds/openldap/files/openldap-2.4.47-warnings.patch b/net-nds/openldap/files/openldap-2.4.47-warnings.patch index d75bd0d3c5d7..10f21114954e 100644 --- a/net-nds/openldap/files/openldap-2.4.47-warnings.patch +++ b/net-nds/openldap/files/openldap-2.4.47-warnings.patch @@ -1,5 +1,3 @@ -diff --git a/include/ldap.h b/include/ldap.h -index c245651c2..7f14f1051 100644 --- a/include/ldap.h +++ b/include/ldap.h @@ -2041,6 +2041,10 @@ LDAP_F( int ) @@ -13,8 +11,6 @@ index c245651c2..7f14f1051 100644 LDAP_F( int ) ldap_url_parse LDAP_P(( LDAP_CONST char *url, -diff --git a/include/ldap_int_thread.h b/include/ldap_int_thread.h -index e2dd8a942..bbc07c845 100644 --- a/include/ldap_int_thread.h +++ b/include/ldap_int_thread.h @@ -33,7 +33,7 @@ LDAP_END_DECL @@ -26,8 +22,6 @@ index e2dd8a942..bbc07c845 100644 #include #ifdef HAVE_SCHED_H #include -diff --git a/libraries/libldap/tls2.c b/libraries/libldap/tls2.c -index d25c190ea..639f598e7 100644 --- a/libraries/libldap/tls2.c +++ b/libraries/libldap/tls2.c @@ -76,6 +76,8 @@ static oid_name oids[] = { diff --git a/net-nds/openldap/files/openldap-2.4.6-evolution-ntlm.patch b/net-nds/openldap/files/openldap-2.4.6-evolution-ntlm.patch index 33ff29e0aed2..e8bcc50502c9 100644 --- a/net-nds/openldap/files/openldap-2.4.6-evolution-ntlm.patch +++ b/net-nds/openldap/files/openldap-2.4.6-evolution-ntlm.patch @@ -1,6 +1,5 @@ -diff -up evo-openldap-2.4.14/include/ldap.h.evolution-ntlm evo-openldap-2.4.14/include/ldap.h ---- evo-openldap-2.4.14/include/ldap.h.evolution-ntlm 2009-01-27 00:29:53.000000000 +0100 -+++ evo-openldap-2.4.14/include/ldap.h 2009-02-17 10:10:00.000000000 +0100 +--- a/include/ldap.h ++++ b/include/ldap.h @@ -2461,5 +2461,26 @@ ldap_parse_deref_control LDAP_P(( LDAPControl **ctrls, LDAPDerefRes **drp )); @@ -28,9 +27,8 @@ diff -up evo-openldap-2.4.14/include/ldap.h.evolution-ntlm evo-openldap-2.4.14/i + LDAP_END_DECL #endif /* _LDAP_H */ -diff -up evo-openldap-2.4.14/libraries/libldap/Makefile.in.evolution-ntlm evo-openldap-2.4.14/libraries/libldap/Makefile.in ---- evo-openldap-2.4.14/libraries/libldap/Makefile.in.evolution-ntlm 2009-01-27 00:29:53.000000000 +0100 -+++ evo-openldap-2.4.14/libraries/libldap/Makefile.in 2009-02-17 10:10:00.000000000 +0100 +--- a/libraries/libldap/Makefile.in ++++ b/libraries/libldap/Makefile.in @@ -20,7 +20,7 @@ PROGRAMS = apitest dntest ftest ltest ur SRCS = bind.c open.c result.c error.c compare.c search.c \ controls.c messages.c references.c extended.c cyrus.c \ @@ -49,9 +47,8 @@ diff -up evo-openldap-2.4.14/libraries/libldap/Makefile.in.evolution-ntlm evo-op filter.lo free.lo sort.lo passwd.lo whoami.lo \ getdn.lo getentry.lo getattr.lo getvalues.lo addentry.lo \ request.lo os-ip.lo url.lo pagectrl.lo sortctrl.lo vlvctrl.lo \ -diff -up /dev/null evo-openldap-2.4.14/libraries/libldap/ntlm.c ---- /dev/null 2009-02-17 09:19:52.829004420 +0100 -+++ evo-openldap-2.4.14/libraries/libldap/ntlm.c 2009-02-17 10:10:00.000000000 +0100 +--- /dev/null ++++ b/libraries/libldap/ntlm.c @@ -0,0 +1,137 @@ +/* $OpenLDAP: pkg/ldap/libraries/libldap/ntlm.c,v 1.1.4.10 2002/01/04 20:38:21 kurt Exp $ */ +/* diff --git a/net-nds/openldap/files/openldap-2.6.1-cloak.patch b/net-nds/openldap/files/openldap-2.6.1-cloak.patch index 8fab052d4db1..e023a14e4940 100644 --- a/net-nds/openldap/files/openldap-2.6.1-cloak.patch +++ b/net-nds/openldap/files/openldap-2.6.1-cloak.patch @@ -1,5 +1,3 @@ -diff --git a/contrib/slapd-modules/cloak/cloak.c b/contrib/slapd-modules/cloak/cloak.c -index ced7a8024..dffce3614 100644 --- a/contrib/slapd-modules/cloak/cloak.c +++ b/contrib/slapd-modules/cloak/cloak.c @@ -29,6 +29,7 @@ @@ -10,8 +8,6 @@ index ced7a8024..dffce3614 100644 #include "slap.h" #include "slap-config.h" -diff --git a/servers/slapd/attr.h b/servers/slapd/attr.h -index e69de29bb..73949f60c 100644 --- a/servers/slapd/attr.h +++ b/servers/slapd/attr.h @@ -0,0 +1,8 @@ diff --git a/net-nds/openldap/files/openldap-2.6.1-fix-bashism-configure.patch b/net-nds/openldap/files/openldap-2.6.1-fix-bashism-configure.patch new file mode 100644 index 000000000000..c2acb679e3ba --- /dev/null +++ b/net-nds/openldap/files/openldap-2.6.1-fix-bashism-configure.patch @@ -0,0 +1,11 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -2055,7 +2055,7 @@ dnl + WITH_SYSTEMD=no + systemdsystemunitdir= + ol_link_systemd=no +-if test $ol_enable_slapd == no && test $ol_enable_balancer != yes ; then ++if test $ol_enable_slapd = no && test $ol_enable_balancer != yes ; then + if test $ol_with_systemd != no ; then + AC_MSG_WARN([servers disabled, ignoring --with-systemd=$ol_with_systemd argument]) + ol_with_systemd=no diff --git a/net-nds/openldap/files/openldap-2.6.1-fix-missing-mapping.patch b/net-nds/openldap/files/openldap-2.6.1-fix-missing-mapping.patch index be7fbf3e528d..1d6595566c73 100644 --- a/net-nds/openldap/files/openldap-2.6.1-fix-missing-mapping.patch +++ b/net-nds/openldap/files/openldap-2.6.1-fix-missing-mapping.patch @@ -3,12 +3,6 @@ From: Simon Pichugin Date: Wed, 3 Nov 2021 19:03:40 -0700 Subject: [PATCH] Fix missing mapping ---- - libraries/liblber/lber.map | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/libraries/liblber/lber.map b/libraries/liblber/lber.map -index 9a4094b0f..083cd1f32 100644 --- a/libraries/liblber/lber.map +++ b/libraries/liblber/lber.map @@ -121,6 +121,7 @@ OPENLDAP_2.200 diff --git a/net-nds/openldap/files/openldap-2.6.1-flags.patch b/net-nds/openldap/files/openldap-2.6.1-flags.patch index 019bd9f6fd33..39ceeecb1742 100644 --- a/net-nds/openldap/files/openldap-2.6.1-flags.patch +++ b/net-nds/openldap/files/openldap-2.6.1-flags.patch @@ -1,5 +1,3 @@ -diff --git a/contrib/slapd-modules/acl/Makefile b/contrib/slapd-modules/acl/Makefile -index 2195e2d72..3efaaad72 100644 --- a/contrib/slapd-modules/acl/Makefile +++ b/contrib/slapd-modules/acl/Makefile @@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -11,8 +9,6 @@ index 2195e2d72..3efaaad72 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/addpartial/Makefile b/contrib/slapd-modules/addpartial/Makefile -index ecb7cd0a3..e278dc080 100644 --- a/contrib/slapd-modules/addpartial/Makefile +++ b/contrib/slapd-modules/addpartial/Makefile @@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -24,8 +20,6 @@ index ecb7cd0a3..e278dc080 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/adremap/Makefile b/contrib/slapd-modules/adremap/Makefile -index b008eabd6..23d3658c3 100644 --- a/contrib/slapd-modules/adremap/Makefile +++ b/contrib/slapd-modules/adremap/Makefile @@ -19,7 +19,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -37,8 +31,6 @@ index b008eabd6..23d3658c3 100644 DEFS = -DSLAPD_OVER_ADREMAP=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/allop/Makefile b/contrib/slapd-modules/allop/Makefile -index 053f3774a..11998ce87 100644 --- a/contrib/slapd-modules/allop/Makefile +++ b/contrib/slapd-modules/allop/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -50,8 +42,6 @@ index 053f3774a..11998ce87 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/allowed/Makefile b/contrib/slapd-modules/allowed/Makefile -index 32cb43241..674d6cafd 100644 --- a/contrib/slapd-modules/allowed/Makefile +++ b/contrib/slapd-modules/allowed/Makefile @@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -63,8 +53,6 @@ index 32cb43241..674d6cafd 100644 DEFS = -DSLAPD_OVER_ALLOWED=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/authzid/Makefile b/contrib/slapd-modules/authzid/Makefile -index ef9c4bc4f..49a756c35 100644 --- a/contrib/slapd-modules/authzid/Makefile +++ b/contrib/slapd-modules/authzid/Makefile @@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -76,8 +64,6 @@ index ef9c4bc4f..49a756c35 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/autogroup/Makefile b/contrib/slapd-modules/autogroup/Makefile -index 7dd6613cf..f19acae6c 100644 --- a/contrib/slapd-modules/autogroup/Makefile +++ b/contrib/slapd-modules/autogroup/Makefile @@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -89,8 +75,6 @@ index 7dd6613cf..f19acae6c 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/cloak/Makefile b/contrib/slapd-modules/cloak/Makefile -index c54e6b134..9360ef2dc 100644 --- a/contrib/slapd-modules/cloak/Makefile +++ b/contrib/slapd-modules/cloak/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -102,8 +86,6 @@ index c54e6b134..9360ef2dc 100644 DEFS = -DSLAPD_OVER_CLOAK=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/comp_match/Makefile b/contrib/slapd-modules/comp_match/Makefile -index 9b78c5c12..e1cb8fe3c 100644 --- a/contrib/slapd-modules/comp_match/Makefile +++ b/contrib/slapd-modules/comp_match/Makefile @@ -31,7 +31,7 @@ SSL_LIB = -lcrypto -L$(SSL_DIR)/lib @@ -115,8 +97,6 @@ index 9b78c5c12..e1cb8fe3c 100644 DEFS = -DLDAP_COMPONENT INCS = $(LDAP_INC) $(SNACC_INC) $(SSL_INC) LIBS = $(LDAP_LIB) $(SNACC_LIB) $(SSL_LIB) -diff --git a/contrib/slapd-modules/datamorph/Makefile b/contrib/slapd-modules/datamorph/Makefile -index 82bce493c..19231c71d 100644 --- a/contrib/slapd-modules/datamorph/Makefile +++ b/contrib/slapd-modules/datamorph/Makefile @@ -22,7 +22,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -128,8 +108,6 @@ index 82bce493c..19231c71d 100644 DEFS = -DSLAPD_OVER_DATAMORPH=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/denyop/Makefile b/contrib/slapd-modules/denyop/Makefile -index 2cea18b06..d11dd8d4a 100644 --- a/contrib/slapd-modules/denyop/Makefile +++ b/contrib/slapd-modules/denyop/Makefile @@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -141,8 +119,6 @@ index 2cea18b06..d11dd8d4a 100644 DEFS = -DSLAPD_OVER_DENYOP=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/dsaschema/Makefile b/contrib/slapd-modules/dsaschema/Makefile -index 3a88fc01f..97e0642f3 100644 --- a/contrib/slapd-modules/dsaschema/Makefile +++ b/contrib/slapd-modules/dsaschema/Makefile @@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -154,8 +130,6 @@ index 3a88fc01f..97e0642f3 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/dupent/Makefile b/contrib/slapd-modules/dupent/Makefile -index 6b3543862..1cc09a8b4 100644 --- a/contrib/slapd-modules/dupent/Makefile +++ b/contrib/slapd-modules/dupent/Makefile @@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -167,8 +141,6 @@ index 6b3543862..1cc09a8b4 100644 DEFS = -DSLAPD_OVER_DUPENT=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/kinit/Makefile b/contrib/slapd-modules/kinit/Makefile -index 7b25ced76..9f339e810 100644 --- a/contrib/slapd-modules/kinit/Makefile +++ b/contrib/slapd-modules/kinit/Makefile @@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -180,8 +152,6 @@ index 7b25ced76..9f339e810 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -lkrb5 -diff --git a/contrib/slapd-modules/lastbind/Makefile b/contrib/slapd-modules/lastbind/Makefile -index c273cd3a0..da9fa172f 100644 --- a/contrib/slapd-modules/lastbind/Makefile +++ b/contrib/slapd-modules/lastbind/Makefile @@ -19,7 +19,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -193,8 +163,6 @@ index c273cd3a0..da9fa172f 100644 DEFS = -DSLAPD_OVER_LASTBIND=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/lastmod/Makefile b/contrib/slapd-modules/lastmod/Makefile -index 9b06c28fb..be583722b 100644 --- a/contrib/slapd-modules/lastmod/Makefile +++ b/contrib/slapd-modules/lastmod/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -206,8 +174,6 @@ index 9b06c28fb..be583722b 100644 DEFS = -DSLAPD_OVER_LASTMOD=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/noopsrch/Makefile b/contrib/slapd-modules/noopsrch/Makefile -index 2934a3214..22a3db04b 100644 --- a/contrib/slapd-modules/noopsrch/Makefile +++ b/contrib/slapd-modules/noopsrch/Makefile @@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -219,8 +185,6 @@ index 2934a3214..22a3db04b 100644 DEFS = -DSLAPD_OVER_NOOPSRCH=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/nops/Makefile b/contrib/slapd-modules/nops/Makefile -index 94a5bcd23..86dcdfd76 100644 --- a/contrib/slapd-modules/nops/Makefile +++ b/contrib/slapd-modules/nops/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -232,8 +196,6 @@ index 94a5bcd23..86dcdfd76 100644 DEFS = -DSLAPD_OVER_NOPS=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/nssov/Makefile b/contrib/slapd-modules/nssov/Makefile -index 13987c250..c2c26d473 100644 --- a/contrib/slapd-modules/nssov/Makefile +++ b/contrib/slapd-modules/nssov/Makefile @@ -27,7 +27,7 @@ NLDAPD_INC=-Inss-pam-ldapd @@ -245,8 +207,6 @@ index 13987c250..c2c26d473 100644 CC = gcc DEFS = INCS = $(LDAP_INC) $(NLDAPD_INC) -diff --git a/contrib/slapd-modules/passwd/Makefile b/contrib/slapd-modules/passwd/Makefile -index 634649603..4b6be2617 100644 --- a/contrib/slapd-modules/passwd/Makefile +++ b/contrib/slapd-modules/passwd/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -258,8 +218,6 @@ index 634649603..4b6be2617 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/passwd/pbkdf2/Makefile b/contrib/slapd-modules/passwd/pbkdf2/Makefile -index 6279f50c1..20769028e 100644 --- a/contrib/slapd-modules/passwd/pbkdf2/Makefile +++ b/contrib/slapd-modules/passwd/pbkdf2/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -271,8 +229,6 @@ index 6279f50c1..20769028e 100644 #DEFS = -DSLAPD_PBKDF2_DEBUG SSL_INC = -diff --git a/contrib/slapd-modules/passwd/sha2/Makefile b/contrib/slapd-modules/passwd/sha2/Makefile -index 2d2075688..f8a77d24d 100644 --- a/contrib/slapd-modules/passwd/sha2/Makefile +++ b/contrib/slapd-modules/passwd/sha2/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -284,8 +240,6 @@ index 2d2075688..f8a77d24d 100644 DEFS = #DEFS = -DSLAPD_SHA2_DEBUG INCS = $(LDAP_INC) -diff --git a/contrib/slapd-modules/passwd/totp/Makefile b/contrib/slapd-modules/passwd/totp/Makefile -index f7dff4bd7..463a45248 100644 --- a/contrib/slapd-modules/passwd/totp/Makefile +++ b/contrib/slapd-modules/passwd/totp/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -297,8 +251,6 @@ index f7dff4bd7..463a45248 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/ppm/Makefile b/contrib/slapd-modules/ppm/Makefile -index 7b6efaddd..f26faca2b 100644 --- a/contrib/slapd-modules/ppm/Makefile +++ b/contrib/slapd-modules/ppm/Makefile @@ -18,7 +18,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/liblber/liblber.la $(LDAP_BUILD)/libraries/li @@ -310,8 +262,6 @@ index 7b6efaddd..f26faca2b 100644 # To skip linking against CRACKLIB make CRACK=no CRACK=yes -diff --git a/contrib/slapd-modules/proxyOld/Makefile b/contrib/slapd-modules/proxyOld/Makefile -index d92967c39..f2e7524a9 100644 --- a/contrib/slapd-modules/proxyOld/Makefile +++ b/contrib/slapd-modules/proxyOld/Makefile @@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -323,8 +273,6 @@ index d92967c39..f2e7524a9 100644 DEFS = INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/rbac/Makefile b/contrib/slapd-modules/rbac/Makefile -index 1180bd6a1..59b614ade 100755 --- a/contrib/slapd-modules/rbac/Makefile +++ b/contrib/slapd-modules/rbac/Makefile @@ -9,7 +9,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -336,8 +284,6 @@ index 1180bd6a1..59b614ade 100755 DEFS = -DSLAPD_OVER_RBAC=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/samba4/Makefile b/contrib/slapd-modules/samba4/Makefile -index f53d130d2..a4b6600ca 100644 --- a/contrib/slapd-modules/samba4/Makefile +++ b/contrib/slapd-modules/samba4/Makefile @@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -349,8 +295,6 @@ index f53d130d2..a4b6600ca 100644 DEFS = -DSLAPD_OVER_RDNVAL=SLAPD_MOD_DYNAMIC \ -DSLAPD_OVER_PGUID=SLAPD_MOD_DYNAMIC \ -DSLAPD_OVER_VERNUM=SLAPD_MOD_DYNAMIC -diff --git a/contrib/slapd-modules/smbk5pwd/Makefile b/contrib/slapd-modules/smbk5pwd/Makefile -index a1c2c8eef..c2b1c16bb 100644 --- a/contrib/slapd-modules/smbk5pwd/Makefile +++ b/contrib/slapd-modules/smbk5pwd/Makefile @@ -27,7 +27,7 @@ HEIMDAL_LIB = -L/usr/heimdal/lib -lkrb5 -lkadm5srv @@ -362,8 +306,6 @@ index a1c2c8eef..c2b1c16bb 100644 # Omit DO_KRB5, DO_SAMBA or DO_SHADOW if you don't want to support it. DEFS = -DDO_KRB5 -DDO_SAMBA -DDO_SHADOW INCS = $(LDAP_INC) $(HEIMDAL_INC) $(SSL_INC) -diff --git a/contrib/slapd-modules/trace/Makefile b/contrib/slapd-modules/trace/Makefile -index 1bf8a5541..9026c2c93 100644 --- a/contrib/slapd-modules/trace/Makefile +++ b/contrib/slapd-modules/trace/Makefile @@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -375,8 +317,6 @@ index 1bf8a5541..9026c2c93 100644 DEFS = -DSLAPD_OVER_TRACE=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/usn/Makefile b/contrib/slapd-modules/usn/Makefile -index d7af04b10..eae938a3e 100644 --- a/contrib/slapd-modules/usn/Makefile +++ b/contrib/slapd-modules/usn/Makefile @@ -8,7 +8,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -388,8 +328,6 @@ index d7af04b10..eae938a3e 100644 DEFS = -DSLAPD_OVER_USN=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/variant/Makefile b/contrib/slapd-modules/variant/Makefile -index 07effed6c..a83373b48 100644 --- a/contrib/slapd-modules/variant/Makefile +++ b/contrib/slapd-modules/variant/Makefile @@ -22,7 +22,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ @@ -401,8 +339,6 @@ index 07effed6c..a83373b48 100644 DEFS = -DSLAPD_OVER_VARIANT=SLAPD_MOD_DYNAMIC INCS = $(LDAP_INC) LIBS = $(LDAP_LIB) -diff --git a/contrib/slapd-modules/vc/Makefile b/contrib/slapd-modules/vc/Makefile -index 9fe67ab27..526037e50 100644 --- a/contrib/slapd-modules/vc/Makefile +++ b/contrib/slapd-modules/vc/Makefile @@ -20,7 +20,7 @@ LDAP_LIB = $(LDAP_BUILD)/libraries/libldap/libldap.la \ diff --git a/net-nds/openldap/files/openldap-2.6.1-system-mdb.patch b/net-nds/openldap/files/openldap-2.6.1-system-mdb.patch index ad8aaba0157a..e29ba0be964a 100644 --- a/net-nds/openldap/files/openldap-2.6.1-system-mdb.patch +++ b/net-nds/openldap/files/openldap-2.6.1-system-mdb.patch @@ -1,5 +1,3 @@ -diff --git a/build/openldap.m4 b/build/openldap.m4 -index 91e2608b8..493f85ae8 100644 --- a/build/openldap.m4 +++ b/build/openldap.m4 @@ -243,6 +243,40 @@ OL_RESOLVER_TRY(ol_cv_resolver_none) @@ -43,8 +41,6 @@ index 91e2608b8..493f85ae8 100644 dnl dnl ==================================================================== dnl Check POSIX Thread version -diff --git a/build/top.mk b/build/top.mk -index 67873d9f3..8d8787ecb 100644 --- a/build/top.mk +++ b/build/top.mk @@ -164,6 +164,7 @@ CLIENT_LIBS = @CLIENT_LIBS@ @@ -55,8 +51,6 @@ index 67873d9f3..8d8787ecb 100644 SLAPD_NDB_LIBS = @SLAPD_NDB_LIBS@ WT_LIBS = @WT_LIBS@ -diff --git a/configure.ac b/configure.ac -index 9012d0b28..52dd72eb6 100644 --- a/configure.ac +++ b/configure.ac @@ -547,6 +547,7 @@ AC_MSG_RESULT(done) @@ -108,8 +102,6 @@ index 9012d0b28..52dd72eb6 100644 AC_SUBST(BALANCER_LIBS) AC_SUBST(SLAPD_NDB_LIBS) AC_SUBST(SLAPD_NDB_INCS) -diff --git a/servers/slapd/back-mdb/Makefile.in b/servers/slapd/back-mdb/Makefile.in -index ad3804898..f9319e227 100644 --- a/servers/slapd/back-mdb/Makefile.in +++ b/servers/slapd/back-mdb/Makefile.in @@ -25,11 +25,10 @@ OBJS = init.lo tools.lo config.lo \ diff --git a/net-nds/openldap/files/slapd-initd b/net-nds/openldap/files/slapd-initd index ecd8f650a217..a8e98646569a 100644 --- a/net-nds/openldap/files/slapd-initd +++ b/net-nds/openldap/files/slapd-initd @@ -8,7 +8,7 @@ depend() { } start() { - checkpath -q -d /var/run/openldap/ -o ldap:ldap + checkpath -q -d /var/run/openldap/ -o ldap:ldap if ! checkconfig ; then eerror "There is a problem with your slapd.conf!" return 1 @@ -20,10 +20,10 @@ start() { stop() { ebegin "Stopping ldap-server" - start-stop-daemon --stop --signal 2 --quiet --pidfile /var/run/openldap/slapd.pid + start-stop-daemon --stop --signal 2 --quiet --pidfile /var/run/openldap/slapd.pid eend $? } -checkconfig() { - /usr/sbin/slaptest -u "$@" ${OPTS_CONF} +checkconfig() { + /usr/sbin/slaptest -u "$@" ${OPTS_CONF} } diff --git a/net-nds/openldap/files/slapd-initd-2.4.40-r2 b/net-nds/openldap/files/slapd-initd-2.4.40-r2 index 722b6c20de79..bf408e3d6ecd 100644 --- a/net-nds/openldap/files/slapd-initd-2.4.40-r2 +++ b/net-nds/openldap/files/slapd-initd-2.4.40-r2 @@ -57,7 +57,7 @@ checkconfig() { if [ $? -ne 0 ]; then ewarn "You have files in $d not owned by the ldap user, you must ensure they are accessible to the slapd instance!" fi - [ ! -e $d/DB_CONFIG ] && ewarn "$d/DB_CONFIG does not exist, slapd performance may be sub-optimal" + [ ! -e $d/DB_CONFIG ] && ewarn "$d/DB_CONFIG does not exist, slapd performance may be sub-optimal" done # now test the config fully /usr/sbin/slaptest -u "$@" ${OPTS_CONF} diff --git a/net-nds/openldap/openldap-2.6.1-r1.ebuild b/net-nds/openldap/openldap-2.6.1-r1.ebuild new file mode 100644 index 000000000000..7091232465cf --- /dev/null +++ b/net-nds/openldap/openldap-2.6.1-r1.ebuild @@ -0,0 +1,799 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools flag-o-matic multilib-minimal preserve-libs ssl-cert toolchain-funcs systemd tmpfiles + +MY_PV="$(ver_rs 1-2 _)" + +BIS_PN=rfc2307bis.schema +BIS_PV=20140524 +BIS_P="${BIS_PN}-${BIS_PV}" + +DESCRIPTION="LDAP suite of application and development tools" +HOMEPAGE="https://www.OpenLDAP.org/" + +SRC_URI=" + https://gitlab.com/openldap/${PN}/-/archive/OPENLDAP_REL_ENG_${MY_PV}/${PN}-OPENLDAP_REL_ENG_${MY_PV}.tar.gz + mirror://gentoo/${BIS_P}" + +LICENSE="OPENLDAP GPL-2" +# Subslot added for bug #835654 +SLOT="0/$(ver_cut 1-2)" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris" + +IUSE_DAEMON="argon2 +cleartext crypt experimental minimal samba tcpd" +IUSE_OVERLAY="overlays perl autoca" +IUSE_OPTIONAL="debug gnutls iodbc ipv6 odbc sasl ssl selinux static-libs +syslog test" +IUSE_CONTRIB="kerberos kinit pbkdf2 sha2 smbkrb5passwd" +IUSE_CONTRIB="${IUSE_CONTRIB} cxx" +IUSE="systemd ${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}" +RESTRICT="!test? ( test )" + +RESTRICT="!test? ( test )" +REQUIRED_USE="cxx? ( sasl ) + pbkdf2? ( ssl ) + test? ( cleartext sasl ) + autoca? ( !gnutls ) + ?? ( test minimal )" + +S=${WORKDIR}/${PN}-OPENLDAP_REL_ENG_${MY_PV} + +# openssl is needed to generate lanman-passwords required by samba +COMMON_DEPEND=" + kernel_linux? ( sys-apps/util-linux ) + ssl? ( + !gnutls? ( + >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] + ) + gnutls? ( + >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] + >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] + ) + ) + sasl? ( dev-libs/cyrus-sasl:= ) + !minimal? ( + dev-libs/libltdl + sys-fs/e2fsprogs + >=dev-db/lmdb-0.9.18:= + argon2? ( app-crypt/argon2:= ) + crypt? ( virtual/libcrypt:= ) + tcpd? ( sys-apps/tcp-wrappers ) + odbc? ( !iodbc? ( dev-db/unixODBC ) + iodbc? ( dev-db/libiodbc ) ) + perl? ( dev-lang/perl:=[-build(-)] ) + samba? ( + dev-libs/openssl:0= + ) + smbkrb5passwd? ( + dev-libs/openssl:0= + kerberos? ( app-crypt/heimdal ) + ) + kerberos? ( + virtual/krb5 + kinit? ( !app-crypt/heimdal ) + ) + ) +" +DEPEND="${COMMON_DEPEND} + sys-apps/groff +" +RDEPEND="${COMMON_DEPEND} + selinux? ( sec-policy/selinux-ldap ) +" + +# The user/group are only used for running daemons which are +# disabled in minimal builds, so elide the accounts too. +BDEPEND="!minimal? ( + acct-group/ldap + acct-user/ldap +) +" + +# for tracking versions +OPENLDAP_VERSIONTAG=".version-tag" +OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data" + +MULTILIB_WRAPPED_HEADERS=( + # USE=cxx + /usr/include/LDAPAsynConnection.h + /usr/include/LDAPAttrType.h + /usr/include/LDAPAttribute.h + /usr/include/LDAPAttributeList.h + /usr/include/LDAPConnection.h + /usr/include/LDAPConstraints.h + /usr/include/LDAPControl.h + /usr/include/LDAPControlSet.h + /usr/include/LDAPEntry.h + /usr/include/LDAPEntryList.h + /usr/include/LDAPException.h + /usr/include/LDAPExtResult.h + /usr/include/LDAPMessage.h + /usr/include/LDAPMessageQueue.h + /usr/include/LDAPModList.h + /usr/include/LDAPModification.h + /usr/include/LDAPObjClass.h + /usr/include/LDAPRebind.h + /usr/include/LDAPRebindAuth.h + /usr/include/LDAPReferenceList.h + /usr/include/LDAPResult.h + /usr/include/LDAPSaslBindResult.h + /usr/include/LDAPSchema.h + /usr/include/LDAPSearchReference.h + /usr/include/LDAPSearchResult.h + /usr/include/LDAPSearchResults.h + /usr/include/LDAPUrl.h + /usr/include/LDAPUrlList.h + /usr/include/LdifReader.h + /usr/include/LdifWriter.h + /usr/include/SaslInteraction.h + /usr/include/SaslInteractionHandler.h + /usr/include/StringList.h + /usr/include/TlsOptions.h +) + +PATCHES=( + "${FILESDIR}"/${PN}-2.4.28-fix-dash.patch + "${FILESDIR}"/${PN}-2.6.1-system-mdb.patch + "${FILESDIR}"/${PN}-2.6.1-cloak.patch + "${FILESDIR}"/${PN}-2.6.1-flags.patch + "${FILESDIR}"/${PN}-2.6.1-fix-missing-mapping.patch + "${FILESDIR}"/${PN}-2.6.1-make-flags.patch + "${FILESDIR}"/${PN}-2.6.1-fix-bashism-configure.patch +) + +openldap_filecount() { + local dir="$1" + find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l +} + +openldap_find_versiontags() { + # scan for all datadirs + local openldap_datadirs=() + if [[ -f "${EROOT}"/etc/openldap/slapd.conf ]]; then + openldap_datadirs=( $(awk '{if($1 == "directory") print $2 }' "${EROOT}"/etc/openldap/slapd.conf) ) + fi + openldap_datadirs+=( ${OPENLDAP_DEFAULTDIR_VERSIONTAG} ) + + einfo + einfo "Scanning datadir(s) from slapd.conf and" + einfo "the default installdir for Versiontags" + einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)" + einfo + + # scan datadirs if we have a version tag + openldap_found_tag=0 + have_files=0 + for each in ${openldap_datadirs[@]} ; do + CURRENT_TAGDIR="${ROOT}$(sed "s:\/::" <<< ${each})" + CURRENT_TAG="${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG}" + if [[ -d "${CURRENT_TAGDIR}" ]] && [[ "${openldap_found_tag}" == 0 ]] ; then + einfo "- Checking ${each}..." + if [[ -r "${CURRENT_TAG}" ]] ; then + # yey, we have one :) + einfo " Found Versiontag in ${each}" + source "${CURRENT_TAG}" + if [[ "${OLDPF}" == "" ]] ; then + eerror "Invalid Versiontag found in ${CURRENT_TAGDIR}" + eerror "Please delete it" + eerror + die "Please kill the invalid versiontag in ${CURRENT_TAGDIR}" + fi + + OLD_MAJOR=$(ver_cut 2-3 ${OLDPF}) + + [[ "$(openldap_filecount ${CURRENT_TAGDIR})" -gt 0 ]] && have_files=1 + + # are we on the same branch? + if [[ "${OLD_MAJOR}" != "${PV:0:3}" ]] ; then + ewarn " Versiontag doesn't match current major release!" + if [[ "${have_files}" == "1" ]] ; then + eerror " Versiontag says other major and you (probably) have datafiles!" + echo + openldap_upgrade_howto + else + einfo " No real problem, seems there's no database." + fi + else + einfo " Versiontag is fine here :)" + fi + else + einfo " Non-tagged dir ${each}" + [[ "$(openldap_filecount ${each})" -gt 0 ]] && have_files=1 + if [[ "${have_files}" == "1" ]] ; then + einfo " EEK! Non-empty non-tagged datadir, counting `ls -a ${each} | wc -l` files" + echo + + eerror + eerror "Your OpenLDAP Installation has a non tagged datadir that" + eerror "possibly contains a database at ${CURRENT_TAGDIR}" + eerror + eerror "Please export data if any entered and empty or remove" + eerror "the directory, installation has been stopped so you" + eerror "can take required action" + eerror + eerror "For a HOWTO on exporting the data, see instructions in the ebuild" + eerror + openldap_upgrade_howto + die "Please move the datadir ${CURRENT_TAGDIR} away" + fi + fi + einfo + fi + done + [[ "${have_files}" == "1" ]] && einfo "DB files present" || einfo "No DB files present" + + # Now we must check for the major version of sys-libs/db linked against. + # TODO: remove this as we dropped bdb support (gone upstream) in 2.6.1? + SLAPD_PATH="${EROOT}/usr/$(get_libdir)/openldap/slapd" + if [[ "${have_files}" == "1" ]] && [[ -f "${SLAPD_PATH}" ]]; then + OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \ + | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')" + local fail=0 + if [[ -z "${OLDVER}" ]] && [[ -z "${NEWVER}" ]]; then + : + # Nothing wrong here. + elif [[ -z "${OLDVER}" ]] && [[ -n "${NEWVER}" ]]; then + eerror " Your existing version of OpenLDAP was not built against" + eerror " any version of sys-libs/db, but the new one will build" + eerror " against ${NEWVER} and your database may be inaccessible." + echo + fail=1 + elif [[ -n "${OLDVER}" ]] && [[ -z "${NEWVER}" ]]; then + eerror " Your existing version of OpenLDAP was built against" + eerror " sys-libs/db:${OLDVER}, but the new one will not be" + eerror " built against any version and your database may be" + eerror " inaccessible." + echo + fail=1 + elif [[ "${OLDVER}" != "${NEWVER}" ]]; then + eerror " Your existing version of OpenLDAP was built against" + eerror " sys-libs/db:${OLDVER}, but the new one will build against" + eerror " ${NEWVER} and your database would be inaccessible." + echo + fail=1 + fi + [[ "${fail}" == "1" ]] && openldap_upgrade_howto + fi + + echo + einfo + einfo "All datadirs are fine, proceeding with merge now..." + einfo +} + +openldap_upgrade_howto() { + local d l i + eerror + eerror "A (possible old) installation of OpenLDAP was detected," + eerror "installation will not proceed for now." + eerror + eerror "As major version upgrades can corrupt your database," + eerror "you need to dump your database and re-create it afterwards." + eerror + eerror "Additionally, rebuilding against different major versions of the" + eerror "sys-libs/db libraries will cause your database to be inaccessible." + eerror "" + d="$(date -u +%s)" + l="/root/ldapdump.${d}" + i="${l}.raw" + eerror " 1. /etc/init.d/slapd stop" + eerror " 2. slapcat -l ${i}" + eerror " 3. egrep -v '^(entry|context)CSN:' <${i} >${l}" + eerror " 4. mv /var/lib/openldap-data/ /var/lib/openldap-data-backup/" + eerror " 5. emerge --update \=net-nds/${PF}" + eerror " 6. etc-update, and ensure that you apply the changes" + eerror " 7. slapadd -l ${l}" + eerror " 8. chown ldap:ldap /var/lib/openldap-data/*" + eerror " 9. /etc/init.d/slapd start" + eerror "10. check that your data is intact." + eerror "11. set up the new replication system." + eerror + if [[ "${FORCE_UPGRADE}" != "1" ]]; then + die "You need to upgrade your database first" + else + eerror "You have the magical FORCE_UPGRADE=1 in place." + eerror "Don't say you weren't warned about data loss." + fi +} + +pkg_setup() { + if ! use sasl && use cxx ; then + die "To build the ldapc++ library you must emerge openldap with sasl support" + fi + # Bug #322787 + if use minimal && ! has_version "net-nds/openldap" ; then + einfo "No datadir scan needed, openldap not installed" + elif use minimal && has_version 'net-nds/openldap[minimal]' ; then + einfo "Skipping scan for previous datadirs as requested by minimal useflag" + else + openldap_find_versiontags + fi +} + +src_prepare() { + rm -r libraries/liblmdb || die 'could not removed bundled lmdb directory' + + for filename in doc/drafts/draft-ietf-ldapext-acl-model-xx.txt; do + iconv -f iso-8859-1 -t utf-8 "$filename" > "$filename.utf8" + mv "$filename.utf8" "$filename" + done + + default + + sed -i \ + -e "s:\$(localstatedir)/run:${EPREFIX}/run:" \ + servers/slapd/Makefile.in || die 'adjusting slapd Makefile.in failed' + + pushd build &>/dev/null || die "pushd build" + einfo "Making sure upstream build strip does not do stripping too early" + sed -i.orig \ + -e '/^STRIP/s,-s,,g' \ + top.mk || die "Failed to remove to early stripping" + popd &>/dev/null || die + + eautoreconf + multilib_copy_sources +} + +build_contrib_module() { + # [] + pushd "${S}/contrib/slapd-modules/$1" &>/dev/null || die "pushd contrib/slapd-modules/$1" + einfo "Compiling contrib-module: $1" + local target="${2:-all}" + emake \ + LDAP_BUILD="${BUILD_DIR}" prefix="${EPREFIX}/usr" \ + CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" \ + "$target" + popd &>/dev/null || die +} + +multilib_src_configure() { + # Optional Features + myconf+=( + --enable-option-checking + $(use_enable debug) + --enable-dynamic + $(use_enable syslog) + $(use_enable ipv6) + --enable-local + ) + + # Optional Packages + myconf+=( + --without-fetch + ) + + if ! use minimal && multilib_is_native_abi; then + # SLAPD (Standalone LDAP Daemon) Options + # overlay chaining requires '--enable-ldap' #296567 + # see https://www.openldap.org/doc/admin26/overlays.html#Chaining + myconf+=( + --enable-ldap=yes + --enable-slapd + $(use_enable cleartext) + $(use_enable crypt) + $(multilib_native_use_enable sasl spasswd) + --disable-slp + $(use_enable tcpd wrappers) + ) + if use experimental ; then + # connectionless ldap per bug #342439 + # connectionless is a unsupported feature according to Howard Chu + # see https://bugs.openldap.org/show_bug.cgi?id=9739 + append-cppflags -DLDAP_CONNECTIONLESS + + myconf+=( + --enable-dynacl + # ACI build as dynamic module not supported (yet) + --enable-aci=yes + ) + fi + + for option in modules rlookups slapi; do + myconf+=( --enable-${option} ) + done + + # static SLAPD backends + for backend in mdb; do + myconf+=( --enable-${backend}=yes ) + done + + # module SLAPD backends + for backend in asyncmeta dnssrv meta null passwd relay sock; do + # missing modules: wiredtiger (not available in portage) + myconf+=( --enable-${backend}=mod ) + done + + use perl && myconf+=( --enable-perl=mod ) + + if use odbc ; then + myconf+=( --enable-sql=mod ) + if use iodbc ; then + myconf+=( --with-odbc="iodbc" ) + append-cflags -I"${EPREFIX}"/usr/include/iodbc + else + myconf+=( --with-odbc="unixodbc" ) + fi + fi + + use overlays && myconf+=( --enable-overlays=mod ) + use autoca && myconf+=( --enable-autoca=mod ) || myconf+=( --enable-autoca=no ) + # compile-in the syncprov + myconf+=( --enable-syncprov=yes ) + + # SLAPD Password Module Options + myconf+=( + $(use_enable argon2) + ) + + # Optional Packages + myconf+=( + $(use_with systemd) + $(multilib_native_use_with sasl cyrus-sasl) + ) + else + myconf+=( + --disable-backends + --disable-slapd + --disable-mdb + --disable-overlays + --disable-autoca + --disable-syslog + --without-systemd + ) + fi + + # Library Generation & Linking Options + myconf+=( + $(use_enable static-libs static) + --enable-shared + --enable-versioning + --with-pic + ) + + # some cross-compiling tests don't pan out well. + tc-is-cross-compiler && myconf+=( + --with-yielding-select=yes + ) + + local ssl_lib="no" + if use ssl || ( ! use minimal && use samba ) ; then + if use gnutls ; then + myconf+=( --with-tls="gnutls" ) + else + # disable MD2 hash function + append-cflags -DOPENSSL_NO_MD2 + myconf+=( --with-tls="openssl" ) + fi + else + myconf+=( --with-tls="no" ) + fi + + tc-export AR CC CXX + + ECONF_SOURCE="${S}" econf \ + --libexecdir="${EPREFIX}"/usr/$(get_libdir)/openldap \ + --localstatedir="${EPREFIX}"/var \ + --runstatedir="${EPREFIX}"/run \ + --sharedstatedir="${EPREFIX}"/var/lib \ + "${myconf[@]}" + + # argument '--runstatedir' seems to have no effect therefore this workaround + sed -i \ + -e 's:^runstatedir=.*:runstatedir=${EPREFIX}/run:' \ + configure contrib/ldapc++/configure contrib/ldaptcl/configure || die 'could not set runstatedir' + + sed -i \ + -e "s:/var/run/sasl2/mux:${EPREFIX}/run/sasl2/mux:" \ + doc/guide/admin/security.sdf || die 'could not fix run path in doc' + + emake depend +} + +src_configure_cxx() { + # This needs the libraries built by the first build run. + # we have to run it AFTER the main build, not just after the main configure + local myconf_ldapcpp=( + --with-libldap="${E}/lib" + --with-ldap-includes="${S}/include" + ) + + mkdir -p "${BUILD_DIR}"/contrib/ldapc++ || die "could not create ${BUILD_DIR}/contrib/ldapc++ directory" + pushd "${BUILD_DIR}/contrib/ldapc++" &>/dev/null || die "pushd contrib/ldapc++" + local LDFLAGS=${LDFLAGS} + local CPPFLAGS=${CPPFLAGS} + append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs \ + -L"${BUILD_DIR}"/libraries/libldap/.libs + append-cppflags -I"${BUILD_DIR}"/include + ECONF_SOURCE=${S}/contrib/ldapc++ \ + econf "${myconf_ldapcpp[@]}" + popd &>/dev/null || die "popd contrib/ldapc++" +} + +multilib_src_compile() { + tc-export AR CC CXX + emake CC="$(tc-getCC)" SHELL="${EPREFIX}"/bin/sh + + if ! use minimal && multilib_is_native_abi ; then + if use cxx ; then + einfo "Building contrib library: ldapc++" + src_configure_cxx + pushd "${BUILD_DIR}/contrib/ldapc++" &>/dev/null || die "pushd contrib/ldapc++" + emake + popd &>/dev/null || die + fi + + if use smbkrb5passwd ; then + einfo "Building contrib-module: smbk5pwd" + pushd "${S}/contrib/slapd-modules/smbk5pwd" &>/dev/null || die "pushd contrib/slapd-modules/smbk5pwd" + + MY_DEFS="-DDO_SHADOW" + if use samba ; then + MY_DEFS="${MY_DEFS} -DDO_SAMBA" + MY_KRB5_INC="" + fi + if use kerberos ; then + MY_DEFS="${MY_DEFS} -DDO_KRB5" + MY_KRB5_INC="$(krb5-config --cflags)" + fi + + emake \ + DEFS="${MY_DEFS}" \ + KRB5_INC="${MY_KRB5_INC}" \ + LDAP_BUILD="${BUILD_DIR}" \ + libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" + popd &>/dev/null || die + fi + + if use overlays ; then + einfo "Building contrib-module: samba4" + pushd "${S}/contrib/slapd-modules/samba4" &>/dev/null || die "pushd contrib/slapd-modules/samba4" + + emake \ + LDAP_BUILD="${BUILD_DIR}" \ + CC="$(tc-getCC)" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" + popd &>/dev/null || die + fi + + if use kerberos ; then + if use kinit ; then + build_contrib_module "kinit" "kinit.c" "kinit" + fi + build_contrib_module "passwd" "pw-kerberos.la" + fi + + if use pbkdf2; then + build_contrib_module "passwd/pbkdf2" + fi + + if use sha2 ; then + build_contrib_module "passwd/sha2" + fi + + # We could build pw-radius if GNURadius would install radlib.h + build_contrib_module "passwd" "pw-netscape.la" + + #build_contrib_module "acl" "posixgroup.la" # example code only + #build_contrib_module "acl" "gssacl.la" # example code only, also needs kerberos + build_contrib_module "addpartial" + build_contrib_module "allop" + build_contrib_module "allowed" + build_contrib_module "autogroup" + build_contrib_module "cloak" + # build_contrib_module "comp_match" # really complex, adds new external deps, questionable demand + build_contrib_module "denyop" + build_contrib_module "dsaschema" + build_contrib_module "dupent" + build_contrib_module "lastbind" + # lastmod may not play well with other overlays + build_contrib_module "lastmod" + build_contrib_module "noopsrch" + #build_contrib_module "nops" https://bugs.gentoo.org/641576 + #build_contrib_module "nssov" RESO:LATER + build_contrib_module "trace" + # build slapi-plugins + pushd "${S}/contrib/slapi-plugins/addrdnvalues" &>/dev/null || die "pushd contrib/slapi-plugins/addrdnvalues" + einfo "Building contrib-module: addrdnvalues plugin" + $(tc-getCC) -shared \ + -I"${BUILD_DIR}"/include \ + -I../../../include \ + ${CFLAGS} \ + -fPIC \ + ${LDFLAGS} \ + -o libaddrdnvalues-plugin.so \ + addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed" + popd &>/dev/null || die + fi +} + +multilib_src_test() { + if multilib_is_native_abi; then + cd "tests" + pwd + # emake test => runs only lloadd & mdb, in serial; skips ldif,sql,wt,regression + # emake partests => runs ALL of the tests in parallel + # wt/WiredTiger is not supported in Gentoo + TESTS=( plloadd pmdb ) + #TESTS+=( pldif ) # not done by default, so also exclude here + #use odbc && TESTS+=( psql ) # not done by default, so also exclude here + emake "${TESTS[@]}" + fi +} + +multilib_src_install() { + emake CC="$(tc-getCC)" \ + DESTDIR="${D}" SHELL="${EPREFIX}"/bin/sh install + + if ! use minimal && multilib_is_native_abi; then + # openldap modules go here + # TODO: write some code to populate slapd.conf with moduleload statements + keepdir /usr/$(get_libdir)/openldap/openldap/ + + # initial data storage dir + keepdir /var/lib/openldap-data + use prefix || fowners ldap:ldap /var/lib/openldap-data + fperms 0700 /var/lib/openldap-data + + echo "OLDPF='${PF}'" > "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" + echo "# do NOT delete this. it is used" >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" + echo "# to track versions for upgrading." >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" + + # use our config + rm "${ED}"/etc/openldap/slapd.conf + insinto /etc/openldap + newins "${FILESDIR}"/${PN}-2.4.40-slapd-conf slapd.conf + configfile="${ED}"/etc/openldap/slapd.conf + + # populate with built backends + ebegin "populate config with built backends" + for x in "${ED}"/usr/$(get_libdir)/openldap/openldap/back_*.so; do + einfo "Adding $(basename ${x})" + sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}" || die + done + sed -e "s:###INSERTDYNAMICMODULESHERE###$:# modulepath\t${EPREFIX}/usr/$(get_libdir)/openldap/openldap:" -i "${configfile}" + use prefix || fowners root:ldap /etc/openldap/slapd.conf + fperms 0640 /etc/openldap/slapd.conf + cp "${configfile}" "${configfile}".default || die + eend $? + + # install our own init scripts and systemd unit files + einfo "Install init scripts" + sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-initd-2.4.40-r2 > "${T}"/slapd || die + doinitd "${T}"/slapd + newconfd "${FILESDIR}"/slapd-confd-2.6.1 slapd + + einfo "Install systemd service" + sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-2.6.1.service > "${T}"/slapd.service || die + systemd_dounit "${T}"/slapd.service + systemd_install_serviced "${FILESDIR}"/slapd.service.conf + newtmpfiles "${FILESDIR}"/slapd.tmpfilesd slapd.conf + + # if built without SLP, we don't need to be before avahi + sed -i \ + -e '/before/{s/avahi-daemon//g}' \ + "${ED}"/etc/init.d/slapd \ + || die + + if use cxx ; then + einfo "Install the ldapc++ library" + cd "${BUILD_DIR}/contrib/ldapc++" || die + emake DESTDIR="${D}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install + cd "${S}"/contrib/ldapc++ || die + newdoc README ldapc++-README + fi + + if use smbkrb5passwd ; then + einfo "Install the smbk5pwd module" + cd "${S}/contrib/slapd-modules/smbk5pwd" || die + emake DESTDIR="${D}" \ + LDAP_BUILD="${BUILD_DIR}" \ + libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install + newdoc README smbk5pwd-README + fi + + if use overlays ; then + einfo "Install the samba4 module" + cd "${S}/contrib/slapd-modules/samba4" || die + emake DESTDIR="${D}" \ + LDAP_BUILD="${BUILD_DIR}" \ + libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install + newdoc README samba4-README + fi + + einfo "Installing contrib modules" + cd "${S}/contrib/slapd-modules" || die + for l in */*.la */*/*.la; do + [[ -e ${l} ]] || continue + libtool --mode=install cp ${l} \ + "${ED}"/usr/$(get_libdir)/openldap/openldap || \ + die "installing ${l} failed" + done + + dodoc "${FILESDIR}"/DB_CONFIG.fast.example + docinto contrib + doman */*.5 + #newdoc acl/README* + newdoc addpartial/README addpartial-README + newdoc allop/README allop-README + newdoc allowed/README allowed-README + newdoc autogroup/README autogroup-README + newdoc dsaschema/README dsaschema-README + newdoc passwd/README passwd-README + cd "${S}/contrib/slapi-plugins" || die + insinto /usr/$(get_libdir)/openldap/openldap + doins */*.so + docinto contrib + newdoc addrdnvalues/README addrdnvalues-README + + insinto /etc/openldap/schema + newins "${DISTDIR}"/${BIS_P} ${BIS_PN} + + docinto back-sock ; dodoc "${S}"/servers/slapd/back-sock/searchexample* + docinto back-perl ; dodoc "${S}"/servers/slapd/back-perl/SampleLDAP.pm + + dosbin "${S}"/contrib/slapd-tools/statslog + newdoc "${S}"/contrib/slapd-tools/README README.statslog + fi + + if ! use static-libs ; then + find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die + fi +} + +multilib_src_install_all() { + dodoc ANNOUNCEMENT CHANGES COPYRIGHT README + docinto rfc ; dodoc doc/rfc/*.txt +} + +pkg_preinst() { + # keep old libs if any + preserve_old_lib /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.4$(get_libname 0) + # bug 440470, only display the getting started help there was no openldap before, + # or we are going to a non-minimal build + ! has_version net-nds/openldap || has_version 'net-nds/openldap[minimal]' + OPENLDAP_PRINT_MESSAGES=$((! $?)) +} + +pkg_postinst() { + if ! use minimal ; then + tmpfiles_process slapd.conf + + # You cannot build SSL certificates during src_install that will make + # binary packages containing your SSL key, which is both a security risk + # and a misconfiguration if multiple machines use the same key and cert. + if use ssl; then + install_cert /etc/openldap/ssl/ldap + use prefix || chown ldap:ldap "${EROOT}"/etc/openldap/ssl/ldap.* + ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" + ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" + ewarn "add 'TLS_REQCERT allow' if you want to use them." + fi + + if use prefix; then + # Warn about prefix issues with slapd + eerror "slapd might NOT be usable on Prefix systems as it requires root privileges" + eerror "to start up, and requires that certain files directories be owned by" + eerror "ldap:ldap. As Prefix does not support changing ownership of files and" + eerror "directories, you will have to manually fix this yourself." + fi + + # These lines force the permissions of various content to be correct + if [[ -d "${EROOT}"/var/run/openldap ]]; then + use prefix || { chown ldap:ldap "${EROOT}"/var/run/openldap || die; } + chmod 0755 "${EROOT}"/var/run/openldap || die + fi + use prefix || chown root:ldap "${EROOT}"/etc/openldap/slapd.conf{,.default} + chmod 0640 "${EROOT}"/etc/openldap/slapd.conf{,.default} || die + use prefix || chown ldap:ldap "${EROOT}"/var/lib/openldap-data + fi + + if has_version 'net-nds/openldap[-minimal]' && ((${OPENLDAP_PRINT_MESSAGES})); then + elog "Getting started using OpenLDAP? There is some documentation available:" + elog "Gentoo Guide to OpenLDAP Authentication" + elog "(https://wiki.gentoo.org/wiki/Centralized_authentication_using_OpenLDAP)" + fi + + preserve_old_lib_notify /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.4$(get_libname 0) +} diff --git a/net-nds/openldap/openldap-2.6.1.ebuild b/net-nds/openldap/openldap-2.6.1.ebuild deleted file mode 100644 index 971bbbe40b39..000000000000 --- a/net-nds/openldap/openldap-2.6.1.ebuild +++ /dev/null @@ -1,794 +0,0 @@ -# Copyright 1999-2022 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=7 - -inherit autotools flag-o-matic multilib-minimal preserve-libs ssl-cert toolchain-funcs systemd tmpfiles - -MY_PV="$(ver_rs 1-2 _)" - -BIS_PN=rfc2307bis.schema -BIS_PV=20140524 -BIS_P="${BIS_PN}-${BIS_PV}" - -DESCRIPTION="LDAP suite of application and development tools" -HOMEPAGE="https://www.OpenLDAP.org/" - -SRC_URI=" - https://gitlab.com/openldap/${PN}/-/archive/OPENLDAP_REL_ENG_${MY_PV}/${PN}-OPENLDAP_REL_ENG_${MY_PV}.tar.gz - mirror://gentoo/${BIS_P}" - -LICENSE="OPENLDAP GPL-2" -SLOT="0" -KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-solaris" - -IUSE_DAEMON="argon2 +cleartext crypt experimental minimal samba tcpd" -IUSE_OVERLAY="overlays perl" -IUSE_OPTIONAL="debug gnutls iodbc ipv6 odbc sasl ssl selinux static-libs +syslog test" -IUSE_CONTRIB="kerberos kinit pbkdf2 sha2 smbkrb5passwd" -IUSE_CONTRIB="${IUSE_CONTRIB} cxx" -IUSE="systemd ${IUSE_DAEMON} ${IUSE_BACKEND} ${IUSE_OVERLAY} ${IUSE_OPTIONAL} ${IUSE_CONTRIB}" -RESTRICT="!test? ( test )" - -RESTRICT="!test? ( test )" -REQUIRED_USE="cxx? ( sasl ) - pbkdf2? ( ssl ) - test? ( cleartext sasl ) - ?? ( test minimal )" - -S=${WORKDIR}/${PN}-OPENLDAP_REL_ENG_${MY_PV} - -# always list newer first -# Do not add any AGPL-3 BDB here! -# See bug 525110, comment 15. -# Advanced usage: OPENLDAP_BDB_SLOTS in the environment can be used to force a slot during build. -BDB_SLOTS="${OPENLDAP_BDB_SLOTS:=5.3 4.8}" -BDB_PKGS='' -for _slot in $BDB_SLOTS; do BDB_PKGS="${BDB_PKGS} sys-libs/db:${_slot}" ; done - -# openssl is needed to generate lanman-passwords required by samba -COMMON_DEPEND=" - ssl? ( - !gnutls? ( - >=dev-libs/openssl-1.0.1h-r2:0=[${MULTILIB_USEDEP}] - ) - gnutls? ( - >=net-libs/gnutls-2.12.23-r6:=[${MULTILIB_USEDEP}] - >=dev-libs/libgcrypt-1.5.3:0=[${MULTILIB_USEDEP}] - ) - ) - sasl? ( dev-libs/cyrus-sasl:= ) - !minimal? ( - dev-libs/libltdl - sys-fs/e2fsprogs - >=dev-db/lmdb-0.9.18:= - argon2? ( app-crypt/argon2:= ) - crypt? ( virtual/libcrypt:= ) - tcpd? ( sys-apps/tcp-wrappers ) - odbc? ( !iodbc? ( dev-db/unixODBC ) - iodbc? ( dev-db/libiodbc ) ) - perl? ( dev-lang/perl:=[-build(-)] ) - samba? ( - dev-libs/openssl:0= - ) - smbkrb5passwd? ( - dev-libs/openssl:0= - kerberos? ( app-crypt/heimdal ) - ) - kerberos? ( - virtual/krb5 - kinit? ( !app-crypt/heimdal ) - ) - ) -" -DEPEND="${COMMON_DEPEND} - sys-apps/groff -" -RDEPEND="${COMMON_DEPEND} - selinux? ( sec-policy/selinux-ldap ) -" - -# The user/group are only used for running daemons which are -# disabled in minimal builds, so elide the accounts too. -BDEPEND="!minimal? ( - acct-group/ldap - acct-user/ldap -) -" - -# for tracking versions -OPENLDAP_VERSIONTAG=".version-tag" -OPENLDAP_DEFAULTDIR_VERSIONTAG="/var/lib/openldap-data" - -MULTILIB_WRAPPED_HEADERS=( - # USE=cxx - /usr/include/LDAPAsynConnection.h - /usr/include/LDAPAttrType.h - /usr/include/LDAPAttribute.h - /usr/include/LDAPAttributeList.h - /usr/include/LDAPConnection.h - /usr/include/LDAPConstraints.h - /usr/include/LDAPControl.h - /usr/include/LDAPControlSet.h - /usr/include/LDAPEntry.h - /usr/include/LDAPEntryList.h - /usr/include/LDAPException.h - /usr/include/LDAPExtResult.h - /usr/include/LDAPMessage.h - /usr/include/LDAPMessageQueue.h - /usr/include/LDAPModList.h - /usr/include/LDAPModification.h - /usr/include/LDAPObjClass.h - /usr/include/LDAPRebind.h - /usr/include/LDAPRebindAuth.h - /usr/include/LDAPReferenceList.h - /usr/include/LDAPResult.h - /usr/include/LDAPSaslBindResult.h - /usr/include/LDAPSchema.h - /usr/include/LDAPSearchReference.h - /usr/include/LDAPSearchResult.h - /usr/include/LDAPSearchResults.h - /usr/include/LDAPUrl.h - /usr/include/LDAPUrlList.h - /usr/include/LdifReader.h - /usr/include/LdifWriter.h - /usr/include/SaslInteraction.h - /usr/include/SaslInteractionHandler.h - /usr/include/StringList.h - /usr/include/TlsOptions.h -) - -PATCHES=( - "${FILESDIR}"/${PN}-2.4.28-fix-dash.patch - "${FILESDIR}"/${PN}-2.6.1-system-mdb.patch - "${FILESDIR}"/${PN}-2.6.1-cloak.patch - "${FILESDIR}"/${PN}-2.6.1-flags.patch - "${FILESDIR}"/${PN}-2.6.1-fix-missing-mapping.patch -) - -openldap_filecount() { - local dir="$1" - find "${dir}" -type f ! -name '.*' ! -name 'DB_CONFIG*' | wc -l -} - -openldap_find_versiontags() { - # scan for all datadirs - local openldap_datadirs=() - if [[ -f "${EROOT}"/etc/openldap/slapd.conf ]]; then - openldap_datadirs=( $(awk '{if($1 == "directory") print $2 }' "${EROOT}"/etc/openldap/slapd.conf) ) - fi - openldap_datadirs+=( ${OPENLDAP_DEFAULTDIR_VERSIONTAG} ) - - einfo - einfo "Scanning datadir(s) from slapd.conf and" - einfo "the default installdir for Versiontags" - einfo "(${OPENLDAP_DEFAULTDIR_VERSIONTAG} may appear twice)" - einfo - - # scan datadirs if we have a version tag - openldap_found_tag=0 - have_files=0 - for each in ${openldap_datadirs[@]} ; do - CURRENT_TAGDIR="${ROOT}$(sed "s:\/::" <<< ${each})" - CURRENT_TAG="${CURRENT_TAGDIR}/${OPENLDAP_VERSIONTAG}" - if [[ -d "${CURRENT_TAGDIR}" ]] && [[ "${openldap_found_tag}" == 0 ]] ; then - einfo "- Checking ${each}..." - if [[ -r "${CURRENT_TAG}" ]] ; then - # yey, we have one :) - einfo " Found Versiontag in ${each}" - source "${CURRENT_TAG}" - if [[ "${OLDPF}" == "" ]] ; then - eerror "Invalid Versiontag found in ${CURRENT_TAGDIR}" - eerror "Please delete it" - eerror - die "Please kill the invalid versiontag in ${CURRENT_TAGDIR}" - fi - - OLD_MAJOR=$(ver_cut 2-3 ${OLDPF}) - - [[ "$(openldap_filecount ${CURRENT_TAGDIR})" -gt 0 ]] && have_files=1 - - # are we on the same branch? - if [[ "${OLD_MAJOR}" != "${PV:0:3}" ]] ; then - ewarn " Versiontag doesn't match current major release!" - if [[ "${have_files}" == "1" ]] ; then - eerror " Versiontag says other major and you (probably) have datafiles!" - echo - openldap_upgrade_howto - else - einfo " No real problem, seems there's no database." - fi - else - einfo " Versiontag is fine here :)" - fi - else - einfo " Non-tagged dir ${each}" - [[ "$(openldap_filecount ${each})" -gt 0 ]] && have_files=1 - if [[ "${have_files}" == "1" ]] ; then - einfo " EEK! Non-empty non-tagged datadir, counting `ls -a ${each} | wc -l` files" - echo - - eerror - eerror "Your OpenLDAP Installation has a non tagged datadir that" - eerror "possibly contains a database at ${CURRENT_TAGDIR}" - eerror - eerror "Please export data if any entered and empty or remove" - eerror "the directory, installation has been stopped so you" - eerror "can take required action" - eerror - eerror "For a HOWTO on exporting the data, see instructions in the ebuild" - eerror - openldap_upgrade_howto - die "Please move the datadir ${CURRENT_TAGDIR} away" - fi - fi - einfo - fi - done - [[ "${have_files}" == "1" ]] && einfo "DB files present" || einfo "No DB files present" - - # Now we must check for the major version of sys-libs/db linked against. - SLAPD_PATH="${EROOT}/usr/$(get_libdir)/openldap/slapd" - if [[ "${have_files}" == "1" ]] && [[ -f "${SLAPD_PATH}" ]]; then - OLDVER="$(/usr/bin/ldd ${SLAPD_PATH} \ - | awk '/libdb-/{gsub("^libdb-","",$1);gsub(".so$","",$1);print $1}')" - local fail=0 - if [[ -z "${OLDVER}" ]] && [[ -z "${NEWVER}" ]]; then - : - # Nothing wrong here. - elif [[ -z "${OLDVER}" ]] && [[ -n "${NEWVER}" ]]; then - eerror " Your existing version of OpenLDAP was not built against" - eerror " any version of sys-libs/db, but the new one will build" - eerror " against ${NEWVER} and your database may be inaccessible." - echo - fail=1 - elif [[ -n "${OLDVER}" ]] && [[ -z "${NEWVER}" ]]; then - eerror " Your existing version of OpenLDAP was built against" - eerror " sys-libs/db:${OLDVER}, but the new one will not be" - eerror " built against any version and your database may be" - eerror " inaccessible." - echo - fail=1 - elif [[ "${OLDVER}" != "${NEWVER}" ]]; then - eerror " Your existing version of OpenLDAP was built against" - eerror " sys-libs/db:${OLDVER}, but the new one will build against" - eerror " ${NEWVER} and your database would be inaccessible." - echo - fail=1 - fi - [[ "${fail}" == "1" ]] && openldap_upgrade_howto - fi - - echo - einfo - einfo "All datadirs are fine, proceeding with merge now..." - einfo -} - -openldap_upgrade_howto() { - local d l i - eerror - eerror "A (possible old) installation of OpenLDAP was detected," - eerror "installation will not proceed for now." - eerror - eerror "As major version upgrades can corrupt your database," - eerror "you need to dump your database and re-create it afterwards." - eerror - eerror "Additionally, rebuilding against different major versions of the" - eerror "sys-libs/db libraries will cause your database to be inaccessible." - eerror "" - d="$(date -u +%s)" - l="/root/ldapdump.${d}" - i="${l}.raw" - eerror " 1. /etc/init.d/slapd stop" - eerror " 2. slapcat -l ${i}" - eerror " 3. egrep -v '^(entry|context)CSN:' <${i} >${l}" - eerror " 4. mv /var/lib/openldap-data/ /var/lib/openldap-data-backup/" - eerror " 5. emerge --update \=net-nds/${PF}" - eerror " 6. etc-update, and ensure that you apply the changes" - eerror " 7. slapadd -l ${l}" - eerror " 8. chown ldap:ldap /var/lib/openldap-data/*" - eerror " 9. /etc/init.d/slapd start" - eerror "10. check that your data is intact." - eerror "11. set up the new replication system." - eerror - if [[ "${FORCE_UPGRADE}" != "1" ]]; then - die "You need to upgrade your database first" - else - eerror "You have the magical FORCE_UPGRADE=1 in place." - eerror "Don't say you weren't warned about data loss." - fi -} - -pkg_setup() { - if ! use sasl && use cxx ; then - die "To build the ldapc++ library you must emerge openldap with sasl support" - fi - # Bug #322787 - if use minimal && ! has_version "net-nds/openldap" ; then - einfo "No datadir scan needed, openldap not installed" - elif use minimal && has_version 'net-nds/openldap[minimal]' ; then - einfo "Skipping scan for previous datadirs as requested by minimal useflag" - else - openldap_find_versiontags - fi -} - -src_prepare() { - rm -r libraries/liblmdb || die 'could not removed bundled lmdb directory' - - for filename in doc/drafts/draft-ietf-ldapext-acl-model-xx.txt; do - iconv -f iso-8859-1 -t utf-8 "$filename" > "$filename.utf8" - mv "$filename.utf8" "$filename" - done - - default - - sed -i \ - -e "s:\$(localstatedir)/run:${EPREFIX}/run:" \ - servers/slapd/Makefile.in || die 'adjusting slapd Makefile.in failed' - - pushd build &>/dev/null || die "pushd build" - einfo "Making sure upstream build strip does not do stripping too early" - sed -i.orig \ - -e '/^STRIP/s,-s,,g' \ - top.mk || die "Failed to remove to early stripping" - popd &>/dev/null || die - - eautoreconf - multilib_copy_sources -} - -build_contrib_module() { - # [] - pushd "${S}/contrib/slapd-modules/$1" &>/dev/null || die "pushd contrib/slapd-modules/$1" - einfo "Compiling contrib-module: $1" - local target="${2:-all}" - emake \ - LDAP_BUILD="${BUILD_DIR}" prefix="${EPREFIX}/usr" \ - CC="${CC}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" \ - "$target" - popd &>/dev/null || die -} - -multilib_src_configure() { - # Optional Features - myconf+=( - --enable-option-checking - $(use_enable debug) - --enable-dynamic - $(use_enable syslog) - $(use_enable ipv6) - --enable-local - ) - - # Optional Packages - myconf+=( - --without-fetch - ) - - if ! use minimal && multilib_is_native_abi; then - # SLAPD (Standalone LDAP Daemon) Options - # overlay chaining requires '--enable-ldap' #296567 - # see https://www.openldap.org/doc/admin26/overlays.html#Chaining - myconf+=( - --enable-ldap=yes - --enable-slapd - $(use_enable cleartext) - $(use_enable crypt) - $(multilib_native_use_enable sasl spasswd) - --disable-slp - $(use_enable tcpd wrappers) - ) - if use experimental ; then - # connectionless ldap per bug #342439 - # connectionless is a unsupported feature according to Howard Chu - # see https://bugs.openldap.org/show_bug.cgi?id=9739 - append-cppflags -DLDAP_CONNECTIONLESS - - myconf+=( - --enable-dynacl - # ACI build as dynamic module not supported (yet) - --enable-aci=yes - ) - fi - - for option in modules rlookups slapi; do - myconf+=( --enable-${option} ) - done - - # static SLAPD backends - for backend in mdb; do - myconf+=( --enable-${backend}=yes ) - done - - # module SLAPD backends - for backend in asyncmeta dnssrv meta null passwd relay sock; do - # missing modules: wiredtiger (not available in portage) - myconf+=( --enable-${backend}=mod ) - done - - use perl && myconf+=( --enable-perl=mod ) - - if use odbc ; then - myconf+=( --enable-sql=mod ) - if use iodbc ; then - myconf+=( --with-odbc="iodbc" ) - append-cflags -I"${EPREFIX}"/usr/include/iodbc - else - myconf+=( --with-odbc="unixodbc" ) - fi - fi - - use overlays && myconf+=( --enable-overlays=mod ) - # compile-in the syncprov - myconf+=( --enable-syncprov=yes ) - - # SLAPD Password Module Options - myconf+=( - $(use_enable argon2) - ) - - # Optional Packages - myconf+=( - $(use_with systemd) - $(multilib_native_use_with sasl cyrus-sasl) - ) - else - myconf+=( - --disable-backends - --disable-slapd - --disable-mdb - --disable-overlays - --disable-syslog - --without-systemd - ) - fi - - # Library Generation & Linking Options - myconf+=( - $(use_enable static-libs static) - --enable-shared - --enable-versioning - --with-pic - ) - - # some cross-compiling tests don't pan out well. - tc-is-cross-compiler && myconf+=( - --with-yielding-select=yes - ) - - local ssl_lib="no" - if use ssl || ( ! use minimal && use samba ) ; then - if use gnutls ; then - myconf+=( --with-tls="gnutls" ) - else - # disable MD2 hash function - append-cflags -DOPENSSL_NO_MD2 - myconf+=( --with-tls="openssl" ) - fi - else - myconf+=( --with-tls="no" ) - fi - - tc-export AR CC CXX - - ECONF_SOURCE="${S}" econf \ - --libexecdir="${EPREFIX}"/usr/$(get_libdir)/openldap \ - --localstatedir="${EPREFIX}"/var \ - --runstatedir="${EPREFIX}"/run \ - --sharedstatedir="${EPREFIX}"/var/lib \ - "${myconf[@]}" - - # argument '--runstatedir' seems to have no effect therefore this workaround - sed -i \ - -e 's:^runstatedir=.*:runstatedir=${EPREFIX}/run:' \ - configure contrib/ldapc++/configure contrib/ldaptcl/configure || die 'could not set runstatedir' - - sed -i \ - -e "s:/var/run/sasl2/mux:${EPREFIX}/run/sasl2/mux:" \ - doc/guide/admin/security.sdf || die 'could not fix run path in doc' - - emake depend -} - -src_configure_cxx() { - # This needs the libraries built by the first build run. - # we have to run it AFTER the main build, not just after the main configure - local myconf_ldapcpp=( - --with-libldap="${E}/lib" - --with-ldap-includes="${S}/include" - ) - - mkdir -p "${BUILD_DIR}"/contrib/ldapc++ || die "could not create ${BUILD_DIR}/contrib/ldapc++ directory" - pushd "${BUILD_DIR}/contrib/ldapc++" &>/dev/null || die "pushd contrib/ldapc++" - local LDFLAGS=${LDFLAGS} - local CPPFLAGS=${CPPFLAGS} - append-ldflags -L"${BUILD_DIR}"/libraries/liblber/.libs \ - -L"${BUILD_DIR}"/libraries/libldap/.libs - append-cppflags -I"${BUILD_DIR}"/include - ECONF_SOURCE=${S}/contrib/ldapc++ \ - econf "${myconf_ldapcpp[@]}" - popd &>/dev/null || die "popd contrib/ldapc++" -} - -multilib_src_compile() { - tc-export AR CC CXX - emake CC="$(tc-getCC)" SHELL="${EPREFIX}"/bin/sh - - if ! use minimal && multilib_is_native_abi ; then - if use cxx ; then - einfo "Building contrib library: ldapc++" - src_configure_cxx - pushd "${BUILD_DIR}/contrib/ldapc++" &>/dev/null || die "pushd contrib/ldapc++" - emake - popd &>/dev/null || die - fi - - if use smbkrb5passwd ; then - einfo "Building contrib-module: smbk5pwd" - pushd "${S}/contrib/slapd-modules/smbk5pwd" &>/dev/null || die "pushd contrib/slapd-modules/smbk5pwd" - - MY_DEFS="-DDO_SHADOW" - if use samba ; then - MY_DEFS="${MY_DEFS} -DDO_SAMBA" - MY_KRB5_INC="" - fi - if use kerberos ; then - MY_DEFS="${MY_DEFS} -DDO_KRB5" - MY_KRB5_INC="$(krb5-config --cflags)" - fi - - emake \ - DEFS="${MY_DEFS}" \ - KRB5_INC="${MY_KRB5_INC}" \ - LDAP_BUILD="${BUILD_DIR}" \ - libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" - popd &>/dev/null || die - fi - - if use overlays ; then - einfo "Building contrib-module: samba4" - pushd "${S}/contrib/slapd-modules/samba4" &>/dev/null || die "pushd contrib/slapd-modules/samba4" - - emake \ - LDAP_BUILD="${BUILD_DIR}" \ - CC="$(tc-getCC)" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" - popd &>/dev/null || die - fi - - if use kerberos ; then - if use kinit ; then - build_contrib_module "kinit" "kinit.c" "kinit" - fi - build_contrib_module "passwd" "pw-kerberos.la" - fi - - if use pbkdf2; then - build_contrib_module "passwd/pbkdf2" - fi - - if use sha2 ; then - build_contrib_module "passwd/sha2" - fi - - # We could build pw-radius if GNURadius would install radlib.h - build_contrib_module "passwd" "pw-netscape.la" - - #build_contrib_module "acl" "posixgroup.la" # example code only - #build_contrib_module "acl" "gssacl.la" # example code only, also needs kerberos - build_contrib_module "addpartial" - build_contrib_module "allop" - build_contrib_module "allowed" - build_contrib_module "autogroup" - build_contrib_module "cloak" - # build_contrib_module "comp_match" # really complex, adds new external deps, questionable demand - build_contrib_module "denyop" - build_contrib_module "dsaschema" - build_contrib_module "dupent" - build_contrib_module "lastbind" - # lastmod may not play well with other overlays - build_contrib_module "lastmod" - build_contrib_module "noopsrch" - #build_contrib_module "nops" https://bugs.gentoo.org/641576 - #build_contrib_module "nssov" RESO:LATER - build_contrib_module "trace" - # build slapi-plugins - pushd "${S}/contrib/slapi-plugins/addrdnvalues" &>/dev/null || die "pushd contrib/slapi-plugins/addrdnvalues" - einfo "Building contrib-module: addrdnvalues plugin" - $(tc-getCC) -shared \ - -I"${BUILD_DIR}"/include \ - -I../../../include \ - ${CFLAGS} \ - -fPIC \ - ${LDFLAGS} \ - -o libaddrdnvalues-plugin.so \ - addrdnvalues.c || die "Building libaddrdnvalues-plugin.so failed" - popd &>/dev/null || die - fi -} - -multilib_src_test() { - if multilib_is_native_abi; then - emake test - fi -} - -multilib_src_install() { - emake CC="$(tc-getCC)" \ - DESTDIR="${D}" SHELL="${EPREFIX}"/bin/sh install - - if ! use minimal && multilib_is_native_abi; then - # openldap modules go here - # TODO: write some code to populate slapd.conf with moduleload statements - keepdir /usr/$(get_libdir)/openldap/openldap/ - - # initial data storage dir - keepdir /var/lib/openldap-data - use prefix || fowners ldap:ldap /var/lib/openldap-data - fperms 0700 /var/lib/openldap-data - - echo "OLDPF='${PF}'" > "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" - echo "# do NOT delete this. it is used" >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" - echo "# to track versions for upgrading." >> "${ED}${OPENLDAP_DEFAULTDIR_VERSIONTAG}/${OPENLDAP_VERSIONTAG}" - - # use our config - rm "${ED}"/etc/openldap/slapd.conf - insinto /etc/openldap - newins "${FILESDIR}"/${PN}-2.4.40-slapd-conf slapd.conf - configfile="${ED}"/etc/openldap/slapd.conf - - # populate with built backends - ebegin "populate config with built backends" - for x in "${ED}"/usr/$(get_libdir)/openldap/openldap/back_*.so; do - einfo "Adding $(basename ${x})" - sed -e "/###INSERTDYNAMICMODULESHERE###$/a# moduleload\t$(basename ${x})" -i "${configfile}" || die - done - sed -e "s:###INSERTDYNAMICMODULESHERE###$:# modulepath\t${EPREFIX}/usr/$(get_libdir)/openldap/openldap:" -i "${configfile}" - use prefix || fowners root:ldap /etc/openldap/slapd.conf - fperms 0640 /etc/openldap/slapd.conf - cp "${configfile}" "${configfile}".default || die - eend $? - - # install our own init scripts and systemd unit files - einfo "Install init scripts" - sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-initd-2.4.40-r2 > "${T}"/slapd || die - doinitd "${T}"/slapd - newconfd "${FILESDIR}"/slapd-confd-2.6.1 slapd - - einfo "Install systemd service" - sed -e "s,/usr/lib/,/usr/$(get_libdir)/," "${FILESDIR}"/slapd-2.6.1.service > "${T}"/slapd.service || die - systemd_dounit "${T}"/slapd.service - systemd_install_serviced "${FILESDIR}"/slapd.service.conf - newtmpfiles "${FILESDIR}"/slapd.tmpfilesd slapd.conf - - # if built without SLP, we don't need to be before avahi - sed -i \ - -e '/before/{s/avahi-daemon//g}' \ - "${ED}"/etc/init.d/slapd \ - || die - - if use cxx ; then - einfo "Install the ldapc++ library" - cd "${BUILD_DIR}/contrib/ldapc++" || die - emake DESTDIR="${D}" libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install - cd "${S}"/contrib/ldapc++ || die - newdoc README ldapc++-README - fi - - if use smbkrb5passwd ; then - einfo "Install the smbk5pwd module" - cd "${S}/contrib/slapd-modules/smbk5pwd" || die - emake DESTDIR="${D}" \ - LDAP_BUILD="${BUILD_DIR}" \ - libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install - newdoc README smbk5pwd-README - fi - - if use overlays ; then - einfo "Install the samba4 module" - cd "${S}/contrib/slapd-modules/samba4" || die - emake DESTDIR="${D}" \ - LDAP_BUILD="${BUILD_DIR}" \ - libexecdir="${EPREFIX}/usr/$(get_libdir)/openldap" install - newdoc README samba4-README - fi - - einfo "Installing contrib modules" - cd "${S}/contrib/slapd-modules" || die - for l in */*.la */*/*.la; do - [[ -e ${l} ]] || continue - libtool --mode=install cp ${l} \ - "${ED}"/usr/$(get_libdir)/openldap/openldap || \ - die "installing ${l} failed" - done - - dodoc "${FILESDIR}"/DB_CONFIG.fast.example - docinto contrib - doman */*.5 - #newdoc acl/README* - newdoc addpartial/README addpartial-README - newdoc allop/README allop-README - newdoc allowed/README allowed-README - newdoc autogroup/README autogroup-README - newdoc dsaschema/README dsaschema-README - newdoc passwd/README passwd-README - cd "${S}/contrib/slapi-plugins" || die - insinto /usr/$(get_libdir)/openldap/openldap - doins */*.so - docinto contrib - newdoc addrdnvalues/README addrdnvalues-README - - insinto /etc/openldap/schema - newins "${DISTDIR}"/${BIS_P} ${BIS_PN} - - docinto back-sock ; dodoc "${S}"/servers/slapd/back-sock/searchexample* - docinto back-perl ; dodoc "${S}"/servers/slapd/back-perl/SampleLDAP.pm - - dosbin "${S}"/contrib/slapd-tools/statslog - newdoc "${S}"/contrib/slapd-tools/README README.statslog - fi - - if ! use static-libs ; then - find "${ED}" \( -name '*.a' -o -name '*.la' \) -delete || die - fi -} - -multilib_src_install_all() { - dodoc ANNOUNCEMENT CHANGES COPYRIGHT README - docinto rfc ; dodoc doc/rfc/*.txt -} - -pkg_preinst() { - # keep old libs if any - preserve_old_lib /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.4$(get_libname 0) - # bug 440470, only display the getting started help there was no openldap before, - # or we are going to a non-minimal build - ! has_version net-nds/openldap || has_version 'net-nds/openldap[minimal]' - OPENLDAP_PRINT_MESSAGES=$((! $?)) -} - -pkg_postinst() { - if ! use minimal ; then - tmpfiles_process slapd.conf - - # You cannot build SSL certificates during src_install that will make - # binary packages containing your SSL key, which is both a security risk - # and a misconfiguration if multiple machines use the same key and cert. - if use ssl; then - install_cert /etc/openldap/ssl/ldap - use prefix || chown ldap:ldap "${EROOT}"/etc/openldap/ssl/ldap.* - ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" - ewarn "Self-signed SSL certificates are treated harshly by OpenLDAP 2.[12]" - ewarn "add 'TLS_REQCERT allow' if you want to use them." - fi - - if use prefix; then - # Warn about prefix issues with slapd - eerror "slapd might NOT be usable on Prefix systems as it requires root privileges" - eerror "to start up, and requires that certain files directories be owned by" - eerror "ldap:ldap. As Prefix does not support changing ownership of files and" - eerror "directories, you will have to manually fix this yourself." - fi - - # These lines force the permissions of various content to be correct - if [[ -d "${EROOT}"/var/run/openldap ]]; then - use prefix || { chown ldap:ldap "${EROOT}"/var/run/openldap || die; } - chmod 0755 "${EROOT}"/var/run/openldap || die - fi - use prefix || chown root:ldap "${EROOT}"/etc/openldap/slapd.conf{,.default} - chmod 0640 "${EROOT}"/etc/openldap/slapd.conf{,.default} || die - use prefix || chown ldap:ldap "${EROOT}"/var/lib/openldap-data - fi - - if has_version 'net-nds/openldap[-minimal]' && ((${OPENLDAP_PRINT_MESSAGES})); then - elog "Getting started using OpenLDAP? There is some documentation available:" - elog "Gentoo Guide to OpenLDAP Authentication" - elog "(https://wiki.gentoo.org/wiki/Centralized_authentication_using_OpenLDAP)" - elog "---" - elog "An example file for tuning BDB backends with openldap is" - elog "DB_CONFIG.fast.example in /usr/share/doc/${PF}/" - fi - - preserve_old_lib_notify /usr/$(get_libdir)/{liblber,libldap,libldap_r}-2.4$(get_libname 0) -} -- cgit v1.2.3