saltstack-formulas / postgres-formula

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

fix(osmap.yaml): fix PGDG repo file creation for Amazon Linux 2 #314

Closed Niyakiy closed 3 years ago

Niyakiy commented 3 years ago

Fix improper pgdg repo file creation for Amazon Linux 2.

Description: Current formula implementation uses baseurl: 'https://download.postgresql.org/pub/repos/yum/{{ repo.version }}/redhat/rhel-$releasever-$basearch' setting $releasever to 2 for Amazon Linux 2 and making formula install fail due to missing rhel-2 packages.

The fix makes a newly created formula repo file to use rhel-7 as the proper repository to use during install.

myii commented 3 years ago

Just another note, doesn't necessarily have to be addressed by this PR.


We're not currently testing use_upstream_repo for most platforms, so this PR isn't actually being tested properly. Need to consider updating this block in the test pillar:

https://github.com/saltstack-formulas/postgres-formula/blob/d16e91ceb03411f58c98cbb919f65b3f3eb4abbb/test/salt/pillar/postgres.sls#L10-L18

I'll try to run some tests when I get a chance. Let's not make this a blocker for this PR, if I don't report back soon.

@Niyakiy Please don't go out of your way to run these tests, what you've already provided is more than enough, thanks.

myii commented 3 years ago

Thanks, @Niyakiy -- merged.

Out of interest, did you need to adjust the pkg_deps to also install these packages?

  pkgs_deps:
    - libicu
    - systemd-sysv

I had to do that to get PostgreSQL 13 installed on Amazon Linux 2:

saltstack-formulas-travis commented 3 years ago

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

The release is available on GitHub release

Your semantic-release bot :package::rocket:

myii commented 3 years ago

@Niyakiy I've refactored this Amazon Linux 2 support in #315 -- feel free to comment on it there.