diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30614532..7b1c006c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -72,10 +72,10 @@ jobs: os: - 'centos-7' - 'centos-8' - - 'debian-11' - 'debian-10' - - 'ubuntu-1804' + - 'debian-11' - 'ubuntu-2004' + - 'ubuntu-2204' suite: - 'authoritative-multi' - 'authoritative-postgres' diff --git a/files/default/powerdns.asc b/files/default/powerdns.asc index 9f59d9c9..6e348987 100644 --- a/files/default/powerdns.asc +++ b/files/default/powerdns.asc @@ -1,5 +1,4 @@ -----BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1 mQINBFV2/GwBEADD4oJuwcLkYZD6R+PM0zKdZ04owicJ9e1nTbBb8OA+92TI0cJY 8XGpjEJBRECOMJi9Gr6p3QxgZX1IQbiB/RJgRN0BYTZJ6BKobJAlSNsZBVH4wt/F @@ -13,18 +12,18 @@ yt1K0ow4M54woB/68cMy0UB6cA8uOHscRObau3T3UB0ohsEPF7KYAqOKfKP0irV+ Ys6tR0KI/TeHqrqKhCA9PGOpOmqJaibt5GqFTc3Dp4U19njMmh4eboki8EwS6DNy 4HD76dFz2jkSQ74uB/X+nxuFEVRKS54q4aeg83NL5lnsD8TWdhTui4mURQARAQAB tDxQb3dlckROUyBSZWxlYXNlIFNpZ25pbmcgS2V5IDxwb3dlcmRucy5zdXBwb3J0 -QHBvd2VyZG5zLmNvbT6JAj4EEwECACgFAlV2/GwCGwMFCQ8JnAAGCwkIBwMCBhUI -AgkKCwQWAgMBAh4BAheAAAoJEBsMYgX9OA+75QYQAJ7a3rZiTmBJkYfDYbZGOcJj -tIgWj5ieyIHjaG1kR3setK1GbYrd7dkeHuWIT8FCO/mQwrKTlxEd+Vj5a79Bpu0D -de1MRi7jTIb/Qrge532Pnk5T7qFjJWfvTWhpSV9XDwHR216aByuHZ9gAJt92hgo5 -eSXHPpwbi+qAdymndUswFBHY0kLNpIYAa2mZcSNbaI/RFNYPOM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sG9LmmUDbhHw8v4b +v3r7EmRN5AzBMhIDpNb3cDi8a83IztcfrUQlbzu4h4YU670t1+OTJ5KgwL6Mdr+1 +TMiPJg5Y2ZfTVhi82hJDBCHzaOunyjXcU+pgMEl4YBNUsnFrkvBV2S7lLCJi5aDA +scFMb1hGMVeDFvd9sZg520PekP1Tejj+KjKXdWGi5xAT8M3MlIHJKV2mVLGuirx4 +aOLHBOKR3n/8SGXuUuVIxmeF5mzdZuyfxn4lz4EXTTQ6J5fFX78= +=/3of -----END PGP PUBLIC KEY BLOCK----- diff --git a/kitchen.yml b/kitchen.yml index f77ab2f2..f14bfc66 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -41,17 +41,17 @@ platforms: - RUN /usr/bin/apt-get update - RUN /usr/bin/apt-get install dnsutils -y - - name: ubuntu-18.04 + - name: ubuntu-20.04 driver: - image: dokken/ubuntu-18.04 + image: dokken/ubuntu-20.04 pid_one_command: /bin/systemd intermediate_instructions: - RUN /usr/bin/apt-get update - RUN /usr/bin/apt-get install dnsutils -y - - name: ubuntu-20.04 + - name: ubuntu-22.04 driver: - image: dokken/ubuntu-20.04 + image: dokken/ubuntu-22.04 pid_one_command: /bin/systemd intermediate_instructions: - RUN /usr/bin/apt-get update diff --git a/metadata.rb b/metadata.rb index e7e3b5d7..512fac53 100644 --- a/metadata.rb +++ b/metadata.rb @@ -9,7 +9,7 @@ chef_version '>= 15' -supports 'ubuntu', '>= 18.04' +supports 'ubuntu', '>= 20.04' supports 'debian', '>= 9.0' supports 'centos', '>= 7.0' supports 'redhat', '>= 7.0' diff --git a/resources/authoritative_config.rb b/resources/authoritative_config.rb index 5eb1eb33..c666154e 100644 --- a/resources/authoritative_config.rb +++ b/resources/authoritative_config.rb @@ -19,7 +19,7 @@ provides :pdns_authoritative_config, platform: 'ubuntu' unified_mode true do |node| - node['platform_version'].to_f >= 18.04 + node['platform_version'].to_f >= 20.04 end provides :pdns_authoritative_config, platform: 'debian' do |node| diff --git a/resources/authoritative_install_debian.rb b/resources/authoritative_install_debian.rb index 71615697..103459d5 100644 --- a/resources/authoritative_install_debian.rb +++ b/resources/authoritative_install_debian.rb @@ -19,7 +19,7 @@ provides :pdns_authoritative_install, platform: 'ubuntu' unified_mode true do |node| - node['platform_version'].to_f >= 18.04 + node['platform_version'].to_f >= 20.04 end provides :pdns_authoritative_install, platform: 'debian' do |node| @@ -27,7 +27,7 @@ end property :version, String -property :series, String, default: '45' +property :series, String, default: '48' property :debug, [true, false], default: false property :allow_upgrade, [true, false], default: false property :backends, Array diff --git a/resources/authoritative_install_rhel.rb b/resources/authoritative_install_rhel.rb index 1d1ce800..822cb74b 100644 --- a/resources/authoritative_install_rhel.rb +++ b/resources/authoritative_install_rhel.rb @@ -23,7 +23,7 @@ end property :version, String -property :series, String, default: '45' +property :series, String, default: '48' property :debug, [true, false], default: false property :allow_upgrade, [true, false], default: false property :backends, Array diff --git a/resources/recursor_config.rb b/resources/recursor_config.rb index 2745da6a..93b0201b 100644 --- a/resources/recursor_config.rb +++ b/resources/recursor_config.rb @@ -19,7 +19,7 @@ provides :pdns_recursor_config, platform: 'ubuntu' unified_mode true do |node| - node['platform_version'].to_f >= 18.04 + node['platform_version'].to_f >= 20.04 end provides :pdns_recursor_config, platform: 'debian' do |node| diff --git a/resources/recursor_install_debian.rb b/resources/recursor_install_debian.rb index 5c705364..bab9b166 100644 --- a/resources/recursor_install_debian.rb +++ b/resources/recursor_install_debian.rb @@ -19,14 +19,14 @@ provides :pdns_recursor_install, platform: 'ubuntu' unified_mode true do |node| - node['platform_version'].to_f >= 18.04 + node['platform_version'].to_f >= 20.04 end provides :pdns_recursor_install, platform: 'debian' do |node| node['platform_version'].to_i >= 9 end -property :series, String, default: '45' +property :series, String, default: '48' property :version, String property :debug, [true, false], default: false property :allow_upgrade, [true, false], default: false diff --git a/resources/recursor_install_rhel.rb b/resources/recursor_install_rhel.rb index 67b68450..135711f1 100644 --- a/resources/recursor_install_rhel.rb +++ b/resources/recursor_install_rhel.rb @@ -23,7 +23,7 @@ end property :version, String -property :series, String, default: '45' +property :series, String, default: '48' property :debug, [true, false], default: false property :allow_upgrade, [true, false], default: false diff --git a/spec/recipes/hyphens_spec.rb b/spec/recipes/hyphens_spec.rb index d6b6f51b..1006e638 100644 --- a/spec/recipes/hyphens_spec.rb +++ b/spec/recipes/hyphens_spec.rb @@ -1,7 +1,7 @@ require 'spec_helper' describe 'pdns_test::hyphens' do - platform 'ubuntu', '18.04' + platform 'ubuntu', '20.04' context('pdns_authoritative_config') do it 'raises an exception for a hyphen in the name' do diff --git a/test/cookbooks/pdns_test/files/default/schema_postgres.sql b/test/cookbooks/pdns_test/files/default/schema_postgres.sql index a853debd..10f542c9 100644 --- a/test/cookbooks/pdns_test/files/default/schema_postgres.sql +++ b/test/cookbooks/pdns_test/files/default/schema_postgres.sql @@ -3,24 +3,26 @@ CREATE TABLE domains ( name VARCHAR(255) NOT NULL, master VARCHAR(128) DEFAULT NULL, last_check INT DEFAULT NULL, - type VARCHAR(6) NOT NULL, - notified_serial INT DEFAULT NULL, + type TEXT NOT NULL, + notified_serial BIGINT DEFAULT NULL, account VARCHAR(40) DEFAULT NULL, + options TEXT DEFAULT NULL, + catalog TEXT DEFAULT NULL, CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) ); CREATE UNIQUE INDEX name_index ON domains(name); +CREATE INDEX catalog_idx ON domains(catalog); CREATE TABLE records ( - id SERIAL PRIMARY KEY, + id BIGSERIAL PRIMARY KEY, domain_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, type VARCHAR(10) DEFAULT NULL, content VARCHAR(65535) DEFAULT NULL, ttl INT DEFAULT NULL, prio INT DEFAULT NULL, - change_date INT DEFAULT NULL, disabled BOOL DEFAULT 'f', ordername VARCHAR(255), auth BOOL DEFAULT 't', @@ -78,6 +80,7 @@ CREATE TABLE cryptokeys ( domain_id INT REFERENCES domains(id) ON DELETE CASCADE, flags INT NOT NULL, active BOOL, + published BOOL DEFAULT TRUE, content TEXT ); @@ -92,4 +95,4 @@ CREATE TABLE tsigkeys ( CONSTRAINT c_lowercase_name CHECK (((name)::TEXT = LOWER((name)::TEXT))) ); -CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); \ No newline at end of file +CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm); diff --git a/test/cookbooks/pdns_test/recipes/authoritative_install_single_postgres.rb b/test/cookbooks/pdns_test/recipes/authoritative_install_single_postgres.rb index 2b983ef3..877aceed 100644 --- a/test/cookbooks/pdns_test/recipes/authoritative_install_single_postgres.rb +++ b/test/cookbooks/pdns_test/recipes/authoritative_install_single_postgres.rb @@ -1,13 +1,17 @@ apt_update 'RIGHT_MEOW' -execute 'disble postgresql dnf module' do +execute 'disable postgresql dnf module' do command 'dnf -qy module disable postgresql' only_if { platform_family?('rhel') && node['platform_version'].to_i == 8 } end -postgresql_server_install 'default' do - version '13' - action [:install, :create] +postgresql_install 'postgresql' do + version 15 + action %i(install init_server) +end + +postgresql_service 'postgresql' do + action %i(enable start) end execute 'setup_postgres_user' do @@ -41,12 +45,7 @@ include_recipe 'pdns_test::disable_systemd_resolved' pdns_authoritative_install 'default' do - series '44' - backends [pg_backend_package] -end - -pdns_authoritative_install 'default_upgrade' do - series '45' + series '48' backends [pg_backend_package] allow_upgrade true end diff --git a/test/cookbooks/pdns_test/recipes/disable_systemd_resolved.rb b/test/cookbooks/pdns_test/recipes/disable_systemd_resolved.rb index b3b92f65..c5f04290 100644 --- a/test/cookbooks/pdns_test/recipes/disable_systemd_resolved.rb +++ b/test/cookbooks/pdns_test/recipes/disable_systemd_resolved.rb @@ -1,7 +1,7 @@ # On ubuntu >=18.04 systemd-resolved needs to be disabled and stopped as it port conflicts service 'systemd-resolved' do action [:stop, :disable] - only_if { node['platform'].include?('ubuntu') && node['platform_version'].to_f >= 18.04 } + only_if { node['platform'].include?('ubuntu') && node['platform_version'].to_f >= 20.04 } end # Since we remove resolved we need to make our own resolv.conf @@ -11,5 +11,5 @@ nameserver 2620:fe::9 EOF force_unlink true - only_if { node['platform'].include?('ubuntu') && node['platform_version'].to_f >= 18.04 } + only_if { node['platform'].include?('ubuntu') && node['platform_version'].to_f >= 20.04 } end diff --git a/test/integration/authoritative-multi/default_spec.rb b/test/integration/authoritative-multi/default_spec.rb index b37e75da..cb277567 100644 --- a/test/integration/authoritative-multi/default_spec.rb +++ b/test/integration/authoritative-multi/default_spec.rb @@ -26,18 +26,10 @@ it { should exist } end -describe processes(Regexp.new(/pdns_server\s(?!--config-name=server_02)/)) do - its('users') { should eq ['pdns'] } -end - -describe processes(Regexp.new(/pdns_server\s(?=--config-name=server_02)/)) do - its('users') { should eq ['pdns'] } -end - describe command('dig -p 53 chaos txt version.bind @127.0.0.1 +short') do - its('stdout.chomp') { should match(/"PowerDNS Authoritative Server 4\.5\.\d/) } + its('stdout.chomp') { should match(/"PowerDNS Authoritative Server 4\.8\.\d/) } end describe command('dig -p 54 chaos txt version.bind @127.0.0.1 +short') do - its('stdout.chomp') { should match(/"PowerDNS Authoritative Server 4\.5\.\d/) } + its('stdout.chomp') { should match(/"PowerDNS Authoritative Server 4\.8\.\d/) } end diff --git a/test/integration/authoritative-postgres/default_spec.rb b/test/integration/authoritative-postgres/default_spec.rb index e1d6327c..d73fc158 100644 --- a/test/integration/authoritative-postgres/default_spec.rb +++ b/test/integration/authoritative-postgres/default_spec.rb @@ -26,7 +26,7 @@ end describe command('dig chaos txt version.bind @127.0.0.1 +short') do - its('stdout.chomp') { should match(/"PowerDNS Authoritative Server 4\.5.\d/) } + its('stdout.chomp') { should match(/"PowerDNS Authoritative Server 4\.8.\d/) } end describe command('dig @127.0.0.1 smoke.example.org') do diff --git a/test/integration/recursor-multi/default_spec.rb b/test/integration/recursor-multi/default_spec.rb index f4c3743c..36af7366 100644 --- a/test/integration/recursor-multi/default_spec.rb +++ b/test/integration/recursor-multi/default_spec.rb @@ -26,20 +26,12 @@ it { should exist } end -describe processes(Regexp.new(/pdns_recursor\s(?!--config)/)) do - its('users') { should match [Regexp.new(/pdns(-recursor)?/)] } -end - -describe processes(Regexp.new(/pdns_recursor --config-name=server_02/)) do - its('users') { should match [Regexp.new(/pdns/)] } -end - describe command('dig -p 53 chaos txt version.bind @127.0.0.1 +short') do - its('stdout.chomp') { should match(Regexp.new(/"PowerDNS Recursor 4\.5\.\d/)) } + its('stdout.chomp') { should match(Regexp.new(/"PowerDNS Recursor 4\.8\.\d/)) } end describe command('dig -p 54 chaos txt version.bind @127.0.0.1 +short') do - its('stdout.chomp') { should match(Regexp.new(/"PowerDNS Recursor 4\.5\.\d/)) } + its('stdout.chomp') { should match(Regexp.new(/"PowerDNS Recursor 4\.8\.\d/)) } end describe command('dig -p 53 @127.0.0.1 dnsimple.com') do