Page MenuHomeDevCentral

Upgrade Ruby to Ruby 2.2 on Ysul
Closed, ResolvedPublic

Description

Currently, our software depends of Ruby 2.0.

Yet, Ruby 2.2 has been released December 25th 2014.

An upgrade to 2.2 would improve the freshness of our main dev server.

Event Timeline

dereckson claimed this task.
dereckson raised the priority of this task from to High.
dereckson updated the task description. (Show Details)
dereckson added projects: security, Servers.
dereckson added a subscriber: dereckson.

We've successfully compiled Ruby 2.2

Packages depending of Ruby 2.0 has all been removed to be schudled to reinstallation when Ruby 2.2 will have been installed:

$ pkg remove ruby-2.0.0.598_2,1
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 22 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        ruby-2.0.0.598_2,1
        ruby20-gems-1.8.29
        rubygem-systemu-2.6.4
        rubygem-macaddr-1.7.1
        hub-1.12.2
        rubygem-bundler-1.7.3
        rubygem-puppet-lint-1.0.0
        gist-4.2.1
        rubygem-archive-tar-minitar-0.5.2
        rubygem-highline-1.6.21
        rubygem-commander-4.2.1
        rubygem-httpclient-2.4.0
        rubygem-open4-1.3.4
        rubygem-net-ssh-gateway-1.2.0
        rubygem-net-ssh-multi-1.2.0
        rubygem-net-scp-1.2.1
        rubygem-rhc-1.32.2
        rubygem-ruby-termios-0.9.6
        rubygem-net-ssh-2.9.1,2
        weechat-1.1.1
        vim-7.4.591
        newfile-1.0.14_6

The operation will free 117 MiB.

Deployed.

$ cd /usr/ports/lang/ruby22
$ make install
[...]
$ ln -s /usr/local/bin/ruby22 /usr/local/bin/ruby
$ rehash
$ ruby -v
ruby 2.2.2p95 (2015-04-13 revision 50295) [amd64-freebsd10]

Next step: reinstall all the previous packages and applications.

hub, gist, vim, newfile, weechat

We first reinstall the applications which need Ruby.

  • Weechat required an upgraded version of libiconv (see T355#2500).
  • Can be reinstalled without a dep to ruby21:
    • Apr 28 13:22:39 ysul pkg: hub-2.2.0 installed
  • Installed through ports:
    • Apr 28 13:24:54 ysul pkg-static: newfile-1.0.14_6 installed
    • Apr 28 13:25:46 ysul pkg-static: gist-4.2.1 installed
    • Apr 28 13:38:11 ysul pkg-static: weechat-1.1.1_1 installed (without Python support)

vim, weechat

  • Weechat reinstalled with Python 2.7 support
  • Apr 29 01:46:45 ysul pkg-static: vim-7.4.712 installed

Apr 29 01:50:09 ysul pkg-static: ruby22-gems-2.4.6 installed

rhc

To reinstall rhc deps (see T186 for context about rhc), there is an issue with documentation.

Prepare the ports with -DNOPORTDOCS=yes work.

  • Apr 29 10:35:27 ysul pkg-static: rubygem-httpclient-2.4.0 installed
  • Apr 29 10:37:11 ysul pkg-static: rubygem-net-ssh-2.9.2,2 installed
  • Apr 29 10:37:13 ysul pkg-static: rubygem-net-scp-1.2.1 installed

Another issue we have is a NoMethodError in some ruby commands wrapper, like minitar. A fix is offered here.

Or commander has been generated with #!/usr/local/bin/ruby20 as shebang. And finally, some gems decided to install into /usr/local/lib/ruby/gems/2.0/gems instead of /2.2/. I suspect those are from leftovers during T186.

$ cd /usr/ports
$ rm -rf */rubygem-*/work
  • Apr 29 10:49:57 ysul pkg-static: rubygem-highline-1.6.21 installed
  • Apr 29 10:53:21 ysul pkg-static: rubygem-open4-1.3.4 installed
  • Apr 29 10:57:35 ysul pkg-static: rubygem-commander-4.2.1 installed
  • Apr 29 10:58:07 ysul pkg-static: rubygem-net-ssh-gateway-1.2.0 installed
  • Apr 29 10:58:10 ysul pkg-static: rubygem-net-ssh-multi-1.2.0 installed

rhc wants rubygem-archive-tar-minitar and not rubygem-minitar.

  • Apr 29 11:04:06 ysul pkg-static: rubygem-archive-tar-minitar-0.5.2 installed
  • Apr 29 11:05:00 ysul pkg-static: rubygem-rhc-1.32.2 installed

We also have wild gems present on the system

Some gems are present in /usr/local/lib/ruby/gems in 2.0 folder but not managed by packages. I suspect these are required by software we're using or used on Ysul, and directly installed through gem install.

These are:

  • dydra-0.0.10
  • mime-types-2.4.3
  • netrc-0.8.0
  • rdf-1.1.6
  • rest-client-1.7.2

dydra and rdf seem clearly related to an effort to parse the Worldcat database, as they use triples and RDF.

Extra ports

Apr 29 11:13:06 ysul pkg-static: rubygem-puppet-lint-1.0.0 installed
Apr 29 11:13:59 ysul pkg-static: rubygem-bundler-1.7.14 installed

Not reinstalled as deemed not used

  • rubygem-systemu-2.6.4
  • rubygem-macaddr-1.7.1