* [gentoo-commits] repo/gentoo:master commit in: dev-libs/expat/, dev-libs/expat/files/
@ 2016-06-13 14:34 Sebastian Pipping
0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Pipping @ 2016-06-13 14:34 UTC (permalink / raw
To: gentoo-commits
commit: 04f12ff7fde845e4fc896786719fbd6a2e727666
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Mon Jun 13 14:32:09 2016 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Mon Jun 13 14:34:40 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=04f12ff7
dev-libs/expat: CVE-2012-6702 + CVE-2016-5300 (bug #577928)
Package-Manager: portage-2.2.28
dev-libs/expat/expat-2.1.1-r2.ebuild | 97 +++++++++++++++
...2.1.1-CVE-2012-6702-plus-CVE-2016-5300-v1.patch | 134 +++++++++++++++++++++
2 files changed, 231 insertions(+)
diff --git a/dev-libs/expat/expat-2.1.1-r2.ebuild b/dev-libs/expat/expat-2.1.1-r2.ebuild
new file mode 100644
index 0000000..93c6fa5
--- /dev/null
+++ b/dev-libs/expat/expat-2.1.1-r2.ebuild
@@ -0,0 +1,97 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit eutils libtool multilib toolchain-funcs multilib-minimal
+
+DESCRIPTION="Stream-oriented XML parser library"
+HOMEPAGE="http://expat.sourceforge.net/"
+SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
+IUSE="elibc_FreeBSD examples static-libs unicode"
+RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
+
+src_prepare() {
+ # https://bugs.gentoo.org/show_bug.cgi?id=583268
+ epatch "${FILESDIR}"/${P}-CVE-2015-1283-refix.patch
+ epatch "${FILESDIR}"/${P}-CVE-2016-0718-v2-2-1.patch
+
+ # https://bugs.gentoo.org/show_bug.cgi?id=577928
+ epatch "${FILESDIR}"/${P}-CVE-2012-6702-plus-CVE-2016-5300-v1.patch
+}
+
+multilib_src_configure() {
+ local myconf="$(use_enable static-libs static)"
+
+ mkdir -p "${BUILD_DIR}"{u,w} || die
+
+ ECONF_SOURCE="${S}" econf ${myconf}
+
+ if use unicode; then
+ pushd "${BUILD_DIR}"u >/dev/null
+ CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}" econf ${myconf}
+ popd >/dev/null
+
+ pushd "${BUILD_DIR}"w >/dev/null
+ CPPFLAGS="${CPPFLAGS} -DXML_UNICODE_WCHAR_T" ECONF_SOURCE="${S}" econf ${myconf}
+ popd >/dev/null
+ fi
+}
+
+multilib_src_compile() {
+ emake
+
+ if use unicode; then
+ pushd "${BUILD_DIR}"u >/dev/null
+ emake buildlib LIBRARY=libexpatu.la
+ popd >/dev/null
+
+ pushd "${BUILD_DIR}"w >/dev/null
+ emake buildlib LIBRARY=libexpatw.la
+ popd >/dev/null
+ fi
+}
+
+multilib_src_install() {
+ emake install DESTDIR="${D}"
+
+ if use unicode; then
+ pushd "${BUILD_DIR}"u >/dev/null
+ emake installlib DESTDIR="${D}" LIBRARY=libexpatu.la
+ popd >/dev/null
+
+ pushd "${BUILD_DIR}"w >/dev/null
+ emake installlib DESTDIR="${D}" LIBRARY=libexpatw.la
+ popd >/dev/null
+
+ pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
+ cp expat.pc expatu.pc
+ sed -i -e '/^Libs/s:-lexpat:&u:' expatu.pc || die
+ cp expat.pc expatw.pc
+ sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
+ popd >/dev/null
+ fi
+
+ if multilib_is_native_abi ; then
+ # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
+ # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
+ use elibc_FreeBSD && gen_usr_ldscript -a expat
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc Changes README
+ dohtml doc/*
+
+ if use examples; then
+ insinto /usr/share/doc/${PF}/examples
+ doins examples/*.c
+ fi
+
+ prune_libtool_files
+}
diff --git a/dev-libs/expat/files/expat-2.1.1-CVE-2012-6702-plus-CVE-2016-5300-v1.patch b/dev-libs/expat/files/expat-2.1.1-CVE-2012-6702-plus-CVE-2016-5300-v1.patch
new file mode 100644
index 0000000..19966f4
--- /dev/null
+++ b/dev-libs/expat/files/expat-2.1.1-CVE-2012-6702-plus-CVE-2016-5300-v1.patch
@@ -0,0 +1,134 @@
+From cb31522769d11a375078a073cba94e7176cb48a4 Mon Sep 17 00:00:00 2001
+From: Sebastian Pipping <sebastian@pipping.org>
+Date: Wed, 16 Mar 2016 15:30:12 +0100
+Subject: [PATCH] Resolve call to srand, use more entropy (patch version 1.0)
+
+Squashed backport against vanilla Expat 2.1.1, addressing:
+* CVE-2012-6702 -- unanticipated internal calls to srand
+* CVE-2016-5300 -- use of too little entropy
+
+Since commit e3e81a6d9f0885ea02d3979151c358f314bf3d6d
+(released with Expat 2.1.0) Expat called srand by itself
+from inside generate_hash_secret_salt for an instance
+of XML_Parser if XML_SetHashSalt was either (a) not called
+for that instance or if (b) salt 0 was passed to XML_SetHashSalt
+prior to parsing. That call to srand passed (rather litle)
+entropy extracted from the current time as a seed for srand.
+
+That call to srand (1) broke repeatability for code calling
+srand with a non-random seed prior to parsing with Expat,
+and (2) resulted in a rather small set of hashing salts in
+Expat in total.
+
+For a short- to mid-term fix, the new approach avoids calling
+srand altogether, extracts more entropy out of the clock and
+other sources, too.
+
+For a long term fix, we may want to read sizeof(long) bytes
+from a source like getrandom(..) on Linux, and from similar
+sources on other supported architectures.
+
+https://bugzilla.redhat.com/show_bug.cgi?id=1197087
+---
+ expat/CMakeLists.txt | 3 +++
+ expat/lib/xmlparse.c | 48 +++++++++++++++++++++++++++++++++++++++++-------
+ 2 files changed, 44 insertions(+), 7 deletions(-)
+
+diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
+index 353627e..524d514 100755
+--- a/expat/CMakeLists.txt
++++ b/expat/CMakeLists.txt
+@@ -41,6 +41,9 @@ include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
+ if(MSVC)
+ add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
+ endif(MSVC)
++if(WIN32)
++ add_definitions(-DCOMPILED_FROM_DSP)
++endif(WIN32)
+
+ set(expat_SRCS
+ lib/xmlparse.c
+diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
+index e308c79..c5f942f 100644
+--- a/expat/lib/xmlparse.c
++++ b/expat/lib/xmlparse.c
+@@ -6,7 +6,14 @@
+ #include <string.h> /* memset(), memcpy() */
+ #include <assert.h>
+ #include <limits.h> /* UINT_MAX */
+-#include <time.h> /* time() */
++
++#ifdef COMPILED_FROM_DSP
++#define getpid GetCurrentProcessId
++#else
++#include <sys/time.h> /* gettimeofday() */
++#include <sys/types.h> /* getpid() */
++#include <unistd.h> /* getpid() */
++#endif
+
+ #define XML_BUILDING_EXPAT 1
+
+@@ -432,7 +439,7 @@ static ELEMENT_TYPE *
+ getElementType(XML_Parser parser, const ENCODING *enc,
+ const char *ptr, const char *end);
+
+-static unsigned long generate_hash_secret_salt(void);
++static unsigned long generate_hash_secret_salt(XML_Parser parser);
+ static XML_Bool startParsing(XML_Parser parser);
+
+ static XML_Parser
+@@ -691,11 +698,38 @@ static const XML_Char implicitContext[] = {
+ };
+
+ static unsigned long
+-generate_hash_secret_salt(void)
++gather_time_entropy(void)
+ {
+- unsigned int seed = time(NULL) % UINT_MAX;
+- srand(seed);
+- return rand();
++#ifdef COMPILED_FROM_DSP
++ FILETIME ft;
++ GetSystemTimeAsFileTime(&ft); /* never fails */
++ return ft.dwHighDateTime ^ ft.dwLowDateTime;
++#else
++ struct timeval tv;
++ int gettimeofday_res;
++
++ gettimeofday_res = gettimeofday(&tv, NULL);
++ assert (gettimeofday_res == 0);
++
++ /* Microseconds time is <20 bits entropy */
++ return tv.tv_usec;
++#endif
++}
++
++static unsigned long
++generate_hash_secret_salt(XML_Parser parser)
++{
++ /* Process ID is 0 bits entropy if attacker has local access
++ * XML_Parser address is few bits of entropy if attacker has local access */
++ const unsigned long entropy =
++ gather_time_entropy() ^ getpid() ^ (unsigned long)parser;
++
++ /* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */
++ if (sizeof(unsigned long) == 4) {
++ return entropy * 2147483647;
++ } else {
++ return entropy * 2305843009213693951;
++ }
+ }
+
+ static XML_Bool /* only valid for root parser */
+@@ -703,7 +737,7 @@ startParsing(XML_Parser parser)
+ {
+ /* hash functions must be initialized before setContext() is called */
+ if (hash_secret_salt == 0)
+- hash_secret_salt = generate_hash_secret_salt();
++ hash_secret_salt = generate_hash_secret_salt(parser);
+ if (ns) {
+ /* implicit context only set for root parser, since child
+ parsers (i.e. external entity parsers) will inherit it
+--
+2.8.2
+
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/expat/, dev-libs/expat/files/
@ 2017-01-10 20:16 Pacho Ramos
0 siblings, 0 replies; 6+ messages in thread
From: Pacho Ramos @ 2017-01-10 20:16 UTC (permalink / raw
To: gentoo-commits
commit: ffd57237856bda7b744782f495cd685360165f28
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 10 20:15:43 2017 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Tue Jan 10 20:15:43 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ffd57237
dev-libs/expat: Drop old
Package-Manager: Portage-2.3.3, Repoman-2.3.1
dev-libs/expat/Manifest | 1 -
dev-libs/expat/expat-2.1.1-r2.ebuild | 97 ---
dev-libs/expat/expat-2.1.1-r3.ebuild | 98 ---
...2.1.1-CVE-2012-6702-plus-CVE-2016-5300-v1.patch | 134 ----
.../files/expat-2.1.1-CVE-2015-1283-refix.patch | 37 -
.../files/expat-2.1.1-CVE-2016-0718-v2-2-1.patch | 755 ---------------------
6 files changed, 1122 deletions(-)
diff --git a/dev-libs/expat/Manifest b/dev-libs/expat/Manifest
index b039f87..d47118d 100644
--- a/dev-libs/expat/Manifest
+++ b/dev-libs/expat/Manifest
@@ -1,2 +1 @@
-DIST expat-2.1.1.tar.bz2 405103 SHA256 aff584e5a2f759dcfc6d48671e9529f6afe1e30b0cd6a4cec200cbe3f793de67 SHA512 088e2ef3434f2affd4fc79fe46f0e9826b9b4c3931ddc780cd18892f1cd1e11365169c6807f45916a56bb6abcc627dcd17a23f970be0bf464f048f5be2713628 WHIRLPOOL d003f427e3e80cd335994190495594d35696205196b1755ff90dcc07fd7cc1c4933f37592e54cdae5420cd91ae326c3b928ef8d5f5cfd84224e1069c51b6a9bb
DIST expat-2.2.0.tar.bz2 414352 SHA256 d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff SHA512 2be1a6eea87b439374bfacb1fbb8e814fd8a085d5dfd3ca3be69d1af29b5dc93d36cbdec5f6843ca6d5910843c7ffbc498adc2a561b9dcece488edf3c6f8c7c8 WHIRLPOOL b1914e2c23170dabab6fce4fb0eb2511dc8dcde8db986a7cdf6b236d262fb756fb0955cb4c1fc7475a1ad3d9c005b632e42850dcf3af66f4cc87fe4ecfc3cb47
diff --git a/dev-libs/expat/expat-2.1.1-r2.ebuild b/dev-libs/expat/expat-2.1.1-r2.ebuild
deleted file mode 100644
index a71db2d..00000000
--- a/dev-libs/expat/expat-2.1.1-r2.ebuild
+++ /dev/null
@@ -1,97 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="http://expat.sourceforge.net/"
-SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-src_prepare() {
- # https://bugs.gentoo.org/show_bug.cgi?id=583268
- epatch "${FILESDIR}"/${P}-CVE-2015-1283-refix.patch
- epatch "${FILESDIR}"/${P}-CVE-2016-0718-v2-2-1.patch
-
- # https://bugs.gentoo.org/show_bug.cgi?id=577928
- epatch "${FILESDIR}"/${P}-CVE-2012-6702-plus-CVE-2016-5300-v1.patch
-}
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static)"
-
- mkdir -p "${BUILD_DIR}"{u,w} || die
-
- ECONF_SOURCE="${S}" econf ${myconf}
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE_WCHAR_T" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- emake buildlib LIBRARY=libexpatu.la
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- emake buildlib LIBRARY=libexpatw.la
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatu.la
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatw.la
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatu.pc
- sed -i -e '/^Libs/s:-lexpat:&u:' expatu.pc || die
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- dodoc Changes README
- dohtml doc/*
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/expat-2.1.1-r3.ebuild b/dev-libs/expat/expat-2.1.1-r3.ebuild
deleted file mode 100644
index cd97f7a..00000000
--- a/dev-libs/expat/expat-2.1.1-r3.ebuild
+++ /dev/null
@@ -1,98 +0,0 @@
-# Copyright 1999-2016 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Id$
-
-EAPI=5
-inherit eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="http://expat.sourceforge.net/"
-SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~arm-linux ~x86-linux"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-src_prepare() {
- # https://bugs.gentoo.org/show_bug.cgi?id=583268
- epatch "${FILESDIR}"/${P}-CVE-2015-1283-refix.patch
- epatch "${FILESDIR}"/${P}-CVE-2016-0718-v2-2-1.patch
- epatch "${FILESDIR}"/${P}-CVE-2016-0718-regression.patch
-
- # https://bugs.gentoo.org/show_bug.cgi?id=577928
- epatch "${FILESDIR}"/${P}-CVE-2012-6702-plus-CVE-2016-5300-v1.patch
-}
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static)"
-
- mkdir -p "${BUILD_DIR}"{u,w} || die
-
- ECONF_SOURCE="${S}" econf ${myconf}
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE_WCHAR_T" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- emake buildlib LIBRARY=libexpatu.la
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- emake buildlib LIBRARY=libexpatw.la
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatu.la
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatw.la
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatu.pc
- sed -i -e '/^Libs/s:-lexpat:&u:' expatu.pc || die
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- dodoc Changes README
- dohtml doc/*
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/files/expat-2.1.1-CVE-2012-6702-plus-CVE-2016-5300-v1.patch b/dev-libs/expat/files/expat-2.1.1-CVE-2012-6702-plus-CVE-2016-5300-v1.patch
deleted file mode 100644
index 19966f4..00000000
--- a/dev-libs/expat/files/expat-2.1.1-CVE-2012-6702-plus-CVE-2016-5300-v1.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From cb31522769d11a375078a073cba94e7176cb48a4 Mon Sep 17 00:00:00 2001
-From: Sebastian Pipping <sebastian@pipping.org>
-Date: Wed, 16 Mar 2016 15:30:12 +0100
-Subject: [PATCH] Resolve call to srand, use more entropy (patch version 1.0)
-
-Squashed backport against vanilla Expat 2.1.1, addressing:
-* CVE-2012-6702 -- unanticipated internal calls to srand
-* CVE-2016-5300 -- use of too little entropy
-
-Since commit e3e81a6d9f0885ea02d3979151c358f314bf3d6d
-(released with Expat 2.1.0) Expat called srand by itself
-from inside generate_hash_secret_salt for an instance
-of XML_Parser if XML_SetHashSalt was either (a) not called
-for that instance or if (b) salt 0 was passed to XML_SetHashSalt
-prior to parsing. That call to srand passed (rather litle)
-entropy extracted from the current time as a seed for srand.
-
-That call to srand (1) broke repeatability for code calling
-srand with a non-random seed prior to parsing with Expat,
-and (2) resulted in a rather small set of hashing salts in
-Expat in total.
-
-For a short- to mid-term fix, the new approach avoids calling
-srand altogether, extracts more entropy out of the clock and
-other sources, too.
-
-For a long term fix, we may want to read sizeof(long) bytes
-from a source like getrandom(..) on Linux, and from similar
-sources on other supported architectures.
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1197087
----
- expat/CMakeLists.txt | 3 +++
- expat/lib/xmlparse.c | 48 +++++++++++++++++++++++++++++++++++++++++-------
- 2 files changed, 44 insertions(+), 7 deletions(-)
-
-diff --git a/expat/CMakeLists.txt b/expat/CMakeLists.txt
-index 353627e..524d514 100755
---- a/expat/CMakeLists.txt
-+++ b/expat/CMakeLists.txt
-@@ -41,6 +41,9 @@ include_directories(${CMAKE_BINARY_DIR} ${CMAKE_SOURCE_DIR}/lib)
- if(MSVC)
- add_definitions(-D_CRT_SECURE_NO_WARNINGS -wd4996)
- endif(MSVC)
-+if(WIN32)
-+ add_definitions(-DCOMPILED_FROM_DSP)
-+endif(WIN32)
-
- set(expat_SRCS
- lib/xmlparse.c
-diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
-index e308c79..c5f942f 100644
---- a/expat/lib/xmlparse.c
-+++ b/expat/lib/xmlparse.c
-@@ -6,7 +6,14 @@
- #include <string.h> /* memset(), memcpy() */
- #include <assert.h>
- #include <limits.h> /* UINT_MAX */
--#include <time.h> /* time() */
-+
-+#ifdef COMPILED_FROM_DSP
-+#define getpid GetCurrentProcessId
-+#else
-+#include <sys/time.h> /* gettimeofday() */
-+#include <sys/types.h> /* getpid() */
-+#include <unistd.h> /* getpid() */
-+#endif
-
- #define XML_BUILDING_EXPAT 1
-
-@@ -432,7 +439,7 @@ static ELEMENT_TYPE *
- getElementType(XML_Parser parser, const ENCODING *enc,
- const char *ptr, const char *end);
-
--static unsigned long generate_hash_secret_salt(void);
-+static unsigned long generate_hash_secret_salt(XML_Parser parser);
- static XML_Bool startParsing(XML_Parser parser);
-
- static XML_Parser
-@@ -691,11 +698,38 @@ static const XML_Char implicitContext[] = {
- };
-
- static unsigned long
--generate_hash_secret_salt(void)
-+gather_time_entropy(void)
- {
-- unsigned int seed = time(NULL) % UINT_MAX;
-- srand(seed);
-- return rand();
-+#ifdef COMPILED_FROM_DSP
-+ FILETIME ft;
-+ GetSystemTimeAsFileTime(&ft); /* never fails */
-+ return ft.dwHighDateTime ^ ft.dwLowDateTime;
-+#else
-+ struct timeval tv;
-+ int gettimeofday_res;
-+
-+ gettimeofday_res = gettimeofday(&tv, NULL);
-+ assert (gettimeofday_res == 0);
-+
-+ /* Microseconds time is <20 bits entropy */
-+ return tv.tv_usec;
-+#endif
-+}
-+
-+static unsigned long
-+generate_hash_secret_salt(XML_Parser parser)
-+{
-+ /* Process ID is 0 bits entropy if attacker has local access
-+ * XML_Parser address is few bits of entropy if attacker has local access */
-+ const unsigned long entropy =
-+ gather_time_entropy() ^ getpid() ^ (unsigned long)parser;
-+
-+ /* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */
-+ if (sizeof(unsigned long) == 4) {
-+ return entropy * 2147483647;
-+ } else {
-+ return entropy * 2305843009213693951;
-+ }
- }
-
- static XML_Bool /* only valid for root parser */
-@@ -703,7 +737,7 @@ startParsing(XML_Parser parser)
- {
- /* hash functions must be initialized before setContext() is called */
- if (hash_secret_salt == 0)
-- hash_secret_salt = generate_hash_secret_salt();
-+ hash_secret_salt = generate_hash_secret_salt(parser);
- if (ns) {
- /* implicit context only set for root parser, since child
- parsers (i.e. external entity parsers) will inherit it
---
-2.8.2
-
diff --git a/dev-libs/expat/files/expat-2.1.1-CVE-2015-1283-refix.patch b/dev-libs/expat/files/expat-2.1.1-CVE-2015-1283-refix.patch
deleted file mode 100644
index 0fd45ec..00000000
--- a/dev-libs/expat/files/expat-2.1.1-CVE-2015-1283-refix.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 29a11774d8ebbafe8418b4a5ffb4cc1160b194a1 Mon Sep 17 00:00:00 2001
-From: Pascal Cuoq <cuoq@trust-in-soft.com>
-Date: Sun, 15 May 2016 09:05:46 +0200
-Subject: [PATCH] Avoid relying on undefined behavior in CVE-2015-1283 fix. It
- does not really work: https://godbolt.org/g/Zl8gdF
-
----
- expat/lib/xmlparse.c | 6 ++++--
- 1 file changed, 4 insertions(+), 2 deletions(-)
-
-diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
-index 13e080d..cdb12ef 100644
---- a/expat/lib/xmlparse.c
-+++ b/expat/lib/xmlparse.c
-@@ -1693,7 +1693,8 @@ XML_GetBuffer(XML_Parser parser, int len)
- }
-
- if (len > bufferLim - bufferEnd) {
-- int neededSize = len + (int)(bufferEnd - bufferPtr);
-+ /* Do not invoke signed arithmetic overflow: */
-+ int neededSize = (int) ((unsigned)len + (unsigned)(bufferEnd - bufferPtr));
- if (neededSize < 0) {
- errorCode = XML_ERROR_NO_MEMORY;
- return NULL;
-@@ -1725,7 +1726,8 @@ XML_GetBuffer(XML_Parser parser, int len)
- if (bufferSize == 0)
- bufferSize = INIT_BUFFER_SIZE;
- do {
-- bufferSize *= 2;
-+ /* Do not invoke signed arithmetic overflow: */
-+ bufferSize = (int) (2U * (unsigned) bufferSize);
- } while (bufferSize < neededSize && bufferSize > 0);
- if (bufferSize <= 0) {
- errorCode = XML_ERROR_NO_MEMORY;
---
-2.8.2
-
diff --git a/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-v2-2-1.patch b/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-v2-2-1.patch
deleted file mode 100644
index 8cc41bf..00000000
--- a/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-v2-2-1.patch
+++ /dev/null
@@ -1,755 +0,0 @@
-From cdfcb1b5c95e93b00ae9e9d25708b4a3bee72c15 Mon Sep 17 00:00:00 2001
-From: Sebastian Pipping <sebastian@pipping.org>
-Date: Mon, 2 May 2016 00:02:44 +0200
-Subject: [PATCH] Address CVE-2016-0718 (/patch/ version 2.2.1)
-
-* Out of bounds memory access when doing text conversion on malformed input
-* Integer overflow related to memory allocation
-
-Reported by Gustavo Grieco
-
-Patch credits go to
-* Christian Heimes
-* Karl Waclawek
-* Gustavo Grieco
-* Sebastian Pipping
-* Pascal Cuoq
----
- expat/lib/xmlparse.c | 34 +++++++++-----
- expat/lib/xmltok.c | 115 +++++++++++++++++++++++++++++++++++-------------
- expat/lib/xmltok.h | 10 ++++-
- expat/lib/xmltok_impl.c | 62 +++++++++++++-------------
- 4 files changed, 146 insertions(+), 75 deletions(-)
-
-diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
-index e308c79..13e080d 100644
---- a/expat/lib/xmlparse.c
-+++ b/expat/lib/xmlparse.c
-@@ -2426,11 +2426,11 @@ doContent(XML_Parser parser,
- for (;;) {
- int bufSize;
- int convLen;
-- XmlConvert(enc,
-+ const enum XML_Convert_Result convert_res = XmlConvert(enc,
- &fromPtr, rawNameEnd,
- (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1);
- convLen = (int)(toPtr - (XML_Char *)tag->buf);
-- if (fromPtr == rawNameEnd) {
-+ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
- tag->name.strLen = convLen;
- break;
- }
-@@ -2651,11 +2651,11 @@ doContent(XML_Parser parser,
- if (MUST_CONVERT(enc, s)) {
- for (;;) {
- ICHAR *dataPtr = (ICHAR *)dataBuf;
-- XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
-+ const enum XML_Convert_Result convert_res = XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
- *eventEndPP = s;
- charDataHandler(handlerArg, dataBuf,
- (int)(dataPtr - (ICHAR *)dataBuf));
-- if (s == next)
-+ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
- break;
- *eventPP = s;
- }
-@@ -3261,11 +3261,11 @@ doCdataSection(XML_Parser parser,
- if (MUST_CONVERT(enc, s)) {
- for (;;) {
- ICHAR *dataPtr = (ICHAR *)dataBuf;
-- XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
-+ const enum XML_Convert_Result convert_res = XmlConvert(enc, &s, next, &dataPtr, (ICHAR *)dataBufEnd);
- *eventEndPP = next;
- charDataHandler(handlerArg, dataBuf,
- (int)(dataPtr - (ICHAR *)dataBuf));
-- if (s == next)
-+ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
- break;
- *eventPP = s;
- }
-@@ -5342,6 +5342,7 @@ reportDefault(XML_Parser parser, const ENCODING *enc,
- const char *s, const char *end)
- {
- if (MUST_CONVERT(enc, s)) {
-+ enum XML_Convert_Result convert_res;
- const char **eventPP;
- const char **eventEndPP;
- if (enc == encoding) {
-@@ -5354,11 +5355,11 @@ reportDefault(XML_Parser parser, const ENCODING *enc,
- }
- do {
- ICHAR *dataPtr = (ICHAR *)dataBuf;
-- XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd);
-+ convert_res = XmlConvert(enc, &s, end, &dataPtr, (ICHAR *)dataBufEnd);
- *eventEndPP = s;
- defaultHandler(handlerArg, dataBuf, (int)(dataPtr - (ICHAR *)dataBuf));
- *eventPP = s;
-- } while (s != end);
-+ } while ((convert_res != XML_CONVERT_COMPLETED) && (convert_res != XML_CONVERT_INPUT_INCOMPLETE));
- }
- else
- defaultHandler(handlerArg, (XML_Char *)s, (int)((XML_Char *)end - (XML_Char *)s));
-@@ -6163,8 +6164,8 @@ poolAppend(STRING_POOL *pool, const ENCODING *enc,
- if (!pool->ptr && !poolGrow(pool))
- return NULL;
- for (;;) {
-- XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end);
-- if (ptr == end)
-+ const enum XML_Convert_Result convert_res = XmlConvert(enc, &ptr, end, (ICHAR **)&(pool->ptr), (ICHAR *)pool->end);
-+ if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE))
- break;
- if (!poolGrow(pool))
- return NULL;
-@@ -6248,8 +6249,13 @@ poolGrow(STRING_POOL *pool)
- }
- }
- if (pool->blocks && pool->start == pool->blocks->s) {
-- int blockSize = (int)(pool->end - pool->start)*2;
-- BLOCK *temp = (BLOCK *)
-+ BLOCK *temp;
-+ int blockSize = (int)((unsigned)(pool->end - pool->start)*2U);
-+
-+ if (blockSize < 0)
-+ return XML_FALSE;
-+
-+ temp = (BLOCK *)
- pool->mem->realloc_fcn(pool->blocks,
- (offsetof(BLOCK, s)
- + blockSize * sizeof(XML_Char)));
-@@ -6264,6 +6270,10 @@ poolGrow(STRING_POOL *pool)
- else {
- BLOCK *tem;
- int blockSize = (int)(pool->end - pool->start);
-+
-+ if (blockSize < 0)
-+ return XML_FALSE;
-+
- if (blockSize < INIT_BLOCK_SIZE)
- blockSize = INIT_BLOCK_SIZE;
- else
-diff --git a/expat/lib/xmltok.c b/expat/lib/xmltok.c
-index bf09dfc..cb98ce1 100644
---- a/expat/lib/xmltok.c
-+++ b/expat/lib/xmltok.c
-@@ -318,39 +318,55 @@ enum { /* UTF8_cvalN is value of masked first byte of N byte sequence */
- UTF8_cval4 = 0xf0
- };
-
--static void PTRCALL
-+static enum XML_Convert_Result PTRCALL
- utf8_toUtf8(const ENCODING *enc,
- const char **fromP, const char *fromLim,
- char **toP, const char *toLim)
- {
-+ enum XML_Convert_Result res = XML_CONVERT_COMPLETED;
- char *to;
- const char *from;
- if (fromLim - *fromP > toLim - *toP) {
- /* Avoid copying partial characters. */
-+ res = XML_CONVERT_OUTPUT_EXHAUSTED;
- for (fromLim = *fromP + (toLim - *toP); fromLim > *fromP; fromLim--)
- if (((unsigned char)fromLim[-1] & 0xc0) != 0x80)
- break;
- }
-- for (to = *toP, from = *fromP; from != fromLim; from++, to++)
-+ for (to = *toP, from = *fromP; (from < fromLim) && (to < toLim); from++, to++)
- *to = *from;
- *fromP = from;
- *toP = to;
-+
-+ if ((to == toLim) && (from < fromLim))
-+ return XML_CONVERT_OUTPUT_EXHAUSTED;
-+ else
-+ return res;
- }
-
--static void PTRCALL
-+static enum XML_Convert_Result PTRCALL
- utf8_toUtf16(const ENCODING *enc,
- const char **fromP, const char *fromLim,
- unsigned short **toP, const unsigned short *toLim)
- {
-+ enum XML_Convert_Result res = XML_CONVERT_COMPLETED;
- unsigned short *to = *toP;
- const char *from = *fromP;
-- while (from != fromLim && to != toLim) {
-+ while (from < fromLim && to < toLim) {
- switch (((struct normal_encoding *)enc)->type[(unsigned char)*from]) {
- case BT_LEAD2:
-+ if (fromLim - from < 2) {
-+ res = XML_CONVERT_INPUT_INCOMPLETE;
-+ break;
-+ }
- *to++ = (unsigned short)(((from[0] & 0x1f) << 6) | (from[1] & 0x3f));
- from += 2;
- break;
- case BT_LEAD3:
-+ if (fromLim - from < 3) {
-+ res = XML_CONVERT_INPUT_INCOMPLETE;
-+ break;
-+ }
- *to++ = (unsigned short)(((from[0] & 0xf) << 12)
- | ((from[1] & 0x3f) << 6) | (from[2] & 0x3f));
- from += 3;
-@@ -358,8 +374,14 @@ utf8_toUtf16(const ENCODING *enc,
- case BT_LEAD4:
- {
- unsigned long n;
-- if (to + 1 == toLim)
-+ if (toLim - to < 2) {
-+ res = XML_CONVERT_OUTPUT_EXHAUSTED;
- goto after;
-+ }
-+ if (fromLim - from < 4) {
-+ res = XML_CONVERT_INPUT_INCOMPLETE;
-+ goto after;
-+ }
- n = ((from[0] & 0x7) << 18) | ((from[1] & 0x3f) << 12)
- | ((from[2] & 0x3f) << 6) | (from[3] & 0x3f);
- n -= 0x10000;
-@@ -377,6 +399,7 @@ utf8_toUtf16(const ENCODING *enc,
- after:
- *fromP = from;
- *toP = to;
-+ return res;
- }
-
- #ifdef XML_NS
-@@ -425,7 +448,7 @@ static const struct normal_encoding internal_utf8_encoding = {
- STANDARD_VTABLE(sb_) NORMAL_VTABLE(utf8_)
- };
-
--static void PTRCALL
-+static enum XML_Convert_Result PTRCALL
- latin1_toUtf8(const ENCODING *enc,
- const char **fromP, const char *fromLim,
- char **toP, const char *toLim)
-@@ -433,30 +456,35 @@ latin1_toUtf8(const ENCODING *enc,
- for (;;) {
- unsigned char c;
- if (*fromP == fromLim)
-- break;
-+ return XML_CONVERT_COMPLETED;
- c = (unsigned char)**fromP;
- if (c & 0x80) {
- if (toLim - *toP < 2)
-- break;
-+ return XML_CONVERT_OUTPUT_EXHAUSTED;
- *(*toP)++ = (char)((c >> 6) | UTF8_cval2);
- *(*toP)++ = (char)((c & 0x3f) | 0x80);
- (*fromP)++;
- }
- else {
- if (*toP == toLim)
-- break;
-+ return XML_CONVERT_OUTPUT_EXHAUSTED;
- *(*toP)++ = *(*fromP)++;
- }
- }
- }
-
--static void PTRCALL
-+static enum XML_Convert_Result PTRCALL
- latin1_toUtf16(const ENCODING *enc,
- const char **fromP, const char *fromLim,
- unsigned short **toP, const unsigned short *toLim)
- {
-- while (*fromP != fromLim && *toP != toLim)
-+ while (*fromP < fromLim && *toP < toLim)
- *(*toP)++ = (unsigned char)*(*fromP)++;
-+
-+ if ((*toP == toLim) && (*fromP < fromLim))
-+ return XML_CONVERT_OUTPUT_EXHAUSTED;
-+ else
-+ return XML_CONVERT_COMPLETED;
- }
-
- #ifdef XML_NS
-@@ -483,13 +511,18 @@ static const struct normal_encoding latin1_encoding = {
- STANDARD_VTABLE(sb_)
- };
-
--static void PTRCALL
-+static enum XML_Convert_Result PTRCALL
- ascii_toUtf8(const ENCODING *enc,
- const char **fromP, const char *fromLim,
- char **toP, const char *toLim)
- {
-- while (*fromP != fromLim && *toP != toLim)
-+ while (*fromP < fromLim && *toP < toLim)
- *(*toP)++ = *(*fromP)++;
-+
-+ if ((*toP == toLim) && (*fromP < fromLim))
-+ return XML_CONVERT_OUTPUT_EXHAUSTED;
-+ else
-+ return XML_CONVERT_COMPLETED;
- }
-
- #ifdef XML_NS
-@@ -536,13 +569,14 @@ unicode_byte_type(char hi, char lo)
- }
-
- #define DEFINE_UTF16_TO_UTF8(E) \
--static void PTRCALL \
-+static enum XML_Convert_Result PTRCALL \
- E ## toUtf8(const ENCODING *enc, \
- const char **fromP, const char *fromLim, \
- char **toP, const char *toLim) \
- { \
-- const char *from; \
-- for (from = *fromP; from != fromLim; from += 2) { \
-+ const char *from = *fromP; \
-+ fromLim = from + (((fromLim - from) >> 1) << 1); /* shrink to even */ \
-+ for (; from < fromLim; from += 2) { \
- int plane; \
- unsigned char lo2; \
- unsigned char lo = GET_LO(from); \
-@@ -552,7 +586,7 @@ E ## toUtf8(const ENCODING *enc, \
- if (lo < 0x80) { \
- if (*toP == toLim) { \
- *fromP = from; \
-- return; \
-+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
- } \
- *(*toP)++ = lo; \
- break; \
-@@ -562,7 +596,7 @@ E ## toUtf8(const ENCODING *enc, \
- case 0x4: case 0x5: case 0x6: case 0x7: \
- if (toLim - *toP < 2) { \
- *fromP = from; \
-- return; \
-+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
- } \
- *(*toP)++ = ((lo >> 6) | (hi << 2) | UTF8_cval2); \
- *(*toP)++ = ((lo & 0x3f) | 0x80); \
-@@ -570,7 +604,7 @@ E ## toUtf8(const ENCODING *enc, \
- default: \
- if (toLim - *toP < 3) { \
- *fromP = from; \
-- return; \
-+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
- } \
- /* 16 bits divided 4, 6, 6 amongst 3 bytes */ \
- *(*toP)++ = ((hi >> 4) | UTF8_cval3); \
-@@ -580,7 +614,11 @@ E ## toUtf8(const ENCODING *enc, \
- case 0xD8: case 0xD9: case 0xDA: case 0xDB: \
- if (toLim - *toP < 4) { \
- *fromP = from; \
-- return; \
-+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
-+ } \
-+ if (fromLim - from < 4) { \
-+ *fromP = from; \
-+ return XML_CONVERT_INPUT_INCOMPLETE; \
- } \
- plane = (((hi & 0x3) << 2) | ((lo >> 6) & 0x3)) + 1; \
- *(*toP)++ = ((plane >> 2) | UTF8_cval4); \
-@@ -596,20 +634,32 @@ E ## toUtf8(const ENCODING *enc, \
- } \
- } \
- *fromP = from; \
-+ if (from < fromLim) \
-+ return XML_CONVERT_INPUT_INCOMPLETE; \
-+ else \
-+ return XML_CONVERT_COMPLETED; \
- }
-
- #define DEFINE_UTF16_TO_UTF16(E) \
--static void PTRCALL \
-+static enum XML_Convert_Result PTRCALL \
- E ## toUtf16(const ENCODING *enc, \
- const char **fromP, const char *fromLim, \
- unsigned short **toP, const unsigned short *toLim) \
- { \
-+ enum XML_Convert_Result res = XML_CONVERT_COMPLETED; \
-+ fromLim = *fromP + (((fromLim - *fromP) >> 1) << 1); /* shrink to even */ \
- /* Avoid copying first half only of surrogate */ \
- if (fromLim - *fromP > ((toLim - *toP) << 1) \
-- && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) \
-+ && (GET_HI(fromLim - 2) & 0xF8) == 0xD8) { \
- fromLim -= 2; \
-- for (; *fromP != fromLim && *toP != toLim; *fromP += 2) \
-+ res = XML_CONVERT_INPUT_INCOMPLETE; \
-+ } \
-+ for (; *fromP < fromLim && *toP < toLim; *fromP += 2) \
- *(*toP)++ = (GET_HI(*fromP) << 8) | GET_LO(*fromP); \
-+ if ((*toP == toLim) && (*fromP < fromLim)) \
-+ return XML_CONVERT_OUTPUT_EXHAUSTED; \
-+ else \
-+ return res; \
- }
-
- #define SET2(ptr, ch) \
-@@ -1288,7 +1338,7 @@ unknown_isInvalid(const ENCODING *enc, const char *p)
- return (c & ~0xFFFF) || checkCharRefNumber(c) < 0;
- }
-
--static void PTRCALL
-+static enum XML_Convert_Result PTRCALL
- unknown_toUtf8(const ENCODING *enc,
- const char **fromP, const char *fromLim,
- char **toP, const char *toLim)
-@@ -1299,21 +1349,21 @@ unknown_toUtf8(const ENCODING *enc,
- const char *utf8;
- int n;
- if (*fromP == fromLim)
-- break;
-+ return XML_CONVERT_COMPLETED;
- utf8 = uenc->utf8[(unsigned char)**fromP];
- n = *utf8++;
- if (n == 0) {
- int c = uenc->convert(uenc->userData, *fromP);
- n = XmlUtf8Encode(c, buf);
- if (n > toLim - *toP)
-- break;
-+ return XML_CONVERT_OUTPUT_EXHAUSTED;
- utf8 = buf;
- *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP]
- - (BT_LEAD2 - 2));
- }
- else {
- if (n > toLim - *toP)
-- break;
-+ return XML_CONVERT_OUTPUT_EXHAUSTED;
- (*fromP)++;
- }
- do {
-@@ -1322,13 +1372,13 @@ unknown_toUtf8(const ENCODING *enc,
- }
- }
-
--static void PTRCALL
-+static enum XML_Convert_Result PTRCALL
- unknown_toUtf16(const ENCODING *enc,
- const char **fromP, const char *fromLim,
- unsigned short **toP, const unsigned short *toLim)
- {
- const struct unknown_encoding *uenc = AS_UNKNOWN_ENCODING(enc);
-- while (*fromP != fromLim && *toP != toLim) {
-+ while (*fromP < fromLim && *toP < toLim) {
- unsigned short c = uenc->utf16[(unsigned char)**fromP];
- if (c == 0) {
- c = (unsigned short)
-@@ -1340,6 +1390,11 @@ unknown_toUtf16(const ENCODING *enc,
- (*fromP)++;
- *(*toP)++ = c;
- }
-+
-+ if ((*toP == toLim) && (*fromP < fromLim))
-+ return XML_CONVERT_OUTPUT_EXHAUSTED;
-+ else
-+ return XML_CONVERT_COMPLETED;
- }
-
- ENCODING *
-@@ -1503,7 +1558,7 @@ initScan(const ENCODING * const *encodingTable,
- {
- const ENCODING **encPtr;
-
-- if (ptr == end)
-+ if (ptr >= end)
- return XML_TOK_NONE;
- encPtr = enc->encPtr;
- if (ptr + 1 == end) {
-diff --git a/expat/lib/xmltok.h b/expat/lib/xmltok.h
-index ca867aa..752007e 100644
---- a/expat/lib/xmltok.h
-+++ b/expat/lib/xmltok.h
-@@ -130,6 +130,12 @@ typedef int (PTRCALL *SCANNER)(const ENCODING *,
- const char *,
- const char **);
-
-+enum XML_Convert_Result {
-+ XML_CONVERT_COMPLETED = 0,
-+ XML_CONVERT_INPUT_INCOMPLETE = 1,
-+ XML_CONVERT_OUTPUT_EXHAUSTED = 2 /* and therefore potentially input remaining as well */
-+};
-+
- struct encoding {
- SCANNER scanners[XML_N_STATES];
- SCANNER literalScanners[XML_N_LITERAL_TYPES];
-@@ -158,12 +164,12 @@ struct encoding {
- const char *ptr,
- const char *end,
- const char **badPtr);
-- void (PTRCALL *utf8Convert)(const ENCODING *enc,
-+ enum XML_Convert_Result (PTRCALL *utf8Convert)(const ENCODING *enc,
- const char **fromP,
- const char *fromLim,
- char **toP,
- const char *toLim);
-- void (PTRCALL *utf16Convert)(const ENCODING *enc,
-+ enum XML_Convert_Result (PTRCALL *utf16Convert)(const ENCODING *enc,
- const char **fromP,
- const char *fromLim,
- unsigned short **toP,
-diff --git a/expat/lib/xmltok_impl.c b/expat/lib/xmltok_impl.c
-index 9c2895b..6c5a3ba 100644
---- a/expat/lib/xmltok_impl.c
-+++ b/expat/lib/xmltok_impl.c
-@@ -93,13 +93,13 @@ static int PTRCALL
- PREFIX(scanComment)(const ENCODING *enc, const char *ptr,
- const char *end, const char **nextTokPtr)
- {
-- if (ptr != end) {
-+ if (ptr < end) {
- if (!CHAR_MATCHES(enc, ptr, ASCII_MINUS)) {
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
- ptr += MINBPC(enc);
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- INVALID_CASES(ptr, nextTokPtr)
- case BT_MINUS:
-@@ -147,7 +147,7 @@ PREFIX(scanDecl)(const ENCODING *enc, const char *ptr,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- case BT_PERCNT:
- if (ptr + MINBPC(enc) == end)
-@@ -233,7 +233,7 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
- case BT_S: case BT_CR: case BT_LF:
-@@ -242,7 +242,7 @@ PREFIX(scanPi)(const ENCODING *enc, const char *ptr,
- return XML_TOK_INVALID;
- }
- ptr += MINBPC(enc);
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- INVALID_CASES(ptr, nextTokPtr)
- case BT_QUEST:
-@@ -305,7 +305,7 @@ static int PTRCALL
- PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
- const char *end, const char **nextTokPtr)
- {
-- if (ptr == end)
-+ if (ptr >= end)
- return XML_TOK_NONE;
- if (MINBPC(enc) > 1) {
- size_t n = end - ptr;
-@@ -348,7 +348,7 @@ PREFIX(cdataSectionTok)(const ENCODING *enc, const char *ptr,
- ptr += MINBPC(enc);
- break;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- #define LEAD_CASE(n) \
- case BT_LEAD ## n: \
-@@ -391,11 +391,11 @@ PREFIX(scanEndTag)(const ENCODING *enc, const char *ptr,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
- case BT_S: case BT_CR: case BT_LF:
-- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) {
-+ for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) {
- switch (BYTE_TYPE(enc, ptr)) {
- case BT_S: case BT_CR: case BT_LF:
- break;
-@@ -432,7 +432,7 @@ static int PTRCALL
- PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr,
- const char *end, const char **nextTokPtr)
- {
-- if (ptr != end) {
-+ if (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- case BT_DIGIT:
- case BT_HEX:
-@@ -441,7 +441,7 @@ PREFIX(scanHexCharRef)(const ENCODING *enc, const char *ptr,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) {
-+ for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) {
- switch (BYTE_TYPE(enc, ptr)) {
- case BT_DIGIT:
- case BT_HEX:
-@@ -464,7 +464,7 @@ static int PTRCALL
- PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr,
- const char *end, const char **nextTokPtr)
- {
-- if (ptr != end) {
-+ if (ptr < end) {
- if (CHAR_MATCHES(enc, ptr, ASCII_x))
- return PREFIX(scanHexCharRef)(enc, ptr + MINBPC(enc), end, nextTokPtr);
- switch (BYTE_TYPE(enc, ptr)) {
-@@ -474,7 +474,7 @@ PREFIX(scanCharRef)(const ENCODING *enc, const char *ptr,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) {
-+ for (ptr += MINBPC(enc); ptr < end; ptr += MINBPC(enc)) {
- switch (BYTE_TYPE(enc, ptr)) {
- case BT_DIGIT:
- break;
-@@ -506,7 +506,7 @@ PREFIX(scanRef)(const ENCODING *enc, const char *ptr, const char *end,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
- case BT_SEMI:
-@@ -529,7 +529,7 @@ PREFIX(scanAtts)(const ENCODING *enc, const char *ptr, const char *end,
- #ifdef XML_NS
- int hadColon = 0;
- #endif
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
- #ifdef XML_NS
-@@ -716,7 +716,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
- hadColon = 0;
- #endif
- /* we have a start-tag */
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
- #ifdef XML_NS
-@@ -740,7 +740,7 @@ PREFIX(scanLt)(const ENCODING *enc, const char *ptr, const char *end,
- case BT_S: case BT_CR: case BT_LF:
- {
- ptr += MINBPC(enc);
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr)
- case BT_GT:
-@@ -785,7 +785,7 @@ static int PTRCALL
- PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
- const char **nextTokPtr)
- {
-- if (ptr == end)
-+ if (ptr >= end)
- return XML_TOK_NONE;
- if (MINBPC(enc) > 1) {
- size_t n = end - ptr;
-@@ -832,7 +832,7 @@ PREFIX(contentTok)(const ENCODING *enc, const char *ptr, const char *end,
- ptr += MINBPC(enc);
- break;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- #define LEAD_CASE(n) \
- case BT_LEAD ## n: \
-@@ -895,7 +895,7 @@ PREFIX(scanPercent)(const ENCODING *enc, const char *ptr, const char *end,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
- case BT_SEMI:
-@@ -921,7 +921,7 @@ PREFIX(scanPoundName)(const ENCODING *enc, const char *ptr, const char *end,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
- case BT_CR: case BT_LF: case BT_S:
-@@ -941,7 +941,7 @@ PREFIX(scanLit)(int open, const ENCODING *enc,
- const char *ptr, const char *end,
- const char **nextTokPtr)
- {
-- while (ptr != end) {
-+ while (ptr < end) {
- int t = BYTE_TYPE(enc, ptr);
- switch (t) {
- INVALID_CASES(ptr, nextTokPtr)
-@@ -973,7 +973,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
- const char **nextTokPtr)
- {
- int tok;
-- if (ptr == end)
-+ if (ptr >= end)
- return XML_TOK_NONE;
- if (MINBPC(enc) > 1) {
- size_t n = end - ptr;
-@@ -1141,7 +1141,7 @@ PREFIX(prologTok)(const ENCODING *enc, const char *ptr, const char *end,
- *nextTokPtr = ptr;
- return XML_TOK_INVALID;
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
- case BT_GT: case BT_RPAR: case BT_COMMA:
-@@ -1204,10 +1204,10 @@ PREFIX(attributeValueTok)(const ENCODING *enc, const char *ptr,
- const char *end, const char **nextTokPtr)
- {
- const char *start;
-- if (ptr == end)
-+ if (ptr >= end)
- return XML_TOK_NONE;
- start = ptr;
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- #define LEAD_CASE(n) \
- case BT_LEAD ## n: ptr += n; break;
-@@ -1262,10 +1262,10 @@ PREFIX(entityValueTok)(const ENCODING *enc, const char *ptr,
- const char *end, const char **nextTokPtr)
- {
- const char *start;
-- if (ptr == end)
-+ if (ptr >= end)
- return XML_TOK_NONE;
- start = ptr;
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- #define LEAD_CASE(n) \
- case BT_LEAD ## n: ptr += n; break;
-@@ -1326,7 +1326,7 @@ PREFIX(ignoreSectionTok)(const ENCODING *enc, const char *ptr,
- end = ptr + n;
- }
- }
-- while (ptr != end) {
-+ while (ptr < end) {
- switch (BYTE_TYPE(enc, ptr)) {
- INVALID_CASES(ptr, nextTokPtr)
- case BT_LT:
-@@ -1373,7 +1373,7 @@ PREFIX(isPublicId)(const ENCODING *enc, const char *ptr, const char *end,
- {
- ptr += MINBPC(enc);
- end -= MINBPC(enc);
-- for (; ptr != end; ptr += MINBPC(enc)) {
-+ for (; ptr < end; ptr += MINBPC(enc)) {
- switch (BYTE_TYPE(enc, ptr)) {
- case BT_DIGIT:
- case BT_HEX:
-@@ -1760,7 +1760,7 @@ PREFIX(updatePosition)(const ENCODING *enc,
- case BT_CR:
- pos->lineNumber++;
- ptr += MINBPC(enc);
-- if (ptr != end && BYTE_TYPE(enc, ptr) == BT_LF)
-+ if (ptr < end && BYTE_TYPE(enc, ptr) == BT_LF)
- ptr += MINBPC(enc);
- pos->columnNumber = (XML_Size)-1;
- break;
---
-2.8.2
-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/expat/, dev-libs/expat/files/
@ 2017-07-01 11:23 Sebastian Pipping
0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Pipping @ 2017-07-01 11:23 UTC (permalink / raw
To: gentoo-commits
commit: ed776d4e8f2e1da38a6a058e615943b636a52176
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 1 11:22:06 2017 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sat Jul 1 11:22:39 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ed776d4e
dev-libs/expat: Fix compilation (bug #622360)
Package-Manager: Portage-2.3.6, Repoman-2.3.2
dev-libs/expat/expat-2.2.1.ebuild | 1 +
dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch | 31 ++++++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/dev-libs/expat/expat-2.2.1.ebuild b/dev-libs/expat/expat-2.2.1.ebuild
index 97d901fc111..7ada43d0dc1 100644
--- a/dev-libs/expat/expat-2.2.1.ebuild
+++ b/dev-libs/expat/expat-2.2.1.ebuild
@@ -20,6 +20,7 @@ DOCS=( AUTHORS Changes README )
src_prepare() {
epatch "${FILESDIR}"/${P}-getrandom-detection.patch
epatch "${FILESDIR}"/${P}-posix-shell.patch
+ epatch "${FILESDIR}"/${P}-gentoo-dash.patch # bug 622360
eapply_user
eautoreconf
}
diff --git a/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch b/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch
new file mode 100644
index 00000000000..a0eb60ce6cc
--- /dev/null
+++ b/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch
@@ -0,0 +1,31 @@
+From 9502963fd2e84ac529950f3a6f4173d86b93b5d2 Mon Sep 17 00:00:00 2001
+From: Kerin Millar <kfm@plushkava.net>
+Date: Thu, 29 Jun 2017 16:51:18 +0100
+Subject: [PATCH] conftools/get-version.sh: Use printf rather than try to infer
+ non-portable echo options
+
+---
+ expat/conftools/get-version.sh | 13 +------------
+ 1 file changed, 1 insertion(+), 12 deletions(-)
+
+diff --git a/expat/conftools/get-version.sh b/expat/conftools/get-version.sh
+index a70e0fb..91e5c64 100755
+--- a/expat/conftools/get-version.sh
++++ b/expat/conftools/get-version.sh
+@@ -32,15 +32,4 @@ MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`"
+ MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`"
+ MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`"
+
+-# Determine how to tell echo not to print the trailing \n. This is
+-# similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't
+-# generate this file via autoconf (in fact, get-version.sh is used
+-# to *create* ./configure), so we just do something similar inline.
+-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+- *c*,-n*) ECHO_N= ECHO_C='
+-' ;;
+- *c*,* ) ECHO_N=-n ECHO_C= ;;
+- *) ECHO_N= ECHO_C='\c' ;;
+-esac
+-
+-echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C"
++printf '%s.%s.%s' "$MAJOR_VERSION" "$MINOR_VERSION" "$MICRO_VERSION"
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/expat/, dev-libs/expat/files/
@ 2017-09-12 13:14 Sebastian Pipping
0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Pipping @ 2017-09-12 13:14 UTC (permalink / raw
To: gentoo-commits
commit: 2f110fc7f69c366f738bbe03b74157d503fde59b
Author: Sebastian Pipping <sping <AT> gentoo <DOT> org>
AuthorDate: Tue Sep 12 13:10:54 2017 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Tue Sep 12 13:14:45 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2f110fc7
dev-libs/expat: Remove old (bug 622046)
Package-Manager: Portage-2.3.8, Repoman-2.3.3
dev-libs/expat/Manifest | 3 -
dev-libs/expat/expat-2.2.0-r1.ebuild | 91 ----------------------
dev-libs/expat/expat-2.2.0-r2.ebuild | 83 --------------------
dev-libs/expat/expat-2.2.2.ebuild | 78 -------------------
dev-libs/expat/expat-2.2.3.ebuild | 78 -------------------
.../expat-2.1.1-CVE-2016-0718-regression.patch | 27 -------
6 files changed, 360 deletions(-)
diff --git a/dev-libs/expat/Manifest b/dev-libs/expat/Manifest
index d522e6e3258..11e68d3e180 100644
--- a/dev-libs/expat/Manifest
+++ b/dev-libs/expat/Manifest
@@ -1,5 +1,2 @@
-DIST expat-2.2.0.tar.bz2 414352 SHA256 d9e50ff2d19b3538bd2127902a89987474e1a4db8e43a66a4d1a712ab9a504ff SHA512 2be1a6eea87b439374bfacb1fbb8e814fd8a085d5dfd3ca3be69d1af29b5dc93d36cbdec5f6843ca6d5910843c7ffbc498adc2a561b9dcece488edf3c6f8c7c8 WHIRLPOOL b1914e2c23170dabab6fce4fb0eb2511dc8dcde8db986a7cdf6b236d262fb756fb0955cb4c1fc7475a1ad3d9c005b632e42850dcf3af66f4cc87fe4ecfc3cb47
DIST expat-2.2.1.tar.bz2 405441 SHA256 1868cadae4c82a018e361e2b2091de103cd820aaacb0d6cfa49bd2cd83978885 SHA512 74089b55872df16f214a4baba0143e6353736dfa34063391293bb2760aa3e5118d9ccb3592e07c74c9d52a2a5b91496e15153f28214c4c01242d95b3019b67ea WHIRLPOOL f571ee00d43813c20d81d02d5d25f3fd4fdec3ec5a6aa331a965b4373ca681053e4e66d22fed4523f9a207333b80eb5e63c78d2e36e0c2b5a64ad1c38b0fe38a
-DIST expat-2.2.2.tar.bz2 405561 SHA256 4376911fcf81a23ebd821bbabc26fd933f3ac74833f74924342c29aad2c86046 SHA512 05383244f345b1c6a7290f3bb58bfab4da9546bfe880de644e784bcc48bd4317f2beb3fdb6120a5f396e06bb269f7e80713db211346d2d17bc7de3353d556575 WHIRLPOOL d4d42ebf6ca1544a5496461bf1abec030ca6f71c72bf24bc2d32b78a4d976b5334f49d8244cf041e09cb64354d90885adab4d96d3811041d6ef6d0a7289284af
-DIST expat-2.2.3.tar.bz2 435593 SHA256 b31890fb02f85c002a67491923f89bda5028a880fd6c374f707193ad81aace5f SHA512 d42ca209da7f50eb4ac108ea0ef85dc6626d63fe48144a4e6f2d8b44b1f9276f711cbac85f6813c4725a3c4933b7054b74dde2c43a0f2febaed4afa0a6f5ac88 WHIRLPOOL b9a8f62cf44db68adfa64dd3c8d89ddb2867cb0b354a43fb15453d5fc2d137671dc215e3e4cc1555a39ec2248307f89916dcaa81e3e78941d2fe3ea7039b7a0c
DIST expat-2.2.4.tar.bz2 505038 SHA256 03ad85db965f8ab2d27328abcf0bc5571af6ec0a414874b2066ee3fdd372019e SHA512 788249e2c6edf8521c4a99830fd5e51a55c062b834516f6775759cd71accf6375f12d3bd38f8b069777d081a4380b9549049921386ca0cb4b9b9daa4861d6592 WHIRLPOOL 77e62bca8da807e3175b05d121fd59b22b0018e57a3a82863794a220db49dfd2ff08f9463c2d319633e3aa4bb183347d1d43ed0d8baf0a65c97e893147123984
diff --git a/dev-libs/expat/expat-2.2.0-r1.ebuild b/dev-libs/expat/expat-2.2.0-r1.ebuild
deleted file mode 100644
index 280648032a4..00000000000
--- a/dev-libs/expat/expat-2.2.0-r1.ebuild
+++ /dev/null
@@ -1,91 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=5
-inherit eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="https://libexpat.github.io/"
-SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-2.1.1-CVE-2016-0718-regression.patch
-}
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static)"
-
- mkdir -p "${BUILD_DIR}"{u,w} || die
-
- ECONF_SOURCE="${S}" econf ${myconf}
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE_WCHAR_T" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- emake buildlib LIBRARY=libexpatu.la
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- emake buildlib LIBRARY=libexpatw.la
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"u >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatu.la
- popd >/dev/null
-
- pushd "${BUILD_DIR}"w >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatw.la
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatu.pc
- sed -i -e '/^Libs/s:-lexpat:&u:' expatu.pc || die
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- dodoc Changes README
- dohtml doc/*
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/expat-2.2.0-r2.ebuild b/dev-libs/expat/expat-2.2.0-r2.ebuild
deleted file mode 100644
index 1ae07e1f482..00000000000
--- a/dev-libs/expat/expat-2.2.0-r2.ebuild
+++ /dev/null
@@ -1,83 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="https://libexpat.github.io/"
-SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-DOCS=( Changes README )
-
-src_prepare() {
- epatch "${FILESDIR}"/${PN}-2.1.1-CVE-2016-0718-regression.patch
- eapply_user
-}
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static)"
-
- mkdir -p "${BUILD_DIR}"{u,w} || die
-
- ECONF_SOURCE="${S}" econf ${myconf}
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake buildlib LIBRARY=libexpatw.la
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatw.la
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- # Note: Use of HTML_DOCS would add unwanted "doc" subfolder
- docinto html
- dodoc doc/*.{css,html,png}
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/expat-2.2.2.ebuild b/dev-libs/expat/expat-2.2.2.ebuild
deleted file mode 100644
index 7ebf4caefb6..00000000000
--- a/dev-libs/expat/expat-2.2.2.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="https://libexpat.github.io/"
-SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-DOCS=( AUTHORS Changes README )
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static)"
-
- mkdir -p "${BUILD_DIR}"{u,w} || die
-
- ECONF_SOURCE="${S}" econf ${myconf}
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake buildlib LIBRARY=libexpatw.la
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatw.la
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- # Note: Use of HTML_DOCS would add unwanted "doc" subfolder
- docinto html
- dodoc doc/*.{css,html,png}
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/expat-2.2.3.ebuild b/dev-libs/expat/expat-2.2.3.ebuild
deleted file mode 100644
index 070bb44e1a1..00000000000
--- a/dev-libs/expat/expat-2.2.3.ebuild
+++ /dev/null
@@ -1,78 +0,0 @@
-# Copyright 1999-2017 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="https://libexpat.github.io/"
-SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-RDEPEND="abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20130224-r6
- !app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )"
-
-DOCS=( AUTHORS Changes README.md )
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static)"
-
- mkdir -p "${BUILD_DIR}"{u,w} || die
-
- ECONF_SOURCE="${S}" econf ${myconf}
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake buildlib LIBRARY=libexpatw.la
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatw.la
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- # Note: Use of HTML_DOCS would add unwanted "doc" subfolder
- docinto html
- dodoc doc/*.{css,html,png}
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-regression.patch b/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-regression.patch
deleted file mode 100644
index 03ea42def99..00000000000
--- a/dev-libs/expat/files/expat-2.1.1-CVE-2016-0718-regression.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 3e6190e433479e56f8c1e5adc1198b3c86b15577 Mon Sep 17 00:00:00 2001
-From: Sebastian Pipping <sebastian@pipping.org>
-Date: Sun, 17 Jul 2016 20:22:29 +0200
-Subject: [PATCH] Fix regression introduced by patch to CVE-2016-0718 (bug
- #539)
-
-Tag names were cut off in some cases; reported by Andy Wang
----
- expat/lib/xmlparse.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/expat/lib/xmlparse.c b/expat/lib/xmlparse.c
-index 13e080d..2630310 100644
---- a/expat/lib/xmlparse.c
-+++ b/expat/lib/xmlparse.c
-@@ -2430,7 +2430,7 @@ doContent(XML_Parser parser,
- &fromPtr, rawNameEnd,
- (ICHAR **)&toPtr, (ICHAR *)tag->bufEnd - 1);
- convLen = (int)(toPtr - (XML_Char *)tag->buf);
-- if ((convert_res == XML_CONVERT_COMPLETED) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
-+ if ((fromPtr >= rawNameEnd) || (convert_res == XML_CONVERT_INPUT_INCOMPLETE)) {
- tag->name.strLen = convLen;
- break;
- }
---
-2.9.2
-
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/expat/, dev-libs/expat/files/
@ 2018-04-21 20:56 Sebastian Pipping
0 siblings, 0 replies; 6+ messages in thread
From: Sebastian Pipping @ 2018-04-21 20:56 UTC (permalink / raw
To: gentoo-commits
commit: ab15b7fa1819dfce3e4b55138922f25a5b8d3eee
Author: Marty E. Plummer <hanetzer <AT> startmail <DOT> com>
AuthorDate: Fri Apr 20 13:42:27 2018 +0000
Commit: Sebastian Pipping <sping <AT> gentoo <DOT> org>
CommitDate: Sat Apr 21 20:56:09 2018 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ab15b7fa
dev-libs/expat: epatch->PATCHES=()
Also reformatted the patches to be -p1 applicable, and switched
eapply_user to default.
Package-Manager: Portage-2.3.31, Repoman-2.3.9
dev-libs/expat/expat-2.2.1.ebuild | 11 +++++++----
dev-libs/expat/expat-2.2.4.ebuild | 2 +-
dev-libs/expat/expat-2.2.5.ebuild | 2 +-
dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch | 4 ++--
dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch | 4 ++--
dev-libs/expat/files/expat-2.2.1-posix-shell.patch | 4 ++--
6 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/dev-libs/expat/expat-2.2.1.ebuild b/dev-libs/expat/expat-2.2.1.ebuild
index 9a4ba03a1ee..ac06d60513e 100644
--- a/dev-libs/expat/expat-2.2.1.ebuild
+++ b/dev-libs/expat/expat-2.2.1.ebuild
@@ -16,11 +16,14 @@ RDEPEND=""
DOCS=( AUTHORS Changes README )
+PATCHES=(
+ "${FILESDIR}"/${P}-getrandom-detection.patch
+ "${FILESDIR}"/${P}-posix-shell.patch
+ "${FILESDIR}"/${P}-gentoo-dash.patch # bug 622360
+)
+
src_prepare() {
- epatch "${FILESDIR}"/${P}-getrandom-detection.patch
- epatch "${FILESDIR}"/${P}-posix-shell.patch
- epatch "${FILESDIR}"/${P}-gentoo-dash.patch # bug 622360
- eapply_user
+ default
eautoreconf
}
diff --git a/dev-libs/expat/expat-2.2.4.ebuild b/dev-libs/expat/expat-2.2.4.ebuild
index 5ff41c1f875..fc3869969b4 100644
--- a/dev-libs/expat/expat-2.2.4.ebuild
+++ b/dev-libs/expat/expat-2.2.4.ebuild
@@ -18,7 +18,7 @@ RDEPEND=""
DOCS=( README.md )
src_prepare() {
- eapply_user
+ default
# fix interpreter to be a recent/good shell
sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
diff --git a/dev-libs/expat/expat-2.2.5.ebuild b/dev-libs/expat/expat-2.2.5.ebuild
index e4888fba94b..62fe398a428 100644
--- a/dev-libs/expat/expat-2.2.5.ebuild
+++ b/dev-libs/expat/expat-2.2.5.ebuild
@@ -18,7 +18,7 @@ RDEPEND=""
DOCS=( README.md )
src_prepare() {
- eapply_user
+ default
# fix interpreter to be a recent/good shell
sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
diff --git a/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch b/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch
index a0eb60ce6cc..9bf9bfe4492 100644
--- a/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch
+++ b/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch
@@ -10,8 +10,8 @@ Subject: [PATCH] conftools/get-version.sh: Use printf rather than try to infer
diff --git a/expat/conftools/get-version.sh b/expat/conftools/get-version.sh
index a70e0fb..91e5c64 100755
---- a/expat/conftools/get-version.sh
-+++ b/expat/conftools/get-version.sh
+--- a/conftools/get-version.sh
++++ b/conftools/get-version.sh
@@ -32,15 +32,4 @@ MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`"
MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`"
MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`"
diff --git a/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch b/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch
index eba004843db..6ceb7d9993f 100644
--- a/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch
+++ b/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch
@@ -11,8 +11,8 @@ There is no such thing but we need to link (not just compile) to realize.
diff --git a/expat/configure.ac b/expat/configure.ac
index 1357c9a..444c002 100644
---- a/expat/configure.ac
-+++ b/expat/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -130,7 +130,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
diff --git a/dev-libs/expat/files/expat-2.2.1-posix-shell.patch b/dev-libs/expat/files/expat-2.2.1-posix-shell.patch
index 3f34d0d9853..ab680451d8e 100644
--- a/dev-libs/expat/files/expat-2.2.1-posix-shell.patch
+++ b/dev-libs/expat/files/expat-2.2.1-posix-shell.patch
@@ -11,8 +11,8 @@ It doesn't matter in bash, but some other sh don't like it, so it's a portabilit
diff --git a/expat/configure.ac b/expat/configure.ac
index e48c32e..1357c9a 100644
---- a/expat/configure.ac
-+++ b/expat/configure.ac
+--- a/configure.ac
++++ b/configure.ac
@@ -220,8 +220,8 @@ AS_HELP_STRING([--disable-xml-context],
[Do not retain context around the current parse point]),
[enable_xml_context=${enableval}])
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: dev-libs/expat/, dev-libs/expat/files/
@ 2019-02-16 8:55 Pacho Ramos
0 siblings, 0 replies; 6+ messages in thread
From: Pacho Ramos @ 2019-02-16 8:55 UTC (permalink / raw
To: gentoo-commits
commit: 3987dd53792f13f21ea045df19ec0f3240e08467
Author: Pacho Ramos <pacho <AT> gentoo <DOT> org>
AuthorDate: Sat Feb 16 08:52:25 2019 +0000
Commit: Pacho Ramos <pacho <AT> gentoo <DOT> org>
CommitDate: Sat Feb 16 08:55:35 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3987dd53
dev-libs/expat: Drop old
Package-Manager: Portage-2.3.58, Repoman-2.3.12
Signed-off-by: Pacho Ramos <pacho <AT> gentoo.org>
dev-libs/expat/Manifest | 3 -
dev-libs/expat/expat-2.2.1.ebuild | 88 --------------------
dev-libs/expat/expat-2.2.4.ebuild | 96 ----------------------
dev-libs/expat/expat-2.2.5.ebuild | 96 ----------------------
dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch | 31 -------
.../files/expat-2.2.1-getrandom-detection.patch | 24 ------
dev-libs/expat/files/expat-2.2.1-posix-shell.patch | 26 ------
7 files changed, 364 deletions(-)
diff --git a/dev-libs/expat/Manifest b/dev-libs/expat/Manifest
index 733b50e8365..438f8571d79 100644
--- a/dev-libs/expat/Manifest
+++ b/dev-libs/expat/Manifest
@@ -1,4 +1 @@
-DIST expat-2.2.1.tar.bz2 405441 BLAKE2B 273960016692f3b9a1121eb07b67c28e5b3066fa324df0d7249329b2dc346c2601e4548def5e14b7f76d58f89f3cd12edad72fbd32da9f4c04ac61dfce23e15a SHA512 74089b55872df16f214a4baba0143e6353736dfa34063391293bb2760aa3e5118d9ccb3592e07c74c9d52a2a5b91496e15153f28214c4c01242d95b3019b67ea
-DIST expat-2.2.4.tar.bz2 505038 BLAKE2B 4d40629621bde41b44cdef4fa37937ce064cdbd621cc0d466b50a1a4626aff8bc8c8f6e9fbd94a36b709d449384da76ade683f31cf0aec0470006b750fc0a6ea SHA512 788249e2c6edf8521c4a99830fd5e51a55c062b834516f6775759cd71accf6375f12d3bd38f8b069777d081a4380b9549049921386ca0cb4b9b9daa4861d6592
-DIST expat-2.2.5.tar.bz2 510868 BLAKE2B 9d4709c2d157a04c08afd80b05f120407dc320023c3dbfe9e6872fadf0de2d6fa497f85ad9a21679fa0689c13cbb25adfd92912ae374d08de791dfeb4eb6918d SHA512 8226970a7e5d2b8d7818081758ca59bb6ce2d655feaa9d3a92481629000b73fde4782f50343d58ec4e1cebe75649e1980f636775a731d8aa4b55ceb843d9f637
DIST expat-2.2.6.tar.bz2 513322 BLAKE2B 386736da1f2204fa8f15ee4d1b3d11f01ed691efe6951b9f24f2bd30ab5494e75da6a97ceb1ffe4a0a8ecdc80f96f51d21c54f35a2cbc352a9fe9425545bf15b SHA512 dbfb635a5fe7b190722664263a0dd437b512fdf519bc53bd4905567f4bfb4b1e89a021562da63df8cacd48b706d1dea60ccde47f279e57400ad3c846b6e9c4e6
diff --git a/dev-libs/expat/expat-2.2.1.ebuild b/dev-libs/expat/expat-2.2.1.ebuild
deleted file mode 100644
index 84e0ee7bea0..00000000000
--- a/dev-libs/expat/expat-2.2.1.ebuild
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="https://libexpat.github.io/"
-SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-RDEPEND=""
-
-DOCS=( AUTHORS Changes README )
-
-PATCHES=(
- "${FILESDIR}"/${P}-getrandom-detection.patch
- "${FILESDIR}"/${P}-posix-shell.patch
- "${FILESDIR}"/${P}-gentoo-dash.patch # bug 622360
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static)"
-
- mkdir -p "${BUILD_DIR}"{u,w} || die
-
- ECONF_SOURCE="${S}" econf ${myconf}
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}" econf ${myconf}
- popd >/dev/null
- fi
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake buildlib LIBRARY=libexpatw.la
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake installlib DESTDIR="${D}" LIBRARY=libexpatw.la
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- # Note: Use of HTML_DOCS would add unwanted "doc" subfolder
- docinto html
- dodoc doc/*.{css,html,png}
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/expat-2.2.4.ebuild b/dev-libs/expat/expat-2.2.4.ebuild
deleted file mode 100644
index b99fa87d64f..00000000000
--- a/dev-libs/expat/expat-2.2.4.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="https://libexpat.github.io/"
-SRC_URI="mirror://sourceforge/expat/${P}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-DEPEND="unicode? ( ${AUTOTOOLS_DEPEND} )"
-RDEPEND=""
-
-DOCS=( README.md )
-
-src_prepare() {
- default
-
- # fix interpreter to be a recent/good shell
- sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
- if use unicode; then
- cp -R "${S}" "${S}"w || die
- pushd "${S}"w >/dev/null
- find -name Makefile.am \
- -exec sed \
- -e 's,libexpat\.la,libexpatw.la,' \
- -e 's,libexpat_la,libexpatw_la,' \
- -i {} + || die
- eautoreconf
- popd >/dev/null
- fi
-}
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static)"
-
- mkdir -p "${BUILD_DIR}"w || die
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}"w econf ${myconf}
- popd >/dev/null
- fi
-
- ECONF_SOURCE="${S}" econf ${myconf}
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake -C lib
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake -C lib install DESTDIR="${D}"
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- # Note: Use of HTML_DOCS would add unwanted "doc" subfolder
- docinto html
- dodoc doc/*.{css,html,png}
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/expat-2.2.5.ebuild b/dev-libs/expat/expat-2.2.5.ebuild
deleted file mode 100644
index 427cb0428d7..00000000000
--- a/dev-libs/expat/expat-2.2.5.ebuild
+++ /dev/null
@@ -1,96 +0,0 @@
-# Copyright 1999-2018 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-inherit autotools eutils libtool multilib toolchain-funcs multilib-minimal
-
-DESCRIPTION="Stream-oriented XML parser library"
-HOMEPAGE="https://libexpat.github.io/"
-SRC_URI="https://github.com/libexpat/libexpat/releases/download/R_${PV//\./_}/expat-${PV}.tar.bz2"
-
-LICENSE="MIT"
-SLOT="0"
-KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 ~ppc-aix ~x64-cygwin ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
-IUSE="elibc_FreeBSD examples static-libs unicode"
-DEPEND="unicode? ( ${AUTOTOOLS_DEPEND} )"
-RDEPEND=""
-
-DOCS=( README.md )
-
-src_prepare() {
- default
-
- # fix interpreter to be a recent/good shell
- sed -i -e "1s:/bin/sh:${BASH}:" conftools/get-version.sh || die
- if use unicode; then
- cp -R "${S}" "${S}"w || die
- pushd "${S}"w >/dev/null
- find -name Makefile.am \
- -exec sed \
- -e 's,libexpat\.la,libexpatw.la,' \
- -e 's,libexpat_la,libexpatw_la,' \
- -i {} + || die
- eautoreconf
- popd >/dev/null
- fi
-}
-
-multilib_src_configure() {
- local myconf="$(use_enable static-libs static) --without-docbook"
-
- mkdir -p "${BUILD_DIR}"w || die
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- CPPFLAGS="${CPPFLAGS} -DXML_UNICODE" ECONF_SOURCE="${S}"w econf ${myconf}
- popd >/dev/null
- fi
-
- ECONF_SOURCE="${S}" econf ${myconf}
-}
-
-multilib_src_compile() {
- emake
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake -C lib
- popd >/dev/null
- fi
-}
-
-multilib_src_install() {
- emake install DESTDIR="${D}"
-
- if use unicode; then
- pushd "${BUILD_DIR}"w >/dev/null
- emake -C lib install DESTDIR="${D}"
- popd >/dev/null
-
- pushd "${ED}"/usr/$(get_libdir)/pkgconfig >/dev/null
- cp expat.pc expatw.pc
- sed -i -e '/^Libs/s:-lexpat:&w:' expatw.pc || die
- popd >/dev/null
- fi
-
- if multilib_is_native_abi ; then
- # libgeom in /lib and ifconfig in /sbin require libexpat on FreeBSD since
- # we stripped the libbsdxml copy starting from freebsd-lib-8.2-r1
- use elibc_FreeBSD && gen_usr_ldscript -a expat
- fi
-}
-
-multilib_src_install_all() {
- einstalldocs
-
- # Note: Use of HTML_DOCS would add unwanted "doc" subfolder
- docinto html
- dodoc doc/*.{css,html,png}
-
- if use examples; then
- insinto /usr/share/doc/${PF}/examples
- doins examples/*.c
- fi
-
- prune_libtool_files
-}
diff --git a/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch b/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch
deleted file mode 100644
index 9bf9bfe4492..00000000000
--- a/dev-libs/expat/files/expat-2.2.1-gentoo-dash.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 9502963fd2e84ac529950f3a6f4173d86b93b5d2 Mon Sep 17 00:00:00 2001
-From: Kerin Millar <kfm@plushkava.net>
-Date: Thu, 29 Jun 2017 16:51:18 +0100
-Subject: [PATCH] conftools/get-version.sh: Use printf rather than try to infer
- non-portable echo options
-
----
- expat/conftools/get-version.sh | 13 +------------
- 1 file changed, 1 insertion(+), 12 deletions(-)
-
-diff --git a/expat/conftools/get-version.sh b/expat/conftools/get-version.sh
-index a70e0fb..91e5c64 100755
---- a/conftools/get-version.sh
-+++ b/conftools/get-version.sh
-@@ -32,15 +32,4 @@ MAJOR_VERSION="`sed -n -e '/MAJOR_VERSION/s/[^0-9]*//gp' $hdr`"
- MINOR_VERSION="`sed -n -e '/MINOR_VERSION/s/[^0-9]*//gp' $hdr`"
- MICRO_VERSION="`sed -n -e '/MICRO_VERSION/s/[^0-9]*//gp' $hdr`"
-
--# Determine how to tell echo not to print the trailing \n. This is
--# similar to Autoconf's @ECHO_C@ and @ECHO_N@; however, we don't
--# generate this file via autoconf (in fact, get-version.sh is used
--# to *create* ./configure), so we just do something similar inline.
--case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
-- *c*,-n*) ECHO_N= ECHO_C='
--' ;;
-- *c*,* ) ECHO_N=-n ECHO_C= ;;
-- *) ECHO_N= ECHO_C='\c' ;;
--esac
--
--echo $ECHO_N "$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$ECHO_C"
-+printf '%s.%s.%s' "$MAJOR_VERSION" "$MINOR_VERSION" "$MICRO_VERSION"
diff --git a/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch b/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch
deleted file mode 100644
index 6ceb7d9993f..00000000000
--- a/dev-libs/expat/files/expat-2.2.1-getrandom-detection.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From 602e6c78ca750c082b72f8cdf4a38839b312959f Mon Sep 17 00:00:00 2001
-From: Sebastian Pipping <sebastian@pipping.org>
-Date: Sun, 18 Jun 2017 18:55:10 +0200
-Subject: [PATCH] configure.ac: Fix mis-detection of getrandom on Debian
- GNU/kFreeBSD (#50)
-
-There is no such thing but we need to link (not just compile) to realize.
----
- expat/configure.ac | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/expat/configure.ac b/expat/configure.ac
-index 1357c9a..444c002 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -130,7 +130,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
-
-
- AC_MSG_CHECKING([for getrandom (Linux 3.17+, glibc 2.25+)])
--AC_COMPILE_IFELSE([AC_LANG_SOURCE([
-+AC_LINK_IFELSE([AC_LANG_SOURCE([
- #include <stdlib.h> /* for NULL */
- #include <sys/random.h>
- int main() {
diff --git a/dev-libs/expat/files/expat-2.2.1-posix-shell.patch b/dev-libs/expat/files/expat-2.2.1-posix-shell.patch
deleted file mode 100644
index ab680451d8e..00000000000
--- a/dev-libs/expat/files/expat-2.2.1-posix-shell.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From e5e25fac1698d9ea8dbb2e51c18d1072254b5f4b Mon Sep 17 00:00:00 2001
-From: spzeidler <spz@netbsd.org>
-Date: Sun, 18 Jun 2017 14:30:22 +0200
-Subject: [PATCH] Fix sh syntax in configure.ac (#49)
-
-The old '==' sh-is-not-C issue
-It doesn't matter in bash, but some other sh don't like it, so it's a portability issue
----
- expat/configure.ac | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/expat/configure.ac b/expat/configure.ac
-index e48c32e..1357c9a 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -220,8 +220,8 @@ AS_HELP_STRING([--disable-xml-context],
- [Do not retain context around the current parse point]),
- [enable_xml_context=${enableval}])
- AS_IF([test "x${enable_xml_context}" != "xno"], [
-- AS_IF([test "x${enable_xml_context}" == "xyes" \
-- -o "x${enable_xml_context}" == "x"], [
-+ AS_IF([test "x${enable_xml_context}" = "xyes" \
-+ -o "x${enable_xml_context}" = "x"], [
- enable_xml_context=1024
- ])
- AC_DEFINE_UNQUOTED([XML_CONTEXT_BYTES], [${enable_xml_context}],
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-02-16 8:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-13 14:34 [gentoo-commits] repo/gentoo:master commit in: dev-libs/expat/, dev-libs/expat/files/ Sebastian Pipping
-- strict thread matches above, loose matches on Subject: below --
2017-01-10 20:16 Pacho Ramos
2017-07-01 11:23 Sebastian Pipping
2017-09-12 13:14 Sebastian Pipping
2018-04-21 20:56 Sebastian Pipping
2019-02-16 8:55 Pacho Ramos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox