Repository navigation
[php] Add gcc-libs to pkg_deps #1946
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
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| <? | ||
| # The below will exit with a fatal error if libzip is not supported. | ||
| $za = new ZipArchive; | ||
| echo("Libzip is supported.\n"); | ||
| ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -euo pipefail | ||
|
|
||
| if [[ -z "${1:-}" ]]; then | ||
| echo "Usage: test.sh <fully qualified package ident>" | ||
| echo | ||
| echo "ex: test.sh core/php/7.2.8/20181108151533" | ||
| exit 1 | ||
| fi | ||
|
|
||
| pkg_ident=${1} | ||
|
|
||
| # This depends on the package being present on the depot OR | ||
| # in your local cache. If you're testing locally this is a | ||
| # reasonably safe assumption to make, as long as the cache | ||
| # isn't cleaned aggressively | ||
| hab pkg install "$pkg_ident" | ||
|
|
||
| hab pkg exec "$pkg_ident" php "$(dirname "$0")"/libzip_support.php |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will break libzip support!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote the comment, and it's wrong 😞. The underlying issue was that
core/gcc-libswasn't in thepkg_depstherefore theconftestbinaries were unable to execute, not that the path was being manipulated.The above LD_LIBRARY_PATH modifies only the runtime for
./configureand has no effect on commands executed later in the build, or in the runtime for the php package. Since this change addscore/gcc-libsto thepkg_deps,./configureis able complete successfully without setting LD_LIBRARY_PATH, so LD_LIBRARY_PATH and the comment can safely be removed.I've put together a small test case to validate. Note: I'm not a php dev, so suggestions on correctness are welcome 😄
Given the following php:
When executing it under core/php/7.2.8/20181008145855 (current stable):
When executed it on a build with these changes:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 👍 💯 🥇
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@smacfarlane How about adding these steps to a test we can include? That would prevent any zip regression in the future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@predominant Done!
@universam1 Does the above address your concerns?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, I’ll try!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@universam1 I'm going to merge this, please open an issue if the resulting packages do not contain libzip support.