From 79c7c0ac6285a4bdbedaa208672d279b76d9d482 Mon Sep 17 00:00:00 2001 From: Kenyon Ralph Date: Thu, 11 Sep 2025 23:58:54 -0700 Subject: [PATCH 1/3] Allow puppetlabs/apt 11.x --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index a991913a27..e5f8cd35a3 100644 --- a/metadata.json +++ b/metadata.json @@ -14,7 +14,7 @@ }, { "name": "puppetlabs/apt", - "version_requirement": ">= 9.2.0 < 11.0.0" + "version_requirement": ">= 9.2.0 < 12.0.0" }, { "name": "puppet/systemd", From 9189e813aaeebc8b8ddcd654255dd1b0e5e80791 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 30 Sep 2025 11:16:16 +0200 Subject: [PATCH 2/3] puppet/systemd: Allow 9.x --- metadata.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metadata.json b/metadata.json index e5f8cd35a3..552a48b38b 100644 --- a/metadata.json +++ b/metadata.json @@ -18,7 +18,7 @@ }, { "name": "puppet/systemd", - "version_requirement": ">= 4.0.1 < 9.0.0" + "version_requirement": ">= 4.0.1 < 10.0.0" }, { "name": "puppetlabs/concat", From 45d8a9d4a17c13890070e305c9a2fa08468aa24f Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Tue, 30 Sep 2025 11:57:59 +0200 Subject: [PATCH 3/3] Debian 11: Use correct package name for python bindings Since Debian 11 was added to this module, the package name was wrong. It was set to python-psycopg2, but the correct name is python3-psycopg2. There's a longer analysis about this bug in https://github.com/puppetlabs/puppetlabs-postgresql/pull/1638/files#r2390588710 tl;dr: * Debian 10 used python-psycopg2 and that was set by the module * Debian 11 was added without proper acceptance testing * Later on unit tests were added for Debian 11, but still with the wrong package name * 651c2b4ec0a3d9a76770369625b0a91bcba444ff fixed the package name, but in the wrong place and didn't adjust the tests * That resulted in a broken pipeline, that's how I found all of this This patch: * Cleans up the hiera data * sets the package name at the correct location * adjusts the debian 11 unit test for the new package name * Adds tests for Debian 12 and 13 (won't be executed right now because Perforce ships a too old version of FacterDB) Edit: Had to remove Debian 13 because the pipeline fails if it cannot find a factset. --- data/os/Debian/11.yaml | 4 ---- manifests/params.pp | 4 ++-- spec/classes/lib/python_spec.rb | 13 ++++++++++++- spec/spec_helper_local.rb | 4 ++++ 4 files changed, 18 insertions(+), 7 deletions(-) delete mode 100644 data/os/Debian/11.yaml diff --git a/data/os/Debian/11.yaml b/data/os/Debian/11.yaml deleted file mode 100644 index 227e596eb2..0000000000 --- a/data/os/Debian/11.yaml +++ /dev/null @@ -1,4 +0,0 @@ ---- -# Defaults for Debian Bullseye (11) - -postgresql::globals::python_package_name: 'python3-psycopg2' diff --git a/manifests/params.pp b/manifests/params.pp index 8441aa829c..55dcd24c0f 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -161,9 +161,9 @@ $plpython_package_name = pick($plpython_package_name, "postgresql-plpython-${version}") $_ubuntu_2204 = ($facts['os']['name'] == 'Ubuntu' and versioncmp($facts['os']['release']['full'], '22.04') >= 0) - $_debian_12 = ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['full'], '12') >= 0) + $_debian_11 = ($facts['os']['name'] == 'Debian' and versioncmp($facts['os']['release']['full'], '11') >= 0) - if $_ubuntu_2204 or $_debian_12 { + if $_ubuntu_2204 or $_debian_11 { $python_package_name = pick($python_package_name, 'python3-psycopg2') } else { $python_package_name = pick($python_package_name, 'python-psycopg2') diff --git a/spec/classes/lib/python_spec.rb b/spec/classes/lib/python_spec.rb index 86093bc7e0..64e426ca39 100644 --- a/spec/classes/lib/python_spec.rb +++ b/spec/classes/lib/python_spec.rb @@ -30,7 +30,18 @@ it { expect(subject).to contain_package('python-psycopg2').with( - name: 'python-psycopg2', + name: 'python3-psycopg2', + ensure: 'present', + ) + } + end + + describe 'on debian 12' do + include_examples 'Debian 12' + + it { + expect(subject).to contain_package('python-psycopg2').with( + name: 'python3-psycopg2', ensure: 'present', ) } diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb index c9603be72a..930b943217 100644 --- a/spec/spec_helper_local.rb +++ b/spec/spec_helper_local.rb @@ -184,6 +184,10 @@ def param(type, title, param) let(:facts) { on_supported_os['debian-11-x86_64'] } end +shared_context 'Debian 12' do + let(:facts) { on_supported_os['debian-12-x86_64'] } +end + shared_context 'Ubuntu 18.04' do let(:facts) { on_supported_os['ubuntu-18.04-x86_64'] } end