Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Generate and install pkgconfig file #1435

Merged
merged 1 commit into from
Apr 24, 2023

Conversation

tranzystorekk
Copy link
Contributor

Adds a basic pkgconfig file generation. The main motivation for this is to enable linking a system-provided liboqs library in liboqs-rust.

I have done a simple manual test by creating a Void Linux package template for liboqs, installing it and checking that pkg-config detects its presence.

I am not proficient in pkgconfig, but I tried to follow the style found in some existing C libraries.

Closes #1434

  • Does this PR change the input/output behaviour of a cryptographic algorithm (i.e., does it change known answer test values)? (If so, a version bump will be required from x.y.z to x.(y+1).0.)
  • Does this PR change the the list of algorithms available -- either adding, removing, or renaming? Does this PR otherwise change an API? (If so, PRs in oqs-provider, OQS-OpenSSL, OQS-BoringSSL, and OQS-OpenSSH will also need to be ready for review and merge by the time this is merged.)

@tranzystorekk
Copy link
Contributor Author

Some notes:

  • I'm not sure how this could be easily tested; haven't taken the time yet to get familiar with the CI setup
  • the Requires.private section probably should be set conditionally depending on whether openssl is enabled, but I wanted to get something out quickly

src/liboqs.pc.in Outdated
Name: @PROJECT_NAME@
Description: Library for quantum-safe cryptographic algorithms
Version: @OQS_VERSION_TEXT@
Requires.private: openssl
Copy link
Contributor

Choose a reason for hiding this comment

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

liboqs often requires openssl, but this is optional

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm thinking this would be best solved with an internal variable that is set to "openssl" if OQS_USE_OPENSSL is enabled. Is there some cmake variable naming convention in this project, e.g. _oqs_pkgconfig_requires_private?

@thomwiggers thomwiggers self-requested a review April 16, 2023 16:02
@thomwiggers
Copy link
Contributor

oops, I only intended to leave a comment, I don't have any experience with pkg-config so I can't otherwise meaningfully contribute.

Copy link

@wucke13 wucke13 left a comment

Choose a reason for hiding this comment

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

LGTM 😄

@tranzystorekk tranzystorekk marked this pull request as ready for review April 24, 2023 09:55
@dstebila dstebila merged commit 8f38bb4 into open-quantum-safe:main Apr 24, 2023
@tranzystorekk tranzystorekk deleted the pkgconfig branch April 28, 2023 19:08
@wucke13
Copy link

wucke13 commented May 6, 2023

@dstebila Now that liboqs has a pkgconfig file, can we create a minor release so that this becomes available in the distros?

@baentsch
Copy link
Member

baentsch commented May 8, 2023

@wucke13 oqsprovider is also waiting for such release. But then again, there's only a single issue requiring resolution for 0.8.0 milestone... Further eyes welcome to help resolve this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should ship a pkg-config file
5 participants