Merge branch 'fix_1762' into storageareas

pull/1857/head
Isaac Connor 2017-03-31 13:38:59 -04:00
commit 58d119d9ed
5 changed files with 34 additions and 20 deletions

View File

@ -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@

View File

@ -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#/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
@ -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 <zonexpertconsulting@outlook.com> - 1.30.2-2
- 1.30.2 release
* Wed Feb 08 2017 Andrew Bauer <zonexpertconsulting@outlook.com> - 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 <zonexpertconsulting@outlook.com> - 1.30.1-2
- Changes from rpmfusion #4393

View File

@ -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]

View File

@ -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;
@ -456,20 +457,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 {

View File

@ -66,7 +66,7 @@ foreach( dbFetchAll( $sql ) as $row ) {
$row['Scale'] = $scale;
$row['PopupScale'] = reScale( SCALE_BASE, $row['DefaultScale'], ZM_WEB_DEFAULT_SCALE );
if ( ZM_OPT_CONTROL && $row['ControlId'] )
if ( ZM_OPT_CONTROL && $row['ControlId'] && $row['Controllable'] )
$showControl = true;
$row['connKey'] = generateConnKey();
$monitors[] = new Monitor( $row );