debian: Update puppletabs-postgresql to 8.0.0

Update puppetlabs-postgresql to 8.0.0, since it fully supports
Debian bullseye, and the version we were using doesn't support it
fully.

This does not affect Centos builds at all.

Test Plan
PASS Build packages
PASS Test ISO install

Story: 2009101
Task: 43326

Depends-On: https://review.opendev.org/c/starlingx/utilities/+/840497

Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I195003be09af86d3430fe901057ec4bf559c51ed
This commit is contained in:
Charles Short 2022-03-31 14:05:03 -04:00
parent be4767afb5
commit 919c8f200a
24 changed files with 362 additions and 102 deletions

View File

@ -1,11 +0,0 @@
---
debname: puppet-module-puppetlabs-postgresql
debver: 6.7.0-2
dl_path:
name: puppet-module-puppetlabs-postgresql-6.7.0-2.tar.gz
url: https://salsa.debian.org/puppet-team/puppet-module-puppetlabs-postgresql/-/archive/debian/6.7.0-2/puppet-module-puppetlabs-postgresql-debian-6.7.0-2.tar.gz
md5sum: 4ea08eb9aeb3d80b4ef0d41f4219557e
sha256sum: 035cd27d6754112da9b3f55364d75cb5aa7dc014deb61dd5e40e67f4e1f48fa5
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: true

View File

@ -1,63 +0,0 @@
From f4baa299dbd842494e40f46ce7b29d20aaf6acab Mon Sep 17 00:00:00 2001
From: Dan Voiculeasa <dan.voiculeasa@windriver.com>
Date: Wed, 15 Sep 2021 16:27:35 +0300
Subject: [PATCH] Adapt first set of legacy patches
Adapt 0001-Roll-up-TIS-patches.patch from CentOS.
Signed-off-by: Dan Voiculeasa <dan.voiculeasa@windriver.com>
---
manifests/server/config.pp | 9 +++++++++
manifests/server/initdb.pp | 9 +++++++++
2 files changed, 18 insertions(+)
diff --git a/manifests/server/config.pp b/manifests/server/config.pp
index 93bc9b9..cc4bffd 100644
--- a/manifests/server/config.pp
+++ b/manifests/server/config.pp
@@ -149,6 +149,15 @@ class postgresql::server::config {
postgresql::server::config_entry { 'data_directory':
value => $datadir,
}
+
+ postgresql::server::config_entry { 'hba_file':
+ value => $pg_hba_conf_path,
+ }
+
+ postgresql::server::config_entry { 'ident_file':
+ value => $pg_ident_conf_path,
+ }
+
if $timezone {
postgresql::server::config_entry { 'timezone':
value => $timezone,
diff --git a/manifests/server/initdb.pp b/manifests/server/initdb.pp
index a73186d..8f90f6f 100644
--- a/manifests/server/initdb.pp
+++ b/manifests/server/initdb.pp
@@ -5,6 +5,7 @@ class postgresql::server::initdb {
$datadir = $postgresql::server::datadir
$xlogdir = $postgresql::server::xlogdir
$logdir = $postgresql::server::logdir
+ $confdir = $postgresql::server::confdir
$manage_datadir = $postgresql::server::manage_datadir
$manage_logdir = $postgresql::server::manage_logdir
$manage_xlogdir = $postgresql::server::manage_xlogdir
@@ -56,6 +57,14 @@ class postgresql::server::initdb {
}
}
+ # Make sure the conf directory exists, and has the correct permissions.
+ file { $confdir:
+ ensure => directory,
+ owner => $user,
+ group => $group,
+ mode => '0700',
+ }
+
if($xlogdir) {
if($manage_xlogdir) {
# Make sure the xlog directory exists, and has the correct permissions.
--
2.30.0

View File

@ -1,25 +0,0 @@
From 9700ac64bd0fb9a41693348882e0ccf3f4085953 Mon Sep 17 00:00:00 2001
From: Charles Short <charles.short@windriver.com>
Date: Thu, 27 Jan 2022 19:53:54 +0000
Subject: [PATCH] fix bullseye version detection
Signed-off-by: Charles Short <charles.short@windriver.com>
---
manifests/globals.pp | 1 +
1 file changed, 1 insertion(+)
diff --git a/manifests/globals.pp b/manifests/globals.pp
index 9914a23..ebb7432 100644
--- a/manifests/globals.pp
+++ b/manifests/globals.pp
@@ -182,6 +182,7 @@ class postgresql::globals (
/^(jessie|8\.)/ => '9.4',
/^(stretch|9\.)/ => '9.6',
/^(buster|10\.)/ => '11',
+ /^(bullseye|11\.)/ => '13',
default => undef,
},
'Ubuntu' => $::operatingsystemrelease ? {
--
2.32.0

View File

@ -1,2 +0,0 @@
0001-Adapt-first-set-of-legacy-patches.patch
0002-fix-bullseye-version-detection.patch

View File

@ -0,0 +1,8 @@
This package contains a module for use by puppet. It is
automatically added to the module load path of puppet's default
environment, and should be ready for use.
You can use "update-alternatives --config puppet-module-postgresql"
to configure which module should appear in the module path of the
default puppet environment, in case multiple modules which provide
the same name are installed.

View File

@ -0,0 +1,137 @@
puppet-module-puppetlabs-postgresql (8.0.0-1) unstable; urgency=medium
* New upstream release.
-- Chuck Short <charles.short@windriver.com> Tue, 29 Mar 2022 14:14:25 -0400
puppet-module-puppetlabs-postgresql (6.7.0-2) unstable; urgency=medium
* Uploading to unstable.
-- Thomas Goirand <zigo@debian.org> Mon, 19 Oct 2020 10:38:55 +0200
puppet-module-puppetlabs-postgresql (6.7.0-1) experimental; urgency=medium
* Team upload.
* Add missing files in debian/puppet-module-puppetlabs-postgresql.install.
* Ran wrap-and-sort -bastk.
* Switch to debhelper-compat.
* Add fixed-ruby-interpreter-path.patch.
-- Thomas Goirand <zigo@debian.org> Sun, 27 Sep 2020 22:24:01 +0200
puppet-module-puppetlabs-postgresql (5.4.0-1) unstable; urgency=medium
* New upstream version 5.4.0
* d/control:
+ Bump to Standards-Version 4.1.4 (no changes needed)
+ Relax debhelper version
-- Sebastien Badia <sbadia@debian.org> Sun, 29 Apr 2018 16:12:34 +0200
puppet-module-puppetlabs-postgresql (5.3.0-1) unstable; urgency=medium
[ Thomas Bechtold ]
* Remove myself from Uploaders (Closes: #892677)
[ Sebastien Badia ]
* New upstream version 5.3.0 (Closes: #866042)
* d/upstream: Added Upstream metadata
* d/compat: Fix compat version to 11
* d/control:
+ Bump to Standards-Version 4.1.3 (no changes needed)
+ Use salsa.debian.org in Vcs-* fields
+ Added Rules-Requires-Root option
+ Added myself as Uploader
* d/copyright: Fix copyright globing
* d/docs: Add missing NOTICE file (for Apache2 license)
* d/watch: Bump to version 4 and use HTTPS for URI
-- Sebastien Badia <sbadia@debian.org> Fri, 23 Mar 2018 09:16:01 +0100
puppet-module-puppetlabs-postgresql (4.8.0-1) unstable; urgency=medium
* Imported upstream release 4.8.0
* debian/copyright: Use https URL
* Use debhelper 10
-- Stig Sandbeck Mathisen <ssm@debian.org> Sat, 19 Nov 2016 10:47:47 +0100
puppet-module-puppetlabs-postgresql (4.7.1-2) unstable; urgency=medium
* Update dependencies for puppet 4
-- Stig Sandbeck Mathisen <ssm@debian.org> Tue, 24 May 2016 09:57:26 +0200
puppet-module-puppetlabs-postgresql (4.7.1-1) unstable; urgency=medium
* Imported upstream relase 4.7.1
* Remove unnecessary version from dependency
* Declare compliance with Debian policy 3.9.8
* Update VCS-* URLs
* Add myself to Uploaders list
-- Stig Sandbeck Mathisen <ssm@debian.org> Tue, 17 May 2016 11:56:31 +0200
puppet-module-puppetlabs-postgresql (4.6.1-1) unstable; urgency=medium
* Team upload.
* Imported upstream release 4.6.1
* [edfce6a] Add lintian override for module content
-- Stig Sandbeck Mathisen <ssm@debian.org> Mon, 21 Dec 2015 09:05:00 +0100
puppet-module-puppetlabs-postgresql (4.6.0-1) unstable; urgency=medium
* Team upload.
* Imported upstream release 4.6.0-1
* [9529e9b] Drop backporeted upstream changes
* [8a79ed5] Add DEP-8 test suite
-- Stig Sandbeck Mathisen <ssm@debian.org> Fri, 02 Oct 2015 22:08:49 +0200
puppet-module-puppetlabs-postgresql (4.0.0-2) unstable; urgency=medium
* [221918d] Import upstream commit 9bb1c5e to select correct postgresql
version on jessie. Thanks to Andrew Starr-Bochicchio (Closes: #777607)
-- Stig Sandbeck Mathisen <ssm@debian.org> Sat, 21 Feb 2015 21:47:40 +0100
puppet-module-puppetlabs-postgresql (4.0.0-1) unstable; urgency=medium
* Imported upstream relase 4.0.0
* Declare compliance with Debian policy 3.9.6
* Update debian/control metadata with cme (Vcs-*)
* Update dependencies
* Update file lists
-- Stig Sandbeck Mathisen <ssm@debian.org> Fri, 24 Oct 2014 22:46:48 +0200
puppet-module-puppetlabs-postgresql (3.3.3-1) unstable; urgency=medium
* New upstream release.
-- Thomas Bechtold <toabctl@debian.org> Fri, 07 Mar 2014 21:36:59 +0100
puppet-module-puppetlabs-postgresql (3.2.0-2) unstable; urgency=medium
* debian/watch: use redirector from qa.debian.org.
-- Thomas Bechtold <toabctl@debian.org> Wed, 22 Jan 2014 07:56:22 +0100
puppet-module-puppetlabs-postgresql (3.2.0-1) unstable; urgency=medium
* New upstream release.
* debian/control:
- Use Debian address in Uploaders field.
- Bump Standards-Version to 3.9.5. No further changes.
* debian/copyright: Update copyright holders according to NOTICE file.
-- Thomas Bechtold <toabctl@debian.org> Sat, 04 Jan 2014 18:07:01 +0100
puppet-module-puppetlabs-postgresql (2.5.0-1) unstable; urgency=low
[ Thomas Bechtold ]
* Initial release (Closes: #724011)
-- Stig Sandbeck Mathisen <ssm@debian.org> Mon, 14 Oct 2013 10:58:30 +0200

View File

@ -0,0 +1,34 @@
Source: puppet-module-puppetlabs-postgresql
Maintainer: Puppet Package Maintainers <pkg-puppet-devel@lists.alioth.debian.org>
Uploaders:
Stig Sandbeck Mathisen <ssm@debian.org>,
Sebastien Badia <sbadia@debian.org>,
Section: admin
Priority: optional
Build-Depends:
debhelper-compat (= 11),
Rules-Requires-Root: no
Standards-Version: 4.1.4
Vcs-Browser: https://salsa.debian.org/puppet-team/puppet-module-puppetlabs-postgresql
Vcs-Git: https://salsa.debian.org/puppet-team/puppet-module-puppetlabs-postgresql.git
Homepage: https://forge.puppet.com/puppetlabs/postgresql
Package: puppet-module-puppetlabs-postgresql
Architecture: all
Depends:
puppet (>= 4) | puppet-common (>= 3),
puppet-module-puppetlabs-apt,
puppet-module-puppetlabs-concat,
puppet-module-puppetlabs-stdlib,
${misc:Depends},
Suggests:
postgresql-client-common,
Description: Puppet module for PostgreSQL database
Puppet lets you centrally manage every important aspect of your system
using a cross-platform specification language that manages all the
separate elements normally aggregated in different files, like users,
cron jobs, and hosts, along with obviously discrete elements like
packages, services, and files.
.
The PostgreSQL module allows you to easily manage postgres databases
with Puppet.

View File

@ -0,0 +1,29 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: puppetlabs-postgresql
Source: https://forge.puppetlabs.com/puppetlabs/postgresql
Files: *
Copyright: 2012 Inkling Systems, Inc.,
2012-2013 Puppetlabs Inc.
2012-2013 Camptocamp SA.
License: Apache-2.0
Files: debian/*
Copyright: 2013 Thomas Bechtold <thomasbechtold@jpberlin.de>
License: Apache-2.0
License: Apache-2.0
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
http://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian systems, the complete text of the Apache License 2.0 can
be found in "/usr/share/common-licenses/Apache-2.0"

View File

@ -0,0 +1,26 @@
From 156c61ec9ca335a09e8964f92f23b65e4e98c9a4 Mon Sep 17 00:00:00 2001
From: Charles Short <charles.short@windriver.com>
Date: Thu, 31 Mar 2022 07:47:34 -0400
Subject: [PATCH] use python3-psycopg2
Signed-off-by: Charles Short <charles.short@windriver.com>
---
manifests/params.pp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/manifests/params.pp b/manifests/params.pp
index 0303d02..a72e299 100644
--- a/manifests/params.pp
+++ b/manifests/params.pp
@@ -177,7 +177,7 @@ class postgresql::params inherits postgresql::globals {
$perl_package_name = pick($perl_package_name, 'libdbd-pg-perl')
$plperl_package_name = pick($plperl_package_name, "postgresql-plperl-${version}")
$plpython_package_name = pick($plpython_package_name, "postgresql-plpython-${version}")
- $python_package_name = pick($python_package_name, 'python-psycopg2')
+ $python_package_name = pick($python_package_name, 'python3-psycopg2')
$bindir = pick($bindir, "/usr/lib/postgresql/${version}/bin")
$datadir = pick($datadir, "/var/lib/postgresql/${version}/main")
--
2.25.1

View File

@ -0,0 +1 @@
0001-use-python3-psycopg2.patch

View File

@ -0,0 +1,7 @@
files usr/share/puppet/modules.available/puppetlabs-postgresql
functions usr/share/puppet/modules.available/puppetlabs-postgresql
lib usr/share/puppet/modules.available/puppetlabs-postgresql
manifests usr/share/puppet/modules.available/puppetlabs-postgresql
metadata.json usr/share/puppet/modules.available/puppetlabs-postgresql
tasks usr/share/puppet/modules.available/puppetlabs-postgresql
templates usr/share/puppet/modules.available/puppetlabs-postgresql

View File

@ -0,0 +1,4 @@
# This is content to be distributed, and not a script to be run directly. It
# is OK for it to be non-executable.
puppet-module-puppetlabs-postgresql binary: script-not-executable usr/share/puppet/modules.available/puppetlabs-postgresql/files/validate_postgresql_connection.sh

View File

@ -0,0 +1,38 @@
#!/bin/sh
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <postinst> `configure' <most-recently-configured-version>
# * <old-postinst> `abort-upgrade' <new version>
# * <conflictor's-postinst> `abort-remove' `in-favour' <package>
# <new-version>
# * <postinst> `abort-remove'
# * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
# <failed-install-package> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
configure)
update-alternatives --install /usr/share/puppet/modules/postgresql puppet-module-postgresql /usr/share/puppet/modules.available/puppetlabs-postgresql 500
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
*)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,38 @@
#!/bin/sh
#
# see: dh_installdeb(1)
set -e
# summary of how this script can be called:
# * <prerm> `remove'
# * <old-prerm> `upgrade' <new-version>
# * <new-prerm> `failed-upgrade' <old-version>
# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
# * <deconfigured's-prerm> `deconfigure' `in-favour'
# <package-being-installed> <version> `removing'
# <conflicting-package> <version>
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
case "$1" in
remove|upgrade|deconfigure)
update-alternatives --remove puppet-module-postgresql /usr/share/puppet/modules.available/puppetlabs-postgresql
;;
failed-upgrade)
;;
*)
echo "prerm called with unknown argument \`$1'" >&2
exit 1
;;
esac
# dh_installdeb will replace this with shell code automatically
# generated by other debhelper scripts.
#DEBHELPER#
exit 0

View File

@ -0,0 +1,4 @@
#!/usr/bin/make -f
%:
dh $@

View File

@ -0,0 +1,4 @@
Tests: run
Depends:
@,
Restrictions: needs-root,isolation-container,allow-stderr

View File

@ -0,0 +1,6 @@
#!/bin/sh
SCRIPT=$(readlink -f "$0")
SCRIPTPATH=$(dirname "$SCRIPT")
puppet apply "${SCRIPTPATH}/test.pp"

View File

@ -0,0 +1,5 @@
class { 'postgresql::globals':
version => '9.5',
}
->
class { 'postgresql::server': }

View File

@ -0,0 +1,4 @@
---
Name: puppetlabs-postgresql
Repository: https://github.com/puppetlabs/puppetlabs-postgresql.git
Repository-Browse: https://github.com/puppetlabs/puppetlabs-postgresql

View File

@ -0,0 +1,2 @@
version=4
https://qa.debian.org/cgi-bin/fakeupstream.cgi?upstream=forge.puppetlabs/puppetlabs/postgresql .*/puppetlabs-postgresql-(.+)\.tar\.gz

View File

@ -0,0 +1,11 @@
---
debname: puppet-module-puppetlabs-postgresql
debver: 8.0.0-1
dl_path:
name: puppet-module-puppetlabs-postgresql-8.0.0.tar.gz
url: https://github.com/puppetlabs/puppetlabs-postgresql/archive/refs/tags/v8.0.0.tar.gz
md5sum: 0a8e1961b31d26c83fe1f13a0238cea3
sha256sum: e0abbc0e39d12abff49d0f72e7765c3114276c5b2a430692fdc049d268789fd9
revision:
dist: $STX_DIST
PKG_GITREVCOUNT: True

View File

@ -25,7 +25,7 @@ config/puppet-modules/puppet-drbd-0.5.2
config/puppet-modules/puppet-etcd-1.12.3
config/puppet-modules/puppetlabs-firewall-1.12.0
config/puppet-modules/puppetlabs-haproxy-2.1.0
config/puppet-modules/puppetlabs-postgresql-6.7.0
config/puppet-modules/puppetlabs-postgresql-8.0.0
config/puppet-modules/puppetlabs-stdlib-5.0.0
config/puppet-modules/puppet-ldap
config/puppet-modules/puppet-lvm-1.4.0