diff --git a/CHANGELOG.md b/CHANGELOG.md index b6b476529b..5ee53f3368 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,18 @@ Nokogiri follows [Semantic Versioning](https://semver.org/), please see the [REA --- +## 1.11.4 / unreleased + +### Security + +[CRuby] Vendored libxml2 upgraded to v2.9.12 which addresses [CVE-2021-3541](https://blog.hartwork.org/posts/cve-2021-3541-parameter-laughs-fixed-in-libxml2-2-9-11/). [[#2233](https://github.com/sparklemotion/nokogiri/issues/2233)] + + +### 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 diff --git a/concourse/nokogiri-v1.11.x.yml b/concourse/nokogiri-v1.11.x.yml new file mode 100644 index 0000000000..91fdc8d499 --- /dev/null +++ b/concourse/nokogiri-v1.11.x.yml @@ -0,0 +1,333 @@ +#@ load("@ytt:template", "template") + +#@ load("ruby.star", "cruby_versions") +#@ all_cruby_versions = [] +#@ all_cruby_versions.extend(cruby_versions["supported"]) +#@ all_cruby_versions.extend(cruby_versions["beta"]) + +#@ load("ruby.star", "jruby_versions") +#@ all_jruby_versions = [] +#@ all_jruby_versions.extend(jruby_versions["supported"]) +#@ all_jruby_versions.extend(jruby_versions["beta"]) + +#@ load("ruby.star", "truffleruby_versions") +#@ all_truffleruby_versions = [] +#@ all_truffleruby_versions.extend(truffleruby_versions["supported"]) +#@ all_truffleruby_versions.extend(truffleruby_versions["beta"]) + +--- +#@ def registry_image(image_repo, image_tag): +platform: linux +image_resource: + type: registry-image + source: + repository: #@ image_repo + tag: #@ image_tag +#@ end + +--- +#@ def task_inputs(): +- name: nokogiri + path: ci +- name: nokogiri +#@ end + +--- +% require "common_prelude.rb" + +resources: + - name: nokogiri + type: git + icon: "github" + check_every: 5m + webhook_token: ((nokogiri-main-webhook-token)) + source: + uri: https://github.com/sparklemotion/nokogiri/ + branch: v1.11.x + ignore_paths: + - "*.md" + - "concourse/**" + - "suppressions/**" + - ".github/**" + - "Vagrantfile" + + +jobs: +#@ job_name = "rubocop" + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + - task: rubocop + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "bionic")) + inputs: #@ task_inputs() + run: {path: ci/concourse/tasks/rake-test/rubocop.sh} + + +#@ job_name = "cruby-on-vanilla-ubuntu" + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + passed: ["rubocop"] + - in_parallel: + - task: rake-test + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "bionic")) + inputs: #@ task_inputs() + params: {TEST_WITH_SYSTEM_LIBRARIES: t} + run: {path: ci/concourse/tasks/rake-test/run.sh} + - task: rake-test-32bit + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "bionic32")) + inputs: #@ task_inputs() + params: {TEST_WITH_SYSTEM_LIBRARIES: t} + run: {path: ci/concourse/tasks/rake-test/run.sh} + + +#@ for ruby_version in all_cruby_versions: +#@ job_name = "cruby-{}".format(ruby_version) + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + passed: ["cruby-on-vanilla-ubuntu"] + - in_parallel: + - task: rake-test-system-libraries + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "mri-{}".format(ruby_version))) + inputs: #@ task_inputs() + params: + TEST_WITH_SYSTEM_LIBRARIES: t + #@ if ruby_version == cruby_versions["supported"][-1]: + CC_TEST_REPORTER_ID: ((code_climate_reporter_id_nokogiri)) + GIT_BRANCH: main + #@ end + run: {path: ci/concourse/tasks/rake-test/run.sh} + - task: rake-test-vendored-libraries + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "mri-{}".format(ruby_version))) + inputs: #@ task_inputs() + run: {path: ci/concourse/tasks/rake-test/run.sh} + - task: rake-test-valgrind + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "mri-{}".format(ruby_version))) + inputs: #@ task_inputs() + params: {TEST_WITH_VALGRIND: t} + run: {path: ci/concourse/tasks/rake-test/run.sh} +#@ end + + +#@ for ruby_version in all_jruby_versions: +#@ job_name = "jruby-{}".format(ruby_version) + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + passed: ["cruby-on-vanilla-ubuntu"] + - task: rake-test + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "jruby-{}".format(ruby_version))) + inputs: #@ task_inputs() + run: {path: ci/concourse/tasks/rake-test/run.sh} +#@ end + + +#@ job_name = "cruby-on-musl" + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + passed: #@ ["cruby-{}".format(ruby_version) for ruby_version in cruby_versions["supported"]] + - in_parallel: + - task: rake-test-system-libraries + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "alpine")) + inputs: #@ task_inputs() + run: {path: ci/concourse/tasks/rake-test/run.sh} + params: {TEST_WITH_SYSTEM_LIBRARIES: t} + - task: rake-test-valgrind + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "alpine")) + inputs: #@ task_inputs() + run: {path: ci/concourse/tasks/rake-test/run.sh} + params: {TEST_WITH_VALGRIND: t} + + +#@ job_name = "cruby-with-libxmlruby" + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + passed: #@ ["cruby-{}".format(ruby_version) for ruby_version in cruby_versions["supported"]] + - in_parallel: + - task: rake-test-system-libraries + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "mri-{}".format(cruby_versions["supported"][-1]))) + inputs: #@ task_inputs() + params: + BUNDLE_GEMFILE: "Gemfile-libxml-ruby" + TEST_WITH_SYSTEM_LIBRARIES: t + run: {path: ci/concourse/tasks/rake-test/run.sh} + - task: rake-test-valgrind + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "mri-{}".format(cruby_versions["supported"][-1]))) + inputs: #@ task_inputs() + params: + BUNDLE_GEMFILE: "Gemfile-libxml-ruby" + TEST_WITH_VALGRIND: t + run: {path: ci/concourse/tasks/rake-test/run.sh} + + +#@ job_name = "cruby-gem-test" + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + passed: #@ ["cruby-{}".format(ruby_version) for ruby_version in cruby_versions["supported"]] + - task: build + config: + "_": #@ template.replace(registry_image("larskanis/rake-compiler-dock-mri-x86_64-linux", "<%= RakeCompilerDock::IMAGE_VERSION %>")) + inputs: #@ task_inputs() + outputs: [{name: gems}] + run: {path: ci/concourse/tasks/gem-test/gem-build.sh} + - in_parallel: + - task: install-and-test + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "mri-{}".format(cruby_versions["supported"][-1]))) + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + run: {path: ci/concourse/tasks/gem-test/gem-install-and-test.sh} + - task: install-and-test-on-musl + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "alpine")) + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + run: {path: ci/concourse/tasks/gem-test/gem-install-and-test.sh} + + +#@ job_name = "cruby-native-gem-test" + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + version: every + passed: #@ ["cruby-{}".format(ruby_version) for ruby_version in cruby_versions["supported"]] + - task: build + config: + "_": #@ template.replace(registry_image("larskanis/rake-compiler-dock-mri-x86_64-linux", "<%= RakeCompilerDock::IMAGE_VERSION %>")) + inputs: #@ task_inputs() + outputs: [{name: gems}] + params: {BUILD_NATIVE_GEM: "x86_64-linux"} + run: {path: ci/concourse/tasks/gem-test/gem-build.sh} + - in_parallel: + <% $native_ruby_versions.each do |ruby_version| %> + - task: install-and-test-<%= ruby_version %> + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "mri-<%= ruby_version %>")) + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + run: {path: ci/concourse/tasks/gem-test/gem-install-and-test.sh} + <% end %> + - task: install-and-test-on-musl + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "alpine")) + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + run: {path: ci/concourse/tasks/gem-test/gem-install-and-test.sh} + + +#@ job_name = "cruby-native-gem-test-32bit" + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + version: every + passed: #@ ["cruby-{}".format(ruby_version) for ruby_version in cruby_versions["supported"]] + - task: build + config: + "_": #@ template.replace(registry_image("larskanis/rake-compiler-dock-mri-x86-linux", "<%= RakeCompilerDock::IMAGE_VERSION %>")) + inputs: #@ task_inputs() + outputs: [{name: gems}] + params: {BUILD_NATIVE_GEM: "x86-linux"} + run: {path: ci/concourse/tasks/gem-test/gem-build.sh} + - in_parallel: + - task: install-and-test-on-vanilla-ubuntu-32bit + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "bionic32")) + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + run: {path: ci/concourse/tasks/gem-test/gem-install-and-test.sh} + - task: install-and-test-on-musl-32bit + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "alpine32")) + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + run: {path: ci/concourse/tasks/gem-test/gem-install-and-test.sh} + + +#@ job_name = "jruby-gem-test" + - name: #@ job_name + public: true + plan: + - get: nokogiri + trigger: true + passed: #@ ["jruby-{}".format(ruby_version) for ruby_version in jruby_versions["supported"]] + - task: build + config: + "_": #@ template.replace(registry_image("larskanis/rake-compiler-dock-jruby", "<%= RakeCompilerDock::IMAGE_VERSION %>")) + inputs: #@ task_inputs() + outputs: [{name: gems}] + run: {path: ci/concourse/tasks/gem-test/gem-build-java.sh} + - task: install-and-test + config: + "_": #@ template.replace(registry_image("flavorjones/nokogiri-test", "jruby-{}".format(jruby_versions["supported"][-1]))) + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + run: {path: ci/concourse/tasks/gem-test/gem-install-and-test.sh} + + + - name: build-success + public: true + disable_manual_trigger: true + plan: + - get: nokogiri + trigger: true + version: every + passed: + - cruby-on-musl + - cruby-with-libxmlruby + - cruby-gem-test + - cruby-native-gem-test + - jruby-gem-test diff --git a/concourse/nokogiri-v1.11.x.yml.generated b/concourse/nokogiri-v1.11.x.yml.generated new file mode 100644 index 0000000000..faf2924b04 --- /dev/null +++ b/concourse/nokogiri-v1.11.x.yml.generated @@ -0,0 +1,719 @@ +jobs: +- name: rubocop + plan: + - get: nokogiri + trigger: true + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: bionic + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + platform: linux + run: + path: ci/concourse/tasks/rake-test/rubocop.sh + task: rubocop + public: true +- name: cruby-on-vanilla-ubuntu + plan: + - get: nokogiri + passed: + - rubocop + trigger: true + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: bionic + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_SYSTEM_LIBRARIES: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: bionic32 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_SYSTEM_LIBRARIES: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-32bit + public: true +- name: cruby-2.5 + plan: + - get: nokogiri + passed: + - cruby-on-vanilla-ubuntu + trigger: true + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.5 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_SYSTEM_LIBRARIES: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-system-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.5 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-vendored-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.5 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_VALGRIND: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-valgrind + public: true +- name: cruby-2.6 + plan: + - get: nokogiri + passed: + - cruby-on-vanilla-ubuntu + trigger: true + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.6 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_SYSTEM_LIBRARIES: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-system-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.6 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-vendored-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.6 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_VALGRIND: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-valgrind + public: true +- name: cruby-2.7 + plan: + - get: nokogiri + passed: + - cruby-on-vanilla-ubuntu + trigger: true + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.7 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_SYSTEM_LIBRARIES: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-system-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.7 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-vendored-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.7 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_VALGRIND: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-valgrind + public: true +- name: cruby-3.0 + plan: + - get: nokogiri + passed: + - cruby-on-vanilla-ubuntu + trigger: true + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-3.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + CC_TEST_REPORTER_ID: ((code_climate_reporter_id_nokogiri)) + GIT_BRANCH: main + TEST_WITH_SYSTEM_LIBRARIES: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-system-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-3.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-vendored-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-3.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_VALGRIND: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-valgrind + public: true +- name: jruby-9.2 + plan: + - get: nokogiri + passed: + - cruby-on-vanilla-ubuntu + trigger: true + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: jruby-9.2 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test + public: true +- name: cruby-on-musl + plan: + - get: nokogiri + passed: + - cruby-2.5 + - cruby-2.6 + - cruby-2.7 + - cruby-3.0 + trigger: true + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: alpine + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_SYSTEM_LIBRARIES: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-system-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: alpine + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + TEST_WITH_VALGRIND: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-valgrind + public: true +- name: cruby-with-libxmlruby + plan: + - get: nokogiri + passed: + - cruby-2.5 + - cruby-2.6 + - cruby-2.7 + - cruby-3.0 + trigger: true + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-3.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + BUNDLE_GEMFILE: Gemfile-libxml-ruby + TEST_WITH_SYSTEM_LIBRARIES: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-system-libraries + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-3.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + params: + BUNDLE_GEMFILE: Gemfile-libxml-ruby + TEST_WITH_VALGRIND: t + platform: linux + run: + path: ci/concourse/tasks/rake-test/run.sh + task: rake-test-valgrind + public: true +- name: cruby-gem-test + plan: + - get: nokogiri + passed: + - cruby-2.5 + - cruby-2.6 + - cruby-2.7 + - cruby-3.0 + trigger: true + - config: + image_resource: + name: "" + source: + repository: larskanis/rake-compiler-dock-mri-x86_64-linux + tag: 1.1.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + outputs: + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-build.sh + task: build + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-3.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: alpine + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test-on-musl + public: true +- name: cruby-native-gem-test + plan: + - get: nokogiri + passed: + - cruby-2.5 + - cruby-2.6 + - cruby-2.7 + - cruby-3.0 + trigger: true + version: every + - config: + image_resource: + name: "" + source: + repository: larskanis/rake-compiler-dock-mri-x86_64-linux + tag: 1.1.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + outputs: + - name: gems + params: + BUILD_NATIVE_GEM: x86_64-linux + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-build.sh + task: build + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.5 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test-2.5 + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.6 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test-2.6 + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-2.7 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test-2.7 + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: mri-3.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test-3.0 + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: alpine + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test-on-musl + public: true +- name: cruby-native-gem-test-32bit + plan: + - get: nokogiri + passed: + - cruby-2.5 + - cruby-2.6 + - cruby-2.7 + - cruby-3.0 + trigger: true + version: every + - config: + image_resource: + name: "" + source: + repository: larskanis/rake-compiler-dock-mri-x86-linux + tag: 1.1.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + outputs: + - name: gems + params: + BUILD_NATIVE_GEM: x86-linux + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-build.sh + task: build + - in_parallel: + steps: + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: bionic32 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test-on-vanilla-ubuntu-32bit + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: alpine32 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test-on-musl-32bit + public: true +- name: jruby-gem-test + plan: + - get: nokogiri + passed: + - jruby-9.2 + trigger: true + - config: + image_resource: + name: "" + source: + repository: larskanis/rake-compiler-dock-jruby + tag: 1.1.0 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + outputs: + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-build-java.sh + task: build + - config: + image_resource: + name: "" + source: + repository: flavorjones/nokogiri-test + tag: jruby-9.2 + type: registry-image + inputs: + - name: nokogiri + path: ci + - name: nokogiri + - name: gems + platform: linux + run: + path: ci/concourse/tasks/gem-test/gem-install-and-test.sh + task: install-and-test + public: true +- disable_manual_trigger: true + name: build-success + plan: + - get: nokogiri + passed: + - cruby-on-musl + - cruby-with-libxmlruby + - cruby-gem-test + - cruby-native-gem-test + - jruby-gem-test + trigger: true + version: every + public: true +resources: +- check_every: 5m0s + icon: github + name: nokogiri + source: + branch: v1.11.x + ignore_paths: + - '*.md' + - concourse/** + - suppressions/** + - .github/** + - Vagrantfile + uri: https://github.com/sparklemotion/nokogiri/ + type: git + webhook_token: ((nokogiri-main-webhook-token)) diff --git a/dependencies.yml b/dependencies.yml index ecd5de4c41..c24658bf0e 100644 --- a/dependencies.yml +++ b/dependencies.yml @@ -1,10 +1,10 @@ libxml2: - version: "2.9.10" - sha256: "aafee193ffb8fe0c82d4afef6ef91972cbaf5feea100edc2f262750611b4be1f" + version: "2.9.12" + sha256: "c8d6681e38c56f172892c85ddc0852e1fd4b53b4209e7f4ebf17f7e2eae71d92" # manually verified checksum: # - # $ gpg --verify libxml2-2.9.10.tar.gz.asc ports/archives/libxml2-2.9.10.tar.gz - # gpg: Signature made Wed 30 Oct 2019 03:15:42 PM EDT + # $ gpg --verify libxml2-2.9.12.tar.gz.asc ports/archives/libxml2-2.9.12.tar.gz + # gpg: Signature made Thu 13 May 2021 02:59:16 PM EDT # gpg: using RSA key DB46681BB91ADCEA170FA2D415588B26596BEA5D # gpg: Good signature from "Daniel Veillard (Red Hat work email) " [unknown] # gpg: aka "Daniel Veillard " [unknown] @@ -17,14 +17,14 @@ libxml2: # # -----BEGIN PGP SIGNATURE----- # - # iQEzBAABCAAdFiEE20ZoG7ka3OoXD6LUFViLJllr6l0FAl254V4ACgkQFViLJllr - # 6l0ldAf6Azt4/oKDfMKRd+xaykUrb+34dr2ZRsjRDS1cnelAtL9TCWhE5lOkLI3c - # 3FyNRaLhOEOOluZmKTJYyzS42JSSHDhxGj14gIeyafOjvRhHG3h1m5GvMmvgKWkd - # qzxFrVFSG26iWJxMvxIA88t7M+QHb7ff7xR29ETJscewEmAd3LmZITglK02lWeGz - # LfxfLuakM6RnCUu0dzacJKO0nMOKju+RL/N9bciI/UOhNYEkWqPnzC0GzbvFLqDu - # rM+OvCSewSTziiejpdrUwYXkY5Ui2+cxUbacLauEr8iRLg7xXKqv27NORE4yeQcS - # LgIhxG/qSNfihMS6E1ZO5bK2DbGCZQ== - # =ZNuc + # iQEzBAABCAAdFiEE20ZoG7ka3OoXD6LUFViLJllr6l0FAmCddwQACgkQFViLJllr + # 6l11LQgAioRTdfmcC+uK/7+6HPtF/3c5zkX6j8VGYuvFBwZ0jayqMRBAl++fcpjE + # JUU/JKebSZ/KCYjzyeOWK/i3Gq77iqm3UbZFB85rqu4a5P3gmj/4STWVyAx0KU3z + # G3jKqDhJOt7c0acXb5lh2DngfDa1dn/VGcQcIXsqplNxNr4ET7MnSJjZ3nlxYfW2 + # E5vWBdPCMUeXDBl6MjYvw9XnGGBLUAaEJWoFToG6jKmVf4GAd9nza20jj5dtbcJq + # QEOaSDKDr+f9h2NS8haOhJ9vOpy52PdeGzaFlbRkXarGXuAr8kITgATVs8FAqcgv + # MoVhmrO5r2hJf0dCM9fZoYqzpMfmNA== + # =KfJ9 # -----END PGP SIGNATURE----- # diff --git a/patches/libxml2/0002-Remove-script-macro-support.patch b/patches/libxml2/0001-Remove-script-macro-support.patch similarity index 100% rename from patches/libxml2/0002-Remove-script-macro-support.patch rename to patches/libxml2/0001-Remove-script-macro-support.patch diff --git a/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch b/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch deleted file mode 100644 index e3ef2f2a68..0000000000 --- a/patches/libxml2/0001-Revert-Do-not-URI-escape-in-server-side-includes.patch +++ /dev/null @@ -1,78 +0,0 @@ -From c5538465c08a8ea248a370bf55bc39cd3385e4af Mon Sep 17 00:00:00 2001 -From: Mike Dalessio -Date: Thu, 29 Mar 2018 14:09:00 -0400 -Subject: [PATCH] Revert "Do not URI escape in server side includes" - -This reverts commit 960f0e275616cadc29671a218d7fb9b69eb35588. ---- - HTMLtree.c | 49 +++++++++++-------------------------------------- - 1 file changed, 11 insertions(+), 38 deletions(-) - -diff --git a/HTMLtree.c b/HTMLtree.c -index 2fd0c9c..67160c5 100644 ---- a/HTMLtree.c -+++ b/HTMLtree.c -@@ -717,49 +717,22 @@ htmlAttrDumpOutput(xmlOutputBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur, - (!xmlStrcasecmp(cur->name, BAD_CAST "src")) || - ((!xmlStrcasecmp(cur->name, BAD_CAST "name")) && - (!xmlStrcasecmp(cur->parent->name, BAD_CAST "a"))))) { -+ xmlChar *escaped; - xmlChar *tmp = value; -- /* xmlURIEscapeStr() escapes '"' so it can be safely used. */ -- xmlBufCCat(buf->buffer, "\""); - - while (IS_BLANK_CH(*tmp)) tmp++; - -- /* URI Escape everything, except server side includes. */ -- for ( ; ; ) { -- xmlChar *escaped; -- xmlChar endChar; -- xmlChar *end = NULL; -- xmlChar *start = (xmlChar *)xmlStrstr(tmp, BAD_CAST ""); -- if (end != NULL) { -- *start = '\0'; -- } -- } -- -- /* Escape the whole string, or until start (set to '\0'). */ -- escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+"); -- if (escaped != NULL) { -- xmlBufCat(buf->buffer, escaped); -- xmlFree(escaped); -- } else { -- xmlBufCat(buf->buffer, tmp); -- } -- -- if (end == NULL) { /* Everything has been written. */ -- break; -- } -- -- /* Do not escape anything within server side includes. */ -- *start = '<'; /* Restore the first character of "") */ -- endChar = *end; -- *end = '\0'; -- xmlBufCat(buf->buffer, start); -- *end = endChar; -- tmp = end; -+ /* -+ * the < and > have already been escaped at the entity level -+ * And doing so here breaks server side includes -+ */ -+ escaped = xmlURIEscapeStr(tmp, BAD_CAST"@/:=?;#%&,+<>"); -+ if (escaped != NULL) { -+ xmlBufWriteQuotedString(buf->buffer, escaped); -+ xmlFree(escaped); -+ } else { -+ xmlBufWriteQuotedString(buf->buffer, value); - } -- -- xmlBufCCat(buf->buffer, "\""); - } else { - xmlBufWriteQuotedString(buf->buffer, value); - } --- -2.9.5 - diff --git a/patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch b/patches/libxml2/0002-Update-entities-to-remove-handling-of-ssi.patch similarity index 100% rename from patches/libxml2/0003-Update-entities-to-remove-handling-of-ssi.patch rename to patches/libxml2/0002-Update-entities-to-remove-handling-of-ssi.patch diff --git a/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch b/patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch similarity index 94% rename from patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch rename to patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch index 30c81dc77c..b6add83769 100644 --- a/patches/libxml2/0004-libxml2.la-is-in-top_builddir.patch +++ b/patches/libxml2/0003-libxml2.la-is-in-top_builddir.patch @@ -16,7 +16,7 @@ index cf96d41..1372d8b 100644 } -libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES) -+$(top_builddir)/libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES) ++$(top_builddir)/libxml2.la: $(libxml2_la_OBJECTS) $(libxml2_la_DEPENDENCIES) $(EXTRA_libxml2_la_DEPENDENCIES) $(AM_V_CCLD)$(libxml2_la_LINK) -rpath $(libdir) $(libxml2_la_OBJECTS) $(libxml2_la_LIBADD) $(LIBS) testdso.la: $(testdso_la_OBJECTS) $(testdso_la_DEPENDENCIES) $(EXTRA_testdso_la_DEPENDENCIES) diff --git a/patches/libxml2/0008-use-glibc-strlen.patch b/patches/libxml2/0004-use-glibc-strlen.patch similarity index 100% rename from patches/libxml2/0008-use-glibc-strlen.patch rename to patches/libxml2/0004-use-glibc-strlen.patch diff --git a/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch b/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch deleted file mode 100644 index 56026fb569..0000000000 --- a/patches/libxml2/0005-Fix-infinite-loop-in-xmlStringLenDecodeEntities.patch +++ /dev/null @@ -1,32 +0,0 @@ -From 0e1a49c8907645d2e155f0d89d4d9895ac5112b5 Mon Sep 17 00:00:00 2001 -From: Zhipeng Xie -Date: Thu, 12 Dec 2019 17:30:55 +0800 -Subject: [PATCH] Fix infinite loop in xmlStringLenDecodeEntities - -When ctxt->instate == XML_PARSER_EOF,xmlParseStringEntityRef -return NULL which cause a infinite loop in xmlStringLenDecodeEntities - -Found with libFuzzer. - -Signed-off-by: Zhipeng Xie ---- - parser.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/parser.c b/parser.c -index d1c3196..a34bb6c 100644 ---- a/parser.c -+++ b/parser.c -@@ -2646,7 +2646,8 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, - else - c = 0; - while ((c != 0) && (c != end) && /* non input consuming loop */ -- (c != end2) && (c != end3)) { -+ (c != end2) && (c != end3) && -+ (ctxt->instate != XML_PARSER_EOF)) { - - if (c == 0) break; - if ((c == '&') && (str[1] == '#')) { --- -2.17.1 - diff --git a/patches/libxml2/0009-avoid-isnan-isinf.patch b/patches/libxml2/0005-avoid-isnan-isinf.patch similarity index 94% rename from patches/libxml2/0009-avoid-isnan-isinf.patch rename to patches/libxml2/0005-avoid-isnan-isinf.patch index ffd82cba6c..38a867522b 100644 --- a/patches/libxml2/0009-avoid-isnan-isinf.patch +++ b/patches/libxml2/0005-avoid-isnan-isinf.patch @@ -51,7 +51,7 @@ diff --git a/xpath.c b/xpath.c index 9f64ab9..5b6d999 100644 --- a/xpath.c +++ b/xpath.c -@@ -509,11 +509,7 @@ xmlXPathInit(void) { +@@ -515,11 +515,7 @@ xmlXPathInit(void) { */ int xmlXPathIsNaN(double val) { @@ -63,16 +63,16 @@ index 9f64ab9..5b6d999 100644 } /** -@@ -524,15 +520,11 @@ xmlXPathIsNaN(double val) { +@@ -530,15 +530,11 @@ xmlXPathIsNaN(double val) { */ int xmlXPathIsInf(double val) { -#ifdef isinf - return isinf(val) ? (val > 0 ? 1 : -1) : 0; -#else - if (val >= INFINITY) + if (val >= xmlXPathPINF) return 1; - if (val <= -INFINITY) + if (val <= -xmlXPathPINF) return -1; return 0; -#endif diff --git a/patches/libxml2/0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch b/patches/libxml2/0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch deleted file mode 100644 index 5a687dfba1..0000000000 --- a/patches/libxml2/0006-htmlParseComment-treat-as-if-it-closed-the-comment.patch +++ /dev/null @@ -1,73 +0,0 @@ -From 4f51a6d2b1755ce5b36c524c215aad70d864ac1d Mon Sep 17 00:00:00 2001 -From: Mike Dalessio -Date: Mon, 3 Aug 2020 17:36:05 -0400 -Subject: [PATCH 1/2] htmlParseComment: treat `--!>` as if it closed the - comment - -See guidance provided on incorrectly-closed comments here: - -https://html.spec.whatwg.org/multipage/parsing.html#parse-error-incorrectly-closed-comment ---- - HTMLparser.c | 28 ++++++++++++++++++++-------- - 1 file changed, 20 insertions(+), 8 deletions(-) - -diff --git a/HTMLparser.c b/HTMLparser.c -index 7b6d689..4d43479 100644 ---- a/HTMLparser.c -+++ b/HTMLparser.c -@@ -3300,6 +3300,7 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { - int q, ql; - int r, rl; - int cur, l; -+ int next, nl; - xmlParserInputState state; - - /* -@@ -3332,6 +3333,21 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { - while (IS_CHAR(cur) && - ((cur != '>') || - (r != '-') || (q != '-'))) { -+ NEXTL(l); -+ next = CUR_CHAR(nl); -+ if (next == 0) { -+ SHRINK; -+ GROW; -+ next = CUR_CHAR(nl); -+ } -+ -+ if ((q == '-') && (r == '-') && (cur == '!') && (next == '>')) { -+ htmlParseErr(ctxt, XML_ERR_COMMENT_NOT_FINISHED, -+ "Comment incorrectly closed by '--!>'", NULL, NULL); -+ cur = '>'; -+ break; -+ } -+ - if (len + 5 >= size) { - xmlChar *tmp; - -@@ -3345,18 +3361,14 @@ htmlParseComment(htmlParserCtxtPtr ctxt) { - } - buf = tmp; - } -- COPY_BUF(ql,buf,len,q); -+ COPY_BUF(ql,buf,len,q); -+ - q = r; - ql = rl; - r = cur; - rl = l; -- NEXTL(l); -- cur = CUR_CHAR(l); -- if (cur == 0) { -- SHRINK; -- GROW; -- cur = CUR_CHAR(l); -- } -+ cur = next; -+ l = nl; - } - buf[len] = 0; - if (IS_CHAR(cur)) { --- -2.25.1 - diff --git a/patches/libxml2/0011-update-automake-files-for-arm64.patch b/patches/libxml2/0006-update-automake-files-for-arm64.patch similarity index 100% rename from patches/libxml2/0011-update-automake-files-for-arm64.patch rename to patches/libxml2/0006-update-automake-files-for-arm64.patch diff --git a/patches/libxml2/0007-use-new-htmlParseLookupCommentEnd-to-find-comment-en.patch b/patches/libxml2/0007-use-new-htmlParseLookupCommentEnd-to-find-comment-en.patch deleted file mode 100644 index 3ba50bff8e..0000000000 --- a/patches/libxml2/0007-use-new-htmlParseLookupCommentEnd-to-find-comment-en.patch +++ /dev/null @@ -1,103 +0,0 @@ -From b20d746fa7cbb74716171bc49d836af99927e41e Mon Sep 17 00:00:00 2001 -From: Mike Dalessio -Date: Sun, 11 Oct 2020 14:15:37 -0400 -Subject: [PATCH 2/2] use new htmlParseLookupCommentEnd to find comment ends - -Note that the caret in error messages generated during comment parsing -may have moved by one byte. - -See guidance provided on incorrectly-closed comments here: - -https://html.spec.whatwg.org/multipage/parsing.html#parse-error-incorrectly-closed-comment ---- - HTMLparser.c | 46 +++++++++++++++++++++++++++++++++++++--------- - 1 file changed, 37 insertions(+), 9 deletions(-) - -diff --git a/HTMLparser.c b/HTMLparser.c -index 4d43479..000dc3d 100644 ---- a/HTMLparser.c -+++ b/HTMLparser.c -@@ -5331,6 +5331,39 @@ htmlParseLookupChars(htmlParserCtxtPtr ctxt, const xmlChar * stop, - return (-1); - } - -+/** -+ * htmlParseLookupCommentEnd: -+ * @ctxt: an HTML parser context -+ * -+ * Try to find a comment end tag in the input stream -+ * The search includes "-->" as well as WHATWG-recommended incorrectly-closed tags. -+ * (See https://html.spec.whatwg.org/multipage/parsing.html#parse-error-incorrectly-closed-comment) -+ * This function has a side effect of (possibly) incrementing ctxt->checkIndex -+ * to avoid rescanning sequences of bytes, it DOES change the state of the -+ * parser, do not use liberally. -+ * This wraps to htmlParseLookupSequence() -+ * -+ * Returns the index to the current parsing point if the full sequence is available, -1 otherwise. -+ */ -+static int -+htmlParseLookupCommentEnd(htmlParserCtxtPtr ctxt) -+{ -+ int mark = 0; -+ int cur = CUR_PTR - BASE_PTR; -+ -+ while (mark >= 0) { -+ mark = htmlParseLookupSequence(ctxt, '-', '-', 0, 1, 1); -+ if ((mark < 0) || -+ (NXT(mark+2) == '>') || -+ ((NXT(mark+2) == '!') && (NXT(mark+3) == '>'))) { -+ return mark; -+ } -+ ctxt->checkIndex = cur + mark + 1; -+ } -+ return mark; -+} -+ -+ - /** - * htmlParseTryOrFinish: - * @ctxt: an HTML parser context -@@ -5507,8 +5540,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { - cur = in->cur[0]; - if ((cur == '<') && (next == '!') && - (in->cur[2] == '-') && (in->cur[3] == '-')) { -- if ((!terminate) && -- (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0)) -+ if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0)) - goto done; - #ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, -@@ -5567,8 +5599,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { - next = in->cur[1]; - if ((cur == '<') && (next == '!') && - (in->cur[2] == '-') && (in->cur[3] == '-')) { -- if ((!terminate) && -- (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0)) -+ if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0)) - goto done; - #ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, -@@ -5614,8 +5645,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { - next = in->cur[1]; - if ((cur == '<') && (next == '!') && - (in->cur[2] == '-') && (in->cur[3] == '-')) { -- if ((!terminate) && -- (htmlParseLookupSequence(ctxt, '-', '-', '>', 1, 1) < 0)) -+ if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0)) - goto done; - #ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, -@@ -5871,9 +5901,7 @@ htmlParseTryOrFinish(htmlParserCtxtPtr ctxt, int terminate) { - htmlParseDocTypeDecl(ctxt); - } else if ((cur == '<') && (next == '!') && - (in->cur[2] == '-') && (in->cur[3] == '-')) { -- if ((!terminate) && -- (htmlParseLookupSequence( -- ctxt, '-', '-', '>', 1, 1) < 0)) -+ if ((!terminate) && (htmlParseLookupCommentEnd(ctxt) < 0)) - goto done; - #ifdef DEBUG_PUSH - xmlGenericError(xmlGenericErrorContext, --- -2.25.1 - diff --git a/patches/libxml2/0010-parser.c-shrink-the-input-buffer-when-appropriate.patch b/patches/libxml2/0010-parser.c-shrink-the-input-buffer-when-appropriate.patch deleted file mode 100644 index d3d9ad46a4..0000000000 --- a/patches/libxml2/0010-parser.c-shrink-the-input-buffer-when-appropriate.patch +++ /dev/null @@ -1,70 +0,0 @@ -From ca565c1edef9a455453fa8564270cc9c5813e1b9 Mon Sep 17 00:00:00 2001 -From: Mike Dalessio -Date: Sun, 31 Jan 2021 09:53:56 -0500 -Subject: [PATCH] parser.c: shrink the input buffer when appropriate - -Fixes GNOME/libxml2#200 - -Also see discussions at: -- GNOME/libxml2#192 -- https://gitlab.gnome.org/nwellnhof/libxml2/-/commit/99bda1e -- https://github.com/sparklemotion/nokogiri/issues/2132 ---- - parser.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/parser.c b/parser.c -index a7bdc7f..efde672 100644 ---- a/parser.c -+++ b/parser.c -@@ -4204,6 +4204,7 @@ xmlParseSystemLiteral(xmlParserCtxtPtr ctxt) { - } - count++; - if (count > 50) { -+ SHRINK; - GROW; - count = 0; - if (ctxt->instate == XML_PARSER_EOF) { -@@ -4291,6 +4292,7 @@ xmlParsePubidLiteral(xmlParserCtxtPtr ctxt) { - buf[len++] = cur; - count++; - if (count > 50) { -+ SHRINK; - GROW; - count = 0; - if (ctxt->instate == XML_PARSER_EOF) { -@@ -4571,6 +4573,7 @@ xmlParseCharDataComplex(xmlParserCtxtPtr ctxt, int cdata) { - } - count++; - if (count > 50) { -+ SHRINK; - GROW; - count = 0; - if (ctxt->instate == XML_PARSER_EOF) -@@ -4776,6 +4779,7 @@ xmlParseCommentComplex(xmlParserCtxtPtr ctxt, xmlChar *buf, - - count++; - if (count > 50) { -+ SHRINK; - GROW; - count = 0; - if (ctxt->instate == XML_PARSER_EOF) { -@@ -5186,6 +5190,7 @@ xmlParsePI(xmlParserCtxtPtr ctxt) { - } - count++; - if (count > 50) { -+ SHRINK; - GROW; - if (ctxt->instate == XML_PARSER_EOF) { - xmlFree(buf); -@@ -9783,6 +9788,7 @@ xmlParseCDSect(xmlParserCtxtPtr ctxt) { - sl = l; - count++; - if (count > 50) { -+ SHRINK; - GROW; - if (ctxt->instate == XML_PARSER_EOF) { - xmlFree(buf); --- -2.25.1 - diff --git a/patches/libxslt/0002-Fix-xml2-config-check-in-configure-script.patch b/patches/libxslt/0002-Fix-xml2-config-check-in-configure-script.patch new file mode 100644 index 0000000000..a882149aa3 --- /dev/null +++ b/patches/libxslt/0002-Fix-xml2-config-check-in-configure-script.patch @@ -0,0 +1,19 @@ +From: Nick Wellnhofer +Date: Fri, 15 Nov 2019 11:53:11 +0100 +Subject: [PATCH] Fix xml2-config check in configure script + +A 'print' option has never been supported. After a recent change to +libxml2, invalid options cause xml2-config to fail. +diff --git a/configure b/configure +index c63adc5..6061227 100755 +--- a/configure ++++ b/configure +@@ -14860,7 +14860,7 @@ PKG_CONFIG=$_save_PKG_CONFIG + fi + + +-if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs print > /dev/null 2>&1 ++if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs > /dev/null 2>&1 + then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxml libraries >= $LIBXML_REQUIRED_VERSION" >&5 + $as_echo_n "checking for libxml libraries >= $LIBXML_REQUIRED_VERSION... " >&6; } diff --git a/rakelib/concourse.rake b/rakelib/concourse.rake index ae2ec124f2..c01f82c3e0 100644 --- a/rakelib/concourse.rake +++ b/rakelib/concourse.rake @@ -2,6 +2,7 @@ require "concourse" Concourse.new("nokogiri", fly_target: "ci", format: true) do |c| c.add_pipeline "nokogiri", "nokogiri.yml", ytt: true + c.add_pipeline "nokogiri-v1.11.x", "nokogiri-v1.11.x.yml", ytt: true c.add_pipeline "nokogiri-pr", "nokogiri-pr.yml", ytt: true c.add_pipeline "nokogiri-truffleruby", "nokogiri-truffleruby.yml", ytt: true end diff --git a/test/html/sax/test_push_parser.rb b/test/html/sax/test_push_parser.rb index dd64253907..f83440d272 100644 --- a/test/html/sax/test_push_parser.rb +++ b/test/html/sax/test_push_parser.rb @@ -70,17 +70,6 @@ def test_chevron def test_default_options assert_equal(0, @parser.options) end - - def test_broken_encoding - skip_unless_libxml2("ultra hard to fix for pure Java version") - @parser.options |= XML::ParseOptions::RECOVER - # This is ISO_8859-1: - @parser.<< "Gau\337" - @parser.finish - assert(@parser.document.errors.size >= 1) - assert_equal("Gau\337", @parser.document.data.join) - assert_equal([["r"], ["body"], ["html"]], @parser.document.end_elements) - end end end end diff --git a/test/xml/test_node.rb b/test/xml/test_node.rb index 5995055cb7..11a8b993a9 100644 --- a/test/xml/test_node.rb +++ b/test/xml/test_node.rb @@ -1049,18 +1049,24 @@ def test_namespace_without_an_href_on_html_node # describe how we handle microsoft word's HTML formatting. # this test is descriptive, not prescriptive. # - skip_unless_libxml2("Xerces handles this edge case completely differently") - - xml = Nokogiri::HTML.parse(<<~EOF) + html = Nokogiri::HTML.parse(<<~EOF)
foo
EOF - - node = xml.at("p") + node = html.at("div").children.first assert_not_nil(node) - assert_equal(1, node.namespaces.keys.size) - assert(node.namespaces.has_key?('xmlns:o')) - assert_nil(node.namespaces['xmlns:o']) + if Nokogiri.uses_libxml?(">= 2.9.12") + assert_empty(node.namespaces.keys) + assert_equal("

foo

", node.to_html) + elsif Nokogiri.uses_libxml? + assert_equal(1, node.namespaces.keys.size) + assert(node.namespaces.has_key?('xmlns:o')) + assert_nil(node.namespaces['xmlns:o']) + assert_equal("

foo

", node.to_html) + else # jruby + assert_empty(node.namespaces.keys) + assert_equal("foo", node.to_html) + end end def test_xpath_results_have_document_and_are_decorated diff --git a/test/xml/test_xpath.rb b/test/xml/test_xpath.rb index 271412a70f..fe22646ba1 100644 --- a/test/xml/test_xpath.rb +++ b/test/xml/test_xpath.rb @@ -340,7 +340,7 @@ def name_equals(nodeset, name, *args) # long list of long arguments, to apply GC pressure during # ruby_funcall argument marshalling xpath = ["//tool[name_equals(.,'hammer'"] - 1000.times { xpath << "'unused argument #{'x' * 1000}'" } + 500.times { xpath << "'unused argument #{'x' * 1000}'" } xpath << "'unused argument')]" xpath = xpath.join(',')