1 |
tetromino 12/01/10 20:29:13 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: libxml2-2.7.8-r4.ebuild |
5 |
Log: |
6 |
Fix heap-based overflow in parsing long entity references (CVE-2011-3919, bug #398361, thanks to Agostino Sarubbo for reporting). |
7 |
|
8 |
(Portage version: 2.2.0_alpha84/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.322 dev-libs/libxml2/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/ChangeLog?rev=1.322&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/ChangeLog?rev=1.322&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/ChangeLog?r1=1.321&r2=1.322 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v |
20 |
retrieving revision 1.321 |
21 |
retrieving revision 1.322 |
22 |
diff -u -r1.321 -r1.322 |
23 |
--- ChangeLog 30 Oct 2011 15:13:37 -0000 1.321 |
24 |
+++ ChangeLog 10 Jan 2012 20:29:13 -0000 1.322 |
25 |
@@ -1,6 +1,14 @@ |
26 |
# ChangeLog for dev-libs/libxml2 |
27 |
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.321 2011/10/30 15:13:37 armin76 Exp $ |
29 |
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 |
30 |
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/ChangeLog,v 1.322 2012/01/10 20:29:13 tetromino Exp $ |
31 |
+ |
32 |
+*libxml2-2.7.8-r4 (10 Jan 2012) |
33 |
+ |
34 |
+ 10 Jan 2012; Alexandre Rostovtsev <tetromino@g.o> |
35 |
+ +libxml2-2.7.8-r4.ebuild, |
36 |
+ +files/libxml2-2.7.8-allocation-error-copying-entities.patch: |
37 |
+ Fix heap-based overflow in parsing long entity references (CVE-2011-3919, bug |
38 |
+ #398361, thanks to Agostino Sarubbo for reporting). |
39 |
|
40 |
30 Oct 2011; Raúl Porcel <armin76@g.o> libxml2-2.7.8-r3.ebuild: |
41 |
alpha/ia64/m68k/s390/sh/sparc stable wrt #385699 |
42 |
|
43 |
|
44 |
|
45 |
1.1 dev-libs/libxml2/libxml2-2.7.8-r4.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8-r4.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8-r4.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: libxml2-2.7.8-r4.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2012 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/dev-libs/libxml2/libxml2-2.7.8-r4.ebuild,v 1.1 2012/01/10 20:29:13 tetromino Exp $ |
55 |
|
56 |
EAPI="3" |
57 |
PYTHON_DEPEND="python? 2" |
58 |
PYTHON_USE_WITH="-build xml" |
59 |
PYTHON_USE_WITH_OPT="python" |
60 |
SUPPORT_PYTHON_ABIS="1" |
61 |
RESTRICT_PYTHON_ABIS="3.* *-jython" |
62 |
|
63 |
inherit libtool flag-o-matic eutils python autotools prefix |
64 |
|
65 |
DESCRIPTION="Version 2 of the library to manipulate XML files" |
66 |
HOMEPAGE="http://www.xmlsoft.org/" |
67 |
|
68 |
LICENSE="MIT" |
69 |
SLOT="2" |
70 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt" |
71 |
IUSE="debug doc examples icu ipv6 python readline static-libs test" |
72 |
|
73 |
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite" |
74 |
XSTS_NAME_1="xmlschema2002-01-16" |
75 |
XSTS_NAME_2="xmlschema2004-01-14" |
76 |
XSTS_TARBALL_1="xsts-2002-01-16.tar.gz" |
77 |
XSTS_TARBALL_2="xsts-2004-01-14.tar.gz" |
78 |
|
79 |
SRC_URI="ftp://xmlsoft.org/${PN}/${P}.tar.gz |
80 |
test? ( |
81 |
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1} |
82 |
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2} )" |
83 |
|
84 |
RDEPEND="sys-libs/zlib |
85 |
icu? ( dev-libs/icu ) |
86 |
readline? ( sys-libs/readline )" |
87 |
|
88 |
DEPEND="${RDEPEND} |
89 |
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )" |
90 |
|
91 |
pkg_setup() { |
92 |
if use python; then |
93 |
python_pkg_setup |
94 |
fi |
95 |
} |
96 |
|
97 |
src_unpack() { |
98 |
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR, |
99 |
# as they are needed as tarballs in ${S}/xstc instead and not unpacked |
100 |
unpack ${P}.tar.gz |
101 |
cd "${S}" |
102 |
|
103 |
if use test; then |
104 |
cp "${DISTDIR}/${XSTS_TARBALL_1}" \ |
105 |
"${DISTDIR}/${XSTS_TARBALL_2}" \ |
106 |
"${S}"/xstc/ \ |
107 |
|| die "Failed to install test tarballs" |
108 |
fi |
109 |
} |
110 |
|
111 |
src_prepare() { |
112 |
# Patches needed for prefix support |
113 |
epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch |
114 |
epatch "${FILESDIR}"/${PN}-2.7.2-winnt.patch |
115 |
|
116 |
eprefixify catalog.c xmlcatalog.c runtest.c xmllint.c |
117 |
|
118 |
epunt_cxx |
119 |
|
120 |
# Reactivate the shared library versionning script |
121 |
epatch "${FILESDIR}/${P}-reactivate-script.patch" |
122 |
|
123 |
# Fix a potential memory access error |
124 |
epatch "${FILESDIR}/${P}-xpath-memory.patch" |
125 |
|
126 |
# Fix a potential freeing error in XPath |
127 |
epatch "${FILESDIR}/${P}-xpath-freeing.patch" |
128 |
epatch "${FILESDIR}/${P}-xpath-freeing2.patch" |
129 |
|
130 |
# Fix some potential problems on reallocation failures |
131 |
epatch "${FILESDIR}/${P}-reallocation-failures.patch" |
132 |
|
133 |
epatch "${FILESDIR}/${P}-disable_static_modules.patch" |
134 |
|
135 |
# Hardening of XPath evaluation |
136 |
epatch "${FILESDIR}/${P}-hardening-xpath.patch" |
137 |
|
138 |
# Fix missing error status in XPath evaluation |
139 |
epatch "${FILESDIR}/${P}-error-xpath.patch" |
140 |
|
141 |
# Heap-based overflow in parsing long entity references |
142 |
epatch "${FILESDIR}/${P}-allocation-error-copying-entities.patch" |
143 |
|
144 |
# Please do not remove, as else we get references to PORTAGE_TMPDIR |
145 |
# in /usr/lib/python?.?/site-packages/libxml2mod.la among things. |
146 |
# We now need to run eautoreconf at the end to prevent maintainer mode. |
147 |
# elibtoolize |
148 |
|
149 |
# Python bindings are built/tested/installed manually. |
150 |
sed -e "s/@PYTHON_SUBDIR@//" -i Makefile.am || die "sed failed" |
151 |
|
152 |
eautoreconf |
153 |
} |
154 |
|
155 |
src_configure() { |
156 |
# USE zlib support breaks gnome2 |
157 |
# (libgnomeprint for instance fails to compile with |
158 |
# fresh install, and existing) - <azarah@g.o> (22 Dec 2002). |
159 |
|
160 |
# The meaning of the 'debug' USE flag does not apply to the --with-debug |
161 |
# switch (enabling the libxml2 debug module). See bug #100898. |
162 |
|
163 |
# --with-mem-debug causes unusual segmentation faults (bug #105120). |
164 |
|
165 |
local myconf="--with-html-subdir=${PF}/html |
166 |
--docdir=${EPREFIX}/usr/share/doc/${PF} |
167 |
$(use_with debug run-debug) |
168 |
$(use_with icu) |
169 |
$(use_with python) |
170 |
$(use_with readline) |
171 |
$(use_with readline history) |
172 |
$(use_enable ipv6) |
173 |
$(use_enable static-libs static)" |
174 |
|
175 |
# filter seemingly problematic CFLAGS (#26320) |
176 |
filter-flags -fprefetch-loop-arrays -funroll-loops |
177 |
|
178 |
econf ${myconf} |
179 |
} |
180 |
|
181 |
src_compile() { |
182 |
default |
183 |
|
184 |
if use python; then |
185 |
python_copy_sources python |
186 |
building() { |
187 |
emake PYTHON_INCLUDES="${EPREFIX}$(python_get_includedir)" \ |
188 |
PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" |
189 |
} |
190 |
python_execute_function -s --source-dir python building |
191 |
fi |
192 |
} |
193 |
|
194 |
src_test() { |
195 |
default |
196 |
|
197 |
if use python; then |
198 |
testing() { |
199 |
emake test |
200 |
} |
201 |
python_execute_function -s --source-dir python testing |
202 |
fi |
203 |
} |
204 |
|
205 |
src_install() { |
206 |
emake DESTDIR="${D}" \ |
207 |
EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples \ |
208 |
install || die "Installation failed" |
209 |
|
210 |
# on windows, xmllint is installed by interix libxml2 in parent prefix. |
211 |
# this is the version to use. the native winnt version does not support |
212 |
# symlinks, which makes repoman fail if the portage tree is linked in |
213 |
# from another location (which is my default). -- mduft |
214 |
if [[ ${CHOST} == *-winnt* ]]; then |
215 |
rm -rf "${ED}"/usr/bin/xmllint |
216 |
rm -rf "${ED}"/usr/bin/xmlcatalog |
217 |
fi |
218 |
|
219 |
if use python; then |
220 |
installation() { |
221 |
emake DESTDIR="${D}" \ |
222 |
PYTHON_SITE_PACKAGES="${EPREFIX}$(python_get_sitedir)" \ |
223 |
docsdir="${EPREFIX}"/usr/share/doc/${PF}/python \ |
224 |
exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples \ |
225 |
install |
226 |
} |
227 |
python_execute_function -s --source-dir python installation |
228 |
|
229 |
python_clean_installation_image |
230 |
fi |
231 |
|
232 |
rm -rf "${ED}"/usr/share/doc/${P} |
233 |
dodoc AUTHORS ChangeLog Copyright NEWS README* TODO* || die "dodoc failed" |
234 |
|
235 |
if ! use python; then |
236 |
rm -rf "${ED}"/usr/share/doc/${PF}/python |
237 |
rm -rf "${ED}"/usr/share/doc/${PN}-python-${PV} |
238 |
fi |
239 |
|
240 |
if ! use doc; then |
241 |
rm -rf "${ED}"/usr/share/gtk-doc |
242 |
rm -rf "${ED}"/usr/share/doc/${PF}/html |
243 |
fi |
244 |
|
245 |
if ! use examples; then |
246 |
rm -rf "${ED}/usr/share/doc/${PF}/examples" |
247 |
rm -rf "${ED}/usr/share/doc/${PF}/python/examples" |
248 |
fi |
249 |
|
250 |
if ! use static-libs; then |
251 |
# Remove useless .la files |
252 |
find "${D}" -name '*.la' -exec rm -f {} + || die "la file removal failed" |
253 |
fi |
254 |
} |
255 |
|
256 |
pkg_postinst() { |
257 |
if use python; then |
258 |
python_mod_optimize drv_libxml2.py libxml2.py |
259 |
fi |
260 |
|
261 |
# We don't want to do the xmlcatalog during stage1, as xmlcatalog will not |
262 |
# be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887. |
263 |
if [ "${ROOT}" != "/" ] |
264 |
then |
265 |
elog "Skipping XML catalog creation for stage building (bug #208887)." |
266 |
else |
267 |
# need an XML catalog, so no-one writes to a non-existent one |
268 |
CATALOG="${EROOT}etc/xml/catalog" |
269 |
|
270 |
# we dont want to clobber an existing catalog though, |
271 |
# only ensure that one is there |
272 |
# <obz@g.o> |
273 |
if [ ! -e ${CATALOG} ]; then |
274 |
[ -d "${EROOT}etc/xml" ] || mkdir -p "${EROOT}etc/xml" |
275 |
"${EPREFIX}"/usr/bin/xmlcatalog --create > ${CATALOG} |
276 |
einfo "Created XML catalog in ${CATALOG}" |
277 |
fi |
278 |
fi |
279 |
} |
280 |
|
281 |
pkg_postrm() { |
282 |
if use python; then |
283 |
python_mod_cleanup drv_libxml2.py libxml2.py |
284 |
fi |
285 |
} |