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

Update IO-Compress to 2.106 and add a way to skip utils/ files that need 64 bit ints #19618

Merged
merged 3 commits into from
Apr 13, 2022

Conversation

demerphq
Copy link
Collaborator

@demerphq demerphq commented Apr 12, 2022

On 32 bit perls IO-Compress/bin/zipdetails fails t/porting/utils.t via its copy into the utils directory. This patch adds a way for scripts that end up in utils to advise they require 64 bit perls.

 # Failed test 83 - utils/zipdetails compiles at porting/utils.t line 85
 #      got "Integer overflow in hexadecimal number at utils/zipdetails line 1432.
 Integer overflow in hexadecimal number at utils/zipdetails line 2247.
 Integer overflow in hexadecimal number at utils/zipdetails line 2248.
 Integer overflow in hexadecimal number at utils/zipdetails line 2249.
 Integer overflow in hexadecimal number at utils/zipdetails line 2250.
 Integer overflow in hexadecimal number at utils/zipdetails line 2251.
 Integer overflow in hexadecimal number at utils/zipdetails line 2252.
 Integer overflow in hexadecimal number at utils/zipdetails line 2253.
 Integer overflow in hexadecimal number at utils/zipdetails line 2254.
 utils/zipdetails syntax OK
 "
 # expected "utils/zipdetails syntax OK
 "
 t/porting/utils .................................................. FAILED at test 83

This patch adds a way that utils of this form can exit early with a
warning containing the magic phrase "requires 64 bit integers", in
which case the compile test will be skipped.

I will push a corresponding patch to https://github.com/pmqs/zipdetails
which is the upstream repository for cpan/IO-Compress/bin/zipdetails
which is hosted at https://github.com/pmqs/IO-Compress

This problem seems to have started when IO-Compress 2.105 was merged
in 131aabd.

This includes the fix to IO-Compress 2.106, and should now pass tests on 32 bit perls (it does on my local test builds).

This also includes a fix for our github pipelines that was caused by the fix for the git CVE-2022-24765.

@pmqs
Copy link
Contributor

pmqs commented Apr 12, 2022

@demerphq I just know that I'll mess about with the message you added in zipdetails. I can make sure that the string "requires 64 bit integers" is still present, but an exclusion list feels more robust.

@demerphq
Copy link
Collaborator Author

demerphq commented Apr 12, 2022 via email

 # Failed test 83 - utils/zipdetails compiles at porting/utils.t line 85
 #      got "Integer overflow in hexadecimal number at utils/zipdetails line 1432.
 Integer overflow in hexadecimal number at utils/zipdetails line 2247.
 Integer overflow in hexadecimal number at utils/zipdetails line 2248.
 Integer overflow in hexadecimal number at utils/zipdetails line 2249.
 Integer overflow in hexadecimal number at utils/zipdetails line 2250.
 Integer overflow in hexadecimal number at utils/zipdetails line 2251.
 Integer overflow in hexadecimal number at utils/zipdetails line 2252.
 Integer overflow in hexadecimal number at utils/zipdetails line 2253.
 Integer overflow in hexadecimal number at utils/zipdetails line 2254.
 utils/zipdetails syntax OK
 "
 # expected "utils/zipdetails syntax OK
 "
 t/porting/utils .................................................. FAILED at test 83

This patch adds a way that utils of this form can exit early with a
warning containing the magic phrase "requires 64 bit integers", in
which case the compile test will be skipped.

I will push a corresponding patch to https://github.com/pmqs/zipdetails
which is the upstream repository for cpan/IO-Compress/bin/zipdetails
which is hosted at https://github.com/pmqs/IO-Compress

This problem seems to have started when IO-Compress 2.105 was merged
in 131aabd.
This allows change allows us to detect that zipdetails does not work
properly on a 32 bit perl and avoid t/porting/utils.t test failures
from the warnings it produces when compiled on a 32 bit perl, there
are no other functionality changes from 2.105
@demerphq demerphq force-pushed the yves/let_utils_skip_32_bit_porting_utils_tests branch from 9821921 to e1cb5e9 Compare April 13, 2022 02:41
@demerphq demerphq changed the title Add a way to skip utils/ files that need 64 bit ints Update IO-Compress to 2.106 and add a way to skip utils/ files that need 64 bit ints Apr 13, 2022
We need to configure git to know that our working directory is "safe".

This fixes this bug on github:

    Run git remote set-url origin "***[github.com/$GITHUB_REPOSITORY](http://github.com/$GITHUB_REPOSITORY)"
    fatal: unsafe repository ('/__w/perl5/perl5' is owned by someone else)
    To add an exception for this directory, call:

    git config --global --add safe.directory /__w/perl5/perl5
    Process completed with exit code 128.

See the git mailing list for more details on this CVE.
@demerphq demerphq force-pushed the yves/let_utils_skip_32_bit_porting_utils_tests branch from ddebe84 to 2323e2d Compare April 13, 2022 04:46
@demerphq
Copy link
Collaborator Author

Given that this PR changes very little actual core code, and that is only a porting test, primarily involves an update to IO-Compress which involved patches that required co-ordination with its maintainer, and fixes issues that break our entire CI pipeline, eg:

Run git remote set-url origin "***[github.com/$GITHUB_REPOSITORY](http://github.com/$GITHUB_REPOSITORY)"
fatal: unsafe repository ('/__w/perl5/perl5' is owned by someone else)
To add an exception for this directory, call:

git config --global --add safe.directory /__w/perl5/perl5
Process completed with exit code 128.

I am merging it right now. Note it passed all tests before I did this. The final forced push just updated the commit message for the fix for the above bug.

@demerphq demerphq merged commit 4303fd2 into blead Apr 13, 2022
@demerphq demerphq deleted the yves/let_utils_skip_32_bit_porting_utils_tests branch April 13, 2022 04:47
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

2 participants