diff --git a/.gitignore b/.gitignore index 89ae688..01abd0f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1 @@ -/redcarpet-*gem -/redcarpet-*-test-missing-files.tar.gz +/redcarpet-2.1.1.gem diff --git a/redcarpet-create-missing-test-files.sh b/redcarpet-create-missing-test-files.sh deleted file mode 100644 index 3c49d3d..0000000 --- a/redcarpet-create-missing-test-files.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -usage() { - echo "$0 " -} - -set -e -set -x - -if [ $# -lt 1 ] ; then - usage - exit 1 -fi - -VERSION=$1 - -GEMNAME=redcarpet -TMPDIR=$(mktemp -d /var/tmp/${GEMNAME}-XXXXXX) -CURDIR=$(pwd) -GITTOPDIR=${GEMNAME}-${VERSION} - -pushd $TMPDIR - -git clone http://github.com/vmg/${GEMNAME} ${GITTOPDIR} -cd ${GEMNAME}-$VERSION - -git checkout -b fedora-$VERSION v$VERSION || true -cd .. - -tar czf $CURDIR/${GEMNAME}-${VERSION}-test-missing-files.tar.gz \ - ${GITTOPDIR}/test/ \ - -popd -rm -rf $TMPDIR - diff --git a/rubygem-redcarpet-libxml2-2.8-fix.patch b/rubygem-redcarpet-libxml2-2.8-fix.patch new file mode 100644 index 0000000..5ba5296 --- /dev/null +++ b/rubygem-redcarpet-libxml2-2.8-fix.patch @@ -0,0 +1,127 @@ +diff --git a/test/redcarpet_test.rb b/test/redcarpet_test.rb +index 70e40ea..67bea67 100644 +--- a/test/redcarpet_test.rb ++++ b/test/redcarpet_test.rb +@@ -83,8 +83,7 @@ EOS + +

<script>BAD</script>

+ +-

<img src="/favicon.ico" /> +- ++

<img src="/favicon.ico" />

+ EOE + + markdown = render_with(@rndr[:escape_html], source) +@@ -93,7 +92,7 @@ EOE + + def test_that_filter_html_works + markdown = render_with(@rndr[:no_html], 'Through NO ') +- html_equal "

Through NO DOUBLE NO

", markdown ++ html_equal "

Through NO DOUBLE NO

\n", markdown + end + + def test_filter_html_doesnt_break_two_space_hard_break +@@ -141,21 +140,21 @@ class MarkdownTest < Test::Unit::TestCase + + def test_that_simple_one_liner_goes_to_html + assert_respond_to @markdown, :render +- html_equal "

Hello World.

", @markdown.render("Hello World.") ++ html_equal "

Hello World.

\n", @markdown.render("Hello World.") + end + + def test_that_inline_markdown_goes_to_html + markdown = @markdown.render('_Hello World_!') +- html_equal "

Hello World!

", markdown ++ html_equal "

Hello World!

\n", markdown + end + + def test_that_inline_markdown_starts_and_ends_correctly + markdown = render_with({:no_intra_emphasis => true}, '_start _ foo_bar bar_baz _ end_ *italic* **bold** _blah_') + +- html_equal "

start _ foo_bar bar_baz _ end italic bold blah

", markdown ++ html_equal "

start _ foo_bar bar_baz _ end italic bold blah

\n", markdown + + markdown = @markdown.render("Run 'rake radiant:extensions:rbac_base:migrate'") +- html_equal "

Run 'rake radiant:extensions:rbac_base:migrate'

", markdown ++ html_equal "

Run 'rake radiant:extensions:rbac_base:migrate'

\n", markdown + end + + def test_that_urls_are_not_doubly_escaped +@@ -249,7 +248,7 @@ class MarkdownTest < Test::Unit::TestCase + + def test_whitespace_after_urls + rd = render_with({:autolink => true}, "Japan: http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm (yes, japan)") +- exp = %{

Japan: http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm (yes, japan)

} ++ exp = %{

Japan: http://www.abc.net.au/news/events/japan-quake-2011/beforeafter.htm (yes, japan)

\n} + html_equal exp, rd + end + +@@ -269,7 +268,7 @@ class MarkdownTest < Test::Unit::TestCase + end + + def test_infinite_loop_in_header +- html_equal @markdown.render(<<-header), "

Body

" ++ html_equal @markdown.render(<<-header), "

Body

\n" + ###### + #Body# + ###### +@@ -313,7 +312,7 @@ fenced + + def test_that_headers_are_linkable + markdown = @markdown.render('### Hello [GitHub](http://github.com)') +- html_equal "

Hello GitHub

", markdown ++ html_equal "

Hello GitHub

\n", markdown + end + + def test_autolinking_with_ent_chars +@@ -338,7 +337,7 @@ class CustomRenderTest < Test::Unit::TestCase + + def test_simple_overload + md = Redcarpet::Markdown.new(SimpleRender) +- html_equal "

This is just a test

", ++ html_equal "

This is just a test

\n", + md.render("This is *just* a test") + end + +@@ -358,36 +357,36 @@ end + class RedcarpetCompatTest < Test::Unit::TestCase + def test_simple_compat_api + html = RedcarpetCompat.new("This is_just_a test").to_html +- html_equal "

This isjusta test

", html ++ html_equal "

This isjusta test

\n", html + end + + def test_compat_api_enables_extensions + html = RedcarpetCompat.new("This is_just_a test", :no_intra_emphasis).to_html +- html_equal "

This is_just_a test

", html ++ html_equal "

This is_just_a test

\n", html + end + + def test_compat_api_knows_fenced_code_extension + text = "```ruby\nx = 'foo'\n```" + html = RedcarpetCompat.new(text, :fenced_code).to_html +- html_equal "
x = 'foo'\n
", html ++ html_equal "
x = 'foo'\n
\n", html + end + + def test_compat_api_ignores_gh_blockcode_extension + text = "```ruby\nx = 'foo'\n```" + html = RedcarpetCompat.new(text, :fenced_code, :gh_blockcode).to_html +- html_equal "
x = 'foo'\n
", html ++ html_equal "
x = 'foo'\n
\n", html + end + + def test_compat_api_knows_no_intraemphasis_extension + html = RedcarpetCompat.new("This is_just_a test", :no_intraemphasis).to_html +- html_equal "

This is_just_a test

", html ++ html_equal "

This is_just_a test

\n", html + end + + def test_translate_outdated_extensions + # these extensions are no longer used + exts = [:gh_blockcode, :no_tables, :smart, :strict] + html = RedcarpetCompat.new('"TEST"', *exts).to_html +- html_equal "

"TEST"

", html ++ html_equal "

"TEST"

\n", html + end + end diff --git a/rubygem-redcarpet.spec b/rubygem-redcarpet.spec index 23037f3..8e4ac32 100644 --- a/rubygem-redcarpet.spec +++ b/rubygem-redcarpet.spec @@ -1,45 +1,49 @@ %global gem_name redcarpet +%global gem_extinstdir %{gem_extdir_mri}/lib -Name: rubygem-%{gem_name} -Version: 3.6.1 -Release: 3%{?dist} +Summary: A fast, safe and extensible Markdown to (X)HTML parser +Name: rubygem-%{gem_name} +Version: 2.1.1 +Release: 7%{?dist} +Group: Development/Languages +License: ISC +URL: http://github.com/tanoku/redcarpet +Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +Patch0: rubygem-redcarpet-libxml2-2.8-fix.patch +Requires: ruby(release) +BuildRequires: rubygems-devel +BuildRequires: ruby-devel +BuildRequires: rubygem(minitest) +BuildRequires: rubygem(rake) +BuildRequires: rubygem(nokogiri) +BuildRequires: rubygem(rdoc) + +Provides: rubygem(%{gem_name}) = %{version} -Summary: A fast, safe and extensible Markdown to (X)HTML parser -# SPDX confirmed -License: MIT -URL: http://github.com/vmg/redcarpet -Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem -Source1: %{gem_name}-%{version}-test-missing-files.tar.gz -# Source1 is created by $ bash %%SOURCE2 %%version -Source2: %{gem_name}-create-missing-test-files.sh -BuildRequires: gcc -BuildRequires: ruby(release) -BuildRequires: rubygems-devel -BuildRequires: ruby-devel -BuildRequires: rubygem(test-unit) %description -A fast, safe and extensible Markdown to (X)HTML parser. +A fast, safe and extensible Markdown to (X)HTML parser -%package doc -Summary: Documentation for %{name} -Requires: %{name} = %{version}-%{release} -BuildArch: noarch -%description doc -Documentation for %{name}. +%package doc +Summary: Documentation for %{name} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation for %{name} %prep -%setup -q -n %{gem_name}-%{version} -b1 -cp -p ../%{gem_name}-%{version}.gemspec . +%setup -q -c -T +%gem_install -n %{SOURCE0} + +pushd .%{gem_instdir} +%patch0 -p1 +popd %build -gem build ./%{gem_name}-%{version}.gemspec -%gem_install - -# https://github.com/vmg/redcarpet/pull/503 -chmod a-x .%{gem_instdir}/ext/redcarpet/html.c %install mkdir -p %{buildroot}%{gem_dir} @@ -49,178 +53,37 @@ mkdir -p %{buildroot}%{_bindir} cp -a ./%{_bindir}/* %{buildroot}%{_bindir} chmod 755 %{buildroot}%{_bindir}/redcarpet -mkdir -p %{buildroot}%{gem_extdir_mri} -cp -a .%{gem_extdir_mri}/{gem.build_complete,*.so} \ - %{buildroot}%{gem_extdir_mri}/ +mkdir -p %{buildroot}%{gem_extinstdir} +mv %{buildroot}%{gem_instdir}/lib/redcarpet.so %{buildroot}%{gem_extinstdir} -# cleanups -pushd %{buildroot}%{gem_instdir} -# Prevent dangling symlink in -debuginfo. -rm -rf \ - Gemfile \ - Rakefile \ - ext/ \ - test/ \ - %{gem_name}.gemspec \ - %{nil} -popd -rm -f %{buildroot}%{gem_cache} +# Fix permissions +chmod 644 ./%{gem_instdir}/COPYING %check -cp -a test/ .%{gem_instdir}/ - pushd .%{gem_instdir} -env \ - RUBYOPT=-Ilib:$(dirs +1)%{gem_extdir_mri}:test \ - ruby -e 'Dir.glob "./test/**/*_test.rb", &method(:require)' +ruby -rubygems -Ilib test/redcarpet_test.rb popd %files -%dir %{gem_instdir} -%license %{gem_instdir}/COPYING -%doc %{gem_instdir}/README.markdown - +%dir %{gem_instdir} %{_bindir}/redcarpet - %{gem_instdir}/bin +%exclude %{gem_instdir}/ext %{gem_libdir} -%{gem_extdir_mri} - +%{gem_extinstdir} +%{gem_cache} %{gem_spec} +%doc %{gem_instdir}/COPYING +%doc %{gem_instdir}/README.markdown %files doc +%{gem_instdir}/Rakefile +%{gem_instdir}/test +%{gem_instdir}/%{gem_name}.gemspec %doc %{gem_docdir} -%{gem_instdir}/CHANGELOG.md -%{gem_instdir}/CONTRIBUTING.md + %changelog -* Thu Jan 08 2026 Vít Ondruch - 3.6.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_4.0 - -* Fri Jul 25 2025 Fedora Release Engineering - 3.6.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild - -* Thu Feb 27 2025 Mamoru TASAKA - 3.6.1-1 -- 3.6.1 - -* Sat Jan 18 2025 Fedora Release Engineering - 3.6.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild - -* Wed Jan 08 2025 Mamoru TASAKA - 3.6.0-7 -- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.4 - -* Fri Jul 19 2024 Fedora Release Engineering - 3.6.0-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild - -* Fri Jan 26 2024 Fedora Release Engineering - 3.6.0-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - -* Wed Jan 03 2024 Mamoru TASAKA - 3.6.0-4 -- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.3 - -* Fri Jul 21 2023 Fedora Release Engineering - 3.6.0-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild - -* Sun Apr 30 2023 Mamoru TASAKA - 3.6.0-2 -- 3.6.0 -- License changed to MIT (SPDX confimred) -- CVE-2020-26298 is fixed in this version - -* Fri Jan 20 2023 Fedora Release Engineering - 3.3.2-25 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild - -* Wed Jan 04 2023 Mamoru TASAKA - 3.3.2-24 -- Rebuild for https://fedoraproject.org/wiki/Changes/Ruby_3.2 - -* Sat Jul 23 2022 Fedora Release Engineering - 3.3.2-23 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild - -* Wed Jan 26 2022 Mamoru TASAKA - 3.3.2-22 -- F-36: rebuild against ruby31 -- modernize spec file, especially move %%gem_install to %%build - to fix FTBFS with package_notes - -* Fri Jan 21 2022 Fedora Release Engineering - 3.3.2-21 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild - -* Fri Jul 23 2021 Fedora Release Engineering - 3.3.2-20 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - -* Wed Jan 27 2021 Fedora Release Engineering - 3.3.2-19 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild - -* Wed Jan 6 2021 Vít Ondruch - 3.3.2-18 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_3.0 - -* Wed Jul 29 2020 Fedora Release Engineering - 3.3.2-17 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Thu Jan 30 2020 Fedora Release Engineering - 3.3.2-16 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Fri Jan 17 2020 Mamoru TASAKA - 3.3.2-15 -- F-32: rebuild against ruby27 - -* Fri Jul 26 2019 Fedora Release Engineering - 3.3.2-14 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Sat Feb 02 2019 Fedora Release Engineering - 3.3.2-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Thu Jan 17 2019 Vít Ondruch - 3.3.2-12 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.6 - -* Sat Jul 14 2018 Fedora Release Engineering - 3.3.2-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Fri Feb 09 2018 Fedora Release Engineering - 3.3.2-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Sat Jan 20 2018 Björn Esser - 3.3.2-9 -- Rebuilt for switch to libxcrypt - -* Thu Jan 04 2018 Mamoru TASAKA - 3.3.2-8 -- F-28: rebuild for ruby25 - -* Thu Aug 03 2017 Fedora Release Engineering - 3.3.2-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 3.3.2-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Sat Feb 11 2017 Fedora Release Engineering - 3.3.2-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Wed Jan 11 2017 Vít Ondruch - 3.3.2-4 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.4 - -* Thu Feb 04 2016 Fedora Release Engineering - 3.3.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Mon Jan 11 2016 Vít Ondruch - 3.3.2-2 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.3 - -* Wed Jul 08 2015 Vít Ondruch - 3.3.2-1 -- Update to Redcarpet 3.3.2. - -* Thu Jun 18 2015 Fedora Release Engineering - 2.1.1-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild - -* Fri Jan 16 2015 Vít Ondruch - 2.1.1-12 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.2 - -* Mon Aug 18 2014 Fedora Release Engineering - 2.1.1-11 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild - -* Sun Jun 08 2014 Fedora Release Engineering - 2.1.1-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild - -* Thu Apr 17 2014 Vít Ondruch - 2.1.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Changes/Ruby_2.1 - -* Sun Aug 04 2013 Fedora Release Engineering - 2.1.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild - * Thu Mar 14 2013 Josef Stribny - 2.1.1-7 - Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 diff --git a/sources b/sources index 34f4212..40f061c 100644 --- a/sources +++ b/sources @@ -1,2 +1 @@ -SHA512 (redcarpet-3.6.1.gem) = 220452e147507604394ff5f3f2747cfc17da1e467bd59a54ed47ec46d2ffdaa1f505eb2a1c62723639d20f674e5e84014d55cf1b5d55b65c7ddee2d363a03812 -SHA512 (redcarpet-3.6.1-test-missing-files.tar.gz) = 1af8292c4289092b8adf2252e0586d7ec70120058690072087a6bf942ab1d10a25062078df506a45a9d45fe3075ec7cff8a489aa8f06c6b8fb2d1bb51ceba441 +9fb22c5a84d5068362d78c95505dd307 redcarpet-2.1.1.gem