Bug 284231 - benchmarks/lzbench: Update to 1.9
Summary: benchmarks/lzbench: Update to 1.9
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: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-21 12:11 UTC by Anton Saietskii
Modified: 2025-03-02 14:19 UTC (History)
0 users

See Also:
vsasjason: maintainer-feedback-


Attachments
v0 (apply via 'git am') (1.51 KB, patch)
2025-01-21 12:11 UTC, Anton Saietskii
vsasjason: maintainer-approval?
Details | Diff
'poudriere bulk -t' log (14.2-R amd64) (194.03 KB, text/plain)
2025-01-21 12:14 UTC, Anton Saietskii
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anton Saietskii 2025-01-21 12:11:41 UTC
Created attachment 256873 [details]
v0 (apply via 'git am')

user@hostname: [?:0] /usr/ports/benchmarks/lzbench $ lzbench | head -1
lzbench 1.9 (64-bit FreeBSD)  Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
Comment 1 Anton Saietskii 2025-01-21 12:14:38 UTC
Created attachment 256874 [details]
'poudriere bulk -t' log (14.2-R amd64)
Comment 2 Anton Saietskii 2025-01-21 14:45:47 UTC
Noticed we don't have '-r' option (recurse directories).

Looks like here are problematic lines of code [0] which tries to detect system capabilities:
#elif (defined(__APPLE__) && defined(__MACH__)) || \
     ((defined(__unix__) || defined(__unix) || defined(__midipix__)) && defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L)) /* snprintf, opendir */
#  define UTIL_HAS_CREATEFILELIST
#  include <dirent.h>       /* opendir, readdir */

I guess it would be nice to create a local patch or upstream PR, however I don't know how to work with _POSIX_C_SOURCE neither have GitHub account.

[0]: https://github.com/inikep/lzbench/blob/cbeaa92b137558ae26df428c8a2cae7598a9c6e8/_lzbench/util.h#L352
Comment 3 Anton Saietskii 2025-02-28 12:09:21 UTC
Maintainer timeout.
Comment 4 Alexey Dokuchaev freebsd_committer freebsd_triage 2025-02-28 14:53:07 UTC
I guess we should be updating the port to the latest version 2.0.1 now that it had been released.  I'm not sure about the "dual GPLv2 GPLv3" licensing: this benchmark includes not only GPL'ed code.  I've opted out of defining the LICENSE knobs originally because omitting it was easier than making it exhaustive. :-)

> Noticed we don't have '-r' option (recurse directories).
Yeah, we need a patch for this, no big deal.

> Created attachment 256874 [details] 'poudriere bulk -t' log (14.2-R amd64)
Please don't attach build logs unless being asked.  Hardly anyone would ever look at them and they just clutter Bugzilla and eat disk space.
Comment 5 commit-hook freebsd_committer freebsd_triage 2025-03-01 06:04:34 UTC
A commit in branch main references this bug:

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

commit 7cc244f0d1e7fff69b971cee8e0b18ed257809a4
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2025-03-01 06:03:00 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2025-03-01 06:03:00 +0000

    benchmarks/lzbench: the port had been updated to version 2.0.1

    Adjust preprocessor logic for the fact that FreeBSD has proper
    directory(3) and nanosleep(2) support.

    PR:             284231
    Reported by:    portscout

 benchmarks/lzbench/Makefile                          |  5 +++--
 benchmarks/lzbench/distinfo                          |  6 +++---
 .../lzbench/files/patch-__lzbench_util.h (new)       | 20 ++++++++++++++++++++
 3 files changed, 26 insertions(+), 5 deletions(-)
Comment 6 Anton Saietskii 2025-03-02 14:19:26 UTC
(In reply to Alexey Dokuchaev from comment #4)

> I'm not sure about the "dual GPLv2 GPLv3" licensing

This is exactly what upstream declares [0]. In relevant pull request [1], MySQL has been mentioned as an example of software which includes lots of other software with different licenses, and it appears we just set 'main' license in ports in such cases:

$ find /usr/ports/databases/ -maxdepth 1 -type d -name mysql\*server -exec make -C {} -V LICENSE \;
GPLv2
GPLv2
GPLv2

[0]: https://github.com/inikep/lzbench/blob/master/LICENSE
[1]: https://github.com/inikep/lzbench/pull/158