1 |
commit: fb8fbfe2f28e7ce11892e6bc27840c1cf48519f9 |
2 |
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Mar 6 19:23:12 2017 +0000 |
4 |
Commit: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Mar 6 19:25:38 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb8fbfe2 |
7 |
|
8 |
sys-auth/pam_p11: avoid using ldscript fix build |
9 |
|
10 |
Bug: 611874 |
11 |
|
12 |
Package-Manager: Portage-2.3.3, Repoman-2.3.1 |
13 |
|
14 |
sys-auth/pam_p11/files/pam_p11-0.1.5-build.patch | 41 ++++++++++++++++++++++++ |
15 |
sys-auth/pam_p11/pam_p11-0.1.5-r2.ebuild | 17 ++++------ |
16 |
2 files changed, 48 insertions(+), 10 deletions(-) |
17 |
|
18 |
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 |
19 |
new file mode 100644 |
20 |
index 00000000000..5ca0b76d5e5 |
21 |
--- /dev/null |
22 |
+++ b/sys-auth/pam_p11/files/pam_p11-0.1.5-build.patch |
23 |
@@ -0,0 +1,41 @@ |
24 |
+From 8d09661398f14102703e19418f15e9cf3f3707d1 Mon Sep 17 00:00:00 2001 |
25 |
+From: Alon Bar-Lev <alon.barlev@×××××.com> |
26 |
+Date: Mon, 6 Mar 2017 21:19:15 +0200 |
27 |
+Subject: [PATCH] build: export only needed symbols |
28 |
+ |
29 |
+Signed-off-by: Alon Bar-Lev <alon.barlev@×××××.com> |
30 |
+--- |
31 |
+ src/Makefile.am | 3 ++- |
32 |
+ src/pam_p11.exports | 6 ++++++ |
33 |
+ 2 files changed, 8 insertions(+), 1 deletion(-) |
34 |
+ create mode 100644 src/pam_p11.exports |
35 |
+ |
36 |
+diff --git a/src/Makefile.am b/src/Makefile.am |
37 |
+index 8bfb0bd..83a3e3d 100644 |
38 |
+--- a/src/Makefile.am |
39 |
++++ b/src/Makefile.am |
40 |
+@@ -3,7 +3,8 @@ |
41 |
+ MAINTAINERCLEANFILES = Makefile.in |
42 |
+ |
43 |
+ AM_CFLAGS = -Wall -fno-strict-aliasing $(OPENSSL_CFLAGS) $(LIBP11_CFLAGS) |
44 |
+-AM_LDFLAGS = -module -avoid-version |
45 |
++AM_LDFLAGS = -module -avoid-version -shared -no-undefined \ |
46 |
++ -export-symbols "$(srcdir)/pam_p11.exports" |
47 |
+ |
48 |
+ lib_LTLIBRARIES = pam_p11_openssh.la pam_p11_opensc.la |
49 |
+ |
50 |
+diff --git a/src/pam_p11.exports b/src/pam_p11.exports |
51 |
+new file mode 100644 |
52 |
+index 0000000..416cde1 |
53 |
+--- /dev/null |
54 |
++++ b/src/pam_p11.exports |
55 |
+@@ -0,0 +1,6 @@ |
56 |
++pam_sm_authenticate |
57 |
++pam_sm_setcred |
58 |
++pam_sm_acct_mgmt |
59 |
++pam_sm_open_session |
60 |
++pam_sm_close_session |
61 |
++pam_sm_chauthtok |
62 |
+-- |
63 |
+2.10.2 |
64 |
+ |
65 |
|
66 |
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 |
67 |
index 45058fdce0e..8e7e780a8cc 100644 |
68 |
--- a/sys-auth/pam_p11/pam_p11-0.1.5-r2.ebuild |
69 |
+++ b/sys-auth/pam_p11/pam_p11-0.1.5-r2.ebuild |
70 |
@@ -3,7 +3,7 @@ |
71 |
|
72 |
EAPI=6 |
73 |
|
74 |
-inherit pam flag-o-matic |
75 |
+inherit autotools pam flag-o-matic |
76 |
|
77 |
DESCRIPTION="PAM module for authenticating against PKCS#11 tokens" |
78 |
HOMEPAGE="https://github.com/opensc/pam_p11/wiki" |
79 |
@@ -20,16 +20,13 @@ RDEPEND="virtual/pam |
80 |
DEPEND="${RDEPEND} |
81 |
virtual/pkgconfig" |
82 |
|
83 |
-src_configure() { |
84 |
- # hide all the otherwise-exported symbols that may clash with |
85 |
- # other software loading the PAM modules (see bug #274924 as an |
86 |
- # example). |
87 |
- append-ldflags -Wl,--version-script="${FILESDIR}"/pam_symbols.ver |
88 |
+PATCHES=( |
89 |
+ "${FILESDIR}/${P}-build.patch" |
90 |
+) |
91 |
|
92 |
- econf \ |
93 |
- --disable-static \ |
94 |
- --enable-fast-install \ |
95 |
- || die |
96 |
+src_prepare() { |
97 |
+ default |
98 |
+ eautoreconf |
99 |
} |
100 |
|
101 |
src_install() { |