Bug 287222

Summary: multimedia/zoneminder: Replace usage of Data::Entropy (security/p5-Data-Entropy) for undeprecate
Product: Ports & Packages Reporter: Vladimir Druzenko <vvd>
Component: Individual Port(s)Assignee: Vladimir Druzenko <vvd>
Status: Closed FIXED    
Severity: Affects Some People CC: bsd
Priority: --- Flags: bsd: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://cgit.freebsd.org/ports/commit/multimedia/zoneminder/Makefile?id=7113c9db460962b726bd1fb61f9b087637aebd9f
Attachments:
Description Flags
v1 vvd: maintainer-approval?

Description Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-01 22:03:27 UTC
Purpose: https://cgit.freebsd.org/ports/commit/multimedia/zoneminder/Makefile?id=7113c9db460962b726bd1fb61f9b087637aebd9f

Upstream issue: https://github.com/ZoneMinder/zoneminder/issues/4333

I found only one place in "scripts/zmupdate.pl.in":
> use Data::Entropy::Algorithms qw(rand_bits);
> my $salt = Crypt::Eksblowfish::Bcrypt::en_base64(rand_bits(16*8));
I think it's easy to replace with another random generator.
> For most purposes (including cryptography and security),
> modules like Crypt::URandom, Crypt::SysRandom or Crypt::PRNG
> are more than adequate.
Ports:
security/p5-Crypt-URandom
security/p5-Crypt-SysRandom
security/p5-CryptX
Also there are:
security/p5-Bytes-Random-Secure
security/p5-Bytes-Random-Secure-Tiny
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-13 23:33:06 UTC
Created attachment 261247 [details]
v1

Adopted upstream patch "Use Bytes::Random::Secure instead of deprecated Data-Entropy.  Fall back to Data-Entropy. Fixes #4333":
https://github.com/ZoneMinder/zoneminder/commit/38c0f743c1c4c97a8ac35f829bf236ddd8006ce8
Comment 2 Ivan 2025-06-15 06:49:14 UTC
Thanks!
Comment 3 commit-hook freebsd_committer freebsd_triage 2025-06-15 13:50:33 UTC
A commit in branch main references this bug:

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

commit db438743e3d8013cb2b3f735d476ccccaf75502c
Author:     Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-06-15 13:32:19 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-06-15 13:47:24 +0000

    multimedia/zoneminder: Replace usage of Data::Entropy (security/p5-Data-Entropy) for undeprecate

    Aadd adopted upstream patch "Use Bytes::Random::Secure instead of
    deprecated Data-Entropy.  Fall back to Data-Entropy. Fixes #4333":
    https://github.com/ZoneMinder/zoneminder/issues/4333
    https://github.com/ZoneMinder/zoneminder/commit/38c0f743c1c4c97a8ac35f829bf236ddd8006ce8

    PR:             287222
    Approved by:    Ivan <bsd@abinet.ru>

 multimedia/zoneminder/Makefile                     |  6 ++--
 .../files/patch-scripts_zmupdate.pl.in (new)       | 39 ++++++++++++++++++++++
 2 files changed, 41 insertions(+), 4 deletions(-)
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2025-06-15 13:51:24 UTC
Done!