-
-
Notifications
You must be signed in to change notification settings - Fork 266
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
rhel support & ldap support #193
Conversation
please with openldap static link library build reference : https://github.com/jingjingxyk/swoole-cli/blob/new_dev/sapi/src/builder/library/openldap.php#L37 |
@DubbleClick Only libraries supported by static compilation can be added to static-php-cli. Currently, all packages installed by dnf are dynamically linked. So the core point is to write a method that can statically compile the openldap library. |
6335252
to
6a9ec14
Compare
ready for review now, I think everything is working as it should |
For what it's worth, I've only required |
2933374
to
92942ea
Compare
Cleaned up a few last things: enabled ldap for MacOS and moved the source to /php-src/ext/ldap. |
only enable openssl when zlib ext is also enabled (missing 'deflate' otherwise) move back from source/php-src/ext/ldap to source/ldap (fix "LICENSE not found")
When compiling ldap with openssl support, the zlib extension needs to be enabled. If compiled without openssl support, zlib is not required. I didn't put zlib in ext-requires because of that and instead check for openssl lib & zlib extension before enabling --with-tls |
Debian and Alpine has installed perl I guess (with current dependencies). |
My understanding: If you want ldap to support openssl, then it must include the zlib library. This can actually be solved like this: openssl extension adds |
Correct, but Openssl extension itself doesn't require zlib extension. Ldap without tls needs nothing. |
Although the openssl extension does not require the zlib extension, according to the current extension inclusion logic, the zlib extension should be enabled when you include the zlib library, so this is reasonable. |
Documentation Task
|
The doctor command doesn't have notes about specific operating systems. Rhel would just count under linux, I think we have nothing to document there. |
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 tested on my local AlmaLinux VM, and I found that the compilation part worked perfectly, but the doctor part needed some changes: The path was not added correctly when compiling musl. We need to manually write ~/.bashrc
or execute export
once in the current terminal.
I wasn't quite able to get ldap to work when building static-php-cli, but it's trivial on rhel/debian - just run
openldap-devel is called libldap2-dev on debian.
Edit: If you want to add a pipeline for rhel (not required imo) this is the full install script to get things running on rhel.
epel-release is required for most of the things to install, remi only for php 8.2. The default still downloads 8.0 by default, which doesn't work.