Bug 404104 - tarme with ruby 2.5 issue
Summary: tarme with ruby 2.5 issue
Status: RESOLVED NOT A BUG
Alias: None
Product: releaseme
Classification: Developer tools
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Sitter
URL:
Keywords:
Depends on:
Blocks: 373932
  Show dependency treegraph
 
Reported: 2019-02-08 16:53 UTC by Ralf Habacker
Modified: 2019-05-21 22:03 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
releaseme log file (6.05 KB, text/plain)
2019-05-08 15:53 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2019-02-08 16:53:21 UTC
SUMMARY
I get a problem running tarme.rb on openSUSE Leap 15.0

STEPS TO REPRODUCE
1. install ruby on the mentioned distribution (will install ruby 2.5)
2. checkout releasme git repo
3. run ./tarme.rb --origin stable --version 7.0.2 alkimia

OBSERVED RESULT
Logging colors are not available. Install logger-colors gem if desired
INFO -- ReleaseMe::Release: Getting CI states.
INFO -- ReleaseMe::Release: Getting source (git - git@git.kde.org:alkimia [7.0])
Traceback (most recent call last):
        7: from ./tarme.rb:85:in `<main>'
        6: from ./tarme.rb:85:in `collect'
        5: from ./tarme.rb:93:in `block in <main>'
        4: from /home/ralf/src/releaseme/lib/releaseme/release.rb:88:in `get'
        3: from /home/ralf/src/releaseme/lib/releaseme/source.rb:39:in `get'
        2: from /home/ralf/src/releaseme/lib/releaseme/source.rb:47:in `rescue in get'
        1: from /home/ralf/src/releaseme/lib/releaseme/git.rb:52:in `get'
/home/ralf/src/releaseme/lib/releaseme/git.rb:52:in `chdir': No such file or directory @ dir_chdir - alkimia-7.0.2 (Errno::ENOENT)


EXPECTED RESULT
The tar ball shoul be created

SOFTWARE/OS VERSIONS
Linux openSUSE Leap 15.0

ADDITIONAL INFORMATION
running ruby with debug options 

 ruby -d ./tarme.rb --origin stable --version 7.0.2 alkimia

returns

Exception `LoadError' at /usr/lib64/ruby/2.5.0/rubygems.rb:1388 - cannot load such file -- rubygems/defaults/operating_system
Exception `LoadError' at /usr/lib64/ruby/2.5.0/rubygems.rb:1397 - cannot load such file -- rubygems/defaults/ruby
Exception `Gem::MissingSpecError' at /usr/lib64/ruby/2.5.0/rubygems/dependency.rb:310 - Gem::MissingSpecError
Exception `LoadError' at /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59 - cannot load such file -- logger/colors
Exception `LoadError' at /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:137 - cannot load such file -- logger/colors
Logging colors are not available. Install logger-colors gem if desired
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /home/ralf/bin/svn
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /usr/local/bin/svn
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /home/ralf/bin/git
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /usr/local/bin/git
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /home/ralf/bin/tar
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /usr/local/bin/tar
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /home/ralf/bin/xz
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /usr/local/bin/xz
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /home/ralf/bin/msgfmt
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /usr/local/bin/msgfmt
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /home/ralf/bin/gpg2
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/requirement_checker.rb:85 - No such file or directory @ rb_file_s_stat - /usr/local/bin/gpg2
Using Ext extension for JSON.
Exception `LoadError' at /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59 - cannot load such file -- 2.5/psych.so
Exception `LoadError' at /usr/lib64/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:137 - cannot load such file -- 2.5/psych.so
Exception `NameError' at /usr/lib64/ruby/2.5.0/psych/class_loader.rb:68 - uninitialized constant BigDecimal
Exception `NameError' at /usr/lib64/ruby/2.5.0/psych/class_loader.rb:68 - uninitialized constant DateTime
Exception `NameError' at /usr/lib64/ruby/2.5.0/psych/class_loader.rb:68 - uninitialized constant Date
Exception `OpenURI::HTTPError' at /usr/lib64/ruby/2.5.0/open-uri.rb:377 - 404 Not Found
INFO -- ReleaseMe::Release: Getting CI states.
INFO -- ReleaseMe::Release: Getting source (git - git@git.kde.org:alkimia [7.0])
Exception `Errno::ENOENT' at /usr/lib64/ruby/2.5.0/fileutils.rb:1229 - No such file or directory @ rb_file_s_lstat - alkimia-7.0.2
Exception `Errno::ENOENT' at /usr/lib64/ruby/2.5.0/fileutils.rb:1229 - No such file or directory @ rb_file_s_lstat - alkimia-7.0.2
Exception `Errno::ENOENT' at /usr/lib64/ruby/2.5.0/fileutils.rb:1343 - No such file or directory @ apply2files - alkimia-7.0.2
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/git.rb:52 - No such file or directory @ dir_chdir - alkimia-7.0.2
Exception `Errno::ENOENT' at /home/ralf/src/releaseme/lib/releaseme/git.rb:52 - No such file or directory @ dir_chdir - alkimia-7.0.2
Traceback (most recent call last):
        7: from ./tarme.rb:85:in `<main>'
        6: from ./tarme.rb:85:in `collect'
        5: from ./tarme.rb:93:in `block in <main>'
        4: from /home/ralf/src/releaseme/lib/releaseme/release.rb:88:in `get'
        3: from /home/ralf/src/releaseme/lib/releaseme/source.rb:39:in `get'
        2: from /home/ralf/src/releaseme/lib/releaseme/source.rb:47:in `rescue in get'
        1: from /home/ralf/src/releaseme/lib/releaseme/git.rb:52:in `get'
/home/ralf/src/releaseme/lib/releaseme/git.rb:52:in `chdir': No such file or directory @ dir_chdir - alkimia-7.0.2 (Errno::ENOENT)
Comment 1 Harald Sitter 2019-05-08 12:13:15 UTC
Can't reproduce. I just installed Leap 15, installed git and ruby, and it works fine.

what's the output with `export RELEASEME_DEBUG=5`
Comment 2 Harald Sitter 2019-05-08 12:26:58 UTC
Git commit ebf62e9ed303a7f65cd062cd67ebfdbea7acc80f by Harald Sitter.
Committed on 08/05/2019 at 12:26.
Pushed by sitter into branch 'master'.

fail more obviously when clones go wrong

previously we'd eat the output and then stumble over the directory not
existing. since that makes it hard to figure out the clone has failed
instead raise the output as error

might be the underlying problem of

M  +5    -2    lib/releaseme/git.rb
M  +10   -0    test/git_test.rb

https://commits.kde.org/releaseme/ebf62e9ed303a7f65cd062cd67ebfdbea7acc80f
Comment 3 Ralf Habacker 2019-05-08 15:53:27 UTC
Created attachment 119917 [details]
releaseme log file

https://bugs.kde.org/show_bug.cgi?id=404104#add_comment(In reply to Harald Sitter from comment #1)
> what's the output with `export RELEASEME_DEBUG=5`
see appended file
Comment 4 Ralf Habacker 2019-05-08 16:00:05 UTC
I initial recognized the issue with releaseme version from Oct 11 2018 and updating to git master gives some more informations about the issue, which persists.

From the log I would say that releaseme tries to clone the repo with an ssh url (git@git.kde.org...) instead of using the anonymous url (git://anongit.kde.org).
This fails if the related users ssh key is not present.
Comment 5 Ralf Habacker 2019-05-08 16:03:18 UTC
(In reply to Ralf Habacker from comment #4)
> From the log I would say that releaseme tries to clone the repo with an ssh
> url (git@git.kde.org...) instead of using the anonymous url
> (git://anongit.kde.org).
> This fails if the related users ssh key is not present.

Loading an ssh private key with ssh-agent does not solve the issue as assumed by me - releaseme ignores ssh-agent completly.
Comment 6 Harald Sitter 2019-05-09 09:24:53 UTC
> From the log I would say that releaseme tries to clone the repo with an ssh url (git@git.kde.org...) instead of using the anonymous url (git://anongit.kde.org).
This fails if the related users ssh key is not present.

This is expected. I do not quite recall why it uses writable urls but I know that it was a specific choice. In any event to actually tag a release you need write access, so it needs setting up one way or another.

As for your issue with actually getting the key found. Releaseme doesn't do anything special there. It calls the git binary, whatever works with git when you manually invoke it also works when it is run trough releaseme.
I am not entirely certain what you are trying to do but if it is signing artifacts on a host that isn't localhost we had a long inspection of that issue here https://markmail.org/message/jfzwohq25nxl7gzw it may be of some help.