From 15a50e2f5bcd37c81a3066448a50f9fa1795a997 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 13 Aug 2024 22:10:55 -0700 Subject: [PATCH] Bump minitar 1.0.1 for puppet 8 Minitar 1.x is not backwards compatible with 0.9, so only make this change in agent-runtime-main for now. Projects that depend on minitar and puppet will need to be made compatible with minitar 1.x before bumping their puppet dependency in puppet-runtime. And when they do bump puppet, they should bump minitar too. I added a reminder for the latter part. This applies to: bolt-runtime pe-bolt-server-runtime-main pe-installer-runtime-main pdk-runtime depends on minitar, but not puppet. When a new version of puppet is released that depends on minitar 1.x, then modules created using an older version of the pdk, will pull in the latest puppet, but have an incompatible minitar version. --- configs/components/rubygem-minitar.rb | 15 ++++++++++++--- configs/projects/agent-runtime-main.rb | 1 + configs/projects/bolt-runtime.rb | 5 +++++ configs/projects/pe-bolt-server-runtime-main.rb | 6 ++++++ configs/projects/pe-installer-runtime-main.rb | 6 ++++++ 5 files changed, 30 insertions(+), 3 deletions(-) diff --git a/configs/components/rubygem-minitar.rb b/configs/components/rubygem-minitar.rb index a0d98419f..d5946dd63 100644 --- a/configs/components/rubygem-minitar.rb +++ b/configs/components/rubygem-minitar.rb @@ -1,6 +1,15 @@ component 'rubygem-minitar' do |pkg, settings, platform| - pkg.version '0.9' - pkg.md5sum '4ab2c278183c9a83f3ad97066c381d84' + version = settings[:rubygem_minitar_version] || '0.9' + pkg.version version + + case version + when '1.0.1' + pkg.sha256sum 'ba258663f25a3e89ca55bfa2680ce35866d5d2d2998c14d2d2342650f5499705' + when '0.9' + pkg.md5sum '4ab2c278183c9a83f3ad97066c381d84' + else + raise "rubygem-minitar version #{version} has not been configured; Cannot continue." + end instance_eval File.read('configs/components/_base-rubygem.rb') -end \ No newline at end of file +end diff --git a/configs/projects/agent-runtime-main.rb b/configs/projects/agent-runtime-main.rb index 1d062e8f9..9e7dc07f2 100644 --- a/configs/projects/agent-runtime-main.rb +++ b/configs/projects/agent-runtime-main.rb @@ -5,6 +5,7 @@ proj.setting :rubygem_deep_merge_version, '1.2.2' proj.setting :rubygem_highline_version, '3.0.1' proj.setting :rubygem_hocon_version, '1.4.0' + proj.setting :rubygem_minitar_version, '1.0.1' proj.setting :rubygem_net_ssh_version, '7.2.3' # Solaris and AIX depend on libedit which breaks augeas compliation starting with 1.13.0 diff --git a/configs/projects/bolt-runtime.rb b/configs/projects/bolt-runtime.rb index 2be7f6fad..80c652fed 100644 --- a/configs/projects/bolt-runtime.rb +++ b/configs/projects/bolt-runtime.rb @@ -7,7 +7,12 @@ proj.setting(:augeas_version, '1.14.1') # TODO: Can runtime projects use these updated versions? proj.setting(:rubygem_deep_merge_version, '1.2.2') + # bolt-runtime must be made compatible with minitar 1.x before + # bumping to a version of puppet 8 that requires minitar 1.x proj.setting(:rubygem_puppet_version, '7.32.1') + # if you update puppet version to a version that requires minitar 1.x, + # then update minitar too + # proj.settings(:rubygem_minitar_version, '1.0.1') platform = proj.get_platform diff --git a/configs/projects/pe-bolt-server-runtime-main.rb b/configs/projects/pe-bolt-server-runtime-main.rb index 813144a5d..e50b7289a 100644 --- a/configs/projects/pe-bolt-server-runtime-main.rb +++ b/configs/projects/pe-bolt-server-runtime-main.rb @@ -1,6 +1,12 @@ project 'pe-bolt-server-runtime-main' do |proj| proj.setting(:pe_version, 'main') + # pe-bolt-server must be made compatible with minitar 1.x before + # bumping to a version of puppet 8 that requires minitar 1.x proj.setting(:rubygem_puppet_version, '8.8.1') + # if you update puppet version to a version that requires minitar 1.x, + # then update minitar too + # proj.settings(:rubygem_minitar_version, '1.0.1') + # We build bolt server with the ruby installed in the puppet-agent dep. For ruby 2.7 we need to use a --no-document flag # for gem installs instead of --no-ri --no-rdoc. This setting allows us to use this while we support both ruby 2.5 and 2.7 # Once we are no longer using ruby 2.5 we can update. diff --git a/configs/projects/pe-installer-runtime-main.rb b/configs/projects/pe-installer-runtime-main.rb index f96fcdee1..918b780a5 100644 --- a/configs/projects/pe-installer-runtime-main.rb +++ b/configs/projects/pe-installer-runtime-main.rb @@ -8,6 +8,12 @@ # rubygem-net-ssh included in shared-agent-components proj.setting(:rubygem_net_ssh_version, '7.2.3') + # verify pe-installer-runtime components are compatible with minitar 1.x before + # bumping to a version of puppet 8 that requires minitar 1.x proj.setting(:rubygem_puppet_version, '8.8.1') + # if you update puppet version to a version that requires minitar 1.x, + # then update minitar too + # proj.settings(:rubygem_minitar_version, '1.0.1') + instance_eval File.read(File.join(File.dirname(__FILE__), '_shared-pe-installer-runtime.rb')) end