From e0735d84e68f21b23f6a04fdd8e8fc88b3e09a33 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 4 Aug 2026 20:49:01 +0200 Subject: [PATCH] split puppet-ca-bundle into two components This allows us to use one bundle for openvox8/openbolt and another one for openvox9. This makes it easier to roll out CA changes. This follows the 8.x/main pattern that we already use for projects/agent-runtime-8.x & projects/agent-runtime-main. Signed-off-by: Tim Meusel --- configs/components/curl.rb | 2 +- ...-bundle.json => puppet-ca-bundle-8.x.json} | 0 ...t-ca-bundle.rb => puppet-ca-bundle-8.x.rb} | 4 ++-- configs/components/puppet-ca-bundle-main.json | 4 ++++ configs/components/puppet-ca-bundle-main.rb | 21 +++++++++++++++++++ configs/projects/agent-runtime-8.x.rb | 2 +- configs/projects/agent-runtime-main.rb | 2 +- configs/projects/openbolt-runtime.rb | 2 +- 8 files changed, 31 insertions(+), 6 deletions(-) rename configs/components/{puppet-ca-bundle.json => puppet-ca-bundle-8.x.json} (100%) rename configs/components/{puppet-ca-bundle.rb => puppet-ca-bundle-8.x.rb} (76%) create mode 100644 configs/components/puppet-ca-bundle-main.json create mode 100644 configs/components/puppet-ca-bundle-main.rb diff --git a/configs/components/curl.rb b/configs/components/curl.rb index a35aff93..cfb12d15 100644 --- a/configs/components/curl.rb +++ b/configs/components/curl.rb @@ -6,7 +6,7 @@ pkg.mirror "#{settings[:buildsources_url]}/curl-#{pkg.get_version}.tar.gz" pkg.build_requires "openssl-#{settings[:openssl_version]}" - pkg.build_requires 'puppet-ca-bundle' + pkg.build_requires 'puppet-ca-bundle-8.x' ldflags = settings[:ldflags] if platform.is_windows? diff --git a/configs/components/puppet-ca-bundle.json b/configs/components/puppet-ca-bundle-8.x.json similarity index 100% rename from configs/components/puppet-ca-bundle.json rename to configs/components/puppet-ca-bundle-8.x.json diff --git a/configs/components/puppet-ca-bundle.rb b/configs/components/puppet-ca-bundle-8.x.rb similarity index 76% rename from configs/components/puppet-ca-bundle.rb rename to configs/components/puppet-ca-bundle-8.x.rb index 6bb87fdd..05fbd332 100644 --- a/configs/components/puppet-ca-bundle.rb +++ b/configs/components/puppet-ca-bundle-8.x.rb @@ -1,5 +1,5 @@ -component 'puppet-ca-bundle' do |pkg, settings, platform| - pkg.load_from_json('configs/components/puppet-ca-bundle.json') +component 'puppet-ca-bundle-8.x' do |pkg, settings, platform| + pkg.load_from_json('configs/components/puppet-ca-bundle-8.x.json') pkg.build_requires "openssl-#{settings[:openssl_version]}" diff --git a/configs/components/puppet-ca-bundle-main.json b/configs/components/puppet-ca-bundle-main.json new file mode 100644 index 00000000..7a325ce4 --- /dev/null +++ b/configs/components/puppet-ca-bundle-main.json @@ -0,0 +1,4 @@ +{ + "url": "https://github.com/openvoxproject/puppet-ca-bundle.git", + "ref": "refs/tags/1.1.0" +} diff --git a/configs/components/puppet-ca-bundle-main.rb b/configs/components/puppet-ca-bundle-main.rb new file mode 100644 index 00000000..90eb9a5f --- /dev/null +++ b/configs/components/puppet-ca-bundle-main.rb @@ -0,0 +1,21 @@ +component 'puppet-ca-bundle-main' do |pkg, settings, platform| + pkg.load_from_json('configs/components/puppet-ca-bundle-main.json') + + pkg.build_requires "openssl-#{settings[:openssl_version]}" + + openssl_cmd = "#{settings[:bindir]}/openssl" + + target = if platform.is_fips? + 'install-fips' + else + 'install' + end + + install_commands = [ + "#{platform[:make]} #{target} OPENSSL=#{openssl_cmd} USER=0 GROUP=0 DESTDIR=#{File.join(settings[:prefix], 'ssl')}" + ] + + pkg.install do + install_commands + end +end diff --git a/configs/projects/agent-runtime-8.x.rb b/configs/projects/agent-runtime-8.x.rb index 21018bc7..edbaf2bd 100644 --- a/configs/projects/agent-runtime-8.x.rb +++ b/configs/projects/agent-runtime-8.x.rb @@ -37,7 +37,7 @@ proj.component "openssl-#{proj.openssl_version}" proj.component 'curl' - proj.component 'puppet-ca-bundle' + proj.component 'puppet-ca-bundle-8.x' proj.component "ruby-#{proj.ruby_version}" proj.component 'rubygem-base64' diff --git a/configs/projects/agent-runtime-main.rb b/configs/projects/agent-runtime-main.rb index ec2f622a..5d9ab3dd 100644 --- a/configs/projects/agent-runtime-main.rb +++ b/configs/projects/agent-runtime-main.rb @@ -36,7 +36,7 @@ proj.component 'libyaml' proj.component "openssl-#{proj.openssl_version}" - proj.component 'puppet-ca-bundle' + proj.component 'puppet-ca-bundle-main' proj.component "ruby-#{proj.ruby_version}" proj.component 'rubygem-concurrent-ruby' diff --git a/configs/projects/openbolt-runtime.rb b/configs/projects/openbolt-runtime.rb index 353c06b9..2b8ea99e 100644 --- a/configs/projects/openbolt-runtime.rb +++ b/configs/projects/openbolt-runtime.rb @@ -119,7 +119,7 @@ # Ruby and deps proj.component "openssl-#{proj.openssl_version}" proj.component 'runtime-openbolt' - proj.component 'puppet-ca-bundle' + proj.component 'puppet-ca-bundle-8.x' proj.component "ruby-#{proj.ruby_version}" proj.component 'rubygem-bcrypt_pbkdf'