Repository: conda-forge/qt-main-feedstock
Pull request #337: Rebuild qt5 without mysql
Author: login: conda-forge-admin
Created: 2025-05-07T12:54:56Z | Merged: 2025-05-12T04:15:20Z

This follows the discussion in #335.

Where it seems that mysql was likely added a while back with little direct explination as to the need, and being linux only, means it likely isn't getting that many active users.

this removes it for qt 5.15.

There should be a bot that comes in to update the dependency to 9.3, the last build was 9.0 with mysql-devel 9.0

by: @hmaarrfk


Diff:
diff --git a/.ci_support/linux_64_.yaml b/.ci_support/linux_64_.yaml
index a96043e4..55f588b8 100644
--- a/.ci_support/linux_64_.yaml
+++ b/.ci_support/linux_64_.yaml
@@ -33,7 +33,7 @@ glib:
 gstreamer:
 - '1.24'
 harfbuzz:
-- '11'
+- 11.0.1
 icu:
 - '75'
 krb5:
@@ -51,7 +51,7 @@ libsqlite:
 libxcb:
 - '1'
 libxml2:
-- '2'
+- '2.13'
 nspr:
 - '4'
 nss:
diff --git a/.ci_support/linux_aarch64_.yaml b/.ci_support/linux_aarch64_.yaml
index a6d0f228..8ac672af 100644
--- a/.ci_support/linux_aarch64_.yaml
+++ b/.ci_support/linux_aarch64_.yaml
@@ -33,7 +33,7 @@ glib:
 gstreamer:
 - '1.24'
 harfbuzz:
-- '11'
+- 11.0.1
 icu:
 - '75'
 krb5:
@@ -51,7 +51,7 @@ libsqlite:
 libxcb:
 - '1'
 libxml2:
-- '2'
+- '2.13'
 nspr:
 - '4'
 nss:
diff --git a/.ci_support/linux_ppc64le_.yaml b/.ci_support/linux_ppc64le_.yaml
index 921fb6cb..59446daa 100644
--- a/.ci_support/linux_ppc64le_.yaml
+++ b/.ci_support/linux_ppc64le_.yaml
@@ -33,7 +33,7 @@ glib:
 gstreamer:
 - '1.24'
 harfbuzz:
-- '11'
+- 11.0.1
 icu:
 - '75'
 krb5:
@@ -51,7 +51,7 @@ libsqlite:
 libxcb:
 - '1'
 libxml2:
-- '2'
+- '2.13'
 nspr:
 - '4'
 nss:
diff --git a/.ci_support/migrations/harfbuzz11.yaml b/.ci_support/migrations/harfbuzz11.yaml
deleted file mode 100644
index b566885a..00000000
--- a/.ci_support/migrations/harfbuzz11.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-__migrator:
-  build_number: 1
-  commit_message: Rebuild for harfbuzz 11
-  kind: version
-  migration_number: 1
-harfbuzz:
-- '11'
-migrator_ts: 1743088015.7278726
diff --git a/.ci_support/migrations/libboost186.yaml b/.ci_support/migrations/libboost186.yaml
deleted file mode 100644
index 001c6a63..00000000
--- a/.ci_support/migrations/libboost186.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
-__migrator:
-  build_number: 1
-  kind: version
-  commit_message: "Rebuild for libboost 1.86"
-  migration_number: 1
-assimp:
-- 5.4.2
-libboost_devel:
-- "1.86"
-libboost_headers:
-- "1.86"
-libboost_python_devel:
-- "1.86"
-migrator_ts: 1723764795.6693385
diff --git a/.scripts/run_docker_build.sh b/.scripts/run_docker_build.sh
index 00f377a8..6ee04aa1 100755
--- a/.scripts/run_docker_build.sh
+++ b/.scripts/run_docker_build.sh
@@ -12,7 +12,7 @@ source .scripts/logging_utils.sh
 set -xeo pipefail
 
 THISDIR="$( cd "$( dirname "$0" )" >/dev/null && pwd )"
-PROVIDER_DIR="$(basename $THISDIR)"
+PROVIDER_DIR="$(basename "$THISDIR")"
 
 FEEDSTOCK_ROOT="$( cd "$( dirname "$0" )/.." >/dev/null && pwd )"
 RECIPE_ROOT="${FEEDSTOCK_ROOT}/recipe"
diff --git a/.scripts/run_win_build.bat b/.scripts/run_win_build.bat
index 283e1438..297498b1 100755
--- a/.scripts/run_win_build.bat
+++ b/.scripts/run_win_build.bat
@@ -25,7 +25,7 @@ set "MICROMAMBA_EXE=%MICROMAMBA_TMPDIR%\micromamba.exe"
 
 echo Downloading micromamba %MICROMAMBA_VERSION%
 if not exist "%MICROMAMBA_TMPDIR%" mkdir "%MICROMAMBA_TMPDIR%"
-certutil -urlcache -split -f "%MICROMAMBA_URL%" "%MICROMAMBA_EXE%"
+powershell -ExecutionPolicy Bypass -Command "(New-Object Net.WebClient).DownloadFile('%MICROMAMBA_URL%', '%MICROMAMBA_EXE%')"
 if !errorlevel! neq 0 exit /b !errorlevel!
 
 echo Creating environment
diff --git a/build-locally.py b/build-locally.py
index c4a56c66..02c23747 100755
--- a/build-locally.py
+++ b/build-locally.py
@@ -10,6 +10,7 @@
 import os
 import platform
 import subprocess
+import sys
 from argparse import ArgumentParser
 
 
@@ -44,10 +45,19 @@ def run_osx_build(ns):
     subprocess.check_call([script])
 
 
+def run_win_build(ns):
+    script = ".scripts/run_win_build.bat"
+    subprocess.check_call(["cmd", "/D", "/Q", "/C", f"CALL {script}"])
+
+
 def verify_config(ns):
+    choices_filter = ns.filter or "*"
     valid_configs = {
-        os.path.basename(f)[:-5] for f in glob.glob(".ci_support/*.yaml")
+        os.path.basename(f)[:-5]
+        for f in glob.glob(f".ci_support/{choices_filter}.yaml")
     }
+    if choices_filter != "*":
+        print(f"filtering for '{choices_filter}.yaml' configs")
     print(f"valid configs are {valid_configs}")
     if ns.config in valid_configs:
         print("Using " + ns.config + " configuration")
@@ -60,30 +70,37 @@ def verify_config(ns):
         selections = list(enumerate(sorted(valid_configs), 1))
         for i, c in selections:
             print(f"{i}. {c}")
-        s = input("\n> ")
+        try:
+            s = input("\n> ")
+        except KeyboardInterrupt:
+            print("\nno option selected, bye!", file=sys.stderr)
+            sys.exit(1)
         idx = int(s) - 1
         ns.config = selections[idx][1]
         print(f"selected {ns.config}")
     else:
         raise ValueError("config " + ns.config + " is not valid")
-    # Remove the following, as implemented
-    if ns.config.startswith("win"):
-        raise ValueError(
-            f"only Linux/macOS configs currently supported, got {ns.config}"
+    if (
+        ns.config.startswith("osx")
+        and platform.system() == "Darwin"
+        and not os.environ.get("OSX_SDK_DIR")
+    ):
+        raise RuntimeError(
+            "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' "
+            "to download the SDK automatically to '$PWD/SDKs/MacOSX<ver>.sdk'. "
+            "Note: OSX_SDK_DIR must be set to an absolute path. "
+            "Setting this variable implies agreement to the licensing terms of the SDK by Apple."
         )
-    elif ns.config.startswith("osx"):
-        if "OSX_SDK_DIR" not in os.environ:
-            raise RuntimeError(
-                "Need OSX_SDK_DIR env variable set. Run 'export OSX_SDK_DIR=$PWD/SDKs' "
-                "to download the SDK automatically to '$PWD/SDKs/MacOSX<ver>.sdk'. "
-                "Note: OSX_SDK_DIR must be set to an absolute path. "
-                "Setting this variable implies agreement to the licensing terms of the SDK by Apple."
-            )
 
 
 def main(args=None):
     p = ArgumentParser("build-locally")
     p.add_argument("config", default=None, nargs="?")
+    p.add_argument(
+        "--filter",
+        default=None,
+        help="Glob string to filter which build choices are presented in interactive mode.",
+    )
     p.add_argument(
         "--debug",
         action="store_true",
@@ -104,6 +121,8 @@ def main(args=None):
             run_docker_build(ns)
         elif ns.config.startswith("osx"):
             run_osx_build(ns)
+        elif ns.config.startswith("win"):
+            run_win_build(ns)
     finally:
         recipe_license_file = os.path.join(
             "recipe", "recipe-scripts-license.txt"
diff --git a/recipe/build.sh b/recipe/build.sh
index d0c0262f..cec91eeb 100644
--- a/recipe/build.sh
+++ b/recipe/build.sh
@@ -121,7 +121,6 @@ if [[ $(uname) == "Linux" ]]; then
                 -system-harfbuzz \
                 -system-sqlite \
                 -plugin-sql-sqlite \
-                -plugin-sql-mysql \
                 -plugin-sql-psql \
                 -egl \
                 -eglfs \
@@ -208,6 +207,9 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
     fi
     # On OSX, we use the native secure transport instead of openssl
     # https://forum.qt.io/topic/55853/openssl-and-mac-os-x/7
+    # We explicitely disable the mysql plugin at conda-forge in 2025
+    # If you plan to readd it, we used to use a flag like in the configuration
+    # -I ${PREFIX}/include/mysql
     ../configure -prefix ${PREFIX} \
                 -libdir ${PREFIX}/lib \
                 -bindir ${PREFIX}/bin \
@@ -216,7 +218,6 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
                 -datadir ${PREFIX} \
                 $PLATFORM \
                 -I ${PREFIX}/include \
-                -I ${PREFIX}/include/mysql \
                 -I ${PREFIX}/include/gstreamer-1.0 \
                 -I ${PREFIX}/include/glib-2.0 \
                 -I ${PREFIX}/lib/glib-2.0/include \
@@ -238,7 +239,6 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
                 -system-zlib \
                 -system-sqlite \
                 -plugin-sql-sqlite \
-                -plugin-sql-mysql \
                 -plugin-sql-psql \
                 -qt-freetype \
                 -qt-pcre \
diff --git a/recipe/meta.yaml b/recipe/meta.yaml
index 6da4556e..0afe53d6 100644
--- a/recipe/meta.yaml
+++ b/recipe/meta.yaml
@@ -67,7 +67,7 @@ source:
     folder: opengl32sw                                                                                            # [win64]
 
 build:
-  number: 3
+  number: 4
   detect_binary_files_with_prefix: true
   run_exports:
     - {{ pin_subpackage('qt-main', max_pin='x.x') }}
@@ -132,7 +132,11 @@ requirements:
     - nspr                               # [unix]
     - nss                                # [unix]
     - libsqlite
-    - mysql-devel                        # [not win]
+    # We are deciding not to depend on mysql-devel
+    # to keep this package obviously LGPL licensed
+    # as opposed to "maybe GPL"
+    # https://github.com/conda-forge/qt-main-feedstock/issues/335
+    # - mysql-devel                       # [not win]
     - postgresql                         # [not win]
     - zlib
     - libxcb                             # [linux]


Reviews:
user: login: hmaarrfk
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T13:47:06Z
user: login: hmaarrfk
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T13:47:12Z
user: login: traversaro
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-07T14:12:08Z
user: login: Tobias-Fischer
state: APPROVED
author_association: CONTRIBUTOR
submitted_at: 2025-05-11T04:40:12Z

Review comments:
diff_hunk: @@ -121,7 +121,7 @@ if [[ $(uname) == "Linux" ]]; then
                 -system-harfbuzz \
                 -system-sqlite \
                 -plugin-sql-sqlite \
-                -plugin-sql-mysql \
+                -no-plugin-sql-mysql \
path: recipe/build.sh
user: login: hmaarrfk
body: ```suggestion
```
created_at: 2025-05-07T13:47:06Z
author_association: CONTRIBUTOR
diff_hunk: @@ -238,7 +240,7 @@ if [[ ${HOST} =~ .*darwin.* ]]; then
                 -system-zlib \
                 -system-sqlite \
                 -plugin-sql-sqlite \
-                -plugin-sql-mysql \
+                -no-plugin-sql-mysql \
path: recipe/build.sh
user: login: hmaarrfk
body: ```suggestion
```
created_at: 2025-05-07T13:47:12Z
author_association: CONTRIBUTOR

PR comments:
user: login: conda-forge-admin
created_at: 2025-05-07T12:56:33Z
body: Hi! This is the friendly automated conda-forge-linting service.

I just wanted to let you know that I linted all conda-recipes in your PR (```recipe/meta.yaml```) and found it was in an excellent condition.

I do have some suggestions for making it better though...


For **recipe/meta.yaml**:

 * ℹ️ The feedstock is lowering the image versions for one or more platforms: {'linux_64': 'cos7'} (the default is alma9). Unless you are in the very rare case of repackaging binaryartifacts, consider removing these overrides from conda-forge.yml in the top feedstock directory.


<sub>This message was generated by GitHub Actions workflow run [https://github.com/conda-forge/conda-forge-webservices/actions/runs/14885022658](https://github.com/conda-forge/conda-forge-webservices/actions/runs/14885022658). Examine the logs at this URL for more detail.</sub>

author_association: CONTRIBUTOR
user: login: hmaarrfk
created_at: 2025-05-07T13:06:17Z
body: @conda-forge-admin please rerender
author_association: CONTRIBUTOR
user: login: hmaarrfk
created_at: 2025-05-07T14:10:16Z
body: I won't press merge on this one myself, but if others are interested go for it.
author_association: CONTRIBUTOR
user: login: hmaarrfk
created_at: 2025-05-11T01:59:45Z
body: Perhaps some1 can second @traversaro 's vote, so I can build the appropriate linux packages locally (either mysql 9.3 or None)
author_association: CONTRIBUTOR
user: login: Tobias-Fischer
created_at: 2025-05-11T10:24:58Z
body: Green light from me :)
author_association: CONTRIBUTOR
user: login: hmaarrfk
created_at: 2025-05-12T04:14:24Z
body: [logs.zip](https://github.com/user-attachments/files/20153972/logs.zip)

author_association: CONTRIBUTOR