[Pkg-puppet-devel] Bug#973248: Bug#973248: Deprecation warning in Ruby 2.7: $SAFE will become a normal global variable in Ruby 3.0

Thomas Goirand zigo at debian.org
Mon Mar 8 19:46:54 GMT 2021


On 3/8/21 8:50 AM, intrigeri wrote:
> Control: tag -1 + patch
> Control: severity -1 important
> 
> Hi,
> 
> Miquel van Smoorenburg (2020-10-27):
>> I get this warning on a puppet run:
>>
>> /usr/lib/ruby/vendor_ruby/puppet/file_system/uniquefile.rb:126: warning: 
>> $SAFE will become a normal global variable in Ruby 3.0
> 
> Confirmed here.
> 
> I'm bumping the severity to "important" because with typical Puppet
> deployments, this bug will yield tons of noise in whatever monitoring
> system is used, which makes it pretty much unusable as-is.
> 
>> So I tried another minimal approach. This fixes it for me, and it should 
>> also fix those other deprecation warnings from #955532, so that patch 
>> can be dropped if you want.
> 
> The way #955532 was fixed (by backporting an upstream commit) seems
> cleaner to me so personally, I'd rather see the big-hammer approach
> proposed here used as little as possible.
> 
> Below, I'll share the version of the patch that I'm now using.
> It only tackles the problem this bug is about,
> and I believe the code style is a bit more canonical Ruby
> (guard clause instead of "if" + unspecified else).
> 
> Dear maintainers, I would like this bug to be fixed in Bullseye, to
> avoid having to maintain a local workaround on the Tails infra for the
> next 2-5 years. If it may help, I could negotiate a freeze exception
> with the release team, and if they agree, upload a NMU.
> 
> What do you think?

Hi,

The patch is super small and looks clean. I also am very annoyed by this
problem and would like it to be fixed. I'm not sure I can be the voice
of all of the team, but I would say: please go ahead with NMU + dealing
with the release team. Can someone else approve? Apollon maybe?

Cheers,

Thomas Goirand (zigo)

> --- /a/puppet 2020-10-25 17:04:24.000000000 +0000
> +++ /b/puppet     2021-03-08 07:39:16.294675668 +0000
> @@ -1,5 +1,12 @@
>  #!/usr/bin/ruby
> 
> +
> +def Warning.warn(w)
> +  return if w =~ /warning: \$SAFE will become a normal global variable/
> +
> +  super w
> +end
> +
>  begin
>    require 'puppet/util/command_line'
>    Puppet::Util::CommandLine.new.execute
> 
> _______________________________________________
> Pkg-puppet-devel mailing list
> Pkg-puppet-devel at alioth-lists.debian.net
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-puppet-devel
> 



More information about the Pkg-puppet-devel mailing list