Skip to content

Commit

Permalink
ruby-nokogiri: update to 1.12.3.
Browse files Browse the repository at this point in the history
Upstream changes:
https://github.com/sparklemotion/nokogiri/releases

1.12.3 / 2021-08-06

Fixed

  * [CRuby] Fix compilation of libgumbo on older systems with versions of GCC
    that give errors on C99-isms. Affected systems include RHEL6, RHEL7, and
    SLES12. [#2302]

1.12.2 / 2021-08-04

Fixed

  * Ensure that C extension files in non-native gem installations are loaded
    using require and rely on $LOAD_PATH instead of using require_relative.
    This issue only exists when deleting shared libraries that exist outside
    the extensions directory, something users occasionally do to conserve disk
    space. [#2300]

1.12.1 / 2021-08-03

Fixed

  * Fix compilation of libgumbo on BSD systems by avoiding GNU-isms. [#2298]

1.12.0 / 2021-08-02

Notable Addition: HTML5 Support (CRuby only)

HTML5 support has been added (to CRuby only) by merging Nokogumbo into
Nokogiri. The Nokogumbo public API has been preserved, so this functionality is
available under the Nokogiri::HTML5 namespace. [#2204]

Please note that HTML5 support is not available for JRuby in this version.
However, we feel it is important to think about JRuby and we hope to work on
this in the future. If you're interested in helping with HTML5 support on
JRuby, please reach out to the maintainers by commenting on issue #2227.

Many thanks to Sam Ruby, Steve Checkoway, and Craig Barnes for creating and
maintaining Nokogumbo and supporting the Gumbo HTML5 parser. They're now
Nokogiri core contributors with all the powers and privileges pertaining
thereto.

Notable Change: Nokogiri::HTML4 module and namespace

Nokogiri::HTML has been renamed to Nokogiri::HTML4, and Nokogiri::HTML is
aliased to preserve backwards-compatibility. Nokogiri::HTML and Nokogiri::HTML4
parse methods still use libxml2's (or NekoHTML's) HTML4 parser in the v1.12
release series.

Take special note that if you rely on the class name of an object in your code,
objects will now report a class of Nokogiri::HTML4::Foo where they previously
reported Nokogiri::HTML::Foo. Instead of relying on the string returned by
Object#class, prefer Class#=== or Object#is_a? or Object#instance_of?.

Future releases of Nokogiri may deprecate HTML methods or otherwise change this
behavior, so please start using HTML4 in place of HTML.

Added

  * [CRuby] Nokogiri::VERSION_INFO["libxslt"]["datetime_enabled"] is a new
    boolean value which describes whether libxslt (or, more properly, libexslt)
    has compiled-in datetime support. This generally going to be true, but some
    distros ship without this support (e.g., some mingw UCRT-based packages,
    see msys2/MINGW-packages#8957). See #2272 for more details.

Changed

  * Introduce a new constant, Nokogiri::XML::ParseOptions::DEFAULT_XSLT, which
    adds the libxslt-preferred options of NOENT | DTDLOAD | DTDATTR | NOCDATA
    to ParseOptions::DEFAULT_XML.
  * Nokogiri.XSLT parses stylesheets using ParseOptions::DEFAULT_XSLT, which
    should make some edge-case XSL transformations match libxslt's default
    behavior. [#1940]

Fixed

  * [CRuby] Namespaced attributes are handled properly when their parent node
    is reparented into another document. Previously, the namespace may have
    gotten dropped. [#2228]
  * [CRuby] Reparented nodes no longer inherit their parent's namespace.
    Previously, a node without a namespace was forced to adopt its parent's
    namespace. [#1712]

Improved

  * [CRuby] Speed up (slightly) the compile time of packaged libraries
    libiconv, libxml2, and libxslt by using autoconf's
    --disable-dependency-tracking option. ("ruby" platform gem only.)

Deprecated

  * Deprecating Nokogumbo's Nokogiri::HTML5.get. This method will be removed in
    a future version of Nokogiri.

Dependencies

  * [CRuby] Upgrade mini_portile2 dependency from ~> 2.5.0 to ~> 2.6.1. ("ruby"
    platform gem only.)

1.11.7 / 2021-06-02

  * [CRuby] Backporting an upstream fix to XPath recursion depth limits which
    impacted some users of complex XPath queries. This issue is present in
    libxml 2.9.11 and 2.9.12. [#2257]

1.11.6 / 2021-05-26

Fixed

  * [CRuby] DocumentFragment#path now does proper error-checking to handle
    behavior introduced in libxml > 2.9.10. In v1.11.4 and v1.11.5, calling
    DocumentFragment#path could result in a segfault.

1.11.5 / 2021-05-19

Fixed

[Windows CRuby] Work around segfault at process exit on Windows when using
libxml2 system DLLs.

libxml 2.9.12 introduced new behavior to avoid memory leaks when unloading
libxml2 shared libraries (see libxml/!66). Early testing caught this segfault
on non-Windows platforms (see #2059 and libxml@956534e) but it was incompletely
fixed and is still an issue on Windows platforms that are using system DLLs.

We work around this by configuring libxml2 in this situation to use its default
memory management functions. Note that if Nokogiri is not on Windows, or is not
using shared system libraries, it will will continue to configure libxml2 to
use Ruby's memory management functions. Nokogiri::VERSION_INFO["libxml"]
["memory_management"] will allow you to verify when the default memory
management functions are being used. [#2241]

Added

Nokogiri::VERSION_INFO["libxml"] now contains the key "memory_management" to
declare whether libxml2 is using its default memory management functions, or
whether it uses the memory management functions from ruby. See above for more
details.

1.11.4 / 2021-05-14

Security

[CRuby] Vendored libxml2 upgraded to v2.9.12 which addresses:

  * CVE-2019-20388
  * CVE-2020-24977
  * CVE-2021-3517
  * CVE-2021-3518
  * CVE-2021-3537
  * CVE-2021-3541

Note that two additional CVEs were addressed upstream but are not relevant to
this release. CVE-2021-3516 via xmllint is not present in Nokogiri, and
CVE-2020-7595 has been patched in Nokogiri since v1.10.8 (see #1992).

Please see nokogiri/GHSA-7rrm-v45f-jp64 or #2233 for a more complete analysis
of these CVEs and patches.

Dependencies

  * [CRuby] vendored libxml2 is updated from 2.9.10 to 2.9.12. (Note that
    2.9.11 was skipped because it was superseded by 2.9.12 a few hours after
    its release.)

1.11.3 / 2021-04-07

Fixed

  * [CRuby] Passing non-Node objects to Document#root= now raises an
    ArgumentError exception. Previously this likely segfaulted. [#1900]
  * [JRuby] Passing non-Node objects to Document#root= now raises an
    ArgumentError exception. Previously this raised a TypeError exception.
  * [CRuby] arm64/aarch64 systems (like Apple's M1) can now compile libxml2 and
    libxslt from source (though we continue to strongly advise users to install
    the native gems for the best possible experience)
  • Loading branch information
tsutsui committed Aug 21, 2021
1 parent 2f2be0a commit bcb9818
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 36 deletions.
10 changes: 4 additions & 6 deletions textproc/ruby-nokogiri/Makefile
@@ -1,8 +1,6 @@
# $NetBSD: Makefile,v 1.59 2021/04/21 11:42:48 adam Exp $
# $NetBSD: Makefile,v 1.60 2021/08/21 18:27:13 tsutsui Exp $

DISTNAME= nokogiri-1.11.2
#PKGREVISION= 0
PKGREVISION= 1
DISTNAME= nokogiri-1.12.3
CATEGORIES= textproc

MAINTAINER= tsutsui@NetBSD.org
Expand All @@ -11,13 +9,13 @@ COMMENT= HTML, XML, SAX, and Reader parser with XPath and CSS selector support
LICENSE= mit

DEPENDS+= ${RUBY_PKGPREFIX}-racc>=1.4.0:../../devel/ruby-racc
DEPENDS+= ${RUBY_PKGPREFIX}-mini_portile2>=2.5.0:../../misc/ruby-mini_portile2
DEPENDS+= ${RUBY_PKGPREFIX}-mini_portile2>=2.6.1:../../misc/ruby-mini_portile2

USE_GCC_RUNTIME= yes
USE_TOOLS+= pkg-config
MAKE_ENV+= NOKOGIRI_USE_SYSTEM_LIBRARIES=yes
RUBYGEM_OPTIONS+= --format-executable
OVERRIDE_GEMSPEC+= :files ports/archives/libxml2-2.9.10.tar.gz= \
OVERRIDE_GEMSPEC+= :files ports/archives/libxml2-2.9.12.tar.gz= \
ports/archives/libxslt-1.1.34.tar.gz=

.include "../../devel/ruby-pkg-config/tool.mk"
Expand Down
101 changes: 76 additions & 25 deletions textproc/ruby-nokogiri/PLIST
@@ -1,4 +1,4 @@
@comment $NetBSD: PLIST,v 1.33 2021/03/19 16:52:25 tsutsui Exp $
@comment $NetBSD: PLIST,v 1.34 2021/08/21 18:27:13 tsutsui Exp $
bin/nokogiri${RUBY_SUFFIX}
${GEM_HOME}/cache/${GEM_NAME}.gem
${GEM_EXTSDIR}/gem.build_complete
Expand All @@ -11,11 +11,12 @@ ${GEM_LIBDIR}/bin/nokogiri
${GEM_LIBDIR}/dependencies.yml
${GEM_LIBDIR}/ext/nokogiri/depend
${GEM_LIBDIR}/ext/nokogiri/extconf.rb
${GEM_LIBDIR}/ext/nokogiri/html_document.c
${GEM_LIBDIR}/ext/nokogiri/html_element_description.c
${GEM_LIBDIR}/ext/nokogiri/html_entity_lookup.c
${GEM_LIBDIR}/ext/nokogiri/html_sax_parser_context.c
${GEM_LIBDIR}/ext/nokogiri/html_sax_push_parser.c
${GEM_LIBDIR}/ext/nokogiri/gumbo.c
${GEM_LIBDIR}/ext/nokogiri/html4_document.c
${GEM_LIBDIR}/ext/nokogiri/html4_element_description.c
${GEM_LIBDIR}/ext/nokogiri/html4_entity_lookup.c
${GEM_LIBDIR}/ext/nokogiri/html4_sax_parser_context.c
${GEM_LIBDIR}/ext/nokogiri/html4_sax_push_parser.c
${GEM_LIBDIR}/ext/nokogiri/libxml2_backwards_compat.c
${GEM_LIBDIR}/ext/nokogiri/nokogiri.c
${GEM_LIBDIR}/ext/nokogiri/nokogiri.h
Expand Down Expand Up @@ -46,6 +47,51 @@ ${GEM_LIBDIR}/ext/nokogiri/xml_syntax_error.c
${GEM_LIBDIR}/ext/nokogiri/xml_text.c
${GEM_LIBDIR}/ext/nokogiri/xml_xpath_context.c
${GEM_LIBDIR}/ext/nokogiri/xslt_stylesheet.c
${GEM_LIBDIR}/gumbo-parser/CHANGES.md
${GEM_LIBDIR}/gumbo-parser/Makefile
${GEM_LIBDIR}/gumbo-parser/THANKS
${GEM_LIBDIR}/gumbo-parser/src/Makefile
${GEM_LIBDIR}/gumbo-parser/src/README.md
${GEM_LIBDIR}/gumbo-parser/src/ascii.c
${GEM_LIBDIR}/gumbo-parser/src/ascii.h
${GEM_LIBDIR}/gumbo-parser/src/attribute.c
${GEM_LIBDIR}/gumbo-parser/src/attribute.h
${GEM_LIBDIR}/gumbo-parser/src/char_ref.c
${GEM_LIBDIR}/gumbo-parser/src/char_ref.h
${GEM_LIBDIR}/gumbo-parser/src/char_ref.rl
${GEM_LIBDIR}/gumbo-parser/src/error.c
${GEM_LIBDIR}/gumbo-parser/src/error.h
${GEM_LIBDIR}/gumbo-parser/src/foreign_attrs.c
${GEM_LIBDIR}/gumbo-parser/src/foreign_attrs.gperf
${GEM_LIBDIR}/gumbo-parser/src/gumbo.h
${GEM_LIBDIR}/gumbo-parser/src/insertion_mode.h
${GEM_LIBDIR}/gumbo-parser/src/macros.h
${GEM_LIBDIR}/gumbo-parser/src/parser.c
${GEM_LIBDIR}/gumbo-parser/src/parser.h
${GEM_LIBDIR}/gumbo-parser/src/replacement.h
${GEM_LIBDIR}/gumbo-parser/src/string_buffer.c
${GEM_LIBDIR}/gumbo-parser/src/string_buffer.h
${GEM_LIBDIR}/gumbo-parser/src/string_piece.c
${GEM_LIBDIR}/gumbo-parser/src/svg_attrs.c
${GEM_LIBDIR}/gumbo-parser/src/svg_attrs.gperf
${GEM_LIBDIR}/gumbo-parser/src/svg_tags.c
${GEM_LIBDIR}/gumbo-parser/src/svg_tags.gperf
${GEM_LIBDIR}/gumbo-parser/src/tag.c
${GEM_LIBDIR}/gumbo-parser/src/tag_lookup.c
${GEM_LIBDIR}/gumbo-parser/src/tag_lookup.gperf
${GEM_LIBDIR}/gumbo-parser/src/tag_lookup.h
${GEM_LIBDIR}/gumbo-parser/src/token_buffer.c
${GEM_LIBDIR}/gumbo-parser/src/token_buffer.h
${GEM_LIBDIR}/gumbo-parser/src/token_type.h
${GEM_LIBDIR}/gumbo-parser/src/tokenizer.c
${GEM_LIBDIR}/gumbo-parser/src/tokenizer.h
${GEM_LIBDIR}/gumbo-parser/src/tokenizer_states.h
${GEM_LIBDIR}/gumbo-parser/src/utf8.c
${GEM_LIBDIR}/gumbo-parser/src/utf8.h
${GEM_LIBDIR}/gumbo-parser/src/util.c
${GEM_LIBDIR}/gumbo-parser/src/util.h
${GEM_LIBDIR}/gumbo-parser/src/vector.c
${GEM_LIBDIR}/gumbo-parser/src/vector.h
${GEM_LIBDIR}/lib/nokogiri.rb
${GEM_LIBDIR}/lib/nokogiri/css.rb
${GEM_LIBDIR}/lib/nokogiri/css/node.rb
Expand All @@ -58,16 +104,22 @@ ${GEM_LIBDIR}/lib/nokogiri/css/tokenizer.rex
${GEM_LIBDIR}/lib/nokogiri/css/xpath_visitor.rb
${GEM_LIBDIR}/lib/nokogiri/decorators/slop.rb
${GEM_LIBDIR}/lib/nokogiri/extension.rb
${GEM_LIBDIR}/lib/nokogiri/gumbo.rb
${GEM_LIBDIR}/lib/nokogiri/html.rb
${GEM_LIBDIR}/lib/nokogiri/html/builder.rb
${GEM_LIBDIR}/lib/nokogiri/html/document.rb
${GEM_LIBDIR}/lib/nokogiri/html/document_fragment.rb
${GEM_LIBDIR}/lib/nokogiri/html/element_description.rb
${GEM_LIBDIR}/lib/nokogiri/html/element_description_defaults.rb
${GEM_LIBDIR}/lib/nokogiri/html/entity_lookup.rb
${GEM_LIBDIR}/lib/nokogiri/html/sax/parser.rb
${GEM_LIBDIR}/lib/nokogiri/html/sax/parser_context.rb
${GEM_LIBDIR}/lib/nokogiri/html/sax/push_parser.rb
${GEM_LIBDIR}/lib/nokogiri/html4.rb
${GEM_LIBDIR}/lib/nokogiri/html4/builder.rb
${GEM_LIBDIR}/lib/nokogiri/html4/document.rb
${GEM_LIBDIR}/lib/nokogiri/html4/document_fragment.rb
${GEM_LIBDIR}/lib/nokogiri/html4/element_description.rb
${GEM_LIBDIR}/lib/nokogiri/html4/element_description_defaults.rb
${GEM_LIBDIR}/lib/nokogiri/html4/entity_lookup.rb
${GEM_LIBDIR}/lib/nokogiri/html4/sax/parser.rb
${GEM_LIBDIR}/lib/nokogiri/html4/sax/parser_context.rb
${GEM_LIBDIR}/lib/nokogiri/html4/sax/push_parser.rb
${GEM_LIBDIR}/lib/nokogiri/html5.rb
${GEM_LIBDIR}/lib/nokogiri/html5/document.rb
${GEM_LIBDIR}/lib/nokogiri/html5/document_fragment.rb
${GEM_LIBDIR}/lib/nokogiri/html5/node.rb
${GEM_LIBDIR}/lib/nokogiri/jruby/dependencies.rb
${GEM_LIBDIR}/lib/nokogiri/nokogiri.${RUBY_DLEXT}
${GEM_LIBDIR}/lib/nokogiri/syntax_error.rb
Expand Down Expand Up @@ -114,14 +166,13 @@ ${GEM_LIBDIR}/lib/nokogiri/xml/xpath_context.rb
${GEM_LIBDIR}/lib/nokogiri/xslt.rb
${GEM_LIBDIR}/lib/nokogiri/xslt/stylesheet.rb
${GEM_LIBDIR}/lib/xsd/xmlparser/nokogiri.rb
${GEM_LIBDIR}/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch
${GEM_LIBDIR}/patches/libxml2/0002-Remove-script-macro-support.patch
${GEM_LIBDIR}/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch
${GEM_LIBDIR}/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch
${GEM_LIBDIR}/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch
${GEM_LIBDIR}/patches/libxml2/0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch
${GEM_LIBDIR}/patches/libxml2/0007-use-new-htmlParseLookupCommentEnd-to-find-comment-en.patch
${GEM_LIBDIR}/patches/libxml2/0008-use-glibc-strlen.patch
${GEM_LIBDIR}/patches/libxml2/0009-avoid-isnan-isinf.patch
${GEM_LIBDIR}/patches/libxml2/0010-parser.c-shrink-the-input-buffer-when-appropriate.patch
${GEM_LIBDIR}/patches/libxml2/0001-Remove-script-macro-support.patch
${GEM_LIBDIR}/patches/libxml2/0002-Update-entities-to-remove-handling-of-ssi.patch
${GEM_LIBDIR}/patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch
${GEM_LIBDIR}/patches/libxml2/0004-use-glibc-strlen.patch
${GEM_LIBDIR}/patches/libxml2/0005-avoid-isnan-isinf.patch
${GEM_LIBDIR}/patches/libxml2/0006-update-automake-files-for-arm64.patch
${GEM_LIBDIR}/patches/libxml2/0007-Fix-XPath-recursion-limit.patch
${GEM_LIBDIR}/patches/libxslt/0001-update-automake-files-for-arm64.patch
${GEM_LIBDIR}/patches/libxslt/0002-Fix-xml2-config-check-in-configure-script.patch
${GEM_HOME}/specifications/${GEM_NAME}.gemspec
10 changes: 5 additions & 5 deletions textproc/ruby-nokogiri/distinfo
@@ -1,6 +1,6 @@
$NetBSD: distinfo,v 1.40 2021/03/19 16:52:25 tsutsui Exp $
$NetBSD: distinfo,v 1.41 2021/08/21 18:27:13 tsutsui Exp $

SHA1 (nokogiri-1.11.2.gem) = 2133b9fea8fc5f64cd98b52e2f8ad22b4e026fb9
RMD160 (nokogiri-1.11.2.gem) = fe9d4ac7edffc5148f76e94f2ac747753899f4e0
SHA512 (nokogiri-1.11.2.gem) = de2d461b6c6d852c1d414d97c579b33cecc1d79b8cf87652c1ac5a2fa8487c477f61b66e35fe6f99e0483bce7ebec5cab681191b320b057d4c09de3b226a2609
Size (nokogiri-1.11.2.gem) = 9262592 bytes
SHA1 (nokogiri-1.12.3.gem) = 5a4330c996b00adae6629b3b067267561c0f23bb
RMD160 (nokogiri-1.12.3.gem) = 0b631700c992fe82ea9dbcff565439e7742f8c26
SHA512 (nokogiri-1.12.3.gem) = cb59e63641d49bc12a510e4c2af9af05b90520c9333680d8de7d18112a8bf569d8fc2df18286855946aa54c95058eb2cf42cb3e23b37fe7ca401544879fbbb41
Size (nokogiri-1.12.3.gem) = 9588224 bytes

0 comments on commit bcb9818

Please sign in to comment.