From fa49f4f5097eff3ef57d3bdae0c0526f275ca9b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Sat, 21 Mar 2020 15:22:04 +0000 Subject: [PATCH 01/23] set default Python version to 3.7 --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index d4e97c94..bb80d1e1 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ JAIL_NIC?=vtnet0 JAIL_IP?=172.16.0 JAIL_NET?=16 MYPYPATH = $(shell pwd)/.travis/mypy-stubs -PYTHON ?= python3.6 +PYTHON ?= python3.7 pyver= ${PYTHON:S/^python//:S/.//:C/\([0-9]+\)/\1/} From 74146efbadcd33d10c80a97c71b85965b6e4ea06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Sat, 21 Mar 2020 15:24:26 +0000 Subject: [PATCH 02/23] describe how to install libioc from Makefile for other Python versions --- README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 53be4137..b3153170 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,13 @@ cd libioc make install ``` -At the current time libiocage is not packaged or available in FreeBSD ports. +The default Python version is 3.7. If you intend to run libioc from another version, please specify it during the installation: + +```sh +make PYTHON=python3.8 install +``` + +At the current time libioc is not packaged or available in FreeBSD ports. ## Documentation From 9b0ebcc2884ae459f9d5fb33dd9344dacd6fe9e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Sat, 21 Mar 2020 15:24:55 +0000 Subject: [PATCH 03/23] Rename Iocage Handbook to Ioc Handbook in README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b3153170..6f227ed2 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ At the current time libioc is not packaged or available in FreeBSD ports. ## Documentation -- Iocage Handbook: https://bsdci.github.io/handbook +- Ioc Handbook: https://bsdci.github.io/handbook - Reference Documentation: https://bsdci.github.io/libioc - Gitter Chat: https://gitter.im/libioc/community From 7613cae8f954f084cb7e6509d0e452306b997dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 13:47:27 +0000 Subject: [PATCH 04/23] detect latest available Python 3 version as default in Makefile --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bb80d1e1..b8d4c66c 100644 --- a/Makefile +++ b/Makefile @@ -3,8 +3,9 @@ JAIL_NIC?=vtnet0 JAIL_IP?=172.16.0 JAIL_NET?=16 MYPYPATH = $(shell pwd)/.travis/mypy-stubs -PYTHON ?= python3.7 +LATEST_PKG_PYTHON_VERSION != pkg info -g 'python3*' | cut -d'-' -f1 | sed 's/^python//' | sort -n | tail -n1 | sed -r 's/^([0-9])([0-9]+)/\1.\2/' +PYTHON ?= python${LATEST_PKG_PYTHON_VERSION} pyver= ${PYTHON:S/^python//:S/.//:C/\([0-9]+\)/\1/} .if $(pyver) < 35 From e1efe34debc85ccdf04b3931079035fd0b005976 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 13:56:55 +0000 Subject: [PATCH 05/23] install dev-dependencies with selected Python version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b8d4c66c..fb82f0e2 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ install-python-requirements-dev: install-python-requirements install-deps: pkg install -q -y libucl py$(pyver)-ucl py$(pyver)-cython rsync python$(pyver) py$(pyver)-libzfs install-deps-dev: install-deps - if [ "`uname`" = "FreeBSD" ]; then pkg install -y gmake py36-sqlite3; fi + if [ "`uname`" = "FreeBSD" ]; then pkg install -y gmake py$(pyver)-sqlite3; fi install-dev: install-deps-dev install-python-requirements-dev $(PYTHON) -m pip install -e . install-travis: From 0b6a71d2098583d18e50acaf2452a84885d91372 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 13:58:24 +0000 Subject: [PATCH 06/23] update Python dependencies to latest freebsd_sysctl and jail --- requirements.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index f853105f..7605f98c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ gitpython -freebsd_sysctl==0.0.6 -jail==0.0.8 +freebsd_sysctl==0.0.7 +jail==0.0.9 From 4f554230c3c6ca45b15a517328c5813dee3d66b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 14:11:23 +0000 Subject: [PATCH 07/23] accept PYTHON_VERSION env variable in Makefile Pkg is not available on Travis (Linux), but a PYTHON_VERSION env variable is set --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index fb82f0e2..9aa8c6c1 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,8 @@ JAIL_IP?=172.16.0 JAIL_NET?=16 MYPYPATH = $(shell pwd)/.travis/mypy-stubs -LATEST_PKG_PYTHON_VERSION != pkg info -g 'python3*' | cut -d'-' -f1 | sed 's/^python//' | sort -n | tail -n1 | sed -r 's/^([0-9])([0-9]+)/\1.\2/' -PYTHON ?= python${LATEST_PKG_PYTHON_VERSION} +PYTHON_VERSION != if [ "$(PYTHON_VERSION)" != "" ]; then echo $(PYTHON_VERSION); else pkg info -g 'python3*' | cut -d'-' -f1 | sed 's/^python//' | sort -n | tail -n1 | sed -r 's/^([0-9])([0-9]+)/\1.\2/'; fi +PYTHON ?= python${PYTHON_VERSION} pyver= ${PYTHON:S/^python//:S/.//:C/\([0-9]+\)/\1/} .if $(pyver) < 35 From 28e715c0dbec695985012896d2d66912abd9ceb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 14:19:56 +0000 Subject: [PATCH 08/23] update Travis Python version to 3.7 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index df24de67..3606e167 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: python python: - - "3.6" + - "3.7" sudo: false env: - MYPYPATH="$TRAVIS_BUILD_DIR/.travis/mypy-stubs" From c6620cc4b1c1c8850af31da3256fa1a903901d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 14:21:28 +0000 Subject: [PATCH 09/23] fall back to TRAVIS_PYTHON_VERSION in Makefile --- Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 9aa8c6c1..bd5a727f 100644 --- a/Makefile +++ b/Makefile @@ -4,8 +4,9 @@ JAIL_IP?=172.16.0 JAIL_NET?=16 MYPYPATH = $(shell pwd)/.travis/mypy-stubs -PYTHON_VERSION != if [ "$(PYTHON_VERSION)" != "" ]; then echo $(PYTHON_VERSION); else pkg info -g 'python3*' | cut -d'-' -f1 | sed 's/^python//' | sort -n | tail -n1 | sed -r 's/^([0-9])([0-9]+)/\1.\2/'; fi -PYTHON ?= python${PYTHON_VERSION} +PYTHON_VERSION ?= $(TRAVIS_PYTHON_VERSION) +SELECTED_PYTHON_VERSION != if [ "$(PYTHON_VERSION)" != "" ]; then echo $(PYTHON_VERSION); else pkg info -g 'python3*' | cut -d'-' -f1 | sed 's/^python//' | sort -n | tail -n1 | sed -r 's/^([0-9])([0-9]+)/\1.\2/'; fi +PYTHON ?= python${SELECTED_PYTHON_VERSION} pyver= ${PYTHON:S/^python//:S/.//:C/\([0-9]+\)/\1/} .if $(pyver) < 35 From 02b3780367f5924b933a1f005338c83c629b7371 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 14:25:09 +0000 Subject: [PATCH 10/23] respect TRAVIS_PYTHON_VERSION in install travis make task --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bd5a727f..7d2e8cb6 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ install-deps-dev: install-deps install-dev: install-deps-dev install-python-requirements-dev $(PYTHON) -m pip install -e . install-travis: - python3.6 -m pip install -IU flake8-mutable flake8-docstrings flake8-builtins flake8-mypy bandit==1.5.1 bandit-high-entropy-string + python$(TRAVIS_PYTHON_VERSION) -m pip install -IU flake8-mutable flake8-docstrings flake8-builtins flake8-mypy bandit==1.5.1 bandit-high-entropy-string uninstall: $(PYTHON) -m pip uninstall -y ioc @if [ -f /usr/local/etc/rc.d/ioc ]; then \ From 077152082c56a360df3c6f8c769c5ddf2dae0532 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 14:32:36 +0000 Subject: [PATCH 11/23] print mypy version in make check task --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 7d2e8cb6..0c0c6183 100644 --- a/Makefile +++ b/Makefile @@ -35,6 +35,7 @@ uninstall: fi check: flake8 --version + mypy --version flake8 --exclude=".travis,.eggs,__init__.py,docs,tests" --ignore=E203,E252,W391,D107,A001,A002,A003,A004,D412,D413,T499 bandit --skip B404,B110 --exclude tests/ -r . test: From 820afc7c957b72387d10f5efe2e42cc33b757413 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 18:12:22 +0200 Subject: [PATCH 12/23] run FreeBSD 12.1 on Cirrus CI --- .cirrus.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 174e2498..4867357d 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,7 +2,7 @@ task: freebsd_instance: matrix: #image: freebsd-11-2-release-amd64 - image: freebsd-12-0-release-amd64 + image: freebsd-12-1-release-amd64 pip_cache: folder: ~/.cache/pip fingerprint_script: cat requirements* From 9e05bcfa4de401a1737452e3806219f23b7cbbf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 15:10:19 +0000 Subject: [PATCH 13/23] explicitly type fcntl.ioctl function addresses an update of Python Typeshed --- libioc/helpers_ioctl.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libioc/helpers_ioctl.py b/libioc/helpers_ioctl.py index 528042f1..b739a079 100644 --- a/libioc/helpers_ioctl.py +++ b/libioc/helpers_ioctl.py @@ -41,7 +41,12 @@ def get_sockio_ioctl(nic_name: str, ioctl: SOCKIO_IOCTLS) -> bytes: """Query a sockio ioctl for a given NIC.""" with socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0) as sock: ifconf = struct.pack('256s', nic_name.encode("UTF-8")[:15]) - return bytes(fcntl.ioctl(sock.fileno(), ioctl.value, ifconf)) + return bytes(fcntl.ioctl( + sock.fileno(), + int(ioctl.value), + bytes(ifconf), + True + )) def get_interface_ip4_address(nic_name: str) -> ipaddress.IPv4Address: From 2906aa4c6895b530c835ca026e6719a292c08dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 13 Apr 2020 20:48:45 +0200 Subject: [PATCH 14/23] update py-jail dependency to 0.0.11 --- requirements.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements.txt b/requirements.txt index 7605f98c..73992402 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ gitpython freebsd_sysctl==0.0.7 -jail==0.0.9 +jail==0.0.11 From b5a724329256e0d63e0a37de12d97b8efe3f91aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 20 Apr 2020 19:08:54 +0200 Subject: [PATCH 15/23] disable ZFS mnttab_cache --- .travis/mypy-stubs/libzfs.pyi | 7 ++++++- libioc/ZFS.py | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis/mypy-stubs/libzfs.pyi b/.travis/mypy-stubs/libzfs.pyi index 30c69bfc..fbde1514 100644 --- a/.travis/mypy-stubs/libzfs.pyi +++ b/.travis/mypy-stubs/libzfs.pyi @@ -77,7 +77,12 @@ class ZFS: pools: Generator[ZFSPool, None, None] = ... snapshots: Generator[ZFSSnapshot, None, None] = ... __pyx_vtable__ = ... # type: Any - def __init__(self, history: bool=True, history_prefix: str='') -> None: ... + def __init__( + self, + history: bool=True, + history_prefix: str='', + mnttab_cache: bool=True + ) -> None: ... def create( self, name: str, diff --git a/libioc/ZFS.py b/libioc/ZFS.py index 59ebd8cf..449a5c6c 100644 --- a/libioc/ZFS.py +++ b/libioc/ZFS.py @@ -280,7 +280,11 @@ def get_zfs( history_prefix: str="" ) -> ZFS: """Get an instance of iocages enhanced ZFS class.""" - zfs = ZFS(history=history, history_prefix=history_prefix) + zfs = ZFS( + history=history, + history_prefix=history_prefix, + mnttab_cache=False + ) zfs.logger = libioc.helpers_object.init_logger(zfs, logger) return zfs From e37489e775f1b823aa2b8a7ff239351e014a591f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 20 Apr 2020 19:19:18 +0200 Subject: [PATCH 16/23] chore: look for mountpoint, not dataset name in tests --- tests/test_Jail.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/test_Jail.py b/tests/test_Jail.py index 11ff4796..487297e9 100644 --- a/tests/test_Jail.py +++ b/tests/test_Jail.py @@ -87,7 +87,7 @@ def test_can_be_started( assert existing_jail.running is True stdout = subprocess.check_output( - [f"/sbin/mount | grep {existing_jail.root_dataset.name}"], + [f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"], shell=True ).decode("utf-8") @@ -104,7 +104,7 @@ def test_can_mount_devfs( existing_jail.start() stdout = subprocess.check_output( - [f"/sbin/mount | grep {existing_jail.root_dataset.name}"], + [f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"], shell=True ).decode("utf-8") assert "/dev" in stdout @@ -112,7 +112,7 @@ def test_can_mount_devfs( existing_jail.stop() stdout = subprocess.check_output( - [f"/sbin/mount | grep {existing_jail.root_dataset.name}"], + [f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"], shell=True ).decode("utf-8") assert "/dev" not in stdout @@ -128,7 +128,7 @@ def test_can_mount_fdescfs( existing_jail.start() stdout = subprocess.check_output( - [f"/sbin/mount | grep {existing_jail.root_dataset.name}"], + [f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"], shell=True ).decode("utf-8") assert "/dev/fd" in stdout @@ -136,7 +136,7 @@ def test_can_mount_fdescfs( existing_jail.stop() stdout = subprocess.check_output( - [f"/sbin/mount | grep {existing_jail.root_dataset.name}"], + [f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"], shell=True ).decode("utf-8") assert "/dev/fd" not in stdout @@ -152,7 +152,7 @@ def test_can_mount_devfs_and_fdescfs( existing_jail.start() stdout = subprocess.check_output( - [f"/sbin/mount | grep {existing_jail.root_dataset.name}"], + [f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"], shell=True ).decode("utf-8") assert "/dev (" in stdout @@ -160,7 +160,7 @@ def test_can_mount_devfs_and_fdescfs( existing_jail.stop() stdout = subprocess.check_output( - [f"/sbin/mount | grep {existing_jail.root_dataset.name}"], + [f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"], shell=True ).decode("utf-8") assert "/dev (" not in stdout @@ -242,9 +242,9 @@ def test_can_be_started( existing_jail.start() assert existing_jail.running is True - root_path = existing_jail.root_dataset.name + root_path = existing_jail.root_dataset.mountpoint stdout = subprocess.check_output( - [f"/sbin/mount | grep {existing_jail.root_dataset.name}"], + [f"/sbin/mount | grep {existing_jail.root_dataset.mountpoint}"], shell=True ).decode("utf-8") assert "launch-scripts in stdout" @@ -268,7 +268,7 @@ def test_can_be_stopped( [f"/usr/sbin/jls", "-j", existing_jail.identifier] ).decode("utf-8") - root_path = existing_jail.root_dataset.name + root_path = existing_jail.root_dataset.mountpoint stdout = subprocess.check_output( [f"/sbin/mount | grep {root_path}"], shell=True From 71f058e895d438f6e2131bf0c4d13e0d6f94bac7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 20 Apr 2020 19:42:21 +0200 Subject: [PATCH 17/23] suppress pkg warnings with IGNORE_OSVERSION=yes on host pkg update --- libioc/Pkg.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libioc/Pkg.py b/libioc/Pkg.py index 9d795a0a..2135e6ec 100644 --- a/libioc/Pkg.py +++ b/libioc/Pkg.py @@ -144,7 +144,8 @@ def _update_host_repo(self, release_major_version: int) -> None: logger=self.logger, env=dict( ABI=self.__get_abi_string(release_major_version), - SIGNATURE_TYPE="fingerprints" + SIGNATURE_TYPE="fingerprints", + IGNORE_OSVERSION="yes" ) ) From a1ec49af29b8b25742b6a0e2b23a9af8d5676378 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Mon, 20 Apr 2020 21:52:59 +0200 Subject: [PATCH 18/23] chore: print system info and config in Cirrus CI install task --- .cirrus.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index 4867357d..2ec72622 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -15,6 +15,11 @@ task: zpool create -m "/.ioc-test-`uname -r`" "ioc-test-`uname -r`" "/pools/ioc-test-`uname -r`.img" zfs set compression=lz4 "ioc-test-`uname -r`" install_script: + - uname -a + - uname -KU + - kldstat + - sysrc -a + - sysctl -a - mount -t fdescfs null /dev/fd - pkg install -y git - make install-dev From eba284764f2a3bc1019abc9242917d99c69bd1de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Gr=C3=B6nke?= Date: Tue, 21 Apr 2020 01:30:54 +0200 Subject: [PATCH 19/23] tests: skip VNET tests when if_epair is not loaded --- tests/test_VNET.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/test_VNET.py b/tests/test_VNET.py index ca13b7b9..bf2f7f4b 100644 --- a/tests/test_VNET.py +++ b/tests/test_VNET.py @@ -22,6 +22,7 @@ # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGE. """Unit tests for VNET.""" +import pytest import json import os import subprocess @@ -31,6 +32,21 @@ import libioc.Jail + +def is_epair_enabled() -> bool: + proc = subprocess.Popen( + ["/sbin/kldstat", "-n", "if_epair"], + stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL + ) + proc.communicate() + return (proc.returncode == 0) + + +@pytest.mark.skipif( + (is_epair_enabled() is False), + reason="if_epair is not loaded" +) class TestVNET(object): """Run tests for VNET networking.""" From aa39e1af7d9c4651fb0b5be60c3c809c0889371f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Gali=C4=87?= Date: Tue, 7 Apr 2020 15:35:47 +0200 Subject: [PATCH 20/23] document what the Make string replacement expression does --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 0c0c6183..e0a7c1ee 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ MYPYPATH = $(shell pwd)/.travis/mypy-stubs PYTHON_VERSION ?= $(TRAVIS_PYTHON_VERSION) SELECTED_PYTHON_VERSION != if [ "$(PYTHON_VERSION)" != "" ]; then echo $(PYTHON_VERSION); else pkg info -g 'python3*' | cut -d'-' -f1 | sed 's/^python//' | sort -n | tail -n1 | sed -r 's/^([0-9])([0-9]+)/\1.\2/'; fi PYTHON ?= python${SELECTED_PYTHON_VERSION} +# turn python3.7 -> 3.7 -> 37 pyver= ${PYTHON:S/^python//:S/.//:C/\([0-9]+\)/\1/} .if $(pyver) < 35 From 71690e900ad289a06b16b3eff259f7f98d40970a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Gali=C4=87?= Date: Sun, 12 Apr 2020 21:15:54 +0200 Subject: [PATCH 21/23] update python version in .travis and setup.cfg --- setup.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 57b59a67..f7fa6d93 100644 --- a/setup.cfg +++ b/setup.cfg @@ -2,7 +2,7 @@ description-file = README.md [mypy] -python_version = 3.6 +python_version = 3.7 # override flake8-mypy defaults, since we provide (missing) types platform='freebsd' From 2c95e2b95d492b6781dc9025bd712c1deff29f36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Gali=C4=87?= Date: Tue, 7 Apr 2020 12:46:41 +0200 Subject: [PATCH 22/23] we don't need cython to build, but we do need setuptools! make sure it comes in the correct version --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e0a7c1ee..4e64abd2 100644 --- a/Makefile +++ b/Makefile @@ -22,7 +22,7 @@ install-python-requirements: install-python-requirements-dev: install-python-requirements $(PYTHON) -m pip install -Ur requirements-dev.txt install-deps: - pkg install -q -y libucl py$(pyver)-ucl py$(pyver)-cython rsync python$(pyver) py$(pyver)-libzfs + pkg install -q -y libucl py$(pyver)-ucl py$(pyver)-setuptools rsync python$(pyver) py$(pyver)-libzfs install-deps-dev: install-deps if [ "`uname`" = "FreeBSD" ]; then pkg install -y gmake py$(pyver)-sqlite3; fi install-dev: install-deps-dev install-python-requirements-dev From 77f7229a34afa124766ff5f5e5eb1799db01bb4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Igor=20Gali=C4=87?= Date: Mon, 6 Apr 2020 20:20:04 +0200 Subject: [PATCH 23/23] update FreeBSD release on cirrus ci as well! --- .cirrus.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.cirrus.yml b/.cirrus.yml index 2ec72622..1a1470be 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,6 @@ task: freebsd_instance: matrix: - #image: freebsd-11-2-release-amd64 image: freebsd-12-1-release-amd64 pip_cache: folder: ~/.cache/pip