Skip to content

fix(php-fpm): honor LD_LIBRARY_PATH eatmydata expects #780

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

Merged
merged 1 commit into from
Jun 19, 2024
Merged

Conversation

sjinks
Copy link
Member

@sjinks sjinks commented Jun 19, 2024

eatmydata in Ubuntu is a bit broken: it sets the LD_LIBRARY_PATH environment variable to /usr/lib/libeatmydata:

   LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+"$LD_LIBRARY_PATH:"}/usr/lib/libeatmydata
   LD_PRELOAD=${LD_PRELOAD:+"$LD_PRELOAD "}libeatmydata.so
   export LD_LIBRARY_PATH LD_PRELOAD

However, libeatmydata.so is located in a platform-dependent location, /usr/lib/$(uname -m)-linux-gnu.

This PR creates the /usr/lib/libeatmydata directory and symlinks all files matching /usr/lib/$(uname -m)-linux-gnu/libeatmydata.so* into it.

@sjinks sjinks self-assigned this Jun 19, 2024
@sjinks sjinks requested a review from a team as a code owner June 19, 2024 03:14
Copy link

Trivy Scan Report

ghcr.io/automattic/vip-container-images/php-fpm:8.1 (ubuntu 22.04)

No vulnerabilities found.

Copy link

Trivy Scan Report

ghcr.io/automattic/vip-container-images/php-fpm:8.2 (ubuntu 22.04)

No vulnerabilities found.

Copy link

Trivy Scan Report

ghcr.io/automattic/vip-container-images/php-fpm:8.3 (ubuntu 24.04)

No vulnerabilities found.

@sjinks sjinks merged commit 962954f into master Jun 19, 2024
4 checks passed
@sjinks sjinks deleted the fix/eatmydata branch June 19, 2024 03:45
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.

1 participant