- Vue 42.4%
- TypeScript 32.8%
- Cython 11.1%
- Python 7.8%
- Jinja 1.7%
- Other 4.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| cockpit-zfs | ||
| python3-libzfs | ||
| .gitignore | ||
| README.md | ||
45Drives Cockpit ZFS — Ubuntu 26.04 compatibility fork
This repo bundles what's needed to run 45Drives' Cockpit ZFS Manager with full functionality on Ubuntu 26.04 (Python 3.14, Cython 3.x, OpenZFS 2.4.1):
cockpit-zfs/— the dashboard itself, unmodified upstream (builds and runs fine as-is).python3-libzfs/— the optional libzfs Python bindings the dashboard uses for full functionality. Upstream's version does not build on Ubuntu 26.04. This copy has a fix commit on top of upstream that makes it build and work correctly. Seepython3-libzfs/README.mdfor upstream's own docs, and the commit log in that directory for exactly what changed and why.
Without python3-libzfs, the dashboard still installs and runs, but falls back to a
CLI-only backend (zpool/zfs commands) with reduced functionality — no per-dataset
detail views, no snapshot/bookmark listings, etc. The fix in this repo restores full
functionality.
Why python3-libzfs needed fixing
Upstream python3-libzfs is a Cython binding directly against libzfs/libnvpair. It was
last updated for an older toolchain and an older OpenZFS release. On Ubuntu 26.04 it fails
in three independent ways:
- Cython 0.29 (upstream's target) cannot even run on Python 3.13+ — it imports the
stdlib
cgimodule, which was removed in Python 3.13. Later 0.29.x patch releases fix that import, but the C code Cython 0.29 generates then calls CPython internal APIs (_PyLong_AsByteArray,_PyGen_SetStopIterationValue) with argument signatures that changed in Python 3.13+, so the generated C fails to compile regardless. There seems to be no working combination of Cython 0.29.x + Python 3.14. - Cython 3.x (the version that does run on Python 3.14) is stricter about GIL safety
and exception specifications on
nogilC callbacks, and rejects a few patterns the original code relied on. - OpenZFS 2.4.1's public headers have drifted from what the vendored
.pxdfiles declare — addedconstqualifiers, an added parameter onzpool_add, an added parameter on thezfs_userspacecallback type.
None of these are Ubuntu-specific misconfiguration — they're the vendored bindings being
several years older than the toolchain and libzfs version on any current distro. Full
details, including the exact reasoning for each fix, are in
python3-libzfs/CHANGES.md.
Both subprojects are hosted here as plain files (no upstream history) against:
- cockpit-zfs: 45Drives/cockpit-zfs
- python3-libzfs: 45Drives/python3-libzfs
Build instructions (Ubuntu 26.04)
1. Install dependencies
sudo apt update
sudo apt install -y \
build-essential autoconf python3-dev libzfslinux-dev python3-setuptools \
python3-pip python3-venv cython3 \
nodejs yarnpkg jq moreutils git make \
python3-dateutil sqlite3 msmtp
# Debian/Ubuntu ship the Yarn Berry binary as `yarnpkg`; cockpit-zfs's
# Makefile expects `yarn` on PATH.
sudo ln -s /usr/bin/yarnpkg /usr/bin/yarn
2. Build and install python3-libzfs
cd python3-libzfs
./configure --prefix=/usr
make PYTHON=python3
sudo python3 setup.py install --prefix=/usr
Verify it works before moving on:
python3 -c "
import libzfs
z = libzfs.ZFS()
print([p.name for p in z.pools])
"
This installs a Python-version-specific compiled .so (built against the system's
Python headers, here 3.14) — it is not portable to a different Python minor version
without rebuilding.
3. Build and install the dashboard
cd ../cockpit-zfs
make
sudo make install
sudo systemctl restart cockpit.socket
This installs the module to /usr/share/cockpit/zfs/ and registers it with Cockpit as
"45Drives ZFS". Restarting cockpit.socket briefly drops any active Cockpit web
sessions.
If you skip step 2, the dashboard still installs and works, just in CLI-fallback mode —
there is no build-time dependency between the two; python3-libzfs only needs to be
importable by whichever python3 Cockpit's backend scripts invoke (no separate wiring
or restart of the dashboard is needed if you install it later).
Licensing
cockpit-zfs/is GPL-3.0-or-later (per upstream's README).python3-libzfs/is BSD-2-Clause (per itsLICENSEfile). The fix commit in this repo is offered under the same license as the file it modifies.
Both are published here, changes included, per each project's license terms.