-
Notifications
You must be signed in to change notification settings - Fork 284
Support for upstream postgresql.org zypp repo #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,9 +91,43 @@ RedHat: | |
{% endif %} | ||
|
||
Suse: | ||
pkg_repo: | ||
name: pgdg-sles-{{ release }} | ||
humanname: PostgreSQL {{ repo.version }} $releasever - $basearch | ||
#Using sles-12 upstream repo for opensuse | ||
baseurl: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-12-$basearch' | ||
key_url: 'https://download.postgresql.org/pub/repos/zypp/{{ repo.version }}/suse/sles-12-$basearch/repodata/repomd.xml.key' | ||
gpgcheck: 1 | ||
gpgautoimport: True | ||
|
||
{% if repo.use_upstream_repo %} | ||
{# Pillars needed are 'use_upstream_repo: True' and 'version: n.n'. #} | ||
{# Avoid setting package names as pillars, as may corrupt postgres. #} | ||
{% set lib_dir = '/var/lib/pgsql/' ~ repo.version ~ '/data' %} | ||
|
||
pkg: postgresql{{ release }}-server | ||
pkg_client: postgresql{{ release }} | ||
conf_dir: {{ lib_dir }} | ||
service: postgresql-{{ repo.version }} | ||
|
||
#This is postgresql-libs in defaults.yml but upstream is libpqxx | ||
pkg_libpq_dev: libpqxx | ||
pkg_dev: postgresql{{ release }}-devel | ||
pkg_libs: postgresql{{ release }}-libs | ||
|
||
prepare_cluster: | ||
#Full path needed as initdb is NOT 'cross version compatible' binary | ||
command: /usr/pgsql-{{ repo.version }}/bin/initdb --pgdata='{{ lib_dir }}' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is generally OK. But I would recommend you to consider providing There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Also #190 captures problem regarding package names in pillar data. |
||
test: test -f '{{ lib_dir }}/PG_VERSION' | ||
|
||
{% else %} | ||
|
||
pkg: postgresql-server | ||
pkg_client: postgresql | ||
pkg_libpq_dev: postgresql | ||
pkg_libpq_dev: libqpxx | ||
pkg_libs: postgresql-libs | ||
|
||
{% endif %} | ||
|
||
MacOS: | ||
service: postgresql | ||
|
@@ -109,5 +143,4 @@ MacOS: | |
user: _postgres | ||
group: _postgres | ||
|
||
|
||
# vim: ft=sls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add
bellow, and importing GPG key from the upstream will start to magically work. No need for additional
cmd.run
state in theupstream.sls
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks - done - let me know when your PR comments are done and I'll do some retesting on Suse to make sure there is no regression.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool!