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

[wip]feat: changes to support network restricted environments when creating RHEL OS bundles #1156

Draft
wants to merge 11 commits into
base: release-2.9
Choose a base branch
from

Conversation

some-things
Copy link
Contributor

What problem does this PR solve?:

Which issue(s) does this PR fix?:

Special notes for your reviewer:

I don't have permissions to push images to test a3512a5. Any help there would be greatly appreciated.

Does this PR introduce a user-facing change?:


Comment on lines 76 to 83
if [[ -f /etc/yum.repos.d/user-repos.repo ]]; then
USER_REPOS="$(awk -F '[][]' '/^\[.*\]/ {print $2}' /etc/yum.repos.d/user-repos.repo | paste -sd, -)"
if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then
ENABLED_REPOS="${ENABLED_REPOS},${USER_REPOS}"
elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then
ENABLED_REPOS="${USER_REPOS}"
fi
fi
Copy link
Contributor Author

@some-things some-things Aug 21, 2024

Choose a reason for hiding this comment

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

This requires users to define their rpm repos in repo-templates/user-repos.repo. We will need to document this workflow.

While KIB CLI automatically adds any repo files in repo-templates/ to /etc/yum.repos.d, we need to selectively enable/disable repos that already exist there (e.g., /etc/yum.repos.d/ubi.repo). We could only parse files other than the pre-existing ones, but maybe it is simpler to just have one file that users modify and we look for.

Open to any feedback.

Comment on lines 81 to 88
if [[ -f /etc/yum.repos.d/user-repos.repo ]]; then
USER_REPOS="$(awk -F '[][]' '/^\[.*\]/ {print $2}' /etc/yum.repos.d/user-repos.repo | paste -sd, -)"
if [[ -n "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then
ENABLED_REPOS="${ENABLED_REPOS},${USER_REPOS}"
elif [[ -z "${ENABLED_REPOS}" ]] && [[ -n "${USER_REPOS}" ]]; then
ENABLED_REPOS="${USER_REPOS}"
fi
fi
Copy link
Collaborator

Choose a reason for hiding this comment

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

I can think of another way of handling this. not a huge fan of usig awk this way

Copy link
Contributor Author

@some-things some-things Aug 21, 2024

Choose a reason for hiding this comment

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

@faiq I changed this in 8cb5c52. Let me know what you think.

createrepo -v .
chown -R 1000:1000 repodata/
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is this removed?

Copy link
Collaborator

Choose a reason for hiding this comment

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

removed from main.

@faiq
Copy link
Collaborator

faiq commented Aug 24, 2024

I'm going to break this pr into smaller ones for release-2.9

regarding the satellite and skip subscription manager features open lets consider doing this in main first.

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