-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
PECL package: .so filename and package name can differ #262
Comments
You are right. Kind of weird that the package is named zmq and you need to refer to it as zmq-beta... Also I think this should be part of phansible web and not role logic. |
In my opinion this should be threated as edge case, generally install beta packages shouldn't be the norm. What I'm afraid of is that we might end up needing to handle way too many exceptions |
We could start simple. Just fix this use case and see if any more arises. Seems ok? |
+1 for approach of @naxhh: start simple, see where this potentially lands. |
I still think we shouldn't support this, reason being that in order to fix this the code will look something like if ($lib == 'zmq-beta') {
$configFile = 'zmq.ini;
$extensionFile = 'zmq.so;
} Which is something I'd rather avoid if possible for the obvious reasons I exposed earlier. |
Let me think about this. It's true that beta packages are not in our scope. |
@naxhh I've been thinking about this too. If you zoom back a bit, you'll notice that Phansible is already pretty opinionated: you can only choose from a list of preselected stable PHP versions, base boxes,... from the interface. The PECL dropdown doesn't even list the ZMQ package: it's not possible to select it. But that's just the interface of Phansible. Then there's also the Ansible playbook that Phansible generates based of the selected configuration: this is where my use case comes in: I hacked the generated playbook directly. The structure of the playbook makes an assumption about the naming of the PECL package vs. the actual filename of the .so module. => I think it's fine to keep the visible interface (as seen on phansible.com) as is: Phanisble should always generate a usable, functional - albeit opinionated - baseline which can be hacked/tweaked on a per use case basis. |
I think we can probably do something clever. Yesterday I discovered on galaxy this role: https://github.com/ansible-roles/ansible-role-php_pecl It doesn't solve the problem but it gave me some ideas about how to workaround it in a flexible way. I'll try to do something about this issue today if I can cut some time from other projects. |
@netsensei just a quick apologetic message to let you know I didn't forget you, I've simply being a bit busy but now I'm back and I'm going to clear the backlog ;) |
I'm trying to install zmq-beta extension (https://pecl.php.net/package/zmq) as a PECL package via phansible. I've noticed that the phansible assumes that the .so filename of the extension, and the name of of the PECL package are one and the same. The value of the item variable in
php/templates/extension.tpl
is derived fromphp.pecl_packages
invars/all.yml
.However, this assumption isn't always true. As is in the case of the ZMQ extension.
In my
vars/all.yml
file:This results in a
/etc/php5/mods-available/zmq-beta.ini
file with this contents:However, the zmq-beta.so file does not exist:
Currently, I can get around this by introducing an extra task to my playbook which renames the zmq.so file to zmq-beta.so. But wondering if we could provide an optional override in
all.yml
instead.The text was updated successfully, but these errors were encountered: