From 8376ef56580626e9c0f796d5b85b53a0a1c7d5f5 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sat, 14 Jul 2018 21:03:06 +0100 Subject: gentoo resync : 14.07.2018 --- app-text/htmltidy/Manifest | 7 ++ app-text/htmltidy/files/11CVE-2015-5522.patch | 34 ++++++++++ .../htmltidy/files/htmltidy-20090325-tidyrc.patch | 31 +++++++++ .../files/htmltidy-5.10.26-strip-O2-flag.patch | 12 ++++ app-text/htmltidy/htmltidy-20090325-r2.ebuild | 79 ++++++++++++++++++++++ app-text/htmltidy/metadata.xml | 8 +++ 6 files changed, 171 insertions(+) create mode 100644 app-text/htmltidy/Manifest create mode 100644 app-text/htmltidy/files/11CVE-2015-5522.patch create mode 100644 app-text/htmltidy/files/htmltidy-20090325-tidyrc.patch create mode 100644 app-text/htmltidy/files/htmltidy-5.10.26-strip-O2-flag.patch create mode 100644 app-text/htmltidy/htmltidy-20090325-r2.ebuild create mode 100644 app-text/htmltidy/metadata.xml (limited to 'app-text/htmltidy') diff --git a/app-text/htmltidy/Manifest b/app-text/htmltidy/Manifest new file mode 100644 index 000000000000..0b2f4463931c --- /dev/null +++ b/app-text/htmltidy/Manifest @@ -0,0 +1,7 @@ +AUX 11CVE-2015-5522.patch 1387 BLAKE2B 0a33769a37f78693025a3fb7e2bdcb6d02634df7c7cb417bad760ddc6318a51d1def3dc318a06b4182a916e664a0b47e2e3b8e40dfaff3616745c668b5b81a56 SHA512 d543dcf963fca7eaf644033a6f0252ec16b628984e1acd86fdb6d4657f01a2b3010c4c5f41b48126ce91cd38b5902349289ae4e11376cdc827813aac84b83f2c +AUX htmltidy-20090325-tidyrc.patch 923 BLAKE2B 1ce5800a8991d37edb48d652c03525ce68cc97488dd0fda0214b4437b6f9bc29e0e29f046328bd1df4eb0143757d7b866df06fd302d2b2c367817e0deec5202a SHA512 2acef36a990196c4c995a4678988f5f4bc51b87c17a01843b1f7cefc4ff1062425d366b29ace0839ea8b6b64a8923c5f56ac4048106825b946059eae8951e326 +AUX htmltidy-5.10.26-strip-O2-flag.patch 370 BLAKE2B 7c2a58a6a8c00460871278f59676d3b8b8077a7cf2fc1f65dc9ae2987e06d760c73177baa37a197eb0f45f3a5c09bc2030f556948cfd2470fabe2bd734527e3d SHA512 671a0ef17388fb39d5623e0dd2b8aa6c55c22d9f3ba8eea093ddea1234a2786ef983cbe9dd7002fe04b2986ae888458f4f44120c47aa34dc145d34d9db2f81d7 +DIST tidy-20090325-doc.tar.bz2 13319 BLAKE2B c55c5e10cdfbf0eb62685955cad24f628c21e612bd12c41018c139b3b93db95cc201888f6766d7f68f2d1c4d4cfb2cab25b668eff0d2d241462f4cf9b65e79e1 SHA512 0224d1f839f3829a9c879eba8a98ceee3b0c9f8bfe1721076859714428d534f492acd11e49992fccc2e45afd64d79067793c90f7af06d623ef89e7c16dfee35b +DIST tidy-20090325.tar.bz2 382016 BLAKE2B 3373e94d54cfef866e701e2e258be821b8749dbbbc37b10e4e4e4ba6d7f5995676161ac11bc6a2497f5e02c3907f680fabe9ac6dec2f2365aeb39c03b9697e0a SHA512 daeab2c3dd7f1248a5dbc1585267a8fdb0be09a940b79c3e53c97051f692cf85ea9f0a267f37e1c877054b77efb836d422a1e7ff61b22b383a2d2ac08939b970 +EBUILD htmltidy-20090325-r2.ebuild 2003 BLAKE2B 43116843d4c9eaacdb91822247b6a96868654c87ee92f180fb7112e87644ab66a09d4e105c1e4f983e700708b46aafe3bec67168698e890a42a90042ca68ed80 SHA512 c16aa9a70389e21ba8260fc2118bc36889350d95fc53ea7350279f8fb70252182156cb21efdcd8c2b31181ef18e0e53a499859064cc73149cb6d60ed328ef09a +MISC metadata.xml 241 BLAKE2B bd724ebe3c99c206e2e78f9bdab811083ca54eafaf1e283f4913af473e6e9710f380021fcb71cc863bfc3cc0984475adff5d5f5e938b55c533ebc7460c597ee1 SHA512 3f74e1d47cf7af59d7255fbb4e6f04fc372447cc101a524779ac59bdc4acba08d53756350575e377f2ccf0ebf309f499ec81fda9d7cd93d234e53dd06cf504ba diff --git a/app-text/htmltidy/files/11CVE-2015-5522.patch b/app-text/htmltidy/files/11CVE-2015-5522.patch new file mode 100644 index 000000000000..b4d6158ea04a --- /dev/null +++ b/app-text/htmltidy/files/11CVE-2015-5522.patch @@ -0,0 +1,34 @@ +From c18f27a58792f7fbd0b30a0ff50d6b40a82f940d Mon Sep 17 00:00:00 2001 +From: Geoff McLane +Date: Wed, 3 Jun 2015 20:26:03 +0200 +Subject: [PATCH] Issue #217 - avoid len going negative, ever... + +--- + src/lexer.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/lexer.c b/src/lexer.c +index 376a3d8..664f806 100644 +--- a/src/lexer.c ++++ b/src/lexer.c +@@ -3739,16 +3740,17 @@ static tmbstr ParseValue( TidyDocImpl* doc, ctmbstr name, + /* and prompts attributes unless --literal-attributes is set to yes */ + /* #994841 - Whitespace is removed from value attributes */ + +- if (munge && ++ /* Issue #217 - Also only if/while (len > 0) - MUST NEVER GO NEGATIVE! */ ++ if ((len > 0) && munge && + TY_(tmbstrcasecmp)(name, "alt") && + TY_(tmbstrcasecmp)(name, "title") && + TY_(tmbstrcasecmp)(name, "value") && + TY_(tmbstrcasecmp)(name, "prompt")) + { +- while (TY_(IsWhite)(lexer->lexbuf[start+len-1])) ++ while (TY_(IsWhite)(lexer->lexbuf[start+len-1]) && (len > 0)) + --len; + +- while (TY_(IsWhite)(lexer->lexbuf[start]) && start < len) ++ while (TY_(IsWhite)(lexer->lexbuf[start]) && (start < len) && (len > 0)) + { + ++start; + --len; diff --git a/app-text/htmltidy/files/htmltidy-20090325-tidyrc.patch b/app-text/htmltidy/files/htmltidy-20090325-tidyrc.patch new file mode 100644 index 000000000000..942a61e1464c --- /dev/null +++ b/app-text/htmltidy/files/htmltidy-20090325-tidyrc.patch @@ -0,0 +1,31 @@ +Index: tidy-20090325/include/platform.h +=================================================================== +--- tidy-20090325.orig/include/platform.h ++++ tidy-20090325/include/platform.h +@@ -24,7 +24,7 @@ extern "C" { + */ + + /* #define TIDY_CONFIG_FILE "/etc/tidy_config.txt" */ /* original */ +-/* #define TIDY_CONFIG_FILE "/etc/tidyrc" */ ++#define TIDY_CONFIG_FILE "/etc/tidyrc" + /* #define TIDY_CONFIG_FILE "/etc/tidy.conf" */ + + /* +@@ -33,7 +33,7 @@ extern "C" { + It enables tidy to find config files named ~/.tidyrc if + the HTML_TIDY environment variable is not set. + */ +-/* #define TIDY_USER_CONFIG_FILE "~/.tidyrc" */ ++#define TIDY_USER_CONFIG_FILE "~/.tidyrc" + + /* + Uncomment the following #define if your +@@ -48,7 +48,7 @@ extern "C" { + Contributed by Todd Lewis. + */ + +-/* #define SUPPORT_GETPWNAM */ ++#define SUPPORT_GETPWNAM + + + /* Enable/disable support for Big5 and Shift_JIS character encodings */ diff --git a/app-text/htmltidy/files/htmltidy-5.10.26-strip-O2-flag.patch b/app-text/htmltidy/files/htmltidy-5.10.26-strip-O2-flag.patch new file mode 100644 index 000000000000..4c805cf2226f --- /dev/null +++ b/app-text/htmltidy/files/htmltidy-5.10.26-strip-O2-flag.patch @@ -0,0 +1,12 @@ +diff -urN tidy.old/configure.in tidy-26/configure.in +--- tidy.old/configure.in 2006-02-13 17:17:49.000000000 +0100 ++++ tidy-26/configure.in 2006-02-13 17:17:20.000000000 +0100 +@@ -72,7 +72,7 @@ + if test $debug_build = yes; then + CFLAGS="$save_cflags -g" + else +- CFLAGS="-O2 $save_cflags" ++ CFLAGS="$save_cflags" + fi + # + # ============================================= diff --git a/app-text/htmltidy/htmltidy-20090325-r2.ebuild b/app-text/htmltidy/htmltidy-20090325-r2.ebuild new file mode 100644 index 000000000000..d3a18bca8cce --- /dev/null +++ b/app-text/htmltidy/htmltidy-20090325-r2.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2018 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=5 + +MY_PN="tidy" +MY_P="${MY_PN}-${PV}" + +inherit eutils autotools + +DESCRIPTION="Tidy the layout and correct errors in HTML and XML documents" +HOMEPAGE="http://tidy.sourceforge.net/" +SRC_URI="mirror://gentoo/${MY_P}.tar.bz2 + mirror://gentoo/${MY_P}-doc.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="debug doc static-libs" + +DEPEND="doc? ( app-doc/doxygen )" +RDEPEND="" + +S="${WORKDIR}"/${MY_P} + +src_prepare() { + # Required to setup the source dist for autotools + einfo "Setting up autotools for source build" + cp -R ./build/gnuauto/* . || die "could not prepare autotools environment" + + # Stop tidy from appending -O2 to our CFLAGS + epatch "${FILESDIR}"/htmltidy-5.10.26-strip-O2-flag.patch + + # Define /etc/tidyrc for system wide config, bug 154834 + epatch "${FILESDIR}"/htmltidy-20090325-tidyrc.patch + + # Fix security bug 561452 + epatch "${FILESDIR}"/11CVE-2015-5522.patch + + eautoreconf +} + +src_compile() { + default + + if use doc ; then + doxygen htmldoc/doxygen.cfg || die "error making apidocs" + fi +} + +src_configure() { + econf \ + $(use_enable debug) \ + $(use_enable static-libs static) +} + +src_install() { + default + + find "${ED}" -name '*.la' -exec rm -f {} + + + # Now the man page is provided as an xsl file, which + # we can't use until htmltidy is merged. + # I have generated the man page and quickref which is on + # the mirrors. (bug #132429) + doman "${WORKDIR}"/"${MY_P}"-doc/tidy.1 + + # Fix name before installing + mv "${WORKDIR}"/"${MY_P}"-doc/quickref-html \ + "${WORKDIR}"/"${MY_P}"-doc/quickref.html + + cd "${S}"/htmldoc + # Install basic html documentation + dohtml *.html *.css *.gif "${WORKDIR}"/"${MY_P}"-doc/quickref.html + + # If use 'doc' is set, then we also want to install the + # api documentation + use doc && dohtml -r api +} diff --git a/app-text/htmltidy/metadata.xml b/app-text/htmltidy/metadata.xml new file mode 100644 index 000000000000..3fbef354e7d1 --- /dev/null +++ b/app-text/htmltidy/metadata.xml @@ -0,0 +1,8 @@ + + + + + + tidy + + -- cgit v1.2.3