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

Automate exported constant management process #314

Conversation

chrisnovakovic
Copy link
Collaborator

Exported libssl/libcrypto constants are currently managed using helper_script/regen_openssl_constants.pl, which still involves following a lot of cumbersome and error-prone manual steps. See #313 for a detailed discussion of the problems with this script.

Fully automate the constant management process with a new script, helper_script/update-exported-constants, which reads a list of libssl/libcrypto constants from constants.txt and automatically generates or updates the necessary files in the repository. Make the following changes to accommodate the new script:

  • Remove invocations of regen_openssl_constants.pl from the Makefile, but don't replace them with invocations of update-exported-constants: the new script is intended to be run as part of a commit that adds or removes constants, and should not need to be run by end users of the module.
  • In lib/Net/SSLeay.pm, split the list of exportable symbols into two categories, defined in separate arrays: one for constants (which is automatically updated when update-exported-constants runs), and one for functions (which will continue to be managed manually).
  • In lib/Net/SSLeay.pod, signpost the location of the code block containing the constants list by surrounding it with Pod comments; the Pod between these comments is automatically updated when update-exported-constants runs.

Closes #313.

Verified

This commit was signed with the committer’s verified signature.
Expl0dingBanana Christopher Dohmen
Exported libssl/libcrypto constants are currently managed using
helper_script/regen_openssl_constants.pl, which still involves following
a lot of cumbersome and error-prone manual steps. See radiator-software#313 for a
detailed discussion of the problems with this script.

Fully automate the constant management process with a new script,
helper_script/update-exported-constants, which reads a list of
libssl/libcrypto constants from constants.txt and automatically
generates or updates the necessary files in the repository. Make the
following changes to accommodate the new script:

* Remove invocations of regen_openssl_constants.pl from the Makefile,
  but don't replace them with invocations of update-exported-constants:
  the new script is intended to be run as part of a commit that adds or
  removes constants, and should not need to be run by end users of the
  module.
* In lib/Net/SSLeay.pm, split the list of exportable symbols into two
  categories, defined in separate arrays: one for constants (which is
  automatically updated when update-exported-constants runs), and one
  for functions (which will continue to be managed manually).
* In lib/Net/SSLeay.pod, signpost the location of the code block
  containing the constants list by surrounding it with Pod comments; the
  Pod between these comments is automatically updated when
  update-exported-constants runs.

Closes radiator-software#313.
@chrisnovakovic chrisnovakovic added the enhancement New feature or request label Oct 6, 2021
@chrisnovakovic chrisnovakovic requested a review from h-vn October 6, 2021 23:55
@chrisnovakovic chrisnovakovic self-assigned this Oct 6, 2021
chrisnovakovic added a commit that referenced this pull request Oct 9, 2021
@chrisnovakovic
Copy link
Collaborator Author

Squashed and merged manually (7eb74c6).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Exported constant management process is cumbersome
1 participant