@@ -52,6 +52,26 @@ matrix_synapse_container_image_customizations_s3_storage_provider_installation_e
52
52
# https://github.com/aws/aws-cli/issues/9214
53
53
matrix_synapse_container_image_customizations_s3_storage_provider_installation_old_boto_workaround_enabled : true
54
54
55
+ # Controls whether to install libldapXX explicitly when installing s3-storage-provider.
56
+ # This is to work around it potentially not being there (after `autoremove` invoked by other scripts cleans it up, etc.)
57
+ #
58
+ # Some scripts in the custom Dockerfile may install and then autoremove git/ssh/openssh-client.
59
+ # This has the side-effect of removing the libldap library that s3-storage-provider depends upon indirectly (via psycopg2).
60
+ #
61
+ # If this should happen, s3-storage-provider (the `s3_media_upload` script) will fail to start with an error like this:
62
+ # > Traceback (most recent call last):
63
+ # > File "/usr/local/bin/s3_media_upload", line 10, in <module>
64
+ # > import psycopg2
65
+ # > File "/usr/local/lib/python3.12/site-packages/psycopg2/__init__.py", line 51, in <module>
66
+ # > from psycopg2._psycopg import ( # noqa
67
+ # > ImportError: libldap-2.5.so.0: cannot open shared object file: No such file or directory
68
+ #
69
+ # The library (e.g. `/usr/lib/x86_64-linux-gnu/libldap-2.5.so.0`) appears to be available by default in the upstream Synapse image for some reason,
70
+ # but it doesn't seem to be installed through a Debian package. Autoremoval would remove it, causing s3-storage-provider to fail.
71
+ # Given that this is a dependency for s3-storage-provider (psycopg2), we prefer to install it explicitly.
72
+ matrix_synapse_container_image_customizations_s3_storage_provider_installation_explicit_libldap_installation_enabled : true
73
+ matrix_synapse_container_image_customizations_s3_storage_provider_installation_explicit_libldap_installation_package_name : libldap-2.5
74
+
55
75
# Controls whether custom build steps will be added to the Dockerfile for installing auto-accept-invite module.
56
76
# The version that will be installed is specified in `matrix_synapse_ext_synapse_auto_accept_invite_version`.
57
77
matrix_synapse_container_image_customizations_auto_accept_invite_installation_enabled : " {{ matrix_synapse_ext_synapse_auto_accept_invite_enabled }}"
0 commit comments