From d153ad33e08ebd6a36318342f5b86369c6a72127 Mon Sep 17 00:00:00 2001 From: Kent Boortz Date: Wed, 13 Oct 2021 19:41:56 +0200 Subject: [PATCH 1/5] ET#72670: Build against bundled Python 3.9.7 on Fedora 35 The Fedora 35 build was added after code freeze and is the only supported platform that uses Python 3.10. Changes in Python 3.10 to remove the old parser module makes the build fail. As a temporary solution, Python 3.9.7 is bundled in Workbench 8.0.27. The already existing solution for EL7 was made more flexible, to be able to specify to "rpmbuild" the Python include directory and the Python library to bundle. In Fedora 35 the "rpmbuild" RPATH check is enabled as a default. This test is disabled until the 3rd party "ogr2ogr" and "ogrinfo" builds are corrected. --- build/mysql-workbench.spec.in | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/build/mysql-workbench.spec.in b/build/mysql-workbench.spec.in index d4f2fab76..4fd99e67c 100644 --- a/build/mysql-workbench.spec.in +++ b/build/mysql-workbench.spec.in @@ -15,6 +15,11 @@ # Enable use of "--with" and "--without" options to "rpmbuld" # +# Temporarily disable the check-rpath run. It is enabled by default on +# Fedora 35. It will complain about "ogr2ogr" and "ogrinfo" that +# contains invalid RPATHS pointing to internal install directories +%global __brp_check_rpaths %{nil} + # Allow to continue when a binary with no build-id was found %undefine _missing_build_ids_terminate_build @@ -51,7 +56,7 @@ # FIXME change so that if not defined, this is a build building # against RPM installed libraries -# %if %{defined bundles_path} +# %%if %%{defined bundles_path} Summary: A MySQL visual database modeling, administration, development and migration tool Name : mysql-workbench-%{edition} @@ -104,22 +109,21 @@ BuildRequires: gdal-devel %if 0%{?rhel} == 7 # Disable execution of automatic bytecompilation of python libs %global __os_install_post %(echo '%{__os_install_post}' | sed -e 's!/usr/lib[^[:space:]]*/brp-python-bytecompile[[:space:]].*$!!g') -%if %{defined python_path} -%define python_lib_path %{python_path}/lib/libpython3.7m.so -%define python_inc_dir %{python_path}/include/python3.7m -%else -# if el7, and python_path is not specified +%endif + +%if !%{defined python_lib_path} || !%{defined python_inc_dir} +%if 0%{?rhel} == 7 +# if el7, and python_lib_path is not specified # then make sure python37-devel is installed BuildRequires: python37-devel %define python_lib_path /usr/lib/libpython3.7m.so %define python_inc_dir /usr/include/python3.7m %endif -%endif - %if 0%{?rhel} == 8 %define python_lib_path /usr/lib64/libpython3.8.so %define python_inc_dir /usr/include/python3.8 %endif +%endif %if 0%{?fedora} >= 18 BuildRequires: libuuid-devel @@ -273,8 +277,8 @@ find %{buildroot}%{_libdir}/mysql-workbench -name \*.la -exec rm {} \; -print # If python path is specified that means we are using pb2 built # python and hence the python (.so) file needs to be bundled with # WB package. -%if %{defined python_path} - cp -a %{python_path}/lib/libpython3.7m.so* %{buildroot}%{_libdir}/mysql-workbench/ +%if %{defined python_lib_path} + cp -a %{python_lib_path}* %{buildroot}%{_libdir}/mysql-workbench/ %endif %post From 97e339444c83ac1b0347d0bd4be73c760e0684f1 Mon Sep 17 00:00:00 2001 From: Gipson Pulla Date: Thu, 14 Oct 2021 23:52:23 +0530 Subject: [PATCH 2/5] ET#72670: Build against bundled Python 3.9.7 on Fedora 35r Adding the fedora35 platform support --- backend/wbprivate/workbench/wb_module.cpp | 2 +- .../tests/backend/wbprivate/workbench/wb_module_specs.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/wbprivate/workbench/wb_module.cpp b/backend/wbprivate/workbench/wb_module.cpp index 22c4cb3da..33d81161f 100644 --- a/backend/wbprivate/workbench/wb_module.cpp +++ b/backend/wbprivate/workbench/wb_module.cpp @@ -218,7 +218,7 @@ int WorkbenchImpl::isOsSupported(const std::string &os) { "Red Hat Enterprise Linux Server release 7", // Oracle 7.1 looks like this: "Red Hat Enterprise Linux Server release // 7.1 (Maipo)" "Red Hat Enterprise Linux release 8", // Oracle 8.0: Red Hat Enterprise Linux release 8.0 (Ootpa) - "Fedora release 33", "Fedora release 34", "CentOS release 7", + "Fedora release 34", "Fedora release 35", "CentOS release 7", "Windows 10", "Windows Server 2016", "Windows Server 2019", diff --git a/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp b/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp index 01a5ac023..a46d51258 100644 --- a/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp +++ b/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp @@ -135,6 +135,7 @@ namespace { $expect(isOsSupportedProxy("Fedora release 32 x86_64")).toBeFalse(); $expect(isOsSupportedProxy("Fedora release 33 x86_64")).toBeTrue(); $expect(isOsSupportedProxy("Fedora release 34 x86_64")).toBeTrue(); + $expect(isOsSupportedProxy("Fedora release 35 x86_64")).toBeTrue(); }); } } From 1ab891b1b8046e1c1e61dddc2b46f9e2af5fa616 Mon Sep 17 00:00:00 2001 From: Gipson Pulla Date: Fri, 15 Oct 2021 12:36:56 +0530 Subject: [PATCH 3/5] follow-up ET#72670: Build against bundled Python 3.9.7 on Fedora 35 adding fedora35 platform support --- .../tests/backend/wbprivate/workbench/wb_module_specs.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp b/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp index a46d51258..f55918be2 100644 --- a/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp +++ b/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp @@ -133,8 +133,8 @@ namespace { $expect(isOsSupportedProxy("Fedora release 30 x86_64")).toBeFalse(); $expect(isOsSupportedProxy("Fedora release 31 x86_64")).toBeFalse(); $expect(isOsSupportedProxy("Fedora release 32 x86_64")).toBeFalse(); - $expect(isOsSupportedProxy("Fedora release 33 x86_64")).toBeTrue(); - $expect(isOsSupportedProxy("Fedora release 34 x86_64")).toBeTrue(); + $expect(isOsSupportedProxy("Fedora release 33 x86_64")).toBeFalse(); + $expect(isOsSupportedProxy("Fedora release 34 x86_64")).toBefalse(); $expect(isOsSupportedProxy("Fedora release 35 x86_64")).toBeTrue(); }); } From 5979433074c4ba161327bf1d1c7b55e4adf33839 Mon Sep 17 00:00:00 2001 From: Gipson Pulla Date: Fri, 15 Oct 2021 16:04:58 +0530 Subject: [PATCH 4/5] follow-up ET#72670: Build against bundled Python 3.9.7 on Fedora 35 added the missing typing error --- .../tests/backend/wbprivate/workbench/wb_module_specs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp b/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp index f55918be2..a06f764e5 100644 --- a/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp +++ b/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp @@ -134,7 +134,7 @@ namespace { $expect(isOsSupportedProxy("Fedora release 31 x86_64")).toBeFalse(); $expect(isOsSupportedProxy("Fedora release 32 x86_64")).toBeFalse(); $expect(isOsSupportedProxy("Fedora release 33 x86_64")).toBeFalse(); - $expect(isOsSupportedProxy("Fedora release 34 x86_64")).toBefalse(); + $expect(isOsSupportedProxy("Fedora release 34 x86_64")).toBeFalse(); $expect(isOsSupportedProxy("Fedora release 35 x86_64")).toBeTrue(); }); } From 1bc5933fe18dafdf49f8576128bdfbef22b1defd Mon Sep 17 00:00:00 2001 From: Gipson Pulla Date: Mon, 18 Oct 2021 12:18:01 +0530 Subject: [PATCH 5/5] follow-up ET#72670: Build against bundled Python 3.9.7 on Fedora 35 added the fedora34 platform list --- .../tests/backend/wbprivate/workbench/wb_module_specs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp b/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp index a06f764e5..8af128762 100644 --- a/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp +++ b/testing/test-suite/tests/backend/wbprivate/workbench/wb_module_specs.cpp @@ -134,7 +134,7 @@ namespace { $expect(isOsSupportedProxy("Fedora release 31 x86_64")).toBeFalse(); $expect(isOsSupportedProxy("Fedora release 32 x86_64")).toBeFalse(); $expect(isOsSupportedProxy("Fedora release 33 x86_64")).toBeFalse(); - $expect(isOsSupportedProxy("Fedora release 34 x86_64")).toBeFalse(); + $expect(isOsSupportedProxy("Fedora release 34 x86_64")).toBeTrue(); $expect(isOsSupportedProxy("Fedora release 35 x86_64")).toBeTrue(); }); }