From b893cba9b6bd05c1fd9f2fb6f9cc5f32f5073d6c Mon Sep 17 00:00:00 2001 From: Nick Liu Date: Thu, 22 Jun 2023 20:46:10 -0500 Subject: [PATCH] CI: Fix acceptance test setup failure MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should fix this SaltStack error: ``` [ERROR ] Command '/opt/saltstack/salt/salt-pip' failed with return code: 1 [ERROR ] stdout: Collecting mysqlclient Downloading mysqlclient-2.2.0.tar.gz (89 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 10.5 MB/s eta 0:00:00 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' [ERROR ] stderr: error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [24 lines of output] /bin/sh: 1: pkg-config: not found /bin/sh: 1: pkg-config: not found Trying pkg-config --exists mysqlclient Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127. Trying pkg-config --exists mariadb Command 'pkg-config --exists mariadb' returned non-zero exit status 127. Traceback (most recent call last): File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in main() File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 154, in File "", line 48, in get_config_posix File "", line 27, in find_package_name Exception: Can not find valid pkg-config name. Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. [ERROR ] retcode: 1 [ERROR ] Failed to install packages: mysqlclient. Error: Collecting mysqlclient Downloading mysqlclient-2.2.0.tar.gz (89 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 10.5 MB/s eta 0:00:00 Installing build dependencies: started Installing build dependencies: finished with status 'done' Getting requirements to build wheel: started Getting requirements to build wheel: finished with status 'error' error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [24 lines of output] /bin/sh: 1: pkg-config: not found /bin/sh: 1: pkg-config: not found Trying pkg-config --exists mysqlclient Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127. Trying pkg-config --exists mariadb Command 'pkg-config --exists mariadb' returned non-zero exit status 127. Traceback (most recent call last): File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 351, in main() File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 333, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "/opt/saltstack/salt/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-8d1ymhy3/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup exec(code, locals()) File "", line 154, in File "", line 48, in get_config_posix File "", line 27, in find_package_name Exception: Can not find valid pkg-config name. Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output. note: This error originates from a subprocess, and is likely not a problem with pip. [ERROR ] State 'mysql_user.present' was not found in SLS 'e107-dev' Reason: 'mysql_user' __virtual__ returned False: mysql module could not be loaded [ERROR ] State 'mysql_user.present' was not found in SLS 'e107-dev' Reason: 'mysql_user' __virtual__ returned False: mysql module could not be loaded [ERROR ] State 'mysql_database.present' was not found in SLS 'e107-dev' Reason: 'mysql_database' __virtual__ returned False: mysql module could not be loaded ``` --- e107_tests/lib/ci/salt/states/e107-dev.sls | 1 + 1 file changed, 1 insertion(+) diff --git a/e107_tests/lib/ci/salt/states/e107-dev.sls b/e107_tests/lib/ci/salt/states/e107-dev.sls index fe9ff3da7..ffc6e1e5e 100644 --- a/e107_tests/lib/ci/salt/states/e107-dev.sls +++ b/e107_tests/lib/ci/salt/states/e107-dev.sls @@ -3,6 +3,7 @@ Install Python module build dependencies: - pkgs: - build-essential - libmariadb-dev + - pkg-config MySQLdb Python module for SaltStack: pip.installed: