diff --git a/multimedia/zoneminder/Makefile b/multimedia/zoneminder/Makefile index 5059d270d9b5..47ba2e280d88 100644 --- a/multimedia/zoneminder/Makefile +++ b/multimedia/zoneminder/Makefile @@ -1,127 +1,125 @@ PORTNAME= zoneminder DISTVERSION= 1.36.35 +PORTREVISION= 1 CATEGORIES= multimedia PKGNAMESUFFIX= ${PHP_PKGNAMESUFFIX} PATCH_SITES= https://github.com/ZoneMinder/zoneminder/commit/ PATCHFILES= c7975f11eded548a5e567871b00681a307ed2a97.patch:-p1 MAINTAINER= bsd@abinet.ru COMMENT= Complete security camera solution, fully web based with image analysis WWW= https://www.zoneminder.com/ LICENSE= GPLv2 -DEPRECATED= Depends on expired security/p5-Data-Entropy -EXPIRATION_DATE=2025-09-01 - ZM_DEPENDS= p5-DBI>=0:databases/p5-DBI \ ${DBD_MYSQL} \ p5-Date-Manip>=0:devel/p5-Date-Manip \ p5-Test-LWP-UserAgent>=0:www/p5-Test-LWP-UserAgent \ p5-Sys-Mmap>=0:devel/p5-Sys-Mmap \ p5-LWP-Protocol-https>=0:www/p5-LWP-Protocol-https \ p5-Sys-CPU>=0:devel/p5-Sys-CPU \ p5-Sys-MemInfo>=0:devel/p5-Sys-MemInfo \ p5-Data-Dump>=0:devel/p5-Data-Dump \ p5-SOAP-WSDL>=0:devel/p5-SOAP-WSDL \ p5-Data-UUID>=0:devel/p5-Data-UUID \ p5-IO-Socket-Multicast>=0:net/p5-IO-Socket-Multicast \ p5-Number-Bytes-Human>=0:devel/p5-Number-Bytes-Human \ p5-JSON-MaybeXS>=0:converters/p5-JSON-MaybeXS \ ffmpeg:multimedia/ffmpeg BUILD_DEPENDS= ${ZM_DEPENDS} LIB_DEPENDS= libx264.so:multimedia/libx264 \ libmp4v2.so:multimedia/mp4v2 \ libgcrypt.so:security/libgcrypt RUN_DEPENDS= ${ZM_DEPENDS} \ sudo:security/sudo \ p5-Device-SerialPort>=0:comms/p5-Device-SerialPort \ p5-Crypt-Eksblowfish>=0:security/p5-Crypt-Eksblowfish \ - p5-Data-Entropy>=0:security/p5-Data-Entropy \ + p5-Bytes-Random-Secure>=0:security/p5-Bytes-Random-Secure \ p5-XML-LibXML>=0:textproc/p5-XML-LibXML \ zip:archivers/zip USES= cmake:insource,noninja cpe jpeg mysql perl5 php:flavors shebangfix ssl USE_GITHUB= yes GH_TUPLE= FriendsOfCake:crud:1429237:crud/web/api/app/Plugin/Crud \ ZoneMinder:CakePHP-Enum-Behavior:ea90c0c:crud_plugin/web/api/app/Plugin/CakePHP-Enum-Behavior \ ZoneMinder:RtspServer:eab3285:rtsp_server/dep/RtspServer USE_RC_SUBR= zoneminder USE_PHP= ctype gd intl opcache pdo_mysql session sockets sysvsem OPTIONS_DEFINE= NLS V4L OPTIONS_SUB= yes NLS_USES= gettext NLS_CONFIGURE_ENABLE= nls V4L_BUILD_DEPENDS= ${LOCALBASE}/include/linux/videodev2.h:multimedia/v4l_compat V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l PLIST_SUB= WWWOWN="${WWWOWN}" WWWGRP="${WWWGRP}" SUB_FILES= pkg-message SHEBANG_FILES= scripts/zmaudit.pl.in \ scripts/zmcamtool.pl.in \ scripts/zmcontrol.pl.in \ scripts/zmdc.pl.in \ scripts/zmfilter.pl.in \ scripts/zmpkg.pl.in \ scripts/zmstats.pl.in \ scripts/zmtelemetry.pl.in \ scripts/zmtrack.pl.in \ scripts/zmtrigger.pl.in \ scripts/zmupdate.pl.in \ scripts/zmvideo.pl.in \ scripts/zmwatch.pl.in \ scripts/zmx10.pl.in \ scripts/zmonvif-probe.pl.in \ scripts/zmrecover.pl.in CMAKE_ARGS+= -DZM_PERL_MM_PARMS=INSTALLDIRS=site \ -DZM_CONFIG_DIR=${PREFIX}/etc \ -DZM_CONFIG_SUBDIR=${PREFIX}/etc/zoneminder \ -DZM_WEBDIR=${WWWDIR} \ -DZM_CGIDIR=${WWWDIR}/cgi-bin \ -DZM_CONTENTDIR=/var/db/zoneminder \ -DZM_MANPAGE_DEST_PREFIX=${PREFIX}/share/man \ -DHAVE_SENDFILE=0 \ -DZM_NO_CURL=ON \ -DZM_NO_LIBVLC=ON \ -DPCRE_LIBRARIES=0 \ -DZM_PATH_MAP=/tmp \ -DGNUTLS_LIBRARIES=0 \ -DCMAKE_REQUIRED_INCLUDES:STRING="${LOCALBASE}/include" .include .if ${OPSYS} == FreeBSD EXTRA_PATCHES= ${PATCHDIR}/extra-patch-CMakeLists.txt .endif RUN_DEPENDS+= ${PHPBASE}/lib/php/${PHP_EXT_DIR}/apcu.so:devel/pecl-APCu@${PHP_FLAVOR} PKGMESSAGE= ${WRKDIR}/pkg-message post-patch: # Avoid conflict with C++20 by adding .txt suffix @${MV} ${WRKSRC}/version ${WRKSRC}/version.txt @${REINPLACE_CMD} -i .c++20 's/"version/&.txt/' \ ${WRKSRC}/CMakeLists.txt pre-install: ${MKDIR} ${STAGEDIR}${WWWDIR}/temp ${MKDIR} ${STAGEDIR}${WWWDIR}/api/app/tmp ${MKDIR} ${STAGEDIR}/var/cache/zoneminder ${MKDIR} ${STAGEDIR}/var/db/zoneminder ${MKDIR} ${STAGEDIR}/var/db/zoneminder/events ${MKDIR} ${STAGEDIR}/var/run/zm ${MKDIR} ${STAGEDIR}/var/tmp/zm ${MKDIR} ${STAGEDIR}/var/log/zm post-install: # zmsystemctl.pl is only for systend-based systems @cd ${STAGEDIR}${PREFIX} && \ ${RM} \ bin/zmsystemctl.pl \ share/man/man8/zmsystemctl.pl.8.gz .include diff --git a/multimedia/zoneminder/files/patch-scripts_zmupdate.pl.in b/multimedia/zoneminder/files/patch-scripts_zmupdate.pl.in new file mode 100644 index 000000000000..8bd3db5ac6ec --- /dev/null +++ b/multimedia/zoneminder/files/patch-scripts_zmupdate.pl.in @@ -0,0 +1,39 @@ +--- scripts/zmupdate.pl.in.orig 2025-06-13 23:01:03 UTC ++++ scripts/zmupdate.pl.in +@@ -52,8 +52,6 @@ use version; + use strict; + use bytes; + use version; +-use Crypt::Eksblowfish::Bcrypt; +-use Data::Entropy::Algorithms qw(rand_bits); + + # ========================================================================== + # +@@ -1035,6 +1033,18 @@ sub migratePasswords { + } # end sub patchDB + + sub migratePasswords { ++ use Crypt::Eksblowfish::Bcrypt; ++ my $random; ++ eval { ++ require Bytes::Random::Secure; ++ $random = Bytes::Random::Secure->new( Bits => 16*8); ++ }; ++ if ($@ or !$random) { ++ eval { ++ require Data::Entropy::Algorithms; ++ $random = Data::Entropy::Algorithms::rand_bits(16*8); ++ }; ++ } + print ("Migratings passwords, if any...\n"); + my $sql = 'SELECT * FROM `Users`'; + my $sth = $dbh->prepare_cached($sql) or die( "Can't prepare '$sql': ".$dbh->errstr() ); +@@ -1043,7 +1053,7 @@ sub migratePasswords { + my $scheme = substr($user->{Password}, 0, 1); + if ($scheme eq '*') { + print ('-->'.$user->{Username}." password will be migrated\n"); +- my $salt = Crypt::Eksblowfish::Bcrypt::en_base64(rand_bits(16*8)); ++ my $salt = Crypt::Eksblowfish::Bcrypt::en_base64($random); + my $settings = '$2a$10$'.$salt; + my $pass_hash = Crypt::Eksblowfish::Bcrypt::bcrypt($user->{Password},$settings); + my $new_pass_hash = '-ZM-'.$pass_hash;