Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require issue reintroduced in 4.0.0 #11

Closed
neomilium opened this issue Jan 7, 2025 · 8 comments
Closed

Require issue reintroduced in 4.0.0 #11

neomilium opened this issue Jan 7, 2025 · 8 comments
Assignees
Labels
bug fixed-please-verify The issue (hopefully) has been fixed, but verification is requested from the reporter.

Comments

@neomilium
Copy link

Exactly the same issue than #2 have been reintroduced in 4.0.0 as described by @arkirchner .

@neomilium
Copy link
Author

To fix it, follow instructions provided by @rmg in #2 (comment)

@ChrLau
Copy link

ChrLau commented Jan 8, 2025

Hi, thanks for the ticket! Turns out we ran into the same problem. We just added the read permissions for others.

root@host:~ # chmod o+r /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems/colored2-4.0.0/lib/colored2.rb
root@host:~ # chmod o+r /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems/colored2-4.0.0/lib/colored2/*.rb

EDIT: To be more precise and help others to potentially find this issue more easily I added the error message we got from our pipeline.
Turns out: r10k 5.0.0 requires colored2 in version 4.0.0 or greater. Hence a downgrade to the previos version 3.1.2 is not possible.

This is the error message we got when we removed the colored2 gem in version 4.0.0 and installed version 3.1.2 to use with Puppet 8:

remote: Performing a syntax check on the r10k Puppetfile:        
remote: /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1466:in `rescue in block in activate_dependencies': Could not find 'colored2' (~> 4.0) among 119 total gem(s) (Gem::MissingSpecError)        
remote: Checked in 'GEM_PATH=/var/opt/gitlab/.local/share/gem/ruby/3.2.0:/opt/puppetlabs/puppet/lib/ruby/gems/3.2.0:/opt/puppetlabs/puppet/lib/ruby/vendor_gems' at: /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/specifications/r10k-5.0.0.gemspec, execute `gem env` for more information        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1463:in `block in activate_dependencies'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1452:in `each'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1452:in `activate_dependencies'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1434:in `activate'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems.rb:285:in `block in activate_bin_path'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems.rb:284:in `synchronize'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems.rb:284:in `activate_bin_path'        
remote:            from /opt/puppetlabs/puppet/bin/r10k:25:in `<main>'        
remote: /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/dependency.rb:317:in `to_specs': Could not find 'colored2' (~> 4.0) - did find: [colored2-3.1.2] (Gem::MissingSpecVersionError)        
remote: Checked in 'GEM_PATH=/var/opt/gitlab/.local/share/gem/ruby/3.2.0:/opt/puppetlabs/puppet/lib/ruby/gems/3.2.0:/opt/puppetlabs/puppet/lib/ruby/vendor_gems' , execute `gem env` for more information        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1464:in `block in activate_dependencies'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1452:in `each'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1452:in `activate_dependencies'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems/specification.rb:1434:in `activate'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems.rb:285:in `block in activate_bin_path'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems.rb:284:in `synchronize'        
remote:            from /opt/puppetlabs/puppet/lib/ruby/3.2.0/rubygems.rb:284:in `activate_bin_path'        
remote:            from /opt/puppetlabs/puppet/bin/r10k:25:in `<main>'        
remote: Error: 1 subhooks failed. Declining push.        
To host.domain.tld:puppet/mainrepo.git
! [remote rejected] update_puppetfile -> update_puppetfile (pre-receive hook declined)
error: failed to push some refs to 'host.domain.tld:puppet/mainrepo.git'

@kigster
Copy link
Owner

kigster commented Jan 18, 2025

Please let me know if 4.0.2 fixes this problem.

@kigster
Copy link
Owner

kigster commented Jan 18, 2025

#12

@kigster kigster added the fixed-please-verify The issue (hopefully) has been fixed, but verification is requested from the reporter. label Jan 18, 2025
@ChrLau
Copy link

ChrLau commented Jan 19, 2025

Hi, thanks for letting me know! I will be on site towards mid of the week. Then I can verify it.

So far I extracted the data.tar.gz from the colored2 4.0.3 gemfile and that looked good regarding the file rights.
Therefore I expect the issue to be fixed.

But real confirmation has to wait until Wednesday/Thursday.
If you've heard nothing of me by Friday feel free to ping me. 😄

@neomilium
Copy link
Author

Version 4.0.3 fixes the issue:

romuald@dvs00002 ~ 07:18:51 $ ls -lah /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems/colored2-4.0.3/lib/colored2.rb 
-rw-r--r-- 1 root root 2,5K 21 janv. 07:18 /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems/colored2-4.0.3/lib/colored2.rb
romuald@dvs00002 ~ 07:19:36 $ ls -lah /opt/puppetlabs/puppet/lib/ruby/gems/3.2.0/gems/colored2-4.0.3/lib/colored2/
total 32K
drwxr-xr-x 2 root root 4,0K 21 janv. 07:18 .
drwxr-xr-x 3 root root 4,0K 21 janv. 07:18 ..
-rw-r--r-- 1 root root 2,2K 21 janv. 07:18 ascii_decorator.rb
-rw-r--r-- 1 root root 1,1K 21 janv. 07:18 codes.rb
-rw-r--r-- 1 root root  336 21 janv. 07:18 numbers.rb
-rw-r--r-- 1 root root  138 21 janv. 07:18 object.rb
-rw-r--r-- 1 root root  138 21 janv. 07:18 strings.rb
-rw-r--r-- 1 root root   71 21 janv. 07:18 version.rb

@kigster Many thanks for this quick fix!

@kigster
Copy link
Owner

kigster commented Jan 23, 2025

Anytime. Thanks for the verification.

The update to the Rakefile should fix that issue for good.

@ChrLau
Copy link

ChrLau commented Jan 24, 2025

Hi, was able to test it today. Can confirm the issue is fixed.
Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fixed-please-verify The issue (hopefully) has been fixed, but verification is requested from the reporter.
Projects
None yet
Development

No branches or pull requests

3 participants