diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-perl/XML-LibXML |
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-perl/XML-LibXML')
-rw-r--r-- | dev-perl/XML-LibXML/Manifest | 8 | ||||
-rw-r--r-- | dev-perl/XML-LibXML/XML-LibXML-2.12.800-r1.ebuild | 69 | ||||
-rw-r--r-- | dev-perl/XML-LibXML/XML-LibXML-2.12.900.ebuild | 69 | ||||
-rw-r--r-- | dev-perl/XML-LibXML/files/XML-LibXML-2.12.800-disable-expanding.patch | 72 | ||||
-rw-r--r-- | dev-perl/XML-LibXML/metadata.xml | 47 |
5 files changed, 265 insertions, 0 deletions
diff --git a/dev-perl/XML-LibXML/Manifest b/dev-perl/XML-LibXML/Manifest new file mode 100644 index 000000000000..5965a60688cc --- /dev/null +++ b/dev-perl/XML-LibXML/Manifest @@ -0,0 +1,8 @@ +AUX XML-LibXML-2.12.800-disable-expanding.patch 2608 SHA256 de2478b37bee2e5f66f8f458407419f97dc1d017c80d3f27024fb2179f67ddcb SHA512 77d620da3315c930e42bbc4d0f5a528f6f2d3cbf70e5ea1d0ab461244a898260617c59aa92d41aab6b1c5b8c2ccc9cb0a9f0030bf0ece90a94e98994bfd3a0cf WHIRLPOOL b1a7f840cec2fff093a43a2d225f86aab0b1a74bd7582b54992270397ed52fe0d74c1db89ed51118276ad92515d2d15ede9e5611083bf49552f501faa192f931 +DIST XML-LibXML-2.0128.tar.gz 466334 SHA256 26e7ba451f3bade4d29ff00653a2ee01d13fe38b9a2ebcd0b0f3f82f9f688f2b SHA512 c388570d0a140f3b92ab9922d9c917fba791e804b160822eeff91923891059ba189ad3743f2ffd13f7f4c92a3e8db1ee5fae588007d3fcf50251d9803e8e261b WHIRLPOOL d5aa29ca1254e6c94b8b765c2d0f05ebfaef30c3f67c7d5f4ee0f6c08619627cb98590f915ec115e28898bc44f7cd675a3c5a3f7abe827ec2d57baa5c76734d2 +DIST XML-LibXML-2.0129.tar.gz 468838 SHA256 5ca0269ba06800c84061a7f3333c85fab5584d69cd7b4e0641963da7fd36b366 SHA512 f17c61052975ecc188c285ee93dbb07926c880a28e49afdd5af0c7c997e8b12be72412d0964391f1232f853935ee0ff2838cd5d62f8f3b4f52c341904069ccea WHIRLPOOL 505bb1206f87524bc7162fb5be14f8f982cd75007d0540a0bbcb78b48affe60ed4ee786257dc5c78c9bbcdba63d466ea4f7e5ace6d37d1057c253248a42788a9 +EBUILD XML-LibXML-2.12.800-r1.ebuild 1603 SHA256 697ead762d7f19f27777615b2fb5e57111514048efdfa1642c40b508746819d3 SHA512 cfe821fb467686cd4880964f6fc7530ac67bb95e341e6de550e7a9022d0bcf95830dc5781299e58f0b01a0e35dcd972dbf9d2897e587a4b25062350da367f493 WHIRLPOOL 2e9f2a083ddc8ac702ff7c404d1cb4e1f5d524a8d63faa69b2ee7fb96cc9acd9c2bee36cd6eb78083fdfa595d7296b70f04780383685b5773507208442de76ef +EBUILD XML-LibXML-2.12.900.ebuild 1623 SHA256 3b9a345fe07108e6819cfb4e60c90c7ad3418b10f4eb926ff47f9aee4b5aaac8 SHA512 65328151279a6f9183d4df179dcf561ae96f9d56769723d05c955784dcc2cebb602d725eaa2a7ba85923f7f8797372cc7f974db00da851a3d65b00fae75eefc2 WHIRLPOOL 8665dcf1aab6f770176bd8bb32cd6dc42b8119d18af717348cbd24c34a0f2d468d286a29f58da5b1a436d9c685f9425a9bcf7a1fc2e838d0b99762355b7258ed +MISC ChangeLog 4554 SHA256 6b0c235c7790a05b85a4ebad95a521ea2104fde97d50bbbf5b084d2e9de45e4c SHA512 43c631b6370186f5c5dcbe7fb2879cf86db8ef094421aab9fbff45632c5e6132bcecbe18e75fdf47a53192231cf30c5f2952cabe24d1d99c30f519a45a074be5 WHIRLPOOL fec30c248247334f332a2f5c6e9ec52063531b7a55e23b19f6f8ea49f6389fe855bdeb8fe78b59f51d02e12c9c975ee6277279e369930f22247df04a9ebde7e8 +MISC ChangeLog-2015 20395 SHA256 29516f8fb39da48978c2634cc56646d2195c0416e4b91091d78b1b18846f99a9 SHA512 20bcbbe09f16f0a38bbbb9f493ce9cadd6c5b231976a2d97e550e835e4b30b3e520dfcdb32db75efb3b0c5d78de691c4fba79ee7f28b949bc23a8ef7edf409f6 WHIRLPOOL fdfa819713de65093711c9529c6e62e576b9097cd1b39221a8e10058d1782917668b4c741ae63b2a3b5ca6b82b6e13c322b4cdb5d9fb4364379eb763d074636c +MISC metadata.xml 2782 SHA256 5ad527a0f733d03b65a825e64e29d2bc50efb58252317fa1b61ade04720a5bc9 SHA512 6353b4890d24a2ab018caa0994913a4dd6b7dd753e089f9fb0570762f75517bc8ae4e8ed3a8990ae2c75957aec0791561f00a991f1e3976c225781317fdd82dc WHIRLPOOL 0bfca38d74a897c18b6a19eaacc5e66b5e2c5025e3593ec1b7683c72cd42407885046274cb631f19ba663b6eadd21af552fcb5095311880423526561108499d5 diff --git a/dev-perl/XML-LibXML/XML-LibXML-2.12.800-r1.ebuild b/dev-perl/XML-LibXML/XML-LibXML-2.12.800-r1.ebuild new file mode 100644 index 000000000000..8c9eb17cd1ba --- /dev/null +++ b/dev-perl/XML-LibXML/XML-LibXML-2.12.800-r1.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DIST_AUTHOR=SHLOMIF +DIST_VERSION=2.0128 +DIST_EXAMPLES=("example/*") +inherit perl-module + +DESCRIPTION="Perl binding for libxml2" + +SLOT="0" +KEYWORDS="alpha amd64 arm arm64 hppa ia64 ~mips ppc ppc64 sparc x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="test minimal" + +RDEPEND=" + >=dev-perl/XML-SAX-0.120.0 + >=dev-libs/libxml2-2.6.21 + dev-perl/XML-SAX-Base + >=dev-perl/XML-NamespaceSupport-1.70.0 +" +DEPEND="${RDEPEND} + virtual/perl-ExtUtils-MakeMaker + test? ( + !minimal? ( + dev-perl/Test-LeakTrace + ) + ) +" + +PATCHES=( + "${FILESDIR}/${P}-disable-expanding.patch" +) + +src_compile() { + export SKIP_SAX_INSTALL=1 + perl-module_src_compile +} + +src_test() { + perl_rm_files t/pod.t t/style-trailing-space.t t/cpan-changes.t + perl-module_src_test +} + +pkg_postinst() { + pkg_update_parser add XML::LibXML::SAX::Parser + pkg_update_parser add XML::LibXML::SAX +} + +pkg_postrm() { + pkg_update_parser remove XML::LibXML::SAX::Parser + pkg_update_parser remove XML::LibXML::SAX +} + +pkg_update_parser() { + # pkg_update_parser [add|remove] $parser_module + local action=$1 + local parser_module=$2 + + if [[ "$ROOT" = "/" ]] ; then + einfo "Update Parser: $1 $2" + perl -MXML::SAX -e "XML::SAX->${action}_parser(q(${parser_module}))->save_parsers()" \ + || ewarn "Update Parser: $1 $2 failed" + else + elog "To $1 $2 run:" + elog "perl -MXML::SAX -e 'XML::SAX->${action}_parser(q(${parser_module}))->save_parsers()'" + fi +} diff --git a/dev-perl/XML-LibXML/XML-LibXML-2.12.900.ebuild b/dev-perl/XML-LibXML/XML-LibXML-2.12.900.ebuild new file mode 100644 index 000000000000..1d411d0f9bba --- /dev/null +++ b/dev-perl/XML-LibXML/XML-LibXML-2.12.900.ebuild @@ -0,0 +1,69 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DIST_AUTHOR=SHLOMIF +DIST_VERSION=2.0129 +DIST_EXAMPLES=("example/*") +inherit perl-module + +DESCRIPTION="Perl binding for libxml2" + +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~x64-solaris ~x86-solaris" +IUSE="test minimal" + +RDEPEND=" + >=dev-perl/XML-SAX-0.120.0 + >=dev-libs/libxml2-2.6.21 + dev-perl/XML-SAX-Base + >=dev-perl/XML-NamespaceSupport-1.70.0 +" +DEPEND="${RDEPEND} + virtual/perl-ExtUtils-MakeMaker + test? ( + !minimal? ( + dev-perl/Test-LeakTrace + ) + ) +" + +PATCHES=( + "${FILESDIR}/${PN}-2.12.800-disable-expanding.patch" +) + +src_compile() { + export SKIP_SAX_INSTALL=1 + perl-module_src_compile +} + +src_test() { + perl_rm_files t/pod.t t/style-trailing-space.t t/cpan-changes.t + perl-module_src_test +} + +pkg_postinst() { + pkg_update_parser add XML::LibXML::SAX::Parser + pkg_update_parser add XML::LibXML::SAX +} + +pkg_postrm() { + pkg_update_parser remove XML::LibXML::SAX::Parser + pkg_update_parser remove XML::LibXML::SAX +} + +pkg_update_parser() { + # pkg_update_parser [add|remove] $parser_module + local action=$1 + local parser_module=$2 + + if [[ "$ROOT" = "/" ]] ; then + einfo "Update Parser: $1 $2" + perl -MXML::SAX -e "XML::SAX->${action}_parser(q(${parser_module}))->save_parsers()" \ + || ewarn "Update Parser: $1 $2 failed" + else + elog "To $1 $2 run:" + elog "perl -MXML::SAX -e 'XML::SAX->${action}_parser(q(${parser_module}))->save_parsers()'" + fi +} diff --git a/dev-perl/XML-LibXML/files/XML-LibXML-2.12.800-disable-expanding.patch b/dev-perl/XML-LibXML/files/XML-LibXML-2.12.800-disable-expanding.patch new file mode 100644 index 000000000000..8be7783ef679 --- /dev/null +++ b/dev-perl/XML-LibXML/files/XML-LibXML-2.12.800-disable-expanding.patch @@ -0,0 +1,72 @@ +From 05749ae525317d05bd9d4232c080e530854f1d88 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar@redhat.com> +Date: Fri, 30 Sep 2016 14:31:26 +0200 +Subject: [PATCH] Do not enable expanding entities by default +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +Expanding external entity is insecure. +<https://www.owasp.org/index.php/XML_External_Entity_(XXE)_Processing>. +This patch makes expand_entities option disabled by default. + +CPAN RT#118032 + +Signed-off-by: Petr Písař <ppisar@redhat.com> +--- + LibXML.pm | 2 +- + docs/libxml.dbk | 2 +- + t/43options.t | 4 ++-- + 3 files changed, 4 insertions(+), 4 deletions(-) + +diff --git a/LibXML.pm b/LibXML.pm +index eb3cbd6..9ab4748 100644 +--- a/LibXML.pm ++++ b/LibXML.pm +@@ -261,7 +261,7 @@ use constant { + HTML_PARSE_NOERROR => (1<<5), # suppress error reports + }; + +-$XML_LIBXML_PARSE_DEFAULTS = ( XML_PARSE_NODICT | XML_PARSE_DTDLOAD | XML_PARSE_NOENT ); ++$XML_LIBXML_PARSE_DEFAULTS = ( XML_PARSE_NODICT | XML_PARSE_DTDLOAD ); + + # this hash is made global so that applications can add names for new + # libxml2 parser flags as temporary workaround +diff --git a/docs/libxml.dbk b/docs/libxml.dbk +index 30f279b..2c6674b 100644 +--- a/docs/libxml.dbk ++++ b/docs/libxml.dbk +@@ -1676,7 +1676,7 @@ local $XML::LibXML::setTagCompression = 1;</programlisting> + <term>expand_entities</term> + <listitem> + <para>/parser, reader/</para> +- <para>substitute entities; possible values are 0 and 1; default is 1</para> ++ <para>substitute entities; possible values are 0 and 1; default is 0</para> + <para>Note that although this flag disables entity substitution, it + does not prevent the parser from loading external entities; + when substitution of an external entity is disabled, the +diff --git a/t/43options.t b/t/43options.t +index 826f0ad..53dd35e 100644 +--- a/t/43options.t ++++ b/t/43options.t +@@ -50,7 +50,7 @@ no_network + { + my $p = XML::LibXML->new(); + for my $opt (@all) { +- my $ret = (($opt =~ /^(?:load_ext_dtd|expand_entities)$/) ? 1 : 0); ++ my $ret = (($opt =~ /^(?:load_ext_dtd)$/) ? 1 : 0); + # TEST*$all + ok( + ($p->get_option($opt)||0) == $ret +@@ -110,7 +110,7 @@ no_network + ok( $p->get_option('recover') == 2, ' TODO : Add test name' ); + + # TEST +- ok( $p->expand_entities() == 1, ' TODO : Add test name' ); ++ ok( $p->expand_entities() == 0, ' TODO : Add test name' ); + # TEST + ok( $p->load_ext_dtd() == 1, ' TODO : Add test name' ); + $p->load_ext_dtd(0); +-- +2.7.4 + diff --git a/dev-perl/XML-LibXML/metadata.xml b/dev-perl/XML-LibXML/metadata.xml new file mode 100644 index 000000000000..2bbbf693caf3 --- /dev/null +++ b/dev-perl/XML-LibXML/metadata.xml @@ -0,0 +1,47 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="project"> + <email>perl@gentoo.org</email> + <name>Gentoo Perl Project</name> + </maintainer> + <upstream> + <remote-id type="cpan">XML-LibXML</remote-id> + <remote-id type="cpan-module">XML::LibXML</remote-id> + <remote-id type="cpan-module">XML::LibXML::Attr</remote-id> + <remote-id type="cpan-module">XML::LibXML::AttributeHash</remote-id> + <remote-id type="cpan-module">XML::LibXML::Boolean</remote-id> + <remote-id type="cpan-module">XML::LibXML::CDATASection</remote-id> + <remote-id type="cpan-module">XML::LibXML::Comment</remote-id> + <remote-id type="cpan-module">XML::LibXML::Common</remote-id> + <remote-id type="cpan-module">XML::LibXML::Devel</remote-id> + <remote-id type="cpan-module">XML::LibXML::Document</remote-id> + <remote-id type="cpan-module">XML::LibXML::DocumentFragment</remote-id> + <remote-id type="cpan-module">XML::LibXML::Dtd</remote-id> + <remote-id type="cpan-module">XML::LibXML::Element</remote-id> + <remote-id type="cpan-module">XML::LibXML::ErrNo</remote-id> + <remote-id type="cpan-module">XML::LibXML::Error</remote-id> + <remote-id type="cpan-module">XML::LibXML::InputCallback</remote-id> + <remote-id type="cpan-module">XML::LibXML::Literal</remote-id> + <remote-id type="cpan-module">XML::LibXML::NamedNodeMap</remote-id> + <remote-id type="cpan-module">XML::LibXML::Namespace</remote-id> + <remote-id type="cpan-module">XML::LibXML::Node</remote-id> + <remote-id type="cpan-module">XML::LibXML::NodeList</remote-id> + <remote-id type="cpan-module">XML::LibXML::Number</remote-id> + <remote-id type="cpan-module">XML::LibXML::PI</remote-id> + <remote-id type="cpan-module">XML::LibXML::Pattern</remote-id> + <remote-id type="cpan-module">XML::LibXML::Reader</remote-id> + <remote-id type="cpan-module">XML::LibXML::RegExp</remote-id> + <remote-id type="cpan-module">XML::LibXML::RelaxNG</remote-id> + <remote-id type="cpan-module">XML::LibXML::SAX</remote-id> + <remote-id type="cpan-module">XML::LibXML::SAX::AttributeNode</remote-id> + <remote-id type="cpan-module">XML::LibXML::SAX::Builder</remote-id> + <remote-id type="cpan-module">XML::LibXML::SAX::Generator</remote-id> + <remote-id type="cpan-module">XML::LibXML::SAX::Parser</remote-id> + <remote-id type="cpan-module">XML::LibXML::Schema</remote-id> + <remote-id type="cpan-module">XML::LibXML::Text</remote-id> + <remote-id type="cpan-module">XML::LibXML::XPathContext</remote-id> + <remote-id type="cpan-module">XML::LibXML::XPathExpression</remote-id> + <remote-id type="cpan-module">XML::LibXML::_SAXParser</remote-id> + </upstream> +</pkgmetadata> |