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

Handle BSD checksum and file utilities #14690

Merged
merged 2 commits into from
Jul 8, 2024

Conversation

NattyNarwhal
Copy link
Member

@NattyNarwhal NattyNarwhal commented Jun 27, 2024

The BSDs have different checksum utilities than GNU systems do. If we don't see the GNU checksum utilities installed, use the BSD ones, as their output is compatible enough.

Also prefers GNU touch if installed, since it supports non-UTC timestamps.

Fixes GH-14688.

The BSDs have different checksum utilities than GNU systems do. If we
don't see the GNU checksum utilities installed, use the BSD ones, as
their output is compatible enough.

Addresses part of phpGH-14688.
Copy link
Contributor

@ericmann ericmann left a comment

Choose a reason for hiding this comment

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

I ran this locally on my already-working build system to ensure it didn't break things on my end. Everything appears to still be working as expected. I wouldn't mind a second set of eyes, though. But if this un-breaks things for non-GNU users I'm for it!

BSD touch at least in macOS does not handle local timezone in the
timestamp (like 2024-06-27T10:26:23-03:00). As such, try GNU touch (as
ports systems almost always prefix with g if coreutils is installed) and
prefer that if available. It's not the end of the world though if GNU
touch isn't available, as BSD touch on some systems may support it, and
if it doesn't, then it's just timestamps, nothing too serious.
@NattyNarwhal NattyNarwhal changed the title Handle BSD checksum utilities Handle BSD checksum and file utilities Jun 27, 2024
@NattyNarwhal
Copy link
Member Author

The alternative way to solve touch would be to make the git call use TZ=UTC, but I figured that's probably more intricate.

@NattyNarwhal
Copy link
Member Author

NattyNarwhal commented Jul 1, 2024

Would like another review here, as I'm likely going to be using this PR with the alpha2 release so I can do ti on my host system.

Copy link
Member

@adoy adoy left a comment

Choose a reason for hiding this comment

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

Lgtm :)

@NattyNarwhal NattyNarwhal merged commit 3618382 into php:master Jul 8, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

makedist script does not handle non-GNU systems correctly
3 participants