Skip to content
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

updated scripts to manage rhsm-certificates on ol8 and ol9 #8

Closed
wants to merge 1 commit into from

Conversation

scoter-oracle
Copy link

Fixed ol8 and ol9 scripts to get subscription-manager-rhsm-certificates RPM binary built for OL8 and OL9 (wasn't by default).
Verify and updated script and patch to build subscription-manager packages for OL7.

@Djelibeybi
Copy link
Owner

Djelibeybi commented Jan 23, 2024

Hey @Scoter, could you please GPG sign your commit? See https://docs.github.com/articles/about-gpg/ for details. You also need to sign off (git commit -s) your commit.

Copy link
Owner

@Djelibeybi Djelibeybi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't had a chance to test this, but here are some initial thoughts. Thanks for this contribution!

%global subpackages SUBPACKAGES="%{?include_syspurpose:syspurpose}"

-Name: subscription-manager
+Name: subscription-manager-el7
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oracle ships packages that obsolete subscription-manager which is why this is here: I use a different name so I can obsolete the packages that obselete subscription-manager. Unless something has changed, this is required to install these packages with the default Oracle Linux repos still enabled.

@@ -1,18 +1,24 @@
#!/bin/bash
#
# Copyright (c) 2021 Avi Miller
# Copyright (c) 2021, 2023 Avi Miller
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's 2024, not 2023. :) Also, you'll want to add another copyright line for yourself, not modify mine.

cd /root/subscription-manager-rhsm-certificates || exit

# Add tag with proper version and release
git tag subscription-manager-rhsm-certificates-$RHSM_VERSION-$RHSM_RELEASE
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this already be tagged upstream? I check to see what the version is by checking the UBI images for each version, so this tag should already exist. We don't want to use latest, we need to use the version used by upstream so it migrates properly.

@Djelibeybi
Copy link
Owner

Instead of building the missing RPM, why not just remove the dependency? We don't need to include the Red Hat certificates.

@Djelibeybi
Copy link
Owner

Also, the required package is built for Oracle Linux 7 using the existing script. It doesn't need to be modified.

@scoter-oracle
Copy link
Author

Here my feedback:

  • the scripts (all-of-them) fail on copying the files on output/oraclelinux directory if "SELinux" is enforced on the host (container policies on creating directory and writing files) - SELinux=permissive works
  • testing the script on OL7 was failing, you can check the same on your side.
  • tagging for subscription-manager-rhsm-certificates was required because it does not have the same release we use; tagging name was generated with the version/release picked up from EL ubi images
  • I tested the subscription-manager package(s) installation on OL7 and it does not need the "-el7"
  • if we're going to move from RHEL a system our "subscription-manager" needs also to obsolete "subscription-manager-rhsm-certificates" (if we do not build the same)

@Djelibeybi
Copy link
Owner

Actually, OL7 was passing just fine for me, which is why I mentioned it. Also, for SElinux support, add :z to the end of the -v entries in each of the build-rhsm-olX.sh scripts so that Docker maintains the SElinux context.

Removing the dependency on the certificates package means we don't have to tag it either. Obsoleting it is certainly possible too (and probably worthwhile). It's a long weekend here, so hopefully I'll get a chance to poke at this a bit more.

@Djelibeybi
Copy link
Owner

Implemented via #13 instead.

@Djelibeybi Djelibeybi closed this Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants