commit: fb8fbfe2f28e7ce11892e6bc27840c1cf48519f9 Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> AuthorDate: Mon Mar 6 19:23:12 2017 +0000 Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> CommitDate: Mon Mar 6 19:25:38 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb8fbfe2
sys-auth/pam_p11: avoid using ldscript fix build Bug: 611874 Package-Manager: Portage-2.3.3, Repoman-2.3.1 sys-auth/pam_p11/files/pam_p11-0.1.5-build.patch | 41 ++++++++++++++++++++++++ sys-auth/pam_p11/pam_p11-0.1.5-r2.ebuild | 17 ++++------ 2 files changed, 48 insertions(+), 10 deletions(-) diff --git a/sys-auth/pam_p11/files/pam_p11-0.1.5-build.patch b/sys-auth/pam_p11/files/pam_p11-0.1.5-build.patch new file mode 100644 index 00000000000..5ca0b76d5e5 --- /dev/null +++ b/sys-auth/pam_p11/files/pam_p11-0.1.5-build.patch @@ -0,0 +1,41 @@ +From 8d09661398f14102703e19418f15e9cf3f3707d1 Mon Sep 17 00:00:00 2001 +From: Alon Bar-Lev <[email protected]> +Date: Mon, 6 Mar 2017 21:19:15 +0200 +Subject: [PATCH] build: export only needed symbols + +Signed-off-by: Alon Bar-Lev <[email protected]> +--- + src/Makefile.am | 3 ++- + src/pam_p11.exports | 6 ++++++ + 2 files changed, 8 insertions(+), 1 deletion(-) + create mode 100644 src/pam_p11.exports + +diff --git a/src/Makefile.am b/src/Makefile.am +index 8bfb0bd..83a3e3d 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -3,7 +3,8 @@ + MAINTAINERCLEANFILES = Makefile.in + + AM_CFLAGS = -Wall -fno-strict-aliasing $(OPENSSL_CFLAGS) $(LIBP11_CFLAGS) +-AM_LDFLAGS = -module -avoid-version ++AM_LDFLAGS = -module -avoid-version -shared -no-undefined \ ++ -export-symbols "$(srcdir)/pam_p11.exports" + + lib_LTLIBRARIES = pam_p11_openssh.la pam_p11_opensc.la + +diff --git a/src/pam_p11.exports b/src/pam_p11.exports +new file mode 100644 +index 0000000..416cde1 +--- /dev/null ++++ b/src/pam_p11.exports +@@ -0,0 +1,6 @@ ++pam_sm_authenticate ++pam_sm_setcred ++pam_sm_acct_mgmt ++pam_sm_open_session ++pam_sm_close_session ++pam_sm_chauthtok +-- +2.10.2 + diff --git a/sys-auth/pam_p11/pam_p11-0.1.5-r2.ebuild b/sys-auth/pam_p11/pam_p11-0.1.5-r2.ebuild index 45058fdce0e..8e7e780a8cc 100644 --- a/sys-auth/pam_p11/pam_p11-0.1.5-r2.ebuild +++ b/sys-auth/pam_p11/pam_p11-0.1.5-r2.ebuild @@ -3,7 +3,7 @@ EAPI=6 -inherit pam flag-o-matic +inherit autotools pam flag-o-matic DESCRIPTION="PAM module for authenticating against PKCS#11 tokens" HOMEPAGE="https://github.com/opensc/pam_p11/wiki" @@ -20,16 +20,13 @@ RDEPEND="virtual/pam DEPEND="${RDEPEND} virtual/pkgconfig" -src_configure() { - # hide all the otherwise-exported symbols that may clash with - # other software loading the PAM modules (see bug #274924 as an - # example). - append-ldflags -Wl,--version-script="${FILESDIR}"/pam_symbols.ver +PATCHES=( + "${FILESDIR}/${P}-build.patch" +) - econf \ - --disable-static \ - --enable-fast-install \ - || die +src_prepare() { + default + eautoreconf } src_install() {
