From cbf055ae8f2fb67e00df9ea122e64a67f930f576 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Fri, 23 Jun 2023 13:24:24 +0100 Subject: gentoo auto-resync : 23:06:2023 - 13:24:24 --- www-apps/Manifest.gz | Bin 13126 -> 13120 bytes www-apps/jekyll-coffeescript/Manifest | 2 +- .../jekyll-coffeescript-2.0.0.ebuild | 14 +- www-apps/jekyll-sass-converter/Manifest | 2 +- .../jekyll-sass-converter-2.2.0.ebuild | 4 +- www-apps/jekyll-watch/Manifest | 2 +- www-apps/jekyll-watch/jekyll-watch-2.2.1-r1.ebuild | 4 +- www-apps/jekyll/Manifest | 4 +- .../jekyll/files/jekyll-4.3.2-no-safe_yaml.patch | 405 +++++++++++++++++++++ www-apps/jekyll/jekyll-4.3.2-r1.ebuild | 105 ++++++ www-apps/jekyll/jekyll-4.3.2.ebuild | 6 +- 11 files changed, 530 insertions(+), 18 deletions(-) create mode 100644 www-apps/jekyll/files/jekyll-4.3.2-no-safe_yaml.patch create mode 100644 www-apps/jekyll/jekyll-4.3.2-r1.ebuild (limited to 'www-apps') diff --git a/www-apps/Manifest.gz b/www-apps/Manifest.gz index 839aa7ac26db..1e8113be2496 100644 Binary files a/www-apps/Manifest.gz and b/www-apps/Manifest.gz differ diff --git a/www-apps/jekyll-coffeescript/Manifest b/www-apps/jekyll-coffeescript/Manifest index 3374c364e07b..ec5bebbb45f2 100644 --- a/www-apps/jekyll-coffeescript/Manifest +++ b/www-apps/jekyll-coffeescript/Manifest @@ -1,3 +1,3 @@ DIST jekyll-coffeescript-2.0.0.tar.gz 5984 BLAKE2B 2158f138820253a4e181035dcdf7e25ac7ded26ce7b6e6d6fb5f73e18f5c7e8bbeed8b47a8b12c059b2e7e5167e41f0f9645d5d08e85ff8ab52d400b1c4eb3c7 SHA512 31742ff4a9139d56baaa657b8259c1327a3f7ea14465203907b4d98e6c2b70286f5a1a7515140638a2347db86a35645e715a527b4b85fd536176277f7cfa3400 -EBUILD jekyll-coffeescript-2.0.0.ebuild 983 BLAKE2B 4466c4304e87c0915bf18efa3389ab2a2e8bfb2c528467e55a2716d1f225b3462eeeb76429de5ca998c0a995cb5fee9b6bb0fece3a5cd787128681f4141949f9 SHA512 5be610e0c60b7eaf1ce4e511748844ac64f59871615abe181ede7899c291af8b48468d2afe33c87d34a1499563b696ef2a5bce4c4906186fbe376f0eb69ffbda +EBUILD jekyll-coffeescript-2.0.0.ebuild 983 BLAKE2B 4eca3b3b3fe947cc24cb5148286646a582d034765dd0f911b783bd7630bc8c9ab116cf5e521c80c2bcff523a72ac0c69d8427ca4b371a5be1a9faf1a2e21ce39 SHA512 ea280aa409359a5bea7fe6a579b2e501a3379f9f0adcd6cdeda132112d8e35c5283b084d5d8178feede5b5851d64b19b1f75c83154a7f14d17fc4d230f6c8a0a MISC metadata.xml 257 BLAKE2B 4925a56d0e45b1d6dcae7f2bb3379f572d89e7a0c210954985c25364770190be5f8024aafd9fc387c8d59fa9657eb9c7872fefe13a29fb904a5e37e613bb21b0 SHA512 5077a3754a874894def1703d9caf781d22d828cc52930bc1d8e68e80079c9c0bda64f566f4486434e45bb9f2f7c8f7769ee06522337384d527960c258acf4747 diff --git a/www-apps/jekyll-coffeescript/jekyll-coffeescript-2.0.0.ebuild b/www-apps/jekyll-coffeescript/jekyll-coffeescript-2.0.0.ebuild index efbc13877e54..fefe0ab957b2 100644 --- a/www-apps/jekyll-coffeescript/jekyll-coffeescript-2.0.0.ebuild +++ b/www-apps/jekyll-coffeescript/jekyll-coffeescript-2.0.0.ebuild @@ -2,25 +2,29 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -USE_RUBY="ruby27 ruby30" + +USE_RUBY="ruby30 ruby31" RUBY_FAKEGEM_RECIPE_TEST="rspec3" RUBY_FAKEGEM_EXTRADOC="README.md History.markdown" RUBY_FAKEGEM_TASK_DOC="" - RUBY_FAKEGEM_GEMSPEC="jekyll-coffeescript.gemspec" inherit ruby-fakegem -SRC_URI="https://github.com/jekyll/jekyll-coffeescript/archive/v${PV}.tar.gz -> ${P}.tar.gz" DESCRIPTION="A CoffeeScript Converter for Jekyll" HOMEPAGE="https://github.com/jekyll/jekyll-coffeescript" +SRC_URI="https://github.com/jekyll/jekyll-coffeescript/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm64" IUSE="test" +ruby_add_rdepend ">=dev-ruby/coffee-script-2.2 + >=dev-ruby/coffee-script-source-1.12" +ruby_add_bdepend "test? ( www-apps/jekyll )" + all_ruby_prepare() { sed -i -e '/bundler/d' Rakefile || die sed -i -e "/^RSpec/i \ @@ -29,7 +33,3 @@ all_ruby_prepare() { require 'jekyll-coffeescript'" spec/spec_helper.rb || die sed -i -e 's/git ls-files/find -type f -print/' ${RUBY_FAKEGEM_GEMSPEC} || die } - -ruby_add_rdepend ">=dev-ruby/coffee-script-2.2 - >=dev-ruby/coffee-script-source-1.12" -ruby_add_bdepend "test? ( www-apps/jekyll )" diff --git a/www-apps/jekyll-sass-converter/Manifest b/www-apps/jekyll-sass-converter/Manifest index c0d1e95fcaf5..f6f682aa635e 100644 --- a/www-apps/jekyll-sass-converter/Manifest +++ b/www-apps/jekyll-sass-converter/Manifest @@ -1,3 +1,3 @@ DIST jekyll-sass-converter-2.2.0.tar.gz 16359 BLAKE2B ed242d053c0c474bee9b86ca4987cb1348b3596c4c41415c229b454bc4aabf46c25c19ed69c4a206298bccde012935f10ec292d421c6506f22fa19fdd943d1ee SHA512 2704defb5ded854afb3620e876045e222e3f4bf03344f9a060fcfc0b1f2e6bebfef776aff69e592ba8484516060d4c5a75499fc343fcab5f9c96cc2f6658f344 -EBUILD jekyll-sass-converter-2.2.0.ebuild 992 BLAKE2B 85bd236fc94cbdc82040874c1a258b220eea4c409142d6fc4ed0bca41d1832095bc4b367d6980510a36de10123bbda91c232c1a04357bce4cd18fc74344679ed SHA512 69fc0607fcbd3f5f7fad7acf7b89a491efe6d6eaa8adfead3cc94b191cdcbfedf3ace12d555488113baea594571ab6e794944a3f984927def07e82bebc05a50e +EBUILD jekyll-sass-converter-2.2.0.ebuild 983 BLAKE2B e61f3f5e901b2d50fcb9091d25d11b205c20a08f4530e92b06cd17131914246b67e0e0a4d5b6a625b4ae861337400ec7c74559ef609dcbf186373e346824eb6b SHA512 06ec5e478da438567ebefecbefbd993ca68ae48c336f036b38327e67f4fefc88f426ea7ba6dfea17d1d2f9bcb83f85cc92ac7321d2f32958b19fc129437d3435 MISC metadata.xml 259 BLAKE2B dd88b002ec211fc2193ad1509236ed2b3d6a18dcd3000d0bae0790205d8163e0beb674f8970b1457c118fe31a87fc2be6b62b9bbab1f11ec0be597fe85b4ad53 SHA512 d4f90a12f7955e8550a0e3cf70bc33412496c0c2d5a39e562934e075607fd3778703a68ead652c4a3e9fb07e3338538df7988be48484f69fa81640f59f65922c diff --git a/www-apps/jekyll-sass-converter/jekyll-sass-converter-2.2.0.ebuild b/www-apps/jekyll-sass-converter/jekyll-sass-converter-2.2.0.ebuild index 6a24e237c3ae..3b10e00824cd 100644 --- a/www-apps/jekyll-sass-converter/jekyll-sass-converter-2.2.0.ebuild +++ b/www-apps/jekyll-sass-converter/jekyll-sass-converter-2.2.0.ebuild @@ -2,11 +2,10 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=8 -USE_RUBY="ruby27 ruby30" +USE_RUBY="ruby30 ruby31" RUBY_FAKEGEM_RECIPE_TEST="rspec3" RUBY_FAKEGEM_EXTRADOC="README.md History.markdown" - RUBY_FAKEGEM_GEMSPEC="jekyll-sass-converter.gemspec" inherit ruby-fakegem @@ -18,7 +17,6 @@ SRC_URI="https://github.com/jekyll/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm64" -IUSE="" ruby_add_rdepend ">=dev-ruby/sassc-2.0.1:2" ruby_add_bdepend "test? ( >=www-apps/jekyll-2 )" diff --git a/www-apps/jekyll-watch/Manifest b/www-apps/jekyll-watch/Manifest index 67c406a2e929..c014cea0fc46 100644 --- a/www-apps/jekyll-watch/Manifest +++ b/www-apps/jekyll-watch/Manifest @@ -1,3 +1,3 @@ DIST jekyll-watch-2.2.1.tar.gz 16631 BLAKE2B 2311802227206b76d1f7b18ccc6360514164c6148f549490bd4df69e56e4d7a8c944c828e950bb156929081ea8ac15bdc37099eba5af3e0f3e1c20b403828f60 SHA512 55867bedf0f453aad7df267d21cc2a49857916b51ed70e727718c9ed18dedd474bc45c446abcbc803ab4b8b26f8afb1f0e05e6655441186788fbace869c74b6d -EBUILD jekyll-watch-2.2.1-r1.ebuild 793 BLAKE2B cc0c9cc5a1232b2415ebb0485e0c49593794b81f32055d35c2d381a4d187d11c5d1e9bb3103e251615d3b4117495ce11e4f2114e9b09af31d94a3326e722604c SHA512 8a27740f6b3c8760a4028e0feae4a9cc1d1359c6d6f8e1c280f466f45d1aec6b538027420961ca67ff792db6132ea26d8d8fe0d597acd916c74ebb4d0b285a09 +EBUILD jekyll-watch-2.2.1-r1.ebuild 784 BLAKE2B 496c042e6b8b1d101087447d2526d29142cc6b55435a3f464586a26f95aa98264a557a7d0b9b337d2ec39ffc067e684ff4fd614b41435f9937dec2e1a53498b1 SHA512 803ad613f88f65b029cbdbed2f5633efc170aac8b91075632294ae35474c4bb19dc7d2cc312b5c5d98a45019331176a5fb9eb49ce35ed8b31e4fd499b4a4f61b MISC metadata.xml 252 BLAKE2B 2bbd24ef4325500a47920c964979c2cc43786c51b2fd58cfd2b9e0c0bf2e5e61946853eab3acb4edea48ae2ccc90f607459aa66d0c8578e85f6e71ff8580675b SHA512 4c087957bf6647a7196f74d688dc8cd983e180762f695797efe80106df6bc5ab31b85eb9cb5d9e169cd1b010ea60e36a6a65b683ecd138b264fe2247cbb33475 diff --git a/www-apps/jekyll-watch/jekyll-watch-2.2.1-r1.ebuild b/www-apps/jekyll-watch/jekyll-watch-2.2.1-r1.ebuild index ab5a40126111..87a7a16aa60b 100644 --- a/www-apps/jekyll-watch/jekyll-watch-2.2.1-r1.ebuild +++ b/www-apps/jekyll-watch/jekyll-watch-2.2.1-r1.ebuild @@ -2,12 +2,11 @@ # Distributed under the terms of the GNU General Public License v2 EAPI=7 -USE_RUBY="ruby27 ruby30" +USE_RUBY="ruby30 ruby31" RUBY_FAKEGEM_RECIPE_TEST="rspec3" RUBY_FAKEGEM_TASK_DOC="" RUBY_FAKEGEM_EXTRADOC="README.md History.markdown" - RUBY_FAKEGEM_GEMSPEC="jekyll-watch.gemspec" inherit ruby-fakegem @@ -19,7 +18,6 @@ SRC_URI="https://github.com/jekyll/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" LICENSE="MIT" SLOT="0" KEYWORDS="~amd64 ~arm64" -IUSE="" ruby_add_rdepend "dev-ruby/listen:3" ruby_add_bdepend "test? ( >=www-apps/jekyll-2 )" diff --git a/www-apps/jekyll/Manifest b/www-apps/jekyll/Manifest index 3c9fe5133d0a..c0f8583c50d5 100644 --- a/www-apps/jekyll/Manifest +++ b/www-apps/jekyll/Manifest @@ -1,5 +1,7 @@ AUX jekyll-3.6.0-test-helper.patch 657 BLAKE2B 8e9d9bb57efa2370976d459dac772f7f41c0bf02c2fc0c71f19d4b78714e06f96d8a800a45f7c3eca80f766639036a624df24e681a9258e4bdc76bfb563498ad SHA512 7b53cd03a988cc5c949d15be8de91ffd37d4f228822cc3bec64c961c163ba60946df1d314bdf746a33a42df091f06f481f945a712515cca04539e111393246d0 +AUX jekyll-4.3.2-no-safe_yaml.patch 16966 BLAKE2B 4af96af3bc4c60836639ccdb2ffb58331b807eac04711a899a4b72357e989b6fb06767d9fa605d403ead822ef8363a31a076e825383dc40ab03491f0a4d134e9 SHA512 6333d0cb148ba3c9edb56915bc3b48fbe064bab4d9289289491129d8750f22fbf925730fb9ca9cefc0b7a58550e5b1a8e5b5ba5a5487accc7dc64fc16ea13eba AUX jekyll-4.3.2-sass.patch 4212 BLAKE2B 32c9764cf97e0c925eeee64ce10c6e6af8858199f588149dc33010814882b27a0886bb46d53ab9c82ae9639f9dc3cac63711240046723b42d39f0902837d7a90 SHA512 b7444d33cc0e98d1f53c0fd17a33a9a411621122e29793f1efdaf3f41bdcaf188ba8e0308b77d941250bd3183b8306e410f0b1ea959b927be2d214ff9db480b9 DIST jekyll-4.3.2.tar.gz 1447970 BLAKE2B 8f722c363483d937198f5ac1abbca3aa59f754f66106d4355c59da541cce218704ee3976af2842e6b2f58d367eb80caa376612f73c84032ac5a2aa3076f6d007 SHA512 865bffe97683a4765a16b6eb9ec1bbbb5d2567699ad343360e101d3cae81187ea0f218b67d13a1121213fc49269475935fe0322d8b0f052c868536d5aaa0f7ab -EBUILD jekyll-4.3.2.ebuild 3065 BLAKE2B 689c5129933cb35a8713e358ba4fb77e7f845d8360cce574304867e9b98a3d808abccef6a0222dfc23b8babcb408ef5a285c7a9aa73e367df6ab9b483eb9c56a SHA512 b978add621395c5f3283164a73fec1ba28d4633fe11223516074e3973c244192ecb0c3abecc70a0c22901cd58828577684cd5b97e655b928cb249392b2960232 +EBUILD jekyll-4.3.2-r1.ebuild 3234 BLAKE2B 478ecf83bb5c628a90fc4dd960425cdc8b71f6e48c92f4323ce2de5048b67c8ade6bc155366bd58e7f23bab97c9042ab8c74a17300f34ee683daf8a333bec0ca SHA512 1d5a55f940542dda74c77c75bcae5822ff7e7a95d95ae3f55123a3778018423992f5ff53d7877ac020bc241e68931b429f0616f5c8d9414cd4c00df0f33de075 +EBUILD jekyll-4.3.2.ebuild 3204 BLAKE2B c92ba4e0dff17272d68074a9c6c073091a9e39a76c54a32e9f45e9362a06aa1afb22354848d027863a7d0e22d19b92c458af72391544b66edca2572401c56e50 SHA512 b11742502fca83f675c0bda7874dfdaf526756e630eb8041888deabcd67994d6a94cbceb1b9438045c5e2faf1329bec8ab388389b7c3aec64421d84cc1531b8c MISC metadata.xml 246 BLAKE2B a1eee8b457925c68b280d73349fa5bfff1639a1b7c1763bb38f9c43680a0cedfaf583b776820211cf3992ea83e983c237e00be9340b4d64a72775f0c4014ff54 SHA512 7ccb92985f1a956a36f408671063aac1ef02e2e8284cba45ae636dd23dd085087f452b9a96c3bbbcff5d809e4559fc8ba653b3198eb995baf1f217f20e893303 diff --git a/www-apps/jekyll/files/jekyll-4.3.2-no-safe_yaml.patch b/www-apps/jekyll/files/jekyll-4.3.2-no-safe_yaml.patch new file mode 100644 index 000000000000..d16b28076816 --- /dev/null +++ b/www-apps/jekyll/files/jekyll-4.3.2-no-safe_yaml.patch @@ -0,0 +1,405 @@ +From https://sources.debian.org/patches/jekyll/4.3.1%2Bdfsg-2/0016-Drop-usage-of-safe_yaml.patch/ +(added Symbol to allowed classes for jekyll-sass-converter) + +From: Antonio Terceiro +Date: Sat, 21 Jan 2023 23:25:30 -0300 +Subject: Drop usage of safe_yaml + +Squashed commit of the following: + +commit 9e8b06e55afab8da1bb134a9f5362f403c82f05b +Author: f +Date: Sat Aug 21 14:27:31 2021 -0300 + + Move YAML loading into Utils + +commit a91a88119e4b77fff26812384970bbb0b7f1be31 +Author: f +Date: Thu Aug 19 14:45:39 2021 -0300 + + Support older Psych versions + +commit b0526242dff12fa4e95ddc0b67efdb73144fb517 +Author: f@sutty.nl +Date: Thu Aug 19 13:42:39 2021 -0300 + + Use Psych as YAML parser + +Source: https://github.com/jekyll/jekyll/pull/8772 +Additional changes: + - Also make the replacement of SafeYAML in lib/jekyll/commands/serve.rb +--- a/features/step_definitions.rb ++++ b/features/step_definitions.rb +@@ -159,7 +159,7 @@ end + Given(%r!^I have a configuration file with "(.*)" set to "(.*)"$!) do |key, value| + config = \ + if source_dir.join("_config.yml").exist? +- SafeYAML.load_file(source_dir.join("_config.yml")) ++ Jekyll::Utils.safe_load_yaml_file(source_dir.join("_config.yml")) + else + {} + end +--- a/jekyll.gemspec ++++ b/jekyll.gemspec +@@ -44,7 +44,6 @@ Gem::Specification.new do |s| + s.add_runtime_dependency("mercenary", ">= 0.3.6", "< 0.5") + s.add_runtime_dependency("pathutil", "~> 0.9") + s.add_runtime_dependency("rouge", ">= 3.0", "< 5.0") +- s.add_runtime_dependency("safe_yaml", "~> 1.0") + s.add_runtime_dependency("terminal-table", ">= 1.8", "< 4.0") + s.add_runtime_dependency("webrick", "~> 1.7") + end +--- a/lib/jekyll.rb ++++ b/lib/jekyll.rb +@@ -27,18 +27,16 @@ require "logger" + require "set" + require "csv" + require "json" ++require "psych" + + # 3rd party + require "pathutil" + require "addressable/uri" +-require "safe_yaml/load" + require "liquid" + require "kramdown" + require "colorator" + require "i18n" + +-SafeYAML::OPTIONS[:suppress_warnings] = true +- + module Jekyll + # internal requires + autoload :Cleaner, "jekyll/cleaner" +--- a/lib/jekyll/commands/serve.rb ++++ b/lib/jekyll/commands/serve.rb +@@ -355,7 +355,7 @@ module Jekyll + end + + def mime_types_charset +- SafeYAML.load_file(File.expand_path("serve/mime_types_charset.json", __dir__)) ++ Jekyll::Utils.safe_load_yaml_file(File.expand_path("serve/mime_types_charset.json", __dir__)) + end + + def read_file(source_dir, file_path) +--- a/lib/jekyll/configuration.rb ++++ b/lib/jekyll/configuration.rb +@@ -126,7 +126,7 @@ module Jekyll + Jekyll::External.require_with_graceful_fail("tomlrb") unless defined?(Tomlrb) + Tomlrb.load_file(filename) + when %r!\.ya?ml!i +- SafeYAML.load_file(filename) || {} ++ Jekyll::Utils.safe_load_yaml_file(filename) || {} + else + raise ArgumentError, + "No parser for '#{filename}' is available. Use a .y(a)ml or .toml file instead." +--- a/lib/jekyll/convertible.rb ++++ b/lib/jekyll/convertible.rb +@@ -42,7 +42,7 @@ module Jekyll + self.content = File.read(filename, **Utils.merged_file_read_opts(site, opts)) + if content =~ Document::YAML_FRONT_MATTER_REGEXP + self.content = Regexp.last_match.post_match +- self.data = SafeYAML.load(Regexp.last_match(1)) ++ self.data = Jekyll::Utils.safe_load_yaml(Regexp.last_match(1)) + end + rescue Psych::SyntaxError => e + Jekyll.logger.warn "YAML Exception reading #{filename}: #{e.message}" +--- a/lib/jekyll/document.rb ++++ b/lib/jekyll/document.rb +@@ -300,7 +300,7 @@ module Jekyll + Jekyll.logger.debug "Reading:", relative_path + + if yaml_file? +- @data = SafeYAML.load_file(path) ++ @data = Jekyll::Utils.safe_load_yaml_file(path, :read_opts => site.file_read_opts) + else + begin + merge_defaults +@@ -483,7 +483,7 @@ module Jekyll + self.content = File.read(path, **Utils.merged_file_read_opts(site, opts)) + if content =~ YAML_FRONT_MATTER_REGEXP + self.content = Regexp.last_match.post_match +- data_file = SafeYAML.load(Regexp.last_match(1)) ++ data_file = Jekyll::Utils.safe_load_yaml(Regexp.last_match(1)) + merge_data!(data_file, :source => "YAML front matter") if data_file + end + end +--- a/lib/jekyll/readers/data_reader.rb ++++ b/lib/jekyll/readers/data_reader.rb +@@ -63,7 +63,7 @@ module Jekyll + when ".tsv" + CSV.read(path, **tsv_config).map { |row| convert_row(row) } + else +- SafeYAML.load_file(path) ++ Jekyll::Utils.safe_load_yaml_file(path, :read_opts => site.file_read_opts) + end + end + +--- a/lib/jekyll/regenerator.rb ++++ b/lib/jekyll/regenerator.rb +@@ -152,7 +152,7 @@ module Jekyll + begin + Marshal.load(content) + rescue TypeError +- SafeYAML.load(content) ++ Jekyll::Utils.safe_load_yaml(content) + rescue ArgumentError => e + Jekyll.logger.warn("Failed to load #{metadata_file}: #{e}") + {} +--- a/lib/jekyll/site.rb ++++ b/lib/jekyll/site.rb +@@ -471,7 +471,7 @@ module Jekyll + # Bail out if the theme_config_file is a symlink file irrespective of safe mode + return config if File.symlink?(theme_config_file) + +- theme_config = SafeYAML.load_file(theme_config_file) ++ theme_config = Jekyll::Utils.safe_load_yaml_file(theme_config_file, :read_opts => file_read_opts) + return config unless theme_config.is_a?(Hash) + + Jekyll.logger.info "Theme Config file:", theme_config_file +--- a/lib/jekyll/utils.rb ++++ b/lib/jekyll/utils.rb +@@ -316,6 +316,20 @@ module Jekyll + merged + end + ++ # Safely load YAML strings ++ def safe_load_yaml(yaml) ++ Psych.safe_load(yaml, :permitted_classes => [Date, Time, Symbol]) ++ rescue ArgumentError ++ # Psych versions < 3.1 had a different safe_load API and used ++ # problematic language. ++ Psych.safe_load(yaml, [Date, Time]) ++ end ++ ++ # Reads file contents and safely loads YAML ++ def safe_load_yaml_file(filename, read_opts = {}) ++ safe_load_yaml(File.read(filename, **read_opts)) ++ end ++ + private + + def merge_values(target, overwrite) +--- a/rake/site.rake ++++ b/rake/site.rake +@@ -92,9 +92,9 @@ namespace :site do + desc "Write the latest Jekyll version" + task :latest_version do + next if version =~ %r!(beta|rc|alpha)!i +- require "safe_yaml/load" ++ require "jekyll/yaml" + config_file = File.join(docs_folder, "_config.yml") +- config = SafeYAML.load_file(config_file) ++ config = Jekyll::Utils.safe_load_yaml_file(config_file) + config["version"] = version + File.write(config_file, YAML.dump(config)) + File.open("#{docs_folder}/latest_version.txt", "wb") { |f| f.puts(version) } +--- a/test/test_commands_serve.rb ++++ b/test/test_commands_serve.rb +@@ -143,7 +143,7 @@ class TestCommandsServe < JekyllUnitTest + ) + end + Jekyll.sites.clear +- allow(SafeYAML).to receive(:load_file).and_return({}) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).and_return({}) + allow(Jekyll::Commands::Build).to receive(:build).and_return("") + end + teardown do +--- a/test/test_configuration.rb ++++ b/test/test_configuration.rb +@@ -205,7 +205,7 @@ class TestConfiguration < JekyllUnitTest + end + + should "not raise an error on empty files" do +- allow(SafeYAML).to receive(:load_file).with(File.expand_path("empty.yml")).and_return(false) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(File.expand_path("empty.yml")).and_return(false) + Jekyll.logger.log_level = :warn + @config.read_config_file("empty.yml") + Jekyll.logger.log_level = :info +@@ -218,8 +218,8 @@ class TestConfiguration < JekyllUnitTest + end + + should "continue to read config files if one is empty" do +- allow(SafeYAML).to receive(:load_file).with(File.expand_path("empty.yml")).and_return(false) +- allow(SafeYAML).to receive(:load_file).with(File.expand_path("not_empty.yml")).and_return( ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(File.expand_path("empty.yml")).and_return(false) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(File.expand_path("not_empty.yml")).and_return( + "foo" => "bar" + ) + Jekyll.logger.log_level = :warn +@@ -279,7 +279,7 @@ class TestConfiguration < JekyllUnitTest + end + + should "fire warning with no _config.yml" do +- allow(SafeYAML).to receive(:load_file).with(@path) do ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@path) do + raise SystemCallError, "No such file or directory - #{@path}" + end + allow($stderr).to receive(:puts).with( +@@ -289,13 +289,13 @@ class TestConfiguration < JekyllUnitTest + end + + should "load configuration as hash" do +- allow(SafeYAML).to receive(:load_file).with(@path).and_return({}) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@path).and_return({}) + allow($stdout).to receive(:puts).with("Configuration file: #{@path}") + assert_equal site_configuration, Jekyll.configuration(test_config) + end + + should "fire warning with bad config" do +- allow(SafeYAML).to receive(:load_file).with(@path).and_return([]) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@path).and_return([]) + allow($stderr) + .to receive(:puts) + .and_return( +@@ -309,7 +309,7 @@ class TestConfiguration < JekyllUnitTest + end + + should "fire warning when user-specified config file isn't there" do +- allow(SafeYAML).to receive(:load_file).with(@user_config) do ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@user_config) do + raise SystemCallError, "No such file or directory - #{@user_config}" + end + allow($stderr) +@@ -325,7 +325,7 @@ class TestConfiguration < JekyllUnitTest + + should "not clobber YAML.load to the dismay of other libraries" do + assert_equal :foo, YAML.load(":foo") +- # as opposed to: assert_equal ':foo', SafeYAML.load(':foo') ++ # as opposed to: assert_equal ':foo', Jekyll::Utils.safe_load_yaml(':foo') + end + end + +@@ -340,14 +340,14 @@ class TestConfiguration < JekyllUnitTest + end + + should "load default plus posts config if no config_file is set" do +- allow(SafeYAML).to receive(:load_file).with(@paths[:default]).and_return({}) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@paths[:default]).and_return({}) + allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:default]}") + assert_equal site_configuration, Jekyll.configuration(test_config) + end + + should "load different config if specified" do +- allow(SafeYAML) +- .to receive(:load_file) ++ allow(Jekyll::Utils) ++ .to receive(:safe_load_yaml_file) + .with(@paths[:other]) + .and_return("baseurl" => "http://example.com") + allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:other]}") +@@ -360,9 +360,9 @@ class TestConfiguration < JekyllUnitTest + end + + should "load different config if specified with symbol key" do +- allow(SafeYAML).to receive(:load_file).with(@paths[:default]).and_return({}) +- allow(SafeYAML) +- .to receive(:load_file) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@paths[:default]).and_return({}) ++ allow(Jekyll::Utils) ++ .to receive(:safe_load_yaml_file) + .with(@paths[:other]) + .and_return("baseurl" => "http://example.com") + allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:other]}") +@@ -375,7 +375,7 @@ class TestConfiguration < JekyllUnitTest + end + + should "load default config if path passed is empty" do +- allow(SafeYAML).to receive(:load_file).with(@paths[:default]).and_return({}) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@paths[:default]).and_return({}) + allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:default]}") + assert_equal \ + site_configuration("config" => [@paths[:empty]]), +@@ -397,8 +397,8 @@ class TestConfiguration < JekyllUnitTest + should "load multiple config files" do + External.require_with_graceful_fail("tomlrb") + +- allow(SafeYAML).to receive(:load_file).with(@paths[:default]).and_return({}) +- allow(SafeYAML).to receive(:load_file).with(@paths[:other]).and_return({}) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@paths[:default]).and_return({}) ++ allow(Jekyll::Utils).to receive(:safe_load_yaml_file).with(@paths[:other]).and_return({}) + allow(Tomlrb).to receive(:load_file).with(@paths[:toml]).and_return({}) + allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:default]}") + allow($stdout).to receive(:puts).with("Configuration file: #{@paths[:other]}") +@@ -416,12 +416,12 @@ class TestConfiguration < JekyllUnitTest + end + + should "load multiple config files and last config should win" do +- allow(SafeYAML) +- .to receive(:load_file) ++ allow(Jekyll::Utils) ++ .to receive(:safe_load_yaml_file) + .with(@paths[:default]) + .and_return("baseurl" => "http://example.dev") +- allow(SafeYAML) +- .to receive(:load_file) ++ allow(Jekyll::Utils) ++ .to receive(:safe_load_yaml_file) + .with(@paths[:other]) + .and_return("baseurl" => "http://example.com") + allow($stdout) +--- a/test/test_site.rb ++++ b/test/test_site.rb +@@ -490,7 +490,7 @@ class TestSite < JekyllUnitTest + site = Site.new(site_configuration) + site.process + +- file_content = SafeYAML.load_file(File.join(source_dir, "_data", "members.yaml")) ++ file_content = Jekyll::Utils.safe_load_yaml_file(File.join(source_dir, "_data", "members.yaml")) + + assert_equal site.data["members"], file_content + assert_equal site.site_payload["site"]["data"]["members"], file_content +@@ -511,7 +511,7 @@ class TestSite < JekyllUnitTest + site = Site.new(site_configuration) + site.process + +- file_content = SafeYAML.load_file(File.join(source_dir, "_data", "languages.yml")) ++ file_content = Jekyll::Utils.safe_load_yaml_file(File.join(source_dir, "_data", "languages.yml")) + + assert_equal site.data["languages"], file_content + assert_equal site.site_payload["site"]["data"]["languages"], file_content +@@ -521,7 +521,7 @@ class TestSite < JekyllUnitTest + site = Site.new(site_configuration) + site.process + +- file_content = SafeYAML.load_file(File.join(source_dir, "_data", "members.json")) ++ file_content = Jekyll::Utils.safe_load_yaml_file(File.join(source_dir, "_data", "members.json")) + + assert_equal site.data["members"], file_content + assert_equal site.site_payload["site"]["data"]["members"], file_content +@@ -531,7 +531,7 @@ class TestSite < JekyllUnitTest + site = Site.new(site_configuration) + site.process + +- file_content = SafeYAML.load_file(File.join( ++ file_content = Jekyll::Utils.safe_load_yaml_file(File.join( + source_dir, "_data", "categories", "dairy.yaml" + )) + +@@ -546,7 +546,7 @@ class TestSite < JekyllUnitTest + site = Site.new(site_configuration) + site.process + +- file_content = SafeYAML.load_file(File.join( ++ file_content = Jekyll::Utils.safe_load_yaml_file(File.join( + source_dir, "_data", "categories.01", "dairy.yaml" + )) + +@@ -561,7 +561,7 @@ class TestSite < JekyllUnitTest + site = Site.new(site_configuration("safe" => false)) + site.process + +- file_content = SafeYAML.load_file(File.join(source_dir, "_data", "products.yml")) ++ file_content = Jekyll::Utils.safe_load_yaml_file(File.join(source_dir, "_data", "products.yml")) + + assert_equal site.data["products"], file_content + assert_equal site.site_payload["site"]["data"]["products"], file_content +@@ -571,7 +571,7 @@ class TestSite < JekyllUnitTest + "as they resolve to inside site.source" do + site = Site.new(site_configuration("safe" => true)) + site.process +- file_content = SafeYAML.load_file(File.join(source_dir, "_data", "products.yml")) ++ file_content = Jekyll::Utils.safe_load_yaml_file(File.join(source_dir, "_data", "products.yml")) + assert_equal site.data["products"], file_content + assert_equal site.site_payload["site"]["data"]["products"], file_content + end diff --git a/www-apps/jekyll/jekyll-4.3.2-r1.ebuild b/www-apps/jekyll/jekyll-4.3.2-r1.ebuild new file mode 100644 index 000000000000..77ab81b36060 --- /dev/null +++ b/www-apps/jekyll/jekyll-4.3.2-r1.ebuild @@ -0,0 +1,105 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +USE_RUBY="ruby30 ruby31" + +inherit ruby-fakegem + +RUBY_FAKEGEM_EXTRADOC="README.markdown History.markdown" +RUBY_FAKEGEM_EXTRAINSTALL="features" +RUBY_FAKEGEM_GEMSPEC="${PN}.gemspec" +RUBY_FAKEGEM_BINDIR="exe" + +DESCRIPTION="Simple, blog aware, static site generator" +HOMEPAGE="https://jekyllrb.com https://github.com/jekyll/jekyll" +SRC_URI="https://github.com/jekyll/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64 ~arm64" +IUSE="test" + +ruby_add_rdepend " + >=dev-ruby/addressable-2.4 + >=dev-ruby/colorator-1.0 + >=dev-ruby/em-websocket-0.5 + dev-ruby/i18n:1 + >=dev-ruby/kramdown-2.3:2 + dev-ruby/kramdown-parser-gfm:1 + dev-ruby/liquid:4 + >=dev-ruby/mercenary-0.4.0 + >=dev-ruby/pathutil-0.9 + || ( dev-ruby/rouge:4 dev-ruby/rouge:2 ) + || ( dev-ruby/terminal-table:3 dev-ruby/terminal-table:2 ) + >=www-apps/jekyll-sass-converter-2.0 + >=www-apps/jekyll-watch-2.2.1-r1 +" +ruby_add_bdepend " + test? ( + dev-ruby/httpclient + dev-ruby/kramdown-syntax-coderay + dev-ruby/launchy + dev-ruby/nokogiri + >=dev-ruby/rdiscount-2.0 + >=dev-ruby/redcarpet-3.2.3 + dev-ruby/rspec-mocks + >=dev-ruby/shoulda-3 + dev-ruby/test-unit:2 + www-apps/jekyll-coffeescript + ) +" + +all_ruby_prepare() { + eapply "${FILESDIR}"/jekyll-3.6.0-test-helper.patch + eapply -R "${FILESDIR}/${P}-sass.patch" + eapply "${FILESDIR}"/jekyll-4.3.2-no-safe_yaml.patch + + # Drop tests requiring bundler + sed -i -e '/bundle_message/d' test/test_new_command.rb || die + rm test/test_plugin_manager.rb || die + + # Drop tests requiring classifier-reborn (ruby27-only package) + rm -f test/test_related_posts.rb || die + + # Replace git command in gemspec + sed -e 's/git ls-files/find -not -type d -print/' \ + -e 's:_relative ": "./:' \ + -i $RUBY_FAKEGEM_GEMSPEC || die + + # FIXMEs: + # fails to find fixtures because this requires bundler + rm -f test/test_theme.rb || die + rm -f test/test_theme_{assets_reader,data_reader,drop}.rb || die + sed -i -e '/^ should.*theme/,/^ end$/d' \ + -e '/^ should.*theme/,/^ end$/d' test/test_site.rb || die + sed -i -e '/context "with a theme"/,/^ end/ s:^:#:' test/test_layout_reader.rb || die + sed -i -e '/normalize paths of rendered items/askip "test-theme"' test/test_liquid_renderer.rb || die + # partially requires 'toml' + rm test/test_configuration.rb || die + # pygments tests fail because of line numbering + sed -i -e '/^ context.*pygments/,/^ end$/d' test/test_tags.rb || die + #sed -i -e '/^ context.*pygments/,/^ end$/d' test/test_redcarpet.rb || die + + # Tries to use bundler and install packages. + rm -f test/test_new_command.rb || die + + # Fails due to ordering differences in ruby 3.0 + sed -e '/convert drop to json/askip "hash ordering with ruby 3"' \ + -i test/test_filters.rb || die + + # Avoid a test failing due to TZ differences + sed -e '/contain the proper page data to mimic the post liquid/askip "TZ difference"' \ + -i test/test_excerpt.rb || die + + # Confused by network-sandbox + sed -e "/return true if there's internet/askip \"Confused by network-sandbox\"" \ + -i test/test_utils.rb || die +} + +src_test() { + local -x JEKYLL_NO_BUNDLER_REQUIRE=true + + ruby-ng_src_test +} diff --git a/www-apps/jekyll/jekyll-4.3.2.ebuild b/www-apps/jekyll/jekyll-4.3.2.ebuild index db9b3c7015a0..a0dc21a39fa2 100644 --- a/www-apps/jekyll/jekyll-4.3.2.ebuild +++ b/www-apps/jekyll/jekyll-4.3.2.ebuild @@ -3,7 +3,7 @@ EAPI=8 -USE_RUBY="ruby27 ruby30" +USE_RUBY="ruby30" inherit ruby-fakegem @@ -95,6 +95,10 @@ all_ruby_prepare() { # Avoid a test failing due to TZ differences sed -e '/contain the proper page data to mimic the post liquid/askip "TZ difference"' \ -i test/test_excerpt.rb || die + + # Confused by network-sandbox + sed -e "/return true if there's internet/askip \"Confused by network-sandbox\"" \ + -i test/test_utils.rb || die } src_test() { -- cgit v1.2.3