-
Notifications
You must be signed in to change notification settings - Fork 21
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
base: release-2.9
Are you sure you want to change the base?
Conversation
bundles/redhat8.6/bundle.sh.gotmpl
Outdated
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 |
There was a problem hiding this comment.
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.
bundles/redhat8.6/bundle.sh.gotmpl
Outdated
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 |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4e7471d
to
8cb5c52
Compare
createrepo -v . | ||
chown -R 1000:1000 repodata/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed from main.
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. |
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?: