head	1.4;
access;
symbols
	pkgsrc-2026Q1:1.4.0.12
	pkgsrc-2026Q1-base:1.4
	pkgsrc-2025Q4:1.4.0.10
	pkgsrc-2025Q4-base:1.4
	pkgsrc-2025Q3:1.4.0.8
	pkgsrc-2025Q3-base:1.4
	pkgsrc-2025Q2:1.4.0.6
	pkgsrc-2025Q2-base:1.4
	pkgsrc-2025Q1:1.4.0.4
	pkgsrc-2025Q1-base:1.4
	pkgsrc-2024Q4:1.4.0.2
	pkgsrc-2024Q4-base:1.4
	pkgsrc-2024Q3:1.3.0.16
	pkgsrc-2024Q3-base:1.3
	pkgsrc-2024Q2:1.3.0.14
	pkgsrc-2024Q2-base:1.3
	pkgsrc-2024Q1:1.3.0.12
	pkgsrc-2024Q1-base:1.3
	pkgsrc-2023Q4:1.3.0.10
	pkgsrc-2023Q4-base:1.3
	pkgsrc-2023Q3:1.3.0.8
	pkgsrc-2023Q3-base:1.3
	pkgsrc-2023Q2:1.3.0.6
	pkgsrc-2023Q2-base:1.3
	pkgsrc-2023Q1:1.3.0.4
	pkgsrc-2023Q1-base:1.3
	pkgsrc-2022Q4:1.3.0.2
	pkgsrc-2022Q4-base:1.3
	pkgsrc-2022Q3:1.2.0.60
	pkgsrc-2022Q3-base:1.2
	pkgsrc-2022Q2:1.2.0.58
	pkgsrc-2022Q2-base:1.2
	pkgsrc-2022Q1:1.2.0.56
	pkgsrc-2022Q1-base:1.2
	pkgsrc-2021Q4:1.2.0.54
	pkgsrc-2021Q4-base:1.2
	pkgsrc-2021Q3:1.2.0.52
	pkgsrc-2021Q3-base:1.2
	pkgsrc-2021Q2:1.2.0.50
	pkgsrc-2021Q2-base:1.2
	pkgsrc-2021Q1:1.2.0.48
	pkgsrc-2021Q1-base:1.2
	pkgsrc-2020Q4:1.2.0.46
	pkgsrc-2020Q4-base:1.2
	pkgsrc-2020Q3:1.2.0.44
	pkgsrc-2020Q3-base:1.2
	pkgsrc-2020Q2:1.2.0.40
	pkgsrc-2020Q2-base:1.2
	pkgsrc-2020Q1:1.2.0.20
	pkgsrc-2020Q1-base:1.2
	pkgsrc-2019Q4:1.2.0.42
	pkgsrc-2019Q4-base:1.2
	pkgsrc-2019Q3:1.2.0.38
	pkgsrc-2019Q3-base:1.2
	pkgsrc-2019Q2:1.2.0.36
	pkgsrc-2019Q2-base:1.2
	pkgsrc-2019Q1:1.2.0.34
	pkgsrc-2019Q1-base:1.2
	pkgsrc-2018Q4:1.2.0.32
	pkgsrc-2018Q4-base:1.2
	pkgsrc-2018Q3:1.2.0.30
	pkgsrc-2018Q3-base:1.2
	pkgsrc-2018Q2:1.2.0.28
	pkgsrc-2018Q2-base:1.2
	pkgsrc-2018Q1:1.2.0.26
	pkgsrc-2018Q1-base:1.2
	pkgsrc-2017Q4:1.2.0.24
	pkgsrc-2017Q4-base:1.2
	pkgsrc-2017Q3:1.2.0.22
	pkgsrc-2017Q3-base:1.2
	pkgsrc-2017Q2:1.2.0.18
	pkgsrc-2017Q2-base:1.2
	pkgsrc-2017Q1:1.2.0.16
	pkgsrc-2017Q1-base:1.2
	pkgsrc-2016Q4:1.2.0.14
	pkgsrc-2016Q4-base:1.2
	pkgsrc-2016Q3:1.2.0.12
	pkgsrc-2016Q3-base:1.2
	pkgsrc-2016Q2:1.2.0.10
	pkgsrc-2016Q2-base:1.2
	pkgsrc-2016Q1:1.2.0.8
	pkgsrc-2016Q1-base:1.2
	pkgsrc-2015Q4:1.2.0.6
	pkgsrc-2015Q4-base:1.2
	pkgsrc-2015Q3:1.2.0.4
	pkgsrc-2015Q3-base:1.2
	pkgsrc-2015Q2:1.2.0.2
	pkgsrc-2015Q2-base:1.2
	pkgsrc-2015Q1:1.1.0.8
	pkgsrc-2015Q1-base:1.1
	pkgsrc-2014Q4:1.1.0.6
	pkgsrc-2014Q4-base:1.1
	pkgsrc-2014Q3:1.1.0.4
	pkgsrc-2014Q3-base:1.1
	pkgsrc-2014Q2:1.1.0.2
	pkgsrc-2014Q2-base:1.1;
locks; strict;
comment	@# @;


1.4
date	2024.12.01.13.49.48;	author gdt;	state Exp;
branches;
next	1.3;
commitid	ABpMx07E1a05RNzF;

1.3
date	2022.09.27.01.20.39;	author gdt;	state Exp;
branches;
next	1.2;
commitid	zCqUVVvfPb2uhrVD;

1.2
date	2015.04.05.08.51.08;	author dsainty;	state Exp;
branches;
next	1.1;
commitid	iO4NHHrHVLogzngy;

1.1
date	2014.05.20.11.30.27;	author dsainty;	state Exp;
branches
	1.1.8.1;
next	;
commitid	TXuywuKfLfHULgBx;

1.1.8.1
date	2015.04.24.16.07.10;	author hiramatsu;	state Exp;
branches;
next	;
commitid	f73vVLbCJTHyoRiy;


desc
@@


1.4
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
@$NetBSD: patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm,v 1.2 2015/04/05 08:51:08 dsainty Exp $

Perl doesn't really support "> /dev/null", so just capture into $output.

% ktruss -i perl -e 'qx(does-not-exist >/dev/null 2>&1);'|egrep 'dup2.*2'
does-not-exist: not found
% ktruss -i perl -e 'qx(does-not-exist 2>&1);'|egrep 'dup2.*2'           
 16954      1 perl     dup2(0x1, 0x2)              = 2

The problem is that, whilst Perl supports 2>&1 internally (and does not use
the shell at all) if there is no other redirection, it does not support file
redirection - it defers that (and therefore necessarily must also defer the
stderr redirection) to the shell.  If the system's shell happens to report
"Not found" errors before redirection is processed (E.g. NetBSD shell) then
the stderr redirection is happening too late to be captured.

That leads to unintended errors reported on stderr - primarily if sudo is not
installed on the system, or not in the $PATH.

Use the -m parameter to su, as ZM_WEB_USER shouldn't require a login shell.

--- scripts/ZoneMinder/lib/ZoneMinder/General.pm.orig	2023-02-23 21:44:01.000000000 +0000
+++ scripts/ZoneMinder/lib/ZoneMinder/General.pm
@@@@ -92,7 +92,7 @@@@ sub getCmdFormat {
     chomp( $output );
     Debug("Test failed, '$output'");
 
-    $prefix = 'su '.$Config{ZM_WEB_USER}.q` --shell=/bin/sh --command='`;
+    $prefix = 'su -m'.$Config{ZM_WEB_USER}.q` --shell=/bin/sh --command='`;
     $suffix = q`'`;
     $command = $prefix.$null_command.$suffix;
     Debug("Testing \"$command\"");
@


1.3
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
@d22 1
a22 1
--- scripts/ZoneMinder/lib/ZoneMinder/General.pm.orig	2019-02-22 15:38:47.000000000 +0000
d24 3
a26 3
@@@@ -129,7 +129,7 @@@@ sub getCmdFormat {
       chomp( $output );
       Debug( "Test failed, '$output'\n" );
d28 5
a32 5
-      $prefix = "su ".$Config{ZM_WEB_USER}." -c '";
+      $prefix = "su -m ".$Config{ZM_WEB_USER}." -c '";
       $suffix = "'";
       $command = $prefix.$null_command.$suffix;
       Debug( "Testing \"$command\"\n" );
@


1.2
log
@Update ZoneMinder from 1.25.0 to 1.28.1.

Numerous changes, documented at:
 https://github.com/ZoneMinder/ZoneMinder/releases

Addresses two security advisories:

  https://github.com/ZoneMinder/ZoneMinder/releases/tag/v1.28.0
  http://secunia.com/advisories/62918/

Pkgsrc changes:

patch-src_zm_signal_h is no longer necessary because zm_signal.h uses
HAVE_EXECINFO_H.

patch-src_zmf_cpp appears to be applied upstream.

patch-configure_ac no longer needs to set PATH_BUILD to
PREFIX/share/zoneminder, so that zmupdate.pl can locate the database build
scripts as installed files.  Upstream has now implemented this via the
ZM_PATH_DATA entry in zm.conf, and adds a ZM_PATH_DATA/db subdirectory.

src/Makefile.am no longer setuid's zmfix, as zmfix was removed from
ZoneMinder 1.26.6.

The code now uses clock_gettime(), which on some systems (like Linux), calls
for -lrt.  Since the build system isn't aware of this, but Pkgsrc is, just set
PTHREAD_AUTO_VARS=yes.

The PHP code now uses PDO for DB access, but it looks like there are some
straggling dependencies on the raw MySQL driver, so both are pulled in.
@
text
@d1 1
a1 1
$NetBSD: patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm,v 1.1 2014/05/20 11:30:27 dsainty Exp $
d22 5
a26 22
--- scripts/ZoneMinder/lib/ZoneMinder/General.pm.orig	2015-04-01 19:40:39.708621257 +1300
+++ scripts/ZoneMinder/lib/ZoneMinder/General.pm	2015-04-01 19:50:47.372646449 +1300
@@@@ -107,7 +107,7 @@@@
     my $suffix = "";
     my $command = $prefix.$null_command.$suffix;
     Debug( "Testing \"$command\"\n" );
-    $command .= " > /dev/null 2>&1"; 
+    $command .= " 2>&1";
     my $output = qx($command);
     my $status = $? >> 8;
     if ( !$status )
@@@@ -124,6 +124,7 @@@@
         $suffix = "'";
         $command = $prefix.$null_command.$suffix;
         Debug( "Testing \"$command\"\n" );
+        $command .= " 2>&1";
         my $output = qx($command);
         my $status = $? >> 8;
         if ( !$status )
@@@@ -136,10 +137,11 @@@@
             chomp( $output );
             Debug( "Test failed, '$output'\n" );
d28 5
a32 9
-            $prefix = "su ".$Config{ZM_WEB_USER}." -c '";
+            $prefix = "su -m ".$Config{ZM_WEB_USER}." -c '";
             $suffix = "'";
             $command = $prefix.$null_command.$suffix;
             Debug( "Testing \"$command\"\n" );
+            $command .= " 2>&1";
             $output = qx($command);
             $status = $? >> 8;
             if ( !$status )
@


1.1
log
@Improve behaviour under NetBSD, successfully supressing error messages under
NetBSD's shell, and passing the -m option to NetBSD's "su" command to support
users without login shells.

Add the PREFIX to all script PATHs.  This can allow sudo to be installed and
used as an alternative to su, should there be any value in doing that.

Bump PKGREVISION.
@
text
@d1 1
a1 1
$NetBSD$
d22 6
a27 6
--- scripts/ZoneMinder/lib/ZoneMinder/General.pm.orig	2014-05-13 22:59:22.229694642 +1200
+++ scripts/ZoneMinder/lib/ZoneMinder/General.pm	2014-05-13 23:03:06.377703932 +1200
@@@@ -103,7 +103,7 @@@@
 	my $suffix = "";
 	my $command = $prefix.$null_command.$suffix;
 	Debug( "Testing \"$command\"\n" );
d29 15
a43 15
+	$command .= " 2>&1";
 	my $output = qx($command);
 	my $status = $? >> 8;
 	if ( !$status )
@@@@ -120,6 +120,7 @@@@
 		$suffix = "'";
 		$command = $prefix.$null_command.$suffix;
 		Debug( "Testing \"$command\"\n" );
+		$command .= " 2>&1";
 		my $output = qx($command);
 		my $status = $? >> 8;
 		if ( !$status )
@@@@ -132,10 +133,11 @@@@
 			chomp( $output );
 			Debug( "Test failed, '$output'\n" );
d45 9
a53 9
-			$prefix = "su ".ZM_WEB_USER." -c '";
+			$prefix = "su -m ".ZM_WEB_USER." -c '";
 			$suffix = "'";
 			$command = $prefix.$null_command.$suffix;
 			Debug( "Testing \"$command\"\n" );
+			$command .= " 2>&1";
 			$output = qx($command);
 			$status = $? >> 8;
 			if ( !$status )
@


1.1.8.1
log
@Pullup ticket #4654 - requested by dsainty
security/zoneminder: security update

Revisions pulled up:
- security/zoneminder/Makefile                                  1.18
- security/zoneminder/distinfo                                  1.7
- security/zoneminder/MESSAGE                                   1.3
- security/zoneminder/PLIST                                     1.4
- security/zoneminder/patches/patch-Makefile_am                 1.3
- security/zoneminder/patches/patch-configure_ac                1.4
- security/zoneminder/patches/patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm 1.2
- security/zoneminder/patches/patch-scripts_zm_in               1.3
- security/zoneminder/patches/patch-src_Makefile_am             1.3
- security/zoneminder/patches/patch-src_zm__thread.h            1.4
- security/zoneminder/patches/patch-src_zm__timer.h             1.3
- security/zoneminder/patches/patch-src_zm__utils.h             1.2
- security/zoneminder/patches/patch-src_zm_ffmpeg_camera_cpp    1.1
- security/zoneminder/patches/patch-src_zm_remote_camera_h      1.4
- security/zoneminder/patches/patch-src_zm_signal_cpp           1.1
- security/zoneminder/patches/patch-src_zm_signal_h             deleted
- security/zoneminder/patches/patch-src_zmf_cpp                 deleted

---
   Module Name:    pkgsrc
   Committed By:   dsainty
   Date:           Sun Apr  5 08:51:08 UTC 2015

   Modified Files:
           pkgsrc/security/zoneminder: MESSAGE Makefile PLIST distinfo
           pkgsrc/security/zoneminder/patches: patch-Makefile_am
               patch-configure_ac
               patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm
               patch-scripts_zm_in patch-src_Makefile_am patch-src_zm__thread.h
               patch-src_zm__timer.h patch-src_zm__utils.h
               patch-src_zm_remote_camera_h
   Removed Files:
           pkgsrc/security/zoneminder/patches: patch-src_zm_signal_h
               patch-src_zmf_cpp

   Log Message:
   Update ZoneMinder from 1.25.0 to 1.28.1.

   Numerous changes, documented at:
    https://github.com/ZoneMinder/ZoneMinder/releases

   Addresses two security advisories:

     https://github.com/ZoneMinder/ZoneMinder/releases/tag/v1.28.0
     http://secunia.com/advisories/62918/

   Pkgsrc changes:

   patch-src_zm_signal_h is no longer necessary because zm_signal.h uses
   HAVE_EXECINFO_H.

   patch-src_zmf_cpp appears to be applied upstream.

   patch-configure_ac no longer needs to set PATH_BUILD to
   PREFIX/share/zoneminder, so that zmupdate.pl can locate the database build
   scripts as installed files.  Upstream has now implemented this via the
   ZM_PATH_DATA entry in zm.conf, and adds a ZM_PATH_DATA/db subdirectory.

   src/Makefile.am no longer setuid's zmfix, as zmfix was removed from
   ZoneMinder 1.26.6.

   The code now uses clock_gettime(), which on some systems (like Linux), calls
   for -lrt.  Since the build system isn't aware of this, but Pkgsrc is, just set
   PTHREAD_AUTO_VARS=yes.

   The PHP code now uses PDO for DB access, but it looks like there are some
   straggling dependencies on the raw MySQL driver, so both are pulled in.

---
   Module Name:    pkgsrc
   Committed By:   dsainty
   Date:           Tue Apr  7 12:32:59 UTC 2015

   Modified Files:
           pkgsrc/security/zoneminder: Makefile

   Log Message:
   NetBSD's tar (6.1) does an exit(1) on the source archive, complaining:

    Invalid header, starting valid header search.

   As a workaround: EXTRACT_USING=gtar

---
   Module Name:    pkgsrc
   Committed By:   dsainty
   Date:           Tue Apr  7 12:54:36 UTC 2015

   Modified Files:
           pkgsrc/security/zoneminder: distinfo
           pkgsrc/security/zoneminder/patches: patch-configure_ac

   Log Message:
   Recognise lower-case "netbsd" as BSD.

   NB: This doesn't fix the threads portability issues yet for NetBSD, but gets
   through configuration.

---
   Module Name:    pkgsrc
   Committed By:   dsainty
   Date:           Fri Apr 10 02:53:20 UTC 2015

   Modified Files:
           pkgsrc/security/zoneminder: Makefile

   Log Message:
   New ZoneMinder supports the newer ffmpeg APIs, so switch the ffmpeg
   dependency from ffmpeg010 to ffmpeg2.

---
   Module Name:    pkgsrc
   Committed By:   dsainty
   Date:           Fri Apr 10 02:58:49 UTC 2015

   Modified Files:
           pkgsrc/security/zoneminder: Makefile distinfo
           pkgsrc/security/zoneminder/patches: patch-src_zm__thread.h
               patch-src_zm__timer.h
   Added Files:
           pkgsrc/security/zoneminder/patches: patch-src_zm_ffmpeg_camera_cpp
               patch-src_zm_signal_cpp

   Log Message:
   Patch up some Linux-specific assumptions in the code.

   Fixes build under NetBSD.

   Bump PKGREVISION for switch to ffmpeg2, and some portability changes that
   aren't expected to affect functionality.

---
   Module Name:    pkgsrc
   Committed By:   dsainty
   Date:           Wed Apr 22 15:13:44 UTC 2015

   Modified Files:
           pkgsrc/security/zoneminder: Makefile

   Log Message:
   Fix paths in two missed installed scripts.

   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 currently has.

   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 this file.
   If the base OS uses systemd, it probably also has pkexec in its base
   installation.

   Bump PKGREVISION.
@
text
@d1 1
a1 1
$NetBSD: patch-scripts_ZoneMinder_lib_ZoneMinder_General_pm,v 1.2 2015/04/05 08:51:08 dsainty Exp $
d22 6
a27 6
--- scripts/ZoneMinder/lib/ZoneMinder/General.pm.orig	2015-04-01 19:40:39.708621257 +1300
+++ scripts/ZoneMinder/lib/ZoneMinder/General.pm	2015-04-01 19:50:47.372646449 +1300
@@@@ -107,7 +107,7 @@@@
     my $suffix = "";
     my $command = $prefix.$null_command.$suffix;
     Debug( "Testing \"$command\"\n" );
d29 15
a43 15
+    $command .= " 2>&1";
     my $output = qx($command);
     my $status = $? >> 8;
     if ( !$status )
@@@@ -124,6 +124,7 @@@@
         $suffix = "'";
         $command = $prefix.$null_command.$suffix;
         Debug( "Testing \"$command\"\n" );
+        $command .= " 2>&1";
         my $output = qx($command);
         my $status = $? >> 8;
         if ( !$status )
@@@@ -136,10 +137,11 @@@@
             chomp( $output );
             Debug( "Test failed, '$output'\n" );
d45 9
a53 9
-            $prefix = "su ".$Config{ZM_WEB_USER}." -c '";
+            $prefix = "su -m ".$Config{ZM_WEB_USER}." -c '";
             $suffix = "'";
             $command = $prefix.$null_command.$suffix;
             Debug( "Testing \"$command\"\n" );
+            $command .= " 2>&1";
             $output = qx($command);
             $status = $? >> 8;
             if ( !$status )
@


