saltstack-formulas / postgres-formula

http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
77 stars 283 forks source link

feat(debian): add bullseye support #319

Closed SamJoan closed 3 years ago

SamJoan commented 3 years ago

PR progress checklist (to be filled in by reviewers)


What type of PR is this?

Primary type

Secondary type

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

N/A. No one has documented an attempt to run this formula on debian bullseye (testing) at this stage.

Describe the changes you're proposing

Hi there. Currently, installation on debian bullseye results in a broken APT configuration if use_upstream_repo is set to True. The string "postgresql-repo" string is entered into the /etc/apt/sources.list.d/pgdg.list file. This results in apt being unusable in the target system, which ideally should not happen.

My changes resolve this issue by adding support for debian bullseye (testing)

Pillar / config required to test the proposed changes

postgres:
  use_upstream_repo: True
  fromrepo: bullseye-pgdg
  version: '13'

Debug log showing how the proposed changes work

root@saltmain:/srv/formulas# salt 'unicornbottle-main' state.apply postgres.upstream
unicornbottle-main:
  Name: postgresql-pkg-deps - Function: pkg.installed - Result: Clean Started: - 15:21:26.534113 Duration: 23.875 ms
  Name: deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main - Function: pkgrepo.managed - Result: Changed Started: - 15:21:26.559226 Duration: 6556.887 ms

Summary for unicornbottle-main
------------
Succeeded: 2 (changed=1)
Failed:    0
------------
Total states run:     2
Total run time:   6.581 s

Now configuration is set as follows:

# cat /etc/apt/sources.list.d/pgdg.list
deb http://apt.postgresql.org/pub/repos/apt bullseye-pgdg main

Documentation checklist

Testing checklist

Additional context

This is debian's unstable branch. I'm personally using it to be a little more up to date as stability is not a concern for my current project. If I have any issues I'll update here with additional fixes, however I think that how the project is laid out everything should continue to work as this is a very small change which should not have many repercussions.

saltstack-formulas-travis commented 3 years ago

:tada: This PR is included in version 0.42.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: