Bug 275239 - sysutils/openzfs-kmod: fails to build on 14.0
Summary: sysutils/openzfs-kmod: fails to build on 14.0
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Alan Somers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-11-21 18:53 UTC by Alan Somers
Modified: 2023-12-27 22:55 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (freqlabs)
asomers: merge-quarterly?


Attachments
Update the openzfs ports to 2.2.0 (23.86 KB, patch)
2023-11-21 22:10 UTC, Alan Somers
no flags Details | Diff
Update the openzfs ports to 2.2.2 (24.34 KB, patch)
2023-12-07 17:37 UTC, Alan Somers
asomers: maintainer-approval? (mikael)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alan Somers freebsd_committer freebsd_triage 2023-11-21 18:53:07 UTC
The openzfs-kmod port fails to build on FreeBSD 14.0.  This also affects sysutils/openzfs , which is built from the same sources and depends on openzfs-kmod.  There are two possible solutions:

1) Update the port to the latest ZFS-2.2.0 release, which builds successfully.
2) Backport a few changes from it and keep them as patches.

Option 1 is easiest and arguably best for many users.  The main downside is that it won't be eligible for a MFH.  Option 2 works (though I haven't fully tested it yet).  Unless the maintainer objects, I'll pursue option 1.


Here's the first compile error:
/wrkdirs/usr/ports/sysutils/openzfs-kmod/work/zfs-dc5c8006f/module/os/freebsd/spl/spl_policy.c:425:13: error: variable has incomplete type 'vtype_t' (aka 'enum vtype')
    vtype_t vtype)
            ^
/wrkdirs/usr/ports/sysutils/openzfs-kmod/work/zfs-dc5c8006f/include/os/freebsd/spl/sys/vnode.h:39:14: note: forward declaration of 'enum vtype'
typedef enum vtype vtype_t;
             ^
1 error generated.
*** Error code 1
Comment 1 Alan Somers freebsd_committer freebsd_triage 2023-11-21 22:10:02 UTC
Created attachment 246474 [details]
Update the openzfs ports to 2.2.0

This commit updates openzfs and openzfs-kmod to 2.2.0.  Both build successfully on 12.4, 13.2, and 14.0.
Comment 2 Mikael Urankar freebsd_committer freebsd_triage 2023-12-07 16:34:44 UTC
Approved by: mikael, maintainer timeout
Comment 3 Alan Somers freebsd_committer freebsd_triage 2023-12-07 16:42:33 UTC
The patch is obsolete.  Since I posted it, there have been 3 new upstream releases, including one that incorporates the PATCHFILES included in my attachment.  I'll update the patch.
Comment 4 Alan Somers freebsd_committer freebsd_triage 2023-12-07 17:37:06 UTC
Created attachment 246877 [details]
Update the openzfs ports to 2.2.2
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2023-12-07 20:07:27 UTC
Since it's a critical fix for data corruption, I'd commit it under blanket approval (runtime fixes)
Approved by: mikael (runtime fix blanket)
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-12-07 21:28:05 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=117f55784d981833d6b51038afc215239382e651

commit 117f55784d981833d6b51038afc215239382e651
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2023-11-21 22:06:24 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2023-12-07 21:26:01 +0000

    sysutils/openzfs, sysutils/openzfs-kmod: update to ZFS 2.2.2

    Among other things, this fixes an important data corruption bug.  It
    also fixes the build on FreeBSD 14.

    https://github.com/openzfs/zfs/releases/tag/zfs-2.2.2

    PR:             275239
    MFH:            2023Q4
    Approved by:    mikael (ports)
    Sponsored-by:   Axcient

 sysutils/openzfs-kmod/Makefile |  5 +--
 sysutils/openzfs-kmod/distinfo |  6 +--
 sysutils/openzfs/Makefile      |  7 ++--
 sysutils/openzfs/distinfo      |  6 +--
 sysutils/openzfs/pkg-plist     | 85 +++++++++++++++++++++++++++++++++++++-----
 5 files changed, 86 insertions(+), 23 deletions(-)
Comment 7 commit-hook freebsd_committer freebsd_triage 2023-12-27 22:55:33 UTC
A commit in branch 2023Q4 references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=fefa21bc7fe2f02662cb7ae50d8da8c720fc9138

commit fefa21bc7fe2f02662cb7ae50d8da8c720fc9138
Author:     Alan Somers <asomers@FreeBSD.org>
AuthorDate: 2023-11-21 22:06:24 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2023-12-27 22:43:58 +0000

    sysutils/openzfs, sysutils/openzfs-kmod: update to ZFS 2.2.2

    Among other things, this fixes an important data corruption bug.  It
    also fixes the build on FreeBSD 14.

    https://github.com/openzfs/zfs/releases/tag/zfs-2.2.2

    PR:             275239
    MFH:            2023Q4
    Approved by:    mikael (ports)
    Sponsored-by:   Axcient

    (cherry picked from commit 117f55784d981833d6b51038afc215239382e651)

 sysutils/openzfs-kmod/Makefile |  5 +--
 sysutils/openzfs-kmod/distinfo |  6 +--
 sysutils/openzfs/Makefile      |  7 ++--
 sysutils/openzfs/distinfo      |  6 +--
 sysutils/openzfs/pkg-plist     | 85 +++++++++++++++++++++++++++++++++++++-----
 5 files changed, 86 insertions(+), 23 deletions(-)