Skip to content

Commit

Permalink
Switch from erlang-solutions repository and update AlmaLinux GPG key (h…
Browse files Browse the repository at this point in the history
  • Loading branch information
przemyslavic committed Apr 26, 2024
1 parent f86679f commit bc7d60c
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 28 deletions.
27 changes: 27 additions & 0 deletions ansible/playbooks/roles/common/tasks/RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,33 @@
# Subscriptions with certs: subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms"
# w/o subscription https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

# Update AlmaLinux 8 GPG key
# https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
- block:
- name: Install the latest version of almalinux-release package
dnf:
name:
- almalinux-release
update_cache: true
state: latest
register: result
retries: 3
delay: 1
until: result is succeeded

- name: Remove expired AlmaLinux 8 GPG key
rpm_key:
key: /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
state: absent

- name: Import the new AlmaLinux 8 GPG key
rpm_key:
key: /etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux
state: present
when:
- ansible_distribution == 'AlmaLinux'
- ansible_distribution_major_version == '8'

- name: Install the latest version of ca-certificates package
dnf:
name:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@ repositories:
content: 'deb https://artifacts.elastic.co/packages/oss-6.x/apt stable main'
key: 'https://artifacts.elastic.co/GPG-KEY-elasticsearch'

erlang-23.x:
content: 'deb https://packages.erlang-solutions.com/ubuntu focal contrib'
key: 'https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc'

rabbitmq:
content: 'deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu bionic main'
key: 'https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ prereq-packages:
- almalinux-logos-httpd # for httpd

packages:
from_repo: []
from_repo:
# Update AlmaLinux 8 GPG key
# https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
- 'almalinux-release'
multiple_versioned: []
from_url: {}
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,6 @@ packages:

# for opensearch & logging roles
- 'elasticsearch-oss=7.10.2*'

# Erlang packages must be compatible with RabbitMQ version.
# Metapackages such as erlang and erlang-nox must only be used
# with apt version pinning. They do not pin their dependency versions.
# List based on: https://www.rabbitmq.com/install-debian.html#installing-erlang-package
- 'erlang-asn1=1:23.1.5*'
- 'erlang-base=1:23.1.5*'
- 'erlang-crypto=1:23.1.5*'
- 'erlang-eldap=1:23.1.5*'
- 'erlang-ftp=1:23.1.5*'
- 'erlang-inets=1:23.1.5*'
- 'erlang-mnesia=1:23.1.5*'
- 'erlang-os-mon=1:23.1.5*'
- 'erlang-parsetools=1:23.1.5*'
- 'erlang-public-key=1:23.1.5*'
- 'erlang-runtime-tools=1:23.1.5*'
- 'erlang-snmp=1:23.1.5*'
- 'erlang-ssl=1:23.1.5*'
- 'erlang-syntax-tools=1:23.1.5*'
- 'erlang-tftp=1:23.1.5*'
- 'erlang-tools=1:23.1.5*'
- 'erlang-xmerl=1:23.1.5*'
- 'ethtool'
- 'filebeat=7.12.1*'
- 'firewalld'
Expand Down Expand Up @@ -157,3 +135,38 @@ packages:
sha256: 947ff062f2ba903fdd0ef77749219e8b27ca9c56821f503ae58a18a253fef5e1
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/kubernetes-cni_0.8.7-00_amd64.deb':
sha256: ca2303ea0eecadf379c65bad855f9ad7c95c16502c0e7b3d50edcb53403c500f
# Switched to an alternate repository as the following packages have been removed from erlang-solutions repository
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-asn1_1%253a23.1.5-1_amd64.deb':
sha256: bce3b3db06d4f3ae3487ea539fea39d77f11cefe510ac6642a718acee725989a
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-base_1%253a23.1.5-1_amd64.deb':
sha256: 943d8f7f299dd27a2b91993a26cc18988039d83c504934d18fe6dbde16f7bd6e
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-crypto_1%253a23.1.5-1_amd64.deb':
sha256: d00e867f3d4508d78fbffab226c8247af937a9ffde46c2e77257ce1f258144f9
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-eldap_1%253a23.1.5-1_amd64.deb':
sha256: 2b982eb5da6adbd450f2f1791349f983fd2fc47bcb3b1c8a1f80412001e3261f
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-ftp_1%253a23.1.5-1_amd64.deb':
sha256: 59653ae7cdc921ba66fd0cdbdda9730bccdab84f92b78bf2b6bafdfc580abada
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-inets_1%253a23.1.5-1_amd64.deb':
sha256: 7b54b1e86e7c20c0fde33a10d3fb448baba05bf5afc27c56ed8b9d7f31f934c7
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-mnesia_1%253a23.1.5-1_amd64.deb':
sha256: 4060bac983ca1975a6f8701e3bfcb9044a642dcd64a52f0e2873e5e758306924
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-os-mon_1%253a23.1.5-1_amd64.deb':
sha256: 9deee80e525470ddc1aeddd84e16726440dc9d66d174ce72535fcd56c39e10ab
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-parsetools_1%253a23.1.5-1_amd64.deb':
sha256: 4ccd3a68fa3e3511b23f86e139b27ba0d3c3fa6c99a6ae2f0bf4334d28a9f432
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-public-key_1%253a23.1.5-1_amd64.deb':
sha256: d2117428607738461cafc450c8711deb1d0afeb9c7144746007a032e66e98983
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-runtime-tools_1%253a23.1.5-1_amd64.deb':
sha256: cf86b47be619c29180349473956f248ba2827b5433316e6fca97d512cee40c27
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-snmp_1%253a23.1.5-1_amd64.deb':
sha256: f5f3165e2d2ac31b005fe3f422d59c09fb34a226679b5217f9c2e302d380106b
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-ssl_1%253a23.1.5-1_amd64.deb':
sha256: a15ffb59182926d0e84465a0bd18f133d45293abcc0f848fd52014d749c3defe
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-syntax-tools_1%253a23.1.5-1_amd64.deb':
sha256: eea9b02271461289ca339087f551dd326fa68dc67929998ac8370e7b44d4046f
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-tftp_1%253a23.1.5-1_amd64.deb':
sha256: 1c97ead185ffaf838bbcfd9a25f2a7c334496a63b4e597dbd682efad7537e457
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-tools_1%253a23.1.5-1_amd64.deb':
sha256: 96ba6054e5e7a64fe88c621f560270c8cc1967e8b10ff8a040e6460d37c215ae
'https://github.com/hitachienergy/alternative-repo/raw/main/2.0.x/x86_64/debian/packages/erlang-xmerl_1%253a23.1.5-1_amd64.deb':
sha256: 393aab19e8e43b047230dcf8d83310e1da2bd45d9bb2646eb0b2eeb9b2b703cd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ prereq-packages:
- almalinux-logos-httpd # for httpd

packages:
from_repo: []
from_repo:
# Update AlmaLinux 8 GPG key
# https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
- 'almalinux-release'
multiple_versioned: []
from_url: {}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from src.command.command import Command
from src.config.config import Config
from src.config.os_type import OSArch
from src.config.os_type import OSType
from src.mode.base_mode import BaseMode, load_yaml_file


Expand Down Expand Up @@ -50,6 +51,12 @@ def _create_backup_repositories(self):
logging.debug('Done.')

def _install_base_packages(self):
# Update AlmaLinux 8 GPG key
# https://almalinux.org/blog/2023-12-20-almalinux-8-key-update/
if self._cfg.os_type == OSType.Almalinux:
self._tools.dnf.install('almalinux-release', ignore_already_installed_error=True)
self._tools.rpm.import_key('/etc/pki/rpm-gpg/RPM-GPG-KEY-AlmaLinux')

# Ensure `dnf config-manager` command
if not self._tools.rpm.is_package_installed('dnf-plugins-core'):
self._tools.dnf.install('dnf-plugins-core')
Expand Down
7 changes: 7 additions & 0 deletions docs/changelogs/CHANGELOG-2.0.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<!-- markdownlint-disable-file no-duplicate-header -->
# Changelog 2.0

## [2.0.14] 2024-MM-DD

### Fixed

- [#3450](https://github.com/hitachienergy/epiphany/issues/3450) - Erlang 23 packages not available for Ubuntu focal distro
- [#3452](https://github.com/hitachienergy/epiphany/issues/3452) - AlmaLinux 8 GPG key changed

## [2.0.13] 2024-03-05

### Fixed
Expand Down

0 comments on commit bc7d60c

Please sign in to comment.