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

Load product metadata from ProductID certificates [RHELDST-24276] #476

Merged

Conversation

MichalHaluza
Copy link
Contributor

python-rhsm cannot be installed with GCC 14. Given that project has been deprecated for years, it's unlikely the actual underlying issue will be resolved. There are several projects in the distribution realm that used python-rhsm to read ProductID certificates and pull product metadata from them. After some internal discussion, pushsource seems to be an acceptable place where to put the replacement code which can be used instead of python-rhsm.

This commit adds logic for reading metadata from Red Hat ProductID certificate files leveraging cryptography and pyasn1 modules.

It also slightly adjusts conv.sloppylist() so the individual string elements are stripped of leading and trailing whitespaces after splitting.

@MichalHaluza
Copy link
Contributor Author

@rohanpm, @rbikar, @amcmahon-rh please review

src/pushsource/_impl/model/productid.py Outdated Show resolved Hide resolved
src/pushsource/_impl/model/productid.py Outdated Show resolved Hide resolved
src/pushsource/_impl/model/productid.py Outdated Show resolved Hide resolved
tests/baseline/cases/direct-productid.yml Show resolved Hide resolved
@MichalHaluza MichalHaluza force-pushed the load_productid_products branch 2 times, most recently from b52cf09 to a1dd6bb Compare May 9, 2024 09:35
@MichalHaluza MichalHaluza requested a review from rohanpm May 9, 2024 12:24
Copy link
Member

@rohanpm rohanpm left a comment

Choose a reason for hiding this comment

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

The codecov failure would be fixed by #477.

src/pushsource/_impl/model/productid.py Show resolved Hide resolved
python-rhsm cannot be installed with GCC 14. Given that project
has been deprecated for years, it's unlikely the actual underlying
issue will be resolved. There are several projects in the distribution
realm that used python-rhsm to read ProductID certificates and pull
product metadata from them. After some internal discussion, pushsource
seems to be an acceptable place where to put the replacement code which
can be used instead of python-rhsm.

This commit adds logic for reading metadata from Red Hat ProductID
certificate files leveraging `cryptography` and `pyasn1` modules.

It also slightly adjusts `conv.sloppylist()` so the individual string
elements are stripped of leading and trailing whitespaces after
splitting.
@rbikar rbikar merged commit fff3b46 into release-engineering:master May 10, 2024
5 of 6 checks passed
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.

None yet

3 participants