Merge branch 'master' into plugin_support_test
This commit is contained in:
commit
5060fc490f
|
@ -77,6 +77,12 @@ if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "f20") OR (ZM
|
|||
set(ZM_SOCKDIR "/var/lib/zoneminder/sock")
|
||||
set(ZM_TMPDIR "/var/lib/zoneminder/temp")
|
||||
set(ZM_LOGDIR "/var/log/zoneminder")
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||
set(ZM_RUNDIR "/var/run/zoneminder")
|
||||
set(ZM_SOCKDIR "/var/lib/zoneminder/sock")
|
||||
set(ZM_TMPDIR "/var/lib/zoneminder/temp")
|
||||
set(ZM_LOGDIR "/var/log/zoneminder")
|
||||
set(ZM_CONFIG_DIR "/etc/zm")
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||
set(ZM_RUNDIR "/var/run/zoneminder")
|
||||
set(ZM_TMPDIR "/var/run/zoneminder")
|
||||
|
@ -492,7 +498,6 @@ endif(NOT POLKIT_FOUND)
|
|||
# Some variables that zm expects
|
||||
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
|
||||
set(ZM_CONFIG "${ZM_CONFIG_DIR}/zm.conf")
|
||||
set(ZM_CONFIG "/${CMAKE_INSTALL_SYSCONFDIR}/zm.conf")
|
||||
set(VERSION "${zoneminder_VERSION}")
|
||||
set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder")
|
||||
set(BINDIR "${CMAKE_INSTALL_FULL_BINDIR}")
|
||||
|
@ -521,7 +526,7 @@ add_subdirectory(misc)
|
|||
# Process distro subdirectories
|
||||
if((ZM_TARGET_DISTRO STREQUAL "f19") OR (ZM_TARGET_DISTRO STREQUAL "f20"))
|
||||
add_subdirectory(distros/fedora)
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "el6")
|
||||
elseif((ZM_TARGET_DISTRO STREQUAL "el6") OR (ZM_TARGET_DISTRO STREQUAL "el7"))
|
||||
add_subdirectory(distros/redhat)
|
||||
elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
|
||||
add_subdirectory(distros/opensuse)
|
||||
|
|
10
INSTALL
10
INSTALL
|
@ -27,11 +27,15 @@ cmake by default does not require any parameters, but its possible to override t
|
|||
Configuration can be done in 4 ways:
|
||||
1) As a command line parameter, e.g. cmake -DCMAKE_VERBOSE_MAKEFILE=ON .
|
||||
2) Using cmake-gui
|
||||
4) Providing cmake with an initial cache file with the -C option
|
||||
3) Providing cmake with an initial cache file with the -C option
|
||||
IMPORTANT: Do not use the -C option if any major part of your system, excluding the version of zoneminder, has changed.
|
||||
For example, do not use this option if: you have upgraded your distro to a new version, have gone from 32 to 64 bits,
|
||||
or have migrated from one machine to another.
|
||||
4) By editing the cache file CMakeCache.txt (after it has been generated) - Not recommended
|
||||
|
||||
Possible configuration options:
|
||||
ZM_RUNDIR Location of transient process files, default: /var/run/zm
|
||||
ZM_SOCKDIR Location of Unix domain socket files, default /var/run/zm
|
||||
ZM_TMPDIR Location of temporary files, default: /tmp/zm
|
||||
ZM_LOGDIR Location of generated log files, default: /var/log/zm
|
||||
ZM_WEBDIR Location of the web files, default: <prefix>/share/zoneminder/www
|
||||
|
@ -52,7 +56,6 @@ Advanced:
|
|||
ZM_PERL_SUBPREFIX Use a different directory for the zm perl modules. NOTE: This is a subprefix, e.g. /lib will be turned into <prefix>/lib, default: <libarch>/perl5
|
||||
ZM_PERL_USE_PATH Override the include path for zm perl modules. Useful if you are moving the perl modules without using the ZM_PERL_SUBPREFIX option. default: <prefix>/<zmperlsubprefix>
|
||||
|
||||
|
||||
Useful configuration options provided by cmake:
|
||||
CMAKE_VERBOSE_MAKEFILE - Set this to ON (default OFF) to see what cmake is doing. Very useful for troubleshooting.
|
||||
CMAKE_BUILD_TYPE - Set this to Debug (default Release) to build ZoneMinder with debugging enabled.
|
||||
|
@ -90,7 +93,8 @@ NOTE: The database server, database name, user and password can be different and
|
|||
8) Create an apache virtual host for ZoneMinder. Make sure to use the same paths as ZM_WEBDIR and ZM_CGIDIR in /etc/zm.conf
|
||||
9) Create other config if desired (e.g. rsyslog, logrotate and such). Some of this can be found in <prefix>/share/zoneminder/misc or project/misc directory
|
||||
10) Setup an appropriate startup script for your system. A generic sys v init script is here: /scripts/zm while a generic systemd service file is here: /misc/zoneminder.service
|
||||
You must determine which file to use, verify it is correct, and then copy it to the correct location. Consult your distro's documentation.
|
||||
You must determine which file to use, verify it is correct, and then copy it to the correct location. Consult your distro's documentation. Note that distros using systemd also
|
||||
require /misc/zoneminder-tmpfiles.conf to be copied into the system's tmpfiles.d folder.
|
||||
|
||||
Basic steps for upgrading ZoneMinder
|
||||
------------------------------------
|
||||
|
|
|
@ -355,6 +355,7 @@ PATH_NETPBM=`dirname $PATH_NETPBM`
|
|||
fi
|
||||
|
||||
# Checks for libraries.
|
||||
AC_CHECK_LIB(rt,clock_gettime,,AC_MSG_ERROR(zm requires librt))
|
||||
AC_SEARCH_LIBS(mysql_init,[mysqlclient mariadbclient],,AC_MSG_ERROR(zm requires libmysqlclient.a or libmariadbclient.a))
|
||||
AC_CHECK_LIB(jpeg,jpeg_start_compress,,AC_MSG_ERROR(zm requires libjpeg.a))
|
||||
AC_CHECK_LIB(pthread,pthread_create,,AC_MSG_ERROR(zm requires libpthread.a))
|
||||
|
|
|
@ -0,0 +1,400 @@
|
|||
%define zmuid $(id -un)
|
||||
%define zmgid $(id -gn)
|
||||
%define zmuid_final apache
|
||||
%define zmgid_final apache
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
### Delete the lines below to build with ffmpeg and/or x10
|
||||
%define _without_ffmpeg 1
|
||||
%define _without_x10 1
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.28.1
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
|
||||
# Mootools is inder the MIT license: http://mootools.net/
|
||||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
|
||||
Source: ZoneMinder-%{version}.tar.gz
|
||||
|
||||
BuildRequires: cmake gnutls-devel systemd-units bzip2-devel
|
||||
BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel
|
||||
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
|
||||
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
|
||||
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel}
|
||||
%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)}
|
||||
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||
BuildRequires: httpd polkit-devel
|
||||
%{!?_without_ffmpeg:BuildRequires: ffmpeg}
|
||||
|
||||
Requires: httpd php php-mysql cambozola polkit net-tools
|
||||
Requires: libjpeg-turbo vlc-core libcurl
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
Requires: perl(LWP::Protocol::https)
|
||||
%{!?_without_ffmpeg:Requires: ffmpeg}
|
||||
|
||||
Requires(post): systemd-units systemd-sysv
|
||||
Requires(post): /usr/bin/gpasswd
|
||||
Requires(post): /usr/bin/less
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
|
||||
%description
|
||||
ZoneMinder is a set of applications which is intended to provide a complete
|
||||
solution allowing you to capture, analyse, record and monitor any cameras you
|
||||
have attached to a Linux based machine. It is designed to run on kernels which
|
||||
support the Video For Linux (V4L) interface and has been tested with cameras
|
||||
attached to BTTV cards, various USB cameras and IP network cameras. It is
|
||||
designed to support as many cameras as you can attach to your computer without
|
||||
too much degradation of performance.
|
||||
|
||||
%prep
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
|
||||
# Change the following default values
|
||||
./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin/zm/nph-zms
|
||||
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
|
||||
./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm
|
||||
./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload
|
||||
./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes
|
||||
./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no
|
||||
./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DZM_TARGET_DISTRO="f20" \
|
||||
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
|
||||
%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \
|
||||
%{?_without_x10:-DZM_NO_X10=ON} \
|
||||
.
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export DESTDIR=%{buildroot}
|
||||
make install
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Allow zoneminder access to local video sources, serial ports, and x10
|
||||
/usr/bin/gpasswd -a %{zmuid_final} video
|
||||
/usr/bin/gpasswd -a %{zmuid_final} dialout
|
||||
|
||||
# Display the README for post installation instructions
|
||||
/usr/bin/less %{_docdir}/%{name}/README.Fedora
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%triggerun -- zoneminder < 1.25.0-4
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply zoneminder
|
||||
# to migrate them to systemd targets
|
||||
/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||:
|
||||
|
||||
# Run these because the SysV package being removed won't do them
|
||||
/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/jscalendar-doc
|
||||
%config %attr(640,root,%{zmgid_final}) /etc/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
|
||||
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
|
||||
%config(noreplace) /etc/logrotate.d/zoneminder
|
||||
|
||||
%{_unitdir}/zoneminder.service
|
||||
|
||||
%{_bindir}/zma
|
||||
%{_bindir}/zmaudit.pl
|
||||
%{_bindir}/zmc
|
||||
%{_bindir}/zmcontrol.pl
|
||||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmstreamer
|
||||
%{_bindir}/zmtrack.pl
|
||||
%{_bindir}/zmtrigger.pl
|
||||
%{_bindir}/zmu
|
||||
%{_bindir}/zmupdate.pl
|
||||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{!?_without_x10:%{_bindir}/zmx10.pl}
|
||||
|
||||
%{perl_vendorlib}/ZoneMinder*
|
||||
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
||||
#%{perl_archlib}/ZoneMinder*
|
||||
%{_mandir}/man*/*
|
||||
%dir %{_libexecdir}/zoneminder
|
||||
%{_libexecdir}/zoneminder/cgi-bin
|
||||
%dir %{_datadir}/zoneminder
|
||||
%{_datadir}/zoneminder/db
|
||||
%{_datadir}/zoneminder/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Feb 14 2015 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.1
|
||||
- Bump version for 1.28.1 release on Fedora 21.
|
||||
|
||||
* Sun Oct 5 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.0
|
||||
- Bump version for 1.28.0 release.
|
||||
|
||||
* Fri Mar 14 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Tweak build requirements for cmake
|
||||
|
||||
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Add zmcamtool.pl. Bump version for 1.27 release.
|
||||
|
||||
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
|
||||
- This is a bug fixe release
|
||||
- RTSP fixes, cmake enhancements, couple other misc fixes
|
||||
|
||||
* Mon Oct 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Initial cmake build.
|
||||
|
||||
* Sat Oct 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch
|
||||
- All files are now part of the zoneminder source tree. Update specfile accordingly.
|
||||
|
||||
* Sat Sep 21 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.3
|
||||
- Initial rebuild for ZoneMinder 1.26.3 release.
|
||||
|
||||
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 1.25.0-12
|
||||
- rebuild due to "jpeg8-ABI" feature drop
|
||||
|
||||
* Mon Jan 7 2013 Remi Collet <rcollet@redhat.com> - 1.25.0-11
|
||||
- fix configuration file for httpd 2.4, #871502
|
||||
|
||||
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.25.0-10
|
||||
- rebuild against new libjpeg
|
||||
|
||||
* Thu Aug 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-9
|
||||
- Add patch to work around v4l2 api breakage in 3.5 kernel.
|
||||
|
||||
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Sat Jun 23 2012 Petr Pisar <ppisar@redhat.com> - 1.25.0-7
|
||||
- Perl 5.16 rebuild
|
||||
|
||||
* Wed Mar 21 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-6
|
||||
- Fix stupid thinko in sql modifications.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-5
|
||||
- Clean up macro usage.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-4
|
||||
- Convert to systemd.
|
||||
- Add tmpfiles.d configuration since the initscript isn't around to create
|
||||
/run/zoneminder.
|
||||
- Remove some pointless executable permissions.
|
||||
- Add logrotate file.
|
||||
|
||||
* Wed Feb 22 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-3
|
||||
- Update README.Fedora to reference systemctl and mention timezone info in
|
||||
php.ini.
|
||||
- Add proper default for EYEZM_LOG_TO_FILE.
|
||||
|
||||
|
||||
* Thu Feb 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-2
|
||||
- Rebuild for new pcre.
|
||||
|
||||
* Thu Jan 19 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-1
|
||||
- Update to 1.25.0
|
||||
- Fix gcc4.7 build problems.
|
||||
- Drop gcc4.4 build fixes; for whatever reason they now break the build.
|
||||
- Clean up old patches.
|
||||
- Force setting of ZM_TMPDIR and ZM_RUNDIR.
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-3
|
||||
- Re-add the dist-tag that somehow got lost.
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-2
|
||||
- Add patch for bug 711780 - fix syntax issue in Mapped.pm.
|
||||
- Undo that patch, and undo another which was the cause of the whole mess.
|
||||
- Fix up other patches so ZM_PATH_BUILD is both defined and useful.
|
||||
- Make sure database creation mods actually take.
|
||||
- Update Fedora-specific docs with some additional info.
|
||||
- Use bundled mootools (javascript, so no guideline violation).
|
||||
- Update download location.
|
||||
- Update the gcrypt patch to actually work.
|
||||
- Upstream changed the tarball without changing the version to patch a
|
||||
vulnerability, so redownload.
|
||||
|
||||
* Sun Aug 14 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-1
|
||||
- Initial attempt to upgrade to 1.24.4.
|
||||
- Add patch from BZ 460310 to build against libgcrypt instead of requiring the
|
||||
gnutls openssl libs.
|
||||
|
||||
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-7.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-6.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Mon May 09 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-5.20110324svn3310
|
||||
- Bump for gnutls update.
|
||||
|
||||
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
|
||||
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
|
||||
1.24.3 is really just an occasionally updated devel snapshot.
|
||||
- Rebase various patches.
|
||||
|
||||
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
|
||||
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
|
||||
- Update to latest upstream version.
|
||||
- Rebase patches.
|
||||
- Initial incomplete attempt to disable v4l1 support.
|
||||
|
||||
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
|
||||
- Unbundle cambozola; instead link to the separately pacakged copy.
|
||||
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
|
||||
- Git rid of mixed space/tab usage by removing all tabs.
|
||||
- Remove unnecessary Conflicts: line.
|
||||
- Attempt to force short_open_tag on for the code directories.
|
||||
- Move default location of sockets, swaps, logfiles and some temporary files to
|
||||
make more sense and allow things to work better with a future selinux policy.
|
||||
- Fix errors in README.Fedora.
|
||||
|
||||
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
|
||||
- Mass rebuild with perl-5.12.0
|
||||
|
||||
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
|
||||
- rebuild against perl 5.10.1
|
||||
- use Perl vendorarch and archlib variables correctly
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
|
||||
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
|
||||
- Initial update to 1.24.2.
|
||||
- Rebase patches.
|
||||
- Update mootools download location.
|
||||
- Update to mootools 1.2.3.
|
||||
- Add additional dependencies for some optional features.
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
|
||||
- Remove unused Sys::Mmap perl dependency RPM is finding
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
|
||||
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
|
||||
- Added noffmpeg patch to make building outside mock easier
|
||||
|
||||
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
|
||||
- Patch for gcc 4.4 compilation errors
|
||||
- Upgrade to 1.24.1
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
|
||||
- rebuild for dependencies
|
||||
|
||||
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
|
||||
- Fix permissions on zm.conf
|
||||
|
||||
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
|
||||
- Initial attempt at packaging 1.23.
|
||||
|
||||
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
|
||||
- Add perl module compat dependency, bz #453590
|
||||
|
||||
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
|
||||
- Remove default runlevel, bz #441315
|
||||
|
||||
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
|
||||
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
|
||||
- Fix compilation on gcc 4.3
|
||||
|
||||
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
|
||||
- Rebuild for new openssl
|
||||
|
||||
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
|
||||
- Fix licence tag
|
||||
|
||||
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
|
||||
- Fixes from testing by Jitz including missing dependencies and database creation
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
|
||||
- Disable crashtrace on ppc
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
|
||||
- Fix uid for directories in /var/lib/zoneminder
|
||||
|
||||
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
|
||||
- Added perl Archive::Tar dependency
|
||||
- Disabled web interface due to lack of access control on the event images
|
||||
|
||||
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
|
||||
- Changes recommended in review by Jason Tibbitts
|
||||
|
||||
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
|
||||
- Standardised on package name of zoneminder
|
||||
|
||||
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
|
||||
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin
|
|
@ -1,7 +1,11 @@
|
|||
# CMakeLists.txt for the Redhat/CentOS Target Distro.
|
||||
|
||||
# Create the zoneminder service file
|
||||
configure_file(zoneminder.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY)
|
||||
if(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||
configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY)
|
||||
else(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||
configure_file(zoneminder.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder @ONLY)
|
||||
endif(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||
|
||||
# Download jscalendar & move files into position
|
||||
file(DOWNLOAD http://softlayer-dal.dl.sourceforge.net/project/jscalendar/jscalendar/1.0/jscalendar-1.0.zip ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar-1.0.zip LOG jsc_log STATUS download_jsc)
|
||||
|
@ -41,10 +45,17 @@ install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/imag
|
|||
install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/temp\")")
|
||||
|
||||
# Install auxillary files required to run zoneminder on CentOS
|
||||
install(FILES zoneminder.conf DESTINATION /etc/httpd/conf.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zm-logrotate_d DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
install(FILES zoneminder.service DESTINATION /etc/rc.d/init.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
if(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||
install(FILES zoneminder.el7.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder.el7.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder.tmpfiles DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
|
||||
else(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||
install(FILES zoneminder.el6.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder.el6.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
install(FILES zoneminder DESTINATION /etc/rc.d/init.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
|
||||
endif(ZM_TARGET_DISTRO STREQUAL "el7")
|
||||
|
||||
# Install jscalendar
|
||||
if(unzip_jsc STREQUAL "")
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
|
||||
What's New
|
||||
==========
|
||||
|
||||
1. The Apache ScriptAlias has been changed from "/cgi-bin/zm/zms" to
|
||||
"/cgi-bin-zm/zms". This has been to done to avoid this bug:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=973067
|
||||
|
||||
IMPORTANT: ZoneMinder will not update this value during an upgrade. You must
|
||||
manually update ZM_PATH_ZMS yourself under Options. This does not affect
|
||||
new installs.
|
||||
|
||||
2. During an rpm package upgrade, zmupdate.pl will now auto-update the database
|
||||
and the zonemidner service will restart automatically.
|
||||
|
||||
3. The ZoneMinder config file, zm.conf, has been moved under /etc/zm.
|
||||
|
||||
4. Systemd. CentOS 7 uses Systemd instead of the legacy Sys V Init. Under the
|
||||
hood, Systemd does things quite a bit differently. Prepare to go through a
|
||||
learning curve if you have not done so already.
|
||||
|
||||
New installs
|
||||
============
|
||||
|
||||
1. Unless you are already using MariaDB server, you need to ensure that
|
||||
the server is configured to start during boot and properly secured
|
||||
by running:
|
||||
|
||||
sudo systemctl enable mariadb
|
||||
sudo systemctl start mariadb
|
||||
sudo mysql_secure_installation
|
||||
|
||||
2. Using the password for the root account set during the previous step, you
|
||||
will need to create the ZoneMinder database and configure a database
|
||||
account for ZoneMinder to use:
|
||||
|
||||
mysql -u root -p < /usr/share/zoneminder/db/zm_create.sql
|
||||
mysql -u root -p
|
||||
mysql> grant select,insert,update,delete,lock tables,alter on zm.* to
|
||||
'zmuser'@localhost identified by 'zmpass';
|
||||
mysql> exit;
|
||||
mysqladmin -u root -p reload
|
||||
|
||||
The database account credentials, zmuser/zmpass, are arbitrary. Set them to
|
||||
anything that suits your envinroment.
|
||||
|
||||
3. If you have chosen to change the zoneminder database account credentials to
|
||||
something other than zmuser/zmpass, you must now edit /etc/zm/zm.conf.
|
||||
Change ZM_DB_USER and ZM_DB_PASS to the values you created in the previous
|
||||
step.
|
||||
|
||||
4. Edit /etc/php.ini, uncomment the date.timezone line, and add your local
|
||||
timezone. For whatever reason, PHP will complain loudly if this is not set,
|
||||
or if it is set incorrectly, and these complaints will show up in the
|
||||
zoneminder logging system as errors.
|
||||
|
||||
If you are not sure of the proper timezone specification to use, look at
|
||||
http://php.net/date.timezone
|
||||
|
||||
5. This package will automatically configure and install an SELinux policy
|
||||
called local_zoneminder. A copy of this policy is in the documentation
|
||||
folder.
|
||||
|
||||
Maintaining an accurate SELinux policy file that does not create issues has
|
||||
been a struggle. If SELinux blocks nortmal ZoneMinder acitivity, or you
|
||||
feel you just don't need it, SELinux can be disabled for the current running
|
||||
session with the following command:
|
||||
|
||||
sudo setenforce 0
|
||||
|
||||
To permanently disable SELinux, edit /etc/selinux/config and change the
|
||||
SELINUX line from "enforcing" to "disabled". This change will take
|
||||
effect after a reboot.
|
||||
|
||||
6. Now start the web server:
|
||||
|
||||
sudo systemctl enable httpd
|
||||
sudo systemctl start httpd
|
||||
|
||||
7. Now start zoneminder:
|
||||
|
||||
sudo systemctl enable zoneminder
|
||||
sudo systemctl start zoneminder
|
||||
|
||||
Upgrades
|
||||
========
|
||||
|
||||
1. Verify /etc/zm/zm.conf.
|
||||
|
||||
If zm.conf was manually edited before running the upgrade, the installation
|
||||
may not overwrite it. In this case, it will create the file
|
||||
/etc/zm/zm.conf.rpmnew.
|
||||
|
||||
For example, this will happen if you are using database account credentials
|
||||
other than zmuser/zmpass.
|
||||
|
||||
Compare /etc/zm/zm.conf to /etc/zm/zm.conf.rpmnew. Verify that zm.conf
|
||||
contains any new config settings that may be in zm.conf.rpmnew.
|
||||
|
||||
2. Verify permissions of the zmuser account.
|
||||
|
||||
Overtime, the database account permissions required for normal operation
|
||||
have changed. Verify the zmuser database account has been granted select,
|
||||
insert, update, delete, lock tables, and alter permission to the ZoneMinder
|
||||
database:
|
||||
|
||||
mysql -u root -p
|
||||
mysql> show grants for zmuser@localhost;
|
||||
mysql> exit;
|
||||
|
||||
3. Verify the database was upgraded automatically.
|
||||
|
||||
From the web console, ZoneMinder should show a status of "Running", and the
|
||||
version number should have incremented.
|
||||
|
||||
If it is not running, then try to start it. The web console will indicate
|
||||
if there is a database version conflict. If this is the case, then you may
|
||||
need to manually update the database from the command line:
|
||||
|
||||
sudo zmupdate.pl
|
||||
|
||||
Modern versions of ZoneMinder don't require any parameters added to the
|
||||
zmupdate command. However, if ZoneMinder complains, you may need to call
|
||||
zmupdate in the following manner:
|
||||
|
||||
sudo zmupdate.pl --user=root --pass=<mysql_root_pwd> --version=<from version>
|
||||
|
|
@ -1,6 +1,3 @@
|
|||
# The Zoneminder web interface has been disabled by default due to a small
|
||||
# security issue in the default install.
|
||||
#
|
||||
# When using Zoneminder's own authentication, recorded CCTV images are
|
||||
# accessible from the web directly without passing the authentication. This
|
||||
# means any attacker could see your CCTV images without a password. In order
|
||||
|
@ -18,10 +15,8 @@ Alias /zm "/usr/share/zoneminder/www"
|
|||
AllowOverride All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
# The code unfortunately uses short tags in many places
|
||||
php_value short_open_tag 1
|
||||
|
||||
Deny from all # DELETE THIS LINE
|
||||
# ZoneMinder no longer uses short tags so this is safe to leave disabled
|
||||
# php_value short_open_tag 1
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin"
|
|
@ -0,0 +1,42 @@
|
|||
# When using Zoneminder's own authentication, recorded CCTV images are
|
||||
# accessible from the web directly without passing the authentication. This
|
||||
# means any attacker could see your CCTV images without a password. In order
|
||||
# to avoid this you can disable Zoneminder's authentication and configure
|
||||
# standard Apache authentication (see the Apache documentation for details on
|
||||
# this).
|
||||
#
|
||||
# If you still wish to use Zoneminder's own authentication, or have an
|
||||
# internal site which needs no authentication, you need to delete the line
|
||||
# marked below and restart Apache.
|
||||
|
||||
Alias /zm "/usr/share/zoneminder/www"
|
||||
<Directory "/usr/share/zoneminder/www">
|
||||
Options -Indexes +MultiViews +FollowSymLinks
|
||||
AllowOverride All
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
# ZoneMinder no longer uses short tags so this is safe to leave disabled
|
||||
# php_value short_open_tag 1
|
||||
</Directory>
|
||||
|
||||
ScriptAlias /cgi-bin-zm "/usr/libexec/zoneminder/cgi-bin"
|
||||
<Directory "/usr/libexec/zoneminder/cgi-bin">
|
||||
AllowOverride All
|
||||
Options ExecCGI
|
||||
<IfModule mod_authz_core.c>
|
||||
# Apache 2.4
|
||||
Require all granted
|
||||
</IfModule>
|
||||
<IfModule !mod_authz_core.c>
|
||||
# Apache 2.2
|
||||
Order deny,allow
|
||||
Allow from all
|
||||
</IfModule>
|
||||
</Directory>
|
|
@ -0,0 +1,8 @@
|
|||
/var/log/zoneminder/*.log {
|
||||
missingok
|
||||
notifempty
|
||||
sharedscripts
|
||||
postrotate
|
||||
/usr/bin/zmpkg.pl logrot 2> /dev/null > /dev/null || :
|
||||
endscript
|
||||
}
|
|
@ -0,0 +1,402 @@
|
|||
%define zmuid $(id -un)
|
||||
%define zmgid $(id -gn)
|
||||
%define zmuid_final apache
|
||||
%define zmgid_final apache
|
||||
|
||||
%global _hardened_build 1
|
||||
|
||||
Name: zoneminder
|
||||
Version: 1.28.1
|
||||
Release: 1%{?dist}
|
||||
Summary: A camera monitoring and analysis tool
|
||||
Group: System Environment/Daemons
|
||||
# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/
|
||||
# Mootools is inder the MIT license: http://mootools.net/
|
||||
License: GPLv2+ and LGPLv2+ and MIT
|
||||
URL: http://www.zoneminder.com/
|
||||
|
||||
#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz
|
||||
Source: ZoneMinder-%{version}.tar.gz
|
||||
|
||||
BuildRequires: cmake gnutls-devel systemd-units bzip2-devel
|
||||
BuildRequires: mariadb-devel pcre-devel libjpeg-turbo-devel
|
||||
BuildRequires: perl(Archive::Tar) perl(Archive::Zip)
|
||||
BuildRequires: perl(Date::Manip) perl(DBD::mysql)
|
||||
BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent)
|
||||
BuildRequires: perl(MIME::Entity) perl(MIME::Lite)
|
||||
BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap)
|
||||
BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign)
|
||||
BuildRequires: perl(Expect) perl(Sys::Syslog)
|
||||
BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel
|
||||
BuildRequires: ffmpeg ffmpeg-devel perl(X10::ActiveHome) perl(Astro::SunTime)
|
||||
# cmake needs the following installed at build time due to the way it auto-detects certain parameters
|
||||
BuildRequires: httpd polkit-devel
|
||||
|
||||
Requires: httpd php php-mysql mariadb-server polkit net-tools
|
||||
Requires: libjpeg-turbo vlc-core libcurl
|
||||
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
||||
Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip)
|
||||
Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP)
|
||||
Requires: perl(LWP::Protocol::https) ffmpeg
|
||||
|
||||
Requires(post): systemd-units systemd-sysv
|
||||
Requires(post): /usr/bin/gpasswd
|
||||
Requires(post): /usr/bin/less
|
||||
Requires(preun): systemd-units
|
||||
Requires(postun): systemd-units
|
||||
|
||||
%description
|
||||
ZoneMinder is a set of applications which is intended to provide a complete
|
||||
solution allowing you to capture, analyse, record and monitor any cameras you
|
||||
have attached to a Linux based machine. It is designed to run on kernels which
|
||||
support the Video For Linux (V4L) interface and has been tested with cameras
|
||||
attached to BTTV cards, various USB cameras and IP network cameras. It is
|
||||
designed to support as many cameras as you can attach to your computer without
|
||||
too much degradation of performance.
|
||||
|
||||
%prep
|
||||
%setup -q -n ZoneMinder-%{version}
|
||||
|
||||
# Change the following default values
|
||||
./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin-zm/nph-zms
|
||||
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
|
||||
./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm
|
||||
./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload
|
||||
./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes
|
||||
./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no
|
||||
./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no
|
||||
|
||||
%build
|
||||
%cmake \
|
||||
-DZM_TARGET_DISTRO="el7" \
|
||||
-DZM_PERL_SUBPREFIX=`x="%{perl_vendorlib}" ; echo ${x#"%{_prefix}"}` \
|
||||
.
|
||||
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
export DESTDIR=%{buildroot}
|
||||
make install
|
||||
|
||||
%post
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Allow zoneminder access to local video sources, serial ports, and x10
|
||||
/usr/bin/gpasswd -a %{zmuid_final} video
|
||||
/usr/bin/gpasswd -a %{zmuid_final} dialout
|
||||
|
||||
# Create and load zoneminder selinux policy module
|
||||
echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wait.\n"
|
||||
/usr/bin/checkmodule -M -m -o %{_docdir}/%{name}-%{version}/local_zoneminder.mod %{_docdir}/%{name}-%{version}/local_zoneminder.te > /dev/null
|
||||
/usr/bin/semodule_package -o %{_docdir}/%{name}-%{version}/local_zoneminder.pp -m %{_docdir}/%{name}-%{version}/local_zoneminder.mod > /dev/null
|
||||
/usr/sbin/semodule -i %{_docdir}/%{name}-%{version}/local_zoneminder.pp > /dev/null
|
||||
|
||||
# Upgrade from a previous version of zoneminder
|
||||
if [ $1 -eq 2 ] ; then
|
||||
# Run zmupdate non-interactively
|
||||
/usr/bin/zmupdate.pl --nointeractive
|
||||
fi
|
||||
|
||||
# Display the README for post installation instructions
|
||||
/usr/bin/less %{_docdir}/%{name}-%{version}/README.Centos7
|
||||
|
||||
%preun
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
/bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || :
|
||||
/bin/systemctl stop zoneminder.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%triggerun -- zoneminder < 1.25.0-4
|
||||
# Save the current service runlevel info
|
||||
# User must manually run systemd-sysv-convert --apply zoneminder
|
||||
# to migrate them to systemd targets
|
||||
/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||:
|
||||
|
||||
# Run these because the SysV package being removed won't do them
|
||||
/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || :
|
||||
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc AUTHORS COPYING README.md distros/redhat/README.Centos7 distros/redhat/jscalendar-doc
|
||||
%config %attr(640,root,%{zmgid_final}) /etc/zm/zm.conf
|
||||
%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf
|
||||
%config(noreplace) /etc/tmpfiles.d/zoneminder.conf
|
||||
%config(noreplace) /etc/logrotate.d/zoneminder
|
||||
|
||||
%{_unitdir}/zoneminder.service
|
||||
|
||||
%{_bindir}/zma
|
||||
%{_bindir}/zmaudit.pl
|
||||
%{_bindir}/zmc
|
||||
%{_bindir}/zmcontrol.pl
|
||||
%{_bindir}/zmdc.pl
|
||||
%{_bindir}/zmf
|
||||
%{_bindir}/zmfilter.pl
|
||||
%{_bindir}/zmpkg.pl
|
||||
%{_bindir}/zmstreamer
|
||||
%{_bindir}/zmtrack.pl
|
||||
%{_bindir}/zmtrigger.pl
|
||||
%{_bindir}/zmu
|
||||
%{_bindir}/zmupdate.pl
|
||||
%{_bindir}/zmvideo.pl
|
||||
%{_bindir}/zmwatch.pl
|
||||
%{_bindir}/zmcamtool.pl
|
||||
%{_bindir}/zmsystemctl.pl
|
||||
%{_bindir}/zmx10.pl
|
||||
|
||||
%{perl_vendorlib}/ZoneMinder*
|
||||
%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder*
|
||||
#%{perl_archlib}/ZoneMinder*
|
||||
%{_mandir}/man*/*
|
||||
%dir %{_libexecdir}/zoneminder
|
||||
%{_libexecdir}/zoneminder/cgi-bin
|
||||
%dir %{_datadir}/zoneminder
|
||||
%{_datadir}/zoneminder/db
|
||||
%{_datadir}/zoneminder/www
|
||||
|
||||
%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy
|
||||
%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules
|
||||
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload
|
||||
%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder
|
||||
|
||||
|
||||
%changelog
|
||||
* Sun Feb 8 2015 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.1
|
||||
- Initial release for CentOS 7.
|
||||
|
||||
* Sun Oct 5 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.28.0
|
||||
- Bump version for 1.28.0 release.
|
||||
|
||||
* Fri Mar 14 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Tweak build requirements for cmake
|
||||
|
||||
* Sat Feb 01 2014 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.27
|
||||
- Add zmcamtool.pl. Bump version for 1.27 release.
|
||||
|
||||
* Mon Dec 16 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.5
|
||||
- This is a bug fixe release
|
||||
- RTSP fixes, cmake enhancements, couple other misc fixes
|
||||
|
||||
* Mon Oct 07 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Initial cmake build.
|
||||
|
||||
* Sat Oct 05 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.4
|
||||
- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch
|
||||
- All files are now part of the zoneminder source tree. Update specfile accordingly.
|
||||
|
||||
* Sat Sep 21 2013 Andrew Bauer <knnniggett@users.sourceforge.net> - 1.26.3
|
||||
- Initial rebuild for ZoneMinder 1.26.3 release.
|
||||
|
||||
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
||||
|
||||
* Mon Jan 21 2013 Adam Tkac <atkac redhat com> - 1.25.0-12
|
||||
- rebuild due to "jpeg8-ABI" feature drop
|
||||
|
||||
* Mon Jan 7 2013 Remi Collet <rcollet@redhat.com> - 1.25.0-11
|
||||
- fix configuration file for httpd 2.4, #871502
|
||||
|
||||
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 1.25.0-10
|
||||
- rebuild against new libjpeg
|
||||
|
||||
* Thu Aug 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-9
|
||||
- Add patch to work around v4l2 api breakage in 3.5 kernel.
|
||||
|
||||
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.25.0-8
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
||||
|
||||
* Sat Jun 23 2012 Petr Pisar <ppisar@redhat.com> - 1.25.0-7
|
||||
- Perl 5.16 rebuild
|
||||
|
||||
* Wed Mar 21 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-6
|
||||
- Fix stupid thinko in sql modifications.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-5
|
||||
- Clean up macro usage.
|
||||
|
||||
* Sat Feb 25 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-4
|
||||
- Convert to systemd.
|
||||
- Add tmpfiles.d configuration since the initscript isn't around to create
|
||||
/run/zoneminder.
|
||||
- Remove some pointless executable permissions.
|
||||
- Add logrotate file.
|
||||
|
||||
* Wed Feb 22 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-3
|
||||
- Update README.Fedora to reference systemctl and mention timezone info in
|
||||
php.ini.
|
||||
- Add proper default for EYEZM_LOG_TO_FILE.
|
||||
|
||||
|
||||
* Thu Feb 09 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-2
|
||||
- Rebuild for new pcre.
|
||||
|
||||
* Thu Jan 19 2012 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.25.0-1
|
||||
- Update to 1.25.0
|
||||
- Fix gcc4.7 build problems.
|
||||
- Drop gcc4.4 build fixes; for whatever reason they now break the build.
|
||||
- Clean up old patches.
|
||||
- Force setting of ZM_TMPDIR and ZM_RUNDIR.
|
||||
|
||||
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.4-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-3
|
||||
- Re-add the dist-tag that somehow got lost.
|
||||
|
||||
* Thu Sep 15 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-2
|
||||
- Add patch for bug 711780 - fix syntax issue in Mapped.pm.
|
||||
- Undo that patch, and undo another which was the cause of the whole mess.
|
||||
- Fix up other patches so ZM_PATH_BUILD is both defined and useful.
|
||||
- Make sure database creation mods actually take.
|
||||
- Update Fedora-specific docs with some additional info.
|
||||
- Use bundled mootools (javascript, so no guideline violation).
|
||||
- Update download location.
|
||||
- Update the gcrypt patch to actually work.
|
||||
- Upstream changed the tarball without changing the version to patch a
|
||||
vulnerability, so redownload.
|
||||
|
||||
* Sun Aug 14 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.4-1
|
||||
- Initial attempt to upgrade to 1.24.4.
|
||||
- Add patch from BZ 460310 to build against libgcrypt instead of requiring the
|
||||
gnutls openssl libs.
|
||||
|
||||
* Thu Jul 21 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-7.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Wed Jul 20 2011 Petr Sabata <contyk@redhat.com> - 1.24.3-6.20110324svn3310
|
||||
- Perl mass rebuild
|
||||
|
||||
* Mon May 09 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-5.20110324svn3310
|
||||
- Bump for gnutls update.
|
||||
|
||||
* Thu Mar 24 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-4.20110324svn3310
|
||||
- Update to latest 1.24.3 subversion. Turns out that what upstream was calling
|
||||
1.24.3 is really just an occasionally updated devel snapshot.
|
||||
- Rebase various patches.
|
||||
|
||||
* Wed Mar 23 2011 Dan Horák <dan@danny.cz> - 1.24.3-3
|
||||
- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient)
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.3-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
* Tue Jan 25 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.3-1
|
||||
- Update to latest upstream version.
|
||||
- Rebase patches.
|
||||
- Initial incomplete attempt to disable v4l1 support.
|
||||
|
||||
* Fri Jan 21 2011 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-6
|
||||
- Unbundle cambozola; instead link to the separately pacakged copy.
|
||||
- Remove BuildRoot:, %%clean and buildroot cleaning in %%install.
|
||||
- Git rid of mixed space/tab usage by removing all tabs.
|
||||
- Remove unnecessary Conflicts: line.
|
||||
- Attempt to force short_open_tag on for the code directories.
|
||||
- Move default location of sockets, swaps, logfiles and some temporary files to
|
||||
make more sense and allow things to work better with a future selinux policy.
|
||||
- Fix errors in README.Fedora.
|
||||
|
||||
* Wed Jun 02 2010 Marcela Maslanova <mmaslano@redhat.com> - 1.24.2-5
|
||||
- Mass rebuild with perl-5.12.0
|
||||
|
||||
* Fri Dec 4 2009 Stepan Kasal <skasal@redhat.com> - 1.24.2-4
|
||||
- rebuild against perl 5.10.1
|
||||
- use Perl vendorarch and archlib variables correctly
|
||||
|
||||
* Mon Jul 27 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.24.2-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-2
|
||||
- Bump release since 1.24.2-1 was mistakenly tagged a few months ago.
|
||||
|
||||
* Wed Jul 22 2009 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.24.2-1
|
||||
- Initial update to 1.24.2.
|
||||
- Rebase patches.
|
||||
- Update mootools download location.
|
||||
- Update to mootools 1.2.3.
|
||||
- Add additional dependencies for some optional features.
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-3
|
||||
- Remove unused Sys::Mmap perl dependency RPM is finding
|
||||
|
||||
* Sat Apr 11 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-2
|
||||
- Update gcc44 patch to disable -frepo, seems to be broken with gcc44
|
||||
- Added noffmpeg patch to make building outside mock easier
|
||||
|
||||
* Sat Mar 21 2009 Martin Ebourne <martin@zepler.org> - 1.24.1-1
|
||||
- Patch for gcc 4.4 compilation errors
|
||||
- Upgrade to 1.24.1
|
||||
|
||||
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.23.3-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
||||
|
||||
* Sat Jan 24 2009 Caolán McNamara <caolanm@redhat.com> - 1.23.3-3
|
||||
- rebuild for dependencies
|
||||
|
||||
* Mon Dec 15 2008 Martin Ebourne <martin@zepler.org> - 1.23.3-2
|
||||
- Fix permissions on zm.conf
|
||||
|
||||
* Fri Jul 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.23.3-1
|
||||
- Initial attempt at packaging 1.23.
|
||||
|
||||
* Tue Jul 1 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-15
|
||||
- Add perl module compat dependency, bz #453590
|
||||
|
||||
* Tue May 6 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-14
|
||||
- Remove default runlevel, bz #441315
|
||||
|
||||
* Mon Apr 28 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.22.3-13
|
||||
- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3.
|
||||
|
||||
* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 1.22.3-12
|
||||
- Autorebuild for GCC 4.3
|
||||
|
||||
* Thu Jan 3 2008 Martin Ebourne <martin@zepler.org> - 1.22.3-11
|
||||
- Fix compilation on gcc 4.3
|
||||
|
||||
* Thu Dec 6 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-10
|
||||
- Rebuild for new openssl
|
||||
|
||||
* Thu Aug 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-8
|
||||
- Fix licence tag
|
||||
|
||||
* Thu Jul 12 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-7
|
||||
- Fixes from testing by Jitz including missing dependencies and database creation
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-6
|
||||
- Disable crashtrace on ppc
|
||||
|
||||
* Sat Jun 30 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-5
|
||||
- Fix uid for directories in /var/lib/zoneminder
|
||||
|
||||
* Tue Jun 26 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-4
|
||||
- Added perl Archive::Tar dependency
|
||||
- Disabled web interface due to lack of access control on the event images
|
||||
|
||||
* Sun Jun 10 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-3
|
||||
- Changes recommended in review by Jason Tibbitts
|
||||
|
||||
* Mon Apr 2 2007 Martin Ebourne <martin@zepler.org> - 1.22.3-2
|
||||
- Standardised on package name of zoneminder
|
||||
|
||||
* Thu Dec 28 2006 Martin Ebourne <martin@zepler.org> - 1.22.3-1
|
||||
- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin
|
|
@ -0,0 +1,18 @@
|
|||
# ZoneMinder systemd unit file for CentOS 7
|
||||
|
||||
[Unit]
|
||||
Description=ZoneMinder CCTV recording and security system
|
||||
After=network.target mariadb.service httpd.service
|
||||
Requires=mariadb.service httpd.service
|
||||
|
||||
[Service]
|
||||
User=@WEB_USER@
|
||||
Type=forking
|
||||
ExecStart=@BINDIR@/zmpkg.pl start
|
||||
ExecReload=@BINDIR@/zmpkg.pl restart
|
||||
ExecStop=@BINDIR@/zmpkg.pl stop
|
||||
PIDFile="@ZM_RUNDIR@/zm.pid"
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -0,0 +1 @@
|
|||
d /run/zoneminder 0755 apache apache
|
|
@ -7,6 +7,7 @@ configure_file(syslog.conf.in "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" @ONLY)
|
|||
configure_file(com.zoneminder.systemctl.policy.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.policy" @ONLY)
|
||||
configure_file(com.zoneminder.systemctl.rules.in "${CMAKE_CURRENT_BINARY_DIR}/com.zoneminder.systemctl.rules" @ONLY)
|
||||
configure_file(zoneminder.service.in "${CMAKE_CURRENT_BINARY_DIR}/zoneminder.service" @ONLY)
|
||||
configure_file(zoneminder-tmpfiles.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zoneminder-tmpfiles.conf" @ONLY)
|
||||
|
||||
# Do not install the misc files by default
|
||||
#install(FILES "${CMAKE_CURRENT_BINARY_DIR}/apache.conf" "${CMAKE_CURRENT_BINARY_DIR}/logrotate.conf" "${CMAKE_CURRENT_BINARY_DIR}/syslog.conf" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/misc")
|
||||
|
|
|
@ -4,6 +4,7 @@ EXTRA_DIST = \
|
|||
apache.conf.in \
|
||||
logrotate.conf.in \
|
||||
syslog.conf.in \
|
||||
zoneminder-tmpfiles.conf.in \
|
||||
zoneminder.service.in \
|
||||
com.zoneminder.systemctl.policy.in \
|
||||
com.zoneminder.systemctl.rules.in \
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
d @ZM_RUNDIR@ 0755 @WEB_USER@ @WEB_GROUP@
|
|
@ -148,9 +148,7 @@ MAIN: while( $loop ) {
|
|||
$db_events->{$event->{Id}} = $event->{Age};
|
||||
}
|
||||
Debug( "Got ".int(keys(%$db_events))." events\n" );
|
||||
$eventSelectSth->finish();
|
||||
}
|
||||
$monitorSelectSth->finish();
|
||||
|
||||
my $fs_monitors;
|
||||
foreach my $monitor ( <[0-9]*> )
|
||||
|
@ -332,7 +330,6 @@ MAIN: while( $loop ) {
|
|||
$cleaned = 1;
|
||||
}
|
||||
}
|
||||
$selectOrphanedEventsSth->finish();
|
||||
redo MAIN if ( $cleaned );
|
||||
|
||||
# Remove empty events (with no frames)
|
||||
|
@ -349,7 +346,6 @@ MAIN: while( $loop ) {
|
|||
$cleaned = 1;
|
||||
}
|
||||
}
|
||||
$selectEmptyEventsSth->finish();
|
||||
redo MAIN if ( $cleaned );
|
||||
|
||||
# Remove orphaned frame records
|
||||
|
@ -366,7 +362,6 @@ MAIN: while( $loop ) {
|
|||
$cleaned = 1;
|
||||
}
|
||||
}
|
||||
$selectOrphanedFramesSth->finish();
|
||||
redo MAIN if ( $cleaned );
|
||||
|
||||
# Remove orphaned stats records
|
||||
|
@ -383,7 +378,6 @@ MAIN: while( $loop ) {
|
|||
$cleaned = 1;
|
||||
}
|
||||
}
|
||||
$selectOrphanedStatsSth->finish();
|
||||
redo MAIN if ( $cleaned );
|
||||
|
||||
# New audit to close any events that were left open for longer than MIN_AGE seconds
|
||||
|
@ -400,7 +394,6 @@ MAIN: while( $loop ) {
|
|||
$res = $updateUnclosedEventsSth->execute( sprintf( "%s%d%s", $event->{Prefix}, $event->{Id}, RECOVER_TAG ), $event->{EndTime}, $event->{Length}, $event->{Frames}, $event->{AlarmFrames}, $event->{TotScore}, $event->{AlarmFrames}?int($event->{TotScore}/$event->{AlarmFrames}):0, $event->{MaxScore}, RECOVER_TEXT, $event->{Id} ) or Fatal( "Can't execute: ".$updateUnclosedEventsSth->errstr() );
|
||||
}
|
||||
}
|
||||
$selectUnclosedEventsSth->finish();
|
||||
|
||||
# Now delete any old image files
|
||||
if ( my @old_files = grep { -M > $max_image_age } <$image_path/*.{jpg,gif,wbmp}> )
|
||||
|
@ -426,7 +419,6 @@ MAIN: while( $loop ) {
|
|||
$res = $selectLogRowCountSth->execute() or Fatal( "Can't execute: ".$selectLogRowCountSth->errstr() );
|
||||
my $row = $selectLogRowCountSth->fetchrow_hashref();
|
||||
my $logRows = $row->{Rows};
|
||||
$selectLogRowCountSth->finish();
|
||||
if ( $logRows > $Config{ZM_LOG_DATABASE_LIMIT} )
|
||||
{
|
||||
my $deleteLogByRowsSql = "delete low_priority from Logs order by TimeKey asc limit ?";
|
||||
|
|
|
@ -196,10 +196,11 @@ my $last_action = 0;
|
|||
|
||||
while( 1 )
|
||||
{
|
||||
if ( (time() - $last_action) > $Config{ZM_FILTER_RELOAD_DELAY} )
|
||||
my $now = time;
|
||||
if ( ($now - $last_action) > $Config{ZM_FILTER_RELOAD_DELAY} )
|
||||
{
|
||||
Debug( "Reloading filters\n" );
|
||||
$last_action = time();
|
||||
$last_action = $now;
|
||||
$filters = getFilters( $filter_parm );
|
||||
}
|
||||
|
||||
|
@ -632,7 +633,7 @@ sub checkFilter
|
|||
{
|
||||
if ( $delete_ok )
|
||||
{
|
||||
Info( "Deleting event $event->{Id}\n" );
|
||||
Info( "Deleting event $event->{Id} from Monitor $event->{MonitorId}\n" );
|
||||
# Do it individually to avoid locking up the table for new events
|
||||
my $sql = "delete from Events where Id = ?";
|
||||
my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() );
|
||||
|
|
|
@ -1122,6 +1122,7 @@ uint32_t LocalCamera::AutoSelectFormat(int p_colours) {
|
|||
memset(&fmtinfo, 0, sizeof(fmtinfo));
|
||||
fmtinfo.index = nIndex;
|
||||
fmtinfo.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
|
||||
// FIXME This will crash if there are more than 64 formats.
|
||||
while(vidioctl( enum_fd, VIDIOC_ENUM_FMT, &fmtinfo ) >= 0) {
|
||||
/* Got a format. Copy it to the array */
|
||||
strcpy(fmt_desc[nIndex], (const char*)(fmtinfo.description));
|
||||
|
@ -1137,7 +1138,7 @@ uint32_t LocalCamera::AutoSelectFormat(int p_colours) {
|
|||
|
||||
/* Select format */
|
||||
int nIndexUsed = -1;
|
||||
int n_preferedformats = 0;
|
||||
unsigned int n_preferedformats = 0;
|
||||
const uint32_t* preferedformats;
|
||||
if(p_colours == ZM_COLOUR_RGB32) {
|
||||
/* 32bit */
|
||||
|
@ -1152,12 +1153,15 @@ uint32_t LocalCamera::AutoSelectFormat(int p_colours) {
|
|||
preferedformats = prefered_rgb24_formats;
|
||||
n_preferedformats = sizeof(prefered_rgb24_formats) / sizeof(uint32_t);
|
||||
}
|
||||
for( unsigned int i=0; i < (unsigned int)n_preferedformats && nIndexUsed < 0; i++ ) {
|
||||
for( unsigned int i=0; i < n_preferedformats && nIndexUsed < 0; i++ ) {
|
||||
for( unsigned int j=0; j < nIndex; j++ ) {
|
||||
if( preferedformats[i] == fmt_fcc[j] ) {
|
||||
Debug(6, "Choosing format: %s (%c%c%c%c) at index %d",fmt_desc[j],fmt_fcc[j]&0xff, (fmt_fcc[j]>>8)&0xff, (fmt_fcc[j]>>16)&0xff, (fmt_fcc[j]>>24)&0xff ,j);
|
||||
/* Found a format! */
|
||||
nIndexUsed = j;
|
||||
break;
|
||||
} else {
|
||||
Debug(6, "No match for format: %s (%c%c%c%c) at index %d",fmt_desc[j],fmt_fcc[j]&0xff, (fmt_fcc[j]>>8)&0xff, (fmt_fcc[j]>>16)&0xff, (fmt_fcc[j]>>24)&0xff ,j);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4088,38 +4088,38 @@ void MonitorStream::runStream()
|
|||
temp_read_index = temp_image_buffer_count;
|
||||
temp_write_index = temp_image_buffer_count;
|
||||
|
||||
char swap_path[PATH_MAX] = "";
|
||||
char *swap_path = 0;
|
||||
bool buffered_playback = false;
|
||||
int swap_path_length = strlen(config.path_swap)+1; // +1 for NULL terminator
|
||||
|
||||
if ( connkey && playback_buffer > 0 )
|
||||
{
|
||||
Debug( 2, "Checking swap image location" );
|
||||
Debug( 3, "Checking swap image path" );
|
||||
strncpy( swap_path, config.path_swap, sizeof(swap_path) );
|
||||
if ( checkSwapPath( swap_path, false ) )
|
||||
{
|
||||
snprintf( &(swap_path[strlen(swap_path)]), sizeof(swap_path)-strlen(swap_path), "/zmswap-m%d", monitor->Id() );
|
||||
if ( checkSwapPath( swap_path, true ) )
|
||||
{
|
||||
snprintf( &(swap_path[strlen(swap_path)]), sizeof(swap_path)-strlen(swap_path), "/zmswap-q%06d", connkey );
|
||||
if ( checkSwapPath( swap_path, true ) )
|
||||
{
|
||||
buffered_playback = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ( connkey && playback_buffer > 0 ) {
|
||||
|
||||
if ( !buffered_playback )
|
||||
{
|
||||
Error( "Unable to validate swap image path, disabling buffered playback" );
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug( 2, "Assigning temporary buffer" );
|
||||
temp_image_buffer = new SwapImage[temp_image_buffer_count];
|
||||
memset( temp_image_buffer, 0, sizeof(*temp_image_buffer)*temp_image_buffer_count );
|
||||
Debug( 2, "Assigned temporary buffer" );
|
||||
}
|
||||
if ( swap_path_length + 15 > PATH_MAX ) {
|
||||
// 15 is for /zmswap-whatever, assuming max 6 digits for monitor id
|
||||
Error( "Swap Path is too long. %d > %d ", swap_path_length+15, PATH_MAX );
|
||||
} else {
|
||||
swap_path = (char *)malloc( swap_path_length+15 );
|
||||
Debug( 3, "Checking swap image path %s", config.path_swap );
|
||||
strncpy( swap_path, config.path_swap, swap_path_length );
|
||||
if ( checkSwapPath( swap_path, false ) ) {
|
||||
snprintf( &(swap_path[swap_path_length]), sizeof(swap_path)-swap_path_length, "/zmswap-m%d", monitor->Id() );
|
||||
if ( checkSwapPath( swap_path, true ) ) {
|
||||
snprintf( &(swap_path[swap_path_length]), sizeof(swap_path)-swap_path_length, "/zmswap-q%06d", connkey );
|
||||
if ( checkSwapPath( swap_path, true ) ) {
|
||||
buffered_playback = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( !buffered_playback ) {
|
||||
Error( "Unable to validate swap image path, disabling buffered playback" );
|
||||
} else {
|
||||
Debug( 2, "Assigning temporary buffer" );
|
||||
temp_image_buffer = new SwapImage[temp_image_buffer_count];
|
||||
memset( temp_image_buffer, 0, sizeof(*temp_image_buffer)*temp_image_buffer_count );
|
||||
Debug( 2, "Assigned temporary buffer" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float max_secs_since_last_sent_frame = 10.0; //should be > keep alive amount (5 secs)
|
||||
|
@ -4357,6 +4357,7 @@ void MonitorStream::runStream()
|
|||
}
|
||||
}
|
||||
}
|
||||
if ( swap_path ) free( swap_path );
|
||||
closeComms();
|
||||
}
|
||||
|
||||
|
|
|
@ -391,6 +391,9 @@ void VideoStream::OpenStream( )
|
|||
// TODO: Make buffer dynamic.
|
||||
video_outbuf_size = 4000000;
|
||||
video_outbuf = (uint8_t *)malloc( video_outbuf_size );
|
||||
if ( video_outbuf == NULL ) {
|
||||
Fatal("Unable to malloc memory for outbuf");
|
||||
}
|
||||
}
|
||||
|
||||
#if LIBAVFORMAT_VERSION_INT >= AV_VERSION_INT(52, 100, 1)
|
||||
|
@ -419,6 +422,7 @@ VideoStream::VideoStream( const char *in_filename, const char *in_format, int bi
|
|||
do_streaming(true),
|
||||
buffer_copy(NULL),
|
||||
buffer_copy_lock(new pthread_mutex_t),
|
||||
buffer_copy_size(0),
|
||||
buffer_copy_used(0),
|
||||
packet_index(0)
|
||||
{
|
||||
|
|
|
@ -217,7 +217,7 @@ int RemoteCameraHttp::ReadData( Buffer &buffer, int bytes_expected )
|
|||
}
|
||||
while ( total_bytes_to_read );
|
||||
|
||||
Debug( 3, buffer );
|
||||
Debug( 4, buffer );
|
||||
|
||||
return( total_bytes_read );
|
||||
}
|
||||
|
@ -446,6 +446,13 @@ int RemoteCameraHttp::GetResponse()
|
|||
}
|
||||
case CONTENT :
|
||||
{
|
||||
|
||||
// if content_type is something like image/jpeg;size=, this will strip the ;size=
|
||||
char * semicolon = strchr( (char *)content_type, ';' );
|
||||
if ( semicolon ) {
|
||||
*semicolon = '\0';
|
||||
}
|
||||
|
||||
if ( !strcasecmp( content_type, "image/jpeg" ) || !strcasecmp( content_type, "image/jpg" ) )
|
||||
{
|
||||
format = JPEG;
|
||||
|
@ -1010,7 +1017,14 @@ int RemoteCameraHttp::GetResponse()
|
|||
}
|
||||
case CONTENT :
|
||||
{
|
||||
if ( !strcasecmp( content_type, "image/jpeg" ) || !strcasecmp( content_type, "image/jpg" ) )
|
||||
|
||||
// if content_type is something like image/jpeg;size=, this will strip the ;size=
|
||||
char * semicolon = strchr( content_type, ';' );
|
||||
if ( semicolon ) {
|
||||
*semicolon = '\0';
|
||||
}
|
||||
|
||||
if ( !strcasecmp( content_type, "image/jpeg" ) || !strcasecmp( content_type, "image/jpg" ) )
|
||||
{
|
||||
format = JPEG;
|
||||
}
|
||||
|
|
|
@ -298,35 +298,42 @@ int RtpCtrlThread::run()
|
|||
sendReports = true;
|
||||
}
|
||||
|
||||
// The only reason I can think of why we would have a timeout period is so that we can regularly send RR packets.
|
||||
// Why 10 seconds? If anything I think this should be whatever timeout value was given in the DESCRIBE response
|
||||
Select select( 10 );
|
||||
select.addReader( &rtpCtrlServer );
|
||||
|
||||
unsigned char buffer[ZM_NETWORK_BUFSIZ];
|
||||
|
||||
time_t last_receive = time(NULL);
|
||||
bool timeout = false; // used as a flag that we had a timeout, and then sent an RR to see if we wake back up. Real timeout will happen when this is true.
|
||||
|
||||
while ( !mStop && select.wait() >= 0 )
|
||||
{
|
||||
if ( mStop )
|
||||
break;
|
||||
while ( !mStop && select.wait() >= 0 ) {
|
||||
|
||||
time_t now = time(NULL);
|
||||
Select::CommsList readable = select.getReadable();
|
||||
if ( readable.size() == 0 )
|
||||
{
|
||||
if ( ! timeout ) {
|
||||
// With this code here, we will send an SDES and RR packet every 10 seconds
|
||||
ssize_t nBytes;
|
||||
unsigned char *bufferPtr = buffer;
|
||||
bufferPtr += generateRr( bufferPtr, sizeof(buffer)-(bufferPtr-buffer) );
|
||||
bufferPtr += generateSdes( bufferPtr, sizeof(buffer)-(bufferPtr-buffer) );
|
||||
Debug( 4, "Sending %zd bytes on sd %d", bufferPtr-buffer, rtpCtrlServer.getWriteDesc() );
|
||||
Debug( 5, "Sending %s", buffer );
|
||||
Debug( 3, "Preventing timeout by sending %zd bytes on sd %d. Time since last receive: %d", bufferPtr-buffer, rtpCtrlServer.getWriteDesc(), ( now-last_receive) );
|
||||
if ( (nBytes = rtpCtrlServer.send( buffer, bufferPtr-buffer )) < 0 )
|
||||
Error( "Unable to send: %s", strerror( errno ) );
|
||||
timeout = true;
|
||||
continue;
|
||||
} else {
|
||||
Error( "RTCP timed out" );
|
||||
break;
|
||||
//Error( "RTCP timed out" );
|
||||
Debug(1, "RTCP timed out. Time since last receive: %d", ( now-last_receive) );
|
||||
continue;
|
||||
//break;
|
||||
}
|
||||
} else {
|
||||
timeout = false;
|
||||
last_receive = time(NULL);
|
||||
}
|
||||
for ( Select::CommsList::iterator iter = readable.begin(); iter != readable.end(); iter++ )
|
||||
{
|
||||
|
@ -344,14 +351,13 @@ int RtpCtrlThread::run()
|
|||
unsigned char *bufferPtr = buffer;
|
||||
bufferPtr += generateRr( bufferPtr, sizeof(buffer)-(bufferPtr-buffer) );
|
||||
bufferPtr += generateSdes( bufferPtr, sizeof(buffer)-(bufferPtr-buffer) );
|
||||
Debug( 4, "Sending %zd bytes on sd %d", bufferPtr-buffer, rtpCtrlServer.getWriteDesc() );
|
||||
Debug( 3, "Sending %zd bytes on sd %d", bufferPtr-buffer, rtpCtrlServer.getWriteDesc() );
|
||||
if ( (nBytes = rtpCtrlServer.send( buffer, bufferPtr-buffer )) < 0 )
|
||||
Error( "Unable to send: %s", strerror( errno ) );
|
||||
//Debug( 4, "Sent %d bytes on sd %d", nBytes, rtpCtrlServer.getWriteDesc() );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
// Here is another case of not receiving some data causing us to terminate... why? Sometimes there are pauses in the interwebs.
|
||||
mStop = true;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -114,9 +114,10 @@ std::string Authenticator::getAuthHeader(std::string method, std::string uri)
|
|||
if ( ! fQop.empty() ) {
|
||||
result += ", qop=" + fQop;
|
||||
result += ", nc=" + stringtf("%08x",nc);
|
||||
result += ", cnonce=" + fCnonce;
|
||||
result += ", cnonce=\"" + fCnonce + "\"";
|
||||
}
|
||||
result += ", response=\"" + computeDigestResponse(method, uri) + "\"";
|
||||
result += ", algorithm=\"MD5\"";
|
||||
|
||||
//Authorization: Digest username="zm",
|
||||
// realm="NC-336PW-HD-1080P",
|
||||
|
|
|
@ -260,8 +260,7 @@ if ( !empty($action) )
|
|||
$monitor = dbFetchOne( "SELECT * FROM Monitors WHERE Id=?", NULL, array($mid) );
|
||||
|
||||
$newFunction = validStr($_REQUEST['newFunction']);
|
||||
$newEnabled = validStr($_REQUEST['newEnabled']);
|
||||
if ($newEnabled != "1") $newEnabled = "0";
|
||||
$newEnabled = isset( $_REQUEST['newEnabled'] ) and $_REQUEST['newEnabled'] != "1" ? "0" : "1";
|
||||
$oldFunction = $monitor['Function'];
|
||||
$oldEnabled = $monitor['Enabled'];
|
||||
if ( $newFunction != $oldFunction || $newEnabled != $oldEnabled )
|
||||
|
@ -579,9 +578,10 @@ if ( !empty($action) )
|
|||
// well time out before completing, in which case zmaudit will still tidy up
|
||||
if ( !ZM_OPT_FAST_DELETE )
|
||||
{
|
||||
$markEids = dbFetchAll( "select Id from Events where MonitorId=?", 'Id', array($markMid) );
|
||||
// Slight hack, we maybe should load *, but we happen to know that the deleteEvent function uses Id and StartTime.
|
||||
$markEids = dbFetchAll( "SELECT Id,StartTime FROM Events WHERE MonitorId=?", NULL, array($markMid) );
|
||||
foreach( $markEids as $markEid )
|
||||
deleteEvent( $markEid );
|
||||
deleteEvent( $markEid, $markMid );
|
||||
|
||||
deletePath( ZM_DIR_EVENTS."/".basename($monitor['Name']) );
|
||||
deletePath( ZM_DIR_EVENTS."/".$monitor['Id'] ); // I'm trusting the Id.
|
||||
|
|
|
@ -507,42 +507,59 @@ function deletePath( $path )
|
|||
}
|
||||
}
|
||||
|
||||
function deleteEvent( $eid, $mid=false )
|
||||
{
|
||||
function deleteEvent( $event, $mid=false ) {
|
||||
|
||||
if ( empty($event) ) {
|
||||
Error( "Empty event passed to deleteEvent.");
|
||||
return;
|
||||
}
|
||||
|
||||
if ( gettype($event) != 'array' ) {
|
||||
# $event could be an eid, so turn it into an event hash
|
||||
$event = dbFetchOne( 'SELECT Id, MonitorId, StartTime FROM Events WHERE Id=?', NULL, array( $event ) );
|
||||
}
|
||||
|
||||
global $user;
|
||||
|
||||
if ( !$mid )
|
||||
$mid = '*';
|
||||
if ( $user['Events'] == 'Edit' && !empty($eid) )
|
||||
{
|
||||
dbQuery( 'delete from Events where Id = ?', array($eid) );
|
||||
if ( !ZM_OPT_FAST_DELETE )
|
||||
{
|
||||
dbQuery( 'delete from Stats where EventId = ?', array($eid) );
|
||||
dbQuery( 'delete from Frames where EventId = ?', array($eid) );
|
||||
if ( ZM_USE_DEEP_STORAGE )
|
||||
{
|
||||
if ( $id_files = glob( ZM_DIR_EVENTS.'/'.$mid.'/*/*/*/.'.$eid ) )
|
||||
$eventPath = preg_replace( "/\.$eid$/", readlink($id_files[0]), $id_files[0] );
|
||||
$mid = $event['MonitorId'];
|
||||
|
||||
if ( $user['Events'] == 'Edit' ) {
|
||||
|
||||
dbQuery( 'DELETE FROM Events WHERE Id = ?', array($event['Id']) );
|
||||
if ( !ZM_OPT_FAST_DELETE ) {
|
||||
dbQuery( 'DELETE FROM Stats WHERE EventId = ?', array($event['Id']) );
|
||||
dbQuery( 'DELETE FROM Frames WHERE EventId = ?', array($event['Id']) );
|
||||
if ( ZM_USE_DEEP_STORAGE ) {
|
||||
|
||||
# Assumption: All events haev a start time
|
||||
$start_date = date_parse( $event['StartTime'] );
|
||||
$start_date['year'] = $start_date['year'] % 100;
|
||||
|
||||
# So this is because ZM creates a link under teh day pointing to the time that the event happened.
|
||||
$eventlink_path = sprintf('%s/%d/%02d/%02d/%02d/.%d', ZM_DIR_EVENTS, $mid, $start_date['year'], $start_date['month'], $start_date['day'], $event['Id'] );
|
||||
|
||||
if ( $id_files = glob( $eventlink_path ) ) {
|
||||
# I know we are using arrays here, but really there can only ever be 1 in the array
|
||||
$eventPath = preg_replace( '/\.'.$event['Id'].'$/', readlink($id_files[0]), $id_files[0] );
|
||||
deletePath( $eventPath );
|
||||
deletePath( $id_files[0] );
|
||||
$pathParts = explode( '/', $eventPath );
|
||||
for ( $i = count($pathParts)-1; $i >= 2; $i-- ) {
|
||||
$deletePath = join( '/', array_slice( $pathParts, 0, $i ) );
|
||||
if ( !glob( $deletePath."/*" ) ) {
|
||||
deletePath( $deletePath );
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Warning( "Found no event files under $eventlink_path" );
|
||||
} # end if found files
|
||||
} else {
|
||||
$eventPath = implode( '/', array( ZM_DIR_EVENTS, $mid, $event['Id'] ) );
|
||||
deletePath( $eventPath );
|
||||
deletePath( $id_files[0] );
|
||||
$pathParts = explode( '/', $eventPath );
|
||||
for ( $i = count($pathParts)-1; $i >= 2; $i-- )
|
||||
{
|
||||
$deletePath = join( '/', array_slice( $pathParts, 0, $i ) );
|
||||
if ( !glob( $deletePath."/*" ) )
|
||||
{
|
||||
deletePath( $deletePath );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$eventPath = ZM_DIR_EVENTS.'/'.$mid.'/'.$eid;
|
||||
deletePath( $eventPath );
|
||||
}
|
||||
}
|
||||
}
|
||||
} # USE_DEEP_STORAGE OR NOT
|
||||
} # ! ZM_OPT_FAST_DELETE
|
||||
} # CAN EDIT
|
||||
}
|
||||
|
||||
function makeLink( $url, $label, $condition=1, $options="" )
|
||||
|
|
|
@ -212,6 +212,7 @@ $SLANG = array(
|
|||
'CanZoomRel' => 'Can Zoom Relative',
|
||||
'CaptureHeight' => 'Capture Height',
|
||||
'CaptureMethod' => 'Capture Method',
|
||||
'CaptureResolution' => 'Capture Resolution',
|
||||
'CapturePalette' => 'Capture Palette',
|
||||
'CaptureWidth' => 'Capture Width',
|
||||
'Cause' => 'Cause',
|
||||
|
|
|
@ -382,7 +382,6 @@ th.table-th-sort-rev span.table-th-sort-span {
|
|||
font-size:0.8em;
|
||||
}
|
||||
#headerControl {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
|
|
@ -314,6 +314,9 @@ foreach( $displayMonitors as $monitor )
|
|||
<?php } elseif ( $monitor['Type'] == "Libvlc" ) {
|
||||
$domain = parse_url( $monitor['Path'], PHP_URL_HOST );
|
||||
$shortpath = $domain ? $domain : preg_replace( '/^.*\//', '', $monitor['Path'] );
|
||||
if ( $shortpath == '' ) {
|
||||
$shortpath = 'Monitor ' . $monitor['Id'];
|
||||
}
|
||||
?>
|
||||
<td class="colSource"><?php echo makePopupLink( '?view=monitor&mid='.$monitor['Id'], 'zmMonitor'.$monitor['Id'], 'monitor', '<span class="'.$dclass.'">'.$shortpath.'</span>', canEdit( 'Monitors' ) ) ?></td>
|
||||
<?php } elseif ( $monitor['Type'] == "cURL" ) { ?>
|
||||
|
|
|
@ -113,7 +113,7 @@ function Monitor( index, id, connKey )
|
|||
|
||||
function selectLayout( element )
|
||||
{
|
||||
var cssFile = skinPath+'/views/css/'+$(element).get('value');
|
||||
var cssFile = skinPath+'/css/'+Cookie.read('zmCSS')+'/views/'+$(element).get('value');
|
||||
if ( $('dynamicStyles') )
|
||||
$('dynamicStyles').destroy();
|
||||
new Asset.css( cssFile, { id: 'dynamicStyles' } );
|
||||
|
|
|
@ -98,8 +98,8 @@ if ( $showControl )
|
|||
</div>
|
||||
<h2><?php echo $SLANG['Montage'] ?></h2>
|
||||
<div id="headerControl">
|
||||
<span id="scaleControl"><?php echo $SLANG['Scale'] ?>: <?php echo buildSelect( "scale", $scales, "changeScale( this );" ); ?></span>
|
||||
<label for="layout"><?php echo $SLANG['Layout'] ?>:</label><?php echo buildSelect( "layout", $layouts, 'selectLayout( this )' )?>
|
||||
<span id="scaleControl"><?php echo $SLANG['Scale'] ?>: <?php echo buildSelect( 'scale', $scales, 'changeScale(this);' ); ?></span>
|
||||
<label for="layout"><?php echo $SLANG['Layout'] ?>:</label><?php echo buildSelect( 'layout', $layouts, 'selectLayout(this);' )?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="content">
|
||||
|
|
Loading…
Reference in New Issue