2020-03-06 20:11:55 +08:00
|
|
|
%global gem_name rack
|
2021-02-08 18:37:27 +08:00
|
|
|
%bcond_with bootstrap
|
|
|
|
|
|
|
|
|
|
Name: rubygem-%{gem_name}
|
2022-06-28 09:23:51 +08:00
|
|
|
Version: 2.2.3.1
|
2021-02-08 18:37:27 +08:00
|
|
|
Epoch: 1
|
2022-06-28 09:23:51 +08:00
|
|
|
Release: 1
|
2021-02-08 18:37:27 +08:00
|
|
|
Summary: A modular Ruby webserver interface
|
|
|
|
|
License: MIT and BSD
|
|
|
|
|
URL: https://rack.github.io/
|
|
|
|
|
Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem
|
2022-03-07 08:30:30 +00:00
|
|
|
BuildRequires: ruby(release) rubygems-devel ruby >= 2.2.2
|
2021-02-08 18:37:27 +08:00
|
|
|
BuildRequires: memcached rubygem(memcache-client) rubygem(minitest)
|
|
|
|
|
BuildRequires: rubygem(memcache-client)
|
|
|
|
|
BuildRequires: rubygem(minitest)
|
|
|
|
|
%if ! %{with bootstrap}
|
|
|
|
|
BuildRequires: rubygem(thin)
|
|
|
|
|
%endif
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%global __brp_mangle_shebangs_exclude_from ^%{gem_instdir}/test/cgi/test.ru$
|
2020-03-06 20:11:55 +08:00
|
|
|
|
|
|
|
|
%description
|
2021-02-08 18:37:27 +08:00
|
|
|
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}.
|
2020-03-06 20:11:55 +08:00
|
|
|
|
|
|
|
|
%prep
|
2021-02-08 18:37:27 +08:00
|
|
|
%setup -q -n %{gem_name}-%{version}
|
2020-03-06 20:11:55 +08:00
|
|
|
|
|
|
|
|
%build
|
2021-02-08 18:37:27 +08:00
|
|
|
gem build ../%{gem_name}-%{version}.gemspec
|
|
|
|
|
%gem_install
|
2020-03-06 20:11:55 +08:00
|
|
|
|
|
|
|
|
%install
|
2021-02-08 18:37:27 +08:00
|
|
|
mkdir -p %{buildroot}%{gem_dir}
|
|
|
|
|
cp -a .%{gem_dir}/* \
|
|
|
|
|
%{buildroot}%{gem_dir}/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mkdir -p %{buildroot}%{_bindir}
|
|
|
|
|
cp -a .%{_bindir}/* \
|
|
|
|
|
%{buildroot}%{_bindir}/
|
2020-03-06 20:11:55 +08:00
|
|
|
|
|
|
|
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
|
|
|
|
find %{buildroot}%{gem_instdir}/{bin,test/cgi} -type f | \
|
2021-02-08 18:37:27 +08:00
|
|
|
xargs sed -i 's|^#!/usr/bin/env ruby$|#!/usr/bin/ruby|'
|
2020-03-06 20:11:55 +08:00
|
|
|
|
|
|
|
|
for file in `find %{buildroot}/%{gem_instdir} -type f -perm /a+x`; do
|
2021-02-08 18:37:27 +08:00
|
|
|
[ -z "`head -n 1 $file | grep \"^#!/\"`" ] && chmod -v 644 $file
|
2020-03-06 20:11:55 +08:00
|
|
|
done
|
|
|
|
|
|
|
|
|
|
for file in `find %{buildroot}%{gem_instdir} -type f`; do
|
2021-02-08 18:37:27 +08:00
|
|
|
[ ! -z "`head -n 1 $file | grep \"^#!\"`" ] && chmod -v 755 $file
|
2020-03-06 20:11:55 +08:00
|
|
|
done
|
|
|
|
|
|
2021-02-08 18:37:27 +08:00
|
|
|
%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
|
|
|
|
|
|
2020-03-06 20:11:55 +08:00
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
2021-02-08 18:37:27 +08:00
|
|
|
%{_bindir}/rackup
|
|
|
|
|
%license %{gem_instdir}/MIT-LICENSE
|
2020-03-06 20:11:55 +08:00
|
|
|
%{gem_libdir}
|
|
|
|
|
%{gem_instdir}/bin
|
|
|
|
|
%exclude %{gem_cache}
|
2021-02-08 18:37:27 +08:00
|
|
|
%{gem_spec}
|
2020-03-06 20:11:55 +08:00
|
|
|
|
2021-02-08 18:37:27 +08:00
|
|
|
%files help
|
2020-03-06 20:11:55 +08:00
|
|
|
%doc %{gem_docdir}
|
2021-02-08 18:37:27 +08:00
|
|
|
%doc %{gem_instdir}/CHANGELOG.md
|
2020-03-06 20:11:55 +08:00
|
|
|
%doc %{gem_instdir}/README.rdoc
|
2021-02-08 18:37:27 +08:00
|
|
|
%doc %{gem_instdir}/CONTRIBUTING.md
|
|
|
|
|
%doc %{gem_instdir}/SPEC.rdoc
|
2020-03-06 20:11:55 +08:00
|
|
|
%{gem_instdir}/Rakefile
|
|
|
|
|
%{gem_instdir}/%{gem_name}.gemspec
|
2021-02-08 18:37:27 +08:00
|
|
|
%doc %{gem_instdir}/example
|
|
|
|
|
%doc %{gem_instdir}/contrib
|
2020-03-06 20:11:55 +08:00
|
|
|
|
|
|
|
|
%changelog
|
2022-06-28 09:23:51 +08:00
|
|
|
* Tue Jun 28 2022 wangkai <wangkai385@h-partners.com> - 1:2.2.3.1-1
|
|
|
|
|
- Upgrade to 2.2.3.1 for fix CVE-2020-8184 CVE-2022-30122 CVE-2022-30123
|
|
|
|
|
|
2022-03-07 08:30:30 +00:00
|
|
|
* Mon Mar 7 2022 duyiwei<duyiwei@kylinos.cn>- 1:2.2.2-2
|
|
|
|
|
- delete BuildRequires rubygem(concurrent-ruby)
|
|
|
|
|
|
2021-02-08 18:37:27 +08:00
|
|
|
* Mon Feb 8 2021 sunguoshuai<sunguoshuai@huawei.com>- 1:2.2.2-1
|
|
|
|
|
- Upgrade to 1:2.2.2
|
|
|
|
|
|
2020-09-17 12:51:08 +08:00
|
|
|
* Wed Sep 9 2020 Ge Wang <wangge20@huawei.com> - 1:2.0.4-2
|
|
|
|
|
- Modify Source0 Url
|
|
|
|
|
|
2020-03-06 20:11:55 +08:00
|
|
|
* Thu Mar 5 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:2.0.4-1
|
|
|
|
|
- Package init
|