| minitar is a soft dependency (controlled through puppet's feature system, eg Puppet.features.minitar?). As a result, there's no guarantee that minitar is installed or which version is installed. We only package minitar in puppet-agent on systems without a sane tar command, like windows, etc. But if you're on redhat for example, and you install the older minitar version, then puppet will try to use it. For example if you install pe-r10k:
# rpm -qlp packages/el-6-x86_64/pe-r10k-2.6.6.0.4.g7094eb2-1.el6.x86_64.rpm | grep -e 'minitar.*gem' |
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/cache/minitar-0.6.1.gem |
/opt/puppetlabs/puppet/lib/ruby/gems/2.4.0/specifications/minitar-0.6.1.gemspec
|
So puppet needs to be more defensive about only using minitar if it's at least 0.9, or detect when it's using an older version and omitting the fsync => false option. The former is possible using Gem::Specification.find_by_name('minitar').version >= Gem::Version.new("0.9"). The latter could be done by checking the arity of the unpack method. |