Skip to content
Merged
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
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ jobs:
sudo apt-get install -y \
build-essential bc bison flex libelf-dev libssl-dev libncurses-dev \
libdw-dev pahole rsync debhelper kmod dkms fakeroot dpkg-dev cpio xz-utils zstd \
autoconf automake libtool gawk alien rpm rpm2cpio dh-python po-debconf \
autoconf automake libtool gawk dh-python dh-dkms po-debconf lsb-release \
uuid-dev libudev-dev libblkid-dev libtirpc-dev libcurl4-openssl-dev \
libaio-dev libattr1-dev libffi-dev zlib1g-dev libpam0g-dev \
python3 python3-dev python3-cffi python3-setuptools python3-packaging \
python3 python3-dev python3-all-dev python3-cffi python3-setuptools python3-packaging python3-sphinx \
python3-distlib parted

- name: Check ROCm kernel config
Expand Down
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ SmoothKernel owns:
- `patches/`: ordered, vendored patch lanes for the current kernel line.
- `recipes/build-kernel.sh`: kernel.org tarball -> patches -> config -> Debian
kernel packages.
- `recipes/build-zfs.sh`: OpenZFS release tarball -> `zfs-dkms` and userspace
Debian packages.
- `recipes/build-zfs.sh`: OpenZFS release tarball -> `openzfs-zfs-dkms` and
userspace Debian packages.
- `templates/`: DKMS packaging and kernel compatibility templates for
out-of-tree modules in consuming repos.
- `docs/`: cross-repo technical documentation for the Smooth* base platform.
Expand Down Expand Up @@ -112,8 +112,9 @@ linux-headers-<kernel-version>-smoothkernel_*.deb
linux-libc-dev_*.deb
```

Typical OpenZFS outputs include `zfs-dkms`, `zfsutils-linux`, and supporting
library packages produced by OpenZFS's Debian packaging.
OpenZFS outputs are OpenZFS's native Debian packages: `openzfs-zfs-dkms`,
`openzfs-zfsutils`, `openzfs-zfs-initramfs` and the supporting `openzfs-lib*`
libraries.

For host package requirements, resource expectations, output details, and test
install commands, see [docs/BUILDING.md](docs/BUILDING.md).
Expand Down
4 changes: 2 additions & 2 deletions docs/APT_REPO.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@ The Rakuen VPS, as a static tree behind nginx with HTTPS. `smoothapt` documents

## Out-of-tree modules and DKMS

DKMS modules (`zfs-dkms`, `smoothfs`-via-DKMS, NVIDIA if we mirror it) build against the installed SmoothKernel headers on install. The versioned package name is `linux-headers-<kernel-version>-smoothkernel`; the apt repo may also provide a stable metapackage such as `linux-headers-smoothkernel`. DKMS consumers live in `common` only when multiple flavors can pull them; flavor meta-packages declare Depends on only the modules they actually need.
DKMS modules (`openzfs-zfs-dkms`, `smoothfs`-via-DKMS, NVIDIA if we mirror it) build against the installed SmoothKernel headers on install. The versioned package name is `linux-headers-<kernel-version>-smoothkernel`; the apt repo may also provide a stable metapackage such as `linux-headers-smoothkernel`. DKMS consumers live in `common` only when multiple flavors can pull them; flavor meta-packages declare Depends on only the modules they actually need.

Every flavor meta-package also depends on `smooth-secureboot`, which owns the per-host Secure Boot / MOK bootstrap and DKMS-signing hooks for the shared-kernel model.

- `smoothnas` depends on `zfs-dkms`, `smoothfs`
- `smoothnas` depends on `openzfs-zfs-dkms`, `smoothfs`
- `smoothrouter` depends on neither
- `smoothhtpc`, `smoothdesktop` may depend on NVIDIA driver packages conditionally (handled via Recommends + install-time detection)

Expand Down
10 changes: 6 additions & 4 deletions docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ sudo apt-get update
sudo apt-get install -y \
build-essential bc bison flex libelf-dev libssl-dev libncurses-dev \
libdw-dev pahole rsync debhelper kmod fakeroot dpkg-dev cpio xz-utils zstd \
autoconf automake libtool gawk alien rpm rpm2cpio dh-python po-debconf \
autoconf automake libtool gawk dh-python dh-dkms po-debconf lsb-release \
uuid-dev libudev-dev libblkid-dev libtirpc-dev libcurl4-openssl-dev \
libaio-dev libattr1-dev libffi-dev zlib1g-dev libpam0g-dev \
python3 python3-dev python3-cffi python3-setuptools python3-packaging \
python3 python3-dev python3-all-dev python3-cffi python3-setuptools python3-packaging python3-sphinx \
python3-distlib parted
```

Expand Down Expand Up @@ -137,8 +137,10 @@ make zfs DEB_ARCH=amd64
make zfs DEB_ARCH=arm64
```

The recipe downloads the configured OpenZFS release, runs its packaging build,
and copies resulting `.deb` files to `OUT_DIR`. The `zfs-dkms` package is not
The recipe downloads the configured OpenZFS release, builds it with OpenZFS's
own Debian packaging (`make native-deb-utils`, which declares real package
dependencies) and copies the resulting `openzfs-*` `.deb` files to `OUT_DIR`.
The `openzfs-zfs-dkms` package is not
tied to one kernel at package build time; it builds on the target machine
against installed SmoothKernel headers.

Expand Down
2 changes: 1 addition & 1 deletion docs/CI_RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ so each build of `main` is distinct and newer than the last:
| `linux-libc-dev` | `linux-libc-dev_7.2.10-68_amd64.deb` |
| `linux-image-smoothkernel` (metapackage) | `linux-image-smoothkernel_7.2.10-68_amd64.deb` |
| `linux-headers-smoothkernel` (metapackage) | `linux-headers-smoothkernel_7.2.10-68_amd64.deb` |
| OpenZFS | `zfs_2.4.4-68_amd64.deb`, `zfs-dkms_2.4.4-68_amd64.deb`, ... |
| OpenZFS | `openzfs-zfsutils_2.4.4-68_amd64.deb`, `openzfs-zfs-dkms_2.4.4-68_all.deb`, ... |

The kernel release (`uname -r`) is `7.2.10-68-smoothkernel`, so a new build
installs alongside the running kernel rather than replacing its modules, and
Expand Down
2 changes: 1 addition & 1 deletion docs/DKMS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ not here.

Current or expected consumers:

- OpenZFS through `zfs-dkms`.
- OpenZFS through `openzfs-zfs-dkms`.
- SmoothNAS `smoothfs`.
- Optional NVIDIA modules from Debian's `nvidia-driver-*` packages.

Expand Down
2 changes: 1 addition & 1 deletion docs/INSTALLERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Until this lands, the existing `SmoothNAS/iso/` continues to work and other flav

### SmoothNAS

- Optional ZFS-on-root. Needs the installer to load ZFS modules during install (they come from `zfs-dkms` built against the installer kernel, or precompiled for the installer environment — decision deferred).
- Optional ZFS-on-root. Needs the installer to load ZFS modules during install (they come from `openzfs-zfs-dkms` built against the installer kernel, or precompiled for the installer environment — decision deferred).
- Multi-disk mgmt during install is out of scope — non-OS disks stay untouched, managed from the web UI post-install.
- Default user setup: one admin user, web UI login is separate credential.

Expand Down
2 changes: 1 addition & 1 deletion docs/KERNEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Major version bumps (e.g. 6.x → 7.0) follow the conservative rule from [`bumpi

Every flavor that needs out-of-tree kernel code consumes the versioned SmoothKernel headers package, normally via a stable apt metapackage, and DKMS builds against `/lib/modules/$(uname -r)/build`. Current consumers:

- `zfs-dkms` — SmoothNAS. OpenZFS tracks kernel compatibility per release; see [`bumping-kernel.md`](bumping-kernel.md) for the version-pairing rule.
- `openzfs-zfs-dkms` — SmoothNAS. OpenZFS tracks kernel compatibility per release; see [`bumping-kernel.md`](bumping-kernel.md) for the version-pairing rule.
- `smoothfs` — SmoothNAS-specific filesystem module. Uses the `compat.h` pattern (see [`kernel-config.md`](kernel-config.md)).
- NVIDIA proprietary — optional on HTPC/desktop. Ships via Debian's `nvidia-driver-*` packages (mirrored or pulled directly) which are DKMS-compatible.

Expand Down
16 changes: 5 additions & 11 deletions docs/SMOOTHNAS.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ NAS appliance flavor. This doc is the Smooth* cross-repo contract for SmoothNAS:
| `smoothfs` | `SmoothNAS` | Out-of-tree kernel module (DKMS) |
| `smoothfs-utils` | `SmoothNAS` | Userspace tools for smoothfs |

Shared from `common`: the versioned SmoothKernel image and headers packages (optionally via stable metapackages), `linux-firmware-smooth`, `smooth-base`, `zfs-dkms` (if we host it; otherwise pulled from Debian), `smoothgui-assets` (optional — cached smoothgui build for offline installer).
Shared from `common`: the versioned SmoothKernel image and headers packages (optionally via stable metapackages), `linux-firmware-smooth`, `smooth-base`, `openzfs-zfs-dkms` and `openzfs-zfsutils` (built by SmoothKernel), `smoothgui-assets` (optional — cached smoothgui build for offline installer).

## Meta-package dependencies

Expand All @@ -31,8 +31,8 @@ Depends:
tierd-ui,
smoothfs,
smoothfs-utils,
zfs-dkms,
zfsutils-linux,
openzfs-zfs-dkms,
openzfs-zfsutils,
samba,
nfs-kernel-server,
tgt,
Expand Down Expand Up @@ -143,14 +143,9 @@ Everything here is runtime, kernel-neutral, and independently installable — so

## ZFS posture

`zfs-dkms` from DKMS, built against the installed SmoothKernel headers. OpenZFS release pairing follows the rule in [`bumping-kernel.md`](bumping-kernel.md): kernel version <= the OpenZFS release's `Linux-Maximum`.
`openzfs-zfs-dkms` from DKMS, built against the installed SmoothKernel headers. OpenZFS release pairing follows the rule in [`bumping-kernel.md`](bumping-kernel.md): kernel version <= the OpenZFS release's `Linux-Maximum`.

We can either:

- (a) Mirror `zfs-dkms` and `zfsutils-linux` into `common` (rebuilt when OpenZFS releases).
- (b) Pull from Debian. Lags upstream by months, frustrating when a kernel bump outruns Debian's ZFS.

Leaning (a) because kernel cadence is the bottleneck and Debian's ZFS will chronically lag. Implementation: extend `smoothkernel`'s existing `build-zfs.sh` recipe to produce signed Debian packages for the `common` suite.
OpenZFS comes from SmoothKernel, not Debian: Debian's ZFS lags upstream by months, and kernel cadence is the bottleneck. `recipes/build-zfs.sh` builds OpenZFS's own Debian packaging (`openzfs-*`) with every kernel build, and `smoothapt` publishes it in the `common` suite.

## Installer considerations

Expand All @@ -168,6 +163,5 @@ Other Smooth* products will likely adopt the same repo-local aimee pattern as th

## Open questions

- **zfs-dkms custody.** Mirror (a) vs Debian (b) — decision pending; lean (a) as above.
- **Installer ZFS modules.** See [`INSTALLERS.md`](INSTALLERS.md).
- **Appliance-mode hardening.** Should the `.deb` install disable password login by default and force SSH-key-only? Right posture for an appliance, but increases first-boot friction. Decision deferred.
4 changes: 2 additions & 2 deletions docs/bumping-kernel.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ with a one-line carry patch instead of waiting.

**Do not ship `--enable-linux-experimental` as the fix.** It works for a local
build but cannot reach the DKMS path — `scripts/dkms.mkconf` hardcodes the
configure arguments used when `zfs-dkms` rebuilds on the target, so the flag
configure arguments used when `openzfs-zfs-dkms` rebuilds on the target, so the flag
never reaches an appliance and every on-target rebuild would fail. Carry a
`patches/zfs-<version>/` META patch instead, so the raised cap travels with the
packaged source. See [`PATCHES.md`](PATCHES.md) and `patches/zfs-2.4.3/README.md`.
Expand Down Expand Up @@ -123,7 +123,7 @@ find out -maxdepth 2 -name '*.deb'
```

Run `make check-zfs-dkms DEB_ARCH=<arch>` on each native builder after both
package builds. It extracts the generated zfs-dkms package and invokes its
package builds. It extracts the generated openzfs-zfs-dkms package and invokes its
normal configure/build hook against the complete matching kernel tree, checks
`zfs.ko`/`spl.ko` vermagic, and refuses an experimental-cap bypass. CI runs this
before uploading or publishing packages. It does not install or load modules.
Expand Down
2 changes: 1 addition & 1 deletion docs/kernel-config.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ Built in as modules (available but not always loaded):

- ext4, xfs, btrfs — all built in as `=m`
- bcachefs — external DKMS module, installed from the bcachefs APT repo when a flavor enables it
- ZFS — *not* in-tree (CDDL/GPL); ships as `zfs-dkms`
- ZFS — *not* in-tree (CDDL/GPL); ships as `openzfs-zfs-dkms`
- NTFS3 — `=m` (useful for external drives on desktop/HTPC)
- f2fs, exfat, FAT — `=m`
- Network filesystems: CIFS, NFSv3/v4 — `=m`
Expand Down
2 changes: 1 addition & 1 deletion docs/signing.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ Release build flow, once signing material is provisioned:
1. CI fetches signing material from KMS / HSM-backed secret storage
2. Kernel build signs packaged modules with the Rakuen release key
3. Resulting `.deb`s are published to the apt repo
4. Test boxes enrolled with `smooth-secureboot` verify that DKMS consumers (`zfs-dkms`, `smoothfs`, optional NVIDIA) rebuild and load successfully
4. Test boxes enrolled with `smooth-secureboot` verify that DKMS consumers (`openzfs-zfs-dkms`, `smoothfs`, optional NVIDIA) rebuild and load successfully

### Repository secrets

Expand Down
7 changes: 4 additions & 3 deletions examples/smooth.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ CACHYOS_PATCHSET=cachyos-7.2.10
NOBARA_PATCHSET=nobara-picks
POST_NOBARA_PATCHSET=post-nobara-7.2.10

# OpenZFS 2.4.4 natively supports Linux 7.2, including DKMS rebuilds.
# The older zfs-2.4.3 META carry is no longer needed for this release.
ZFS_PATCHSET=
# OpenZFS 2.4.4 natively supports Linux 7.2, including DKMS rebuilds. The
# zfs-2.4.4 lane only makes the native packages conflict with the
# alien-built names of earlier SmoothKernel releases (see its README).
ZFS_PATCHSET=zfs-2.4.4

# Where the .debs land. Default is $(pwd)/out.
OUT_DIR=$(CURDIR)/out/$(DEB_ARCH)
Expand Down
7 changes: 4 additions & 3 deletions examples/smoothnas.env
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ CACHYOS_PATCHSET=cachyos-7.2.10
NOBARA_PATCHSET=nobara-picks
POST_NOBARA_PATCHSET=post-nobara-7.2.10

# OpenZFS 2.4.4 natively supports Linux 7.2, including DKMS rebuilds.
# The older zfs-2.4.3 META carry is no longer needed for this release.
ZFS_PATCHSET=
# OpenZFS 2.4.4 natively supports Linux 7.2, including DKMS rebuilds. The
# zfs-2.4.4 lane only makes the native packages conflict with the
# alien-built names of earlier SmoothKernel releases (see its README).
ZFS_PATCHSET=zfs-2.4.4

# Where the .debs land. Default is $(pwd)/out.
OUT_DIR=$(CURDIR)/out/$(DEB_ARCH)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Subject: [PATCH] debian: conflict with the alien-built package names

SmoothKernel releases up to build 71 shipped OpenZFS as alien-converted
packages (zfs-dkms, libzfs7, libnvpair3, ...). The native packages replace
them, but for these names upstream declares no Conflicts, so apt would keep
both installed -- for zfs-dkms that is two DKMS registrations of zfs/2.4.4.
Conflicts makes apt remove the old package when the new one comes in.

--- a/contrib/debian/control
+++ b/contrib/debian/control
@@ -35,7 +35,7 @@
Depends: ${misc:Depends}, ${shlibs:Depends}
Breaks: libnvpair1, libnvpair3
Replaces: libnvpair1, libnvpair3, libnvpair3linux
-Conflicts: libnvpair3linux
+Conflicts: libnvpair3linux, libnvpair3
Description: Solaris name-value library for Linux
This library provides routines for packing and unpacking nv pairs for
transporting data across process boundaries, transporting between
@@ -46,7 +46,7 @@
Architecture: linux-any
Depends: libpam-runtime, ${misc:Depends}, ${shlibs:Depends}
Replaces: libpam-zfs
-Conflicts: libpam-zfs
+Conflicts: libpam-zfs, pam-zfs-key
Description: PAM module for managing encryption keys for ZFS
OpenZFS is a storage platform that encompasses the functionality of
traditional filesystems and volume managers. It supports data checksums,
@@ -61,7 +61,7 @@
Depends: ${misc:Depends}, ${shlibs:Depends}
Breaks: libuutil1, libuutil3
Replaces: libuutil1, libuutil3, libuutil3linux
-Conflicts: libuutil3linux
+Conflicts: libuutil3linux, libuutil3
Description: Solaris userland utility library for Linux
This library provides a variety of glue functions for ZFS on Linux:
* libspl: The Solaris Porting Layer userland library, which provides APIs
@@ -84,7 +84,7 @@
openzfs-libzpool7 (= ${binary:Version}),
${misc:Depends}
Replaces: libzfslinux-dev
-Conflicts: libzfslinux-dev
+Conflicts: libzfslinux-dev, libzfs7-devel
Provides: libnvpair-dev, libuutil-dev
Description: OpenZFS filesystem development files for Linux
Header files and static libraries for compiling software against
@@ -102,7 +102,7 @@
Recommends: libcurl4
Breaks: libzfs2, libzfs4, libzfs4linux, libzfs6linux, libzfs7linux, openzfs-libzfs4, openzfs-libzfs6
Replaces: libzfs2, libzfs4, libzfs4linux, libzfs6linux, libzfs7linux, openzfs-libzfs4, openzfs-libzfs6
-Conflicts: libzfs7linux
+Conflicts: libzfs7linux, libzfs7
Description: OpenZFS filesystem library for Linux - general support
OpenZFS is a storage platform that encompasses the functionality of
traditional filesystems and volume managers. It supports data checksums,
@@ -130,7 +130,7 @@
Depends: ${misc:Depends}, ${shlibs:Depends}
Breaks: libzpool2, libzpool5, libzpool6linux, libzpool7linux
Replaces: libzpool2, libzpool5, libzpool6linux, libzpool7linux
-Conflicts: libzpool7linux
+Conflicts: libzpool7linux, libzpool7
Description: OpenZFS pool library for Linux
OpenZFS is a storage platform that encompasses the functionality of
traditional filesystems and volume managers. It supports data checksums,
@@ -197,6 +197,7 @@
# suggests debhelper because e.g. `dkms mkdeb -m zfs -v 0.8.2` needs dh_testdir (#909183)
Suggests: debhelper
Breaks: spl-dkms (<< 0.8.0~rc1)
+Conflicts: zfs-dkms
Replaces: spl-dkms, zfs-dkms
Provides: openzfs-zfs-modules
Description: OpenZFS filesystem kernel modules for Linux
33 changes: 33 additions & 0 deletions patches/zfs-2.4.4/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# zfs-2.4.4

Carry patches applied to the pristine OpenZFS `2.4.4` release tarball before
`autogen.sh` runs. Applied by `recipes/build-zfs.sh` via `ZFS_PATCHSET`, under
the rules in [`../../docs/PATCHES.md`](../../docs/PATCHES.md).

Current contents:

- `0001-debian-conflict-with-alien-built-packages.patch`

## Why this lane exists

Up to build 71, SmoothKernel built OpenZFS with its alien targets
(`make deb-utils deb-dkms`), which convert RPMs and drop their dependencies:
`zfs-dkms` did not depend on `dkms`, and the libraries declared no shared
library dependencies. It now builds OpenZFS's own Debian packaging
(`make native-deb-utils`), whose packages are named `openzfs-*` and carry
real dependencies.

The native packages already conflict with most old names (`zfs`,
`zfs-initramfs`, `zfs-dracut`, `zfs-test`, `python3-pyzfs`). For the rest
upstream only declares `Replaces`, which lets apt overwrite their files but
leaves the old package installed. On a box that had the alien packages, that
leaves `zfs-dkms` and `openzfs-zfs-dkms` both registering `zfs/2.4.4` with
DKMS. The patch adds `Conflicts` for those names: `zfs-dkms`, `libnvpair3`,
`libuutil3`, `libzfs7`, `libzpool7`, `libzfs7-devel`, `pam-zfs-key`.

## Removal condition

Once no installed system can still carry the alien-built packages, i.e. every
SmoothKernel consumer has moved to the `openzfs-*` packages. Carry the patch
forward on each OpenZFS bump until then (`contrib/debian/control` rarely
changes, so it should apply as is).
Loading
Loading