Adapt to Changes/droppingOfCertPemFile#1711
Merged
xsuchy merged 1 commit intorpm-software-management:mainfrom Feb 14, 2026
Merged
Adapt to Changes/droppingOfCertPemFile#1711xsuchy merged 1 commit intorpm-software-management:mainfrom
xsuchy merged 1 commit intorpm-software-management:mainfrom
Conversation
The change suggests us to use different bundle location: | needs to preferably use the defaults of the library or if they must, | use the /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem file | instead. Fixes: rpm-software-management#1667
There was a problem hiding this comment.
Code Review
This pull request correctly updates the path to the CA bundle to reflect recent changes in Fedora and adds a corresponding release note. My review includes one suggestion to define the new path as a constant to improve code maintainability, in line with the repository's style guide.
| if bundle_path: | ||
| self.buildroot.root_log.debug('copying CA bundle into chroot') | ||
| host_bundle = os.path.realpath('/etc/pki/tls/certs/ca-bundle.crt') | ||
| host_bundle = os.path.realpath('/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem') |
There was a problem hiding this comment.
While the path update is correct, using a magic string directly in the code can make future maintenance harder. To improve maintainability and adhere to the style guide, please define this path as a module-level constant.
For example, at the top of the file:
_CA_BUNDLE_PATH = '/etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem'Then use it here:
host_bundle = os.path.realpath(_CA_BUNDLE_PATH)References
- Line 13 of the repository style guide specifies that constants should be in uppercase with underscores. Using a constant for this file path also improves maintainability, as encouraged by line 5. (link)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The change suggests us to use different bundle location:
| needs to preferably use the defaults of the library or if they must, | use the /etc/pki/ca-trust/extracted/pem/tls-ca-bundle.pem file | instead.
Fixes: #1667