head 1.5; access; symbols pkgsrc-2026Q2:1.4.0.4 pkgsrc-2026Q2-base:1.4 pkgsrc-2026Q1:1.4.0.2 pkgsrc-2026Q1-base:1.4 pkgsrc-2025Q4:1.2.0.10 pkgsrc-2025Q4-base:1.2 pkgsrc-2025Q3:1.2.0.8 pkgsrc-2025Q3-base:1.2 pkgsrc-2025Q2:1.2.0.6 pkgsrc-2025Q2-base:1.2 pkgsrc-2025Q1:1.2.0.4 pkgsrc-2025Q1-base:1.2 pkgsrc-2024Q4:1.2.0.2 pkgsrc-2024Q4-base:1.2 pkgsrc-2024Q3:1.1.0.16 pkgsrc-2024Q3-base:1.1 pkgsrc-2024Q2:1.1.0.14 pkgsrc-2024Q2-base:1.1 pkgsrc-2024Q1:1.1.0.12 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.10 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.8 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.6 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.4 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.2 pkgsrc-2022Q4-base:1.1; locks; strict; comment @# @; 1.5 date 2026.07.30.12.36.00; author gdt; state Exp; branches; next 1.4; commitid KzPCn4uYqpy2YFPG; 1.4 date 2026.01.05.16.02.45; author gdt; state Exp; branches; next 1.3; commitid FGDN09o5SyNtIdpG; 1.3 date 2026.01.04.23.29.54; author gdt; state Exp; branches; next 1.2; commitid ZedEkaogABCge8pG; 1.2 date 2024.12.01.13.49.47; author gdt; state Exp; branches; next 1.1; commitid ABpMx07E1a05RNzF; 1.1 date 2022.09.27.01.20.39; author gdt; state Exp; branches; next ; commitid zCqUVVvfPb2uhrVD; desc @@ 1.5 log @security/zoneminder: Update to 1.38.3 Upstream NEWS, less bugfixes and minor improvements: ZoneMinder 1.38.x Release Notes TL;DR - Key Highlights - Role-Based Access Control - Enterprise-grade permission system with user roles - Modern Streaming - WebRTC, Go2RTC, RTSP2Web support with hardware acceleration - Monitor Function Redesign - Granular control with separate Capturing, Analysing, and Recording settings - Enhanced Protocols - ONVIF Events, MQTT, Amcrest API integration -Event Tagging - Flexible labeling and organization system - Server Monitoring - Real-time CPU, memory, and performance metrics - Geolocation - Geographic tracking for events and servers - Hardware Encoding - GPU acceleration for video encoding Overview ZoneMinder 1.38.x represents a major evolution from version 1.36.x, introducing significant architectural improvements, new streaming capabilities, enhanced security features, and extensive monitoring enhancements. This release focuses on modernizing the platform with support for contemporary streaming protocols, implementing enterprise-grade access control, and improving performance and scalability. Major Feature Areas 1. Advanced User Access Control & Security Role-Based Access Control (RBAC) Introduced comprehensive role-based permission system with reusable role templates New database tables: User_Roles, Role_Groups_Permissions, Role_Monitors_Permissions Replaced legacy comma-separated monitor ID strings with normalized permission tables Fine-grained permissions for both monitor groups and individual monitors Enhanced User Management Added user profile fields: Name, Email, Phone User-specific montage layouts for personalized dashboards Improved security controls with private and system configuration flags 2. Modern Streaming & Multi-Protocol Support WebRTC Integration Janus WebRTC Gateway support with audio streaming capabilities Go2RTC protocol support for alternative streaming RTSP2Web streaming with WebRTC/MSE/HLS options Configurable codec selection and stream profiles Hardware-Accelerated Encoding Hardware acceleration support for video encoding (GPU encoding) New encoder configuration options: EncoderHWAccelName and EncoderHWAccelDevice Human-readable codec names replacing integer-based codec selection Optimized encoding for reduced CPU usage 3. Monitor Function Redesign One of the most significant architectural changes in 1.38.x is the redesign of the monitor Function field into three independent control parameters. This provides much more granular control over monitor behavior. Legacy Function Field (1.36.x and earlier) The traditional Function field was a single enum that controlled all aspects of a monitor's operation: None - Monitor disabled Monitor - Capture video only (no recording, no motion detection) Modect - Motion detection with recording on motion Record - Continuous recording without motion detection Mocord - Continuous recording with motion detection Nodect - Recording on external trigger, no built-in motion detection New Granular Control (1.38.x) The Function field has been split into three independent settings, allowing fine-grained control: Capturing enum (None/Ondemand/Always) Controls whether the monitor captures video from the camera None - No video capture (monitor effectively disabled) Ondemand - Capture only when needed (e.g., when viewing live or triggered by events) Always - Continuous video capture from the camera Analysing enum (None/Always) Controls whether motion detection and analysis is performed None - No motion detection or analysis (equivalent to Monitor or Record modes) Always - Perform motion detection and analysis (equivalent to Modect or Mocord modes) Recording enum (None/OnMotion/Always) Controls when video is saved to disk None - No recording (live viewing only) OnMotion - Record only when motion is detected or triggered Always - Continuous recording Migration from Legacy Functions The database automatically migrates old Function values to the new settings: None → Capturing: None, Analysing: None, Recording: None Monitor → Capturing: Always, Analysing: None, Recording: None Modect → Capturing: Always, Analysing: Always, Recording: OnMotion Record → Capturing: Always, Analysing: None, Recording: Always Mocord → Capturing: Always, Analysing: Always, Recording: Always Nodect → Capturing: Always, Analysing: None, Recording: OnMotion Benefits of the New Design More flexible monitor configurations (e.g., analyze but don't record, or record without analysis) Better resource management by independently controlling capture, analysis, and storage Clearer separation of concerns for troubleshooting Foundation for future enhancements like conditional recording policies Easier to understand monitor behavior at a glance 4. Enhanced Camera Integration Extended Protocol Support ONVIF Event Listener for direct camera event notifications Amcrest API support for Amcrest-branded cameras MQTT integration for IoT device communication and message handling Camera Management Camera manufacturer and model database integration 5. Advanced Event Management Event Tagging System Flexible event labeling with custom tags Many-to-many relationship between events and tags Improved event organization and filtering Event Automation & Triggers Event start and end command execution Multiple event close modes: system, time, duration, idle, alarm-based Section length warnings for long recordings Filter execution intervals for scheduled automation Event Metadata & Analytics Event data extensibility with custom metadata storage Geolocation tracking (latitude/longitude) for events Enhanced event reporting system with historical analytics 6. Performance & Infrastructure Server Monitoring Comprehensive server statistics tracking CPU usage monitoring (User, Nice, System, Idle percentages) Memory and swap utilization metrics Timestamped performance data collection Optimization Features Monitor startup delay to stagger initialization and reduce system load Enhanced status tracking with update timestamps Analysis image channel optimization (Full Color vs. Y-Channel) (reduces cpu use) Improved monitor soft delete with logical deletion flags Monitor importance levels (Normal/Less/Not) for stream prioritization Wall clock timestamp synchronization when doing passthrough 7. Display & User Interface Montage Enhancements Expanded grid layouts: 1/2/4/5/6/7/8/9/10/12/16 Wide configurations User-specific montage layouts with personalized views options to locate/hide status information to fully use space Playback Improvements Default player selection for preferred streaming client Enhanced video playback controls Improved event viewing experience Optimal mjpeg scaling to reduce cpu/bandwidth use while maintaining fidelity ** New file explorer view ** limited to defined storage areas ** Watch and Cycle views merged ** PTZ controls improved, with toggling of visibility 8. Storage & Recording Granular Recording Control With the redesign of the monitor Function field (see section 3), recording behavior is now controlled independently through the Recording, Capturing, and Analysing settings. This provides much greater flexibility: Recording modes: None/OnMotion/Always Capturing modes: None/Ondemand/Always Analysis modes: None/Always This allows configurations that weren't possible with the old Function field, such as: Capture and analyze without recording (for alerting only) Record without analysis (for compliance/archival) On-demand capture with triggered recording Email Notifications Email format options: Individual or Summary Improved event notification formatting Configurable alert delivery 9. Geographic & Metadata Features Geolocation Support Geographic coordinates for monitors, events, and servers Location-based event tracking and analysis 10. Development & Integration Database Schema Evolution The 1.37.x series includes approximately 79 database schema updates from 1.37.1 through 1.37.79, each introducing targeted improvements and new capabilities. Key architectural changes include: Migration from string-based configuration to normalized relational tables Introduction of extensible metadata storage systems Enhanced foreign key relationships for referential integrity Improved indexing for query performance Upgrade Considerations Breaking Changes Permission system migration from comma-separated strings to normalized tables Some configuration parameters have been renamed or restructured Monitor soft delete may require updates to custom scripts that query monitor data @ text @$NetBSD: patch-CMakeLists.txt,v 1.4 2026/01/05 16:02:45 gdt Exp $ CMake will detect the MacOS 6-argument sendfile() support and configure HAVE_SENDFILE, but the code itself doesn't support this interface. So don't probe for HAVE_SENDFILE if we HAVE_SENDFILE6_SUPPORT. Just because librt doesn't exist does not mean that clock_gettime() doesn't exist, so don't insist on librt being present. Fixes the build on MacOS. Let pkgsrc be responsible for zm.conf into examples, rather than overwriting the existing configuration file. --- CMakeLists.txt.orig 2026-05-28 12:42:49.000000000 +0000 +++ CMakeLists.txt @@@@ -329,7 +329,9 @@@@ check_include_file("ucontext.h" HAVE_UCO check_include_file("sys/sendfile.h" HAVE_SYS_SENDFILE_H) check_include_file("sys/syscall.h" HAVE_SYS_SYSCALL_H) check_function_exists("syscall" HAVE_SYSCALL) +if(NOT HAVE_SENDFILE6_SUPPORT) check_function_exists("sendfile" HAVE_SENDFILE) +endif(NOT HAVE_SENDFILE6_SUPPORT) check_function_exists("posix_memalign" HAVE_POSIX_MEMALIGN) check_type_size("siginfo_t" HAVE_SIGINFO_T) check_type_size("ucontext_t" HAVE_UCONTEXT_T) @@@@ -741,7 +743,7 @@@@ # Check all required modules at once # TODO: Add checking for the optional modules find_package( - PerlModules COMPONENTS Sys::Syslog DBI DBD::mysql + PerlModules COMPONENTS Sys::Syslog DBI DBD::MariaDB Getopt::Long Time::HiRes Date::Manip LWP::UserAgent ExtUtils::MakeMaker ${ZM_MMAP_PERLPACKAGE}) if(NOT PERLMODULES_FOUND) @@@@ -839,8 +841,8 @@@@ else() endif() # Install zm.conf -install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "${ZM_CONFIG_DIR}") -install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/conf.d/" DESTINATION "${ZM_CONFIG_SUBDIR}" PATTERN "*.in" EXCLUDE) +#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "${ZM_CONFIG_DIR}") +#install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/conf.d/" DESTINATION "${ZM_CONFIG_SUBDIR}" PATTERN "*.in" EXCLUDE) # Uninstall target configure_file( @ 1.4 log @security/zoneminder: Update to 1.36.37.7 This is really the release-1.36 branch, 7 commits after 1.36.37. Upstream has cherry-picked MariaDB fixes, and the pkgsrc default is now MariaDB, which should just work. GC cherry-picking of PR 3914, because those are on the upstream stable branch now. Rototill/gc/update README-pkgsrc.txt to catch up with years of zm changes. Drop ZM_DIR_IMAGES as no longer used. Clean up and improve comments in Makefile. @ text @d1 1 a1 3 $NetBSD: patch-CMakeLists.txt,v 1.3 2026/01/04 23:29:54 gdt Exp $ Don't have a file called "version", to avoid conflict with C++20 . d10 1 a10 1 Let Pkgsrc be responsible for zm.conf into examples, rather than overwriting d13 1 a13 1 --- CMakeLists.txt.orig 2025-12-07 16:18:50.000000000 +0000 d15 1 a15 10 @@@@ -4,7 +4,7 @@@@ # cmake_minimum_required(VERSION 3.5.0) project(zoneminder) -file(STRINGS "version" zoneminder_VERSION) +file(STRINGS "version.txt" zoneminder_VERSION) # make API version a minor of ZM version set(zoneminder_API_VERSION "${zoneminder_VERSION}.1") @@@@ -269,7 +271,9 @@@@ check_include_file("ucontext.h" HAVE_UCO d25 10 a34 11 @@@@ -280,7 +284,8 @@@@ if(UNIX) include(CheckLibraryExists) CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME) if(NOT HAVE_CLOCK_GETTIME) - message(FATAL_ERROR "clock_gettime not found") + # \todo Explain why just skipping this is ok. + #message(FATAL_ERROR "clock_gettime not found") else() list(APPEND ZM_BIN_LIBS "-lrt") endif() @@@@ -873,8 +877,8 @@@@ else() @ 1.3 log @security/zoneminder: Add support for mysql vs MariaDB Cherry-pick commits from https://github.com/ZoneMinder/zoneminder/pull/3914/ Because of other upstream problems, there are two problems with using MariaDB, which can be mostly worked around. Leave hints in the Makefile near the MariaDB option. Hope that upstream addresses this soon. Leave the default at mysql to make it easier for anyone starting out. This has not been tested but is probably ok. @ text @d1 1 a1 1 $NetBSD: patch-CMakeLists.txt,v 1.2 2024/12/01 13:49:47 gdt Exp $ a14 2 See ../files/upstream-PR-3914. a25 21 @@@@ -119,14 +119,16 @@@@ set(ZM_CONTENTDIR "/var/lib/zoneminder" set(ZM_FONTDIR "${CMAKE_INSTALL_FULL_DATADIR}/zoneminder/fonts" CACHE PATH "Location of the font files used for timestamping, default: /${CMAKE_INSTALL_DATADIR}/zoneminder/fonts") +set(ZM_DB_TYPE "mysql" CACHE STRING + "Type of database where the ZoneMinder database located, default: mysql") set(ZM_DB_HOST "localhost" CACHE STRING - "Hostname where ZoneMinder database located, default: localhost") + "Hostname where the ZoneMinder database located, default: localhost") set(ZM_DB_NAME "zm" CACHE STRING - "Name of ZoneMinder database, default: zm") + "Name of the ZoneMinder database, default: zm") set(ZM_DB_USER "zmuser" CACHE STRING - "Name of ZoneMinder database user, default: zmuser") + "Name of the ZoneMinder database user, default: zmuser") set(ZM_DB_PASS "zmpass" CACHE STRING - "Password of ZoneMinder database user, default: zmpass") + "Password of the ZoneMinder database user, default: zmpass") set(ZM_WEB_USER "" CACHE STRING "The user apache or the local web server runs on. Leave empty for automatic detection. If that fails, you can use this variable to force") a45 8 @@@@ -810,7 +815,6 @@@@ set(WEB_PREFIX "${ZM_WEBDIR}") set(CGI_PREFIX "${ZM_CGIDIR}") set(WEB_USER "${ZM_WEB_USER}") set(WEB_GROUP "${ZM_WEB_GROUP}") -set(ZM_DB_TYPE "mysql") if(ZM_PERL_SEARCH_PATH) set(EXTRA_PERL_LIB "use lib '${ZM_PERL_SEARCH_PATH}'; # Include custom perl install path") else() @ 1.2 log @security/zoneminder: Update to 1.36.33 Note that this update brings some unresolved issues requiring manual attention, but a) that's just how zoneminder is and b) running 1.36 and dealing with the issues seems better than 1.30 with ancient php and 1.30's issues. The old version is in danger of being removed, so this is better... Significant packaging changes: + 1.36/1.34: - Switch to ffmpeg6 from ffmpeg2 - gc many workarounds that are no longer necessary + 1.32: - Change config to etc/zm from etc, and provide etc/zm/conf.d, because migration from 1.30 writes there. - Rototill hard the cmake build options, and try to document what must be set as path configuration. - Depend on mp4v2. Upstream NEWS: Generally, 1.X.0 is a significant release, and 1.X.Y, Y>0, are bugfixes and minor improvements. + 1.36 (The Memory Remains): Filters Moved event email options from global config to per Filter Added user to run filter as, so that users without access to certain monitors can't just use a filter to access them. Filters now have PreSQL and PostSQL conditions. The first Post SQL condition is ExistsInFileSystem. This can be used to cleanup after a crash instead of using zmaudit. warnings on Filter edit page when you create a filter than can delete archived events. Added Auto Unarchive function UI Updates bootstrap updated to version 3 removed mootools events list now uses bootstrap-table to enable a more modern powerful ui scaled thumbnail on mouseover on events list thumbnails with scaling on console frames view updates to include stats information many popups turned into modals monitor edit is now a full view instead of popup Zone edit is now scaled so high res cameras don't take the entire screen or more. Added Estimated RAM use to Buffers tab in Monitors. Monitor edit no longer form submits/reloads between tabs it just hides/unhides tabs using bootstrap nav. Monitors can now have Latitude/Longitude associated and displayed on a map General New Monitor type VNC for recording desktops better use of scaling when streaming to reduce bandwidth/cpu use dynamic loading of vlc, curl and other libraries that might not be used. Saves ram ONVIF probe can now select a network to scan Sessions now stored in database Event Summary tables reorganized to improve locking performance Clicking on username in header will now list other logged in users if you have SystemView permission. ZoneMinder will now try other Storage Areas if it can't create the event in the assigned area. New Monitor Setting: Decoding Enabled/Disabled /dev/shm mmap use decoupled from image buffering. You should set ImageBufferCount to 3 or larger. mp4v2 deprecated and removed. zma process has been turned into a thread of zmc. Added second ffmpeg input stream for when audio is coming from another source. added RTSP re-streaming hwaccel encoding support for intel vaapi and nvenc Use onmousedown/onmouseup for PTZ start/stop in PTZ controls. Amcrest is the only Protocol that supports it so far. + 1.34 (My Friend Of Misery): This is largely a fixes & polish release. There are a number of bug fixes and security improvements in here. Upgrading from 1.32.3 should be relatively painless although if your Logs table is large it may take some time to update it. Security fixes: We no longer store passwords using mysql's built-in password encryption. We now support a modern JWT access token system Replaced a lot of inline javascript. There were a number of XSS and SQL injection issues fixed. CVE-2019-13072 CVE-2019-6777 Other changes: When adding a new monitor a random colour will be assigned to it instead of red. We now have a handy resolution dropdown to help prevent typos in the width & height fields Support for mysql8 Support for php 7.4 Can now delete database log entries for the logs popup Timezone setting moved from php.ini to Options -> System ffmpeg hwaccel support for h264 decoding Improved recording to mp4 with audio Added ZM_LOG_FFMPEG options which captures ffmpeg debug messages properly which can really help with debugging. Added ability to use zms to stream mjpeg when the video is stored as h265. Most browsers can't play h265 so this allows you to use passthrough mode with an h265 camera and still watch the video. Filters now have a Copy To action which copies the event files to a second storage area We now display additional event information such as that generated by event server object detection + 1.32 - A re-worked web console, compared to the previous 1.30.4 release - record to mp4 container - record audio - support for php 7.x - Arbitrary website as a non-recordable, interactive monitor. - Updated Montage Review - Options-> Paths moved into config files under conf.d folder - Multiple storage paths are supported. See Options -> Storage - The old method of bind mounting the event folder is no longer needed nor recommended - Additional system statistics on the web console - Raspberry pi OMX hardware h264 decoder support - Event thumbnails play video on mouseover - Drag and drop sorting of monitors - Scalability improvements Upstream upgrade notes (tweaked for pkgsrc): - The upgrade scripts will take longer than normal to run, especially if you have many events. - Your previous settings on the Options -> Paths tab have been moved into the file zmcustom.conf which is found under ${PKGSYSCONFDIR}/etc/zm/conf.d - Consider migrating your events folder from the former bind mount method to the new method under Options -> Storage - You should no longer have symbolic links in your webroot folder. This resolves a long standing security issue. - The Apache config file has changed. Hand merge it and review your web setup. @ text @d1 1 a1 1 $NetBSD$ d15 3 a17 1 --- CMakeLists.txt.orig 2023-02-23 21:44:01.000000000 +0000 d28 22 a49 1 @@@@ -267,7 +267,9 @@@@ check_include_file("ucontext.h" HAVE_UCO d59 1 a59 1 @@@@ -278,7 +280,8 @@@@ if(UNIX) d69 9 a77 1 @@@@ -863,8 +866,8 @@@@ else() @ 1.1 log @zoneminder: Update to 1.30.5 Welcome to 2016. MESSAGE content has been moved to an installed README and improved. Prepared in wip by dsainty@@ with some help from gdt@@. Upstream NEWS Onvif discovery is now enabled by default. This features increases build time, but the benefit is auto-discovery of any Onvif compliant camera. Please note that this feature is still experimental. It has not been tested in a large environment or with a large variety of cameras. Using this tool is largely self explanatory, but if you are looking for documentation it can be found on the @@altaroca ’s blog site. As time allows, we will bring the documentation over to our readthedocs site. Volunteers to do this work are welcome. ZoneMinder now has a telemetry deamon which collects information about your machine. This was done to learn how our user base uses ZoneMinder, the most common system size, choice of distro, cpu, memory, and a couple of other things. This will help us focus our efforts on what features get used the most. Since this was written in Perl, you can easily see for yourself what information is being sent. Note that this feature defaults to ON. If this is not what you want, then you can turn it off under Options. In a future release, we plan to include an install wizard, which will prompt the user about this feature. Have you ever wished for the motion detection zones to be live, rather than a static image? Well they are now! Creating or modifying zones works exactly the same as before, but with the live stream running in the background. If you need to freeze the stream, there is a Pause button at the bottom of the window to do just that. A new feature called Montage Review has been added. This can be thought of as a modified version of the original montage feature with features such as "scrubbing" through video. The Montage Review screen has received sufficient testing to be part of the release, but you should still treat this feature as experimental. We expect there to be additional fixes and refinements. @ text @d15 2 a16 2 --- CMakeLists.txt.orig 2019-02-23 04:38:47.000000000 +1300 +++ CMakeLists.txt 2022-01-19 22:51:36.000000000 +1300 d19 4 a22 4 cmake_minimum_required (VERSION 2.8.7) project (zoneminder) -file (STRINGS "version" zoneminder_VERSION) +file (STRINGS "version.txt" zoneminder_VERSION) d26 1 a26 1 @@@@ -226,7 +226,9 @@@@ d36 12 a47 11 @@@@ -237,7 +239,7 @@@@ include (CheckLibraryExists) CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME) if(NOT HAVE_CLOCK_GETTIME) - message(FATAL_ERROR "clock_gettime not found") + #message(FATAL_ERROR "clock_gettime not found") else(NOT HAVE_CLOCK_GETTIME) list(APPEND ZM_BIN_LIBS "-lrt") endif(NOT HAVE_CLOCK_GETTIME) @@@@ -733,7 +735,7 @@@@ endif(zmconfgen_result EQUAL 0) d51 1 d53 1 @