OpenBSD 7.4 DevBox
Page content
OpenBSD 7.4
… will be released next week (23. Oct 2023). Why not have a look at the upcomming OS and prepare a VM for Software Development ?
Preparation
grab a fresh VM and Install OpenBSD 7.4
os version
puffy74# sysctl kern.version
kern.version=OpenBSD 7.4 (GENERIC.MP) #1396: Sun Oct 8 09:20:40 MDT 2023
deraadt@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP
empty vm
puffy74# pkg_info
quirks-6.159 exceptions to pkg_add rules and cache
add go, rust, python
puffy74# pkg_add go rust python3
quirks-6.159 signed on 2023-10-07T10:09:24Z
go-1.21.1: ok
rust-1.72.1:nghttp2-1.56.0: ok
rust-1.72.1:nghttp3-0.15.0: ok
rust-1.72.1:ngtcp2-0.19.1: ok
rust-1.72.1:curl-8.3.0p0: ok
rust-1.72.1:libssh2-1.11.0: ok
rust-1.72.1: ok
python3-3.10p2:xz-5.4.4: ok
python3-3.10p2:sqlite3-3.42.0: ok
python3-3.10p2:libiconv-1.17: ok
python3-3.10p2:gettext-runtime-0.22.2: ok
python3-3.10p2:libffi-3.4.4: ok
python3-3.10p2:bzip2-1.0.8p0: ok
python3-3.10p2:python-3.10.13: ok
python3-3.10p2: ok
show packages
puffy74# pkg_info -mz
go--
python3--
quirks--
rust--
show Versions
puffy74# go version
go version go1.21.1 openbsd/amd64
puffy74# rustc -V
rustc 1.72.1 (d5c2e9c34 2023-09-13) (built from a source tarball)
puffy74# python3 -V
Python 3.10.13
Install Poetry
here, i can reference to my own post about poetry
# switch to root
doas su -
# add pip3
pkg_add py3-pip--
# add poetry
pip3 install --user poetry
# update poetry
pip3 install poetry -U
# update path
cat << EOF >> ~/.profile
# Poetry, added $(date)
export PATH=\$PATH:/root/.local/bin
EOF
# source profile
. ~/.profile
check Version
puffy74# poetry -V
Poetry (version 1.6.1)
Test FastApi
Let’s check if Latest Version of FastAPI is working …
root@puffy74 130 # poetry new test_fastapi
Created package test_fastapi in test_fastapi
root@puffy74 # cd test_fastapi/
root@puffy74 /test_fastapi# poetry add fastapi
Creating virtualenv test-fastapi-Bnqolxi_-py3.10 in /root/.cache/pypoetry/virtualenvs
Using version ^0.103.2 for fastapi
Updating dependencies
Resolving dependencies... Downloading https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idnResolving dependencies... (3.0s)
Package operations: 10 installs, 0 updates, 0 removals
• Installing exceptiongroup (1.1.3)
• Installing idna (3.4)
• Installing sniffio (1.3.0)
• Installing typing-extensions (4.8.0)
• Installing annotated-types (0.6.0)
• Installing anyio (3.7.1)
• Installing pydantic-core (2.10.1): Preparing...
• Installing pydantic-core (2.10.1): Failed
ChefBuildError
Backend 'maturin' is not available.
at ~/.local/lib/python3.10/site-packages/poetry/installation/chef.py:147 in _prepare
143│
144│ error = ChefBuildError("\n\n".join(message_parts))
145│
146│ if error is not None:
→ 147│ raise error from None
148│
149│ return path
150│
151│ def _prepare_sdist(self, archive: Path, destination: Path | None = None) -> Path:
Note: This error originates from the build backend, and is likely not a problem with poetry but with pydantic-core (2.10.1) not supporting PEP 517 builds. You can verify this by running 'pip wheel --use-pep517 "pydantic-core (==2.10.1)"'.
-> this was not really sucessful :( i have to investigate one day …
Add Poetry for a User
you may wanna run your scripts not as root…
doas su - stoege
pip3 install poetry -U
cat << EOF >> ~/.profile
# Poetry, added $(date)
export PATH=\$PATH:~/.local/bin
EOF
. ~/.profile
try FastAPI again
stoege@puffy74 $ poetry -V
Poetry (version 1.6.1)
stoege@puffy74 $ poetry new gugus
Created package gugus in gugus
stoege@puffy74 $ cd gugus/
stoege@puffy74 /gugus$ poetry add fastapi
Creating virtualenv gugus-IHJrQbUI-py3.10 in /home/stoege/.cache/pypoetry/virtualenvs
Using version ^0.103.2 for fastapi
Updating dependencies
Resolving dependencies... Downloading https://files.pythonhosted.org/packages/fc/34/3030de6f1370931b9dbb4dad48f6ab1015ab1d32447850b9fc94e60097be/idnResolving dependencies... (3.1s)
Package operations: 10 installs, 0 updates, 0 removals
• Installing exceptiongroup (1.1.3)
• Installing idna (3.4)
• Installing sniffio (1.3.0)
• Installing typing-extensions (4.8.0)
• Installing annotated-types (0.6.0)
• Installing anyio (3.7.1)
• Installing pydantic-core (2.10.1)
• Installing pydantic (2.4.2)
• Installing starlette (0.27.0)
• Installing fastapi (0.103.2)
Writing lock file
stoege@puffy74 /gugus$
-> this seems much better …!
Any Comments ?
sha256: 93d2f63520d0c2470047f320fe51be8c09ce4053497c36054f72277e9a2ab110