Skip to content

Commit 960901b

Browse files
committed
BUG32789076: MSI is missing required libraries to use auth_ldap_client plugin
Windows MSI installer distributes authentication_ldap_client.dll but this requires other libraries to work, namely libsasl.dll, saslSCRAM.dll and libcrypto-1_1-x64.dll who were missing from the MSI installer, this patch includes these files in mysql/vendor and the plugin file in mysql/vendor/plugin.
1 parent 4db801f commit 960901b

File tree

8 files changed

+512
-476
lines changed

8 files changed

+512
-476
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ v8.0.26
1515
- WL#14542: Deprecate TLS 1.0 and 1.1
1616
- WL#14440: Support for authentication_kerberos_client authentication plugin
1717
- WL#14237: Support query attributes
18+
- BUG#32789076: MSI is missing required libraries to use auth_ldap_client plugin
1819
- BUG#32778827: Raise an error if the _id is different when replacing a document
1920
- BUG#32740486: Fix typo in docstring
2021
- BUG#32623479: The X DevAPI returns str for binary types values

cpydist/__init__.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,10 @@ def _copy_vendor_libraries(self):
293293
src = os.path.join(src_folder, filename)
294294
dst = os.path.join(os.getcwd(), self.vendor_folder, dst_folder)
295295
self.log.info("copying %s -> %s", src, dst)
296-
shutil.copy(src, dst)
296+
self.log.info("shutil res: %s", shutil.copy(src, dst))
297297

298298
if os.name == "nt":
299-
self.distribution.package_data = {"mysql": ["vendor/*"]}
300-
return
299+
self.distribution.package_data = {"mysql": ["vendor/plugin/*"]}
301300
elif bundle_plugin_libs:
302301
# Bundle SASL libs
303302
sasl_libs_path = os.path.join(self.with_mysql_capi, "lib",

cpydist/bdist_msi.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def _create_msi(self, dry_run=0):
400400
params["HaveCExt{}{}".format(*ver)] = 1
401401
if os.path.exists(
402402
os.path.join(self.pyver_bdist_paths[py_ver],
403-
"mysql", "vendor",
403+
"mysql", "vendor", "plugin",
404404
"authentication_ldap_sasl_client.dll")):
405405
params["HaveLdapLibs{}{}".format(*ver)] = 1
406406

cpydist/data/msi/PY36.wxs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@
137137
<DirectoryRef Id="VendorDir36">
138138
<?if $(var.HaveLdapLibs36) = 1 ?>
139139
<Component Id="Vendor36" Guid="3fdebba4-be39-11ea-b0cc-04ea56793316" Win64="$(var.Win64)">
140-
<File Id="authentication_ldap_sasl_client36" Name="authentication_ldap_sasl_client.dll"
141-
Source="$(var.BDist36)\mysql\vendor\authentication_ldap_sasl_client.dll" DiskId="1"/>
142140
<File Id="libsasl36" Name="libsasl.dll"
143141
Source="$(var.BDist36)\mysql\vendor\libsasl.dll" DiskId="1"/>
144142
<File Id="libcrypto_1_136" Name="libcrypto-1_1-x64.dll"
@@ -148,6 +146,14 @@
148146
</Component>
149147
<?endif?>
150148
</DirectoryRef>
149+
<DirectoryRef Id="VendorPluginDir36">
150+
<?if $(var.HaveLdapLibs36) = 1 ?>
151+
<Component Id="VendorPlugin36" Guid="8830be75-a2d3-4acc-99c1-df586727b9fa" Win64="$(var.Win64)">
152+
<File Id="authentication_ldap_sasl_client36" Name="authentication_ldap_sasl_client.dll"
153+
Source="$(var.BDist36)\mysql\vendor\plugin\authentication_ldap_sasl_client.dll" DiskId="1"/>
154+
</Component>
155+
<?endif?>
156+
</DirectoryRef>
151157

152158
<DirectoryRef Id="ConnectorPackageDir36">
153159
<Component Id="ConnectorPackage36" Guid="412d7a24-a28e-4d08-a9f8-bf059ea4a802" Win64="$(var.Win64)">

cpydist/data/msi/PY37.wxs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@
137137
<DirectoryRef Id="VendorDir37">
138138
<?if $(var.HaveLdapLibs37) = 1 ?>
139139
<Component Id="Vendor37" Guid="103f2914-be39-11ea-98b1-04ea56793316" Win64="$(var.Win64)">
140-
<File Id="authentication_ldap_sasl_client37" Name="authentication_ldap_sasl_client.dll"
141-
Source="$(var.BDist37)\mysql\vendor\authentication_ldap_sasl_client.dll" DiskId="1"/>
142140
<File Id="libsasl37" Name="libsasl.dll"
143141
Source="$(var.BDist37)\mysql\vendor\libsasl.dll" DiskId="1"/>
144142
<File Id="libcrypto_1_137" Name="libcrypto-1_1-x64.dll"
@@ -148,6 +146,14 @@
148146
</Component>
149147
<?endif?>
150148
</DirectoryRef>
149+
<DirectoryRef Id="VendorPluginDir37">
150+
<?if $(var.HaveLdapLibs37) = 1 ?>
151+
<Component Id="VendorPlugin37" Guid="7c487c4b-0fc4-4a20-a307-48eda80da147" Win64="$(var.Win64)">
152+
<File Id="authentication_ldap_sasl_client37" Name="authentication_ldap_sasl_client.dll"
153+
Source="$(var.BDist37)\mysql\vendor\plugin\authentication_ldap_sasl_client.dll" DiskId="1"/>
154+
</Component>
155+
<?endif?>
156+
</DirectoryRef>
151157

152158
<DirectoryRef Id="ConnectorPackageDir37">
153159
<Component Id="ConnectorPackage37" Guid="d74397aa-96b6-4e0d-9db8-6873b296489e" Win64="$(var.Win64)">

cpydist/data/msi/PY38.wxs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@
137137
<DirectoryRef Id="VendorDir38">
138138
<?if $(var.HaveLdapLibs38) = 1 ?>
139139
<Component Id="Vendor38" Guid="681a48cd-be38-11ea-84eb-04ea56793316" Win64="$(var.Win64)">
140-
<File Id="authenticationldapsaslclient38" Name="authentication_ldap_sasl_client.dll"
141-
Source="$(var.BDist38)\mysql\vendor\authentication_ldap_sasl_client.dll" DiskId="1"/>
142140
<File Id="libsasl38" Name="libsasl.dll"
143141
Source="$(var.BDist38)\mysql\vendor\libsasl.dll" DiskId="1"/>
144142
<File Id="libcrypto_1_138" Name="libcrypto-1_1-x64.dll"
@@ -148,6 +146,14 @@
148146
</Component>
149147
<?endif?>
150148
</DirectoryRef>
149+
<DirectoryRef Id="VendorPluginDir38">
150+
<?if $(var.HaveLdapLibs38) = 1 ?>
151+
<Component Id="VendorPlugin38" Guid="52bec466-d076-4da3-86d6-8ed0a84fc360" Win64="$(var.Win64)">
152+
<File Id="authentication_ldap_sasl_client38" Name="authentication_ldap_sasl_client.dll"
153+
Source="$(var.BDist38)\mysql\vendor\plugin\authentication_ldap_sasl_client.dll" DiskId="1"/>
154+
</Component>
155+
<?endif?>
156+
</DirectoryRef>
151157

152158
<DirectoryRef Id="ConnectorPackageDir38">
153159
<Component Id="ConnectorPackage38" Guid="9915296f-c91c-4df0-b6bf-2e0686fedc3a" Win64="$(var.Win64)">

cpydist/data/msi/PY39.wxs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,6 @@
137137
<DirectoryRef Id="VendorDir39">
138138
<?if $(var.HaveLdapLibs39) = 1 ?>
139139
<Component Id="Vendor39" Guid="ba33e641-5337-4e26-9db5-4c8084b48b3f" Win64="$(var.Win64)">
140-
<File Id="authenticationldapsaslclient39" Name="authentication_ldap_sasl_client.dll"
141-
Source="$(var.BDist39)\mysql\vendor\authentication_ldap_sasl_client.dll" DiskId="1"/>
142140
<File Id="libsasl39" Name="libsasl.dll"
143141
Source="$(var.BDist39)\mysql\vendor\libsasl.dll" DiskId="1"/>
144142
<File Id="libcrypto_1_139" Name="libcrypto-1_1-x64.dll"
@@ -148,6 +146,14 @@
148146
</Component>
149147
<?endif?>
150148
</DirectoryRef>
149+
<DirectoryRef Id="VendorPluginDir39">
150+
<?if $(var.HaveLdapLibs39) = 1 ?>
151+
<Component Id="VendorPlugin39" Guid="ca2723f9-d058-4091-a8cb-53107f14f306" Win64="$(var.Win64)">
152+
<File Id="authenticationldapsaslclient39" Name="authentication_ldap_sasl_client.dll"
153+
Source="$(var.BDist39)\mysql\vendor\plugin\authentication_ldap_sasl_client.dll" DiskId="1"/>
154+
</Component>
155+
<?endif?>
156+
</DirectoryRef>
151157

152158
<DirectoryRef Id="ConnectorPackageDir39">
153159
<Component Id="ConnectorPackage39" Guid="e877179a-33bf-43e4-82c6-98ae2fd2e98a" Win64="$(var.Win64)">

0 commit comments

Comments
 (0)