%global gem_name rack Name: rubygem-%{gem_name} Version: 2.2.3.1 Epoch: 1 Release: 7 Summary: A modular Ruby webserver interface License: MIT and BSD URL: https://rack.github.io/ Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem Patch0: CVE-2024-39316.patch Patch1: CVE-2024-26141.patch Patch2: CVE-2024-26146.patch Patch3: CVE-2024-25126.patch Patch4: CVE-2022-44570.patch Patch5: CVE-2022-44571.patch Patch6: CVE-2022-44572.patch Patch7: CVE-2025-27610.patch Patch8: CVE-2025-27111.patch Patch9: CVE-2025-25184.patch BuildRequires: ruby(release) rubygems-devel ruby >= 2.2.2 memcached BuildArch: noarch %global __brp_mangle_shebangs_exclude_from ^%{gem_instdir}/test/cgi/test.ru$ %description Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests and responses in the simplest way possible, it unifies and distills the API for web servers, web frameworks, and software in between (the so-called middleware) into a single method call. %package help Summary: Documentation for %{name} Requires: %{name} = %{epoch}:%{version}-%{release} Provides: %{name}-doc = %{epoch}:%{version}-%{release} Obsoletes: %{name}-doc < %{epoch}:%{version}-%{release} BuildArch: noarch %description help Documentation for %{name}. %prep %autosetup -n %{gem_name}-%{version} -p1 %build gem build ../%{gem_name}-%{version}.gemspec %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* \ %{buildroot}%{_bindir}/ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x find %{buildroot}%{gem_instdir}/{bin,test/cgi} -type f | \ xargs sed -i 's|^#!/usr/bin/env ruby$|#!/usr/bin/ruby|' for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do [ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file done for file in `find %{buildroot}%{gem_instdir} -type f`; do [ ! -z "`head -n 1 $file | grep \"^#!\"`" ] && chmod -v 755 $file done %check pushd .%{gem_instdir} PID=%(mktemp) memcached -d -P "$PID" LC_ALL=C.UTF-8 \ ruby -Ilib:test -e 'Dir.glob "./test/spec_*.rb", &method(:require)' kill -TERM $(< "$PID") popd %files %dir %{gem_instdir} %{_bindir}/rackup %license %{gem_instdir}/MIT-LICENSE %{gem_libdir} %{gem_instdir}/bin %exclude %{gem_cache} %{gem_spec} %files help %doc %{gem_docdir} %doc %{gem_instdir}/CHANGELOG.md %doc %{gem_instdir}/README.rdoc %doc %{gem_instdir}/CONTRIBUTING.md %doc %{gem_instdir}/SPEC.rdoc %{gem_instdir}/Rakefile %{gem_instdir}/%{gem_name}.gemspec %doc %{gem_instdir}/example %doc %{gem_instdir}/contrib %changelog * Tue Mar 18 2025 changtao - 1:2.2.3.1-7 - Type:CVE - CVE:CVE-2025-25184 - SUG:NA - DESC:fix CVE-2025-25184 * Thu Mar 13 2025 changtao - 1:2.2.3.1-6 - Type:CVE - CVE:CVE-2025-27111 - SUG:NA - DESC:fix CVE-2025-27111 * Wed Mar 12 2025 changtao - 1:2.2.3.1-5 - Type:CVE - CVE:CVE-2025-27610 - SUG:NA - DESC:fix CVE-2025-27610 * Fri Jul 05 2024 zouzhimin - 1:2.2.3.1-4 - Type:CVES - ID:CVE-2022-44570 CVE-2022-44571 CVE-2022-44572 - SUG:NA - DESC:CVE-2022-44570 CVE-2022-44571 CVE-2022-44572 * Fri Jul 05 2024 zouzhimin - 1:2.2.3.1-3 - Type:CVES - ID:CVE-2024-26141 CVE-2024-26146 CVE-2024-25126 - SUG:NA - DESC:CVE-2024-26141 CVE-2024-26146 CVE-2024-25126 * Fri Jul 5 2024 liningjie - 1:2.2.3.1-2 - Fix CVE-2024-39316 * Tue Jun 28 2022 wangkai - 1:2.2.3.1-1 - Upgrade to 2.2.3.1 for fix CVE-2020-8184 CVE-2022-30122 CVE-2022-30123 * Mon May 17 2021 lingsheng - 1:2.2.2-2 - Add buildrequires memcached * Wed Mar 10 2021 zhanghua - 1:2.2.2-1 - Upgrade to 2.2.2 * Wed Sep 9 2020 Ge Wang - 1:2.0.4-2 - Modify Source0 Url * Thu Mar 5 2020 openEuler Buildteam - 1:2.0.4-1 - Package init