Files
zoneminder/db/zm_update-1.39.34.sql
T
Isaac ConnorandClaude Opus 5 b9133999df fix: remove ZoneMinder::Control::onvif, it collides with ONVIF.pm fixes #5122
scripts/ZoneMinder/lib/ZoneMinder/Control/ held both ONVIF.pm and onvif.pm, the
only pair of paths in the tree differing solely in case. On a case insensitive
filesystem git can materialise just one of them, so a macOS clone reports the
loser as modified forever and git add -A commits one module's contents over the
other.

The runtime consequence is worse than the checkout noise. Every seeded Controls
row uses Protocol='ONVIF', and zmcontrol.pl builds the module name from that
column. Where onvif.pm is the file that survived, require ZoneMinder::Control::ONVIF
still succeeds because the filename matches, but it defines the lowercase package,
so the bless lands in an empty ::ONVIF and the first method call dies.

ONVIF.pm has replaced onvif.pm since the unified module landed. Of the subs only
onvif.pm defines, all but horizontalPatrol and horizontalPatrolStop exist there
under underscore-prefixed names, and every ONVIF-protocol Controls row has
CanAutoScan=0, so nothing can reach those two.

Nothing ever moved existing installs onto the new protocol name, so add
zm_update-1.39.29.sql to do it. zm_update-1.35.23.sql sent Protocol='onvif' to
FoscamCGI, which was right in 2021 when onvif.pm held the Foscam CGI protocol and
was copied to FoscamCGI.pm, but onvif.pm was afterwards replaced with a real ONVIF
implementation and the seed row restored, so rows written since belong on ONVIF.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-11 21:19:56 -04:00

18 lines
864 B
SQL

--
-- This updates a 1.39.33 database to 1.39.34
--
-- ZoneMinder::Control::onvif has been removed. It collided with
-- ZoneMinder::Control::ONVIF on case insensitive filesystems, where only one of
-- the two files can exist. Fresh installs have seeded Protocol='ONVIF' since the
-- unified module landed, but nothing ever moved the rows on upgraded installs,
-- so any install created before then still points at the deleted module.
--
-- zm_update-1.35.23.sql sent Protocol='onvif' to FoscamCGI, which was correct at
-- the time: onvif.pm then held an implementation of the Foscam CGI protocol and
-- was copied to FoscamCGI.pm. It was afterwards replaced with a real ONVIF
-- implementation and the seed row was restored, so rows written since that point
-- belong on ONVIF, not FoscamCGI.
--
UPDATE `Controls` SET `Protocol`='ONVIF' WHERE `Protocol`='onvif';