#56 [WIP] Bundle default gems
Merged 4 years ago by vondruch. Opened 4 years ago by vondruch.
rpms/ vondruch/ruby bundle-default-gems  into  master

file modified
+206 -163
@@ -22,7 +22,7 @@ 

  %endif

  

  

- %global release 128

+ %global release 129

  %{!?release_string:%define release_string %{?development_release:0.}%{release}%{?development_release:.%{development_release}}%{?dist}}

  

  # The RubyGems library has to stay out of Ruby directory tree, since the
@@ -33,6 +33,7 @@ 

  %global rubygems_version 3.1.2

  %global rubygems_molinillo_version 0.5.7

  

+ # Default gems.

  %global bundler_version 2.1.4

  %global bundler_connection_pool_version 2.2.2

  %global bundler_fileutils_version 1.3.0
@@ -45,17 +46,19 @@ 

  %global io_console_version 0.5.6

  %global irb_version 1.2.3

  %global json_version 2.3.0

- %global minitest_version 5.13.0

  %global net_telnet_version 0.2.0

  %global openssl_version 2.1.2

- %global power_assert_version 1.1.7

  %global psych_version 3.1.0

  %global racc_version 1.4.16

- %global rake_version 13.0.1

  %global rdoc_version 6.2.1

- %global test_unit_version 3.3.4

  %global xmlrpc_version 0.3.0

  

+ # Bundled gems.

+ %global minitest_version 5.13.0

+ %global power_assert_version 1.1.7

+ %global rake_version 13.0.1

+ %global test_unit_version 3.3.4

+ 

  # Might not be needed in the future, if we are lucky enough.

  # https://bugzilla.redhat.com/show_bug.cgi?id=888262

  %global tapset_root %{_datadir}/systemtap
@@ -161,7 +164,6 @@ 

  # https://bugs.ruby-lang.org/issues/16431

  Requires: rubygem(did_you_mean) >= %{did_you_mean_version}

  Recommends: rubygem(openssl) >= %{openssl_version}

- Recommends: rubygem(racc) >= %{racc_version}

  

  BuildRequires: autoconf

  BuildRequires: gdbm-devel
@@ -217,6 +219,9 @@ 

  Provides: bundled(ccan-container_of)

  Provides: bundled(ccan-list)

  

+ # StdLib default gems.

+ Provides: bundled(rubygem-racc) = %{racc_version}

+ 

  # Tcl/Tk support was removed from stdlib in Ruby 2.4, i.e. F27 timeframe

  # so lets obsolete it. This is not the best place, but we don't have

  # better, unless https://fedorahosted.org/fpc/ticket/645 provides some
@@ -264,19 +269,22 @@ 

  Macros and development tools for packaging RubyGems.

  

  

- %package -n rubygem-rake

- Summary:    Ruby based make-like utility

- Version:    %{rake_version}

- License:    MIT

- Requires:   ruby(release)

+ # Default gems

+ #

+ # These packages are part of Ruby StdLib and are expected to be loadable even

+ # with disabled RubyGems.

+ 

+ %package default-gems

+ Summary:    Default gems which are part of Ruby StdLib.

  Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rake = %{version}-%{release}

- Provides:   rubygem(rake) = %{version}-%{release}

+ Supplements: ruby(rubygems)

+ # Obsoleted by Ruby 2.7 in F32 timeframe.

+ Obsoletes: rubygem-racc < %{racc_version}-%{release}

  BuildArch:  noarch

  

- %description -n rubygem-rake

- Rake is a Make-like program implemented in Ruby. Tasks and dependencies are

- specified in standard Ruby syntax.

+ %description default-gems

+ The .gemspec files and executables of default gems, which are part of Ruby

+ StdLib.

  

  

  %package -n rubygem-irb
@@ -390,6 +398,60 @@ 

  markup language.

  

  

+ %package -n rubygem-openssl

+ Summary:    OpenSSL provides SSL, TLS and general purpose cryptography

+ Version:    %{openssl_version}

+ License:    Ruby or BSD

+ Requires:   ruby(release)

+ Requires:   ruby(rubygems) >= %{rubygems_version}

+ Provides:   rubygem(openssl) = %{version}-%{release}

+ 

+ %description -n rubygem-openssl

+ OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the

+ OpenSSL library.

+ 

+ 

+ %package -n rubygem-psych

+ Summary:    A libyaml wrapper for Ruby

+ Version:    %{psych_version}

+ License:    MIT

+ Requires:   ruby(release)

+ Requires:   ruby(rubygems) >= %{rubygems_version}

+ Provides:   rubygem(psych) = %{version}-%{release}

+ 

+ %description -n rubygem-psych

+ Psych is a YAML parser and emitter. Psych leverages

+ libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting

+ capabilities. In addition to wrapping libyaml, Psych also knows how to

+ serialize and de-serialize most Ruby objects to and from the YAML format.

+ 

+ 

+ %package -n rubygem-bundler

+ Summary:    Library and utilities to manage a Ruby application's gem dependencies

+ Version:    %{bundler_version}

+ License:    MIT

+ Requires:   ruby(release)

+ Requires:   ruby(rubygems) >= %{rubygems_version}

+ Requires:   rubygem(io-console)

+ Provides:   rubygem(bundler) = %{version}-%{release}

+ # https://github.com/bundler/bundler/issues/3647

+ Provides:   bundled(connection_pool) = %{bundler_connection_pool_version}

+ Provides:   bundled(rubygem-fileutils) = %{bundler_fileutils_version}

+ Provides:   bundled(rubygem-molinillo) = %{bundler_molinillo_version}

+ Provides:   bundled(rubygem-net-http-persisntent) = %{bundler_net_http_persistent_version}

+ Provides:   bundled(rubygem-thor) = %{bundler_thor_version}

+ BuildArch:  noarch

+ 

+ %description -n rubygem-bundler

+ Bundler manages an application's dependencies through its entire life, across

+ many machines, systematically and repeatably.

+ 

+ 

+ # Bundled gems

+ #

+ # These are regular packages, which might be installed just optionally. Users

+ # should list them among their dependencies (in Gemfile).

+ 

  %package -n rubygem-minitest

  Summary:    Minitest provides a complete suite of testing facilities

  Version:    %{minitest_version}
@@ -414,19 +476,6 @@ 

  output.

  

  

- %package -n rubygem-openssl

- Summary:    OpenSSL provides SSL, TLS and general purpose cryptography

- Version:    %{openssl_version}

- License:    Ruby or BSD

- Requires:   ruby(release)

- Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(openssl) = %{version}-%{release}

- 

- %description -n rubygem-openssl

- OpenSSL provides SSL, TLS and general purpose cryptography. It wraps the

- OpenSSL library.

- 

- 

  %package -n rubygem-power_assert

  Summary:    Power Assert for Ruby

  Version:    %{power_assert_version}
@@ -442,19 +491,19 @@ 

  condition is not satisfied.

  

  

- %package -n rubygem-psych

- Summary:    A libyaml wrapper for Ruby

- Version:    %{psych_version}

+ %package -n rubygem-rake

+ Summary:    Ruby based make-like utility

+ Version:    %{rake_version}

  License:    MIT

  Requires:   ruby(release)

  Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(psych) = %{version}-%{release}

+ Provides:   rake = %{version}-%{release}

+ Provides:   rubygem(rake) = %{version}-%{release}

+ BuildArch:  noarch

  

- %description -n rubygem-psych

- Psych is a YAML parser and emitter. Psych leverages

- libyaml[http://pyyaml.org/wiki/LibYAML] for its YAML parsing and emitting

- capabilities. In addition to wrapping libyaml, Psych also knows how to

- serialize and de-serialize most Ruby objects to and from the YAML format.

+ %description -n rubygem-rake

+ Rake is a Make-like program implemented in Ruby. Tasks and dependencies are

+ specified in standard Ruby syntax.

  

  

  %package -n rubygem-net-telnet
@@ -509,40 +558,6 @@ 

  HTTP.

  

  

- %package -n rubygem-bundler

- Summary:    Library and utilities to manage a Ruby application's gem dependencies

- Version:    %{bundler_version}

- License:    MIT

- Requires:   ruby(release)

- Requires:   ruby(rubygems) >= %{rubygems_version}

- Requires:   rubygem(io-console)

- Provides:   rubygem(bundler) = %{version}-%{release}

- # https://github.com/bundler/bundler/issues/3647

- Provides:   bundled(connection_pool) = %{bundler_connection_pool_version}

- Provides:   bundled(rubygem-fileutils) = %{bundler_fileutils_version}

- Provides:   bundled(rubygem-molinillo) = %{bundler_molinillo_version}

- Provides:   bundled(rubygem-net-http-persisntent) = %{bundler_net_http_persistent_version}

- Provides:   bundled(rubygem-thor) = %{bundler_thor_version}

- BuildArch:  noarch

- 

- %description -n rubygem-bundler

- Bundler manages an application's dependencies through its entire life, across

- many machines, systematically and repeatably.

- 

- 

- %package -n rubygem-racc

- Summary:    Racc is a LALR(1) parser generator

- Version:    %{racc_version}

- License:    MIT

- Requires:   ruby(release)

- Requires:   ruby(rubygems) >= %{rubygems_version}

- Provides:   rubygem(racc) = %{version}-%{release}

- 

- %description -n rubygem-racc

- Racc is a LALR(1) parser generator. It is written in Ruby itself, and

- generates Ruby program.

- 

- 

  %prep

  %setup -q -n %{ruby_archive}

  
@@ -729,27 +744,6 @@ 

  ln -s %{gem_dir}/gems/psych-%{psych_version}/lib/psych.rb %{buildroot}%{ruby_libdir}/psych.rb

  ln -s %{_libdir}/gems/%{name}/psych-%{psych_version}/psych.so %{buildroot}%{ruby_libarchdir}/psych.so

  

- # These have wrong shebangs. Exclude them for now and let's see what upstream

- # thinks about them.

- # https://bugs.ruby-lang.org/issues/15982

- rm %{buildroot}%{_bindir}/{racc2y,y2racc}

- rm %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/bin/{racc2y,y2racc}

- mkdir -p %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib

- mkdir -p %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}

- mv %{buildroot}%{ruby_libdir}/racc* %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib

- mv %{buildroot}%{ruby_libarchdir}/racc/ %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}/

- touch %{buildroot}%{_libdir}/gems/%{name}/racc-%{racc_version}/gem.build_complete

- mv %{buildroot}%{gem_dir}/specifications/default/racc-%{racc_version}.gemspec %{buildroot}%{gem_dir}/specifications

- # This used to be directories when racc was integral part of StdLib => Keep

- # them as directories and link everything in them to prevent directory =>

- # symlink conversion RPM issues.

- mkdir -p %{buildroot}%{ruby_libdir}/racc

- mkdir -p %{buildroot}%{ruby_libarchdir}/racc

- find %{buildroot}%{gem_dir}/gems/racc-%{racc_version}/lib/racc -maxdepth 1 -type f -exec \

-   sh -c 'ln -s %{gem_dir}/gems/racc-%{racc_version}/lib/racc/`basename {}` %{buildroot}%{ruby_libdir}/racc' \;

- ln -s %{gem_dir}/gems/racc-%{racc_version}/lib/racc.rb %{buildroot}%{ruby_libdir}/racc.rb

- ln -s %{_libdir}/gems/%{name}/racc-%{racc_version}/racc/cparse.so %{buildroot}%{ruby_libarchdir}/racc/cparse.so

- 

  # Move the binary extensions into proper place (if no gem has binary extension,

  # the extensions directory might be empty).

  find %{buildroot}%{gem_dir}/extensions/*-%{_target_os}/%{ruby_version}/* -maxdepth 0 \
@@ -920,42 +914,76 @@ 

  # List all these files explicitly to prevent surprises

  # Platform independent libraries.

  %dir %{ruby_libdir}

- %{ruby_libdir}/*.rb

- %exclude %{ruby_libdir}/irb.rb

- %exclude %{ruby_libdir}/json.rb

- %exclude %{ruby_libdir}/openssl.rb

- %exclude %{ruby_libdir}/psych.rb

- %exclude %{ruby_libdir}/racc.rb

- %{ruby_libdir}/benchmark

- %{ruby_libdir}/cgi

- %{ruby_libdir}/csv

- %{ruby_libdir}/delegate

- %{ruby_libdir}/digest

- %{ruby_libdir}/drb

- %{ruby_libdir}/fiddle

- %{ruby_libdir}/forwardable

- %{ruby_libdir}/getoptlong

- %{ruby_libdir}/logger

- %{ruby_libdir}/matrix

+ %exclude %{ruby_libdir}/bigdecimal*

+ %exclude %{ruby_libdir}/irb*

+ %exclude %{ruby_libdir}/json*

+ %exclude %{ruby_libdir}/openssl*

+ %exclude %{ruby_libdir}/psych*

+ %{ruby_libdir}/abbrev.rb

+ %{ruby_libdir}/base64.rb

+ %{ruby_libdir}/benchmark*

+ %{ruby_libdir}/cgi*

+ %{ruby_libdir}/coverage.rb

+ %{ruby_libdir}/csv*

+ %{ruby_libdir}/date.rb

+ %{ruby_libdir}/debug.rb

+ %{ruby_libdir}/delegate*

+ %{ruby_libdir}/digest*

+ %{ruby_libdir}/drb*

+ %{ruby_libdir}/English.rb

+ %{ruby_libdir}/erb.rb

+ %{ruby_libdir}/expect.rb

+ %{ruby_libdir}/fiddle*

+ %{ruby_libdir}/fileutils.rb

+ %{ruby_libdir}/find.rb

+ %{ruby_libdir}/forwardable*

+ %{ruby_libdir}/getoptlong*

+ %{ruby_libdir}/io

+ %{ruby_libdir}/ipaddr.rb

+ %{ruby_libdir}/kconv.rb

+ %{ruby_libdir}/logger*

+ %{ruby_libdir}/matrix*

+ %{ruby_libdir}/mkmf.rb

+ %{ruby_libdir}/monitor.rb

+ %{ruby_libdir}/mutex_m.rb

  %{ruby_libdir}/net

- %{ruby_libdir}/observer

- %{ruby_libdir}/open3

- %{ruby_libdir}/optparse

- %{ruby_libdir}/ostruct

- %{ruby_libdir}/pstore

- %{ruby_libdir}/reline

+ %{ruby_libdir}/observer*

+ %{ruby_libdir}/open-uri.rb

+ %{ruby_libdir}/open3*

+ %{ruby_libdir}/optionparser.rb

+ %{ruby_libdir}/optparse*

+ %{ruby_libdir}/ostruct*

+ %{ruby_libdir}/pathname.rb

+ %{ruby_libdir}/pp.rb

+ %{ruby_libdir}/prettyprint.rb

+ %{ruby_libdir}/prime.rb

+ %{ruby_libdir}/pstore*

+ %{ruby_libdir}/readline.rb

+ %{ruby_libdir}/reline*

+ %{ruby_libdir}/resolv.rb

+ %{ruby_libdir}/resolv-replace.rb

  %{ruby_libdir}/rexml

  %{ruby_libdir}/rinda

- %{ruby_libdir}/ripper

- %{ruby_libdir}/rss

- %{ruby_libdir}/singleton

+ %{ruby_libdir}/ripper*

+ %{ruby_libdir}/rss*

+ %{ruby_libdir}/securerandom.rb

+ %{ruby_libdir}/set.rb

+ %{ruby_libdir}/shellwords.rb

+ %{ruby_libdir}/singleton*

+ %{ruby_libdir}/socket.rb

  %{ruby_libdir}/syslog

- %{ruby_libdir}/timeout

- %{ruby_libdir}/tracer

+ %{ruby_libdir}/tempfile.rb

+ %{ruby_libdir}/timeout*

+ %{ruby_libdir}/time.rb

+ %{ruby_libdir}/tmpdir.rb

+ %{ruby_libdir}/tracer*

+ %{ruby_libdir}/tsort.rb

  %{ruby_libdir}/unicode_normalize

- %{ruby_libdir}/uri

- %{ruby_libdir}/webrick

- %{ruby_libdir}/yaml

+ %{ruby_libdir}/un.rb

+ %{ruby_libdir}/uri*

+ %{ruby_libdir}/weakref*

+ %{ruby_libdir}/webrick*

+ %{ruby_libdir}/yaml*

  

  # Platform specific libraries.

  %{_libdir}/libruby.so.*
@@ -1061,6 +1089,11 @@ 

  %{ruby_libarchdir}/syslog.so

  %{ruby_libarchdir}/zlib.so

  

+ # Default gems

+ %{ruby_libdir}/racc*

+ %dir %{ruby_libarchdir}/racc

+ %{ruby_libarchdir}/racc/cparse.so

+ 

  %{?with_systemtap:%{tapset_root}}

  

  %files -n rubygems
@@ -1084,7 +1117,14 @@ 

  

  %exclude %{gem_dir}/cache/*

  

- # TODO: Gemify these libraries

+ %files -n rubygems-devel

+ %{_rpmconfigdir}/macros.d/macros.rubygems

+ %{_rpmconfigdir}/fileattrs/rubygems.attr

+ %{_rpmconfigdir}/rubygems.req

+ %{_rpmconfigdir}/rubygems.prov

+ %{_rpmconfigdir}/rubygems.con

+ 

+ %files default-gems

  %{gem_dir}/specifications/default/benchmark-0.1.0.gemspec

  %{gem_dir}/specifications/default/cgi-0.1.0.gemspec

  %{gem_dir}/specifications/default/csv-3.1.2.gemspec
@@ -1125,18 +1165,18 @@ 

  %{gem_dir}/specifications/default/yaml-0.1.0.gemspec

  %{gem_dir}/specifications/default/zlib-1.1.0.gemspec

  

- %files -n rubygems-devel

- %{_rpmconfigdir}/macros.d/macros.rubygems

- %{_rpmconfigdir}/fileattrs/rubygems.attr

- %{_rpmconfigdir}/rubygems.req

- %{_rpmconfigdir}/rubygems.prov

- %{_rpmconfigdir}/rubygems.con

- 

- %files -n rubygem-rake

- %{_bindir}/rake

- %{gem_dir}/gems/rake-%{rake_version}

- %{gem_dir}/specifications/rake-%{rake_version}.gemspec

- %{_mandir}/man1/rake.1*

+ # Use standalone rubygem-racc if Racc binary is required. Shipping this

+ # executable in both packages might possibly cause conflicts. The situation

+ # could be better if Ruby generated these files:

+ # https://github.com/ruby/ruby/pull/2545

+ %exclude %{_bindir}/racc

+ # These have wrong shebangs. Exclude them for now and let's see what upstream

+ # thinks about them.

+ # https://bugs.ruby-lang.org/issues/15982

+ %exclude %{_bindir}/{racc2y,y2racc}

+ %exclude %{gem_dir}/gems/racc-%{racc_version}/bin/{racc2y,y2racc}

+ %{gem_dir}/gems/racc-%{racc_version}

+ %{gem_dir}/specifications/default/racc-1.4.16.gemspec

  

  %files -n rubygem-irb

  %{_bindir}/irb
@@ -1159,7 +1199,7 @@ 

  %{_datadir}/ri

  

  %files -n rubygem-bigdecimal

- %{ruby_libdir}/bigdecimal

+ %{ruby_libdir}/bigdecimal*

  %{ruby_libarchdir}/bigdecimal*

  %{_libdir}/gems/%{name}/bigdecimal-%{bigdecimal_version}

  %{gem_dir}/gems/bigdecimal-%{bigdecimal_version}
@@ -1184,11 +1224,6 @@ 

  %{gem_dir}/gems/json-%{json_version}

  %{gem_dir}/specifications/json-%{json_version}.gemspec

  

- %files -n rubygem-minitest

- %{gem_dir}/gems/minitest-%{minitest_version}

- %exclude %{gem_dir}/gems/minitest-%{minitest_version}/.*

- %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec

- 

  %files -n rubygem-openssl

  %{ruby_libdir}/openssl

  %{ruby_libdir}/openssl.rb
@@ -1197,11 +1232,6 @@ 

  %{gem_dir}/gems/openssl-%{openssl_version}

  %{gem_dir}/specifications/openssl-%{openssl_version}.gemspec

  

- %files -n rubygem-power_assert

- %{gem_dir}/gems/power_assert-%{power_assert_version}

- %exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.*

- %{gem_dir}/specifications/power_assert-%{power_assert_version}.gemspec

- 

  %files -n rubygem-psych

  %{ruby_libdir}/psych

  %{ruby_libdir}/psych.rb
@@ -1210,11 +1240,35 @@ 

  %{gem_dir}/gems/psych-%{psych_version}

  %{gem_dir}/specifications/psych-%{psych_version}.gemspec

  

+ %files -n rubygem-bundler

+ %{_bindir}/bundle

+ %{_bindir}/bundler

+ %{gem_dir}/gems/bundler-%{bundler_version}

+ %{gem_dir}/specifications/bundler-%{bundler_version}.gemspec

+ %{_mandir}/man1/bundle*.1*

+ %{_mandir}/man5/gemfile.5*

+ 

+ %files -n rubygem-minitest

+ %{gem_dir}/gems/minitest-%{minitest_version}

+ %exclude %{gem_dir}/gems/minitest-%{minitest_version}/.*

+ %{gem_dir}/specifications/minitest-%{minitest_version}.gemspec

+ 

  %files -n rubygem-net-telnet

  %{gem_dir}/gems/net-telnet-%{net_telnet_version}

  %exclude %{gem_dir}/gems/net-telnet-%{net_telnet_version}/.*

  %{gem_dir}/specifications/net-telnet-%{net_telnet_version}.gemspec

  

+ %files -n rubygem-power_assert

+ %{gem_dir}/gems/power_assert-%{power_assert_version}

+ %exclude %{gem_dir}/gems/power_assert-%{power_assert_version}/.*

+ %{gem_dir}/specifications/power_assert-%{power_assert_version}.gemspec

+ 

+ %files -n rubygem-rake

+ %{_bindir}/rake

+ %{gem_dir}/gems/rake-%{rake_version}

+ %{gem_dir}/specifications/rake-%{rake_version}.gemspec

+ %{_mandir}/man1/rake.1*

+ 

  %files -n rubygem-test-unit

  %{gem_dir}/gems/test-unit-%{test_unit_version}

  %{gem_dir}/specifications/test-unit-%{test_unit_version}.gemspec
@@ -1231,23 +1285,12 @@ 

  %{gem_dir}/gems/xmlrpc-%{xmlrpc_version}/xmlrpc.gemspec

  %{gem_dir}/specifications/xmlrpc-%{xmlrpc_version}.gemspec

  

- %files -n rubygem-bundler

- %{_bindir}/bundle

- %{_bindir}/bundler

- %{gem_dir}/gems/bundler-%{bundler_version}

- %{gem_dir}/specifications/bundler-%{bundler_version}.gemspec

- %{_mandir}/man1/bundle*.1*

- %{_mandir}/man5/gemfile.5*

- 

- %files -n rubygem-racc

- %{ruby_libdir}/racc*

- %{ruby_libarchdir}/racc

- %{_bindir}/racc

- %{_libdir}/gems/%{name}/racc-%{racc_version}

- %{gem_dir}/gems/racc-%{racc_version}

- %{gem_dir}/specifications/racc-%{racc_version}.gemspec

  

  %changelog

+ * Thu Apr 02 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.1-129

+ - Add ruby-default-gems subpackage shipping all extra default gem content.

+ - Bundle Racc into StdLib.

+ 

  * Wed Apr 01 2020 Vít Ondruch <vondruch@redhat.com> - 2.7.1-128

  - Upgrade to Ruby 2.7.1.

  - Fix FTBFS due to glibc 2.31.9000 implementing lchmod(2).

This PR preparation to bundle every default gem back to StdLib. This is supposed to get back closer to upstream behavior and it should fix issues such as:

https://src.fedoraproject.org/rpms/rubygem-racc/pull-request/1
https://bugzilla.redhat.com/show_bug.cgi?id=1817178

For the moment, there is only rubygem-racc bundled.

Hello,
I've tried to build this in my copr.

It seems there are files that are not packaged:

(F31 + F32 buildroots)

error: Installed (but unpackaged) file(s) found:
   /usr/bin/racc2y
   /usr/bin/y2racc
    absolute symlink: /usr/share/ruby/io -> /usr/share/gems/gems/io-console-0.5.3/lib/io
    absolute symlink: /usr/share/ruby/irb.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb.rb
    absolute symlink: /usr/share/ruby/irb/cmd/chws.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/cmd/chws.rb
    absolute symlink: /usr/share/ruby/irb/cmd/fork.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/cmd/fork.rb
    absolute symlink: /usr/share/ruby/irb/cmd/help.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/cmd/help.rb
    absolute symlink: /usr/share/ruby/irb/cmd/load.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/cmd/load.rb
    absolute symlink: /usr/share/ruby/irb/cmd/nop.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/cmd/nop.rb
    absolute symlink: /usr/share/ruby/irb/cmd/pushws.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/cmd/pushws.rb
    absolute symlink: /usr/share/ruby/irb/cmd/subirb.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/cmd/subirb.rb
    absolute symlink: /usr/share/ruby/irb/color.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/color.rb
    absolute symlink: /usr/share/ruby/irb/completion.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/completion.rb
    absolute symlink: /usr/share/ruby/irb/context.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/context.rb
    absolute symlink: /usr/share/ruby/irb/ext/change-ws.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/ext/change-ws.rb
    absolute symlink: /usr/share/ruby/irb/ext/history.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/ext/history.rb
    absolute symlink: /usr/share/ruby/irb/ext/loader.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/ext/loader.rb
    absolute symlink: /usr/share/ruby/irb/ext/multi-irb.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/ext/multi-irb.rb
    absolute symlink: /usr/share/ruby/irb/ext/save-history.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/ext/save-history.rb
    absolute symlink: /usr/share/ruby/irb/ext/tracer.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/ext/tracer.rb
    absolute symlink: /usr/share/ruby/irb/ext/use-loader.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/ext/use-loader.rb
    absolute symlink: /usr/share/ruby/irb/ext/workspaces.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/ext/workspaces.rb
    absolute symlink: /usr/share/ruby/irb/extend-command.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/extend-command.rb
    absolute symlink: /usr/share/ruby/irb/frame.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/frame.rb
    absolute symlink: /usr/share/ruby/irb/help.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/help.rb
    absolute symlink: /usr/share/ruby/irb/init.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/init.rb
    absolute symlink: /usr/share/ruby/irb/input-method.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/input-method.rb
    absolute symlink: /usr/share/ruby/irb/inspector.rb -> /usr/share/gems/gems/irb-1.2.1/lib/irb/inspector.rb

Also, I've encountered rawhide error. Is this the one you've mentioned?

  1) Failure:
TestFileUtils#test_cp_r_symlink_preserve [/builddir/build/BUILD/ruby-2.7.0/test/fileutils/test_fileutils.rb:439]:
Exception raised:
<#<Errno::ENOTSUP: Operation not supported @ apply2files - tmp/cross2/b/l>>.

  2) Failure:
TestNotImplement#test_respond_to_lchmod [/builddir/build/BUILD/ruby-2.7.0/test/ruby/test_notimp.rb:17]:
<false> expected but was
<true>.

  3) Error:
TestNotImplement#test_call_lchmod:
Errno::ENOTSUP: Operation not supported @ apply2files - /tmp/d20200401-34450-1983o0b/g
    /builddir/build/BUILD/ruby-2.7.0/test/ruby/test_notimp.rb:60:in `lchmod'
    /builddir/build/BUILD/ruby-2.7.0/test/ruby/test_notimp.rb:60:in `block in test_call_lchmod'
    /builddir/build/BUILD/ruby-2.7.0/lib/tmpdir.rb:89:in `mktmpdir'
    /builddir/build/BUILD/ruby-2.7.0/test/ruby/test_notimp.rb:54:in `test_call_lchmod'

  4) Error:
TestPathname#test_lchmod:
Errno::ENOTSUP: Operation not supported @ apply2files - l
    /builddir/build/BUILD/ruby-2.7.0/test/pathname/test_pathname.rb:820:in `lchmod'
    /builddir/build/BUILD/ruby-2.7.0/test/pathname/test_pathname.rb:820:in `lchmod'
    /builddir/build/BUILD/ruby-2.7.0/test/pathname/test_pathname.rb:820:in `block in test_lchmod'
    /builddir/build/BUILD/ruby-2.7.0/test/pathname/test_pathname.rb:340:in `block (2 levels) in with_tmpchdir'
    /builddir/build/BUILD/ruby-2.7.0/test/pathname/test_pathname.rb:339:in `chdir'
    /builddir/build/BUILD/ruby-2.7.0/test/pathname/test_pathname.rb:339:in `block in with_tmpchdir'
    /builddir/build/BUILD/ruby-2.7.0/lib/tmpdir.rb:89:in `mktmpdir'
    /builddir/build/BUILD/ruby-2.7.0/test/pathname/test_pathname.rb:337:in `with_tmpchdir'
    /builddir/build/BUILD/ruby-2.7.0/test/pathname/test_pathname.rb:814:in `test_lchmod'

error: Installed (but unpackaged) file(s) found:
/usr/bin/racc2y
/usr/bin/y2racc

Interesting. How comes I would miss this?

Also, I've encountered rawhide error. Is this the one you've mentioned?

Yep, this should be already fixed in Rawhide:

https://src.fedoraproject.org/rpms/ruby/c/79683d7d629de74dbcefe8cce68d51ec1eb1da01?branch=master

error: Installed (but unpackaged) file(s) found:
/usr/bin/racc2y
/usr/bin/y2racc

Interesting. How comes I would miss this?

Ah, right, these are not included in Ruby 2.8, that is why they went unnoticed. However, there is no excuse for not catching them in my PR :see_no_evil:

rebased onto a9b3ba5

4 years ago

Yesterday I've deduced, and excluded it like you did, and the result is successfull build for F31 + F32 + EL8:
https://copr.fedorainfracloud.org/coprs/pvalena/ruby/build/1325749/

Now I've rebased to your commit and running the build.

5 new commits added

  • Bundle Racc into StdLib.
  • Add ruby-default-gems subpackage shipping all extra default gem content.
  • Be more strict about StdLib content.
  • Properly own BigDecimal files.
  • Shuffle bits of .spec file around.
4 years ago

There is still one issue:

$ rpm -q -p -R https://download.copr.fedorainfracloud.org/results/pvalena/ruby/fedora-rawhide-x86_64/01326111-ruby/ruby-default-gems-2.7.1-128.fc33.noarch.rpm
/usr/bin/ruby
/usr/local/bin/ruby
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsZstd) <= 5.4.18-1
ruby(rubygems) >= 3.1.2

Please note the /usr/local/bin/ruby which is problematic. The latest push should fix this issue as well.

I think it works, at least for Racc. I'll give it a few hors, then I'll merge.

Yes, it built succesfully, but now it suffers from install issues- I wondered what's the /usr/local/bin/ruby doing there. Rebuilding.

I wondered what's the /usr/local/bin/ruby doing there.

That comes from y2racc/racc2y binaries. I have excluded them in the previous push.

Anyway, I'm going to merge this and we will see ...

5 new commits added

  • Bundle Racc into StdLib.
  • Add ruby-default-gems subpackage shipping all extra default gem content.
  • Be more strict about StdLib content.
  • Properly own BigDecimal files.
  • Shuffle bits of .spec file around.
4 years ago

Pull-Request has been merged by vondruch

4 years ago