Minitest 5 update

Vít Ondruch vondruch at redhat.com
Tue Apr 1 10:46:32 UTC 2014


Dne 21.3.2014 17:59, Vít Ondruch napsal(a):
> Dne 21.3.2014 17:18, Mamoru TASAKA napsal(a):
>> Hello, Josef:
>>
>> Josef Stribny wrote, at 03/21/2014 09:11 PM +9:00:
>>> Hi Rubyists,
>>>
>>> as you have probably noticed we would like to update Rails framework
>>> to the latest version (4.1) when it's released[1].
>>> The biggest task for us in this change is the update of Minitest to
>>> version 5. This would require test suites
>>> of many gems that depends on Minitest to be fixed.
>>>
>>> Here are the most significant changes of Minitest 5 taken from the
>>> changelog[2]:
>>>
>> <snip>
>>> So what do you think of this change? Should we address it by updating
>>> upstream test suites?
>>> Do you know about other issues that this can cause and I forgot to
>>> mention?
>>>
>> The easiest solution is to just renaming the current minitest rpm as
>> rubygem-minitest4
> This is option of course. The question for me is what is bigger hassle?
> Try to migrate as many libraries as we can to minitest5 in some
> reasonable time or proactively introduce minitest4 version?
>
> We can try to upgrade minitest to version 5 and if that proves, that it
> causes more issues then it solves, then we can do review for
> rubygem-minitest4.
>
> Also note that no matter what we will do, there will always be available
> the rubygem-minitest subpackage provided by Ruby's SRPM. So may be
> explicitly specifying the version < 5 could be enough?
>
>
>
> Vít
>

So I put togehter testing build of minitest 5.x in Copr [1] and testing
this build in mock using mock config (see attachment). With this
configuration, I had available rubygem-minitest-4.7.0-2.fc20 (the latest
minitest available in Fedora, not the one bundled in Ruby) as well as
rubygem-minitest-5.3.1-1.fc21. I was testing with
rubygem-net-http-persistent and I was able to build the gem against
minitest 4 as well as minitest 5. For build against minitest 4, I had to
use:

BuildRequires:    rubygem(minitest) < 5

For build against minitest 5, I used unversioned require, revert the
minitest 4 changes in %prep section and replace testrb by:

ruby -Ilib -e 'Dir.glob "./test/test_*.rb", &method(:require)'

So to conclude:

* I'd go with update to minitest 5 (probably tomorrow, unless you'll be
fast enough to point out some weak points ;)
* This means a lot of FTBFS packages, but to fix this, we can use BR:
rubygem(minitest) < 5 temporarily or better to fix the compatibility and
submit patch upstream. But please note that Ruby ships with minitest
4.3, which is a bit older version then the 4.7 currently available. I
hope that will not cause any additional issues.
* If something goes really wrong, we can review rubygem-minitest4, but I
hope this wont be needed.
* We should consider to update packaging guidelines to suggest something
like "ruby -Ilib -e 'Dir.glob "./test/test_*.rb", &method(:require)'"
instead of testrb. testrb does not handle nested directories anyway,
which Dir.glob handles just fine.


Thoughts?



Vít



[1] http://copr.fedoraproject.org/coprs/vondruch/rubygem-minitest/
-------------- next part --------------
config_opts['root'] = 'fedora-rawhide-minitest-x86_64'
config_opts['target_arch'] = 'x86_64'
config_opts['legal_host_arches'] = ('x86_64',)
config_opts['chroot_setup_cmd'] = 'groupinstall buildsys-build'
config_opts['dist'] = 'rawhide'  # only useful for --resultdir variable subst
config_opts['extra_chroot_dirs'] = [ '/run/lock', ]
config_opts['releasever'] = '21'

config_opts['yum.conf'] = """
[main]
cachedir=/var/cache/yum
debuglevel=1
reposdir=/dev/null
logfile=/var/log/yum.log
retries=20
obsoletes=1
gpgcheck=0
assumeyes=1
syslog_ident=mock
syslog_device=

# repos

[fedora]
name=fedora
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide&arch=x86_64
failovermethod=priority

[local]
name=local
baseurl=http://kojipkgs.fedoraproject.org/repos/rawhide/latest/x86_64/
cost=2000
enabled=1

[debug]
name=Fedora Rawhide - x86_64 - Debug
failovermethod=priority
mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=rawhide-debug&arch=x86_64
enabled=0

[vondruch-rubygem-minitest]
name=Copr repo for rubygem-minitest owned by vondruch
baseurl=http://copr-be.cloud.fedoraproject.org/results/vondruch/rubygem-minitest/fedora-rawhide-$basearch/
skip_if_unavailable=True
gpgcheck=0
enabled=1
"""


More information about the ruby-sig mailing list