Compare commits
1 commit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
db6f2c5df1 |
7 changed files with 276 additions and 140 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -33,3 +33,4 @@ rubygems-1.3.7.tgz
|
|||
/rubygems-2.1.11.tgz
|
||||
/rubygems-2.2.2.tgz
|
||||
/rubygems-2.4.8.tgz
|
||||
/rubygems-2.6.13.tgz
|
||||
|
|
|
|||
115
macros.rubygems
115
macros.rubygems
|
|
@ -3,16 +3,21 @@
|
|||
%gem_archdir %{_libdir}/gems
|
||||
|
||||
# Common gem locations and files.
|
||||
%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}
|
||||
%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version}
|
||||
%gem_instdir %{gem_dir}/gems/%{gem_name}-%{version}%{?prerelease}
|
||||
%gem_extdir_mri %{gem_archdir}/%{name}/%{gem_name}-%{version}%{?prerelease}
|
||||
%gem_libdir %{gem_instdir}/lib
|
||||
%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}.gem
|
||||
%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}.gemspec
|
||||
%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}
|
||||
%gem_cache %{gem_dir}/cache/%{gem_name}-%{version}%{?prerelease}.gem
|
||||
%gem_spec %{gem_dir}/specifications/%{gem_name}-%{version}%{?prerelease}.gemspec
|
||||
%gem_docdir %{gem_dir}/doc/%{gem_name}-%{version}%{?prerelease}
|
||||
|
||||
# Install gem into appropriate directory.
|
||||
# -n<gem_file> Overrides gem file name for installation.
|
||||
# -d<install_dir> Set installation directory.
|
||||
|
||||
# %gem_install - Install gem into appropriate directory.
|
||||
#
|
||||
# Usage: %gem_install [options]
|
||||
#
|
||||
# -n <gem_file> Overrides gem file name for installation.
|
||||
# -d <install_dir> Set installation directory.
|
||||
#
|
||||
%gem_install(d:n:) \
|
||||
mkdir -p %{-d*}%{!?-d:.%{gem_dir}} \
|
||||
\
|
||||
|
|
@ -20,13 +25,13 @@ CONFIGURE_ARGS="--with-cflags='%{optflags}' $CONFIGURE_ARGS" \\\
|
|||
gem install \\\
|
||||
-V \\\
|
||||
--local \\\
|
||||
--install-dir %{-d*}%{!?-d:.%{gem_dir}} \\\
|
||||
--bindir .%{_bindir} \\\
|
||||
--build-root %{-d*}%{!?-d:.} \\\
|
||||
--force \\\
|
||||
--document=ri,rdoc \\\
|
||||
%{-n*}%{!?-n:%{gem_name}-%{version}.gem} \
|
||||
%{-n*}%{!?-n:%{gem_name}-%{version}%{?prerelease}.gem} \
|
||||
%{nil}
|
||||
|
||||
|
||||
# For rubygems packages we want to filter out any provides caused by private
|
||||
# libs in %%{gem_archdir}.
|
||||
#
|
||||
|
|
@ -35,3 +40,91 @@ gem install \\\
|
|||
%rubygems_default_filter %{expand: \
|
||||
%global __provides_exclude_from %{?__provides_exclude_from:%{__provides_exclude_from}|}^%{gem_extdir_mri}/.*\\\\.so$ \
|
||||
}
|
||||
|
||||
|
||||
# The 'read' command in gemspec_add _depand gemspec_remove_dep macros is not
|
||||
# essential, but it is usefull to make the sript appear in build log.
|
||||
|
||||
|
||||
# %gemspec_add_dep - Add dependency into .gemspec.
|
||||
#
|
||||
# Usage: %gemspec_add_dep -g <gem> [options] [requirements]
|
||||
#
|
||||
# Add dependency named <gem> to .gemspec file. The macro adds runtime
|
||||
# dependency by default. The [requirements] argument can be used to specify
|
||||
# the dependency constraints more precisely. It is expected to be valid Ruby
|
||||
# code.
|
||||
#
|
||||
# -s <gemspec_file> Overrides the default .gemspec location.
|
||||
# -d Add development dependecy.
|
||||
#
|
||||
%gemspec_add_dep(g:s:d) \
|
||||
read -d '' gemspec_add_dep_script << 'EOR' || : \
|
||||
gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \
|
||||
\
|
||||
name = '%{-g*}' \
|
||||
requirements = %{*}%{!?1:nil} \
|
||||
\
|
||||
type = :%{!?-d:runtime}%{?-d:development} \
|
||||
\
|
||||
spec = Gem::Specification.load(gemspec_file) \
|
||||
abort("#{gemspec_file} is not accessible.") unless spec \
|
||||
\
|
||||
dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \
|
||||
if dep \
|
||||
dep.requirement.concat requirements \
|
||||
else \
|
||||
spec.public_send "add_#{type}_dependency", name, requirements \
|
||||
end \
|
||||
File.write gemspec_file, spec.to_ruby \
|
||||
EOR\
|
||||
echo "$gemspec_add_dep_script" | ruby \
|
||||
unset -v gemspec_add_dep_script \
|
||||
%{nil}
|
||||
|
||||
|
||||
# %gemspec_remove_dep - Remove dependency from .gemspec.
|
||||
#
|
||||
# Usage: %gemspec_remove_dep -g <gem> [options] [requirements]
|
||||
#
|
||||
# Remove dependency named <gem> from .gemspec file. The macro removes runtime
|
||||
# dependency by default. The [requirements] argument can be used to specify
|
||||
# the dependency constraints more precisely. It is expected to be valid Ruby
|
||||
# code. The macro fails if these specific requirements can't be removed.
|
||||
#
|
||||
# -s <gemspec_file> Overrides the default .gemspec location.
|
||||
# -d Remove development dependecy.
|
||||
#
|
||||
%gemspec_remove_dep(g:s:d) \
|
||||
read -d '' gemspec_remove_dep_script << 'EOR' || : \
|
||||
gemspec_file = '%{-s*}%{!?-s:./%{gem_name}.gemspec}' \
|
||||
\
|
||||
name = '%{-g*}' \
|
||||
requirements = %{*}%{!?1:nil} \
|
||||
\
|
||||
type = :%{!?-d:runtime}%{?-d:development} \
|
||||
\
|
||||
spec = Gem::Specification.load(gemspec_file) \
|
||||
abort("#{gemspec_file} is not accessible.") unless spec \
|
||||
\
|
||||
dep = spec.dependencies.detect { |d| d.type == type && d.name == name } \
|
||||
if dep \
|
||||
if requirements \
|
||||
requirements = Gem::Requirement.create(requirements).requirements \
|
||||
requirements.each do |r| \
|
||||
unless dep.requirement.requirements.reject! { |dependency_requirements| dependency_requirements == r } \
|
||||
abort("Requirement '#{r.first} #{r.last}' was not possible to remove for dependency '#{dep}'!") \
|
||||
end \
|
||||
end \
|
||||
spec.dependencies.delete dep if dep.requirement.requirements.empty? \
|
||||
else \
|
||||
spec.dependencies.delete dep \
|
||||
end \
|
||||
else \
|
||||
abort("Dependency '#{name}' was not found!") \
|
||||
end \
|
||||
File.write gemspec_file, spec.to_ruby \
|
||||
EOR\
|
||||
echo "$gemspec_remove_dep_script" | ruby \
|
||||
unset -v gemspec_remove_dep_script \
|
||||
%{nil}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,28 @@ module Gem
|
|||
end
|
||||
private :previous_but_one_dir_to
|
||||
|
||||
##
|
||||
# Detects --install-dir option specified on command line.
|
||||
|
||||
def opt_install_dir?
|
||||
@opt_install_dir ||= ARGV.include?('--install-dir') || ARGV.include?('-i')
|
||||
end
|
||||
private :opt_install_dir?
|
||||
|
||||
##
|
||||
# Detects --build-root option specified on command line.
|
||||
|
||||
def opt_build_root?
|
||||
@opt_build_root ||= ARGV.include?('--build-root')
|
||||
end
|
||||
private :opt_build_root?
|
||||
|
||||
##
|
||||
# Tries to detect, if arguments and environment variables suggest that
|
||||
# 'gem install' is executed from rpmbuild.
|
||||
|
||||
def rpmbuild?
|
||||
(ARGV.include?('--install-dir') || ARGV.include?('-i')) && ENV['RPM_PACKAGE_NAME']
|
||||
@rpmbuild ||= ENV['RPM_PACKAGE_NAME'] && (opt_install_dir? || opt_build_root?)
|
||||
end
|
||||
private :rpmbuild?
|
||||
|
||||
|
|
@ -80,7 +96,9 @@ module Gem
|
|||
# RubyGems default overrides.
|
||||
|
||||
def default_dir
|
||||
if Process.uid == 0
|
||||
if opt_build_root?
|
||||
Gem.default_dirs[:system][:gem_dir]
|
||||
elsif Process.uid == 0
|
||||
Gem.default_dirs[:local][:gem_dir]
|
||||
else
|
||||
Gem.user_dir
|
||||
|
|
@ -93,7 +111,9 @@ module Gem
|
|||
end
|
||||
|
||||
def default_bindir
|
||||
if Process.uid == 0
|
||||
if opt_build_root?
|
||||
Gem.default_dirs[:system][:bin_dir]
|
||||
elsif Process.uid == 0
|
||||
Gem.default_dirs[:local][:bin_dir]
|
||||
else
|
||||
File.join [Dir.home, 'bin']
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
From d000290a675745d9fb8a4658b8b5922f6a734522 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Tue, 16 Jun 2015 08:22:47 +0200
|
||||
Subject: [PATCH] Increase DH key size (fixes #1289).
|
||||
|
||||
This fixes compatibility with OpenSLL 1.0.2c+:
|
||||
|
||||
https://www.openssl.org/blog/blog/2015/05/20/logjam-freak-upcoming-changes/
|
||||
---
|
||||
test/rubygems/test_gem_remote_fetcher.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/rubygems/test_gem_remote_fetcher.rb b/test/rubygems/test_gem_remote_fetcher.rb
|
||||
index 6b29e18..c318870 100644
|
||||
--- a/test/rubygems/test_gem_remote_fetcher.rb
|
||||
+++ b/test/rubygems/test_gem_remote_fetcher.rb
|
||||
@@ -898,7 +898,7 @@ gems:
|
||||
server.mount_proc("/insecure_redirect") { |req, res|
|
||||
res.set_redirect(WEBrick::HTTPStatus::MovedPermanently, req.query['to'])
|
||||
}
|
||||
- server.ssl_context.tmp_dh_callback = proc { OpenSSL::PKey::DH.new 128 }
|
||||
+ server.ssl_context.tmp_dh_callback = proc { OpenSSL::PKey::DH.new 2048 }
|
||||
t = Thread.new do
|
||||
begin
|
||||
server.start
|
||||
--
|
||||
2.4.3
|
||||
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
From 8598da6ea02fe69c20f93ac4d5504ca4aba6fe6b Mon Sep 17 00:00:00 2001
|
||||
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
Date: Wed, 9 Aug 2017 16:30:53 +0900
|
||||
Subject: [PATCH 1/2] Ignored test for real world default gem.
|
||||
|
||||
Because default gem was enabled after ruby installation that
|
||||
is `make install`
|
||||
---
|
||||
test/rubygems/test_require.rb | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb
|
||||
index 936f78fb2..c44c759cc 100644
|
||||
--- a/test/rubygems/test_require.rb
|
||||
+++ b/test/rubygems/test_require.rb
|
||||
@@ -303,6 +303,12 @@ def test_default_gem_only
|
||||
|
||||
def test_realworld_default_gem
|
||||
skip "no default gems on ruby < 2.0" unless RUBY_VERSION >= "2"
|
||||
+ begin
|
||||
+ gem 'json'
|
||||
+ rescue Gem::MissingSpecError
|
||||
+ skip "default gems is only available after ruby installation"
|
||||
+ end
|
||||
+
|
||||
cmd = <<-RUBY
|
||||
$stderr = $stdout
|
||||
require "json"
|
||||
|
||||
From 0dafce8188691a7b942ed4724a0d0e462e74a809 Mon Sep 17 00:00:00 2001
|
||||
From: SHIBATA Hiroshi <hsbt@ruby-lang.org>
|
||||
Date: Wed, 9 Aug 2017 21:06:41 +0900
|
||||
Subject: [PATCH 2/2] Fixed grammer
|
||||
|
||||
---
|
||||
test/rubygems/test_require.rb | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/test/rubygems/test_require.rb b/test/rubygems/test_require.rb
|
||||
index c44c759cc..edb36f1f3 100644
|
||||
--- a/test/rubygems/test_require.rb
|
||||
+++ b/test/rubygems/test_require.rb
|
||||
@@ -306,7 +306,7 @@ def test_realworld_default_gem
|
||||
begin
|
||||
gem 'json'
|
||||
rescue Gem::MissingSpecError
|
||||
- skip "default gems is only available after ruby installation"
|
||||
+ skip "default gems are only available after ruby installation"
|
||||
end
|
||||
|
||||
cmd = <<-RUBY
|
||||
193
rubygems.spec
193
rubygems.spec
|
|
@ -2,12 +2,20 @@
|
|||
# https://github.com/rubygems/rubygems.git
|
||||
#
|
||||
|
||||
# Bundled libraries versions
|
||||
%global molinillo_version 0.5.7
|
||||
|
||||
# Requires versions
|
||||
%global io_console_version 0.4.6
|
||||
%global json_version 2.0.2
|
||||
%global openssl_version 2.0.2
|
||||
%global psych_version 2.2.2
|
||||
%global rdoc_version 5.0.0
|
||||
|
||||
# The RubyGems library has to stay out of Ruby directory three, since the
|
||||
# RubyGems should be share by all Ruby implementations.
|
||||
%global rubygems_dir %(ruby -e "puts RbConfig::CONFIG['rubygemsdir']")
|
||||
|
||||
# Specify custom RubyGems root and other related macros.
|
||||
%global gem_dir %{_datadir}/gems
|
||||
# TODO: These folders should go into rubygem-filesystem but how to achieve it,
|
||||
# since noarch package cannot provide arch dependent subpackages?
|
||||
# http://rpm.org/ticket/78
|
||||
|
|
@ -15,89 +23,96 @@
|
|||
|
||||
# Executing testsuite (enabling %%check section) will cause dependency loop.
|
||||
# To avoid dependency loop when necessary, please set the following value to 0
|
||||
%global enable_check 1
|
||||
%global enable_check 1
|
||||
|
||||
# It cannot be relied on %%{_libdir} for noarch packages. Query Ruby for
|
||||
# the right value.
|
||||
# https://fedorahosted.org/rel-eng/ticket/5257
|
||||
%{!?buildtime_libdir:%global buildtime_libdir $(ruby -rrbconfig -e 'puts RbConfig::CONFIG["libdir"]')}
|
||||
|
||||
Summary: The Ruby standard for packaging ruby libraries
|
||||
Name: rubygems
|
||||
Version: 2.4.8
|
||||
Release: 102%{?dist}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
Summary: The Ruby standard for packaging ruby libraries
|
||||
Name: rubygems
|
||||
Version: 2.6.13
|
||||
Release: 100%{?dist}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
|
||||
URL: https://rubygems.org/
|
||||
Source0: http://production.cf.rubygems.org/rubygems/%{name}-%{version}.tgz
|
||||
URL: https://rubygems.org/
|
||||
Source0: http://production.cf.rubygems.org/rubygems/%{name}-%{version}.tgz
|
||||
# Sources from the works by Vít Ondruch <vondruch@redhat.com>
|
||||
# Please keep Source{1,5,8,9,10} in sync with ruby.spec
|
||||
Source1: operating_system.rb
|
||||
Source5: macros.rubygems
|
||||
Source1: operating_system.rb
|
||||
Source5: macros.rubygems
|
||||
# RPM dependency generators.
|
||||
Source8: rubygems.attr
|
||||
Source9: rubygems.req
|
||||
Source10: rubygems.prov
|
||||
Source8: rubygems.attr
|
||||
Source9: rubygems.req
|
||||
Source10: rubygems.prov
|
||||
# http://seclists.org/oss-sec/2013/q3/att-576/check_CVE-2013-4287_rb.bin
|
||||
# Slightly modified for exit status
|
||||
Source11: check_CVE-2013-4287.rb
|
||||
Source11: check_CVE-2013-4287.rb
|
||||
# http://seclists.org/oss-sec/2013/q3/att-621/check_CVE-2013-XXXX_rb.bin
|
||||
# Slightly modified for exit status,
|
||||
# Also modified to match:
|
||||
# http://seclists.org/oss-sec/2013/q3/605
|
||||
Source12: check_CVE-2013-4363.rb
|
||||
Source12: check_CVE-2013-4363.rb
|
||||
|
||||
# Fix test suite failure with openssl-1.0.2c+.
|
||||
# https://github.com/rubygems/rubygems/issues/1289
|
||||
Patch0: rubygem-2.4.8-Increase-DH-key-size-fixes-1289.patch
|
||||
# Ignore failing TestGemRequire#test_realworld_default_gem with
|
||||
# --disable-gems option.
|
||||
# https://github.com/rubygems/rubygems/pull/1986
|
||||
Patch0: rubygems-2.6.13-Ignored-test-for-real-world-default-gem.patch
|
||||
|
||||
%{?load:%{SOURCE5}}
|
||||
|
||||
Requires: ruby(release)
|
||||
Requires: rubygem(rdoc) >= 4.0.0
|
||||
Requires: rubygem(io-console) >= 0.4.1
|
||||
Requires: rubygem(psych) >= 2.0.0
|
||||
BuildRequires: ruby(release)
|
||||
Requires: ruby(release)
|
||||
Recommends: rubygem(rdoc) >= %{rdoc_version}
|
||||
Recommends: rubygem(io-console) >= %{io_console_version}
|
||||
Requires: rubygem(openssl) >= %{openssl_version}
|
||||
Requires: rubygem(psych) >= %{psych_version}
|
||||
BuildRequires: ruby(release)
|
||||
BuildRequires: rubygem(json)
|
||||
BuildRequires: rubygem(rdoc)
|
||||
%if %{enable_check}
|
||||
# For mkmf.rb
|
||||
BuildRequires: ruby-devel
|
||||
BuildRequires: rubygem(minitest) < 5
|
||||
BuildRequires: rubygem(rake)
|
||||
BuildRequires: rubygem(rdoc) >= 4.0.0
|
||||
BuildRequires: rubygem(io-console) >= 0.4.1
|
||||
BuildRequires: rubygem(psych) >= 2.0.0
|
||||
BuildRequires: ruby-devel
|
||||
BuildRequires: rubygem(minitest) < 5
|
||||
BuildRequires: rubygem(rake)
|
||||
# TestGemExtCmakeBuilder
|
||||
BuildRequires: %{_bindir}/cmake
|
||||
BuildRequires: git
|
||||
BuildRequires: rubygem(builder)
|
||||
BuildRequires: %{_bindir}/cmake
|
||||
BuildRequires: git
|
||||
BuildRequires: rubygem(builder)
|
||||
%endif
|
||||
BuildArch: noarch
|
||||
Provides: ruby(rubygems) = %{version}-%{release}
|
||||
Provides: gem = %{version}-%{release}
|
||||
Provides: ruby(rubygems) = %{version}-%{release}
|
||||
# https://github.com/rubygems/rubygems/pull/1189#issuecomment-121600910
|
||||
Provides: bundled(rubygem(molinillo)) = %{molinillo_version}
|
||||
Provides: bundled(rubygem-molinillo) = %{molinillo_version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
RubyGems is the Ruby standard for publishing and managing third party
|
||||
libraries.
|
||||
|
||||
%package devel
|
||||
Summary: Macros and development tools for packaging RubyGems
|
||||
Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
Requires: ruby(%{name}) = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%package devel
|
||||
Summary: Macros and development tools for packaging RubyGems
|
||||
Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
Requires: ruby(%{name}) = %{version}-%{release}
|
||||
# Needed for RDoc documentation format generation.
|
||||
Requires: rubygem(json) >= %{json_version}
|
||||
Requires: rubygem(rdoc) >= %{rdoc_version}
|
||||
BuildArch: noarch
|
||||
|
||||
%description devel
|
||||
%description devel
|
||||
Macros and development tools for packaging RubyGems.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
Requires: ruby(%{name}) = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Group: Development/Libraries
|
||||
License: Ruby or MIT
|
||||
Requires: ruby(%{name}) = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description doc
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
|
|
@ -116,11 +131,6 @@ GEM_HOME=%{buildroot}/%{gem_dir} \
|
|||
--backtrace \
|
||||
--destdir=%{buildroot}/%{rubygems_dir}/
|
||||
|
||||
# Remove original filenames from *.gz files.
|
||||
# https://github.com/rdoc/rdoc/pull/341
|
||||
find %{buildroot}/%{gem_dir}/ -name *.gz \
|
||||
-exec sh -c "gzip -dc '{}' | gzip > '{}.new' && mv '{}.new' '{}'" \;
|
||||
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
mv %{buildroot}/%{rubygems_dir}/bin/gem %{buildroot}/%{_bindir}/gem
|
||||
rm -rf %{buildroot}/%{rubygems_dir}/bin
|
||||
|
|
@ -131,15 +141,15 @@ rmdir %{buildroot}%{rubygems_dir}/lib
|
|||
|
||||
# Kill bundled certificates, as they should be part of ca-certificates.
|
||||
for cert in \
|
||||
Class3PublicPrimaryCertificationAuthority.pem \
|
||||
DigiCertHighAssuranceEVRootCA.pem \
|
||||
EntrustnetSecureServerCertificationAuthority.pem \
|
||||
GeoTrustGlobalCA.pem \
|
||||
AddTrustExternalCARoot.pem \
|
||||
AddTrustExternalCARoot-2048.pem
|
||||
rubygems.global.ssl.fastly.net/DigiCertHighAssuranceEVRootCA.pem \
|
||||
rubygems.org/AddTrustExternalCARoot.pem \
|
||||
index.rubygems.org/GlobalSignRootCA.pem
|
||||
do
|
||||
rm %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert
|
||||
rm -r $(dirname %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/$cert)
|
||||
done
|
||||
# Ensure there is not forgotten any certificate.
|
||||
test ! "$(ls -A %{buildroot}%{rubygems_dir}/rubygems/ssl_certs/ 2>/dev/null)"
|
||||
|
||||
# Move macros file into proper place and replace the %%{name} macro, since it
|
||||
# would be wrongly evaluated during build of other packages.
|
||||
|
|
@ -164,43 +174,41 @@ mkdir -p %{buildroot}%{gem_extdir}/ruby
|
|||
# Create below
|
||||
mkdir -p %{buildroot}%{gem_dir}/specifications/default
|
||||
|
||||
%if %{enable_check}
|
||||
%check
|
||||
# Create an empty operating_system.rb, so that the system's one doesn't get used,
|
||||
# otherwise the test suite fails.
|
||||
mkdir -p lib/rubygems/defaults
|
||||
touch lib/rubygems/defaults/operating_system.rb
|
||||
|
||||
# It is necessary to specify the paths using RUBYOPT to let the test suite pass."
|
||||
# It is necessary to specify the paths to let the test suite pass."
|
||||
export GEM_PATH=%{gem_dir}
|
||||
RUBYOPT="-Ilib:test"
|
||||
for module in \
|
||||
json; \
|
||||
do
|
||||
for dir in \
|
||||
%{gem_dir}/gems/$module-*/lib \
|
||||
%{buildtime_libdir}/gems/ruby/$module-*
|
||||
do
|
||||
RUBYOPT="$RUBYOPT:$dir"
|
||||
done
|
||||
done
|
||||
export RUBYOPT
|
||||
export RUBYOPT="--disable-gems -Ilib:test"
|
||||
|
||||
# TODO: Not sure why Builder is not required by rubygems/indexer :/
|
||||
ruby -rbuilder/xchar -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
|
||||
# Check Molinillo version correctness.
|
||||
[ "`ruby -e 'module Gem; module Resolver; end; end; require %{rubygems/resolver/molinillo/lib/molinillo/gem_metadata}; puts Gem::Resolver::Molinillo::VERSION' | tail -1`" \
|
||||
== '%{molinillo_version}' ]
|
||||
|
||||
%if %{enable_check}
|
||||
ruby -e 'Dir.glob "./test/**/test_*.rb", &method(:require)'
|
||||
|
||||
# CVE vulnerability check
|
||||
ruby -Ilib %{SOURCE11}
|
||||
ruby -Ilib %{SOURCE12}
|
||||
ruby %{SOURCE11}
|
||||
ruby %{SOURCE12}
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc README*
|
||||
%doc History.txt
|
||||
%doc MIT.txt LICENSE.txt
|
||||
%license MIT.txt LICENSE.txt
|
||||
%doc CVE-*txt
|
||||
# TODO: Ruby's rubygems subpackage owns whole gem_dir. We should probably
|
||||
# align the owhership either here or there.
|
||||
%{_bindir}/gem
|
||||
%dir %{rubygems_dir}
|
||||
%{rubygems_dir}/rubygems
|
||||
%{rubygems_dir}/rubygems.rb
|
||||
%{rubygems_dir}/ubygems.rb
|
||||
|
||||
# Explicitly include only RubyGems directory strucure to avoid accidentally
|
||||
# packaged content.
|
||||
%dir %{gem_dir}
|
||||
%dir %{gem_dir}/build_info
|
||||
%dir %{gem_dir}/cache
|
||||
|
|
@ -209,20 +217,8 @@ ruby -Ilib %{SOURCE12}
|
|||
%dir %{gem_dir}/gems
|
||||
%dir %{gem_dir}/specifications
|
||||
%dir %{gem_dir}/specifications/default
|
||||
%{_bindir}/gem
|
||||
|
||||
%dir %{rubygems_dir}/
|
||||
# The following directory is killed on rubygem 2.0.0!!
|
||||
#%%{rubygems_dir}/rbconfig/
|
||||
%{rubygems_dir}/rubygems/
|
||||
%{rubygems_dir}/rubygems.rb
|
||||
%{rubygems_dir}/ubygems.rb
|
||||
%{rubygems_dir}/gauntlet_rubygems.rb
|
||||
|
||||
%dir %{_exec_prefix}/lib/gems
|
||||
%dir %{_exec_prefix}/lib64/gems
|
||||
%dir %{_exec_prefix}/lib/gems/ruby
|
||||
%dir %{_exec_prefix}/lib64/gems/ruby
|
||||
%dir %{_exec_prefix}/lib*/gems
|
||||
%dir %{_exec_prefix}/lib*/gems/ruby
|
||||
|
||||
%files devel
|
||||
%{_rpmconfigdir}/macros.d/macros.rubygems
|
||||
|
|
@ -235,6 +231,9 @@ ruby -Ilib %{SOURCE12}
|
|||
|
||||
|
||||
%changelog
|
||||
* Tue Sep 05 2017 Vít Ondruch <vondruch@redhat.com> - 2.6.13-100
|
||||
- Update to RubyGems 2.6.13.
|
||||
|
||||
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.8-102
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
dc77b51449dffe5b31776bff826bf559 rubygems-2.4.8.tgz
|
||||
SHA512 (rubygems-2.6.13.tgz) = c952b6061a9a0778db304c3aa5bea693e71ae2564abfb19f8b123eef66eb1e3877fc7c36f4f1527da97bb320870cbfd4574ac57ad88e850a44fadd67ebdac152
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue