Bug 283522 - filesystems/py-libzfs: Fix support for 14.0+
Summary: filesystems/py-libzfs: Fix support for 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 Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-12-23 17:48 UTC by Goran Mekić
Modified: 2024-12-24 18:28 UTC (History)
1 user (show)

See Also:


Attachments
support-for-14.0+ (3.33 KB, patch)
2024-12-23 17:48 UTC, Goran Mekić
no flags Details | Diff
Use github commit for patch (1.88 KB, patch)
2024-12-23 18:19 UTC, Goran Mekić
no flags Details | Diff
Put everything into commit (2.05 KB, patch)
2024-12-23 18:52 UTC, Goran Mekić
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Goran Mekić 2024-12-23 17:48:29 UTC
Created attachment 256075 [details]
support-for-14.0+

Based on https://github.com/truenas/py-libzfs/pull/251. I would also like to become the maintainer.
Comment 1 Goran Mekić 2024-12-23 17:49:30 UTC
The patch is taken from https://github.com/truenas/py-libzfs/pull/251
Comment 2 Alan Somers freebsd_committer freebsd_triage 2024-12-23 18:07:06 UTC
What is broken about py-libzfs on 14.0+ ?

Also, pro tip: instead of adding a new patch to the files/ directory, you can instead tell ports to pull the diff for that specific commit.  The syntax looks like:

PATCH_SITES=    https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
PATCHFILES=     0b2ab0594997c44e80e3fdfe9d2add106d81149a.diff:-p1 # backport of https://github.com/truenas/py-libzfs/pull/251
Comment 3 Goran Mekić 2024-12-23 18:19:29 UTC
Created attachment 256076 [details]
Use github commit for patch

I didn't know about PATCHSITE, thank you! The ZFS on 14.0 changed to include skipped bytes in the percentage of resilver. As old code didn't take into account that variable on 14.0+, the percentage was always wrong.
Comment 4 Alan Somers freebsd_committer freebsd_triage 2024-12-23 18:44:02 UTC
(In reply to Goran Mekić from comment #3)
Could you please put that explanation about skipped bytes into the patch's commit message?
Comment 5 Goran Mekić 2024-12-23 18:52:16 UTC
Created attachment 256077 [details]
Put everything into commit
Comment 6 Alan Somers freebsd_committer freebsd_triage 2024-12-23 18:53:26 UTC
The patch LGTM.  Have you build-tested it in poudriere?
Comment 7 Goran Mekić 2024-12-23 18:54:19 UTC
Yes, on 14.2 poudriere jail.
Comment 8 Alan Somers freebsd_committer freebsd_triage 2024-12-23 18:58:04 UTC
(In reply to Goran Mekić from comment #7)
And 13.4 too?
Comment 9 Goran Mekić 2024-12-23 19:05:08 UTC
Not initially as it is guarded by if, but now that you mentioned it, I tried 13.4, too, and it compiles.
Comment 10 commit-hook freebsd_committer freebsd_triage 2024-12-24 18:15:56 UTC
A commit in branch main references this bug:

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

commit fff0adf0ea22271dc2fdd6125ff883629829325a
Author:     Goran Mekić <meka@tilda.center>
AuthorDate: 2024-12-23 17:28:29 +0000
Commit:     Alan Somers <asomers@FreeBSD.org>
CommitDate: 2024-12-24 18:14:06 +0000

    filesystems/py-libzfs: Fix support for 14.0+

    The ZFS on 14.0 changed to include skipped bytes in the percentage of
    resilver. As old code didn't take into account that variable on 14.0+,
    the percentage was always wrong.

    Also, take maintainership.

    PR:             283522
    Reviewed by:    asomers
    Approved by:    lwhsu (ports)
    Sponsored by:   ConnectWise

 filesystems/py-libzfs/Makefile | 8 +++++++-
 filesystems/py-libzfs/distinfo | 4 +++-
 2 files changed, 10 insertions(+), 2 deletions(-)