From fe5fe632545ffe5ea6294c335bcc24456251671a Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 29 Mar 2017 07:53:15 -0500 Subject: [PATCH 1/6] Update zoneminder.service.in This was a typo. Quotes are not needed. --- misc/zoneminder.service.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/misc/zoneminder.service.in b/misc/zoneminder.service.in index d15c479c2b..d1cfb36a0c 100644 --- a/misc/zoneminder.service.in +++ b/misc/zoneminder.service.in @@ -12,7 +12,7 @@ Type=forking ExecStart=@BINDIR@/zmpkg.pl start ExecReload=@BINDIR@/zmpkg.pl restart ExecStop=@BINDIR@/zmpkg.pl stop -PIDFile="@ZM_RUNDIR@/zm.pid" +PIDFile=@ZM_RUNDIR@/zm.pid Environment=TZ=:/etc/localtime [Install] From e46f64125ed3b222f3fe39dae7346df89cf10f05 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Wed, 29 Mar 2017 13:28:15 -0500 Subject: [PATCH 2/6] Update zoneminder.tmpfiles.in With cakephp debug mode off, we must ensure cake's tmp folders are created --- distros/redhat/systemd/zoneminder.tmpfiles.in | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/distros/redhat/systemd/zoneminder.tmpfiles.in b/distros/redhat/systemd/zoneminder.tmpfiles.in index f3acd0af70..910c360f1f 100644 --- a/distros/redhat/systemd/zoneminder.tmpfiles.in +++ b/distros/redhat/systemd/zoneminder.tmpfiles.in @@ -1,2 +1,7 @@ D @ZM_TMPDIR@ 0755 @WEB_USER@ @WEB_GROUP@ +D @ZM_TMPDIR@/logs 0755 @WEB_USER@ @WEB_GROUP@ +D @ZM_TMPDIR@/cache 0755 @WEB_USER@ @WEB_GROUP@ +D @ZM_TMPDIR@/cache/models 0755 @WEB_USER@ @WEB_GROUP@ +D @ZM_TMPDIR@/cache/persistent 0755 @WEB_USER@ @WEB_GROUP@ +D @ZM_TMPDIR@/cache/views 0755 @WEB_USER@ @WEB_GROUP@ D @ZM_SOCKDIR@ 0755 @WEB_USER@ @WEB_GROUP@ From 7e3b27a130d7dedf8eecbedd32aaa4ae96074a9a Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Thu, 30 Mar 2017 10:49:02 -0400 Subject: [PATCH 3/6] Test for Controllable as well as ControlId --- web/skins/classic/views/montage.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/skins/classic/views/montage.php b/web/skins/classic/views/montage.php index 2016889fbe..2867f0b9d8 100644 --- a/web/skins/classic/views/montage.php +++ b/web/skins/classic/views/montage.php @@ -60,7 +60,7 @@ $maxWidth = $scaleWidth; if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight; - if ( ZM_OPT_CONTROL && $row['ControlId'] ) + if ( ZM_OPT_CONTROL && $row['ControlId'] && $row['Controllable'] ) $showControl = true; $row['index'] = $index++; $row['scaleWidth'] = $scaleWidth; From 9a2c31d2c070f781d9c3eea3db95c9407866ecc5 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Thu, 30 Mar 2017 18:20:41 -0500 Subject: [PATCH 4/6] bump rpmspecfile to 1.30.2 release --- distros/redhat/zoneminder.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index f562b1159d..07b3dd8d28 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -29,7 +29,7 @@ Name: zoneminder Version: 1.30.2 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A camera monitoring and analysis tool Group: System Environment/Daemons # jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ @@ -39,7 +39,7 @@ Group: System Environment/Daemons License: GPLv2+ and LGPLv2+ and MIT URL: http://www.zoneminder.com/ -Source0: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://github.com/ZoneMinder/ZoneMinder/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz Source1: https://github.com/FriendsOfCake/crud/archive/v%{crud_version}.tar.gz#/crud-%{crud_version}.tar.gz %{?with_init_systemd:BuildRequires: systemd-devel} @@ -336,8 +336,11 @@ rm -rf %{_docdir}/%{name}-%{version} %dir %attr(755,%{zmuid_final},%{zmgid_final}) %ghost %{_localstatedir}/run/zoneminder %changelog +* Thu Mar 30 2017 Andrew Bauer - 1.30.2-2 +- 1.30.2 release + * Wed Feb 08 2017 Andrew Bauer - 1.30.2-1 -- Bump version for 1.30.2 release +- Bump version for 1.30.2 release candidate 1 * Wed Dec 28 2016 Andrew Bauer - 1.30.1-2 - Changes from rpmfusion #4393 From 7068efd58168cf60264f303e408f91f6f8e4a765 Mon Sep 17 00:00:00 2001 From: Andrew Bauer Date: Thu, 30 Mar 2017 18:31:58 -0500 Subject: [PATCH 5/6] rpmspecfile - modify tarball handling --- distros/redhat/zoneminder.spec | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec index 07b3dd8d28..0ed6323f0a 100644 --- a/distros/redhat/zoneminder.spec +++ b/distros/redhat/zoneminder.spec @@ -39,7 +39,7 @@ Group: System Environment/Daemons License: GPLv2+ and LGPLv2+ and MIT URL: http://www.zoneminder.com/ -Source0: https://github.com/ZoneMinder/ZoneMinder/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz +Source0: https://github.com/ZoneMinder/ZoneMinder/archive/%{version}.tar.gz#/zoneminder-%{version}.tar.gz Source1: https://github.com/FriendsOfCake/crud/archive/v%{crud_version}.tar.gz#/crud-%{crud_version}.tar.gz %{?with_init_systemd:BuildRequires: systemd-devel} @@ -130,8 +130,8 @@ designed to support as many cameras as you can attach to your computer without too much degradation of performance. %prep -%autosetup -%autosetup -a 1 +%autosetup -n ZoneMinder-%{version} +%autosetup -a 1 -n ZoneMinder-%{version} rmdir ./web/api/app/Plugin/Crud mv -f crud-%{crud_version} ./web/api/app/Plugin/Crud From d3b6792a6a7858b4c84090541fd3342ee35a1216 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 31 Mar 2017 12:25:48 -0400 Subject: [PATCH 6/6] block signals around checking for a process to die --- scripts/zmdc.pl.in | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index 918df8574e..aeeeecbf4c 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -66,6 +66,7 @@ use ZoneMinder; use POSIX; use Socket; use IO::Handle; +use Time::HiRes qw(usleep); use autouse 'Pod::Usage'=>qw(pod2usage); #use Data::Dumper; @@ -549,22 +550,25 @@ sub send_stop { } # end sub send_stop sub kill_until_dead { - my ( $process ) = @_; - # Now check it has actually gone away, if not kill -9 it - my $count = 0; - while( $process and $$process{pid} and kill( 0, $$process{pid} ) ) - { - if ( $count++ > 5 ) - { - dPrint( ZoneMinder::Logger::WARNING, "'$$process{command}' has not stopped at " - .strftime( '%y/%m/%d %H:%M:%S', localtime() ) - .". Sending KILL to pid $$process{pid}\n" - ); - kill( 'KILL', $$process{pid} ); - } - - sleep( 1 ); - } + my ( $process ) = @_; +# Now check it has actually gone away, if not kill -9 it + my $count = 0; + my $sigset = POSIX::SigSet->new; + my $blockset = POSIX::SigSet->new(SIGINT); + sigprocmask(SIG_BLOCK, $blockset, $sigset ) or die "dying at block...\n"; + while( $process and $$process{pid} and kill( 0, $$process{pid} ) ) { + if ( $count++ > 5 ) { + dPrint( ZoneMinder::Logger::WARNING, "'$$process{command}' has not stopped at " + .strftime( '%y/%m/%d %H:%M:%S', localtime() ) + .". Sending KILL to pid $$process{pid}\n" + ); + kill( 'KILL', $$process{pid} ); + } + + sigprocmask(SIG_UNBLOCK, $blockset) or die "dying at unblock...\n"; + usleep( 1 ); + sigprocmask(SIG_BLOCK, $blockset, $sigset ) or die "dying at block...\n"; + } } sub _stop {