2020-08-28 12:14:17 +08:00
|
|
|
%global gem_name puma
|
|
|
|
|
%bcond_with ragel
|
|
|
|
|
Name: rubygem-%{gem_name}
|
2022-07-05 15:29:25 +08:00
|
|
|
Version: 5.5.2
|
2022-09-01 09:16:06 +08:00
|
|
|
Release: 2
|
2020-08-28 12:14:17 +08:00
|
|
|
Summary: A simple, fast, threaded, and highly concurrent HTTP 1.1 server
|
2022-05-10 17:28:29 +08:00
|
|
|
License: BSD-3-Clause
|
2020-08-28 12:14:17 +08:00
|
|
|
URL: http://puma.io
|
|
|
|
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
2021-11-09 20:45:38 +08:00
|
|
|
Source1: https://github.com/puma/%{gem_name}/archive/refs/tags/v%{version}.tar.gz
|
2020-08-28 12:14:17 +08:00
|
|
|
# Set the default cipher list "PROFILE=SYSTEM".
|
|
|
|
|
# https://fedoraproject.org/wiki/Packaging:CryptoPolicies
|
2020-08-28 17:12:00 +08:00
|
|
|
Patch0: rubygem-puma-3.6.0-fedora-crypto-policy-cipher-list.patch
|
2022-09-01 09:16:06 +08:00
|
|
|
Patch1: Support-for-cert_pem-and-key_pem-with-ssl_bind-DSL.patch
|
2021-05-31 11:50:26 +08:00
|
|
|
|
2020-08-28 12:14:17 +08:00
|
|
|
BuildRequires: openssl-devel ruby(release) rubygems-devel ruby-devel rubygem(rack)
|
2022-07-05 15:29:25 +08:00
|
|
|
BuildRequires: rubygem(minitest) rubygem(sd_notify)
|
2021-11-09 20:45:38 +08:00
|
|
|
BuildRequires: rubygem(nio4r)
|
2020-08-28 12:14:17 +08:00
|
|
|
%if %{with ragel}
|
|
|
|
|
BuildRequires: %{_bindir}/ragel
|
|
|
|
|
%endif
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
%description
|
|
|
|
|
A simple, fast, threaded, and highly concurrent HTTP 1.1 server for
|
|
|
|
|
Ruby/Rack applications.
|
|
|
|
|
|
|
|
|
|
%package doc
|
|
|
|
|
Summary: Documentation for %{name}
|
|
|
|
|
Requires: %{name} = %{version}-%{release}
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
%description doc
|
|
|
|
|
Documentation for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{gem_name}-%{version} -b 1
|
2020-08-28 17:12:00 +08:00
|
|
|
%patch0 -p1
|
2022-09-01 09:16:06 +08:00
|
|
|
%patch1 -p1
|
2022-07-05 15:29:25 +08:00
|
|
|
rm -rf test/test_thread_pool.rb
|
2021-05-31 11:50:26 +08:00
|
|
|
|
2020-08-28 12:14:17 +08:00
|
|
|
%if %{with ragel}
|
|
|
|
|
rm -f ext/puma_http11/http11_parser.c
|
|
|
|
|
ragel ext/puma_http11/http11_parser.rl -C -G2 -I ext/puma_http11 \
|
|
|
|
|
-o ext/puma_http11/http11_parser.c
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%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}%{gem_extdir_mri}/puma
|
|
|
|
|
cp -a .%{gem_extdir_mri}/gem.build_complete %{buildroot}%{gem_extdir_mri}/
|
|
|
|
|
cp -a .%{gem_extdir_mri}/puma/*.so %{buildroot}%{gem_extdir_mri}/puma
|
|
|
|
|
rm -rf %{buildroot}%{gem_instdir}/ext/
|
|
|
|
|
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 -type f | \
|
|
|
|
|
xargs sed -i 's|^#!/usr/bin/env ruby$|#!/usr/bin/ruby|'
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
pushd .%{gem_instdir}
|
|
|
|
|
ln -s %{_builddir}/%{gem_name}-%{version}/test test
|
|
|
|
|
ln -s %{_builddir}/%{gem_name}-%{version}/examples examples
|
2022-07-05 15:29:25 +08:00
|
|
|
|
2021-11-09 20:45:38 +08:00
|
|
|
sed -i -e "/require..minitest\/\(retry\|proveit\)./ s/^/#/" test/helper.rb
|
2020-08-28 12:14:17 +08:00
|
|
|
sed -i "/Minitest::Retry/ s/^/#/" test/helper.rb
|
2021-11-09 20:45:38 +08:00
|
|
|
sed -i '/prove_it!/ s/^/#/' test/helper.rb
|
2022-07-05 15:29:25 +08:00
|
|
|
sed -i "/minitest\/stub_const/ s/^/#/" test/helper.rb
|
|
|
|
|
sed -i '/::Timeout.timeout/ s/45/300/' test/helper.rb
|
|
|
|
|
|
|
|
|
|
mv test/test_preserve_bundler_env.rb{,.disable}
|
|
|
|
|
mv test/test_worker_gem_independence.rb{,.disable}
|
|
|
|
|
sed -i -e '/^\s*def test_prune_bundler_with_multiple_workers$/a\
|
|
|
|
|
skip' \
|
|
|
|
|
-e '/^\s*def test_phased_restart_cluster$/a\
|
|
|
|
|
skip' test/test_integration_pumactl.rb
|
|
|
|
|
|
|
|
|
|
mv test/test_puma_localhost_authority.rb{,.disable}
|
|
|
|
|
mv test/test_integration_single.rb{,.disable}
|
|
|
|
|
mv test/test_integration_cluster.rb{,.disable}
|
|
|
|
|
|
|
|
|
|
%ifarch aarch64
|
|
|
|
|
sed -i '/^ def test_control$/,/^ end$/ s/^/#/' test/test_cli.rb
|
|
|
|
|
%endif
|
|
|
|
|
|
2020-08-28 12:14:17 +08:00
|
|
|
sed -i '/^ def test_timeout_in_data_phase$/a\
|
2022-07-05 15:29:25 +08:00
|
|
|
skip' test/test_puma_server.rb
|
|
|
|
|
sed -i '/^ def test_plugin$/a\
|
|
|
|
|
skip' test/test_plugin.rb
|
|
|
|
|
sed -i '/^ def test_verify_fail_if_client_unknown_ca$/a\
|
2020-08-28 12:14:17 +08:00
|
|
|
skip' test/test_puma_server_ssl.rb
|
2022-07-05 15:29:25 +08:00
|
|
|
|
|
|
|
|
RUBYOPT="-Ilib:$(dirs +1 -l)%{gem_extdir_mri}" \
|
|
|
|
|
CI=1 \
|
|
|
|
|
LC_ALL=C.UTF-8 \
|
|
|
|
|
ruby -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
|
2020-08-28 12:14:17 +08:00
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%dir %{gem_instdir}
|
|
|
|
|
%{_bindir}/puma
|
|
|
|
|
%{_bindir}/pumactl
|
|
|
|
|
%{gem_extdir_mri}
|
|
|
|
|
%license %{gem_instdir}/LICENSE
|
|
|
|
|
%{gem_instdir}/bin
|
|
|
|
|
%{gem_libdir}
|
|
|
|
|
%exclude %{gem_cache}
|
|
|
|
|
%{gem_spec}
|
|
|
|
|
|
|
|
|
|
%files doc
|
|
|
|
|
%doc %{gem_docdir}
|
|
|
|
|
%doc %{gem_instdir}/History.md
|
|
|
|
|
%doc %{gem_instdir}/README.md
|
|
|
|
|
%doc %{gem_instdir}/docs
|
|
|
|
|
%{gem_instdir}/tools
|
|
|
|
|
|
|
|
|
|
%changelog
|
2022-09-01 09:16:06 +08:00
|
|
|
* Thu Sep 1 2022 liyanan <liyanan32@h-partners.com> - 5.5.2-2
|
|
|
|
|
- Support for cert_pem and key_pem with ssl_bind DSL
|
|
|
|
|
|
2022-07-05 15:29:25 +08:00
|
|
|
* Thu Jun 30 2022 wulei <wulei80@h-partners.com> - 5.5.2-1
|
|
|
|
|
- Upgrade to 5.5.2
|
|
|
|
|
|
2022-05-10 17:28:29 +08:00
|
|
|
* Tue May 10 2022 yaoxin <yaoxin30@h-partners.com> - 4.3.9-2
|
|
|
|
|
- License compliance rectification
|
|
|
|
|
|
2021-11-09 20:45:38 +08:00
|
|
|
* Mon Nov 15 2021 houyingchao <houyingchao@huawei.com> - 4.3.9-1
|
|
|
|
|
- Fix CVE-2021-41136
|
|
|
|
|
|
2021-05-31 11:50:26 +08:00
|
|
|
* Mon May 31 2021 wangyue <wangyue92@huawei.com> - 3.12.6-2
|
|
|
|
|
- Fix CVE-2021-29509
|
|
|
|
|
|
2021-02-03 03:39:27 +00:00
|
|
|
* Wed Feb 03 2021 shinwell_hu <micromotive@qq.com> - 3.12.6-1
|
|
|
|
|
- Upgrade to 3.12.6 to fix following known CVEs
|
|
|
|
|
CVE-2020-11077
|
|
|
|
|
CVE-2020-11076
|
|
|
|
|
- Workaround test failure on x forwarded protol
|
|
|
|
|
|
2020-08-28 12:14:17 +08:00
|
|
|
* Thu Aug 20 2020 luoshengwei <luoshengwei@huawei.com> - 3.12.4-1
|
|
|
|
|
- package init
|