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

php.buildPecl: Make it possible for PECLs to depend on other PECLs, fix apcu_bc and couchbase #86614

Merged
merged 4 commits into from May 10, 2020

Conversation

talyz
Copy link
Contributor

@talyz talyz commented May 2, 2020

Motivation for this change
  • Some PECLs depend on other PECLs and, like internal PHP extension dependencies, need to be loaded in the correct order. This makes this possible by adding the argument peclDeps to buildPecl, which adds the extension to buildInputs and is treated the same way as
    internalDeps when the extension config is generated.

  • Fix an issue brought up in PHP Module Rdkafka #86463, where the apcu_bc extension isn't loaded correctly since it produces a .so with a different name than the extension name. Also, the apcu extension has to be loaded and loaded prior to loading this extension.

  • The couchbase extension depends on the igbinary PECL which needs to be loaded and loaded prior to it. It also seems like the pcs extension isn't actually needed - it at least builds and loads without it. Since the pcs extension dependency was the reason couchbase didn't build on
    PHP 7.4 it now does. I don't have any couchbase testing setup, though, so I can't verify that the extension really works - if anyone does, help with testing would be greatly appreciated.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@talyz talyz requested a review from etu as a code owner May 2, 2020 21:42
@talyz talyz requested review from aanderse and Ma27 May 2, 2020 21:43
@ofborg ofborg bot requested review from globin, ajs124 and dasJ May 2, 2020 21:50
@talyz talyz changed the title php.buildpecl: Make it possible for PECLs to depend on other PECLs, fix apcu_bc and couchbase php.buildPecl: Make it possible for PECLs to depend on other PECLs, fix apcu_bc and couchbase May 3, 2020
talyz added 4 commits May 9, 2020 23:38
Some PECLs depend on other PECLs and, like internal PHP extension
dependencies, need to be loaded in the correct order. This makes this
possible by adding the argument "peclDeps" to buildPecl, which adds
the extension to buildInputs and is treated the same way as
internalDeps when the extension config is generated.
Fix an issue brought up in NixOS#86463, where the apcu_bc extension isn't
loaded correctly since it produces a .so with a different name than
the extension name. Also, the apcu extension has to be loaded and
loaded prior to loading this extension.
The pcs extension fails to load at runtime with PHP 7.3, so let's mark
it broken from 7.3 onwards. It also depends on the tokenizer internal
extension.
The couchbase extension depends on the igbinary PECL which needs to be
loaded and loaded prior to it. It also seems like the pcs extension
isn't actually needed - it at least builds and loads without it. Since
the pcs extension dependency was the reason couchbase didn't build on
PHP 7.4 it now does, so let's unmark it broken.
@talyz talyz merged commit e4efa8b into NixOS:master May 10, 2020
@talyz talyz deleted the php-buildpecl-pecldeps branch May 10, 2020 10:37
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.

None yet

1 participant