From 5631f07a6720db2f7d8f70e20bd85c12144b56e5 Mon Sep 17 00:00:00 2001 From: Pino Toscano Date: Thu, 20 Apr 2023 09:53:22 +0200 Subject: [PATCH] Initial import Add the same source as current available in c9s, with the additional stuff (gating stuff) adapted to el8. Resolves: rhbz#2184015 --- .gitignore | 1 + gating.yaml | 8 +++ sources | 1 + subscription-manager-rhsm-certificates.spec | 60 +++++++++++++++++++++ tests/smoke/smoke.sh | 9 ++++ tests/tests.yml | 12 +++++ 6 files changed, 91 insertions(+) create mode 100644 gating.yaml create mode 100644 sources create mode 100644 subscription-manager-rhsm-certificates.spec create mode 100755 tests/smoke/smoke.sh create mode 100644 tests/tests.yml diff --git a/.gitignore b/.gitignore index e69de29..8777ead 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/subscription-manager-rhsm-certificates-*.tar.gz diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..ba7627c --- /dev/null +++ b/gating.yaml @@ -0,0 +1,8 @@ +--- !Policy +product_versions: + - rhel-8 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} + - !PassingTestCaseRule {test_case_name: rhsmci.brew-build.tier1.functional} + diff --git a/sources b/sources new file mode 100644 index 0000000..104346f --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (subscription-manager-rhsm-certificates-20220623.tar.gz) = 8f3591dda293d9af2767fb4ded6ee033c31bb2881bb03ac5bb76dea1b39bbe3e02c1b028377d2547fefadeb1109231ca5cc196ac48245816ef5ad5292c0de393 diff --git a/subscription-manager-rhsm-certificates.spec b/subscription-manager-rhsm-certificates.spec new file mode 100644 index 0000000..02dd90a --- /dev/null +++ b/subscription-manager-rhsm-certificates.spec @@ -0,0 +1,60 @@ +Name: subscription-manager-rhsm-certificates +Version: 20220623 +Release: 1%{?dist} +Summary: Certificates required to communicate with a Red Hat Unified Entitlement Platform +URL: https://www.candlepinproject.org/ +%if 0%{?suse_version} +Group: Development/Libraries/Python +License: GPL-2.0 +%else +License: GPLv2 +%endif + +# How to create the source tarball: +# +# git clone https://github.com/candlepin/subscription-manager-rhsm-certificates.git +# dnf install tito +# tito build --tag subscription-manager-rhsm-certificates-$VERSION-$RELEASE --tgz +Source0: %{name}-%{version}.tar.gz + +BuildArch: noarch + +BuildRequires: make +BuildRequires: openssl + +%description +This package contains certificates required for communicating with the REST interface +of a Red Hat Unified Entitlement Platform, used for the management of system entitlements +and to receive access to content. + +%prep +%setup -q + +%build +# Nothing to do for building + +%install +%make_install \ + PREFIX=%{_prefix} \ + SYSCONFDIR=%{_sysconfdir} + +%check +make check + +%files +%license COPYING +%dir %{_sysconfdir}/rhsm +%dir %{_sysconfdir}/rhsm/ca +%{_sysconfdir}/rhsm/ca/*.pem + +%changelog +* Thu Jun 23 2022 Jiri Hnidek 20220623-1 +- Fix issue with missing {?dist} in Release. (jhnidek@redhat.com) + +* Wed Jun 15 2022 Jiri Hnidek 20220425-1 +- Use the same version and release as Fedora already use + +* Wed Jun 08 2022 Jiri Hnidek 20220608-1 +- New package built with tito +- Using new version pattern for subscription-manager-rhsm-certificates + diff --git a/tests/smoke/smoke.sh b/tests/smoke/smoke.sh new file mode 100755 index 0000000..ecfa0c3 --- /dev/null +++ b/tests/smoke/smoke.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e +set -o pipefail + +# Check that both PEM files are installed and these files are really PEM files +file /etc/rhsm/ca/redhat-entitlement-authority.pem | grep -q "/etc/rhsm/ca/redhat-entitlement-authority.pem: PEM certificate" +file /etc/rhsm/ca/redhat-uep.pem | grep -q "/etc/rhsm/ca/redhat-uep.pem: PEM certificate" + diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..f0f4410 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,12 @@ +--- +- hosts: localhost + tags: + - classic + - atomic + roles: + - role: standard-test-basic + tests: + - smoke: + dir: smoke + run: ./smoke.sh +