Bug#984603: puppet-master-passenger crashes when ruby-scanf is not installed

2022-06-02 Thread Kienan Stewart
Package: puppet
Version: 5.5.22-2
Followup-For: Bug #984603
X-Debbugs-Cc: kie...@koumbit.org

Dear Maintainer,

this issue also affects the puppet package. For example, it can be reproduced 
using the
following command:

$ puppet apply -e '"42".scanf("%i") |$x| { notify {"x": message => $x,} }'
Error: Could not run: cannot load such file -- scanf

Installing ruby-scanf solves the issue.

$ apt install ruby-scanf
...
$ puppet apply -e '"42".scanf("%i") |$x| { notify {"x": message => $x,} }'  

  
Notice: Compiled catalog for pc-bullseye.test in environment production in 0.02 
seconds 
   
Notice: 42
Notice: /Stage[main]/Main/Notify[x]/message: defined 'message' as 42
Notice: Applied catalog in 0.01 seconds

Considering that scanf is a core puppet DSL function, I would like to propose 
that ruby-scanf
be added as a dependency of the puppet package.

The issue persists in 5.5.22-4 (unstable, at the time of this writing). I 
expect but have not
confirmed that the version in experimental does not have this issue.

This issue is similar to the upstream issue: 
https://tickets.puppetlabs.com/browse/PUP-10797

thanks,
kienan


-- System Information:
Debian Release: 11.3
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-14-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_CA.UTF-8), LANGUAGE=en_CA.UTF-8
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages puppet depends on:
ii  adduser  3.118
ii  facter   3.14.12-1+b2
ii  hiera3.2.0-2.1
ii  init-system-helpers  1.60
ii  lsb-base 11.1.0
ii  ruby 1:2.7+2
ii  ruby-augeas  1:0.5.0-3+b8
ii  ruby-deep-merge  1.1.1-1
ii  ruby-shadow  2.5.0-1+b4

Versions of packages puppet recommends:
ii  debconf-utils  1.5.77
ii  lsb-release11.1.0
ii  ruby-selinux   3.1-3

Versions of packages puppet suggests:
pn  ruby-hocon  
pn  ruby-rrd

-- Configuration Files:
/etc/puppet/auth.conf changed [not included]
/etc/puppet/puppet.conf changed [not included]

-- no debconf information



Bug#984603: puppet-master-passenger crashes when ruby-scanf is not installed

2021-03-05 Thread Frederik
Package: puppet-master-passenger
Version: 5.5.22-1
Severity: normal

Dear Maintainer,

I upgraded my system running puppet-master-passenger from Buster to
bullseye. From that moment on, puppet-master-passenger crashed when a
client tries to retriveve its configuration. The follow stacktrace could
be found in the Apache error.log:

App 25308 stderr: [ 2021-03-05 18:58:49.5455 28292/0x56253d9b7cc0(Worker 1) 
utils.rb:87 ]: *** Exception LoadError (cannot load such file -- scanf) 
(process 28292, thread 0x56253d9b7cc0(Worker 1)):
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb:85:in `require'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/functions/scanf.rb:29:in `block in get_binding'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/functions.rb:250:in `class_eval'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/functions.rb:250:in `create_loaded_function'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/functions.rb:191:in `create_function'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/functions/scanf.rb:28:in `get_binding'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/ruby_function_instantiator.rb:22:in
 `eval'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/ruby_function_instantiator.rb:22:in
 `create'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/module_loaders.rb:263:in 
`instantiate'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/module_loaders.rb:237:in `find'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:161:in 
`internal_load'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:42:in `load_typed'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:153:in 
`internal_load'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:42:in `load_typed'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:153:in 
`internal_load'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:42:in `load_typed'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:153:in 
`internal_load'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:42:in `load_typed'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:153:in 
`internal_load'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/base_loader.rb:42:in `load_typed'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/loader/loader.rb:72:in `load'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/runtime3_support.rb:302:in 
`call_function'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:964:in 
`call_function_with_block'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:959:in 
`eval_CallMethodExpression'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:90:in `visit_this_1'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in 
`evaluate'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:370:in 
`eval_AssignmentExpression'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:90:in `visit_this_1'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in 
`evaluate'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:660:in `block 
in eval_BlockExpression'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:660:in `each'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:660:in 
`reduce'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:660:in 
`eval_BlockExpression'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/visitor.rb:90:in `visit_this_1'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:81:in 
`evaluate'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:177:in `block 
in evaluate_block_with_bindings'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/parser/scope.rb:983:in `with_guarded_scope'
App 25308 stderr:   from 
/usr/lib/ruby/vendor_ruby/puppet/pops/evaluator/evaluator_impl.rb:173:in 
`evaluate_block_with_bindings'
App 25308 stderr: