FS#65106 - [puppet5] Fails with ruby2.7

Attached to Project: Community Packages
Opened by Tim (bastelfreak) - Friday, 10 January 2020, 14:21 GMT
Last edited by Christian Rebischke (Shibumi) - Friday, 10 January 2020, 20:12 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Christian Rebischke (Shibumi)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

the puppet5 package is broken:

# puppet --version
/usr/lib/ruby/vendor_ruby/2.7.0/puppet/util.rb:461: warning: URI.escape is obsolete
cannot load such file -- sync

Additional info:

# pacman -Qi puppet
Name : puppet5
Version : 5.5.17-4
Description : Server automation framework and application
Architecture : any
URL : https://puppet.com/products/open-source-projects
Licenses : Apache
Groups : None
Provides : puppet
Depends On : facter hiera ruby-multi_json ruby-augeas
Optional Deps : ruby-shadow: user password management [installed]
Required By : mcollective
Optional For : facter
Conflicts With : puppet
Replaces : None
Installed Size : 6.30 MiB
Packager : Felix Yan <felixonmars@archlinux.org>
Build Date : Thu 26 Dec 2019 12:45:11 AM UTC
Install Date : Fri 10 Jan 2020 02:10:02 PM UTC
Install Reason : Installed as a dependency for another package
Install Script : Yes
Validated By : Signature

Steps to reproduce:

pacman -Syu puppet5; puppet --version
This task depends upon

Closed by  Christian Rebischke (Shibumi)
Friday, 10 January 2020, 20:12 GMT
Reason for closing:  Fixed
Additional comments about closing:  puppet5-5.5.17-6

I won't supress warnings. Please write a wrapper as follows:

#!/bin/bash

ruby -W0 /usr/bin/puppet "$@"
Comment by Quien Sabe (que) - Friday, 10 January 2020, 16:41 GMT
Both puppet and puppet5 can be made operable by manually installing the sync gem which is no longer a part of ruby as of 2.7. The command "sudo gem install --no-user-install sync" worked for me.

The following libraries are no longer bundled gems. Install corresponding gems to use these features.
CMath (cmath gem)
Scanf (scanf gem)
Shell (shell gem)
Synchronizer (sync gem)
ThreadsWait (thwait gem)
E2MM (e2mmap gem)

Once the sync gem is available, both puppet and puppet5 will run, but the versions in them are not yet 2.7 ready so there are literally screens and screens and more screens of ruby deprecation warnings.

As I use a wrapper script to invoke puppet on several different distros, I was able to eliminate the warnings by modifying my wrapper as follows on may arch systems.

if file "$(readlink -f "$PUPPET")" | grep -qi 'ruby script'
then
if sudo test -f /root/flags/nowarn.puppet
then
# suppress deprecation warnings for ruby v2.7 touch /root/flags/nowarn.puppet
PUPPET="ruby -W0 $PUPPET"
fi
fi

Loading...