pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

zondeminder: minor tidying/improvements along path to 1.32



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Wed May 24 15:54:48 2023 -0400
Changeset:	b4d9bb05f8b175bc7bafe720081dcb741b24f983

Modified Files:
	zoneminder/Makefile
	zoneminder/TODO
	zoneminder/files/README-pkgsrc.md

Log Message:
zondeminder: minor tidying/improvements along path to 1.32

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=b4d9bb05f8b175bc7bafe720081dcb741b24f983

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 zoneminder/Makefile               | 34 +++++++++++++--------
 zoneminder/TODO                   | 23 ++++++++------
 zoneminder/files/README-pkgsrc.md | 64 ++++++++++++++++++++++++---------------
 3 files changed, 75 insertions(+), 46 deletions(-)

diffs:
diff --git a/zoneminder/Makefile b/zoneminder/Makefile
index 9e0e88bbd1..8849496fc5 100644
--- a/zoneminder/Makefile
+++ b/zoneminder/Makefile
@@ -1,7 +1,7 @@
 # $NetBSD: Makefile,v 1.42 2019/06/18 12:36:59 gdt Exp $
 
 VERSION=	1.32.3
-PKGREVISION=	1
+PKGREVISION=	2
 # Sometimes the distfile unpacks to ZoneMinder and sometimes zoneminder.
 NAME_DIST=	ZoneMinder
 NAME_LOWER=	zoneminder
@@ -27,10 +27,13 @@ LICENSE=	gnu-gpl-v2
 # NetBSD tar: Invalid header, starting valid header search.
 EXTRACT_USING=	gtar
 
-# ZoneMinder 1.29.0 seems to work fine on at least PHP 5.6 and 7.4.
-# Under PHP 8.0 it is logging at Error level type errors out of skin.js.
-# Under PHP 8.1 it is logging at Panic level that strftime is deprecated.
-PHP_VERSIONS_ACCEPTED=	56 74
+# ZoneMinder 1.30 seems to work fine on at least PHP 7.4.
+# ZoneMinder 1.32 with PHP 7.4 does not appear to have PHP-related problems.
+# Under PHP 8.0 <1.30 was logging at Error level type errors out of skin.js.
+# Under PHP 8.1 <1.30 was logging at Panic level that strftime is deprecated.
+#
+# Therefore 74 is the standard approach and it is \todo to try higher.
+PHP_VERSIONS_ACCEPTED=	74
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.zoneminder
 PKG_SUPPORTED_OPTIONS=	apache
@@ -48,18 +51,19 @@ USE_TOOLS+=	gmake perl pkg-config
 # dependency, absent some reason that it is so heavyweight that it
 # should be an option.
 
-# MIME::Entity is needed from p5-MIME-tools
-# LWP::UserAgent is needed from p5-libwww
 DEPENDS+=	p5-Archive-Zip-[0-9]*:../../archivers/p5-Archive-Zip
 DEPENDS+=	p5-Date-Manip-[0-9]*:../../devel/p5-Date-Manip
 DEPENDS+=	p5-Device-SerialPort-[0-9]*:../../comms/p5-Device-SerialPort
 DEPENDS+=	p5-DBD-mysql-[0-9]*:../../databases/p5-DBD-mysql
 DEPENDS+=	p5-MIME-Lite-[0-9]*:../../mail/p5-MIME-Lite
+# MIME::Entity is needed from p5-MIME-tools
 DEPENDS+=	p5-MIME-tools-[0-9]*:../../mail/p5-MIME-tools
 DEPENDS+=	p5-Net-SFTP-Foreign-[0-9]*:../../net/p5-Net-SFTP-Foreign
 DEPENDS+=	p5-PHP-Serialization-[0-9]*:../../devel/p5-PHP-Serialization
+DEPENDS+=	p5-Sys-MemInfo-[0-9]*:../../wip/p5-Sys-MemInfo
 DEPENDS+=	p5-Sys-Mmap-[0-9]*:../../devel/p5-Sys-Mmap
 #DEPENDS+=	{perl>=5.7.3,p5-Time-HiRes-[0-9]*}:../../time/p5-Time-HiRes
+# LWP::UserAgent is needed from p5-libwww
 DEPENDS+=	p5-libwww-[0-9]*:../../www/p5-libwww
 
 # \todo: Decide to drop CONFIGURE_ARGS, validating that each has been
@@ -89,6 +93,7 @@ CONFIGURE_ARGS+=	--with-cgidir=${PREFIX}/${ZM_HTTPD_CGIBIN:Q}
 CMAKE_ARGS+=		-DZM_CGIDIR=${PREFIX}/${ZM_HTTPD_CGIBIN:Q}
 CONFIGURE_ARGS+=	--with-mysql=${BUILDLINK_PREFIX.mysql-client}
 CONFIGURE_ARGS+=	--localstatedir=${VARBASE}
+# TODO cmake localstate?
 CMAKE_ARGS+=		-DZM_RUNDIR=${VARBASE}/run/zm
 CMAKE_ARGS+=		-DZM_SOCKDIR=${VARBASE}/run/zm
 CMAKE_ARGS+=		-DZM_TMPDIR=${VARBASE}/tmp/zm
@@ -102,6 +107,7 @@ PTHREAD_AUTO_VARS=	yes
 CONFIGURE_ARGS+=	--with-ffmpeg=${BUILDLINK_PREFIX.ffmpeg2}
 CONFIGURE_ENV+=		PATH_FFMPEG=${BUILDLINK_PREFIX.ffmpeg2}/bin/ffmpeg2
 CONFIGURE_ENV+=		OPT_FFMPEG=yes
+# TODO cmake?
 
 .if ${OPSYS} == "Darwin"
 SOEXT=	dylib
@@ -124,7 +130,7 @@ CONFIGURE_ARGS+=	--enable-mmap=no
 # constant macros from stdint.h, but these are only defined under C++ if
 # __STDC_CONSTANT_MACROS is requested, so we have to do that on behalf
 # of ffmpeg.  Failure to do so causes configure time failures, and
-# build failures complaining about UINT64_C not being defined.
+# build failures complaining about UINT64_T not being defined.
 CFLAGS+=		-D__STDC_CONSTANT_MACROS
 
 # Since MySQL uses openssl, use the same library instead of defaulting to
@@ -132,7 +138,7 @@ CFLAGS+=		-D__STDC_CONSTANT_MACROS
 CONFIGURE_ENV+=		ZM_SSL_LIB=openssl
 CMAKE_ARGS+=		-DGNUTLS_LIBRARIES=""
 
-# Make sure cmake doesn't think libgcrypt is available (We have OpenSSL)
+# Make sure cmake doesn't think libgcrypt is available (we use OpenSSL).
 CMAKE_ARGS+=		-DGCRYPT_LIBRARIES=""
 
 # Control where run-time state (PID file and sockets) get stored.
@@ -203,13 +209,13 @@ REPLACE_PERL+=	zmconfgen.pl.in
 #
 # The intention of zmsystemctl.pl is to use bin/pkexec to allow the
 # apache user to start and stop the ZoneMinder services on operating
-# systems using systemd and newer versions of Polkit than Pkgsrc
+# systems using systemd and newer versions of Polkit than pkgsrc
 # currently has.
 #
-# If the base OS doesn't use systemd (E.g. anything not Linux), this
+# If the base OS doesn't use systemd (e.g. anything not Linux), this
 # file shouldn't be used anyway.
 #
-# In Pkgsrc we ignore the potentially absent pkexec interpreter in
+# In pkgsrc we ignore the potentially absent pkexec interpreter in
 # this file.  If the base OS uses systemd, it probably also has pkexec
 # in its base installation.
 #
@@ -250,7 +256,11 @@ SUBST_MESSAGE.files=	Fixing ZoneMinder configuration file for Apache.
 PLIST_VARS+=		rcd
 
 .if ${INIT_SYSTEM} == "rc.d"
+# \todo Figure out if this is really for pkgsrc rc.d, and maybe write one for
+# files/
 PLIST.rcd=		yes
+# \todo fix
+#RCD_SCRIPTS+=		zoneminder
 .endif
 PRINT_PLIST_AWK+=	{ gsub(/^.+\/examples\/rc.d/, "$${PLIST.rcd}&"); }
 
diff --git a/zoneminder/TODO b/zoneminder/TODO
index 4a3a48c026..0ebc7bd006 100644
--- a/zoneminder/TODO
+++ b/zoneminder/TODO
@@ -1,18 +1,23 @@
 1) for (some subset of final point releases):
 
-  update to newer upstream
+   update to newer upstream
 
-  validate that it actually runs
+   validate that it actually runs
 
-  push to pkgsrc
+   push to pkgsrc
 
-2) evaluate patches and push upstream
+2) After updating to the current release
 
-3) 1.32 notes:
+   File bugs upstream and add URLs
 
-  https://github.com/ZoneMinder/zoneminder/releases/tag/1.32.0
-  https://github.com/ZoneMinder/zoneminder/issues/2078#issuecomment-395094624
+3) 1.32
 
-  new deps: pecl-apcu, file-slurp, format-human-bytes
+   https://github.com/ZoneMinder/zoneminder/releases/tag/1.32.0
+   https://github.com/ZoneMinder/zoneminder/issues/2078#issuecomment-395094624
 
-  merge apache config
\ No newline at end of file
+   new deps: pecl-apcu, file-slurp, format-human-bytes
+   hoist deps to pkgsrc: wip/p5-Sys-MemInfo
+
+   Figure out apache config in terms of what is installed, whether we
+   want to $include it, why there is a config file from pkgsrc, etc.
+     work/zoneminder-1.32.3/misc/apache.conf
diff --git a/zoneminder/files/README-pkgsrc.md b/zoneminder/files/README-pkgsrc.md
index c162f530ed..7f300487df 100644
--- a/zoneminder/files/README-pkgsrc.md
+++ b/zoneminder/files/README-pkgsrc.md
@@ -1,39 +1,42 @@
 # Introduction
 
 This is a local pkgsrc README for the zoneminder package.  It attempts
-not to duplicate the upstream documentation.
+not to duplicate the upstream documentation.  (Arguably, some of this
+should be pushed upstream.)
 
 # jpeg implementation
 
-ZoneMinder benefits dramatically from using libjpeg-turbo.  Consider
-setting that as default in mk.conf, and rebuilding *everything*, via
-`JPEG_DEFAULT=libjpeg-turbo`.
+ZoneMinder claims to benefit dramatically from using libjpeg-turbo.
+Consider setting that as default in mk.conf
+`JPEG_DEFAULT=libjpeg-turbo` and then *everything*.
 
-# Initial database creation
+# MySQL configuration and initial database creation
 
-To get ZoneMinder started a MySQL database is required.
+(It seems that zoneminder only works with MySQL.)
 
-First, create a MySQL user "zmuser":
+Condider adding `bind-address=127.0.0.1` to `etc/my.conf`, if you are
+using mysql only for zoneminder and do not want it accessible from the
+network.
 
-echo "create user 'zmuser'@'localhost' identified by 'zmpass';" | mysql -u root
 
-The default password is "zmpass".  You may change this to something else, and
-update ZM_DB_PASS in ${PKG_SYSCONFDIR}/zm.conf.
+See upstream instructions at
+https://zoneminder.readthedocs.io/en/1.32.3/installationguide/ubuntu.html
+which are for Ubuntu, but seem mostly generic.
 
-Create the initial database via:
+Specifically, see "Step 5: Configure the ZoneMinder Database".
 
-  mysql -u root < ${PREFIX}/share/zoneminder/db/zm_create.sql
+The default password is "zmpass".  You may (probably should) change
+this to something else, and update ZM_DB_PASS in
+${PKG_SYSCONFDIR}/zm.conf.
 
-Assign rights to the "zmuser" user via:
+# Other setup
 
-  echo "grant all on * to 'zmuser';" | mysql -u root zm
-
-# Upgrading from previous versions
-
-Upgrade a database from an older version of ZoneMinder via:
-
-  zmupdate.pl -u root [-p <password>]
+See "Step 6: Set permissions", and use APACHE_GROUP.
 
+See "Step 9: Edit Timezone in PHP".  Otherwise, access to streams will
+fail.  See https://github.com/ZoneMinder/ZoneMinder/issues/1552 for
+more information.
+ 
 # web setup
 
 To enable the web interface via Apache, add the following line to httpd.conf:
@@ -44,15 +47,26 @@ PHP may log warnings if the PHP date.timezone configuration is not
 set.  Consider assigning a default system time zone to date.timezone
 in ${PKG_SYSCONFDIR}/php.ini.  [This paragraph might be old advice.]
 
+# Upgrading from previous versions
+
+Upgrade a database from an older version of ZoneMinder via:
+
+  zmupdate.pl -u root [-p <password>]
+
+NB: Before doing this ensure that $prefix/etc/conf.d exists.
+Zoneminder 1.32 will attempt to remove config from the database and
+place it in e.g. `/usr/pkg/etc/conf.d/zmcustom.conf`.
+
 # Shared memory
 
-With 1.30, zoneminder tries to use a shm filesystem to store files
-that are then mmap'd, instead of system V shm.
+Zoneminder tries to use a shm filesystem to store files that are then
+mmap'd.  (1.28 used SysV shm but that is no longer relevant.)
 
-On NetBSD, the default might be /dev/shm but the right place is
-/var/shm.  This can be changed in Options in the web interface.
+On NetBSD, the compiled default might be /dev/shm but the right place
+is /var/shm.  This can be changed in Options in the web interface.
 
-One might need a lot of space, or to turn the buffer down to fewer frames.
+(One might need a lot of space, or to turn the buffer down to fewer
+frames; this is not about pkgsrc.)
 
 Somtimes, the shm file can get into a bad state and be zero length.
 This might be a bad error path during camera timeouts; it seems to


Home | Main Index | Thread Index | Old Index