pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
zoneminder: Fix httpd configuration
Module Name: pkgsrc-wip
Committed By: Greg Troxel <gdt%lexort.com@localhost>
Pushed By: gdt
Date: Mon May 29 07:02:47 2023 -0400
Changeset: 97ad8d6b25d6969fb208b8cd194ea104c95e7bfb
Modified Files:
zoneminder/Makefile
zoneminder/PLIST
Added Files:
zoneminder/files/httpd-zoneminder.conf
Removed Files:
zoneminder/files/zoneminder.conf
Log Message:
zoneminder: Fix httpd configuration
- Rename to httpd-zoneminder.conf, in anticipation of an eventual
nginx config.
- Fix httpd configuration by placing cgi alias first, to avoid
shadowing by /zm.
- Allow IPv6 localhost.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=97ad8d6b25d6969fb208b8cd194ea104c95e7bfb
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
zoneminder/Makefile | 8 ++---
zoneminder/PLIST | 2 +-
zoneminder/files/httpd-zoneminder.conf | 55 ++++++++++++++++++++++++++++++++++
zoneminder/files/zoneminder.conf | 54 ---------------------------------
4 files changed, 60 insertions(+), 59 deletions(-)
diffs:
diff --git a/zoneminder/Makefile b/zoneminder/Makefile
index f786dbfac4..ad4c54a4b1 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= 3
+PKGREVISION= 4
# Distfile is ZoneMinder but package and tarball contents are zoneminder.
NAME_DIST= ZoneMinder
NAME_LOWER= zoneminder
@@ -285,7 +285,7 @@ SUBST_SED.script-path= -e "s|^\\([\$$]ENV{PATH} *= *'\\).*';\$$|\\1${PREFIX}/bi
# Substitute configured path in pkgsrc-provided apache config.
SUBST_CLASSES+= files
SUBST_STAGE.files= pre-configure
-SUBST_FILES.files= zoneminder.conf
+SUBST_FILES.files= httpd-zoneminder.conf
SUBST_SED.files= -e "s|@ZM_HTTPD_ROOT@|${PREFIX}/${ZM_HTTPD_ROOT}|g"
SUBST_SED.files+= -e "s|@ZM_HTTPD_CGIBIN@|${PREFIX}/${ZM_HTTPD_CGIBIN}|g"
SUBST_MESSAGE.files= Fixing ZoneMinder configuration file for Apache.
@@ -309,7 +309,7 @@ PRINT_PLIST_AWK+= { gsub(/^.+\/examples\/rc.d/, "$${PLIST.rcd}&"); }
# Pretend our apache config is part of the distribution.
# Avoid conflict with C++20 <version> - intertwined with patch-CMakeLists.txt
post-extract:
- ${CP} ${FILESDIR}/zoneminder.conf ${WRKSRC}/zoneminder.conf
+ ${CP} ${FILESDIR}/httpd-zoneminder.conf ${WRKSRC}/httpd-zoneminder.conf
${MV} ${WRKSRC}/version ${WRKSRC}/version.txt
# Omit patchfiles from PLIST if present. The pre-configure step below
@@ -331,7 +331,7 @@ CONF_FILES+= ${PREFIX}/${EGDIR}/config/zm.conf ${PKG_SYSCONFDIR}/zm/zm.conf
INSTALLATION_DIRS+= bin share/examples/rc.d share/zoneminder/db
INSTALLATION_DIRS+= ${DOCDIR}
post-install:
- ${INSTALL_DATA} ${WRKSRC}/zoneminder.conf ${DESTDIR}${PREFIX}/${EGDIR}/apache/zoneminder.conf
+ ${INSTALL_DATA} ${WRKSRC}/httpd-zoneminder.conf ${DESTDIR}${PREFIX}/${EGDIR}/apache/httpd-zoneminder.conf
${INSTALL_DATA} ${WRKSRC}/zm.conf ${DESTDIR}${PREFIX}/${EGDIR}/config/zm.conf
.if ${INIT_SYSTEM} == "rc.d"
${INSTALL_SCRIPT} ${WRKSRC}/scripts/zm ${DESTDIR}${PREFIX}/share/examples/rc.d/zoneminder
diff --git a/zoneminder/PLIST b/zoneminder/PLIST
index 0f0fb4e76f..95f156f7b7 100644
--- a/zoneminder/PLIST
+++ b/zoneminder/PLIST
@@ -6055,7 +6055,7 @@ man/man8/zoneminder-zmx10.pl.8
share/applications/zoneminder.desktop
share/doc/zoneminder/README-pkgsrc.md
${PLIST.rcd}share/examples/rc.d/zoneminder
-share/examples/zoneminder/apache/zoneminder.conf
+share/examples/zoneminder/apache/httpd-zoneminder.conf
share/examples/zoneminder/config/zm.conf
share/zoneminder/db/test.monitor.sql
share/zoneminder/db/triggers.sql
diff --git a/zoneminder/files/httpd-zoneminder.conf b/zoneminder/files/httpd-zoneminder.conf
new file mode 100644
index 0000000000..d3dd8648bd
--- /dev/null
+++ b/zoneminder/files/httpd-zoneminder.conf
@@ -0,0 +1,55 @@
+# pkgsrc Apache configuration for zoneminder, intended to be copied to
+# ${PKG_SYSCONFDIR}/httpd and then included via
+# Include etc/httpd/httpd-zoneminder.conf
+
+# This configuration puts ZoneMinder under /zm. Access is limited to
+# localhost, as a safe default until intentionally changed.
+
+LoadModule cgid_module lib/httpd/mod_cgid.so
+# \todo Consider fcgi intead.
+# <IfModule mod_fcgid.c>
+# <Directory /usr/share/zoneminder/www>
+# Options -Indexes +ExecCGI
+# AllowOverride All
+# AddHandler fcgid-script .php
+# FCGIWrapper /usr/bin/php5-cgi
+# Order allow,deny
+# Allow from all
+# </Directory>
+# </IfModule>
+
+LoadModule php7_module lib/httpd/mod_php7.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>
+
+ScriptAlias /zm/cgi-bin/ "@ZM_HTTPD_CGIBIN@/"
+<Directory "@ZM_HTTPD_CGIBIN@">
+ <RequireAny>
+ Require ip 127.0.0.1
+ Require ip ::
+ </RequireAny>
+</Directory>
+
+# \todo Upstream does not set php_flags.
+# \todo Upstream sets Options.
+Alias /zm "@ZM_HTTPD_ROOT@"
+<Directory "@ZM_HTTPD_ROOT@">
+ php_flag register_globals off
+ php_flag short_open_tag on
+ DirectoryIndex index.php
+ <RequireAny>
+ Require ip 127.0.0.1
+ Require ip ::
+ </RequireAny>
+</Directory>
diff --git a/zoneminder/files/zoneminder.conf b/zoneminder/files/zoneminder.conf
deleted file mode 100644
index c33a9ab369..0000000000
--- a/zoneminder/files/zoneminder.conf
+++ /dev/null
@@ -1,54 +0,0 @@
-# pkgsrc Apache configuration for zoneminder, intended to be copied to
-# ${PKG_SYSCONFDIR}/httpd and then included via
-# Include etc/httpd/zoneminder.conf
-
-# This configuration puts ZoneMinder under /zm. Access is limited to
-# localhost, as a safe default until intentionally changed.
-
-LoadModule cgid_module lib/httpd/mod_cgid.so
-# \todo Consider fcgi intead.
-# <IfModule mod_fcgid.c>
-# <Directory /usr/share/zoneminder/www>
-# Options -Indexes +ExecCGI
-# AllowOverride All
-# AddHandler fcgid-script .php
-# FCGIWrapper /usr/bin/php5-cgi
-# Order allow,deny
-# Allow from all
-# </Directory>
-# </IfModule>
-
-LoadModule php7_module lib/httpd/mod_php7.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>
-
-# \todo Upstream does not set php_flags.
-# \todo Upstream sets Options.
-Alias /zm "@ZM_HTTPD_ROOT@"
-<Directory "@ZM_HTTPD_ROOT@">
- php_flag register_globals off
- php_flag short_open_tag on
- DirectoryIndex index.php
- <RequireAny>
- Require ip 127.0.0.1
- </RequireAny>
-</Directory>
-
-ScriptAlias /zm/cgi-bin/ "@ZM_HTTPD_CGIBIN@/"
-
-<Directory "@ZM_HTTPD_CGIBIN@">
- <RequireAny>
- Require ip 127.0.0.1
- </RequireAny>
-</Directory>
Home |
Main Index |
Thread Index |
Old Index