From 185c7bc43d6c85bfa46f3420493fbe3502071ad3 Mon Sep 17 00:00:00 2001 From: Sam James Date: Thu, 26 Aug 2021 19:18:43 +0100 Subject: sys-auth/nss_ldap: fix finding glibc version on no-multilib Bit of a hack but the rest of it is rather fragile anyway. The issue was that ${EPREFIX}/lib doesn't exist on non-multilib systems. Bug: https://bugs.gentoo.org/810058 Signed-off-by: Sam James --- .../nss_ldap/files/nss_ldap-265-r10-libdir.patch | 31 +++++ sys-auth/nss_ldap/nss_ldap-265-r10.ebuild | 148 +++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 sys-auth/nss_ldap/files/nss_ldap-265-r10-libdir.patch create mode 100644 sys-auth/nss_ldap/nss_ldap-265-r10.ebuild (limited to 'sys-auth') diff --git a/sys-auth/nss_ldap/files/nss_ldap-265-r10-libdir.patch b/sys-auth/nss_ldap/files/nss_ldap-265-r10-libdir.patch new file mode 100644 index 000000000000..6fdf4cc6c08e --- /dev/null +++ b/sys-auth/nss_ldap/files/nss_ldap-265-r10-libdir.patch @@ -0,0 +1,31 @@ +--- a/Makefile.am ++++ b/Makefile.am +@@ -38,17 +38,13 @@ + DEFS = @DEFS@ + #INCLUDES = -I$(top_builddir) -I$(srcdir) + +-if GCC +-MULTI_OS_DIRECTORY=$(shell $(CC) $(CFLAGS) -print-multi-os-directory) +-else + MULTI_OS_DIRECTORY=. +-endif + + if GLIBC +-LIBC_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed -e 's|.*libc-\(.*\)\.so|\1|') ++LIBC_VERS = $(shell ls @GENTOO_PORTAGE_EPREFIX@/$(LIBDIR_UNPREFIXED)/$(MULTI_OS_DIRECTORY)/libc-*.so | tail -n 1 | sed -e 's|.*libc-\(.*\)\.so|\1|') + NSS_LDAP_LIBC_VERSIONED = libnss_ldap-$(LIBC_VERS).so + +-NSS_VERS = $(shell ls /lib/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|') ++NSS_VERS = $(shell ls @GENTOO_PORTAGE_EPREFIX@/$(LIBDIR_UNPREFIXED)/$(MULTI_OS_DIRECTORY)/libnss_files.so.? | tail -n 1 | sed -e 's|.*libnss_files\.so\.\(.*\)|\1|') + NSS_LDAP_NSS_VERSIONED = libnss_ldap.so.$(NSS_VERS) + endif + +@@ -83,8 +79,6 @@ + $(mkinstalldirs) $(DESTDIR)$(libdir) + $(INSTALL_PROGRAM) -o $(INST_UID) -g $(INST_GID) nss_ldap.so $(DESTDIR)$(libdir)/$(NSS_LDAP_LIBC_VERSIONED) + (cd $(DESTDIR)$(libdir); ln -sf $(NSS_LDAP_LIBC_VERSIONED) $(NSS_LDAP_NSS_VERSIONED)) +- $(mkinstalldirs) $(DESTDIR)/usr$(libdir) +- (cd $(DESTDIR)/usr$(libdir); ln -sf ../..$(libdir)/$(NSS_LDAP_NSS_VERSIONED) .) + else + $(mkinstalldirs) $(DESTDIR)$(libdir) + if HPUX diff --git a/sys-auth/nss_ldap/nss_ldap-265-r10.ebuild b/sys-auth/nss_ldap/nss_ldap-265-r10.ebuild new file mode 100644 index 000000000000..c066b1fceb52 --- /dev/null +++ b/sys-auth/nss_ldap/nss_ldap-265-r10.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools fixheadtails multilib-minimal prefix + +DESCRIPTION="NSS LDAP Module" +HOMEPAGE="http://www.padl.com/OSS/nss_ldap.html" +SRC_URI="http://www.padl.com/download/${P}.tar.gz" + +SLOT="0" +LICENSE="LGPL-2" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux" +IUSE="debug kerberos ssl sasl split-usr" + +DEPEND=" + >=net-nds/openldap-2.4.38-r1[${MULTILIB_USEDEP}] + sasl? ( >=dev-libs/cyrus-sasl-2.1.26-r3[${MULTILIB_USEDEP}] ) + kerberos? ( >=virtual/krb5-0-r1[${MULTILIB_USEDEP}] ) + ssl? ( >=dev-libs/openssl-1.0.1h-r2:0[${MULTILIB_USEDEP}] ) +" +RDEPEND=" + ${DEPEND} + !>"${ED}"/etc/ldap.conf || die + echo >>"${ED}"/etc/ldap.conf || die + sed -i "${ED}"/etc/ldap.conf \ + -e '$inss_initgroups_ignoreusers ldap,openldap,mysql,syslog,root,postgres' \ + || die + + dodoc ldap.conf ANNOUNCE NEWS ChangeLog AUTHORS \ + CVSVersionInfo.txt README nsswitch.ldap certutil + + docinto docs + dodoc -r doc/. +} + +pkg_postinst() { + elog "If you use a ldaps:// string in the 'uri' setting of" + elog "your /etc/ldap.conf, you must set 'ssl on'!" +} -- cgit v1.2.3-65-gdbad