Hi everybody,
Since Ruby 2.2 is going to be released during Christmas and -preview1
release is imminent (this Wednesday?), it is probably time to start
looking into its packaging. So here is the updated .spec file [1] and
scratch build [2], which can be finally build on all platforms. Sorry,
no Copr for you, since Ruby's build fails there due to old RHEL kernel :/.
What has changed from packaging point of view? Luckily, not much, but
here are a few bullets which comes to my mind:
* RPM 4.12 introduces new %load function, which is used to load RPM
macros during RPM build. This allowed to drop my custom RPM macro [3].
On the other hand, you'll be able to build the Ruby only on F21+
(luckily, you should be able to build SRPM everywhere).
* The RubyGems filesystem was not explicit enough, so there might be
something accidentally packages. This is now more explicit, so we should
be safer.
* Ruby now ships with MiniTest and Test::Unit. The very good news is
that they are installed so far as a regular gems. This means that you
have to always specify them in your Gemfile, if you are using Bundler,
but this is generally step in good direction. I hope that upstream will
not change their mind :) Due to this change, we have new subpackages
rubygem-test-unit (and rubygem-power_assert, which is now Test::Unit's
dependency). No more %{_bindir}/testrb (but nobody is using it these
days anyway, right? ;)
* Some prevailing test failures were resolved, some others introduced,
but hopefully they'll get resolved prior stable release.
Generally, I'd say that not much has changed since 2.1, which is good news.
Please test the packaging if you can and let me know about any issues
you encountered.
Also, if you have any other suggestions about Ruby packaging in general,
what we could improve etc, this is probably good time to share. It seems
that OpenSUSE guys are improving their packaging, so you might want to
get some inspiration there [4, 5, 6] ;)
Vít
[1] http://pkgs.fedoraproject.org/cgit/ruby.git/log/?h=private-ruby-2.2
[2] http://koji.fedoraproject.org/koji/taskinfo?taskID=7578843
[3]
http://pkgs.fedoraproject.org/cgit/ruby.git/commit/?h=private-ruby-2.2&id=8…
[4] https://build.opensuse.org/package/show/home:darix:ruby/ruby-common
[5] https://build.opensuse.org/package/show/home:darix:ruby/ruby2.2
[6] https://github.com/openSUSE/gem2rpm/commits/master
Hi all,
Ruby 2.4 was released during Christmas and the upcoming Ruby 2.5
development is advancing, so I continue in the tradition and I got
r58319 packaged for testing. The updated .spec file is available in
dist-git private-ruby-2.5 branch and here is the scratch build:
https://koji.fedoraproject.org/koji/taskinfo?taskID=18952639
One thing I'd like to point out that upstream is working on gemification
of StdLib. The question ATM is what the result will be. Hence, there is
one big TODO in the .spec file [1]. The question if each of the gems
should be unbundled or not. The future will tell hopefully.
Vít
[1]
http://pkgs.fedoraproject.org/cgit/rpms/ruby.git/tree/ruby.spec?h=private-r…
Hi everybody,
RPM 4.14 has enhanced dependency generators, which allows to use "with"
operator [1]. This comes handy, if you want to restrict the dependency
to range of versions. E.g. if the gem you package depends on "foo ~>
1.0", this expands to range "foo >= 1.0" and "foo < 2".
Previously, the generator would generate this dependencies:
~~~
Requires: foo >= 1.0
Requires: foo < 2
~~~
Unfortunately, this does not really provide expected results. This in
reality allows RPM to install any version of foo (and as far as I
remember, we had this issue with rubygem-minitest in Ruby on Rails). But
since RPM 4.14, this can be expressed as:
~~~
Requires: (foo >= 1.0 with foo < 2)
~~~
This require properly limits the versions.
To benefit from this, I prepared update of the dependency generator,
which should use the "with" operator and represent the gem dependencies
more precisely.
Another thing which was not handled really well were conflict
dependencies. E.g. your gem might depend on "foo [~> 1.0, != 1.2.1]",
where version 1.2.1 is problematic for some reasons.
Up to now, this was expanded into something like "foo < 1.2.1" and "foo
> 1.2.2", but again, this does not represent the conflict properly.
Therefore I'm going to introduce conflict generator, which will
autogenerate "Conflicts: foo = 1.2.1".
You can check the changes here:
https://src.fedoraproject.org/fork/vondruch/rpms/ruby/commits/generators-up…
I would also appreciate, if you can test the generators. The scratch
build is available here:
https://koji.fedoraproject.org/koji/taskinfo?taskID=24643785
Thx for your testing and feedback.
Vít
PS: There are also some other chnages, as the GMP library enabled and
dropped the ldconfig scriptlets (therefore the package is not compatible
with F27).
[1] http://rpm.org/user_doc/boolean_dependencies.html
Hi all,
It seems that since Ruby 2.1, Ruby can use GMP [1] to make some math
operation faster. Should we enable it? Any experience?
Vít
[1] https://gmplib.org/