Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@ The dependencies are available via pip::
# Add ~/.local/bin to your $PATH, e.g. by adding this to ~/.bashrc:
PATH=$HOME/.local/bin:$PATH

Or, you can use tox::

tox -e develop
. .tox/develop/bin/activate

Build
~~~~~

Expand Down
4 changes: 4 additions & 0 deletions docs/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import setuptools


setuptools.setup(setup_requires=["pbr"], pbr=True, include_package_data=True)
30 changes: 10 additions & 20 deletions scripts/compatibility_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,23 +95,10 @@ def freebsd_pre_openzfs():
# There could be some lag between OpenZFS upstream and the FreeBSD,
# or even Linux implementations.
sources = {}
with urlopen('https://www.freebsd.org/releases/') as web:
versions = findall(r'/releases/([0-9.]+?)R',
web.read().decode('utf-8', 'ignore'))
with urlopen('https://svnweb.freebsd.org/base/release/') as web:
data = web.read().decode('utf-8', 'ignore')
actualversions = []
for ver in set(versions):
found = list(sorted(findall(
r'/base/release/(' + ver.replace('.', '\\.') + r'[0-9.]*)',
data
)))
if found:
actualversions.append(found[-1])
for ver in actualversions:
sources[ver] = ('https://svnweb.freebsd.org/base/release/{}/cddl/'
'contrib/opensolaris/cmd/zpool/zpool-features.7'
'?view=co'.format(ver))

sources['12'] = ('https://raw.githubusercontent.com/freebsd/freebsd-src/'
'refs/heads/stable/12/cddl/contrib/opensolaris/'
'cmd/zpool/zpool-features.7')
return sources


Expand Down Expand Up @@ -182,6 +169,7 @@ def nexenta():


openzfs_key = 'OpenZFS (Linux, FreeBSD 13+)'
illumos_key = 'Illumos'
sources = {
openzfs_key: openzfs(),
'FreeBSD pre OpenZFS': freebsd_pre_openzfs(),
Expand All @@ -190,7 +178,7 @@ def nexenta():
'Joyent': joyent(),
'NetBSD': netbsd(),
'Nexenta': nexenta(),
'Illumos': {
illumos_key: {
'master': 'https://raw.githubusercontent.com/illumos/illumos-gate/'
'master/usr/src/man/man7/zpool-features.7',
},
Expand Down Expand Up @@ -356,11 +344,12 @@ def nexenta():
html.write('<td class="warn">no</td>')
for name, vers in header:
for ver in vers:
# custom case for OpenZFS FreeBSD https://github.com/openzfs/zfs/pull/12735
if (feature == 'edonr' and name == openzfs_key and '.' in ver
and not (int(ver.split('.')[0]) >= 2
and int(ver.split('.')[1]) >= 2)):
html.write('<td class="yes">yes<sup><a href="#note_1">1</a></sup></td>')
html.write('<td class="warn">yes<sup><a href="#note_1">1</a></sup></td>')
elif (feature == 'encryption' and name == illumos_key):
html.write('<td class="warn">yes<sup><a href="#note_2">2</a></sup></td>')
elif (name, ver) in names:
html.write('<td class="yes">yes</td>')
else:
Expand All @@ -371,6 +360,7 @@ def nexenta():
html.write('<h3>Notes:</h3>\n')
html.write('<ol>\n')
html.write('<li id="note_1"><a href="https://github.com/openzfs/zfs/pull/12735">Edonr support was not enabled in FreeBSD with OpenZFS up to 2.1 release included</a></li>\n')
html.write('<li id="note_2"><a href="https://illumos.topicbox.com/groups/discuss/Ta2162fbb2358fa0e">While Illumos have nearly same encryption logic, it\'s format is not 100% compatible with OpenZFS encryption format, so you may have problems with cross-platform encryption.</a></li>\n')
html.write('</ol>\n')
html.write('</div>\n')
now = datetime.now().isoformat() + 'Z'
Expand Down
29 changes: 29 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
[tox]
envlist = py3,pep8
skipdist = True
skip_install = True

[testenv]
basepython = python3
skipdist = True
skip_install = True
deps = pytest
commands = pytest {posargs}

[testenv:pep8]
deps = flake8
commands =
flake8

[testenv:develop]
usedevelop = true
basepython = python3
deps = -r{toxinidir}/docs/requirements.txt
esbonio>=0.12.0
commands = {posargs}

[testenv:esbonio]
usedevelop = true
basepython = python3
deps = esbonio>=0.12.0
commands = {posargs}