diff --git a/puma-3.12.4.gem b/puma-3.12.4.gem new file mode 100644 index 0000000000000000000000000000000000000000..41b5e59ad201be60ba6fc485454551cb107eae5d Binary files /dev/null and b/puma-3.12.4.gem differ diff --git a/rubygem-puma-3.6.0-fedora-crypto-policy-cipher-list.patch b/rubygem-puma-3.6.0-fedora-crypto-policy-cipher-list.patch new file mode 100644 index 0000000000000000000000000000000000000000..b4e8a2cea5945c0359fa3e819b413af31d9e6806 --- /dev/null +++ b/rubygem-puma-3.6.0-fedora-crypto-policy-cipher-list.patch @@ -0,0 +1,16 @@ +diff --git a/ext/puma_http11/mini_ssl.c b/ext/puma_http11/mini_ssl.c +index 7e0fd5e..88c4652 100644 +--- a/ext/puma_http11/mini_ssl.c ++++ b/ext/puma_http11/mini_ssl.c +@@ -183,7 +183,7 @@ VALUE engine_init_server(VALUE self, VALUE mini_ssl_ctx) { + SSL_CTX_set_cipher_list(ctx, RSTRING_PTR(ssl_cipher_filter)); + } + else { +- SSL_CTX_set_cipher_list(ctx, "HIGH:!aNULL@STRENGTH"); ++ SSL_CTX_set_cipher_list(ctx, "PROFILE=SYSTEM"); + } + + DH *dh = get_dh1024(); +-- +2.5.5 + diff --git a/rubygem-puma.spec b/rubygem-puma.spec new file mode 100644 index 0000000000000000000000000000000000000000..00175eaebf390fdf83bf9bd621f4b8f082754a5e --- /dev/null +++ b/rubygem-puma.spec @@ -0,0 +1,99 @@ +%global gem_name puma +%bcond_with ragel +Name: rubygem-%{gem_name} +Version: 3.12.4 +Release: 1 +Summary: A simple, fast, threaded, and highly concurrent HTTP 1.1 server +License: BSD +URL: http://puma.io +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem +Source1: https://github.com/puma/%{gem_name}/archive/v%{version}.tar.gz +# Set the default cipher list "PROFILE=SYSTEM". +# https://fedoraproject.org/wiki/Packaging:CryptoPolicies +Patch0: rubygem-puma-3.6.0-fedora-crypto-policy-cipher-list.patch +BuildRequires: openssl-devel ruby(release) rubygems-devel ruby-devel rubygem(rack) +BuildRequires: rubygem(minitest) +%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 +%patch0 -p1 +%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 +sed -i "/require 'minitest\/retry'/ s/^/#/" test/helper.rb +sed -i "/Minitest::Retry/ s/^/#/" test/helper.rb +sed -i '/^ def test_timeout_in_data_phase$/a\ + skip "Unstable test"' test/test_puma_server.rb +sed -i '/^ def test_control_url$/a\ + skip "Unstable test"' test/test_pumactl.rb +sed -i '/^ def test_ssl_v3_rejection$/a\ + skip' test/test_puma_server_ssl.rb +sed -i '/^ def test_term_signal_exit_code_in_clustered_mode$/a\ + skip "Clustered server does not stop properly"' test/test_integration.rb +RUBYOPT="-Ilib:$(dirs +1 -l)%{gem_extdir_mri}" CI=1 ruby \ + -e 'Dir.glob "./test/**/test_*.rb", &method(:require)' \ + -- -v +RUBYOPT="-I$(dirs +1 -l)%{gem_extdir_mri}" ruby test/shell/run.rb +popd + +%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 +* Thu Aug 20 2020 luoshengwei - 3.12.4-1 +- package init diff --git a/rubygem-puma.yaml b/rubygem-puma.yaml new file mode 100644 index 0000000000000000000000000000000000000000..dfb1b98b821120fc6f18bce4d7917edbc00e56e9 --- /dev/null +++ b/rubygem-puma.yaml @@ -0,0 +1,4 @@ +version_control: github +src_repo: puma/puma +tag_prefix: "puma-" +separator: "." diff --git a/v3.12.4.tar.gz b/v3.12.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..d263a56eb1f3630c88c15ddf89b2e3ce4fd93224 Binary files /dev/null and b/v3.12.4.tar.gz differ