Bug 290739 - archivers/zstd: remove optional LZ4 dependency
Summary: archivers/zstd: remove optional LZ4 dependency
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: Po-Chuan Hsieh
URL:
Keywords: patch-ready
Depends on:
Blocks:
 
Reported: 2025-11-02 11:08 UTC by Matthias Andree
Modified: 2025-11-17 22:13 UTC (History)
3 users (show)

See Also:
mandree: maintainer-feedback-


Attachments
patch to disable lz4 (which is optional) from zstd build (1.30 KB, patch)
2025-11-02 11:08 UTC, Matthias Andree
no flags Details | Diff
v2: patch to disable lz4 and also update manpages to v1.5.7 (2.43 KB, patch)
2025-11-02 12:02 UTC, Matthias Andree
mandree: maintainer-approval? (sunpoet)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Andree freebsd_committer freebsd_triage 2025-11-02 11:08:55 UTC
Created attachment 265099 [details]
patch to disable lz4 (which is optional) from zstd build

Hi, 

I would like to strip lz4 support from zstd to shorten the list of lang/python314's requisites. We don't install the lz4/unlz4 aliases from the zstd package anyways so people would have to have used zstd --format=lz4 already (instead of lz4 with its original command line options).

OK?
Comment 1 Matthias Andree freebsd_committer freebsd_triage 2025-11-02 12:02:06 UTC
Created attachment 265104 [details]
v2: patch to disable lz4 and also update manpages to v1.5.7

I just figure upstream failed to package updated manpages, and per they release notes they offer one commit to cherry-pick, so let's do that, too.
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2025-11-08 09:22:26 UTC
This would however add inconsistency with other distros such as Arch, Fedora, Gentoo, OpenBSD to mention a few
Comment 3 Matthias Andree freebsd_committer freebsd_triage 2025-11-09 17:34:55 UTC
Instead of arguing "what do others do", which per se remains irrelevant for the FreeBSD project, it would help to look at how many of our packages and scripts use a zstd executable to (de)compress lz4 format material, instead of zstd format.  Else someone will come along and tell us we should switch all port building to bazel and switch our kernel to Linux, because that's what others do.
Comment 4 Daniel Engberg freebsd_committer freebsd_triage 2025-11-09 18:24:42 UTC
FreeBSD still at least tries to apply POLA and given your own argument why is this suggested prior to looking into what it affects? Just add a menu toggle and have it enabled by default and you can disabled support if wanted, issue solved.
Comment 5 Paavo-Einari Kaipila 2025-11-09 19:21:30 UTC
This doesn't only affect python. There's hundreds of ports with zstd, but no lz4 as a dependency.

There's no shortage of compressors utilities with multiple supported algos. When looking for such, the one with name zstd isn't even a very obvious choice, unless someone just happens to know.
Comment 6 Matthias Andree freebsd_committer freebsd_triage 2025-11-10 19:13:26 UTC
(In reply to Daniel Engberg from comment #4)
I certainly find it astonishing and not very Unix-like to have a tool to deal with somebody else's file format and will certainly not think of zstd first to (de)compress .lz4 files, so POLA is a good mention -- only in that my question would be "who would be missing LZ4 capabilities from zstd in the first place"?
Comment 7 commit-hook freebsd_committer freebsd_triage 2025-11-17 22:13:34 UTC
A commit in branch main references this bug:

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

commit 4f313c8fd2f40d0e16492613e593a40724102137
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2025-11-02 11:04:40 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2025-11-17 22:10:34 +0000

    archivers/zstd: remove lz4, fix manpages

    This shortens the requisite path for lang/python314,
    and we have a separate archivers/lz4 port.

    This also updates the manual pages to v1.5.7, the
    release tarball missed updating them, see
    <https://github.com/facebook/zstd/releases/tag/v1.5.7>

    PR:             290739
    Approved by:    maintainer timeout (sunpoet@, 15 days)

 archivers/zstd/Makefile | 11 +++++++++--
 archivers/zstd/distinfo |  4 +++-
 2 files changed, 12 insertions(+), 3 deletions(-)