diff --git a/rack-pr1998-fix-regexp-3rd-arg.patch b/rack-pr1998-fix-regexp-3rd-arg.patch new file mode 100644 index 0000000..1609447 --- /dev/null +++ b/rack-pr1998-fix-regexp-3rd-arg.patch @@ -0,0 +1,22 @@ +From 7877a35dd9ba38d3312ec2509b5f2f6a4de90814 Mon Sep 17 00:00:00 2001 +From: Wei Zhe Heng +Date: Mon, 26 Dec 2022 12:05:57 +0800 +Subject: [PATCH] Fix Regexp deprecated third argument with Regexp::NOENCODING + +--- + lib/rack/urlmap.rb | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/rack/urlmap.rb b/lib/rack/urlmap.rb +index afb97eea4..99c4d8236 100644 +--- a/lib/rack/urlmap.rb ++++ b/lib/rack/urlmap.rb +@@ -37,7 +37,7 @@ def remap(map) + end + + location = location.chomp('/') +- match = Regexp.new("^#{Regexp.quote(location).gsub('/', '/+')}(.*)", nil, 'n') ++ match = Regexp.new("^#{Regexp.quote(location).gsub('/', '/+')}(.*)", Regexp::NOENCODING) + + [host, location, match, app] + }.sort_by do |(host, location, _, _)| diff --git a/rubygem-rack.spec b/rubygem-rack.spec index 19656b1..d2a9628 100644 --- a/rubygem-rack.spec +++ b/rubygem-rack.spec @@ -4,12 +4,14 @@ Name: rubygem-%{gem_name} Version: 2.2.4 # Introduce Epoch (related to bug 552972) Epoch: 1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: A modular Ruby webserver interface # lib/rack/show_{status,exceptions}.rb contains snippets from Django under BSD license. License: MIT and BSD URL: https://rack.github.io/ Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem +# https://github.com/rack/rack/pull/1998 +Patch0: rack-pr1998-fix-regexp-3rd-arg.patch # git clone https://github.com/rack/rack.git && cd rack/ # git archive -v -o rack-2.2.4-tests.tar.gz 2.2.4 test/ Source1: rack-%{version}-tests.tar.gz @@ -40,6 +42,7 @@ Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} -b 1 +%patch -P0 -p1 %build # Create the gem as gem install only works on a gem file @@ -95,6 +98,10 @@ popd %doc %{gem_instdir}/example %changelog +* Mon Sep 18 2023 Mamoru TASAKA - 1:2.2.4-4 +- Backport upstream patch for Regexp.new 3rd argument deprecation + (needed for ruby 3.3) + * Fri Jul 21 2023 Fedora Release Engineering - 1:2.2.4-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild