Skip to content

OpenBSD: correct post-Neon package names to python3 versions#1801

Merged
krionbsd merged 2 commits intosaltstack:developfrom
delucks:develop
Apr 26, 2022
Merged

OpenBSD: correct post-Neon package names to python3 versions#1801
krionbsd merged 2 commits intosaltstack:developfrom
delucks:develop

Conversation

@delucks
Copy link
Contributor

@delucks delucks commented Feb 13, 2022

What does this PR do?

This corrects the process of git-based bootstrapping on OpenBSD. Previously, when bootstrapping a post-Neon git installation, the bootstrap script would install the packages "py-pip" and "py-setuptools", which are for python2. This results in an error finding pip, as post-Neon installs use python3. By changing the package names to the python3 versions, the bootstrap script can continue successfully for git-based installations.

What issues does this PR fix or reference?

This fixes #1800.

Previous Behavior

See #1800 for command output, bootstrapping fails when searching for the installed pip.

New Behavior

Bootstrapping continues past the git setup step and on to the actual installation:

 *  INFO: Cloning Salt's git repository succeeded 
Update candidates: quirks-4.54 -> quirks-4.54                                                     quirks-4.54 signed on 2022-02-12T18:54:43Z                                                        
Adding py3-pip-20.3.4p0:partial-python-3.8.12->python-3.8.12                                      
py3-pip-20.3.4p0:python-3.8.12 (extracting)                                                       
py3-pip-20.3.4p0:python-3.8.12 (skipping) 
py3-pip-20.3.4p0:partial-python-3.8.12 (deleting)        
py3-pip-20.3.4p0:python-3.8.12 (installing)                                                       Adding py3-pip-20.3.4p0:partial-python-3.8.12->python-3.8.12                                      Adding py3-pip-20.3.4p0:py3-setuptools-57.4.0v0                                                   
py3-pip-20.3.4p0:py3-setuptools-57.4.0v0 (extracting)
py3-pip-20.3.4p0:py3-setuptools-57.4.0v0 (installing)                                             
Adding py3-pip-20.3.4p0:py3-setuptools-57.4.0v0                                                   
Adding py3-pip-20.3.4p0                                                                           
py3-pip-20.3.4p0 (extracting)                                                                     
py3-pip-20.3.4p0 (installing)                                                                     
Adding py3-pip-20.3.4p0                                                                           
--- +py3-pip-20.3.4p0 -------------------                                                         
If you want to use this package as default pip, as root create a                                  
symbolic link like so (overwriting any previous default):                                         
    ln -sf /usr/local/bin/pip3.8 /usr/local/bin/pip         
Extracted 78216500 from 78218709                 
 *  INFO: Running config_salt()                                                                   
 * DEBUG: The passed destination(/etc/salt) is a directory                                        
 * DEBUG: Full destination path is now: /etc/salt/minion                                          
 * DEBUG: Not overriding /etc/salt/minion with /tmp/git/salt/conf//minion                         
 *  INFO: Running install_openbsd_git()                                                           
 * DEBUG: __install_salt_from_repo_post_neon py_exe=python3                                       
 * DEBUG: Installed pip version: pip 20.3.4 from /usr/local/lib/python3.8/site-packages/pip (pytho
n 3.8)                                                                                            
Desired pip version '9.0.1' < Installed pip version '20.3.4'

Copy link
Contributor

@myii myii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@delucks Only a fellow contributor to this repo but this should be a useful review.


When adding Vagrant-based CI to this repo, I left the OpenBSD git-based installation jobs commented out:

With this PR, I recommend enabling those instances, as shown in this commit:

I went ahead a ran those instances in my fork, based on top of this PR, but unfortunately, we've still got failures:

Checking the logs there, this is the common error:

  ************************************************
  building 'zmq.libzmq' extension
  creating build/temp.openbsd-6.9-amd64-3.8/buildutils
  creating build/temp.openbsd-6.9-amd64-3.8/bundled
  creating build/temp.openbsd-6.9-amd64-3.8/bundled/zeromq
  creating build/temp.openbsd-6.9-amd64-3.8/bundled/zeromq/src
  c++ -pthread -std=c++11 -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -g -fPIC -O2 -pipe -g -O2 -pipe -g -fPIC -DZMQ_HAVE_CURVE=1 -DZMQ_USE_TWEETNACL=1 -DZMQ_USE_KQUEUE=1 -DZMQ_IOTHREADS_USE_KQUEUE=1 -DZMQ_POLL_BASED_ON_POLL=1 -Ibundled/zeromq/include -Ibundled -I/usr/local/include/python3.8 -c buildutils/initlibzmq.cpp -o build/temp.openbsd-6.9-amd64-3.8/buildutils/initlibzmq.o
  c++ -pthread -std=c++11 -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -g -fPIC -O2 -pipe -g -O2 -pipe -g -fPIC -DZMQ_HAVE_CURVE=1 -DZMQ_USE_TWEETNACL=1 -DZMQ_USE_KQUEUE=1 -DZMQ_IOTHREADS_USE_KQUEUE=1 -DZMQ_POLL_BASED_ON_POLL=1 -Ibundled/zeromq/include -Ibundled -I/usr/local/include/python3.8 -c bundled/zeromq/src/address.cpp -o build/temp.openbsd-6.9-amd64-3.8/bundled/zeromq/src/address.o
  In file included from bundled/zeromq/src/address.cpp:38:
  bundled/zeromq/src/tipc_address.hpp:43:10: fatal error: 'linux/tipc.h' file not found
  #include <linux/tipc.h>
    ^~~~~~~~~~~~~~
  1 error generated.
  error: command '/usr/bin/c++' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pyzmq
Successfully built immutables PyYAML
Failed to build pyzmq
ERROR: Could not build wheels for pyzmq which use PEP 517 and cannot be installed directly
 * ERROR: Failed to run install_openbsd_git()!!!

Would you have any suggestions on how to fix this?

@krionbsd
Copy link
Contributor

@delucks Only a fellow contributor to this repo but this should be a useful review.

When adding Vagrant-based CI to this repo, I left the OpenBSD git-based installation jobs commented out:

With this PR, I recommend enabling those instances, as shown in this commit:

I went ahead a ran those instances in my fork, based on top of this PR, but unfortunately, we've still got failures:

Checking the logs there, this is the common error:

  ************************************************
  building 'zmq.libzmq' extension
  creating build/temp.openbsd-6.9-amd64-3.8/buildutils
  creating build/temp.openbsd-6.9-amd64-3.8/bundled
  creating build/temp.openbsd-6.9-amd64-3.8/bundled/zeromq
  creating build/temp.openbsd-6.9-amd64-3.8/bundled/zeromq/src
  c++ -pthread -std=c++11 -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -g -fPIC -O2 -pipe -g -O2 -pipe -g -fPIC -DZMQ_HAVE_CURVE=1 -DZMQ_USE_TWEETNACL=1 -DZMQ_USE_KQUEUE=1 -DZMQ_IOTHREADS_USE_KQUEUE=1 -DZMQ_POLL_BASED_ON_POLL=1 -Ibundled/zeromq/include -Ibundled -I/usr/local/include/python3.8 -c buildutils/initlibzmq.cpp -o build/temp.openbsd-6.9-amd64-3.8/buildutils/initlibzmq.o
  c++ -pthread -std=c++11 -pthread -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -O2 -pipe -g -fPIC -O2 -pipe -g -O2 -pipe -g -fPIC -DZMQ_HAVE_CURVE=1 -DZMQ_USE_TWEETNACL=1 -DZMQ_USE_KQUEUE=1 -DZMQ_IOTHREADS_USE_KQUEUE=1 -DZMQ_POLL_BASED_ON_POLL=1 -Ibundled/zeromq/include -Ibundled -I/usr/local/include/python3.8 -c bundled/zeromq/src/address.cpp -o build/temp.openbsd-6.9-amd64-3.8/bundled/zeromq/src/address.o
  In file included from bundled/zeromq/src/address.cpp:38:
  bundled/zeromq/src/tipc_address.hpp:43:10: fatal error: 'linux/tipc.h' file not found
  #include <linux/tipc.h>
    ^~~~~~~~~~~~~~
  1 error generated.
  error: command '/usr/bin/c++' failed with exit code 1
  ----------------------------------------
  ERROR: Failed building wheel for pyzmq
Successfully built immutables PyYAML
Failed to build pyzmq
ERROR: Could not build wheels for pyzmq which use PEP 517 and cannot be installed directly
 * ERROR: Failed to run install_openbsd_git()!!!

Would you have any suggestions on how to fix this?

it seems OpenBSD is being not properly detected by pyzmq, I opened an issue at upstream.

@krionbsd krionbsd merged commit f7812b9 into saltstack:develop Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Installation of pip on OpenBSD uses incorrect package name

3 participants