diff --git a/.gitignore b/.gitignore index fa066279c..bd66e684a 100644 --- a/.gitignore +++ b/.gitignore @@ -63,7 +63,6 @@ src/zma src/zmc src/zmf src/zms -src/zmstreamer src/zmu web/includes/config.php zm.conf diff --git a/.travis.yml b/.travis.yml index d44973e2e..183d22e57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: cpp +sudo: required +dist: trusty notifications: irc: "chat.freenode.net#zoneminder-dev" branches: @@ -17,14 +19,14 @@ env: - CXXFLAGS="$CFLAGS" matrix: - ZM_BUILDMETHOD=cmake - - ZM_BUILDMETHOD=autotools compiler: - gcc + - clang before_install: - sudo apt-get update -qq - - sudo apt-get install -y -qq libpolkit-gobject-1-dev zlib1g-dev apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf cmake libjpeg-turbo8-dev apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev libvlccore-dev libvlc-dev libvlccore5 libvlc5 2>&1 > /dev/null + - sudo apt-get install -y -qq libpolkit-gobject-1-dev zlib1g-dev apache2 mysql-server php5 php5-mysql build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf cmake libjpeg-turbo8-dev apache2-mpm-prefork libapache2-mod-php5 php5-cli libtheora-dev libvorbis-dev libvpx-dev libx264-dev libvlccore-dev libvlc-dev 2>&1 > /dev/null install: - - git clone -b n2.8.1 --depth=1 git://source.ffmpeg.org/ffmpeg.git + - git clone -b n3.0 --depth=1 git://source.ffmpeg.org/ffmpeg.git - cd ffmpeg - ./configure --enable-shared --enable-swscale --enable-gpl --enable-libx264 --enable-libvpx --enable-libvorbis --enable-libtheora - make -j `grep processor /proc/cpuinfo|wc -l` @@ -32,16 +34,10 @@ install: - sudo make install-libs before_script: - cd $TRAVIS_BUILD_DIR - - if [ "$ZM_BUILDMETHOD" = "autotools" ]; then libtoolize -v --force; fi - - if [ "$ZM_BUILDMETHOD" = "autotools" ]; then aclocal -I m4; fi - - if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoheader; fi - - if [ "$ZM_BUILDMETHOD" = "autotools" ]; then automake --force-missing --add-missing; fi - - if [ "$ZM_BUILDMETHOD" = "autotools" ]; then autoconf; fi - mysql -uroot -e "CREATE DATABASE IF NOT EXISTS zm" - mysql -uroot -e "GRANT ALL ON zm.* TO 'zmuser'@'localhost' IDENTIFIED BY 'zmpass'"; - mysql -uroot -e "FLUSH PRIVILEGES" script: - - if [ "$ZM_BUILDMETHOD" = "autotools" ]; then ./configure --prefix=/usr --with-libarch=lib/$DEB_HOST_GNU_TYPE --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-ffmpeg=/usr --with-webdir=/usr/share/zoneminder/www --with-cgidir=/usr/libexec/zoneminder/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=yes --disable-debug --enable-mmap=yes ZM_SSL_LIB=openssl; fi - if [ "$ZM_BUILDMETHOD" = "cmake" ]; then cmake -DCMAKE_INSTALL_PREFIX="/usr"; fi - make - sudo make install diff --git a/CMakeLists.txt b/CMakeLists.txt index b2014e1c1..dc301dfb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ # cmake_minimum_required (VERSION 2.6) project (zoneminder) -set(zoneminder_VERSION "1.29.0") +set(zoneminder_VERSION "1.29.1") # make API version a minor of ZM version set(zoneminder_API_VERSION "${zoneminder_VERSION}.1") @@ -182,7 +182,7 @@ elseif(ZM_TARGET_DISTRO STREQUAL "OS13") set(ZM_WEB_GROUP "www") set(ZM_WEBDIR "/srv/www/htdocs/zoneminder") set(ZM_CGIDIR "/srv/www/cgi-bin") -elseif(ZM_TARGET_DISTRO STREQUAL "freeBSD") +elseif(ZM_TARGET_DISTRO STREQUAL "FreeBSD") set(ZM_RUNDIR "/var/run/zm") set(ZM_SOCKDIR "/var/run/zm") set(ZM_TMPDIR "/var/tmp/zm") diff --git a/Makefile.am b/Makefile.am deleted file mode 100644 index 62f767e75..000000000 --- a/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -AUTOMAKE_OPTIONS = foreign -ACLOCAL_AMFLAGS = -I m4 - -# And these to the user and group of your webserver -webuser = @WEB_USER@ -webgroup = @WEB_GROUP@ -zmconfigdir = @ZM_CONFIG_DIR@ - -zmconfig_DATA = \ - zm.conf - -if COND_ONVIF - MAYBE_ONVIF = onvif -endif - -SUBDIRS = \ - src \ - web \ - scripts \ - db \ - misc \ - $(MAYBE_ONVIF) - -EXTRA_DIST = \ - zm.conf.in \ - zmconfgen.pl.in - -# Yes, you are correct. This is a HACK! -install-data-hook: - ( cd $(DESTDIR)$(zmconfigdir); chown $(webuser):$(webgroup) $(zmconfig_DATA); chmod 600 $(zmconfig_DATA) ) - ( if ! test -e $(DESTDIR)$(ZM_RUNDIR); then mkdir -p $(DESTDIR)$(ZM_RUNDIR); fi; if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_RUNDIR); chmod u+w $(DESTDIR)$(ZM_RUNDIR); fi ) - ( if ! test -e $(DESTDIR)$(ZM_SOCKDIR); then mkdir -p $(DESTDIR)$(ZM_SOCKDIR); fi; if test "$(DESTDIR)$(ZM_SOCKDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_SOCKDIR); chmod u+w $(DESTDIR)$(ZM_SOCKDIR); fi ) - ( if ! test -e $(DESTDIR)$(ZM_TMPDIR); then mkdir -m 700 -p $(DESTDIR)$(ZM_TMPDIR); fi; if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp" && test "$(DESTDIR)$(ZM_TMPDIR)" != "/var/tmp"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_TMPDIR); chmod u+w $(DESTDIR)$(ZM_TMPDIR); fi ) - -uninstall-hook: - @-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp ) - @-( if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then rm -rf $(DESTDIR)$(ZM_RUNDIR); fi ) - @-( if test "$(DESTDIR)$(ZM_SOCKDIR)" != "/var/run"; then rm -rf $(DESTDIR)$(ZM_SOCKDIR); fi ) - @-( if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp" && test "$(DESTDIR)$(ZM_TMPDIR)" != "/var/tmp"; then rm -rf $(DESTDIR)$(ZM_TMPDIR); fi ) - @-( if test "$(DESTDIR)$(ZM_LOGDIR)" != "/var/log"; then rm -rf $(DESTDIR)$(ZM_LOGDIR); fi ) diff --git a/acinclude.m4 b/acinclude.m4 deleted file mode 100644 index 605842149..000000000 --- a/acinclude.m4 +++ /dev/null @@ -1,74 +0,0 @@ -AC_DEFUN([AC_DEFINE_DIR], [ - prefix_NONE= - exec_prefix_NONE= - test "x$prefix" = xNONE && prefix_NONE=yes && prefix=$ac_default_prefix - test "x$exec_prefix" = xNONE && exec_prefix_NONE=yes && exec_prefix=$prefix -dnl In Autoconf 2.60, ${datadir} refers to ${datarootdir}, which in turn -dnl refers to ${prefix}. Thus we have to use `eval' twice. - eval ac_define_dir="\"[$]$2\"" - eval ac_define_dir="\"$ac_define_dir\"" - AC_SUBST($1, "$ac_define_dir") - AC_DEFINE_UNQUOTED($1, "$ac_define_dir", [$3]) - test "$prefix_NONE" && prefix=NONE - test "$exec_prefix_NONE" && exec_prefix=NONE -]) - -AC_DEFUN([AC_PROG_PERL_VERSION],[dnl -# Make sure we have perl -if test -z "$PERL"; then -AC_CHECK_PROG(PERL,perl,perl) -fi - -# Check if version of Perl is sufficient -ac_perl_version="$1" - -if test "x$PERL" != "x"; then - AC_MSG_CHECKING(for perl version greater than or equal to $ac_perl_version) - # NB: It would be nice to log the error if there is one, but we cannot rely - # on autoconf internals - $PERL -e "use $ac_perl_version;" > /dev/null 2>&1 - if test $? -ne 0; then - AC_MSG_RESULT(no); - $3 - else - AC_MSG_RESULT(ok); - $2 - fi -else - AC_MSG_WARN(could not find perl) -fi -])dnl - -AC_DEFUN([AC_PROG_PERL_MODULES],[dnl -ac_perl_modules="$1" -# Make sure we have perl -if test -z "$PERL"; then -AC_CHECK_PROG(PERL,perl,perl) -fi - -if test "x$PERL" != x; then - ac_perl_modules_failed=0 - for ac_perl_module in $ac_perl_modules; do - AC_MSG_CHECKING(for perl module $ac_perl_module) - - # Would be nice to log result here, but can't rely on autoconf internals - $PERL "-M$ac_perl_module" -e exit > /dev/null 2>&1 - if test $? -ne 0; then - AC_MSG_RESULT(no); - ac_perl_modules_failed=1 - else - AC_MSG_RESULT(ok); - fi - done - - # Run optional shell commands - if test "$ac_perl_modules_failed" = 0; then - : - $2 - else - : - $3 - fi -else - AC_MSG_WARN(could not find perl) -fi])dnl diff --git a/bootstrap.sh b/bootstrap.sh deleted file mode 100755 index 0bc041f18..000000000 --- a/bootstrap.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -aclocal -I m4 -autoheader -automake --add-missing -autoconf diff --git a/configure.ac b/configure.ac deleted file mode 100644 index c71854dc1..000000000 --- a/configure.ac +++ /dev/null @@ -1,509 +0,0 @@ -# -# Building ZoneMinder via Autotools will be depreciated soon -# For instructions on building with cmake, please see INSTALL -# -AC_PREREQ(2.59) -AC_INIT(zm,1.29.0,[http://www.zoneminder.com/forums/ - Please check FAQ first],zoneminder,http://www.zoneminder.com/downloads.html) -AM_INIT_AUTOMAKE -AC_CONFIG_SRCDIR(src/zm.h) -AC_CONFIG_HEADERS(config.h) -AC_CONFIG_MACRO_DIR([m4]) - -AC_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS]) - -AC_SUBST(VERSION) -# -# Platform specific setup -# -############################# -AC_CANONICAL_HOST -# Check for which host we are on and setup a few things -# specifically based on the host -case $host_os in - darwin* ) - # Do something specific for mac - HOST_OS='darwin' - ;; - linux*) - # Do something specific for linux - HOST_OS='linux' - ;; - *BSD*) - # Do something specific for BSD - HOST_OS='BSD' - AC_DEFINE(BSD,1,"This is a BSD system") - ;; - *bsd*) - # Do something specific for BSD - HOST_OS='BSD' - AC_DEFINE(BSD,1,"This is a BSD system") - ;; - *solaris*) - # Do something specific for Solaris - HOST_OS='solaris' - AC_DEFINE(SOLARIS,1,"We are running a Solaroid OS [tested on OmniOS]") - ;; - *) - #Default Case - AC_MSG_ERROR([Your platform is not currently supported]) - ;; -esac - -AC_SUBST(HOST_OS) - -AC_ARG_VAR(ZM_DB_TYPE,[Type of the ZoneMinder database, default mysql]) -AC_ARG_VAR(ZM_DB_HOST,[Hostname where ZoneMinder database located, default localhost]) -AC_ARG_VAR(ZM_DB_NAME,[Name of ZoneMinder database, default zm]) -AC_ARG_VAR(ZM_DB_USER,[Name of ZoneMinder database user, default zmuser]) -AC_ARG_VAR(ZM_DB_PASS,[Password of ZoneMinder database user, default zmpass]) -AC_ARG_VAR(ZM_SSL_LIB,[Library to use for ssl functions, default gnutls]) -AC_ARG_VAR(ZM_MYSQL_ENGINE,[MySQL engine to use with database, default InnoDB]) -AC_ARG_VAR(ZM_RUNDIR,[Location of transient process files, default /var/run/zm]) -AC_ARG_VAR(ZM_SOCKDIR,[Location of Unix domain socket files, default /var/run/zm]) -AC_ARG_VAR(ZM_TMPDIR,[Location of temporary files, default /var/tmp/zm]) -AC_ARG_VAR(ZM_LOGDIR,[Location of generated log files, default /var/log/zm]) -AC_ARG_VAR(ZM_CONFIG_DIR,[Location of ZoneMinder configuration, default system config directory]) - -if test "$ZM_DB_TYPE" == ""; then - AC_SUBST(ZM_DB_TYPE,[mysql]) -fi -if test "$ZM_DB_HOST" == ""; then - AC_SUBST(ZM_DB_HOST,[localhost]) -fi -if test "$ZM_DB_NAME" == ""; then - AC_SUBST(ZM_DB_NAME,[zm]) -fi -if test "$ZM_DB_USER" == ""; then - AC_SUBST(ZM_DB_USER,[zmuser]) -fi -if test "$ZM_DB_PASS" == ""; then - AC_SUBST(ZM_DB_PASS,[zmpass]) -fi -if test "$ZM_SSL_LIB" == ""; then - AC_SUBST(ZM_SSL_LIB,gnutls) -fi -if test "$ZM_MYSQL_ENGINE" == ""; then - AC_SUBST(ZM_MYSQL_ENGINE,InnoDB) -fi -if test "$ZM_RUNDIR" == ""; then - AC_SUBST(ZM_RUNDIR,[/var/run/zm]) -fi -if test "$ZM_SOCKDIR" == ""; then - AC_SUBST(ZM_SOCKDIR,[/var/run/zm]) -fi -if test "$ZM_TMPDIR" == ""; then - AC_SUBST(ZM_TMPDIR,[/tmp/zm]) -fi -if test "$ZM_LOGDIR" == ""; then - AC_SUBST(ZM_LOGDIR,[/var/log/zm]) -fi -AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory]) -if test "$ZM_CONFIG_DIR" == ""; then - AC_SUBST(ZM_CONFIG_DIR,[$SYSCONFDIR]) -fi - -LIB_ARCH=lib -AC_ARG_WITH(libarch, - [ --with-libarch= architecture library path to use, default lib], - [LIB_ARCH=$with_libarch], - AC_MSG_WARN([You can call configure with the --with-libarch option. - This tells configure where to find architecture specific libraries. - The default of 'lib' is usually ok but 64 bit machines may require lib64. - e.g. --with-libarch=lib or --with-libarch=lib64]) -) -AC_SUBST(LIB_ARCH) - -LDFLAGS="-L/usr/lib/${build_alias} ${LDFLAGS}" - -MYSQL_PREFIX=/usr -AC_ARG_WITH(mysql, - [ --with-mysql= prefix of MySQL installation, default /usr], - [MYSQL_PREFIX=$with_mysql], - AC_MSG_WARN([You can call configure with the --with-mysql option. - This tells configure where to find the MySql C library and headers if configure cannot - locate them automatically. - e.g. --with-mysql=/usr/local or --with-mysql=/usr]) -) -AC_SUBST(MYSQL_PREFIX) -MYSQL_LIBS="-L${MYSQL_PREFIX}/${LIB_ARCH}/mysql" -MYSQL_CFLAGS="-I${MYSQL_PREFIX}/include" -AC_SUBST(MYSQL_LIBS) -AC_SUBST(MYSQL_CFLAGS) -LDFLAGS="$LDFLAGS ${MYSQL_LIBS}" - - -MARIADB_PREFIX=/usr -AC_ARG_WITH(mariadb, - [ --with-mariadb= prefix of MariaDB installation, default /usr], - [MYSQL_PREFIX=$with_mariadb], - AC_MSG_WARN([You can call configure with the --with-mariadb option. - This tells configure where to find the mariaDB C library and headers if configure cannot - locate them automatically. - e.g. --with-mariadb=/usr/local or --with-mariadb=/usr]) -) -AC_SUBST(MARIADB_PREFIX) -MARIADB_LIBS="-L${MARIADB_PREFIX}/${LIB_ARCH}/mariadb" -MARIADB_CFLAGS="-I${MARIADB_PREFIX}/include" -AC_SUBST(MARIADB_LIBS) -AC_SUBST(MARIADB_CFLAGS) -LDFLAGS="$LDFLAGS ${MARIADB_LIBS}" - -POLKIT_PREFIX=/usr -AC_ARG_WITH(polkit, -[ --with-polkit= prefix of polkit root directory, default /usr], -[POLKIT_PREFIX=$with_polkit], -AC_MSG_WARN([You can call configure with the --with-polkit option. -This tells configure where to place the polkit policy files.]) -) -AC_SUBST(POLKIT_PREFIX) -PKG_CHECK_MODULES(POLKIT, polkit-gobject-1) - -FFMPEG_PREFIX=/usr -AC_ARG_WITH(ffmpeg, - [ --with-ffmpeg= prefix of ffmpeg root directory for libavcodec etc, default /usr], - [FFMPEG_PREFIX=$with_ffmpeg], - AC_MSG_WARN([You can call configure with the --with-ffmpeg option. - This tells configure where to find the ffmpeg root directory within which are the libavcodec - and libavformat files that can be used to build true MPEG streaming into ZoneMinder. Ensure that - your copy of ffmpeg has installed libraries as well as binaries (use 'make installlib'). If you - are using a local install of ffmpeg you may have to remove or rename a previous real installation - as the headers and libraries from that will probably be picked up before your local copy. - e.g. --with-ffmpeg=/usr/local]) -) -AC_SUBST(FFMPEG_PREFIX) -FFMPEG_LIBS="-L${FFMPEG_PREFIX}/${LIB_ARCH}" -FFMPEG_CFLAGS="-I${FFMPEG_PREFIX}/include -D__STDC_CONSTANT_MACROS" -AC_SUBST(FFMPEG_LIBS) -AC_SUBST(FFMPEG_CFLAGS) - -LDFLAGS="${FFMPEG_LIBS} $LDFLAGS" -CFLAGS="${FFMPEG_CFLAGS} $CFLAGS" -CPPFLAGS="${FFMPEG_CFLAGS} $CPPFLAGS" - -EXTRA_LIBS= -AC_ARG_WITH(extralibs, - [ --with-extralibs="" string containing extra libraries to pass to link, default empty], - [EXTRA_LIBS=$with_extralibs], - AC_MSG_WARN([You can call configure with the --with-extralibs option. - Ordinarily you will need to use this option only when your copy of ffmpeg has been built - with support for additional formats and you would use this option to detail which additional - libraries ffmpeg was built with so that it is able to link successfully with ZoneMinder. - You will need to wrap this option in quotes if it contains any spaces. - e.g. --with-extralibs="-lmp3lame"]) -) -AC_SUBST(EXTRA_LIBS) - -LDFLAGS="$LDFLAGS ${EXTRA_LIBS}" - -AC_ARG_WITH(webdir, - [ --with-webdir= prefix of web directory], - [WEB_PREFIX=$with_webdir], - AC_MSG_ERROR([You must call configure with the --with-webdir option. - This tells configure where to install PHP and web files and scripts. - e.g. --with-webdir=/var/www/html or --with-webdir=/www/vhtdocs/]) -) -AC_SUBST(WEB_PREFIX) - -AC_ARG_WITH(cgidir, - [ --with-cgidir= prefix of cgi directory], - [CGI_PREFIX=$with_cgidir], - AC_MSG_ERROR([You must call configure with the --with-cgidir option. - This tells configure where to install cgi files and scripts. - e.g. --with-cgidir=/var/www/cgi-bin or --with-webdir=/www/vhtdocs//cgi-bin]) -) -AC_SUBST(CGI_PREFIX) - -WEB_USER=apache -AC_ARG_WITH(webuser, - [ --with-webuser= name of web user, default apache], - [WEB_USER=$with_webuser], - AC_MSG_WARN([You can call configure with the --with-webuser option. - This tells configure what the user name of the web user is if it is not the default of 'apache'. - e.g. --with-webuser=apache or --with-webuser=web]) -) -AC_SUBST(WEB_USER) - -WEB_GROUP=apache -AC_ARG_WITH(webgroup, - [ --with-webgroup= name of web group, default apache], - [WEB_GROUP=$with_webgroup], - AC_MSG_WARN([You can call configure with the --with-webgroup option. - This tells configure what the group name of the web group is if it is not the default of 'apache'. - e.g. --with-webgroup=apache or --with-webgroup=web]) -) -AC_SUBST(WEB_GROUP) - -WEB_HOST=zm.local -AC_ARG_WITH(webhost, - [ --with-webhost= name of web hostname, default zm.local], - [WEB_HOST=$with_webhost], - AC_MSG_WARN([You can call configure with the --with-webhost option. - This tells configure what the host name is for name based virtual hosting. This is only used to populate the sample web/zmHttpd.conf file. - e.g. --with-webhost=zm.localdomain]) -) -AC_SUBST(WEB_HOST) - -ENABLE_DEBUG=yes -AC_ARG_ENABLE(debug, - [ --enable-debug= enable or disable debug, default enabled], - [ENABLE_DEBUG=$enable_debug], - AC_MSG_WARN([You can call configure with the --enable-debug= or --disable-debug option. - This tells configure whether to compile ZoneMinder with debug included. Although debug is included - by default it is not output unless explicitly switched on elsewhere. These checks may induce a - small penalty on performance and if you are after squeezing the maximum possible performance out - of ZoneMinder you may use this switch to prevent debug from being compiled in. - e.g. --enable-debug=yes or --disable-debug]) -) -if test "$ENABLE_DEBUG" != "yes"; then - AC_DEFINE(ZM_DBG_OFF,1,"Whether debug is switched off and compiled out") -fi - -ENABLE_MMAP=yes -AC_ARG_ENABLE(mmap, - [ --enable-mmap= enable or disabled mapped memory versus shared memory, default mapped], - [ENABLE_MMAP=$enable_mmap], - AC_MSG_WARN([You can call configure with the --enable-mmap= or --disable-mmap option. - This tells configure whether to compile ZoneMinder with mmap support rather than IPC shared - memory. This is a feature that uses memory mapped into files which all processes can share. - Memory mapping requires less configuration and is more flexible than shared memory but may - slow down your system unless the mapped files are configured to reside on a fast or RAM based - filesystem which will normally be the case by default. - e.g. --enable-mmap=yes or --disable-mmap]) -) -if test "$ENABLE_MMAP" == "yes"; then - AC_DEFINE(ZM_MEM_MAPPED,1,"Whether to use mapped rather than shared memory") -else - AC_DEFINE(ZM_MEM_MAPPED,0,"Whether to use mapped rather than shared memory") -fi -AC_SUBST(ENABLE_MMAP) - -ENABLE_ONVIF=no -AC_ARG_ENABLE(onvif, - [ --enable-onvif= enable or disable basic onvif support, default disabled], - [ENABLE_ONVIF=$enable_onvif], - AC_MSG_WARN([You can call configure with the --enable-onvif= or --enable-onvif option. - This tells configure whether to compile ZoneMinder with basic ONVIF support. This feature will - probe for ONVIF compliant cameras on your network and allow you the option to auto-configure them as - monitors in zoneminder. This option is EXPERIMENTAL and may not work with all cameras that claim to - be ONVIF compliant. - e.g. --enable-onvif=yes or --disable-onvif]) -) -AM_CONDITIONAL([COND_ONVIF], [test "$enable_onvif" = yes]) - -# Compiler -AC_LANG_CPLUSPLUS -if test "$ENABLE_ONVIF" == "yes"; then - AC_SUBST(ZM_HAS_ONVIF,1) -else - AC_SUBST(ZM_HAS_ONVIF,0) -fi - -# Checks for programs. -AC_PROG_CXX -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_RANLIB -AC_PROG_MAKE_SET - -# Checks for typedefs, structures, and compiler characteristics. -AC_HEADER_STDBOOL -AC_C_CONST -AC_TYPE_UID_T -AC_C_INLINE -AC_TYPE_MODE_T -AC_TYPE_SIZE_T -AC_HEADER_TIME -AC_STRUCT_TM -AC_TYPE_SIGNAL - -AC_CHECK_TYPES(siginfo_t,,,[#include ]) -AC_CHECK_TYPES(ucontext_t,,,[#include ]) - -# Checks for library functions. -AC_PROG_GCC_TRADITIONAL -AC_FUNC_MALLOC -AC_FUNC_MMAP -AC_FUNC_SELECT_ARGTYPES -AC_FUNC_STAT -AC_FUNC_STRFTIME -AC_FUNC_STRTOD -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([gethostbyname gethostname gettimeofday memmove memset mkdir munmap posix_memalign putenv select sendfile socket sqrt strcasecmp strchr strcspn strerror strncasecmp strrchr strspn strstr strtol strtoull]) -AC_CHECK_FUNCS([syscall sleep usleep ioctl ioctlsocket sigaction]) -# this is required for freebsd to compile. Look for it in m4/ac_check_sendfile.m4 -AC_CHECK_SENDFILE -# Other programs -AC_CHECK_PROG(OPT_FFMPEG,ffmpeg,yes,no) -AC_PATH_PROG(PATH_FFMPEG,ffmpeg) - -# 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)) -if test "$BSD" == "0"; then -AC_CHECK_LIB(dl,dlsym,,AC_MSG_ERROR(zm requires libdl.a)) -fi -if test "$ZM_SSL_LIB" == "openssl"; then -AC_CHECK_HEADERS(openssl/md5.h,,AC_MSG_WARN(zm requires openssl/md5.h header to be installed for openssl),) -AC_CHECK_LIB(crypto,MD5,,AC_MSG_WARN([libcrypto.a is required for authenticated streaming - use ZM_SSL_LIB option to select gnutls instead])) -else -AC_CHECK_HEADERS(gnutls/openssl.h,AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,1),AC_SUBST(ZM_HAS_GNUTLS_OPENSSL,0),) -AC_CHECK_HEADERS(gnutls/gnutls.h,AC_SUBST(ZM_HAS_GNUTLS,1),AC_SUBST(ZM_HAS_GNUTLS,0),) -if test "$ZM_HAS_GNUTLS_OPENSSL" == "0" && test "$ZM_HAS_GNUTLS" == "0"; then -AC_MSG_WARN(gnutls is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead) -fi -AC_CHECK_HEADERS(gcrypt.h,,AC_MSG_WARN(zm requires libgcrypt headers to be installed for gnutls),) -AC_CHECK_LIB(gcrypt,gcry_check_version,,AC_MSG_WARN([libgcrypt.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead])) -AC_CHECK_LIB(gnutls,gnutls_fingerprint,,AC_MSG_WARN([libgnutls.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead])) -if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then -AC_CHECK_LIB(gnutls-openssl,MD5,,AC_MSG_WARN([libgnutls.a is required for authenticated streaming - use ZM_SSL_LIB option to select openssl instead])) -fi -fi -AC_CHECK_LIB(pcre,pcre_compile,,AC_MSG_WARN(libpcre.a may be required for remote/network camera support)) -AC_CHECK_LIB(z,zlibVersion) -AC_CHECK_LIB(x264,x264_predict_16x16_init) -AC_CHECK_LIB(avutil,av_malloc,,AC_MSG_WARN(libavutil.a may be required for MPEG streaming)) -# Don't bother to warn about this one -AC_CHECK_LIB(avcore,av_image_copy,,) -AC_CHECK_LIB(avcodec,avcodec_version,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming)) -AC_CHECK_LIB(avformat,avformat_version,,AC_MSG_WARN(libavformat.a is required for MPEG streaming)) -#AC_CHECK_LIB(avcodec,avcodec_open,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming)) -#AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming)) -AC_CHECK_LIB(avdevice,avdevice_register_all,,AC_MSG_WARN(libavdevice.a may be required for MPEG streaming)) -AC_CHECK_LIB(swscale,sws_scale,,,-lswscale) -AC_CHECK_LIB(vlc,libvlc_new,,AC_MSG_WARN(libvlc.a may be required for streaming)) -AC_CHECK_LIB(bz2,BZ2_bzCompress,,AC_MSG_WARN(zm requires libbz2.a for recent versions of ffmpeg)) -AC_CHECK_LIB(z,compress,,) -AC_CHECK_LIB(curl,curl_global_init,,) - -# Checks for header files. -AC_FUNC_ALLOCA -AC_HEADER_STDC -AC_CHECK_HEADERS([fcntl.h limits.h memory.h stddef.h stdlib.h string.h strings.h sys/param.h sys/time.h syslog.h unistd.h values.h]) -AC_CHECK_HEADERS([netdb.h netinet/in.h arpa/inet.h sys/ioctl.h sys/socket.h sys/un.h glob.h sys/sendfile.h]) -AC_CHECK_HEADERS(execinfo.h,,,) -AC_CHECK_HEADERS(ucontext.h,,,) -AC_CHECK_HEADERS(sys/syscall.h,,,) -AC_CHECK_HEADERS(pthread.h,,,) - -# Check for Video for Linux 1 Header Files -ZM_HAS_V4L1=0 -AC_CHECK_HEADERS([libv4l1-videodev.h linux/videodev.h],[ZM_HAS_V4L1=1; break;],,) -AC_SUBST(ZM_HAS_V4L1) - -# Check for Video for Linux 2 Header Files -ZM_HAS_V4L2=0 -AC_CHECK_HEADERS(linux/videodev2.h,ZM_HAS_V4L2=1,,) -AC_SUBST(ZM_HAS_V4L2) - -# Set global Video for Linux flag -ZM_HAS_V4L=0 -if test "$ZM_HAS_V4L1" == "1" || test "$ZM_HAS_V4L2" == "1"; then -ZM_HAS_V4L=1 -else -AC_MSG_WARN(zm requires Video4Linux or Video4Linux2 to be installed for analog or USB camera support) -fi -AC_SUBST(ZM_HAS_V4L) - -AC_CHECK_HEADERS(jpeglib.h,,AC_MSG_ERROR(zm requires libjpeg headers to be installed),) -AC_CHECK_HEADERS(mysql/mysql.h,,AC_MSG_ERROR(zm requires MySQL headers - check that MySQL development packages are installed),) -AC_LANG_PUSH([C]) -AC_CHECK_HEADERS(libavutil/avutil.h,,,) -AC_CHECK_HEADERS(libavcodec/avcodec.h,,,) -AC_CHECK_HEADERS(libavformat/avformat.h,,,) -AC_CHECK_HEADERS(libswscale/swscale.h,,,) -AC_LANG_POP([C]) -AC_CHECK_HEADERS(pcre/pcre.h,AC_SUBST(ZM_PCRE,"1"),,) -AC_CHECK_HEADERS(pcre.h,AC_SUBST(ZM_PCRE,"1"),,) -if test "$ENABLE_MMAP" == "yes"; then -AC_CHECK_HEADERS(sys/mman.h,,,) -AC_CHECK_HEADERS(fcntl.h,,,) -else -AC_CHECK_HEADERS(sys/ipc.h,,,) -AC_CHECK_HEADERS(sys/shm.h,,,) -fi -AC_CHECK_HEADERS(zlib.h,,,) -AC_CHECK_HEADERS(vlc/vlc.h,,,) -AC_CHECK_HEADERS(curl/curl.h,,,) - -if test "$ZM_SSL_LIB" == "openssl"; then -AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires openssl/md5.h - use ZM_SSL_LIB option to select gnutls instead]),[#include -#include ]) -else -if test "$ZM_HAS_GNUTLS_OPENSSL" == "1"; then -AC_CHECK_DECLS(MD5,,AC_MSG_ERROR([zm requires gnutls/openssl.h - use ZM_SSL_LIB option to select openssl instead]),[#include -#include ]) -else -AC_CHECK_DECLS(gnutls_fingerprint,,AC_MSG_ERROR([zm requires gnutls/gnutls.h - use ZM_SSL_LIB option to select openssl instead]),[#include -#include ]) -fi -fi -AC_CHECK_DECLS(backtrace,,,[#include ]) -AC_CHECK_DECLS(backtrace_symbols,,,[#include ]) -AC_CHECK_LIB(execinfo,backtrace) - -AC_SUBST(LDFLAGS) - -AC_PROG_PERL_VERSION(5.6.0) - -# Compulsory perl modules -AC_PROG_PERL_MODULES(Sys::Syslog,,AC_MSG_ERROR(zm requires SYS:Syslog)) -AC_PROG_PERL_MODULES(DBI,,AC_MSG_ERROR(zm requires DBI)) -AC_PROG_PERL_MODULES(DBD::mysql,,AC_MSG_ERROR(zm requires DBD::mysql)) -AC_PROG_PERL_MODULES(Getopt::Long,,AC_MSG_ERROR(zm requires Getopt::Long)) -AC_PROG_PERL_MODULES(Time::HiRes,,AC_MSG_ERROR(zm requires Time::HiRes)) -AC_PROG_PERL_MODULES(Date::Manip,,AC_MSG_ERROR(zm requires Date::Manip)) -AC_PROG_PERL_MODULES(LWP::UserAgent,,AC_MSG_ERROR(zm requires LWP::UserAgent)) -AC_PROG_PERL_MODULES(ExtUtils::MakeMaker,,AC_MSG_ERROR(zm requires ExtUtils::MakeMaker)) -if test "$ENABLE_MMAP" == "yes"; then -AC_PROG_PERL_MODULES(Sys::Mmap,,AC_MSG_ERROR(zm requires Sys::Mmap for mapped memory - set --enable-mmap=no to use IPC shared memory instead)) -fi - -# Optional perl modules -AC_PROG_PERL_MODULES(Module::Load,,AC_MSG_WARN(Module::Load is required for PTZ camera control)) -AC_PROG_PERL_MODULES(Device::SerialPort,,AC_MSG_WARN(Device::SerialPort is required for RS232/RS485 PTZ camera control)) -AC_PROG_PERL_MODULES(Net::FTP,,AC_MSG_WARN(Net::FTP is required for automatic event uploading using ftp)) -AC_PROG_PERL_MODULES(Net::SFTP::Foreign,,AC_MSG_WARN(Net::SFTP::Foreign is required for automatic event uploading using sftp)) -AC_PROG_PERL_MODULES(Expect,,AC_MSG_WARN(Expect is required for automatic event uploading using sftp)) -AC_PROG_PERL_MODULES(Archive::Tar,,AC_MSG_WARN(Archive::Tar may be required for automatic event uploading)) -AC_PROG_PERL_MODULES(Archive::Zip,,AC_MSG_WARN(Archive::Zip may be required for automatic event uploading)) -AC_PROG_PERL_MODULES(Net::SMTP,,AC_MSG_WARN(Net::SMTP may be required for automatic event email notification)) -AC_PROG_PERL_MODULES(MIME::Lite,,AC_MSG_WARN(MIME::Lite may be required for automatic event email notification)) -AC_PROG_PERL_MODULES(MIME::Entity,,AC_MSG_WARN(MIME::Entity may be required for automatic event email notification)) -AC_PROG_PERL_MODULES(X10::ActiveHome,,AC_MSG_WARN(X10::ActiveHome is required for X.10 support)) - -AC_DEFINE_DIR([BINDIR],[bindir],[Expanded binary directory]) -AC_DEFINE_DIR([LIBDIR],[libdir],[Expanded library directory]) -AC_DEFINE_DIR([DATADIR],[datadir],[Expanded data directory]) -AC_SUBST(PKGDATADIR,"$DATADIR/$PACKAGE") -AC_SUBST(ZM_PID,"$ZM_RUNDIR/zm.pid") -#AC_DEFINE_DIR([SYSCONFDIR],[sysconfdir],[Expanded configuration directory]) -#AC_SUBST(ZM_CONFIG,"$SYSCONFDIR/zm.conf") -AC_SUBST(ZM_CONFIG,"$ZM_CONFIG_DIR/zm.conf") - -# Slight hack for non-standard perl install paths -if test "$prefix" != "NONE"; then - PERL_SITE_PREFIX=`perl -V:siteprefix | sed -e "s/.*='\(.*\)';/\1/"` - PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"` - PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"` - EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path" - PERL_MM_PARMS="\"PREFIX=$prefix INSTALLDIRS=vendor\"" -else - EXTRA_PERL_LIB="# Include from system perl paths only" - PERL_MM_PARMS="\"INSTALLDIRS=vendor\"" -fi -AC_SUBST(PERL_MM_PARMS) -AC_SUBST(EXTRA_PERL_LIB) - -AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules onvif/Makefile onvif/scripts/Makefile scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtelemetry.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmsystemctl.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/css/classic/Makefile web/skins/classic/css/classic/views/Makefile web/skins/classic/css/dark/Makefile web/skins/classic/css/dark/views/Makefile web/skins/classic/css/flat/Makefile web/skins/classic/css/flat/views/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile]) - -# Create the definitions for compilation and defaults for the database -AC_CONFIG_COMMANDS([src/zm_config_defines.h],[perl ./zmconfgen.pl]) -# Manually generate the perl Makefile maker -AC_CONFIG_COMMANDS([scripts/ZoneMinder/Makefile],[(cd scripts/ZoneMinder; echo "perl Makefile.PL $PERL_MM_PARMS"; perl Makefile.PL $PERL_MM_PARMS)],[PERL_MM_PARMS=$PERL_MM_PARMS]) -AC_CONFIG_COMMANDS([onvif/modules/Makefile],[(cd onvif/modules; echo "perl Makefile.PL $PERL_MM_PARMS"; perl Makefile.PL $PERL_MM_PARMS)],[PERL_MM_PARMS=$PERL_MM_PARMS]) -AC_CONFIG_COMMANDS([onvif/proxy/Makefile],[(cd onvif/proxy; echo "perl Makefile.PL $PERL_MM_PARMS"; perl Makefile.PL $PERL_MM_PARMS)],[PERL_MM_PARMS=$PERL_MM_PARMS]) - -AC_OUTPUT diff --git a/db/Makefile.am b/db/Makefile.am deleted file mode 100644 index 9cb4e197c..000000000 --- a/db/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AUTOMAKE_OPTIONS = foreign - -zmdbdatadir = $(pkgdatadir)/db - -EXTRA_DIST = \ - zm_create.sql.in \ - $(dbupgrade_scripts) - -dist_zmdbdata_DATA = \ - zm_create.sql \ - $(dbupgrade_scripts) - -dbupgrade_scripts = $(wildcard zm_update-*.sql) - diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 3614bfedd..029f20989 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -270,7 +270,7 @@ CREATE TABLE `Logs` ( `TimeKey` decimal(16,6) NOT NULL, `Component` varchar(32) NOT NULL, `ServerId` int(10) unsigned, - `Pid` smallint(6) DEFAULT NULL, + `Pid` int(10) DEFAULT NULL, `Level` tinyint(3) NOT NULL, `Code` char(3) NOT NULL, `Message` text NOT NULL, diff --git a/db/zm_update-1.29.1.sql b/db/zm_update-1.29.1.sql new file mode 100644 index 000000000..8fd43c318 --- /dev/null +++ b/db/zm_update-1.29.1.sql @@ -0,0 +1,7 @@ +-- +-- This updates a 1.29.0 database to 1.29.1 +-- +-- + +-- Increase the size of the Pid field for FreeBSD +ALTER TABLE Logs MODIFY Pid int(10); diff --git a/distros/debian/README.source b/distros/debian/README.source deleted file mode 100644 index 646e55d86..000000000 --- a/distros/debian/README.source +++ /dev/null @@ -1,5 +0,0 @@ -This package uses quilt to manage all modifications to the upstream source. -Changes are stored in the source package as diffs in debian/patches and applied -during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. diff --git a/distros/debian/changelog b/distros/debian/changelog index ceebf9367..46f1e2bd9 100644 --- a/distros/debian/changelog +++ b/distros/debian/changelog @@ -1,3 +1,32 @@ +zoneminder (1.28.108-nmu2015100101) wheezy; urgency=low + + * + + -- Isaac Connor Thu, 01 Oct 2015 18:20:29 +0000 + +zoneminder (1.28.107-nmu2015092401) wheezy; urgency=low + + * + + -- Isaac Connor Thu, 24 Sep 2015 14:15:46 +0000 + +zoneminder (1.28.1+106-nmu2015091001) wheezy; urgency=low + + * + + -- Isaac Connor Thu, 10 Sep 2015 18:03:43 +0000 + +zoneminder (1.28.0-0.1) wheezy; urgency=low + + * Use CMake instead of Autotools to simplify + debian/rules and have less build-depends. + * Some lintian love in debian/{control,copyright} + and perl ZoneMinder modules. + * Don't purge database if we use a remote + MySQL server. + + -- Cosme Domínguez Díaz Sun, 09 Nov 2014 02:20:20 +0100 + zoneminder (1.28.0-wheezy) wheezy; urgency=medium * Release diff --git a/distros/debian/control b/distros/debian/control index 538b24770..3b11f37b8 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -2,45 +2,46 @@ Source: zoneminder Section: net Priority: optional Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), autoconf, automake, quilt , libtool, dh-autoreconf -,libgnutls-dev|libgnutls28-dev -,libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl -,libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev -,libpcre3-dev -,libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libavdevice-dev -,libv4l-dev (>= 0.8.3), libvlccore-dev, libvlc-dev -,libbz2-dev -,libsys-mmap-perl -,libnetpbm10-dev -,libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev -,libgcrypt11-dev|libgcrypt20-dev, libpolkit-gobject-1-dev +Build-Depends: debhelper (>= 9), cmake + , libphp-serialization-perl + , libgnutls28-dev | libgnutls-dev + , libmysqlclient-dev | libmariadbclient-dev + , libjpeg8-dev + , libpcre3-dev + , libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev + , libv4l-dev (>= 0.8.3) + , libbz2-dev + , libav-tools + , libnetpbm10-dev + , libavdevice-dev + , libvlccore-dev, libvlc-dev + , libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev + , libgcrypt11-dev, libpolkit-gobject-1-dev Standards-Version: 3.9.4 Package: zoneminder Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} -, apache2, libapache2-mod-php5 | libapache2-mod-fcgid -, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl -, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl -, mariadb-client|mysql-client -, libwww-perl, libarchive-tar-perl, libarchive-zip-perl -, libdevice-serialport-perl, libpcre3 -, ffmpeg | libav-tools -, rsyslog | system-log-daemon -, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl -, netpbm -, libavdevice53 | libavdevice55 -, libjpeg8|libjpeg9|libjpeg62-turbo -, zip -, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl -, libvlccore5 | libvlccore7 | libvlccore8, libvlc5 -, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev -, libpolkit-gobject-1-0, liburi-encode-perl, php5-gd -, libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl -, libsys-cpu-perl, libsys-meminfo-perl -Recommends: mysql-server|mariadb-server + , apache2 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm + , php5-mysqlnd | php5-mysql + , mariadb-client | mysql-client + , libphp-serialization-perl + , libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, libdbd-mysql-perl + , libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl + , libmodule-load-perl, libsys-mmap-perl, libjson-any-perl + , libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl + , libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl + , libsys-cpu-perl, libsys-meminfo-perl + , libpcre3 + , libav-tools, libavdevice53 + , rsyslog | system-log-daemon + , netpbm , libjpeg8 + , zip + , libvlccore5 | libvlccore7, libvlc5 + , libpolkit-gobject-1-0, php5-gd +Recommends: mysql-server | mariadb-server Description: Video camera security and surveillance solution - ZoneMinder is intended for use in single or multi-camera video security + ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child or family member or home monitoring and other care scenarios. It supports capture, analysis, recording, and monitoring of video data coming @@ -52,9 +53,9 @@ Description: Video camera security and surveillance solution via X.10 or other protocols. Package: zoneminder-dbg +Architecture: any Section: debug Priority: extra -Architecture: any Depends: zoneminder (= ${binary:Version}), ${misc:Depends} Description: Debugging symbols for zoneminder. ZoneMinder is a video camera security and surveillance solution. diff --git a/distros/debian/copyright b/distros/debian/copyright index a177502a0..1c10c59db 100644 --- a/distros/debian/copyright +++ b/distros/debian/copyright @@ -20,3 +20,38 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA On Debian GNU/Linux systems, the text of the GPL can be found in /usr/share/common-licenses/GPL. + +/usr/share/zoneminder/api/lib/Cake/*: +Copyright: + +Copyright (c) 2005-2013, Cake Software Foundation, Inc. + +License: + +CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org) + +The MIT License + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +Cake Software Foundation, Inc. +1785 E. Sahara Avenue, +Suite 490-204 +Las Vegas, Nevada 89104, +United States of America. diff --git a/distros/debian/dirs b/distros/debian/dirs index 4178482c1..9e29e6113 100644 --- a/distros/debian/dirs +++ b/distros/debian/dirs @@ -3,4 +3,3 @@ var/lib/zm var/cache/zoneminder/events var/cache/zoneminder/images var/cache/zoneminder/temp -usr/share/zoneminder/db diff --git a/distros/debian/init.d b/distros/debian/init.d index f22143c38..036bb695d 100644 --- a/distros/debian/init.d +++ b/distros/debian/init.d @@ -24,12 +24,10 @@ command="$ZM_PATH_BIN/zmpkg.pl" start() { echo -n "Starting $prog: " export TZ=:/etc/localtime - mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR - mkdir -p $TMPDIR && chown www-data:www-data $TMPDIR + mkdir -p $RUNDIR $TMPDIR && chown www-data:www-data $RUNDIR $TMPDIR $command start RETVAL=$? - [ $RETVAL = 0 ] && echo success - [ $RETVAL != 0 ] && echo failure + [ $RETVAL = 0 ] && echo success || echo failure echo [ $RETVAL = 0 ] && touch /var/lock/zm return $RETVAL @@ -52,8 +50,7 @@ stop() { else $command stop RETVAL=$? - [ $RETVAL = 0 ] && echo success - [ $RETVAL != 0 ] && echo failure + [ $RETVAL = 0 ] && echo success || echo failure echo [ $RETVAL = 0 ] && rm -f /var/lock/zm fi diff --git a/distros/debian/install b/distros/debian/install index 4b0009cea..97c5f7a03 100644 --- a/distros/debian/install +++ b/distros/debian/install @@ -1,12 +1,8 @@ usr/bin -usr/lib/cgi-bin +usr/lib/zoneminder/cgi-bin usr/share/man usr/share/perl5/ZoneMinder usr/share/perl5/ZoneMinder.pm -usr/share/polkit-1/actions -usr/share/polkit-1/rules.d -usr/share/zoneminder +usr/share/zoneminder/db +usr/share/zoneminder/www etc/zm -db/zm_create.sql usr/share/zoneminder/db -db/zm_update-*.sql usr/share/zoneminder/db -debian/apache.conf etc/zm diff --git a/distros/debian/links b/distros/debian/links index 9715ee428..5560a100a 100644 --- a/distros/debian/links +++ b/distros/debian/links @@ -1,4 +1,3 @@ var/cache/zoneminder/events usr/share/zoneminder/events var/cache/zoneminder/images usr/share/zoneminder/images var/cache/zoneminder/temp usr/share/zoneminder/temp -usr/lib/cgi-bin usr/share/zoneminder/cgi-bin diff --git a/distros/debian/patches/series b/distros/debian/patches/series deleted file mode 100644 index e69de29bb..000000000 diff --git a/distros/debian/postinst b/distros/debian/postinst index 42a3bb1dc..39e3dfc32 100644 --- a/distros/debian/postinst +++ b/distros/debian/postinst @@ -3,53 +3,51 @@ set -e if [ "$1" = "configure" ]; then - if [ -e "/etc/init.d/mysql" ]; then - # - # Get mysql started if it isn't - # - if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then - invoke-rc.d mysql start - fi - if $(/etc/init.d/mysql status >/dev/null 2>&1); then - mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload - # test if database if already present... - if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then - cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf - echo 'grant lock tables, alter,select,insert,update,delete,create,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - fi - invoke-rc.d zoneminder stop || true - zmupdate.pl --nointeractive + . /etc/zm/zm.conf - else - echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' - fi - else - echo 'mysql not found, assuming remote server.' - fi - chown www-data:www-data /var/log/zm - chown www-data:www-data /var/lib/zm/ + # The logs can contain passwords, etc... so by setting group root, only www-data can read them, not people in the www-data group. + chown www-data:root /var/log/zm + chown www-data:www-data /var/lib/zm if [ -z "$2" ]; then - chown www-data:www-data -R /var/cache/zoneminder + chown www-data:www-data /var/cache/zoneminder /var/cache/zoneminder/* fi -fi -# Ensure zoneminder is stopped... -if [ -x "/etc/init.d/zoneminder" ]; then - if invoke-rc.d zoneminder status ; then - invoke-rc.d zoneminder stop || exit $? + + # Do this every time the package is installed or upgraded + + if [ "$ZM_DB_HOST" = "localhost" ]; then + if [ -e "/etc/init.d/mysql" ]; then + # + # Get mysql started if it isn't + # + if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then + invoke-rc.d mysql start + fi + if $(/etc/init.d/mysql status >/dev/null 2>&1); then + mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload + # test if database if already present... + if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then + cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf + # This creates the user. + echo "grant lock tables, alter,select,insert,update,delete,create,index on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost identified by \"${ZM_DB_PASS}\";" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + else + echo "grant lock tables, alter,select,insert,update,delete,create,index on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + fi + + # Ensure zoneminder is stopped + invoke-rc.d zoneminder stop || true + zmupdate.pl --nointeractive + zmupdate.pl --nointeractive -f + invoke-rc.d zoneminder start || true + else + echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' + fi + else + echo 'mysql not found, assuming remote server.' fi -fi - -if [ "$1" = "configure" ]; then - if [ -z "$2" ]; then - chown www-data:www-data /var/log/zm - chown www-data:www-data /var/lib/zm/ - chown www-data:www-data -R /var/cache/zoneminder else - chown www-data:www-data /var/log/zm + echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)" + fi - echo 'grant lock tables, create, index, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - zmupdate.pl - fi fi #DEBHELPER# diff --git a/distros/debian/postrm b/distros/debian/postrm index 28a00a7a0..fde590981 100644 --- a/distros/debian/postrm +++ b/distros/debian/postrm @@ -1,9 +1,11 @@ #! /bin/sh -# set -e # to be reinstated later +set -e if [ "$1" = "purge" ]; then - echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm + if [ -e "/etc/init.d/mysql" ]; then + echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql + echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql + mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm + fi fi #DEBHELPER# diff --git a/distros/debian/preinst b/distros/debian/preinst old mode 100755 new mode 100644 diff --git a/distros/debian/rules b/distros/debian/rules index d07d3b823..4bdc7cb0c 100755 --- a/distros/debian/rules +++ b/distros/debian/rules @@ -1,66 +1,41 @@ #!/usr/bin/make -f # -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -CFLAGS = -Wall -g -CPPFLAGS = -D__STDC_CONSTANT_MACROS -CXXFLAGS = -DHAVE_LIBCRYPTO - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 -endif - -%: - dh $@ --with quilt,autoreconf +export CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -pipe +export CXXFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -pipe +INSTDIR = debian/tmp override_dh_auto_configure: - CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-mariadb=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes + dh_auto_configure -- \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_SKIP_RPATH=ON \ + -DCMAKE_VERBOSE_MAKEFILE=OFF \ + -DCMAKE_COLOR_MAKEFILE=ON \ + -DZM_RUNDIR=/var/run/zm \ + -DZM_SOCKDIR=/var/run/zm \ + -DZM_TMPDIR=/var/tmp/zm \ + -DZM_LOGDIR=/var/log/zm \ + -DZM_WEBDIR=/usr/share/zoneminder/www \ + -DZM_CONTENTDIR=/var/cache/zoneminder \ + -DZM_CGIDIR=/usr/lib/zoneminder/cgi-bin \ + -DZM_WEB_USER=www-data \ + -DZM_WEB_GROUP=www-data \ + -DCMAKE_INSTALL_SYSCONFDIR=etc/zm -override_dh_clean: - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) distclean - dh_clean - -override_dh_install: - dh_install --fail-missing - # - # NOTE: This is a short-term kludge; hopefully changes in the next - # upstream version will render this unnecessary. - rm -rf debian/zoneminder/usr/share/zoneminder/events - rm -rf debian/zoneminder/usr/share/zoneminder/images - rm -rf debian/zoneminder/usr/share/zoneminder/temp - dh_link var/cache/zoneminder/events usr/share/zoneminder/events - dh_link var/cache/zoneminder/images usr/share/zoneminder/images - dh_link var/cache/zoneminder/temp usr/share/zoneminder/temp - # - # This is a slightly lesser kludge; moving the cgi stuff to - # /usr/share/zoneminder/cgi-bin breaks one set of behavior, - # having it just in /usr/lib/cgi-bin breaks another bit of - # behavior. - # - dh_link usr/lib/cgi-bin usr/share/zoneminder/cgi-bin - -override_dh_fixperms: - dh_fixperms - chown root:root debian/zoneminder/etc/zm/zm.conf +override_dh_auto_install: + dh_auto_install --buildsystem=cmake + install -D -m 0644 debian/apache.conf $(INSTDIR)/etc/zm/apache.conf + rm $(INSTDIR)/usr/share/zoneminder/api/lib/Cake/LICENSE.txt + rm $(INSTDIR)/usr/share/zoneminder/api/.gitignore + rm -r $(INSTDIR)/usr/share/zoneminder/api/lib/Cake/Test override_dh_auto_test: # do not run tests... -.PHONY: override_dh_strip override_dh_strip: - dh_strip --dbg-package=zoneminder-dbg + dh_strip --dbg-package=zoneminder-dbg + +%: + dh $@ --buildsystem=cmake --parallel diff --git a/distros/debian8/README.Debian b/distros/debian8/README.Debian deleted file mode 100644 index a49b6be72..000000000 --- a/distros/debian8/README.Debian +++ /dev/null @@ -1,51 +0,0 @@ -zoneminder for Debian ---------------------- - -There is one manual step to get the web interface working. -You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf, -then reload the apache config (i.e. /etc/init.d/apache2 reload) - -Changing the location for images and events -------------------------------------------- - -Zoneminder, in its upstream form, stores data in /usr/share/zoneminder/. This -package modifies that by changing /usr/share/zoneminder/images and -/usr/share/zoneminder/events to symlinks to directories under -/var/cache/zoneminder. - -There are numerous places these could be put and ways to do it. But, at the -moment, if you change this, an upgrade will fail with a warning about these -locations having changed (the reason for this was that previously, an upgrade -would silently revert the changes and cause event loss - refer -bug #608793). - -If you do want to change the location, here are a couple of suggestions. - -These lines would mount /dev/sdX1 to /video_storage, and then 'link' /video_storage -to the locations that ZoneMinder expects them to be at. - - /dev/sdX1 /video_storage ext4 defaults 0 2 - /video_storage/zoneminder/images /var/cache/zoneminder/images none bind 0 2 - /video_storage/zoneminder/events /var/cache/zoneminder/events none bind 0 2 - - or if you have a separate partition for each: - - /dev/sdX1 /var/cache/zoneminder/images ext4 defaults 0 2 - /dev/sdX2 /var/cache/zoneminder/events ext4 defaults 0 2 - - - - -- Peter Howard , Sun, 16 Jan 2010 01:35:51 +1100 - -Access to /dev/video* ---------------------- - -For cameras which require access to /dev/video*, zoneminder may need the -www-data user added to the video group in order to see those cameras: - - adduser www-data video - -Note that all web applications running on the zoneminder server will then have -access to all video devices on the system. - - -- Vagrant Cascadian Sun, 27 Mar 2011 13:06:56 -0700 diff --git a/distros/debian8/apache.conf b/distros/debian8/apache.conf deleted file mode 100644 index 965c67f86..000000000 --- a/distros/debian8/apache.conf +++ /dev/null @@ -1,9 +0,0 @@ -Alias /zm /usr/share/zoneminder/www - - - php_flag register_globals off - Options Indexes FollowSymLinks - - DirectoryIndex index.php - - diff --git a/distros/debian8/changelog b/distros/debian8/changelog deleted file mode 100644 index 0035f1e36..000000000 --- a/distros/debian8/changelog +++ /dev/null @@ -1,41 +0,0 @@ -zoneminder (1.28.0+nmu1) testing; urgency=medium - - * Non-maintainer upload - * Split the debian package into several packages - * Switch to native source format - - -- Emmanuel Papin Thu, 15 Jan 2015 20:00:08 +0100 - -zoneminder (1.28.0-0.2) testing; urgency=medium - - * Non-maintainer upload. - * Upstream release for debian jessie - * Package dependencies updated - * debhelper version upgraded - * Standards-Version upgraded - * Use debhelper commands instead of standard commands - * Install man pages in /usr/share/man (patch added) - * Switch to quilt - * Switch to systemd - * Some lintian fixes - - -- Emmanuel Papin Wed, 26 Nov 2014 00:26:01 +0100 - -zoneminder (1.28.0-0.1) stable; urgency=medium - - * Release - - -- Isaac Connor Fri, 17 Oct 2014 09:27:22 -0400 - -zoneminder (1.27.99+1-testing-SNAPSHOT2014072901) testing; urgency=medium - - * improve error messages - * Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates - - -- Isaac Connor Tue, 29 Jul 2014 14:50:20 -0400 - -zoneminder (1.27.0+1-testing-v4ltomonitor-1) testing; urgency=high - - * Snapshot release - - - -- Isaac Connor Wed, 09 Jul 2014 21:35:29 -0400 diff --git a/distros/debian8/compat b/distros/debian8/compat deleted file mode 100644 index ec635144f..000000000 --- a/distros/debian8/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/distros/debian8/control b/distros/debian8/control deleted file mode 100644 index 4839e0033..000000000 --- a/distros/debian8/control +++ /dev/null @@ -1,124 +0,0 @@ -Source: zoneminder -Section: net -Priority: optional -Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), dh-systemd (>= 1.5), autoconf, automake, libphp-serialization-perl, libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev | libgcrypt20-dev, libpolkit-gobject-1-dev, libdbi-perl, libnet-sftp-foreign-perl, libexpect-perl, libmime-tools-perl -Standards-Version: 3.9.6 - -Package: zoneminder -Section: metapackages -Architecture: all -Depends: ${misc:Depends}, - libzoneminder-perl (>= ${source:Version}), - zoneminder-database (>= ${source:Version}), - zoneminder-core (>= ${binary:Version}), - zoneminder-ui-base (>= ${source:Version}), - zoneminder-ui-classic (>= ${source:Version}), - zoneminder-ui-mobile (>= ${source:Version}), - zoneminder-ui-xml (>= ${source:Version}) -Description: Video camera security and surveillance solution (metapackage) - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - -Package: libzoneminder-perl -Section: perl -Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, libdbi-perl, - libdevice-serialport-perl, libimage-info-perl, libjson-any-perl, - libsys-mmap-perl, liburi-encode-perl, libwww-perl -Description: Perl libraries for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the libraries for the perl scripts, it can be used to - write custom interfaces as well. - -Package: zoneminder-database -Section: database -Architecture: all -Depends: ${misc:Depends}, debconf, dbconfig-common, - mysql-client | mariadb-client -Recommends: mysql-server | mariadb-server -Description: Database management package for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the sql files and maintenance scripts to perform all the - database operations (installation, upgrade or removal) on a local or a remote - server. - -Package: zoneminder-core -Section: video -Architecture: any -Depends: libzoneminder-perl (= ${source:Version}), - zoneminder-database (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, - ${perl:Depends}, libarchive-tar-perl, libarchive-zip-perl, libdate-manip-perl, - libdbi-perl, libmodule-load-conditional-perl, libmime-lite-perl, - libmime-tools-perl, libnet-sftp-foreign-perl, libphp-serialization-perl - debconf, ffmpeg | libav-tools, rsyslog | system-log-daemon, netpbm, zip, - policykit-1, apache2 -, libsys-cpu-perl, libsys-meminfo-perl -, libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl -Description: Core binaries and perl scripts for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the executable compiled binaries which do the main video - processing work and the perl scripts which perform helper and/or external - interface tasks. - -Package: zoneminder-core-dbg -Priority: extra -Section: debug -Architecture: any -Depends: zoneminder-core (= ${binary:Version}), ${misc:Depends} -Description: Debugging symbols for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the debugging symbols for the executable compiled - binaries. - -Package: zoneminder-ui-base -Section: web -Architecture: any -Depends: zoneminder-core (= ${binary:Version}), ${shlibs:Depends}, - ${misc:Depends}, debconf, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, - php5, php5-mysql | php5-mysqlnd, php5-gd -Description: Essential files for ZoneMinder's web user interface - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the essential web files and maintenance scripts to set up - a basic web environment. - -Package: zoneminder-ui-classic -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: Classic web user interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the classic web user interface. - -Package: zoneminder-ui-mobile -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: Mobile web user interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the web user interface for mobile devices. - -Package: zoneminder-ui-xml -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: XML interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides a XML interface mainly intended for use with the eyeZm - iPhone Application, but can be used with any other custom programs as well. diff --git a/distros/debian8/copyright b/distros/debian8/copyright deleted file mode 100644 index a177502a0..000000000 --- a/distros/debian8/copyright +++ /dev/null @@ -1,22 +0,0 @@ -Copyright: - -Copyright 2002 Philip Coombes - -License: - -This package is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2 of the License, or (at your -option) any later version. - -This package is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public -License along with this package; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian GNU/Linux systems, the text of the GPL can be found in -/usr/share/common-licenses/GPL. diff --git a/distros/debian8/docs b/distros/debian8/docs deleted file mode 100644 index b43bf86b5..000000000 --- a/distros/debian8/docs +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/distros/debian8/libzoneminder-perl.install b/distros/debian8/libzoneminder-perl.install deleted file mode 100644 index 792ffc15e..000000000 --- a/distros/debian8/libzoneminder-perl.install +++ /dev/null @@ -1,4 +0,0 @@ -usr/share/perl5/ZoneMinder -usr/share/perl5/ZoneMinder.pm -debian/tmp/usr/share/man/man3/ZoneMinder.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::* diff --git a/distros/debian8/po/POTFILES.in b/distros/debian8/po/POTFILES.in deleted file mode 100644 index 5b155907e..000000000 --- a/distros/debian8/po/POTFILES.in +++ /dev/null @@ -1,3 +0,0 @@ -[type: gettext/rfc822deb] zoneminder-core.templates -[type: gettext/rfc822deb] zoneminder-database.templates -[type: gettext/rfc822deb] zoneminder-ui-base.templates diff --git a/distros/debian8/po/fr.po b/distros/debian8/po/fr.po deleted file mode 100644 index 85ced7fd2..000000000 --- a/distros/debian8/po/fr.po +++ /dev/null @@ -1,252 +0,0 @@ -# debconf french translation file for ZoneMinder. -# Copyright (C) 2001-2008 Philip Coombes -# This file is distributed under the same license as the zoneminder package. -# First author: Emmanuel Papin , 2014. -# -msgid "" -msgstr "" -"Project-Id-Version: zoneminder\n" -"Report-Msgid-Bugs-To: zoneminder@packages.debian.org\n" -"POT-Creation-Date: 2014-12-16 12:34+0100\n" -"PO-Revision-Date: 2014-12-07 00:40+0100\n" -"Last-Translator: Emmanuel Papin \n" -"Language-Team: French \n" -"Language: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:1001 -msgid "Delete this non empty directory?" -msgstr "Supprimer ce répertoire non vide ?" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:1001 -msgid "" -"A purge of the ZoneMinder package is performed but the directory '/var/cache/" -"zoneminder' is not empty so it will not be deleted." -msgstr "" -"Une purge du paquet ZoneMinder est en cours mais le répertoire '/var/cache/" -"zoneminder' n'est pas vide et sera donc conservé." - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:1001 -msgid "" -"Please consider that this directory is designed to contain data resulting " -"from event detection. Therefore, \"proof of evidence\" could be lost!\"" -msgstr "" -"Veuillez considérer que ce répertoire est conçu pour contenir des données " -"résultants de la détection d'événements. Par conséquent, des preuves " -"pourraient être perdues !" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:1001 -msgid "" -"If you are not sure of your decision, please do not delete this directory " -"but perform a manual checkup." -msgstr "" -"Si vous n'êtes pas sûr de votre décision, veuillez conserver ce répertoire " -"et effectuer une vérification manuelle." - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:2001 -msgid "Deletion confirmed?" -msgstr "Supression confirmée ?" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:2001 -msgid "" -"You have allowed the deletion of directory '/var/cache/zoneminder' although " -"it may contain critical data." -msgstr "" -"Vous avez autorisé la suppression du répertoire '/var/cache/zoneminder' bien " -"qu'il puisse contenir des données critiques." - -#. Type: select -#. Choices -#: ../zoneminder-database.templates:1001 -msgid "local" -msgstr "local" - -#. Type: select -#. Choices -#: ../zoneminder-database.templates:1001 -msgid "remote" -msgstr "distant" - -#. Type: select -#. Description -#: ../zoneminder-database.templates:1002 -msgid "Database location:" -msgstr "Emplacement de la base de donnée :" - -#. Type: select -#. Description -#: ../zoneminder-database.templates:1002 -msgid "" -"A database server is required to run ZoneMinder. The database can be " -"installed either locally or remotely on a machine of your network." -msgstr "" -"Un serveur de base de données est requis pour ZoneMinder. La base de donnée " -"peut être installée localement ou à distance sur une machine de votre réseau." - -#. Type: select -#. Description -#: ../zoneminder-database.templates:1002 -msgid "" -"If you choose a remote location, you will have to select the 'tcp/ip' " -"connection method and enter the hostname or ip address of the remote machine " -"in the next configuration screens." -msgstr "" -"Si vous choisissez un emplacement distant, vous devrez sélectionner la " -"méthode de connexion 'tcp/ip' et entrer le nom réseau ou l'adresse ip de la " -"machine distante dans les écrans de configuration suivants." - -#. Type: error -#. Description -#: ../zoneminder-database.templates:2001 -msgid "No local database server is available:" -msgstr "Aucun serveur local de base de données n'est disponible :" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:2001 -msgid "" -"Currently ZoneMinder supports mysql or mariadb database server but none of " -"them appears to be installed on this machine." -msgstr "" -"Actuellement ZoneMinder supporte les serveurs de base de données mysql et " -"mariadb mais aucun d'entre eux n'est installé sur cette machine." - -#. Type: error -#. Description -#: ../zoneminder-database.templates:2001 -msgid "" -"In order to complete ZoneMinder's installation, after ending of this " -"assistant, please install a compatible database server and then restart the " -"assistant by invoking:" -msgstr "" -"Afin de compléter l'installation de ZoneMinder, après la fermeture de cet " -"assitant, veuillez installer un serveur de base de données compatible et " -"ensuite redémarrez l'assistant en invoquant :" - -#. Type: error -#. Description -#. Type: error -#. Description -#: ../zoneminder-database.templates:2001 ../zoneminder-database.templates:3001 -msgid "$ sudo dpkg-reconfigure zoneminder" -msgstr "$ sudo dpkg-reconfigure zoneminder" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "Remote database servers are not allowed:" -msgstr "Les serveurs de base de données distants ne sont pas autorisés :" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "" -"The current configuration of dbconfig-common does not allow installation of " -"a database on remote servers." -msgstr "" -"La configuration actuelle de dbconfig-common ne permet pas l'installation de " -"bases de données sur des serveurs distants." - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "" -"In order to reconfigure dbconfig-common, please invoke the following command " -"after ending of this assistant:" -msgstr "" -"Afin de reconfigurer dbconfig-common, veuillez invoquer la commande suivante " -"après la fermeture de cet assitant :" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "$ sudo dpkg-reconfigure dbconfig-common" -msgstr "$ sudo dpkg-reconfigure dbconfig-common" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "" -"Then, to complete ZoneMinder's installation, please restart this assistant " -"by invoking:" -msgstr "" -"Ensuite, pour compléter l'installation de ZoneMinder, veuillez redémarrer " -"cet assistant en invoquant :" - -#. Type: password -#. Description -#: ../zoneminder-database.templates:4001 -msgid "New password for the ZoneMinder 'admin' user:" -msgstr "Nouveau mot de passe pour le compte 'admin' de ZoneMinder :" - -#. Type: password -#. Description -#: ../zoneminder-database.templates:4001 -msgid "Please enter the password of the default administrative user." -msgstr "Veuillez entrer le mot de passe du compte administrateur par défaut." - -#. Type: password -#. Description -#: ../zoneminder-database.templates:4001 -msgid "" -"While not mandatory, it is highly recommended that you set a custom password " -"for the administrative 'admin' user." -msgstr "" -"Bien que cela ne soit pas obligatoire, il est fortement recommandé de " -"fournir un mot de passe personnalisé pour le compte administrateur 'admin'." - -#. Type: password -#. Description -#: ../zoneminder-database.templates:4001 -msgid "If this field is left blank, the password will not be changed." -msgstr "Si le champ est laissé vide, le mot de passe ne sera pas changé." - -#. Type: password -#. Description -#: ../zoneminder-database.templates:5001 -msgid "Repeat password for the ZoneMinder 'admin' user:" -msgstr "Répéter le mot de passe pour le compte 'admin' de ZoneMinder :" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:6001 -msgid "Password input error" -msgstr "Erreur de mot de passe" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:6001 -msgid "The two passwords you entered were not the same. Please try again." -msgstr "" -"Les deux mots de passe saisis ne sont pas les mêmes. Veuillez essayer à " -"nouveau." - -#. Type: multiselect -#. Description -#: ../zoneminder-ui-base.templates:1001 -msgid "Web server to reconfigure automatically:" -msgstr "Serveur web à reconfigurer automatiquement :" - -#. Type: multiselect -#. Description -#: ../zoneminder-ui-base.templates:1001 -msgid "" -"Please choose the web server that should be automatically configured for " -"ZoneMinder's web portal access." -msgstr "" -"Veuillez choisir le serveur web à reconfigurer automatiquement pour l'accès " -"au portail web de ZoneMinder." diff --git a/distros/debian8/po/templates.pot b/distros/debian8/po/templates.pot deleted file mode 100644 index 941a4094e..000000000 --- a/distros/debian8/po/templates.pot +++ /dev/null @@ -1,222 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: zoneminder\n" -"Report-Msgid-Bugs-To: zoneminder@packages.debian.org\n" -"POT-Creation-Date: 2014-12-16 12:34+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:1001 -msgid "Delete this non empty directory?" -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:1001 -msgid "" -"A purge of the ZoneMinder package is performed but the directory '/var/cache/" -"zoneminder' is not empty so it will not be deleted." -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:1001 -msgid "" -"Please consider that this directory is designed to contain data resulting " -"from event detection. Therefore, \"proof of evidence\" could be lost!\"" -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:1001 -msgid "" -"If you are not sure of your decision, please do not delete this directory " -"but perform a manual checkup." -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:2001 -msgid "Deletion confirmed?" -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder-core.templates:2001 -msgid "" -"You have allowed the deletion of directory '/var/cache/zoneminder' although " -"it may contain critical data." -msgstr "" - -#. Type: select -#. Choices -#: ../zoneminder-database.templates:1001 -msgid "local" -msgstr "" - -#. Type: select -#. Choices -#: ../zoneminder-database.templates:1001 -msgid "remote" -msgstr "" - -#. Type: select -#. Description -#: ../zoneminder-database.templates:1002 -msgid "Database location:" -msgstr "" - -#. Type: select -#. Description -#: ../zoneminder-database.templates:1002 -msgid "" -"A database server is required to run ZoneMinder. The database can be " -"installed either locally or remotely on a machine of your network." -msgstr "" - -#. Type: select -#. Description -#: ../zoneminder-database.templates:1002 -msgid "" -"If you choose a remote location, you will have to select the 'tcp/ip' " -"connection method and enter the hostname or ip address of the remote machine " -"in the next configuration screens." -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:2001 -msgid "No local database server is available:" -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:2001 -msgid "" -"Currently ZoneMinder supports mysql or mariadb database server but none of " -"them appears to be installed on this machine." -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:2001 -msgid "" -"In order to complete ZoneMinder's installation, after ending of this " -"assistant, please install a compatible database server and then restart the " -"assistant by invoking:" -msgstr "" - -#. Type: error -#. Description -#. Type: error -#. Description -#: ../zoneminder-database.templates:2001 ../zoneminder-database.templates:3001 -msgid "$ sudo dpkg-reconfigure zoneminder" -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "Remote database servers are not allowed:" -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "" -"The current configuration of dbconfig-common does not allow installation of " -"a database on remote servers." -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "" -"In order to reconfigure dbconfig-common, please invoke the following command " -"after ending of this assistant:" -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "$ sudo dpkg-reconfigure dbconfig-common" -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:3001 -msgid "" -"Then, to complete ZoneMinder's installation, please restart this assistant " -"by invoking:" -msgstr "" - -#. Type: password -#. Description -#: ../zoneminder-database.templates:4001 -msgid "New password for the ZoneMinder 'admin' user:" -msgstr "" - -#. Type: password -#. Description -#: ../zoneminder-database.templates:4001 -msgid "Please enter the password of the default administrative user." -msgstr "" - -#. Type: password -#. Description -#: ../zoneminder-database.templates:4001 -msgid "" -"While not mandatory, it is highly recommended that you set a custom password " -"for the administrative 'admin' user." -msgstr "" - -#. Type: password -#. Description -#: ../zoneminder-database.templates:4001 -msgid "If this field is left blank, the password will not be changed." -msgstr "" - -#. Type: password -#. Description -#: ../zoneminder-database.templates:5001 -msgid "Repeat password for the ZoneMinder 'admin' user:" -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:6001 -msgid "Password input error" -msgstr "" - -#. Type: error -#. Description -#: ../zoneminder-database.templates:6001 -msgid "The two passwords you entered were not the same. Please try again." -msgstr "" - -#. Type: multiselect -#. Description -#: ../zoneminder-ui-base.templates:1001 -msgid "Web server to reconfigure automatically:" -msgstr "" - -#. Type: multiselect -#. Description -#: ../zoneminder-ui-base.templates:1001 -msgid "" -"Please choose the web server that should be automatically configured for " -"ZoneMinder's web portal access." -msgstr "" diff --git a/distros/debian8/rules b/distros/debian8/rules deleted file mode 100755 index 3364d8750..000000000 --- a/distros/debian8/rules +++ /dev/null @@ -1,154 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) - -CFLAGS = -Wall -CPPFLAGS = -D__STDC_CONSTANT_MACROS -CXXFLAGS = -DHAVE_LIBCRYPTO - -ifneq (,$(findstring debug,$(DEB_BUILD_OPTIONS))) -DEBOPT = --enable-debug -CFLAGS += -g -CXXFLAGS += -g -else -DEBOPT = -endif - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) -CFLAGS += -O0 -else -CFLAGS += -O2 -endif - -# These are used to get the most recent version of the original sources from github -UURL = $(shell git config --get remote.origin.url) -BRANCH = $(shell git rev-parse --abbrev-ref HEAD) -HEAD = $(shell git rev-parse HEAD) -PKD = $(abspath $(dir $(MAKEFILE_LIST))) -PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source)) -VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-|\+nmu\d+.*)};') -DTYPE = -TARBALL = ../$(PKG)_$(VER)$(DTYPE).orig.tar.xz - -%: - dh $@ --with autoreconf,systemd - -override_dh_auto_configure: - CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" dh_auto_configure -- \ - --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \ - --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man \ - --infodir=\$${prefix}/share/info --with-mysql=/usr \ - --with-mariadb=/usr --with-webdir=/usr/share/zoneminder \ - --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin \ - --with-webuser=www-data --with-webgroup=www-data \ - --enable-crashtrace=no --enable-mmap=yes $(DEBOPT) - -override_dh_clean: - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) distclean - dh_clean src/zm_config_defines.h - # - # Delete remaining auto-generated Makefile if Makefile.in exists - find $(CURDIR)/ -type f -name "Makefile" | while read file; do \ - [ -f $$file.in ] && rm -f $$file; \ - done || true - # - # Delete remaining auto-generated Makefile.in if Makefile.am exists - find $(CURDIR)/ -type f -name "Makefile.in" | while read filein; do \ - fileam=`echo $$filein | sed 's/\(.*\)\.in/\1\.am/'`; \ - [ -f $$fileam ] && rm -f $$filein; \ - done || true - -override_dh_install: - dh_install --fail-missing - # - # NOTE: This is a short-term kludge; hopefully changes in the next - # upstream version will render this unnecessary. - rm -rf debian/zoneminder/usr/share/zoneminder/events - rm -rf debian/zoneminder/usr/share/zoneminder/images - rm -rf debian/zoneminder/usr/share/zoneminder/temp - # The link stuff for these folders has been moved to - # zoneminder-core.links file - # - # This is a slightly lesser kludge; moving the cgi stuff to - # /usr/share/zoneminder/cgi-bin breaks one set of behavior, - # having it just in /usr/lib/cgi-bin breaks another bit of - # behavior. - # The link stuff for /usr/share/zoneminder/cgi-bin has been moved to - # zoneminder-ui-base.links file - -override_dh_installinit: - dh_installinit --package=zoneminder-core --name=zoneminder - -override_dh_systemd_start: - dh_systemd_start --package=zoneminder-core --name=zoneminder \ - --restart-after-upgrade - -override_dh_systemd_enable: - dh_systemd_enable --package=zoneminder-core --name=zoneminder - -override_dh_fixperms: - dh_fixperms - # - # As requested by the Debian Webapps Policy Manual §3.2.1 - chown root:www-data debian/zoneminder-core/etc/zm/zm.conf - chmod 640 debian/zoneminder-core/etc/zm/zm.conf - -override_dh_auto_test: - # do not run tests... - -.PHONY: override_dh_strip -override_dh_strip: - dh_strip --dbg-package=zoneminder-core-dbg - -# Inspired by https://wiki.debian.org/onlyjob/get-orig-source -.PHONY: get-orig-source -get-orig-source: $(TARBALL) $(info I: $(PKG)_$(VER)$(DTYPE)) - @ - -$(TARBALL): - $(if $(wildcard $(PKG)-$(VER)),$(error folder '$(PKG)-$(VER)' exists, aborting...)) - @echo "# Cloning origin repository..."; \ - if ! git clone $(UURL) $(PKG)-$(VER); then \ - $(RM) -r $(PKG)-$(VER); \ - echo "failed to clone repository, aborting..."; \ - false; \ - fi - @if [ $(BRANCH) != "master" ]; then \ - cd $(PKG)-$(VER); \ - echo "# Not on master branch, fetching origin branch '$(BRANCH)'..."; \ - git fetch origin $(BRANCH):$(BRANCH) || false; \ - echo "# Switching to branch '$(BRANCH)'..."; \ - git checkout $(BRANCH) || false; \ - fi - @echo "# Checking local source..." - @if [ $$(cd $(PKG)-$(VER) && git rev-parse HEAD) = $(HEAD) ]; then \ - echo "even with origin, ok"; \ - true; \ - else \ - echo "not even with origin, aborting..."; \ - false; \ - fi - @echo "# Setting times..." - @cd $(PKG)-$(VER) \ - && for F in $$(git ls-tree -r --name-only HEAD | sed -e "s/\s/\*/g"); do \ - touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; \ - done - @echo "# Cleaning-up..." - cd $(PKG)-$(VER) && $(RM) -r .git - @echo "# Packing file '$(TARBALL)'..." - @find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \ - | XZ_OPT="-6v" tar -caf "$(TARBALL)" -T- --owner=root --group=root --mode=a+rX \ - && $(RM) -r "$(PKG)-$(VER)" diff --git a/distros/debian8/source/local-options b/distros/debian8/source/local-options deleted file mode 100644 index e69de29bb..000000000 diff --git a/distros/debian8/source/options b/distros/debian8/source/options deleted file mode 100644 index 8bd61fce6..000000000 --- a/distros/debian8/source/options +++ /dev/null @@ -1 +0,0 @@ -extend-diff-ignore = "(^|/)(config\.sub|config\.guess|Makefile|aclocal.m4|compile|config.h.in|configure|depcomp|install-sh|missing)$" diff --git a/distros/debian8/zoneminder-core.config b/distros/debian8/zoneminder-core.config deleted file mode 100644 index 2a15a599e..000000000 --- a/distros/debian8/zoneminder-core.config +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -# config maintainer script for zoneminder-core package - -set -e - -# Source the debconf stuff -. /usr/share/debconf/confmodule - -#DEBHELPER# - -exit 0 diff --git a/distros/debian8/zoneminder-core.dirs b/distros/debian8/zoneminder-core.dirs deleted file mode 100644 index 350c32aff..000000000 --- a/distros/debian8/zoneminder-core.dirs +++ /dev/null @@ -1,4 +0,0 @@ -var/log/zm -var/cache/zoneminder/events -var/cache/zoneminder/images -var/cache/zoneminder/temp diff --git a/distros/debian8/zoneminder-core.install b/distros/debian8/zoneminder-core.install deleted file mode 100644 index afd9ada95..000000000 --- a/distros/debian8/zoneminder-core.install +++ /dev/null @@ -1,4 +0,0 @@ -etc/zm -usr/bin -usr/share/polkit-1/actions -usr/share/polkit-1/rules.d diff --git a/distros/debian8/zoneminder-core.links b/distros/debian8/zoneminder-core.links deleted file mode 100644 index 5560a100a..000000000 --- a/distros/debian8/zoneminder-core.links +++ /dev/null @@ -1,3 +0,0 @@ -var/cache/zoneminder/events usr/share/zoneminder/events -var/cache/zoneminder/images usr/share/zoneminder/images -var/cache/zoneminder/temp usr/share/zoneminder/temp diff --git a/distros/debian8/zoneminder-core.postinst b/distros/debian8/zoneminder-core.postinst deleted file mode 100644 index b1552e73b..000000000 --- a/distros/debian8/zoneminder-core.postinst +++ /dev/null @@ -1,80 +0,0 @@ -#! /bin/sh -# postinst maintainer script for zoneminder-core package - -set -e - -# Source the debconf stuff -. /usr/share/debconf/confmodule - -# Source the config file -CONFIGFILE=/etc/zm/zm.conf -. $CONFIGFILE - -# Do this when the package is installed, upgraded or reconfigured -if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then - - # Retrieve data from dbconfig (inputs from user) - . /etc/dbconfig-common/zoneminder.conf - - # ZoneMinder config file handling - # Inspired by: http://manpages.debian.org/cgi-bin/man.cgi?query=debconf-devel&sektion=7 - - # Backup the config file - cp -a -f $CONFIGFILE ${CONFIGFILE}.postinst.bak - - # Redeclare variables if missing in config file - test -z $dbc_dbserver || grep -Eq "^ *ZM_DB_HOST=" $CONFIGFILE \ - || echo "ZM_DB_HOST=" >> ${CONFIGFILE}.postinst.bak - test -z $dbc_dbname || grep -Eq "^ *ZM_DB_NAME=" $CONFIGFILE \ - || echo "ZM_DB_NAME=" >> ${CONFIGFILE}.postinst.bak - test -z $dbc_dbuser || grep -Eq "^ *ZM_DB_USER=" $CONFIGFILE \ - || echo "ZM_DB_USER=" >> ${CONFIGFILE}.postinst.bak - test -z $dbc_dbpass || grep -Eq "^ *ZM_DB_PASS=" $CONFIGFILE \ - || echo "ZM_DB_PASS=" >> ${CONFIGFILE}.postinst.bak - - # Prevent ZM_DB_HOST to be empty if user selected the 'unix socket' method - if test -z $dbc_dbserver; then - dbc_dbserver_override="localhost" - else - dbc_dbserver_override=$dbc_dbserver - fi - - # Update variables in config file - sed -i "s/^ *ZM_DB_HOST=.*/ZM_DB_HOST=$dbc_dbserver_override/" \ - ${CONFIGFILE}.postinst.bak - test -z $dbc_dbname || sed -i "s/^ *ZM_DB_NAME=.*/ZM_DB_NAME=$dbc_dbname/" \ - ${CONFIGFILE}.postinst.bak - test -z $dbc_dbuser || sed -i "s/^ *ZM_DB_USER=.*/ZM_DB_USER=$dbc_dbuser/" \ - ${CONFIGFILE}.postinst.bak - test -z $dbc_dbpass || sed -i "s/^ *ZM_DB_PASS=.*/ZM_DB_PASS=$dbc_dbpass/" \ - ${CONFIGFILE}.postinst.bak - - # Clean-up backup file - mv -f ${CONFIGFILE}.postinst.bak $CONFIGFILE - - - # Set some file permissions - chown $ZM_WEB_USER:$ZM_WEB_GROUP /var/log/zm - if [ -z "$2" ]; then - chown $ZM_WEB_USER:$ZM_WEB_GROUP -R /var/cache/zoneminder - fi - # As requested by the Debian Webapps Policy Manual §3.2.1 - chown root:${ZM_WEB_GROUP} $CONFIGFILE - chmod 640 $CONFIGFILE -fi - -# Do this every time the package is installed or upgraded -# Test for database presence to avoid failure of zmupdate.pl -if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then - - # Ensure zoneminder is stopped - deb-systemd-invoke stop zoneminder.service || exit $? - - # Run the ZoneMinder update tool - zmupdate.pl --nointeractive - -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/debian8/zoneminder-core.postrm b/distros/debian8/zoneminder-core.postrm deleted file mode 100644 index d75e75e8b..000000000 --- a/distros/debian8/zoneminder-core.postrm +++ /dev/null @@ -1,37 +0,0 @@ -#! /bin/sh -# postrm maintainer script for zoneminder-core package - -set -e - -# Source the debconf stuff -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi - -if [ "$1" = "purge" ]; then - - # Ask the user if we have to remove the cache directory even if not empty - if [ -d /var/cache/zoneminder ] \ - && [ ! $(find /var/cache/zoneminder -maxdepth 0 -type d -empty 2>/dev/null) ]; then - RET="" - db_input high zoneminder/ask_delete || true - db_go || true - db_get zoneminder/ask_delete - if [ "$RET" = "true" ]; then - RET="" - db_input high zoneminder/ask_delete_again || true - db_go || true - db_get zoneminder/ask_delete_again - if [ "$RET" = "true" ]; then - rm -rf /var/cache/zoneminder - fi - fi - fi -fi - -#DEBHELPER# - -# postrm rm may freeze without that -db_stop - -exit 0 diff --git a/distros/debian8/zoneminder-core.preinst b/distros/debian8/zoneminder-core.preinst deleted file mode 100644 index 3ed1ef661..000000000 --- a/distros/debian8/zoneminder-core.preinst +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh -# preinst maintainer script for zoneminder-core package - -set -e - -abort=false -if [ -L /usr/share/zoneminder/events ]; then - l=$(readlink /usr/share/zoneminder/events) - if [ "$l" != "/var/cache/zoneminder/events" ]; then - abort=true - fi -fi -if [ -L /usr/share/zoneminder/images ]; then - l=$(readlink /usr/share/zoneminder/images ) - if [ "$l" != "/var/cache/zoneminder/images" ]; then - abort=true - fi -fi - -if [ "$abort" = "true" ]; then - cat >&2 << EOF -Aborting installation of zoneminder due to non-default symlinks in -/usr/share/zoneminder for the images and/or events directory, which could -result in loss of data. Please move your data in each of these directories to -/var/cache/zoneminder before installing zoneminder from the package. -EOF - exit 1 - -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/debian8/zoneminder-core.templates b/distros/debian8/zoneminder-core.templates deleted file mode 100644 index 35fdefd7a..000000000 --- a/distros/debian8/zoneminder-core.templates +++ /dev/null @@ -1,19 +0,0 @@ -Template: zoneminder/ask_delete -Type: boolean -Default: false -_Description: Delete this non empty directory? - A purge of the ZoneMinder package is performed but the directory - '/var/cache/zoneminder' is not empty so it will not be deleted. - . - Please consider that this directory is designed to contain data resulting from - event detection. Therefore, "proof of evidence" could be lost!" - . - If you are not sure of your decision, please do not delete this directory but - perform a manual checkup. - -Template: zoneminder/ask_delete_again -Type: boolean -Default: false -_Description: Deletion confirmed? - You have allowed the deletion of directory '/var/cache/zoneminder' although - it may contain critical data. diff --git a/distros/debian8/zoneminder-core.zoneminder.init b/distros/debian8/zoneminder-core.zoneminder.init deleted file mode 100644 index 41d3cb9dc..000000000 --- a/distros/debian8/zoneminder-core.zoneminder.init +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# -### BEGIN INIT INFO -# Provides: zoneminder -# Required-Start: -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Do nothing more than fixing a lintian error -# Description: This script is provided by the Zoneminder package -# Zomeminder init configuration has been switched to systemd -# This dummy script can be safely deleted; It does nothing -# more than fixing a lintian error when testing the package -### END INIT INFO - -. /lib/lsb/init-functions - -case "$1" in - start) - ;; - stop) - ;; - status) - ;; - restart|reload) - ;; - force-reload) - ;; - *) - echo "Usage: ${0:-} {start|stop|status|restart|reload|force-reload}" >&2 - exit 1 - ;; -esac - -exit 0 - diff --git a/distros/debian8/zoneminder-core.zoneminder.service b/distros/debian8/zoneminder-core.zoneminder.service deleted file mode 100644 index d82270024..000000000 --- a/distros/debian8/zoneminder-core.zoneminder.service +++ /dev/null @@ -1,19 +0,0 @@ -# ZoneMinder systemd unit file -# This file is intended to work with debian distributions - -[Unit] -Description=ZoneMinder CCTV recording and security system -After=network.target mysql.service apache2.service -Requires=apache2.service -Wants=mysql.service - -[Service] -User=www-data -Type=forking -ExecStart=/usr/bin/zmpkg.pl start -ExecReload=/usr/bin/zmpkg.pl restart -ExecStop=/usr/bin/zmpkg.pl stop -PIDFile=/var/run/zm/zm.pid - -[Install] -WantedBy=multi-user.target diff --git a/distros/debian8/zoneminder-core.zoneminder.tmpfile b/distros/debian8/zoneminder-core.zoneminder.tmpfile deleted file mode 100644 index 6ea70bf35..000000000 --- a/distros/debian8/zoneminder-core.zoneminder.tmpfile +++ /dev/null @@ -1 +0,0 @@ -d /var/run/zm 0755 www-data www-data diff --git a/distros/debian8/zoneminder-database.config b/distros/debian8/zoneminder-database.config deleted file mode 100644 index f6a84d36d..000000000 --- a/distros/debian8/zoneminder-database.config +++ /dev/null @@ -1,142 +0,0 @@ -#!/bin/sh -# config maintainer script for zoneminder - -set -e - -# Source the debconf stuff -. /usr/share/debconf/confmodule - -# Set the first version in which dbconfig-common was introduced in the package -dbc_first_version="1.28.0" - -CONFIGFILE=/etc/zm/zm.conf -if [ -e $CONFIGFILE ]; then - # Source the config file if exists - . $CONFIGFILE -elif [ -e ${CONFIGFILE}.dpkg-new ]; then - # If no config file, source the config file which is going to be installed - # by the core package - . ${CONFIGFILE}.dpkg-new -else - # If no config file is going to be installed, set some default values - ZM_DB_HOST= - ZM_DB_NAME="zm" - ZM_DB_USER="zmuser" -fi - -# Set some variables for the dbconfig-common stuff -dbc_dbserver="$ZM_DB_HOST" -dbc_dbname="$ZM_DB_NAME" -dbc_dbuser="$ZM_DB_USER" - -if [ -f /usr/share/dbconfig-common/dpkg/config ]; then - - # Default use dbconfig-common - dbc_install="true" - - # Currently we only support mysql database - dbc_dbtypes="mysql" - - # Set authentication method to password - dbc_authmethod_user="password" - - # Source the dbconfig-common stuff - . /usr/share/dbconfig-common/dpkg/config -fi - -# Do this when the package is installed, upgraded or reconfigured -# Most of answers are cached so the questions will not be asked again -if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then - - # Ask the user if the database shall be installed locally or remotely - db_input high zoneminder/debconf_dblocation || true - db_go || true - db_get zoneminder/debconf_dblocation - - if [ "$RET" = "local" ]; then - if [ ! -e "/usr/sbin/mysqld" ]; then - # Display a message and exit if the user want a local database but - # no database server is available - db_input high zoneminder/debconf_dblocalmissingerror || true - db_go || true - exit 0 - else - # Set the database server to localhost - dbc_dbserver="localhost" - fi - else - # Source the dbconfig main configuration file - if [ -f /etc/dbconfig-common/config ]; then - . /etc/dbconfig-common/config - fi - if [ "$dbc_remote_questions_default" = "false" ]; then - # Display a message and exit if the dbconfig configuration does not - # allow installation of remote databases - # Note: To overcome this issue, we could think to override the - # default setting by using dbc_remote_questions_default='true' in - # maintainer scripts but unfortunately this does not work due to - # current dbconfig design - # More information here: - # https://bugs.launchpad.net/ubuntu/+source/dbconfig-common/+bug/1065331 - db_input high zoneminder/debconf_dbconfigerror || true - db_go || true - exit 0 - fi - fi - - # Ask the user for all database settings - dbc_go zoneminder $@ - - # Ask the user for the password of the database administrator if the user - # has not yet answered to this question. - # This situation may occur if the user skipped the database creation step - # when reconfiguring the package. - RET="" - db_get zoneminder/mysql/admin-pass - if [ -z "$RET" ]; then - db_input high zoneminder/mysql/admin-pass || true - db_go || true - fi - - # Do this only when not upgrading the package (no old version in argument) - if [ -z "$2" ]; then - # Ask for the password of 'admin' user - while :; do - RET="" - db_input high zoneminder/admin_password || true - db_go || true - db_get zoneminder/admin_password - # If password isn't empty we ask for password verification - if [ -z "$RET" ]; then - db_fset zoneminder/admin_password seen false - db_fset zoneminder/admin_password_again seen false - break - fi - ROOT_PW="$RET" - db_input high zoneminder/admin_password_again || true - db_go || true - db_get zoneminder/admin_password_again - if [ "$RET" = "$ROOT_PW" ]; then - ROOT_PW="" - break - fi - db_fset zoneminder/password_mismatch seen false - db_input critical zoneminder/password_mismatch || true - db_set zoneminder/admin_password "" - db_set zoneminder/admin_password_again "" - db_go || true - done - else - # If we are upgrading the package, set an empty password to disable - # password update in ZoneMinder database - db_set zoneminder/admin_password "" - fi - # Set the seen flag to not ask this question again if no password is - # provided - db_fset zoneminder/admin_password seen true - -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/debian8/zoneminder-database.dirs b/distros/debian8/zoneminder-database.dirs deleted file mode 100644 index b37463a9e..000000000 --- a/distros/debian8/zoneminder-database.dirs +++ /dev/null @@ -1,3 +0,0 @@ -usr/share/zoneminder/db -usr/share/dbconfig-common/data/zoneminder/install -usr/share/dbconfig-common/data/zoneminder/upgrade/mysql diff --git a/distros/debian8/zoneminder-database.install b/distros/debian8/zoneminder-database.install deleted file mode 100644 index 756c5bbfa..000000000 --- a/distros/debian8/zoneminder-database.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/db diff --git a/distros/debian8/zoneminder-database.postinst b/distros/debian8/zoneminder-database.postinst deleted file mode 100644 index 41d4e5b5b..000000000 --- a/distros/debian8/zoneminder-database.postinst +++ /dev/null @@ -1,79 +0,0 @@ -#! /bin/sh -# postinst maintainer script for zoneminder-db package - -set -e - -# Source the debconf stuff -. /usr/share/debconf/confmodule - -mysql_update() { - - # Source the dbconfig stuff - . /usr/share/dbconfig-common/internal/mysql - - # Update the password of the hard-coded default 'admin' account - test -z $ADMIN_PASSWORD || dbc_mysql_exec_command "UPDATE Users SET Password = password('$ADMIN_PASSWORD') WHERE Username = 'admin';" || true - - # Update the database version - dbc_mysql_exec_command "UPDATE Config SET Value = '$DB_VERSION' WHERE Name = 'ZM_DYN_DB_VERSION';" || true -} - -if [ -f /usr/share/dbconfig-common/dpkg/postinst ]; then - - # Set the first version in which dbconfig-common was introduced in the package - dbc_first_version="1.28.0" - - # Set the database type - dbc_dbtypes="mysql" - - # Source the dbconfig-common stuff - . /usr/share/dbconfig-common/dpkg/postinst -fi - -# Do this when the package is installed, upgraded or reconfigured -if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then - - # Install sql database create file for dbconfig - # (needed at first package installation) - if [ ! -f /usr/share/dbconfig-common/data/zoneminder/install/mysql ]; then - install -m 644 /usr/share/zoneminder/db/zm_create.sql \ - /usr/share/dbconfig-common/data/zoneminder/install/mysql - # Remove unneeded sql requests - # dbconfig will create the underlying database - sed -i "/^ *CREATE DATABASE /d" \ - /usr/share/dbconfig-common/data/zoneminder/install/mysql - sed -i "/^ *USE /d" \ - /usr/share/dbconfig-common/data/zoneminder/install/mysql - fi - - # Symlink sql update files for dbconfig (needed when upgrading the package) - for sqlfile in /usr/share/zoneminder/db/zm_update-*.sql; do - lnk=`echo $sqlfile | sed "s/^\/usr\/share\/zoneminder\/db\/zm_update-\(.*\)\.sql/\1/"` - if [ ! -L /usr/share/dbconfig-common/data/zoneminder/upgrade/mysql/$lnk ]; then - ln -sf $sqlfile \ - /usr/share/dbconfig-common/data/zoneminder/upgrade/mysql/$lnk - fi - done || true - - # Create the underlying database and populate it - # dbconfig will take care of applying any updates which are newer than the - # previously installed version - dbc_go zoneminder $@ - - # Get the password of ZoneMinder user 'admin' from debconf - db_get zoneminder/admin_password - ADMIN_PASSWORD=$RET - - # Remove the password from debconf database - test -z $ADMIN_PASSWORD || db_reset zoneminder/admin_password || true - - # Get the lastest database version from dbconfig upgrade folder - DB_VERSION=$(ls -rv /usr/share/dbconfig-common/data/zoneminder/upgrade/$dbc_dbtypes | head -1) - - # Update the default admin account and database version - mysql_update -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/debian8/zoneminder-database.postrm b/distros/debian8/zoneminder-database.postrm deleted file mode 100644 index 231f01ad7..000000000 --- a/distros/debian8/zoneminder-database.postrm +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh -# postrm maintainer script for zoneminder-db package - -set -e - -# Source the debconf stuff -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi - -# Source the dbconfig stuff -if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then - . /usr/share/dbconfig-common/dpkg/postrm - # Ask the user what do to with dbconfig when removing the package - dbc_go zoneminder $@ -fi - -if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then - # Remove dbconfig stuff added in postinst script - rm -rf /usr/share/dbconfig-common/data/zoneminder - # No need to manually remove the zm database, dbconfig take care of this -fi - -if [ "$1" = "purge" ]; then - # Delete a potential remaining file used in postinst script - rm -f /etc/zm/zm.conf.postinst.bak -fi - -#DEBHELPER# - -# postrm rm may freeze without that -db_stop - -exit 0 diff --git a/distros/debian8/zoneminder-database.prerm b/distros/debian8/zoneminder-database.prerm deleted file mode 100644 index 31786116a..000000000 --- a/distros/debian8/zoneminder-database.prerm +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh -# prerm script for zoneminder-db package - -set -e - -# Source the debconf stuff if file exists -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi - -# If dbconfig-common is installed and has been used by zoneminder -if [ -f /usr/share/dbconfig-common/dpkg/prerm ] \ - && [ -f /etc/dbconfig-common/zoneminder.conf ]; then - # Source the dbconfig stuff - . /usr/share/dbconfig-common/dpkg/prerm - # Ask the user what do to with dbconfig before removing the package - dbc_go zoneminder $@ -fi - -# #DEBHELPER# - -exit 0 diff --git a/distros/debian8/zoneminder-database.templates b/distros/debian8/zoneminder-database.templates deleted file mode 100644 index 4de4342f6..000000000 --- a/distros/debian8/zoneminder-database.templates +++ /dev/null @@ -1,58 +0,0 @@ -Template: zoneminder/debconf_dblocation -Type: select -__Choices: local, remote -Default: local -_Description: Database location: - A database server is required to run ZoneMinder. The database can be installed - either locally or remotely on a machine of your network. - . - If you choose a remote location, you will have to select the 'tcp/ip' - connection method and enter the hostname or ip address of the remote machine - in the next configuration screens. - -Template: zoneminder/debconf_dblocalmissingerror -Type: error -_Description: No local database server is available: - Currently ZoneMinder supports mysql or mariadb database server but none of them - appears to be installed on this machine. - . - In order to complete ZoneMinder's installation, after ending of this assistant, - please install a compatible database server and then restart the assistant by - invoking: - . - $ sudo dpkg-reconfigure zoneminder - -Template: zoneminder/debconf_dbconfigerror -Type: error -_Description: Remote database servers are not allowed: - The current configuration of dbconfig-common does not allow installation of - a database on remote servers. - . - In order to reconfigure dbconfig-common, please invoke the following command - after ending of this assistant: - . - $ sudo dpkg-reconfigure dbconfig-common - . - Then, to complete ZoneMinder's installation, please restart this assistant by - invoking: - . - $ sudo dpkg-reconfigure zoneminder - -Template: zoneminder/admin_password -Type: password -_Description: New password for the ZoneMinder 'admin' user: - Please enter the password of the default administrative user. - . - While not mandatory, it is highly recommended that you set a custom password - for the administrative 'admin' user. - . - If this field is left blank, the password will not be changed. - -Template: zoneminder/admin_password_again -Type: password -_Description: Repeat password for the ZoneMinder 'admin' user: - -Template: zoneminder/password_mismatch -Type: error -_Description: Password input error - The two passwords you entered were not the same. Please try again. diff --git a/distros/debian8/zoneminder-ui-base.config b/distros/debian8/zoneminder-ui-base.config deleted file mode 100644 index 2660208a8..000000000 --- a/distros/debian8/zoneminder-ui-base.config +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# config maintainer script for zoneminder-ui-base package - -set -e - -# Source the debconf stuff -. /usr/share/debconf/confmodule - -# Do this when the package is installed, upgraded or reconfigured -# Most of answers are cached so the questions will not be asked again -if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then - - # Ask the user for the web server(s) to configure - db_input high zoneminder/webserver || true - db_go || true -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/debian8/zoneminder-ui-base.install b/distros/debian8/zoneminder-ui-base.install deleted file mode 100644 index f72b569be..000000000 --- a/distros/debian8/zoneminder-ui-base.install +++ /dev/null @@ -1,11 +0,0 @@ -debian/apache.conf etc/zm -usr/lib/cgi-bin -usr/share/zoneminder/ajax -usr/share/zoneminder/css -usr/share/zoneminder/graphics -usr/share/zoneminder/includes -usr/share/zoneminder/index.php -usr/share/zoneminder/js -usr/share/zoneminder/lang -usr/share/zoneminder/tools -usr/share/zoneminder/views diff --git a/distros/debian8/zoneminder-ui-base.links b/distros/debian8/zoneminder-ui-base.links deleted file mode 100644 index b00a147d6..000000000 --- a/distros/debian8/zoneminder-ui-base.links +++ /dev/null @@ -1 +0,0 @@ -usr/lib/cgi-bin usr/share/zoneminder/cgi-bin diff --git a/distros/debian8/zoneminder-ui-base.postinst b/distros/debian8/zoneminder-ui-base.postinst deleted file mode 100644 index a5bce3c98..000000000 --- a/distros/debian8/zoneminder-ui-base.postinst +++ /dev/null @@ -1,48 +0,0 @@ -#! /bin/sh -# postinst maintainer script for zoneminder-ui-base package - -set -e - -# Source the debconf stuff -. /usr/share/debconf/confmodule - -apache_install() { - - mkdir -p /etc/apache2/conf-available - ln -sf ../../zm/apache.conf /etc/apache2/conf-available/zoneminder.conf - - COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - - if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then - . /usr/share/apache2/apache2-maintscript-helper - apache2_invoke enconf zoneminder - elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/zoneminder.conf ] && ln -s ../conf-available/zoneminder.conf /etc/apache2/conf.d/zoneminder.conf - fi - - # Enable CGI script module in apache (not enabled by default on jessie) - a2enmod cgi >/dev/null 2>&1 - - # Reload the web server - deb-systemd-invoke reload apache2.service || true -} - -# Do this when the package is installed, upgraded or reconfigured -if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then - - # Configure the web server - db_get zoneminder/webserver - webservers="$RET" - - for webserver in $webservers; do - webserver=${webserver%,} - # Currently we only support apache2 - if [ "$webserver" = "apache2" ] ; then - apache_install $1 - fi - done -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/debian8/zoneminder-ui-base.postrm b/distros/debian8/zoneminder-ui-base.postrm deleted file mode 100644 index fd4d0d6d8..000000000 --- a/distros/debian8/zoneminder-ui-base.postrm +++ /dev/null @@ -1,41 +0,0 @@ -#! /bin/sh -# postrm maintainer script for zoneminder-ui-base package - -set -e - -# Source the debconf stuff -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi - -apache_remove() { - COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then - . /usr/share/apache2/apache2-maintscript-helper - apache2_invoke disconf zoneminder - elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - rm -f /etc/apache2/conf.d/zoneminder.conf - fi - rm -f /etc/apache2/conf-available/zoneminder.conf - # Reload the web server - deb-systemd-invoke reload apache2.service || true -} - -if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then - # Deconfigure the web server - db_get zoneminder/webserver || true - for webserver in $RET; do - webserver=${webserver%,} - # Currently we only support apache2 - if [ "$webserver" = "apache2" ] ; then - apache_remove $1 - fi - done -fi - -#DEBHELPER# - -# postrm rm may freeze without that -db_stop - -exit 0 diff --git a/distros/debian8/zoneminder-ui-base.templates b/distros/debian8/zoneminder-ui-base.templates deleted file mode 100644 index 31e70277f..000000000 --- a/distros/debian8/zoneminder-ui-base.templates +++ /dev/null @@ -1,7 +0,0 @@ -Template: zoneminder/webserver -Type: multiselect -Choices: apache2 -Default: apache2 -_Description: Web server to reconfigure automatically: - Please choose the web server that should be automatically configured for - ZoneMinder's web portal access. diff --git a/distros/debian8/zoneminder-ui-classic.install b/distros/debian8/zoneminder-ui-classic.install deleted file mode 100644 index 9532d9dc9..000000000 --- a/distros/debian8/zoneminder-ui-classic.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/classic diff --git a/distros/debian8/zoneminder-ui-mobile.install b/distros/debian8/zoneminder-ui-mobile.install deleted file mode 100644 index 464bb74eb..000000000 --- a/distros/debian8/zoneminder-ui-mobile.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/mobile diff --git a/distros/debian8/zoneminder-ui-xml.install b/distros/debian8/zoneminder-ui-xml.install deleted file mode 100644 index 6617707f8..000000000 --- a/distros/debian8/zoneminder-ui-xml.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/xml diff --git a/distros/debian_cmake/README.Debian b/distros/debian_cmake/README.Debian deleted file mode 100644 index a49b6be72..000000000 --- a/distros/debian_cmake/README.Debian +++ /dev/null @@ -1,51 +0,0 @@ -zoneminder for Debian ---------------------- - -There is one manual step to get the web interface working. -You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf, -then reload the apache config (i.e. /etc/init.d/apache2 reload) - -Changing the location for images and events -------------------------------------------- - -Zoneminder, in its upstream form, stores data in /usr/share/zoneminder/. This -package modifies that by changing /usr/share/zoneminder/images and -/usr/share/zoneminder/events to symlinks to directories under -/var/cache/zoneminder. - -There are numerous places these could be put and ways to do it. But, at the -moment, if you change this, an upgrade will fail with a warning about these -locations having changed (the reason for this was that previously, an upgrade -would silently revert the changes and cause event loss - refer -bug #608793). - -If you do want to change the location, here are a couple of suggestions. - -These lines would mount /dev/sdX1 to /video_storage, and then 'link' /video_storage -to the locations that ZoneMinder expects them to be at. - - /dev/sdX1 /video_storage ext4 defaults 0 2 - /video_storage/zoneminder/images /var/cache/zoneminder/images none bind 0 2 - /video_storage/zoneminder/events /var/cache/zoneminder/events none bind 0 2 - - or if you have a separate partition for each: - - /dev/sdX1 /var/cache/zoneminder/images ext4 defaults 0 2 - /dev/sdX2 /var/cache/zoneminder/events ext4 defaults 0 2 - - - - -- Peter Howard , Sun, 16 Jan 2010 01:35:51 +1100 - -Access to /dev/video* ---------------------- - -For cameras which require access to /dev/video*, zoneminder may need the -www-data user added to the video group in order to see those cameras: - - adduser www-data video - -Note that all web applications running on the zoneminder server will then have -access to all video devices on the system. - - -- Vagrant Cascadian Sun, 27 Mar 2011 13:06:56 -0700 diff --git a/distros/debian_cmake/apache.conf b/distros/debian_cmake/apache.conf deleted file mode 100644 index 965c67f86..000000000 --- a/distros/debian_cmake/apache.conf +++ /dev/null @@ -1,9 +0,0 @@ -Alias /zm /usr/share/zoneminder/www - - - php_flag register_globals off - Options Indexes FollowSymLinks - - DirectoryIndex index.php - - diff --git a/distros/debian_cmake/changelog b/distros/debian_cmake/changelog deleted file mode 100644 index 46f1e2bd9..000000000 --- a/distros/debian_cmake/changelog +++ /dev/null @@ -1,47 +0,0 @@ -zoneminder (1.28.108-nmu2015100101) wheezy; urgency=low - - * - - -- Isaac Connor Thu, 01 Oct 2015 18:20:29 +0000 - -zoneminder (1.28.107-nmu2015092401) wheezy; urgency=low - - * - - -- Isaac Connor Thu, 24 Sep 2015 14:15:46 +0000 - -zoneminder (1.28.1+106-nmu2015091001) wheezy; urgency=low - - * - - -- Isaac Connor Thu, 10 Sep 2015 18:03:43 +0000 - -zoneminder (1.28.0-0.1) wheezy; urgency=low - - * Use CMake instead of Autotools to simplify - debian/rules and have less build-depends. - * Some lintian love in debian/{control,copyright} - and perl ZoneMinder modules. - * Don't purge database if we use a remote - MySQL server. - - -- Cosme Domínguez Díaz Sun, 09 Nov 2014 02:20:20 +0100 - -zoneminder (1.28.0-wheezy) wheezy; urgency=medium - - * Release - - -- Isaac Connor Fri, 17 Oct 2014 09:27:22 -0400 - -zoneminder (1.27.99+1-testing-SNAPSHOT2014072901) testing; urgency=medium - - * improve error messages - * Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates - - -- Isaac Connor Tue, 29 Jul 2014 14:50:20 -0400 - -zoneminder (1.27.0+1-testing-v4ltomonitor-1) testing; urgency=high - - * Snapshot release - - - -- Isaac Connor Wed, 09 Jul 2014 21:35:29 -0400 diff --git a/distros/debian_cmake/compat b/distros/debian_cmake/compat deleted file mode 100644 index ec635144f..000000000 --- a/distros/debian_cmake/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/distros/debian_cmake/control b/distros/debian_cmake/control deleted file mode 100644 index 3b11f37b8..000000000 --- a/distros/debian_cmake/control +++ /dev/null @@ -1,71 +0,0 @@ -Source: zoneminder -Section: net -Priority: optional -Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), cmake - , libphp-serialization-perl - , libgnutls28-dev | libgnutls-dev - , libmysqlclient-dev | libmariadbclient-dev - , libjpeg8-dev - , libpcre3-dev - , libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev - , libv4l-dev (>= 0.8.3) - , libbz2-dev - , libav-tools - , libnetpbm10-dev - , libavdevice-dev - , libvlccore-dev, libvlc-dev - , libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev - , libgcrypt11-dev, libpolkit-gobject-1-dev -Standards-Version: 3.9.4 - -Package: zoneminder -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} - , apache2 | httpd, libapache2-mod-php5 | libapache2-mod-fcgid | php5-fpm - , php5-mysqlnd | php5-mysql - , mariadb-client | mysql-client - , libphp-serialization-perl - , libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, libdbd-mysql-perl - , libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl - , libmodule-load-perl, libsys-mmap-perl, libjson-any-perl - , libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl - , libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl - , libsys-cpu-perl, libsys-meminfo-perl - , libpcre3 - , libav-tools, libavdevice53 - , rsyslog | system-log-daemon - , netpbm , libjpeg8 - , zip - , libvlccore5 | libvlccore7, libvlc5 - , libpolkit-gobject-1-0, php5-gd -Recommends: mysql-server | mariadb-server -Description: Video camera security and surveillance solution - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - -Package: zoneminder-dbg -Architecture: any -Section: debug -Priority: extra -Depends: zoneminder (= ${binary:Version}), ${misc:Depends} -Description: Debugging symbols for zoneminder. - ZoneMinder is a video camera security and surveillance solution. - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. diff --git a/distros/debian_cmake/copyright b/distros/debian_cmake/copyright deleted file mode 100644 index 1c10c59db..000000000 --- a/distros/debian_cmake/copyright +++ /dev/null @@ -1,57 +0,0 @@ -Copyright: - -Copyright 2002 Philip Coombes - -License: - -This package is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2 of the License, or (at your -option) any later version. - -This package is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public -License along with this package; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian GNU/Linux systems, the text of the GPL can be found in -/usr/share/common-licenses/GPL. - -/usr/share/zoneminder/api/lib/Cake/*: -Copyright: - -Copyright (c) 2005-2013, Cake Software Foundation, Inc. - -License: - -CakePHP(tm) : The Rapid Development PHP Framework (http://cakephp.org) - -The MIT License - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. - -Cake Software Foundation, Inc. -1785 E. Sahara Avenue, -Suite 490-204 -Las Vegas, Nevada 89104, -United States of America. diff --git a/distros/debian_cmake/dirs b/distros/debian_cmake/dirs deleted file mode 100644 index 9e29e6113..000000000 --- a/distros/debian_cmake/dirs +++ /dev/null @@ -1,5 +0,0 @@ -var/log/zm -var/lib/zm -var/cache/zoneminder/events -var/cache/zoneminder/images -var/cache/zoneminder/temp diff --git a/distros/debian_cmake/docs b/distros/debian_cmake/docs deleted file mode 100644 index b43bf86b5..000000000 --- a/distros/debian_cmake/docs +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/distros/debian_cmake/init.d b/distros/debian_cmake/init.d deleted file mode 100644 index 036bb695d..000000000 --- a/distros/debian_cmake/init.d +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: zoneminder -# Required-Start: $network $remote_fs $syslog -# Required-Stop: $network $remote_fs $syslog -# Should-Start: mysql -# Should-Stop: mysql -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Control ZoneMinder as a Service -### END INIT INFO -# description: Control ZoneMinder as a Service -# chkconfig: 2345 20 20 - -# Source function library. -#. /etc/rc.d/init.d/functions - -prog=ZoneMinder -ZM_PATH_BIN="/usr/bin" -RUNDIR=/var/run/zm -TMPDIR=/tmp/zm -command="$ZM_PATH_BIN/zmpkg.pl" - -start() { - echo -n "Starting $prog: " - export TZ=:/etc/localtime - mkdir -p $RUNDIR $TMPDIR && chown www-data:www-data $RUNDIR $TMPDIR - $command start - RETVAL=$? - [ $RETVAL = 0 ] && echo success || echo failure - echo - [ $RETVAL = 0 ] && touch /var/lock/zm - return $RETVAL -} -stop() { - echo -n "Stopping $prog: " - # - # Why is this status check being done? - # as $command stop returns 1 if zoneminder - # is stopped, which will result in - # this returning 1, which will stuff - # dpkg when it tries to stop zoneminder before - # uninstalling . . . - # - result=`$command status` - if [ ! "$result" = "running" ]; then - echo "Zoneminder already stopped" - echo - RETVAL=0 - else - $command stop - RETVAL=$? - [ $RETVAL = 0 ] && echo success || echo failure - echo - [ $RETVAL = 0 ] && rm -f /var/lock/zm - fi -} -status() { - result=`$command status` - if [ "$result" = "running" ]; then - echo "ZoneMinder is running" - RETVAL=0 - else - echo "ZoneMinder is stopped" - RETVAL=1 - fi -} - -case "$1" in -'start') - start - ;; -'stop') - stop - ;; -'restart' | 'force-reload') - stop - start - ;; -'status') - status - ;; -*) - echo "Usage: $0 { start | stop | restart | status }" - RETVAL=1 - ;; -esac -exit $RETVAL diff --git a/distros/debian_cmake/install b/distros/debian_cmake/install deleted file mode 100644 index 97c5f7a03..000000000 --- a/distros/debian_cmake/install +++ /dev/null @@ -1,8 +0,0 @@ -usr/bin -usr/lib/zoneminder/cgi-bin -usr/share/man -usr/share/perl5/ZoneMinder -usr/share/perl5/ZoneMinder.pm -usr/share/zoneminder/db -usr/share/zoneminder/www -etc/zm diff --git a/distros/debian_cmake/links b/distros/debian_cmake/links deleted file mode 100644 index 5560a100a..000000000 --- a/distros/debian_cmake/links +++ /dev/null @@ -1,3 +0,0 @@ -var/cache/zoneminder/events usr/share/zoneminder/events -var/cache/zoneminder/images usr/share/zoneminder/images -var/cache/zoneminder/temp usr/share/zoneminder/temp diff --git a/distros/debian_cmake/postinst b/distros/debian_cmake/postinst deleted file mode 100644 index d06f9c641..000000000 --- a/distros/debian_cmake/postinst +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" = "configure" ]; then - if [ -e "/etc/init.d/mysql" ]; then - # - # Get mysql started if it isn't - # - if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then - invoke-rc.d mysql start - fi - if $(/etc/init.d/mysql status >/dev/null 2>&1); then - mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload - # test if database if already present... - if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then - cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf - echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - fi - - invoke-rc.d zoneminder stop || true - zmupdate.pl --nointeractive - - else - echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' - fi - else - echo 'mysql not found, assuming remote server.' - fi - chown www-data:www-data /var/log/zm - chown www-data:www-data /var/lib/zm/ - if [ -z "$2" ]; then - chown www-data:www-data -R /var/cache/zoneminder - fi -fi -# Ensure zoneminder is stopped... -if [ -x "/etc/init.d/zoneminder" ]; then - if invoke-rc.d zoneminder status ; then - invoke-rc.d zoneminder stop || exit $? - fi -fi - -if [ "$1" = "configure" ]; then - if [ -z "$2" ]; then - chown www-data:www-data /var/log/zm - chown www-data:www-data /var/lib/zm/ - chown www-data:www-data -R /var/cache/zoneminder - else - chown www-data:www-data /var/log/zm - zmupdate.pl - fi -fi -#DEBHELPER# diff --git a/distros/debian_cmake/postrm b/distros/debian_cmake/postrm deleted file mode 100644 index fde590981..000000000 --- a/distros/debian_cmake/postrm +++ /dev/null @@ -1,11 +0,0 @@ -#! /bin/sh -set -e - -if [ "$1" = "purge" ]; then - if [ -e "/etc/init.d/mysql" ]; then - echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm - fi -fi -#DEBHELPER# diff --git a/distros/debian_cmake/preinst b/distros/debian_cmake/preinst deleted file mode 100644 index 6cd01ba55..000000000 --- a/distros/debian_cmake/preinst +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -abort=false -if [ -L /usr/share/zoneminder/events ]; then - l=$(readlink /usr/share/zoneminder/events) - if [ "$l" != "/var/cache/zoneminder/events" ]; then - abort=true - fi -fi -if [ -L /usr/share/zoneminder/images ]; then - l=$(readlink /usr/share/zoneminder/images ) - if [ "$l" != "/var/cache/zoneminder/images" ]; then - abort=true - fi -fi - -if [ "$abort" = "true" ]; then - cat >&2 << EOF -Aborting installation of zoneminder due to non-default symlinks in -/usr/share/zoneminder for the images and/or events directory, which could -result in loss of data. Please move your data in each of these directories to -/var/cache/zoneminder before installing zoneminder from the package. -EOF - exit 1 - -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/debian_cmake/rules b/distros/debian_cmake/rules deleted file mode 100755 index 4bdc7cb0c..000000000 --- a/distros/debian_cmake/rules +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -export CFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -pipe -export CXXFLAGS = -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -pipe -INSTDIR = debian/tmp - -override_dh_auto_configure: - dh_auto_configure -- \ - -DCMAKE_INSTALL_PREFIX=/usr \ - -DCMAKE_SKIP_RPATH=ON \ - -DCMAKE_VERBOSE_MAKEFILE=OFF \ - -DCMAKE_COLOR_MAKEFILE=ON \ - -DZM_RUNDIR=/var/run/zm \ - -DZM_SOCKDIR=/var/run/zm \ - -DZM_TMPDIR=/var/tmp/zm \ - -DZM_LOGDIR=/var/log/zm \ - -DZM_WEBDIR=/usr/share/zoneminder/www \ - -DZM_CONTENTDIR=/var/cache/zoneminder \ - -DZM_CGIDIR=/usr/lib/zoneminder/cgi-bin \ - -DZM_WEB_USER=www-data \ - -DZM_WEB_GROUP=www-data \ - -DCMAKE_INSTALL_SYSCONFDIR=etc/zm - -override_dh_auto_install: - dh_auto_install --buildsystem=cmake - install -D -m 0644 debian/apache.conf $(INSTDIR)/etc/zm/apache.conf - rm $(INSTDIR)/usr/share/zoneminder/api/lib/Cake/LICENSE.txt - rm $(INSTDIR)/usr/share/zoneminder/api/.gitignore - rm -r $(INSTDIR)/usr/share/zoneminder/api/lib/Cake/Test - -override_dh_auto_test: - # do not run tests... - -override_dh_strip: - dh_strip --dbg-package=zoneminder-dbg - -%: - dh $@ --buildsystem=cmake --parallel diff --git a/distros/debian_cmake/watch b/distros/debian_cmake/watch deleted file mode 100644 index 5a8a9c4d7..000000000 --- a/distros/debian_cmake/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.zoneminder.com/downloads.html \ - .*/ZoneMinder-(.*).tar.gz diff --git a/distros/fedora/archive/zoneminder.cmake.f19.spec b/distros/fedora/archive/zoneminder.cmake.f19.spec index 771209247..0af88f41f 100644 --- a/distros/fedora/archive/zoneminder.cmake.f19.spec +++ b/distros/fedora/archive/zoneminder.cmake.f19.spec @@ -140,7 +140,6 @@ fi # zmfix removed from zoneminder 1.26.6 #%attr(4755,root,root) %{_bindir}/zmfix %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/archive/zoneminder.f19.spec b/distros/fedora/archive/zoneminder.f19.spec index 11a8ba249..d1be12aa2 100644 --- a/distros/fedora/archive/zoneminder.f19.spec +++ b/distros/fedora/archive/zoneminder.f19.spec @@ -232,7 +232,6 @@ fi # zmfix removed from zoneminder 1.26.6 #%attr(4755,root,root) %{_bindir}/zmfix %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/archive/zoneminder.f20.spec b/distros/fedora/archive/zoneminder.f20.spec index b06db673d..513a9cfee 100644 --- a/distros/fedora/archive/zoneminder.f20.spec +++ b/distros/fedora/archive/zoneminder.f20.spec @@ -142,7 +142,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/archive/zoneminder.f21.spec b/distros/fedora/archive/zoneminder.f21.spec index 6dfabceea..35662bf6c 100644 --- a/distros/fedora/archive/zoneminder.f21.spec +++ b/distros/fedora/archive/zoneminder.f21.spec @@ -142,7 +142,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/fedora/zonemidner.f22.spec b/distros/fedora/zoneminder.f22.spec similarity index 100% rename from distros/fedora/zonemidner.f22.spec rename to distros/fedora/zoneminder.f22.spec diff --git a/distros/fedora/zoneminder.f23.spec b/distros/fedora/zoneminder.f23.spec index 435a3ba58..5335b90cc 100644 --- a/distros/fedora/zoneminder.f23.spec +++ b/distros/fedora/zoneminder.f23.spec @@ -163,7 +163,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu @@ -180,6 +179,7 @@ fi %{perl_vendorlib}/ONVIF* %{perl_vendorlib}/WSDiscovery* %{perl_vendorlib}/WSSecurity* +%{perl_vendorlib}/WSNotification* %{_mandir}/man*/* %dir %{_libexecdir}/zoneminder %{_libexecdir}/zoneminder/cgi-bin diff --git a/distros/redhat/archive/zoneminder.el6.spec b/distros/redhat/archive/zoneminder.el6.spec index d61a153e7..46bce099a 100644 --- a/distros/redhat/archive/zoneminder.el6.spec +++ b/distros/redhat/archive/zoneminder.el6.spec @@ -237,7 +237,6 @@ fi # zmfix removed from zoneminder 1.26.6 #%attr(4755,root,root) %{_bindir}/zmfix %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu diff --git a/distros/redhat/zoneminder.el6.spec b/distros/redhat/zoneminder.el6.spec index 69e3b972f..0b7770b50 100644 --- a/distros/redhat/zoneminder.el6.spec +++ b/distros/redhat/zoneminder.el6.spec @@ -150,7 +150,6 @@ rm -rf %{_docdir}/%{name}-%{version} %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu @@ -169,6 +168,7 @@ rm -rf %{_docdir}/%{name}-%{version} %{perl_vendorlib}/ONVIF* %{perl_vendorlib}/WSDiscovery* %{perl_vendorlib}/WSSecurity* +%{perl_vendorlib}/WSNotification* %{_mandir}/man*/* %dir %{_libexecdir}/%{name} %{_libexecdir}/%{name}/cgi-bin diff --git a/distros/redhat/zoneminder.el7.spec b/distros/redhat/zoneminder.el7.spec index 485c214c2..b72e0bbe7 100644 --- a/distros/redhat/zoneminder.el7.spec +++ b/distros/redhat/zoneminder.el7.spec @@ -159,7 +159,6 @@ fi %{_bindir}/zmf %{_bindir}/zmfilter.pl %{_bindir}/zmpkg.pl -%{_bindir}/zmstreamer %{_bindir}/zmtrack.pl %{_bindir}/zmtrigger.pl %{_bindir}/zmu @@ -178,6 +177,7 @@ fi %{perl_vendorlib}/ONVIF* %{perl_vendorlib}/WSDiscovery* %{perl_vendorlib}/WSSecurity* +%{perl_vendorlib}/WSNotification* %{_mandir}/man*/* %dir %{_libexecdir}/zoneminder %{_libexecdir}/zoneminder/cgi-bin diff --git a/distros/ubuntu1204_cmake/NEWS b/distros/ubuntu1204/NEWS similarity index 100% rename from distros/ubuntu1204_cmake/NEWS rename to distros/ubuntu1204/NEWS diff --git a/distros/ubuntu1204/README.Debian b/distros/ubuntu1204/README.Debian index b8ea413e3..2ba809fe4 100644 --- a/distros/ubuntu1204/README.Debian +++ b/distros/ubuntu1204/README.Debian @@ -1,9 +1,120 @@ -zoneminder for Debian +Zoneminder for Debian --------------------- -There is one manual step to get the web interface working. -You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf, -then reload the apache config (i.e. /etc/init.d/apache2 reload) +Initializing database +--------------------- + + pv /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf +OR + cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf + + echo 'grant lock tables,alter,create,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";'\ + | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql + +Hint: generate secure password with `pwgen` and update "/etc/zm/zm.conf" +accordingly. + +The following command can help to ensure that zoneminder can read its +configuration file: + + chgrp -c www-data /etc/zm/zm.conf + + +Upgrading database +------------------ + +Prior to 1.28.1 database upgrade was performed automatically. +"zoneminder" service will refuse to start with outdated database. + +Assuming that database is on "localhost" then the following command can be +used to upgrade "zm" database: + + zmupdate.pl + +Additional permissions may be required to perform upgrade: + + echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";'\ + | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql + +The following command prints the current version of zoneminder database: + + echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' \ + | sudo mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm + + +Enabling service +---------------- + +By default Zoneminder service is not starting automatically and need to be +manually activated once database is configured: + +On systemd: + + sudo systemctl enable zoneminder.service + +On SysV: + + sudo update-rc.d zoneminder enable + + +Web server set-up +----------------- + +There are few manual steps to get the web interface working: + +## Apache2 + +Apache can be configured as folder "/zm" using sample .conf: + + sudo a2enconf zoneminder + +Alternatively Apache web site configuration template can be used to setup +zoneminder as "http://zoneminder": + + sudo cp -v /usr/share/doc/zoneminder/examples/apache.conf /etc/apache2/sites-available/ + sudo a2ensite zoneminder.conf + +Common configuration steps for Apache2: + + sudo a2enmod cgi + sudo service apache2 reload + + +## nginx / fcgiwrap + +Nginx needs "php5-fpm" package to support PHP and "fcgiwrap" package +for binary "cgi-bin" applications: + + sudo apt-get install php5-fpm fcgiwrap + +To enable a URL alias that makes Zoneminder available from + + http://yourserver/zm + +the following line is to be added to "server" section of a web site +configuration: + + include /usr/share/doc/zoneminder/examples/nginx.conf; + +For "default" web site it would be sufficient to include the above +statement to the file + + /etc/nginx/sites-enabled/default + +To avoid problems with feeds from multiple cameras "fcgiwrap" should be +configured to start at least as many processes as there are cameras. +It can be done by adjusting DAEMON_OPTS in "/etc/default/fcgiwrap". +Systemd users may be affected by the following bug: + + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792705 + + +## Note: + +When Zoneminder web site is running it may be necessary to set +Options/Paths/PATH_ZMS to "/zm/cgi-bin/nph-zms" or according to chosen web +site configuration. + Changing the location for images and events ------------------------------------------- @@ -33,19 +144,17 @@ These lines in fstab could allow you to bind-mount an alternate location /dev/sdX1 /var/cache/zoneminder/images ext3 defaults 0 2 /dev/sdX2 /var/cache/zoneminder/events ext3 defaults 0 2 - - -- Peter Howard , Sun, 16 Jan 2010 01:35:51 +1100 Access to /dev/video* --------------------- -For cameras which require access to /dev/video*, zoneminder may need the +For cameras which require access to /dev/video*, zoneminder may need the www-data user added to the video group in order to see those cameras: adduser www-data video -Note that all web applications running on the zoneminder server will then have +Note that all web applications running on the zoneminder server will then have access to all video devices on the system. -- Vagrant Cascadian Sun, 27 Mar 2011 13:06:56 -0700 diff --git a/distros/ubuntu1204_cmake/TODO.Debian b/distros/ubuntu1204/TODO.Debian similarity index 100% rename from distros/ubuntu1204_cmake/TODO.Debian rename to distros/ubuntu1204/TODO.Debian diff --git a/distros/ubuntu1204/apache.conf b/distros/ubuntu1204/apache.conf deleted file mode 100644 index 262db423f..000000000 --- a/distros/ubuntu1204/apache.conf +++ /dev/null @@ -1,21 +0,0 @@ -Alias /zm /usr/share/zoneminder/www - - - - Options +ExecCGI - AllowOverride All - AddHandler fcgid-script .php - FCGIWrapper /usr/bin/php5-cgi - Order allow,deny - Allow from all - - - - - php_flag register_globals off - Options Indexes FollowSymLinks - - DirectoryIndex index.php - - - diff --git a/distros/ubuntu1204/changelog b/distros/ubuntu1204/changelog index 09571c21b..74cf1d0b8 100644 --- a/distros/ubuntu1204/changelog +++ b/distros/ubuntu1204/changelog @@ -1,94 +1,573 @@ -zoneminder (1.28.1+1-trusty-SNAPSHOT2015071501) trusty; urgency=medium +zoneminder (1.28.1+1-vivid-SNAPSHOT2015081701) vivid; urgency=medium - * fix for issue #586 and #932 - * fix for db not being upgraded - * version upgraded to .100 + * include api, switch to cmake build - -- Isaac Connor Wed, 15 Jul 2015 11:56:28 -0400 + -- Isaac Connor Mon, 17 Aug 2015 10:29:23 -0400 -zoneminder (1.28.1+1-trusty-SNAPSHOT2015030201) trusty; urgency=medium - * maybe fix for RTSP Basic Auth - * Also remove dependency on netpbm +zoneminder (1.28.1-8) unstable; urgency=medium - -- Isaac Connor Mon, 02 Mar 2015 11:25:59 -0500 + * Patchworks: + + New upstream "980-fix-image-size.patch". + + New "default_cgi-path.patch" to correct default ZM_PATH_ZMS. + * postinst: set "root" as group owner for "/var/log/zm" to silence + logrotate warnings. + * Minor correction to README.Debian. -zoneminder (1.28.1+1-utopic-SNAPSHOT2015022301) utopic; urgency=medium + -- Dmitry Smirnov Sun, 16 Aug 2015 19:19:50 +1000 - * Big merge of onvif support and some fixes. +zoneminder (1.28.1-7) unstable; urgency=medium - -- Isaac Connor Mon, 23 Feb 2015 19:45:45 -0500 + * Build-Depends += "cakephp (<< 3.0.0~)"; + Zoneminder is not compatible with latest CakePHP. + * Handle conffile removal from maintscript. + * rules: build man pages reproducibly. + * gbp.conf: renamed old style config section [git-dch] to [dch]. + * README + + added instructions to update owner of the "/etc/zm/zm.conf" + (Closes: #789327). + + zmupdate.pl needs CREATE rights. + + added note about required number of "fcgiwrap" workers. + * New upstream patch: "zmtrigger-plus.patch". -zoneminder (1.28.0+1-trusty-SNAPSHOT2015021201) trusty; urgency=medium + -- Dmitry Smirnov Mon, 20 Jul 2015 16:30:15 +1000 - * add mysql-client-5.6 as a dependency instaed of mysql-client. +zoneminder (1.28.1-6) unstable; urgency=low - -- Isaac Connor Fri, 13 Feb 2015 09:35:13 -0500 + * New "zoneminder-doc" and "zoneminder-dbg" packages. -zoneminder (1.28.0+1-trusty-SNAPSHOT2015011101) trusty; urgency=medium + -- Dmitry Smirnov Sun, 19 Apr 2015 14:50:41 +1000 - * small changes +zoneminder (1.28.1-5) unstable; urgency=low - -- Isaac Connor Fri, 12 Dec 2014 16:38:36 -0500 + * Move handling of "/var/run/zm" and "/tmp/zm" from .service into .tmpfile. + Let dh_installinit do the job. Thanks, Andrew Bauer. + * Use dh_apache2 to install Apache conf file; remove old conf and symlink. + * Promote "libapache2-mod-php5 | php5-fpm" to Recommends. + * Build-Depends: + + dh-linktree + + cakephp (>= 2.6.3) + + libjs-jquery + + libjs-mootools + * Depends: + - libjs-jquery + - libjs-mootools + * Build-time replace bundled CakePHP with system one using "dh-linktree". + * Use "dh-linktree" to handle mootools and jquery symlinks. -zoneminder (1.28.0+1-utopic-SNAPSHOT2014112001) utopic; urgency=medium + -- Dmitry Smirnov Sun, 19 Apr 2015 11:45:01 +1000 - * Various fixes and developments since 1.28.0. Includes Digest-Auth for HTTP and better for RTSP +zoneminder (1.28.1-4) unstable; urgency=low - -- Isaac Connor Thu, 20 Nov 2014 10:57:57 -0500 + * New patch to fix HTML export with USE_DEEP_STORAGE (closes: #723706). + * New "783.patch" to describe potential data loss in ZM_USE_DEEP_STORAGE. + * New patch to change default date format to region-neutral ISO notation + with time zone. + * Build sphinx documentation: + + Install "zoneminder.1" man page. + + Build-Depends += "python-sphinx | python3-sphinx" + + Added commented "zoneminder-doc" package. + + Added "docs.patch" to unlink distro-specific installation docs. + * rules: + + set ZM_CONTENTDIR, ZM_SOCKDIR and ZM_TMPDIR. + + remove mistakengly installed Perl module templates. + * Updated startup scripts to create ZM_TMPDIR. + * Hurd improvements: + + New patch to add PATH_MAX definitions. + + Build without MMAP support on Hurd. + + libsys-mmap-perl [!hurd-any]. -zoneminder (1.28.0-trusty) trusty; urgency=medium + -- Dmitry Smirnov Mon, 06 Apr 2015 18:18:55 +1000 - * Release +zoneminder (1.28.1-3) unstable; urgency=low - -- Isaac Connor Fri, 17 Oct 2014 09:25:55 -0400 + * Updated Apache2 and nginx configuration templates to support CGI. + * Updated README.Debian to document cgi-bin setup. + * Removed "/usr/share/zoneminder/www/cgi-bin" symlink. + * Added "apache2.patch" to correct Apache2 site configuration example. + * control: Suggests += "fcgiwrap". + * rules: added dh_systemd overrides to prevent automatic service + activation and start. + * Added note about manual service activation to README.Debian + (Closes: #781733). -zoneminder (1.27.99+1-trusty-SNAPSHOT2014101401) trusty; urgency=medium + -- Dmitry Smirnov Thu, 02 Apr 2015 23:20:20 +1100 - * Several PR merges in big push for 1.28.0 +zoneminder (1.28.1-2) unstable; urgency=low - -- Isaac Connor Tue, 14 Oct 2014 09:28:29 -0400 + * Removed word "Linux" from short package description. + * Build-Depends: do not require "libv4l-dev" on Hurd i.e. [!hurd-any]. + * Added run-time Perl Depends: + + libdbd-mysql-perl + + libimage-info-perl + + libmodule-load-conditional-perl + + libnet-sftp-foreign-perl + + liburi-encode-perl + * Prepare for package split: added commented "libzoneminder-perl" + and "zoneminder-dbg" packages to "debian/control". + * rules: do not install worthless ".packlist" file. + * Updated "libv4l1-videodev.h.patch" to fix v4lv1 detection in CMake. -zoneminder (1.27.99+1-trusty-SNAPSHOT2014092601) trusty; urgency=medium + -- Dmitry Smirnov Thu, 02 Apr 2015 13:25:19 +1100 - * style updates and db fixes for database logging filters +zoneminder (1.28.1-1) unstable; urgency=low - -- Isaac Connor Fri, 26 Sep 2014 14:44:45 -0400 + [ Dmitry Smirnov ] + * New upstream release [February 2015]. + * Upload to unstable. + * Disabled automatic database upgrades: post(inst|rm) scripts no longer + touch database or do unexpected stuff (Closes: #779254). + See README.Debian for details. + * Updated installation paths: + + /usr/share/zoneminder --> /usr/share/zoneminder/www + + /usr/lib/cgi-bin --> /usr/lib/zoneminder/cgi-bin + * Added logrotate config (Closes: #544826). + Thanks, Alberto Reyes. + * Native systemd service; "--with systemd" added to dh. + * Build with CMake instead of autoconf; rules clean-up. + * Build with all hardening. + * Build and install "zmupdate.pl.1" man page. + * Added nginx/php5-fpm configuration example. + * Install upstream "apache.conf" example. + * Described setup of Zoneminer web site and database in README.Debian. + * Install "/etc/zm/zm.conf" with tighter permissions. + * Added TODO.Debian. + * Added "debian/clean"; "debian/gbp.conf"; bug-presubj. + * Remove bundled Cake tests to take ~5 MB off big-usr-share. + * Standards-Version: 3.9.6; compat/debhelper to version 9. + * Vcs links to new git repository at collab-maint. + * Build-Depends: + + dh-systemd + + libgcrypt11-dev --> libgcrypt-dev + + libcurl4-gnutls-dev + + libvlc-dev + + policykit-1 (required by "zmsystemctl.pl") + - dh-autoreconf, autoconf, automake + * Depends: + - apache2 + - libapache2-mod-php5 (moved to Suggests) + - libpcre3 (invalid) + - libmodule-load-perl (obsolete; replaced with perl-modules) + - libarchive-tar-perl (obsolete; replaced with perl-modules) + - mysql-server (moved to Recommends, Closes: #759504). + - php5 + + libav-tools + + libjs-jquery (replaces bundled component) + + libjs-mootool (replaces bundled component) + + libjson-any-perl (Closes: #690803). + + perl-modules (Closes: #745819). + * Recommends: + + apache2 | httpd + + mysql-server | virtual-mysql-server (Closes: #732874). + * Suggests: + + libapache2-mod-php5 | php5-fpm + + logrotate + * Refreshed, renamed and re-ordered patches; added DEP-3 headers. + * Removed "vendor_perl" patch (applied-upstream). + * New patches: + + cmake-fix-confpath.patch + + cmake-gnutls.patch + + cmake-nossl.patch + + cmake.patch + + format-hardening.patch + + pod_man_fixes.patch + + pod_name_fixes.patch + + pod_zmupdate-to-pod2usage.patch + * Lintianisation (incomplete): + - extra-license-file + - init.d-script-missing-lsb-description + - init.d-script-does-not-source-init-functions + - privacy-breach-generic + - package-contains-empty-directory + - manpage-has-errors-from-pod2man + - manpage-has-bad-whatis-entry + - quilt-patch-missing-description + - no-dep5-copyright + * Lintian-overrides: + + unusual-interpreter usr/bin/zmsystemctl.pl #!/usr/bin/pkexec + + script-not-executable usr/share/zoneminder/www/api/* + + script-with-language-extension usr/bin/*.pl + + source-is-missing web/tools/mootools/mootools-*-yc.js + + source-is-missing web/skins/*/js/jquery-1.4.2.min.js + + source-contains-prebuilt-javascript-object + * Renamed files in "debian". + * watch: dfsg repacksuffix and dversionmangle. + * "debian/copyright" to Copyright-Format-1.0. + * Set myself as new Maintainer (Closes: #760314). -zoneminder (1.27.99+1-trusty-SNAPSHOT2014090801) trusty; urgency=medium + [ Vagrant Cascadian ] + * Removed obsolete DM-Upload-Allowed flag. + * Update debian/watch to use tarballs from github. + * Add Build-Depends on libgcrypt11-dev (Closes: #745819). + * Use canonical alioth Vcs-Hg URL. + * debian/control: Add Build-Depends: libpolkit-gobject-1-dev. + * Removed configure flag "--enable-crashtrace=no", which is no longer + present upstream. - * several segfault fixes for local cameras + -- Dmitry Smirnov Tue, 31 Mar 2015 15:11:13 +1100 - -- Isaac Connor Mon, 08 Sep 2014 16:56:57 -0400 +zoneminder (1.26.5-3.1) experimental; urgency=low -zoneminder (1.27.99+1-trusty-SNAPSHOT2014090701) trusty; urgency=medium + * Non-maintainer upload. + * Add libav10.patch and compile against libav10 (Closes: #739461) - * Fix segfaults for local cameras, also now includes the systemd support patch + -- Reinhard Tartler Wed, 19 Mar 2014 00:31:22 +0000 - -- Isaac Connor Sun, 07 Sep 2014 17:19:01 -0400 +zoneminder (1.26.5-3) unstable; urgency=low -zoneminder (1.27.99+1-trusty-SNAPSHOT2014082102) trusty; urgency=medium - * Fix UI inputs for v4l multibuffer and captures per frame + * Previous release still didn't build on PPC - this has been corrected. + (Closes: #736516) - -- Isaac Connor Thu, 21 Aug 2014 12:03:31 -0400 + -- Peter Howard Tue, 4 Feb 2014 02:02:10 +1000 -zoneminder (1.27.99+1-trusty-SNAPSHOT2014082101) trusty; urgency=medium +zoneminder (1.26.5-2) unstable; urgency=low - * fall back to Config table values for V4l MultiBUffer and Captures Per Frame - * add mention of monitor page settings for thse in the config table + * Remove dependency on ffmpeg + (Closes: #721161) - -- Isaac Connor Thu, 21 Aug 2014 10:04:46 -0400 + * Builds again on non-x86 target architectures. -zoneminder (1.27.99+1-precise-SNAPSHOT2014080601) precise; urgency=medium + -- Peter Howard Thu, 23 Jan 2014 01:02:10 +1000 - * improve error messages - * Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates +zoneminder (1.26.5-1) unstable; urgency=low - -- Isaac Connor Wed, 06 Aug 2014 20:20:20 -0400 + * New upstream version + (Closes: #694131) + * Change Build-Depends on libgnutls-dev to libgnutls-openssl-dev + (Closes: #731560) + -- Peter Howard Tue, 17 Dec 2013 01:02:10 +1000 -zoneminder (1.27.0+1-trusty-v4ltomonitor-1) trusty; urgency=high +zoneminder (1.25.0-4) unstable; urgency=high - * Snapshot release - + * Add CVE-2013-0232 patch + [SECURITY] CVE-2013-0232: Shell escape commands with untrusted content. + Thanks to James McCoy (Closes: #698910) + Thanks also to Salvatore Bonaccorso - -- Isaac Connor Wed, 09 Jul 2014 21:35:29 -0400 + -- Peter Howard Tue, 12 Jun 2013 12:02:10 +1000 + +zoneminder (1.25.0-3) unstable; urgency=low + + * debian/rules: Export CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS, to ensure + hardening build flags are enabled. + + -- Vagrant Cascadian Tue, 28 Aug 2012 12:10:03 -0700 + +zoneminder (1.25.0-2) unstable; urgency=low + + [ Vagrant Cascadian ] + * Add a patch to disable checking for updated versions by default, as + upgrades should happen through package management. + * Use dpkg-buildflags in debian/rules to set default compiler flags. + * Ensure zoneminder is stopped before starting (Closes: #657407). + + [ Peter Howard ] + * Fix postinst to add permission for table creation during upgrade + (Closes: #657407). + + -- Vagrant Cascadian Thu, 23 Aug 2012 12:40:34 -0700 + +zoneminder (1.25.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "ftbfs with GCC-4.7": add patch Fix-FTBFS-with-gcc-4.7 from Cyril + Brulebois: fix missing includes. + (Closes: #667428) + + -- gregor herrmann Sun, 13 May 2012 17:02:21 +0200 + +zoneminder (1.25.0-1) unstable; urgency=low + + * Fix typo in libv4l1-videodev.h patch that caused v4l1 support to be + dropped. + * Fail to build if version in postinst doesn't match upstream version. + * Add Build-Depends: libavdevice-dev to fix MPEG streaming (Closes: #515558). + * debian/rules: Convert to using debhelper overrides. + * Set debian/compat to 7. + * Simplify debian/watch file. + * Refresh debian/patches/use_libjs-mootools. + * Refresh debian/patches/libv4l1-videodev.h. + * Remove dependencies on php4 and related packages. + * Remove build-dependencies on libmysqlclient14-dev and + libmysqlclient15-dev. + * Update Build-Depends to use libjpeg-dev instead of libjpeg62-dev + (Closes: #647114). + * Add patch to fix build by testing for C headers rather than C++ headers. + Thanks to Ryan Niebur. (Closes: #654230) + * Add a patch to fix build problems caused by API changes in libav 0.8. + Thanks again to Ryan Niebur. (Closes: #654230) + + -- Vagrant Cascadian Mon, 16 Jan 2012 11:58:05 -0800 + +zoneminder (1.24.4-1) unstable; urgency=low + + [ Peter Howard ] + * Initial release of 1.24.4 (Closes: #634985). + - Fix 32/64-bit type declarations (Closes: #614404). + * Update patches. + + [ Vagrant Cascadian ] + * Add patch to fix FTBFS by using libv4l1-videodev.h from libv4l-dev. + Thanks to Andreas Metzler for reporting the issue. + (Closes: #619813). + * Document adding the www-data user to the video group in README.Debian. + (Closes: #611324) + * Depend on libsys-mmap-perl to enable mapped memory support. + (Closes: #607331) + * Update libjs-mootools patch to use -nc variants (Closes: #635075). + * Depend on javascript-common, to ensure that /javascript is available in + the web server. + * Set the upstream version in postinst at build time. + * Use dh-autoreconf to properly clean up autogenerated files during build. + * Add Vcs-HG to debian/control. + * Add Build-Depends: libv4l-dev, libbz2-dev, dh-autoreconf, libsys-mmap-perl. + + -- Vagrant Cascadian Sun, 24 Jul 2011 16:44:30 +0200 + +zoneminder (1.24.2-9) unstable; urgency=low + + * Apply patch from Ubuntu to fix FTBFS with ffmpeg 0.6: + - Add -D__STDC_CONSTANT_MACROS to CPPFLAGS (closes: 614080). + * Update Standards-Version to 3.9.1, no changes necessary. + + -- Vagrant Cascadian Sun, 20 Feb 2011 23:43:02 -0800 + +zoneminder (1.24.2-8) unstable; urgency=medium + + [ Vagrant Cascadian ] + * Apply patch to fix V4L2 cameras without crop support (closes: #608790). + Thanks to piratebab. + * Add preinst script which aborts if dangerous symlinks exist. + (closes: #608793) + + [ Peter Howard ] + * Added to README.Debian with info about images and events directories. + (closes: #608793) + + -- Vagrant Cascadian Sat, 15 Jan 2011 19:39:26 -0800 + +zoneminder (1.24.2-7) unstable; urgency=medium + + * Do not set ownership of /var/cache/zoneminder when upgrading, which fixes a + regression causing upgrades to take inordinately long with large + installations (closes: #597040). + + -- Vagrant Cascadian Fri, 17 Sep 2010 11:24:41 -0700 + +zoneminder (1.24.2-6) unstable; urgency=low + + * Only remove database on purge. This requires only creating the database if + it doesn't already exist, and upgrading the database only if the database + is an older version (closes: #497107). + + * Do not prompt the user on database upgrades by using the --nointeractive + flag when calling zmupdate.pl from postinst (closes: #595902). + + -- Vagrant Cascadian Fri, 10 Sep 2010 10:06:06 -0700 + +zoneminder (1.24.2-5) unstable; urgency=low + + [ Peter Howard ] + * Add zip dependency + (closes: #494261) + * Add debian/watch file + (closes: #545552) + * Use packaged libjs-mootools + (closes: #585590) + * Miscellaneous cleanups + + [ Vagrant Cascadian ] + * Add vagrant@debian.org as uploader + * Update Standards-Version to 3.9.0, no changes necessary. + + -- Vagrant Cascadian Fri, 23 Jul 2010 18:12:50 -0500 + +zoneminder (1.24.2-4.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "package removed, processes still running": apply patch to + debian/postinst by Vagrant Cascadian: use invoke-rc.d and run + mysql-related actions only when mysql is running (closes: #583648). + + -- gregor herrmann Thu, 01 Jul 2010 19:47:10 +0200 + +zoneminder (1.24.2-4) unstable; urgency=high + * Update init.d to list mysql dependency + (closes: #583505) + * Change depenency from libmime-perl to libmime-tools-perl + (closes: #585589) + * Problems in changelog format fixed + (closes: #585592) + * Fix debian-rules-ignores-make-clean-error + (closes: #585593) + -- Peter Howard Mon, 14 jun 2010 15:02:10 +1000 + +zoneminder (1.24.2-3) unstable; urgency=high + * Changes symbols to build with libjpeg8 + (closes: #565326, #568327) + * Note: location of all perl files should have been fixed in previous release + (closes: #553096) + -- Peter Howard Mon, 26 apr 2010 15:02:10 +1000 + +zoneminder (1.24.2-2) unstable; urgency=high + + * Remove custom perl parth from zmpkg.pl, fix location of manpages. + (closes: #551746, #553092) + * Fix GCC4.4 bug + (closes: #531717) + * Fix potential bug in postinst script + + -- Peter Howard Sat, 14 Nov 2009 15:02:10 +1000 + +zoneminder (1.24.2-1) unstable; urgency=high + + * Initial release of zoneminder 1.24.2 + -- Peter Howard Fri, 11 Sep 2009 07:02:50 +1000 + +zoneminder (1.24.1-1) unstable; urgency=high + + * Initial release of zoneminder 1.24.1, closing CVE-2008-3882, + CVE-2008-3881, CVE-2008-3880 + (closes: #497640) + * Change syslog dependency to rsyslog. + (closes: #526918) + * Add missing perl depenency. + * Restore patch to disable "check for updates" by default. + * Removed spurious '$' in init script. + (closes: #486064) + * Change permission of zm.conf from 0600 to 0400 for CVE-2008-6755 + (closes: #528252) + -- Peter Howard Sat, 16 May 2009 07:02:50 +1000 + +zoneminder (1.23.3-4) unstable; urgency=high + + * update to get it building with latest unstable. Thanks to waldi@debian.org + (closes: #517569) + -- Peter Howard Thu, 16 Apr 2009 01:02:50 +1000 + +zoneminder (1.23.3-3) unstable; urgency=high + + * ffmpeg confirmed working + (closes: #475145) + * Fix upgrade problem intrudouced in 1.23.3-1 + (closes: #481637) + * Include libmime-lite-perl in dependencies + (closes: #486312) + -- Peter Howard Thu, 18 Sep 2008 01:02:50 +1000 + +zoneminder (1.23.3-2) unstable; urgency=high + + * ffmpeg finally working? + + -- Peter Howard Wed, 13 Aug 2008 01:02:50 +1000 + +zoneminder (1.23.3-1) unstable; urgency=high + + * Initial version for 1.23.3 - security fix. + (closes: #479034) + + -- Peter Howard Wed, 19 Mar 2008 01:02:50 +1000 + +zoneminder (1.23.2-2) unstable; urgency=low + + * Update to init.d + (closes: #468856) + * Add dependency on logging daemon + (closes: #471277) + + -- Peter Howard Wed, 19 Mar 2008 01:02:50 +1000 + +zoneminder (1.23.2-1) unstable; urgency=low + + * Initial version for 1.23.2 + (closes: #464152) + * Zoneminder 1.23.2 upstream includes fix for GCC 4.3 + (closes: #454980) + * Includes ffmpeg patch by Alexander Kushnirenko + + -- Peter Howard Sat, 01 Mar 2008 16:02:50 +1000 + +zoneminder (1.22.3-10) unstable; urgency=low + + * Fix bug introduced in -9 where perl is put under /usr/local + (closes: #457507) + + -- Peter Howard Mon, 24 Dec 2007 16:02:50 +1000 + +zoneminder (1.22.3-9) unstable; urgency=low + + * Starting zoneminder via init script now invokes "zmfix -a" + (closes: #481637) + * Change apache2-mpm-prefork dependency to apache2 + * Temp dir for export under /var/cache/zoneminder (but linked back to + /usr/share/zoneminder for now) + * Redo use of gnutls rather than openssl for md5 hashes + + -- Peter Howard Mon, 10 Dec 2007 16:02:50 +1000 + +zoneminder (1.22.3-8) unstable; urgency=low + + * Build now includes libpcre3 + (closes: #437533) + * "Monitor Presets" patch now applied to package during build. + + -- Peter Howard Sat, 18 Aug 2007 14:35:23 +1000 + +zoneminder (1.22.3-7) unstable; urgency=low + + * Turn off debug trace and crash dump on build + (closes:#414857,#414891) + * Additional perl libraries added in dependencies + (closes:#416291) + * Change preferred PHP version from 4 to 5 + -- Peter Howard Sun, 29 Jul 2007 15:11:13 +1000 + +zoneminder (1.22.3-6) unstable; urgency=low + + * Removed a similar bash only statement from zmpkg.pl + (closes:414882) + + -- Peter Howard Sat, 14 Apr 2007 11:46:56 +1000 + +zoneminder (1.22.3-5) unstable; urgency=low + + * Installs with "phone home" feature turned off by default, and permissions + on /etc/zm/zm.conf fixed (now the 0600 it s hould be) + (closes:415349) + * Removed "stupid bash-ism" on mysqld check in postinst file. + + -- Peter Howard Fri, 6 Apr 2007 15:50:00 +1000 + +zoneminder (1.22.3-4) unstable; urgency=low + + * Put libmysqlclient-15-dev in front of -14-dev so sbuild works + (closes: #414410) + + -- Peter Howard Mon, 12 Mar 2007 11:38:56 +1100 + +zoneminder (1.22.3-3) unstable; urgency=low + + * Clean up of postinstall, postrm ; user "zm" definitely was a mistake + * Also in postinstall: check and start MySQL if it's not running. + * init.d script now checks if zoneminder isn't running and still returns 0 + (which helps uninstalling) + * Addition of php5 dependency options as well as php4. + + -- Peter Howard Mon, 26 Feb 2007 10:40:52 +1100 + +zoneminder (1.22.3-2) unstable; urgency=low + + * Added zmuser in the mysql creation; this should fix the install problem + for people, but needs to be cleaned up (in -3) + + -- Peter Howard Fri, 16 Feb 2007 14:16:03 +1100 + +zoneminder (1.22.3-1) unstable; urgency=low + + * Initial Version. (closes: #248393) + * Patched out use of openssl; uses gnutls instead for MD5 hashes. + * Removed MakeMaker-inserted Perl licensing (with authors permission) in + various scripts; replaced with GPL. + + -- Peter Howard Wed, 7 Feb 2007 14:09:01 +1100 diff --git a/distros/ubuntu1204_cmake/clean b/distros/ubuntu1204/clean similarity index 100% rename from distros/ubuntu1204_cmake/clean rename to distros/ubuntu1204/clean diff --git a/distros/ubuntu1204_cmake/conf/apache2/zoneminder.conf b/distros/ubuntu1204/conf/apache2/zoneminder.conf similarity index 100% rename from distros/ubuntu1204_cmake/conf/apache2/zoneminder.conf rename to distros/ubuntu1204/conf/apache2/zoneminder.conf diff --git a/distros/ubuntu1204/control b/distros/ubuntu1204/control index 6e3fcab6b..6368d9417 100644 --- a/distros/ubuntu1204/control +++ b/distros/ubuntu1204/control @@ -1,63 +1,64 @@ Source: zoneminder Section: net Priority: optional -Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), autoconf, automake, quilt, dh-autoreconf, libtool - ,libgnutls-dev - ,libmysqlclient-dev | libmariadbclient-dev - ,libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev - ,libpcre3-dev - ,libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev - ,libv4l-dev (>= 0.8.3) - ,libbz2-dev - ,libavdevice-dev - ,libvlccore-dev, libvlc-dev - ,libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev - ,libgcrypt11-dev, libpolkit-gobject-1-dev +Maintainer: Dmitry Smirnov +Uploaders: Vagrant Cascadian +Build-Depends: debhelper (>= 9), python-sphinx | python3-sphinx, apache2-dev, dh-linktree + ,cmake + ,libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libavdevice-dev + ,libbz2-dev + ,libgcrypt-dev + ,libcurl4-gnutls-dev + ,libgnutls-openssl-dev + ,libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, + ,libmysqlclient-dev + ,libpcre3-dev + ,libpolkit-gobject-1-dev + ,libv4l-dev (>= 0.8.3) [!hurd-any] + ,libvlc-dev +# Unbundled (dh_linktree): + ,libjs-jquery + ,libjs-mootools Standards-Version: 3.9.4 +Homepage: http://www.zoneminder.com/ +Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/zoneminder.git +Vcs-Git: git://anonscm.debian.org/collab-maint/zoneminder.git Package: zoneminder Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} - ,apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd - ,mariadb-client|mysql-client|mysql-client-5.6 - ,libpcre3 - ,ffmpeg | libav-tools - ,rsyslog | system-log-daemon - ,libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl - ,libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl - ,libdbd-mysql-perl - ,libmodule-load-perl, libsys-mmap-perl, libjson-any-perl - ,libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, liburi-encode-perl - ,libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl - ,libsys-cpu-perl, libsys-meminfo-perl - ,libavdevice53 | libavdevice55 - ,libjpeg8|libjpeg9|libjpeg62-turbo - ,zip - ,libvlccore5 | libvlccore7 | libvlccore8, libvlc5 - ,libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev - ,libpolkit-gobject-1-0 - ,php5-gd -Recommends: mysql-server|mariadb-server -Description: Video camera security and surveillance solution - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - -Package: zoneminder-dbg -Section: debug -Priority: extra -Architecture: any -Depends: zoneminder (= ${binary:Version}), ${misc:Depends} -Description: Debugging symbols for zoneminder. - ZoneMinder is a video camera security and surveillance solution. + ,javascript-common + ,libav-tools|ffmpeg + ,libdate-manip-perl + ,libdbd-mysql-perl + ,libmime-lite-perl + ,libmime-tools-perl + ,libphp-serialization-perl + ,libmodule-load-conditional-perl + ,libnet-sftp-foreign-perl +# ,libzoneminder-perl (= ${source:Version}) + ,libarchive-zip-perl + ,libdbd-mysql-perl + ,libdevice-serialport-perl + ,libimage-info-perl + ,libjson-any-perl + ,libsys-mmap-perl [!hurd-any] + ,liburi-encode-perl + ,libwww-perl + ,mysql-client | virtual-mysql-client + ,perl-modules + ,php5-mysql, php5-gd + ,policykit-1 + ,rsyslog | system-log-daemon + ,zip + ,libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl + , libsys-cpu-perl, libsys-meminfo-perl +Recommends: ${misc:Recommends} + ,libapache2-mod-php5 | php5-fpm + ,mysql-server | virtual-mysql-server + ,zoneminder-doc (>= ${source:Version}) +Suggests: fcgiwrap, logrotate +Description: video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child or family member or home monitoring and other care scenarios. It @@ -68,3 +69,70 @@ Description: Debugging symbols for zoneminder. video security system and for commercial or professional video security and surveillance. It can also be integrated into a home automation system via X.10 or other protocols. + +#Package: libzoneminder-perl +#Section: perl +#Architecture: all +#Multi-Arch: foreign +#Depends: ${misc:Depends}, ${perl:Depends} +# ,libarchive-zip-perl +# ,libdbd-mysql-perl +# ,libdevice-serialport-perl +# ,libimage-info-perl +# ,libjson-any-perl +# ,libsys-mmap-perl [!hurd-any] +# ,liburi-encode-perl +# ,libwww-perl +#Description: ZoneMinder Perl libraries +# ZoneMinder is intended for use in single or multi-camera video security +# applications, including commercial or home CCTV, theft prevention and child +# or family member or home monitoring and other care scenarios. It +# supports capture, analysis, recording, and monitoring of video data coming +# from one or more video or network cameras attached to a Linux system. +# ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom +# cameras using a variety of protocols. It is suitable for use as a home +# video security system and for commercial or professional video security +# and surveillance. It can also be integrated into a home automation system +# via X.10 or other protocols. +# . +# This package provides ZoneMinder Perl libraries; it can be used to +# write custom interfaces as well. + +Package: zoneminder-doc +Section: doc +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, ${sphinxdoc:Depends} +Suggests: www-browser +Description: ZoneMinder documentation + ZoneMinder is intended for use in single or multi-camera video security + applications, including commercial or home CCTV, theft prevention and child + or family member or home monitoring and other care scenarios. It + supports capture, analysis, recording, and monitoring of video data coming + from one or more video or network cameras attached to a Linux system. + ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom + cameras using a variety of protocols. It is suitable for use as a home + video security system and for commercial or professional video security + and surveillance. It can also be integrated into a home automation system + via X.10 or other protocols. + . + This package provides ZoneMinder documentation in HTML format. + +Package: zoneminder-dbg +Section: debug +Priority: extra +Architecture: any +Depends: zoneminder (= ${binary:Version}), ${misc:Depends} +Description: Zoneminder -- debugging symbols + ZoneMinder is intended for use in single or multi-camera video security + applications, including commercial or home CCTV, theft prevention and child + or family member or home monitoring and other care scenarios. It + supports capture, analysis, recording, and monitoring of video data coming + from one or more video or network cameras attached to a Linux system. + ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom + cameras using a variety of protocols. It is suitable for use as a home + video security system and for commercial or professional video security + and surveillance. It can also be integrated into a home automation system + via X.10 or other protocols. + . + This package provides debugging symbols diff --git a/distros/ubuntu1204/copyright b/distros/ubuntu1204/copyright index a177502a0..c48025a25 100644 --- a/distros/ubuntu1204/copyright +++ b/distros/ubuntu1204/copyright @@ -1,22 +1,174 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ZoneMinder +Upstream-Contact: Philip Coombes +Source: https://github.com/ZoneMinder/ZoneMinder +Comment: + This package was originally debianized by matrix + on Mon, 7 Mar 2005 02:07:57 -0500. + It was re-done for submission to the Debian project by Peter Howard + on Fri, 8 Dec 2006 10:19:43 +1100 +Files-Excluded: + web/skins/*/js/jquery-* + web/tools/mootools/*-yc.js + +Files: * +Copyright: 2001-2014 Philip Coombes + 2008 Brian Rudy + 2014 Vincent Giovannone + 2013 Tim Craig + 2003-2008 Corey DeLasaux + 2001-2010 Chris Kistner +License: GPL-2+ + +Files: distros/* +Copyright: 2001-2008 Philip Coombes + 2014 Isaac Connor + 2005 Serg Oskin +License: GPL-2+ + +Files: web/skins/*/js/jquery-* +Copyright: 2010 John Resig + 2010 The Dojo Foundation +License: GPL-2 or Expat +Comment: + Dual licensed under the MIT or GPL Version 2 licenses. + http://jquery.org/license + . + Includes Sizzle.js http://sizzlejs.com/ + Released under the MIT, BSD, and GPL Licenses. + +Files: web/tools/mootools/*.js +Copyright: 2009 Marcelo Jorge Vieira (metal) + 2006-2010 Valerio Proietti (http://mad4milk.net/) +License: Expat + +Files: web/api/* +Copyright: 2005-2013 Cake Software Foundation, Inc. (http://cakefoundation.org) +License: Expat + +Files: + cmake/Modules/CheckPrototypeDefinition*.cmake + cmake/Modules/FindGLIB2.cmake + cmake/Modules/FindPolkit.cmake + cmake/Modules/GNUInstallDirs.cmake Copyright: + 2005-2011 Kitware, Inc. + 2010-2011 Andreas Schneider + 2009 Dario Freddi + 2008 Laurent Montel, + 2011 Nikita Krupen'ko +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + * The names of Kitware, Inc., the Insight Consortium, or the names of + any consortium members, or of any contributors, may not be used to + endorse or promote products derived from this software without + specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Copyright 2002 Philip Coombes +Files: cmake/Modules/FindPerlModules.cmake +Copyright: 2012 Iowa State University +License: Boost-1.0 + Boost Software License - Version 1.0 - August 17th, 2003 + . + Permission is hereby granted, free of charge, to any person or organization + obtaining a copy of the software and accompanying documentation covered by + this license (the "Software") to use, reproduce, display, distribute, + execute, and transmit the Software, and to prepare derivative works of the + Software, and to permit third-parties to whom the Software is furnished to + do so, all subject to the following: + . + The copyright notices in the Software and this entire statement, including + the above license grant, this restriction and the following disclaimer, + must be included in all copies of the Software, in whole or in part, and + all derivative works of the Software, unless such copies or derivative + works are solely in the form of machine-executable object code generated by + a source language processor. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. -License: +Files: debian/* +Copyright: 2015 Dmitry Smirnov + 2007-2014 Peter Howard + 2010-2012 Vagrant Cascadian + 2001-2008 Philip Coombes +License: GPL-2+ -This package is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2 of the License, or (at your -option) any later version. +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. -This package is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +License: GPL-2+ + This package is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + The complete text of the GNU General Public License version 2 + can be found in "/usr/share/common-licenses/GPL-2". -You should have received a copy of the GNU General Public -License along with this package; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian GNU/Linux systems, the text of the GPL can be found in -/usr/share/common-licenses/GPL. +License: GPL-2 + This package is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; version 2 of the License. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + The complete text of the GNU General Public License version 2 + can be found in "/usr/share/common-licenses/GPL-2". diff --git a/distros/ubuntu1204/dirs b/distros/ubuntu1204/dirs deleted file mode 100644 index 4178482c1..000000000 --- a/distros/ubuntu1204/dirs +++ /dev/null @@ -1,6 +0,0 @@ -var/log/zm -var/lib/zm -var/cache/zoneminder/events -var/cache/zoneminder/images -var/cache/zoneminder/temp -usr/share/zoneminder/db diff --git a/distros/ubuntu1204/docs b/distros/ubuntu1204/docs deleted file mode 100644 index b43bf86b5..000000000 --- a/distros/ubuntu1204/docs +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/distros/ubuntu1204_cmake/examples/nginx.conf b/distros/ubuntu1204/examples/nginx.conf similarity index 100% rename from distros/ubuntu1204_cmake/examples/nginx.conf rename to distros/ubuntu1204/examples/nginx.conf diff --git a/distros/ubuntu1204_cmake/gbp.conf b/distros/ubuntu1204/gbp.conf similarity index 100% rename from distros/ubuntu1204_cmake/gbp.conf rename to distros/ubuntu1204/gbp.conf diff --git a/distros/ubuntu1204/init.d b/distros/ubuntu1204/init.d deleted file mode 100644 index f22143c38..000000000 --- a/distros/ubuntu1204/init.d +++ /dev/null @@ -1,91 +0,0 @@ -#!/bin/sh -### BEGIN INIT INFO -# Provides: zoneminder -# Required-Start: $network $remote_fs $syslog -# Required-Stop: $network $remote_fs $syslog -# Should-Start: mysql -# Should-Stop: mysql -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Control ZoneMinder as a Service -### END INIT INFO -# description: Control ZoneMinder as a Service -# chkconfig: 2345 20 20 - -# Source function library. -#. /etc/rc.d/init.d/functions - -prog=ZoneMinder -ZM_PATH_BIN="/usr/bin" -RUNDIR=/var/run/zm -TMPDIR=/tmp/zm -command="$ZM_PATH_BIN/zmpkg.pl" - -start() { - echo -n "Starting $prog: " - export TZ=:/etc/localtime - mkdir -p $RUNDIR && chown www-data:www-data $RUNDIR - mkdir -p $TMPDIR && chown www-data:www-data $TMPDIR - $command start - RETVAL=$? - [ $RETVAL = 0 ] && echo success - [ $RETVAL != 0 ] && echo failure - echo - [ $RETVAL = 0 ] && touch /var/lock/zm - return $RETVAL -} -stop() { - echo -n "Stopping $prog: " - # - # Why is this status check being done? - # as $command stop returns 1 if zoneminder - # is stopped, which will result in - # this returning 1, which will stuff - # dpkg when it tries to stop zoneminder before - # uninstalling . . . - # - result=`$command status` - if [ ! "$result" = "running" ]; then - echo "Zoneminder already stopped" - echo - RETVAL=0 - else - $command stop - RETVAL=$? - [ $RETVAL = 0 ] && echo success - [ $RETVAL != 0 ] && echo failure - echo - [ $RETVAL = 0 ] && rm -f /var/lock/zm - fi -} -status() { - result=`$command status` - if [ "$result" = "running" ]; then - echo "ZoneMinder is running" - RETVAL=0 - else - echo "ZoneMinder is stopped" - RETVAL=1 - fi -} - -case "$1" in -'start') - start - ;; -'stop') - stop - ;; -'restart' | 'force-reload') - stop - start - ;; -'status') - status - ;; -*) - echo "Usage: $0 { start | stop | restart | status }" - RETVAL=1 - ;; -esac -exit $RETVAL diff --git a/distros/ubuntu1204/install b/distros/ubuntu1204/install deleted file mode 100644 index 4b0009cea..000000000 --- a/distros/ubuntu1204/install +++ /dev/null @@ -1,12 +0,0 @@ -usr/bin -usr/lib/cgi-bin -usr/share/man -usr/share/perl5/ZoneMinder -usr/share/perl5/ZoneMinder.pm -usr/share/polkit-1/actions -usr/share/polkit-1/rules.d -usr/share/zoneminder -etc/zm -db/zm_create.sql usr/share/zoneminder/db -db/zm_update-*.sql usr/share/zoneminder/db -debian/apache.conf etc/zm diff --git a/distros/ubuntu1204_cmake/libzoneminder-perl.install b/distros/ubuntu1204/libzoneminder-perl.install similarity index 100% rename from distros/ubuntu1204_cmake/libzoneminder-perl.install rename to distros/ubuntu1204/libzoneminder-perl.install diff --git a/distros/ubuntu1204/links b/distros/ubuntu1204/links deleted file mode 100644 index 9715ee428..000000000 --- a/distros/ubuntu1204/links +++ /dev/null @@ -1,4 +0,0 @@ -var/cache/zoneminder/events usr/share/zoneminder/events -var/cache/zoneminder/images usr/share/zoneminder/images -var/cache/zoneminder/temp usr/share/zoneminder/temp -usr/lib/cgi-bin usr/share/zoneminder/cgi-bin diff --git a/distros/ubuntu1204_cmake/patches/default_cgi-path.patch b/distros/ubuntu1204/patches/default_cgi-path.patch similarity index 100% rename from distros/ubuntu1204_cmake/patches/default_cgi-path.patch rename to distros/ubuntu1204/patches/default_cgi-path.patch diff --git a/distros/ubuntu1204/patches/series b/distros/ubuntu1204/patches/series index e69de29bb..fc70f4006 100644 --- a/distros/ubuntu1204/patches/series +++ b/distros/ubuntu1204/patches/series @@ -0,0 +1,2 @@ +default_cgi-path.patch +use_libjs-mootools.patch diff --git a/distros/ubuntu1204_cmake/patches/use_libjs-mootools.patch b/distros/ubuntu1204/patches/use_libjs-mootools.patch similarity index 100% rename from distros/ubuntu1204_cmake/patches/use_libjs-mootools.patch rename to distros/ubuntu1204/patches/use_libjs-mootools.patch diff --git a/distros/ubuntu1204/postinst b/distros/ubuntu1204/postinst deleted file mode 100644 index d06f9c641..000000000 --- a/distros/ubuntu1204/postinst +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" = "configure" ]; then - if [ -e "/etc/init.d/mysql" ]; then - # - # Get mysql started if it isn't - # - if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then - invoke-rc.d mysql start - fi - if $(/etc/init.d/mysql status >/dev/null 2>&1); then - mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload - # test if database if already present... - if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then - cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf - echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - fi - - invoke-rc.d zoneminder stop || true - zmupdate.pl --nointeractive - - else - echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' - fi - else - echo 'mysql not found, assuming remote server.' - fi - chown www-data:www-data /var/log/zm - chown www-data:www-data /var/lib/zm/ - if [ -z "$2" ]; then - chown www-data:www-data -R /var/cache/zoneminder - fi -fi -# Ensure zoneminder is stopped... -if [ -x "/etc/init.d/zoneminder" ]; then - if invoke-rc.d zoneminder status ; then - invoke-rc.d zoneminder stop || exit $? - fi -fi - -if [ "$1" = "configure" ]; then - if [ -z "$2" ]; then - chown www-data:www-data /var/log/zm - chown www-data:www-data /var/lib/zm/ - chown www-data:www-data -R /var/cache/zoneminder - else - chown www-data:www-data /var/log/zm - zmupdate.pl - fi -fi -#DEBHELPER# diff --git a/distros/ubuntu1204/postrm b/distros/ubuntu1204/postrm deleted file mode 100644 index 28a00a7a0..000000000 --- a/distros/ubuntu1204/postrm +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# set -e # to be reinstated later - -if [ "$1" = "purge" ]; then - echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm -fi -#DEBHELPER# diff --git a/distros/ubuntu1204/preinst b/distros/ubuntu1204/preinst deleted file mode 100755 index 6cd01ba55..000000000 --- a/distros/ubuntu1204/preinst +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -abort=false -if [ -L /usr/share/zoneminder/events ]; then - l=$(readlink /usr/share/zoneminder/events) - if [ "$l" != "/var/cache/zoneminder/events" ]; then - abort=true - fi -fi -if [ -L /usr/share/zoneminder/images ]; then - l=$(readlink /usr/share/zoneminder/images ) - if [ "$l" != "/var/cache/zoneminder/images" ]; then - abort=true - fi -fi - -if [ "$abort" = "true" ]; then - cat >&2 << EOF -Aborting installation of zoneminder due to non-default symlinks in -/usr/share/zoneminder for the images and/or events directory, which could -result in loss of data. Please move your data in each of these directories to -/var/cache/zoneminder before installing zoneminder from the package. -EOF - exit 1 - -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/ubuntu1204/rules b/distros/ubuntu1204/rules index e25e5514d..b467c870f 100755 --- a/distros/ubuntu1204/rules +++ b/distros/ubuntu1204/rules @@ -1,67 +1,87 @@ #!/usr/bin/make -f # -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND += -Wl,--as-needed -CFLAGS = -Wall -g -CPPFLAGS = -D__STDC_CONSTANT_MACROS -CXXFLAGS = -DHAVE_LIBCRYPTO - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 +ifeq ($(DEB_BUILD_ARCH_OS),hurd) +ARGS:= -DZM_NO_MMAP=ON endif %: - dh $@ --with quilt,autoreconf + dh $@ --parallel --buildsystem=cmake --builddirectory=dbuild \ + --with sphinxdoc,apache2,linktree override_dh_auto_configure: - CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-mariadb=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes + dh_auto_configure -- $(ARGS) \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DZM_CONFIG_DIR="/etc/zm" \ + -DZM_RUNDIR="/var/run/zm" \ + -DZM_SOCKDIR="/var/run/zm" \ + -DZM_TMPDIR="/tmp/zm" \ + -DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \ + -DZM_CONTENTDIR="/var/cache/zoneminder" override_dh_clean: - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) distclean - dh_clean + dh_clean $(MANPAGES1) + $(RM) -r docs/_build docs/installationguide -override_dh_install: - dh_install --fail-missing - # - # NOTE: This is a short-term kludge; hopefully changes in the next - # upstream version will render this unnecessary. - rm -rf debian/zoneminder/usr/share/zoneminder/events - rm -rf debian/zoneminder/usr/share/zoneminder/images - rm -rf debian/zoneminder/usr/share/zoneminder/temp - dh_link var/cache/zoneminder/events usr/share/zoneminder/events - dh_link var/cache/zoneminder/images usr/share/zoneminder/images - dh_link var/cache/zoneminder/temp usr/share/zoneminder/temp +build-indep: + #$(MAKE) -C docs text + $(MAKE) -C docs html - # - # This is a slightly lesser kludge; moving the cgi stuff to - # /usr/share/zoneminder/cgi-bin breaks one set of behavior, - # having it just in /usr/lib/cgi-bin breaks another bit of - # behavior. - # - dh_link usr/lib/cgi-bin usr/share/zoneminder/cgi-bin +MANPAGES1 = dbuild/scripts/zmupdate.pl.1 +$(MANPAGES1): + # generate man page(s): + pod2man -s1 --stderr --utf8 $(patsubst %.1, %, $@) $@ + +## reproducible build: +LAST_CHANGE=$(shell dpkg-parsechangelog -S Date) +BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)") +override_dh_installman: $(MANPAGES1) + $(MAKE) -C docs man SPHINXOPTS="-D today=\"$(BUILD_DATE)\"" + dh_installman --language=C $(MANPAGES1) + +override_dh_auto_install: + dh_auto_install --destdir=$(CURDIR)/debian/tmp + # remove worthless files: + $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*/*/.packlist + $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*.in + # remove empty directories: + find $(CURDIR)/debian/tmp/usr -type d -empty -delete -printf 'removed %p\n' + # remove extra-license-file: + $(RM) -v $(CURDIR)/debian/tmp/usr/share/zoneminder/www/api/lib/Cake/LICENSE.txt override_dh_fixperms: dh_fixperms - chown root:root debian/zoneminder/etc/zm/zm.conf + ## 637685 + chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf -override_dh_auto_test: - # do not run tests... +override_dh_installinit: + dh_installinit --no-start + +override_dh_apache2: + dh_apache2 --noenable -.PHONY: override_dh_strip override_dh_strip: - dh_strip --dbg-package=zoneminder-dbg + [ -d "$(CURDIR)/debian/zoneminder-dbg" ] \ + && dh_strip --dbg-package=zoneminder-dbg \ + || dh_strip + +#%: +# dh $@ --parallel --buildsystem=autoconf --with autoreconf +# +#override_dh_auto_configure: +# dh_auto_configure -- \ +# --sysconfdir=/etc/zm \ +# --with-mysql=/usr \ +# --with-webdir=/usr/share/zoneminder \ +# --with-ffmpeg=/usr \ +# --with-cgidir=/usr/lib/cgi-bin \ +# --with-webuser=www-data \ +# --with-webgroup=www-data \ +# --enable-mmap=yes diff --git a/distros/debian8/source/format b/distros/ubuntu1204/source/format similarity index 100% rename from distros/debian8/source/format rename to distros/ubuntu1204/source/format diff --git a/distros/ubuntu1204_cmake/source/lintian-overrides b/distros/ubuntu1204/source/lintian-overrides similarity index 100% rename from distros/ubuntu1204_cmake/source/lintian-overrides rename to distros/ubuntu1204/source/lintian-overrides diff --git a/distros/ubuntu1204/watch b/distros/ubuntu1204/watch index 5a8a9c4d7..7ee690edb 100644 --- a/distros/ubuntu1204/watch +++ b/distros/ubuntu1204/watch @@ -1,3 +1,7 @@ version=3 -http://www.zoneminder.com/downloads.html \ - .*/ZoneMinder-(.*).tar.gz + +opts=\ +repacksuffix=+dfsg,\ +dversionmangle=s{\+dfsg\d*}{},\ + https://github.com/ZoneMinder/ZoneMinder/releases \ + .*/ZoneMinder/archive/v(.*).tar.gz diff --git a/distros/ubuntu1204_cmake/zoneminder-doc.doc-base b/distros/ubuntu1204/zoneminder-doc.doc-base similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder-doc.doc-base rename to distros/ubuntu1204/zoneminder-doc.doc-base diff --git a/distros/ubuntu1204_cmake/zoneminder-doc.install b/distros/ubuntu1204/zoneminder-doc.install similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder-doc.install rename to distros/ubuntu1204/zoneminder-doc.install diff --git a/distros/ubuntu1204_cmake/zoneminder-doc.links b/distros/ubuntu1204/zoneminder-doc.links similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder-doc.links rename to distros/ubuntu1204/zoneminder-doc.links diff --git a/distros/ubuntu1204_cmake/zoneminder.apache2 b/distros/ubuntu1204/zoneminder.apache2 similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.apache2 rename to distros/ubuntu1204/zoneminder.apache2 diff --git a/distros/ubuntu1204_cmake/zoneminder.bug-presubj b/distros/ubuntu1204/zoneminder.bug-presubj similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.bug-presubj rename to distros/ubuntu1204/zoneminder.bug-presubj diff --git a/distros/ubuntu1204_cmake/zoneminder.dirs b/distros/ubuntu1204/zoneminder.dirs similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.dirs rename to distros/ubuntu1204/zoneminder.dirs diff --git a/distros/ubuntu1204_cmake/zoneminder.docs b/distros/ubuntu1204/zoneminder.docs similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.docs rename to distros/ubuntu1204/zoneminder.docs diff --git a/distros/ubuntu1204_cmake/zoneminder.examples b/distros/ubuntu1204/zoneminder.examples similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.examples rename to distros/ubuntu1204/zoneminder.examples diff --git a/distros/ubuntu1204_cmake/zoneminder.init b/distros/ubuntu1204/zoneminder.init similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.init rename to distros/ubuntu1204/zoneminder.init diff --git a/distros/ubuntu1204_cmake/zoneminder.install b/distros/ubuntu1204/zoneminder.install similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.install rename to distros/ubuntu1204/zoneminder.install diff --git a/distros/ubuntu1204_cmake/zoneminder.links b/distros/ubuntu1204/zoneminder.links similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.links rename to distros/ubuntu1204/zoneminder.links diff --git a/distros/ubuntu1204_cmake/zoneminder.linktrees b/distros/ubuntu1204/zoneminder.linktrees similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.linktrees rename to distros/ubuntu1204/zoneminder.linktrees diff --git a/distros/ubuntu1204_cmake/zoneminder.lintian-overrides b/distros/ubuntu1204/zoneminder.lintian-overrides similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.lintian-overrides rename to distros/ubuntu1204/zoneminder.lintian-overrides diff --git a/distros/ubuntu1204_cmake/zoneminder.logrotate b/distros/ubuntu1204/zoneminder.logrotate similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.logrotate rename to distros/ubuntu1204/zoneminder.logrotate diff --git a/distros/ubuntu1204_cmake/zoneminder.maintscript b/distros/ubuntu1204/zoneminder.maintscript similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.maintscript rename to distros/ubuntu1204/zoneminder.maintscript diff --git a/distros/ubuntu1204_cmake/zoneminder.manpages b/distros/ubuntu1204/zoneminder.manpages similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.manpages rename to distros/ubuntu1204/zoneminder.manpages diff --git a/distros/ubuntu1204/zoneminder.postinst b/distros/ubuntu1204/zoneminder.postinst new file mode 100644 index 000000000..7c01cdde4 --- /dev/null +++ b/distros/ubuntu1204/zoneminder.postinst @@ -0,0 +1,53 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + + . /etc/zm/zm.conf + + # The logs can contain passwords, etc... so by setting group root, only www-data can read them, not people in the www-data group + chown www-data:root /var/log/zm + chown www-data:www-data /var/lib/zm + if [ -z "$2" ]; then + chown www-data:www-data /var/cache/zoneminder /var/cache/zoneminder/* + fi + + # Do this every time the package is installed or upgraded + + if [ "$ZM_DB_HOST" = "localhost" ]; then + if [ -e "/etc/init.d/mysql" ]; then + # + # Get mysql started if it isn't + # + if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then + invoke-rc.d mysql start + fi + if $(/etc/init.d/mysql status >/dev/null 2>&1); then + mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload + # test if database if already present... + if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then + cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf + # This creates the user. + echo "grant lock tables, alter,select,insert,update,delete,create,index on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost identified by \"${ZM_DB_PASS}\";" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + else + echo "grant lock tables, alter,select,insert,update,delete,create,index on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + fi + + # Ensure zoneminder is stopped + invoke-rc.d zoneminder stop || true + zmupdate.pl --nointeractive + zmupdate.pl --nointeractive -f + invoke-rc.d zoneminder start || true + else + echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' + fi + else + echo 'mysql not found, assuming remote server.' + fi + else + echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)" + fi +fi + +#DEBHELPER# diff --git a/distros/ubuntu1204_cmake/zoneminder.postrm b/distros/ubuntu1204/zoneminder.postrm similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.postrm rename to distros/ubuntu1204/zoneminder.postrm diff --git a/distros/ubuntu1204_cmake/zoneminder.preinst b/distros/ubuntu1204/zoneminder.preinst similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.preinst rename to distros/ubuntu1204/zoneminder.preinst diff --git a/distros/ubuntu1204_cmake/zoneminder.service b/distros/ubuntu1204/zoneminder.service similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.service rename to distros/ubuntu1204/zoneminder.service diff --git a/distros/ubuntu1204_cmake/zoneminder.tmpfile b/distros/ubuntu1204/zoneminder.tmpfile similarity index 100% rename from distros/ubuntu1204_cmake/zoneminder.tmpfile rename to distros/ubuntu1204/zoneminder.tmpfile diff --git a/distros/ubuntu1204_cmake/README.Debian b/distros/ubuntu1204_cmake/README.Debian deleted file mode 100644 index 2ba809fe4..000000000 --- a/distros/ubuntu1204_cmake/README.Debian +++ /dev/null @@ -1,160 +0,0 @@ -Zoneminder for Debian ---------------------- - -Initializing database ---------------------- - - pv /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf -OR - cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf - - echo 'grant lock tables,alter,create,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";'\ - | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql - -Hint: generate secure password with `pwgen` and update "/etc/zm/zm.conf" -accordingly. - -The following command can help to ensure that zoneminder can read its -configuration file: - - chgrp -c www-data /etc/zm/zm.conf - - -Upgrading database ------------------- - -Prior to 1.28.1 database upgrade was performed automatically. -"zoneminder" service will refuse to start with outdated database. - -Assuming that database is on "localhost" then the following command can be -used to upgrade "zm" database: - - zmupdate.pl - -Additional permissions may be required to perform upgrade: - - echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";'\ - | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql - -The following command prints the current version of zoneminder database: - - echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' \ - | sudo mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm - - -Enabling service ----------------- - -By default Zoneminder service is not starting automatically and need to be -manually activated once database is configured: - -On systemd: - - sudo systemctl enable zoneminder.service - -On SysV: - - sudo update-rc.d zoneminder enable - - -Web server set-up ------------------ - -There are few manual steps to get the web interface working: - -## Apache2 - -Apache can be configured as folder "/zm" using sample .conf: - - sudo a2enconf zoneminder - -Alternatively Apache web site configuration template can be used to setup -zoneminder as "http://zoneminder": - - sudo cp -v /usr/share/doc/zoneminder/examples/apache.conf /etc/apache2/sites-available/ - sudo a2ensite zoneminder.conf - -Common configuration steps for Apache2: - - sudo a2enmod cgi - sudo service apache2 reload - - -## nginx / fcgiwrap - -Nginx needs "php5-fpm" package to support PHP and "fcgiwrap" package -for binary "cgi-bin" applications: - - sudo apt-get install php5-fpm fcgiwrap - -To enable a URL alias that makes Zoneminder available from - - http://yourserver/zm - -the following line is to be added to "server" section of a web site -configuration: - - include /usr/share/doc/zoneminder/examples/nginx.conf; - -For "default" web site it would be sufficient to include the above -statement to the file - - /etc/nginx/sites-enabled/default - -To avoid problems with feeds from multiple cameras "fcgiwrap" should be -configured to start at least as many processes as there are cameras. -It can be done by adjusting DAEMON_OPTS in "/etc/default/fcgiwrap". -Systemd users may be affected by the following bug: - - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792705 - - -## Note: - -When Zoneminder web site is running it may be necessary to set -Options/Paths/PATH_ZMS to "/zm/cgi-bin/nph-zms" or according to chosen web -site configuration. - - -Changing the location for images and events -------------------------------------------- - -Zoneminder, in its upstream form, stores data in /usr/share/zoneminder/. This -package modifies that by changing /usr/share/zoneminder/images and -/usr/share/zoneminder/events to symlinks to directories under -/var/cache/zoneminder. - -There are numerous places these could be put and ways to do it. But, at the -moment, if you change this, an upgrade will fail with a warning about these -locations having changed (the reason for this was that previously, an upgrade -would silently revert the changes and cause event loss - refer -bug #608793). - -If you do want to change the location, here are a couple of suggestions. -(thanks to vagrant@freegeek.org): - -These lines in fstab could allow you to bind-mount an alternate location - - /dev/sdX1 /otherdrive ext3 defaults 0 2 - /otherdrive/zoneminder/images /var/cache/zoneminder/images bind defaults 0 2 - /otherdrive/zoneminder/events /var/cache/zoneminder/events bind defaults 0 2 - - or if you have a separate partition for each: - - /dev/sdX1 /var/cache/zoneminder/images ext3 defaults 0 2 - /dev/sdX2 /var/cache/zoneminder/events ext3 defaults 0 2 - - -- Peter Howard , Sun, 16 Jan 2010 01:35:51 +1100 - -Access to /dev/video* ---------------------- - -For cameras which require access to /dev/video*, zoneminder may need the -www-data user added to the video group in order to see those cameras: - - adduser www-data video - -Note that all web applications running on the zoneminder server will then have -access to all video devices on the system. - - -- Vagrant Cascadian Sun, 27 Mar 2011 13:06:56 -0700 diff --git a/distros/ubuntu1204_cmake/changelog b/distros/ubuntu1204_cmake/changelog deleted file mode 100644 index 74cf1d0b8..000000000 --- a/distros/ubuntu1204_cmake/changelog +++ /dev/null @@ -1,573 +0,0 @@ -zoneminder (1.28.1+1-vivid-SNAPSHOT2015081701) vivid; urgency=medium - - * include api, switch to cmake build - - -- Isaac Connor Mon, 17 Aug 2015 10:29:23 -0400 - - -zoneminder (1.28.1-8) unstable; urgency=medium - - * Patchworks: - + New upstream "980-fix-image-size.patch". - + New "default_cgi-path.patch" to correct default ZM_PATH_ZMS. - * postinst: set "root" as group owner for "/var/log/zm" to silence - logrotate warnings. - * Minor correction to README.Debian. - - -- Dmitry Smirnov Sun, 16 Aug 2015 19:19:50 +1000 - -zoneminder (1.28.1-7) unstable; urgency=medium - - * Build-Depends += "cakephp (<< 3.0.0~)"; - Zoneminder is not compatible with latest CakePHP. - * Handle conffile removal from maintscript. - * rules: build man pages reproducibly. - * gbp.conf: renamed old style config section [git-dch] to [dch]. - * README - + added instructions to update owner of the "/etc/zm/zm.conf" - (Closes: #789327). - + zmupdate.pl needs CREATE rights. - + added note about required number of "fcgiwrap" workers. - * New upstream patch: "zmtrigger-plus.patch". - - -- Dmitry Smirnov Mon, 20 Jul 2015 16:30:15 +1000 - -zoneminder (1.28.1-6) unstable; urgency=low - - * New "zoneminder-doc" and "zoneminder-dbg" packages. - - -- Dmitry Smirnov Sun, 19 Apr 2015 14:50:41 +1000 - -zoneminder (1.28.1-5) unstable; urgency=low - - * Move handling of "/var/run/zm" and "/tmp/zm" from .service into .tmpfile. - Let dh_installinit do the job. Thanks, Andrew Bauer. - * Use dh_apache2 to install Apache conf file; remove old conf and symlink. - * Promote "libapache2-mod-php5 | php5-fpm" to Recommends. - * Build-Depends: - + dh-linktree - + cakephp (>= 2.6.3) - + libjs-jquery - + libjs-mootools - * Depends: - - libjs-jquery - - libjs-mootools - * Build-time replace bundled CakePHP with system one using "dh-linktree". - * Use "dh-linktree" to handle mootools and jquery symlinks. - - -- Dmitry Smirnov Sun, 19 Apr 2015 11:45:01 +1000 - -zoneminder (1.28.1-4) unstable; urgency=low - - * New patch to fix HTML export with USE_DEEP_STORAGE (closes: #723706). - * New "783.patch" to describe potential data loss in ZM_USE_DEEP_STORAGE. - * New patch to change default date format to region-neutral ISO notation - with time zone. - * Build sphinx documentation: - + Install "zoneminder.1" man page. - + Build-Depends += "python-sphinx | python3-sphinx" - + Added commented "zoneminder-doc" package. - + Added "docs.patch" to unlink distro-specific installation docs. - * rules: - + set ZM_CONTENTDIR, ZM_SOCKDIR and ZM_TMPDIR. - + remove mistakengly installed Perl module templates. - * Updated startup scripts to create ZM_TMPDIR. - * Hurd improvements: - + New patch to add PATH_MAX definitions. - + Build without MMAP support on Hurd. - + libsys-mmap-perl [!hurd-any]. - - -- Dmitry Smirnov Mon, 06 Apr 2015 18:18:55 +1000 - -zoneminder (1.28.1-3) unstable; urgency=low - - * Updated Apache2 and nginx configuration templates to support CGI. - * Updated README.Debian to document cgi-bin setup. - * Removed "/usr/share/zoneminder/www/cgi-bin" symlink. - * Added "apache2.patch" to correct Apache2 site configuration example. - * control: Suggests += "fcgiwrap". - * rules: added dh_systemd overrides to prevent automatic service - activation and start. - * Added note about manual service activation to README.Debian - (Closes: #781733). - - -- Dmitry Smirnov Thu, 02 Apr 2015 23:20:20 +1100 - -zoneminder (1.28.1-2) unstable; urgency=low - - * Removed word "Linux" from short package description. - * Build-Depends: do not require "libv4l-dev" on Hurd i.e. [!hurd-any]. - * Added run-time Perl Depends: - + libdbd-mysql-perl - + libimage-info-perl - + libmodule-load-conditional-perl - + libnet-sftp-foreign-perl - + liburi-encode-perl - * Prepare for package split: added commented "libzoneminder-perl" - and "zoneminder-dbg" packages to "debian/control". - * rules: do not install worthless ".packlist" file. - * Updated "libv4l1-videodev.h.patch" to fix v4lv1 detection in CMake. - - -- Dmitry Smirnov Thu, 02 Apr 2015 13:25:19 +1100 - -zoneminder (1.28.1-1) unstable; urgency=low - - [ Dmitry Smirnov ] - * New upstream release [February 2015]. - * Upload to unstable. - * Disabled automatic database upgrades: post(inst|rm) scripts no longer - touch database or do unexpected stuff (Closes: #779254). - See README.Debian for details. - * Updated installation paths: - + /usr/share/zoneminder --> /usr/share/zoneminder/www - + /usr/lib/cgi-bin --> /usr/lib/zoneminder/cgi-bin - * Added logrotate config (Closes: #544826). - Thanks, Alberto Reyes. - * Native systemd service; "--with systemd" added to dh. - * Build with CMake instead of autoconf; rules clean-up. - * Build with all hardening. - * Build and install "zmupdate.pl.1" man page. - * Added nginx/php5-fpm configuration example. - * Install upstream "apache.conf" example. - * Described setup of Zoneminer web site and database in README.Debian. - * Install "/etc/zm/zm.conf" with tighter permissions. - * Added TODO.Debian. - * Added "debian/clean"; "debian/gbp.conf"; bug-presubj. - * Remove bundled Cake tests to take ~5 MB off big-usr-share. - * Standards-Version: 3.9.6; compat/debhelper to version 9. - * Vcs links to new git repository at collab-maint. - * Build-Depends: - + dh-systemd - + libgcrypt11-dev --> libgcrypt-dev - + libcurl4-gnutls-dev - + libvlc-dev - + policykit-1 (required by "zmsystemctl.pl") - - dh-autoreconf, autoconf, automake - * Depends: - - apache2 - - libapache2-mod-php5 (moved to Suggests) - - libpcre3 (invalid) - - libmodule-load-perl (obsolete; replaced with perl-modules) - - libarchive-tar-perl (obsolete; replaced with perl-modules) - - mysql-server (moved to Recommends, Closes: #759504). - - php5 - + libav-tools - + libjs-jquery (replaces bundled component) - + libjs-mootool (replaces bundled component) - + libjson-any-perl (Closes: #690803). - + perl-modules (Closes: #745819). - * Recommends: - + apache2 | httpd - + mysql-server | virtual-mysql-server (Closes: #732874). - * Suggests: - + libapache2-mod-php5 | php5-fpm - + logrotate - * Refreshed, renamed and re-ordered patches; added DEP-3 headers. - * Removed "vendor_perl" patch (applied-upstream). - * New patches: - + cmake-fix-confpath.patch - + cmake-gnutls.patch - + cmake-nossl.patch - + cmake.patch - + format-hardening.patch - + pod_man_fixes.patch - + pod_name_fixes.patch - + pod_zmupdate-to-pod2usage.patch - * Lintianisation (incomplete): - - extra-license-file - - init.d-script-missing-lsb-description - - init.d-script-does-not-source-init-functions - - privacy-breach-generic - - package-contains-empty-directory - - manpage-has-errors-from-pod2man - - manpage-has-bad-whatis-entry - - quilt-patch-missing-description - - no-dep5-copyright - * Lintian-overrides: - + unusual-interpreter usr/bin/zmsystemctl.pl #!/usr/bin/pkexec - + script-not-executable usr/share/zoneminder/www/api/* - + script-with-language-extension usr/bin/*.pl - + source-is-missing web/tools/mootools/mootools-*-yc.js - + source-is-missing web/skins/*/js/jquery-1.4.2.min.js - + source-contains-prebuilt-javascript-object - * Renamed files in "debian". - * watch: dfsg repacksuffix and dversionmangle. - * "debian/copyright" to Copyright-Format-1.0. - * Set myself as new Maintainer (Closes: #760314). - - [ Vagrant Cascadian ] - * Removed obsolete DM-Upload-Allowed flag. - * Update debian/watch to use tarballs from github. - * Add Build-Depends on libgcrypt11-dev (Closes: #745819). - * Use canonical alioth Vcs-Hg URL. - * debian/control: Add Build-Depends: libpolkit-gobject-1-dev. - * Removed configure flag "--enable-crashtrace=no", which is no longer - present upstream. - - -- Dmitry Smirnov Tue, 31 Mar 2015 15:11:13 +1100 - -zoneminder (1.26.5-3.1) experimental; urgency=low - - * Non-maintainer upload. - * Add libav10.patch and compile against libav10 (Closes: #739461) - - -- Reinhard Tartler Wed, 19 Mar 2014 00:31:22 +0000 - -zoneminder (1.26.5-3) unstable; urgency=low - - - * Previous release still didn't build on PPC - this has been corrected. - (Closes: #736516) - - -- Peter Howard Tue, 4 Feb 2014 02:02:10 +1000 - -zoneminder (1.26.5-2) unstable; urgency=low - - * Remove dependency on ffmpeg - (Closes: #721161) - - * Builds again on non-x86 target architectures. - - -- Peter Howard Thu, 23 Jan 2014 01:02:10 +1000 - -zoneminder (1.26.5-1) unstable; urgency=low - - * New upstream version - (Closes: #694131) - * Change Build-Depends on libgnutls-dev to libgnutls-openssl-dev - (Closes: #731560) - -- Peter Howard Tue, 17 Dec 2013 01:02:10 +1000 - -zoneminder (1.25.0-4) unstable; urgency=high - - * Add CVE-2013-0232 patch - [SECURITY] CVE-2013-0232: Shell escape commands with untrusted content. - Thanks to James McCoy (Closes: #698910) - Thanks also to Salvatore Bonaccorso - - -- Peter Howard Tue, 12 Jun 2013 12:02:10 +1000 - -zoneminder (1.25.0-3) unstable; urgency=low - - * debian/rules: Export CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS, to ensure - hardening build flags are enabled. - - -- Vagrant Cascadian Tue, 28 Aug 2012 12:10:03 -0700 - -zoneminder (1.25.0-2) unstable; urgency=low - - [ Vagrant Cascadian ] - * Add a patch to disable checking for updated versions by default, as - upgrades should happen through package management. - * Use dpkg-buildflags in debian/rules to set default compiler flags. - * Ensure zoneminder is stopped before starting (Closes: #657407). - - [ Peter Howard ] - * Fix postinst to add permission for table creation during upgrade - (Closes: #657407). - - -- Vagrant Cascadian Thu, 23 Aug 2012 12:40:34 -0700 - -zoneminder (1.25.0-1.1) unstable; urgency=low - - * Non-maintainer upload. - * Fix "ftbfs with GCC-4.7": add patch Fix-FTBFS-with-gcc-4.7 from Cyril - Brulebois: fix missing includes. - (Closes: #667428) - - -- gregor herrmann Sun, 13 May 2012 17:02:21 +0200 - -zoneminder (1.25.0-1) unstable; urgency=low - - * Fix typo in libv4l1-videodev.h patch that caused v4l1 support to be - dropped. - * Fail to build if version in postinst doesn't match upstream version. - * Add Build-Depends: libavdevice-dev to fix MPEG streaming (Closes: #515558). - * debian/rules: Convert to using debhelper overrides. - * Set debian/compat to 7. - * Simplify debian/watch file. - * Refresh debian/patches/use_libjs-mootools. - * Refresh debian/patches/libv4l1-videodev.h. - * Remove dependencies on php4 and related packages. - * Remove build-dependencies on libmysqlclient14-dev and - libmysqlclient15-dev. - * Update Build-Depends to use libjpeg-dev instead of libjpeg62-dev - (Closes: #647114). - * Add patch to fix build by testing for C headers rather than C++ headers. - Thanks to Ryan Niebur. (Closes: #654230) - * Add a patch to fix build problems caused by API changes in libav 0.8. - Thanks again to Ryan Niebur. (Closes: #654230) - - -- Vagrant Cascadian Mon, 16 Jan 2012 11:58:05 -0800 - -zoneminder (1.24.4-1) unstable; urgency=low - - [ Peter Howard ] - * Initial release of 1.24.4 (Closes: #634985). - - Fix 32/64-bit type declarations (Closes: #614404). - * Update patches. - - [ Vagrant Cascadian ] - * Add patch to fix FTBFS by using libv4l1-videodev.h from libv4l-dev. - Thanks to Andreas Metzler for reporting the issue. - (Closes: #619813). - * Document adding the www-data user to the video group in README.Debian. - (Closes: #611324) - * Depend on libsys-mmap-perl to enable mapped memory support. - (Closes: #607331) - * Update libjs-mootools patch to use -nc variants (Closes: #635075). - * Depend on javascript-common, to ensure that /javascript is available in - the web server. - * Set the upstream version in postinst at build time. - * Use dh-autoreconf to properly clean up autogenerated files during build. - * Add Vcs-HG to debian/control. - * Add Build-Depends: libv4l-dev, libbz2-dev, dh-autoreconf, libsys-mmap-perl. - - -- Vagrant Cascadian Sun, 24 Jul 2011 16:44:30 +0200 - -zoneminder (1.24.2-9) unstable; urgency=low - - * Apply patch from Ubuntu to fix FTBFS with ffmpeg 0.6: - - Add -D__STDC_CONSTANT_MACROS to CPPFLAGS (closes: 614080). - * Update Standards-Version to 3.9.1, no changes necessary. - - -- Vagrant Cascadian Sun, 20 Feb 2011 23:43:02 -0800 - -zoneminder (1.24.2-8) unstable; urgency=medium - - [ Vagrant Cascadian ] - * Apply patch to fix V4L2 cameras without crop support (closes: #608790). - Thanks to piratebab. - * Add preinst script which aborts if dangerous symlinks exist. - (closes: #608793) - - [ Peter Howard ] - * Added to README.Debian with info about images and events directories. - (closes: #608793) - - -- Vagrant Cascadian Sat, 15 Jan 2011 19:39:26 -0800 - -zoneminder (1.24.2-7) unstable; urgency=medium - - * Do not set ownership of /var/cache/zoneminder when upgrading, which fixes a - regression causing upgrades to take inordinately long with large - installations (closes: #597040). - - -- Vagrant Cascadian Fri, 17 Sep 2010 11:24:41 -0700 - -zoneminder (1.24.2-6) unstable; urgency=low - - * Only remove database on purge. This requires only creating the database if - it doesn't already exist, and upgrading the database only if the database - is an older version (closes: #497107). - - * Do not prompt the user on database upgrades by using the --nointeractive - flag when calling zmupdate.pl from postinst (closes: #595902). - - -- Vagrant Cascadian Fri, 10 Sep 2010 10:06:06 -0700 - -zoneminder (1.24.2-5) unstable; urgency=low - - [ Peter Howard ] - * Add zip dependency - (closes: #494261) - * Add debian/watch file - (closes: #545552) - * Use packaged libjs-mootools - (closes: #585590) - * Miscellaneous cleanups - - [ Vagrant Cascadian ] - * Add vagrant@debian.org as uploader - * Update Standards-Version to 3.9.0, no changes necessary. - - -- Vagrant Cascadian Fri, 23 Jul 2010 18:12:50 -0500 - -zoneminder (1.24.2-4.1) unstable; urgency=low - - * Non-maintainer upload. - * Fix "package removed, processes still running": apply patch to - debian/postinst by Vagrant Cascadian: use invoke-rc.d and run - mysql-related actions only when mysql is running (closes: #583648). - - -- gregor herrmann Thu, 01 Jul 2010 19:47:10 +0200 - -zoneminder (1.24.2-4) unstable; urgency=high - * Update init.d to list mysql dependency - (closes: #583505) - * Change depenency from libmime-perl to libmime-tools-perl - (closes: #585589) - * Problems in changelog format fixed - (closes: #585592) - * Fix debian-rules-ignores-make-clean-error - (closes: #585593) - -- Peter Howard Mon, 14 jun 2010 15:02:10 +1000 - -zoneminder (1.24.2-3) unstable; urgency=high - * Changes symbols to build with libjpeg8 - (closes: #565326, #568327) - * Note: location of all perl files should have been fixed in previous release - (closes: #553096) - -- Peter Howard Mon, 26 apr 2010 15:02:10 +1000 - -zoneminder (1.24.2-2) unstable; urgency=high - - * Remove custom perl parth from zmpkg.pl, fix location of manpages. - (closes: #551746, #553092) - * Fix GCC4.4 bug - (closes: #531717) - * Fix potential bug in postinst script - - -- Peter Howard Sat, 14 Nov 2009 15:02:10 +1000 - -zoneminder (1.24.2-1) unstable; urgency=high - - * Initial release of zoneminder 1.24.2 - -- Peter Howard Fri, 11 Sep 2009 07:02:50 +1000 - -zoneminder (1.24.1-1) unstable; urgency=high - - * Initial release of zoneminder 1.24.1, closing CVE-2008-3882, - CVE-2008-3881, CVE-2008-3880 - (closes: #497640) - * Change syslog dependency to rsyslog. - (closes: #526918) - * Add missing perl depenency. - * Restore patch to disable "check for updates" by default. - * Removed spurious '$' in init script. - (closes: #486064) - * Change permission of zm.conf from 0600 to 0400 for CVE-2008-6755 - (closes: #528252) - -- Peter Howard Sat, 16 May 2009 07:02:50 +1000 - -zoneminder (1.23.3-4) unstable; urgency=high - - * update to get it building with latest unstable. Thanks to waldi@debian.org - (closes: #517569) - -- Peter Howard Thu, 16 Apr 2009 01:02:50 +1000 - -zoneminder (1.23.3-3) unstable; urgency=high - - * ffmpeg confirmed working - (closes: #475145) - * Fix upgrade problem intrudouced in 1.23.3-1 - (closes: #481637) - * Include libmime-lite-perl in dependencies - (closes: #486312) - -- Peter Howard Thu, 18 Sep 2008 01:02:50 +1000 - -zoneminder (1.23.3-2) unstable; urgency=high - - * ffmpeg finally working? - - -- Peter Howard Wed, 13 Aug 2008 01:02:50 +1000 - -zoneminder (1.23.3-1) unstable; urgency=high - - * Initial version for 1.23.3 - security fix. - (closes: #479034) - - -- Peter Howard Wed, 19 Mar 2008 01:02:50 +1000 - -zoneminder (1.23.2-2) unstable; urgency=low - - * Update to init.d - (closes: #468856) - * Add dependency on logging daemon - (closes: #471277) - - -- Peter Howard Wed, 19 Mar 2008 01:02:50 +1000 - -zoneminder (1.23.2-1) unstable; urgency=low - - * Initial version for 1.23.2 - (closes: #464152) - * Zoneminder 1.23.2 upstream includes fix for GCC 4.3 - (closes: #454980) - * Includes ffmpeg patch by Alexander Kushnirenko - - -- Peter Howard Sat, 01 Mar 2008 16:02:50 +1000 - -zoneminder (1.22.3-10) unstable; urgency=low - - * Fix bug introduced in -9 where perl is put under /usr/local - (closes: #457507) - - -- Peter Howard Mon, 24 Dec 2007 16:02:50 +1000 - -zoneminder (1.22.3-9) unstable; urgency=low - - * Starting zoneminder via init script now invokes "zmfix -a" - (closes: #481637) - * Change apache2-mpm-prefork dependency to apache2 - * Temp dir for export under /var/cache/zoneminder (but linked back to - /usr/share/zoneminder for now) - * Redo use of gnutls rather than openssl for md5 hashes - - -- Peter Howard Mon, 10 Dec 2007 16:02:50 +1000 - -zoneminder (1.22.3-8) unstable; urgency=low - - * Build now includes libpcre3 - (closes: #437533) - * "Monitor Presets" patch now applied to package during build. - - -- Peter Howard Sat, 18 Aug 2007 14:35:23 +1000 - -zoneminder (1.22.3-7) unstable; urgency=low - - * Turn off debug trace and crash dump on build - (closes:#414857,#414891) - * Additional perl libraries added in dependencies - (closes:#416291) - * Change preferred PHP version from 4 to 5 - -- Peter Howard Sun, 29 Jul 2007 15:11:13 +1000 - -zoneminder (1.22.3-6) unstable; urgency=low - - * Removed a similar bash only statement from zmpkg.pl - (closes:414882) - - -- Peter Howard Sat, 14 Apr 2007 11:46:56 +1000 - -zoneminder (1.22.3-5) unstable; urgency=low - - * Installs with "phone home" feature turned off by default, and permissions - on /etc/zm/zm.conf fixed (now the 0600 it s hould be) - (closes:415349) - * Removed "stupid bash-ism" on mysqld check in postinst file. - - -- Peter Howard Fri, 6 Apr 2007 15:50:00 +1000 - -zoneminder (1.22.3-4) unstable; urgency=low - - * Put libmysqlclient-15-dev in front of -14-dev so sbuild works - (closes: #414410) - - -- Peter Howard Mon, 12 Mar 2007 11:38:56 +1100 - -zoneminder (1.22.3-3) unstable; urgency=low - - * Clean up of postinstall, postrm ; user "zm" definitely was a mistake - * Also in postinstall: check and start MySQL if it's not running. - * init.d script now checks if zoneminder isn't running and still returns 0 - (which helps uninstalling) - * Addition of php5 dependency options as well as php4. - - -- Peter Howard Mon, 26 Feb 2007 10:40:52 +1100 - -zoneminder (1.22.3-2) unstable; urgency=low - - * Added zmuser in the mysql creation; this should fix the install problem - for people, but needs to be cleaned up (in -3) - - -- Peter Howard Fri, 16 Feb 2007 14:16:03 +1100 - -zoneminder (1.22.3-1) unstable; urgency=low - - * Initial Version. (closes: #248393) - * Patched out use of openssl; uses gnutls instead for MD5 hashes. - * Removed MakeMaker-inserted Perl licensing (with authors permission) in - various scripts; replaced with GPL. - - -- Peter Howard Wed, 7 Feb 2007 14:09:01 +1100 diff --git a/distros/ubuntu1204_cmake/compat b/distros/ubuntu1204_cmake/compat deleted file mode 100644 index ec635144f..000000000 --- a/distros/ubuntu1204_cmake/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/distros/ubuntu1204_cmake/control b/distros/ubuntu1204_cmake/control deleted file mode 100644 index 6368d9417..000000000 --- a/distros/ubuntu1204_cmake/control +++ /dev/null @@ -1,138 +0,0 @@ -Source: zoneminder -Section: net -Priority: optional -Maintainer: Dmitry Smirnov -Uploaders: Vagrant Cascadian -Build-Depends: debhelper (>= 9), python-sphinx | python3-sphinx, apache2-dev, dh-linktree - ,cmake - ,libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libavdevice-dev - ,libbz2-dev - ,libgcrypt-dev - ,libcurl4-gnutls-dev - ,libgnutls-openssl-dev - ,libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, - ,libmysqlclient-dev - ,libpcre3-dev - ,libpolkit-gobject-1-dev - ,libv4l-dev (>= 0.8.3) [!hurd-any] - ,libvlc-dev -# Unbundled (dh_linktree): - ,libjs-jquery - ,libjs-mootools -Standards-Version: 3.9.4 -Homepage: http://www.zoneminder.com/ -Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/zoneminder.git -Vcs-Git: git://anonscm.debian.org/collab-maint/zoneminder.git - -Package: zoneminder -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} - ,javascript-common - ,libav-tools|ffmpeg - ,libdate-manip-perl - ,libdbd-mysql-perl - ,libmime-lite-perl - ,libmime-tools-perl - ,libphp-serialization-perl - ,libmodule-load-conditional-perl - ,libnet-sftp-foreign-perl -# ,libzoneminder-perl (= ${source:Version}) - ,libarchive-zip-perl - ,libdbd-mysql-perl - ,libdevice-serialport-perl - ,libimage-info-perl - ,libjson-any-perl - ,libsys-mmap-perl [!hurd-any] - ,liburi-encode-perl - ,libwww-perl - ,mysql-client | virtual-mysql-client - ,perl-modules - ,php5-mysql, php5-gd - ,policykit-1 - ,rsyslog | system-log-daemon - ,zip - ,libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl - , libsys-cpu-perl, libsys-meminfo-perl -Recommends: ${misc:Recommends} - ,libapache2-mod-php5 | php5-fpm - ,mysql-server | virtual-mysql-server - ,zoneminder-doc (>= ${source:Version}) -Suggests: fcgiwrap, logrotate -Description: video camera security and surveillance solution - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - -#Package: libzoneminder-perl -#Section: perl -#Architecture: all -#Multi-Arch: foreign -#Depends: ${misc:Depends}, ${perl:Depends} -# ,libarchive-zip-perl -# ,libdbd-mysql-perl -# ,libdevice-serialport-perl -# ,libimage-info-perl -# ,libjson-any-perl -# ,libsys-mmap-perl [!hurd-any] -# ,liburi-encode-perl -# ,libwww-perl -#Description: ZoneMinder Perl libraries -# ZoneMinder is intended for use in single or multi-camera video security -# applications, including commercial or home CCTV, theft prevention and child -# or family member or home monitoring and other care scenarios. It -# supports capture, analysis, recording, and monitoring of video data coming -# from one or more video or network cameras attached to a Linux system. -# ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom -# cameras using a variety of protocols. It is suitable for use as a home -# video security system and for commercial or professional video security -# and surveillance. It can also be integrated into a home automation system -# via X.10 or other protocols. -# . -# This package provides ZoneMinder Perl libraries; it can be used to -# write custom interfaces as well. - -Package: zoneminder-doc -Section: doc -Architecture: all -Multi-Arch: foreign -Depends: ${misc:Depends}, ${sphinxdoc:Depends} -Suggests: www-browser -Description: ZoneMinder documentation - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - . - This package provides ZoneMinder documentation in HTML format. - -Package: zoneminder-dbg -Section: debug -Priority: extra -Architecture: any -Depends: zoneminder (= ${binary:Version}), ${misc:Depends} -Description: Zoneminder -- debugging symbols - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - . - This package provides debugging symbols diff --git a/distros/ubuntu1204_cmake/copyright b/distros/ubuntu1204_cmake/copyright deleted file mode 100644 index c48025a25..000000000 --- a/distros/ubuntu1204_cmake/copyright +++ /dev/null @@ -1,174 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: ZoneMinder -Upstream-Contact: Philip Coombes -Source: https://github.com/ZoneMinder/ZoneMinder -Comment: - This package was originally debianized by matrix - on Mon, 7 Mar 2005 02:07:57 -0500. - It was re-done for submission to the Debian project by Peter Howard - on Fri, 8 Dec 2006 10:19:43 +1100 -Files-Excluded: - web/skins/*/js/jquery-* - web/tools/mootools/*-yc.js - -Files: * -Copyright: 2001-2014 Philip Coombes - 2008 Brian Rudy - 2014 Vincent Giovannone - 2013 Tim Craig - 2003-2008 Corey DeLasaux - 2001-2010 Chris Kistner -License: GPL-2+ - -Files: distros/* -Copyright: 2001-2008 Philip Coombes - 2014 Isaac Connor - 2005 Serg Oskin -License: GPL-2+ - -Files: web/skins/*/js/jquery-* -Copyright: 2010 John Resig - 2010 The Dojo Foundation -License: GPL-2 or Expat -Comment: - Dual licensed under the MIT or GPL Version 2 licenses. - http://jquery.org/license - . - Includes Sizzle.js http://sizzlejs.com/ - Released under the MIT, BSD, and GPL Licenses. - -Files: web/tools/mootools/*.js -Copyright: 2009 Marcelo Jorge Vieira (metal) - 2006-2010 Valerio Proietti (http://mad4milk.net/) -License: Expat - -Files: web/api/* -Copyright: 2005-2013 Cake Software Foundation, Inc. (http://cakefoundation.org) -License: Expat - -Files: - cmake/Modules/CheckPrototypeDefinition*.cmake - cmake/Modules/FindGLIB2.cmake - cmake/Modules/FindPolkit.cmake - cmake/Modules/GNUInstallDirs.cmake -Copyright: - 2005-2011 Kitware, Inc. - 2010-2011 Andreas Schneider - 2009 Dario Freddi - 2008 Laurent Montel, - 2011 Nikita Krupen'ko -License: BSD-3-clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - . - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - . - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - . - * The names of Kitware, Inc., the Insight Consortium, or the names of - any consortium members, or of any contributors, may not be used to - endorse or promote products derived from this software without - specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Files: cmake/Modules/FindPerlModules.cmake -Copyright: 2012 Iowa State University -License: Boost-1.0 - Boost Software License - Version 1.0 - August 17th, 2003 - . - Permission is hereby granted, free of charge, to any person or organization - obtaining a copy of the software and accompanying documentation covered by - this license (the "Software") to use, reproduce, display, distribute, - execute, and transmit the Software, and to prepare derivative works of the - Software, and to permit third-parties to whom the Software is furnished to - do so, all subject to the following: - . - The copyright notices in the Software and this entire statement, including - the above license grant, this restriction and the following disclaimer, - must be included in all copies of the Software, in whole or in part, and - all derivative works of the Software, unless such copies or derivative - works are solely in the form of machine-executable object code generated by - a source language processor. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - -Files: debian/* -Copyright: 2015 Dmitry Smirnov - 2007-2014 Peter Howard - 2010-2012 Vagrant Cascadian - 2001-2008 Philip Coombes -License: GPL-2+ - -License: Expat - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - -License: GPL-2+ - This package is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - . - You should have received a copy of the GNU General Public - License along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - The complete text of the GNU General Public License version 2 - can be found in "/usr/share/common-licenses/GPL-2". - -License: GPL-2 - This package is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; version 2 of the License. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - . - You should have received a copy of the GNU General Public - License along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - The complete text of the GNU General Public License version 2 - can be found in "/usr/share/common-licenses/GPL-2". diff --git a/distros/ubuntu1204_cmake/patches/series b/distros/ubuntu1204_cmake/patches/series deleted file mode 100644 index fc70f4006..000000000 --- a/distros/ubuntu1204_cmake/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -default_cgi-path.patch -use_libjs-mootools.patch diff --git a/distros/ubuntu1204_cmake/rules b/distros/ubuntu1204_cmake/rules deleted file mode 100755 index b467c870f..000000000 --- a/distros/ubuntu1204_cmake/rules +++ /dev/null @@ -1,87 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export DEB_LDFLAGS_MAINT_APPEND += -Wl,--as-needed - -ifeq ($(DEB_BUILD_ARCH_OS),hurd) -ARGS:= -DZM_NO_MMAP=ON -endif - -%: - dh $@ --parallel --buildsystem=cmake --builddirectory=dbuild \ - --with sphinxdoc,apache2,linktree - -override_dh_auto_configure: - dh_auto_configure -- $(ARGS) \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DZM_CONFIG_DIR="/etc/zm" \ - -DZM_RUNDIR="/var/run/zm" \ - -DZM_SOCKDIR="/var/run/zm" \ - -DZM_TMPDIR="/tmp/zm" \ - -DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \ - -DZM_CONTENTDIR="/var/cache/zoneminder" - -override_dh_clean: - dh_clean $(MANPAGES1) - $(RM) -r docs/_build docs/installationguide - -build-indep: - #$(MAKE) -C docs text - $(MAKE) -C docs html - -MANPAGES1 = dbuild/scripts/zmupdate.pl.1 -$(MANPAGES1): - # generate man page(s): - pod2man -s1 --stderr --utf8 $(patsubst %.1, %, $@) $@ - -## reproducible build: -LAST_CHANGE=$(shell dpkg-parsechangelog -S Date) -BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)") -override_dh_installman: $(MANPAGES1) - $(MAKE) -C docs man SPHINXOPTS="-D today=\"$(BUILD_DATE)\"" - dh_installman --language=C $(MANPAGES1) - -override_dh_auto_install: - dh_auto_install --destdir=$(CURDIR)/debian/tmp - # remove worthless files: - $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*/*/.packlist - $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*.in - # remove empty directories: - find $(CURDIR)/debian/tmp/usr -type d -empty -delete -printf 'removed %p\n' - # remove extra-license-file: - $(RM) -v $(CURDIR)/debian/tmp/usr/share/zoneminder/www/api/lib/Cake/LICENSE.txt - -override_dh_fixperms: - dh_fixperms - ## 637685 - chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf - -override_dh_installinit: - dh_installinit --no-start - -override_dh_apache2: - dh_apache2 --noenable - -override_dh_strip: - [ -d "$(CURDIR)/debian/zoneminder-dbg" ] \ - && dh_strip --dbg-package=zoneminder-dbg \ - || dh_strip - -#%: -# dh $@ --parallel --buildsystem=autoconf --with autoreconf -# -#override_dh_auto_configure: -# dh_auto_configure -- \ -# --sysconfdir=/etc/zm \ -# --with-mysql=/usr \ -# --with-webdir=/usr/share/zoneminder \ -# --with-ffmpeg=/usr \ -# --with-cgidir=/usr/lib/cgi-bin \ -# --with-webuser=www-data \ -# --with-webgroup=www-data \ -# --enable-mmap=yes diff --git a/distros/ubuntu1204_cmake/watch b/distros/ubuntu1204_cmake/watch deleted file mode 100644 index 7ee690edb..000000000 --- a/distros/ubuntu1204_cmake/watch +++ /dev/null @@ -1,7 +0,0 @@ -version=3 - -opts=\ -repacksuffix=+dfsg,\ -dversionmangle=s{\+dfsg\d*}{},\ - https://github.com/ZoneMinder/ZoneMinder/releases \ - .*/ZoneMinder/archive/v(.*).tar.gz diff --git a/distros/ubuntu1204_cmake/zoneminder.postinst b/distros/ubuntu1204_cmake/zoneminder.postinst deleted file mode 100644 index e7810e468..000000000 --- a/distros/ubuntu1204_cmake/zoneminder.postinst +++ /dev/null @@ -1,13 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" = "configure" ]; then - chown www-data:root /var/log/zm - chown www-data:www-data /var/lib/zm - if [ -z "$2" ]; then - chown www-data:www-data -R /var/cache/zoneminder - fi -fi - -#DEBHELPER# diff --git a/distros/ubuntu1504_cmake/NEWS b/distros/ubuntu1504/NEWS similarity index 100% rename from distros/ubuntu1504_cmake/NEWS rename to distros/ubuntu1504/NEWS diff --git a/distros/ubuntu1504/README.Debian b/distros/ubuntu1504/README.Debian index b8ea413e3..8182e0678 100644 --- a/distros/ubuntu1504/README.Debian +++ b/distros/ubuntu1504/README.Debian @@ -1,9 +1,120 @@ -zoneminder for Debian +Zoneminder for Debian --------------------- -There is one manual step to get the web interface working. -You need to link /etc/zm/apache.conf to /etc/apache2/conf.d/zoneminder.conf, -then reload the apache config (i.e. /etc/init.d/apache2 reload) +Initializing database +--------------------- + + pv /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf +OR + cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf + + echo 'grant lock tables,alter,create,index,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";'\ + | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql + +Hint: generate secure password with `pwgen` and update "/etc/zm/zm.conf" +accordingly. + +The following command can help to ensure that zoneminder can read its +configuration file: + + chgrp -c www-data /etc/zm/zm.conf + + +Upgrading database +------------------ + +Prior to 1.28.1 database upgrade was performed automatically. +"zoneminder" service will refuse to start with outdated database. + +Assuming that database is on "localhost" then the following command can be +used to upgrade "zm" database: + + zmupdate.pl + +Additional permissions may be required to perform upgrade: + + echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";'\ + | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql + +The following command prints the current version of zoneminder database: + + echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' \ + | sudo mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm + + +Enabling service +---------------- + +By default Zoneminder service is not starting automatically and need to be +manually activated once database is configured: + +On systemd: + + sudo systemctl enable zoneminder.service + +On SysV: + + sudo update-rc.d zoneminder enable + + +Web server set-up +----------------- + +There are few manual steps to get the web interface working: + +## Apache2 + +Apache can be configured as folder "/zm" using sample .conf: + + sudo a2enconf zoneminder + +Alternatively Apache web site configuration template can be used to setup +zoneminder as "http://zoneminder": + + sudo cp -v /usr/share/doc/zoneminder/examples/apache.conf /etc/apache2/sites-available/ + sudo a2ensite zoneminder.conf + +Common configuration steps for Apache2: + + sudo a2enmod cgi + sudo service apache2 reload + + +## nginx / fcgiwrap + +Nginx needs "php5-fpm" package to support PHP and "fcgiwrap" package +for binary "cgi-bin" applications: + + sudo apt-get install php5-fpm fcgiwrap + +To enable a URL alias that makes Zoneminder available from + + http://yourserver/zm + +the following line is to be added to "server" section of a web site +configuration: + + include /usr/share/doc/zoneminder/examples/nginx.conf; + +For "default" web site it would be sufficient to include the above +statement to the file + + /etc/nginx/sites-enabled/default + +To avoid problems with feeds from multiple cameras "fcgiwrap" should be +configured to start at least as many processes as there are cameras. +It can be done by adjusting DAEMON_OPTS in "/etc/default/fcgiwrap". +Systemd users may be affected by the following bug: + + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792705 + + +## Note: + +When Zoneminder web site is running it may be necessary to set +Options/Paths/PATH_ZMS to "/zm/cgi-bin/nph-zms" or according to chosen web +site configuration. + Changing the location for images and events ------------------------------------------- @@ -33,19 +144,17 @@ These lines in fstab could allow you to bind-mount an alternate location /dev/sdX1 /var/cache/zoneminder/images ext3 defaults 0 2 /dev/sdX2 /var/cache/zoneminder/events ext3 defaults 0 2 - - -- Peter Howard , Sun, 16 Jan 2010 01:35:51 +1100 Access to /dev/video* --------------------- -For cameras which require access to /dev/video*, zoneminder may need the +For cameras which require access to /dev/video*, zoneminder may need the www-data user added to the video group in order to see those cameras: adduser www-data video -Note that all web applications running on the zoneminder server will then have +Note that all web applications running on the zoneminder server will then have access to all video devices on the system. -- Vagrant Cascadian Sun, 27 Mar 2011 13:06:56 -0700 diff --git a/distros/ubuntu1504_cmake/TODO.Debian b/distros/ubuntu1504/TODO.Debian similarity index 100% rename from distros/ubuntu1504_cmake/TODO.Debian rename to distros/ubuntu1504/TODO.Debian diff --git a/distros/ubuntu1504/apache.conf b/distros/ubuntu1504/apache.conf deleted file mode 100644 index 965c67f86..000000000 --- a/distros/ubuntu1504/apache.conf +++ /dev/null @@ -1,9 +0,0 @@ -Alias /zm /usr/share/zoneminder/www - - - php_flag register_globals off - Options Indexes FollowSymLinks - - DirectoryIndex index.php - - diff --git a/distros/ubuntu1504/changelog b/distros/ubuntu1504/changelog index 9dea00498..74cf1d0b8 100644 --- a/distros/ubuntu1504/changelog +++ b/distros/ubuntu1504/changelog @@ -1,94 +1,573 @@ -zoneminder (1.28.1+1-vivid-SNAPSHOT2015071501) vivid; urgency=medium +zoneminder (1.28.1+1-vivid-SNAPSHOT2015081701) vivid; urgency=medium - * fix for issue #586 and #932 - * fix for db not being upgraded - * version upgraded to .100 + * include api, switch to cmake build - -- Isaac Connor Wed, 15 Jul 2015 11:56:28 -0400 + -- Isaac Connor Mon, 17 Aug 2015 10:29:23 -0400 -zoneminder (1.28.1+1-trusty-SNAPSHOT2015030201) trusty; urgency=medium - * maybe fix for RTSP Basic Auth - * Also remove dependency on netpbm +zoneminder (1.28.1-8) unstable; urgency=medium - -- Isaac Connor Mon, 02 Mar 2015 11:25:59 -0500 + * Patchworks: + + New upstream "980-fix-image-size.patch". + + New "default_cgi-path.patch" to correct default ZM_PATH_ZMS. + * postinst: set "root" as group owner for "/var/log/zm" to silence + logrotate warnings. + * Minor correction to README.Debian. -zoneminder (1.28.1+1-utopic-SNAPSHOT2015022301) utopic; urgency=medium + -- Dmitry Smirnov Sun, 16 Aug 2015 19:19:50 +1000 - * Big merge of onvif support and some fixes. +zoneminder (1.28.1-7) unstable; urgency=medium - -- Isaac Connor Mon, 23 Feb 2015 19:45:45 -0500 + * Build-Depends += "cakephp (<< 3.0.0~)"; + Zoneminder is not compatible with latest CakePHP. + * Handle conffile removal from maintscript. + * rules: build man pages reproducibly. + * gbp.conf: renamed old style config section [git-dch] to [dch]. + * README + + added instructions to update owner of the "/etc/zm/zm.conf" + (Closes: #789327). + + zmupdate.pl needs CREATE rights. + + added note about required number of "fcgiwrap" workers. + * New upstream patch: "zmtrigger-plus.patch". -zoneminder (1.28.0+1-trusty-SNAPSHOT2015021201) trusty; urgency=medium + -- Dmitry Smirnov Mon, 20 Jul 2015 16:30:15 +1000 - * add mysql-client-5.6 as a dependency instaed of mysql-client. +zoneminder (1.28.1-6) unstable; urgency=low - -- Isaac Connor Fri, 13 Feb 2015 09:35:13 -0500 + * New "zoneminder-doc" and "zoneminder-dbg" packages. -zoneminder (1.28.0+1-trusty-SNAPSHOT2015011101) trusty; urgency=medium + -- Dmitry Smirnov Sun, 19 Apr 2015 14:50:41 +1000 - * small changes +zoneminder (1.28.1-5) unstable; urgency=low - -- Isaac Connor Fri, 12 Dec 2014 16:38:36 -0500 + * Move handling of "/var/run/zm" and "/tmp/zm" from .service into .tmpfile. + Let dh_installinit do the job. Thanks, Andrew Bauer. + * Use dh_apache2 to install Apache conf file; remove old conf and symlink. + * Promote "libapache2-mod-php5 | php5-fpm" to Recommends. + * Build-Depends: + + dh-linktree + + cakephp (>= 2.6.3) + + libjs-jquery + + libjs-mootools + * Depends: + - libjs-jquery + - libjs-mootools + * Build-time replace bundled CakePHP with system one using "dh-linktree". + * Use "dh-linktree" to handle mootools and jquery symlinks. -zoneminder (1.28.0+1-utopic-SNAPSHOT2014112001) utopic; urgency=medium + -- Dmitry Smirnov Sun, 19 Apr 2015 11:45:01 +1000 - * Various fixes and developments since 1.28.0. Includes Digest-Auth for HTTP and better for RTSP +zoneminder (1.28.1-4) unstable; urgency=low - -- Isaac Connor Thu, 20 Nov 2014 10:57:57 -0500 + * New patch to fix HTML export with USE_DEEP_STORAGE (closes: #723706). + * New "783.patch" to describe potential data loss in ZM_USE_DEEP_STORAGE. + * New patch to change default date format to region-neutral ISO notation + with time zone. + * Build sphinx documentation: + + Install "zoneminder.1" man page. + + Build-Depends += "python-sphinx | python3-sphinx" + + Added commented "zoneminder-doc" package. + + Added "docs.patch" to unlink distro-specific installation docs. + * rules: + + set ZM_CONTENTDIR, ZM_SOCKDIR and ZM_TMPDIR. + + remove mistakengly installed Perl module templates. + * Updated startup scripts to create ZM_TMPDIR. + * Hurd improvements: + + New patch to add PATH_MAX definitions. + + Build without MMAP support on Hurd. + + libsys-mmap-perl [!hurd-any]. -zoneminder (1.28.0-trusty) trusty; urgency=medium + -- Dmitry Smirnov Mon, 06 Apr 2015 18:18:55 +1000 - * Release +zoneminder (1.28.1-3) unstable; urgency=low - -- Isaac Connor Fri, 17 Oct 2014 09:25:55 -0400 + * Updated Apache2 and nginx configuration templates to support CGI. + * Updated README.Debian to document cgi-bin setup. + * Removed "/usr/share/zoneminder/www/cgi-bin" symlink. + * Added "apache2.patch" to correct Apache2 site configuration example. + * control: Suggests += "fcgiwrap". + * rules: added dh_systemd overrides to prevent automatic service + activation and start. + * Added note about manual service activation to README.Debian + (Closes: #781733). -zoneminder (1.27.99+1-trusty-SNAPSHOT2014101401) trusty; urgency=medium + -- Dmitry Smirnov Thu, 02 Apr 2015 23:20:20 +1100 - * Several PR merges in big push for 1.28.0 +zoneminder (1.28.1-2) unstable; urgency=low - -- Isaac Connor Tue, 14 Oct 2014 09:28:29 -0400 + * Removed word "Linux" from short package description. + * Build-Depends: do not require "libv4l-dev" on Hurd i.e. [!hurd-any]. + * Added run-time Perl Depends: + + libdbd-mysql-perl + + libimage-info-perl + + libmodule-load-conditional-perl + + libnet-sftp-foreign-perl + + liburi-encode-perl + * Prepare for package split: added commented "libzoneminder-perl" + and "zoneminder-dbg" packages to "debian/control". + * rules: do not install worthless ".packlist" file. + * Updated "libv4l1-videodev.h.patch" to fix v4lv1 detection in CMake. -zoneminder (1.27.99+1-trusty-SNAPSHOT2014092601) trusty; urgency=medium + -- Dmitry Smirnov Thu, 02 Apr 2015 13:25:19 +1100 - * style updates and db fixes for database logging filters +zoneminder (1.28.1-1) unstable; urgency=low - -- Isaac Connor Fri, 26 Sep 2014 14:44:45 -0400 + [ Dmitry Smirnov ] + * New upstream release [February 2015]. + * Upload to unstable. + * Disabled automatic database upgrades: post(inst|rm) scripts no longer + touch database or do unexpected stuff (Closes: #779254). + See README.Debian for details. + * Updated installation paths: + + /usr/share/zoneminder --> /usr/share/zoneminder/www + + /usr/lib/cgi-bin --> /usr/lib/zoneminder/cgi-bin + * Added logrotate config (Closes: #544826). + Thanks, Alberto Reyes. + * Native systemd service; "--with systemd" added to dh. + * Build with CMake instead of autoconf; rules clean-up. + * Build with all hardening. + * Build and install "zmupdate.pl.1" man page. + * Added nginx/php5-fpm configuration example. + * Install upstream "apache.conf" example. + * Described setup of Zoneminer web site and database in README.Debian. + * Install "/etc/zm/zm.conf" with tighter permissions. + * Added TODO.Debian. + * Added "debian/clean"; "debian/gbp.conf"; bug-presubj. + * Remove bundled Cake tests to take ~5 MB off big-usr-share. + * Standards-Version: 3.9.6; compat/debhelper to version 9. + * Vcs links to new git repository at collab-maint. + * Build-Depends: + + dh-systemd + + libgcrypt11-dev --> libgcrypt-dev + + libcurl4-gnutls-dev + + libvlc-dev + + policykit-1 (required by "zmsystemctl.pl") + - dh-autoreconf, autoconf, automake + * Depends: + - apache2 + - libapache2-mod-php5 (moved to Suggests) + - libpcre3 (invalid) + - libmodule-load-perl (obsolete; replaced with perl-modules) + - libarchive-tar-perl (obsolete; replaced with perl-modules) + - mysql-server (moved to Recommends, Closes: #759504). + - php5 + + libav-tools + + libjs-jquery (replaces bundled component) + + libjs-mootool (replaces bundled component) + + libjson-any-perl (Closes: #690803). + + perl-modules (Closes: #745819). + * Recommends: + + apache2 | httpd + + mysql-server | virtual-mysql-server (Closes: #732874). + * Suggests: + + libapache2-mod-php5 | php5-fpm + + logrotate + * Refreshed, renamed and re-ordered patches; added DEP-3 headers. + * Removed "vendor_perl" patch (applied-upstream). + * New patches: + + cmake-fix-confpath.patch + + cmake-gnutls.patch + + cmake-nossl.patch + + cmake.patch + + format-hardening.patch + + pod_man_fixes.patch + + pod_name_fixes.patch + + pod_zmupdate-to-pod2usage.patch + * Lintianisation (incomplete): + - extra-license-file + - init.d-script-missing-lsb-description + - init.d-script-does-not-source-init-functions + - privacy-breach-generic + - package-contains-empty-directory + - manpage-has-errors-from-pod2man + - manpage-has-bad-whatis-entry + - quilt-patch-missing-description + - no-dep5-copyright + * Lintian-overrides: + + unusual-interpreter usr/bin/zmsystemctl.pl #!/usr/bin/pkexec + + script-not-executable usr/share/zoneminder/www/api/* + + script-with-language-extension usr/bin/*.pl + + source-is-missing web/tools/mootools/mootools-*-yc.js + + source-is-missing web/skins/*/js/jquery-1.4.2.min.js + + source-contains-prebuilt-javascript-object + * Renamed files in "debian". + * watch: dfsg repacksuffix and dversionmangle. + * "debian/copyright" to Copyright-Format-1.0. + * Set myself as new Maintainer (Closes: #760314). -zoneminder (1.27.99+1-trusty-SNAPSHOT2014090801) trusty; urgency=medium + [ Vagrant Cascadian ] + * Removed obsolete DM-Upload-Allowed flag. + * Update debian/watch to use tarballs from github. + * Add Build-Depends on libgcrypt11-dev (Closes: #745819). + * Use canonical alioth Vcs-Hg URL. + * debian/control: Add Build-Depends: libpolkit-gobject-1-dev. + * Removed configure flag "--enable-crashtrace=no", which is no longer + present upstream. - * several segfault fixes for local cameras + -- Dmitry Smirnov Tue, 31 Mar 2015 15:11:13 +1100 - -- Isaac Connor Mon, 08 Sep 2014 16:56:57 -0400 +zoneminder (1.26.5-3.1) experimental; urgency=low -zoneminder (1.27.99+1-trusty-SNAPSHOT2014090701) trusty; urgency=medium + * Non-maintainer upload. + * Add libav10.patch and compile against libav10 (Closes: #739461) - * Fix segfaults for local cameras, also now includes the systemd support patch + -- Reinhard Tartler Wed, 19 Mar 2014 00:31:22 +0000 - -- Isaac Connor Sun, 07 Sep 2014 17:19:01 -0400 +zoneminder (1.26.5-3) unstable; urgency=low -zoneminder (1.27.99+1-trusty-SNAPSHOT2014082102) trusty; urgency=medium - * Fix UI inputs for v4l multibuffer and captures per frame + * Previous release still didn't build on PPC - this has been corrected. + (Closes: #736516) - -- Isaac Connor Thu, 21 Aug 2014 12:03:31 -0400 + -- Peter Howard Tue, 4 Feb 2014 02:02:10 +1000 -zoneminder (1.27.99+1-trusty-SNAPSHOT2014082101) trusty; urgency=medium +zoneminder (1.26.5-2) unstable; urgency=low - * fall back to Config table values for V4l MultiBUffer and Captures Per Frame - * add mention of monitor page settings for thse in the config table + * Remove dependency on ffmpeg + (Closes: #721161) - -- Isaac Connor Thu, 21 Aug 2014 10:04:46 -0400 + * Builds again on non-x86 target architectures. -zoneminder (1.27.99+1-precise-SNAPSHOT2014080601) precise; urgency=medium + -- Peter Howard Thu, 23 Jan 2014 01:02:10 +1000 - * improve error messages - * Make zmupdate re-run the most recent patch so that people running the daily builds get their db updates +zoneminder (1.26.5-1) unstable; urgency=low - -- Isaac Connor Wed, 06 Aug 2014 20:20:20 -0400 + * New upstream version + (Closes: #694131) + * Change Build-Depends on libgnutls-dev to libgnutls-openssl-dev + (Closes: #731560) + -- Peter Howard Tue, 17 Dec 2013 01:02:10 +1000 -zoneminder (1.27.0+1-trusty-v4ltomonitor-1) trusty; urgency=high +zoneminder (1.25.0-4) unstable; urgency=high - * Snapshot release - + * Add CVE-2013-0232 patch + [SECURITY] CVE-2013-0232: Shell escape commands with untrusted content. + Thanks to James McCoy (Closes: #698910) + Thanks also to Salvatore Bonaccorso - -- Isaac Connor Wed, 09 Jul 2014 21:35:29 -0400 + -- Peter Howard Tue, 12 Jun 2013 12:02:10 +1000 + +zoneminder (1.25.0-3) unstable; urgency=low + + * debian/rules: Export CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS, to ensure + hardening build flags are enabled. + + -- Vagrant Cascadian Tue, 28 Aug 2012 12:10:03 -0700 + +zoneminder (1.25.0-2) unstable; urgency=low + + [ Vagrant Cascadian ] + * Add a patch to disable checking for updated versions by default, as + upgrades should happen through package management. + * Use dpkg-buildflags in debian/rules to set default compiler flags. + * Ensure zoneminder is stopped before starting (Closes: #657407). + + [ Peter Howard ] + * Fix postinst to add permission for table creation during upgrade + (Closes: #657407). + + -- Vagrant Cascadian Thu, 23 Aug 2012 12:40:34 -0700 + +zoneminder (1.25.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "ftbfs with GCC-4.7": add patch Fix-FTBFS-with-gcc-4.7 from Cyril + Brulebois: fix missing includes. + (Closes: #667428) + + -- gregor herrmann Sun, 13 May 2012 17:02:21 +0200 + +zoneminder (1.25.0-1) unstable; urgency=low + + * Fix typo in libv4l1-videodev.h patch that caused v4l1 support to be + dropped. + * Fail to build if version in postinst doesn't match upstream version. + * Add Build-Depends: libavdevice-dev to fix MPEG streaming (Closes: #515558). + * debian/rules: Convert to using debhelper overrides. + * Set debian/compat to 7. + * Simplify debian/watch file. + * Refresh debian/patches/use_libjs-mootools. + * Refresh debian/patches/libv4l1-videodev.h. + * Remove dependencies on php4 and related packages. + * Remove build-dependencies on libmysqlclient14-dev and + libmysqlclient15-dev. + * Update Build-Depends to use libjpeg-dev instead of libjpeg62-dev + (Closes: #647114). + * Add patch to fix build by testing for C headers rather than C++ headers. + Thanks to Ryan Niebur. (Closes: #654230) + * Add a patch to fix build problems caused by API changes in libav 0.8. + Thanks again to Ryan Niebur. (Closes: #654230) + + -- Vagrant Cascadian Mon, 16 Jan 2012 11:58:05 -0800 + +zoneminder (1.24.4-1) unstable; urgency=low + + [ Peter Howard ] + * Initial release of 1.24.4 (Closes: #634985). + - Fix 32/64-bit type declarations (Closes: #614404). + * Update patches. + + [ Vagrant Cascadian ] + * Add patch to fix FTBFS by using libv4l1-videodev.h from libv4l-dev. + Thanks to Andreas Metzler for reporting the issue. + (Closes: #619813). + * Document adding the www-data user to the video group in README.Debian. + (Closes: #611324) + * Depend on libsys-mmap-perl to enable mapped memory support. + (Closes: #607331) + * Update libjs-mootools patch to use -nc variants (Closes: #635075). + * Depend on javascript-common, to ensure that /javascript is available in + the web server. + * Set the upstream version in postinst at build time. + * Use dh-autoreconf to properly clean up autogenerated files during build. + * Add Vcs-HG to debian/control. + * Add Build-Depends: libv4l-dev, libbz2-dev, dh-autoreconf, libsys-mmap-perl. + + -- Vagrant Cascadian Sun, 24 Jul 2011 16:44:30 +0200 + +zoneminder (1.24.2-9) unstable; urgency=low + + * Apply patch from Ubuntu to fix FTBFS with ffmpeg 0.6: + - Add -D__STDC_CONSTANT_MACROS to CPPFLAGS (closes: 614080). + * Update Standards-Version to 3.9.1, no changes necessary. + + -- Vagrant Cascadian Sun, 20 Feb 2011 23:43:02 -0800 + +zoneminder (1.24.2-8) unstable; urgency=medium + + [ Vagrant Cascadian ] + * Apply patch to fix V4L2 cameras without crop support (closes: #608790). + Thanks to piratebab. + * Add preinst script which aborts if dangerous symlinks exist. + (closes: #608793) + + [ Peter Howard ] + * Added to README.Debian with info about images and events directories. + (closes: #608793) + + -- Vagrant Cascadian Sat, 15 Jan 2011 19:39:26 -0800 + +zoneminder (1.24.2-7) unstable; urgency=medium + + * Do not set ownership of /var/cache/zoneminder when upgrading, which fixes a + regression causing upgrades to take inordinately long with large + installations (closes: #597040). + + -- Vagrant Cascadian Fri, 17 Sep 2010 11:24:41 -0700 + +zoneminder (1.24.2-6) unstable; urgency=low + + * Only remove database on purge. This requires only creating the database if + it doesn't already exist, and upgrading the database only if the database + is an older version (closes: #497107). + + * Do not prompt the user on database upgrades by using the --nointeractive + flag when calling zmupdate.pl from postinst (closes: #595902). + + -- Vagrant Cascadian Fri, 10 Sep 2010 10:06:06 -0700 + +zoneminder (1.24.2-5) unstable; urgency=low + + [ Peter Howard ] + * Add zip dependency + (closes: #494261) + * Add debian/watch file + (closes: #545552) + * Use packaged libjs-mootools + (closes: #585590) + * Miscellaneous cleanups + + [ Vagrant Cascadian ] + * Add vagrant@debian.org as uploader + * Update Standards-Version to 3.9.0, no changes necessary. + + -- Vagrant Cascadian Fri, 23 Jul 2010 18:12:50 -0500 + +zoneminder (1.24.2-4.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "package removed, processes still running": apply patch to + debian/postinst by Vagrant Cascadian: use invoke-rc.d and run + mysql-related actions only when mysql is running (closes: #583648). + + -- gregor herrmann Thu, 01 Jul 2010 19:47:10 +0200 + +zoneminder (1.24.2-4) unstable; urgency=high + * Update init.d to list mysql dependency + (closes: #583505) + * Change depenency from libmime-perl to libmime-tools-perl + (closes: #585589) + * Problems in changelog format fixed + (closes: #585592) + * Fix debian-rules-ignores-make-clean-error + (closes: #585593) + -- Peter Howard Mon, 14 jun 2010 15:02:10 +1000 + +zoneminder (1.24.2-3) unstable; urgency=high + * Changes symbols to build with libjpeg8 + (closes: #565326, #568327) + * Note: location of all perl files should have been fixed in previous release + (closes: #553096) + -- Peter Howard Mon, 26 apr 2010 15:02:10 +1000 + +zoneminder (1.24.2-2) unstable; urgency=high + + * Remove custom perl parth from zmpkg.pl, fix location of manpages. + (closes: #551746, #553092) + * Fix GCC4.4 bug + (closes: #531717) + * Fix potential bug in postinst script + + -- Peter Howard Sat, 14 Nov 2009 15:02:10 +1000 + +zoneminder (1.24.2-1) unstable; urgency=high + + * Initial release of zoneminder 1.24.2 + -- Peter Howard Fri, 11 Sep 2009 07:02:50 +1000 + +zoneminder (1.24.1-1) unstable; urgency=high + + * Initial release of zoneminder 1.24.1, closing CVE-2008-3882, + CVE-2008-3881, CVE-2008-3880 + (closes: #497640) + * Change syslog dependency to rsyslog. + (closes: #526918) + * Add missing perl depenency. + * Restore patch to disable "check for updates" by default. + * Removed spurious '$' in init script. + (closes: #486064) + * Change permission of zm.conf from 0600 to 0400 for CVE-2008-6755 + (closes: #528252) + -- Peter Howard Sat, 16 May 2009 07:02:50 +1000 + +zoneminder (1.23.3-4) unstable; urgency=high + + * update to get it building with latest unstable. Thanks to waldi@debian.org + (closes: #517569) + -- Peter Howard Thu, 16 Apr 2009 01:02:50 +1000 + +zoneminder (1.23.3-3) unstable; urgency=high + + * ffmpeg confirmed working + (closes: #475145) + * Fix upgrade problem intrudouced in 1.23.3-1 + (closes: #481637) + * Include libmime-lite-perl in dependencies + (closes: #486312) + -- Peter Howard Thu, 18 Sep 2008 01:02:50 +1000 + +zoneminder (1.23.3-2) unstable; urgency=high + + * ffmpeg finally working? + + -- Peter Howard Wed, 13 Aug 2008 01:02:50 +1000 + +zoneminder (1.23.3-1) unstable; urgency=high + + * Initial version for 1.23.3 - security fix. + (closes: #479034) + + -- Peter Howard Wed, 19 Mar 2008 01:02:50 +1000 + +zoneminder (1.23.2-2) unstable; urgency=low + + * Update to init.d + (closes: #468856) + * Add dependency on logging daemon + (closes: #471277) + + -- Peter Howard Wed, 19 Mar 2008 01:02:50 +1000 + +zoneminder (1.23.2-1) unstable; urgency=low + + * Initial version for 1.23.2 + (closes: #464152) + * Zoneminder 1.23.2 upstream includes fix for GCC 4.3 + (closes: #454980) + * Includes ffmpeg patch by Alexander Kushnirenko + + -- Peter Howard Sat, 01 Mar 2008 16:02:50 +1000 + +zoneminder (1.22.3-10) unstable; urgency=low + + * Fix bug introduced in -9 where perl is put under /usr/local + (closes: #457507) + + -- Peter Howard Mon, 24 Dec 2007 16:02:50 +1000 + +zoneminder (1.22.3-9) unstable; urgency=low + + * Starting zoneminder via init script now invokes "zmfix -a" + (closes: #481637) + * Change apache2-mpm-prefork dependency to apache2 + * Temp dir for export under /var/cache/zoneminder (but linked back to + /usr/share/zoneminder for now) + * Redo use of gnutls rather than openssl for md5 hashes + + -- Peter Howard Mon, 10 Dec 2007 16:02:50 +1000 + +zoneminder (1.22.3-8) unstable; urgency=low + + * Build now includes libpcre3 + (closes: #437533) + * "Monitor Presets" patch now applied to package during build. + + -- Peter Howard Sat, 18 Aug 2007 14:35:23 +1000 + +zoneminder (1.22.3-7) unstable; urgency=low + + * Turn off debug trace and crash dump on build + (closes:#414857,#414891) + * Additional perl libraries added in dependencies + (closes:#416291) + * Change preferred PHP version from 4 to 5 + -- Peter Howard Sun, 29 Jul 2007 15:11:13 +1000 + +zoneminder (1.22.3-6) unstable; urgency=low + + * Removed a similar bash only statement from zmpkg.pl + (closes:414882) + + -- Peter Howard Sat, 14 Apr 2007 11:46:56 +1000 + +zoneminder (1.22.3-5) unstable; urgency=low + + * Installs with "phone home" feature turned off by default, and permissions + on /etc/zm/zm.conf fixed (now the 0600 it s hould be) + (closes:415349) + * Removed "stupid bash-ism" on mysqld check in postinst file. + + -- Peter Howard Fri, 6 Apr 2007 15:50:00 +1000 + +zoneminder (1.22.3-4) unstable; urgency=low + + * Put libmysqlclient-15-dev in front of -14-dev so sbuild works + (closes: #414410) + + -- Peter Howard Mon, 12 Mar 2007 11:38:56 +1100 + +zoneminder (1.22.3-3) unstable; urgency=low + + * Clean up of postinstall, postrm ; user "zm" definitely was a mistake + * Also in postinstall: check and start MySQL if it's not running. + * init.d script now checks if zoneminder isn't running and still returns 0 + (which helps uninstalling) + * Addition of php5 dependency options as well as php4. + + -- Peter Howard Mon, 26 Feb 2007 10:40:52 +1100 + +zoneminder (1.22.3-2) unstable; urgency=low + + * Added zmuser in the mysql creation; this should fix the install problem + for people, but needs to be cleaned up (in -3) + + -- Peter Howard Fri, 16 Feb 2007 14:16:03 +1100 + +zoneminder (1.22.3-1) unstable; urgency=low + + * Initial Version. (closes: #248393) + * Patched out use of openssl; uses gnutls instead for MD5 hashes. + * Removed MakeMaker-inserted Perl licensing (with authors permission) in + various scripts; replaced with GPL. + + -- Peter Howard Wed, 7 Feb 2007 14:09:01 +1100 diff --git a/distros/ubuntu1504_cmake/clean b/distros/ubuntu1504/clean similarity index 100% rename from distros/ubuntu1504_cmake/clean rename to distros/ubuntu1504/clean diff --git a/distros/ubuntu1504_cmake/conf/apache2/zoneminder.conf b/distros/ubuntu1504/conf/apache2/zoneminder.conf similarity index 100% rename from distros/ubuntu1504_cmake/conf/apache2/zoneminder.conf rename to distros/ubuntu1504/conf/apache2/zoneminder.conf diff --git a/distros/ubuntu1504/control b/distros/ubuntu1504/control index dddecf61e..c1b7d958f 100644 --- a/distros/ubuntu1504/control +++ b/distros/ubuntu1504/control @@ -1,59 +1,72 @@ Source: zoneminder Section: net Priority: optional -Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), dh-systemd (>= 1.5), autoconf, automake, quilt, libtool, dh-autoreconf - , libgnutls-dev - , libmysqlclient-dev | libmariadbclient-dev - , libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, libpcre3-dev - , libavcodec-ffmpeg-dev, libavformat-ffmpeg-dev, libswscale-ffmpeg-dev, libavutil-ffmpeg-dev, libavdevice-ffmpeg-dev - , libv4l-dev (>= 0.8.3), libbz2-dev - , libvlccore-dev, libvlc-dev - , libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev - , libgcrypt11-dev, libpolkit-gobject-1-dev +Maintainer: Dmitry Smirnov +Uploaders: Vagrant Cascadian +Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apache2-dev, dh-linktree + ,cmake + ,libavcodec-ffmpeg-dev, libavformat-ffmpeg-dev, libswscale-ffmpeg-dev, libavutil-ffmpeg-dev, libavdevice-ffmpeg-dev + ,libbz2-dev + ,libgcrypt-dev + ,libcurl4-gnutls-dev + ,libgnutls-openssl-dev + ,libjpeg-dev + ,libmysqlclient-dev + ,libpcre3-dev + ,libpolkit-gobject-1-dev + ,libv4l-dev (>= 0.8.3) [!hurd-any] + ,libvlc-dev + ,libdate-manip-perl + ,libdbd-mysql-perl + ,libphp-serialization-perl + ,libsys-mmap-perl [!hurd-any] + ,libwww-perl +# Unbundled (dh_linktree): + ,libjs-jquery + ,libjs-mootools Standards-Version: 3.9.6 Homepage: http://www.zoneminder.com/ +Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/zoneminder.git +Vcs-Git: git://anonscm.debian.org/collab-maint/zoneminder.git Package: zoneminder Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} - , apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd - , mariadb-client|mysql-client|mysql-client-5.6 - , libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl - , libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl - , libmodule-load-perl, libsys-mmap-perl, libjson-any-perl - , libnet-sftp-foreign-perl , libio-pty-perl, libexpect-perl , liburi-encode-perl , libdbd-mysql-perl - , libdata-dump-perl, libclass-std-fast-perl, libsoap-wsdl-perl, libio-socket-multicast-perl, libdigest-sha-perl - , libsys-cpu-perl, libsys-meminfo-perl - , libpcre3 - , ffmpeg, libavdevice-ffmpeg56 - , rsyslog | system-log-daemon - , libjpeg8|libjpeg9|libjpeg62-turbo - , zip - , libvlccore5 | libvlccore7 | libvlccore8, libvlc5 - , libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev - , libpolkit-gobject-1-0 - , php5-gd -Recommends: mysql-server|mariadb-server -Description: Video camera security and surveillance solution - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - -Package: zoneminder-dbg -Section: debug -Priority: extra -Architecture: any -Depends: zoneminder (= ${binary:Version}), ${misc:Depends} -Description: Debugging symbols for zoneminder. - ZoneMinder is a video camera security and surveillance solution. + ,javascript-common + ,libav-tools + ,libdate-manip-perl + ,libdbd-mysql-perl + ,libmime-lite-perl + ,libmime-tools-perl + ,libphp-serialization-perl + ,libmodule-load-conditional-perl + ,libnet-sftp-foreign-perl + ,libarchive-zip-perl + ,libdbd-mysql-perl + ,libdevice-serialport-perl + ,libimage-info-perl + ,libjson-any-perl + ,libsys-mmap-perl [!hurd-any] + ,liburi-encode-perl + ,libwww-perl + ,libdata-dump-perl + ,libclass-std-fast-perl + ,libsoap-wsdl-perl + ,libio-socket-multicast-perl + ,libdigest-sha-perl + ,libsys-cpu-perl, libsys-meminfo-perl + ,mysql-client | virtual-mysql-client + ,perl-modules + ,php5-mysql, php5-gd + ,policykit-1 + ,rsyslog | system-log-daemon + ,zip +Recommends: ${misc:Recommends} + ,libapache2-mod-php5 | php5-fpm + ,mysql-server | virtual-mysql-server + ,zoneminder-doc (>= ${source:Version}) +Suggests: fcgiwrap, logrotate +Description: video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child or family member or home monitoring and other care scenarios. It @@ -64,3 +77,70 @@ Description: Debugging symbols for zoneminder. video security system and for commercial or professional video security and surveillance. It can also be integrated into a home automation system via X.10 or other protocols. + +#Package: libzoneminder-perl +#Section: perl +#Architecture: all +#Multi-Arch: foreign +#Depends: ${misc:Depends}, ${perl:Depends} +# ,libarchive-zip-perl +# ,libdbd-mysql-perl +# ,libdevice-serialport-perl +# ,libimage-info-perl +# ,libjson-any-perl +# ,libsys-mmap-perl [!hurd-any] +# ,liburi-encode-perl +# ,libwww-perl +#Description: ZoneMinder Perl libraries +# ZoneMinder is intended for use in single or multi-camera video security +# applications, including commercial or home CCTV, theft prevention and child +# or family member or home monitoring and other care scenarios. It +# supports capture, analysis, recording, and monitoring of video data coming +# from one or more video or network cameras attached to a Linux system. +# ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom +# cameras using a variety of protocols. It is suitable for use as a home +# video security system and for commercial or professional video security +# and surveillance. It can also be integrated into a home automation system +# via X.10 or other protocols. +# . +# This package provides ZoneMinder Perl libraries; it can be used to +# write custom interfaces as well. + +Package: zoneminder-doc +Section: doc +Architecture: all +Multi-Arch: foreign +Depends: ${misc:Depends}, ${sphinxdoc:Depends}, python-sphinx-rtd-theme | python3-sphinx-rtd-theme +Suggests: www-browser +Description: ZoneMinder documentation + ZoneMinder is intended for use in single or multi-camera video security + applications, including commercial or home CCTV, theft prevention and child + or family member or home monitoring and other care scenarios. It + supports capture, analysis, recording, and monitoring of video data coming + from one or more video or network cameras attached to a Linux system. + ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom + cameras using a variety of protocols. It is suitable for use as a home + video security system and for commercial or professional video security + and surveillance. It can also be integrated into a home automation system + via X.10 or other protocols. + . + This package provides ZoneMinder documentation in HTML format. + +Package: zoneminder-dbg +Section: debug +Priority: extra +Architecture: any +Depends: zoneminder (= ${binary:Version}), ${misc:Depends} +Description: Zoneminder -- debugging symbols + ZoneMinder is intended for use in single or multi-camera video security + applications, including commercial or home CCTV, theft prevention and child + or family member or home monitoring and other care scenarios. It + supports capture, analysis, recording, and monitoring of video data coming + from one or more video or network cameras attached to a Linux system. + ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom + cameras using a variety of protocols. It is suitable for use as a home + video security system and for commercial or professional video security + and surveillance. It can also be integrated into a home automation system + via X.10 or other protocols. + . + This package provides debugging symbols diff --git a/distros/ubuntu1504/copyright b/distros/ubuntu1504/copyright index a177502a0..c48025a25 100644 --- a/distros/ubuntu1504/copyright +++ b/distros/ubuntu1504/copyright @@ -1,22 +1,174 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: ZoneMinder +Upstream-Contact: Philip Coombes +Source: https://github.com/ZoneMinder/ZoneMinder +Comment: + This package was originally debianized by matrix + on Mon, 7 Mar 2005 02:07:57 -0500. + It was re-done for submission to the Debian project by Peter Howard + on Fri, 8 Dec 2006 10:19:43 +1100 +Files-Excluded: + web/skins/*/js/jquery-* + web/tools/mootools/*-yc.js + +Files: * +Copyright: 2001-2014 Philip Coombes + 2008 Brian Rudy + 2014 Vincent Giovannone + 2013 Tim Craig + 2003-2008 Corey DeLasaux + 2001-2010 Chris Kistner +License: GPL-2+ + +Files: distros/* +Copyright: 2001-2008 Philip Coombes + 2014 Isaac Connor + 2005 Serg Oskin +License: GPL-2+ + +Files: web/skins/*/js/jquery-* +Copyright: 2010 John Resig + 2010 The Dojo Foundation +License: GPL-2 or Expat +Comment: + Dual licensed under the MIT or GPL Version 2 licenses. + http://jquery.org/license + . + Includes Sizzle.js http://sizzlejs.com/ + Released under the MIT, BSD, and GPL Licenses. + +Files: web/tools/mootools/*.js +Copyright: 2009 Marcelo Jorge Vieira (metal) + 2006-2010 Valerio Proietti (http://mad4milk.net/) +License: Expat + +Files: web/api/* +Copyright: 2005-2013 Cake Software Foundation, Inc. (http://cakefoundation.org) +License: Expat + +Files: + cmake/Modules/CheckPrototypeDefinition*.cmake + cmake/Modules/FindGLIB2.cmake + cmake/Modules/FindPolkit.cmake + cmake/Modules/GNUInstallDirs.cmake Copyright: + 2005-2011 Kitware, Inc. + 2010-2011 Andreas Schneider + 2009 Dario Freddi + 2008 Laurent Montel, + 2011 Nikita Krupen'ko +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + . + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + . + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + . + * The names of Kitware, Inc., the Insight Consortium, or the names of + any consortium members, or of any contributors, may not be used to + endorse or promote products derived from this software without + specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -Copyright 2002 Philip Coombes +Files: cmake/Modules/FindPerlModules.cmake +Copyright: 2012 Iowa State University +License: Boost-1.0 + Boost Software License - Version 1.0 - August 17th, 2003 + . + Permission is hereby granted, free of charge, to any person or organization + obtaining a copy of the software and accompanying documentation covered by + this license (the "Software") to use, reproduce, display, distribute, + execute, and transmit the Software, and to prepare derivative works of the + Software, and to permit third-parties to whom the Software is furnished to + do so, all subject to the following: + . + The copyright notices in the Software and this entire statement, including + the above license grant, this restriction and the following disclaimer, + must be included in all copies of the Software, in whole or in part, and + all derivative works of the Software, unless such copies or derivative + works are solely in the form of machine-executable object code generated by + a source language processor. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT + SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE + FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, + ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER + DEALINGS IN THE SOFTWARE. -License: +Files: debian/* +Copyright: 2015 Dmitry Smirnov + 2007-2014 Peter Howard + 2010-2012 Vagrant Cascadian + 2001-2008 Philip Coombes +License: GPL-2+ -This package is free software; you can redistribute it and/or modify it -under the terms of the GNU General Public License as published by the -Free Software Foundation; either version 2 of the License, or (at your -option) any later version. +License: Expat + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + . + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. -This package is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. +License: GPL-2+ + This package is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 2 of the License, or (at your + option) any later version. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + The complete text of the GNU General Public License version 2 + can be found in "/usr/share/common-licenses/GPL-2". -You should have received a copy of the GNU General Public -License along with this package; if not, write to the Free Software -Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -On Debian GNU/Linux systems, the text of the GPL can be found in -/usr/share/common-licenses/GPL. +License: GPL-2 + This package is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; version 2 of the License. + . + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + . + The complete text of the GNU General Public License version 2 + can be found in "/usr/share/common-licenses/GPL-2". diff --git a/distros/ubuntu1504/dirs b/distros/ubuntu1504/dirs deleted file mode 100644 index 4178482c1..000000000 --- a/distros/ubuntu1504/dirs +++ /dev/null @@ -1,6 +0,0 @@ -var/log/zm -var/lib/zm -var/cache/zoneminder/events -var/cache/zoneminder/images -var/cache/zoneminder/temp -usr/share/zoneminder/db diff --git a/distros/ubuntu1504/docs b/distros/ubuntu1504/docs deleted file mode 100644 index b43bf86b5..000000000 --- a/distros/ubuntu1504/docs +++ /dev/null @@ -1 +0,0 @@ -README.md diff --git a/distros/ubuntu1504_cmake/examples/nginx.conf b/distros/ubuntu1504/examples/nginx.conf similarity index 100% rename from distros/ubuntu1504_cmake/examples/nginx.conf rename to distros/ubuntu1504/examples/nginx.conf diff --git a/distros/ubuntu1504_cmake/gbp.conf b/distros/ubuntu1504/gbp.conf similarity index 100% rename from distros/ubuntu1504_cmake/gbp.conf rename to distros/ubuntu1504/gbp.conf diff --git a/distros/ubuntu1504/install b/distros/ubuntu1504/install deleted file mode 100644 index 4b0009cea..000000000 --- a/distros/ubuntu1504/install +++ /dev/null @@ -1,12 +0,0 @@ -usr/bin -usr/lib/cgi-bin -usr/share/man -usr/share/perl5/ZoneMinder -usr/share/perl5/ZoneMinder.pm -usr/share/polkit-1/actions -usr/share/polkit-1/rules.d -usr/share/zoneminder -etc/zm -db/zm_create.sql usr/share/zoneminder/db -db/zm_update-*.sql usr/share/zoneminder/db -debian/apache.conf etc/zm diff --git a/distros/ubuntu1504_cmake/libzoneminder-perl.install b/distros/ubuntu1504/libzoneminder-perl.install similarity index 100% rename from distros/ubuntu1504_cmake/libzoneminder-perl.install rename to distros/ubuntu1504/libzoneminder-perl.install diff --git a/distros/ubuntu1504/links b/distros/ubuntu1504/links deleted file mode 100644 index 2de75e323..000000000 --- a/distros/ubuntu1504/links +++ /dev/null @@ -1,4 +0,0 @@ -var/cache/zoneminder/events usr/share/zoneminder/www/events -var/cache/zoneminder/images usr/share/zoneminder/www/images -var/cache/zoneminder/temp usr/share/zoneminder/www/temp -usr/lib/cgi-bin usr/lib/zoneminder/cgi-bin diff --git a/distros/ubuntu1504_cmake/patches/default_cgi-path.patch b/distros/ubuntu1504/patches/default_cgi-path.patch similarity index 100% rename from distros/ubuntu1504_cmake/patches/default_cgi-path.patch rename to distros/ubuntu1504/patches/default_cgi-path.patch diff --git a/distros/ubuntu1504/patches/series b/distros/ubuntu1504/patches/series index e69de29bb..fc70f4006 100644 --- a/distros/ubuntu1504/patches/series +++ b/distros/ubuntu1504/patches/series @@ -0,0 +1,2 @@ +default_cgi-path.patch +use_libjs-mootools.patch diff --git a/distros/ubuntu1504_cmake/patches/use_libjs-mootools.patch b/distros/ubuntu1504/patches/use_libjs-mootools.patch similarity index 100% rename from distros/ubuntu1504_cmake/patches/use_libjs-mootools.patch rename to distros/ubuntu1504/patches/use_libjs-mootools.patch diff --git a/distros/ubuntu1504/postinst b/distros/ubuntu1504/postinst deleted file mode 100644 index e009a9799..000000000 --- a/distros/ubuntu1504/postinst +++ /dev/null @@ -1,53 +0,0 @@ -#! /bin/sh - -set -e - -if [ "$1" = "configure" ]; then - if [ -e "/lib/systemd/system/mysql.service" ]; then - # - # Get mysql started if it isn't - # - if ! $(systemctl is-active mysql >/dev/null 2>&1); then - systemctl start mysql - fi - if $(systemctl is-active mysql >/dev/null 2>&1); then - mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload - # test if database if already present... - if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then - cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf - echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - fi - - systemctl stop zoneminder || true #not sure about "|| true" - zmupdate.pl --nointeractive - - else - echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' - fi - else - echo 'mysql not found, assuming remote server.' - fi - chown www-data:www-data /var/log/zm - chown www-data:www-data /var/lib/zm/ - if [ -z "$2" ]; then - chown www-data:www-data -R /var/cache/zoneminder - fi -fi -# Ensure zoneminder is stopped... -if [ -e "/lib/systemd/system/zoneminder.service" ]; then #changed from -x to -e, could be wrong - if systemctl is-active zoneminder >/dev/null 2>&1 ; then - systemctl stop zoneminder || exit $? - fi -fi - -if [ "$1" = "configure" ]; then - if [ -z "$2" ]; then - chown www-data:www-data /var/log/zm - chown www-data:www-data /var/lib/zm/ - chown www-data:www-data -R /var/cache/zoneminder - else - chown www-data:www-data /var/log/zm - zmupdate.pl - fi -fi -#DEBHELPER# diff --git a/distros/ubuntu1504/postrm b/distros/ubuntu1504/postrm deleted file mode 100644 index 28a00a7a0..000000000 --- a/distros/ubuntu1504/postrm +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh -# set -e # to be reinstated later - -if [ "$1" = "purge" ]; then - echo 'delete from user where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - echo 'delete from db where User="zmuser";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - mysqladmin --defaults-file=/etc/mysql/debian.cnf -f drop zm -fi -#DEBHELPER# diff --git a/distros/ubuntu1504/preinst b/distros/ubuntu1504/preinst deleted file mode 100755 index f35723bc0..000000000 --- a/distros/ubuntu1504/preinst +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh - -set -e - -abort=false -if [ -L /usr/share/zoneminder/www/events ]; then - l=$(readlink /usr/share/zoneminder/www/events) - if [ "$l" != "/var/cache/zoneminder/events" ]; then - abort=true - fi -fi -if [ -L /usr/share/zoneminder/www/images ]; then - l=$(readlink /usr/share/zoneminder/www/images ) - if [ "$l" != "/var/cache/zoneminder/images" ]; then - abort=true - fi -fi - -if [ "$abort" = "true" ]; then - cat >&2 << EOF -Aborting installation of zoneminder due to non-default symlinks in -/usr/share/zoneminder/www for the images and/or events directory, which could -result in loss of data. Please move your data in each of these directories to -/var/cache/zoneminder/www before installing zoneminder from the package. -EOF - exit 1 - -fi - -#DEBHELPER# - -exit 0 diff --git a/distros/ubuntu1504/rules b/distros/ubuntu1504/rules index 9fe5e92d8..bf8012aa8 100755 --- a/distros/ubuntu1504/rules +++ b/distros/ubuntu1504/rules @@ -1,67 +1,93 @@ #!/usr/bin/make -f # -*- makefile -*- -# Sample debian/rules that uses debhelper. -# This file was originally written by Joey Hess and Craig Small. -# As a special exception, when this file is copied by dh-make into a -# dh-make output file, you may use that output file without restriction. -# This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 -# These are used for cross-compiling and for saving the configure script -# from having to guess our platform (since we know it already) -DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) -DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND += -Wl,--as-needed -CFLAGS = -Wall -g -CPPFLAGS = -D__STDC_CONSTANT_MACROS -CXXFLAGS = -DHAVE_LIBCRYPTO - -ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) - CFLAGS += -O0 -else - CFLAGS += -O2 +ifeq ($(DEB_BUILD_ARCH_OS),hurd) +ARGS:= -DZM_NO_MMAP=ON endif %: - dh $@ --with quilt,autoreconf,systemd + dh $@ --parallel --buildsystem=cmake --builddirectory=dbuild \ + --with systemd,sphinxdoc,apache2,linktree override_dh_auto_configure: - CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" dh_auto_configure -- --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --sysconfdir=/etc/zm --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info --with-mysql=/usr --with-mariadb=/usr --with-webdir=/usr/share/zoneminder --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-crashtrace=no --enable-mmap=yes + dh_auto_configure -- $(ARGS) \ + -DCMAKE_VERBOSE_MAKEFILE=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DZM_CONFIG_DIR="/etc/zm" \ + -DZM_RUNDIR="/var/run/zm" \ + -DZM_SOCKDIR="/var/run/zm" \ + -DZM_TMPDIR="/tmp/zm" \ + -DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \ + -DZM_CONTENTDIR="/var/cache/zoneminder" override_dh_clean: - # Add here commands to clean up after the build process. - [ ! -f Makefile ] || $(MAKE) distclean - dh_clean + dh_clean $(MANPAGES1) + $(RM) -r docs/_build docs/installationguide -override_dh_install: - dh_install --fail-missing - # - # NOTE: This is a short-term kludge; hopefully changes in the next - # upstream version will render this unnecessary. - rm -rf debian/zoneminder/usr/share/zoneminder/www/events - rm -rf debian/zoneminder/usr/share/zoneminder/www/images - rm -rf debian/zoneminder/usr/share/zoneminder/temp - dh_link var/cache/zoneminder/events usr/share/zoneminder/www/events - dh_link var/cache/zoneminder/images usr/share/zoneminder/www/images - dh_link var/cache/zoneminder/temp usr/share/zoneminder/www/temp +build-indep: + #$(MAKE) -C docs text + $(MAKE) -C docs html - # - # This is a slightly lesser kludge; moving the cgi stuff to - # /usr/share/zoneminder/cgi-bin breaks one set of behavior, - # having it just in /usr/lib/cgi-bin breaks another bit of - # behavior. - # - dh_link usr/lib/cgi-bin usr/lib/zoneminder/cgi-bin +MANPAGES1 = dbuild/scripts/zmupdate.pl.1 +$(MANPAGES1): + # generate man page(s): + pod2man -s1 --stderr --utf8 $(patsubst %.1, %, $@) $@ + +## reproducible build: +LAST_CHANGE=$(shell dpkg-parsechangelog -S Date) +BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)") +override_dh_installman: $(MANPAGES1) + $(MAKE) -C docs man SPHINXOPTS="-D today=\"$(BUILD_DATE)\"" + dh_installman --language=C $(MANPAGES1) + +override_dh_auto_install: + dh_auto_install --destdir=$(CURDIR)/debian/tmp + # remove worthless files: + $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*/*/.packlist + $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*.in + # remove empty directories: + find $(CURDIR)/debian/tmp/usr -type d -empty -delete -printf 'removed %p\n' + # remove extra-license-file: + $(RM) -v $(CURDIR)/debian/tmp/usr/share/zoneminder/www/api/lib/Cake/LICENSE.txt override_dh_fixperms: dh_fixperms - chown root:root debian/zoneminder/etc/zm/zm.conf + ## 637685 + chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf -override_dh_auto_test: - # do not run tests... +override_dh_installinit: + dh_installinit --no-start + +override_dh_systemd_start: + dh_systemd_start --no-start + +override_dh_systemd_enable: + dh_systemd_enable --no-enable + +override_dh_apache2: + dh_apache2 --noenable -.PHONY: override_dh_strip override_dh_strip: - dh_strip --dbg-package=zoneminder-dbg + [ -d "$(CURDIR)/debian/zoneminder-dbg" ] \ + && dh_strip --dbg-package=zoneminder-dbg \ + || dh_strip + +#%: +# dh $@ --parallel --buildsystem=autoconf --with autoreconf +# +#override_dh_auto_configure: +# dh_auto_configure -- \ +# --sysconfdir=/etc/zm \ +# --with-mysql=/usr \ +# --with-webdir=/usr/share/zoneminder \ +# --with-ffmpeg=/usr \ +# --with-cgidir=/usr/lib/cgi-bin \ +# --with-webuser=www-data \ +# --with-webgroup=www-data \ +# --enable-mmap=yes diff --git a/distros/ubuntu1204_cmake/source/format b/distros/ubuntu1504/source/format similarity index 100% rename from distros/ubuntu1204_cmake/source/format rename to distros/ubuntu1504/source/format diff --git a/distros/ubuntu1504_cmake/source/lintian-overrides b/distros/ubuntu1504/source/lintian-overrides similarity index 100% rename from distros/ubuntu1504_cmake/source/lintian-overrides rename to distros/ubuntu1504/source/lintian-overrides diff --git a/distros/ubuntu1504/watch b/distros/ubuntu1504/watch index 5a8a9c4d7..7ee690edb 100644 --- a/distros/ubuntu1504/watch +++ b/distros/ubuntu1504/watch @@ -1,3 +1,7 @@ version=3 -http://www.zoneminder.com/downloads.html \ - .*/ZoneMinder-(.*).tar.gz + +opts=\ +repacksuffix=+dfsg,\ +dversionmangle=s{\+dfsg\d*}{},\ + https://github.com/ZoneMinder/ZoneMinder/releases \ + .*/ZoneMinder/archive/v(.*).tar.gz diff --git a/distros/ubuntu1504_cmake/zoneminder-doc.doc-base b/distros/ubuntu1504/zoneminder-doc.doc-base similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder-doc.doc-base rename to distros/ubuntu1504/zoneminder-doc.doc-base diff --git a/distros/ubuntu1504_cmake/zoneminder-doc.install b/distros/ubuntu1504/zoneminder-doc.install similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder-doc.install rename to distros/ubuntu1504/zoneminder-doc.install diff --git a/distros/ubuntu1504_cmake/zoneminder-doc.links b/distros/ubuntu1504/zoneminder-doc.links similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder-doc.links rename to distros/ubuntu1504/zoneminder-doc.links diff --git a/distros/ubuntu1504_cmake/zoneminder.apache2 b/distros/ubuntu1504/zoneminder.apache2 similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.apache2 rename to distros/ubuntu1504/zoneminder.apache2 diff --git a/distros/ubuntu1504_cmake/zoneminder.bug-presubj b/distros/ubuntu1504/zoneminder.bug-presubj similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.bug-presubj rename to distros/ubuntu1504/zoneminder.bug-presubj diff --git a/distros/ubuntu1504_cmake/zoneminder.dirs b/distros/ubuntu1504/zoneminder.dirs similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.dirs rename to distros/ubuntu1504/zoneminder.dirs diff --git a/distros/ubuntu1504_cmake/zoneminder.docs b/distros/ubuntu1504/zoneminder.docs similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.docs rename to distros/ubuntu1504/zoneminder.docs diff --git a/distros/ubuntu1504_cmake/zoneminder.examples b/distros/ubuntu1504/zoneminder.examples similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.examples rename to distros/ubuntu1504/zoneminder.examples diff --git a/distros/ubuntu1504_cmake/zoneminder.init b/distros/ubuntu1504/zoneminder.init similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.init rename to distros/ubuntu1504/zoneminder.init diff --git a/distros/ubuntu1504_cmake/zoneminder.install b/distros/ubuntu1504/zoneminder.install similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.install rename to distros/ubuntu1504/zoneminder.install diff --git a/distros/ubuntu1504_cmake/zoneminder.links b/distros/ubuntu1504/zoneminder.links similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.links rename to distros/ubuntu1504/zoneminder.links diff --git a/distros/ubuntu1504_cmake/zoneminder.linktrees b/distros/ubuntu1504/zoneminder.linktrees similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.linktrees rename to distros/ubuntu1504/zoneminder.linktrees diff --git a/distros/ubuntu1504_cmake/zoneminder.lintian-overrides b/distros/ubuntu1504/zoneminder.lintian-overrides similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.lintian-overrides rename to distros/ubuntu1504/zoneminder.lintian-overrides diff --git a/distros/ubuntu1504_cmake/zoneminder.logrotate b/distros/ubuntu1504/zoneminder.logrotate similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.logrotate rename to distros/ubuntu1504/zoneminder.logrotate diff --git a/distros/ubuntu1504_cmake/zoneminder.maintscript b/distros/ubuntu1504/zoneminder.maintscript similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.maintscript rename to distros/ubuntu1504/zoneminder.maintscript diff --git a/distros/ubuntu1504_cmake/zoneminder.manpages b/distros/ubuntu1504/zoneminder.manpages similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.manpages rename to distros/ubuntu1504/zoneminder.manpages diff --git a/distros/ubuntu1504/zoneminder.postinst b/distros/ubuntu1504/zoneminder.postinst new file mode 100644 index 000000000..64699d1ca --- /dev/null +++ b/distros/ubuntu1504/zoneminder.postinst @@ -0,0 +1,59 @@ +#! /bin/sh + +set -e + +if [ "$1" = "configure" ]; then + + . /etc/zm/zm.conf + + # The logs can contain passwords, etc... so by setting group root, only www-data can read them, not people in the www-data group + chown www-data:root /var/log/zm + chown www-data:www-data /var/lib/zm + if [ -z "$2" ]; then + chown www-data:www-data /var/cache/zoneminder /var/cache/zoneminder/* + fi + + # Do this every time the package is installed or upgraded + + if [ "$ZM_DB_HOST" = "localhost" ]; then + + if [ -e "/etc/init.d/mysql" ]; then + + # + # Get mysql started if it isn't + # + if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then + deb-systemd-invoke start mysql.service || exit $? + fi + + if $(/etc/init.d/mysql status >/dev/null 2>&1); then + mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload + # test if database if already present... + if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then + cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf + # This creates the user. + echo "grant lock tables,alter,select,insert,update,delete,create,index on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost identified by \"${ZM_DB_PASS}\";" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + else + echo "grant lock tables,alter,select,insert,update,delete,create,index on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + fi + + # Ensure zoneminder is stopped + deb-systemd-invoke stop zoneminder.service || exit $? + zmupdate.pl --nointeractive + zmupdate.pl --nointeractive -f + deb-systemd-invoke start zoneminder.service || exit $? + + else + echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' + fi + else + echo 'mysql not found, assuming remote server.' + fi + + else + echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)" + fi + +fi + +#DEBHELPER# diff --git a/distros/ubuntu1504_cmake/zoneminder.postrm b/distros/ubuntu1504/zoneminder.postrm similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.postrm rename to distros/ubuntu1504/zoneminder.postrm diff --git a/distros/ubuntu1504_cmake/zoneminder.preinst b/distros/ubuntu1504/zoneminder.preinst similarity index 100% rename from distros/ubuntu1504_cmake/zoneminder.preinst rename to distros/ubuntu1504/zoneminder.preinst diff --git a/distros/ubuntu1504/zoneminder.service b/distros/ubuntu1504/zoneminder.service index 3ce608a49..e3575c039 100644 --- a/distros/ubuntu1504/zoneminder.service +++ b/distros/ubuntu1504/zoneminder.service @@ -1,16 +1,20 @@ # ZoneMinder systemd unit file - # This file is intended to work with all Linux distributions - [Unit] - Description=ZoneMinder CCTV recording and security system - After=network.target mysql.service apache2.service - Requires=mysql.service apache2.service - [Service] - User=www-data - Type=forking - ExecStart=/usr/bin/zmpkg.pl start - ExecReload=/usr/bin/zmpkg.pl restart - ExecStop=/usr/bin/zmpkg.pl stop - PIDFile="/run/zm/zm.pid" - [Install] - WantedBy=multi-user.target +# This file is intended to work with Debian distributions +[Unit] +Description=ZoneMinder CCTV recording and surveillance system +After=network.target mysql.service +# Remarked out so that it will start ZM on machines that don't have mysql installed +#Requires=mysql.service + +[Service] +#User=www-data +Type=forking +ExecStart=/usr/bin/zmpkg.pl start +ExecReload=/usr/bin/zmpkg.pl restart +ExecStop=/usr/bin/zmpkg.pl stop +PIDFile=/var/run/zm/zm.pid +Restart=on-abnormal + +[Install] +WantedBy=multi-user.target diff --git a/distros/ubuntu1504/zoneminder.tmpfile b/distros/ubuntu1504/zoneminder.tmpfile index 036883750..d307c6640 100644 --- a/distros/ubuntu1504/zoneminder.tmpfile +++ b/distros/ubuntu1504/zoneminder.tmpfile @@ -1,2 +1,2 @@ d /var/run/zm 0755 www-data www-data - +d /tmp/zm 0755 www-data www-data diff --git a/distros/ubuntu1504_cmake/README.Debian b/distros/ubuntu1504_cmake/README.Debian deleted file mode 100644 index 8182e0678..000000000 --- a/distros/ubuntu1504_cmake/README.Debian +++ /dev/null @@ -1,160 +0,0 @@ -Zoneminder for Debian ---------------------- - -Initializing database ---------------------- - - pv /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf -OR - cat /usr/share/zoneminder/db/zm_create.sql | sudo mysql --defaults-file=/etc/mysql/debian.cnf - - echo 'grant lock tables,alter,create,index,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";'\ - | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql - -Hint: generate secure password with `pwgen` and update "/etc/zm/zm.conf" -accordingly. - -The following command can help to ensure that zoneminder can read its -configuration file: - - chgrp -c www-data /etc/zm/zm.conf - - -Upgrading database ------------------- - -Prior to 1.28.1 database upgrade was performed automatically. -"zoneminder" service will refuse to start with outdated database. - -Assuming that database is on "localhost" then the following command can be -used to upgrade "zm" database: - - zmupdate.pl - -Additional permissions may be required to perform upgrade: - - echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";'\ - | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql - -The following command prints the current version of zoneminder database: - - echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' \ - | sudo mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm - - -Enabling service ----------------- - -By default Zoneminder service is not starting automatically and need to be -manually activated once database is configured: - -On systemd: - - sudo systemctl enable zoneminder.service - -On SysV: - - sudo update-rc.d zoneminder enable - - -Web server set-up ------------------ - -There are few manual steps to get the web interface working: - -## Apache2 - -Apache can be configured as folder "/zm" using sample .conf: - - sudo a2enconf zoneminder - -Alternatively Apache web site configuration template can be used to setup -zoneminder as "http://zoneminder": - - sudo cp -v /usr/share/doc/zoneminder/examples/apache.conf /etc/apache2/sites-available/ - sudo a2ensite zoneminder.conf - -Common configuration steps for Apache2: - - sudo a2enmod cgi - sudo service apache2 reload - - -## nginx / fcgiwrap - -Nginx needs "php5-fpm" package to support PHP and "fcgiwrap" package -for binary "cgi-bin" applications: - - sudo apt-get install php5-fpm fcgiwrap - -To enable a URL alias that makes Zoneminder available from - - http://yourserver/zm - -the following line is to be added to "server" section of a web site -configuration: - - include /usr/share/doc/zoneminder/examples/nginx.conf; - -For "default" web site it would be sufficient to include the above -statement to the file - - /etc/nginx/sites-enabled/default - -To avoid problems with feeds from multiple cameras "fcgiwrap" should be -configured to start at least as many processes as there are cameras. -It can be done by adjusting DAEMON_OPTS in "/etc/default/fcgiwrap". -Systemd users may be affected by the following bug: - - http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=792705 - - -## Note: - -When Zoneminder web site is running it may be necessary to set -Options/Paths/PATH_ZMS to "/zm/cgi-bin/nph-zms" or according to chosen web -site configuration. - - -Changing the location for images and events -------------------------------------------- - -Zoneminder, in its upstream form, stores data in /usr/share/zoneminder/. This -package modifies that by changing /usr/share/zoneminder/images and -/usr/share/zoneminder/events to symlinks to directories under -/var/cache/zoneminder. - -There are numerous places these could be put and ways to do it. But, at the -moment, if you change this, an upgrade will fail with a warning about these -locations having changed (the reason for this was that previously, an upgrade -would silently revert the changes and cause event loss - refer -bug #608793). - -If you do want to change the location, here are a couple of suggestions. -(thanks to vagrant@freegeek.org): - -These lines in fstab could allow you to bind-mount an alternate location - - /dev/sdX1 /otherdrive ext3 defaults 0 2 - /otherdrive/zoneminder/images /var/cache/zoneminder/images bind defaults 0 2 - /otherdrive/zoneminder/events /var/cache/zoneminder/events bind defaults 0 2 - - or if you have a separate partition for each: - - /dev/sdX1 /var/cache/zoneminder/images ext3 defaults 0 2 - /dev/sdX2 /var/cache/zoneminder/events ext3 defaults 0 2 - - -- Peter Howard , Sun, 16 Jan 2010 01:35:51 +1100 - -Access to /dev/video* ---------------------- - -For cameras which require access to /dev/video*, zoneminder may need the -www-data user added to the video group in order to see those cameras: - - adduser www-data video - -Note that all web applications running on the zoneminder server will then have -access to all video devices on the system. - - -- Vagrant Cascadian Sun, 27 Mar 2011 13:06:56 -0700 diff --git a/distros/ubuntu1504_cmake/changelog b/distros/ubuntu1504_cmake/changelog deleted file mode 100644 index 74cf1d0b8..000000000 --- a/distros/ubuntu1504_cmake/changelog +++ /dev/null @@ -1,573 +0,0 @@ -zoneminder (1.28.1+1-vivid-SNAPSHOT2015081701) vivid; urgency=medium - - * include api, switch to cmake build - - -- Isaac Connor Mon, 17 Aug 2015 10:29:23 -0400 - - -zoneminder (1.28.1-8) unstable; urgency=medium - - * Patchworks: - + New upstream "980-fix-image-size.patch". - + New "default_cgi-path.patch" to correct default ZM_PATH_ZMS. - * postinst: set "root" as group owner for "/var/log/zm" to silence - logrotate warnings. - * Minor correction to README.Debian. - - -- Dmitry Smirnov Sun, 16 Aug 2015 19:19:50 +1000 - -zoneminder (1.28.1-7) unstable; urgency=medium - - * Build-Depends += "cakephp (<< 3.0.0~)"; - Zoneminder is not compatible with latest CakePHP. - * Handle conffile removal from maintscript. - * rules: build man pages reproducibly. - * gbp.conf: renamed old style config section [git-dch] to [dch]. - * README - + added instructions to update owner of the "/etc/zm/zm.conf" - (Closes: #789327). - + zmupdate.pl needs CREATE rights. - + added note about required number of "fcgiwrap" workers. - * New upstream patch: "zmtrigger-plus.patch". - - -- Dmitry Smirnov Mon, 20 Jul 2015 16:30:15 +1000 - -zoneminder (1.28.1-6) unstable; urgency=low - - * New "zoneminder-doc" and "zoneminder-dbg" packages. - - -- Dmitry Smirnov Sun, 19 Apr 2015 14:50:41 +1000 - -zoneminder (1.28.1-5) unstable; urgency=low - - * Move handling of "/var/run/zm" and "/tmp/zm" from .service into .tmpfile. - Let dh_installinit do the job. Thanks, Andrew Bauer. - * Use dh_apache2 to install Apache conf file; remove old conf and symlink. - * Promote "libapache2-mod-php5 | php5-fpm" to Recommends. - * Build-Depends: - + dh-linktree - + cakephp (>= 2.6.3) - + libjs-jquery - + libjs-mootools - * Depends: - - libjs-jquery - - libjs-mootools - * Build-time replace bundled CakePHP with system one using "dh-linktree". - * Use "dh-linktree" to handle mootools and jquery symlinks. - - -- Dmitry Smirnov Sun, 19 Apr 2015 11:45:01 +1000 - -zoneminder (1.28.1-4) unstable; urgency=low - - * New patch to fix HTML export with USE_DEEP_STORAGE (closes: #723706). - * New "783.patch" to describe potential data loss in ZM_USE_DEEP_STORAGE. - * New patch to change default date format to region-neutral ISO notation - with time zone. - * Build sphinx documentation: - + Install "zoneminder.1" man page. - + Build-Depends += "python-sphinx | python3-sphinx" - + Added commented "zoneminder-doc" package. - + Added "docs.patch" to unlink distro-specific installation docs. - * rules: - + set ZM_CONTENTDIR, ZM_SOCKDIR and ZM_TMPDIR. - + remove mistakengly installed Perl module templates. - * Updated startup scripts to create ZM_TMPDIR. - * Hurd improvements: - + New patch to add PATH_MAX definitions. - + Build without MMAP support on Hurd. - + libsys-mmap-perl [!hurd-any]. - - -- Dmitry Smirnov Mon, 06 Apr 2015 18:18:55 +1000 - -zoneminder (1.28.1-3) unstable; urgency=low - - * Updated Apache2 and nginx configuration templates to support CGI. - * Updated README.Debian to document cgi-bin setup. - * Removed "/usr/share/zoneminder/www/cgi-bin" symlink. - * Added "apache2.patch" to correct Apache2 site configuration example. - * control: Suggests += "fcgiwrap". - * rules: added dh_systemd overrides to prevent automatic service - activation and start. - * Added note about manual service activation to README.Debian - (Closes: #781733). - - -- Dmitry Smirnov Thu, 02 Apr 2015 23:20:20 +1100 - -zoneminder (1.28.1-2) unstable; urgency=low - - * Removed word "Linux" from short package description. - * Build-Depends: do not require "libv4l-dev" on Hurd i.e. [!hurd-any]. - * Added run-time Perl Depends: - + libdbd-mysql-perl - + libimage-info-perl - + libmodule-load-conditional-perl - + libnet-sftp-foreign-perl - + liburi-encode-perl - * Prepare for package split: added commented "libzoneminder-perl" - and "zoneminder-dbg" packages to "debian/control". - * rules: do not install worthless ".packlist" file. - * Updated "libv4l1-videodev.h.patch" to fix v4lv1 detection in CMake. - - -- Dmitry Smirnov Thu, 02 Apr 2015 13:25:19 +1100 - -zoneminder (1.28.1-1) unstable; urgency=low - - [ Dmitry Smirnov ] - * New upstream release [February 2015]. - * Upload to unstable. - * Disabled automatic database upgrades: post(inst|rm) scripts no longer - touch database or do unexpected stuff (Closes: #779254). - See README.Debian for details. - * Updated installation paths: - + /usr/share/zoneminder --> /usr/share/zoneminder/www - + /usr/lib/cgi-bin --> /usr/lib/zoneminder/cgi-bin - * Added logrotate config (Closes: #544826). - Thanks, Alberto Reyes. - * Native systemd service; "--with systemd" added to dh. - * Build with CMake instead of autoconf; rules clean-up. - * Build with all hardening. - * Build and install "zmupdate.pl.1" man page. - * Added nginx/php5-fpm configuration example. - * Install upstream "apache.conf" example. - * Described setup of Zoneminer web site and database in README.Debian. - * Install "/etc/zm/zm.conf" with tighter permissions. - * Added TODO.Debian. - * Added "debian/clean"; "debian/gbp.conf"; bug-presubj. - * Remove bundled Cake tests to take ~5 MB off big-usr-share. - * Standards-Version: 3.9.6; compat/debhelper to version 9. - * Vcs links to new git repository at collab-maint. - * Build-Depends: - + dh-systemd - + libgcrypt11-dev --> libgcrypt-dev - + libcurl4-gnutls-dev - + libvlc-dev - + policykit-1 (required by "zmsystemctl.pl") - - dh-autoreconf, autoconf, automake - * Depends: - - apache2 - - libapache2-mod-php5 (moved to Suggests) - - libpcre3 (invalid) - - libmodule-load-perl (obsolete; replaced with perl-modules) - - libarchive-tar-perl (obsolete; replaced with perl-modules) - - mysql-server (moved to Recommends, Closes: #759504). - - php5 - + libav-tools - + libjs-jquery (replaces bundled component) - + libjs-mootool (replaces bundled component) - + libjson-any-perl (Closes: #690803). - + perl-modules (Closes: #745819). - * Recommends: - + apache2 | httpd - + mysql-server | virtual-mysql-server (Closes: #732874). - * Suggests: - + libapache2-mod-php5 | php5-fpm - + logrotate - * Refreshed, renamed and re-ordered patches; added DEP-3 headers. - * Removed "vendor_perl" patch (applied-upstream). - * New patches: - + cmake-fix-confpath.patch - + cmake-gnutls.patch - + cmake-nossl.patch - + cmake.patch - + format-hardening.patch - + pod_man_fixes.patch - + pod_name_fixes.patch - + pod_zmupdate-to-pod2usage.patch - * Lintianisation (incomplete): - - extra-license-file - - init.d-script-missing-lsb-description - - init.d-script-does-not-source-init-functions - - privacy-breach-generic - - package-contains-empty-directory - - manpage-has-errors-from-pod2man - - manpage-has-bad-whatis-entry - - quilt-patch-missing-description - - no-dep5-copyright - * Lintian-overrides: - + unusual-interpreter usr/bin/zmsystemctl.pl #!/usr/bin/pkexec - + script-not-executable usr/share/zoneminder/www/api/* - + script-with-language-extension usr/bin/*.pl - + source-is-missing web/tools/mootools/mootools-*-yc.js - + source-is-missing web/skins/*/js/jquery-1.4.2.min.js - + source-contains-prebuilt-javascript-object - * Renamed files in "debian". - * watch: dfsg repacksuffix and dversionmangle. - * "debian/copyright" to Copyright-Format-1.0. - * Set myself as new Maintainer (Closes: #760314). - - [ Vagrant Cascadian ] - * Removed obsolete DM-Upload-Allowed flag. - * Update debian/watch to use tarballs from github. - * Add Build-Depends on libgcrypt11-dev (Closes: #745819). - * Use canonical alioth Vcs-Hg URL. - * debian/control: Add Build-Depends: libpolkit-gobject-1-dev. - * Removed configure flag "--enable-crashtrace=no", which is no longer - present upstream. - - -- Dmitry Smirnov Tue, 31 Mar 2015 15:11:13 +1100 - -zoneminder (1.26.5-3.1) experimental; urgency=low - - * Non-maintainer upload. - * Add libav10.patch and compile against libav10 (Closes: #739461) - - -- Reinhard Tartler Wed, 19 Mar 2014 00:31:22 +0000 - -zoneminder (1.26.5-3) unstable; urgency=low - - - * Previous release still didn't build on PPC - this has been corrected. - (Closes: #736516) - - -- Peter Howard Tue, 4 Feb 2014 02:02:10 +1000 - -zoneminder (1.26.5-2) unstable; urgency=low - - * Remove dependency on ffmpeg - (Closes: #721161) - - * Builds again on non-x86 target architectures. - - -- Peter Howard Thu, 23 Jan 2014 01:02:10 +1000 - -zoneminder (1.26.5-1) unstable; urgency=low - - * New upstream version - (Closes: #694131) - * Change Build-Depends on libgnutls-dev to libgnutls-openssl-dev - (Closes: #731560) - -- Peter Howard Tue, 17 Dec 2013 01:02:10 +1000 - -zoneminder (1.25.0-4) unstable; urgency=high - - * Add CVE-2013-0232 patch - [SECURITY] CVE-2013-0232: Shell escape commands with untrusted content. - Thanks to James McCoy (Closes: #698910) - Thanks also to Salvatore Bonaccorso - - -- Peter Howard Tue, 12 Jun 2013 12:02:10 +1000 - -zoneminder (1.25.0-3) unstable; urgency=low - - * debian/rules: Export CFLAGS, CPPFLAGS, CXXFLAGS and LDFLAGS, to ensure - hardening build flags are enabled. - - -- Vagrant Cascadian Tue, 28 Aug 2012 12:10:03 -0700 - -zoneminder (1.25.0-2) unstable; urgency=low - - [ Vagrant Cascadian ] - * Add a patch to disable checking for updated versions by default, as - upgrades should happen through package management. - * Use dpkg-buildflags in debian/rules to set default compiler flags. - * Ensure zoneminder is stopped before starting (Closes: #657407). - - [ Peter Howard ] - * Fix postinst to add permission for table creation during upgrade - (Closes: #657407). - - -- Vagrant Cascadian Thu, 23 Aug 2012 12:40:34 -0700 - -zoneminder (1.25.0-1.1) unstable; urgency=low - - * Non-maintainer upload. - * Fix "ftbfs with GCC-4.7": add patch Fix-FTBFS-with-gcc-4.7 from Cyril - Brulebois: fix missing includes. - (Closes: #667428) - - -- gregor herrmann Sun, 13 May 2012 17:02:21 +0200 - -zoneminder (1.25.0-1) unstable; urgency=low - - * Fix typo in libv4l1-videodev.h patch that caused v4l1 support to be - dropped. - * Fail to build if version in postinst doesn't match upstream version. - * Add Build-Depends: libavdevice-dev to fix MPEG streaming (Closes: #515558). - * debian/rules: Convert to using debhelper overrides. - * Set debian/compat to 7. - * Simplify debian/watch file. - * Refresh debian/patches/use_libjs-mootools. - * Refresh debian/patches/libv4l1-videodev.h. - * Remove dependencies on php4 and related packages. - * Remove build-dependencies on libmysqlclient14-dev and - libmysqlclient15-dev. - * Update Build-Depends to use libjpeg-dev instead of libjpeg62-dev - (Closes: #647114). - * Add patch to fix build by testing for C headers rather than C++ headers. - Thanks to Ryan Niebur. (Closes: #654230) - * Add a patch to fix build problems caused by API changes in libav 0.8. - Thanks again to Ryan Niebur. (Closes: #654230) - - -- Vagrant Cascadian Mon, 16 Jan 2012 11:58:05 -0800 - -zoneminder (1.24.4-1) unstable; urgency=low - - [ Peter Howard ] - * Initial release of 1.24.4 (Closes: #634985). - - Fix 32/64-bit type declarations (Closes: #614404). - * Update patches. - - [ Vagrant Cascadian ] - * Add patch to fix FTBFS by using libv4l1-videodev.h from libv4l-dev. - Thanks to Andreas Metzler for reporting the issue. - (Closes: #619813). - * Document adding the www-data user to the video group in README.Debian. - (Closes: #611324) - * Depend on libsys-mmap-perl to enable mapped memory support. - (Closes: #607331) - * Update libjs-mootools patch to use -nc variants (Closes: #635075). - * Depend on javascript-common, to ensure that /javascript is available in - the web server. - * Set the upstream version in postinst at build time. - * Use dh-autoreconf to properly clean up autogenerated files during build. - * Add Vcs-HG to debian/control. - * Add Build-Depends: libv4l-dev, libbz2-dev, dh-autoreconf, libsys-mmap-perl. - - -- Vagrant Cascadian Sun, 24 Jul 2011 16:44:30 +0200 - -zoneminder (1.24.2-9) unstable; urgency=low - - * Apply patch from Ubuntu to fix FTBFS with ffmpeg 0.6: - - Add -D__STDC_CONSTANT_MACROS to CPPFLAGS (closes: 614080). - * Update Standards-Version to 3.9.1, no changes necessary. - - -- Vagrant Cascadian Sun, 20 Feb 2011 23:43:02 -0800 - -zoneminder (1.24.2-8) unstable; urgency=medium - - [ Vagrant Cascadian ] - * Apply patch to fix V4L2 cameras without crop support (closes: #608790). - Thanks to piratebab. - * Add preinst script which aborts if dangerous symlinks exist. - (closes: #608793) - - [ Peter Howard ] - * Added to README.Debian with info about images and events directories. - (closes: #608793) - - -- Vagrant Cascadian Sat, 15 Jan 2011 19:39:26 -0800 - -zoneminder (1.24.2-7) unstable; urgency=medium - - * Do not set ownership of /var/cache/zoneminder when upgrading, which fixes a - regression causing upgrades to take inordinately long with large - installations (closes: #597040). - - -- Vagrant Cascadian Fri, 17 Sep 2010 11:24:41 -0700 - -zoneminder (1.24.2-6) unstable; urgency=low - - * Only remove database on purge. This requires only creating the database if - it doesn't already exist, and upgrading the database only if the database - is an older version (closes: #497107). - - * Do not prompt the user on database upgrades by using the --nointeractive - flag when calling zmupdate.pl from postinst (closes: #595902). - - -- Vagrant Cascadian Fri, 10 Sep 2010 10:06:06 -0700 - -zoneminder (1.24.2-5) unstable; urgency=low - - [ Peter Howard ] - * Add zip dependency - (closes: #494261) - * Add debian/watch file - (closes: #545552) - * Use packaged libjs-mootools - (closes: #585590) - * Miscellaneous cleanups - - [ Vagrant Cascadian ] - * Add vagrant@debian.org as uploader - * Update Standards-Version to 3.9.0, no changes necessary. - - -- Vagrant Cascadian Fri, 23 Jul 2010 18:12:50 -0500 - -zoneminder (1.24.2-4.1) unstable; urgency=low - - * Non-maintainer upload. - * Fix "package removed, processes still running": apply patch to - debian/postinst by Vagrant Cascadian: use invoke-rc.d and run - mysql-related actions only when mysql is running (closes: #583648). - - -- gregor herrmann Thu, 01 Jul 2010 19:47:10 +0200 - -zoneminder (1.24.2-4) unstable; urgency=high - * Update init.d to list mysql dependency - (closes: #583505) - * Change depenency from libmime-perl to libmime-tools-perl - (closes: #585589) - * Problems in changelog format fixed - (closes: #585592) - * Fix debian-rules-ignores-make-clean-error - (closes: #585593) - -- Peter Howard Mon, 14 jun 2010 15:02:10 +1000 - -zoneminder (1.24.2-3) unstable; urgency=high - * Changes symbols to build with libjpeg8 - (closes: #565326, #568327) - * Note: location of all perl files should have been fixed in previous release - (closes: #553096) - -- Peter Howard Mon, 26 apr 2010 15:02:10 +1000 - -zoneminder (1.24.2-2) unstable; urgency=high - - * Remove custom perl parth from zmpkg.pl, fix location of manpages. - (closes: #551746, #553092) - * Fix GCC4.4 bug - (closes: #531717) - * Fix potential bug in postinst script - - -- Peter Howard Sat, 14 Nov 2009 15:02:10 +1000 - -zoneminder (1.24.2-1) unstable; urgency=high - - * Initial release of zoneminder 1.24.2 - -- Peter Howard Fri, 11 Sep 2009 07:02:50 +1000 - -zoneminder (1.24.1-1) unstable; urgency=high - - * Initial release of zoneminder 1.24.1, closing CVE-2008-3882, - CVE-2008-3881, CVE-2008-3880 - (closes: #497640) - * Change syslog dependency to rsyslog. - (closes: #526918) - * Add missing perl depenency. - * Restore patch to disable "check for updates" by default. - * Removed spurious '$' in init script. - (closes: #486064) - * Change permission of zm.conf from 0600 to 0400 for CVE-2008-6755 - (closes: #528252) - -- Peter Howard Sat, 16 May 2009 07:02:50 +1000 - -zoneminder (1.23.3-4) unstable; urgency=high - - * update to get it building with latest unstable. Thanks to waldi@debian.org - (closes: #517569) - -- Peter Howard Thu, 16 Apr 2009 01:02:50 +1000 - -zoneminder (1.23.3-3) unstable; urgency=high - - * ffmpeg confirmed working - (closes: #475145) - * Fix upgrade problem intrudouced in 1.23.3-1 - (closes: #481637) - * Include libmime-lite-perl in dependencies - (closes: #486312) - -- Peter Howard Thu, 18 Sep 2008 01:02:50 +1000 - -zoneminder (1.23.3-2) unstable; urgency=high - - * ffmpeg finally working? - - -- Peter Howard Wed, 13 Aug 2008 01:02:50 +1000 - -zoneminder (1.23.3-1) unstable; urgency=high - - * Initial version for 1.23.3 - security fix. - (closes: #479034) - - -- Peter Howard Wed, 19 Mar 2008 01:02:50 +1000 - -zoneminder (1.23.2-2) unstable; urgency=low - - * Update to init.d - (closes: #468856) - * Add dependency on logging daemon - (closes: #471277) - - -- Peter Howard Wed, 19 Mar 2008 01:02:50 +1000 - -zoneminder (1.23.2-1) unstable; urgency=low - - * Initial version for 1.23.2 - (closes: #464152) - * Zoneminder 1.23.2 upstream includes fix for GCC 4.3 - (closes: #454980) - * Includes ffmpeg patch by Alexander Kushnirenko - - -- Peter Howard Sat, 01 Mar 2008 16:02:50 +1000 - -zoneminder (1.22.3-10) unstable; urgency=low - - * Fix bug introduced in -9 where perl is put under /usr/local - (closes: #457507) - - -- Peter Howard Mon, 24 Dec 2007 16:02:50 +1000 - -zoneminder (1.22.3-9) unstable; urgency=low - - * Starting zoneminder via init script now invokes "zmfix -a" - (closes: #481637) - * Change apache2-mpm-prefork dependency to apache2 - * Temp dir for export under /var/cache/zoneminder (but linked back to - /usr/share/zoneminder for now) - * Redo use of gnutls rather than openssl for md5 hashes - - -- Peter Howard Mon, 10 Dec 2007 16:02:50 +1000 - -zoneminder (1.22.3-8) unstable; urgency=low - - * Build now includes libpcre3 - (closes: #437533) - * "Monitor Presets" patch now applied to package during build. - - -- Peter Howard Sat, 18 Aug 2007 14:35:23 +1000 - -zoneminder (1.22.3-7) unstable; urgency=low - - * Turn off debug trace and crash dump on build - (closes:#414857,#414891) - * Additional perl libraries added in dependencies - (closes:#416291) - * Change preferred PHP version from 4 to 5 - -- Peter Howard Sun, 29 Jul 2007 15:11:13 +1000 - -zoneminder (1.22.3-6) unstable; urgency=low - - * Removed a similar bash only statement from zmpkg.pl - (closes:414882) - - -- Peter Howard Sat, 14 Apr 2007 11:46:56 +1000 - -zoneminder (1.22.3-5) unstable; urgency=low - - * Installs with "phone home" feature turned off by default, and permissions - on /etc/zm/zm.conf fixed (now the 0600 it s hould be) - (closes:415349) - * Removed "stupid bash-ism" on mysqld check in postinst file. - - -- Peter Howard Fri, 6 Apr 2007 15:50:00 +1000 - -zoneminder (1.22.3-4) unstable; urgency=low - - * Put libmysqlclient-15-dev in front of -14-dev so sbuild works - (closes: #414410) - - -- Peter Howard Mon, 12 Mar 2007 11:38:56 +1100 - -zoneminder (1.22.3-3) unstable; urgency=low - - * Clean up of postinstall, postrm ; user "zm" definitely was a mistake - * Also in postinstall: check and start MySQL if it's not running. - * init.d script now checks if zoneminder isn't running and still returns 0 - (which helps uninstalling) - * Addition of php5 dependency options as well as php4. - - -- Peter Howard Mon, 26 Feb 2007 10:40:52 +1100 - -zoneminder (1.22.3-2) unstable; urgency=low - - * Added zmuser in the mysql creation; this should fix the install problem - for people, but needs to be cleaned up (in -3) - - -- Peter Howard Fri, 16 Feb 2007 14:16:03 +1100 - -zoneminder (1.22.3-1) unstable; urgency=low - - * Initial Version. (closes: #248393) - * Patched out use of openssl; uses gnutls instead for MD5 hashes. - * Removed MakeMaker-inserted Perl licensing (with authors permission) in - various scripts; replaced with GPL. - - -- Peter Howard Wed, 7 Feb 2007 14:09:01 +1100 diff --git a/distros/ubuntu1504_cmake/compat b/distros/ubuntu1504_cmake/compat deleted file mode 100644 index ec635144f..000000000 --- a/distros/ubuntu1504_cmake/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/distros/ubuntu1504_cmake/control b/distros/ubuntu1504_cmake/control deleted file mode 100644 index 50dee74c6..000000000 --- a/distros/ubuntu1504_cmake/control +++ /dev/null @@ -1,146 +0,0 @@ -Source: zoneminder -Section: net -Priority: optional -Maintainer: Dmitry Smirnov -Uploaders: Vagrant Cascadian -Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apache2-dev, dh-linktree - ,cmake - ,libavcodec-ffmpeg-dev, libavformat-ffmpeg-dev, libswscale-ffmpeg-dev, libavutil-ffmpeg-dev, libavdevice-ffmpeg-dev - ,libbz2-dev - ,libgcrypt-dev - ,libcurl4-gnutls-dev - ,libgnutls-openssl-dev - ,libjpeg-dev - ,libmysqlclient-dev - ,libpcre3-dev - ,libpolkit-gobject-1-dev - ,libv4l-dev (>= 0.8.3) [!hurd-any] - ,libvlc-dev - ,libdate-manip-perl - ,libdbd-mysql-perl - ,libphp-serialization-perl - ,libsys-mmap-perl [!hurd-any] - ,libwww-perl -# Unbundled (dh_linktree): - ,libjs-jquery - ,libjs-mootools -Standards-Version: 3.9.6 -Homepage: http://www.zoneminder.com/ -Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/zoneminder.git -Vcs-Git: git://anonscm.debian.org/collab-maint/zoneminder.git - -Package: zoneminder -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} - ,javascript-common - ,libav-tools - ,libdate-manip-perl - ,libdbd-mysql-perl - ,libmime-lite-perl - ,libmime-tools-perl - ,libphp-serialization-perl - ,libmodule-load-conditional-perl - ,libnet-sftp-foreign-perl - ,libarchive-zip-perl - ,libdbd-mysql-perl - ,libdevice-serialport-perl - ,libimage-info-perl - ,libjson-any-perl - ,libsys-mmap-perl [!hurd-any] - ,liburi-encode-perl - ,libwww-perl - ,libdata-dump-perl - ,libclass-std-fast-perl - ,libsoap-wsdl-perl - ,libio-socket-multicast-perl - ,libdigest-sha-perl - ,libsys-cpu-perl, libsys-meminfo-perl - ,mysql-client | virtual-mysql-client - ,perl-modules - ,php5-mysql - ,policykit-1 - ,rsyslog | system-log-daemon - ,zip -Recommends: ${misc:Recommends} - ,libapache2-mod-php5 | php5-fpm - ,mysql-server | virtual-mysql-server - ,zoneminder-doc (>= ${source:Version}) -Suggests: fcgiwrap, logrotate -Description: video camera security and surveillance solution - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - -#Package: libzoneminder-perl -#Section: perl -#Architecture: all -#Multi-Arch: foreign -#Depends: ${misc:Depends}, ${perl:Depends} -# ,libarchive-zip-perl -# ,libdbd-mysql-perl -# ,libdevice-serialport-perl -# ,libimage-info-perl -# ,libjson-any-perl -# ,libsys-mmap-perl [!hurd-any] -# ,liburi-encode-perl -# ,libwww-perl -#Description: ZoneMinder Perl libraries -# ZoneMinder is intended for use in single or multi-camera video security -# applications, including commercial or home CCTV, theft prevention and child -# or family member or home monitoring and other care scenarios. It -# supports capture, analysis, recording, and monitoring of video data coming -# from one or more video or network cameras attached to a Linux system. -# ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom -# cameras using a variety of protocols. It is suitable for use as a home -# video security system and for commercial or professional video security -# and surveillance. It can also be integrated into a home automation system -# via X.10 or other protocols. -# . -# This package provides ZoneMinder Perl libraries; it can be used to -# write custom interfaces as well. - -Package: zoneminder-doc -Section: doc -Architecture: all -Multi-Arch: foreign -Depends: ${misc:Depends}, ${sphinxdoc:Depends}, python-sphinx-rtd-theme | python3-sphinx-rtd-theme -Suggests: www-browser -Description: ZoneMinder documentation - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - . - This package provides ZoneMinder documentation in HTML format. - -Package: zoneminder-dbg -Section: debug -Priority: extra -Architecture: any -Depends: zoneminder (= ${binary:Version}), ${misc:Depends} -Description: Zoneminder -- debugging symbols - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. - . - This package provides debugging symbols diff --git a/distros/ubuntu1504_cmake/copyright b/distros/ubuntu1504_cmake/copyright deleted file mode 100644 index c48025a25..000000000 --- a/distros/ubuntu1504_cmake/copyright +++ /dev/null @@ -1,174 +0,0 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: ZoneMinder -Upstream-Contact: Philip Coombes -Source: https://github.com/ZoneMinder/ZoneMinder -Comment: - This package was originally debianized by matrix - on Mon, 7 Mar 2005 02:07:57 -0500. - It was re-done for submission to the Debian project by Peter Howard - on Fri, 8 Dec 2006 10:19:43 +1100 -Files-Excluded: - web/skins/*/js/jquery-* - web/tools/mootools/*-yc.js - -Files: * -Copyright: 2001-2014 Philip Coombes - 2008 Brian Rudy - 2014 Vincent Giovannone - 2013 Tim Craig - 2003-2008 Corey DeLasaux - 2001-2010 Chris Kistner -License: GPL-2+ - -Files: distros/* -Copyright: 2001-2008 Philip Coombes - 2014 Isaac Connor - 2005 Serg Oskin -License: GPL-2+ - -Files: web/skins/*/js/jquery-* -Copyright: 2010 John Resig - 2010 The Dojo Foundation -License: GPL-2 or Expat -Comment: - Dual licensed under the MIT or GPL Version 2 licenses. - http://jquery.org/license - . - Includes Sizzle.js http://sizzlejs.com/ - Released under the MIT, BSD, and GPL Licenses. - -Files: web/tools/mootools/*.js -Copyright: 2009 Marcelo Jorge Vieira (metal) - 2006-2010 Valerio Proietti (http://mad4milk.net/) -License: Expat - -Files: web/api/* -Copyright: 2005-2013 Cake Software Foundation, Inc. (http://cakefoundation.org) -License: Expat - -Files: - cmake/Modules/CheckPrototypeDefinition*.cmake - cmake/Modules/FindGLIB2.cmake - cmake/Modules/FindPolkit.cmake - cmake/Modules/GNUInstallDirs.cmake -Copyright: - 2005-2011 Kitware, Inc. - 2010-2011 Andreas Schneider - 2009 Dario Freddi - 2008 Laurent Montel, - 2011 Nikita Krupen'ko -License: BSD-3-clause - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - . - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - . - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - . - * The names of Kitware, Inc., the Insight Consortium, or the names of - any consortium members, or of any contributors, may not be used to - endorse or promote products derived from this software without - specific prior written permission. - . - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS'' - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -Files: cmake/Modules/FindPerlModules.cmake -Copyright: 2012 Iowa State University -License: Boost-1.0 - Boost Software License - Version 1.0 - August 17th, 2003 - . - Permission is hereby granted, free of charge, to any person or organization - obtaining a copy of the software and accompanying documentation covered by - this license (the "Software") to use, reproduce, display, distribute, - execute, and transmit the Software, and to prepare derivative works of the - Software, and to permit third-parties to whom the Software is furnished to - do so, all subject to the following: - . - The copyright notices in the Software and this entire statement, including - the above license grant, this restriction and the following disclaimer, - must be included in all copies of the Software, in whole or in part, and - all derivative works of the Software, unless such copies or derivative - works are solely in the form of machine-executable object code generated by - a source language processor. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - -Files: debian/* -Copyright: 2015 Dmitry Smirnov - 2007-2014 Peter Howard - 2010-2012 Vagrant Cascadian - 2001-2008 Philip Coombes -License: GPL-2+ - -License: Expat - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - . - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - . - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - -License: GPL-2+ - This package is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; either version 2 of the License, or (at your - option) any later version. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - . - You should have received a copy of the GNU General Public - License along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - The complete text of the GNU General Public License version 2 - can be found in "/usr/share/common-licenses/GPL-2". - -License: GPL-2 - This package is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the - Free Software Foundation; version 2 of the License. - . - This package is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - General Public License for more details. - . - You should have received a copy of the GNU General Public - License along with this package; if not, write to the Free Software - Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - . - The complete text of the GNU General Public License version 2 - can be found in "/usr/share/common-licenses/GPL-2". diff --git a/distros/ubuntu1504_cmake/patches/series b/distros/ubuntu1504_cmake/patches/series deleted file mode 100644 index fc70f4006..000000000 --- a/distros/ubuntu1504_cmake/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -default_cgi-path.patch -use_libjs-mootools.patch diff --git a/distros/ubuntu1504_cmake/rules b/distros/ubuntu1504_cmake/rules deleted file mode 100755 index bf8012aa8..000000000 --- a/distros/ubuntu1504_cmake/rules +++ /dev/null @@ -1,93 +0,0 @@ -#!/usr/bin/make -f -# -*- makefile -*- - -# Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 - -export DEB_BUILD_MAINT_OPTIONS = hardening=+all -export DEB_LDFLAGS_MAINT_APPEND += -Wl,--as-needed - -ifeq ($(DEB_BUILD_ARCH_OS),hurd) -ARGS:= -DZM_NO_MMAP=ON -endif - -%: - dh $@ --parallel --buildsystem=cmake --builddirectory=dbuild \ - --with systemd,sphinxdoc,apache2,linktree - -override_dh_auto_configure: - dh_auto_configure -- $(ARGS) \ - -DCMAKE_VERBOSE_MAKEFILE=ON \ - -DCMAKE_BUILD_TYPE=Release \ - -DZM_CONFIG_DIR="/etc/zm" \ - -DZM_RUNDIR="/var/run/zm" \ - -DZM_SOCKDIR="/var/run/zm" \ - -DZM_TMPDIR="/tmp/zm" \ - -DZM_CGIDIR="/usr/lib/zoneminder/cgi-bin" \ - -DZM_CONTENTDIR="/var/cache/zoneminder" - -override_dh_clean: - dh_clean $(MANPAGES1) - $(RM) -r docs/_build docs/installationguide - -build-indep: - #$(MAKE) -C docs text - $(MAKE) -C docs html - -MANPAGES1 = dbuild/scripts/zmupdate.pl.1 -$(MANPAGES1): - # generate man page(s): - pod2man -s1 --stderr --utf8 $(patsubst %.1, %, $@) $@ - -## reproducible build: -LAST_CHANGE=$(shell dpkg-parsechangelog -S Date) -BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)") -override_dh_installman: $(MANPAGES1) - $(MAKE) -C docs man SPHINXOPTS="-D today=\"$(BUILD_DATE)\"" - dh_installman --language=C $(MANPAGES1) - -override_dh_auto_install: - dh_auto_install --destdir=$(CURDIR)/debian/tmp - # remove worthless files: - $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*/*/.packlist - $(RM) -v $(CURDIR)/debian/tmp/usr/share/perl5/*/*.in - # remove empty directories: - find $(CURDIR)/debian/tmp/usr -type d -empty -delete -printf 'removed %p\n' - # remove extra-license-file: - $(RM) -v $(CURDIR)/debian/tmp/usr/share/zoneminder/www/api/lib/Cake/LICENSE.txt - -override_dh_fixperms: - dh_fixperms - ## 637685 - chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf - -override_dh_installinit: - dh_installinit --no-start - -override_dh_systemd_start: - dh_systemd_start --no-start - -override_dh_systemd_enable: - dh_systemd_enable --no-enable - -override_dh_apache2: - dh_apache2 --noenable - -override_dh_strip: - [ -d "$(CURDIR)/debian/zoneminder-dbg" ] \ - && dh_strip --dbg-package=zoneminder-dbg \ - || dh_strip - -#%: -# dh $@ --parallel --buildsystem=autoconf --with autoreconf -# -#override_dh_auto_configure: -# dh_auto_configure -- \ -# --sysconfdir=/etc/zm \ -# --with-mysql=/usr \ -# --with-webdir=/usr/share/zoneminder \ -# --with-ffmpeg=/usr \ -# --with-cgidir=/usr/lib/cgi-bin \ -# --with-webuser=www-data \ -# --with-webgroup=www-data \ -# --enable-mmap=yes diff --git a/distros/ubuntu1504_cmake/source/format b/distros/ubuntu1504_cmake/source/format deleted file mode 100644 index 89ae9db8f..000000000 --- a/distros/ubuntu1504_cmake/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (native) diff --git a/distros/ubuntu1504_cmake/watch b/distros/ubuntu1504_cmake/watch deleted file mode 100644 index 7ee690edb..000000000 --- a/distros/ubuntu1504_cmake/watch +++ /dev/null @@ -1,7 +0,0 @@ -version=3 - -opts=\ -repacksuffix=+dfsg,\ -dversionmangle=s{\+dfsg\d*}{},\ - https://github.com/ZoneMinder/ZoneMinder/releases \ - .*/ZoneMinder/archive/v(.*).tar.gz diff --git a/distros/ubuntu1504_cmake/zoneminder.postinst b/distros/ubuntu1504_cmake/zoneminder.postinst deleted file mode 100644 index 82b256e6b..000000000 --- a/distros/ubuntu1504_cmake/zoneminder.postinst +++ /dev/null @@ -1,30 +0,0 @@ -#! /bin/sh - -set -e - -. /etc/zm/zm.conf - -if [ "$1" = "configure" ]; then - chown www-data:root /var/log/zm - chown www-data:www-data /var/lib/zm - if [ -z "$2" ]; then - chown www-data:www-data -R /var/cache/zoneminder - fi - - # Do this every time the package is installed or upgraded - # Test for database presence to avoid failure of zmupdate.pl - - # Ensure zoneminder is stopped - deb-systemd-invoke stop zoneminder.service || exit $? - - if [ "$ZM_DB_HOST" = "localhost" ]; then - echo 'grant lock tables, create, index, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql - # Run the ZoneMinder update tool - zmupdate.pl --nointeractive - else - echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)" - fi; - -fi - -#DEBHELPER# diff --git a/distros/ubuntu1504_cmake/zoneminder.service b/distros/ubuntu1504_cmake/zoneminder.service deleted file mode 100644 index e3575c039..000000000 --- a/distros/ubuntu1504_cmake/zoneminder.service +++ /dev/null @@ -1,20 +0,0 @@ -# ZoneMinder systemd unit file -# This file is intended to work with Debian distributions - -[Unit] -Description=ZoneMinder CCTV recording and surveillance system -After=network.target mysql.service -# Remarked out so that it will start ZM on machines that don't have mysql installed -#Requires=mysql.service - -[Service] -#User=www-data -Type=forking -ExecStart=/usr/bin/zmpkg.pl start -ExecReload=/usr/bin/zmpkg.pl restart -ExecStop=/usr/bin/zmpkg.pl stop -PIDFile=/var/run/zm/zm.pid -Restart=on-abnormal - -[Install] -WantedBy=multi-user.target diff --git a/distros/ubuntu1504_cmake/zoneminder.tmpfile b/distros/ubuntu1504_cmake/zoneminder.tmpfile deleted file mode 100644 index d307c6640..000000000 --- a/distros/ubuntu1504_cmake/zoneminder.tmpfile +++ /dev/null @@ -1,2 +0,0 @@ -d /var/run/zm 0755 www-data www-data -d /tmp/zm 0755 www-data www-data diff --git a/distros/ubuntu1504_cmake_split_packages/control b/distros/ubuntu1504_cmake_split_packages/control index d6d318e96..5f313897f 100644 --- a/distros/ubuntu1504_cmake_split_packages/control +++ b/distros/ubuntu1504_cmake_split_packages/control @@ -28,9 +28,7 @@ Depends: ${misc:Depends}, zoneminder-database (>= ${source:Version}), zoneminder-core (>= ${binary:Version}), zoneminder-ui-base (>= ${source:Version}), - zoneminder-ui-classic (>= ${source:Version}), - zoneminder-ui-mobile (>= ${source:Version}), - zoneminder-ui-xml (>= ${source:Version}) + zoneminder-ui-classic (>= ${source:Version}) Description: Video camera security and surveillance solution (metapackage) ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child @@ -119,25 +117,6 @@ Description: Classic web user interface for ZoneMinder . This package provides the classic web user interface. -Package: zoneminder-ui-mobile -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: Mobile web user interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the web user interface for mobile devices. - -Package: zoneminder-ui-xml -Section: web -Architecture: all -Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} -Description: XML interface for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides a XML interface mainly intended for use with the eyeZm - iPhone Application, but can be used with any other custom programs as well. - Package: zoneminder-ui-api Section: web Architecture: all diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-mobile.install b/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-mobile.install deleted file mode 100644 index 464bb74eb..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-mobile.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/mobile diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-xml.install b/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-xml.install deleted file mode 100644 index 6617707f8..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-xml.install +++ /dev/null @@ -1 +0,0 @@ -usr/share/zoneminder/skins/xml diff --git a/docs/faq.rst b/docs/faq.rst index 5aa736ee8..1c5c36d09 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -514,6 +514,8 @@ You do not need to rebuild ZM for X10 support. You will need to install the perl Extending Zoneminder ------------------------ +.. _runstate_cron_example: + How can I get ZM to do different things at different times of day or week? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/userguide/components.rst b/docs/userguide/components.rst index ebedc8c7e..48aff0be4 100644 --- a/docs/userguide/components.rst +++ b/docs/userguide/components.rst @@ -26,16 +26,13 @@ Binaries PHP --- -As well as this there are the web PHP files in the web directory. Currently these consist of 4 possible skins. +As well as this there are the web PHP files in the web directory. Currently these consist of a single skin with Classic and Flat styles. **Classic** Original ZoneMinder skin **Flat** - An updated version of classic skin, retaining the same layout with a more modern style -**XML** - Displays certain views as XML. Used by eyeZM as an interfacing skin (Note that eyeZM no longer seems to work with later versions of Zoneminder). New developers of 3rd party clients should use the API instead (:doc:`../api`) -**Mobile** - A skin that displays views in a more condensed and single page format, likely suitable for smaller mobile devices, should one choose to access the ZoneMinder console using such devices. Note that there are also third party mobile clients one could use (:doc:`mobile`) + An updated version of Classic skin, retaining the same layout with a more modern style. Originally a skin this is now just a CSS style. + Perl ---- diff --git a/docs/userguide/gettingstarted.rst b/docs/userguide/gettingstarted.rst index 73f6e2783..b2e92f63f 100644 --- a/docs/userguide/gettingstarted.rst +++ b/docs/userguide/gettingstarted.rst @@ -67,8 +67,14 @@ own empty screen. * **D**: This is the core of ZoneMinder - recording events. It gives you a count of how many events were recorded over the hour, day, week, month. * **E**: These are the "Zones". Zones are areas within the camera that you mark as 'hotspots' for motion detection. Simply put, when you first configure your monitors (cameras), by default Zoneminder uses the entire field of view of the camera to detect motion. You may not want this. You may want to create "zones" specifically for detecting motion and ignore others. For example, lets consider a room with a fan that spins. You surely don't want to consider the fan moving continuously a reason for triggering a record? Probably not - in that case, you'd leave the fan out while making your zones. * **F**: This is the "source" column that tells you the type of the camera - if its an IP camera, a USB camera or more. In this example, they are all IP cameras. Note the color red on item F ? Well that means there is something wrong with that camera. No wonder the log also shows red. Good indication for you to tap on logs and investigate -* **G**: This defines how Zoneminder will record events. There are various modes. In brief Modect == record if a motion is detected,Record = always record 24x7, Mocord = always record PLUS detect motion, Monitor = just provide a live view but don't record anytime, Nodect = Don't record till an externa entity via zmtrigger tells Zoneminder to (this is advanced usage). +* **G**: This defines how Zoneminder will record events. There are various modes. In brief Modect == record if a motion is detected,Record = always record 24x7, Mocord = always record PLUS detect motion, Monitor = just provide a live view but don't record anytime, Nodect = Don't record till an external entity via zmtrigger tells Zoneminder to (this is advanced usage). * **H**: If you click on these links you can view a "Montage" of all your configured monitors or cycle through each one +* **I**: One of the most often missed features is the ability of ZoneMinder to maintain "run states". If you click on the "Running" text, ZoneMinder brings up a popup that allows you to define additional "states" (referred to as runstates). A runstate is essentially a snapshot that records the state of each monitor and you can switch between states easily. For example, you might have a run state defined that switches all monitors to "monitor" mode in which they are not recording anything while another state that sets some of the monitors to "modect". Why would you want this? A great example is to disable recording when you are at home and enable when you are away, based on time of day or other triggers. You can switch states by selecting an appropriate state manually, or do it automatically via cron jobs, for example. An example of using cron to automatically switch is provided in the :ref:`FAQ `. More esoteric examples of switching run states based on phone location can be found `here `__. + +Here is an example of multiple run states that I've defined. Each one of these runstates changes the mode of specific monitors depending on time of day and other conditions. Use your imagination to decide which conditions require state changes. + +.. image:: images/runstates.png + Adding Monitors diff --git a/docs/userguide/images/getting-started-understand-console.png b/docs/userguide/images/getting-started-understand-console.png index 805917f23..f332b4977 100644 Binary files a/docs/userguide/images/getting-started-understand-console.png and b/docs/userguide/images/getting-started-understand-console.png differ diff --git a/docs/userguide/images/runstates.png b/docs/userguide/images/runstates.png new file mode 100644 index 000000000..ced74cb55 Binary files /dev/null and b/docs/userguide/images/runstates.png differ diff --git a/docs/userguide/options.rst b/docs/userguide/options.rst index 4a0b357f6..8186d8b6a 100644 --- a/docs/userguide/options.rst +++ b/docs/userguide/options.rst @@ -19,6 +19,4 @@ If you have changed the value of an option you should then ‘save’ it. A numb options/options_upload options/options_x10 options/options_bw - options/options_phonebw - options/options_eyezm options/options_users diff --git a/docs/userguide/options/options_eyezm.rst b/docs/userguide/options/options_eyezm.rst deleted file mode 100644 index 21c780bc0..000000000 --- a/docs/userguide/options/options_eyezm.rst +++ /dev/null @@ -1,26 +0,0 @@ -Options - eyeZM ---------------- - -.. NOTE:: - eyeZM does not seem to be actively maintained by the developers and does not work with later versions of ZoneMinder. - - -.. image:: images/Options_eyezm.png - -EYEZM_DEBUG - Enable or Disable extra debugging from the eyeZm Plugin. Extra debugging information will be displayed in it's own file (EYEZM_LOG_TO_FILE is set), or your Apache error log - -EYEZM_LOG_TO_FILE - When EYEZM_DEBUG is on and EYEZM_LOG_TO_FILE is on, output generated from the eyeZm Plugin will go to it's own file. Otherwise it will go to the apache error log. - -EYEZM_LOG_FILE - Default filename to use when logging eyeZm Output and EYEZM_LOG_TO_FILE is enabled. This file will contain it's own output from the eyeZm Plugin when EYEZM_LOG_TO_FILE and EYEZM_DEBUG are both enabled. - -EYEZM_EVENT_VCODEC - The eyeZm Plugin calls FFMPEG externally to encode the captured images. If your FFMPEG is not built with support for H264, change this to MPEG-4. If using H264, please check http://www.eyezm.com for H264 requirements and that your eyeZm version supports H264 (v1.2+). - -EYEZM_FEED_VCODEC - Determines whether the live stream is generated using native MJPEG streaming with ZoneMinder, or H264 using FFMPEG and HTML-5 streaming. If using H264, please check http://www.eyezm.com for H264 requirements and that your eyeZm version supports H264 (v1.2+). This is just a default parameter, and can be overridden with eyeZm. - -EYEZM_H264_DEFAULT_BR - Default bit-rate to use with FFMPEG for H264 streaming. When using the eyeZm Plugin to stream H264 data, FFMPEG requires a bitrate to control the quality and bandwidth of the video. This should be specified in a format acceptable to FFMPEG. The default value is sufficient for most installations. This is just a default parameter, and can be overridden with eyeZm. - -EYEZM_H264_DEFAULT_EVBR - Default bit-rate to use with FFMPEG for H264 event viewing. When using the eyeZm Plugin to view events in H264, FFMPEG requires a bitrate to control the quality and bandwidth of the video. This should be specified in a format acceptable to FFMPEG. The default value is sufficient for most installations. This is just a default parameter, and can be overridden with eyeZm. - -EYEZM_H264_TIMEOUT - Timeout (sec) to wait for H264 stream to start before terminating. The eyeZm Plugin will attempt to spawn an H264 stream when requested, and require that it complete within the timeout specified. If you have a slow system or find through the logs that the H264 stream is not starting because the timeout is expiring, even though FFMPEG is running, try increasing this value. If you have a fast system, decreasing this value can improve the responsiveness when there are issues starting H264 streams. - -EYEZM_SEG_DURATION - Segment duration used for streaming using HTTP-5 Streaming protocol. The HTTP-5 Live Streaming Protocol segments the input video stream into small chunks of a duration specified by this parameter. Increasing the segment duration will help with choppy connections on the other end, but will increase the latency in starting a stream. diff --git a/docs/userguide/options/options_phonebw.rst b/docs/userguide/options/options_phonebw.rst deleted file mode 100644 index e2389bccf..000000000 --- a/docs/userguide/options/options_phonebw.rst +++ /dev/null @@ -1,20 +0,0 @@ -Options - Phone Bandwidth -------------------------- - -.. image:: images/Options_BW_Phone.png - -WEB_P_CAN_STREAM - Override the automatic detection of browser streaming capability. If you know that your browser can handle image streams of the type 'multipart/x-mixed-replace' but ZoneMinder does not detect this correctly you can set this option to ensure that the stream is delivered with or without the use of the Cambozola plugin. Selecting 'yes' will tell ZoneMinder that your browser can handle the streams natively, 'no' means that it can't and so the plugin will be used while 'auto' lets ZoneMinder decide. - -WEB_P_STREAM_METHOD - ZoneMinder can be configured to use either mpeg encoded video or a series or still jpeg images when sending video streams. This option defines which is used. If you choose mpeg you should ensure that you have the appropriate plugins available on your browser whereas choosing jpeg will work natively on Mozilla and related browsers and with a Java applet on Internet Explorer" - -WEB_P_DEFAULT_SCALE - Normally ZoneMinder will display 'live' or 'event' streams in their native size. However if you have monitors with large dimensions or a slow link you may prefer to reduce this size, alternatively for small monitors you can enlarge it. This options lets you specify what the default scaling factor will be. It is expressed as a percentage so 100 is normal size, 200 is double size etc. - -WEB_P_DEFAULT_RATE - Normally ZoneMinder will display 'event' streams at their native rate, i.e. as close to real-time as possible. However if you have long events it is often convenient to replay them at a faster rate for review. This option lets you specify what the default replay rate will be. It is expressed as a percentage so 100 is normal rate, 200 is double speed etc. - -WEB_P_VIDEO_BITRATE - When encoding real video via the ffmpeg library a bit rate can be specified which roughly corresponds to the available bandwidth used for the stream. This setting effectively corresponds to a 'quality' setting for the video. A low value will result in a blocky image whereas a high value will produce a clearer view. Note that this setting does not control the frame rate of the video however the quality of the video produced is affected both by this setting and the frame rate that the video is produced at. A higher frame rate at a particular bit rate result in individual frames being at a lower quality. - -WEB_P_VIDEO_MAXFPS - When using streamed video the main control is the bitrate which determines how much data can be transmitted. However a lower bitrate at high frame rates results in a lower quality image. This option allows you to limit the maximum frame rate to ensure that video quality is maintained. An additional advantage is that encoding video at high frame rates is a processor intensive task when for the most part a very high frame rate offers little perceptible improvement over one that has a more manageable resource requirement. Note, this option is implemented as a cap beyond which binary reduction takes place. So if you have a device capturing at 15fps and set this option to 10fps then the video is not produced at 10fps, but rather at 7.5fps (15 divided by 2) as the final frame rate must be the original divided by a power of 2. - -WEB_P_SCALE_THUMBS - If unset, this option sends the whole image to the browser which resizes it in the window. If set the image is scaled down on the server before sending a reduced size image to the browser to conserve bandwidth at the cost of cpu on the server. Note that ZM can only perform the resizing if the appropriate PHP graphics functionality is installed. This is usually available in the php-gd package. - -WEB_P_AJAX_TIMEOUT - The newer versions of the live feed and event views use Ajax to request information from the server and populate the views dynamically. This option allows you to specify a timeout if required after which requests are abandoned. A timeout may be necessary if requests would overwise hang such as on a slow connection. This would tend to consume a lot of browser memory and make the interface unresponsive. Ordinarily no requests should timeout so this setting should be set to a value greater than the slowest expected response. This value is in milliseconds but if set to zero then no timeout will be used. \ No newline at end of file diff --git a/m4/ac_check_sendfile.m4 b/m4/ac_check_sendfile.m4 deleted file mode 100644 index 12605d588..000000000 --- a/m4/ac_check_sendfile.m4 +++ /dev/null @@ -1,63 +0,0 @@ -AC_DEFUN([AC_CHECK_SENDFILE],[ -AC_MSG_CHECKING([whether sendfile() is supported and what prototype it has]) - -saved_CFLAGS="$CFLAGS" -CFLAGS="$CFLAGS -Werror-implicit-function-declaration" -ac_sendfile_supported=no -AC_TRY_LINK([#include - #include ], - [sendfile(1, 1, NULL, 0);], - [ - AC_DEFINE(HAVE_SENDFILE4_SUPPORT, 1, - [Define this if Linux/Solaris sendfile() is supported]) - AC_MSG_RESULT([Linux sendfile()]) - ac_sendfile_supported=yes - ], []) - -if test x$ac_sendfile_supported = xno; then - dnl Checking wether we need libsendfile - dnl Presumably on Solaris - AC_CHECK_LIB(sendfile, sendfile, - [ - AC_DEFINE(HAVE_SENDFILE4_SUPPORT, 1, - [Define this if Linux/Solaris sendfile() is supported]) - SENDFILE_LIBS="-lsendfile" - AC_SUBST(SENDFILE_LIBS) - AC_MSG_RESULT([Solaris sendfile()]) - ac_sendfile_supported=yes - ], []) -fi - -if test x$ac_sendfile_supported = xno; then - dnl Checking wether we have FreeBSD-like sendfile() support. - AC_TRY_LINK([#include - #include ], - [sendfile(1, 1, 0, 0, NULL, NULL, 0);], - [ - AC_DEFINE(HAVE_SENDFILE7_SUPPORT, 1, - [Define this if FreeBSD sendfile() is supported]) - AC_MSG_RESULT([FreeBSD sendfile()]) - ac_sendfile_supported=yes - ], []) -fi - -if test x$ac_sendfile_supported = xno; then - dnl Checking wether we have MacOS-like sendfile() support. - AC_TRY_LINK([#include - #include - #include ], - [sendfile(1, 1, 0, NULL, NULL, 0);], - [ - AC_DEFINE(HAVE_SENDFILE6_SUPPORT, 1, - [Define this if MacOS sendfile() is supported]) - AC_MSG_RESULT([MacOS sendfile()]) - ac_sendfile_supported=yes - ], []) -fi - -CFLAGS="$saved_CFLAGS" - -if test x$ac_sendfile_supported = xno; then - AC_MSG_RESULT([no sendfile() support, using read/send]) -fi -]) diff --git a/misc/Makefile.am b/misc/Makefile.am deleted file mode 100644 index 5578e4373..000000000 --- a/misc/Makefile.am +++ /dev/null @@ -1,17 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -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 - -polkit_actiondir = @POLKIT_PREFIX@/share/polkit-1/actions -dist_polkit_action_DATA = com.zoneminder.systemctl.policy - -polkit_rulesdir = @POLKIT_PREFIX@/share/polkit-1/rules.d -dist_polkit_rules_DATA = com.zoneminder.systemctl.rules - diff --git a/onvif/Makefile.am b/onvif/Makefile.am deleted file mode 100644 index 8cc9d700a..000000000 --- a/onvif/Makefile.am +++ /dev/null @@ -1,26 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -# Ack! Nasty hack to get modules Makefile regenerated if wiped with make clean -all-local: proxy/Makefile modules/Makefile - -proxy/Makefile: proxy/Makefile.PL - ( cd proxy; perl Makefile.PL ) - -modules/Makefile: modules/Makefile.PL - ( cd modules; perl Makefile.PL ) - -SUBDIRS = \ - . \ - proxy \ - modules \ - scripts - - -EXTRA_DIST = \ - proxy/Makefile.PL \ - proxy/lib \ - modules/Makefile.PL \ - modules/lib \ - wsdl \ - doc \ - patches diff --git a/onvif/modules/lib/ONVIF/Serializer/Base.pm b/onvif/modules/lib/ONVIF/Serializer/Base.pm index 7bab331cf..adbb173c6 100644 --- a/onvif/modules/lib/ONVIF/Serializer/Base.pm +++ b/onvif/modules/lib/ONVIF/Serializer/Base.pm @@ -97,8 +97,11 @@ sub serialize { my $soap_prefix = $opt->{ namespace }->{ $SOAP_NS }; - # envelope start with namespaces - my $xml = "<$soap_prefix\:Envelope "; + # XML starts with header + my $xml = "\n"; + + # envelope starts with namespaces + $xml .= "<$soap_prefix\:Envelope "; while (my ($uri, $prefix) = each %{ $opt->{ namespace } }) { diff --git a/onvif/scripts/Makefile.am b/onvif/scripts/Makefile.am deleted file mode 100644 index 80db9755c..000000000 --- a/onvif/scripts/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -bin_SCRIPTS = \ - zmonvif-probe.pl - diff --git a/onvif/scripts/zmonvif-probe.pl b/onvif/scripts/zmonvif-probe.pl index 6f318ef5e..93c12959f 100755 --- a/onvif/scripts/zmonvif-probe.pl +++ b/onvif/scripts/zmonvif-probe.pl @@ -31,6 +31,7 @@ require ONVIF::Client; require WSDiscovery10::Interfaces::WSDiscovery::WSDiscoveryPort; require WSDiscovery10::Elements::Types; require WSDiscovery10::Elements::Scopes; +require WSDiscovery10::Elements::To; require WSDiscovery::TransportUDP; @@ -178,9 +179,10 @@ sub discover my $result = $svc_discover->ProbeOp( { # WSDiscovery::Types::ProbeType - Types => { 'dn:NetworkVideoTransmitter', 'tds:Device' }, # QNameListType + Types => 'http://www.onvif.org/ver10/network/wsdl:NetworkVideoTransmitter http://www.onvif.org/ver10/device/wsdl:Device', # QNameListType Scopes => { value => '' }, - },, + }, + WSDiscovery10::Elements::To->new({ value => 'urn:schemas-xmlsoap-org:ws:2005:04:discovery' }) ); # print $result . "\n"; @@ -197,9 +199,10 @@ sub discover $result = $svc_discover->ProbeOp( { # WSDiscovery::Types::ProbeType - Types => { 'dn:NetworkVideoTransmitter', 'tds:Device' }, # QNameListType + Types => 'http://www.onvif.org/ver10/network/wsdl:NetworkVideoTransmitter http://www.onvif.org/ver10/device/wsdl:Device', # QNameListType Scopes => { value => '' }, - },, + }, + WSDiscovery10::Elements::To->new({ value => 'urn:schemas-xmlsoap-org:ws:2005:04:discovery' }) ); # print $result . "\n"; diff --git a/scripts/Makefile.am b/scripts/Makefile.am deleted file mode 100644 index 1d9de2893..000000000 --- a/scripts/Makefile.am +++ /dev/null @@ -1,77 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -# Ack! Nasty hack to get modules Makefile regenerated if wiped with make clean -all-local: ZoneMinder/Makefile - -ZoneMinder/Makefile: ZoneMinder/Makefile.PL - ( cd ZoneMinder; perl Makefile.PL ) - -bin_SCRIPTS = \ - zmdc.pl \ - zmaudit.pl \ - zmfilter.pl \ - zmtelemetry.pl \ - zmtrigger.pl \ - zmx10.pl \ - zmwatch.pl \ - zmpkg.pl \ - zmupdate.pl \ - zmvideo.pl \ - zmcontrol.pl \ - zmtrack.pl \ - zmcamtool.pl \ - zmsystemctl.pl - -SUBDIRS = \ - . \ - ZoneMinder - -EXTRA_DIST = \ - zmdc.pl.in \ - zmaudit.pl.in \ - zmfilter.pl.in \ - zmtelemetry.pl.in \ - zmtrigger.pl.in \ - zmx10.pl.in \ - zmwatch.pl.in \ - zmpkg.pl.in \ - zmupdate.pl.in \ - zmvideo.pl.in \ - zmcontrol.pl.in \ - zmtrack.pl.in \ - zmcamtool.pl.in \ - zmsystemctl.pl.in \ - ZoneMinder/Makefile.PL \ - ZoneMinder/README \ - ZoneMinder/Changes \ - ZoneMinder/META.yml \ - ZoneMinder/MANIFEST \ - ZoneMinder/t/ZoneMinder.t \ - ZoneMinder/lib/ZoneMinder.pm \ - ZoneMinder/lib/ZoneMinder/Base.pm.in \ - ZoneMinder/lib/ZoneMinder/Config.pm.in \ - ZoneMinder/lib/ZoneMinder/Logger.pm \ - ZoneMinder/lib/ZoneMinder/General.pm \ - ZoneMinder/lib/ZoneMinder/Database.pm \ - ZoneMinder/lib/ZoneMinder/Memory.pm.in \ - ZoneMinder/lib/ZoneMinder/Memory/Shared.pm \ - ZoneMinder/lib/ZoneMinder/Memory/Mapped.pm \ - ZoneMinder/lib/ZoneMinder/ConfigAdmin.pm \ - ZoneMinder/lib/ZoneMinder/ConfigData.pm.in \ - ZoneMinder/lib/ZoneMinder/Control.pm \ - ZoneMinder/lib/ZoneMinder/Control \ - ZoneMinder/lib/ZoneMinder/Trigger/Channel.pm \ - ZoneMinder/lib/ZoneMinder/Trigger/Channel/Handle.pm \ - ZoneMinder/lib/ZoneMinder/Trigger/Channel/Spawning.pm \ - ZoneMinder/lib/ZoneMinder/Trigger/Channel/Inet.pm \ - ZoneMinder/lib/ZoneMinder/Trigger/Channel/Unix.pm \ - ZoneMinder/lib/ZoneMinder/Trigger/Channel/File.pm \ - ZoneMinder/lib/ZoneMinder/Trigger/Channel/Serial.pm \ - ZoneMinder/lib/ZoneMinder/Trigger/Connection.pm \ - ZoneMinder/lib/ZoneMinder/Trigger/Connection/Example.pm \ - zm.in \ - zmdbbackup.in \ - zmdbrestore.in \ - zmeventdump.in \ - zmlogrotate.conf.in - diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in index 0c5a82a30..3a226cdc8 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in @@ -66,12 +66,6 @@ use Carp; BEGIN { my $config_file = ZM_CONFIG; - ( my $local_config_file = $config_file ) =~ s|^.*/|./|; - if ( -s $local_config_file and -r $local_config_file ) - { - print( STDERR "Warning, overriding installed $local_config_file file with local copy\n" ); - $config_file = $local_config_file; - } open( my $CONFIG, "<", $config_file ) or croak( "Can't open config file '$config_file': $!" ); foreach my $str ( <$CONFIG> ) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in index 8c4ea5d95..fc4143d8a 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in +++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in @@ -3759,161 +3759,6 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s type => $types{integer}, category => "lowband", }, - { - name => "ZM_WEB_P_CAN_STREAM", - default => "auto", - description => "Override the automatic detection of browser streaming capability", - help => qqq(" - If you know that your browser can handle image streams of the - type 'multipart/x-mixed-replace' but ZoneMinder does not detect - this correctly you can set this option to ensure that the - stream is delivered with or without the use of the Cambozola - plugin. Selecting 'yes' will tell ZoneMinder that your browser - can handle the streams natively, 'no' means that it can't and - so the plugin will be used while 'auto' lets ZoneMinder decide. - "), - type => $types{tristate}, - category => "phoneband", - }, - { - name => "ZM_WEB_P_STREAM_METHOD", - default => "jpeg", - description => "Which method should be used to send video streams to your browser.", - help => qqq(" - ZoneMinder can be configured to use either mpeg encoded video - or a series or still jpeg images when sending video streams. - This option defines which is used. If you choose mpeg you - should ensure that you have the appropriate plugins available - on your browser whereas choosing jpeg will work natively on - Mozilla and related browsers and with a Java applet on Internet - Explorer - "), - type => { - db_type =>"string", - hint =>"mpeg|jpeg", - pattern =>qr|^([mj])|i, - format =>q( $1 =~ /^m/ ? "mpeg" : "jpeg" ) - }, - category => "phoneband", - }, - { - name => "ZM_WEB_P_DEFAULT_SCALE", - default => "100", - description => "What the default scaling factor applied to 'live' or 'event' views is (%)", - help => qqq(" - Normally ZoneMinder will display 'live' or 'event' streams in - their native size. However if you have monitors with large - dimensions or a slow link you may prefer to reduce this size, - alternatively for small monitors you can enlarge it. This - options lets you specify what the default scaling factor will - be. It is expressed as a percentage so 100 is normal size, 200 - is double size etc. - "), - type => { - db_type =>"integer", - hint =>"25|33|50|75|100|150|200|300|400", - pattern =>qr|^(\d+)$|, format=>q( $1 ) - }, - category => "phoneband", - }, - { - name => "ZM_WEB_P_DEFAULT_RATE", - default => "100", - description => "What the default replay rate factor applied to 'event' views is (%)", - help => qqq(" - Normally ZoneMinder will display 'event' streams at their - native rate, i.e. as close to real-time as possible. However if - you have long events it is often convenient to replay them at a - faster rate for review. This option lets you specify what the - default replay rate will be. It is expressed as a percentage so - 100 is normal rate, 200 is double speed etc. - "), - type => { - db_type =>"integer", - hint =>"25|50|100|150|200|400|1000|2500|5000|10000", - pattern =>qr|^(\d+)$|, - format =>q( $1 ) - }, - category => "phoneband", - }, - { - name => "ZM_WEB_P_VIDEO_BITRATE", - default => "8000", - description => "What the bitrate of the video encoded stream should be set to", - help => qqq(" - When encoding real video via the ffmpeg library a bit rate can - be specified which roughly corresponds to the available - bandwidth used for the stream. This setting effectively - corresponds to a 'quality' setting for the video. A low value - will result in a blocky image whereas a high value will produce - a clearer view. Note that this setting does not control the - frame rate of the video however the quality of the video - produced is affected both by this setting and the frame rate - that the video is produced at. A higher frame rate at a - particular bit rate result in individual frames being at a - lower quality. - "), - type => $types{integer}, - category => "phoneband", - }, - { - name => "ZM_WEB_P_VIDEO_MAXFPS", - default => "5", - description => "What the maximum frame rate for streamed video should be", - help => qqq(" - When using streamed video the main control is the bitrate which - determines how much data can be transmitted. However a lower - bitrate at high frame rates results in a lower quality image. - This option allows you to limit the maximum frame rate to - ensure that video quality is maintained. An additional - advantage is that encoding video at high frame rates is a - processor intensive task when for the most part a very high - frame rate offers little perceptible improvement over one that - has a more manageable resource requirement. Note, this option - is implemented as a cap beyond which binary reduction takes - place. So if you have a device capturing at 15fps and set this - option to 10fps then the video is not produced at 10fps, but - rather at 7.5fps (15 divided by 2) as the final frame rate must - be the original divided by a power of 2. - "), - type => $types{integer}, - category => "phoneband", - }, - { - name => "ZM_WEB_P_SCALE_THUMBS", - default => "yes", - description => "Scale thumbnails in events, bandwidth versus cpu in rescaling", - help => qqq(" - If unset, this option sends the whole image to the browser - which resizes it in the window. If set the image is scaled down - on the server before sending a reduced size image to the - browser to conserve bandwidth at the cost of cpu on the server. - Note that ZM can only perform the resizing if the appropriate - PHP graphics functionality is installed. This is usually - available in the php-gd package. - "), - type => $types{boolean}, - category => "phoneband", - }, - { - name => "ZM_WEB_P_AJAX_TIMEOUT", - default => "10000", - description => "How long to wait for Ajax request responses (ms)", - help => qqq(" - The newer versions of the live feed and event views use Ajax to - request information from the server and populate the views - dynamically. This option allows you to specify a timeout if - required after which requests are abandoned. A timeout may be - necessary if requests would overwise hang such as on a slow - connection. This would tend to consume a lot of browser memory - and make the interface unresponsive. Ordinarily no requests - should timeout so this setting should be set to a value greater - than the slowest expected response. This value is in - milliseconds but if set to zero then no timeout will be used. - "), - type => $types{integer}, - category => "phoneband", - }, { name => "ZM_DYN_LAST_VERSION", default => "", @@ -3981,139 +3826,39 @@ body = "ZM alarm detected - %EL% secs, %EF%/%EFA% frames, t%EST%/m%ESM%/a%ESA% s category => "dynamic", }, { - name => "ZM_EYEZM_DEBUG", + name => "ZM_SSMTP_MAIL", default => "no", - description => "Switch additional debugging on for eyeZm Plugin", + description => qqq(" + Use a SSMTP mail server if available. + NEW_MAIL_MODULES must be enabled + "), + requires => [ + { name => "ZM_OPT_EMAIL", value => "yes" }, + { name => "ZM_OPT_MESSAGE", value => "yes" }, + { name => "ZM_NEW_MAIL_MODULES", value => "yes" } + ], help => qqq(" - Enable or Disable extra debugging from the eyeZm Plugin. Extra - debugging information will be displayed in it's own file - (EYEZM_LOG_TO_FILE is set), or your Apache error log + SSMTP is a lightweight and efficient method to send email. + The SSMTP application is not installed by default. + NEW_MAIL_MODULES must also be enabled. + Please visit: http://www.zoneminder.com/wiki/index.php/How_to_get_ssmtp_working_with_Zoneminder + for setup and configuration help. "), type => $types{boolean}, - category => "eyeZm", + category => "mail", }, { - name => "ZM_EYEZM_LOG_TO_FILE", - default => "yes", - description => "When eyeZm Debugging is enabled, enabling this logs output to it's own file", + name => "ZM_SSMTP_PATH", + default => "", + description => "SSMTP executable path", + requires => [{ name => "ZM_SSMTP_MAIL", value => "yes" }], help => qqq(" - When EYEZM_DEBUG is on and EYEZM_LOG_TO_FILE is on, output - generated from the eyeZm Plugin will go to it's own file. - Otherwise it will go to the apache error log. - "), - type => $types{boolean}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_LOG_FILE", - default => "@ZM_LOGDIR@/zm_xml.log", - description => "Default filename to use when logging eyeZm Output and EYEZM_LOG_TO_FILE is enabled", - help => qqq(" - This file will contain it's own output from the eyeZm Plugin - when EYEZM_LOG_TO_FILE and EYEZM_DEBUG are both enabled + Recommend setting the path to the SSMTP application. + If path is not defined. Zoneminder will try to determine + the path via shell command. Example path: /usr/sbin/ssmtp. "), type => $types{string}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_EVENT_VCODEC", - default => "mpeg4", - description => "Default video-codec to use for encoding events", - help => qqq(" - The eyeZm Plugin calls FFMPEG externally to encode the captured - images. If your FFMPEG is not built with support for H264, - change this to MPEG-4. If using H264, please check - http://www.eyezm.com for H264 requirements and that your eyeZm - version supports H264 (v1.2+). - "), - type => { - db_type =>"string", - hint =>"mpeg4|h264", - pattern =>qr|^([mh])|i, - format =>q( $1 =~ /^m/ ? "mpeg4" : "h264" ) - }, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_FEED_VCODEC", - default => "mjpeg", - description => "Default video-codec to use for streaming the live feed", - help => qqq(" - Determines whether the live stream is generated using native - MJPEG streaming with ZoneMinder, or H264 using FFMPEG and - HTML-5 streaming. If using H264, please check - http://www.eyezm.com for H264 requirements and that your eyeZm - version supports H264 (v1.2+). This is just a default - parameter, and can be overridden with eyeZm. - "), - type => { - db_type =>"string", - hint =>"mjpeg|h264", - pattern =>qr|^([mh])|i, - format =>q( $1 =~ /^m/ ? "mjpeg" : "h264" ) - }, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_H264_DEFAULT_BR", - default => "96k", - description => "Default bit-rate to use with FFMPEG for H264 streaming", - help => qqq(" - When using the eyeZm Plugin to stream H264 data, FFMPEG - requires a bitrate to control the quality and bandwidth of the - video. This should be specified in a format acceptable to - FFMPEG. The default value is sufficient for most installations. - This is just a default parameter, and can be overridden with - eyeZm. - "), - type => $types{string}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_H264_DEFAULT_EVBR", - default => "128k", - description => "Default bit-rate to use with FFMPEG for H264 event viewing", - help => qqq(" - When using the eyeZm Plugin to view events in H264, FFMPEG - requires a bitrate to control the quality and bandwidth of the - video. This should be specified in a format acceptable to - FFMPEG. The default value is sufficient for most installations. - This is just a default parameter, and can be overridden with - eyeZm. - "), - type => $types{string}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_H264_TIMEOUT", - default => "20", - description => "Timeout (sec) to wait for H264 stream to start before terminating", - help => qqq(" - The eyeZm Plugin will attempt to spawn an H264 stream when - requested, and require that it complete within the timeout - specified. If you have a slow system or find through the logs - that the H264 stream is not starting because the timeout is - expiring, even though FFMPEG is running, try increasing this - value. If you have a fast system, decreasing this value can - improve the responsiveness when there are issues starting H264 - streams - "), - type => $types{string}, - category => "eyeZm", - }, - { - name => "ZM_EYEZM_SEG_DURATION", - default => "3", - description => "Segment duration used for streaming using HTTP-5 Streaming protocol", - help => qqq(" - The HTTP-5 Live Streaming Protocol segments the input video - stream into small chunks of a duration specified by this - parameter. Increasing the segment duration will help with - choppy connections on the other end, but will increase the - latency in starting a stream. - "), - type => $types{string}, - category => "eyeZm", + category => "mail", }, ); diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm new file mode 100644 index 000000000..67c117460 --- /dev/null +++ b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm @@ -0,0 +1,330 @@ +# ========================================================================== +# +# ZoneMinder Event Module, $Date$, $Revision$ +# Copyright (C) 2001-2008 Philip Coombes +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# ========================================================================== +# +# This module contains the common definitions and functions used by the rest +# of the ZoneMinder scripts +# +package ZoneMinder::Event; + +use 5.006; +use strict; +use warnings; + +require Exporter; +require ZoneMinder::Base; +require Date::Manip; + +our @ISA = qw(Exporter ZoneMinder::Base); + +# Items to export into callers namespace by default. Note: do not export +# names by default without a very good reason. Use EXPORT_OK instead. +# Do not simply export all your public functions/methods/constants. + +# This allows declaration use ZoneMinder ':all'; +# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK +# will save memory. +our %EXPORT_TAGS = ( + 'functions' => [ qw( + ) ] +); +push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS; + +our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); + +our @EXPORT = qw(); + +our $VERSION = $ZoneMinder::Base::VERSION; + +# ========================================================================== +# +# General Utility Functions +# +# ========================================================================== + +use ZoneMinder::Config qw(:all); +use ZoneMinder::Logger qw(:all); +use ZoneMinder::Database qw(:all); + +use POSIX; + +sub new { + my ( $parent, $id, $data ) = @_; + + my $self = {}; + bless $self, $parent; + $$self{dbh} = $ZoneMinder::Database::dbh; +#zmDbConnect(); + if ( ( $$self{Id} = $id ) or $data ) { +#$log->debug("loading $parent $id") if $debug or DEBUG_ALL; + $self->load( $data ); + } + return $self; +} # end sub new + +sub load { + my ( $self, $data ) = @_; + my $type = ref $self; + if ( ! $data ) { +#$log->debug("Object::load Loading from db $type"); + $data = $$self{dbh}->selectrow_hashref( 'SELECT * FROM Events WHERE Id=?', {}, $$self{Id} ); + if ( ! $data ) { + Error( "Failure to load Event record for $$self{Id}: Reason: " . $$self{dbh}->errstr ); + } else { + Debug( 3, "Loaded Event $$self{Id}" ); + } # end if + } # end if ! $data + if ( $data and %$data ) { + @$self{keys %$data} = values %$data; + } # end if +} # end sub load + +sub Name { + if ( @_ > 1 ) { + $_[0]{Name} = $_[1]; + } + return $_[0]{Name}; +} # end sub Path + +sub find { + shift if $_[0] eq 'ZoneMinder::Event'; + my %sql_filters = @_; + + my $sql = 'SELECT * FROM Events'; + my @sql_filters; + my @sql_values; + + if ( exists $sql_filters{Name} ) { + push @sql_filters , ' Name = ? '; + push @sql_values, $sql_filters{Name}; + } + + $sql .= ' WHERE ' . join(' AND ', @sql_filters ) if @sql_filters; + $sql .= ' LIMIT ' . $sql_filters{limit} if $sql_filters{limit}; + + my $sth = $ZoneMinder::Database::dbh->prepare_cached( $sql ) + or Fatal( "Can't prepare '$sql': ".$ZoneMinder::Database::dbh->errstr() ); + my $res = $sth->execute( @sql_values ) + or Fatal( "Can't execute '$sql': ".$sth->errstr() ); + + my @results; + + while( my $db_filter = $sth->fetchrow_hashref() ) { + my $filter = new ZoneMinder::Event( $$db_filter{Id}, $db_filter ); + push @results, $filter; + } # end while + return @results; +} + +sub find_one { + my @results = find(@_); + return $results[0] if @results; +} + +sub getEventPath +{ + my $event = shift; + + my $event_path = ""; + if ( $Config{ZM_USE_DEEP_STORAGE} ) + { + $event_path = $Config{ZM_DIR_EVENTS} + .'/'.$event->{MonitorId} + .'/'.strftime( "%y/%m/%d/%H/%M/%S", + localtime($event->{Time}) + ) + ; + } + else + { + $event_path = $Config{ZM_DIR_EVENTS} + .'/'.$event->{MonitorId} + .'/'.$event->{Id} + ; + } + + if ( index($Config{ZM_DIR_EVENTS},'/') != 0 ){ + $event_path = $Config{ZM_PATH_WEB} + .'/'.$event_path + ; + } + return( $event_path ); +} + +sub GenerateVideo { + my ( $self, $rate, $fps, $scale, $size, $overwrite, $format ) = @_; + + my $event_path = getEventPath( $self ); + chdir( $event_path ); + ( my $video_name = $self->{Name} ) =~ s/\s/_/g; + + my @file_parts; + if ( $rate ) + { + my $file_rate = $rate; + $file_rate =~ s/\./_/; + $file_rate =~ s/_00//; + $file_rate =~ s/(_\d+)0+$/$1/; + $file_rate = 'r'.$file_rate; + push( @file_parts, $file_rate ); + } + elsif ( $fps ) + { + my $file_fps = $fps; + $file_fps =~ s/\./_/; + $file_fps =~ s/_00//; + $file_fps =~ s/(_\d+)0+$/$1/; + $file_fps = 'R'.$file_fps; + push( @file_parts, $file_fps ); + } + + if ( $scale ) + { + my $file_scale = $scale; + $file_scale =~ s/\./_/; + $file_scale =~ s/_00//; + $file_scale =~ s/(_\d+)0+$/$1/; + $file_scale = 's'.$file_scale; + push( @file_parts, $file_scale ); + } + elsif ( $size ) + { + my $file_size = 'S'.$size; + push( @file_parts, $file_size ); + } + my $video_file = "$video_name-".$file_parts[0]."-".$file_parts[1].".$format"; + if ( $overwrite || !-s $video_file ) + { + Info( "Creating video file $video_file for event $self->{Id}\n" ); + + my $frame_rate = sprintf( "%.2f", $self->{Frames}/$self->{FullLength} ); + if ( $rate ) + { + if ( $rate != 1.0 ) + { + $frame_rate *= $rate; + } + } + elsif ( $fps ) + { + $frame_rate = $fps; + } + + my $width = $self->{MonitorWidth}; + my $height = $self->{MonitorHeight}; + my $video_size = " ${width}x${height}"; + + if ( $scale ) + { + if ( $scale != 1.0 ) + { + $width = int($width*$scale); + $height = int($height*$scale); + $video_size = " ${width}x${height}"; + } + } + elsif ( $size ) + { + $video_size = $size; + } + my $command = $Config{ZM_PATH_FFMPEG} + ." -y -r $frame_rate " + .$Config{ZM_FFMPEG_INPUT_OPTIONS} + ." -i %0" + .$Config{ZM_EVENT_IMAGE_DIGITS} + ."d-capture.jpg -s $video_size " +#. " -f concat -i /tmp/event_files.txt" + ." -s $video_size " + .$Config{ZM_FFMPEG_OUTPUT_OPTIONS} + ." '$video_file' > ffmpeg.log 2>&1" + ; + Debug( $command."\n" ); + my $output = qx($command); + + my $status = $? >> 8; + if ( $status ) + { + Error( "Unable to generate video, check " + .$event_path."/ffmpeg.log for details" + ); + return; + } + + Info( "Finished $video_file\n" ); + return $event_path.'/'.$video_file; + } else { + Info( "Video file $video_file already exists for event $self->{Id}\n" ); + return $event_path.'/'.$video_file; + } + return; +} # end sub GenerateVideo + +1; +__END__ +# Below is stub documentation for your module. You'd better edit it! + +=head1 NAME + +ZoneMinder::Database - Perl extension for blah blah blah + +=head1 SYNOPSIS + + use ZoneMinder::Event; + blah blah blah + +=head1 DESCRIPTION + +Stub documentation for ZoneMinder, created by h2xs. It looks like the +author of the extension was negligent enough to leave the stub +unedited. + +Blah blah blah. + +=head2 EXPORT + +None by default. + + + +=head1 SEE ALSO + +Mention other useful documentation such as the documentation of +related modules or operating system documentation (such as man pages +in UNIX), or any relevant external documentation such as RFCs or +standards. + +If you have a mailing list set up for your module, mention it here. + +If you have a web site set up for your module, mention it here. + +=head1 AUTHOR + +Philip Coombes, Ephilip.coombes@zoneminder.comE + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2001-2008 Philip Coombes + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.8.3 or, +at your option, any later version of Perl 5 you may have available. + + +=cut diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm b/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm new file mode 100644 index 000000000..b7806ec4a --- /dev/null +++ b/scripts/ZoneMinder/lib/ZoneMinder/Filter.pm @@ -0,0 +1,526 @@ +# ========================================================================== +# +# ZoneMinder Filter Module, $Date$, $Revision$ +# Copyright (C) 2001-2008 Philip Coombes +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# ========================================================================== +# +# This module contains the common definitions and functions used by the rest +# of the ZoneMinder scripts +# +package ZoneMinder::Filter; + +use 5.006; +use strict; +use warnings; + +require Exporter; +require ZoneMinder::Base; +require Date::Manip; + +our @ISA = qw(Exporter ZoneMinder::Base); + +# Items to export into callers namespace by default. Note: do not export +# names by default without a very good reason. Use EXPORT_OK instead. +# Do not simply export all your public functions/methods/constants. + +# This allows declaration use ZoneMinder ':all'; +# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK +# will save memory. +our %EXPORT_TAGS = ( + 'functions' => [ qw( + ) ] +); +push( @{$EXPORT_TAGS{all}}, @{$EXPORT_TAGS{$_}} ) foreach keys %EXPORT_TAGS; + +our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); + +our @EXPORT = qw(); + +our $VERSION = $ZoneMinder::Base::VERSION; + +# ========================================================================== +# +# General Utility Functions +# +# ========================================================================== + +use ZoneMinder::Config qw(:all); +use ZoneMinder::Logger qw(:all); +use ZoneMinder::Database qw(:all); + +use POSIX; + +sub new { + my ( $parent, $id, $data ) = @_; + + my $self = {}; + bless $self, $parent; + $$self{dbh} = $ZoneMinder::Database::dbh; +#zmDbConnect(); + if ( ( $$self{Id} = $id ) or $data ) { +#$log->debug("loading $parent $id") if $debug or DEBUG_ALL; + $self->load( $data ); + } + return $self; +} # end sub new + +sub load { + my ( $self, $data ) = @_; + my $type = ref $self; + if ( ! $data ) { +#$log->debug("Object::load Loading from db $type"); + $data = $$self{dbh}->selectrow_hashref( 'SELECT * FROM Filter WHERE Id=?', {}, $$self{Id} ); + if ( ! $data ) { + Error( "Failure to load Filter record for $$self{Id}: Reason: " . $$self{dbh}->errstr ); + } else { + Debug( 3, "Loaded Filter $$self{Id}" ); + } # end if + } # end if ! $data + if ( $data and %$data ) { + @$self{keys %$data} = values %$data; + } # end if +} # end sub load + +sub Name { + if ( @_ > 1 ) { + $_[0]{Name} = $_[1]; + } + return $_[0]{Name}; +} # end sub Path + +sub find { + shift if $_[0] eq 'ZoneMinder::Filter'; + my %sql_filters = @_; + + my $sql = 'SELECT * FROM Filters'; + my @sql_filters; + my @sql_values; + + if ( exists $sql_filters{Name} ) { + push @sql_filters , ' Name = ? '; + push @sql_values, $sql_filters{Name}; + } + + $sql .= ' WHERE ' . join(' AND ', @sql_filters ) if @sql_filters; + $sql .= ' LIMIT ' . $sql_filters{limit} if $sql_filters{limit}; + + my $sth = $ZoneMinder::Database::dbh->prepare_cached( $sql ) + or Fatal( "Can't prepare '$sql': ".$ZoneMinder::Database::dbh->errstr() ); + my $res = $sth->execute( @sql_values ) + or Fatal( "Can't execute '$sql': ".$sth->errstr() ); + + my @results; + + while( my $db_filter = $sth->fetchrow_hashref() ) { + my $filter = new ZoneMinder::Filter( $$db_filter{Id}, $db_filter ); + push @results, $filter; + } # end while + return @results; +} + +sub find_one { + my @results = find(@_); + return $results[0] if @results; +} + +sub Execute { + my $self = $_[0]; + + my $sql = $self->Sql(); + + if ( $self->{HasDiskPercent} ) + { + my $disk_percent = getDiskPercent(); + $sql =~ s/zmDiskPercent/$disk_percent/g; + } + if ( $self->{HasDiskBlocks} ) + { + my $disk_blocks = getDiskBlocks(); + $sql =~ s/zmDiskBlocks/$disk_blocks/g; + } + if ( $self->{HasSystemLoad} ) + { + my $load = getLoad(); + $sql =~ s/zmSystemLoad/$load/g; + } + + my $sth = $$self{dbh}->prepare_cached( $sql ) + or Fatal( "Can't prepare '$sql': ".$$self{dbh}->errstr() ); + my $res = $sth->execute(); + if ( !$res ) + { + Error( "Can't execute filter '$sql', ignoring: ".$sth->errstr() ); + return; + } + my @results; + + while( my $event = $sth->fetchrow_hashref() ) { + push @results, $event; + } + $sth->finish(); + return @results; +} + +sub Sql { + my $self = $_[0]; + if ( ! $$self{Sql} ) { + my $filter_expr = ZoneMinder::General::jsonDecode( $self->{Query} ); + my $sql = "SELECT E.Id, + E.MonitorId, + M.Name as MonitorName, + M.DefaultRate, + M.DefaultScale, + E.Name, + E.Cause, + E.Notes, + E.StartTime, + unix_timestamp(E.StartTime) as Time, + E.Length, + E.Frames, + E.AlarmFrames, + E.TotScore, + E.AvgScore, + E.MaxScore, + E.Archived, + E.Videoed, + E.Uploaded, + E.Emailed, + E.Messaged, + E.Executed + FROM Events as E + INNER JOIN Monitors as M on M.Id = E.MonitorId + "; + $self->{Sql} = ''; + + if ( $filter_expr->{terms} ) { + for ( my $i = 0; $i < @{$filter_expr->{terms}}; $i++ ) { + if ( exists($filter_expr->{terms}[$i]->{cnj}) ) { + $self->{Sql} .= " ".$filter_expr->{terms}[$i]->{cnj}." "; + } + if ( exists($filter_expr->{terms}[$i]->{obr}) ) { + $self->{Sql} .= " ".str_repeat( "(", $filter_expr->{terms}[$i]->{obr} )." "; + } + my $value = $filter_expr->{terms}[$i]->{val}; + my @value_list; + if ( $filter_expr->{terms}[$i]->{attr} ) { + if ( $filter_expr->{terms}[$i]->{attr} =~ /^Monitor/ ) { + my ( $temp_attr_name ) = $filter_expr->{terms}[$i]->{attr} =~ /^Monitor(.+)$/; + $self->{Sql} .= "M.".$temp_attr_name; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'DateTime' ) { + $self->{Sql} .= "E.StartTime"; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Date' ) { + $self->{Sql} .= "to_days( E.StartTime )"; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Time' ) { + $self->{Sql} .= "extract( hour_second from E.StartTime )"; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Weekday' ) { + $self->{Sql} .= "weekday( E.StartTime )"; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'DiskPercent' ) { + $self->{Sql} .= "zmDiskPercent"; + $self->{HasDiskPercent} = !undef; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'DiskBlocks' ) { + $self->{Sql} .= "zmDiskBlocks"; + $self->{HasDiskBlocks} = !undef; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'SystemLoad' ) { + $self->{Sql} .= "zmSystemLoad"; + $self->{HasSystemLoad} = !undef; + } else { + $self->{Sql} .= "E.".$filter_expr->{terms}[$i]->{attr}; + } + + ( my $stripped_value = $value ) =~ s/^["\']+?(.+)["\']+?$/$1/; + foreach my $temp_value ( split( /["'\s]*?,["'\s]*?/, $stripped_value ) ) { + if ( $filter_expr->{terms}[$i]->{attr} =~ /^Monitor/ ) { + $value = "'$temp_value'"; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Name' + || $filter_expr->{terms}[$i]->{attr} eq 'Cause' + || $filter_expr->{terms}[$i]->{attr} eq 'Notes' + ) { + $value = "'$temp_value'"; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'DateTime' ) { + $value = DateTimeToSQL( $temp_value ); + if ( !$value ) { + Error( "Error parsing date/time '$temp_value', " + ."skipping filter '$self->{Name}'\n" ); + return; + } + $value = "'$value'"; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Date' ) { + $value = DateTimeToSQL( $temp_value ); + if ( !$value ) { + Error( "Error parsing date/time '$temp_value', " + ."skipping filter '$self->{Name}'\n" ); + return; + } + $value = "to_days( '$value' )"; + } elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Time' ) { + $value = DateTimeToSQL( $temp_value ); + if ( !$value ) { + Error( "Error parsing date/time '$temp_value', " + ."skipping filter '$self->{Name}'\n" ); + return; + } + $value = "extract( hour_second from '$value' )"; + } else { + $value = $temp_value; + } + push( @value_list, $value ); + } # end foreach temp_value + } # end if has an attr + if ( $filter_expr->{terms}[$i]->{op} ) { + if ( $filter_expr->{terms}[$i]->{op} eq '=~' ) { + $self->{Sql} .= " regexp $value"; + } elsif ( $filter_expr->{terms}[$i]->{op} eq '!~' ) { + $self->{Sql} .= " not regexp $value"; + } elsif ( $filter_expr->{terms}[$i]->{op} eq '=[]' ) { + $self->{Sql} .= " in (".join( ",", @value_list ).")"; + } elsif ( $filter_expr->{terms}[$i]->{op} eq '!~' ) { + $self->{Sql} .= " not in (".join( ",", @value_list ).")"; + } else { + $self->{Sql} .= " ".$filter_expr->{terms}[$i]->{op}." $value"; + } + } # end if has an operator + if ( exists($filter_expr->{terms}[$i]->{cbr}) ) { + $self->{Sql} .= " ".str_repeat( ")", $filter_expr->{terms}[$i]->{cbr} )." "; + } + } # end foreach term + } # end if terms + + if ( $self->{Sql} ) + { + if ( $self->{AutoMessage} ) + { + # Include all events, including events that are still ongoing + # and have no EndTime yet + $sql .= " and ( ".$self->{Sql}." )"; + } + else + { + # Only include closed events (events with valid EndTime) + $sql .= " where not isnull(E.EndTime) and ( ".$self->{Sql}." )"; + } + } + my @auto_terms; + if ( $self->{AutoArchive} ) + { + push( @auto_terms, "E.Archived = 0" ) + } + if ( $self->{AutoVideo} ) + { + push( @auto_terms, "E.Videoed = 0" ) + } + if ( $self->{AutoUpload} ) + { + push( @auto_terms, "E.Uploaded = 0" ) + } + if ( $self->{AutoEmail} ) + { + push( @auto_terms, "E.Emailed = 0" ) + } + if ( $self->{AutoMessage} ) + { + push( @auto_terms, "E.Messaged = 0" ) + } + if ( $self->{AutoExecute} ) + { + push( @auto_terms, "E.Executed = 0" ) + } + if ( @auto_terms ) + { + $sql .= " and ( ".join( " or ", @auto_terms )." )"; + } + if ( !$filter_expr->{sort_field} ) + { + $filter_expr->{sort_field} = 'StartTime'; + $filter_expr->{sort_asc} = 0; + } + my $sort_column = ''; + if ( $filter_expr->{sort_field} eq 'Id' ) + { + $sort_column = "E.Id"; + } + elsif ( $filter_expr->{sort_field} eq 'MonitorName' ) + { + $sort_column = "M.Name"; + } + elsif ( $filter_expr->{sort_field} eq 'Name' ) + { + $sort_column = "E.Name"; + } + elsif ( $filter_expr->{sort_field} eq 'StartTime' ) + { + $sort_column = "E.StartTime"; + } + elsif ( $filter_expr->{sort_field} eq 'Secs' ) + { + $sort_column = "E.Length"; + } + elsif ( $filter_expr->{sort_field} eq 'Frames' ) + { + $sort_column = "E.Frames"; + } + elsif ( $filter_expr->{sort_field} eq 'AlarmFrames' ) + { + $sort_column = "E.AlarmFrames"; + } + elsif ( $filter_expr->{sort_field} eq 'TotScore' ) + { + $sort_column = "E.TotScore"; + } + elsif ( $filter_expr->{sort_field} eq 'AvgScore' ) + { + $sort_column = "E.AvgScore"; + } + elsif ( $filter_expr->{sort_field} eq 'MaxScore' ) + { + $sort_column = "E.MaxScore"; + } + else + { + $sort_column = "E.StartTime"; + } + my $sort_order = $filter_expr->{sort_asc}?"asc":"desc"; + $sql .= " order by ".$sort_column." ".$sort_order; + if ( $filter_expr->{limit} ) + { + $sql .= " limit 0,".$filter_expr->{limit}; + } + Debug( "SQL:$sql\n" ); + $self->{Sql} = $sql; + } # end if has Sql + return $self->{Sql}; +} # end sub Sql + +sub getDiskPercent +{ + my $command = "df ."; + my $df = qx( $command ); + my $space = -1; + if ( $df =~ /\s(\d+)%/ms ) + { + $space = $1; + } + return( $space ); +} +sub getDiskBlocks +{ + my $command = "df ."; + my $df = qx( $command ); + my $space = -1; + if ( $df =~ /\s(\d+)\s+\d+\s+\d+%/ms ) + { + $space = $1; + } + return( $space ); +} +sub getLoad +{ + my $command = "uptime ."; + my $uptime = qx( $command ); + my $load = -1; + if ( $uptime =~ /load average:\s+([\d.]+)/ms ) + { + $load = $1; + Info( "Load: $load" ); + } + return( $load ); +} + +# +# More or less replicates the equivalent PHP function +# +sub strtotime +{ + my $dt_str = shift; + return( Date::Manip::UnixDate( $dt_str, '%s' ) ); +} + +# +# More or less replicates the equivalent PHP function +# +sub str_repeat +{ + my $string = shift; + my $count = shift; + return( ${string}x${count} ); +} + +# Formats a date into MySQL format +sub DateTimeToSQL +{ + my $dt_str = shift; + my $dt_val = strtotime( $dt_str ); + if ( !$dt_val ) + { + Error( "Unable to parse date string '$dt_str'\n" ); + return( undef ); + } + return( strftime( "%Y-%m-%d %H:%M:%S", localtime( $dt_val ) ) ); +} + +1; +__END__ +# Below is stub documentation for your module. You'd better edit it! + +=head1 NAME + +ZoneMinder::Database - Perl extension for blah blah blah + +=head1 SYNOPSIS + + use ZoneMinder::Filter; + blah blah blah + +=head1 DESCRIPTION + +Stub documentation for ZoneMinder, created by h2xs. It looks like the +author of the extension was negligent enough to leave the stub +unedited. + +Blah blah blah. + +=head2 EXPORT + +None by default. + + + +=head1 SEE ALSO + +Mention other useful documentation such as the documentation of +related modules or operating system documentation (such as man pages +in UNIX), or any relevant external documentation such as RFCs or +standards. + +If you have a mailing list set up for your module, mention it here. + +If you have a web site set up for your module, mention it here. + +=head1 AUTHOR + +Philip Coombes, Ephilip.coombes@zoneminder.comE + +=head1 COPYRIGHT AND LICENSE + +Copyright (C) 2001-2008 Philip Coombes + +This library is free software; you can redistribute it and/or modify +it under the same terms as Perl itself, either Perl version 5.8.3 or, +at your option, any later version of Perl 5 you may have available. + + +=cut diff --git a/scripts/zmdc.pl.in b/scripts/zmdc.pl.in index b068b9a49..36d5e922a 100644 --- a/scripts/zmdc.pl.in +++ b/scripts/zmdc.pl.in @@ -862,7 +862,7 @@ sub killAll my $killall; if ( '@HOST_OS@' eq 'BSD' ) { - $killall = 'killall -'; + $killall = 'killall -q -'; } elsif ( '@HOST_OS@' eq 'solaris' ) { $killall = 'pkill -'; } else { diff --git a/scripts/zmfilter.pl.in b/scripts/zmfilter.pl.in index 096556e6e..a101edf3a 100755 --- a/scripts/zmfilter.pl.in +++ b/scripts/zmfilter.pl.in @@ -60,10 +60,11 @@ use constant START_DELAY => 5; # How long to wait before starting @EXTRA_PERL_LIB@ use ZoneMinder; +require ZoneMinder::Filter; use DBI; use POSIX; use Time::HiRes qw/gettimeofday/; -use Date::Manip; +#use Date::Manip; use Getopt::Long; use autouse 'Pod::Usage'=>qw(pod2usage); use autouse 'Data::Dumper'=>qw(Dumper); @@ -137,36 +138,6 @@ my $filter_parm = ""; my $version = 0; # -# More or less replicates the equivalent PHP function -# -sub strtotime -{ - my $dt_str = shift; - return( UnixDate( $dt_str, '%s' ) ); -} - -# -# More or less replicates the equivalent PHP function -# -sub str_repeat -{ - my $string = shift; - my $count = shift; - return( ${string}x${count} ); -} - -# Formats a date into MySQL format -sub DateTimeToSQL -{ - my $dt_str = shift; - my $dt_val = strtotime( $dt_str ); - if ( !$dt_val ) - { - Error( "Unable to parse date string '$dt_str'\n" ); - return( undef ); - } - return( strftime( "%Y-%m-%d %H:%M:%S", localtime( $dt_val ) ) ); -} GetOptions( 'filter=s' =>\$filter_parm, @@ -225,43 +196,6 @@ while( 1 ) sleep( $delay ); } -sub getDiskPercent -{ - my $command = "df ."; - my $df = qx( $command ); - my $space = -1; - if ( $df =~ /\s(\d+)%/ms ) - { - $space = $1; - } - return( $space ); -} - -sub getDiskBlocks -{ - my $command = "df ."; - my $df = qx( $command ); - my $space = -1; - if ( $df =~ /\s(\d+)\s+\d+\s+\d+%/ms ) - { - $space = $1; - } - return( $space ); -} - -sub getLoad -{ - my $command = "uptime ."; - my $uptime = qx( $command ); - my $load = -1; - if ( $uptime =~ /load average:\s+([\d.]+)/ms ) - { - $load = $1; - Info( "Load: $load" ); - } - return( $load ); -} - sub getFilters { my $filter_name = shift; @@ -299,309 +233,18 @@ sub getFilters } FILTER: while( my $db_filter = $sth->fetchrow_hashref() ) { + my $filter = new ZoneMinder::Filter( $$db_filter{Id}, $db_filter ); Debug( "Found filter '$db_filter->{Name}'\n" ); - my $filter_expr = jsonDecode( $db_filter->{Query} ); - my $sql = "SELECT E.Id, - E.MonitorId, - M.Name as MonitorName, - M.DefaultRate, - M.DefaultScale, - E.Name, - E.Cause, - E.Notes, - E.StartTime, - unix_timestamp(E.StartTime) as Time, - E.Length, - E.Frames, - E.AlarmFrames, - E.TotScore, - E.AvgScore, - E.MaxScore, - E.Archived, - E.Videoed, - E.Uploaded, - E.Emailed, - E.Messaged, - E.Executed - FROM Events as E - INNER JOIN Monitors as M on M.Id = E.MonitorId - "; - $db_filter->{Sql} = ''; + my $sql = $filter->Sql(); - if ( $filter_expr->{terms} ) - { - for ( my $i = 0; $i < @{$filter_expr->{terms}}; $i++ ) - { - if ( exists($filter_expr->{terms}[$i]->{cnj}) ) - { - $db_filter->{Sql} .= " ".$filter_expr->{terms}[$i]->{cnj}." "; - } - if ( exists($filter_expr->{terms}[$i]->{obr}) ) - { - $db_filter->{Sql} .= " ".str_repeat( "(", $filter_expr->{terms}[$i]->{obr} )." "; - } - my $value = $filter_expr->{terms}[$i]->{val}; - my @value_list; - if ( $filter_expr->{terms}[$i]->{attr} ) - { - if ( $filter_expr->{terms}[$i]->{attr} =~ /^Monitor/ ) - { - my ( $temp_attr_name ) = $filter_expr->{terms}[$i]->{attr} =~ /^Monitor(.+)$/; - $db_filter->{Sql} .= "M.".$temp_attr_name; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'ServerId' ) - { - $db_filter->{Sql} .= "M.ServerId"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'DateTime' ) - { - $db_filter->{Sql} .= "E.StartTime"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Date' ) - { - $db_filter->{Sql} .= "to_days( E.StartTime )"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Time' ) - { - $db_filter->{Sql} .= "extract( hour_second from E.StartTime )"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Weekday' ) - { - $db_filter->{Sql} .= "weekday( E.StartTime )"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'DiskPercent' ) - { - $db_filter->{Sql} .= "zmDiskPercent"; - $db_filter->{HasDiskPercent} = !undef; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'DiskBlocks' ) - { - $db_filter->{Sql} .= "zmDiskBlocks"; - $db_filter->{HasDiskBlocks} = !undef; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'SystemLoad' ) - { - $db_filter->{Sql} .= "zmSystemLoad"; - $db_filter->{HasSystemLoad} = !undef; - } - else - { - $db_filter->{Sql} .= "E.".$filter_expr->{terms}[$i]->{attr}; - } - - ( my $stripped_value = $value ) =~ s/^["\']+?(.+)["\']+?$/$1/; - foreach my $temp_value ( split( /["'\s]*?,["'\s]*?/, $stripped_value ) ) - { - if ( $filter_expr->{terms}[$i]->{attr} =~ /^Monitor/ ) - { - $value = "'$temp_value'"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'ServerId' ) { - if ( $temp_value eq 'ZM_SERVER_ID' ) { - $value = "'$Config{ZM_SERVER_ID}'"; - } else { - $value = "'$temp_value'"; - } - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Name' - || $filter_expr->{terms}[$i]->{attr} eq 'Cause' - || $filter_expr->{terms}[$i]->{attr} eq 'Notes' - ) - { - $value = "'$temp_value'"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'DateTime' ) - { - $value = DateTimeToSQL( $temp_value ); - if ( !$value ) - { - Error( "Error parsing date/time '$temp_value', " - ."skipping filter '$db_filter->{Name}'\n" ); - next FILTER; - } - $value = "'$value'"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Date' ) - { - $value = DateTimeToSQL( $temp_value ); - if ( !$value ) - { - Error( "Error parsing date/time '$temp_value', " - ."skipping filter '$db_filter->{Name}'\n" ); - next FILTER; - } - $value = "to_days( '$value' )"; - } - elsif ( $filter_expr->{terms}[$i]->{attr} eq 'Time' ) - { - $value = DateTimeToSQL( $temp_value ); - if ( !$value ) - { - Error( "Error parsing date/time '$temp_value', " - ."skipping filter '$db_filter->{Name}'\n" ); - next FILTER; - } - $value = "extract( hour_second from '$value' )"; - } - else - { - $value = $temp_value; - } - push( @value_list, $value ); - } - } - if ( $filter_expr->{terms}[$i]->{op} ) - { - if ( $filter_expr->{terms}[$i]->{op} eq '=~' ) - { - $db_filter->{Sql} .= " regexp $value"; - } - elsif ( $filter_expr->{terms}[$i]->{op} eq '!~' ) - { - $db_filter->{Sql} .= " not regexp $value"; - } - elsif ( $filter_expr->{terms}[$i]->{op} eq '=[]' ) - { - $db_filter->{Sql} .= " in (".join( ",", @value_list ).")"; - } - elsif ( $filter_expr->{terms}[$i]->{op} eq '!~' ) - { - $db_filter->{Sql} .= " not in (".join( ",", @value_list ).")"; - } - else - { - $db_filter->{Sql} .= " ".$filter_expr->{terms}[$i]->{op}." $value"; - } - } - if ( exists($filter_expr->{terms}[$i]->{cbr}) ) - { - $db_filter->{Sql} .= " ".str_repeat( ")", $filter_expr->{terms}[$i]->{cbr} )." "; - } - } - } - if ( $db_filter->{Sql} ) - { - if ( $db_filter->{AutoMessage} ) - { - # Include all events, including events that are still ongoing - # and have no EndTime yet - $sql .= " and ( ".$db_filter->{Sql}." )"; - } - else - { - # Only include closed events (events with valid EndTime) - $sql .= " where not isnull(E.EndTime) and ( ".$db_filter->{Sql}." )"; - } - } - my @auto_terms; - if ( $db_filter->{AutoArchive} ) - { - push( @auto_terms, "E.Archived = 0" ) - } - if ( $db_filter->{AutoVideo} ) - { - push( @auto_terms, "E.Videoed = 0" ) - } - if ( $db_filter->{AutoUpload} ) - { - push( @auto_terms, "E.Uploaded = 0" ) - } - if ( $db_filter->{AutoEmail} ) - { - push( @auto_terms, "E.Emailed = 0" ) - } - if ( $db_filter->{AutoMessage} ) - { - push( @auto_terms, "E.Messaged = 0" ) - } - if ( $db_filter->{AutoExecute} ) - { - push( @auto_terms, "E.Executed = 0" ) - } - if ( @auto_terms ) - { - $sql .= " and ( ".join( " or ", @auto_terms )." )"; - } - if ( !$filter_expr->{sort_field} ) - { - $filter_expr->{sort_field} = 'StartTime'; - $filter_expr->{sort_asc} = 0; - } - my $sort_column = ''; - if ( $filter_expr->{sort_field} eq 'Id' ) - { - $sort_column = "E.Id"; - } - elsif ( $filter_expr->{sort_field} eq 'MonitorName' ) - { - $sort_column = "M.Name"; - } - elsif ( $filter_expr->{sort_field} eq 'Name' ) - { - $sort_column = "E.Name"; - } - elsif ( $filter_expr->{sort_field} eq 'StartTime' ) - { - $sort_column = "E.StartTime"; - } - elsif ( $filter_expr->{sort_field} eq 'Secs' ) - { - $sort_column = "E.Length"; - } - elsif ( $filter_expr->{sort_field} eq 'Frames' ) - { - $sort_column = "E.Frames"; - } - elsif ( $filter_expr->{sort_field} eq 'AlarmFrames' ) - { - $sort_column = "E.AlarmFrames"; - } - elsif ( $filter_expr->{sort_field} eq 'TotScore' ) - { - $sort_column = "E.TotScore"; - } - elsif ( $filter_expr->{sort_field} eq 'AvgScore' ) - { - $sort_column = "E.AvgScore"; - } - elsif ( $filter_expr->{sort_field} eq 'MaxScore' ) - { - $sort_column = "E.MaxScore"; - } - else - { - $sort_column = "E.StartTime"; - } - my $sort_order = $filter_expr->{sort_asc}?"asc":"desc"; - $sql .= " order by ".$sort_column." ".$sort_order; - if ( $filter_expr->{limit} ) - { - $sql .= " limit 0,".$filter_expr->{limit}; - } - Debug( "SQL:$sql\n" ); - $db_filter->{Sql} = $sql; - if ( $db_filter->{AutoExecute} ) - { - my $script = $db_filter->{AutoExecuteCmd}; - $script =~ s/\s.*$//; - if ( !-e $script ) - { - Error( "Auto execute script '$script' not found, " - ."skipping filter '$db_filter->{Name}'\n" ); - next FILTER; - - } - elsif ( !-x $script ) - { - Error( "Auto execute script '$script' not executable, " - ."skipping filter '$db_filter->{Name}'\n" ); - next FILTER; - } - } - push( @filters, $db_filter ); + if ( ! $sql ) { + Error( "Error parsing Sql. skipping filter '$db_filter->{Name}'\n" ); + next FILTER; + } + push( @filters, $filter ); } $sth->finish(); - + Debug( "Got " . @filters . " filters" ); return( \@filters ); } @@ -619,37 +262,11 @@ sub checkFilter ($filter->{AutoExecute}?", execute":""). "\n" ); - my $sql = $filter->{Sql}; - if ( $filter->{HasDiskPercent} ) - { - my $disk_percent = getDiskPercent(); - $sql =~ s/zmDiskPercent/$disk_percent/g; - } - if ( $filter->{HasDiskBlocks} ) - { - my $disk_blocks = getDiskBlocks(); - $sql =~ s/zmDiskBlocks/$disk_blocks/g; - } - if ( $filter->{HasSystemLoad} ) - { - my $load = getLoad(); - $sql =~ s/zmSystemLoad/$load/g; - } - - my $sth = $dbh->prepare_cached( $sql ) - or Fatal( "Can't prepare '$sql': ".$dbh->errstr() ); - my $res = $sth->execute(); - if ( !$res ) - { - Error( "Can't execute filter '$sql', ignoring: ".$sth->errstr() ); - return; - } - - while( my $event = $sth->fetchrow_hashref() ) - { + foreach my $event ( $filter->Execute() ) { Debug( "Checking event $event->{Id}\n" ); my $delete_ok = !undef; +$dbh->ping(); if ( $filter->{AutoArchive} ) { Info( "Archiving event $event->{Id}\n" ); @@ -658,7 +275,7 @@ sub checkFilter my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() ); my $res = $sth->execute( $event->{Id} ) - or Fatal( "Can't execute '$sql': ".$sth->errstr() ); + or Error( "Can't execute '$sql': ".$sth->errstr() ); } if ( $Config{ZM_OPT_FFMPEG} && $filter->{AutoVideo} ) { @@ -730,7 +347,6 @@ sub checkFilter } } } - $sth->finish(); } sub generateVideo @@ -1179,9 +795,31 @@ sub sendEmail Disposition => "attachment" ); } + if ( $Config{ZM_SSMTP_MAIL} ){ + + my $ssmtp_location = $Config{ZM_SSMTP_PATH}; + + if( ! $ssmtp_location ){ + + $ssmtp_location = qx('which ssmtp'); + + if ( logDebugging() ) + { + Debug( "which ssmtp: $ssmtp_location - set ssmtp path in options to suppress this message\n" ); + } + + } + + $mail->send( 'sendmail', $ssmtp_location, $Config{ZM_EMAIL_ADDRESS} ); + + }else{ + + MIME::Lite->send( "smtp", $Config{ZM_EMAIL_HOST}, Timeout=>60 ); + $mail->send(); + } ### Send the Message - MIME::Lite->send( "smtp", $Config{ZM_EMAIL_HOST}, Timeout=>60 ); - $mail->send(); + #MIME::Lite->send( "smtp", $Config{ZM_EMAIL_HOST}, Timeout=>60 ); + #$mail->send(); } else { diff --git a/scripts/zmvideo.pl.in b/scripts/zmvideo.pl.in index fd2005b16..754213af6 100644 --- a/scripts/zmvideo.pl.in +++ b/scripts/zmvideo.pl.in @@ -27,7 +27,7 @@ zmvideo.pl - ZoneMinder Video Creation Script =head1 SYNOPSIS - zmvideo.pl -e ,--event= [--format ] + zmvideo.pl [ -e ,--event= | --filter= ] [--format ] [--rate=] [--scale=] [--fps=] @@ -40,15 +40,18 @@ This script is used to create MPEG videos of events for the web pages or as email attachments. =head1 OPTIONS - - -e, --event= - What event to create the video for - -f, --format= - What format to create the video in, default is mpg. For ffmpeg only. - -r, --rate= - Relative rate, 1 = realtime, 2 = double speed, 0.5 = half speed etc. - -s, --scale= - Scale, 1 = normal, 2 = double size, 0.5 = half size etc. - -F, --fps= - Absolute frame rate, in frames per second - -S, --size= - Absolute video size, WxH or other specification supported by ffmpeg - -o, --overwrite - Whether to overwrite an existing file, off by default. - -v, --version - Outputs the currently installed version of ZoneMinder + -c[=filename], --concat[=filename] - When creating videos for multiple events, create a concatenated video as well. + - If not specified, filename is taken from filter name. + -e, --event= - What event to create the video for + --filter_name= - The name of a saved filter to generate a video for all events returned by it. + --filter_id= - The id of a saved filter to generate a video for all events returned by it. + -f, --format= - What format to create the video in, default is mpg. For ffmpeg only. + -r, --rate= - Relative rate, 1 = realtime, 2 = double speed, 0.5 = half speed etc. + -s, --scale= - Scale, 1 = normal, 2 = double size, 0.5 = half size etc. + -F, --fps= - Absolute frame rate, in frames per second + -S, --size= - Absolute video size, WxH or other specification supported by ffmpeg + -o, --overwrite - Whether to overwrite an existing file, off by default. + -v, --version - Outputs the currently installed version of ZoneMinder =cut use strict; @@ -62,10 +65,13 @@ use bytes; @EXTRA_PERL_LIB@ use ZoneMinder; +require ZoneMinder::Filter; +require ZoneMinder::Event; use DBI; use autouse 'Data::Dumper'=>qw(Dumper); use POSIX qw(strftime); use Getopt::Long qw(:config no_ignore_case ); +use Cwd; use autouse 'Pod::Usage'=>qw(pod2usage); $| = 1; @@ -77,6 +83,9 @@ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; logInit(); my $event_id; +my $concat_name; +my $filter_name; +my $filter_id; my $format = 'mpg'; my $rate = ''; my $scale = ''; @@ -95,7 +104,10 @@ for ( my $i = 0; $i < @formats; $i++ ) } GetOptions( - 'event=i' =>\$event_id, + 'concat|c:s' =>\$concat_name, + 'event|e=i' =>\$event_id, + 'filter_name=s' =>\$filter_name, + 'filter_id=i' =>\$filter_id, 'format|f=s' =>\$format, 'rate|r=f' =>\$rate, 'scale|s=f' =>\$scale, @@ -110,9 +122,9 @@ if ( $version ) { exit(0); } -if ( !$event_id || $event_id < 0 ) +if ( !( $filter_id or $filter_name or $event_id ) || $event_id < 0 ) { - print( STDERR "Please give a valid event id\n" ); + print( STDERR "Please give a valid event id or filter name\n" ); pod2usage(-exitstatus => -1); } @@ -164,128 +176,86 @@ $size = $detaint_size; my $dbh = zmDbConnect(); -my @filters; +my $cwd = getcwd; + +my $video_name; +my @event_ids; +if ( $event_id ) { + @event_ids = ( $event_id ); + +} elsif ( $filter_name or $filter_id ) { + my $Filter = ZoneMinder::Filter->find_one( + ($filter_name ? ( Name => $filter_name ) : () ), + ($filter_id ? ( Id => $filter_name ) : () ), + ); + if ( ! $Filter ) { + Fatal("Filter $filter_name $filter_id not found."); + } + @event_ids = map { $_->{Id} }$Filter->Execute(); + Fatal( "No events found for $filter_name") if ! @event_ids; + $concat_name = $filter_name if $concat_name eq ''; +} + my $sql = " SELECT max(F.Delta)-min(F.Delta) as FullLength, - E.*, - unix_timestamp(E.StartTime) as Time, - M.Name as MonitorName, - M.Width as MonitorWidth, - M.Height as MonitorHeight, - M.Palette - FROM Frames as F - INNER JOIN Events as E on F.EventId = E.Id - INNER JOIN Monitors as M on E.MonitorId = M.Id - WHERE EventId = '$event_id' - GROUP BY F.EventId" -; -my $sth = $dbh->prepare_cached( $sql ) - or Fatal( "Can't prepare '$sql': ".$dbh->errstr() ); -my $res = $sth->execute() - or Fatal( "Can't execute: ".$sth->errstr() ); -my $event = $sth->fetchrow_hashref(); -$sth->finish(); -my $event_path = getEventPath( $event ); -chdir( $event_path ); -( my $video_name = $event->{Name} ) =~ s/\s/_/g; + E.*, + unix_timestamp(E.StartTime) as Time, + M.Name as MonitorName, + M.Width as MonitorWidth, + M.Height as MonitorHeight, + M.Palette + FROM Frames as F + INNER JOIN Events as E on F.EventId = E.Id + INNER JOIN Monitors as M on E.MonitorId = M.Id + WHERE EventId = ? + GROUP BY F.EventId" + ; +my $sth = $dbh->prepare_cached( $sql ) or Fatal( "Can't prepare '$sql': ".$dbh->errstr() ); -my @file_parts; -if ( $rate ) -{ - my $file_rate = $rate; - $file_rate =~ s/\./_/; - $file_rate =~ s/_00//; - $file_rate =~ s/(_\d+)0+$/$1/; - $file_rate = 'r'.$file_rate; - push( @file_parts, $file_rate ); -} -elsif ( $fps ) -{ - my $file_fps = $fps; - $file_fps =~ s/\./_/; - $file_fps =~ s/_00//; - $file_fps =~ s/(_\d+)0+$/$1/; - $file_fps = 'R'.$file_fps; - push( @file_parts, $file_fps ); -} - -if ( $scale ) -{ - my $file_scale = $scale; - $file_scale =~ s/\./_/; - $file_scale =~ s/_00//; - $file_scale =~ s/(_\d+)0+$/$1/; - $file_scale = 's'.$file_scale; - push( @file_parts, $file_scale ); -} -elsif ( $size ) -{ - my $file_size = 'S'.$size; - push( @file_parts, $file_size ); -} -my $video_file = "$video_name-".$file_parts[0]."-".$file_parts[1].".$format"; - -if ( $overwrite || !-s $video_file ) -{ - Info( "Creating video file $video_file for event $event->{Id}\n" ); - - my $frame_rate = sprintf( "%.2f", $event->{Frames}/$event->{FullLength} ); - if ( $rate ) - { - if ( $rate != 1.0 ) - { - $frame_rate *= $rate; - } - } - elsif ( $fps ) - { - $frame_rate = $fps; - } - - my $width = $event->{MonitorWidth}; - my $height = $event->{MonitorHeight}; - my $video_size = " ${width}x${height}"; - - if ( $scale ) - { - if ( $scale != 1.0 ) - { - $width = int($width*$scale); - $height = int($height*$scale); - $video_size = " ${width}x${height}"; - } - } - elsif ( $size ) - { - $video_size = $size; - } - - my $command = $Config{ZM_PATH_FFMPEG} - ." -y -r $frame_rate " - .$Config{ZM_FFMPEG_INPUT_OPTIONS} - ." -i %0" - .$Config{ZM_EVENT_IMAGE_DIGITS} - ."d-capture.jpg -s $video_size " - .$Config{ZM_FFMPEG_OUTPUT_OPTIONS} - ." '$video_file' > ffmpeg.log 2>&1" - ; - Debug( $command."\n" ); - my $output = qx($command); - - my $status = $? >> 8; - if ( $status ) - { - Error( "Unable to generate video, check " - .$event_path."/ffmpeg.log for details" - ); - exit( -1 ); - } - - Info( "Finished $video_file\n" ); -} -else -{ - Info( "Video file $video_file already exists for event $event->{Id}\n" ); +my @video_files; +foreach my $event_id ( @event_ids ) { + + my $res = $sth->execute( $event_id ) + or Fatal( "Can't execute: ".$sth->errstr() ); + my $event = $sth->fetchrow_hashref(); + + my $Event = new ZoneMinder::Event( $$event{Id}, $event ); + my $video_file = $Event->GenerateVideo( $rate, $fps, $scale, $size, $overwrite, $format ); + if ( $video_file ) { + push @video_files, $video_file; + } +} # end foreach event_id + +if ( $concat_name ) { + ($cwd) = $cwd =~ /(.*)/; # detaint + chdir( $cwd ); + ($concat_name ) = $concat_name =~ /([\-A-Za-z0-9_\.]*)/; + my $concat_list_file = "/tmp/$concat_name.concat.lst"; + + my $video_file = $concat_name . '.'. $detaint_format; + + open( my $fd, '>', $concat_list_file ) or die "Can't open $concat_list_file: $!"; + foreach ( @video_files ) { + print $fd "file '$_'\n"; + } + close $fd; + my $command = $Config{ZM_PATH_FFMPEG} + . " -f concat -i $concat_list_file -c copy " + ." '$video_file' > ffmpeg.log 2>&1" + ; + Debug( $command."\n" ); + my $output = qx($command); + + my $status = $? >> 8; + + unlink $concat_list_file; + if ( $status ) + { + Error( "Unable to generate video, check /ffmpeg.log for details"); + exit(-1); + } + } +#unlink $input_file_list; #print( STDOUT $event->{MonitorId}.'/'.$event->{Id}.'/'.$video_file."\n" ); -print( STDOUT $video_file."\n" ); +#print( STDOUT $video_file."\n" ); exit( 0 ); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ea254ac2f..9876e2a87 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -14,21 +14,19 @@ add_executable(zma zma.cpp) add_executable(zmu zmu.cpp) add_executable(zmf zmf.cpp) add_executable(zms zms.cpp) -add_executable(zmstreamer zmstreamer.cpp) target_link_libraries(zmc zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zma zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zmu zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zmf zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) target_link_libraries(zms zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) -target_link_libraries(zmstreamer zm ${ZM_EXTRA_LIBS} ${ZM_BIN_LIBS}) # Generate man files for the binaries destined for the bin folder -FOREACH(CBINARY zma zmc zmf zmu zmstreamer) +FOREACH(CBINARY zma zmc zmf zmu) POD2MAN(${CMAKE_CURRENT_SOURCE_DIR}/${CBINARY}.cpp zoneminder-${CBINARY} 8) -ENDFOREACH(CBINARY zma zmc zmf zmu zmstreamer) +ENDFOREACH(CBINARY zma zmc zmf zmu) -install(TARGETS zmc zma zmu zmf zmstreamer RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +install(TARGETS zmc zma zmu zmf RUNTIME DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(TARGETS zms RUNTIME DESTINATION "${ZM_CGIDIR}" PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(CODE "execute_process(COMMAND ln -sf zms nph-zms WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})" ) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/nph-zms DESTINATION "${ZM_CGIDIR}") diff --git a/src/Makefile.am b/src/Makefile.am deleted file mode 100644 index 9314daac0..000000000 --- a/src/Makefile.am +++ /dev/null @@ -1,135 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -AM_CPPFLAGS = @MYSQL_CFLAGS@ @MARIADB_CFLAGS@ @FFMPEG_CFLAGS@ -Wall -finline-functions -fomit-frame-pointer -#AM_CXXFLAGS = -frepo - -CLEANFILES = *.rpo - -# This should be set to your CGI directory -cgidir = @CGI_PREFIX@ -# And these to the user and group of your webserver -webuser = @WEB_USER@ -webgroup = @WEB_GROUP@ - -bin_PROGRAMS = \ - zmc \ - zma \ - zmu \ - zms \ - zmf \ - zmstreamer - -zm_SOURCES = \ - zm_box.cpp \ - zm_buffer.cpp \ - zm_camera.cpp \ - zm_comms.cpp \ - zm_config.cpp \ - zm_coord.cpp \ - zm_curl_camera.cpp \ - zm.cpp \ - zm_db.cpp \ - zm_logger.cpp \ - zm_event.cpp \ - zm_exception.cpp \ - zm_file_camera.cpp \ - zm_ffmpeg_camera.cpp \ - zm_image.cpp \ - zm_jpeg.cpp \ - zm_libvlc_camera.cpp \ - zm_local_camera.cpp \ - zm_monitor.cpp \ - zm_ffmpeg.cpp \ - zm_mpeg.cpp \ - zm_poly.cpp \ - zm_regexp.cpp \ - zm_remote_camera.cpp \ - zm_remote_camera_http.cpp \ - zm_remote_camera_rtsp.cpp \ - zm_rtp.cpp \ - zm_rtp_ctrl.cpp \ - zm_rtp_data.cpp \ - zm_rtp_source.cpp \ - zm_rtsp.cpp \ - zm_rtsp_auth.cpp \ - zm_sdp.cpp \ - zm_signal.cpp \ - zm_stream.cpp \ - zm_thread.cpp \ - zm_time.cpp \ - zm_timer.cpp \ - zm_user.cpp \ - zm_utils.cpp \ - zm_zone.cpp - -zmc_SOURCES = zmc.cpp $(zm_SOURCES) -zma_SOURCES = zma.cpp $(zm_SOURCES) -zms_SOURCES = zms.cpp $(zm_SOURCES) -zmu_SOURCES = zmu.cpp $(zm_SOURCES) -zmf_SOURCES = zmf.cpp $(zm_SOURCES) -zmstreamer_SOURCES = zmstreamer.cpp $(zm_SOURCES) - -noinst_HEADERS = \ - jinclude.h \ - zm_box.h \ - zm_buffer.h \ - zm_camera.h \ - zm_comms.h \ - zm_config_defines.h \ - zm_config.h \ - zm_coord.h \ - zm_curl_camera.h \ - zm_db.h \ - zm_logger.h \ - zm_event.h \ - zm_exception.h \ - zmf.h \ - zm_file_camera.h \ - zm_ffmpeg_camera.h \ - zm_font.h \ - zm_font.h \ - zm.h \ - zm_image.h \ - zm_jpeg.h \ - zm_libvlc_camera.h \ - zm_local_camera.h \ - zm_mem_utils.h \ - zm_monitor.h \ - zm_ffmpeg.h \ - zm_mpeg.h \ - zm_poly.h \ - zm_regexp.h \ - zm_remote_camera.h \ - zm_remote_camera_http.h \ - zm_remote_camera_rtsp.h \ - zm_rgb.h \ - zm_rtp_ctrl.h \ - zm_rtp_data.h \ - zm_rtp.h \ - zm_rtp_source.h \ - zm_rtsp.h \ - zm_sdp.h \ - zm_signal.h \ - zm_stream.h \ - zm_thread.h \ - zm_time.h \ - zm_timer.h \ - zm_user.h \ - zm_utils.h \ - zm_zone.h - -EXTRA_DIST = \ - zm_config.h.in \ - zm_threaddata.cpp - -dist-hook: - @( rm $(distdir)/zm_config.h ) - -# Yes, you are correct. This is a HACK! -install-exec-hook: - ( cd $(DESTDIR)@bindir@; mkdir -p $(DESTDIR)$(cgidir); mv zms $(DESTDIR)$(cgidir) ) - ( cd $(DESTDIR)$(cgidir); chown $(webuser):$(webgroup) zms; ln -f zms nph-zms ) - -uninstall-hook: - ( cd $(DESTDIR)$(cgidir); rm -f zms nph-zms ) - diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 3fe6a52ae..50028ffa6 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -715,7 +715,7 @@ bool EventStream::loadInitialEventData( int monitor_id, time_t event_time ) return( true ); } -bool EventStream::loadInitialEventData( int init_event_id, int init_frame_id ) +bool EventStream::loadInitialEventData( int init_event_id, unsigned int init_frame_id ) { loadEventData( init_event_id ); diff --git a/src/zm_event.h b/src/zm_event.h index afb274947..f3c5d7961 100644 --- a/src/zm_event.h +++ b/src/zm_event.h @@ -230,7 +230,7 @@ protected: protected: bool loadEventData( int event_id ); - bool loadInitialEventData( int init_event_id, int init_frame_id ); + bool loadInitialEventData( int init_event_id, unsigned int init_frame_id ); bool loadInitialEventData( int monitor_id, time_t event_time ); void checkEventLoaded(); @@ -249,7 +249,7 @@ public: event_data = 0; } - void setStreamStart( int init_event_id, int init_frame_id=0 ) + void setStreamStart( int init_event_id, unsigned int init_frame_id=0 ) { loadInitialEventData( init_event_id, init_frame_id ); loadMonitor( event_data->monitor_id ); diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 475fb7b0c..975b34e57 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2146,9 +2146,6 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); col++; bool embed_exif = (*dbrow[col] != '0'); col++; - int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width); - int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height); - int extras = (deinterlacing>>24)&0xff; Camera *camera = new LocalCamera( @@ -2159,8 +2156,8 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); v4l_multi_buffer, v4l_captures_per_frame, method, - cam_width, - cam_height, + width, + height, colours, palette, brightness, @@ -2302,9 +2299,6 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c int track_motion = atoi(dbrow[col]); col++; bool embed_exif = (*dbrow[col] != '0'); col++; - int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width); - int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height); - Camera *camera = 0; if ( protocol == "http" ) { @@ -2314,8 +2308,8 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c host, // Host port, // Port path, // Path - cam_width, - cam_height, + width, + height, colours, brightness, contrast, @@ -2333,8 +2327,8 @@ int Monitor::LoadRemoteMonitors( const char *protocol, const char *host, const c host, // Host port, // Port path, // Path - cam_width, - cam_height, + width, + height, rtsp_describe, colours, brightness, @@ -2477,14 +2471,11 @@ int Monitor::LoadFileMonitors( const char *file, Monitor **&monitors, Purpose pu int track_motion = atoi(dbrow[col]); col++; bool embed_exif = (*dbrow[col] != '0'); col++; - int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width); - int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height); - Camera *camera = new FileCamera( id, path, // File - cam_width, - cam_height, + width, + height, colours, brightness, contrast, @@ -2622,16 +2613,13 @@ int Monitor::LoadFfmpegMonitors( const char *file, Monitor **&monitors, Purpose int track_motion = atoi(dbrow[col]); col++; bool embed_exif = (*dbrow[col] != '0'); col++; - int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width); - int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height); - Camera *camera = new FfmpegCamera( id, path, // File method, options, - cam_width, - cam_height, + width, + height, colours, brightness, contrast, @@ -2792,9 +2780,6 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); col++; bool embed_exif = (*dbrow[col] != '0'); col++; - int cam_width = ((orientation==ROTATE_90||orientation==ROTATE_270)?height:width); - int cam_height = ((orientation==ROTATE_90||orientation==ROTATE_270)?width:height); - int extras = (deinterlacing>>24)&0xff; Camera *camera = 0; @@ -2809,8 +2794,8 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); v4l_multi_buffer, v4l_captures_per_frame, method, - cam_width, - cam_height, + width, + height, colours, palette, brightness, @@ -2834,8 +2819,8 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); host.c_str(), port.c_str(), path.c_str(), - cam_width, - cam_height, + width, + height, colours, brightness, contrast, @@ -2853,8 +2838,8 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); host.c_str(), port.c_str(), path.c_str(), - cam_width, - cam_height, + width, + height, rtsp_describe, colours, brightness, @@ -2877,8 +2862,8 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); camera = new FileCamera( id, path.c_str(), - cam_width, - cam_height, + width, + height, colours, brightness, contrast, @@ -2895,8 +2880,8 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); path.c_str(), method, options, - cam_width, - cam_height, + width, + height, colours, brightness, contrast, @@ -2916,8 +2901,8 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); path.c_str(), method, options, - cam_width, - cam_height, + width, + height, colours, brightness, contrast, @@ -2937,8 +2922,8 @@ Debug( 1, "Got %d for v4l_captures_per_frame", v4l_captures_per_frame ); path.c_str(), user.c_str(), pass.c_str(), - cam_width, - cam_height, + width, + height, colours, brightness, contrast, diff --git a/src/zm_signal.cpp b/src/zm_signal.cpp index 91e1bc4ba..bbc40e916 100644 --- a/src/zm_signal.cpp +++ b/src/zm_signal.cpp @@ -47,15 +47,12 @@ RETSIGTYPE zm_die_handler(int signal, siginfo_t * info, void *context) RETSIGTYPE zm_die_handler(int signal) #endif { -#if (defined(__i386__) || defined(__x86_64__)) - void *cr2 = 0; - void *ip = 0; -#endif Error("Got signal %d (%s), crashing", signal, strsignal(signal)); - #if (defined(__i386__) || defined(__x86_64__)) // Get more information if available -#if ( HAVE_SIGINFO_T && HAVE_UCONTEXT_T ) + #if ( HAVE_SIGINFO_T && HAVE_UCONTEXT_T ) + void *ip = 0; + void *cr2 = 0; if (info && context) { Debug(1, @@ -65,19 +62,19 @@ RETSIGTYPE zm_die_handler(int signal) ucontext_t *uc = (ucontext_t *) context; cr2 = info->si_addr; -#if defined(__x86_64__) - #ifdef __FreeBSD_kernel__ + #if defined(__x86_64__) + #ifdef __FreeBSD_kernel__ ip = (void *)(uc->uc_mcontext.mc_rip); - #else + #else ip = (void *)(uc->uc_mcontext.gregs[REG_RIP]); - #endif -#else - #ifdef __FreeBSD_kernel__ + #endif + #else + #ifdef __FreeBSD_kernel__ ip = (void *)(uc->uc_mcontext.mc_eip); - #else + #else ip = (void *)(uc->uc_mcontext.gregs[REG_EIP]); - #endif -#endif // defined(__x86_64__) + #endif + #endif // defined(__x86_64__) // Print the signal address and instruction pointer if available if (ip) { @@ -86,11 +83,11 @@ RETSIGTYPE zm_die_handler(int signal) Error("Signal address is %p, no instruction pointer", cr2); } } -#endif // ( HAVE_SIGINFO_T && HAVE_UCONTEXT_T ) + #endif // ( HAVE_SIGINFO_T && HAVE_UCONTEXT_T ) // Print backtrace if enabled and available -#if ( !defined(ZM_NO_CRASHTRACE) && HAVE_DECL_BACKTRACE && HAVE_DECL_BACKTRACE_SYMBOLS ) + #if ( !defined(ZM_NO_CRASHTRACE) && HAVE_DECL_BACKTRACE && HAVE_DECL_BACKTRACE_SYMBOLS ) void *trace[TRACE_SIZE]; int trace_size = 0; trace_size = backtrace(trace, TRACE_SIZE); @@ -111,7 +108,7 @@ RETSIGTYPE zm_die_handler(int signal) Info("Backtrace complete, please execute the following command for more information"); Info(cmd); -#endif // ( !defined(ZM_NO_CRASHTRACE) && HAVE_DECL_BACKTRACE && HAVE_DECL_BACKTRACE_SYMBOLS ) + #endif // ( !defined(ZM_NO_CRASHTRACE) && HAVE_DECL_BACKTRACE && HAVE_DECL_BACKTRACE_SYMBOLS ) #endif // (defined(__i386__) || defined(__x86_64__) exit(signal); } diff --git a/src/zm_thread.cpp b/src/zm_thread.cpp index 39b26343a..7d84037d9 100644 --- a/src/zm_thread.cpp +++ b/src/zm_thread.cpp @@ -253,7 +253,7 @@ void *Thread::mThreadFunc( void *arg ) Debug( 2, "Invoking thread" ); Thread *thisPtr = (Thread *)arg; - void *status = 0; + thisPtr->status = 0; try { thisPtr->mThreadMutex.lock(); @@ -261,19 +261,18 @@ void *Thread::mThreadFunc( void *arg ) thisPtr->mThreadCondition.signal(); thisPtr->mThreadMutex.unlock(); thisPtr->mRunning = true; - int run=(thisPtr->run()); - status = (void *)&run; + thisPtr->status = thisPtr->run(); thisPtr->mRunning = false; - Debug( 2, "Exiting thread, status %p", status ); + Debug( 2, "Exiting thread, status %p", (void *)&(thisPtr->status) ); + return (void *)&(thisPtr->status); } catch ( const ThreadException &e ) { Error( "%s", e.getMessage().c_str() ); thisPtr->mRunning = false; - status = (void *)-1; - Debug( 2, "Exiting thread after exception, status %p", status ); + Debug( 2, "Exiting thread after exception, status %p", (void *)-1 ); + return (void *)-1; } - return( status ); } void Thread::start() diff --git a/src/zm_thread.h b/src/zm_thread.h index 685148ea8..15c13bb17 100644 --- a/src/zm_thread.h +++ b/src/zm_thread.h @@ -224,6 +224,7 @@ protected: #endif bool mStarted; bool mRunning; + int status; // Used in various funcions to get around return a local variable protected: Thread(); @@ -253,10 +254,10 @@ return tid; return( pthread_self() ); } #endif - void exit( int status = 0 ) + void exit( int p_status = 0 ) { //INFO( "Exiting" ); - pthread_exit( (void *)&status ); + pthread_exit( (void *)&p_status ); } static void *mThreadFunc( void *arg ); diff --git a/src/zms.cpp b/src/zms.cpp index b4caf0d35..e40fcdf95 100644 --- a/src/zms.cpp +++ b/src/zms.cpp @@ -62,7 +62,7 @@ int main( int argc, const char *argv[] ) int monitor_id = 0; time_t event_time = 0; int event_id = 0; - int frame_id = 1; + unsigned int frame_id = 1; unsigned int scale = 100; unsigned int rate = 100; double maxfps = 10.0; diff --git a/src/zmu.cpp b/src/zmu.cpp index 88a781073..0c5a5a41e 100644 --- a/src/zmu.cpp +++ b/src/zmu.cpp @@ -757,15 +757,14 @@ int main( int argc, char *argv[] ) if ( function & ZMU_LIST ) { - char sql[ZM_SQL_SML_BUFSIZ]; - strncpy( sql, "select Id, Function+0 from Monitors", sizeof(sql) ); + std::string sql = "select Id, Function+0 from Monitors"; if ( !verbose ) { - strncat( sql, " where Function != 'None'", sizeof(sql)-strlen(sql) ); + sql += "where Function != 'None'"; } - strncat( sql, " order by Id asc", sizeof(sql)-strlen(sql) ); + sql += " order by Id asc"; - if ( mysql_query( &dbconn, sql ) ) + if ( mysql_query( &dbconn, sql.c_str() ) ) { Error( "Can't run query: %s", mysql_error( &dbconn ) ); exit( mysql_errno( &dbconn ) ); diff --git a/utils/do_debian_package.sh b/utils/do_debian_package.sh index 6fff59967..f594f05d3 100755 --- a/utils/do_debian_package.sh +++ b/utils/do_debian_package.sh @@ -47,9 +47,9 @@ cd zoneminder_$VERSION-$DISTRO-$SNAPSHOT.orig git submodule init git submodule update --init --recursive if [ $DISTRO == "trusty" ]; then -ln -sf distros/ubuntu1204_cmake debian +ln -sf distros/ubuntu1204 debian else -ln -sf distros/ubuntu1504_cmake debian +ln -sf distros/ubuntu1504 debian fi; # Auto-install all ZoneMinder's depedencies using the Debian control file diff --git a/web/Makefile.am b/web/Makefile.am deleted file mode 100644 index 077a4ff91..000000000 --- a/web/Makefile.am +++ /dev/null @@ -1,35 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -# This should be set to your web directory -webdir = @WEB_PREFIX@ -# And these to the user and group of your webserver -webuser = @WEB_USER@ -webgroup = @WEB_GROUP@ - -SUBDIRS = \ - ajax \ - css \ - graphics \ - includes \ - js \ - lang \ - skins \ - tools \ - views - -dist_web_DATA = \ - index.php - -# Yes, you are correct. This is a HACK! -install-data-hook: - ( cd $(DESTDIR)$(webdir); chown $(webuser):$(webgroup) $(dist_web_DATA) ) - ( cd $(DESTDIR)$(webdir); chown -R $(webuser):$(webgroup) $(SUBDIRS) ) - @-( cd $(DESTDIR)$(webdir); if ! test -e events; then mkdir events; fi; chown $(webuser):$(webgroup) events; chmod u+w events ) - @-( cd $(DESTDIR)$(webdir); if ! test -e images; then mkdir images; fi; chown $(webuser):$(webgroup) images; chmod u+w images ) - @-( cd $(DESTDIR)$(webdir); if ! test -e sounds; then mkdir sounds; fi; chown $(webuser):$(webgroup) sounds; chmod u+w sounds ) - @-( cd $(DESTDIR)$(webdir); if ! test -e tools; then mkdir tools; fi; chown $(webuser):$(webgroup) tools; chmod u+w tools ) - @-( cd $(DESTDIR)$(webdir); if ! test -e temp; then mkdir temp; fi; chown $(webuser):$(webgroup) temp; chmod u+w temp ) - -uninstall-hook: - @-( cd $(DESTDIR)$(webdir); rm -rf $(SUBDIRS) ) - @-( cd $(DESTDIR)$(webdir); rm -rf events images sounds tools temp ) diff --git a/web/ajax/Makefile.am b/web/ajax/Makefile.am deleted file mode 100644 index ef79e6cae..000000000 --- a/web/ajax/Makefile.am +++ /dev/null @@ -1,12 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/ajax - -dist_web_DATA = \ - alarm.php \ - control.php \ - event.php \ - log.php \ - status.php \ - stream.php \ - zone.php diff --git a/web/ajax/zone.php b/web/ajax/zone.php index 905ef7ac1..bfa77a922 100644 --- a/web/ajax/zone.php +++ b/web/ajax/zone.php @@ -17,7 +17,7 @@ if ( canView( 'Monitors' ) ) { $wd = getcwd(); chdir( ZM_DIR_IMAGES ); - $hiColor = "0x00ff00"; + $hiColor = '0x00ff00'; $command = getZmuCommand( " -m ".$_REQUEST['mid']." -z" ); if ( !isset($_REQUEST['zid']) ) diff --git a/web/css/Makefile.am b/web/css/Makefile.am deleted file mode 100644 index 917b8f389..000000000 --- a/web/css/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/css - -dist_web_DATA = \ - reset.css \ - spinner.css \ - overlay.css diff --git a/web/graphics/Makefile.am b/web/graphics/Makefile.am deleted file mode 100644 index ec252c82e..000000000 --- a/web/graphics/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/graphics - -dist_web_DATA = \ - favicon.ico \ - spinner.gif \ - transparent.gif diff --git a/web/includes/Makefile.am b/web/includes/Makefile.am deleted file mode 100644 index d4a1ece9b..000000000 --- a/web/includes/Makefile.am +++ /dev/null @@ -1,19 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/includes - -web_DATA = \ - config.php - -dist_web_DATA = \ - Monitor.php \ - Server.php \ - actions.php \ - database.php \ - functions.php \ - control_functions.php \ - lang.php \ - logger.php - -EXTRA_DIST = \ - config.php.in diff --git a/web/includes/actions.php b/web/includes/actions.php index 7de7a8238..4cd056116 100644 --- a/web/includes/actions.php +++ b/web/includes/actions.php @@ -921,7 +921,6 @@ if ( !empty($action) ) case "highband" : case "medband" : case "lowband" : - case "phoneband" : break; } } diff --git a/web/includes/config.php.in b/web/includes/config.php.in index 2ca819210..ba96d9a54 100644 --- a/web/includes/config.php.in +++ b/web/includes/config.php.in @@ -104,6 +104,7 @@ define( "CMD_PREV", 12 ); define( "CMD_NEXT", 13 ); define( "CMD_SEEK", 14 ); define( "CMD_VARPLAY", 15 ); +define( "CMD_QUIT", 17 ); define( "CMD_QUERY", 99 ); // diff --git a/web/includes/database.php b/web/includes/database.php index 2d7bfd7a9..809145032 100644 --- a/web/includes/database.php +++ b/web/includes/database.php @@ -81,7 +81,7 @@ function dbLog( $sql, $update=false ) function dbError( $sql ) { - Fatal( "SQL-ERR '".mysql_error()."', statement was '".$sql."'" ); + Fatal( "SQL-ERR '".$dbConn->errorInfo()."', statement was '".$sql."'" ); } function dbEscape( $string ) diff --git a/web/includes/functions.php b/web/includes/functions.php index 800f03f4d..ed9850ca3 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -982,7 +982,7 @@ function daemonControl( $command, $daemon=false, $args=false ) function zmcControl( $monitor, $mode=false ) { - if ( (!ZM_SERVER) or ( ZM_SERVER==$monitor[ServerId}) ) { + if ( (!defined('ZM_SERVER_ID')) or ( ZM_SERVER_ID==$monitor['ServerId'] ) ) { $row = NULL; if ( $monitor['Type'] == "Local" ) { @@ -1013,7 +1013,7 @@ function zmcControl( $monitor, $mode=false ) function zmaControl( $monitor, $mode=false ) { - if ( (!ZM_SERVER) or ( ZM_SERVER==$monitor[ServerId}) ) { + if ( (!defined('ZM_SERVER_ID')) or ( ZM_SERVER_ID==$monitor['ServerId'] ) ) { if ( !is_array( $monitor ) ) { $monitor = dbFetchOne( "select C.*, M.* from Monitors as M left join Controls as C on (M.ControlId = C.Id ) where M.Id=?", NULL, array($monitor) ); @@ -1307,26 +1307,30 @@ function executeFilter( $filter ) return( $status ); } +# This takes more than one scale amount, so it runs through each and alters dimension. +# I can't imagine why you would want to do that. function reScale( $dimension, $dummy ) { + $new_dimension = $dimension; for ( $i = 1; $i < func_num_args(); $i++ ) { $scale = func_get_arg( $i ); if ( !empty($scale) && $scale != SCALE_BASE ) - $dimension = (int)(($dimension*$scale)/SCALE_BASE); + $new_dimension = (int)(($new_dimension*$scale)/SCALE_BASE); } - return( $dimension ); + return( $new_dimension ); } function deScale( $dimension, $dummy ) { + $new_dimension = $dimension; for ( $i = 1; $i < func_num_args(); $i++ ) { $scale = func_get_arg( $i ); if ( !empty($scale) && $scale != SCALE_BASE ) - $dimension = (int)(($dimension*SCALE_BASE)/$scale); + $new_dimension = (int)(($new_dimension*SCALE_BASE)/$scale); } - return( $dimension ); + return( $new_dimension ); } function monitorLimitSql() @@ -1668,6 +1672,10 @@ function getLoad() function getDiskPercent() { $total = disk_total_space(ZM_DIR_EVENTS); + if ( ! $total ) { + Error("disk_total_space returned false for " . ZM_DIR_EVENTS ); + return 0; + } $space = round(($total - disk_free_space(ZM_DIR_EVENTS)) / $total * 100); return( $space ); } @@ -2486,4 +2494,22 @@ function validHtmlStr( $input ) return( htmlspecialchars( $input, ENT_QUOTES ) ); } +function getStreamHTML( $monitor, $scale=100 ) { +//FIXME, the width and height of the image need to be scaled. + if ( ZM_WEB_STREAM_METHOD == 'mpeg' && ZM_MPEG_LIVE_FORMAT ) { + $streamSrc = $monitor->getStreamSrc( array( "mode=mpeg", "scale=".$scale, "bitrate=".ZM_WEB_VIDEO_BITRATE, "maxfps=".ZM_WEB_VIDEO_MAXFPS, "format=".ZM_MPEG_LIVE_FORMAT ) ); + outputVideoStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), ZM_MPEG_LIVE_FORMAT, $monitor->Name() ); + } else if ( canStream() ) { + $streamSrc = $monitor->getStreamSrc( array( 'mode=jpeg', 'scale='.$scale, 'maxfps='.ZM_WEB_VIDEO_MAXFPS, 'buffer='.$monitor->StreamReplayBuffer() ) ); + if ( canStreamNative() ) + outputImageStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() ); + elseif ( canStreamApplet() ) + outputHelperStream( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() ); + } else { + $streamSrc = $monitor->getStreamSrc( array( 'mode=single', "scale=".$scale ) ); + outputImageStill( "liveStream", $streamSrc, reScale( $monitor->Width(), $scale ), reScale( $monitor->Height(), $scale ), $monitor->Name() ); + Info( "The system has fallen back to single jpeg mode for streaming. Consider enabling Cambozola or upgrading the client browser."); + } +} // end function getStreamHTML + ?> diff --git a/web/index.php b/web/index.php index 72e6dc8c0..4beaaa985 100644 --- a/web/index.php +++ b/web/index.php @@ -49,6 +49,7 @@ if ( false ) require_once( 'includes/config.php' ); require_once( 'includes/logger.php' ); require_once( 'includes/Server.php' ); +require_once( 'includes/Monitor.php' ); if ( isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on' ) { @@ -143,7 +144,7 @@ CORSHeaders(); // Check for valid content dirs if ( !is_writable(ZM_DIR_EVENTS) || !is_writable(ZM_DIR_IMAGES) ) { - Fatal( "Cannot write to content dirs('".ZM_DIR_EVENTS."','".ZM_DIR_IMAGES."'). Check that these exist and are owned by the web account user"); + Error( "Cannot write to content dirs('".ZM_DIR_EVENTS."','".ZM_DIR_IMAGES."'). Check that these exist and are owned by the web account user"); } if ( isset($_REQUEST['view']) ) diff --git a/web/js/Makefile.am b/web/js/Makefile.am deleted file mode 100644 index 21c10613e..000000000 --- a/web/js/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/js - -dist_web_DATA = \ - logger.js \ - overlay.js \ - mootools.ext.js diff --git a/web/lang/Makefile.am b/web/lang/Makefile.am deleted file mode 100644 index 22d256a2e..000000000 --- a/web/lang/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/lang - -dist_web_DATA = \ - big5_big5.php \ - cn_zh.php \ - cs_cz.php \ - de_de.php \ - dk_dk.php \ - et_ee.php \ - en_gb.php \ - en_us.php \ - es_ar.php \ - fr_fr.php \ - he_il.php \ - hu_hu.php \ - it_it.php \ - ja_jp.php \ - nl_nl.php \ - pl_pl.php \ - pt_br.php \ - ro_ro.php \ - ru_ru.php \ - se_se.php diff --git a/web/lang/en_gb.php b/web/lang/en_gb.php index e2c2aac7c..d559a567a 100644 --- a/web/lang/en_gb.php +++ b/web/lang/en_gb.php @@ -230,6 +230,7 @@ $SLANG = array( 'ChooseLogFormat' => 'Choose a log format', 'ChooseLogSelection' => 'Choose a log selection', 'ChoosePreset' => 'Choose Preset', + 'CloneMonitor' => 'Clone Monitor', 'Close' => 'Close', 'Colour' => 'Colour', 'Command' => 'Command', diff --git a/web/skins/Makefile.am b/web/skins/Makefile.am deleted file mode 100644 index ae0abd8e8..000000000 --- a/web/skins/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -SUBDIRS = \ - classic \ - mobile \ - xml diff --git a/web/skins/classic/Makefile.am b/web/skins/classic/Makefile.am deleted file mode 100644 index 986beae0d..000000000 --- a/web/skins/classic/Makefile.am +++ /dev/null @@ -1,15 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic - -SUBDIRS = \ - ajax \ - css \ - graphics \ - includes \ - js \ - lang \ - views - -dist_web_DATA = \ - skin.php diff --git a/web/skins/classic/ajax/Makefile.am b/web/skins/classic/ajax/Makefile.am deleted file mode 100644 index f910cbc5c..000000000 --- a/web/skins/classic/ajax/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/ajax - -dist_web_DATA = # No files here diff --git a/web/skins/classic/css/Makefile.am b/web/skins/classic/css/Makefile.am deleted file mode 100644 index 2c43d2e47..000000000 --- a/web/skins/classic/css/Makefile.am +++ /dev/null @@ -1,7 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/css - -SUBDIRS = dark \ - flat \ - classic diff --git a/web/skins/classic/css/classic/Makefile.am b/web/skins/classic/css/classic/Makefile.am deleted file mode 100644 index 48dc58ab7..000000000 --- a/web/skins/classic/css/classic/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/css/classic - -SUBDIRS = views - -dist_web_DATA = \ - skin.css \ - control.css \ - export.css diff --git a/web/skins/classic/css/classic/views/Makefile.am b/web/skins/classic/css/classic/views/Makefile.am deleted file mode 100644 index d07eaac4f..000000000 --- a/web/skins/classic/css/classic/views/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/css/classic/views - -dist_web_DATA = \ - console.css \ - controlcaps.css \ - control.css \ - devices.css \ - event.css \ - events.css \ - export.css \ - filter.css \ - frame.css \ - frames.css \ - groups.css \ - log.css \ - monitor.css \ - montage_2wide.css \ - montage_3wide50enlarge.css \ - montage_3wide.css \ - montage_4wide.css \ - montage.css \ - montage_freeform.css \ - options.css \ - stats.css \ - timeline.css \ - timeline.css.php \ - video.css \ - watch.css \ - zone.css diff --git a/web/skins/classic/css/classic/views/zone.css b/web/skins/classic/css/classic/views/zone.css index a86c5d1e4..52611f5ea 100644 --- a/web/skins/classic/css/classic/views/zone.css +++ b/web/skins/classic/css/classic/views/zone.css @@ -93,3 +93,23 @@ #zonePoints table a { margin: 0 2px; } +.zones polygon { + fill-opacity: 0.25; + stroke-width: 2px; +} +.Active { + stroke: #ff0000; + fill: #ff0000; +} +.Inclusive { + stroke: #FFA500; + fill: #FFA500; +} +.Exclusive { + stroke: #800080; + fill: #800080; +} +.Preclusive { + stroke: #0000FF; + fill: #0000FF; +} diff --git a/web/skins/classic/css/classic/views/zones.css b/web/skins/classic/css/classic/views/zones.css new file mode 100644 index 000000000..9952e5db4 --- /dev/null +++ b/web/skins/classic/css/classic/views/zones.css @@ -0,0 +1,20 @@ +.zones polygon { + fill-opacity: 0.25; + stroke-width: 2px; +} +.Active { + stroke: #ff0000; + fill: #ff0000; +} +.Inclusive { + stroke: #FFA500; + fill: #FFA500; +} +.Exclusive { + stroke: #800080; + fill: #800080; +} +.Preclusive { + stroke: #0000FF; + fill: #0000FF; +} diff --git a/web/skins/classic/css/dark/Makefile.am b/web/skins/classic/css/dark/Makefile.am deleted file mode 100644 index 6961860eb..000000000 --- a/web/skins/classic/css/dark/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/css/dark - -SUBDIRS = views - -dist_web_DATA = \ - skin.css \ - control.css \ - export.css diff --git a/web/skins/classic/css/dark/views/Makefile.am b/web/skins/classic/css/dark/views/Makefile.am deleted file mode 100644 index 2180d6432..000000000 --- a/web/skins/classic/css/dark/views/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/css/dark/views - -dist_web_DATA = \ - console.css \ - controlcaps.css \ - control.css \ - devices.css \ - event.css \ - events.css \ - export.css \ - filter.css \ - frame.css \ - frames.css \ - groups.css \ - log.css \ - monitor.css \ - montage_2wide.css \ - montage_3wide50enlarge.css \ - montage_3wide.css \ - montage_4wide.css \ - montage.css \ - montage_freeform.css \ - options.css \ - stats.css \ - timeline.css \ - timeline.css.php \ - video.css \ - watch.css \ - zone.css diff --git a/web/skins/classic/css/dark/views/zone.css b/web/skins/classic/css/dark/views/zone.css index a86c5d1e4..52611f5ea 100644 --- a/web/skins/classic/css/dark/views/zone.css +++ b/web/skins/classic/css/dark/views/zone.css @@ -93,3 +93,23 @@ #zonePoints table a { margin: 0 2px; } +.zones polygon { + fill-opacity: 0.25; + stroke-width: 2px; +} +.Active { + stroke: #ff0000; + fill: #ff0000; +} +.Inclusive { + stroke: #FFA500; + fill: #FFA500; +} +.Exclusive { + stroke: #800080; + fill: #800080; +} +.Preclusive { + stroke: #0000FF; + fill: #0000FF; +} diff --git a/web/skins/classic/css/dark/views/zones.css b/web/skins/classic/css/dark/views/zones.css new file mode 100644 index 000000000..9952e5db4 --- /dev/null +++ b/web/skins/classic/css/dark/views/zones.css @@ -0,0 +1,20 @@ +.zones polygon { + fill-opacity: 0.25; + stroke-width: 2px; +} +.Active { + stroke: #ff0000; + fill: #ff0000; +} +.Inclusive { + stroke: #FFA500; + fill: #FFA500; +} +.Exclusive { + stroke: #800080; + fill: #800080; +} +.Preclusive { + stroke: #0000FF; + fill: #0000FF; +} diff --git a/web/skins/classic/css/flat/Makefile.am b/web/skins/classic/css/flat/Makefile.am deleted file mode 100644 index 297982929..000000000 --- a/web/skins/classic/css/flat/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/css/flat - -SUBDIRS = views - -dist_web_DATA = \ - skin.css \ - control.css \ - export.css diff --git a/web/skins/classic/css/flat/views/Makefile.am b/web/skins/classic/css/flat/views/Makefile.am deleted file mode 100644 index dff0aa29b..000000000 --- a/web/skins/classic/css/flat/views/Makefile.am +++ /dev/null @@ -1,31 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/css/flat/views - -dist_web_DATA = \ - console.css \ - controlcaps.css \ - control.css \ - devices.css \ - event.css \ - events.css \ - export.css \ - filter.css \ - frame.css \ - frames.css \ - groups.css \ - log.css \ - monitor.css \ - montage_2wide.css \ - montage_3wide50enlarge.css \ - montage_3wide.css \ - montage_4wide.css \ - montage.css \ - montage_freeform.css \ - options.css \ - stats.css \ - timeline.css \ - timeline.css.php \ - video.css \ - watch.css \ - zone.css diff --git a/web/skins/classic/css/flat/views/zone.css b/web/skins/classic/css/flat/views/zone.css index a86c5d1e4..52611f5ea 100644 --- a/web/skins/classic/css/flat/views/zone.css +++ b/web/skins/classic/css/flat/views/zone.css @@ -93,3 +93,23 @@ #zonePoints table a { margin: 0 2px; } +.zones polygon { + fill-opacity: 0.25; + stroke-width: 2px; +} +.Active { + stroke: #ff0000; + fill: #ff0000; +} +.Inclusive { + stroke: #FFA500; + fill: #FFA500; +} +.Exclusive { + stroke: #800080; + fill: #800080; +} +.Preclusive { + stroke: #0000FF; + fill: #0000FF; +} diff --git a/web/skins/classic/css/flat/views/zones.css b/web/skins/classic/css/flat/views/zones.css new file mode 100644 index 000000000..9952e5db4 --- /dev/null +++ b/web/skins/classic/css/flat/views/zones.css @@ -0,0 +1,20 @@ +.zones polygon { + fill-opacity: 0.25; + stroke-width: 2px; +} +.Active { + stroke: #ff0000; + fill: #ff0000; +} +.Inclusive { + stroke: #FFA500; + fill: #FFA500; +} +.Exclusive { + stroke: #800080; + fill: #800080; +} +.Preclusive { + stroke: #0000FF; + fill: #0000FF; +} diff --git a/web/skins/classic/graphics/Makefile.am b/web/skins/classic/graphics/Makefile.am deleted file mode 100644 index c5c7b6bba..000000000 --- a/web/skins/classic/graphics/Makefile.am +++ /dev/null @@ -1,23 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/graphics - -dist_web_DATA = \ - arrow-d.gif \ - arrow-dl.gif \ - arrow-dr.gif \ - arrow-l-d.gif \ - arrow-l.gif \ - arrow-l-u.gif \ - arrow-r.gif \ - arrow-s-d.gif \ - arrow-s-u.gif \ - arrow-u.gif \ - arrow-ul.gif \ - arrow-ur.gif \ - center.gif \ - point-g.gif \ - point-o.gif \ - point-r.gif \ - seq-d.gif \ - seq-u.gif diff --git a/web/skins/classic/includes/Makefile.am b/web/skins/classic/includes/Makefile.am deleted file mode 100644 index 690df231a..000000000 --- a/web/skins/classic/includes/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/includes - -dist_web_DATA = \ - init.php \ - config.php \ - functions.php \ - control_functions.php \ - export_functions.php \ - timeline_functions.php diff --git a/web/skins/classic/js/Makefile.am b/web/skins/classic/js/Makefile.am deleted file mode 100644 index 3f5ffdda2..000000000 --- a/web/skins/classic/js/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/js - -dist_web_DATA = \ - skin.js \ - classic.js \ - dark.js \ - flat.js \ - skin.js.php diff --git a/web/skins/classic/lang/Makefile.am b/web/skins/classic/lang/Makefile.am deleted file mode 100644 index 6a089b4fa..000000000 --- a/web/skins/classic/lang/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/lang - -dist_web_DATA = # No files here diff --git a/web/skins/classic/views/Makefile.am b/web/skins/classic/views/Makefile.am deleted file mode 100644 index 4167a886b..000000000 --- a/web/skins/classic/views/Makefile.am +++ /dev/null @@ -1,57 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -SUBDIRS = \ - js - -webdir = @WEB_PREFIX@/skins/classic/views - -dist_web_DATA = \ - bandwidth.php \ - blank.php \ - console.php \ - controlcap.php \ - controlcaps.php \ - control.php \ - controlpreset.php \ - cycle.php \ - device.php \ - devices.php \ - donate.php \ - error.php \ - eventdetail.php \ - event.php \ - events.php \ - export.php \ - filter.php \ - filtersave.php \ - frame.php \ - frames.php \ - function.php \ - group.php \ - groups.php \ - log.php \ - login.php \ - logout.php \ - Makefile.am \ - monitor.php \ - monitorpreset.php \ - monitorprobe.php \ - montage.php \ - montagereview.php \ - none.php \ - onvifprobe.php \ - optionhelp.php \ - options.php \ - postlogin.php \ - server.php \ - settings.php \ - state.php \ - stats.php \ - status.php \ - timeline.php \ - user.php \ - version.php \ - video.php \ - watch.php \ - zone.php \ - zones.php diff --git a/web/skins/classic/views/console.php b/web/skins/classic/views/console.php index 070c85b59..dbf0ea2f4 100644 --- a/web/skins/classic/views/console.php +++ b/web/skins/classic/views/console.php @@ -77,8 +77,8 @@ $run_state = dbFetchOne('select Name from States where IsActive = 1', 'Name' ); $group = NULL; if ( ! empty($_COOKIE['zmGroup']) ) { - if ( $group = dbFetchOne( 'select * from Groups where Id = ?', NULL, array($_COOKIE['zmGroup'])) ) - $groupIds = array_flip(explode( ',', $group['MonitorIds'] )); + if ( $group = dbFetchOne( 'select * from Groups where Id = ?', NULL, array($_COOKIE['zmGroup'])) ) + $groupIds = array_flip(explode( ',', $group['MonitorIds'] )); } noCacheHeaders(); @@ -182,6 +182,7 @@ $seqDownFile = getSkinFile( 'graphics/seq-d.gif' ); $versionClass = (ZM_DYN_DB_VERSION&&(ZM_DYN_DB_VERSION!=ZM_VERSION))?'errorText':''; + xhtmlHeaders( __FILE__, translate('Console') ); ?> @@ -243,7 +244,7 @@ else - + - + + '.translate('Fn'.$monitor['Function']).( empty($monitor['Enabled']) ? ', disabled' : '' ) .'', canEdit( 'Monitors' ) ) ?> - Name(); ?> @@ -330,9 +332,9 @@ echo $Server->Name(); '.$shortpath.'', canEdit( 'Monitors' ) ) ?> diff --git a/web/skins/classic/views/event.php b/web/skins/classic/views/event.php index a0b97e35e..d3a185f33 100644 --- a/web/skins/classic/views/event.php +++ b/web/skins/classic/views/event.php @@ -27,7 +27,7 @@ if ( !canView( 'Events' ) ) $eid = validInt( $_REQUEST['eid'] ); $fid = !empty($_REQUEST['fid'])?validInt($_REQUEST['fid']):1; -$sql = 'SELECT E.*,M.Name AS MonitorName,M.Width,M.Height,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'; +$sql = 'SELECT E.*,M.Name AS MonitorName,E.Width,E.Height,M.DefaultRate,M.DefaultScale FROM Events AS E INNER JOIN Monitors AS M ON E.MonitorId = M.Id WHERE E.Id = ?'; $sql_values = array( $eid ); if ( $user['MonitorIds'] ) { diff --git a/web/skins/classic/views/events.php b/web/skins/classic/views/events.php index 7d0669177..b7d707b22 100644 --- a/web/skins/classic/views/events.php +++ b/web/skins/classic/views/events.php @@ -66,13 +66,11 @@ if ( !empty($limit) && $nEvents > $limit ) $nEvents = $limit; } $pages = (int)ceil($nEvents/ZM_WEB_EVENTS_PER_PAGE); -if ( $pages > 1 ) { - if ( !empty($page) ) { - if ( $page < 0 ) - $page = 1; - if ( $page > $pages ) - $page = $pages; - } +if ( !empty($page) ) { + if ( $page < 0 ) + $page = 1; + if ( $page > $pages ) + $page = $pages; } if ( !empty($page) ) { $limitStart = (($page-1)*ZM_WEB_EVENTS_PER_PAGE); diff --git a/web/skins/classic/views/js/Makefile.am b/web/skins/classic/views/js/Makefile.am deleted file mode 100644 index 73c74fafe..000000000 --- a/web/skins/classic/views/js/Makefile.am +++ /dev/null @@ -1,50 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/classic/views/js - -dist_web_DATA = \ - console.js \ - console.js.php \ - control.js \ - controlpreset.js \ - controlpreset.js.php \ - cycle.js \ - cycle.js.php \ - devices.js \ - donate.js \ - donate.js.php \ - event.js \ - event.js.php \ - events.js \ - events.js.php \ - export.js \ - export.js.php \ - filter.js \ - filter.js.php \ - group.js \ - groups.js \ - log.js \ - login.js \ - Makefile.am \ - monitor.js \ - monitor.js.php \ - monitorpreset.js \ - monitorprobe.js \ - montage.js \ - montage.js.php \ - onvifprobe.js \ - options.js.php \ - postlogin.js.php \ - state.js \ - state.js.php \ - timeline.js \ - timeline.js.php \ - user.js \ - version.js \ - version.js.php \ - video.js \ - video.js.php \ - watch.js \ - watch.js.php \ - zone.js \ - zone.js.php diff --git a/web/skins/classic/views/js/console.js b/web/skins/classic/views/js/console.js index 5182a5fd5..99f175c23 100644 --- a/web/skins/classic/views/js/console.js +++ b/web/skins/classic/views/js/console.js @@ -1,3 +1,6 @@ +var jsTranslatedAddText; +var jsTranslatedCloneText; + function setButtonStates( element ) { var form = element.form; @@ -15,9 +18,36 @@ function setButtonStates( element ) } $(element).getParent( 'tr' ).toggleClass( 'highlight' ); form.editBtn.disabled = (checked!=1); + form.addBtn.value = (checked==1) ? jsTranslatedCloneText:jsTranslatedAddText; + form.deleteBtn.disabled = (checked==0); } +function addMonitor( element) +{ + + var form = element.form; + var dupParam; + var monitorId=-1; + if (form.addBtn.value == jsTranslatedCloneText) + { + // get the value of the first checkbox + for ( var i = 0; i < form.elements.length; i++ ) + { + if ( form.elements[i].type == "checkbox" ) + { + if ( form.elements[i].checked ) + { + monitorId = form.elements[i].value; + break; + } + } + } + } + dupParam = (monitorId == -1 ) ? '': '&dupId='+monitorId; + createPopup( '?view=monitor'+dupParam, 'zmMonitor0','monitor' ); +} + function editMonitor( element ) { var form = element.form; @@ -55,6 +85,8 @@ function reloadWindow() function initPage() { + jsTranslatedAddText = translatedAddText; + jsTranslatedCloneText = translatedCloneText; reloadWindow.periodical( consoleRefreshTimeout ); if ( showVersionPopup ) createPopup( '?view=version', 'zmVersion', 'version' ); diff --git a/web/skins/classic/views/js/console.js.php b/web/skins/classic/views/js/console.js.php index 93cf0cdb7..98417a985 100644 --- a/web/skins/classic/views/js/console.js.php +++ b/web/skins/classic/views/js/console.js.php @@ -26,7 +26,7 @@ elseif ( ZM_DYN_SHOW_DONATE_REMINDER ) ?> var showVersionPopup = ; var showDonatePopup = ; - - +var translatedAddText = ""; +var translatedCloneText = ""; diff --git a/web/skins/classic/views/js/montage.js b/web/skins/classic/views/js/montage.js index fe4559201..1367bc8b1 100644 --- a/web/skins/classic/views/js/montage.js +++ b/web/skins/classic/views/js/montage.js @@ -35,6 +35,7 @@ function Monitor( index, id, connKey ) if ( this.streamCmdTimer ) this.streamCmdTimer = clearTimeout( this.streamCmdTimer ); + var stream = document.getElementById( "liveStream"+this.id ); if ( respObj.result == 'Ok' ) { this.status = respObj.status; @@ -57,7 +58,6 @@ function Monitor( index, id, connKey ) this.setStateClass( $('monitor'+this.index), stateClass ); /*Stream could be an applet so can't use moo tools*/ - var stream = document.getElementById( "liveStream"+this.id ); stream.className = stateClass; var isAlarmed = ( this.alarmState == STATE_ALARM || this.alarmState == STATE_ALERT ); @@ -90,6 +90,10 @@ function Monitor( index, id, connKey ) else { console.error( respObj.message ); + // Try to reload the image stream. + if ( stream ) + stream.src = stream.src.replace(/rand=\d+/i,'rand='+Math.floor((Math.random() * 1000000) )); + } var streamCmdTimeout = statusRefreshTimeout; if ( this.alarmState == STATE_ALARM || this.alarmState == STATE_ALERT ) diff --git a/web/skins/classic/views/js/watch.js b/web/skins/classic/views/js/watch.js index 9c39c897a..264a4b65f 100644 --- a/web/skins/classic/views/js/watch.js +++ b/web/skins/classic/views/js/watch.js @@ -37,9 +37,14 @@ function changeScale() /*Stream could be an applet so can't use moo tools*/ var streamImg = document.getElementById('liveStream'); - streamImg.style.width = newWidth + "px"; - streamImg.style.height = newHeight + "px"; + if ( streamImg ) { + streamImg.style.width = newWidth + "px"; + streamImg.style.height = newHeight + "px"; + streamImg.src = streamImg.src.replace(/scale=\d+/i,'scale='+scale); + } else { + console.error("No element found for liveStream."); + } } var alarmState = STATE_IDLE; @@ -205,8 +210,13 @@ function getStreamCmdResponse( respObj, respText ) $('enableDisableAlarms').removeClass( 'hidden' ); } } - else + else { checkStreamForErrors("getStreamCmdResponse",respObj);//log them + // Try to reload the image stream. + var streamImg = document.getElementById('liveStream'); + if ( streamImg ) + streamImg.src = streamImg.src.replace(/rand=\d+/i,'rand='+Math.floor((Math.random() * 1000000) )); + } var streamCmdTimeout = statusRefreshTimeout; if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) diff --git a/web/skins/classic/views/js/zone.js b/web/skins/classic/views/js/zone.js index 43d51e3a8..a5d666e69 100644 --- a/web/skins/classic/views/js/zone.js +++ b/web/skins/classic/views/js/zone.js @@ -304,19 +304,6 @@ function unsetActivePoint( index ) $('point'+index).removeClass( 'active' ); } -function updateZoneImageResponse( respObj, respText ) -{ - if ( respObj.result == 'Ok' ) - { - document.zoneForm.elements['submitBtn'].disabled = ( selfIntersecting = respObj.selfIntersecting ); - document.zoneForm.elements['newZone[Area]'].value = zone.Area = respObj.area; - if ( document.zoneForm.elements['newZone[Units]'].value == 'Pixels' ) - document.zoneForm.elements['newZone[TempArea]'].value = document.zoneForm.elements['newZone[Area]'].value; - - var newImage = new Asset.image( respObj.zoneImage, { 'onload': function() { $('zoneImage').src = newImage.src; } } ); - } -} - function getCoordString() { var coords = new Array(); @@ -327,9 +314,15 @@ function getCoordString() function updateZoneImage() { - var parms = "view=request&request=zone&action=zoneImage&mid="+zone.MonitorId+"&zid="+zone.Id+"&coords="+getCoordString(); - var query = new Request.JSON( { url: thisUrl, method: 'post', timeout: AJAX_TIMEOUT, data: parms, onSuccess: updateZoneImageResponse } ); - query.send(); + var SVG = $('zoneSVG'); + var Poly = $('zonePoly'); + Poly.points.clear(); + for ( var i = 0; i < zone['Points'].length; i++ ) { + var Point = SVG.createSVGPoint(); + Point.x = zone['Points'][i].x; + Point.y = zone['Points'][i].y; + Poly.points.appendItem( Point ); + } } function fixActivePoint( index ) @@ -360,6 +353,10 @@ function updateActivePoint( index ) $('newZone[Points]['+index+'][y]').value = y; zone['Points'][index].x = x; zone['Points'][index].y = y; + var Point = $('zonePoly').points.getItem(index); + Point.x =x; + Point.y =y; + } function addPoint( index ) @@ -374,6 +371,7 @@ function addPoint( index ) else zone['Points'].splice( nextIndex, 0, { 'x': newX, 'y': newY } ); drawZonePoints(); + updateZoneImage(); //setActivePoint( nextIndex ); } @@ -397,8 +395,9 @@ function updateX( index ) point.setStyle( 'left', x+'px' ); zone['Points'][index].x = x; - - updateZoneImage(); + var Point = $('zonePoly').points.getItem(index); + Point.x =x; + Point.y =y; } function updateY( index ) @@ -410,8 +409,9 @@ function updateY( index ) point.setStyle( 'top', y+'px' ); zone['Points'][index].y = y; - - updateZoneImage(); + var Point = $('zonePoly').points.getItem(index); + Point.x =x; + Point.y =y; } function saveChanges( element ) @@ -471,10 +471,215 @@ function drawZonePoints() row.inject( tables[i%tables.length].getElement( 'tbody' ) ); } + // Sets up the SVG polygon + updateZoneImage(); } -function initPage() +// +// Imported from watch.js and modified for new zone edit view +// + +var alarmState = STATE_IDLE; +var lastAlarmState = STATE_IDLE; + +function setAlarmState( currentAlarmState ) { + alarmState = currentAlarmState; + + var stateString = "Unknown"; + var stateClass = ""; + if ( alarmState == STATE_ALARM ) + stateClass = "alarm"; + else if ( alarmState == STATE_ALERT ) + stateClass = "alert"; + $('stateValue').set( 'text', stateStrings[alarmState] ); + if ( stateClass ) + $('stateValue').setProperty( 'class', stateClass ); + else + $('stateValue').removeProperty( 'class' ); + + var isAlarmed = ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ); + var wasAlarmed = ( lastAlarmState == STATE_ALARM || lastAlarmState == STATE_ALERT ); + + var newAlarm = ( isAlarmed && !wasAlarmed ); + var oldAlarm = ( !isAlarmed && wasAlarmed ); + + if ( newAlarm ) + { + if ( SOUND_ON_ALARM ) + { + // Enable the alarm sound + if ( !canPlayPauseAudio ) + $('alarmSound').removeClass( 'hidden' ); + else + $('MediaPlayer').Play(); + } + } + if ( SOUND_ON_ALARM ) + { + if ( oldAlarm ) + { + // Disable alarm sound + if ( !canPlayPauseAudio ) + $('alarmSound').addClass( 'hidden' ); + else + $('MediaPlayer').Stop(); + } + } + lastAlarmState = alarmState; +} + +var streamCmdParms = "view=request&request=stream&connkey="+connKey; +var streamCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: getStreamCmdResponse } ); +var streamCmdTimer = null; + +var streamStatus; + +function getStreamCmdResponse( respObj, respText ) { + watchdogOk("stream"); + if ( streamCmdTimer ) + streamCmdTimer = clearTimeout( streamCmdTimer ); + + if ( respObj.result == 'Ok' ) { + streamStatus = respObj.status; + $('fpsValue').set( 'text', streamStatus.fps ); + + setAlarmState( streamStatus.state ); + + var delayString = secsToTime( streamStatus.delay ); + + if ( streamStatus.paused == true ) + { + streamCmdPause( false ); + } else if ( streamStatus.delayed == true && streamStatus.rate == 1 ) { + streamCmdPlay( false ); + } + } else { + checkStreamForErrors("getStreamCmdResponse",respObj);//log them + // Try to reload the image stream. + var streamImg = document.getElementById('liveStream'); + if ( streamImg ) + streamImg.src = streamImg.src.replace(/rand=\d+/i,'rand='+Math.floor((Math.random() * 1000000) )); + } + + var streamCmdTimeout = statusRefreshTimeout; + if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) + streamCmdTimeout = streamCmdTimeout/5; + streamCmdTimer = streamCmdQuery.delay( streamCmdTimeout ); +} + +var streamPause = false; + +function streamCmdPauseToggle() { + if ( streamPause == true ) { + streamCmdPlay( true ); + streamPause = false; + document.getElementById("pauseBtn").value = pauseString; + } else { + streamCmdPause( true ); + streamPause = true; + document.getElementById("pauseBtn").value = playString; + } +} + +function streamCmdPause( action ) { + if ( action ) + streamCmdReq.send( streamCmdParms+"&command="+CMD_PAUSE ); +} + +function streamCmdPlay( action ) { + if ( action ) + streamCmdReq.send( streamCmdParms+"&command="+CMD_PLAY ); +} + +function streamCmdStop( action ) { + if ( action ) + streamCmdReq.send( streamCmdParms+"&command="+CMD_STOP ); +} + +function streamCmdQuery() { + streamCmdReq.send( streamCmdParms+"&command="+CMD_QUERY ); +} + +var statusCmdParms = "view=request&request=status&entity=monitor&id="+monitorId+"&element[]=Status&element[]=FrameRate"; +var statusCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', data: statusCmdParms, timeout: AJAX_TIMEOUT, link: 'cancel', onSuccess: getStatusCmdResponse } ); +var statusCmdTimer = null; + +function getStatusCmdResponse( respObj, respText ) { + watchdogOk("status"); + if ( statusCmdTimer ) + statusCmdTimer = clearTimeout( statusCmdTimer ); + + if ( respObj.result == 'Ok' ) + { + $('fpsValue').set( 'text', respObj.monitor.FrameRate ); + setAlarmState( respObj.monitor.Status ); + } + else + checkStreamForErrors("getStatusCmdResponse",respObj); + + var statusCmdTimeout = statusRefreshTimeout; + if ( alarmState == STATE_ALARM || alarmState == STATE_ALERT ) + statusCmdTimeout = statusCmdTimeout/5; + statusCmdTimer = statusCmdQuery.delay( statusCmdTimeout ); +} + +function statusCmdQuery() { + statusCmdReq.send(); +} + +var tempImage = null; + +function fetchImage( streamImage ) { + var now = new Date(); + if ( !tempImage ) + tempImage = new Element( 'img' ); + tempImage.setProperty( 'src', streamSrc+'&'+now.getTime() ); + $(streamImage).setProperty( 'src', tempImage.getProperty( 'src' ) ); +} + +function appletRefresh() { + if ( streamStatus && (!streamStatus.paused && !streamStatus.delayed) ) + { + var streamImg = $('liveStream'); + var parent = streamImg.getParent(); + streamImg.dispose(); + streamImg.inject( parent ); + if ( appletRefreshTime ) + appletRefresh.delay( appletRefreshTime*1000 ); + } + else + { + appletRefresh.delay( 15*1000 ); //if we are paused or delayed check every 15 seconds if we are live yet... + } +} + +var watchdogInactive = { + 'stream': false, + 'status': false +}; + +var watchdogFunctions = { + 'stream': streamCmdQuery, + 'status': statusCmdQuery +}; + +//Make sure the various refreshes are still taking effect +function watchdogCheck( type ) { + if ( watchdogInactive[type] ) { + console.log( "Detected streamWatch of type: " + type + " stopped, restarting" ); + watchdogFunctions[type](); + watchdogInactive[type] = false; + } else { + watchdogInactive[type] = true; + } +} + +function watchdogOk( type ) { + watchdogInactive[type] = false; +} + +function initPage() { var form = document.zoneForm; //form.elements['newZone[Name]'].disabled = true; @@ -501,13 +706,37 @@ function initPage() applyZoneType(); - if ( form.elements['newZone[Units]'].value == 'Percent' ) - { + if ( form.elements['newZone[Units]'].value == 'Percent' ) { applyZoneUnits(); } applyCheckMethod(); drawZonePoints(); + +// +// Imported from watch.js and modified for new zone edit view +// + + if ( streamMode == "single" ) { + statusCmdTimer = statusCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout ); + watchdogCheck.pass('status').periodical(statusRefreshTimeout*2); + } else { + streamCmdTimer = streamCmdQuery.delay( (Math.random()+0.1)*statusRefreshTimeout ); + watchdogCheck.pass('stream').periodical(statusRefreshTimeout*2); + } + + if ( canStreamNative || streamMode == "single" ) { + var streamImg = $('imageFrame').getElement('img'); + if ( !streamImg ) + streamImg = $('imageFrame').getElement('object'); + if ( streamMode == "single" ) { + streamImg.addEvent( 'click', fetchImage.pass( streamImg ) ); + fetchImage.pass( streamImg ).periodical( imageRefreshTimeout ); + } + } + + if ( refreshApplet && appletRefreshTime ) + appletRefresh.delay( appletRefreshTime*1000 ); } window.addEvent( 'domready', initPage ); diff --git a/web/skins/classic/views/js/zone.js.php b/web/skins/classic/views/js/zone.js.php index 7e3145378..85f606d2a 100644 --- a/web/skins/classic/views/js/zone.js.php +++ b/web/skins/classic/views/js/zone.js.php @@ -46,8 +46,8 @@ zone['Points'][] = { 'x': -var maxX = ; -var maxY = ; +var maxX = Width()-1 ?>; +var maxY = Height()-1 ?>; var selfIntersecting = ; var selfIntersectingString = ''; @@ -65,3 +65,55 @@ var minBlobAreaLtMaxString = ''; var minBlobsUnsetString = ''; var minBlobsLtMaxString = ''; + +// +// Imported from watch.js.php and modified for new zone edit view +// + +var STATE_IDLE = ; +var STATE_PREALARM = ; +var STATE_ALARM = ; +var STATE_ALERT = ; +var STATE_TAPE = ; + +var stateStrings = new Array(); +stateStrings[STATE_IDLE] = ""; +stateStrings[STATE_PREALARM] = ""; +stateStrings[STATE_ALARM] = ""; +stateStrings[STATE_ALERT] = ""; +stateStrings[STATE_TAPE] = ""; + +var pauseString = ""; +var playString = ""; + +var deleteString = ""; + +var CMD_PAUSE = ; +var CMD_PLAY = ; +var CMD_STOP = ; +var CMD_QUERY = ; + +var SCALE_BASE = ; + +var SOUND_ON_ALARM = ; + +var streamMode = ""; + +var connKey = ''; + +var monitorId = Id() ?>; +var monitorUrl = 'Server()->Url() ) ?>'; + +var streamSrc = ""; + +var statusRefreshTimeout = ; +var imageRefreshTimeout = ; + +var canEditMonitors = ; +var canStreamNative = ; + +var canPlayPauseAudio = Browser.ie; + +var refreshApplet = ; +var appletRefreshTime = ; + diff --git a/web/skins/classic/views/js/zones.js b/web/skins/classic/views/js/zones.js new file mode 100644 index 000000000..b453ab4f5 --- /dev/null +++ b/web/skins/classic/views/js/zones.js @@ -0,0 +1,8 @@ +var streamCmdParms = "view=request&request=stream&connkey="+connKey; +var streamCmdReq = new Request.JSON( { url: monitorUrl+thisUrl, method: 'post', timeout: AJAX_TIMEOUT, link: 'cancel' } ); + +function streamCmdQuit( action ) { + if ( action ) + streamCmdReq.send( streamCmdParms+"&command="+CMD_QUIT ); +} + diff --git a/web/skins/classic/views/js/zones.js.php b/web/skins/classic/views/js/zones.js.php new file mode 100644 index 000000000..ca234085e --- /dev/null +++ b/web/skins/classic/views/js/zones.js.php @@ -0,0 +1,4 @@ +var connKey = ''; +var monitorUrl = 'Server()->Url() ) ?>'; +var CMD_QUIT = ; + diff --git a/web/skins/classic/views/monitor.php b/web/skins/classic/views/monitor.php index c55d77187..9f4375eae 100644 --- a/web/skins/classic/views/monitor.php +++ b/web/skins/classic/views/monitor.php @@ -42,11 +42,11 @@ if ( isset($_REQUEST['tab']) ) else $tab = "general"; - $Server = null; + $Server = null; if ( defined( 'ZM_SERVER_ID' ) ) { $Server = dbFetchOne( 'SELECT * FROM Servers WHERE Id=?', NULL, array( ZM_SERVER_ID ) ); - } - if ( ! $Server ) { + } + if ( ! $Server ) { $Server = array( 'Id' => '' ); } @@ -56,74 +56,11 @@ if ( ! empty($_REQUEST['mid']) ) { $x10Monitor = dbFetchOne( 'SELECT * FROM TriggersX10 WHERE MonitorId = ?', NULL, array($_REQUEST['mid']) ); } else { - $nextId = getTableAutoInc( 'Monitors' ); - $monitor = array( - 'Id' => 0, - 'Name' => translate('Monitor').'-'.$nextId, - 'Function' => "Monitor", - 'Enabled' => true, - 'LinkedMonitors' => "", - 'Type' => "", - 'Device' => "/dev/video0", - 'Channel' => "0", - 'Format' => 0x000000ff, - 'Protocol' => "", - 'Method' => "", - 'Host' => "", - 'Path' => "", - 'Options' => "", - 'Port' => "80", - 'User' => "", - 'Pass' => "", - 'Colours' => 3, - 'Palette' => 0, - 'Width' => "320", - 'Height' => "240", - 'Orientation' => "0", - 'Deinterlacing' => 0, - 'RTSPDescribe' => 0, - 'LabelFormat' => '%N - %d/%m/%y %H:%M:%S', - 'LabelX' => 0, - 'LabelY' => 0, - 'LabelSize' => 1, - 'ImageBufferCount' => 50, - 'WarmupCount' => 25, - 'PreEventCount' => 25, - 'PostEventCount' => 25, - 'StreamReplayBuffer' => 1000, - 'AlarmFrameCount' => 1, - 'Controllable' => 0, - 'ControlId' => "", - 'ControlType' => 0, - 'ControlDevice' => "", - 'ControlAddress' => "", - 'AutoStopTimeout' => "", - 'TrackMotion' => 0, - 'TrackDelay' => "", - 'ReturnLocation' => -1, - 'ReturnDelay' => "", - 'SectionLength' => 600, - 'FrameSkip' => 0, - 'MotionFrameSkip' => 0, - 'EventPrefix' => 'Event-', - 'AnalysisFPS' => "", - 'AnalysisUpdateDelay' => 0, - 'MaxFPS' => "", - 'AlarmMaxFPS' => "", - 'FPSReportInterval' => 1000, - 'RefBlendPerc' => 6, - 'AlarmRefBlendPerc' => 6, - 'DefaultView' => 'Events', - 'DefaultRate' => '100', - 'DefaultScale' => '100', - 'SignalCheckColour' => '#0000c0', - 'WebColour' => 'red', - 'Exif' => '0', - 'Triggers' => "", - 'V4LMultiBuffer' => '', - 'V4LCapturesPerFrame' => 1, - 'ServerId' => $Server['Id'], - ); + $nextId = getTableAutoInc( 'Monitors' ); + $monitor = getMonitorObject($_REQUEST['dupId']); + $clonedName = $monitor['Name']; + $monitor['Name'] = translate('Monitor').'-'.$nextId; + $monitor['Id']='0'; } if ( ZM_OPT_X10 && empty($x10Monitor) ) @@ -135,6 +72,85 @@ if ( ZM_OPT_X10 && empty($x10Monitor) ) ); } +function getMonitorObject( $mid = null) +{ + if ($mid !== null) + { + $monitor = dbFetchMonitor($mid); + } + else + { + $monitor = array( + 'Id' => 0, + 'Name' => "willbereplaced", + 'Function' => "Monitor", + 'Enabled' => true, + 'LinkedMonitors' => "", + 'Type' => "", + 'Device' => "/dev/video0", + 'Channel' => "0", + 'Format' => 0x000000ff, + 'Protocol' => "", + 'Method' => "", + 'Host' => "", + 'Path' => "", + 'Options' => "", + 'Port' => "80", + 'User' => "", + 'Pass' => "", + 'Colours' => 3, + 'Palette' => 0, + 'Width' => "320", + 'Height' => "240", + 'Orientation' => "0", + 'Deinterlacing' => 0, + 'RTSPDescribe' => 0, + 'LabelFormat' => '%N - %d/%m/%y %H:%M:%S', + 'LabelX' => 0, + 'LabelY' => 0, + 'LabelSize' => 1, + 'ImageBufferCount' => 50, + 'WarmupCount' => 25, + 'PreEventCount' => 25, + 'PostEventCount' => 25, + 'StreamReplayBuffer' => 1000, + 'AlarmFrameCount' => 1, + 'Controllable' => 0, + 'ControlId' => "", + 'ControlType' => 0, + 'ControlDevice' => "", + 'ControlAddress' => "", + 'AutoStopTimeout' => "", + 'TrackMotion' => 0, + 'TrackDelay' => "", + 'ReturnLocation' => -1, + 'ReturnDelay' => "", + 'SectionLength' => 600, + 'FrameSkip' => 0, + 'MotionFrameSkip' => 0, + 'EventPrefix' => 'Event-', + 'AnalysisFPS' => "", + 'AnalysisUpdateDelay' => 0, + 'MaxFPS' => "", + 'AlarmMaxFPS' => "", + 'FPSReportInterval' => 1000, + 'RefBlendPerc' => 6, + 'AlarmRefBlendPerc' => 6, + 'DefaultView' => 'Events', + 'DefaultRate' => '100', + 'DefaultScale' => '100', + 'SignalCheckColour' => '#0000c0', + 'WebColour' => 'red', + 'Exif' => '0', + 'Triggers' => "", + 'V4LMultiBuffer' => '', + 'V4LCapturesPerFrame' => 1, + 'ServerId' => $Server['Id'], + ); + } + return ($monitor); +} + function fourcc( $a, $b, $c, $d ) { return( ord($a) | (ord($b) << 8) | (ord($c) << 16) | (ord($d) << 24) ); @@ -450,16 +466,31 @@ xhtmlHeaders(__FILE__, translate('Monitor')." - ".validHtmlStr($monitor['Name']) if ( canEdit( 'Monitors' ) ) { ?> + + + +
+ Configuration cloned from Monitor: +
+ + +
- - - + + +
'None'); - $result = dbQuery( 'SELECT * FROM Servers ORDER BY Name'); - $results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Server' ); - foreach ( $results as $row => $server_obj ) { - $servers[$server_obj->Id] = $server_obj->Name(); - } + $servers = array(''=>'None'); + $result = dbQuery( 'SELECT * FROM Servers ORDER BY Name'); + $results = $result->fetchALL(PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'Server' ); + foreach ( $results as $row => $server_obj ) { + $servers[$server_obj->Id] = $server_obj->Name(); + } ?> - + @@ -775,15 +806,15 @@ switch ( $tab ) - - /> - - /> - - /> - - - + + /> + + /> + + /> + + + - + -  () +  () @@ -956,8 +987,9 @@ switch ( $tab )
disabled="disabled"/>
+ - + diff --git a/web/skins/classic/views/options.php b/web/skins/classic/views/options.php index 9c3b4a418..1140b7bfd 100644 --- a/web/skins/classic/views/options.php +++ b/web/skins/classic/views/options.php @@ -42,8 +42,6 @@ $tabs['x10'] = translate('X10'); $tabs['highband'] = translate('HighBW'); $tabs['medband'] = translate('MediumBW'); $tabs['lowband'] = translate('LowBW'); -$tabs['phoneband'] = translate('PhoneBW'); -$tabs['eyeZm'] = "eyeZm"; $tabs['users'] = translate('Users'); if ( isset($_REQUEST['tab']) ) diff --git a/web/skins/classic/views/zone.php b/web/skins/classic/views/zone.php index 69c0919e9..498ea5502 100644 --- a/web/skins/classic/views/zone.php +++ b/web/skins/classic/views/zone.php @@ -29,7 +29,7 @@ $zid = !empty($_REQUEST['zid'])?validInt($_REQUEST['zid']):0; $scale = SCALE_BASE; -$hicolor = "0x00ff00"; // Green +$hicolor = '0x00ff00'; // Green $presets = array(); $presetNames = array(); @@ -59,28 +59,28 @@ foreach ( getEnumValues( 'Zones', 'CheckMethod' ) as $optCheckMethod ) $optCheckMethods[$optCheckMethod] = $optCheckMethod; } -$monitor = dbFetchMonitor ( $mid ); +$monitor = new Monitor( $mid ); $minX = 0; -$maxX = $monitor['Width']-1; +$maxX = $monitor->Width()-1; $minY = 0; -$maxY = $monitor['Height']-1; +$maxY = $monitor->Height()-1; if ( !isset($newZone) ) { if ( $zid > 0 ) { - $zone = dbFetchOne( 'SELECT * FROM Zones WHERE MonitorId = ? AND Id=?', NULL, array( $monitor['Id'], $zid ) ); + $zone = dbFetchOne( 'SELECT * FROM Zones WHERE MonitorId = ? AND Id=?', NULL, array( $monitor->Id(), $zid ) ); } else { $zone = array( 'Name' => translate('New'), 'Id' => 0, - 'MonitorId' => $monitor['Id'], + 'MonitorId' => $monitor->Id(), 'NumCoords' => 4, 'Coords' => sprintf( "%d,%d %d,%d, %d,%d %d,%d", $minX, $minY, $maxX, $minY, $maxX, $maxY, $minX, $maxY ), - 'Area' => $monitor['Width'] * $monitor['Height'], + 'Area' => $monitor->Width() * $monitor->Height(), 'AlarmRGB' => 0xff0000, 'CheckMethod' => 'Blobs', 'MinPixelThreshold' => '', @@ -100,6 +100,7 @@ if ( !isset($newZone) ) ); } $zone['Points'] = coordsToPoints( $zone['Coords'] ); + $zone['AreaCoords'] = preg_replace( '/\s+/', ',', $zone['Coords'] ); $newZone = $zone; } @@ -115,23 +116,15 @@ $newZone['Coords'] = pointsToCoords( $newZone['Points'] ); $newZone['Area'] = getPolyArea( $newZone['Points'] ); $selfIntersecting = isSelfIntersecting( $newZone['Points'] ); -$wd = getcwd(); -chdir( ZM_DIR_IMAGES ); -$command = getZmuCommand( " -m ".$mid." -z" ); -$command .= '"'.$zid.' '.$hicolor.' '.$newZone['Coords'].'"'; -$status = exec( escapeshellcmd( $command ) ); -chdir( $wd ); - -$zoneImage = ZM_DIR_IMAGES.'/Zones'.$monitor['Id'].'.jpg?'.time(); - $focusWindow = true; +$connkey = generateConnKey(); xhtmlHeaders(__FILE__, translate('Zone') ); ?>
@@ -217,10 +210,15 @@ xhtmlHeaders(__FILE__, translate('Zone') );
-
- Zone Image +
+ + + + Sorry, your browser does not support inline SVG +
+
 -  fps
@@ -269,7 +267,7 @@ for ( $i = 0; $i < $pointCols; $i++ )
- disabled="disabled"/> + disabled="disabled"/>
diff --git a/web/skins/classic/views/zones.php b/web/skins/classic/views/zones.php index 9182dc98f..3aa776c6b 100644 --- a/web/skins/classic/views/zones.php +++ b/web/skins/classic/views/zones.php @@ -25,12 +25,7 @@ if ( !canView( 'Monitors' ) ) } $mid = validInt($_REQUEST['mid']); -$wd = getcwd(); -chdir( ZM_DIR_IMAGES ); -$status = exec( escapeshellcmd( getZmuCommand( " -m ".$mid." -z" ) ) ); -chdir( $wd ); - -$monitor = dbFetchMonitor( $mid ); +$monitor = new Monitor( $mid ); $zones = array(); foreach( dbFetchAll( 'select * from Zones where MonitorId = ? order by Area desc', NULL, array($mid) ) as $row ) @@ -42,7 +37,7 @@ foreach( dbFetchAll( 'select * from Zones where MonitorId = ? order by Area desc } } -$image = 'Zones'.$monitor['Id'].'.jpg'; +$connkey = generateConnKey(); xhtmlHeaders(__FILE__, translate('Zones') ); ?> @@ -53,18 +48,17 @@ xhtmlHeaders(__FILE__, translate('Zones') );

- + + - <?php echo htmlspecialchars($zone['Name']) ?> + - - - zones + Sorry, your browser does not support inline SVG +
@@ -84,9 +78,9 @@ foreach( $zones as $zone ) { ?> - + -  /  +  / Width()*$monitor->Height()) ) ?> disabled="disabled"/>
- disabled="disabled"/> + disabled="disabled"/>
diff --git a/web/skins/mobile/Makefile.am b/web/skins/mobile/Makefile.am deleted file mode 100644 index 35051fade..000000000 --- a/web/skins/mobile/Makefile.am +++ /dev/null @@ -1,14 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/mobile - -SUBDIRS = \ - ajax \ - css \ - graphics \ - includes \ - lang \ - views - -dist_web_DATA = \ - skin.php diff --git a/web/skins/mobile/ajax/Makefile.am b/web/skins/mobile/ajax/Makefile.am deleted file mode 100644 index 0558929c0..000000000 --- a/web/skins/mobile/ajax/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/mobile/ajax - -dist_web_DATA = # No files here diff --git a/web/skins/mobile/css/Makefile.am b/web/skins/mobile/css/Makefile.am deleted file mode 100644 index 6353e163e..000000000 --- a/web/skins/mobile/css/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/mobile/css - -dist_web_DATA = \ - skin.css diff --git a/web/skins/mobile/css/skin.css b/web/skins/mobile/css/skin.css deleted file mode 100644 index b996392a3..000000000 --- a/web/skins/mobile/css/skin.css +++ /dev/null @@ -1,311 +0,0 @@ -/* - * Primary look and feel styles - */ - -body { - font-family: Verdana, Arial, Helvetica, sans-serif; - font-size: 100%; - color: #333333; - font-weight: normal; - text-align: center; -} - -h1 { - font-family: inherit; - font-size: 120%; - color: #000066; - font-weight: bold; -} - -h2 { - font-family: inherit; - font-size: 110%; - color: #000066; - font-weight: bold; -} - -h3 { - font-family: inherit; - font-size: 100%; - color: #016A9D; - font-weight: bold; -} - -p { - font-family: inherit; - font-size: 100%; - color: #333333; - font-weight: normal; -} - -th { - font-weight: bold; - color: #016A9D; -} - -a:link { - color: #7F7FB2; - text-decoration: none; -} - -a:visited { - color: #7F7FB2; - text-decoration: none; -} - -a:hover { - color: #666699; - text-decoration: underline; -} - -label { - margin-right: 4px; -} - -input,textarea,select { - border: 1px #7F7FB2 solid; - font-family: inherit; - font-size: 100%; - color: #333333; -} - -input[type=text], input[type=password], textarea { - padding: 1px; -} - -input.noborder { - border: 0; -} - -input[disabled] { - color: #888888; -} - -img.normal { - border: white solid 1px; -} - -img.alarm { - border: red solid 1px; -} - -hr { - height: 1px; - width: 100%; - border: 0; - color: #7f7fb2; - background-color: #7f7fb2; -} - -/* - * Major league table for multiple inputs or presentation - */ - -#content table.major { - margin: 4px auto; - width: 100%; - border-collapse: collapse; -} - -#content table.major tr.highlight { - background-color: #eeeeee; -} - -#content table.major thead tr th { - padding-top: 6px; - padding-bottom: 6px; - vertical-align: middle; -} - -#content table.major tfoot td { - padding-top: 6px; - padding-bottom: 6px; - vertical-align: middle; -} - -#content table.major th, #content table.major td { - border: 1px solid #7f7fb2; - padding: 3px; - text-align: left; -} - -#content table.major th { - vertical-align: bottom; -} - -#content table.major td { - vertical-align: middle; -} - -#content table.major th[scope=row] { - padding: 4px 3px 3px; - vertical-align: top; - text-align: right; -} - -#content table.major .colMark, #content table.major .colSelect { - text-align: center; -} -/* - * Lesser table for very simple forms - */ - -#content table.minor { - width: 200px; - margin: 0 auto; -} - -#content table.minor td { - padding: 4px; -} - -#content table.minor .colLeft { - width: 50%; - text-align: right; -} - -#content table.minor .colRight { - width: 50%; - text-align: left; -} - -#content table.minor input[type=submit] -{ - margin-top: 4px; - padding: 0 2px; - font-size: 120%; -} - -/* - * Behavior classes - */ -.error { - /*font-family: Verdana, Arial, Helvetica, sans-serif;*/ - font-size: 100%; - color: #DC143C; - font-weight: bold; -} - -.warn { - /*font-family: Verdana, Arial, Helvetica, sans-serif;*/ - font-size: 100%; - color: #FF8C00; - font-weight: bold; -} - -.info { - /*font-family: Verdana, Arial, Helvetica, sans-serif;*/ - font-size: 100%; - color: #688E23; - font-weight: bold; -} - -.errorText { - color: #DC143C; -} - -.warnText { - color: #FF8C00; -} - -.infoText { - color: #688E23; -} - -.disabledText { - font-style: italic; -} - -/* - * Generic useful classes, especially with mootools - */ - -.hidden { - display: none; -} - -.invisible { - visibility: hidden; -} - -.nowrap { - white-space: nowrap; -} - -div.clear { - clear: both; -} - -/* - * Primary layout styles - */ - -#page { - width: 100%; -} - -#header { - width: 98%; - line-height: 24px; - margin: 4px auto 0; - clear: both; -} - -#header h2 { - left: 0; -} - -#headerControl { -} - -#headerButtons { - float: right; -} - -#headerButtons a { - margin-left: 8px; -} - -#content { - width: 98%; - margin: 4px auto; - line-height: 130%; - text-align: center; - clear: both; -} - -#contentTable { - width: 100%; -} - -#content p { - margin-top: 4px; -} - -#content p.textblock { - text-align: justify; - padding: 4px; -} - -#content > input[type=submit], #content > input[type=button] { - margin-top: 4px; -} - -#content table input[type=submit], #content table input[type=button] { - margin-top: 0; -} - -#contentButtons { - margin: 4px auto 0; -} - -#contentButtons input, #contentButtons a { - margin: 0 4px; -} - -#footer { - width: 98%; - margin: 4px auto 0; - clear: both; -} - diff --git a/web/skins/mobile/graphics/Makefile.am b/web/skins/mobile/graphics/Makefile.am deleted file mode 100644 index dfd43bef7..000000000 --- a/web/skins/mobile/graphics/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/mobile/graphics - -dist_web_DATA = # No files here diff --git a/web/skins/mobile/includes/Makefile.am b/web/skins/mobile/includes/Makefile.am deleted file mode 100644 index c88ad435a..000000000 --- a/web/skins/mobile/includes/Makefile.am +++ /dev/null @@ -1,9 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/mobile/includes - -dist_web_DATA = \ - init.php \ - config.php \ - functions.php \ - control_functions.php diff --git a/web/skins/mobile/includes/config.php b/web/skins/mobile/includes/config.php deleted file mode 100644 index fc1eba9bb..000000000 --- a/web/skins/mobile/includes/config.php +++ /dev/null @@ -1,63 +0,0 @@ - "50x", - "2000" => "20x", - "500" => "5x", - "200" => "2x", - "100" => translate('Real'), - "50" => "1/2x", -); - -$scales = array( - "400" => "4x", - "300" => "3x", - "200" => "2x", - "150" => "1.5x", - "100" => translate('Actual'), - "75" => "3/4x", - "50" => "1/2x", - "33" => "1/3x", - "25" => "1/4x", -); - -switch ( $_COOKIE['zmBandwidth'] ) -{ - case "phone" : // Very incomplete at present - { - define( "ZM_WEB_CAN_STREAM", ZM_WEB_P_CAN_STREAM ); // Override the automatic detection of browser streaming capability - define( "ZM_WEB_STREAM_METHOD", ZM_WEB_P_STREAM_METHOD ); // Which method should be used to send video streams to your brow - define( "ZM_WEB_DEFAULT_SCALE", ZM_WEB_P_DEFAULT_SCALE ); // What the default scaling factor applied to 'live' or 'event' views is (%) - define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_P_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) - define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_P_VIDEO_BITRATE ); // What the bitrate of any streamed video should be - define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_P_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be - define( "ZM_WEB_SCALE_THUMBS", ZM_WEB_P_SCALE_THUMBS ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling - define( "ZM_WEB_AJAX_TIMEOUT", ZM_WEB_P_AJAX_TIMEOUT ); // Timeout to use for Ajax requests, no timeout used if unset - - break; - } -} - -?> diff --git a/web/skins/mobile/includes/control_functions.php b/web/skins/mobile/includes/control_functions.php deleted file mode 100644 index 3a12cf467..000000000 --- a/web/skins/mobile/includes/control_functions.php +++ /dev/null @@ -1,184 +0,0 @@ - -
-
-
- -
- - " name="preset" value=""/> - -
-
-
-
- diff --git a/web/skins/mobile/includes/functions.php b/web/skins/mobile/includes/functions.php deleted file mode 100644 index aadbe435f..000000000 --- a/web/skins/mobile/includes/functions.php +++ /dev/null @@ -1,66 +0,0 @@ -'."\n" ); -?> - - - - <?php echo ZM_WEB_TITLE_PREFIX ?> - <?php echo $title ?> - - - - - - - - - - - diff --git a/web/skins/mobile/includes/init.php b/web/skins/mobile/includes/init.php deleted file mode 100644 index ae92bcdee..000000000 --- a/web/skins/mobile/includes/init.php +++ /dev/null @@ -1,29 +0,0 @@ - diff --git a/web/skins/mobile/lang/Makefile.am b/web/skins/mobile/lang/Makefile.am deleted file mode 100644 index 5084203fb..000000000 --- a/web/skins/mobile/lang/Makefile.am +++ /dev/null @@ -1,5 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/mobile/lang - -dist_web_DATA = # No files here diff --git a/web/skins/mobile/skin.php b/web/skins/mobile/skin.php deleted file mode 100644 index 51ea63e01..000000000 --- a/web/skins/mobile/skin.php +++ /dev/null @@ -1,97 +0,0 @@ -GetDeviceCapabilitiesFromAgent($_SERVER['HTTP_USER_AGENT']); - - //print_r( $wurfl->wurfl_agent ); - if ( $wurfl->wurfl_agent ) - { - if ( $wurfl->getDeviceCapability( 'html_wi_oma_xhtmlmp_1_0' ) ) - { - $device['width'] = $wurfl->getDeviceCapability( 'resolution_width' ); - $device['height'] = $wurfl->getDeviceCapability( 'resolution_height' ); - } - } -} -else -{ - // This is an example of using fixed device strings to just match your phone etc - $devices = array( - array( 'name'=>"Motorola V600", 'ua_match'=>"MOT-V600", 'skin'=>"mobile", 'cookies'=>false, 'width'=>176, 'height'=>220 ), - ); - - foreach ( $devices as $tempDevice ) - { - if ( preg_match( '/'.$tempDevice['ua_match'].'/', $_SERVER['HTTP_USER_AGENT'] ) ) - { - $skin = $tempDevice['skin']; - $cookies = $tempDevice['cookies']; - break; - } - } -} - -foreach ( getSkinIncludes( 'includes/config.php' ) as $includeFile ) - require_once $includeFile; - -foreach ( getSkinIncludes( 'includes/functions.php' ) as $includeFile ) - require_once $includeFile; - -if ( empty($view) ) - $view = isset($user)?'console':'login'; - -if ( !isset($user) && ZM_OPT_USE_AUTH && ZM_AUTH_TYPE == "remote" && !empty( $_SERVER['REMOTE_USER']) ) -{ - $view = "postlogin"; - $action = "login"; - $_REQUEST['username'] = $_SERVER['REMOTE_USER']; -} - -// If there are additional actions -foreach ( getSkinIncludes( 'includes/actions.php' ) as $includeFile ) - require_once $includeFile; - -?> diff --git a/web/skins/mobile/views/Makefile.am b/web/skins/mobile/views/Makefile.am deleted file mode 100644 index c7d175ca3..000000000 --- a/web/skins/mobile/views/Makefile.am +++ /dev/null @@ -1,22 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -SUBDIRS = \ - css - -webdir = @WEB_PREFIX@/skins/mobile/views - -dist_web_DATA = \ - console.php \ - devices.php \ - error.php \ - eventdetails.php \ - event.php \ - events.php \ - filter.php \ - frame.php \ - function.php \ - login.php \ - montage.php \ - state.php \ - video.php \ - watch.php diff --git a/web/skins/mobile/views/console.php b/web/skins/mobile/views/console.php deleted file mode 100644 index 50b5f4775..000000000 --- a/web/skins/mobile/views/console.php +++ /dev/null @@ -1,178 +0,0 @@ - array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ), - ) - ), - ), - // Today - array( - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "today" ), - ) - ), - ), -); - -$running = daemonCheck(); -$status = $running?translate('Running'):translate('Stopped'); - -if ( $group = dbFetchOne( "select * from Groups where Name = 'Mobile'" ) ) - $groupIds = array_flip(explode( ',', $group['MonitorIds'] )); - -$maxWidth = 0; -$maxHeight = 0; -$cycleCount = 0; -$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" ); -for ( $i = 0; $i < count($monitors); $i++ ) -{ - if ( !visibleMonitor( $monitors[$i]['Id'] ) ) - { - continue; - } - if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) ) - { - continue; - } - $monitors[$i]['Show'] = true; - $monitors[$i]['zmc'] = zmcStatus( $monitors[$i] ); - $monitors[$i]['zma'] = zmaStatus( $monitors[$i] ); - $counts = array(); - for ( $j = 0; $j < count($eventCounts); $j++ ) - { - $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) ); - parseFilter( $filter, false, '&' ); - $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j"; - $monitors[$i]['eventCounts'][$j]['filter'] = $filter; - } - $sql = "select ".join($counts,", ")." from Events as E where MonitorId = '".$monitors[$i]['Id']."'"; - $counts = dbFetchOne( $sql ); - if ( $monitors[$i]['Function'] != 'None' ) - { - $cycleCount++; - if ( $maxWidth < $monitors[$i]['Width'] ) $maxWidth = $monitors[$i]['Width']; - if ( $maxHeight < $monitors[$i]['Height'] ) $maxHeight = $monitors[$i]['Height']; - } - $monitors[$i] = array_merge( $monitors[$i], $counts ); -} - -xhtmlHeaders( __FILE__, translate('Console') ); -?> - -
- -
- - - - - - - - - - - - - - - - - 1 ) { -?> - - - - - - - -
".substr( $monitor['Function'], 0, 4 )."", canEdit( 'Monitors' ) ) ?>
  
-
-
- - diff --git a/web/skins/mobile/views/css/Makefile.am b/web/skins/mobile/views/css/Makefile.am deleted file mode 100644 index 86e0ff0a3..000000000 --- a/web/skins/mobile/views/css/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/mobile/views/css - -dist_web_DATA = \ - console.css diff --git a/web/skins/mobile/views/css/console.css b/web/skins/mobile/views/css/console.css deleted file mode 100644 index 49c711039..000000000 --- a/web/skins/mobile/views/css/console.css +++ /dev/null @@ -1,16 +0,0 @@ -#systemTime { - float: left; -} - -#systemState { - margin: 0 auto; - text-align: center; -} - -#systemStats { - float: right; -} - -td.colEvents { - text-align: right; -} diff --git a/web/skins/mobile/views/devices.php b/web/skins/mobile/views/devices.php deleted file mode 100644 index add0a6bc5..000000000 --- a/web/skins/mobile/views/devices.php +++ /dev/null @@ -1,73 +0,0 @@ - - -
- -
- - - - - - - - -
-

-
-
- - diff --git a/web/skins/mobile/views/error.php b/web/skins/mobile/views/error.php deleted file mode 100644 index 33e99f09a..000000000 --- a/web/skins/mobile/views/error.php +++ /dev/null @@ -1,34 +0,0 @@ - - -
- -
-

-

-
-
- - diff --git a/web/skins/mobile/views/event.php b/web/skins/mobile/views/event.php deleted file mode 100644 index ead6b6eae..000000000 --- a/web/skins/mobile/views/event.php +++ /dev/null @@ -1,147 +0,0 @@ -= ?".$_REQUEST['filter']['sql'].$midSql." order by $sortColumn asc"; -} -$result = dbQuery( $sql, array( $event[$_REQUEST['sort_field']] ) ); -while ( $row = dbFetchNext( $result ) ) -{ - if ( $row['Id'] == $_REQUEST['eid'] ) - { - $prevEvent = dbFetchNext( $result ); - break; - } -} - -$sql = "select E.* from Events as E inner join Monitors as M on E.MonitorId = M.Id where $sortColumn ".($sortOrder=='asc'?'>=':'<=').' ?'.$_REQUEST['filter']['sql'].$midSql." order by $sortColumn $sortOrder"; -$result = dbQuery( $sql, array($event[$_REQUEST['sort_field']]) ); -while ( $row = dbFetchNext( $result ) ) -{ - if ( $row['Id'] == $_REQUEST['eid'] ) - { - $nextEvent = dbFetchNext( $result ); - break; - } -} - -$framesPerPage = 15; -$framesPerLine = 3; -$maxShortcuts = 3; - -$paged = $event['Frames'] > $framesPerPage; - -if ( $paged && !empty($_REQUEST['page']) ) -{ - $loFrameId = (($_REQUEST['page']-1)*$framesPerPage)+1; - $hiFrameId = min( $_REQUEST['page']*$framesPerPage, $event['Frames'] ); -} -else -{ - $loFrameId = 1; - $hiFrameId = $event['Frames']; -} - -$sql = 'SELECT * FROM Frames WHERE EventID = ?'; -if ( $paged && !empty($_REQUEST['page']) ) - $sql .= " and FrameId between $loFrameId and $hiFrameId"; -$sql .= " order by FrameId"; -$frames = dbFetchAll( $sql, NULL, array( $_REQUEST['eid'] ) ); - -$scale = getDeviceScale( $event['Width'], $event['Height'], $framesPerLine+0.3 ); - -$pages = (int)ceil($event['Frames']/$framesPerPage); -if ( !empty($_REQUEST['fid']) ) - $_REQUEST['page'] = ($_REQUEST['fid']/$framesPerPage)+1; - -$pagination = getPagination( $pages, $_REQUEST['page'], $maxShortcuts, '&eid='.$_REQUEST['eid'].$filterQuery.$sortQuery, '&' ); - -xhtmlHeaders( __FILE__, translate('Event').' - '.$event['Name'] ); -?> - -
- -
- -

- -
- - <?php echo $frame['Type'] ?>/<?php echo $frame['Type']=='Alarm'?$frame['Score']:0 ?> - -
-
-
- - diff --git a/web/skins/mobile/views/eventdetails.php b/web/skins/mobile/views/eventdetails.php deleted file mode 100644 index deee5eef2..000000000 --- a/web/skins/mobile/views/eventdetails.php +++ /dev/null @@ -1,86 +0,0 @@ - - -
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
s
()
//
-
- 1 - <?php echo $frame['FrameId'] ?> -
-
- - -
-
-
- - diff --git a/web/skins/mobile/views/events.php b/web/skins/mobile/views/events.php deleted file mode 100644 index 40dd6eff8..000000000 --- a/web/skins/mobile/views/events.php +++ /dev/null @@ -1,157 +0,0 @@ -$deviceLines)?$deviceLines:$limitLeft; - } - $eventsSql .= " limit $limitStart, $limitAmount"; -} -elseif ( !empty( $_REQUEST['limit'] ) ) -{ - $eventsSql .= " limit 0, ".$_REQUEST['limit']; -} - -$nEvents = dbFetchOne( $countSql, 'EventCount' ); -if ( !empty($limit) && $nEvents > $_REQUEST['limit'] ) -{ - $nEvents = $_REQUEST['limit']; -} -$pages = (int)ceil($nEvents/$deviceLines); - -$maxShortcuts = 3; -$pagination = getPagination( $pages, $_REQUEST['page'], $maxShortcuts, $filterQuery.$sortQuery.'&limit='.$_REQUEST['limit'], '&' ); - -xhtmlHeaders( __FILE__, translate('Events') ); -?> - -
- -
- -

- - - - - - - - - - - - - - - - - - - -
-

-
-
- - diff --git a/web/skins/mobile/views/filter.php b/web/skins/mobile/views/filter.php deleted file mode 100644 index 4613f3c3c..000000000 --- a/web/skins/mobile/views/filter.php +++ /dev/null @@ -1,71 +0,0 @@ - - -
- -
-
- - 0 ) -{ -?> -
- -
-
- -
- -

- -
-
-
- - diff --git a/web/skins/mobile/views/frame.php b/web/skins/mobile/views/frame.php deleted file mode 100644 index f9bb41633..000000000 --- a/web/skins/mobile/views/frame.php +++ /dev/null @@ -1,73 +0,0 @@ - - -
- -
- "> -
- 1 ) { ?> - << - 1 ) { ?> - < - - > - - >> - -
-
-
- - diff --git a/web/skins/mobile/views/function.php b/web/skins/mobile/views/function.php deleted file mode 100644 index 421d91063..000000000 --- a/web/skins/mobile/views/function.php +++ /dev/null @@ -1,66 +0,0 @@ - - -
- -
-
- -
- -
-
- checked="checked"/> -
-
- -
-
-
-
- - diff --git a/web/skins/mobile/views/login.php b/web/skins/mobile/views/login.php deleted file mode 100644 index 6eb0b7db9..000000000 --- a/web/skins/mobile/views/login.php +++ /dev/null @@ -1,54 +0,0 @@ - - -
- -
-
- - - - - - - - - - -
" size="12"/>
-
- -
-
-
-
- - diff --git a/web/skins/mobile/views/montage.php b/web/skins/mobile/views/montage.php deleted file mode 100644 index 8311fe6f4..000000000 --- a/web/skins/mobile/views/montage.php +++ /dev/null @@ -1,75 +0,0 @@ - - -
- -
-
- - <?php echo $monitor['Name'] ?> - -
-
-
-
- - diff --git a/web/skins/mobile/views/state.php b/web/skins/mobile/views/state.php deleted file mode 100644 index 51cf71624..000000000 --- a/web/skins/mobile/views/state.php +++ /dev/null @@ -1,77 +0,0 @@ - - -
- -
-
- - -
- -
-
-
-
- - diff --git a/web/skins/mobile/views/video.php b/web/skins/mobile/views/video.php deleted file mode 100644 index 8f7ac8654..000000000 --- a/web/skins/mobile/views/video.php +++ /dev/null @@ -1,226 +0,0 @@ -= 352 && $deviceHeight >= 288 ) - $videoSize = "352x288"; -elseif ( $deviceWidth >= 176 && $deviceHeight >= 144 ) - $videoSize = "176x144"; -else - $videoSize = "128x96"; - -$eventWidth = $event['Width']; -$eventHeight = $event['Height']; - -if ( !isset( $rate ) ) - $_REQUEST['rate'] = reScale( RATE_BASE, $event['DefaultRate'], ZM_WEB_DEFAULT_RATE ); - -$eventPath = ZM_DIR_EVENTS.'/'.getEventPath( $event ); - -$videoFormats = array(); -$ffmpegFormats = preg_split( '/\s+/', ZM_FFMPEG_FORMATS ); -foreach ( $ffmpegFormats as $ffmpegFormat ) -{ - preg_match( '/^([^*]+)(\**)$/', $ffmpegFormat, $matches ); - $videoFormats[$matches[1]] = $matches[1]; - if ( $matches[2] == '*' ) - $defaultVideoFormat = $matches[1]; - elseif ( $matches[2] == '**' ) - $defaultPhoneFormat = $matches[1]; -} -if ( !isset($_REQUEST['videoFormat']) ) -{ - if ( isset($defaultPhoneFormat) ) - $_REQUEST['videoFormat'] = $defaultPhoneFormat; - elseif ( isset($defaultVideoFormat) ) - $_REQUEST['videoFormat'] = $defaultVideoFormat; - else - $videoFormat = $ffmpegFormats[0]; -} - -if ( !empty($_REQUEST['generate']) ) -{ - $videoFile = createVideo( $event, $_REQUEST['videoFormat'], $_REQUEST['rate'], $videoSize, !empty($_REQUEST['overwrite']) ); -} - -$videoFiles = array(); -if ( $dir = opendir( $eventPath ) ) -{ - while ( ($file = readdir( $dir )) !== false ) - { - $file = $eventPath.'/'.$file; - if ( is_file( $file ) ) - { - if ( preg_match( '/-S([\da-z]+)\.(?:'.join( '|', $videoFormats ).')$/', $file, $matches ) ) - { - if ( $matches[1] == $videoSize ) - { - $videoFiles[] = $file; - } - } - } - } - closedir( $dir ); -} - -if ( isset($_REQUEST['download']) ) -{ - header( "Content-type: ".getMimeType($videoFiles[$_REQUEST['download']])); - header( "Content-length: ".filesize($videoFiles[$_REQUEST['download']])); - header( "Content-disposition: attachment; filename=".preg_replace( "/^.*\//", "", $videoFiles[$_REQUEST['download']] )."; size=".filesize($videoFiles[$_REQUEST['download']]) ); - readfile( $videoFiles[$_REQUEST['download']] ); - exit; -} - -xhtmlHeaders( __FILE__, translate('Video').' - '.$event['Name'] ); -?> - -
-
-
- - - - - - - - - - - - - - -
checked="checked"/>
-
-
- -

- -

- - -

- - - - - - - - - 0 ) - { - $index = 0; - foreach ( $videoFiles as $file ) - { - preg_match( '/^(.+)-((?:r[_\d]+)|(?:F[_\d]+))-((?:s[_\d]+)|(?:S[0-9a-z]+))\.([^.]+)$/', $file, $matches ); - if ( preg_match( '/^r(.+)$/', $matches[2], $temp_matches ) ) - { - $rate = (int)(100 * preg_replace( '/_/', '.', $temp_matches[1] ) ); - $rateText = isset($rates[$rate])?$rates[$rate]:($rate."x"); - } - elseif ( preg_match( '/^F(.+)$/', $matches[2], $temp_matches ) ) - { - $rateText = $temp_matches[1]."fps"; - } - if ( preg_match( '/^s(.+)$/', $matches[3], $temp_matches ) ) - { - $scale = (int)(100 * preg_replace( '/_/', '.', $temp_matches[1] ) ); - $scaleText = isset($scales[$scale])?$scales[$scale]:($scale."x"); - } - elseif ( preg_match( '/^S(.+)$/', $matches[3], $temp_matches ) ) - { - $scaleText = $temp_matches[1]; - } -?> - - - - - - - - -
 / 
- -

- -
-
- - diff --git a/web/skins/mobile/views/watch.php b/web/skins/mobile/views/watch.php deleted file mode 100644 index b61001db9..000000000 --- a/web/skins/mobile/views/watch.php +++ /dev/null @@ -1,154 +0,0 @@ - - -
-
-

 -  fps

-

- - - -

- -
- -
- -
- - - -
- -
-
- - diff --git a/web/skins/xml/Makefile.am b/web/skins/xml/Makefile.am deleted file mode 100644 index 2c30d19a3..000000000 --- a/web/skins/xml/Makefile.am +++ /dev/null @@ -1,10 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/xml - -SUBDIRS = \ - includes \ - views - -dist_web_DATA = \ - skin.php diff --git a/web/skins/xml/includes/Makefile.am b/web/skins/xml/includes/Makefile.am deleted file mode 100644 index c6128f8a2..000000000 --- a/web/skins/xml/includes/Makefile.am +++ /dev/null @@ -1,8 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/skins/xml/includes - -dist_web_DATA = \ - init.php \ - config.php \ - functions.php diff --git a/web/skins/xml/includes/config.php b/web/skins/xml/includes/config.php deleted file mode 100644 index 66d3af5ee..000000000 --- a/web/skins/xml/includes/config.php +++ /dev/null @@ -1,155 +0,0 @@ - "100x", - "5000" => "50x", - "2500" => "25x", - "1000" => "10x", - "400" => "4x", - "200" => "2x", - "100" => translate('Real'), - "50" => "1/2x", - "25" => "1/4x", -); - -$scales = array( - "400" => "4x", - "300" => "3x", - "200" => "2x", - "150" => "1.5x", - "100" => translate('Actual'), - "75" => "3/4x", - "50" => "1/2x", - "33" => "1/3x", - "25" => "1/4x", -); - -$bwArray = array( - "high" => translate('High'), - "medium" => translate('Medium'), - "low" => translate('Low') -); - -/* Check if ZM_WEB_L_CAN_STREAM and ZM_WEB_L_STREAM_METHOD are defined */ -if (!defined("ZM_WEB_L_CAN_STREAM")) { - define ("ZM_WEB_L_CAN_STREAM", 1); - define ("ZM_WEB_M_CAN_STREAM", 1); - define ("ZM_WEB_H_CAN_STREAM", 1); -} -if (!defined("ZM_WEB_L_STREAM_METHOD")) { - define ("ZM_WEB_L_STREAM_METHOD", "jpeg"); - define ("ZM_WEB_M_STREAM_METHOD", "jpeg"); - define ("ZM_WEB_H_STREAM_METHOD", "jpeg"); -} - -switch ( $_COOKIE['zmBandwidth'] ) -{ - case "high" : - { - define( "ZM_WEB_REFRESH_MAIN", ZM_WEB_H_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes - define( "ZM_WEB_REFRESH_CYCLE", ZM_WEB_H_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor - define( "ZM_WEB_REFRESH_IMAGE", ZM_WEB_H_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming) - define( "ZM_WEB_REFRESH_STATUS", ZM_WEB_H_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window - define( "ZM_WEB_REFRESH_EVENTS", ZM_WEB_H_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events - define( "ZM_WEB_CAN_STREAM", ZM_WEB_H_CAN_STREAM ); // Override the automatic detection of browser streaming capability - define( "ZM_WEB_STREAM_METHOD", ZM_WEB_H_STREAM_METHOD ); // Which method should be used to send video streams to your browser - define( "ZM_WEB_DEFAULT_SCALE", ZM_WEB_H_DEFAULT_SCALE ); // What the default scaling factor applied to 'live' or 'event' views is (%) - define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_H_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) - define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_H_VIDEO_BITRATE ); // What the bitrate of any streamed video should be - define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_H_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be - define( "ZM_WEB_SCALE_THUMBS", ZM_WEB_H_SCALE_THUMBS ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling - define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_H_EVENTS_VIEW ); // What the default view of multiple events should be. - define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_H_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. - define( "ZM_WEB_AJAX_TIMEOUT", ZM_WEB_H_AJAX_TIMEOUT ); // Timeout to use for Ajax requests, no timeout used if unset - break; - } - case "medium" : - { - define( "ZM_WEB_REFRESH_MAIN", ZM_WEB_M_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes - define( "ZM_WEB_REFRESH_CYCLE", ZM_WEB_M_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor - define( "ZM_WEB_REFRESH_IMAGE", ZM_WEB_M_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming) - define( "ZM_WEB_REFRESH_STATUS", ZM_WEB_M_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window - define( "ZM_WEB_REFRESH_EVENTS", ZM_WEB_M_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events - define( "ZM_WEB_CAN_STREAM", ZM_WEB_M_CAN_STREAM ); // Override the automatic detection of browser streaming capability - define( "ZM_WEB_STREAM_METHOD", ZM_WEB_M_STREAM_METHOD ); // Which method should be used to send video streams to your browser - define( "ZM_WEB_DEFAULT_SCALE", ZM_WEB_M_DEFAULT_SCALE ); // What the default scaling factor applied to 'live' or 'event' views is (%) - define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_M_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) - define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_M_VIDEO_BITRATE ); // What the bitrate of any streamed video should be - define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_M_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be - define( "ZM_WEB_SCALE_THUMBS", ZM_WEB_M_SCALE_THUMBS ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling - define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_M_EVENTS_VIEW ); // What the default view of multiple events should be. - define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_M_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. - define( "ZM_WEB_AJAX_TIMEOUT", ZM_WEB_M_AJAX_TIMEOUT ); // Timeout to use for Ajax requests, no timeout used if unset - break; - } - case "low" : - { - define( "ZM_WEB_REFRESH_MAIN", ZM_WEB_L_REFRESH_MAIN ); // How often (in seconds) the main console window refreshes - define( "ZM_WEB_REFRESH_CYCLE", ZM_WEB_L_REFRESH_CYCLE ); // How often the cycle watch windows swaps to the next monitor - define( "ZM_WEB_REFRESH_IMAGE", ZM_WEB_L_REFRESH_IMAGE ); // How often the watched image is refreshed (if not streaming) - define( "ZM_WEB_REFRESH_STATUS", ZM_WEB_L_REFRESH_STATUS ); // How often the little status frame refreshes itself in the watch window - define( "ZM_WEB_REFRESH_EVENTS", ZM_WEB_L_REFRESH_EVENTS ); // How often the event listing is refreshed in the watch window, only for recent events - define( "ZM_WEB_CAN_STREAM", ZM_WEB_L_CAN_STREAM ); // Override the automatic detection of browser streaming capability - define( "ZM_WEB_STREAM_METHOD", ZM_WEB_L_STREAM_METHOD ); // Which method should be used to send video streams to your browser - define( "ZM_WEB_DEFAULT_SCALE", ZM_WEB_L_DEFAULT_SCALE ); // What the default scaling factor applied to 'live' or 'event' views is (%) - define( "ZM_WEB_DEFAULT_RATE", ZM_WEB_L_DEFAULT_RATE ); // What the default replay rate factor applied to 'event' views is (%) - define( "ZM_WEB_VIDEO_BITRATE", ZM_WEB_L_VIDEO_BITRATE ); // What the bitrate of any streamed video should be - define( "ZM_WEB_VIDEO_MAXFPS", ZM_WEB_L_VIDEO_MAXFPS ); // What the maximum frame rate of any streamed video should be - define( "ZM_WEB_SCALE_THUMBS", ZM_WEB_L_SCALE_THUMBS ); // Image scaling for thumbnails, bandwidth versus cpu in rescaling - define( "ZM_WEB_EVENTS_VIEW", ZM_WEB_L_EVENTS_VIEW ); // What the default view of multiple events should be. - define( "ZM_WEB_SHOW_PROGRESS", ZM_WEB_L_SHOW_PROGRESS ); // Whether to show the progress of replay in event view. - define( "ZM_WEB_AJAX_TIMEOUT", ZM_WEB_L_AJAX_TIMEOUT ); // Timeout to use for Ajax requests, no timeout used if unset - break; - } -} - -?> diff --git a/web/skins/xml/includes/functions.php b/web/skins/xml/includes/functions.php deleted file mode 100644 index b84e65464..000000000 --- a/web/skins/xml/includes/functions.php +++ /dev/null @@ -1,447 +0,0 @@ - $maj) return 1; - if ((getClientVerMaj() == $maj) && (getClientVerMin() >= $min)) return 1; - return 0; -} -function logXmlErr($str) -{ - logXml($str, 1); -} -function logXml($str, $err = 0) -{ - if (!defined("ZM_EYEZM_DEBUG")) { - /* Check session variable */ - if (isset($_SESSION['xml_debug'])) define("ZM_EYEZM_DEBUG", $_SESSION['xml_debug']); - else define ("ZM_EYEZM_DEBUG", "0"); - } - if (!defined("ZM_EYEZM_LOG_TO_FILE")) { - /* Check session variable */ - if (isset($_SESSION['xml_log_to_file'])) define("ZM_EYEZM_LOG_TO_FILE", $_SESSION['xml_log_to_file']); - else define ("ZM_EYEZM_LOG_TO_FILE", "1"); - } - if (!defined("ZM_EYEZM_LOG_FILE")) { - /* Check session variable */ - if (isset($_SESSION['xml_log_file'])) define("ZM_EYEZM_LOG_FILE", $_SESSION['xml_log_file']); - else define ("ZM_EYEZM_LOG_FILE", "/tmp/zm_xml.log"); - } - /* Only log if debug is enabled */ - if (ZM_EYEZM_DEBUG == 0) return; - /* Logging is enabled, set log string */ - $logstr = "XML_LOG (".($err?"ERROR":"NOTICE")."): ".$str.(ZM_EYEZM_LOG_TO_FILE?"\n":""); - if (ZM_EYEZM_LOG_TO_FILE) { - error_log("[".date("r")."] ".$logstr, 3, ZM_EYEZM_LOG_FILE); - } else { - error_log($logstr); - } -} -/* Returns defval if varname is not set, otherwise return varname */ -function getset($varname, $defval) -{ - if (isset($_GET[$varname])) return $_GET[$varname]; - return $defval; -} -function xml_header() -{ - header ("content-type: text/xml"); - echo ""; -} -function xml_tag_val($tag, $val) -{ - echo "<".$tag.">".$val.""; -} -function xml_tag_sec($tag, $open) -{ - if ($open) $tok = "<"; - else $tok = ""; -} -function xhtmlHeaders( $file, $title ) -{ -?> - - - - - - - /dev/null")) > 0) { - /* More than one match */ - return TRUE; - } else { - /* Check -formats tag also if we fail -codecs */ - if (preg_match("/\b".$codec."\b/", shell_exec(getFfmpegPath()." -formats 2> /dev/null")) > 0) return TRUE; - return FALSE; - } -} -function exeExists($exepath) -{ - $path = trim($exepath); - return (file_exists($path) && is_readable($path) && ($path != "")); -} -/* Returns whether ffmpeg exists or not */ -function ffmpegExists() -{ - return exeExists(getFfmpegPath()); -} -/* Returns with PHP-GD exists */ -function gdExists() -{ - if (extension_loaded('gd') && function_exists('gd_info')) { - return TRUE; - } - return FALSE; -} - -function getFfmpeg264FoutParms($br, $fout) -{ - $ffparms = "-analyzeduration 0 -acodec copy"; - $ffparms .= " -vcodec libx264 -b ".$br; - $ffparms .= " -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8"; - $ffparms .= " -subq 5 -trellis 1 -refs 1 -coder 0 -me_range 16 -keyint_min 25"; - $ffparms .= " -sc_threshold 40 -i_qfactor 0.71 -bt 16k"; - $ffparms .= " -rc_eq 'blurCplx^(1-qComp)' -qcomp 0.6"; - $ffparms .= " -qmin 10 -qmax 51 -qdiff 4 -level 30"; - $ffparms .= " -g 30 -analyzeduration 0 -async 2 ".$fout." 2> /dev/null"; - return $ffparms; -} -/** Return FFMPEG parameters for H264 streaming */ -function getFfmpeg264Str($width, $height, $br, $fin, $fout) -{ - $ffparms = getFfmpeg264FoutParms($br, $fout); - $ffstr = getFfmpegPath()." -t ".ZM_EYEZM_H264_MAX_DURATION." -analyzeduration 0 -i "; - $ffstr .= $fin." -f mpegts ".$ffparms; - return $ffstr; -} -/** Returns true when monitor exists */ -function isMonitor($monitor) -{ - $query = "select Id from Monitors where Id = ?"; - $res = dbFetchOne($query, NULL, array($monitor)); - if ($res) return TRUE; - logXml("Monitor ID ".$monitor." does not exist"); - return FALSE; -} -/** Returns the width and height of a monitor */ -function getMonitorDims($monitor) -{ - $query = "select Width,Height from Monitors where Id = ?"; - $res = dbFetchOne($query, NULL, array( $monitor ) ); - return $res; -} -/** Returns the temp directory for H264 encoding */ -function getTempDir() -{ - /* Assume that the directory structure is /skins/xml/views */ - return dirname(__FILE__)."/../../../temp"; -} -/** Returns the name of the m3u8 playlist based on monitor */ -function m3u8fname($monitor) { - return "stream_".$monitor.".m3u8"; -} - -/** Erases the M3u8 and TS file names for a given monitor */ -function eraseH264Files($monitor) { - /** NOTE: This command executes an 'rm' command, so $monitor parameter - * should be properly validated before executing */ - /* Remove wdir/.m3u8 and wdir/sample_*.ts */ - shell_exec("rm -f ".getTempDir()."/".m3u8fname($monitor)." ".getTempDir()."/sample_".$monitor."*.ts"); -} -function kill264proc($monitor) { - /** NOTE: This command executes an 'kill' command, so $monitor parameter - * should be properly validated before executing */ - $pid = trim(shell_exec("pgrep -f -x \"zmstreamer -m ".$monitor."\"")); - if ($pid == "") { - logXml("No PID found for ZMStreamer to kill"); - } else { - shell_exec("kill -9 ".$pid); - logXml("Killed process ".$pid." for Monitor ".$monitor); - } -} -/** Return the command-line shell function to setup H264 stream */ -function stream264fn ($mid, $width, $height, $br) { - $cdir = "./temp"; - $zmstrm = "zmstreamer -m ".$mid." 2> /dev/null"; - $ffstr = getFfmpeg264Str($width, $height, $br, "-", "-"); - $seg = "segmenter - ".ZM_EYEZM_SEG_DURATION." ".$cdir."/sample_".$mid." ".$cdir."/".m3u8fname($mid)." ../ 2> /dev/null"; - $url = $zmstrm . " | ".$ffstr." | " . $seg; - return "nohup ".$url." & echo $!"; -} - -/** Generate the web-page presented to the viewer when using H264 */ -function h264vidHtml($width, $height, $monitor, $br, $thumbsrc) { - function printTermLink() { - $str = "H264 Streaming Launching...
Tap to re-load if stream fails"; - $str2 = "document.getElementById(\"loaddiv\").innerHTML = \"".$str."\";"; - echo $str2; - - } - $ajaxUrl = "?view=actions&action=spawn264&&monitor=".$monitor."&br=".$br; - /* Call these two directly to bypass server blocking issues */ - $ajax2Url = "./skins/xml/views/actions.php?action=chk264&monitor=".$monitor; - $ajax2Url .= "&timeout=".ZM_EYEZM_H264_TIMEOUT; - $ajax3Url = "./skins/xml/views/actions.php?action=kill264&monitor=".$monitor; -?> - - - - - - - -
-
-Initializing H264 Stream ()...
-This may take a few seconds -
-
- -
- -
- - - diff --git a/web/skins/xml/includes/init.php b/web/skins/xml/includes/init.php deleted file mode 100644 index acb6c3546..000000000 --- a/web/skins/xml/includes/init.php +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/web/skins/xml/skin.php b/web/skins/xml/skin.php deleted file mode 100644 index c88718c4e..000000000 --- a/web/skins/xml/skin.php +++ /dev/null @@ -1,47 +0,0 @@ - diff --git a/web/skins/xml/views/Makefile.am b/web/skins/xml/views/Makefile.am deleted file mode 100644 index ab9147ae4..000000000 --- a/web/skins/xml/views/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -SUBDIRS = - -webdir = @WEB_PREFIX@/skins/xml/views - -dist_web_DATA = \ - console.php \ - actions.php \ - none.php \ - notfound.png diff --git a/web/skins/xml/views/actions.php b/web/skins/xml/views/actions.php deleted file mode 100644 index 73e206af6..000000000 --- a/web/skins/xml/views/actions.php +++ /dev/null @@ -1,392 +0,0 @@ - */ - if (!canEdit('Events')) { - logXmlErr("User ".$user['Username']. " doesn't have edit Events perms"); - exit; - } - if (!isset($_REQUEST['eid'])) { - logXmlErr("EID not set for action delete-event"); - exit; - } - $eid = validInteger($_REQUEST['eid']); - $url = "./index.php?view=request&request=event&id=".$eid."&action=delete"; - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "spawn264")) { - /* ACTION: Spawn 264 streaming process. - * Parms: [br|width|height] */ - if (!canView('Stream')) { - logXmlErr("User ".$user['Username']. " doesn't have view Stream perms"); - exit; - } - if (!isset($_GET['monitor'])) { - logXmlErr("Not all parameters specified for spawn264"); - exit; - } - $monitor = validInteger($_REQUEST['monitor']); - if (!isMonitor($monitor)) exit; - $dims = getMonitorDims($monitor); - $width = validInteger(getset('width', $dims['Width'])); - $height = validInteger(getset('height', $dims['Height'])); - $br = validString(getset('br', ZM_EYEZM_H264_DEFAULT_BR)); - /* Check that we can stream first */ - if (!canStream264()) { - /* canStream264 will print out error */ - exit; - } - $streamUrl = stream264fn($monitor, $width, $height, $br); - logXml("Using H264 Pipe Function: ".$streamUrl); - $pid = shell_exec($streamUrl); - logXml("Streaming Process for monitor ".$monitor." ended, cleaning up files"); - eraseH264Files($monitor); - exit; - - } else if (!strcmp($action, "kill264")) { - /* ACTION: Kill existing H264 stream process and cleanup files. - * Parms: . - * NOTE: This will be called directly by path, so include files - * may not be available */ - session_start(); - require_once(dirname(__FILE__)."/../includes/functions.php"); - if (!isset($_GET['monitor'])) { - logXmlErr("Not all parameters specified for kill264"); - exit; - } - $monitor = validInteger($_GET['monitor']); - kill264proc($monitor); - logXml("Killed Segmenter process for monitor ".$monitor); - exit; - - } else if (!strcmp($action, "chk264")) { - /* ACTION: Simply stalls while checking for 264 file. - * Parms: - * NOTE: This will be called directly by path, so include files - * may not be available */ - session_start(); - require_once(dirname(__FILE__)."/../includes/functions.php"); - if (!isset($_GET['monitor']) || !isset($_GET['timeout'])) { - logXmlErr("Monitor not specified for chk264"); - exit; - } - $monitor = validInteger($_GET['monitor']); - $path = getTempDir()."/".m3u8fname($monitor); - /* Wait for the second sample to become available */ - $tsfile = getTempDir()."/sample_".$monitor."-2.ts"; - /* Setup timeout */ - $startTime = time(); - $timeout = validInteger($_GET['timeout']); - while (!file_exists($path) || !file_exists($tsfile)) { - if (time() > $startTime + $timeout) { - logXmlErr("Timed out waiting for stream to start, exiting..."); - kill264proc($monitor); - exit; - } - usleep(10000); - } - logXml("File exists, stream created after ".(time()-$startTime)." sec"); - exit; - - } else if (!strcmp($action, "feed")) { - /* ACTION: View a feed. Parms: [height|width|fps|scale|vcodec|br] */ - if (!canView('Stream')) { - logXmlErr("User ".$user['Username']. " doesn't have view Stream perms"); - exit; - } - /* Check that required variables are set */ - if (!isset($_REQUEST['monitor'])) { - logXmlErr("Not all parameters set for action view-feed"); - exit; - } - $monitor = validInteger($_REQUEST['monitor']); - if (!isMonitor($monitor)) exit; - $dims = getMonitorDims($monitor); - $width = validInteger(getset('width', $dims['Width'])); - $height = validInteger(getset('height', $dims['Height'])); - $fps = validInteger(getset('fps', ZM_WEB_VIDEO_MAXFPS)); - $scale = validInteger(getset('scale', 100)); - $vcodec = validString(getset('vcodec', ZM_EYEZM_FEED_VCODEC)); - /* Select which codec we want */ - if (!strcmp($vcodec, "h264")) { - /* Validate that we can in fact stream H264 */ - if (!canStream264()) { - /* canStream264 will print out error if - * there is one */ - echo "Server cannot stream H264. Check eyeZm log for details"; - exit; - } - if (!requireVer("1", "2")) { - echo "H264 Streaming requires eyeZm v1.2 or above"; - logXmlErr("H264 Streaming requires eyeZm v1.2 or above"); - exit; - } - $br = validString(getset('br', ZM_EYEZM_H264_DEFAULT_BR)); - /* H264 processing */ - noCacheHeaders(); - /* Kill any existing processes and files */ - kill264proc($monitor); - eraseH264Files($monitor); - logXml("Streaming H264 on Monitor ".$monitor.", ".$width."x".$height." @".$br); - /* Get thumbnail source */ - $thumbsrc = - getStreamSrc( array( - "mode=single", - "monitor=".$monitor, - "scale=".$scale, - "maxfps=".$fps, - "buffer=1000" - ) ); - logXml("Using thumbnail image from ".$thumbsrc); - /* Generate H264 Web-page */ - echo "\n"; - h264vidHtml($width, $height, $monitor, $br, $thumbsrc); - } else if (!strcmp($vcodec, "mjpeg")) { - /* MJPEG streaming */ - /* If $fps=0, get a single-shot */ - if (!$fps) { - /* single-shot */ - $streamSrc = - getStreamSrc( array( - "mode=single", - "monitor=".$monitor, - "scale=".$scale, - "maxfps=0", - "buffer=1000" - ) ); - } else { - $streamSrc = - getStreamSrc( array( - "mode=jpeg", - "monitor=".$monitor, - "scale=".$scale, - "maxfps=".$fps, - "buffer=1000" - ) ); - } - noCacheHeaders(); - xhtmlHeaders( __FILE__, "Stream" ); - logXml("Streaming MJPEG on Monitor ".$monitor.", ".$width."x".$height." @".$fps."fps"); - echo "\n"; - echo "\n"; - echo "
\n"; - logXml("Using stream source: ".$streamSrc); - outputImageStream("liveStream", $streamSrc, $width, $height, "stream"); - echo "
"; - } else { - logXmlErr("Unsupported codec ".$vcodec." selected for streaming"); - echo("Unsupported codec ".$vcodec." selected for streaming"); - } - exit; - - } else if (!strcmp($action, "vevent")) { - /* ACTION: View an event. Parms: [fps|vcodec|br] */ - if (!canView('Events')) { - logXmlErr("User ".$user['Username']. " doesn't have view Events perms"); - exit; - } - if (!isset($_GET['eid'])) { - logXmlErr("Not all parameters set for Action View-event"); - exit; - } - /* Grab event from the database */ - $eid = validInteger($_GET['eid']); - $eventsSql = "select E.Id, E.MonitorId, E.Name, E.StartTime, E.Length, E.Frames from Events as E where E.Id = ?"; - $event = dbFetchOne($eventsSql, NULL, array( $eid ) ); - /* Check if exists */ - if (!$event) { - logxmlErr("Requested event ID ".$eid." does not exist"); - exit; - } - /* Calculate FPS */ - $fps = validInteger(getset('fps',ceil($event['Frames'] / $event['Length']))); - $vcodec = validString(getset('vcodec', ZM_EYEZM_EVENT_VCODEC)); - $baseURL = ZM_PATH_WEB."/".getEventPathSafe($event); - /* Here we validate the codec. - * Check that FFMPEG exists and supports codecs */ - if (!strcmp($vcodec, "mpeg4")) { - if (!ffmpegSupportsCodec("mpeg4")) { - logXmlErr("FFMPEG not installed, accessible in path/ZM_PATH_FFMPEG, or doesn't support mpeg4"); - exit; - } - /* Can generate, we are good to go */ - $fname = "capture.mov"; - $ffparms = "-vcodec mpeg4 -r ".ZM_EYEZM_EVENT_FPS." ".$baseURL."/".$fname." 2> /dev/null"; - - } else if (!strcmp($vcodec, "h264")) { - if (!ffmpegSupportsCodec("libx264")) { - logXmlErr("FFMPEG not installed, accessible in path/ZM_PATH_FFMPEG, or doesn't support H264"); - exit; - } - if (!requireVer("1","2")) { - logXmlErr("H264 Event viewing requires eyeZm v1.2 or greater"); - exit; - } - /* Good to go */ - $fname = "capture.mp4"; - $ffparms = getFfmpeg264FoutParms( - validString(getset('br',ZM_EYEZM_H264_DEFAULT_EVBR)), - $baseURL."/".$fname); - - } else { - logXmlErr("Unknown codec ".$vcodec." selected for event viewing"); - exit; - } - logXml("Selected ".$vcodec." for viewing event ".$event['Id']); - $fnameOut = $baseURL."/".$fname; - $shellCmd = getFfmpegPath()." -y -r ".$fps." -i ".$baseURL."/%0".ZM_EVENT_IMAGE_DIGITS."d-capture.jpg"; - $shellCmd .= " ".$ffparms; - logXml("Encoding event with command: ".$shellCmd); - $shellOutput = shell_exec($shellCmd); - /* Check that file exists */ - if (!file_exists(trim($fnameOut))) { - logXmlErr("Generate Event ".$event['Id']." file ".$fnameOut." does not exist"); - exit; - } - $url = "./".getEventPathSafe($event)."/".$fname; - logXml("Loading Event URL ".$url); - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "vframe")) { - /* ACTION: View a frame given by an event and frame-id. Parms: [alarm | analyze | qty | scale] - * If 'alarm' is set, the returned frame will be the -th alarm frame. If 'analyze' is set, - * the returned frame will be the %03d-analyse frame instead of %03d-capture, if ZM_CREATE_ANALYSIS_IMAGES - * is set. Otherwise it just returns the captured frame. - * If qty is set, it will apply a quality factor from 0-100, and if width is set, it will scale the jpeg accordingly - */ - if (!isset($_GET['eid']) || !isset($_GET['frame'])) { - logXmlErr("Not all parameters set for action view-frame"); - exit; - } - $eid = validInteger($_GET['eid']); - $frame = validInteger($_GET['frame']); - $eventsSql = "select E.Id, E.MonitorId, E.Name, E.StartTime, E.Length, E.Frames from Events as E where E.Id = ?"; - $event = dbFetchOne($eventsSql, NULL, array( $eid ) ); - $qty = validInteger(getset('qty', 100)); - if ($qty > 100) $qty = 100; - $scale = validInteger(getset('scale', 100)); - if (!$event) { - logxmlErr("Requested event ID ".$eid." does not exist"); - exit; - } - /* Figure out the frame number. If 'alarm' is not set, this is just equal to the parameter. - * If 'alarm' is set, need to query DB and grab the -th item */ - if (isset($_GET['alarm'])) { - $frameSql = "select * from Frames as F where F.EventId=? and (F.Type = 'Alarm') order by F.FrameId"; - $i=0; - foreach (dbFetchAll($frameSql, NULL, array($eid) ) as $dbframe) { - if ($i == $frame) { - $frame = $dbframe['FrameId']; - break; - } - $i++; - } - } - if (isset($_GET['analyze']) && ZM_CREATE_ANALYSIS_IMAGES) { - $suffix = "analyse"; - } else { - $suffix = "capture"; - } - /* A frame index of 0 is invalid, so if we see this, just use frame 1 */ - if (!$frame) $frame = 1; - /* Suffix based on 'analyze' */ - $fname = sprintf("%0".ZM_EVENT_IMAGE_DIGITS."d-%s.jpg", $frame, $suffix); - $url = "./".getEventPathSafe($event)."/".$fname; - if (!file_exists($url)) { - logXmlErr("Invalid frame image requested: ".$url); - $url = "./skins/xml/views/notfound.png"; - } - /* Check if the image needs any processing - check for GD if requested */ - if (($scale != 100) || ($qty < 100)) { - if (!gdExists()) { - logXmlErr("Lib GD is not loaded, but required for image scaling functions"); - $url = "./skins/xml/views/notfound.png"; - } else if (!$img = imagecreatefromjpeg($url)) { - logXmlErr("Could not load JPEG from ".$url); - $url = "./skins/xml/views/notfound.png"; - } else { - /* GD exists and we read the file ok */ - header('Content-type: image/jpeg'); - /* Check if resizing is needed */ - if ($scale != 100) { - list($width_orig, $height_orig) = getimagesize($url); - $width_new = $width_orig * ($scale/100); - $height_new = $height_orig * ($scale/100); - $img_new = imagecreatetruecolor($width_new, $height_new); - imagecopyresampled($img_new, $img, 0, 0, 0, 0, $width_new, $height_new, $width_orig, $height_orig); - imagejpeg($img_new, NULL, $qty); - } else { - imagejpeg($img, NULL, $qty); - } - exit; - } - } - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "state")) { - /* ACTION: Change the state of the system. Parms: */ - if (!canEdit('System')) { - logXmlErr("User ".$user['Username']. " doesn't have edit System perms"); - exit; - } - if (!isset($_GET['state'])) { - logXmlErr("Server state not specified for action"); - exit; - } - $url = "./index.php?view=none&action=state&runState=".validString($_GET['state']); - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "func")) { - /* ACTION: Change state of the monitor. Parms: */ - if (!canEdit('Monitors')) { - logXmlErr("User ".$user['Username']. " doesn't have monitors Edit perms"); - exit; - } - if (!isset($_GET['mid']) || !isset($_GET['func']) || !isset($_GET['en'])) { - logXmlErr("Not all parameters specified for action Monitor state"); - exit; - } - $mid = validInteger($_GET['mid']); - if (!isMonitor($mid)) exit; - $url = "./index.php?view=none&action=function&mid=".$mid."&newFunction=".validString($_GET['func'])."&newEnabled=".validString($_GET['en']); - header("Location: ".$url); - exit; - - } else if (!strcmp($action, "vlog")) { - /* ACTION: View log file. Must have debug and log to file enabled, and sufficient perms - * Parms: [lines] */ - if (!canEdit('System')) { - logXmlErr("Insufficient permissions to view log file"); - echo "Insufficient permissions to view log file"; - exit; - } - if (!ZM_EYEZM_DEBUG || !ZM_EYEZM_LOG_TO_FILE) { - echo "eyeZm Debug (EYEZM_DEBUG) or log-to-file (EYEZM_LOG_TO_FILE) not enabled. Please enable first"; - exit; - } - if (!file_exists(ZM_EYEZM_LOG_FILE)) { - echo "Log file ".ZM_EYEZM_LOG_FILE." doesn't exist"; - exit; - } - $lines = validInteger(getset('lines',ZM_EYEZM_LOG_LINES)); - logXml("Returning last ".$lines." lines of eyeZm Log from ".ZM_EYEZM_LOG_FILE); - echo shell_exec("tail -n ".$lines." ".ZM_EYEZM_LOG_FILE); - echo "\n\n--- Showing last ".$lines." lines ---\n"; - echo "--- End of Log ---\n\n"; - } -} -?> diff --git a/web/skins/xml/views/console.php b/web/skins/xml/views/console.php deleted file mode 100644 index b512bc13a..000000000 --- a/web/skins/xml/views/console.php +++ /dev/null @@ -1,259 +0,0 @@ - translate('Events'), - "filter" => array( - "terms" => array( - ) - ), - ), - array( - "title" => translate('Hour'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 hour" ), - ) - ), - ), - array( - "title" => translate('Day'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 day" ), - ) - ), - ), - array( - "title" => translate('Week'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-7 day" ), - ) - ), - ), - array( - "title" => translate('Month'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "0" ), - array( "cnj" => "and", "attr" => "DateTime", "op" => ">=", "val" => "-1 month" ), - ) - ), - ), - array( - "title" => translate('Archived'), - "filter" => array( - "terms" => array( - array( "attr" => "Archived", "op" => "=", "val" => "1" ), - ) - ), - ), -); - -$running = daemonCheck(); -$status = $running?translate('Running'):translate('Stopped'); - -if ( $group = dbFetchOne( 'SELECT * FROM Groups WHERE Id = ?', NULL, array(empty($_COOKIE['zmGroup'])?0:$_COOKIE['zmGroup']) ) ) - $groupIds = array_flip(split( ',', $group['MonitorIds'] )); - -$maxWidth = 0; -$maxHeight = 0; -$cycleCount = 0; -$minSequence = 0; -$maxSequence = 1; -$seqIdList = array(); -$monitors = dbFetchAll( "select * from Monitors order by Sequence asc" ); -$displayMonitors = array(); -for ( $i = 0; $i < count($monitors); $i++ ) -{ - if ( !visibleMonitor( $monitors[$i]['Id'] ) ) - { - continue; - } - if ( $group && !empty($groupIds) && !array_key_exists( $monitors[$i]['Id'], $groupIds ) ) - { - continue; - } - $monitors[$i]['Show'] = true; - if ( empty($minSequence) || ($monitors[$i]['Sequence'] < $minSequence) ) - { - $minSequence = $monitors[$i]['Sequence']; - } - if ( $monitors[$i]['Sequence'] > $maxSequence ) - { - $maxSequence = $monitors[$i]['Sequence']; - } - if (isset($_GET['nostatus'])) { - $monitors[$i]['zmc'] = 1; - $monitors[$i]['zma'] = 1; - } else { - $monitors[$i]['zmc'] = zmcStatus( $monitors[$i] ); - $monitors[$i]['zma'] = zmaStatus( $monitors[$i] ); - } - $monitors[$i]['ZoneCount'] = dbFetchOne( 'select count(Id) as ZoneCount from Zones where MonitorId = ?', 'ZoneCount', array($monitors[$i]['Id']) ); - $counts = array(); - for ( $j = 0; $j < count($eventCounts); $j++ ) - { - $filter = addFilterTerm( $eventCounts[$j]['filter'], count($eventCounts[$j]['filter']['terms']), array( "cnj" => "and", "attr" => "MonitorId", "op" => "=", "val" => $monitors[$i]['Id'] ) ); - parseFilter( $filter ); - $counts[] = "count(if(1".$filter['sql'].",1,NULL)) as EventCount$j"; - $monitors[$i]['eventCounts'][$j]['filter'] = $filter; - } - $sql = 'SELECT '.join($counts,", ").' from Events as E where MonitorId = ?'; - $counts = dbFetchOne( $sql, NULL, array( $monitors[$i]['Id'] ) ); - if ( $monitors[$i]['Function'] != 'None' ) - { - $cycleCount++; - $scaleWidth = reScale( $monitors[$i]['Width'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); - $scaleHeight = reScale( $monitors[$i]['Height'], $monitors[$i]['DefaultScale'], ZM_WEB_DEFAULT_SCALE ); - if ( $maxWidth < $scaleWidth ) $maxWidth = $scaleWidth; - if ( $maxHeight < $scaleHeight ) $maxHeight = $scaleHeight; - } - $monitors[$i] = array_merge( $monitors[$i], $counts ); - $seqIdList[] = $monitors[$i]['Id']; - $displayMonitors[] = $monitors[$i]; -} -$states = dbFetchAll("select * from States"); -/* XML Dump Starts here */ -xml_header(); -/* Print out the general section */ -xml_tag_sec("ZM_XML", 1); -xml_tag_sec("GENERAL", 1); -xml_tag_val("RUNNING", $running); -xml_tag_val("PROTOVER", ZM_EYEZM_PROTOCOL_VERSION); -xml_tag_val("FEATURESET", ZM_EYEZM_FEATURE_SET); -xml_tag_val("VERSION", ZM_VERSION); -xml_tag_val("CANSTR264", canStream264(1)); -xml_tag_val("GD", gdExists()); -xml_tag_val("FVCODEC", ZM_EYEZM_FEED_VCODEC); -xml_tag_val("FVTMT", ZM_EYEZM_H264_TIMEOUT); -xml_tag_val("USER", $user['Username']); -xml_tag_val("UID", $user['Id']); -/* Permissions block */ -xml_tag_sec("PERMS", 1); -xml_tag_val("STREAM", $user['Stream']); -xml_tag_val("EVENTS", $user['Events']); -xml_tag_val("CONTROL", $user['Control']); -xml_tag_val("MONITORS", $user['Monitors']); -xml_tag_val("DEVICES", $user['Devices']); -xml_tag_val("SYSTEM", $user['System']); -xml_tag_sec("PERMS", 0); -/* End permissions block */ -if (canEdit('System')) { - if ($running) { - xml_tag_val("STATE", "stop"); - xml_tag_val("STATE", "restart"); - } else { - xml_tag_val("STATE", "start"); - } - foreach ($states as $state) { - xml_tag_val("STATE", $state['Name']); - } -} -/* End general section */ -xml_tag_sec("GENERAL", 0); -/* Print out the monitors section */ -xml_tag_sec("MONITOR_LIST", 1); -foreach( $displayMonitors as $monitor ) -{ - if (!canView('Monitors')) continue; - xml_tag_sec("MONITOR", 1); - xml_tag_val("ID", $monitor['Id']); - xml_tag_val("NAME", $monitor['Name']); - xml_tag_val("FUNCTION", $monitor['Function']); - xml_tag_val("NUMEVENTS", $monitor['EventCount0']); - xml_tag_val("ENABLED", $monitor['Enabled']); - xml_tag_val("ZMC", $monitor['zmc']); - xml_tag_val("ZMA", $monitor['zma']); - xml_tag_val("STATE", ($monitor['zmc']!=1)?"ERROR":( - ($monitor['zma']==1)?"OK":"WARN")); - xml_tag_val("WIDTH", $monitor['Width']); - xml_tag_val("HEIGHT", $monitor['Height']); - - /* Form the data-base query for this monitor */ - $pageOffset = 0; - $offset = 0; - if (isset($_GET['numEvents'])) { - $numEvents = validInteger($_GET['numEvents']); - $eventsSql = "select E.Id,E.MonitorId,M.Name As MonitorName,E.Cause,E.Name,E.StartTime,E.Length,E.Frames,E.AlarmFrames,E.TotScore,E.AvgScore,E.MaxScore,E.Archived from Monitors as M inner join Events as E on (M.Id = E.MonitorId) and ( E.MonitorId = ? ) order by E.StartTime desc"; - $eventsSql .= " limit ".$numEvents; - /* If there is an pageOff tag for this monitor, then retrieve the offset. Otherwise, don't specify offset */ - if (isset($_GET['pageOff'.$monitor['Id']])) { - /* If pageOffset is greater than we actually have, - * we need to adjust it */ - $pageOffset = validInteger($_GET['pageOff'.$monitor['Id']]); - if ($pageOffset >= ceil($monitor['EventCount0']/$numEvents)) { - $pageOffset = 0; - } - $offset = $pageOffset * $numEvents; - } - $eventsSql .= " offset ".$offset; - } else { - unset($eventsSql); - } - xml_tag_val("PAGEOFF", $pageOffset); - xml_tag_sec("EVENTS",1); - if (canView('Events') && isset($eventsSql)) { - foreach ( dbFetchAll( $eventsSql, NULL, array($monitor['Id']) ) as $event ) - { - xml_tag_sec("EVENT",1); - xml_tag_val("ID",$event['Id']); - xml_tag_val("NAME",$event['Name']); - xml_tag_val("TIME", strftime( STRF_FMT_DATETIME_SHORTER, strtotime($event['StartTime']))); - xml_tag_val("DURATION", $event['Length']); - xml_tag_val("FRAMES", $event['Frames']); - xml_tag_val("FPS", ($event['Length'] > 0)?ceil($event['Frames']/$event['Length']):0); - xml_tag_val("TOTSCORE", $event['TotScore']); - xml_tag_val("AVGSCORE", $event['AvgScore']); - xml_tag_val("MAXSCORE", $event['MaxScore']); - /* Grab the max frame-id from Frames table. If AlarmFrames = 0, don't try - * to grab any frames, and just signal the max frame index as index 0 */ - $fridx = 1; - $alarmFrames = 1; - if ($event['AlarmFrames']) { - $framesSql = "SELECT FrameId FROM Frames WHERE (Type = 'Alarm') and (EventId = ?) ORDER BY Score DESC LIMIT 1"; - $fr = dbFetchOne($framesSql, NULL, array( $event['Id'] ) ); - $fridx = $fr['FrameId']; - $alarmFrames = $event['AlarmFrames']; - } - xml_tag_val("ALARMFRAMES", $alarmFrames); - xml_tag_val("MAXFRAMEID", $fridx); - xml_tag_sec("EVENT",0); - } - } - xml_tag_sec("EVENTS",0); - xml_tag_sec("MONITOR", 0); -} -xml_tag_sec("MONITOR_LIST", 0); -xml_tag_sec("ZM_XML", 0); -?> diff --git a/web/skins/xml/views/none.php b/web/skins/xml/views/none.php deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/skins/xml/views/notfound.png b/web/skins/xml/views/notfound.png deleted file mode 100644 index 219706897..000000000 Binary files a/web/skins/xml/views/notfound.png and /dev/null differ diff --git a/web/tools/Makefile.am b/web/tools/Makefile.am deleted file mode 100644 index 29c91bc02..000000000 --- a/web/tools/Makefile.am +++ /dev/null @@ -1,4 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -SUBDIRS = \ - mootools diff --git a/web/tools/mootools/Makefile.am b/web/tools/mootools/Makefile.am deleted file mode 100644 index 89b17ab8d..000000000 --- a/web/tools/mootools/Makefile.am +++ /dev/null @@ -1,16 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/tools/mootools - -dist_web_DATA = \ - mootools-core-1.4.5-compat.js \ - mootools-more-1.5.1.js - -# Yes, you are correct. This is a HACK! -install-data-hook: - ( cd $(DESTDIR)$(webdir); rm -f mootools-core.js mootools-more.js ) - ( cd $(DESTDIR)$(webdir); ln -sf mootools-core-1.4.5-compat.js mootools-core.js ) - ( cd $(DESTDIR)$(webdir); ln -sf mootools-more-1.5.1.js mootools-more.js ) - -uninstall-hook: - @-( cd $(DESTDIR)$(webdir); rm -f mootools-* ) diff --git a/web/views/Makefile.am b/web/views/Makefile.am deleted file mode 100644 index 6ecec9d8b..000000000 --- a/web/views/Makefile.am +++ /dev/null @@ -1,6 +0,0 @@ -AUTOMAKE_OPTIONS = gnu - -webdir = @WEB_PREFIX@/views - -dist_web_DATA = file.php \ - image.php