Uploaded image for project: 'Funtoo Linux'
  1. Funtoo Linux
  2. FL-10773

[ruby-kit] dev-lang/ruby-3.1.2: bundled Gems are broken because of Gentoo ebuild practices

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Important (Ebuild) Important (Ebuild)
    • None
    • None
    • Degraded bundled RubyGem functionality of dev-lang/ruby-3.1.2 for all Funtoo users due to bitrot from Gentoo ebuild practices
    • Missing CatPkgs and RDEPENDS, improper updating of ebuild based on upstream source code
    • ruby-3.1.2 does not have these official upstream bundled_gems as RDEPENDS: debug-1.6.3.gem, matrix-0.4.2.gem, net-ftp-0.1.3.gem, net-imap-0.2.3.gem, net-pop-0.1.1.gem, net-smtp-0.3.1.gem, prime-0.1.2.gem

      I found an sad thing tonight with our next Ruby 3.1.2 install. Because of the madness that Gentoo has done in the dev-lang/ruby ebuild which literally rips out bundled gems to replace them RDEPENDS rubygem CatPkgs, they missed some bundled gems for newest 3.1 version of Ruby. This is very bad. This means certain RubyGems that upstream Ruby maintainers intended to be bundled with that particular version of Ruby are not included in when installing our new autogenned dev-lang/ruby-3.1.2 ebuild using the archaic rubygems CatPkg model that Portage forces on us, thus degraded its functionality and available tooling and Ruby libraries.

      To fix this stupidity you literally have to download upstream Ruby source code tarballs and inspect the bundle_gems config at: ruby-3.1.3/gems/bundled_gems

      Here is the damage by Ruby version:

      Ruby 3.1.3:

       

      cat /var/tmp/portage/dev-lang/ruby-3.1.3/work/ruby-3.1.3/gems/bundled_gems
      # gem-name version-to-bundle repository-url [optional-commit-hash-to-test-or-defaults-to-v-version]
      minitest 5.15.0 https://github.com/seattlerb/minitest
      power_assert 2.0.1 https://github.com/ruby/power_assert
      rake 13.0.6 https://github.com/ruby/rake
      test-unit 3.5.3 https://github.com/test-unit/test-unit
      rexml 3.2.5 https://github.com/ruby/rexml
      rss 0.2.9 https://github.com/ruby/rss
      net-ftp 0.1.3 https://github.com/ruby/net-ftp
      net-imap 0.2.3 https://github.com/ruby/net-imap
      net-pop 0.1.1 https://github.com/ruby/net-pop
      net-smtp 0.3.1 https://github.com/ruby/net-smtp
      matrix 0.4.2 https://github.com/ruby/matrix
      prime 0.1.2 https://github.com/ruby/prime
      rbs 2.7.0 https://github.com/ruby/rbs
      typeprof 0.21.3 https://github.com/ruby/typeprof
      debug 1.6.3 https://github.com/ruby/debug
      
      debug-1.6.3.gem
      matrix-0.4.2.gem
      minitest-5.15.0.gem
      net-ftp-0.1.3.gem
      net-imap-0.2.3.gem
      net-pop-0.1.1.gem
      net-smtp-0.3.1.gem
      power_assert-2.0.1.gem
      prime-0.1.2.gem
      rake-13.0.6.gem
      rbs-2.7.0.gem
      rexml-3.2.5.gem
      rss-0.2.9.gem
      test-unit-3.5.3.gem
      typeprof-0.21.3.gem

      Ruby 3.0.5:

       

      # gem-name version-to-bundle repository-url [optional-commit-hash-to-test-or-defaults-to-v-version]
      minitest 5.14.2 https://github.com/seattlerb/minitest
      power_assert 1.2.0 https://github.com/ruby/power_assert
      rake 13.0.3 https://github.com/ruby/rake
      test-unit 3.3.7 https://github.com/test-unit/test-unit 3.3.7
      rexml 3.2.5 https://github.com/ruby/rexml
      rss 0.2.9 https://github.com/ruby/rss 0.2.9
      typeprof 0.15.2 https://github.com/ruby/typeprof
      rbs 1.4.0 https://github.com/ruby/rbs
      
      minitest-5.14.2.gem
      power_assert-1.2.0.gem
      rake-13.0.3.gem
      rbs-1.4.0.gem
      rexml-3.2.5.gem
      rss-0.2.9.gem
      test-unit-3.3.7.gem
      typeprof-0.15.2.gem

       

      Ruby 2.7.7:

       

      minitest 5.13.0 https://github.com/seattlerb/minitest
      net-telnet 0.2.0 https://github.com/ruby/net-telnet
      power_assert 1.1.7 https://github.com/k-tsj/power_assert
      rake 13.0.1 https://github.com/ruby/rake
      test-unit 3.3.4 https://github.com/test-unit/test-unit
      xmlrpc 0.3.0 https://github.com/ruby/xmlrpc
      
      minitest-5.13.0.gem
      net-telnet-0.2.0.gem
      power_assert-1.1.7.gem
      rake-13.0.1.gem
      test-unit-3.3.4.gem
      xmlrpc-0.3.0.gem

       

      Comparing all of the above bundled RubyGems to what we have defined for the dev-lang/ruby Funtoo next autogens here: https://code.funtoo.org/bitbucket/projects/CORE/repos/kit-fixups/browse/ruby-kit/next/dev-lang/autogen.yaml these are the exact gems missing from Ruby 3.1.2 soon to become 3.1.3:

      1. debug-1.6.3.gem
      2. matrix-0.4.2.gem
      3. net-ftp-0.1.3.gem
      4. net-imap-0.2.3.gem
      5. net-pop-0.1.1.gem
      6. net-smtp-0.3.1.gem
      7. prime-0.1.2.gem

       

      How did I discover all of this? Trying to fix FL-10771 and a Gentoo patch of course failed against the new Ruby PATCH version:

       

      >>> Unpacking source...
      >>> Unpacking ruby-3.1.3.tar.xz to /var/tmp/portage/dev-lang/ruby-3.1.3/work
      >>> Source unpacked in /var/tmp/portage/dev-lang/ruby-3.1.3/work
      >>> Preparing source in /var/tmp/portage/dev-lang/ruby-3.1.3/work/ruby-3.1.3 ...
       * Applying 010*.patch ...
      /var/tmp/portage/dev-lang/ruby-3.1.3/temp/environment: line 781: /var/tmp/portage/dev-lang/ruby-3.1.3/repo/dev-lang/files/3.1/010*.patch: No such file or directory
      /var/tmp/portage/dev-lang/ruby-3.1.3/temp/environment: line 784: /var/tmp/portage/dev-lang/ruby-3.1.3/repo/dev-lang/files/3.1/010*.patch: No such file or directory [ !! ]
       * ERROR: dev-lang/ruby-3.1.3::test-kit failed (prepare phase):
       *   patch -p1  failed with /var/tmp/portage/dev-lang/ruby-3.1.3/repo/dev-lang/files/3.1/010*.patch
       *
       * Call stack:
       *               ebuild.sh, line   93:  Called src_prepare
       *             environment, line 1975:  Called eapply '/var/tmp/portage/dev-lang/ruby-3.1.3/repo/dev-lang/files/3.1/010*.patch'
       *             environment, line  849:  Called _eapply_patch '/var/tmp/portage/dev-lang/ruby-3.1.3/repo/dev-lang/files/3.1/010*.patch'
       *             environment, line  787:  Called __helpers_die 'patch -p1  failed with /var/tmp/portage/dev-lang/ruby-3.1.3/repo/dev-lang/files/3.1/010*.patch'
       *   isolated-functions.sh, line  112:  Called die
       * The specific snippet of code:
       *               die "$@"
       *
       * If you need support, post the output of `emerge --info '=dev-lang/ruby-3.1.3::test-kit'`,
       * the complete build log and the output of `emerge -pqv '=dev-lang/ruby-3.1.3::test-kit'`.
       * The complete build log is located at '/var/tmp/portage/dev-lang/ruby-3.1.3/temp/build.log'.
       * The ebuild environment file is located at '/var/tmp/portage/dev-lang/ruby-3.1.3/temp/environment'.
       * Working directory: '/var/tmp/portage/dev-lang/ruby-3.1.3/work/ruby-3.1.3'
       * S: '/var/tmp/portage/dev-lang/ruby-3.1.3/work/ruby-3.1.3

      This is absurd and a great example of how the stuff we have inherited from Gentoo needs to go by the wayside (eselect-ruby, CatPkg RubyGems, modifying source code, etc), especially in ruby-kit which is a brand new fully autogenned kit. Basically you can't put lipstick on a pig and expect it to smile and look pretty with this type of bitrot.

      How do we fix all of this:

      Adapt the missing bundled_gems in Ruby 3.1.3 source code to next ruby-kit autogens from Rubygems.org, some will be greenfield autogens as they obviously don't even exist in Gentoo because this whole problem was caused by using their crusty, poorly tested, bitrotting ebuilds.

       

            siris siris
            siris siris
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: