Merge updates from master

This commit is contained in:
Repository QA checks
2015-11-09 15:45:49 -05:00
12 changed files with 887 additions and 0 deletions
@@ -0,0 +1,32 @@
From a7dfab7411cbf545f359dd3157e5df1eb0e7ce31 Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Mon, 23 Feb 2015 11:17:35 +0800
Subject: [PATCH] Stop parsing on entities boundaries errors
For https://bugzilla.gnome.org/show_bug.cgi?id=744980
There are times, like on unterminated entities that it's preferable to
stop parsing, even if that means less error reporting. Entities are
feeding the parser on further processing, and if they are ill defined
then it's possible to get the parser to bug. Also do the same on
Conditional Sections if the input is broken, as the structure of
the document can't be guessed.
---
parser.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/parser.c b/parser.c
index a8d1b67..bbe97eb 100644
--- a/parser.c
+++ b/parser.c
@@ -5658,6 +5658,7 @@ xmlParseEntityDecl(xmlParserCtxtPtr ctxt) {
if (RAW != '>') {
xmlFatalErrMsgStr(ctxt, XML_ERR_ENTITY_NOT_FINISHED,
"xmlParseEntityDecl: entity %s not terminated\n", name);
+ xmlStopParser(ctxt);
} else {
if (input != ctxt->input) {
xmlFatalErrMsg(ctxt, XML_ERR_ENTITY_BOUNDARY,
--
2.4.10
@@ -0,0 +1,49 @@
From 9b8512337d14c8ddf662fcb98b0135f225a1c489 Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Mon, 23 Feb 2015 11:29:20 +0800
Subject: [PATCH] Cleanup conditional section error handling
For https://bugzilla.gnome.org/show_bug.cgi?id=744980
The error handling of Conditional Section also need to be
straightened as the structure of the document can't be
guessed on a failure there and it's better to stop parsing
as further errors are likely to be irrelevant.
---
parser.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/parser.c b/parser.c
index bbe97eb..fe603ac 100644
--- a/parser.c
+++ b/parser.c
@@ -6770,6 +6770,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
SKIP_BLANKS;
if (RAW != '[') {
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
+ xmlStopParser(ctxt);
+ return;
} else {
if (ctxt->input->id != id) {
xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
@@ -6830,6 +6832,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
SKIP_BLANKS;
if (RAW != '[') {
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID, NULL);
+ xmlStopParser(ctxt);
+ return;
} else {
if (ctxt->input->id != id) {
xmlValidityError(ctxt, XML_ERR_ENTITY_BOUNDARY,
@@ -6885,6 +6889,8 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
} else {
xmlFatalErr(ctxt, XML_ERR_CONDSEC_INVALID_KEYWORD, NULL);
+ xmlStopParser(ctxt);
+ return;
}
if (RAW == 0)
--
2.4.10
@@ -0,0 +1,31 @@
From f0709e3ca8f8947f2d91ed34e92e38a4c23eae63 Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Tue, 3 Nov 2015 15:31:25 +0800
Subject: [PATCH] CVE-2015-8035 Fix XZ compression support loop
For https://bugzilla.gnome.org/show_bug.cgi?id=757466
DoS when parsing specially crafted XML document if XZ support
is compiled in (which wasn't the case for 2.9.2 and master since
Nov 2013, fixed in next commit !)
---
xzlib.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/xzlib.c b/xzlib.c
index 0dcb9f4..1fab546 100644
--- a/xzlib.c
+++ b/xzlib.c
@@ -581,6 +581,10 @@ xz_decomp(xz_statep state)
xz_error(state, LZMA_DATA_ERROR, "compressed data error");
return -1;
}
+ if (ret == LZMA_PROG_ERROR) {
+ xz_error(state, LZMA_PROG_ERROR, "compression error");
+ return -1;
+ }
} while (strm->avail_out && ret != LZMA_STREAM_END);
/* update available output and crc check value */
--
2.4.10
@@ -20,6 +20,15 @@ do not build test programs as we don't install them
testdso_la_SOURCES = testdso.c
testdso_la_LDFLAGS = -module -no-undefined -avoid-version -rpath $(libdir)
@@ -202,7 +202,7 @@ runxmlconf_LDADD= $(LDADDS)
#testOOM_DEPENDENCIES = $(DEPS)
#testOOM_LDADD= $(LDADDS)
-runtests:
+runtests: check_PROGRAMS
[ -d test ] || $(LN_S) $(srcdir)/test .
[ -d result ] || $(LN_S) $(srcdir)/result .
$(CHECKER) ./runtest$(EXEEXT) && $(CHECKER) ./testrecurse$(EXEEXT) &&$(CHECKER) ./testapi$(EXEEXT) && $(CHECKER) ./testchar$(EXEEXT)&& $(CHECKER) ./testdict$(EXEEXT) && $(CHECKER) ./runxmlconf$(EXEEXT)
--- a/doc/examples/Makefile.am
+++ b/doc/examples/Makefile.am
@@ -13,7 +13,7 @@
@@ -0,0 +1,114 @@
From 18b8988511b0954272cac4d6c3e6724f9dbf6e0a Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Tue, 3 Nov 2015 15:46:29 +0800
Subject: [PATCH] Reenable xz support by default
For https://bugzilla.gnome.org/show_bug.cgi?id=757466
problem was introduced by commit f3f86ff465c92c79f834d7b981f3c7274a8bb5c8
for https://bugzilla.gnome.org/show_bug.cgi?id=711026
---
configure.ac | 3 +++
xmlIO.c | 12 ++++++------
xzlib.c | 6 ++++--
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/configure.ac b/configure.ac
index 14ac0a8..48e0577 100644
--- a/configure.ac
+++ b/configure.ac
@@ -445,6 +445,9 @@ else
fi],
[have_liblzma=no])
LDFLAGS="${SAVE_LDFLAGS}"])
+ else
+ # we still need to check for lzma,h header
+ AC_CHECK_HEADERS([lzma.h])
fi
# Found the library via either method?
diff --git a/xmlIO.c b/xmlIO.c
index e628ab0..8b13184 100644
--- a/xmlIO.c
+++ b/xmlIO.c
@@ -1334,7 +1334,7 @@ xmlGzfileClose (void * context) {
}
#endif /* HAVE_ZLIB_H */
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
/************************************************************************
* *
* I/O for compressed file accesses *
@@ -1451,7 +1451,7 @@ xmlXzfileClose (void * context) {
if (ret < 0) xmlIOErr(0, "xzclose()");
return(ret);
}
-#endif /* HAVE_LZMA_H */
+#endif /* LIBXML_LZMA_ENABLED */
#ifdef LIBXML_HTTP_ENABLED
/************************************************************************
@@ -2328,10 +2328,10 @@ xmlRegisterDefaultInputCallbacks(void) {
xmlRegisterInputCallbacks(xmlGzfileMatch, xmlGzfileOpen,
xmlGzfileRead, xmlGzfileClose);
#endif /* HAVE_ZLIB_H */
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
xmlRegisterInputCallbacks(xmlXzfileMatch, xmlXzfileOpen,
xmlXzfileRead, xmlXzfileClose);
-#endif /* HAVE_ZLIB_H */
+#endif /* LIBXML_LZMA_ENABLED */
#ifdef LIBXML_HTTP_ENABLED
xmlRegisterInputCallbacks(xmlIOHTTPMatch, xmlIOHTTPOpen,
@@ -2683,7 +2683,7 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
#endif
}
#endif
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
if ((xmlInputCallbackTable[i].opencallback == xmlXzfileOpen) &&
(strcmp(URI, "-") != 0)) {
ret->compressed = __libxml2_xzcompressed(context);
@@ -3350,7 +3350,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
* try to establish compressed status of input if not done already
*/
if (in->compressed == -1) {
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
if (in->readcallback == xmlXzfileRead)
in->compressed = __libxml2_xzcompressed(in->context);
#endif
diff --git a/xzlib.c b/xzlib.c
index 1fab546..782957f 100644
--- a/xzlib.c
+++ b/xzlib.c
@@ -8,7 +8,7 @@
*/
#define IN_LIBXML
#include "libxml.h"
-#ifdef HAVE_LZMA_H
+#ifdef LIBXML_LZMA_ENABLED
#include <string.h>
#ifdef HAVE_ERRNO_H
@@ -34,7 +34,9 @@
#ifdef HAVE_ZLIB_H
#include <zlib.h>
#endif
+#ifdef HAVE_LZMA_H
#include <lzma.h>
+#endif
#include "xzlib.h"
#include <libxml/xmlmemory.h>
@@ -799,4 +801,4 @@ __libxml2_xzclose(xzFile file)
xmlFree(state);
return ret ? ret : LZMA_OK;
}
-#endif /* HAVE_LZMA_H */
+#endif /* LIBXML_LZMA_ENABLED */
--
2.4.10
@@ -0,0 +1,32 @@
From bd0526e66a56e75a18da8c15c4750db8f801c52d Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Fri, 23 Oct 2015 19:02:28 +0800
Subject: Another variation of overflow in Conditional sections
Which happen after the previous fix to
https://bugzilla.gnome.org/show_bug.cgi?id=756456
But stopping the parser and exiting we didn't pop the intermediary entities
and doing the SKIP there applies on an input which may be too small
---
parser.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/parser.c b/parser.c
index a65e4cc..b9217ff 100644
--- a/parser.c
+++ b/parser.c
@@ -6915,7 +6915,9 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
"All markup of the conditional section is not in the same entity\n",
NULL, NULL);
}
- SKIP(3);
+ if ((ctxt-> instate != XML_PARSER_EOF) &&
+ ((ctxt->input->cur + 3) < ctxt->input->end))
+ SKIP(3);
}
}
--
cgit v0.11.2
@@ -0,0 +1,28 @@
From 41ac9049a27f52e7a1f3b341f8714149fc88d450 Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Tue, 27 Oct 2015 10:53:44 +0800
Subject: Fix an error in previous Conditional section patch
an off by one mistake in the change, led to error on correct
document where the end of the included entity was exactly
the end of the conditional section, leading to regtest failure
---
parser.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/parser.c b/parser.c
index b9217ff..d67b300 100644
--- a/parser.c
+++ b/parser.c
@@ -6916,7 +6916,7 @@ xmlParseConditionalSections(xmlParserCtxtPtr ctxt) {
NULL, NULL);
}
if ((ctxt-> instate != XML_PARSER_EOF) &&
- ((ctxt->input->cur + 3) < ctxt->input->end))
+ ((ctxt->input->cur + 3) <= ctxt->input->end))
SKIP(3);
}
}
--
cgit v0.11.2
@@ -0,0 +1,65 @@
From e724879d964d774df9b7969fc846605aa1bac54c Mon Sep 17 00:00:00 2001
From: Daniel Veillard <veillard@redhat.com>
Date: Fri, 30 Oct 2015 21:14:55 +0800
Subject: Fix parsing short unclosed comment uninitialized access
For https://bugzilla.gnome.org/show_bug.cgi?id=746048
The HTML parser was too optimistic when processing comments and
didn't check for the end of the stream on the first 2 characters
---
HTMLparser.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/HTMLparser.c b/HTMLparser.c
index 19c10c3..bdf7807 100644
--- a/HTMLparser.c
+++ b/HTMLparser.c
@@ -3264,12 +3264,17 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
ctxt->instate = state;
return;
}
+ len = 0;
+ buf[len] = 0;
q = CUR_CHAR(ql);
+ if (!IS_CHAR(q))
+ goto unfinished;
NEXTL(ql);
r = CUR_CHAR(rl);
+ if (!IS_CHAR(r))
+ goto unfinished;
NEXTL(rl);
cur = CUR_CHAR(l);
- len = 0;
while (IS_CHAR(cur) &&
((cur != '>') ||
(r != '-') || (q != '-'))) {
@@ -3300,18 +3305,20 @@ htmlParseComment(htmlParserCtxtPtr ctxt) {
}
}
buf[len] = 0;
- if (!IS_CHAR(cur)) {
- htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
- "Comment not terminated \n<!--%.50s\n", buf, NULL);
- xmlFree(buf);
- } else {
+ if (IS_CHAR(cur)) {
NEXT;
if ((ctxt->sax != NULL) && (ctxt->sax->comment != NULL) &&
(!ctxt->disableSAX))
ctxt->sax->comment(ctxt->userData, buf);
xmlFree(buf);
+ ctxt->instate = state;
+ return;
}
- ctxt->instate = state;
+
+unfinished:
+ htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED,
+ "Comment not terminated \n<!--%.50s\n", buf, NULL);
+ xmlFree(buf);
}
/**
--
cgit v0.11.2
+229
View File
@@ -0,0 +1,229 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
PYTHON_COMPAT=( python2_7 python3_{3,4,5} )
PYTHON_REQ_USE="xml"
inherit libtool flag-o-matic eutils python-r1 autotools prefix multilib-minimal
DESCRIPTION="Version 2 of the library to manipulate XML files"
HOMEPAGE="http://www.xmlsoft.org/"
LICENSE="MIT"
SLOT="2"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~ppc-aix ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x64-freebsd ~x86-freebsd ~hppa-hpux ~ia64-hpux ~x86-interix ~amd64-linux ~arm-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris ~x86-winnt"
IUSE="debug examples icu ipv6 lzma python readline static-libs test"
XSTS_HOME="http://www.w3.org/XML/2004/xml-schema-test-suite"
XSTS_NAME_1="xmlschema2002-01-16"
XSTS_NAME_2="xmlschema2004-01-14"
XSTS_TARBALL_1="xsts-2002-01-16.tar.gz"
XSTS_TARBALL_2="xsts-2004-01-14.tar.gz"
XMLCONF_TARBALL="xmlts20080827.tar.gz"
SRC_URI="ftp://xmlsoft.org/${PN}/${PN}-${PV/_rc/-rc}.tar.gz
test? (
${XSTS_HOME}/${XSTS_NAME_1}/${XSTS_TARBALL_1}
${XSTS_HOME}/${XSTS_NAME_2}/${XSTS_TARBALL_2}
http://www.w3.org/XML/Test/${XMLCONF_TARBALL} )"
COMMON_DEPEND="
>=sys-libs/zlib-1.2.8-r1:=[${MULTILIB_USEDEP}]
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
lzma? ( >=app-arch/xz-utils-5.0.5-r1:=[${MULTILIB_USEDEP}] )
python? ( ${PYTHON_DEPS} )
readline? ( sys-libs/readline:= )
"
RDEPEND="${COMMON_DEPEND}
abi_x86_32? ( !<=app-emulation/emul-linux-x86-baselibs-20131008-r6
!app-emulation/emul-linux-x86-baselibs[-abi_x86_32(-)] )
"
DEPEND="${COMMON_DEPEND}
dev-util/gtk-doc-am
virtual/pkgconfig
hppa? ( >=sys-devel/binutils-2.15.92.0.2 )
"
S="${WORKDIR}/${PN}-${PV%_rc*}"
MULTILIB_CHOST_TOOLS=(
/usr/bin/xml2-config
)
src_unpack() {
# ${A} isn't used to avoid unpacking of test tarballs into $WORKDIR,
# as they are needed as tarballs in ${S}/xstc instead and not unpacked
unpack ${P/_rc/-rc}.tar.gz
cd "${S}"
if use test; then
cp "${DISTDIR}/${XSTS_TARBALL_1}" \
"${DISTDIR}/${XSTS_TARBALL_2}" \
"${S}"/xstc/ \
|| die "Failed to install test tarballs"
unpack ${XMLCONF_TARBALL}
fi
}
src_prepare() {
DOCS=( AUTHORS ChangeLog NEWS README* TODO* )
# Patches needed for prefix support
epatch "${FILESDIR}"/${PN}-2.7.1-catalog_path.patch
# Fix build for Windows platform
epatch "${FILESDIR}"/${PN}-2.8.0_rc1-winnt.patch
# Disable programs that we don't actually install.
epatch "${FILESDIR}"/${PN}-2.9.2-disable-tests.patch
# Fix zlib parameter handling for cross-compilation
# https://bugzilla.gnome.org/show_bug.cgi?id=749416
epatch "${FILESDIR}"/${PN}-2.9.2-cross-compile.patch
# Use pkgconfig to find icu to properly support multilib
# https://bugs.gentoo.org/show_bug.cgi?id=738751
epatch "${FILESDIR}"/${PN}-2.9.2-icu-pkgconfig.patch
# Important patches from master
epatch \
"${FILESDIR}"/${PN}-2.9.2-revert-missing-initialization.patch \
"${FILESDIR}"/${PN}-2.9.2-missing-entities.patch \
"${FILESDIR}"/${PN}-2.9.2-threads-declarations.patch \
"${FILESDIR}"/${PN}-2.9.2-timsort.patch \
"${FILESDIR}"/${PN}-2.9.2-cve-2015-7941-1.patch \
"${FILESDIR}"/${PN}-2.9.2-cve-2015-7941-2.patch \
"${FILESDIR}"/${PN}-2.9.2-constant-memory.patch \
"${FILESDIR}"/${PN}-2.9.2-overflow-conditional-sections-1.patch \
"${FILESDIR}"/${PN}-2.9.2-overflow-conditional-sections-2.patch \
"${FILESDIR}"/${PN}-2.9.2-unclosed-comments.patch \
"${FILESDIR}"/${PN}-2.9.2-cve-2015-8035.patch \
"${FILESDIR}"/${PN}-2.9.2-fix-lzma.patch
# Please do not remove, as else we get references to PORTAGE_TMPDIR
# in /usr/lib/python?.?/site-packages/libxml2mod.la among things.
# We now need to run eautoreconf at the end to prevent maintainer mode.
# elibtoolize
# epunt_cxx # if we don't eautoreconf
eautoreconf
}
multilib_src_configure() {
# filter seemingly problematic CFLAGS (#26320)
filter-flags -fprefetch-loop-arrays -funroll-loops
# USE zlib support breaks gnome2
# (libgnomeprint for instance fails to compile with
# fresh install, and existing) - <azarah@gentoo.org> (22 Dec 2002).
# The meaning of the 'debug' USE flag does not apply to the --with-debug
# switch (enabling the libxml2 debug module). See bug #100898.
# --with-mem-debug causes unusual segmentation faults (bug #105120).
libxml2_configure() {
ECONF_SOURCE="${S}" econf \
--with-html-subdir=${PF}/html \
--docdir="${EPREFIX}/usr/share/doc/${PF}" \
$(use_with debug run-debug) \
$(use_with icu) \
$(use_with lzma) \
$(use_enable ipv6) \
$(use_enable static-libs static) \
$(multilib_native_use_with readline) \
$(multilib_native_use_with readline history) \
"$@"
}
libxml2_py_configure() {
mkdir -p "${BUILD_DIR}" || die # ensure python build dirs exist
run_in_build_dir libxml2_configure "--with-python=${PYTHON}" # odd build system
}
libxml2_configure --without-python # build python bindings separately
if multilib_is_native_abi && use python; then
python_foreach_impl libxml2_py_configure
fi
}
multilib_src_compile() {
default
if multilib_is_native_abi && use python; then
local native_builddir=${BUILD_DIR}
python_foreach_impl libxml2_py_emake top_builddir="${native_builddir}" all
fi
}
multilib_src_test() {
default
multilib_is_native_abi && use python && python_foreach_impl libxml2_py_emake test
}
multilib_src_install() {
emake DESTDIR="${D}" \
EXAMPLES_DIR="${EPREFIX}"/usr/share/doc/${PF}/examples install
if multilib_is_native_abi && use python; then
python_foreach_impl libxml2_py_emake \
DESTDIR="${D}" \
exampledir="${EPREFIX}"/usr/share/doc/${PF}/python/examples
python_foreach_impl python_optimize
fi
}
multilib_src_install_all() {
# on windows, xmllint is installed by interix libxml2 in parent prefix.
# this is the version to use. the native winnt version does not support
# symlinks, which makes repoman fail if the portage tree is linked in
# from another location (which is my default). -- mduft
if [[ ${CHOST} == *-winnt* ]]; then
rm -rf "${ED}"/usr/bin/xmllint
rm -rf "${ED}"/usr/bin/xmlcatalog
fi
rm -rf "${ED}"/usr/share/doc/${P}
einstalldocs
if use python ; then
docinto python
dodoc "${S}"/python/TODO
fi
if ! use examples; then
rm -rf "${ED}"/usr/share/doc/${PF}/examples
rm -rf "${ED}"/usr/share/doc/${PF}/python/examples
fi
prune_libtool_files --modules
}
pkg_postinst() {
# We don't want to do the xmlcatalog during stage1, as xmlcatalog will not
# be in / and stage1 builds to ROOT=/tmp/stage1root. This fixes bug #208887.
if [[ "${ROOT}" != "/" ]]; then
elog "Skipping XML catalog creation for stage building (bug #208887)."
else
# need an XML catalog, so no-one writes to a non-existent one
CATALOG="${EROOT}etc/xml/catalog"
# we dont want to clobber an existing catalog though,
# only ensure that one is there
# <obz@gentoo.org>
if [[ ! -e ${CATALOG} ]]; then
[[ -d "${EROOT}etc/xml" ]] || mkdir -p "${EROOT}etc/xml"
"${EPREFIX}"/usr/bin/xmlcatalog --create > "${CATALOG}"
einfo "Created XML catalog in ${CATALOG}"
fi
fi
}
libxml2_py_emake() {
pushd "${BUILD_DIR}/python" > /dev/null || die
emake "$@"
popd > /dev/null
}
+2
View File
@@ -1,3 +1,5 @@
DIST haproxy-1.4.26.tar.gz 837280 SHA256 a8787dae723c045eebd0ed9e0213514f909a67325d64e963eaf50c35b147d3d3 SHA512 f21901069f651f3320c2b7cb6aee96fced5d4d5d4a73eec0d94dd8bd109a391d8da85026389e7209f85026cdefc1b879afcfd0a9bc0970e41aedd59e35935454 WHIRLPOOL 406b7f8bb4b9b3f6b8080f58431a804abea1d834ef9b8d86ede328b27e4f3fe944fbdae5bad8c3f7da75c81c92ff0e030950e09feac28eac4f763e511b5e7dce
DIST haproxy-1.5.14.tar.gz 1345345 SHA256 9565dd38649064d0350a2883fa81ccfe92eb17dcda457ebdc01535e1ab0c8f99 SHA512 83d6101fd402f37845ab3febc914335e4c6d9bdebbb0ff81c8e048d5252ffa5a1b77c4250a434fed5dd541ef1f1f2c47d969b59f7a51d6ab9aea38a8646a9798 WHIRLPOOL 7d2c580589b9b31e1eba169e4bf930ac42d2564e21eb1c25adbdd39b701abd221fd671ebc227167ab956a48b2c30eeb740a6394355a8fa748c408ee42fdff6fc
DIST haproxy-1.5.15.tar.gz 1356790 SHA256 5af46e1438601d0919f5628081f660f9533087d88af3d9274f245395475663e1 SHA512 9c4f1b5ebd2401e5a13f5929b3d8fc7f93fde694971a8f0cead8ad3d166779b1dd0e3da9c872f4681d7fc55d87ff4cb4396024eea34e1482d400707d275d4715 WHIRLPOOL d37d4f9d8dccd24d2955eda9ff16a114d5d005f3589713c9607aec2f83dc24fc7f8f0c47b1067547e3fb84acaae6f68a7432c7fb3120ccb16c874bceb0e80792
DIST haproxy-1.6.1.tar.gz 1538337 SHA256 71da2abe610ed42afd6678c2e95321db5f3c416fe2803235f75fc459d8246289 SHA512 ffb71b4a7fc4d4ede6c479689f6073e7e436b21f8e5010bf6bf73fce60c1cde0f02fd15a60e0c1ee5e15d0561b8b7c931bcdbb11058afc18c501e46179675c7f WHIRLPOOL 7751b35ba576329b7c68b93fddb0d1f4772c436d11945e3d1ceb69e5448d11d51530a277f810450b7a2265b5dd81a802e996c20a9547aac679628900bf129436
DIST haproxy-1.6.2.tar.gz 1538976 SHA256 bd4a7eee79e1bfd25af59d956bb60e82acbb6f146f3fb3b30636036f4c9548d3 SHA512 8cb1f2bb7e63e75b1350e37b4a06dae9627bc6004ceefc0e3dac7c6f56ea66cdc41ebaee0e536a5acbd4e5b067feba2589d3e360dd7fdc6d3d67c000f6c83ba9 WHIRLPOOL 9c4461c74959e896c0135bcd87830667ff8aa8fe23019ca0e4bc97a981acda75026f067bf860cde984adfa76db8ac8dea351cd2ec45c28d61587ea1dea9fe914
+135
View File
@@ -0,0 +1,135 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit user versionator toolchain-funcs flag-o-matic systemd
MY_P="${PN}-${PV/_beta/-dev}"
DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
HOMEPAGE="http://haproxy.1wt.eu"
SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="+crypt examples +pcre pcre-jit ssl tools vim-syntax +zlib"
DEPEND="pcre? ( dev-libs/libpcre
pcre-jit? ( dev-libs/libpcre[jit] )
)
ssl? ( dev-libs/openssl:0[zlib?] )
zlib? ( sys-libs/zlib )"
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
pkg_setup() {
enewgroup haproxy
enewuser haproxy -1 -1 -1 haproxy
}
src_prepare() {
sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
> contrib/systemd/haproxy.service || die
sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
}
src_compile() {
local args="TARGET=linux2628 USE_GETADDRINFO=1"
if use pcre ; then
args="${args} USE_PCRE=1"
if use pcre-jit; then
args="${args} USE_PCRE_JIT=1"
else
args="${args} USE_PCRE_JIT="
fi
else
args="${args} USE_PCRE= USE_PCRE_JIT="
fi
# if use kernel_linux; then
# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
# else
# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY="
# fi
if use crypt ; then
args="${args} USE_LIBCRYPT=1"
else
args="${args} USE_LIBCRYPT="
fi
if use ssl ; then
args="${args} USE_OPENSSL=1"
else
args="${args} USE_OPENSSL="
fi
if use zlib ; then
args="${args} USE_ZLIB=1"
else
args="${args} USE_ZLIB="
fi
# For now, until the strict-aliasing breakage will be fixed
append-cflags -fno-strict-aliasing
emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
if use tools ; then
for contrib in halog iprange ; do
emake -C contrib/${contrib} \
CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
done
fi
}
src_install() {
dobin haproxy
newinitd "${FILESDIR}/haproxy.initd-r2" haproxy
# Don't install useless files
# rm examples/build.cfg doc/*gpl.txt
dodoc CHANGELOG ROADMAP doc/{configuration,haproxy-en}.txt
doman doc/haproxy.1
dobin haproxy-systemd-wrapper
systemd_dounit contrib/systemd/haproxy.service
if use tools ; then
for contrib in halog iprange ; do
dobin contrib/${contrib}/${contrib}
done
fi
if use examples ; then
docinto examples
dodoc examples/*.cfg
fi
if use vim-syntax ; then
insinto /usr/share/vim/vimfiles/syntax
doins examples/haproxy.vim
fi
}
pkg_postinst() {
if [[ ! -f "${ROOT}/etc/haproxy.cfg" ]] ; then
ewarn "You need to create /etc/haproxy.cfg before you start the haproxy service."
ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
ewarn "Make use of them with the \"user\" and \"group\" directives."
if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then
einfo "Please consult the installed documentation for learning the configuration file's syntax."
einfo "The documentation and sample configuration files are installed here:"
einfo " ${ROOT}usr/share/doc/${PF}"
fi
fi
}
+161
View File
@@ -0,0 +1,161 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="5"
inherit user versionator toolchain-funcs flag-o-matic systemd linux-info
MY_P="${PN}-${PV/_beta/-dev}"
DESCRIPTION="A TCP/HTTP reverse proxy for high availability environments"
HOMEPAGE="http://haproxy.1wt.eu"
SRC_URI="http://haproxy.1wt.eu/download/$(get_version_component_range 1-2)/src/${MY_P}.tar.gz"
LICENSE="GPL-2 LGPL-2.1"
SLOT="0"
KEYWORDS="~amd64 ~ppc ~x86"
IUSE="+crypt doc examples net_ns +pcre pcre-jit ssl tools vim-syntax +zlib" # lua
DEPEND="pcre? ( dev-libs/libpcre
pcre-jit? ( dev-libs/libpcre[jit] )
)
ssl? ( dev-libs/openssl:0[zlib?] )
zlib? ( sys-libs/zlib )"
# lua? ( dev-lang/lua:5.3 )
RDEPEND="${DEPEND}"
S="${WORKDIR}/${MY_P}"
pkg_setup() {
enewgroup haproxy
enewuser haproxy -1 -1 -1 haproxy
if use net_ns; then
CONFIG_CHECK="~NET_NS"
linux-info_pkg_setup
fi
}
src_prepare() {
sed -e 's:@SBINDIR@:'/usr/bin':' contrib/systemd/haproxy.service.in \
> contrib/systemd/haproxy.service || die
sed -ie 's:/usr/sbin/haproxy:/usr/bin/haproxy:' src/haproxy-systemd-wrapper.c || die
}
src_compile() {
local args="TARGET=linux2628 USE_GETADDRINFO=1"
if use crypt ; then
args="${args} USE_LIBCRYPT=1"
else
args="${args} USE_LIBCRYPT="
fi
# bug 541042
# if use lua; then
# args="${args} USE_LUA=1"
# else
args="${args} USE_LUA="
# fi
if use net_ns; then
args="${args} USE_NS=1"
else
args="${args} USE_NS="
fi
if use pcre ; then
args="${args} USE_PCRE=1"
if use pcre-jit; then
args="${args} USE_PCRE_JIT=1"
else
args="${args} USE_PCRE_JIT="
fi
else
args="${args} USE_PCRE= USE_PCRE_JIT="
fi
# if use kernel_linux; then
# args="${args} USE_LINUX_SPLICE=1 USE_LINUX_TPROXY=1"
# else
# args="${args} USE_LINUX_SPLICE= USE_LINUX_TPROXY="
# fi
if use ssl ; then
args="${args} USE_OPENSSL=1"
else
args="${args} USE_OPENSSL="
fi
if use zlib ; then
args="${args} USE_ZLIB=1"
else
args="${args} USE_ZLIB="
fi
# For now, until the strict-aliasing breakage will be fixed
append-cflags -fno-strict-aliasing
emake CFLAGS="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
if use tools ; then
for contrib in halog iprange ; do
emake -C contrib/${contrib} \
CFLAGS="${CFLAGS}" OPTIMIZE="${CFLAGS}" LDFLAGS="${LDFLAGS}" CC=$(tc-getCC) ${args}
done
fi
}
src_install() {
dobin haproxy
newconfd "${FILESDIR}/${PN}.confd" $PN
newinitd "${FILESDIR}/${PN}.initd-r3" $PN
dodoc CHANGELOG CONTRIBUTING MAINTAINERS
doman doc/haproxy.1
dobin haproxy-systemd-wrapper
systemd_dounit contrib/systemd/haproxy.service
if use doc; then
dodoc ROADMAP doc/{close-options,configuration,cookie-options,intro,linux-syn-cookies,management,proxy-protocol}.txt
fi
if use tools ; then
for contrib in halog iprange ; do
dobin contrib/${contrib}/${contrib}
done
fi
if use net_ns && use doc; then
dodoc doc/network-namespaces.txt
fi
if use examples ; then
docinto examples
dodoc examples/*.cfg
dodoc examples/seamless_reload.txt
fi
if use vim-syntax ; then
insinto /usr/share/vim/vimfiles/syntax
doins examples/haproxy.vim
fi
}
pkg_postinst() {
if [[ ! -f "${ROOT}/etc/haproxy/haproxy.cfg" ]] ; then
ewarn "You need to create /etc/haproxy/haproxy.cfg before you start the haproxy service."
ewarn "It's best practice to not run haproxy as root, user and group haproxy was therefore created."
ewarn "Make use of them with the \"user\" and \"group\" directives."
if [[ -d "${ROOT}/usr/share/doc/${PF}" ]]; then
einfo "Please consult the installed documentation for learning the configuration file's syntax."
einfo "The documentation and sample configuration files are installed here:"
einfo " ${ROOT}usr/share/doc/${PF}"
fi
fi
}