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

Refactor keystore operations to a separate source + internal API #3397

Merged
merged 8 commits into from
Oct 23, 2024

Conversation

pmatilai
Copy link
Member

Details in commit messages, but short summary is that this is all just refactoring prep-work for #3342.
The added API of keystore Load, Import and Delete functions sort of achieves the abstraction but this exact API shouldn't be seen as any final state of affairs, it's just a milestone along the road.

This looks big but the actual code changes are rather minimal, on purpose. Once this lands, the next steps will be isolating the header fubar into the rpmdb keystore and making the keystore an actual type (think object) instead of just being ifs around keyringtype number.

These will be needed to move the keystore backends to a separate file.
No functional changes.
Another preparatory step towards splitting the keystore operations
into a separate file. No functional changes.
This should've been in commit 4c61c1f
already. No functional changes.
Paving way for next steps, no functional changes.
Preparing for next steps, no functional changes.
Paving way for next steps, no functional changes.
Paving way for next steps, no functional changes.
Except for making the three keystore API functions non-static, there
are no code changes here, it's all just moving stuff around. Thus,
there cannot be any functionality changes either.

The internal API here should not be considered final, this is just
a stepping stone to hide the keystore internals from the rest of
the rpmts layer.

Related: rpm-software-management#3342
@pmatilai pmatilai requested a review from a team as a code owner October 22, 2024 09:25
@pmatilai pmatilai requested review from ffesti and removed request for a team October 22, 2024 09:25
@ffesti
Copy link
Contributor

ffesti commented Oct 23, 2024

static rpmRC rpmtsDeleteDBKey(rpmtxn txn, rpmPubkey key) and friends look weird to me - having a rpmts prefix but getting called with rpmtxn. Yes, these are all just internal helpers so it is not a big deal. Still noticing.

@ffesti
Copy link
Contributor

ffesti commented Oct 23, 2024

Otherwise this looks pretty straight forward and good.

@pmatilai
Copy link
Member Author

Yes, the naming is a mess, but the names are not being introduced here, it's just getting moved around and intentionally preserving as much as possible to make it easier to verify there are no code changes.

It'll get cleaned up in the next stage where the keystore is turned into an abstract class with a bunch of different implementations.

@ffesti ffesti merged commit 364d284 into rpm-software-management:master Oct 23, 2024
1 check 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.

2 participants