Bug 286641 - filesystems/nbt: Update to 20250506-dbd559a
Summary: filesystems/nbt: Update to 20250506-dbd559a
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL: https://src.rivoreo.one/nbtfsutils/+l...
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-07 02:16 UTC by WHR
Modified: 2025-05-07 12:50 UTC (History)
1 user (show)

See Also:


Attachments
git diff (1.32 KB, patch)
2025-05-07 02:17 UTC, WHR
msl0000023508: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description WHR 2025-05-07 02:16:47 UTC
The most important change for this update is commit ddc0bb954766b3e1395a74511bcb5dd8176660c2, which fixes a wrong assumption of FUSE read operation that could result in unexpected short reads.
Comment 1 WHR 2025-05-07 02:17:27 UTC
Created attachment 260224 [details]
git diff
Comment 2 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 10:13:07 UTC
Replace:
> CPPFLAGS+=     -I ${LOCALBASE}/include
> LDFLAGS+=      -L ${LOCALBASE}/lib
with
> USES+=localbase

Work for me.
Comment 3 WHR 2025-05-07 11:01:26 UTC
(In reply to Vladimir Druzenko from comment #2)

I think the '-L' option should be added to LDFLAGS instead of LIBS; this ensures that '-L' option will come before any '-l' options.

Therefore I suggest:

-USES=		fuse tar:bz2
+USES=		fuse tar:bz2 localbase:ldflags
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 11:14:55 UTC
(In reply to WHR from comment #3)
> I think the '-L' option should be added to LDFLAGS instead of LIBS;
> this ensures that '-L' option will come before any '-l' options.
And what does this affect?
It can be done with or without ldflags - both work.
Comment 5 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 11:18:02 UTC
Without:
cc -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -Wall -Wextra -Wno-unused-parameter -Wno-switch -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -std=gnu99 -D _FILE_OFFSET_BITS=64 -isystem /usr/local/include  -fstack-protector-strong  mount.nbt.c syncwrite.o -o mount.nbt -L . -l nbt -l z -l fuse -L/usr/local/lib

With:
cc -O2 -pipe  -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -Wall -Wextra -Wno-unused-parameter -Wno-switch -Wno-pointer-to-int-cast -Wno-int-to-pointer-cast -std=gnu99 -D _FILE_OFFSET_BITS=64 -isystem /usr/local/include  -fstack-protector-strong -L/usr/local/lib  mount.nbt.c syncwrite.o -o mount.nbt -L . -l nbt -l z -l fuse
Comment 6 WHR 2025-05-07 11:49:17 UTC
(In reply to Vladimir Druzenko from comment #5)

I think these are equivalent in most implementations; but POSIX says the order of '-L' and '-l' options are significant for the c99 command, so better to follow the common convention.

I guess the 'Mk/Uses/localbase.mk' defaults to use LIBS to support build systems that didn't make use of the LDFLAGS environment variable. Otherwise LDFLAGS should be used instead (for '-L') if available.
Comment 7 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 11:55:44 UTC
(In reply to WHR from comment #6)
ok
Comment 8 commit-hook freebsd_committer freebsd_triage 2025-05-07 12:17:05 UTC
A commit in branch main references this bug:

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

commit eabb3127eaba97f96336e1f65dff6f1ccf6a4fb8
Author:     WHR <msl0000023508@gmail.com>
AuthorDate: 2025-05-07 12:06:46 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-05-07 12:15:18 +0000

    filesystems/nbt: Update 20231114 => 20250506

    Fix a wrong assumption of FUSE read operation that could result in
    unexpected short reads.

    Commit log:
    https://src.rivoreo.one/nbtfsutils/+log/dbd559aa68a9b9057939b0bf7fc797b9ba6e787b

    PR:     286641
    MFH:    2025Q2

 filesystems/nbt/Makefile | 12 ++++--------
 filesystems/nbt/distinfo |  6 +++---
 2 files changed, 7 insertions(+), 11 deletions(-)
Comment 9 commit-hook freebsd_committer freebsd_triage 2025-05-07 12:21:06 UTC
A commit in branch 2025Q2 references this bug:

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

commit 391a93ea6edec82d8b760bdd421922a903d3907a
Author:     WHR <msl0000023508@gmail.com>
AuthorDate: 2025-05-07 12:06:46 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-05-07 12:19:02 +0000

    filesystems/nbt: Update 20231114 => 20250506

    Fix a wrong assumption of FUSE read operation that could result in
    unexpected short reads.

    Commit log:
    https://src.rivoreo.one/nbtfsutils/+log/dbd559aa68a9b9057939b0bf7fc797b9ba6e787b

    PR:     286641
    MFH:    2025Q2
    (cherry picked from commit eabb3127eaba97f96336e1f65dff6f1ccf6a4fb8)

 filesystems/nbt/Makefile | 12 ++++--------
 filesystems/nbt/distinfo |  6 +++---
 2 files changed, 7 insertions(+), 11 deletions(-)
Comment 10 Vladimir Druzenko freebsd_committer freebsd_triage 2025-05-07 12:50:56 UTC
Thanks.