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

fix cpanm fails with old perl #1928

Merged
merged 16 commits into from
Sep 4, 2024
Merged

Conversation

shogo82148
Copy link
Owner

@shogo82148 shogo82148 commented Sep 4, 2024

close #1920

Summary by CodeRabbit

  • New Features

    • Enhanced CPAN installer workflow to support multiple Perl versions and installation methods.
    • Introduced a new distribution section for improved configuration.
    • Added a script for streamlined installation of the Mozilla::CA Perl module.
  • Improvements

    • Updated Perl version specifications for better compatibility and coverage.
    • Improved environment variable settings for enhanced module resolution.
    • Updated dependency to a new library, potentially enhancing functionality.
  • Chores

    • Added a new entry to .gitignore to exclude specific Perl library files.

Copy link

coderabbitai bot commented Sep 4, 2024

Walkthrough

The changes involve updates to the CPAN installer workflow configuration, including modifications to the trigger paths, Perl version specifications, and the introduction of a new distribution section. Additionally, a new script for installing the Mozilla::CA Perl module has been created, and a new Perl module has been introduced for accessing Mozilla's CA certificate bundle. These adjustments enhance the workflow's specificity for different Perl versions and installation methods.

Changes

File Change Summary
.github/workflows/test-cpan-installer.yml Updated on.pull_request.paths to include the workflow file, modified Perl versions, and added a new distribution section with configurations for Perl "5.8" on "windows-latest".
scripts/.gitignore Added lib/perl5/darwin-2level/ to the list of ignored paths.
scripts/install-mozilla-ca.sh Created a new script to install the Mozilla::CA Perl module using cpanm.
scripts/lib/perl5/Mozilla/CA.pm Introduced a new Perl module for accessing Mozilla's CA certificate bundle.
src/setup-perl.ts Modified PERL5LIB to include both lib and lib/perl5 directories.

Assessment against linked issues

Objective Addressed Explanation
Secure cpanm calls fail with Strawberry Perl <=5.22 (1920) It's unclear if the changes address the TLS issue for older Strawberry Perl versions.

🐇 "In the meadow, changes bloom,
A workflow brightens every room.
With Perl versions now in line,
Installation's smooth, oh how divine!
Let cpanm dance, let it play,
For seamless builds are here to stay!" 🌼


Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d489ebe and efd33df.

Files selected for processing (1)
  • .github/workflows/test-cpan-installer.yml (3 hunks)
Additional comments not posted (5)
.github/workflows/test-cpan-installer.yml (5)

5-5: LGTM!

Including the workflow file itself in the paths section is a good practice to ensure that the workflow runs whenever the workflow configuration is updated.


34-34: LGTM!

Specifying the exact version "5.40" instead of just "5" provides more clarity and ensures that the latest version is used. This change aligns with the objective of testing the CPAN installer with the latest version of Perl.


35-35: LGTM!

Adding Perl version "5.8" as a separate entry in the matrix ensures that the CPAN installer is tested with this specific version. This change aligns with the objective of addressing the failure of secure cpanm calls with Strawberry Perl versions 5.22 and earlier, as mentioned in the linked issue.


46-47: LGTM!

Introducing a distribution section allows for specifying different Perl distributions to test the CPAN installer with. Specifying "default" as a distribution option ensures that the default distribution is used for the majority of the test matrix.


48-60: LGTM!

The include section allows for specifying additional configurations to be included in the test matrix. The added entries ensure that Perl "5.8" on "windows-latest" is tested with different installers (cpanm, cpm, and carton) using the "strawberry" distribution. This change aligns with the objective of addressing the failure of secure cpanm calls with Strawberry Perl versions 5.22 and earlier, as mentioned in the linked issue.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between efd33df and e133fe6.

Files selected for processing (1)
  • .github/workflows/test-cpan-installer.yml (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test-cpan-installer.yml

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e133fe6 and 04aca91.

Files selected for processing (1)
  • .github/workflows/test-cpan-installer.yml (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test-cpan-installer.yml

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 04aca91 and d59f97e.

Files selected for processing (1)
  • .github/workflows/test-cpan-installer.yml (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test-cpan-installer.yml

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between d59f97e and 5e36648.

Files ignored due to path filters (1)
  • scripts/lib/perl5/Mozilla/CA/cacert.pem is excluded by !**/*.pem
Files selected for processing (4)
  • scripts/.gitignore (1 hunks)
  • scripts/install-mozilla-ca.sh (1 hunks)
  • scripts/lib/perl5/Mozilla/CA.pm (1 hunks)
  • src/setup-perl.ts (1 hunks)
Files skipped from review due to trivial changes (2)
  • scripts/.gitignore
  • scripts/install-mozilla-ca.sh
Additional comments not posted (3)
scripts/lib/perl5/Mozilla/CA.pm (2)

1-15: LGTM!

The code changes are approved.


17-71: LGTM!

The documentation is comprehensive and clear.

src/setup-perl.ts (1)

58-63: LGTM!

The code change is adding an additional directory perl5 to the PERL5LIB environment variable. This will allow the Perl interpreter to search for modules in both the original lib directory and the new perl5 directory.

The change looks good to me.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5e36648 and 5ce8f43.

Files ignored due to path filters (2)
  • dist/setup/index.js is excluded by !**/dist/**
  • dist/setup/index.js.map is excluded by !**/dist/**, !**/*.map
Files selected for processing (1)
  • .github/workflows/test-cpan-installer.yml (3 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test-cpan-installer.yml

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5ce8f43 and e58f7c6.

Files selected for processing (2)
  • .github/workflows/test-cpan-installer.yml (3 hunks)
  • test/p5-Test-Module/cpanfile (1 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test-cpan-installer.yml

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e58f7c6 and 12c9d2b.

Files selected for processing (1)
  • .github/workflows/test-cpan-installer.yml (2 hunks)
Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test-cpan-installer.yml

@shogo82148 shogo82148 merged commit e5212a1 into main Sep 4, 2024
46 checks passed
@shogo82148 shogo82148 deleted the fix-cpanm-fails-with-old-perl branch September 4, 2024 16:25
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.

Secure cpanm calls fail with Strawberry Perl <=5.22
1 participant