Externalize `buildRequiredPackageLists`
Introduction
While inspecting the script I noticed that runtime dependencies of the extensions are hardcoded into the script without the possibility to use this data elsewhere.
I'd like to propose storing these permanent and volatile dependencies, collected in the buildRequiredPackageLists function, elsewhere, in a JSON file for example.
Background
For a corporate project we're pre-building Php extensions targeting a fixed environment. In it's current state permanent and volatile dependencies are also hardcoded in a script of ours.
Benefits
Providing permanent and volatile dependencies in a machine-readable way would bring the following benefits imo :
- Folks not building for Debian or Alpine can get a better overview of packages they should look for in their distribution.
- Pre-building extensions comes without the hassle of manually collecting the required runtime dependencies.
Please let me know what you think and what possibilities you see in achieving this functionality.
Dependencies vary depending on the operating system version, the PHP version, and the version of the extensions you want to preinstall. So, no, I don't think it's possible to pre-define the list of system libraries to install. If you really need to, use the script to install what you need and capture the lines printed on the screen listing the libraries.