pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/security/zoneminder
Module Name: pkgsrc
Committed By: gdt
Date: Sat Jan 3 23:25:42 UTC 2026
Modified Files:
pkgsrc/security/zoneminder: Makefile
pkgsrc/security/zoneminder/files: README-pkgsrc.md
httpd-zoneminder.conf
Removed Files:
pkgsrc/security/zoneminder/files: zoneminder.conf
Log Message:
security/zoneminder: minor gardening
- drop unused ancient apache config fragment
- adjust apache config example to modern practice
- bring README at least somewhat up to date
- Organize and clean the cmake settings in Makefile
To generate a diff of this commit:
cvs rdiff -u -r1.93 -r1.94 pkgsrc/security/zoneminder/Makefile
cvs rdiff -u -r1.2 -r1.3 pkgsrc/security/zoneminder/files/README-pkgsrc.md
cvs rdiff -u -r1.1 -r1.2 \
pkgsrc/security/zoneminder/files/httpd-zoneminder.conf
cvs rdiff -u -r1.3 -r0 pkgsrc/security/zoneminder/files/zoneminder.conf
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/security/zoneminder/Makefile
diff -u pkgsrc/security/zoneminder/Makefile:1.93 pkgsrc/security/zoneminder/Makefile:1.94
--- pkgsrc/security/zoneminder/Makefile:1.93 Sat Jan 3 19:49:04 2026
+++ pkgsrc/security/zoneminder/Makefile Sat Jan 3 23:25:41 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.93 2026/01/03 19:49:04 gdt Exp $
+# $NetBSD: Makefile,v 1.94 2026/01/03 23:25:41 gdt Exp $
VERSION= 1.36.37
# Distfile is ZoneMinder but package and tarball contents are zoneminder.
@@ -6,7 +6,7 @@ NAME_DIST= ZoneMinder
NAME_LOWER= zoneminder
PKGNAME= ${DISTNAME:S/${NAME_DIST}-/${NAME_LOWER}-/}
-#PKGREVISION= 0
+PKGREVISION= 1
DISTNAME= ${NAME_DIST}-${VERSION}
WRKSRC= ${WRKDIR}/${NAME_LOWER}-${VERSION}
CATEGORIES= security
@@ -70,14 +70,13 @@ CMAKE_CONFIGURE_ARGS+= -DCMAKE_BUILD_TYP
# zoneminder has a dizzying array of variables for various paths.
# Consolidate the settings in an attempt to reduce confusion.
-# ZoneMinder prefers a subdirectory of etc. Further, it demands a
+# ZoneMinder prefers a subdirectory of etc. Further, it demands a
# conf.d subdirectory within its config directory, which would be
# irregular at top level.
CMAKE_CONFIGURE_ARGS+= -DZM_CONFIG_DIR=${PKG_SYSCONFDIR}
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR} ${REAL_ROOT_USER} ${APACHE_GROUP} 775
OWN_DIRS_PERMS+= ${PKG_SYSCONFDIR}/conf.d ${REAL_ROOT_USER} ${APACHE_GROUP} 775
-# \todo We prepare a webroot, even without the apache option.
ZM_HTTPD_ROOT= share/zoneminder/htdocs
CMAKE_CONFIGURE_ARGS+= -DZM_WEBDIR=${PREFIX}/${ZM_HTTPD_ROOT:Q}
PLIST_SUBST+= ZM_HTTPD_ROOT=${ZM_HTTPD_ROOT:Q}
@@ -95,35 +94,36 @@ INSTALLATION_DIRS+= libexec/zoneminder $
BUILD_DEFS+= VARBASE
CMAKE_CONFIGURE_ARGS+= -DZM_RUNDIR=${VARBASE}/run/zm
-# \todo Consider a way to clean up on de-install as anything left
-# should just be removed.
OWN_DIRS_PERMS+= ${VARBASE}/run/zm ${REAL_ROOT_USER} ${APACHE_GROUP} 775
# NB: Startup script must create /var/run/zm.
CMAKE_CONFIGURE_ARGS+= -DZM_SOCKDIR=${VARBASE}/run/zm
-# Choose /var/tmp for now. \todo Revisit.
+
+# ZM_TMPDIR might or might not be used.
CMAKE_CONFIGURE_ARGS+= -DZM_TMPDIR=${VARBASE}/tmp/zm
OWN_DIRS_PERMS+= ${VARBASE}/tmp/zm ${REAL_ROOT_USER} ${APACHE_GROUP} 775
+
+# In some configs, ZM_LOGDIR is apparently unused.
CMAKE_CONFIGURE_ARGS+= -DZM_LOGDIR=${VARBASE}/log/zm
OWN_DIRS_PERMS+= ${VARBASE}/log/zm ${REAL_ROOT_USER} ${APACHE_GROUP} 775
-# \todo Define this per-OS; /var/shm is for NetBSD
-ZM_SHM= /var/shm
+# Choose directory where zoneminder can create shm files (for zmc).
+# \todo Define this per-OS.
+ZM_SHM= /var/shm # NetBSD
CMAKE_CONFIGURE_ARGS+= -DZM_PATH_MAP=${ZM_SHM}
-# Cache directory is for js files to be served. For now, use
-# /var/cache/zoneminder. \todo Consider /tmp/zm instead.
+# Cache directory is for js files to be served.
ZM_CACHE= ${VARBASE}/cache/zoneminder
CMAKE_CONFIGURE_ARGS+= -DZM_CACHEDIR=${ZM_CACHE}
OWN_DIRS_PERMS+= ${ZM_CACHE} ${APACHE_USER} ${APACHE_GROUP} 775
# Storage of events; this should persist and is hence in /var/db.
-# \todo Understand how and why /images is used.
ZM_CONTENT= ${VARBASE}/db/zoneminder
CMAKE_CONFIGURE_ARGS+= -DZM_CONTENTDIR=${ZM_CONTENT}
OWN_DIRS_PERMS+= ${ZM_CONTENT} ${REAL_ROOT_USER} ${APACHE_GROUP} 775
CMAKE_CONFIGURE_ARGS+= -DZM_DIR_EVENTS=${ZM_CONTENT}/events
OWN_DIRS_PERMS+= ${ZM_CONTENT}/events ${APACHE_USER} ${APACHE_GROUP} 775
+# \todo Understanda ZM_DIR_IMAGES.
CMAKE_CONFIGURE_ARGS+= -DZM_DIR_IMAGES=${ZM_CONTENT}/images
OWN_DIRS_PERMS+= ${ZM_CONTENT}/images ${APACHE_USER} ${APACHE_GROUP} 775
@@ -132,13 +132,14 @@ OWN_DIRS_PERMS+= ${ZM_CONTENT}/images ${
PTHREAD_AUTO_VARS= yes
.include "../../mk/pthread.buildlink3.mk"
+# \todo Move to higher ffmpeg.
.include "../../multimedia/ffmpeg6/buildlink3.mk"
.for lib in AVFORMAT AVCODEC AVDEVICE AVUTIL SWSCALE SWRESAMPLE
CMAKE_CONFIGURE_ARGS+= -D${lib}_INCLUDE_DIR=${BUILDLINK_PREFIX.ffmpeg6}/include/ffmpeg6
CMAKE_CONFIGURE_ARGS+= -D${lib}_LIBRARIES=${BUILDLINK_PREFIX.ffmpeg6}/lib/ffmpeg6/lib${lib:tl}.${SHLIB_EXT}
.endfor
-# \todo Revisit this and see if there is a better way.
+# \todo Recheck if this is needed.
# MySQL uses openssl. Force zoneminder not to choose otherwise by
# finding libraries that are present but not buildlinked.
CMAKE_CONFIGURE_ARGS+= -DGNUTLS_LIBRARIES=""
@@ -306,7 +307,7 @@ PRINT_PLIST_AWK+= { gsub(/^.+\/examples\
## PKGSRC PHASE FIXUPS
-# Pretend our apache config is part of the distribution.
+# Copy the example config to WRKSRC because we SUBST it, and files/ should be read only.
# Avoid conflict with C++20 <version> - intertwined with patch-CMakeLists.txt
post-extract:
${CP} ${FILESDIR}/httpd-zoneminder.conf ${WRKSRC}/httpd-zoneminder.conf
Index: pkgsrc/security/zoneminder/files/README-pkgsrc.md
diff -u pkgsrc/security/zoneminder/files/README-pkgsrc.md:1.2 pkgsrc/security/zoneminder/files/README-pkgsrc.md:1.3
--- pkgsrc/security/zoneminder/files/README-pkgsrc.md:1.2 Sun Dec 1 13:49:47 2024
+++ pkgsrc/security/zoneminder/files/README-pkgsrc.md Sat Jan 3 23:25:41 2026
@@ -14,12 +14,12 @@ for ${PKG_SYSCONFDIR}, without loss of g
## Choice of jpeg implementation
ZoneMinder claims to benefit dramatically from using libjpeg-turbo.
-Consider setting that as default in mk.conf
-`JPEG_DEFAULT=libjpeg-turbo` and then *everything*.
+Because `JPEG_DEFAULT=libjpeg-turbo` is the default setting, no action
+is required.
## User and Group
-zoneminder uses APACHE_USER and APACHE_GROUP. These are www by
+zoneminder uses `APACHE_USER` and `APACHE_GROUP`. These are www by
default, but people set them to fpm for use with nginx and php_fpm.
It is important that apache, zoneminder, and any existing directories
all agree.
@@ -33,14 +33,14 @@ using mysql only for zoneminder and do n
network.
See upstream instructions at
-https://zoneminder.readthedocs.io/en/1.32.3/installationguide/ubuntu.html
+https://zoneminder.readthedocs.io/en/stable/installationguide/ubuntu.html
which are for Ubuntu, but seem mostly generic.
Specifically, see "Step 5: Configure the ZoneMinder Database".
-The default password is "zmpass". You may (probably should) change
-this to something else, and set ZM_DB_PASS in
-e.g. /usr/pkg/etc/zm/zmpass.conf.
+The default password is "zmpass". You should change this to something
+else, and set `ZM_DB_PASS` in
+e.g. `/usr/pkg/etc/zm/conf.d/zmcustom.conf`.
# Other setup
Index: pkgsrc/security/zoneminder/files/httpd-zoneminder.conf
diff -u pkgsrc/security/zoneminder/files/httpd-zoneminder.conf:1.1 pkgsrc/security/zoneminder/files/httpd-zoneminder.conf:1.2
--- pkgsrc/security/zoneminder/files/httpd-zoneminder.conf:1.1 Sun Dec 1 13:49:47 2024
+++ pkgsrc/security/zoneminder/files/httpd-zoneminder.conf Sat Jan 3 23:25:41 2026
@@ -18,20 +18,13 @@ LoadModule cgid_module lib/httpd/mod_cgi
# </Directory>
# </IfModule>
-LoadModule php7_module lib/httpd/mod_php7.so
+LoadModule php_module lib/httpd/mod_php82.so
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
-# Upstream had
-# <IfModule mod_php5.c>
-# <Directory /usr/share/zoneminder/www>
-# Options -Indexes +FollowSymLinks
-# <IfModule mod_dir.c>
-# DirectoryIndex index.php
-# </IfModule>
-# </Directory>
-# </IfModule>
+LoadModule rewrite_module lib/httpd/mod_rewrite.so
+RewriteEngine On
ScriptAlias /zm/cgi-bin/ "@ZM_HTTPD_CGIBIN@/"
<Directory "@ZM_HTTPD_CGIBIN@">
@@ -67,3 +60,37 @@ Alias /zm "@ZM_HTTPD_ROOT@"
Require ip ::
</RequireAny>
</Directory>
+
+<Directory "/usr/pkg/share/zoneminder/htdocs/api">
+ RewriteEngine on
+ RewriteRule ^$ app/webroot/ [L]
+ RewriteRule (.*) app/webroot/$1 [L]
+ RewriteBase /zm/api
+ <RequireAny>
+ Require ip 127.0.0.1
+ Require ip ::
+ </RequireAny>
+</Directory>
+
+<Directory "/usr/pkg/share/zoneminder/htdocs/api/app">
+ RewriteEngine on
+ RewriteRule ^$ webroot/ [L]
+ RewriteRule (.*) webroot/$1 [L]
+ RewriteBase /zm/api
+ <RequireAny>
+ Require ip 127.0.0.1
+ Require ip ::
+ </RequireAny>
+</Directory>
+
+<Directory "/usr/pkg/share/zoneminder/htdocs/api/app/webroot">
+ RewriteEngine On
+ RewriteCond %{REQUEST_FILENAME} !-d
+ RewriteCond %{REQUEST_FILENAME} !-f
+ RewriteRule ^ index.php [L]
+ RewriteBase /zm/api
+ <RequireAny>
+ Require ip 127.0.0.1
+ Require ip ::
+ </RequireAny>
+</Directory>
Home |
Main Index |
Thread Index |
Old Index