1 |
commit: 0e5f4be65afbd78b427fde3116ad74057e3297a4 |
2 |
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Feb 2 20:07:03 2019 +0000 |
4 |
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Feb 2 20:07:03 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0e5f4be6 |
7 |
|
8 |
sys-devel/autogen: fix RPATH poisoning, bug #676692 |
9 |
|
10 |
autogen sets '-no-install' on installed binaries: |
11 |
autogen_LDFLAGS = ... -no-install |
12 |
columns_LDFLAGS = -no-install |
13 |
getdefs_LDFLAGS = -no-install |
14 |
|
15 |
Reported-by: Progenyx |
16 |
Closes: https://bugs.gentoo.org/676692 |
17 |
Package-Manager: Portage-2.3.59, Repoman-2.3.12 |
18 |
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org> |
19 |
|
20 |
sys-devel/autogen/autogen-5.18.16-r1.ebuild | 56 +++++++++++++++ |
21 |
.../autogen/files/autogen-5.18.16-rpath.patch | 80 ++++++++++++++++++++++ |
22 |
2 files changed, 136 insertions(+) |
23 |
|
24 |
diff --git a/sys-devel/autogen/autogen-5.18.16-r1.ebuild b/sys-devel/autogen/autogen-5.18.16-r1.ebuild |
25 |
new file mode 100644 |
26 |
index 00000000000..b45f7a1bc1a |
27 |
--- /dev/null |
28 |
+++ b/sys-devel/autogen/autogen-5.18.16-r1.ebuild |
29 |
@@ -0,0 +1,56 @@ |
30 |
+# Copyright 1999-2019 Gentoo Authors |
31 |
+# Distributed under the terms of the GNU General Public License v2 |
32 |
+ |
33 |
+EAPI=7 |
34 |
+ |
35 |
+inherit toolchain-funcs |
36 |
+ |
37 |
+DESCRIPTION="Program and text file generation" |
38 |
+HOMEPAGE="https://www.gnu.org/software/autogen/" |
39 |
+SRC_URI="mirror://gnu/${PN}/rel${PV}/${P}.tar.xz |
40 |
+ https://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob_plain;f=lib/verify.h;h=3b57ddee0acffd23cc51bc8910a15cf879f90619;hb=537a5511ab0b1326e69b32f87593a50aedb8a589 -> ${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h" |
41 |
+ |
42 |
+LICENSE="GPL-2" |
43 |
+SLOT="0" |
44 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos ~x86-macos" |
45 |
+IUSE="libopts static-libs" |
46 |
+ |
47 |
+RDEPEND=">=dev-scheme/guile-2.0:= |
48 |
+ dev-libs/libxml2" |
49 |
+DEPEND="${RDEPEND}" |
50 |
+ |
51 |
+PATCHES=( |
52 |
+ "${FILESDIR}"/${PN}-5.18.16-no-werror.patch |
53 |
+ "${FILESDIR}"/${PN}-5.18.16-rpath.patch |
54 |
+) |
55 |
+ |
56 |
+src_prepare() { |
57 |
+ # no-werror.patch fixes both configure{.ac,} |
58 |
+ # avoid configure echeck |
59 |
+ touch -r configure.ac orig.configure.ac || die |
60 |
+ touch -r configure orig.configure || die |
61 |
+ |
62 |
+ default |
63 |
+ |
64 |
+ touch -r orig.configure.ac configure.ac || die |
65 |
+ touch -r orig.configure configure || die |
66 |
+ |
67 |
+ # missing tarball file |
68 |
+ cp "${DISTDIR}"/${P}-gnulib-3b57ddee0acffd23cc51bc8910a15cf879f90619-lib-verify.h autoopts/verify.h || die |
69 |
+} |
70 |
+ |
71 |
+src_configure() { |
72 |
+ # suppress possibly incorrect -R flag |
73 |
+ export ag_cv_test_ldflags= |
74 |
+ |
75 |
+ econf $(use_enable static-libs static) |
76 |
+} |
77 |
+ |
78 |
+src_install() { |
79 |
+ default |
80 |
+ find "${D}" -name '*.la' -delete || die |
81 |
+ |
82 |
+ if ! use libopts ; then |
83 |
+ rm "${ED}"/usr/share/autogen/libopts-*.tar.gz || die |
84 |
+ fi |
85 |
+} |
86 |
|
87 |
diff --git a/sys-devel/autogen/files/autogen-5.18.16-rpath.patch b/sys-devel/autogen/files/autogen-5.18.16-rpath.patch |
88 |
new file mode 100644 |
89 |
index 00000000000..8d2019121eb |
90 |
--- /dev/null |
91 |
+++ b/sys-devel/autogen/files/autogen-5.18.16-rpath.patch |
92 |
@@ -0,0 +1,80 @@ |
93 |
+https://bugs.gentoo.org/676692 |
94 |
+ |
95 |
+'make install' actually installs 'getdefs', 'columns', 'autogen' |
96 |
+and gentoo's 'scanelf' QA checker tool detects it as: |
97 |
+ |
98 |
+ * QA Notice: The following files contain insecure RUNPATHs |
99 |
+ * Please file a bug about this at https://bugs.gentoo.org/ |
100 |
+ * with the maintainer of the package. |
101 |
+ * /tmp/portage/sys-devel/autogen-5.18.16/image/usr/bin/getdefs |
102 |
+ * RPATH: /tmp/portage/sys-devel/autogen-5.18.16/work/autogen-5.18.16/autoopts/.libs |
103 |
+ * /tmp/portage/sys-devel/autogen-5.18.16/image/usr/bin/columns |
104 |
+ * RPATH: /tmp/portage/sys-devel/autogen-5.18.16/work/autogen-5.18.16/autoopts/.libs |
105 |
+ * /tmp/portage/sys-devel/autogen-5.18.16/image/usr/bin/autogen |
106 |
+ * RPATH: /tmp/portage/sys-devel/autogen-5.18.16/work/autogen-5.18.16/autoopts/.libs |
107 |
+--- a/agen5/Makefile.am |
108 |
++++ b/agen5/Makefile.am |
109 |
+@@ -63,7 +63,7 @@ SNV_LIB = $(top_builddir)/snprintfv/libsnprintfv.la |
110 |
+ nodist_autogen_SOURCES = ag.c |
111 |
+ autogen_SOURCES = $(gen_csrc) |
112 |
+ autogen_LDADD = $(LO_LIB) $(SNV_LIB) $(GUILE_LIBS) |
113 |
+-autogen_LDFLAGS = $(DYNAMIC_AG) $(AG_STATIC_AUTOGEN) -no-install |
114 |
++autogen_LDFLAGS = $(DYNAMIC_AG) $(AG_STATIC_AUTOGEN) |
115 |
+ autogen_CFLAGS = $(GUILE_CFLAGS) |
116 |
+ stamp_script = $(srcdir)/mk-stamps.sh |
117 |
+ |
118 |
+--- a/agen5/Makefile.in |
119 |
++++ b/agen5/Makefile.in |
120 |
+@@ -482,7 +482,7 @@ SNV_LIB = $(top_builddir)/snprintfv/libsnprintfv.la |
121 |
+ nodist_autogen_SOURCES = ag.c |
122 |
+ autogen_SOURCES = $(gen_csrc) |
123 |
+ autogen_LDADD = $(LO_LIB) $(SNV_LIB) $(GUILE_LIBS) |
124 |
+-autogen_LDFLAGS = $(DYNAMIC_AG) $(AG_STATIC_AUTOGEN) -no-install |
125 |
++autogen_LDFLAGS = $(DYNAMIC_AG) $(AG_STATIC_AUTOGEN) |
126 |
+ autogen_CFLAGS = $(GUILE_CFLAGS) |
127 |
+ stamp_script = $(srcdir)/mk-stamps.sh |
128 |
+ AM_YFLAGS = -d |
129 |
+--- a/columns/Makefile.am |
130 |
++++ b/columns/Makefile.am |
131 |
+@@ -20,7 +20,7 @@ |
132 |
+ ## with this program. If not, see <http://www.gnu.org/licenses/>. |
133 |
+ |
134 |
+ bin_PROGRAMS = columns |
135 |
+-columns_LDFLAGS = -no-install |
136 |
++#columns_LDFLAGS = -no-install |
137 |
+ csrc = opts.h columns.c opts.c |
138 |
+ nodist_columns_SOURCES = cols.c |
139 |
+ |
140 |
+--- a/columns/Makefile.in |
141 |
++++ b/columns/Makefile.in |
142 |
+@@ -389,7 +389,7 @@ target_vendor = @target_vendor@ |
143 |
+ top_build_prefix = @top_build_prefix@ |
144 |
+ top_builddir = @top_builddir@ |
145 |
+ top_srcdir = @top_srcdir@ |
146 |
+-columns_LDFLAGS = -no-install |
147 |
++#columns_LDFLAGS = -no-install |
148 |
+ csrc = opts.h columns.c opts.c |
149 |
+ nodist_columns_SOURCES = cols.c |
150 |
+ LO_LIB = $(top_builddir)/autoopts/libopts.la |
151 |
+--- a/getdefs/Makefile.am |
152 |
++++ b/getdefs/Makefile.am |
153 |
+@@ -23,7 +23,7 @@ |
154 |
+ TARG = getdefs |
155 |
+ |
156 |
+ bin_PROGRAMS = getdefs |
157 |
+-getdefs_LDFLAGS = -no-install |
158 |
++#getdefs_LDFLAGS = -no-install |
159 |
+ gdsrcs = getdefs.h proto.h gdemit.c gdinit.c getdefs.c |
160 |
+ getdefs_SOURCES = proto.h |
161 |
+ BUILT_SOURCES = gd.c |
162 |
+--- a/getdefs/Makefile.in |
163 |
++++ b/getdefs/Makefile.in |
164 |
+@@ -434,7 +434,7 @@ top_build_prefix = @top_build_prefix@ |
165 |
+ top_builddir = @top_builddir@ |
166 |
+ top_srcdir = @top_srcdir@ |
167 |
+ TARG = getdefs |
168 |
+-getdefs_LDFLAGS = -no-install |
169 |
++#getdefs_LDFLAGS = -no-install |
170 |
+ gdsrcs = getdefs.h proto.h gdemit.c gdinit.c getdefs.c |
171 |
+ getdefs_SOURCES = proto.h |
172 |
+ BUILT_SOURCES = gd.c |