diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 000000000..6b8710a71 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 000000000..4682851df --- /dev/null +++ b/.eslintignore @@ -0,0 +1,19 @@ +*.min.js + +# libraries +web/api/lib +web/includes/csrf/ +web/js/videojs.zoomrotate.js +web/skins/classic/js/bootstrap.js +web/skins/classic/js/chosen +web/skins/classic/js/dateTimePicker +web/skins/classic/js/jquery-*.js +web/skins/classic/js/jquery-ui-* +web/skins/classic/js/jquery.js +web/skins/classic/js/moment.js +web/skins/classic/js/video.js +web/tools/mootools + +# Cannot be parsed as JS +web/skins/classic/includes/export_functions.php +web/skins/classic/views/events.php diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 000000000..64950ee0d --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,50 @@ +"use strict"; + +module.exports = { + "env": { + "browser": true, + }, + "extends": ["google"], + "overrides": [{ + // eslint-plugin-html handles eol-last slightly different - it applies to + // each set of script tags, so we turn it off here. + "files": "**/*.*php", + "rules": { + "eol-last": "off", + "indent": "off", + }, + }], + "plugins": [ + "html", + "php-markup", + ], + "rules": { + "camelcase": "off", + "comma-dangle": "off", + "guard-for-in": "off", + "max-len": "off", + "new-cap": ["error", { + capIsNewExceptions: ["Error", "Warning", "Debug", "Polygon_calcArea", "Play", "Stop"], + newIsCapExceptionPattern: "^Asset\.." + }], + "no-array-constructor": "off", + "no-unused-vars": ["error", { + "vars": "local", + "args": "none", + "ignoreRestSiblings": false + }], + "no-var": "off", + "prefer-rest-params": "off", + "quotes": "off", + "require-jsdoc": "off", + "spaced-comment": "off", + }, + "settings": { + "php/php-extensions": [".php"], + "php/markup-replacement": {"php": "", "=": "0"}, + "php/keep-eol": false, + "php/remove-whitespace": false, + "php/remove-empty-line": false, + "php/remove-php-lint": false + }, +}; diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 000000000..8804e639c --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: [connortechnology,pliablepixels] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: zoneminder # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 000000000..610480e8e --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,46 @@ +**THIS FORUM IS FOR BUG REPORTS ONLY** + +Do not post feature or enhancement requests, general discussions, or support questions here. + +Feature and enhancement requests, general discussions, and support questions should occur in one of the following areas: + +- The [ZoneMinder-Chat Slack channel](https://zoneminder-chat.herokuapp.com/) +- The [ZoneMinder Forum](https://forums.zoneminder.com/) + +Docker related issues should be posted here: https://github.com/ZoneMinder/zmdockerfiles + +In order to submit a bug report, please populate the fields below this line. This is required. + +---------------------------------------------------------------------------------------------------- + +**Describe Your Environment** +- Version of ZoneMinder [release version, development version, or commit] +- How you installed ZoneMinder [e.g. PPA, RPMFusion, from-source, etc] +- Full name and version of OS +- Browser name and version (if this is an issue with the web interface) + +**If the issue concerns a camera** +- Make and Model +- Frame rate +- Resolution +- ZoneMinder Source Type: + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Debug Logs** +``` + + + +``` diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 000000000..b5df0a5ee --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,40 @@ +--- +name: Bug report +about: Issues that do not follow the template will be closed +title: '' +labels: '' +assignees: '' + +--- + +**Describe Your Environment** +- Version of ZoneMinder [release version, development version, or commit] +- How you installed ZoneMinder [e.g. PPA, RPMFusion, from-source, etc] +- Full name and version of OS +- Browser name and version (if this is an issue with the web interface) + +**If the issue concerns a camera** +- Make and Model +- frame rate +- resolution +- ZoneMinder Source Type: + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Debug Logs** +``` + + + +``` diff --git a/.github/config.yml b/.github/config.yml new file mode 100644 index 000000000..543a2c160 --- /dev/null +++ b/.github/config.yml @@ -0,0 +1,21 @@ +# Configuration for welcome - https://github.com/behaviorbot/welcome + +# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome + +# Comment to be posted to on first time issues +newIssueWelcomeComment: > + Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template! + +# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome + +# Comment to be posted to on PRs from first time contributors in your repository +#newPRWelcomeComment: > +# Thanks for opening this pull request! Please check out our contributing guidelines. + +# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge + +# Comment to be posted to on pull requests merged by a first time user +#firstPRMergeComment: > +# Congrats on merging your first pull request! We here at behaviorbot are proud of you! + +# It is recommend to include as many gifs and emojis as possible diff --git a/.github/issue-close-app.yml b/.github/issue-close-app.yml new file mode 100644 index 000000000..ebe4cdcfa --- /dev/null +++ b/.github/issue-close-app.yml @@ -0,0 +1,16 @@ +# Comment that will be sent if an issue is judged to be closed +comment: "This issue is closed because it does not meet our bug report issue template. Please read it." +issueConfigs: +# There can be several configs for different kind of issues. +- content: +# Example 1: bug report + - "Describe Your Environment" + - "Describe the bug" + - "Expected behavior" +# Optional configuration: +# +# whether the keywords are case-insensitive +# default value is false, which means keywords are case-sensitive +caseInsensitive: true +# The issue is judged to be legal if it includes all keywords from any of these two configs. +# Or it will be closed by the app. diff --git a/.github/no-response.yml b/.github/no-response.yml new file mode 100644 index 000000000..7e40c036f --- /dev/null +++ b/.github/no-response.yml @@ -0,0 +1,13 @@ +# Configuration for probot-no-response - https://github.com/probot/no-response + +# Number of days of inactivity before an Issue is closed for lack of response +daysUntilClose: 7 +# Label requiring a response +responseRequiredLabel: more-information-needed +# Comment to post when closing an Issue for lack of response. Set to `false` to disable +closeComment: > + This issue has been automatically closed because there has been no response + to our request for more information from the original author. With only the + information that is currently in the issue, we don't have enough information + to take action. Please reach out if you have or find the answers we need so + that we can investigate further. diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 000000000..9ff190b1f --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,29 @@ +# Configuration for probot-stale - https://github.com/probot/stale + +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 60 + +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 7 + +# Issues with these labels will never be considered stale +exemptLabels: + - "Under Review" + - "Bounty" + - "bug" + - "Feature" + +# Set to true to ignore issues in a milestone (defaults to false) +exemptMilestones: true + +# Label to use when marking an issue as stale +staleLabel: stale + +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. + +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false diff --git a/.github/support.yml b/.github/support.yml new file mode 100644 index 000000000..c62515ee2 --- /dev/null +++ b/.github/support.yml @@ -0,0 +1,29 @@ +# Configuration for support-requests - https://github.com/dessant/support-requests + +# Label used to mark issues as support requests +supportLabel: support + +# Comment to post on issues marked as support requests, `{issue-author}` is an +# optional placeholder. Set to `false` to disable +supportComment: > + :wave: @{issue-author}, we use the issue tracker exclusively for bug reports. + However, this issue appears to be a support request, a feature request, or + attempts to ask a question. + + Please use our support channels to get help with or discuss this project: + + - The [ZoneMinder-Chat Slack channel](https://zoneminder-chat.herokuapp.com/) + + - The [ZoneMinder USer Forum](https://forums.zoneminder.com/) + +# Close issues marked as support requests +close: true + +# Lock issues marked as support requests +lock: true + +# Assign `off-topic` as the reason for locking. Set to `false` to disable +setLockReason: true + +# Repository to extend settings from +# _extends: repo diff --git a/.gitignore b/.gitignore index bd66e684a..3167e62a6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,42 +1,72 @@ -configure -config.h.in -config.h.in~ -autom4te.cache -aclocal.m4 -depcomp -install-sh -missing -mkinstalldirs -stamp-h1 -stamp-h.in -scripts/ZoneMinder/blib -Makefile.in +# If you are adding to this file, please ensure sorting is maintained. If using vim, you can use :%sort u +CMakeCache.txt +CMakeFiles/ Makefile -docs/_build +Makefile.in +aclocal.m4 +autom4te.cache +cmake/cmake_uninstall.cmake +cmake_install.cmake compile config.guess config.h +config.h.in +config.h.in~ config.log config.status config.sub +configure +db/CMakeFiles/ +db/cmake_install.cmake db/zm_create.sql +depcomp +docs/_build +install-sh +install_manifest.txt +misc/CMakeFiles/ misc/apache.conf +misc/cmake_install.cmake misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules misc/logrotate.conf misc/syslog.conf +misc/zoneminder-tmpfiles.conf +misc/zoneminder.service +missing +mkinstalldirs +onvif/CMakeFiles/ +onvif/cmake_install.cmake +onvif/modules/CMakeFiles/ onvif/modules/MYMETA.json onvif/modules/MYMETA.yml +onvif/modules/MakefilePerl +onvif/modules/cmake_install.cmake +onvif/modules/output/ +onvif/modules/pm_to_blib +onvif/proxy/CMakeFiles/ onvif/proxy/MYMETA.json onvif/proxy/MYMETA.yml -scripts/ZoneMinder/Makefile.old +onvif/proxy/MakefilePerl +onvif/proxy/cmake_install.cmake +onvif/proxy/output/ +onvif/proxy/pm_to_blib +onvif/scripts/CMakeFiles/ +onvif/scripts/cmake_install.cmake +scripts/CMakeFiles/ +scripts/ZoneMinder/CMakeFiles/ scripts/ZoneMinder/MYMETA.json scripts/ZoneMinder/MYMETA.yml +scripts/ZoneMinder/Makefile.old +scripts/ZoneMinder/MakefilePerl +scripts/ZoneMinder/blib +scripts/ZoneMinder/cmake_install.cmake scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm +scripts/ZoneMinder/output/ scripts/ZoneMinder/pm_to_blib +scripts/cmake_install.cmake scripts/zm scripts/zmaudit.pl scripts/zmcamtool.pl @@ -49,14 +79,47 @@ scripts/zmfilter.pl scripts/zmlogrotate.conf scripts/zmpkg.pl scripts/zmsystemctl.pl +scripts/zmtelemetry.pl scripts/zmtrack.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl -src/.deps/ +scripts/zoneminder-zmaudit.pl.8 +scripts/zoneminder-zmaudit.pl.8.gz +scripts/zoneminder-zmcamtool.pl.8 +scripts/zoneminder-zmcamtool.pl.8.gz +scripts/zoneminder-zmcontrol.pl.8 +scripts/zoneminder-zmcontrol.pl.8.gz +scripts/zoneminder-zmdc.pl.8 +scripts/zoneminder-zmdc.pl.8.gz +scripts/zoneminder-zmfilter.pl.8 +scripts/zoneminder-zmfilter.pl.8.gz +scripts/zoneminder-zmpkg.pl.8 +scripts/zoneminder-zmpkg.pl.8.gz +scripts/zoneminder-zmsystemctl.pl.8 +scripts/zoneminder-zmsystemctl.pl.8.gz +scripts/zoneminder-zmtelemetry.pl.8 +scripts/zoneminder-zmtelemetry.pl.8.gz +scripts/zoneminder-zmtrack.pl.8 +scripts/zoneminder-zmtrack.pl.8.gz +scripts/zoneminder-zmtrigger.pl.8 +scripts/zoneminder-zmtrigger.pl.8.gz +scripts/zoneminder-zmupdate.pl.8 +scripts/zoneminder-zmupdate.pl.8.gz +scripts/zoneminder-zmvideo.pl.8 +scripts/zoneminder-zmvideo.pl.8.gz +scripts/zoneminder-zmwatch.pl.8 +scripts/zoneminder-zmwatch.pl.8.gz +scripts/zoneminder-zmx10.pl.8 +scripts/zoneminder-zmx10.pl.8.gz src/*.o +src/.deps/ +src/CMakeFiles/ +src/cmake_install.cmake +src/libzm.a +src/nph-zms src/zm_config.h src/zm_config_defines.h src/zma @@ -64,6 +127,34 @@ src/zmc src/zmf src/zms src/zmu +src/zoneminder-zma.8 +src/zoneminder-zma.8.gz +src/zoneminder-zmc.8 +src/zoneminder-zmc.8.gz +src/zoneminder-zmf.8 +src/zoneminder-zmf.8.gz +src/zoneminder-zmstreamer.8 +src/zoneminder-zmstreamer.8.gz +src/zoneminder-zmu.8 +src/zoneminder-zmu.8.gz +stamp-h.in +stamp-h1 +web/CMakeFiles/ +web/api/CMakeFiles/ +web/api/app/Config/bootstrap.php +web/api/app/Config/core.php +web/api/cmake_install.cmake +web/cgi-bin/ +web/cmake_install.cmake +web/events/ +web/images/ web/includes/config.php +web/tools/mootools/CMakeFiles/ +web/tools/mootools/cmake_install.cmake +web/tools/mootools/mootools-core.js +web/tools/mootools/mootools-more.js +web/undef.log zm.conf zmconfgen.pl +zmlinkcontent.sh +**/.DS_Store diff --git a/.gitmodules b/.gitmodules index 0fa8df21a..eb0e282a2 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,7 @@ [submodule "web/api/app/Plugin/Crud"] path = web/api/app/Plugin/Crud - url = https://github.com/FriendsOfCake/crud.git + url = https://github.com/ZoneMinder/crud.git branch = 3.0 +[submodule "web/api/app/Plugin/CakePHP-Enum-Behavior"] + path = web/api/app/Plugin/CakePHP-Enum-Behavior + url = https://github.com/ZoneMinder/CakePHP-Enum-Behavior.git diff --git a/.travis.yml b/.travis.yml index 183d22e57..7a51c271c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,48 +1,75 @@ language: cpp sudo: required -dist: trusty +dist: xenial +git: + depth: 9999999 notifications: - irc: "chat.freenode.net#zoneminder-dev" + irc: chat.freenode.net#zoneminder-dev branches: except: - - modern + - modern +cache: ccache addons: - sauce_connect: - username: "zoneminder" - access_key: "046ec7c1-c598-4e7e-949a-f86e725d1722" -env: - global: - - LD_LIBRARY_PATH="/usr/local/lib:/opt/libjpeg-turbo/lib:$LD_LIBRARY_PATH" - - DEB_HOST_GNU_TYPE=$(dpkg-architecture -qDEB_HOST_GNU_TYPE) - - DEB_BUILD_GNU_TYPE=$(dpkg-architecture -qDEB_BUILD_GNU_TYPE) - - CFLAGS="-DZM_FFMPEG_CVS -DHAVE_LIBCRYPTO -I/usr/local/include" - - CXXFLAGS="$CFLAGS" - matrix: - - ZM_BUILDMETHOD=cmake -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 2>&1 > /dev/null + ssh_known_hosts: zmrepo.zoneminder.com + apt: + sources: + - sourceline: ppa:iconnor/zoneminder-master + - key_url: http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4D0BF748776FFB04 + packages: + - gdebi + - yum-utils + - patch + - git + - curl + - sshfs + - sed + - binfmt-support + - qemu + - qemu-user-static + - dnsutils + - traceroute install: - - 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` - - sudo make install - - sudo make install-libs -before_script: - - cd $TRAVIS_BUILD_DIR - - 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" + - update-binfmts --enable qemu-arm + +env: + - SMPFLAGS=-j4 OS=el DIST=7 + - SMPFLAGS=-j4 OS=el DIST=8 DOCKER_REPO=knnniggett/packpack + - SMPFLAGS=-j4 OS=fedora DIST=30 + - SMPFLAGS=-j4 OS=fedora DIST=31 + - SMPFLAGS=-j4 OS=ubuntu DIST=trusty DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=ubuntu DIST=xenial DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=ubuntu DIST=bionic DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=ubuntu DIST=disco DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=ubuntu DIST=eoan DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=ubuntu DIST=focal DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=debian DIST=jessie DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=debian DIST=stretch DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=debian DIST=buster DOCKER_REPO=iconzm/packpack + - SMPFLAGS=-j4 OS=ubuntu DIST=trusty ARCH=i386 + - SMPFLAGS=-j4 OS=ubuntu DIST=xenial ARCH=i386 + - SMPFLAGS=-j4 OS=ubuntu DIST=disco ARCH=i386 + - SMPFLAGS=-j4 OS=debian DIST=buster ARCH=i386 + - SMPFLAGS=-j4 OS=debian DIST=stretch ARCH=i386 + - SMPFLAGS=-j4 OS=eslint DIST=eslint + +compiler: +- gcc +services: +- mysql +- docker + script: - - if [ "$ZM_BUILDMETHOD" = "cmake" ]; then cmake -DCMAKE_INSTALL_PREFIX="/usr"; fi - - make - - sudo make install - - if [ "$ZM_BUILDMETHOD" = "cmake" ]; then sudo ./zmlinkcontent.sh; fi - - mysql -uzmuser -pzmpass < db/zm_create.sql - - mysql -uzmuser -pzmpass zm < db/test.monitor.sql - - sudo zmpkg.pl start - - sudo zmfilter.pl -f purgewhenfull +- utils/packpack/startpackpack.sh + +before_deploy: +- openssl aes-256-cbc -K $encrypted_62a62750aa73_key -iv $encrypted_62a62750aa73_iv -in ./utils/packpack/deploy_rsa.enc -out /tmp/deploy_rsa -d +- eval "$(ssh-agent -s)" +- chmod 600 /tmp/deploy_rsa +- ssh-add /tmp/deploy_rsa + +deploy: + provider: script + skip_cleanup: true + script: utils/packpack/rsync_xfer.sh + on: + branch: master diff --git a/AUTHORS b/AUTHORS deleted file mode 100644 index 72d39764f..000000000 --- a/AUTHORS +++ /dev/null @@ -1,10 +0,0 @@ -ZoneMinder - A Linux based camera monitoring and analysis tool. - -This project was imagined and created by Philip Coombes in -September 2002, shortly after being burglarised of his power tools. -He can be contacted at philip.coombes@zoneminder.com - -In early 2013 after nearly two years of no development, -the community reached out to Phil in an attempt to open up the -project. With Phil's blessing, the code was migrated to github, -and the community took over the project. diff --git a/BUGS b/BUGS deleted file mode 100644 index b78c01bed..000000000 --- a/BUGS +++ /dev/null @@ -1 +0,0 @@ -Please see https://github.com/ZoneMinder/ZoneMinder/issues?state=open diff --git a/CHANGELOG.md b/CHANGELOG.md index 471066ac3..ac76176c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -82,7 +82,7 @@ - header typo corrections [\#1058](https://github.com/ZoneMinder/ZoneMinder/pull/1058) ([onlyjob](https://github.com/onlyjob)) - quick fix for \#1055: make sure our mmap fd is \> 2 [\#1057](https://github.com/ZoneMinder/ZoneMinder/pull/1057) ([connortechnology](https://github.com/connortechnology)) - Fix sgfault caused by the privacy mask stuff [\#1056](https://github.com/ZoneMinder/ZoneMinder/pull/1056) ([connortechnology](https://github.com/connortechnology)) -- link to cambozola pacakge, rather than download during build [\#1054](https://github.com/ZoneMinder/ZoneMinder/pull/1054) ([knnniggett](https://github.com/knnniggett)) +- link to cambozola package, rather than download during build [\#1054](https://github.com/ZoneMinder/ZoneMinder/pull/1054) ([knnniggett](https://github.com/knnniggett)) - redhat rpm packaging modifications [\#1052](https://github.com/ZoneMinder/ZoneMinder/pull/1052) ([knnniggett](https://github.com/knnniggett)) - remove core.php, modify core.php.default [\#1049](https://github.com/ZoneMinder/ZoneMinder/pull/1049) ([knnniggett](https://github.com/knnniggett)) - Google recaptcha [\#1048](https://github.com/ZoneMinder/ZoneMinder/pull/1048) ([pliablepixels](https://github.com/pliablepixels)) @@ -167,7 +167,7 @@ - alter the logic of ReadData. New behaviour is documented. [\#870](https://github.com/ZoneMinder/ZoneMinder/pull/870) ([connortechnology](https://github.com/connortechnology)) - analysis optimisations [\#867](https://github.com/ZoneMinder/ZoneMinder/pull/867) ([connortechnology](https://github.com/connortechnology)) - Don't die if db goes away during logging [\#866](https://github.com/ZoneMinder/ZoneMinder/pull/866) ([connortechnology](https://github.com/connortechnology)) -- Move iostream inclusion in zm.h and declare explicitely the namespace [\#859](https://github.com/ZoneMinder/ZoneMinder/pull/859) ([manupap1](https://github.com/manupap1)) +- Move iostream inclusion in zm.h and declare explicitly the namespace [\#859](https://github.com/ZoneMinder/ZoneMinder/pull/859) ([manupap1](https://github.com/manupap1)) - Fix detection of deprecated libav / ffmpeg functions [\#858](https://github.com/ZoneMinder/ZoneMinder/pull/858) ([manupap1](https://github.com/manupap1)) - Correct bareword config entries with newer {} style [\#856](https://github.com/ZoneMinder/ZoneMinder/pull/856) ([connortechnology](https://github.com/connortechnology)) - update german translation [\#854](https://github.com/ZoneMinder/ZoneMinder/pull/854) ([seeebek](https://github.com/seeebek)) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09f127996..5dd26a5d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ # Created by mastertheknife (Kfir Itzhak) # For more information and installation, see the INSTALL file # -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 2.8.7) project (zoneminder) file (STRINGS "version" zoneminder_VERSION) # make API version a minor of ZM version @@ -58,14 +58,54 @@ if(NOT HOST_OS) "ZoneMinder was unable to deterimine the host OS. Please report this. Value of CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}") endif(NOT HOST_OS) +set (CMAKE_CXX_STANDARD 11) +SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") # Default CLFAGS and CXXFLAGS: set(CMAKE_C_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2") set(CMAKE_CXX_FLAGS_RELEASE "-Wall -D__STDC_CONSTANT_MACROS -O2") set(CMAKE_C_FLAGS_DEBUG "-Wall -D__STDC_CONSTANT_MACROS -g") set(CMAKE_CXX_FLAGS_DEBUG "-Wall -D__STDC_CONSTANT_MACROS -g") +set(CMAKE_C_FLAGS_OPTIMISED "-Wall -D__STDC_CONSTANT_MACROS -O3") +set(CMAKE_CXX_FLAGS_OPTIMISED "-Wall -D__STDC_CONSTANT_MACROS -O3") set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/") +# GCC below 6.0 doesn't support __target__("fpu=neon") attribute, required for compiling ARM Neon code, otherwise compilation fails. +# Must use -mfpu=neon compiler flag instead, but only do that for processors that support neon, otherwise strip the neon code alltogether, +# because passing -fmpu=neon is unsafe to processors that don't support neon + +# Arm neon support only tested on Linux. If your arm hardware is running a non-Linux distro and is using gcc then contact us. +IF (CMAKE_SYSTEM_NAME MATCHES "Linux") + string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ZM_SYSTEM_PROC) + IF((ZM_SYSTEM_PROC STREQUAL "") OR (ZM_SYSTEM_PROC STREQUAL "unknown")) + execute_process(COMMAND uname -m OUTPUT_VARIABLE ZM_SYSTEM_PROC ERROR_VARIABLE ZM_SYSTEM_PROC_ERR) + + # maybe make the following error checks fatal + IF(ZM_SYSTEM_PROC_ERR) + message(WARNING "\nAn error occurred while attempting to determine the system processor:\n${ZM_SYSTEM_PROC_ERR}") + ENDIF(ZM_SYSTEM_PROC_ERR) + IF(NOT ZM_SYSTEM_PROC) + message(WARNING "\nUnable to determine the system processor. This may cause a build failure.\n") + ENDIF(ZM_SYSTEM_PROC) + + ENDIF((ZM_SYSTEM_PROC STREQUAL "") OR (ZM_SYSTEM_PROC STREQUAL "unknown")) + + IF(ZM_SYSTEM_PROC MATCHES "^arm") + IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) + EXEC_PROGRAM(grep ARGS " neon " "/proc/cpuinfo" OUTPUT_VARIABLE neonoutput RETURN_VALUE neonresult) + IF(neonresult EQUAL 0) + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpu=neon") + set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpu=neon") + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -mfpu=neon") + set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -mfpu=neon") + ELSE(neonresult EQUAL 0) + add_definitions(-DZM_STRIP_NEON=1) + message(STATUS "ARM Neon is not available on this processor. Neon functions will be absent") + ENDIF(neonresult EQUAL 0) + ENDIF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0) + ENDIF(ZM_SYSTEM_PROC MATCHES "^arm") +ENDIF (CMAKE_SYSTEM_NAME MATCHES "Linux") + # Modules that we need: include (GNUInstallDirs) include (CheckIncludeFile) @@ -85,7 +125,12 @@ mark_as_advanced( ZM_PERL_MM_PARMS ZM_PERL_SEARCH_PATH ZM_TARGET_DISTRO - ZM_CONFIG_DIR) + ZM_PATH_MAP + ZM_PATH_ARP + ZM_CONFIG_DIR + ZM_CONFIG_SUBDIR + ZM_SYSTEMD + ZM_MANPAGE_DEST_PREFIX) set(ZM_RUNDIR "/var/run/zm" CACHE PATH "Location of transient process files, default: /var/run/zm") @@ -95,10 +140,12 @@ set(ZM_TMPDIR "/var/tmp/zm" CACHE PATH "Location of temporary files, default: /tmp/zm") set(ZM_LOGDIR "/var/log/zm" CACHE PATH "Location of generated log files, default: /var/log/zm") -set(ZM_WEBDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder/www" CACHE PATH +set(ZM_WEBDIR "${CMAKE_INSTALL_FULL_DATADIR}/zoneminder/www" CACHE PATH "Location of the web files, default: /${CMAKE_INSTALL_DATADIR}/zoneminder/www") -set(ZM_CGIDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}/zoneminder/cgi-bin" CACHE PATH +set(ZM_CGIDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/zoneminder/cgi-bin" CACHE PATH "Location of the cgi-bin files, default: /${CMAKE_INSTALL_LIBEXECDIR}/zoneminder/cgi-bin") +set(ZM_CACHEDIR "/var/cache/zoneminder" CACHE PATH + "Location of the web server cache busting files, default: /var/cache/zoneminder") set(ZM_CONTENTDIR "/var/lib/zoneminder" CACHE PATH "Location of dynamic content (events and images), default: /var/lib/zoneminder") set(ZM_DB_HOST "localhost" CACHE STRING @@ -115,9 +162,24 @@ set(ZM_WEB_USER "" CACHE STRING set(ZM_WEB_GROUP "" CACHE STRING "The group apache or the local web server runs on, Leave empty to be the same as the web user") +set(ZM_DIR_EVENTS "${ZM_CONTENTDIR}/events" CACHE PATH + "Location where events are recorded to, default: ZM_CONTENTDIR/events") +set(ZM_DIR_SOUNDS "sounds" CACHE PATH + "Location to look for optional sound files, default: sounds") +set(ZM_PATH_ZMS "/cgi-bin/nph-zms" CACHE PATH + "Web url to zms streaming server, default: /cgi-bin/nph-zms") +set(ZM_PATH_SHUTDOWN "/sbin/shutdown" CACHE PATH + "Path to shutdown binary, default: /sbin/shutdown") + # Advanced +set(ZM_PATH_MAP "/dev/shm" CACHE PATH + "Location to save mapped memory files, default: /dev/shm") +set(ZM_PATH_ARP "" CACHE PATH + "Full path to compatible arp binary. Leave empty for automatic detection.") set(ZM_CONFIG_DIR "/${CMAKE_INSTALL_SYSCONFDIR}" CACHE PATH "Location of ZoneMinder configuration, default system config directory") +set(ZM_CONFIG_SUBDIR "${ZM_CONFIG_DIR}/conf.d" CACHE PATH + "Location of ZoneMinder configuration subfolder, default: ZM_CONFIG_DIR/conf.d") set(ZM_EXTRA_LIBS "" CACHE STRING "A list of optional libraries, separated by semicolons, e.g. ssl;theora") set(ZM_MYSQL_ENGINE "InnoDB" CACHE STRING @@ -125,10 +187,10 @@ set(ZM_MYSQL_ENGINE "InnoDB" CACHE STRING set(ZM_NO_MMAP "OFF" CACHE BOOL "Set to ON to not use mmap shared memory. Shouldn't be enabled unless you experience problems with the shared memory. default: OFF") -set(ZM_NO_FFMPEG "OFF" CACHE BOOL - "Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF") set(ZM_NO_LIBVLC "OFF" CACHE BOOL "Set to ON to skip libvlc checks and force building ZM without libvlc. default: OFF") +set(ZM_NO_LIBVNC "OFF" CACHE BOOL +"Set to ON to skip libvnc checks and force building ZM without libvnc. default: OFF") set(ZM_NO_CURL "OFF" CACHE BOOL "Set to ON to skip cURL checks and force building ZM without cURL. default: OFF") set(ZM_NO_X10 "OFF" CACHE BOOL @@ -147,32 +209,26 @@ set(ZM_PERL_SEARCH_PATH "" CACHE PATH where ZM_PERL_MM_PARMS has been modified such that ZoneMinder's Perl modules are installed outside Perl's default search path.") set(ZM_TARGET_DISTRO "" CACHE STRING - "Build ZoneMinder for a specific distribution. Currently, valid names are: f22, f23, el6, el7, OS13") + "Build ZoneMinder for a specific distribution. Currently, valid names are: fc27, fc26, el7, OS13, FreeBSD") +set(ZM_SYSTEMD "OFF" CACHE BOOL + "Set to ON to force building ZM with systemd support. default: OFF") +set(ZM_MANPAGE_DEST_PREFIX "share/man" CACHE PATH + "Relative path used to install ZoneMinder's Man pages into a + non-standard folder. Most Linux users will not need to change this. + BSD users may need to set this.") # Reassign some variables if a target distro has been specified -if((ZM_TARGET_DISTRO STREQUAL "f22") OR (ZM_TARGET_DISTRO STREQUAL "f23")) - set(ZM_RUNDIR "/var/run/zoneminder") - set(ZM_SOCKDIR "/var/lib/zoneminder/sock") - set(ZM_TMPDIR "/var/lib/zoneminder/temp") - set(ZM_LOGDIR "/var/log/zoneminder") - set(ZM_CONFIG_DIR "/etc/zm") - set(ZM_WEBDIR "/usr/share/zoneminder/www") - set(ZM_CGIDIR "/usr/libexec/zoneminder/cgi-bin") -elseif(ZM_TARGET_DISTRO STREQUAL "el6") - set(ZM_RUNDIR "/var/run/zoneminder") - set(ZM_SOCKDIR "/var/lib/zoneminder/sock") - set(ZM_TMPDIR "/var/lib/zoneminder/temp") - set(ZM_LOGDIR "/var/log/zoneminder") - set(ZM_WEBDIR "/usr/share/zoneminder/www") - set(ZM_CGIDIR "/usr/libexec/zoneminder/cgi-bin") -elseif(ZM_TARGET_DISTRO STREQUAL "el7") +if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc")) set(ZM_RUNDIR "/var/run/zoneminder") set(ZM_SOCKDIR "/var/lib/zoneminder/sock") set(ZM_TMPDIR "/var/lib/zoneminder/temp") set(ZM_LOGDIR "/var/log/zoneminder") set(ZM_CONFIG_DIR "/etc/zm") + set(ZM_CONFIG_SUBDIR "/etc/zm/conf.d") set(ZM_WEBDIR "/usr/share/zoneminder/www") set(ZM_CGIDIR "/usr/libexec/zoneminder/cgi-bin") + set(ZM_DIR_EVENTS "/var/lib/zoneminder/events") + set(ZM_PATH_ZMS "/cgi-bin-zm/nph-zms") elseif(ZM_TARGET_DISTRO STREQUAL "OS13") set(ZM_RUNDIR "/var/run/zoneminder") set(ZM_TMPDIR "/var/run/zoneminder") @@ -190,10 +246,11 @@ elseif(ZM_TARGET_DISTRO STREQUAL "FreeBSD") set(ZM_WEB_USER "www") set(ZM_WEB_GROUP "www") set(ZM_CONFIG_DIR "/usr/local/etc/zm") + set(ZM_CONFIG_SUBDIR "/usr/local/etc/zm/conf.d") set(ZM_WEBDIR "/usr/local/share/zoneminder/www") set(ZM_CGIDIR "/usr/local/libexec/zoneminder/cgi-bin") set(ZM_PERL_MM_PARMS "INSTALLDIRS=site") -endif((ZM_TARGET_DISTRO STREQUAL "f22") OR (ZM_TARGET_DISTRO STREQUAL "f23")) +endif((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc")) # Required for certain checks to work set(CMAKE_EXTRA_INCLUDE_FILES @@ -204,6 +261,11 @@ include_directories("${CMAKE_BINARY_DIR}") # This is required to enable searching in lib64 (if exists), do not change set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON) +# Set the systemd flag if systemd is autodetected or ZM_SYSTEMD has been set +if(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system)) + set(WITH_SYSTEMD 1) +endif(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system)) + # System checks check_include_file("libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H) if(NOT HAVE_LIBV4L1_VIDEODEV_H) @@ -261,7 +323,7 @@ if(NOT ZM_NO_CURL) find_package(CURL) if(CURL_FOUND) set(HAVE_LIBCURL 1) - list(APPEND ZM_BIN_LIBS ${CURL_LIBRARIES}) + #list(APPEND ZM_BIN_LIBS ${CURL_LIBRARIES}) include_directories(${CURL_INCLUDE_DIRS}) set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS}) check_include_file("curl/curl.h" HAVE_CURL_CURL_H) @@ -289,19 +351,50 @@ else(JPEG_FOUND) "ZoneMinder requires jpeg but it was not found on your system") endif(JPEG_FOUND) +# LIBJWT +find_package(LibJWT) +if(LIBJWT_FOUND) + set(HAVE_LIBJWT 1) + set(optlibsfound "${optlibsfound} LIBJWT") + list(APPEND ZM_BIN_LIBS "${LIBJWT_LIBRARY}") +else(LIBJWT_FOUND) + set(optlibsnotfound "${optlibsnotfound} LIBJWT") +endif(LIBJWT_FOUND) + +# gnutls (using find_library and find_path) +if(HAVE_LIBJWT) + find_library(GNUTLS_LIBRARIES gnutls) + if(GNUTLS_LIBRARIES) + set(HAVE_LIBGNUTLS 1) + list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}") + find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h) + if(GNUTLS_INCLUDE_DIR) + include_directories("${GNUTLS_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}") + endif(GNUTLS_INCLUDE_DIR) + mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR) + check_include_file("gnutls/gnutls.h" HAVE_GNUTLS_GNUTLS_H) + set(optlibsfound "${optlibsfound} GnuTLS") + else(GNUTLS_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} GnuTLS") + endif(GNUTLS_LIBRARIES) +endif(HAVE_LIBJWT) + # OpenSSL -find_package(OpenSSL) -if(OPENSSL_FOUND) - set(HAVE_LIBOPENSSL 1) - set(HAVE_LIBCRYPTO 1) - list(APPEND ZM_BIN_LIBS "${OPENSSL_LIBRARIES}") - include_directories("${OPENSSL_INCLUDE_DIR}") - set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") - check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H) - set(optlibsfound "${optlibsfound} OpenSSL") -else(OPENSSL_FOUND) - set(optlibsnotfound "${optlibsnotfound} OpenSSL") -endif(OPENSSL_FOUND) +if(NOT HAVE_LIBGNUTLS OR NOT HAVE_LIBJWT) + find_package(OpenSSL) + if(OPENSSL_FOUND) + set(HAVE_LIBOPENSSL 1) + set(HAVE_LIBCRYPTO 1) + list(APPEND ZM_BIN_LIBS "${OPENSSL_LIBRARIES}") + include_directories("${OPENSSL_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}") + check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H) + set(optlibsfound "${optlibsfound} OpenSSL") + else(OPENSSL_FOUND) + set(optlibsnotfound "${optlibsnotfound} OpenSSL") + endif(OPENSSL_FOUND) +endif(NOT HAVE_LIBGNUTLS OR NOT HAVE_LIBJWT) # pthread (using find_library and find_path) find_library(PTHREAD_LIBRARIES pthread) @@ -358,40 +451,18 @@ else(GCRYPT_LIBRARIES) set(optlibsnotfound "${optlibsnotfound} GCrypt") endif(GCRYPT_LIBRARIES) -# gnutls (using find_library and find_path) -find_library(GNUTLS_LIBRARIES gnutls-openssl) -if(NOT GNUTLS_LIBRARIES) - find_library(GNUTLS_LIBRARIES gnutls) -endif(NOT GNUTLS_LIBRARIES) - -if(GNUTLS_LIBRARIES) - set(HAVE_LIBGNUTLS 1) - list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}") - find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h) - if(GNUTLS_INCLUDE_DIR) - include_directories("${GNUTLS_INCLUDE_DIR}") - set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}") - endif(GNUTLS_INCLUDE_DIR) - mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR) - check_include_file("gnutls/openssl.h" HAVE_GNUTLS_OPENSSL_H) - check_include_file("gnutls/gnutls.h" HAVE_GNUTLS_GNUTLS_H) - set(optlibsfound "${optlibsfound} GnuTLS") -else(GNUTLS_LIBRARIES) - set(optlibsnotfound "${optlibsnotfound} GnuTLS") -endif(GNUTLS_LIBRARIES) - # mysqlclient (using find_library and find_path) find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql) if(MYSQLCLIENT_LIBRARIES) set(HAVE_LIBMYSQLCLIENT 1) list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}") - find_path(MYSQLCLIENT_INCLUDE_DIR mysql/mysql.h) + find_path(MYSQLCLIENT_INCLUDE_DIR mysql.h PATH_SUFFIXES mysql) if(MYSQLCLIENT_INCLUDE_DIR) include_directories("${MYSQLCLIENT_INCLUDE_DIR}") set(CMAKE_REQUIRED_INCLUDES "${MYSQLCLIENT_INCLUDE_DIR}") endif(MYSQLCLIENT_INCLUDE_DIR) mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR) - check_include_file("mysql/mysql.h" HAVE_MYSQL_H) + check_include_file("mysql.h" HAVE_MYSQL_H) if(NOT HAVE_MYSQL_H) message(FATAL_ERROR "ZoneMinder requires MySQL headers - check that MySQL development packages are installed") @@ -401,107 +472,193 @@ else(MYSQLCLIENT_LIBRARIES) "ZoneMinder requires mysqlclient but it was not found on your system") endif(MYSQLCLIENT_LIBRARIES) +# x264 (using find_library and find_path) +find_library(X264_LIBRARIES x264) +if(X264_LIBRARIES) + set(HAVE_LIBX264 1) + list(APPEND ZM_BIN_LIBS "${X264_LIBRARIES}") + find_path(X264_INCLUDE_DIR x264.h) + if(X264_INCLUDE_DIR) + include_directories("${X264_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${X264_INCLUDE_DIR}") + endif(X264_INCLUDE_DIR) + mark_as_advanced(FORCE X264_LIBRARIES X264_INCLUDE_DIR) + check_include_files("stdint.h;x264.h" HAVE_X264_H) + set(optlibsfound "${optlibsfound} x264") +else(X264_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} x264") +endif(X264_LIBRARIES) + +# mp4v2 (using find_library and find_path) +find_library(MP4V2_LIBRARIES mp4v2) +if(MP4V2_LIBRARIES) + set(HAVE_LIBMP4V2 1) + list(APPEND ZM_BIN_LIBS "${MP4V2_LIBRARIES}") + + # mp4v2/mp4v2.h + find_path(MP4V2_INCLUDE_DIR mp4v2/mp4v2.h) + if(MP4V2_INCLUDE_DIR) + include_directories("${MP4V2_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${MP4V2_INCLUDE_DIR}") + check_include_file("mp4v2/mp4v2.h" HAVE_MP4V2_MP4V2_H) + endif(MP4V2_INCLUDE_DIR) + + # mp4v2.h + find_path(MP4V2_INCLUDE_DIR mp4v2.h) + if(MP4V2_INCLUDE_DIR) + include_directories("${MP4V2_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${MP4V2_INCLUDE_DIR}") + check_include_file("mp4v2.h" HAVE_MP4V2_H) + endif(MP4V2_INCLUDE_DIR) + + # mp4.h + find_path(MP4V2_INCLUDE_DIR mp4.h) + if(MP4V2_INCLUDE_DIR) + include_directories("${MP4V2_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${MP4V2_INCLUDE_DIR}") + check_include_file("mp4.h" HAVE_MP4_H) + endif(MP4V2_INCLUDE_DIR) + + mark_as_advanced(FORCE MP4V2_LIBRARIES MP4V2_INCLUDE_DIR) + set(optlibsfound "${optlibsfound} mp4v2") +else(MP4V2_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} mp4v2") +endif(MP4V2_LIBRARIES) + set(PATH_FFMPEG "") set(OPT_FFMPEG "no") -# Do not check for ffmpeg if ZM_NO_FFMPEG is on -if(NOT ZM_NO_FFMPEG) - # avformat (using find_library and find_path) - find_library(AVFORMAT_LIBRARIES avformat) - if(AVFORMAT_LIBRARIES) - set(HAVE_LIBAVFORMAT 1) - list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}") - find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h" /usr/include/ffmpeg) - if(AVFORMAT_INCLUDE_DIR) - include_directories("${AVFORMAT_INCLUDE_DIR}") - set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}") - endif(AVFORMAT_INCLUDE_DIR) - mark_as_advanced(FORCE AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIR) - check_include_file("libavformat/avformat.h" HAVE_LIBAVFORMAT_AVFORMAT_H) - set(optlibsfound "${optlibsfound} AVFormat") - else(AVFORMAT_LIBRARIES) - set(optlibsnotfound "${optlibsnotfound} AVFormat") - endif(AVFORMAT_LIBRARIES) +# avformat (using find_library and find_path) +find_library(AVFORMAT_LIBRARIES avformat) +if(AVFORMAT_LIBRARIES) + set(HAVE_LIBAVFORMAT 1) + list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}") + find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h" /usr/include/ffmpeg) + if(AVFORMAT_INCLUDE_DIR) + include_directories("${AVFORMAT_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}") + endif(AVFORMAT_INCLUDE_DIR) + mark_as_advanced(FORCE AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIR) + check_include_file("libavformat/avformat.h" HAVE_LIBAVFORMAT_AVFORMAT_H) + set(optlibsfound "${optlibsfound} AVFormat") +else(AVFORMAT_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} AVFormat") +endif(AVFORMAT_LIBRARIES) - # avcodec (using find_library and find_path) - find_library(AVCODEC_LIBRARIES avcodec) - if(AVCODEC_LIBRARIES) - set(HAVE_LIBAVCODEC 1) - list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}") - find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h" /usr/include/ffmpeg) - if(AVCODEC_INCLUDE_DIR) - include_directories("${AVCODEC_INCLUDE_DIR}") - set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}") - endif(AVCODEC_INCLUDE_DIR) - mark_as_advanced(FORCE AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIR) - check_include_file("libavcodec/avcodec.h" HAVE_LIBAVCODEC_AVCODEC_H) - set(optlibsfound "${optlibsfound} AVCodec") - else(AVCODEC_LIBRARIES) - set(optlibsnotfound "${optlibsnotfound} AVCodec") - endif(AVCODEC_LIBRARIES) +# avcodec (using find_library and find_path) +find_library(AVCODEC_LIBRARIES avcodec) +if(AVCODEC_LIBRARIES) + set(HAVE_LIBAVCODEC 1) + list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}") + find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h" /usr/include/ffmpeg) + if(AVCODEC_INCLUDE_DIR) + include_directories("${AVCODEC_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}") + endif(AVCODEC_INCLUDE_DIR) + mark_as_advanced(FORCE AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIR) + check_include_file("libavcodec/avcodec.h" HAVE_LIBAVCODEC_AVCODEC_H) + set(optlibsfound "${optlibsfound} AVCodec") +else(AVCODEC_LIBRARIES) + message(WARNING "\nWhile it should be possible to build ZM without AVCODEC the result will pretty useless.") + set(optlibsnotfound "${optlibsnotfound} AVCodec") +endif(AVCODEC_LIBRARIES) - # avdevice (using find_library and find_path) - find_library(AVDEVICE_LIBRARIES avdevice) - if(AVDEVICE_LIBRARIES) - set(HAVE_LIBAVDEVICE 1) - list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}") - find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h" /usr/include/ffmpeg) - if(AVDEVICE_INCLUDE_DIR) - include_directories("${AVDEVICE_INCLUDE_DIR}") - set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}") - endif(AVDEVICE_INCLUDE_DIR) - mark_as_advanced(FORCE AVDEVICE_LIBRARIES AVDEVICE_INCLUDE_DIR) - check_include_file("libavdevice/avdevice.h" HAVE_LIBAVDEVICE_AVDEVICE_H) - set(optlibsfound "${optlibsfound} AVDevice") - else(AVDEVICE_LIBRARIES) - set(optlibsnotfound "${optlibsnotfound} AVDevice") - endif(AVDEVICE_LIBRARIES) +# avdevice (using find_library and find_path) +find_library(AVDEVICE_LIBRARIES avdevice) +if(AVDEVICE_LIBRARIES) + set(HAVE_LIBAVDEVICE 1) + list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}") + find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h" /usr/include/ffmpeg) + if(AVDEVICE_INCLUDE_DIR) + include_directories("${AVDEVICE_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}") + endif(AVDEVICE_INCLUDE_DIR) + mark_as_advanced(FORCE AVDEVICE_LIBRARIES AVDEVICE_INCLUDE_DIR) + check_include_file("libavdevice/avdevice.h" HAVE_LIBAVDEVICE_AVDEVICE_H) + set(optlibsfound "${optlibsfound} AVDevice") +else(AVDEVICE_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} AVDevice") +endif(AVDEVICE_LIBRARIES) - # avutil (using find_library and find_path) - find_library(AVUTIL_LIBRARIES avutil) - if(AVUTIL_LIBRARIES) - set(HAVE_LIBAVUTIL 1) - list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}") - find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h" /usr/include/ffmpeg) - if(AVUTIL_INCLUDE_DIR) - include_directories("${AVUTIL_INCLUDE_DIR}") - set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}") - endif(AVUTIL_INCLUDE_DIR) - mark_as_advanced(FORCE AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIR) - check_include_file("libavutil/avutil.h" HAVE_LIBAVUTIL_AVUTIL_H) - check_include_file("libavutil/mathematics.h" HAVE_LIBAVUTIL_MATHEMATICS_H) - set(optlibsfound "${optlibsfound} AVUtil") - else(AVUTIL_LIBRARIES) - set(optlibsnotfound "${optlibsnotfound} AVUtil") - endif(AVUTIL_LIBRARIES) +# avutil (using find_library and find_path) +find_library(AVUTIL_LIBRARIES avutil) +if(AVUTIL_LIBRARIES) + set(HAVE_LIBAVUTIL 1) + list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}") + find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h" /usr/include/ffmpeg) + if(AVUTIL_INCLUDE_DIR) + include_directories("${AVUTIL_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}") + endif(AVUTIL_INCLUDE_DIR) + mark_as_advanced(FORCE AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIR) + check_include_file("libavutil/avutil.h" HAVE_LIBAVUTIL_AVUTIL_H) + check_include_file("libavutil/mathematics.h" HAVE_LIBAVUTIL_MATHEMATICS_H) + check_include_file("libavutil/hwcontext.h" HAVE_LIBAVUTIL_HWCONTEXT_H) + set(optlibsfound "${optlibsfound} AVUtil") +else(AVUTIL_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} AVUtil") +endif(AVUTIL_LIBRARIES) - # swscale (using find_library and find_path) - find_library(SWSCALE_LIBRARIES swscale) - if(SWSCALE_LIBRARIES) - set(HAVE_LIBSWSCALE 1) - list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}") - find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h" /usr/include/ffmpeg) - if(SWSCALE_INCLUDE_DIR) - include_directories("${SWSCALE_INCLUDE_DIR}") - set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}") - endif(SWSCALE_INCLUDE_DIR) - mark_as_advanced(FORCE SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIR) - check_include_file("libswscale/swscale.h" HAVE_LIBSWSCALE_SWSCALE_H) - set(optlibsfound "${optlibsfound} SWScale") - else(SWSCALE_LIBRARIES) - set(optlibsnotfound "${optlibsnotfound} SWScale") - endif(SWSCALE_LIBRARIES) +# swscale (using find_library and find_path) +find_library(SWSCALE_LIBRARIES swscale) +if(SWSCALE_LIBRARIES) + set(HAVE_LIBSWSCALE 1) + list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}") + find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h" /usr/include/ffmpeg) + if(SWSCALE_INCLUDE_DIR) + include_directories("${SWSCALE_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}") + endif(SWSCALE_INCLUDE_DIR) + mark_as_advanced(FORCE SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIR) + check_include_file("libswscale/swscale.h" HAVE_LIBSWSCALE_SWSCALE_H) + set(optlibsfound "${optlibsfound} SWScale") +else(SWSCALE_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} SWScale") +endif(SWSCALE_LIBRARIES) - # Find the path to the ffmpeg executable - find_program(FFMPEG_EXECUTABLE - NAMES ffmpeg avconv - PATH_SUFFIXES ffmpeg) - if(FFMPEG_EXECUTABLE) - set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}") - set(OPT_FFMPEG "yes") - mark_as_advanced(FFMPEG_EXECUTABLE) - endif(FFMPEG_EXECUTABLE) +# SWresample (using find_library and find_path) +find_library(SWRESAMPLE_LIBRARIES swresample) +if(SWRESAMPLE_LIBRARIES) + set(HAVE_LIBSWRESAMPLE 1) + list(APPEND ZM_BIN_LIBS "${SWRESAMPLE_LIBRARIES}") + find_path(SWRESAMPLE_INCLUDE_DIR "libswresample/swresample.h" /usr/include/ffmpeg) + if(SWRESAMPLE_INCLUDE_DIR) + include_directories("${SWRESAMPLE_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${SWRESAMPLE_INCLUDE_DIR}") + endif(SWRESAMPLE_INCLUDE_DIR) + mark_as_advanced(FORCE SWRESAMPLE_LIBRARIES SWRESAMPLE_INCLUDE_DIR) + check_include_file("libswresample/swresample.h" HAVE_LIBSWRESAMPLE_SWRESAMPLE_H) + set(optlibsfound "${optlibsfound} SWResample") +else(SWRESAMPLE_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} SWResample") -endif(NOT ZM_NO_FFMPEG) + # AVresample (using find_library and find_path) + find_library(AVRESAMPLE_LIBRARIES avresample) + if(AVRESAMPLE_LIBRARIES) + set(HAVE_LIBAVRESAMPLE 1) + list(APPEND ZM_BIN_LIBS "${AVRESAMPLE_LIBRARIES}") + find_path(AVRESAMPLE_INCLUDE_DIR "libavresample/avresample.h" /usr/include/ffmpeg) + if(AVRESAMPLE_INCLUDE_DIR) + include_directories("${AVRESAMPLE_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${AVRESAMPLE_INCLUDE_DIR}") + endif(AVRESAMPLE_INCLUDE_DIR) + mark_as_advanced(FORCE AVRESAMPLE_LIBRARIES AVRESAMPLE_INCLUDE_DIR) + check_include_file("libavresample/avresample.h" HAVE_LIBAVRESAMPLE_AVRESAMPLE_H) + set(optlibsfound "${optlibsfound} AVResample") + else(AVRESAMPLE_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} AVResample") + endif(AVRESAMPLE_LIBRARIES) + +endif(SWRESAMPLE_LIBRARIES) + +# Find the path to the ffmpeg executable +find_program(FFMPEG_EXECUTABLE + NAMES ffmpeg avconv + PATH_SUFFIXES ffmpeg) +if(FFMPEG_EXECUTABLE) + set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}") + set(OPT_FFMPEG "yes") + mark_as_advanced(FFMPEG_EXECUTABLE) +endif(FFMPEG_EXECUTABLE) # Do not check for libvlc if ZM_NO_LIBVLC is on if(NOT ZM_NO_LIBVLC) @@ -509,7 +666,7 @@ if(NOT ZM_NO_LIBVLC) find_library(LIBVLC_LIBRARIES vlc) if(LIBVLC_LIBRARIES) set(HAVE_LIBVLC 1) - list(APPEND ZM_BIN_LIBS "${LIBVLC_LIBRARIES}") + #list(APPEND ZM_BIN_LIBS "${LIBVLC_LIBRARIES}") find_path(LIBVLC_INCLUDE_DIR "vlc/vlc.h") if(LIBVLC_INCLUDE_DIR) include_directories("${LIBVLC_INCLUDE_DIR}") @@ -523,6 +680,32 @@ if(NOT ZM_NO_LIBVLC) endif(LIBVLC_LIBRARIES) endif(NOT ZM_NO_LIBVLC) +if(NOT ZM_NO_LIBVNC) + # libvncclient (using find_library and find_path) + find_library(LIBVNC_LIBRARIES vncclient) + if(LIBVNC_LIBRARIES) + set(HAVE_LIBVNC 1) + #list(APPEND ZM_BIN_LIBS "${LIBVNC_LIBRARIES}") + find_path(LIBVNC_INCLUDE_DIR "rfb/rfb.h") + if(LIBVNC_INCLUDE_DIR) + include_directories("${LIBVNC_INCLUDE_DIR}") + set(CMAKE_REQUIRED_INCLUDES "${LIBVNC_INCLUDE_DIR}") + endif(LIBVNC_INCLUDE_DIR) + mark_as_advanced(FORCE LIBVNC_LIBRARIES LIBVNC_INCLUDE_DIR) + check_include_file("rfb/rfb.h" HAVE_RFB_RFB_H) + set(optlibsfound "${optlibsfound} libVNC") + else(LIBVNC_LIBRARIES) + set(optlibsnotfound "${optlibsnotfound} libVNC") + endif(LIBVNC_LIBRARIES) +endif(NOT ZM_NO_LIBVNC) + +#find_package(Boost 1.36.0) +#if(Boost_FOUND) + #include_directories(${Boost_INCLUDE_DIRS}) + ##set(CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIRS}") + #list(APPEND ZM_BIN_LIBS "${Boost_LIBRARIES}") +#endif() +# # *** END OF LIBRARY CHECKS *** # Check for gnutls or crypto @@ -581,14 +764,7 @@ if(HAVE_OPENSSL_MD5_H) "unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md)" "NULL" "openssl/md5.h" HAVE_MD5_OPENSSL) endif(HAVE_OPENSSL_MD5_H) -if(HAVE_GNUTLS_OPENSSL_H) - set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}") - set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}") - check_prototype_definition( - MD5 - "unsigned char *MD5 (const unsigned char *buf, unsigned long len, unsigned char *md)" "NULL" "gnutls/openssl.h" - HAVE_MD5_GNUTLS) -endif(HAVE_GNUTLS_OPENSSL_H) + if(HAVE_GNUTLS_GNUTLS_H) set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}") set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}") @@ -597,13 +773,17 @@ if(HAVE_GNUTLS_GNUTLS_H) "int gnutls_fingerprint (gnutls_digest_algorithm_t algo, const gnutls_datum_t * data, void *result, size_t * result_size)" "0" "stdlib.h;gnutls/gnutls.h" HAVE_DECL_GNUTLS_FINGERPRINT) endif(HAVE_GNUTLS_GNUTLS_H) -if(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS) + +if(NOT HAVE_DECL_GNUTLS_FINGERPRINT AND HAVE_MD5_OPENSSL) set(HAVE_DECL_MD5 1) -else(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS) +endif(NOT HAVE_DECL_GNUTLS_FINGERPRINT AND HAVE_MD5_OPENSSL) + +if((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT)) message(AUTHOR_WARNING - "ZoneMinder requires a working MD5 function for hashed authenication but - none were found - hashed authenication will not be available") -endif(HAVE_MD5_OPENSSL OR HAVE_MD5_GNUTLS) + "ZoneMinder requires a working MD5 function for hashed authentication but + none were found - hashed authentication will not be available") +endif((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT)) + # Dirty fix for zm_user only using openssl's md5 if gnutls and gcrypt are not available. # This needs to be fixed in zm_user.[h,cpp] but such fix will also require changes to configure.ac if(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL) @@ -658,12 +838,32 @@ endif(NOT ZM_WEB_GROUP) message(STATUS "Using web user: ${ZM_WEB_USER}") message(STATUS "Using web group: ${ZM_WEB_GROUP}") -# Check for polkit -find_package(Polkit) -if(NOT POLKIT_FOUND) - message(FATAL_ERROR - "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.") -endif(NOT POLKIT_FOUND) +if(WITH_SYSTEMD) + # Check for polkit + find_package(Polkit) + if(NOT POLKIT_FOUND) + message(FATAL_ERROR + "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.") + endif(NOT POLKIT_FOUND) +endif(WITH_SYSTEMD) + +# Find the path to an arp compatible executable +if(ZM_PATH_ARP STREQUAL "") + find_program(ARP_EXECUTABLE arp) + if(ARP_EXECUTABLE) + set(ZM_PATH_ARP "${ARP_EXECUTABLE}") + mark_as_advanced(ARP_EXECUTABLE) + else(ARP_EXECUTABLE) + find_program(ARP_EXECUTABLE ip) + if(ARP_EXECUTABLE) + set(ZM_PATH_ARP "${ARP_EXECUTABLE} neigh") + mark_as_advanced(ARP_EXECUTABLE) + endif(ARP_EXECUTABLE) + endif(ARP_EXECUTABLE) + if(ARP_EXECUTABLE-NOTFOUND) + message(WARNING "Unable to find a compatible arp binary. Monitor probe will not function." ) + endif(ARP_EXECUTABLE-NOTFOUND) +endif(ZM_PATH_ARP STREQUAL "") # Some variables that zm expects set(ZM_PID "${ZM_RUNDIR}/zm.pid") @@ -685,8 +885,14 @@ else(ZM_PERL_SEARCH_PATH) set(EXTRA_PERL_LIB "# Include from system perl paths only") endif(ZM_PERL_SEARCH_PATH) +# If this is an out-of-source build, copy the files we need to the binary directory +if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) + file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf.d" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN "*.in" EXCLUDE) +endif(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) + # Generate files from the .in files configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY) +configure_file(conf.d/01-system-paths.conf.in "${CMAKE_CURRENT_BINARY_DIR}/conf.d/01-system-paths.conf" @ONLY) configure_file(zoneminder-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY) configure_file(zmconfgen.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl" @ONLY) configure_file(zmlinkcontent.sh.in "${CMAKE_CURRENT_BINARY_DIR}/zmlinkcontent.sh" @ONLY) @@ -696,6 +902,13 @@ include(Pod2Man) ADD_MANPAGE_TARGET() # Process subdirectories + +# build a bcrypt static library +set(BUILD_SHARED_LIBS_SAVED "${BUILD_SHARED_LIBS}") +set(BUILD_SHARED_LIBS OFF) +add_subdirectory(src/libbcrypt EXCLUDE_FROM_ALL) +set(BUILD_SHARED_LIBS "${BUILD_SHARED_LIBS_SAVED}") + add_subdirectory(src) add_subdirectory(scripts) add_subdirectory(db) @@ -709,13 +922,11 @@ if(ZM_ONVIF) endif(ZM_ONVIF) # Process distro subdirectories -if((ZM_TARGET_DISTRO STREQUAL "f22") OR (ZM_TARGET_DISTRO STREQUAL "f23")) - add_subdirectory(distros/fedora) -elseif((ZM_TARGET_DISTRO STREQUAL "el6") OR (ZM_TARGET_DISTRO STREQUAL "el7")) +if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc")) add_subdirectory(distros/redhat) elseif(ZM_TARGET_DISTRO STREQUAL "OS13") add_subdirectory(distros/opensuse) -endif((ZM_TARGET_DISTRO STREQUAL "f22") OR (ZM_TARGET_DISTRO STREQUAL "f23")) +endif((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc")) # Print optional libraries detection status message(STATUS "Optional libraries found:${optlibsfound}") @@ -723,7 +934,7 @@ message(STATUS "Optional libraries not found:${optlibsnotfound}") # Run ZM configuration generator message(STATUS "Running ZoneMinder configuration generator") -execute_process(COMMAND perl ./zmconfgen.pl RESULT_VARIABLE zmconfgen_result) +execute_process(COMMAND perl ${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl RESULT_VARIABLE zmconfgen_result) if(zmconfgen_result EQUAL 0) message(STATUS "ZoneMinder configuration generator completed successfully") @@ -734,6 +945,7 @@ endif(zmconfgen_result EQUAL 0) # Install zm.conf install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "${ZM_CONFIG_DIR}") +install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/conf.d/" DESTINATION "${ZM_CONFIG_SUBDIR}" PATTERN "*.in" EXCLUDE) # Uninstall target configure_file( @@ -743,3 +955,11 @@ configure_file( add_custom_target(uninstall COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake) +# Configure CCache if available +find_program(CCACHE_FOUND ccache) +if(CCACHE_FOUND) + set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) + set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) +endif(CCACHE_FOUND) + +install(DIRECTORY icons DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/") diff --git a/COPYING b/COPYING index d60c31a97..d159169d1 100644 --- a/COPYING +++ b/COPYING @@ -1,12 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -15,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -55,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -110,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -168,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -225,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -255,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -277,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -303,17 +303,16 @@ the "copyright" line and a pointer to where the full notice is found. 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 - + 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., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) year name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. diff --git a/ChangeLog b/ChangeLog deleted file mode 100644 index afab3413a..000000000 --- a/ChangeLog +++ /dev/null @@ -1 +0,0 @@ -This is too hard to maintain. See https://github.com/ZoneMinder/ZoneMinder/commits/master diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 26df17d2b..000000000 --- a/Dockerfile +++ /dev/null @@ -1,71 +0,0 @@ -# ZoneMinder - -FROM ubuntu:trusty -MAINTAINER Kyle Johnson - -# Let the container know that there is no tty -ENV DEBIAN_FRONTEND noninteractive - -# Resynchronize the package index files -RUN apt-get update && apt-get install -y \ - libpolkit-gobject-1-dev build-essential libmysqlclient-dev libssl-dev libbz2-dev libpcre3-dev \ - libdbi-perl libarchive-zip-perl libdate-manip-perl libdevice-serialport-perl libmime-perl libpcre3 \ - libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm cmake libjpeg-turbo8-dev \ - libjpeg-turbo8 libtheora-dev libvorbis-dev libvpx-dev libx264-dev libmp4v2-dev libav-tools mysql-client \ - apache2 php5 php5-mysql apache2-mpm-prefork libapache2-mod-php5 php5-cli openssh-server \ - mysql-server libvlc-dev libvlc5 libvlccore-dev libvlccore7 vlc-data libcurl4-openssl-dev \ - libavformat-dev libswscale-dev libavutil-dev libavcodec-dev libavfilter-dev \ - libavresample-dev libavdevice-dev libpostproc-dev libv4l-dev libtool libnetpbm10-dev \ - libmime-lite-perl dh-autoreconf dpatch - -# Copy local code into our container -ADD . /ZoneMinder - -# Change into the ZoneMinder directory -WORKDIR /ZoneMinder - -# Setup the ZoneMinder build environment -#RUN aclocal && autoheader && automake --force-missing --add-missing && autoconf - -# Configure ZoneMinder -#RUN ./configure --with-libarch=lib/$DEB_HOST_GNU_TYPE --disable-debug --host=$DEB_HOST_GNU_TYPE --build=$DEB_BUILD_GNU_TYPE --with-mysql=/usr --with-webdir=/var/www/zm --with-ffmpeg=/usr --with-cgidir=/usr/lib/cgi-bin --with-webuser=www-data --with-webgroup=www-data --enable-mmap=yes --enable-onvif ZM_SSL_LIB=openssl ZM_DB_USER=zm ZM_DB_PASS=zm -RUN cmake . - -# Build ZoneMinder -RUN make - -# Install ZoneMinder -RUN make install - -# ensure writable folders -RUN ./zmlinkcontent.sh - -# Adding the start script -ADD utils/docker/start.sh /tmp/start.sh - -# Ensure we can run this -# TODO - Files ADD'ed have 755 already...why do we need this? -RUN chmod 755 /tmp/start.sh - -# give files in /usr/local/share/zoneminder/ -RUN chown -R www-data:www-data /usr/local/share/zoneminder/ - -# Creating SSH privilege escalation dir -RUN mkdir /var/run/sshd - -# Adding apache virtual hosts file -ADD utils/docker/apache-vhost /etc/apache2/sites-available/000-default.conf -ADD utils/docker/phpdate.ini /etc/php5/apache2/conf.d/25-phpdate.ini - -# Set the root passwd -RUN echo 'root:root' | chpasswd - -# Add a user we can actually login with -RUN useradd -m -s /bin/bash -G sudo zoneminder -RUN echo 'zoneminder:zoneminder' | chpasswd - -# Expose ssh and http ports -EXPOSE 80 -EXPOSE 22 - -CMD "/tmp/start.sh" diff --git a/INSTALL b/INSTALL deleted file mode 100644 index bcb7f78df..000000000 --- a/INSTALL +++ /dev/null @@ -1,138 +0,0 @@ -Installing ZoneMinder with cmake --------------------------------- -Starting with ZoneMinder 1.26.4, ZoneMinder can now be installed using cmake. This requires cmake version 2.6 or newer. -cmake is an alternative to the autotools collection (libtool, autoconf, automake, autoheader and such). Its more recent and has many advantages, including, but not limited to: -* One program (cmake) instead of multiple. (libtool, autoconf, automake, etc) -* One file per directory (CMakeLists.txt) instead of multiple. (configure.ac, Makefile.am and sometimes more) -* One syntax (cmake's syntax) instead of multiple. (bash and m4) -* Generation of makefiles for many platforms, including Windows. -* Newer than autotools and is being actively developed. -* Generates colored makefiles with progress indicator. -* Slightly faster because its based on C and not bash. -* Lots of documentation, unlike autotools: http://www.cmake.org/cmake/help/cmake2.6docs.html - -At this point, its still possible to use autotools for the ZoneMinder project. Choosing cmake or autotools is now a matter of preference. -Hopefully in the future, cmake will become the default way to install ZoneMinder. - -Important differences ---------------------- -* Unlike the autotools way, the cmake way does not require any options. It attempts to detect some things by its own (system directories, libarch, web user and group) and uses defaults for others (installation paths and such). -* Unlike the autotools way, which links the binaries to a fixed list of libraries, the cmake way only links to libraries that it found on the system. If a library is not found, but required, a fatal error will be shown during the configuration step. -* Unlike the autotools way, the cmake way does not modify the system in any way it shouldn't. It only does what its supposed to do: Install files to your system. Nothing else and nothing leaks out of the DESTDIR environment variable (if used). This means that depending on your configuration, there might be an extra required step after installation: to link WEB_PATH/events and WEB_PATH/images folders to the correct places. - -Configuration -------------- -cmake by default does not require any parameters, but its possible to override the defaults with the options below. - -Configuration can be done in 4 ways: -1) As a command line parameter, e.g. cmake -DCMAKE_VERBOSE_MAKEFILE=ON . -2) Using cmake-gui -3) Providing cmake with an initial cache file with the -C option - IMPORTANT: Do not use the -C option if any major part of your system, excluding the version of zoneminder, has changed. - For example, do not use this option if: you have upgraded your distro to a new version, have gone from 32 to 64 bits, - or have migrated from one machine to another. -4) By editing the cache file CMakeCache.txt (after it has been generated) - Not recommended - -Possible configuration options: - ZM_RUNDIR Location of transient process files, default: /var/run/zm - ZM_SOCKDIR Location of Unix domain socket files, default /var/run/zm - ZM_TMPDIR Location of temporary files, default: /tmp/zm - ZM_LOGDIR Location of generated log files, default: /var/log/zm - ZM_WEBDIR Location of the web files, default: /share/zoneminder/www - ZM_CGIDIR Location of the cgi-bin files, default: /libexec/zoneminder/cgi-bin - ZM_CONTENTDIR Location of dynamic content (events and images), default: /var/lib/zoneminder - ZM_DB_HOST Hostname where ZoneMinder database located, default: localhost - ZM_DB_NAME Name of ZoneMinder database, default: zm - ZM_DB_USER Name of ZoneMinder database user, default: zmuser - ZM_DB_PASS Password of ZoneMinder database user, default: zmpass - ZM_WEB_USER The user apache or the local web server runs on. Leave empty for automatic detection. If that fails, you can use this variable to force - ZM_WEB_GROUP The group apache or the local web server runs on, Leave empty to be the same as the web user -Advanced: - ZM_EXTRA_LIBS A list of optional libraries, separated by semicolons, e.g. ssl;theora - ZM_MYSQL_ENGINE MySQL engine to use with database, default: InnoDB - ZM_NO_MMAP Set to ON to not use mmap shared memory. Shouldn't be enabled unless you experience problems with the shared memory. default: OFF - ZM_NO_FFMPEG Set to ON to skip ffmpeg checks and force building ZM without ffmpeg. default: OFF - ZM_NO_X10 Set to ON to build ZoneMinder without X10 support. default: OFF - ZM_PERL_MM_PARMS By default, ZoneMinder's Perl modules are installed into the Vendor folders, as defined by your installation of Perl. You can change that here. Consult Perl's MakeMaker documentation for a definition of acceptable parameters. If you set this to something that causes the modules to be installed outside Perl's normal serach path, then you will also need to set ZM_PERL_SEARCH_PATH accordingly. default: "INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1" - ZM_PERL_SEARCH_PATH Use to add a folder to your Perl's search path. This will need to be set in cases where ZM_PERL_MM_PARMS has been modified such that ZoneMinder's Perl modules are installed outside Perl's default search path. default: "" - -Useful configuration options provided by cmake: -CMAKE_VERBOSE_MAKEFILE - Set this to ON (default OFF) to see what cmake is doing. Very useful for troubleshooting. -CMAKE_BUILD_TYPE - Set this to Debug (default Release) to build ZoneMinder with debugging enabled. -CMAKE_INSTALL_PREFIX - Use this to change the prefix (default /usr/local). This option behaves like --prefix from autoconf. Package maintainers will probably want to set this to "/usr". - -Useful environment variables provided by cmake: -CMAKE_INCLUDE_PATH - Use this to add to the include search path. -CMAKE_LIBRARY_PATH - Use this to add to the library search path. -CMAKE_PREFIX_PATH - Use this to add to both include and library search paths. /include will be added to the include search path and /lib to the library search path. Multiple paths can be specified, separated by a : character. For example: export CMAKE_PREFIX_PATH="/opt/libjpeg-turbo:/opt/ffmpeg-from-git" - -CFLAGS, CPPFLAGS and other environment variables: -To append to the CFLAGS and CXXFLAGS, please use the CFLAGS and CXXFLAGS environment variables. -Or use the CMAKE_C_FLAGS and CMAKE_CXX_FLAGS configuration options. -To replace the CFLAGS and CXXFLAGS entirely: -* For the Release build type: use CMAKE_C_FLAGS_RELEASE for the CFLAGS and CMAKE_CXX_FLAGS_RELEASE for the CXXFLAGS -* For the Debug build type: use CMAKE_C_FLAGS_DEBUG for the CFLAGS and CMAKE_CXX_FLAGS_DEBUG for the CXXFLAGS -Other important environment variables (such as LDFLAGS) are also supported. - -The DESTDIR environment variable is also supported, however it needs to be set before invoking make install. For example: DESTDIR=mydestdir make install -For more information about DESTDIR, see: -* http://www.gnu.org/prep/standards/html_node/DESTDIR.html - -Basic steps for installing ZoneMinder on a fresh system -------------------------------------------------------- -1) After installing all the required dependencies, in the project directory, run "cmake [extra options] ." -This behaves like ./configure. It is also possible to supply configuration options, e.g. cmake -DZM_DB_PASS="mypass" . -IMPORTANT: Don't forget the dot "." at the end. -2) Run "make" to compile ZoneMinder -3) Run "make install" (as root, or use sudo) to install ZoneMinder to your system. -4) Create a directory for the content and the necessary symlinks by running zmlinkcontent.sh with the directory you want to use. e.g. ./zmlinkcontent.sh /nfs/zm -5) Create a database for zoneminder, called "zm". -6) Create a user for the zoneminder database, called zmuser with password and full privileges to the "zm" database. -NOTE: The database server, database name, user and password can be different and adjusted during configuration step with the options in this file, or by editing /etc/zm.conf -7) Populate the zoneminder database using the script zm_create.sql. This should be found in /share/zoneminder/db or in the project/db directory. - -8) Create an apache virtual host for ZoneMinder. Make sure to use the same paths as ZM_WEBDIR and ZM_CGIDIR in /etc/zm.conf -9) Verify date.timezone is set to your timezone. This parameter is often found inside the system php.ini file. Consult your distribution's documentation for the proper way to set this value. -10) Create other config if desired (e.g. rsyslog, logrotate and such). Some of this can be found in /share/zoneminder/misc or project/misc directory -11) Setup an appropriate startup script for your system. Two generic startup scripts have been provided, a legacy Sys V Init script and a Systemd service file. - -*Sys V Init Setup* -- Copy the sys v init script /scripts/zm from the build folder to /etc/init. -- Inspect the contents to make sure they apply to your distro. - -*SystemD Setup* -- Copy the zoneminder systemd service file /misc/zoneminder.service from the build folder to the systemd service file location. - For Redhat based distros, that folder is /usr/lib/systemd/system. -- Inspect the contents to make sure they apply to your distro. -- Tell systemd to load the new service file: "sudo systemctl daemon-reload". -- Copy /misc/zoneminder-tmpfiles.conf to /etc/tmpfiles.d -- Tell systemd to process this file: "sudo /usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/zoneminder.conf". - -Basic steps for upgrading ZoneMinder ------------------------------------- -1) If you wish to use the same paths and configuration as the currently installed ZoneMinder, you need to provide cmake with options that match your current installation. -You can provide those options in the command line to cmake, e.g. cmake -DZM_DB_PASS="blah" -DZM_WEBDIR="/usr/local/share/zoneminder/www" -DCMAKE_INSTALL_FULL_BINDIR="/usr/bin" . -Or alternatively, for convenience, use the cmakecacheimport.sh script. This reads a zoneminder configuration file (zm.conf) and creates a cmake initial cache file called zm_conf.cmake, which you can then provide to cmake. -For example: -./cmakecacheimport.sh /etc/zm.conf -cmake -C zm_conf.cmake [extra options] . - -2) Run "make" to compile ZoneMinder -3) Run "make install" (as root, or use sudo) to install ZoneMinder to your system. -4) Depending on your configuration: If the DIR_EVENTS and DIR_IMAGES options are set to default (pointing to web directory/events and web directory/images), You will need to update the symlinks in the web directory to the correct folders. e.g. web directory/events should point to the real events directory, and likewise for the images directory. -You can use the zmlinkcontent.sh script for this. For example, if /var/lib/zoneminder is the folder that contains the "images" and "events" directories, you can use: -./zmlinkcontent.sh /var/lib/zoneminder -By default, the content directory for new installations is /var/lib/zoneminder. This can be overridden in cmake with the ZM_CONTENTDIR option. e.g. cmake -DZM_CONTENTDIR="/some/big/storage/zm" . - -5) Run zmupdate.pl to update the database layout to the new version. - -Uninstallation: ---------------- -By default, cmake does not have an uninstall target, however we have added a one. Simply run make uninstall (or DESTDIR=mydestdir make uninstall if a DESTDIR was used) and it will remove all the files that cmake installed. -It's also possible to do this manually. The file install_manifest.txt contains the list of files installed to the system. This can be used in many ways to delete all files installed by cmake, such as: xargs rm < install_manifest.txt - -Contributions: --------------- -Please visit our GitHub at http://github.com/ZoneMinder/ZoneMinder - - diff --git a/NEWS b/NEWS deleted file mode 100644 index 3160e2dce..000000000 --- a/NEWS +++ /dev/null @@ -1 +0,0 @@ -Please see README file. diff --git a/README.md b/README.md index 78ae7a922..ab946c04c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,10 @@ ZoneMinder ========== -[![Build Status](https://travis-ci.org/ZoneMinder/ZoneMinder.png)](https://travis-ci.org/ZoneMinder/ZoneMinder) [![Bountysource](https://api.bountysource.com/badge/team?team_id=204&style=bounties_received)](https://www.bountysource.com/teams/zoneminder/issues?utm_source=ZoneMinder&utm_medium=shield&utm_campaign=bounties_received) +[![Build Status](https://travis-ci.org/ZoneMinder/zoneminder.png)](https://travis-ci.org/ZoneMinder/zoneminder) +[![Bounty Source](https://api.bountysource.com/badge/team?team_id=204&style=bounties_received)](https://www.bountysource.com/teams/zoneminder/issues?utm_source=ZoneMinder&utm_medium=shield&utm_campaign=bounties_received) +[![Join Slack](https://github.com/ozonesecurity/ozonebase/blob/master/img/slacksm.png?raw=true)](https://join.slack.com/t/zoneminder-chat/shared_invite/enQtNTU0NDkxMDM5NDQwLTdhZmQ5Y2M2NWQyN2JkYTBiN2ZkMzIzZGQ0MDliMTRmM2FjZWRlYzUwYTQ2MjMwMTVjMzQ1NjYxOTdmMjE2MTE) +[![IRC Network](https://img.shields.io/badge/irc-%23zoneminder-blue.svg "IRC Freenode")](https://webchat.freenode.net/?channels=zoneminder) All documentation for ZoneMinder is now online at https://zoneminder.readthedocs.org @@ -13,28 +16,35 @@ ZoneMinder is an integrated set of applications which provide a complete surveil Before creating an issue in our github forum, please read our posting rules: https://github.com/ZoneMinder/ZoneMinder/wiki/Github-Posting-Rules +## Our Dockerfile has moved +Please file issues against the ZoneMinder Dockerfile here: +https://github.com/ZoneMinder/zmdockerfiles + ## Installation Methods +### Install from a Package Repository + +This is the recommended method to install ZoneMinder onto your system. ZoneMinder packages are maintained for the following distros: + +- Ubuntu via [Iconnor's PPA](https://launchpad.net/~iconnor) +- Debian from their [default repository](https://packages.debian.org/search?searchon=names&keywords=zoneminder) +- RHEL/CentOS and clones via [RPM Fusion](http://rpmfusion.org) +- Fedora via [RPM Fusion](http://rpmfusion.org) +- OpenSuse via [third party repository](http://www.zoneminder.com/wiki/index.php/Installing_using_ZoneMinder_RPMs_for_SuSE) +- Mageia from their default repository +- Arch via the [AUR](https://aur.archlinux.org/packages/zoneminder/) +- Gentoo from their [default repository](https://packages.gentoo.org/packages/www-misc/zoneminder) + +If a repository that hosts ZoneMinder packages is not available for your distro, then you are encouraged to build your own package, rather than build from source. While each distro is different in ways that set it apart from all the others, they are often similar enough to allow you to adapt another distro's package building instructions to your own. + ### Building from Source is Discouraged Historically, installing ZoneMinder onto your system required building from source code by issuing the traditional configure, make, make install commands. To get ZoneMinder to build, all of its dependencies had to be determined and installed beforehand. Init and logrotate scripts had to be manually copied into place following the build. Optional packages such as jscalendar and Cambozola had to be manually installed. Uninstalls could leave stale files around, which could cause problems during an upgrade. Speaking of upgrades, when it comes time to upgrade all these manual steps must be repeated again. Better methods exist today that do much of this for you. The current development team, along with other volunteers, have taken great strides in providing the resources necessary to avoid building from source. -### Install from a Package Repository -This is the recommended method to install ZoneMinder onto your system. ZoneMinder packages are maintained for the following distros: - -- Ubuntu via [Iconnor's PPA](https://launchpad.net/~iconnor/+archive/ubuntu/zoneminder) -- Debian from their [default repository](https://packages.debian.org/search?searchon=names&keywords=zoneminder) -- RHEL/CentOS and clones via [zmrepo](http://zmrepo.zoneminder.com/) -- Fedora via [zmrepo](http://zmrepo.zoneminder.com/) -- OpenSuse via [third party repository](http://www.zoneminder.com/wiki/index.php/Installing_using_ZoneMinder_RPMs_for_SuSE) -- Maegia from their default repository - -If a repository that hosts ZoneMinder packages is not available for your distro, then you are encouraged to build your own package, rather than build from source. While each distro is different in ways that set it apart from all the others, they are often similar enough to allow you to adapt another distro's package building instructions to your own. - -### Building a ZoneMinder Package +### Building a ZoneMinder Package ### Building ZoneMinder into a package is not any harder than building from source. As a matter of fact, if you have successfully built ZoneMinder from source in the past, then you may find these steps to be easier. @@ -45,9 +55,9 @@ Lastly, if you desire to build a development snapshot from the master branch, it Please visit our [ReadtheDocs site](https://zoneminder.readthedocs.org/en/stable/installationguide/index.html) for distro specific instructions. ### Package Maintainers -Many of the ZoneMinder configration variable default values are not configurable at build time through autotools or cmake. A new tool called *zmeditconfigdata.sh* has been added to allow package maintainers to manipulate any variable stored in ConfigData.pm without patching the source. +Many of the ZoneMinder configuration variable default values are not configurable at build time through autotools or cmake. A new tool called *zmeditconfigdata.sh* has been added to allow package maintainers to manipulate any variable stored in ConfigData.pm without patching the source. -For example, let's say I have created a new ZoneMinder package that contains the cambolzola javascript file. However, by default cambozola support is turned off. To fix that, add this to the pacakging script: +For example, let's say I have created a new ZoneMinder package that contains the cambozola javascript file. However, by default cambozola support is turned off. To fix that, add this to the packaging script: ```bash ./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes ``` diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..c3b4c7211 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,18 @@ +# Security Policy + +## Supported Versions + +Time and computers move on. We do not have the resources to support every ancient version of everything +(unless you'd like to pay us to do so.) We ONLY support the latest stable release and development releases. + +| Version | Supported | +| ------- | ------------------ | +| 1.34.x | :white_check_mark: | +| 1.35.x | :white_check_mark: | +| < 1.34.x | :x: | + +## Reporting a Vulnerability + +Since sometimes security vulnerabilities can be sensitive, you can just email me at isaac@zoneminder.com. +If it's not such a big deal, by all means, create an issue here on github + diff --git a/TODO b/TODO deleted file mode 100644 index f449b2a7e..000000000 --- a/TODO +++ /dev/null @@ -1,2 +0,0 @@ -Please see README.md file. - diff --git a/cmake/Modules/FindLibJWT.cmake b/cmake/Modules/FindLibJWT.cmake new file mode 100644 index 000000000..e0c834609 --- /dev/null +++ b/cmake/Modules/FindLibJWT.cmake @@ -0,0 +1,28 @@ +include(FindPackageHandleStandardArgs) + +find_package(PkgConfig QUIET) +pkg_check_modules(PC_LIBJWT QUIET libjwt) + +find_path(LIBJWT_INCLUDE_DIR + NAMES jwt.h + HINTS ${PC_LIBJWT_INCLUDEDIR} ${PC_LIBJWT_INCLUDE_DIRS} + ) + +find_library(LIBJWT_LIBRARY + NAMES jwt-gnutls libjwt-gnutls liblibjwt-gnutls + HINTS ${PC_LIBJWT_LIBDIR} ${PC_LIBJWT_LIBRARY_DIR} + ) + +find_package_handle_standard_args(LibJWT + REQUIRED_VARS LIBJWT_INCLUDE_DIR LIBJWT_LIBRARY + ) + +if(LIBJWT_FOUND) + add_library(libjwt STATIC IMPORTED GLOBAL) + set_target_properties(libjwt PROPERTIES + IMPORTED_LOCATION "${LIBJWT_LIBRARY}" + INTERFACE_INCLUDE_DIRECTORIES "${LIBJWT_INCLUDE_DIR}" + ) +endif() + +mark_as_advanced(LIBJWT_INCLUDE_DIR LIBJWT_LIBRARY) \ No newline at end of file diff --git a/cmake/Modules/Pod2Man.cmake b/cmake/Modules/Pod2Man.cmake index 6804fab53..734be239b 100644 --- a/cmake/Modules/Pod2Man.cmake +++ b/cmake/Modules/Pod2Man.cmake @@ -21,7 +21,7 @@ # To use it, include this file in CMakeLists.txt and # invoke POD2MAN(
) -MACRO(POD2MAN PODFILE MANFILE SECTION) +MACRO(POD2MAN PODFILE MANFILE SECTION MANPAGE_DEST_PREFIX) FIND_PROGRAM(POD2MAN pod2man) FIND_PROGRAM(GZIP gzip) @@ -58,9 +58,9 @@ MACRO(POD2MAN PODFILE MANFILE SECTION) INSTALL( FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz - DESTINATION share/man/man${SECTION} + DESTINATION ${MANPAGE_DEST_PREFIX}/man${SECTION} ) -ENDMACRO(POD2MAN PODFILE MANFILE SECTION) +ENDMACRO(POD2MAN PODFILE MANFILE SECTION MANPAGE_DEST_PREFIX) MACRO(ADD_MANPAGE_TARGET) # It is not possible add a dependency to target 'install' diff --git a/cmakecacheimport.sh b/cmakecacheimport.sh index 79253f6ad..7bd44f311 100755 --- a/cmakecacheimport.sh +++ b/cmakecacheimport.sh @@ -55,6 +55,9 @@ echo "Database host : $ZM_DB_HOST" echo "Database name : $ZM_DB_NAME" echo "Database user : $ZM_DB_USER" echo "Database password : Not shown" +echo "Database SSL CA Cert : $ZM_DB_SSL_CA_CERT" +echo "Database SSL Client Key : $ZM_DB_SSL_CLIENT_KEY" +echo "Database SSL Client Cert : $ZM_DB_SSL_CLIENT_CERT" CMPATH="CACHE PATH \"Imported by cmakecacheimport.sh\" FORCE" @@ -72,6 +75,9 @@ echo "set(ZM_DB_HOST \"$ZM_DB_HOST\" $CMSTRING)">>zm_conf.cmake echo "set(ZM_DB_NAME \"$ZM_DB_NAME\" $CMSTRING)">>zm_conf.cmake echo "set(ZM_DB_USER \"$ZM_DB_USER\" $CMSTRING)">>zm_conf.cmake echo "set(ZM_DB_PASS \"$ZM_DB_PASS\" $CMSTRING)">>zm_conf.cmake +echo "set(ZM_DB_SSL_CA_CERT \"$ZM_DB_SSL_CA_CERT\" $CMSTRING)">>zm_conf.cmake +echo "set(ZM_DB_SSL_CLIENT_KEY \"$ZM_DB_SSL_CLIENT_KEY\" $CMSTRING)">>zm_conf.cmake +echo "set(ZM_DB_SSL_CLIENT_CERT \"$ZM_DB_SSL_CLIENT_CERT\" $CMSTRING)">>zm_conf.cmake echo "" echo "Wrote zm_conf.cmake" diff --git a/code_of_conduct.md b/code_of_conduct.md new file mode 100644 index 000000000..aa6195359 --- /dev/null +++ b/code_of_conduct.md @@ -0,0 +1,74 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of experience, +nationality, personal appearance, race, religion, or sexual identity and +orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or +advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at abuse@zoneminder.com. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at [http://contributor-covenant.org/version/1/4][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/4/ diff --git a/conf.d/01-system-paths.conf.in b/conf.d/01-system-paths.conf.in new file mode 100644 index 000000000..e1aaf0bef --- /dev/null +++ b/conf.d/01-system-paths.conf.in @@ -0,0 +1,48 @@ +# ========================================================================== +# +# ZoneMinder System Paths Configuration +# +# ========================================================================== +# +# This config file contains the variables previously found under Options -> Paths +# +# *** DO NOT EDIT THIS FILE *** +# +# To make custom changes to the variables below, create a new configuration +# file, with an extention of .conf, containing your desired modifications. +# + +# Full path to the folder events are recorded to. +# The web account user must have full read/write permission to this folder. +ZM_DIR_EVENTS=@ZM_DIR_EVENTS@ + +# Foldername under the webroot where ZoneMinder looks for optional sound files +# to play when an alarm is detected. +ZM_DIR_SOUNDS=@ZM_DIR_SOUNDS@ + +# Full path to the folder where exported archives are stored +# The web account user must have full read/write permission to this folder. +ZM_DIR_EXPORTS=@ZM_TMPDIR@ + +# ZoneMinder url path to the zms streaming server +ZM_PATH_ZMS=@ZM_PATH_ZMS@ + +# Full Path to ZoneMinder's mapped memory files +# The web account user must have full read/write permission to this folder. +ZM_PATH_MAP=@ZM_PATH_MAP@ + +# Full Path to ZoneMinder's socket folder +# The web account user must have full read/write permission to this folder. +ZM_PATH_SOCKS=@ZM_SOCKDIR@ + +# Full path to ZoneMinder's log folder +# The web account user must have full read/write permission to this folder. +ZM_PATH_LOGS=@ZM_LOGDIR@ + +# Full path to ZoneMinder's swap folder +# The web account user must have full read/write permission to this folder. +ZM_PATH_SWAP=@ZM_TMPDIR@ + +# Full path to optional arp binary +# ZoneMinder will find the arp binary automatically on most systems +ZM_PATH_ARP="@ZM_PATH_ARP@" diff --git a/conf.d/02-multiserver.conf b/conf.d/02-multiserver.conf new file mode 100644 index 000000000..d2fdfcca7 --- /dev/null +++ b/conf.d/02-multiserver.conf @@ -0,0 +1,12 @@ +# ========================================================================== +# +# ZoneMinder Multiserver Configuration +# +# ========================================================================== +# Do NOT set ZM_SERVER_HOST if you are not using Multi-Server +# You have been warned +# +# The name specified here must have a corresponding entry +# in the Servers tab under Options +#ZM_SERVER_HOST= + diff --git a/conf.d/README b/conf.d/README new file mode 100644 index 000000000..dedfcd11f --- /dev/null +++ b/conf.d/README @@ -0,0 +1,19 @@ +conf.d/README + +Any changes to ZoneMinder's configuration should be made here in this folder, +rather than directly editing the default zm.conf file. + +ZoneMinder will process each file in this folder with a ".conf" extension. +Each "Var = Value" pair, in each config file, will be loaded into ZoneMinder's +running configuration, overriding any variables with the same name found in the +default zm.conf file. + +After creating a custom config file, don't forget to set the proper file and +owner permission on it. For example, this is typically what you should do after +saving the config file to disk: + + sudo chown root:apache *.conf + sudo chmod 640 *.conf + +Substitute "apache" with the name of the web server user account on your system. + diff --git a/db/CMakeLists.txt b/db/CMakeLists.txt index e1b551b1c..ed215d35f 100644 --- a/db/CMakeLists.txt +++ b/db/CMakeLists.txt @@ -2,6 +2,7 @@ # Create files from the .in files configure_file(zm_create.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" @ONLY) +configure_file(zm_update-1.31.30.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.31.30.sql" @ONLY) # Glob all database upgrade scripts file(GLOB dbfileslist RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "zm_update-*.sql") @@ -9,5 +10,12 @@ file(GLOB dbfileslist RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "zm_update-*.sql") # Install the database upgrade scripts install(FILES ${dbfileslist} DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db") +# install zm_update-1.31.30.sql +install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.31.30.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db") + # install zm_create.sql install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db") + +# install triggers.sql +install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/triggers.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db") + diff --git a/db/triggers.sql b/db/triggers.sql new file mode 100644 index 000000000..87c8465b4 --- /dev/null +++ b/db/triggers.sql @@ -0,0 +1,247 @@ + +delimiter // +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = GREATEST(COALESCE(HourEvents,1)-1,0), + HourEventDiskSpace=GREATEST(COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Hour_update_trigger// + +CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET HourEventDiskSpace=GREATEST(COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; +// + +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = GREATEST(COALESCE(DayEvents,1)-1,0), + DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_update_trigger; +CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + + +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = GREATEST(COALESCE(WeekEvents,1)-1,0), + WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_update_trigger; +CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = GREATEST(COALESCE(MonthEvents,1)-1,0), + MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_update_trigger; +CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+COALESCE(NEW.DiskSpace) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +drop procedure if exists update_storage_stats// + +drop trigger if exists event_update_trigger// + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) + diff,0) WHERE Id = OLD.StorageId; + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = COALESCE(DiskSpace,0) + NEW.DiskSpace WHERE Id = NEW.StorageId; + END IF; + IF ( OLD.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) - OLD.DiskSpace,0) WHERE Id = OLD.StorageId; + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors + SET + ArchivedEvents = GREATEST(COALESCE(ArchivedEvents,0)-1,0), + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; + END IF; + ELSEIF ( NEW.Archived AND diff ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + END IF; + + IF ( diff ) THEN + UPDATE Monitors + SET + TotalEventDiskSpace = GREATEST(COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +DROP TRIGGER IF EXISTS event_insert_trigger// + +/* The assumption is that when an Event is inserted, it has no size yet, so don't bother updating the DiskSpace, just the count. + * The DiskSpace will get update in the Event Update Trigger + */ +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS event_delete_trigger// + +CREATE TRIGGER event_delete_trigger BEFORE DELETE ON Events +FOR EACH ROW +BEGIN + IF ( OLD.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) WHERE Id = OLD.StorageId; + END IF; + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = GREATEST(COALESCE(ArchivedEvents,1) - 1,0), + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0), + TotalEvents = GREATEST(COALESCE(TotalEvents,1) - 1,0), + TotalEventDiskSpace = GREATEST(COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = GREATEST(COALESCE(TotalEvents,1)-1,0), + TotalEventDiskSpace=GREATEST(COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + +DROP TRIGGER IF EXISTS Zone_Insert_Trigger// +CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Id=NEW.MonitorID; + END +// +DROP TRIGGER IF EXISTS Zone_Delete_Trigger// +CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Id=OLD.MonitorID; + END +// + +DELIMITER ; diff --git a/db/zm_create.sql.in b/db/zm_create.sql.in index 81280b393..ce462ac4c 100644 --- a/db/zm_create.sql.in +++ b/db/zm_create.sql.in @@ -63,11 +63,12 @@ DROP TABLE IF EXISTS `Controls`; CREATE TABLE `Controls` ( `Id` int(10) unsigned NOT NULL auto_increment, `Name` varchar(64) NOT NULL default '', - `Type` enum('Local','Remote','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local', + `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') NOT NULL default 'Local', `Protocol` varchar(64) default NULL, `CanWake` tinyint(3) unsigned NOT NULL default '0', `CanSleep` tinyint(3) unsigned NOT NULL default '0', `CanReset` tinyint(3) unsigned NOT NULL default '0', + `CanReboot` tinyint(3) unsigned NOT NULL default '0', `CanZoom` tinyint(3) unsigned NOT NULL default '0', `CanAutoZoom` tinyint(3) unsigned NOT NULL default '0', `CanZoomAbs` tinyint(3) unsigned NOT NULL default '0', @@ -182,8 +183,10 @@ CREATE TABLE `Devices` ( DROP TABLE IF EXISTS `Events`; CREATE TABLE `Events` ( - `Id` int(10) unsigned NOT NULL auto_increment, + `Id` bigint unsigned NOT NULL auto_increment, `MonitorId` int(10) unsigned NOT NULL default '0', + `StorageId` smallint(5) unsigned default 0, + `SecondaryStorageId` smallint(5) unsigned default 0, `Name` varchar(64) NOT NULL default '', `Cause` varchar(32) NOT NULL default '', `StartTime` datetime default NULL, @@ -193,6 +196,8 @@ CREATE TABLE `Events` ( `Length` decimal(10,2) NOT NULL default '0.00', `Frames` int(10) unsigned default NULL, `AlarmFrames` int(10) unsigned default NULL, + `DefaultVideo` VARCHAR( 64 ) DEFAULT '' NOT NULL, + `SaveJPEGs` TINYINT, `TotScore` int(10) unsigned NOT NULL default '0', `AvgScore` smallint(5) unsigned default '0', `MaxScore` smallint(5) unsigned default '0', @@ -203,11 +208,70 @@ CREATE TABLE `Events` ( `Messaged` tinyint(3) unsigned NOT NULL default '0', `Executed` tinyint(3) unsigned NOT NULL default '0', `Notes` text, - PRIMARY KEY (`Id`,`MonitorId`), - KEY `MonitorId` (`MonitorId`), - KEY `StartTime` (`StartTime`), - KEY `Frames` (`Frames`), - KEY `Archived` (`Archived`) + `StateId` int(10) unsigned NOT NULL, + `Orientation` enum('ROTATE_0','ROTATE_90','ROTATE_180','ROTATE_270','FLIP_HORI','FLIP_VERT') NOT NULL default 'ROTATE_0', + `DiskSpace` bigint unsigned default NULL, + `Scheme` enum('Deep','Medium','Shallow') NOT NULL default 'Medium', + `Locked` BOOLEAN NOT NULL DEFAULT False, + PRIMARY KEY (`Id`), + KEY `Events_MonitorId_idx` (`MonitorId`), + KEY `Events_StorageId_idx` (`StorageId`), + KEY `Events_StartTime_idx` (`StartTime`), + KEY `Events_EndTime_DiskSpace` (`EndTime`,`DiskSpace`) +) ENGINE=@ZM_MYSQL_ENGINE@; + +DROP TABLE IF EXISTS `Events_Hour`; +CREATE TABLE `Events_Hour` ( + `EventId` BIGINT unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `StartTime` datetime default NULL, + `DiskSpace` bigint default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Hour_MonitorId_idx` (`MonitorId`), + KEY `Events_Hour_StartTime_idx` (`StartTime`) +) ENGINE=@ZM_MYSQL_ENGINE@; + +DROP TABLE IF EXISTS `Events_Day`; +CREATE TABLE `Events_Day` ( + `EventId` BIGINT unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `StartTime` datetime default NULL, + `DiskSpace` bigint default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Day_MonitorId_idx` (`MonitorId`), + KEY `Events_Day_StartTime_idx` (`StartTime`) +) ENGINE=@ZM_MYSQL_ENGINE@; + +DROP TABLE IF EXISTS `Events_Week`; +CREATE TABLE `Events_Week` ( + `EventId` BIGINT unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `StartTime` datetime default NULL, + `DiskSpace` bigint default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Week_MonitorId_idx` (`MonitorId`), + KEY `Events_Week_StartTime_idx` (`StartTime`) +) ENGINE=@ZM_MYSQL_ENGINE@; + +DROP TABLE IF EXISTS `Events_Month`; +CREATE TABLE `Events_Month` ( + `EventId` BIGINT unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `StartTime` datetime default NULL, + `DiskSpace` bigint default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Month_MonitorId_idx` (`MonitorId`), + KEY `Events_Month_StartTime_idx` (`StartTime`) +) ENGINE=@ZM_MYSQL_ENGINE@; + + +DROP TABLE IF EXISTS `Events_Archived`; +CREATE TABLE `Events_Archived` ( + `EventId` BIGINT unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `DiskSpace` bigint default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Archived_MonitorId_idx` (`MonitorId`) ) ENGINE=@ZM_MYSQL_ENGINE@; -- @@ -216,18 +280,29 @@ CREATE TABLE `Events` ( DROP TABLE IF EXISTS `Filters`; CREATE TABLE `Filters` ( + `Id` int(10) unsigned NOT NULL auto_increment, `Name` varchar(64) NOT NULL default '', - `Query` text NOT NULL, + `Query_json` text NOT NULL, `AutoArchive` tinyint(3) unsigned NOT NULL default '0', `AutoVideo` tinyint(3) unsigned NOT NULL default '0', `AutoUpload` tinyint(3) unsigned NOT NULL default '0', `AutoEmail` tinyint(3) unsigned NOT NULL default '0', + `EmailTo` TEXT, + `EmailSubject` TEXT, + `EmailBody` TEXT, `AutoMessage` tinyint(3) unsigned NOT NULL default '0', `AutoExecute` tinyint(3) unsigned NOT NULL default '0', `AutoExecuteCmd` tinytext, `AutoDelete` tinyint(3) unsigned NOT NULL default '0', + `AutoMove` tinyint(3) unsigned NOT NULL default '0', + `AutoMoveTo` smallint(5) unsigned NOT NULL default 0, + `AutoCopy` tinyint(3) unsigned NOT NULL default '0', + `AutoCopyTo` smallint(5) unsigned NOT NULL default 0, + `UpdateDiskSpace` tinyint(3) unsigned NOT NULL default '0', `Background` tinyint(1) unsigned NOT NULL default '0', - PRIMARY KEY (`Name`) + `Concurrent` tinyint(1) unsigned NOT NULL default '0', + PRIMARY KEY (`Id`), + KEY `Name` (`Name`) ) ENGINE=@ZM_MYSQL_ENGINE@; -- @@ -236,8 +311,8 @@ CREATE TABLE `Filters` ( DROP TABLE IF EXISTS `Frames`; CREATE TABLE `Frames` ( - `Id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `EventId` int(10) unsigned NOT NULL default '0', + `Id` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT, + `EventId` BIGINT UNSIGNED NOT NULL default '0', `FrameId` int(10) unsigned NOT NULL default '0', `Type` enum('Normal','Bulk','Alarm') NOT NULL default 'Normal', `TimeStamp` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, @@ -257,16 +332,32 @@ DROP TABLE IF EXISTS `Groups`; CREATE TABLE `Groups` ( `Id` int(10) unsigned NOT NULL auto_increment, `Name` varchar(64) NOT NULL default '', - `MonitorIds` tinytext NOT NULL, + `ParentId` int(10) unsigned, PRIMARY KEY (`Id`) ) ENGINE=@ZM_MYSQL_ENGINE@; +-- +-- Table structure for table `Groups_Monitors` +-- + +DROP TABLE IF EXISTS `Groups_Monitors`; +CREATE TABLE `Groups_Monitors` ( + `Id` INT(10) unsigned NOT NULL auto_increment, + `GroupId` int(10) unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + PRIMARY KEY (`Id`) +) ENGINE=@ZM_MYSQL_ENGINE@; + +CREATE INDEX `Groups_Monitors_GroupId_idx` ON `Groups_Monitors` (`GroupId`); +CREATE INDEX `Groups_Monitors_MonitorId_idx` ON `Groups_Monitors` (`MonitorId`); + -- -- Table structure for table `Logs` -- DROP TABLE IF EXISTS `Logs`; CREATE TABLE `Logs` ( + `Id` int(10) unsigned NOT NULL AUTO_INCREMENT, `TimeKey` decimal(16,6) NOT NULL, `Component` varchar(32) NOT NULL, `ServerId` int(10) unsigned, @@ -276,9 +367,37 @@ CREATE TABLE `Logs` ( `Message` text NOT NULL, `File` varchar(255) DEFAULT NULL, `Line` smallint(5) unsigned DEFAULT NULL, + PRIMARY KEY (`Id`), KEY `TimeKey` (`TimeKey`) ) ENGINE=@ZM_MYSQL_ENGINE@; +CREATE INDEX `Logs_TimeKey_idx` ON `Logs` (`TimeKey`); +CREATE INDEX `Logs_Level_idx` ON `Logs` (`Level`); +-- +-- Table structure for table `Manufacturers` +-- + +DROP TABLE IF EXISTS `Manufacturers`; +CREATE TABLE `Manufacturers` ( + `Id` int(10) unsigned NOT NULL auto_increment, + `Name` varchar(64) NOT NULL, + PRIMARY KEY (`Id`), + UNIQUE KEY (`Name`) +) ENGINE=@ZM_MYSQL_ENGINE@; + +-- +-- Table structure for table `Models` +-- + +DROP TABLE IF EXISTS `Models`; +CREATE TABLE `Models` ( + `Id` int(10) unsigned NOT NULL auto_increment, + `Name` varchar(64) NOT NULL, + `ManufacturerId` int(10), + PRIMARY KEY (`Id`), + UNIQUE KEY (`ManufacturerId`,`Name`) +) ENGINE=@ZM_MYSQL_ENGINE@; + -- -- Table structure for table `MonitorPresets` -- @@ -287,9 +406,9 @@ DROP TABLE IF EXISTS `MonitorPresets`; CREATE TABLE `MonitorPresets` ( `Id` int(10) unsigned NOT NULL auto_increment, `Name` varchar(64) NOT NULL default '', - `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local', + `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') NOT NULL default 'Local', `Device` tinytext, - `Channel` tinytext, + `Channel` tinyint(3) unsigned default NULL, `Format` int(10) unsigned default NULL, `Protocol` varchar(16) default NULL, `Method` varchar(16) default NULL, @@ -300,7 +419,7 @@ CREATE TABLE `MonitorPresets` ( `Width` smallint(5) unsigned default NULL, `Height` smallint(5) unsigned default NULL, `Palette` int(10) unsigned default NULL, - `MaxFPS` decimal(5,2) default NULL, + `MaxFPS` decimal(5,3) default NULL, `Controllable` tinyint(3) unsigned NOT NULL default '0', `ControlId` varchar(16) default NULL, `ControlDevice` varchar(255) default NULL, @@ -318,39 +437,49 @@ DROP TABLE IF EXISTS `Monitors`; CREATE TABLE `Monitors` ( `Id` int(10) unsigned NOT NULL auto_increment, `Name` varchar(64) NOT NULL default '', + `Notes` TEXT, `ServerId` int(10) unsigned, - `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL') NOT NULL default 'Local', + `StorageId` smallint(5) unsigned default 0, + `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') NOT NULL default 'Local', `Function` enum('None','Monitor','Modect','Record','Mocord','Nodect') NOT NULL default 'Monitor', `Enabled` tinyint(3) unsigned NOT NULL default '1', - `LinkedMonitors` varchar(255) NOT NULL default '', + `LinkedMonitors` varchar(255), `Triggers` set('X10') NOT NULL default '', `Device` tinytext NOT NULL default '', `Channel` tinyint(3) unsigned NOT NULL default '0', `Format` int(10) unsigned NOT NULL default '0', - `V4LMultiBuffer` tinyint(1) unsigned NOT NULL default '0', - `V4LCapturesPerFrame` tinyint(3) unsigned NOT NULL default '1', - `Protocol` varchar(16) NOT NULL default '', - `Method` varchar(16) NOT NULL default '', - `Host` varchar(64) NOT NULL default '', + `V4LMultiBuffer` tinyint(1) unsigned, + `V4LCapturesPerFrame` tinyint(3) unsigned, + `Protocol` varchar(16), + `Method` varchar(16) default '', + `Host` varchar(64), `Port` varchar(8) NOT NULL default '', `SubPath` varchar(64) NOT NULL default '', - `Path` varchar(255) NOT NULL default '', - `Options` varchar(255) not null default '', - `User` varchar(64) NOT NULL default '', - `Pass` varchar(64) NOT NULL default '', + `Path` varchar(255), + `Options` varchar(255), + `User` varchar(64), + `Pass` varchar(64), `Width` smallint(5) unsigned NOT NULL default '0', `Height` smallint(5) unsigned NOT NULL default '0', `Colours` tinyint(3) unsigned NOT NULL default '1', `Palette` int(10) unsigned NOT NULL default '0', - `Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0', + `Orientation` enum('ROTATE_0','ROTATE_90','ROTATE_180','ROTATE_270','FLIP_HORI','FLIP_VERT') NOT NULL default 'ROTATE_0', `Deinterlacing` int(10) unsigned NOT NULL default '0', - `RTSPDescribe` tinyint(1) unsigned NOT NULL default '0', + `DecoderHWAccelName` varchar(64), + `DecoderHWAccelDevice` varchar(255), + `SaveJPEGs` TINYINT NOT NULL DEFAULT '3' , + `VideoWriter` TINYINT NOT NULL DEFAULT '0', + `OutputCodec` enum('h264','mjpeg','mpeg1','mpeg2'), + `OutputContainer` enum('auto','mp4','mkv'), + `EncoderParameters` TEXT, + `RecordAudio` TINYINT NOT NULL DEFAULT '0', + `RTSPDescribe` tinyint(1) unsigned, `Brightness` mediumint(7) NOT NULL default '-1', `Contrast` mediumint(7) NOT NULL default '-1', `Hue` mediumint(7) NOT NULL default '-1', `Colour` mediumint(7) NOT NULL default '-1', `EventPrefix` varchar(32) NOT NULL default 'Event-', - `LabelFormat` varchar(64) NOT NULL default '%N - %y/%m/%d %H:%M:%S', + `LabelFormat` varchar(64) default '%N - %y/%m/%d %H:%M:%S', `LabelX` smallint(5) unsigned NOT NULL default '0', `LabelY` smallint(5) unsigned NOT NULL default '0', `LabelSize` smallint(5) unsigned NOT NULL DEFAULT '1', @@ -361,9 +490,10 @@ CREATE TABLE `Monitors` ( `StreamReplayBuffer` int(10) unsigned NOT NULL default '1000', `AlarmFrameCount` smallint(5) unsigned NOT NULL default '1', `SectionLength` int(10) unsigned NOT NULL default '600', + `MinSectionLength` int(10) unsigned NOT NULL default '10', `FrameSkip` smallint(5) unsigned NOT NULL default '0', `MotionFrameSkip` smallint(5) unsigned NOT NULL default '0', - `AnalysisFPS` decimal(5,2) default NULL, + `AnalysisFPSLimit` decimal(5,2) default NULL, `AnalysisUpdateDelay` smallint(5) unsigned NOT NULL default '0', `MaxFPS` decimal(5,2) default NULL, `AlarmMaxFPS` decimal(5,2) default NULL, @@ -371,24 +501,50 @@ CREATE TABLE `Monitors` ( `RefBlendPerc` tinyint(3) unsigned NOT NULL default '6', `AlarmRefBlendPerc` tinyint(3) unsigned NOT NULL default '6', `Controllable` tinyint(3) unsigned NOT NULL default '0', - `ControlId` int(10) unsigned NOT NULL default '0', + `ControlId` int(10) unsigned, `ControlDevice` varchar(255) default NULL, `ControlAddress` varchar(255) default NULL, `AutoStopTimeout` decimal(5,2) default NULL, `TrackMotion` tinyint(3) unsigned NOT NULL default '0', - `TrackDelay` smallint(5) unsigned NOT NULL default '0', + `TrackDelay` smallint(5) unsigned, `ReturnLocation` tinyint(3) NOT NULL default '-1', - `ReturnDelay` smallint(5) unsigned NOT NULL default '0', - `DefaultView` enum('Events','Control') NOT NULL default 'Events', + `ReturnDelay` smallint(5) unsigned, `DefaultRate` smallint(5) unsigned NOT NULL default '100', `DefaultScale` smallint(5) unsigned NOT NULL default '100', + `DefaultCodec` enum('auto','MP4','MJPEG') NOT NULL default 'auto', + `SignalCheckPoints` INT UNSIGNED NOT NULL default '0', `SignalCheckColour` varchar(32) NOT NULL default '#0000BE', `WebColour` varchar(32) NOT NULL default 'red', `Exif` tinyint(1) unsigned NOT NULL default '0', `Sequence` smallint(5) unsigned default NULL, + `TotalEvents` int(10) default NULL, + `TotalEventDiskSpace` bigint default NULL, + `HourEvents` int(10) default NULL, + `HourEventDiskSpace` bigint default NULL, + `DayEvents` int(10) default NULL, + `DayEventDiskSpace` bigint default NULL, + `WeekEvents` int(10) default NULL, + `WeekEventDiskSpace` bigint default NULL, + `MonthEvents` int(10) default NULL, + `MonthEventDiskSpace` bigint default NULL, + `ArchivedEvents` int(10) default NULL, + `ArchivedEventDiskSpace` bigint default NULL, + `ZoneCount` TINYINT NOT NULL DEFAULT 0, + `Refresh` int(10) unsigned default NULL, PRIMARY KEY (`Id`) ) ENGINE=@ZM_MYSQL_ENGINE@; +CREATE INDEX `Monitors_ServerId_idx` ON `Monitors` (`ServerId`); + +DROP TABLE IF EXISTS `Monitor_Status`; +CREATE TABLE `Monitor_Status` ( + `MonitorId` int(10) unsigned NOT NULL, + `Status` enum('Unknown','NotRunning','Running','Connected','Signal') NOT NULL default 'Unknown', + `CaptureFPS` DECIMAL(10,2) NOT NULL default 0, + `AnalysisFPS` DECIMAL(5,2) NOT NULL default 0, + `CaptureBandwidth` INT NOT NULL default 0, + PRIMARY KEY (`MonitorId`) +) ENGINE=MEMORY; -- -- Table structure for table `States` -- PP - Added IsActive to track custom run states @@ -413,20 +569,39 @@ INSERT INTO States (Name,Definition,IsActive) VALUES ('default','','1'); DROP TABLE IF EXISTS `Servers`; CREATE TABLE `Servers` ( `Id` int(10) unsigned NOT NULL auto_increment, + `Protocol` TEXT, `Hostname` TEXT, + `Port` INTEGER UNSIGNED, + `PathToIndex` TEXT, + `PathToZMS` TEXT, + `PathToApi` TEXT, `Name` varchar(64) NOT NULL default '', `State_Id` int(10) unsigned, + `Status` enum('Unknown','NotRunning','Running') NOT NULL default 'Unknown', + `CpuLoad` DECIMAL(5,1) default NULL, + `TotalMem` bigint unsigned default null, + `FreeMem` bigint unsigned default null, + `TotalSwap` bigint unsigned default null, + `FreeSwap` bigint unsigned default null, + `zmstats` BOOLEAN NOT NULL DEFAULT FALSE, + `zmaudit` BOOLEAN NOT NULL DEFAULT FALSE, + `zmtrigger` BOOLEAN NOT NULL DEFAULT FALSE, + `zmeventnotification` BOOLEAN NOT NULL DEFAULT FALSE, PRIMARY KEY (`Id`) ) ENGINE=@ZM_MYSQL_ENGINE@; + +CREATE INDEX `Servers_Name_idx` ON `Servers` (`Name`); + -- -- Table structure for table `Stats` -- DROP TABLE IF EXISTS `Stats`; CREATE TABLE `Stats` ( + `Id` int(10) unsigned NOT NULL AUTO_INCREMENT, `MonitorId` int(10) unsigned NOT NULL default '0', `ZoneId` int(10) unsigned NOT NULL default '0', - `EventId` int(10) unsigned NOT NULL default '0', + `EventId` BIGINT UNSIGNED NOT NULL, `FrameId` int(10) unsigned NOT NULL default '0', `PixelDiff` tinyint(3) unsigned NOT NULL default '0', `AlarmPixels` int(10) unsigned NOT NULL default '0', @@ -440,6 +615,7 @@ CREATE TABLE `Stats` ( `MinY` smallint(5) unsigned NOT NULL default '0', `MaxY` smallint(5) unsigned NOT NULL default '0', `Score` smallint(5) unsigned NOT NULL default '0', + PRIMARY KEY (`Id`), KEY `EventId` (`EventId`), KEY `MonitorId` (`MonitorId`), KEY `ZoneId` (`ZoneId`) @@ -467,7 +643,7 @@ CREATE TABLE `Users` ( `Id` int(10) unsigned NOT NULL auto_increment, `Username` varchar(32) character set latin1 collate latin1_bin NOT NULL default '', `Password` varchar(64) NOT NULL default '', - `Language` varchar(8) NOT NULL default '', + `Language` varchar(8), `Enabled` tinyint(3) unsigned NOT NULL default '1', `Stream` enum('None','View') NOT NULL default 'None', `Events` enum('None','View','Edit') NOT NULL default 'None', @@ -476,8 +652,10 @@ CREATE TABLE `Users` ( `Groups` enum('None','View','Edit') NOT NULL default 'None', `Devices` enum('None','View','Edit') NOT NULL default 'None', `System` enum('None','View','Edit') NOT NULL default 'None', - `MaxBandwidth` varchar(16) NOT NULL default '', - `MonitorIds` tinytext NOT NULL, + `MaxBandwidth` varchar(16), + `MonitorIds` text, + `TokenMinExpiry` BIGINT UNSIGNED NOT NULL DEFAULT 0, + `APIEnabled` tinyint(3) UNSIGNED NOT NULL default 1, PRIMARY KEY (`Id`), UNIQUE KEY `UC_Username` (`Username`) ) ENGINE=@ZM_MYSQL_ENGINE@; @@ -544,6 +722,26 @@ CREATE TABLE `Zones` ( KEY `MonitorId` (`MonitorId`) ) ENGINE=@ZM_MYSQL_ENGINE@; +DROP TABLE IF EXISTS `Storage`; +CREATE TABLE `Storage` ( + `Id` smallint(5) unsigned NOT NULL auto_increment, + `Path` varchar(64) NOT NULL default '', + `Name` varchar(64) NOT NULL default '', + `Type` enum('local','s3fs') NOT NULL default 'local', + `Url` varchar(255) default NULL, + `DiskSpace` bigint default NULL, + `Scheme` enum('Deep','Medium','Shallow') NOT NULL default 'Medium', + `ServerId` int(10) unsigned, + `DoDelete` BOOLEAN NOT NULL DEFAULT true, + `Enabled` BOOLEAN NOT NULL DEFAULT true, + PRIMARY KEY (`Id`) +) ENGINE=@ZM_MYSQL_ENGINE@; + +-- +-- Create a default storage location +-- +insert into Storage VALUES (NULL, '@ZM_DIR_EVENTS@', 'Default', 'local', NULL, NULL, 'Medium', 0, true, true ); + /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; @@ -559,106 +757,213 @@ CREATE TABLE `Zones` ( -- -- Create a default admin user. -- -insert into Users VALUES (NULL,'admin',password('admin'),'',1,'View','Edit','Edit','Edit','Edit','Edit','Edit','',''); +insert into Users VALUES (NULL,'admin','$2b$12$NHZsm6AM2f2LQVROriz79ul3D6DnmFiZC.ZK5eqbF.ZWfwH9bqUJ6','',1,'View','Edit','Edit','Edit','Edit','Edit','Edit','','',0,1); -- -- Add a sample filter to purge the oldest 100 events when the disk is 95% full -- -insert into Filters values ('PurgeWhenFull','{"sort_field":"Id","terms":[{"val":0,"attr":"Archived","op":"="},{"cnj":"and","val":95,"attr":"DiskPercent","op":">="}],"limit":100,"sort_asc":1}',0,0,0,0,0,0,'',1,1); + +INSERT INTO `Filters` + ( + `Name`, + `Query_json`, + `AutoArchive`, + `AutoVideo`, + `AutoUpload`, + `AutoEmail`, + `EmailTo`, + `EmailSubject`, + `EmailBody`, + `AutoMessage`, + `AutoExecute`, + `AutoExecuteCmd`, + `AutoDelete`, + `AutoMove`, + `AutoMoveTo`, + `AutoCopy`, + `AutoCopyTo`, + `UpdateDiskSpace`, + `Background`, + `Concurrent` + ) + VALUES + ( + 'PurgeWhenFull', + '{"sort_field":"Id","terms":[{"val":0,"attr":"Archived","op":"="},{"cnj":"and","val":95,"attr":"DiskPercent","op":">="}],"limit":100,"sort_asc":1}', + 0/*AutoArchive*/, + 0/*AutoVideo*/, + 0/*AutoUpload*/, + 0/*AutoEmail*/, + ''/*EmailTo*/, + ''/*EmailSubject*/, + ''/*EmailBody*/, + 0/*AutoMessage*/, + 0/*AutoExecute*/,'', + 1/*AutoDelete*/, + 0/*AutoMove*/,0/*MoveTo*/, + 0/*AutoCopy*/,0/*CopyTo*/, + 0/*UpdateDiskSpace*/, + 1/*Background*/, + 0/*Concurrent*/ + ); +INSERT INTO `Filters` + ( + `Name`, + `Query_json`, + `AutoArchive`, + `AutoVideo`, + `AutoUpload`, + `AutoEmail`, + `EmailTo`, + `EmailSubject`, + `EmailBody`, + `AutoMessage`, + `AutoExecute`, + `AutoExecuteCmd`, + `AutoDelete`, + `AutoMove`, + `AutoMoveTo`, + `AutoCopy`, + `AutoCopyTo`, + `UpdateDiskSpace`, + `Background`, + `Concurrent` + ) +VALUES ( + 'Update DiskSpace', + '{"terms":[{"attr":"DiskSpace","op":"IS","val":"NULL"}]}', + 0/*AutoArchive*/, + 0/*AutoVideo*/, + 0/*AutoUpload*/, + 0/*AutoEmail*/, + ''/*EmailTo*/, + ''/*EmailSubject*/, + ''/*EmailBody*/, + 0/*AutoMessage*/, + 0/*AutoExecute*/,'', + 0/*AutoDelete*/, + 0/*AutoMove*/,0/*MoveTo*/, + 0/*AutoCopy*/,0/*CopyTo*/, + 1/*UpdateDiskSpace*/, + 1/*Background*/, + 0/*Concurrent*/ +); -- -- Add in some sample control protocol definitions -- -INSERT INTO Controls VALUES (NULL,'Pelco-D','Local','PelcoD',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0); -INSERT INTO Controls VALUES (NULL,'Pelco-P','Local','PelcoP',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0); -INSERT INTO Controls VALUES (NULL,'Sony VISCA','Local','Visca',1,1,0,1,0,0,0,1,0,16384,10,4000,1,1,6,1,1,1,0,1,0,1536,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,3,1,1,1,1,0,1,1,0,1,-15578,15578,100,10000,1,1,50,1,254,1,-7789,7789,100,5000,1,1,50,1,254,0,0); -INSERT INTO Controls VALUES (NULL,'Axis API v2','Remote','AxisV2',0,0,0,1,0,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,1,1,1,1,1,0,1,0,1,-360,360,1,90,0,NULL,NULL,0,NULL,1,-360,360,1,90,0,NULL,NULL,0,NULL,0,0); -INSERT INTO Controls VALUES (NULL,'Panasonic IP','Remote','PanasonicIP',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0); -INSERT INTO Controls VALUES (NULL,'Neu-Fusion NCS370','Remote','Ncs370',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,24,1,0,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0); -INSERT INTO Controls VALUES (NULL,'AirLink SkyIPCam 7xx','Remote','SkyIPCam7xx',0,0,1,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,1,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0); -INSERT INTO Controls VALUES (NULL,'Pelco-D','Ffmpeg','PelcoD',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0); -INSERT INTO Controls VALUES (NULL,'Pelco-P','Ffmpeg','PelcoP',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0); -INSERT INTO Controls VALUES (NULL,'Foscam FI8620','Ffmpeg','FI8620_Y2k',0,0,0,1,0,0,0,1,1,10,1,10,1,1,63,1,1,0,0,1,1,63,1,63,1,1,63,1,1,0,0,1,0,0,0,0,1,0,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,1,8,0,1,1,1,0,0,0,1,1,1,360,1,360,1,1,63,0,0,1,1,90,1,90,1,1,63,0,0,0,0); -INSERT INTO Controls VALUES (NULL,'Foscam FI8608W','Ffmpeg','FI8608W_Y2k',1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,1,8,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,128,0,0,1,0,0,0,0,1,1,128,0,0,0,0); -INSERT INTO Controls VALUES (NULL,'Foscam FI8908W','Remote','FI8908W',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO Controls VALUES (NULL,'Foscam FI9821W','Ffmpeg','FI9821W_Y2k',1,0,1,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,100,1,1,0,0,1,0,100,0,100,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,100,0,100,1,0,100,1,16,0,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,1,0,4,0,0,0,0); -INSERT INTO Controls VALUES (NULL,'Loftek Sentinel','Remote','LoftekSentinel',0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,6,1,1,0,0,0,1,10,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO Controls VALUES (NULL,'Toshiba IK-WB11A','Remote','Toshiba_IK_WB11A',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,10,0,1,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO Controls VALUES (NULL,'WanscamPT','Remote','Wanscam',1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,16,0,0,0,0,0,1,16,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO Controls VALUES (NULL,'3S Domo N5071', 'Remote', '3S', 0, 0, 1, 1, 0, 1, 1, 0, 0, 9999, 0, 9999, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9999, 20, 9999, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9999, 1, 9999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 64, 1, 0, 1, 1, 0, 0, 0, 0, 1, -180, 180, 40, 100, 1, 40, 100, 0, 0, 1, -180, 180, 40, 100, 1, 40, 100, 0, 0, 0, 0); -INSERT INTO Controls VALUES (NULL,'ONVIF Camera','Ffmpeg','onvif',0,0,1,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,6,1,1,0,0,0,1,10,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); -INSERT INTO `Controls` VALUES (NULL,'Foscam 9831W','Ffmpeg','FI9831W',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,1,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,0,0,0,0,0,0,0); -INSERT INTO `Controls` VALUES (NULL,'Foscam FI8918W','Ffmpeg','FI8918W',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,0,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,1,0,4,0,0,0,0); -INSERT INTO `Controls` VALUES (NULL,'SunEyes SP-P1802SWPTZ','Libvlc','SPP1802SWPTZ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,0,1,1,0,0,0,0,1,1,0,0,0,0,1,0,64,0,0,1,0,0,0,0,1,0,64,0,0,0,0); -INSERT INTO `Controls` VALUES (NULL,'Wanscam HW0025','Libvlc','WanscamHW0025', 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 350, 0, 0, 1, 0, 10, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0); -INSERT INTO `Controls` VALUES (NULL,'IPCC 7210W','Libvlc','IPCC7210W', 1, 1, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 350, 0, 0, 1, 0, 10, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0); -INSERT INTO `Controls` VALUES (NULL,'Vivotek ePTZ','Remote','Vivotek_ePTZ',0,0,1,1,0,0,0,1,0,0,0,0,1,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,1,0,5,0,0,1,0,0,0,0,1,0,5,0,0,0,0); -INSERT INTO `Controls` VALUES (NULL,'Netcat ONVIF','Ffmpeg','Netcat',0,0,1,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,100,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,100,5,5,0,0,0,1,255,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO Controls VALUES (NULL,'Pelco-D','Local','PelcoD',1,1,0,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0); +INSERT INTO Controls VALUES (NULL,'Pelco-P','Local','PelcoP',1,1,0,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0); +INSERT INTO Controls VALUES (NULL,'Sony VISCA','Local','Visca',1,1,0,0,1,0,0,0,1,0,16384,10,4000,1,1,6,1,1,1,0,1,0,1536,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,3,1,1,1,1,0,1,1,0,1,-15578,15578,100,10000,1,1,50,1,254,1,-7789,7789,100,5000,1,1,50,1,254,0,0); +INSERT INTO Controls VALUES (NULL,'Axis API v2','Remote','AxisV2',0,0,0,0,1,0,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,1,1,1,1,1,0,1,0,1,-360,360,1,90,0,NULL,NULL,0,NULL,1,-360,360,1,90,0,NULL,NULL,0,NULL,0,0); +INSERT INTO Controls VALUES (NULL,'Panasonic IP','Remote','PanasonicIP',0,0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0); +INSERT INTO Controls VALUES (NULL,'Neu-Fusion NCS370','Remote','Ncs370',0,0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,24,1,0,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0); +INSERT INTO Controls VALUES (NULL,'AirLink SkyIPCam 7xx','Remote','SkyIPCam7xx',0,0,1,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,1,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0); +INSERT INTO Controls VALUES (NULL,'Pelco-D','Ffmpeg','PelcoD',1,1,0,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0); +INSERT INTO Controls VALUES (NULL,'Pelco-P','Ffmpeg','PelcoP',1,1,0,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0); +INSERT INTO Controls VALUES (NULL,'Foscam FI8620','Ffmpeg','FI8620_Y2k',0,0,0,0,1,0,0,0,1,1,10,1,10,1,1,63,1,1,0,0,1,1,63,1,63,1,1,63,1,1,0,0,1,0,0,0,0,1,0,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,1,8,0,1,1,1,0,0,0,1,1,1,360,1,360,1,1,63,0,0,1,1,90,1,90,1,1,63,0,0,0,0); +INSERT INTO Controls VALUES (NULL,'Foscam FI8608W','Ffmpeg','FI8608W_Y2k',1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,255,1,8,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,128,0,0,1,0,0,0,0,1,1,128,0,0,0,0); +INSERT INTO Controls VALUES (NULL,'Foscam FI8908W','Remote','FI8908W',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO Controls VALUES (NULL,'Foscam FI9821W','Ffmpeg','FI9821W_Y2k',1,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,1,0,100,1,1,0,0,1,0,100,0,100,1,0,100,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,100,0,100,1,0,100,1,16,0,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,1,0,4,0,0,0,0); +INSERT INTO Controls VALUES (NULL,'Loftek Sentinel','Remote','LoftekSentinel',0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,6,1,1,0,0,0,1,10,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO Controls VALUES (NULL,'Toshiba IK-WB11A','Remote','Toshiba_IK_WB11A',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,10,0,1,1,0,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO Controls VALUES (NULL,'WanscamPT','Remote','Wanscam',1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,16,0,0,0,0,0,1,16,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO Controls VALUES (NULL,'3S Domo N5071', 'Remote', '3S', 0, 0, 1, 0,1, 0, 1, 1, 0, 0, 9999, 0, 9999, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9999, 20, 9999, 0, 0, 0, 1, 1, 1, 1, 0, 0, 9999, 1, 9999, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 64, 1, 0, 1, 1, 0, 0, 0, 0, 1, -180, 180, 40, 100, 1, 40, 100, 0, 0, 1, -180, 180, 40, 100, 1, 40, 100, 0, 0, 0, 0); +INSERT INTO Controls VALUES (NULL,'ONVIF Camera','Ffmpeg','onvif',0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,255,16,16,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,6,1,1,0,0,0,1,10,0,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Foscam 9831W','Ffmpeg','FI9831W',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,16,1,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Foscam FI8918W','Ffmpeg','FI8918W',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,0,1,1,1,0,0,0,1,1,0,360,0,360,1,0,4,0,0,1,0,90,0,90,1,0,4,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'SunEyes SP-P1802SWPTZ','Libvlc','SPP1802SWPTZ',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,8,0,1,1,0,0,0,0,1,1,0,0,0,0,1,0,64,0,0,1,0,0,0,0,1,0,64,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Wanscam HW0025','Libvlc','WanscamHW0025', 1, 1, 1, 0,1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 350, 0, 0, 1, 0, 10, 0, 0, 1, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0); +INSERT INTO `Controls` VALUES (NULL,'IPCC 7210W','Remote','IPCC7210W', 1, 1, 1, 0,1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 1, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `Controls` VALUES (NULL,'Vivotek ePTZ','Remote','Vivotek_ePTZ',0,0,1,0,1,0,0,0,1,0,0,0,0,1,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,0,0,0,0,1,0,5,0,0,1,0,0,0,0,1,0,5,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Netcat ONVIF','Ffmpeg','Netcat',0,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,100,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,100,5,5,0,0,0,1,255,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Keekoon','Remote','Keekoon', 0, 0, 0, 0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 6, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); +INSERT INTO `Controls` VALUES (NULL,'HikVision','Local','',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,1,1,1,1,0,0,0,1,1,0,0,0,0,1,1,100,0,0,1,0,0,0,0,1,1,100,1,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Maginon Supra IPC','cURL','MaginonIPC',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,4,0,1,1,1,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Floureon 1080P','Ffmpeg','Floureon',0,0,0,0,1,0,0,0,1,1,18,1,1,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,8,0,0,1,0,0,0,0,1,1,8,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Reolink RLC-423','Ffmpeg','Reolink',0,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,64,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Reolink RLC-411','Ffmpeg','Reolink',0,0,1,0,1,0,0,0,1,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Reolink RLC-420','Ffmpeg','Reolink',0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'D-LINK DCS-3415','Remote','DCS3415',0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'D-Link DCS-5020L','Remote','DCS5020L',1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,24,1,0,1,1,1,0,1,0,1,0,0,1,30,0,0,0,0,0,1,0,0,1,30,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'IOS Camera','Ffmpeg','IPCAMIOS',0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Dericam P2','Ffmpeg','DericamP2',0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,10,0,1,1,1,0,0,0,1,1,0,0,0,0,1,1,45,0,0,1,0,0,0,0,1,1,45,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Trendnet','Remote','Trendnet',1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'PSIA','Remote','PSIA',0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,100,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,0,1,1,1,0,0,1,0,1,0,0,0,0,1,-100,100,0,0,1,0,0,0,0,1,-100,100,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'Dahua','Ffmpeg','Dahua',0,0,1,1,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,20,1,1,1,1,0,0,1,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0); +INSERT INTO `Controls` VALUES (NULL,'FOSCAMR2C','Libvlc','FOSCAMR2C',1,1,1,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,0,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,4,0,NULL,1,NULL,NULL,NULL,NULL,1,0,4,0,NULL,0,0); +INSERT INTO `Controls` VALUES (NULL,'Amcrest HTTP API','Ffmpeg','Amcrest_HTTP',0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,5,0,0,1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,5); -- -- Add some monitor preset values -- -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, mpjpeg, B&W','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&color=0',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, mpjpeg, B&W','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&color=0',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',NULL,320,240,3,NULL,1,4,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 320x240, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',NULL,320,240,3,NULL,1,4,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,NULL,1,4,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,5.0,1,4,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',NULL,640,480,3,NULL,1,4,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 640x480, mpjpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',NULL,640,480,3,NULL,1,4,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,NULL,1,4,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,5.0,1,4,NULL,':',100,100); -INSERT into MonitorPresets VALUES (NULL,'Axis IP, mpeg4, unicast','Remote','rtsp','rtpUni',NULL,NULL,NULL,'',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT into MonitorPresets VALUES (NULL,'Axis IP, mpeg4, multicast','Remote','rtsp','rtpMulti',NULL,NULL,NULL,'',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT into MonitorPresets VALUES (NULL,'Axis IP, mpeg4, RTP/RTSP','Remote','rtsp','rtpRtsp',NULL,NULL,NULL,'',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); + +INSERT into MonitorPresets VALUES (NULL,'Amcrest, IP8M-T2499EW 640x480, RTP/RTSP','Ffmpeg','rtsp',0,255,'rtsp','rtpRtsp','NULL',554,'rtsp://:@/cam/realmonitor?channel=1&subtype=1',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT into MonitorPresets VALUES (NULL,'Amcrest, IP8M-T2499EW 3840x2160, RTP/RTSP','Ffmpeg','rtsp',0,255,'rtsp','rtpRtsp','NULL',554,'rtsp://:@/cam/realmonitor?channel=1&subtype=0',NULL,3840,2160,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, mpjpeg','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, mpjpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, jpeg','Remote','http',0,0,'http','simple','',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, mpjpeg','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, mpjpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, jpeg','Remote','http',0,0,'http','simple','',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 320x240, mpjpeg, B&W','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&color=0',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP, 640x480, mpjpeg, B&W','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&color=0',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 320x240, mpjpeg','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',NULL,320,240,3,NULL,1,4,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 320x240, mpjpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',NULL,320,240,3,NULL,1,4,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 320x240, jpeg','Remote','http',0,0,'http','simple','',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,NULL,1,4,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 320x240, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',NULL,320,240,3,5.0,1,4,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 640x480, mpjpeg','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',NULL,640,480,3,NULL,1,4,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 640x480, mpjpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',NULL,640,480,3,NULL,1,4,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 640x480, jpeg','Remote','http',0,0,'http','simple','',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,NULL,1,4,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Axis IP PTZ, 640x480, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',NULL,640,480,3,5.0,1,4,NULL,':',100,100); +INSERT into MonitorPresets VALUES (NULL,'Axis IP, mpeg4, unicast','Remote','rtsp',0,255,'rtsp','rtpUni','',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT into MonitorPresets VALUES (NULL,'Axis IP, mpeg4, multicast','Remote','rtsp',0,255,'rtsp','rtpMulti','',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT into MonitorPresets VALUES (NULL,'Axis IP, mpeg4, RTP/RTSP','Remote','rtsp',0,255,'rtsp','rtpRtsp','',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); INSERT into MonitorPresets VALUES (NULL,'Axis IP, mpeg4, RTP/RTSP/HTTP','Remote',NULL,NULL,NULL,'rtsp','rtpRtspHttp','',554,'/mpeg4/media.amp','/trackID=',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 320x240, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,1,5,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 320x240, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,1,5,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 320x240, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,5.0,1,5,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 640x480, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,1,5,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 640x480, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,1,5,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 640x480, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,5.0,1,5,NULL,':',100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Gadspot IP, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Gadspot IP, jpeg, max 5 FPS','Remote','http','simple',NULL,NULL,NULL,'',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Gadspot IP, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/GetData.cgi',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Gadspot IP, mpjpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'VEO Observer, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'Blue Net Video Server, jpeg','Remote','http','simple',NULL,NULL,NULL,'',80,'/cgi-bin/image.cgi?control=0&id=admin&passwd=admin',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'D-link DCS-930L, 640x480, mjpeg','Remote','http',0,0,'http','simple','',80,'/mjpeg.cgi',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'D-Link DCS-5020L, 640x480, mjpeg','Remote','http',0,0,'http','simple',':@','80','/video.cgi',NULL,640,480,0,NULL,1,'34',NULL,':@',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 320x240, mpjpeg','Remote','http',0,0,'http','simple','',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 320x240, jpeg','Remote','http',0,0,'http','simple','',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 320x240, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 640x480, mpjpeg','Remote','http',0,0,'http','simple','',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 640x480, jpeg','Remote','http',0,0,'http','simple','',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP, 640x480, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 320x240, mpjpeg','Remote','http',0,0,'http','simple','',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,1,5,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 320x240, jpeg','Remote','http',0,0,'http','simple','',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,NULL,1,5,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 320x240, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',NULL,320,240,3,5.0,1,5,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 640x480, mpjpeg','Remote','http',0,0,'http','simple','',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,1,5,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 640x480, jpeg','Remote','http',0,0,'http','simple','',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,NULL,1,5,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Panasonic IP PTZ, 640x480, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',NULL,640,480,3,5.0,1,5,NULL,':',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Gadspot IP, jpeg','Remote','http',0,0,'http','simple','',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Gadspot IP, jpeg, max 5 FPS','Remote','http',0,0,'http','simple','',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Gadspot IP, mpjpeg','Remote','http',0,0,'http','simple','',80,'/GetData.cgi',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Gadspot IP, mpjpeg','Remote','http',0,0,'http','simple','',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'IP Webcam by Pavel Khlebovich 1920x1080','Remote','/dev/video','0',255,'http','simple','','8080','/video','',1920,1080,0,NULL,0,'0','','',100,100); +INSERT INTO MonitorPresets VALUES (NULL,'VEO Observer, jpeg','Remote','http',0,0,'http','simple','',80,'/Jpeg/CamImg.jpg',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Blue Net Video Server, jpeg','Remote','http',0,0,'http','simple','',80,'/cgi-bin/image.cgi?control=0&id=admin&passwd=admin',NULL,320,240,3,NULL,0,NULL,NULL,NULL,100,100); INSERT into MonitorPresets VALUES (NULL,'ACTi IP, mpeg4, unicast','Remote',NULL,NULL,NULL,'rtsp','rtpUni','',7070,'','/track',NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); INSERT INTO MonitorPresets VALUES (NULL,'Axis FFMPEG H.264','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp:///axis-media/media.amp?videocodec=h264',NULL,NULL,NULL,640,480,3,NULL,0,NULL,NULL,NULL,100,100); INSERT INTO MonitorPresets VALUES (NULL,'Vivotek FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://:554/live.sdp',NULL,NULL,NULL,352,240,NULL,NULL,0,NULL,NULL,NULL,100,100); INSERT INTO MonitorPresets VALUES (NULL,'Axis FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp:///axis-media/media.amp',NULL,NULL,NULL,640,480,NULL,NULL,0,NULL,NULL,NULL,100,100); INSERT INTO MonitorPresets VALUES (NULL,'ACTi TCM FFMPEG','Ffmpeg',NULL,NULL,NULL,NULL,NULL,'rtsp://admin:123456@:7070',NULL,NULL,NULL,320,240,NULL,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), PAL, 320x240','Local','/dev/video','',255,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), PAL, 320x240, max 5 FPS','Local','/dev/video','',255,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), PAL, 640x480','Local','/dev/video','',255,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), PAL, 640x480, max 5 FPS','Local','/dev/video','',255,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), NTSC, 320x240','Local','/dev/video','',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), NTSC, 320x240, max 5 FPS','Local','/dev/video','',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), NTSC, 640x480','Local','/dev/video','',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), NTSC, 640x480, max 5 FPS','Local','/dev/video','',45056,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), PAL, 320x240','Local','/dev/video','',0,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), PAL, 320x240, max 5 FPS','Local','/dev/video','',0,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), PAL, 640x480','Local','/dev/video','',0,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), PAL, 640x480, max 5 FPS','Local','/dev/video','',0,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), NTSC, 320x240','Local','/dev/video','',1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), NTSC, 320x240, max 5 FPS','Local','/dev/video','',1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), NTSC, 640x480','Local','/dev/video','',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100); -INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), NTSC, 640x480, max 5 FPS','Local','/dev/video','',1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), PAL, 320x240','Local','/dev/video',0,255,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), PAL, 320x240, max 5 FPS','Local','/dev/video',0,255,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), PAL, 640x480','Local','/dev/video',0,255,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), PAL, 640x480, max 5 FPS','Local','/dev/video',0,255,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), NTSC, 320x240','Local','/dev/video',0,45056,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), NTSC, 320x240, max 5 FPS','Local','/dev/video',0,45056,NULL,'v4l2',NULL,NULL,NULL,NULL,320,240,1345466932,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), NTSC, 640x480','Local','/dev/video',0,45056,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L2), NTSC, 640x480, max 5 FPS','Local','/dev/video',0,45056,NULL,'v4l2',NULL,NULL,NULL,NULL,640,480,1345466932,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), PAL, 320x240','Local','/dev/video',0,0,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), PAL, 320x240, max 5 FPS','Local','/dev/video',0,0,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), PAL, 640x480','Local','/dev/video',0,0,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), PAL, 640x480, max 5 FPS','Local','/dev/video',0,0,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), NTSC, 320x240','Local','/dev/video',0,1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), NTSC, 320x240, max 5 FPS','Local','/dev/video',0,1,NULL,'v4l1',NULL,NULL,NULL,NULL,320,240,13,5.0,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), NTSC, 640x480','Local','/dev/video',0,1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'BTTV Video (V4L1), NTSC, 640x480, max 5 FPS','Local','/dev/video',0,1,NULL,'v4l1',NULL,NULL,NULL,NULL,640,480,13,5.0,0,NULL,NULL,NULL,100,100); INSERT INTO MonitorPresets VALUES (NULL,'Remote ZoneMinder','Remote',NULL,NULL,NULL,'http','simple','',80,'/cgi-bin/nph-zms?mode=jpeg&monitor=&scale=100&maxfps=5&buffer=0',NULL,NULL,NULL,3,NULL,0,NULL,NULL,NULL,100,100); INSERT INTO MonitorPresets VALUES (NULL,'Foscam FI8620 FFMPEG H.264','Ffmpeg',NULL,NULL,NULL,NULL,'','','','rtsp://:@:554/11',NULL,704,576,0,NULL,1,'10','','',100,100); INSERT INTO MonitorPresets VALUES (NULL,'Foscam FI8608W FFMPEG H.264','Ffmpeg',NULL,NULL,NULL,NULL,'','','','rtsp://:@:554/11',NULL,640,480,0,NULL,1,'11','','',100,100); @@ -666,6 +971,8 @@ INSERT INTO MonitorPresets VALUES (NULL,'Foscam FI9821W FFMPEG H.264','Ffmpeg',N INSERT INTO MonitorPresets VALUES (NULL,'Loftek Sentinel PTZ, 640x480, mjpeg','Remote','http',0,0,NULL,NULL,'','80','/videostream.cgi?user=&pwd=&resolution=32&rate=11',NULL,640,480,4,NULL,1,'13','',':@',100,100); INSERT INTO MonitorPresets VALUES (NULL,'Airlink 777W PTZ, 640x480, mjpeg','Remote','http',0,0,NULL,NULL,':@','80','/cgi/mjpg/mjpg.cgi',NULL,640,480,4,NULL,1,'7','',':@',100,100); INSERT INTO MonitorPresets VALUES (NULL,'SunEyes SP-P1802SWPTZ','Libvlc','/dev/video','0',255,'','rtpMulti','','80','rtsp://:554/11','',1920,1080,0,0.00,1,'16','-speed=64',':',100,33); +INSERT INTO MonitorPresets VALUES (NULL,'Qihan IP, 1280x720, RTP/RTSP','Ffmpeg','rtsp',0,255,'rtsp','rtpRtsp',NULL,554,'rtsp:///tcp_live/ch0_0',NULL,1280,720,3,NULL,0,NULL,NULL,NULL,100,100); +INSERT INTO MonitorPresets VALUES (NULL,'Qihan IP, 1920x1080, RTP/RTSP','Ffmpeg','rtsp',0,255,'rtsp','rtpRtsp',NULL,554,'rtsp:///tcp_live/ch0_0',NULL,1920,1080,3,NULL,0,NULL,NULL,NULL,100,100); -- -- Add some zone preset values @@ -678,6 +985,36 @@ INSERT INTO ZonePresets VALUES (5,'Best, low sensitivity','Active','Percent','Bl INSERT INTO ZonePresets VALUES (6,'Best, medium sensitivity','Active','Percent','Blobs',40,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL,0,0); INSERT INTO ZonePresets VALUES (7,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL,0,0); +DROP TABLE IF EXISTS Maps; + +CREATE TABLE Maps ( + `Id` int(10) unsigned NOT NULL auto_increment, + `Name` VARCHAR(64) NOT NULL, + `Filename` VARCHAR(64) NOT NULL default '', + `NumCoords` tinyint(3) unsigned NOT NULL default '0', + `Coords` tinytext NOT NULL, + `ParentId` int(1) unsigned, + PRIMARY KEY (`Id`) +); + +DROP TABLE IF EXISTS MontageLayouts; + +CREATE TABLE MontageLayouts ( + `Id` int(10) unsigned NOT NULL auto_increment, + `Name` TEXT NOT NULL, + `Positions` LONGTEXT, + /*`Positions` JSON,*/ + PRIMARY KEY (`Id`) +); + +INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('Freeform', '{ "default":{"float":"left","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' ); +INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('2 Wide', '{ "default":{"float":"left", "width":"49%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' ); +INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('3 Wide', '{ "default":{"float":"left", "width":"33%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' ); +INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('4 Wide', '{ "default":{"float":"left", "width":"24.5%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' ); +INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES ('5 Wide', '{ "default":{"float":"left", "width":"19%","left":"0px","right":"0px","top":"0px","bottom":"0px"} }' ); + +-- We generally don't alter triggers, we drop and re-create them, so let's keep them in a separate file that we can just source in update scripts. +source @PKGDATADIR@/db/triggers.sql -- -- Apply the initial configuration -- diff --git a/db/zm_update-1.28.110.sql b/db/zm_update-1.28.110.sql index 7a573bbf3..388b521aa 100644 --- a/db/zm_update-1.28.110.sql +++ b/db/zm_update-1.28.110.sql @@ -2,10 +2,6 @@ -- This updates a 1.28.109 database to 1.28.110 -- --- --- Update Frame table to have a PrimaryKey of ID, insetad of a Composite Primary Key --- Used primarially for compatibility with CakePHP --- SET @s = (SELECT IF( (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS diff --git a/db/zm_update-1.28.99.sql b/db/zm_update-1.28.99.sql index 5b342a811..ccbc9c059 100644 --- a/db/zm_update-1.28.99.sql +++ b/db/zm_update-1.28.99.sql @@ -322,7 +322,7 @@ WHERE NOT EXISTS ( -- -- Hide USE_DEEP_STORAGE from user to prevent accidental event loss -- -UPDATE `zm`.`Config` SET `Category`='hidden' WHERE `Name`='ZM_USE_DEEP_STORAGE'; +UPDATE Config SET Category='hidden' WHERE Name='ZM_USE_DEEP_STORAGE'; -- -- Add Id column to State diff --git a/db/zm_update-1.29.1.sql b/db/zm_update-1.29.1.sql deleted file mode 100644 index 8fd43c318..000000000 --- a/db/zm_update-1.29.1.sql +++ /dev/null @@ -1,7 +0,0 @@ --- --- 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/db/zm_update-1.30.1.sql b/db/zm_update-1.30.1.sql new file mode 100644 index 000000000..298668e08 --- /dev/null +++ b/db/zm_update-1.30.1.sql @@ -0,0 +1,110 @@ +-- +-- This updates a 1.28.108 database to 1.28.109 +-- + +-- +-- Add Controls definition for Vivotek ePTZ +-- +INSERT INTO Controls +SELECT * FROM (SELECT NULL as Id, + 'Vivotek ePTZ' as Name, + 'Remote' as Type, + 'Vivotek_ePTZ' as Protocol, + 0 as CanWake, + 0 as CanSleep, + 1 as CanReset, + 1 as CanZoom, + 0 as CanAutoZoom, + 0 as CanZoomAbs, + 0 as CanZoomRel, + 1 as CanZoomCon, + 0 as MinZoomRange, + 0 as MaxZoomRange, + 0 as MinZoomStep, + 0 as MaxZoomStep, + 1 as HasZoomSpeed, + 0 as MinZoomSpeed, + 5 as MaxZoomSpeed, + 0 as CanFocus, + 0 as CanAutoFocus, + 0 as CanFocusAbs, + 0 as CanFocusRel, + 0 as CanFocusCon, + 0 as MinFocusRange, + 0 as MaxFocusRange, + 0 as MinFocusStep, + 0 as MaxFocusStep, + 0 as HasFocusSpeed, + 0 as MinFocusSpeed, + 0 as MaxFocusSpeed, + 0 as CanIris, + 0 as CanAutoIris, + 0 as CanIrisAbs, + 0 as CanIrisRel, + 0 as CanIrisCon, + 0 as MinIrisRange, + 0 as MaxIrisRange, + 0 as MinIrisStep, + 0 as MaxIrisStep, + 0 as HasIrisSpeed, + 0 as MinIrisSpeed, + 0 as MaxIrisSpeed, + 0 as CanGain, + 0 as CanAutoGain, + 0 as CanGainAbs, + 0 as CanGainRel, + 0 as CanGainCon, + 0 as MinGainRange, + 0 as MaxGainRange, + 0 as MinGainStep, + 0 as MaxGainStep, + 0 as HasGainSpeed, + 0 as MinGainSpeed, + 0 as MaxGainSpeed, + 0 as CanWhite, + 0 as CanAutoWhite, + 0 as CanWhiteAbs, + 0 as CanWhiteRel, + 0 as CanWhiteCon, + 0 as MinWhiteRange, + 0 as MaxWhiteRange, + 0 as MinWhiteStep, + 0 as MaxWhiteStep, + 0 as HasWhiteSpeed, + 0 as MinWhiteSpeed, + 0 as MaxWhiteSpeed, + 0 as HasPresets, + 0 as NumPresets, + 0 as HasHomePreset, + 0 as CanSetPresets, + 1 as CanMove, + 0 as CanMoveDiag, + 0 as CanMoveMap, + 0 as CanMoveAbs, + 0 as CanMoveRel, + 1 as CanMoveCon, + 1 as CanPan, + 0 as MinPanRange, + 0 as MaxPanRange, + 0 as MinPanStep, + 0 as MaxPanStep, + 1 as HasPanSpeed, + 0 as MinPanSpeed, + 5 as MaxPanSpeed, + 0 as HasTurboPan, + 0 as TurboPanSpeed, + 1 as CanTilt, + 0 as MinTiltRange, + 0 as MaxTiltRange, + 0 as MinTiltStep, + 0 as MaxTiltStep, + 1 as HasTiltSpeed, + 0 as MinTiltSpeed, + 5 as MaxTiltSpeed, + 0 as HasTurboTilt, + 0 as TurboTiltSpeed, + 0 as CanAutoScan, + 0 as NumScanPaths) AS tmp +WHERE NOT EXISTS ( + SELECT Name FROM Controls WHERE name = 'Vivotek ePTZ' +) LIMIT 1; diff --git a/db/zm_update-1.30.2.sql b/db/zm_update-1.30.2.sql new file mode 100644 index 000000000..50c318f6b --- /dev/null +++ b/db/zm_update-1.30.2.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.30.1 database to 1.30.2 +-- + +ALTER TABLE Users MODIFY MonitorIds TEXT NOT NULL; diff --git a/db/zm_update-1.30.3.sql b/db/zm_update-1.30.3.sql new file mode 100644 index 000000000..d3a0c740d --- /dev/null +++ b/db/zm_update-1.30.3.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.30.2 database to 1.30.3 +-- +-- No changes required +-- diff --git a/db/zm_update-1.30.4.sql b/db/zm_update-1.30.4.sql new file mode 100644 index 000000000..267562291 --- /dev/null +++ b/db/zm_update-1.30.4.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.30.3 database to 1.30.4 +-- +-- No changes required +-- diff --git a/db/zm_update-1.31.0.sql b/db/zm_update-1.31.0.sql new file mode 100644 index 000000000..1e20953d6 --- /dev/null +++ b/db/zm_update-1.31.0.sql @@ -0,0 +1,101 @@ +-- +-- This updates a 1.29.0 database to 1.30.0 +-- +SELECT 'Checking for SaveJPEGs in Monitors'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'SaveJPEGs' + ) > 0, +"SELECT 'Column SaveJPEGs exists in Monitors'", +"ALTER TABLE `Monitors` ADD `SaveJPEGs` TINYINT NOT NULL DEFAULT '3' AFTER `Deinterlacing`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SELECT 'Checking for VideoWriter in Monitors'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'VideoWriter' + ) > 0, +"SELECT 'Column VideoWriter exists in Monitors'", +"ALTER TABLE `Monitors` ADD `VideoWriter` TINYINT NOT NULL DEFAULT '0' AFTER `SaveJPEGs`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SELECT 'Checking for EncoderParameters in Monitors'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'EncoderParameters' + ) > 0, +"SELECT 'Column EncoderParameters exists in Monitors'", +"ALTER TABLE `Monitors` ADD `EncoderParameters` TEXT NOT NULL AFTER `VideoWriter`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SELECT 'Checking for DefaultVideo in Events'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Events' + AND table_schema = DATABASE() + AND column_name = 'DefaultVideo' + ) > 0, +"SELECT 'Column DefaultVideo exists in Events'", +"ALTER TABLE `Events` ADD `DefaultVideo` VARCHAR( 64 ) NOT NULL default '' AFTER `AlarmFrames`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SELECT 'Checking for RecordAudio in Monitors'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'RecordAudio' + ) > 0, +"SELECT 'Column RecordAudio exists in Monitors'", +"ALTER TABLE `Monitors` ADD `RecordAudio` TINYINT NOT NULL DEFAULT '0' AFTER `EncoderParameters`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +-- +-- The following alters various columns to allow NULLs +-- + +ALTER TABLE Monitors MODIFY Host varchar(64); +ALTER TABLE Monitors MODIFY LabelFormat varchar(64); +ALTER TABLE Monitors MODIFY LinkedMonitors varchar(255); +ALTER TABLE Monitors MODIFY Options varchar(255); +ALTER TABLE Monitors MODIFY Protocol varchar(16); +ALTER TABLE Monitors MODIFY User varchar(64); +ALTER TABLE Monitors MODIFY Pass varchar(64); +ALTER TABLE Monitors MODIFY RTSPDescribe tinyint(1) unsigned; +ALTER TABLE Monitors MODIFY ControlId int(10) unsigned; +ALTER TABLE Monitors MODIFY TrackDelay smallint(5) unsigned; +ALTER TABLE Monitors MODIFY ReturnDelay smallint(5) unsigned; +ALTER TABLE Monitors MODIFY EncoderParameters TEXT; +ALTER TABLE Monitors MODIFY Path varchar(255); +ALTER TABLE Monitors MODIFY V4LMultiBuffer tinyint(1) unsigned; + +ALTER TABLE Users MODIFY MonitorIds tinytext; +ALTER TABLE Users MODIFY Language varchar(8); +ALTER TABLE Users MODIFY MaxBandwidth varchar(16); + diff --git a/db/zm_update-1.31.1.sql b/db/zm_update-1.31.1.sql new file mode 100644 index 000000000..399a100bb --- /dev/null +++ b/db/zm_update-1.31.1.sql @@ -0,0 +1,21 @@ +-- +-- This updates a 1.30.0 database to 1.30.1 +-- +-- Add StateId Column to Events. +-- +SELECT 'Checkfor StateId IN Events'; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Events' + AND table_schema = DATABASE() + AND column_name = 'StateId' + ) > 0, +"SELECT 'Column StateId exists in Events'", +"ALTER TABLE Events ADD `StateId` int(10) unsigned default NULL AFTER `Notes`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.31.10.sql b/db/zm_update-1.31.10.sql new file mode 100644 index 000000000..b3abc455a --- /dev/null +++ b/db/zm_update-1.31.10.sql @@ -0,0 +1,122 @@ +-- +-- Add Type column to Storage +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'Status' + ) > 0, +"SELECT 'Column Status already exists in Servers'", +"ALTER TABLE Servers ADD `Status` enum('Unknown','NotRunning','Running') NOT NULL default 'Unknown' AFTER `State_Id`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'CpuLoad' + ) > 0, +"SELECT 'Column CpuLoad already exists in Servers'", +"ALTER TABLE Servers ADD `CpuLoad` DECIMAL(5,1) default NULL AFTER `Status`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'TotalMem' + ) > 0, +"SELECT 'Column TotalMem already exists in Servers'", +"ALTER TABLE Servers ADD `TotalMem` bigint unsigned default null AFTER `CpuLoad`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'FreeMem' + ) > 0, +"SELECT 'Column FreeMem already exists in Servers'", +"ALTER TABLE Servers ADD `FreeMem` bigint unsigned default null AFTER `TotalMem`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'TotalSwap' + ) > 0, +"SELECT 'Column TotalSwap already exists in Servers'", +"ALTER TABLE Servers ADD `TotalSwap` bigint unsigned default null AFTER `FreeMem`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'FreeSwap' + ) > 0, +"SELECT 'Column FreeSwap already exists in Servers'", +"ALTER TABLE Servers ADD `FreeSwap` bigint unsigned default null AFTER `TotalSwap`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'Status' + ) > 0, +"SELECT 'Column Status already exists in Monitors'", +"ALTER TABLE Monitors ADD `Status` enum('Unknown','NotRunning','Running','NoSignal','Signal') NOT NULL default 'Unknown' AFTER `Sequence`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'CaptureFPS' + ) > 0, +"SELECT 'Column CaptureFPS already exists in Monitors'", +"ALTER TABLE Monitors ADD `CaptureFPS` DECIMAL(10,2) NOT NULL default 0 AFTER `Status`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'AnalysisFPSLimit' + ) > 0, +"SELECT 'Column AnalysisFPSLimit already exists in Monitors'", +"ALTER TABLE Monitors CHANGE COLUMN `AnalysisFPS` `AnalysisFPSLimit` DECIMAL(5,2) default NULL" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'AnalysisFPS' + ) > 0, +"SELECT 'Column AnalysisFPS already exists in Monitors'", +"ALTER TABLE Monitors ADD `AnalysisFPS` DECIMAL(5,2) NOT NULL default 0 AFTER `CaptureFPS`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.11.sql b/db/zm_update-1.31.11.sql new file mode 100644 index 000000000..e0772cef4 --- /dev/null +++ b/db/zm_update-1.31.11.sql @@ -0,0 +1,70 @@ +-- +-- Add UpdateDiskSpace action to Filters +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'UpdateDiskSpace' + ) > 0, +"SELECT 'Column UpdateDiskSpace already exists in Filters'", +"ALTER TABLE Filters ADD `UpdateDiskSpace` tinyint(3) unsigned NOT NULL default '0' AFTER `AutoDelete`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; +-- +-- Update Logs table to have some Indexes +-- +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.STATISTICS + WHERE table_name = 'Logs' + AND table_schema = DATABASE() + AND index_name = 'Logs_TimeKey_idx' + ) > 0, +"SELECT 'Logs_TimeKey_idx already exists on Logs table'", +"CREATE INDEX `Logs_TimeKey_idx` ON `Logs` (`TimeKey`)" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.STATISTICS + WHERE table_name = 'Logs' + AND table_schema = DATABASE() + AND index_name = 'Logs_Level_idx' + ) > 0, +"SELECT 'Logs_Level_idx already exists on Logs table'", +"CREATE INDEX `Logs_Level_idx` ON `Logs` (`Level`)" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'OutputCodec' + ) > 0, +"SELECT 'Column OutputCodec already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `OutputCodec` enum('h264','mjpeg') AFTER `VideoWriter`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'OutputContainer' + ) > 0, +"SELECT 'Column OutputContainer already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `OutputContainer` enum('mp4','mkv') AFTER `OutputCodec`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.31.12.sql b/db/zm_update-1.31.12.sql new file mode 100644 index 000000000..72dee28ce --- /dev/null +++ b/db/zm_update-1.31.12.sql @@ -0,0 +1,67 @@ +-- +-- This adds Manufacturers and Models +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'MontageLayouts' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'MontageLayouts table exists'", + " + CREATE TABLE MontageLayouts ( + `Id` int(10) unsigned NOT NULL auto_increment, + `Name` TEXT NOT NULL, + `Positions` LONGTEXT, + PRIMARY KEY (`Id`) +); +" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +DELETE FROM MontageLayouts WHERE Name IN ('Freeform','2 Wide','3 Wide','4 Wide','5 Wide'); + +SET @s = ( SELECT IF( + (SELECT COUNT(*) FROM MontageLayouts WHERE Name='Freeform') > 0, + "SELECT 'Freeform already in layouts'", +'INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES (\'Freeform\', \'{"default":{"float":"left","position":"relative","left":"0px","right":"0px","top":"0px","bottom":"0px"}}\');' +) ); +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = ( SELECT IF( + (SELECT COUNT(*) FROM MontageLayouts WHERE Name='2 Wide') > 0, +"SELECT '2 Wide already in layouts'", +'INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES (\'2 Wide\', \'{"default":{"float":"left","position":"relative","width":"49%","left":"0px","right":"0px","top":"0px","bottom":"0px"}}\');' +) ); +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = ( SELECT IF( + (SELECT COUNT(*) FROM MontageLayouts WHERE Name='3 Wide') > 0, + "SELECT '3 Wide already in layouts'", +'INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES (\'3 Wide\', \'{"default":{"float":"left","position":"relative","width":"33%","left":"0px","right":"0px","top":"0px","bottom":"0px"}}\');' +) ); +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = ( SELECT IF( + (SELECT COUNT(*) FROM MontageLayouts WHERE Name='4 Wide') > 0, + "SELECT '4 Wide already in layouts'", +'INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES (\'4 Wide\', \'{"default":{"float":"left","position":"relative","width":"24.5%","left":"0px","right":"0px","top":"0px","bottom":"0px"}}\');' +) ); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = ( SELECT IF( + (SELECT COUNT(*) FROM MontageLayouts WHERE Name='5 Wide') > 0, + "SELECT '5 Wide already in layouts'", + 'INSERT INTO MontageLayouts (`Name`,`Positions`) VALUES (\'5 Wide\', \'{"default":{"float":"left","position":"relative","width":"19%"}}\' );' +) ); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.13.sql b/db/zm_update-1.31.13.sql new file mode 100644 index 000000000..dd63b347a --- /dev/null +++ b/db/zm_update-1.31.13.sql @@ -0,0 +1,26 @@ +ALTER TABLE `Monitors` MODIFY `OutputCodec` enum('h264','mjpeg','mpeg1','mpeg2') default 'h264'; +ALTER TABLE `Monitors` MODIFY `OutputContainer` enum('auto','mp4','mkv') default 'auto'; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Events' + AND column_name = 'SaveJPEGs' + ) > 0, +"SELECT 'Column SaveJPEGs already exists in Events'", +"ALTER TABLE `Events` ADD `SaveJPEGs` TINYINT AFTER `DefaultVideo`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Storage' + AND column_name = 'DiskSpace' + ) > 0, +"SELECT 'Column DiskSpace already exists in Events'", +"ALTER TABLE `Storage` ADD `DiskSpace` bigint unsigned default NULL AFTER `Type`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.14.sql b/db/zm_update-1.31.14.sql new file mode 100644 index 000000000..29e0f4a42 --- /dev/null +++ b/db/zm_update-1.31.14.sql @@ -0,0 +1,148 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'TotalEvents' + ) > 0, +"SELECT 'Column TotalEvents already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `TotalEvents` INT(10) AFTER `AnalysisFPS`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'TotalEventDiskSpace' + ) > 0, +"SELECT 'Column TotalEventDiskSpace already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `TotalEventDiskSpace` BIGINT AFTER `TotalEvents`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'HourEvents' + ) > 0, +"SELECT 'Column HourEvents already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `HourEvents` INT(10) AFTER `TotalEvents`" +)); + + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'HourEventDiskSpace' + ) > 0, +"SELECT 'Column HourEventDiskSpace already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `HourEventDiskSpace` BIGINT AFTER `HourEvents`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'DayEvents' + ) > 0, +"SELECT 'Column DayEvents already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `DayEvents` INT(10) AFTER `HourEvents`" +)); + + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'DayEventDiskSpace' + ) > 0, +"SELECT 'Column DayEventDiskSpace already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `DayEventDiskSpace` BIGINT AFTER `DayEvents`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'WeekEvents' + ) > 0, +"SELECT 'Column WeekEvents already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `WeekEvents` INT(10) AFTER `DayEvents`" +)); + + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'WeekEventDiskSpace' + ) > 0, +"SELECT 'Column WeekEventDiskSpace already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `WeekEventDiskSpace` BIGINT AFTER `WeekEvents`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'MonthEvents' + ) > 0, +"SELECT 'Column MonthEvents already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `MonthEvents` INT(10) AFTER `WeekEvents`" +)); + + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'MonthEventDiskSpace' + ) > 0, +"SELECT 'Column MonthEventDiskSpace already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `MonthEventDiskSpace` BIGINT AFTER `MonthEvents`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'ArchivedEvents' + ) > 0, +"SELECT 'Column ArchivedEvents already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `ArchivedEvents` INT(10) AFTER `MonthEvents`" +)); + + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'ArchivedEventDiskSpace' + ) > 0, +"SELECT 'Column ArchivedEventDiskSpace already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `ArchivedEventDiskSpace` BIGINT AFTER `ArchivedEvents`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.15.sql b/db/zm_update-1.31.15.sql new file mode 100644 index 000000000..4c017aa52 --- /dev/null +++ b/db/zm_update-1.31.15.sql @@ -0,0 +1,14 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'ZoneCount' + ) > 0, +"SELECT 'Column ZoneCount already exists in Monitors'", +"ALTER TABLE `Monitors` ADD `ZoneCount` TINYINT NOT NULL DEFAULT 0 AFTER `ArchivedEventDiskSpace`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +UPDATE Monitors SET ZoneCount=(SELECT COUNT(Id) FROM Zones WHERE MonitorId=Monitors.Id); diff --git a/db/zm_update-1.31.16.sql b/db/zm_update-1.31.16.sql new file mode 100644 index 000000000..71255bbf0 --- /dev/null +++ b/db/zm_update-1.31.16.sql @@ -0,0 +1,94 @@ +-- +-- Add UpdateDiskSpace action to Filters +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'AutoMove' + ) > 0, +"SELECT 'Column AutoMove already exists in Filters'", +"ALTER TABLE Filters ADD `AutoMove` tinyint(3) unsigned NOT NULL default '0' AFTER `AutoDelete`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'AutoMoveTo' + ) > 0, +"SELECT 'Column AutoMoveTo already exists in Filters'", +"ALTER TABLE Filters ADD `AutoMoveTo` smallint(5) unsigned NOT NULL default '0' AFTER `AutoMove`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Groups_Monitors' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Groups_Monitors table exists'", + "CREATE TABLE `Groups_Monitors` ( + `Id` INT(10) unsigned NOT NULL auto_increment, + `GroupId` int(10) unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + PRIMARY KEY (`Id`) + )" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.STATISTICS + WHERE table_name = 'Groups_Monitors' + AND table_schema = DATABASE() + AND index_name = 'Groups_Monitors_GroupId_idx' + ) > 0, + "SELECT 'Groups_Monitors_GroupId_idx already exists on Groups table'", + "CREATE INDEX `Groups_Monitors_GroupId_idx` ON `Groups_Monitors` (`GroupId`)" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.STATISTICS + WHERE table_name = 'Groups_Monitors' + AND table_schema = DATABASE() + AND index_name = 'Groups_Monitors_MonitorId_idx' + ) > 0, + "SELECT 'Groups_Monitors_MonitorId_idx already exists on Groups table'", + "CREATE INDEX `Groups_Monitors_MonitorId_idx` ON `Groups_Monitors` (`MonitorId`)" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Groups' + AND column_name = 'MonitorIds' + ) > 0, + "REPLACE INTO Groups_Monitors (GroupId,MonitorId) SELECT Id,SUBSTRING_INDEX(SUBSTRING_INDEX(t.MonitorIds, ',', n.n), ',', -1) value FROM Groups t CROSS JOIN ( SELECT a.N + b.N * 10 + 1 n FROM (SELECT 0 AS N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) a ,(SELECT 0 AS N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) b ORDER BY n ) n WHERE t.MonitorIds != '' AND n.n <= 1 + (LENGTH(t.MonitorIds) - LENGTH(REPLACE(t.MonitorIds, ',', ''))) ORDER BY value;", + "SELECT 'MonitorIds has already been removed.'" +)); +PREPARE stmt FROM @s; +EXECUTE stmt; +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Groups' + AND column_name = 'MonitorIds' + ) > 0, +"ALTER TABLE Groups DROP MonitorIds", +"SELECT 'MonitorIds has already been removed.'" +)); +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.17.sql b/db/zm_update-1.31.17.sql new file mode 100644 index 000000000..878fdc6d9 --- /dev/null +++ b/db/zm_update-1.31.17.sql @@ -0,0 +1,40 @@ +alter table Events modify Id int(10) unsigned; +alter table Events DROP Primary key; +alter table Events Add Primary key(Id); +alter table Events modify Id int(10) unsigned auto_increment; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Storage' + AND column_name = 'DiskSpace' + ) > 0, + "SELECT 'Column DiskSpace already exists in Storage'", + "ALTER TABLE Storage ADD `DiskSpace` BIGINT default null AFTER `Type`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Storage' + AND column_name = 'Scheme' + ) > 0, + "SELECT 'Column Scheme already exists in Storage'", + "ALTER TABLE Storage ADD `Scheme` enum('Deep','Medium','Shallow') NOT NULL default 'Medium' AFTER `DiskSpace`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Events' + AND column_name = 'Scheme' + ) > 0, + "SELECT 'Column Scheme already exists in Events'", + "ALTER TABLE Events ADD `Scheme` enum('Deep','Medium','Shallow') NOT NULL default 'Deep' AFTER `DiskSpace`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.18.sql b/db/zm_update-1.31.18.sql new file mode 100644 index 000000000..5ba3b6caa --- /dev/null +++ b/db/zm_update-1.31.18.sql @@ -0,0 +1,23 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Storage' + AND column_name = 'ServerId' + ) > 0, + "SELECT 'Column ServerId already exists in Storage'", + "ALTER TABLE Storage ADD `ServerId` int(10) unsigned AFTER `Scheme`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM Filters WHERE Name = 'Update DiskSpace' + AND Query = '{"terms":[{"attr":"DiskSpace","op":"IS","val":"NULL"}]}' + ) > 0, + "SELECT 'Update Disk Space Filter already exists.'", + "INSERT INTO Filters (Name,Query,UpdateDiskSpace,Background) values ('Update DiskSpace','{\"terms\":[{\"attr\":\"DiskSpace\",\"op\":\"IS\",\"val\":\"NULL\"}]}',1,1)" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.19.sql b/db/zm_update-1.31.19.sql new file mode 100644 index 000000000..f23addd69 --- /dev/null +++ b/db/zm_update-1.31.19.sql @@ -0,0 +1,123 @@ +drop procedure if exists update_storage_stats; + +delimiter // + +create procedure update_storage_stats(IN StorageId smallint(5), IN space BIGINT) + +sql security invoker + +deterministic + +begin + + update Storage set DiskSpace = DiskSpace + space where Id = StorageId; + +end; + +// + +delimiter ; + +drop trigger if exists event_update_trigger; + +delimiter // + +create trigger event_update_trigger + +after update + +on Events + +for each row + +begin + declare diff BIGINT default 0; + + set diff = NEW.DiskSpace - OLD.DiskSpace; + IF ( NEW.StorageId = OLD.StorageID ) THEN + + IF ( diff ) THEN + call update_storage_stats(OLD.StorageId, diff); + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + call update_storage_stats(NEW.StorageId, NEW.DiskSpace); + END IF; + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + END IF; + +end; + +// + +delimiter ; + +drop trigger if exists event_insert_trigger; + +delimiter // +/* +create trigger event_insert_trigger + +after insert + +on Events + +for each row + +begin + + call update_storage_stats(NEW.StorageId, NEW.DiskSpace); + +end; +*/ +// + +delimiter ; + + +drop trigger if exists event_delete_trigger; + +delimiter // + +create trigger event_delete_trigger + +before delete + +on Events + +for each row + +begin + + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + +end; + +// + +delimiter ; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events' and index_name = 'Archived' and table_schema = database()); +set @sqlstmt := if( @exist > 0, 'DROP INDEX Archived ON Events', "SELECT 'Archived INDEX is already removed.'"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events' and index_name = 'Frames' and table_schema = database()); +set @sqlstmt := if( @exist > 0, 'DROP INDEX Frames ON Events', "SELECT 'Frames INDEX is already removed.'"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events' and index_name = 'Events_StorageId_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Index Events_StorageId_idx already exists.'", 'CREATE INDEX Events_StorageId_idx on Events (StorageId)'); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events' and index_name = 'Events_EndTime_DiskSpace_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Index Events_EndTime_DiskSpace_idx already exists.'", 'CREATE INDEX Events_EndTime_DiskSpace_idx on Events (EndTime, DiskSpace)'); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +UPDATE Storage SET DiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE StorageId=Storage.Id); + diff --git a/db/zm_update-1.31.2.sql b/db/zm_update-1.31.2.sql new file mode 100644 index 000000000..3e40885a4 --- /dev/null +++ b/db/zm_update-1.31.2.sql @@ -0,0 +1,18 @@ +-- +-- Update Filters table to have a Concurrent Column +-- + +SELECT 'Checking for Concurrent in Filters'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Filters' + AND table_schema = DATABASE() + AND column_name = 'Concurrent' + ) > 0, +"SELECT 'Column Concurrent already exists in Filters'", +"ALTER TABLE Filters ADD COLUMN `Concurrent` tinyint(1) unsigned NOT NULL default '0' AFTER Background" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.20.sql b/db/zm_update-1.31.20.sql new file mode 100644 index 000000000..358f15093 --- /dev/null +++ b/db/zm_update-1.31.20.sql @@ -0,0 +1,275 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Events_Hour' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Events_Hour table exists'", + " +CREATE TABLE `Events_Hour` ( + `EventId` int(10) unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `StartTime` datetime default NULL, + `DiskSpace` bigint unsigned default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Hour_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) +); +" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Events_Day' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Events_Day table exists'", + " +CREATE TABLE `Events_Day` ( + `EventId` int(10) unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `StartTime` datetime default NULL, + `DiskSpace` bigint unsigned default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Day_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) +); +")); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Events_Week' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Events_Week table exists'", + " +CREATE TABLE `Events_Week` ( + `EventId` int(10) unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `StartTime` datetime default NULL, + `DiskSpace` bigint unsigned default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Week_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) +); +")); + +PREPARE stmt FROM @s; +EXECUTE stmt; + + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Events_Month' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Events_Month table exists'", + " +CREATE TABLE `Events_Month` ( + `EventId` int(10) unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `StartTime` datetime default NULL, + `DiskSpace` bigint unsigned default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Month_MonitorId_StartTime_idx` (`MonitorId`,`StartTime`) +); +")); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Events_Archived' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Events_Archived table exists'", + " +CREATE TABLE `Events_Archived` ( + `EventId` int(10) unsigned NOT NULL, + `MonitorId` int(10) unsigned NOT NULL, + `DiskSpace` bigint unsigned default NULL, + PRIMARY KEY (`EventId`), + KEY `Events_Month_MonitorId_idx` (`MonitorId`) +); +")); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +drop trigger if exists event_update_trigger; + +delimiter // + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = NEW.DiskSpace - OLD.DiskSpace; + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + call update_storage_stats(OLD.StorageId, diff); + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + call update_storage_stats(NEW.StorageId, NEW.DiskSpace); + END IF; + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = ArchivedEvents+1, ArchivedEventDiskSpace = ArchivedEventDiskSpace + NEW.DiskSpace WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET ArchivedEvents =ArchivedEvents-1, ArchivedEventDiskSpace = ArchivedEventDiskSpace - OLD.DiskSpace WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = ArchivedEventDiskSpace - OLD.DiskSpace + NEW.DiskSpace + WHERE Id=OLD.MonitorId; + END IF; + END IF; + END IF; + + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Monitors SET TotalEventDiskSpace = TotalEventDiskSpace - OLD.DiskSpace + NEW.DiskSpace WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +delimiter ; + +DROP TRIGGER IF EXISTS event_insert_trigger; + +delimiter // +create trigger event_insert_trigger after insert on Events +for each row + begin + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); +end; +// + +delimiter ; + + +drop trigger if exists event_delete_trigger; + +delimiter // + +CREATE TRIGGER event_delete_trigger BEFORE DELETe on Events + +FOR EACH ROW +BEGIN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = ArchivedEvents - 1, + ArchivedEventDiskSpace = ArchivedEventDiskSpace - OLD.DiskSpace, + TotalEvents = TotalEvents - 1, + TotalEventDiskSpace = TotalEventDiskSpace - OLD.DiskSpace + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = TotalEvents-1, + TotalEventDiskSpace=TotalEventDiskSpace-OLD.DiskSpace + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + +delimiter ; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmstats.pl' + ) > 0, + "SELECT 'Column zmstats.pl already exists in Servers'", + "ALTER TABLE Servers ADD `zmstats.pl` BOOLEAN NOT NULL DEFAULT FALSE AFTER `FreeSwap`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmaudit.pl' + ) > 0, + "SELECT 'Column zmaudit.pl already exists in Servers'", + "ALTER TABLE Servers ADD `zmaudit.pl` BOOLEAN NOT NULL DEFAULT FALSE AFTER `zmstats.pl`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmtrigger.pl' + ) > 0, + "SELECT 'Column zmtrigger.pl already exists in Servers'", + "ALTER TABLE Servers ADD `zmtrigger.pl` BOOLEAN NOT NULL DEFAULT FALSE AFTER `zmaudit.pl`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +UPDATE Monitors INNER JOIN ( + SELECT MonitorId, + COUNT(Id) AS TotalEvents, + SUM(DiskSpace) AS TotalEventDiskSpace, + SUM(IF(Archived,1,0)) AS ArchivedEvents, + SUM(IF(Archived,DiskSpace,0)) AS ArchivedEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),1,0)) AS HourEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),DiskSpace,0)) AS HourEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),1,0)) AS DayEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),DiskSpace,0)) AS DayEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),1,0)) AS WeekEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),DiskSpace,0)) AS WeekEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),1,0)) AS MonthEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),DiskSpace,0)) AS MonthEventDiskSpace + FROM Events GROUP BY MonitorId + ) AS E ON E.MonitorId=Monitors.Id SET + Monitors.TotalEvents = E.TotalEvents, + Monitors.TotalEventDiskSpace = E.TotalEventDiskSpace, + Monitors.ArchivedEvents = E.ArchivedEvents, + Monitors.ArchivedEventDiskSpace = E.ArchivedEventDiskSpace, + Monitors.HourEvents = E.HourEvents, + Monitors.HourEventDiskSpace = E.HourEventDiskSpace, + Monitors.DayEvents = E.DayEvents, + Monitors.DayEventDiskSpace = E.DayEventDiskSpace, + Monitors.WeekEvents = E.WeekEvents, + Monitors.WeekEventDiskSpace = E.WeekEventDiskSpace, + Monitors.MonthEvents = E.MonthEvents, + Monitors.MonthEventDiskSpace = E.MonthEventDiskSpace; diff --git a/db/zm_update-1.31.21.sql b/db/zm_update-1.31.21.sql new file mode 100644 index 000000000..a50fafac5 --- /dev/null +++ b/db/zm_update-1.31.21.sql @@ -0,0 +1,150 @@ +delimiter // +DROP TRIGGER IF EXISTS Zone_Insert_Trigger// +CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Id=NEW.MonitorID; + END +// + +DROP TRIGGER IF EXISTS Zone_Delete_Trigger// +CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Id=OLD.MonitorID; + END +// + +UPDATE Monitors SET ZoneCount=(SELECT COUNT(Id) FROM Zones WHERE MonitorId=Monitors.Id)// + +drop trigger if exists event_update_trigger// + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = NEW.DiskSpace - OLD.DiskSpace; + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + call update_storage_stats(OLD.StorageId, diff); + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + call update_storage_stats(NEW.StorageId, NEW.DiskSpace); + END IF; + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = ArchivedEvents+1, ArchivedEventDiskSpace = ArchivedEventDiskSpace + NEW.DiskSpace WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET ArchivedEvents =ArchivedEvents-1, ArchivedEventDiskSpace = ArchivedEventDiskSpace - OLD.DiskSpace WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = ArchivedEventDiskSpace - OLD.DiskSpace + NEW.DiskSpace + WHERE Id=OLD.MonitorId; + END IF; + END IF; + END IF; + + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Monitors SET TotalEventDiskSpace = TotalEventDiskSpace - OLD.DiskSpace + NEW.DiskSpace WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +delimiter ; + +DROP TRIGGER IF EXISTS event_insert_trigger; + +delimiter // +create trigger event_insert_trigger after insert on Events +for each row + begin + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); +end; +// + +delimiter ; + + +drop trigger if exists event_delete_trigger; + +delimiter // + +CREATE TRIGGER event_delete_trigger BEFORE DELETe on Events + +FOR EACH ROW +BEGIN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = ArchivedEvents - 1, + ArchivedEventDiskSpace = ArchivedEventDiskSpace - OLD.DiskSpace, + TotalEvents = TotalEvents - 1, + TotalEventDiskSpace = TotalEventDiskSpace - OLD.DiskSpace + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = TotalEvents-1, + TotalEventDiskSpace=TotalEventDiskSpace-OLD.DiskSpace + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + +delimiter ; + +UPDATE Monitors INNER JOIN ( + SELECT MonitorId, + COUNT(Id) AS TotalEvents, + SUM(DiskSpace) AS TotalEventDiskSpace, + SUM(IF(Archived,1,0)) AS ArchivedEvents, + SUM(IF(Archived,DiskSpace,0)) AS ArchivedEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),1,0)) AS HourEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),DiskSpace,0)) AS HourEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),1,0)) AS DayEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),DiskSpace,0)) AS DayEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),1,0)) AS WeekEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),DiskSpace,0)) AS WeekEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),1,0)) AS MonthEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),DiskSpace,0)) AS MonthEventDiskSpace + FROM Events GROUP BY MonitorId + ) AS E ON E.MonitorId=Monitors.Id SET + Monitors.TotalEvents = E.TotalEvents, + Monitors.TotalEventDiskSpace = E.TotalEventDiskSpace, + Monitors.ArchivedEvents = E.ArchivedEvents, + Monitors.ArchivedEventDiskSpace = E.ArchivedEventDiskSpace, + Monitors.HourEvents = E.HourEvents, + Monitors.HourEventDiskSpace = E.HourEventDiskSpace, + Monitors.DayEvents = E.DayEvents, + Monitors.DayEventDiskSpace = E.DayEventDiskSpace, + Monitors.WeekEvents = E.WeekEvents, + Monitors.WeekEventDiskSpace = E.WeekEventDiskSpace, + Monitors.MonthEvents = E.MonthEvents, + Monitors.MonthEventDiskSpace = E.MonthEventDiskSpace; + diff --git a/db/zm_update-1.31.22.sql b/db/zm_update-1.31.22.sql new file mode 100644 index 000000000..04533b7f4 --- /dev/null +++ b/db/zm_update-1.31.22.sql @@ -0,0 +1,19 @@ +delimiter // +DROP TRIGGER IF EXISTS Zone_Insert_Trigger// +CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Id=NEW.MonitorID; + END +// + +DROP TRIGGER IF EXISTS Zone_Delete_Trigger// +CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Id=OLD.MonitorID; + END +// + +UPDATE Monitors SET ZoneCount=(SELECT COUNT(Id) FROM Zones WHERE MonitorId=Monitors.Id)// +UPDATE Storage SET DiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE StorageId=Storage.Id); diff --git a/db/zm_update-1.31.23.sql b/db/zm_update-1.31.23.sql new file mode 100644 index 000000000..9482561df --- /dev/null +++ b/db/zm_update-1.31.23.sql @@ -0,0 +1,88 @@ +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmstats.pl' + ) > 0 AND ( SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmstats' + ) = 0 + , + "ALTER TABLE Servers CHANGE COLUMN `zmstats.pl` `zmstats` BOOLEAN NOT NULL DEFAULT FALSE", + "SELECT 'zmstats.pl has already been changed to zmstats'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmstats.pl' + ) > 0, + "ALTER TABLE Servers DROP COLUMN `zmstats.pl`", + "SELECT 'zmstats.pl has already been removed'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmaudit.pl' + ) > 0 + AND + ( SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmaudit' + ) = 0 + , + "ALTER TABLE Servers CHANGE COLUMN `zmaudit.pl` `zmaudit` BOOLEAN NOT NULL DEFAULT FALSE", + "SELECT 'zmaudit.pl has already been changed to zmaudit'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmaudit.pl' + ) > 0, + "ALTER TABLE Servers DROP COLUMN `zmaudit.pl`", + "SELECT 'zmaudit.pl has already been removed'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmtrigger.pl' + ) > 0 + AND + ( SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmtrigger' + ) = 0 + , + "ALTER TABLE Servers CHANGE COLUMN `zmtrigger.pl` `zmtrigger` BOOLEAN NOT NULL DEFAULT FALSE", + "SELECT 'zmtrigger.pl has already been changed to zmtrigger'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmtrigger.pl' + ) > 0, + "ALTER TABLE Servers DROP COLUMN `zmtrigger.pl`", + "SELECT 'zmtrigger.pl has already been removed'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.24.sql b/db/zm_update-1.31.24.sql new file mode 100644 index 000000000..008618baa --- /dev/null +++ b/db/zm_update-1.31.24.sql @@ -0,0 +1,61 @@ + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Hour' and index_name = 'Events_Hour_MonitorId_StartTime_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, 'DROP INDEX Events_Hour_MonitorId_StartTime_idx ON Events_Hour', "SELECT 'Events_Hour_MonitorId_StartTime_idx INDEX is already removed.'"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Hour' and index_name = 'Events_Hour_MonitorId_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Events_Hour_MonitorId_idx INDEX already exists.'", "CREATE INDEX `Events_Hour_MonitorId_idx` ON `Events_Hour` (`MonitorId`)"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Hour' and index_name = 'Events_Hour_StartTime_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Events_Hour_StartTime_idx INDEX already exists.'", "CREATE INDEX `Events_Hour_StartTime_idx` ON `Events_Hour` (`StartTime`)"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Day' and index_name = 'Events_Day_MonitorId_StartTime_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, 'DROP INDEX Events_Day_MonitorId_StartTime_idx ON Events_Day', "SELECT 'Events_Day_MonitorId_StartTime_idx INDEX is already removed.'"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Day' and index_name = 'Events_Day_MonitorId_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Events_Day_MonitorId_idx INDEX already exists.'", "CREATE INDEX `Events_Day_MonitorId_idx` ON `Events_Day` (`MonitorId`)"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Day' and index_name = 'Events_Day_StartTime_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Events_Day_StartTime_idx INDEX already exists.'", "CREATE INDEX `Events_Day_StartTime_idx` ON `Events_Day` (`StartTime`)"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Week' and index_name = 'Events_Week_MonitorId_StartTime_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, 'DROP INDEX Events_Week_MonitorId_StartTime_idx ON Events_Week', "SELECT 'Events_Week_MonitorId_StartTime_idx INDEX is already removed.'"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Week' and index_name = 'Events_Week_MonitorId_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Events_Week_MonitorId_idx INDEX already exists.'", "CREATE INDEX `Events_Week_MonitorId_idx` ON `Events_Week` (`MonitorId`)"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Week' and index_name = 'Events_Week_StartTime_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Events_Week_StartTime_idx INDEX already exists.'", "CREATE INDEX `Events_Week_StartTime_idx` ON `Events_Week` (`StartTime`)"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Month' and index_name = 'Events_Month_MonitorId_StartTime_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, 'DROP INDEX Events_Month_MonitorId_StartTime_idx ON Events_Month', "SELECT 'Events_Month_MonitorId_StartTime_idx INDEX is already removed.'"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Month' and index_name = 'Events_Month_MonitorId_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Events_Month_MonitorId_idx INDEX already exists.'", "CREATE INDEX `Events_Month_MonitorId_idx` ON `Events_Month` (`MonitorId`)"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; + +set @exist := (select count(*) from information_schema.statistics where table_name = 'Events_Month' and index_name = 'Events_Month_StartTime_idx' and table_schema = database()); +set @sqlstmt := if( @exist > 0, "SELECT 'Events_Month_StartTime_idx INDEX already exists.'", "CREATE INDEX `Events_Month_StartTime_idx` ON `Events_Month` (`StartTime`)"); +PREPARE stmt FROM @sqlstmt; +EXECUTE stmt; diff --git a/db/zm_update-1.31.25.sql b/db/zm_update-1.31.25.sql new file mode 100644 index 000000000..c9ee78e82 --- /dev/null +++ b/db/zm_update-1.31.25.sql @@ -0,0 +1,45 @@ +delimiter // + +DROP TRIGGER IF EXISTS event_insert_trigger// + +create trigger event_insert_trigger after insert on Events +for each row + begin + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET TotalEvents = TotalEvents+1 WHERE Id=NEW.MonitorId; +end; +// + +UPDATE Monitors INNER JOIN ( + SELECT MonitorId, + COUNT(Id) AS TotalEvents, + SUM(DiskSpace) AS TotalEventDiskSpace, + SUM(IF(Archived,1,0)) AS ArchivedEvents, + SUM(IF(Archived,DiskSpace,0)) AS ArchivedEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),1,0)) AS HourEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),DiskSpace,0)) AS HourEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),1,0)) AS DayEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),DiskSpace,0)) AS DayEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),1,0)) AS WeekEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),DiskSpace,0)) AS WeekEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),1,0)) AS MonthEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),DiskSpace,0)) AS MonthEventDiskSpace + FROM Events GROUP BY MonitorId + ) AS E ON E.MonitorId=Monitors.Id SET + Monitors.TotalEvents = E.TotalEvents, + Monitors.TotalEventDiskSpace = E.TotalEventDiskSpace, + Monitors.ArchivedEvents = E.ArchivedEvents, + Monitors.ArchivedEventDiskSpace = E.ArchivedEventDiskSpace, + Monitors.HourEvents = E.HourEvents, + Monitors.HourEventDiskSpace = E.HourEventDiskSpace, + Monitors.DayEvents = E.DayEvents, + Monitors.DayEventDiskSpace = E.DayEventDiskSpace, + Monitors.WeekEvents = E.WeekEvents, + Monitors.WeekEventDiskSpace = E.WeekEventDiskSpace, + Monitors.MonthEvents = E.MonthEvents, + Monitors.MonthEventDiskSpace = E.MonthEventDiskSpace// + diff --git a/db/zm_update-1.31.26.sql b/db/zm_update-1.31.26.sql new file mode 100644 index 000000000..158ee30a7 --- /dev/null +++ b/db/zm_update-1.31.26.sql @@ -0,0 +1,95 @@ +delimiter // +DROP TRIGGER IF EXISTS event_update_trigger; + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = NEW.DiskSpace - OLD.DiskSpace; + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + call update_storage_stats(OLD.StorageId, diff); + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + call update_storage_stats(NEW.StorageId, NEW.DiskSpace); + END IF; + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)-1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; + END IF; + END IF; + + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Monitors SET TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +DROP TRIGGER IF EXISTS event_insert_trigger; + +create trigger event_insert_trigger after insert on Events +for each row + begin + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET TotalEvents = COALESCE(TotalEvents,0)+1 WHERE Id=NEW.MonitorId; +end; +// + +UPDATE Monitors INNER JOIN ( + SELECT MonitorId, + COUNT(Id) AS TotalEvents, + SUM(DiskSpace) AS TotalEventDiskSpace, + SUM(IF(Archived,1,0)) AS ArchivedEvents, + SUM(IF(Archived,DiskSpace,0)) AS ArchivedEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),1,0)) AS HourEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),DiskSpace,0)) AS HourEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),1,0)) AS DayEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),DiskSpace,0)) AS DayEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),1,0)) AS WeekEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),DiskSpace,0)) AS WeekEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),1,0)) AS MonthEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),DiskSpace,0)) AS MonthEventDiskSpace + FROM Events GROUP BY MonitorId + ) AS E ON E.MonitorId=Monitors.Id SET + Monitors.TotalEvents = E.TotalEvents, + Monitors.TotalEventDiskSpace = E.TotalEventDiskSpace, + Monitors.ArchivedEvents = E.ArchivedEvents, + Monitors.ArchivedEventDiskSpace = E.ArchivedEventDiskSpace, + Monitors.HourEvents = E.HourEvents, + Monitors.HourEventDiskSpace = E.HourEventDiskSpace, + Monitors.DayEvents = E.DayEvents, + Monitors.DayEventDiskSpace = E.DayEventDiskSpace, + Monitors.WeekEvents = E.WeekEvents, + Monitors.WeekEventDiskSpace = E.WeekEventDiskSpace, + Monitors.MonthEvents = E.MonthEvents, + Monitors.MonthEventDiskSpace = E.MonthEventDiskSpace// + + diff --git a/db/zm_update-1.31.27.sql b/db/zm_update-1.31.27.sql new file mode 100644 index 000000000..6500c1efd --- /dev/null +++ b/db/zm_update-1.31.27.sql @@ -0,0 +1,100 @@ +delimiter // +DROP TRIGGER IF EXISTS event_update_trigger; + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = NEW.DiskSpace - OLD.DiskSpace; + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + call update_storage_stats(OLD.StorageId, diff); + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + call update_storage_stats(NEW.StorageId, NEW.DiskSpace); + END IF; + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)-1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; + END IF; + END IF; + + IF ( + ( (OLD.DiskSpace IS NOT NULL) AND (NEW.DiskSpace IS NULL) ) + OR + ( (OLD.DiskSpace IS NULL) AND (NEW.DiskSpace IS NOT NULL) ) + OR ( OLD.DiskSpace != NEW.DiskSpace ) + ) THEN + UPDATE Monitors SET TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +DROP TRIGGER IF EXISTS event_insert_trigger; + +create trigger event_insert_trigger after insert on Events +for each row + begin + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET TotalEvents = COALESCE(TotalEvents,0)+1 WHERE Id=NEW.MonitorId; +end; +// + +UPDATE Monitors INNER JOIN ( + SELECT MonitorId, + COUNT(Id) AS TotalEvents, + SUM(DiskSpace) AS TotalEventDiskSpace, + SUM(IF(Archived,1,0)) AS ArchivedEvents, + SUM(IF(Archived,DiskSpace,0)) AS ArchivedEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),1,0)) AS HourEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),DiskSpace,0)) AS HourEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),1,0)) AS DayEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),DiskSpace,0)) AS DayEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),1,0)) AS WeekEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),DiskSpace,0)) AS WeekEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),1,0)) AS MonthEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),DiskSpace,0)) AS MonthEventDiskSpace + FROM Events GROUP BY MonitorId + ) AS E ON E.MonitorId=Monitors.Id SET + Monitors.TotalEvents = E.TotalEvents, + Monitors.TotalEventDiskSpace = E.TotalEventDiskSpace, + Monitors.ArchivedEvents = E.ArchivedEvents, + Monitors.ArchivedEventDiskSpace = E.ArchivedEventDiskSpace, + Monitors.HourEvents = E.HourEvents, + Monitors.HourEventDiskSpace = E.HourEventDiskSpace, + Monitors.DayEvents = E.DayEvents, + Monitors.DayEventDiskSpace = E.DayEventDiskSpace, + Monitors.WeekEvents = E.WeekEvents, + Monitors.WeekEventDiskSpace = E.WeekEventDiskSpace, + Monitors.MonthEvents = E.MonthEvents, + Monitors.MonthEventDiskSpace = E.MonthEventDiskSpace// + + diff --git a/db/zm_update-1.31.28.sql b/db/zm_update-1.31.28.sql new file mode 100644 index 000000000..096b020c9 --- /dev/null +++ b/db/zm_update-1.31.28.sql @@ -0,0 +1,57 @@ +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitor_Status' + ) > 0 + , + "SELECT 'Monitor_Status Already exists'", + " +CREATE TABLE `Monitor_Status` ( + `Id` int(10) unsigned NOT NULL, + `Status` enum('Unknown','NotRunning','Running','NoSignal','Signal') NOT NULL default 'Unknown', + `CaptureFPS` DECIMAL(10,2) NOT NULL default 0, + `AnalysisFPS` DECIMAL(5,2) NOT NULL default 0, + PRIMARY KEY (`Id`) +) ENGINE=MEMORY" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'Status' + ) > 0 + , + "ALTER TABLE Monitors DROP COLUMN Status", + "SELECT 'Monitor Status already removed.'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'CaptureFPS' + ) > 0 + , + "ALTER TABLE Monitors DROP COLUMN CaptureFPS", + "SELECT 'Monitor CaptureFPS already removed.'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'AnalysisFPS' + ) > 0 + , + "ALTER TABLE Monitors DROP COLUMN AnalysisFPS", + "SELECT 'Monitor AnalysisFPS already removed.'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.29.sql b/db/zm_update-1.31.29.sql new file mode 100644 index 000000000..7cb7769f4 --- /dev/null +++ b/db/zm_update-1.31.29.sql @@ -0,0 +1,8 @@ +DROP TABLE IF EXISTS `Monitor_Status`; +CREATE TABLE `Monitor_Status` ( + `MonitorId` int(10) unsigned NOT NULL, + `Status` enum('Unknown','NotRunning','Running','NoSignal','Signal') NOT NULL default 'Unknown', + `CaptureFPS` DECIMAL(10,2) NOT NULL default 0, + `AnalysisFPS` DECIMAL(5,2) NOT NULL default 0, + PRIMARY KEY (`MonitorId`) +) ENGINE=MEMORY; diff --git a/db/zm_update-1.31.3.sql b/db/zm_update-1.31.3.sql new file mode 100644 index 000000000..733efcedd --- /dev/null +++ b/db/zm_update-1.31.3.sql @@ -0,0 +1,146 @@ +-- +-- This adds StorageAreas +-- + +SELECT 'Checking For Storage Table'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Storage' + AND table_schema = DATABASE() + ) > 0, +"SELECT 'Storage table exists'", +"CREATE TABLE `Storage` ( + `Id` smallint(5) unsigned NOT NULL auto_increment, + `Path` varchar(64) NOT NULL default '', + `Name` varchar(64) NOT NULL default '', + PRIMARY KEY (`Id`) +)" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +-- +-- Add StorageId column to Monitors +-- + +SELECT 'Checking For StorageId in Monitors'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'StorageId' + ) > 0, +"SELECT 'Column StorageId exists in Monitors'", +"ALTER TABLE Monitors ADD `StorageId` smallint(5) unsigned NOT NULL default 0 AFTER `ServerId`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +-- +-- Add StorageId column to Eventss +-- + +SELECT 'Checking For StorageId in Events'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Events' + AND table_schema = DATABASE() + AND column_name = 'StorageId' + ) > 0, +"SELECT 'Column StorageId exists in Events'", +"ALTER TABLE Events ADD `StorageId` smallint(5) unsigned NOT NULL default 0 AFTER `MonitorId`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SELECT 'Updating Monitors SETTING StorageId to default'; +UPDATE Monitors SET StorageId = 0 WHERE StorageId IS NULL; +ALTER TABLE Monitors MODIFY `StorageId` smallint(5) unsigned NOT NULL default 0; +UPDATE Events SET StorageId = 0 WHERE StorageId IS NULL; +ALTER TABLE Events MODIFY `StorageId` smallint(5) unsigned NOT NULL default 0; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Events' + AND table_schema = DATABASE() + AND column_name = 'Orientation' + ) > 0, +"SELECT 'Column Orientation exists in Events'", +"ALTER TABLE `Events` ADD `Orientation` enum('0','90','180','270','hori','vert') NOT NULL default '0' AFTER `Notes`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +-- +-- Update Monitors table to have an Index on ServerId +-- +SELECT 'Create Index For ServerId on Monitors'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.STATISTICS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND index_name = 'Monitors_ServerId_idx' + ) > 0, +"SELECT 'Monitors_ServerId Index already exists on Monitors table'", +"CREATE INDEX `Monitors_ServerId_idx` ON `Monitors` (`ServerId`)" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + + +-- +-- Update Server table to have an Index on Name +-- +SELECT 'Create Index FOR Name on Servers'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.STATISTICS + WHERE table_name = 'Servers' + AND table_schema = DATABASE() + AND index_name = 'Servers_Name_idx' + ) > 0, +"SELECT 'Servers_Name Index already exists on Servers table'", +"CREATE INDEX `Servers_Name_idx` ON `Servers` (`Name`)" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + + +SELECT 'ALTER TABLE Logs MODIFY Message TEXT NOT NULL'; +-- ALTER TABLE Logs ALTER Message DROP DEFAULT; +ALTER TABLE Logs MODIFY Message TEXT NOT NULL; + +SELECT 'ALTER TABLE Config MODIFY DefaultValue TEXT'; +ALTER TABLE Config MODIFY DefaultValue TEXT; + + +-- +-- Add an Id column and make it the primary key of the Filters table +-- + +SELECT 'Check for Id column in Filter'; +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Filters' + AND table_schema = DATABASE() + AND column_name = 'Id' + ) > 0, +"SELECT 'Column Id exists in Filters'", +"ALTER TABLE `Filters` DROP PRIMARY KEY, ADD `Id` int(10) unsigned NOT NULL auto_increment PRIMARY KEY FIRST, ADD KEY `Name` (`Name`);" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.31.30.sql.in b/db/zm_update-1.31.30.sql.in new file mode 100644 index 000000000..b6746b55a --- /dev/null +++ b/db/zm_update-1.31.30.sql.in @@ -0,0 +1,20 @@ +DROP TABLE IF EXISTS `Monitor_Status`; +CREATE TABLE `Monitor_Status` ( + `MonitorId` int(10) unsigned NOT NULL, + `Status` enum('Unknown','NotRunning','Running','Connected','Signal') NOT NULL default 'Unknown', + `CaptureFPS` DECIMAL(10,2) NOT NULL default 0, + `AnalysisFPS` DECIMAL(5,2) NOT NULL default 0, + PRIMARY KEY (`MonitorId`) +) ENGINE=MEMORY; + +SET SESSION sql_mode='NO_AUTO_VALUE_ON_ZERO'; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM Storage WHERE Name = 'Default' AND Id=0 AND Path='@ZM_DIR_EVENTS@' + ) > 0, + "SELECT 'Default Storage Area already exists.'", + "INSERT INTO Storage (Id,Name,Path,Scheme,ServerId) VALUES (0,'Default','@ZM_DIR_EVENTS@','Medium',NULL)" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.31.sql b/db/zm_update-1.31.31.sql new file mode 100644 index 000000000..66e25f95c --- /dev/null +++ b/db/zm_update-1.31.31.sql @@ -0,0 +1 @@ +ALTER TABLE Storage MODIFY DiskSpace BIGINT default NULL; diff --git a/db/zm_update-1.31.32.sql b/db/zm_update-1.31.32.sql new file mode 100644 index 000000000..781fce1fc --- /dev/null +++ b/db/zm_update-1.31.32.sql @@ -0,0 +1,3 @@ +ALTER TABLE Monitors MODIFY TotalEventDiskSpace BIGINT default NULL; +ALTER TABLE Monitors MODIFY Method VARCHAR(16) default NULL; + diff --git a/db/zm_update-1.31.33.sql b/db/zm_update-1.31.33.sql new file mode 100644 index 000000000..92ed1275d --- /dev/null +++ b/db/zm_update-1.31.33.sql @@ -0,0 +1,31 @@ +drop trigger if exists event_delete_trigger; + +delimiter // + +CREATE TRIGGER event_delete_trigger BEFORE DELETe on Events + +FOR EACH ROW + BEGIN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = ArchivedEvents - 1, + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0), + TotalEvents = TotalEvents - 1, + TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = TotalEvents-1, + TotalEventDiskSpace=COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + diff --git a/db/zm_update-1.31.34.sql b/db/zm_update-1.31.34.sql new file mode 100644 index 000000000..24c0ee844 --- /dev/null +++ b/db/zm_update-1.31.34.sql @@ -0,0 +1,62 @@ +delimiter // + +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,1)-1, + HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = COALESCE(DayEvents,1)-1, + DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = COALESCE(WeekEvents,1)-1, + WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = COALESCE(MonthEvents,1)-1, + MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS event_insert_trigger// + +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; + END; + // + + diff --git a/db/zm_update-1.31.35.sql b/db/zm_update-1.31.35.sql new file mode 100644 index 000000000..a347d9159 --- /dev/null +++ b/db/zm_update-1.31.35.sql @@ -0,0 +1,140 @@ +delimiter // + +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,1)-1, + HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Hour_update_trigger; +CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+diff WHERE Monitors.Id=MonitorId; + END IF; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = COALESCE(DayEvents,1)-1, + DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_update_trigger; +CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+diff WHERE Monitors.Id=MonitorId; + END IF; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = COALESCE(WeekEvents,1)-1, + WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_update_trigger; +CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+diff WHERE Monitors.Id=MonitorId; + END IF; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = COALESCE(MonthEvents,1)-1, + MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_update_trigger; +CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+diff WHERE Monitors.Id=MonitorId; + END IF; +END; +// + +DROP TRIGGER IF EXISTS event_insert_trigger// + +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; + END; + // + +delimiter ; +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Events' + AND column_name = 'Scheme' + ) > 0, + "SELECT 'Column Scheme already exists in Events'", + "ALTER TABLE Events ADD `Scheme` enum('Deep','Medium','Shallow') NOT NULL default 'Deep' AFTER `DiskSpace`" + )); + + PREPARE stmt FROM @s; + EXECUTE stmt; + + +UPDATE Monitors SET +TotalEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id), +TotalEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND DiskSpace IS NOT NULL), +HourEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB( NOW(), INTERVAL 1 hour) ), +HourEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 hour) AND DiskSpace IS NOT NULL), +DayEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 day)), +DayEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 day) AND DiskSpace IS NOT NULL), +WeekEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 week)), +WeekEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 week) AND DiskSpace IS NOT NULL), +MonthEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB( NOW(), INTERVAL 1 month)), +MonthEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 month) AND DiskSpace IS NOT NULL), +ArchivedEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND Archived=1), +ArchivedEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND Archived=1 AND DiskSpace IS NOT NULL) diff --git a/db/zm_update-1.31.36.sql b/db/zm_update-1.31.36.sql new file mode 100644 index 000000000..ececa7e95 --- /dev/null +++ b/db/zm_update-1.31.36.sql @@ -0,0 +1,148 @@ +delimiter // + +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,1)-1, + HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Hour_update_trigger; +CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET HourEventDiskSpace=COALESCE(DayEventDiskSpace,0)-OLD.DiskSpace WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET HourEventDiskSpace=COALESCE(DayEventDiskSpace,0)+NEW.DiskSpace WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET HourEventDiskSpace=COALESCE(DayEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = COALESCE(DayEvents,1)-1, + DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_update_trigger; +CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-OLD.DiskSpace WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+NEW.DiskSpace WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = COALESCE(WeekEvents,1)-1, + WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_update_trigger; +CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-OLD.DiskSpace WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+NEW.DiskSpace WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = COALESCE(MonthEvents,1)-1, + MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_update_trigger; +CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-OLD.DiskSpace WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+NEW.DiskSpace WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; +END; +// + +DROP TRIGGER IF EXISTS event_insert_trigger// + +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; + END; + // + +delimiter ; + +UPDATE Monitors SET +TotalEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id), +TotalEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND DiskSpace IS NOT NULL), +HourEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB( NOW(), INTERVAL 1 hour) ), +HourEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 hour) AND DiskSpace IS NOT NULL), +DayEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 day)), +DayEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 day) AND DiskSpace IS NOT NULL), +WeekEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 week)), +WeekEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 week) AND DiskSpace IS NOT NULL), +MonthEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB( NOW(), INTERVAL 1 month)), +MonthEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND StartTime > DATE_SUB(NOW(), INTERVAL 1 month) AND DiskSpace IS NOT NULL), +ArchivedEvents=(SELECT COUNT(Id) FROM Events WHERE MonitorId=Monitors.Id AND Archived=1), +ArchivedEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND Archived=1 AND DiskSpace IS NOT NULL); diff --git a/db/zm_update-1.31.37.sql b/db/zm_update-1.31.37.sql new file mode 100644 index 000000000..866fd9330 --- /dev/null +++ b/db/zm_update-1.31.37.sql @@ -0,0 +1,49 @@ +DROP PROCEDURE IF EXISTS update_storage_stats; + +DELIMITER // + +CREATE PROCEDURE update_storage_stats(IN StorageId smallint(5), IN space BIGINT) + +sql security invoker + +deterministic + +begin + + update Storage set DiskSpace = COALESCE(DiskSpace,0) + COALESCE(space,0) where Id = StorageId; + +end; + +// + +DROP TRIGGER IF EXISTS event_delete_trigger// + +CREATE TRIGGER event_delete_trigger BEFORE DELETE ON Events +FOR EACH ROW + BEGIN + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = ArchivedEvents - 1, + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0), + TotalEvents = TotalEvents - 1, + TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = TotalEvents-1, + TotalEventDiskSpace=COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; + END; + +// + +UPDATE Storage SET DiskSpace=(SELECT SUM(COALESCE(DiskSpace,0)) FROM Events WHERE StorageId=Storage.Id)// diff --git a/db/zm_update-1.31.38.sql b/db/zm_update-1.31.38.sql new file mode 100644 index 000000000..0ca0be6ea --- /dev/null +++ b/db/zm_update-1.31.38.sql @@ -0,0 +1,276 @@ + +delimiter // +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,1)-1, + HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Hour_update_trigger// + +CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; +// +DELIMITER ; + +delimiter // +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = COALESCE(DayEvents,1)-1, + DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_update_trigger; +CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + + +delimiter // +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = COALESCE(WeekEvents,1)-1, + WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_update_trigger; +CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +DELIMITER ; + +delimiter // +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = COALESCE(MonthEvents,1)-1, + MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_update_trigger; +CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+COALESCE(NEW.DiskSpace) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +drop procedure if exists update_storage_stats; +create procedure update_storage_stats(IN StorageId smallint(5), IN space BIGINT) + +sql security invoker + +deterministic + +begin + + update Storage set DiskSpace = COALESCE(DiskSpace,0) + COALESCE(space,0) where Id = StorageId; + +end; + +// + +drop trigger if exists event_update_trigger// + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + call update_storage_stats(OLD.StorageId, diff); + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + call update_storage_stats(NEW.StorageId, NEW.DiskSpace); + END IF; + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)-1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; + END IF; + ELSEIF ( NEW.Archived AND diff ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + END IF; + + IF ( diff ) THEN + UPDATE Monitors SET TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +delimiter ; + +DROP TRIGGER IF EXISTS event_insert_trigger; + +delimiter // +/* The assumption is that when an Event is inserted, it has no size yet, so don't bother updating the DiskSpace, just the count. + * The DiskSpace will get update in the Event Update Trigger + */ +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS event_delete_trigger// + +CREATE TRIGGER event_delete_trigger BEFORE DELETE ON Events +FOR EACH ROW +BEGIN + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = COALESCE(ArchivedEvents,1) - 1, + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0), + TotalEvents = COALESCE(TotalEvents,1) - 1, + TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = COALESCE(TotalEvents,1)-1, + TotalEventDiskSpace=COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + +DROP TRIGGER IF EXISTS Zone_Insert_Trigger// +CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Id=NEW.MonitorID; + END +// +DROP TRIGGER IF EXISTS Zone_Delete_Trigger// +CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Id=OLD.MonitorID; + END +// + +DELIMITER ; + +UPDATE Monitors SET +TotalEvents=(SELECT COUNT(*) FROM Events WHERE MonitorId=Monitors.Id), +TotalEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events WHERE MonitorId=Monitors.Id AND DiskSpace IS NOT NULL), +HourEvents=(SELECT COUNT(*) FROM Events_Hour WHERE MonitorId=Monitors.Id), +HourEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events_Hour WHERE MonitorId=Monitors.Id AND DiskSpace IS NOT NULL), +DayEvents=(SELECT COUNT(*) FROM Events_Day WHERE MonitorId=Monitors.Id), +DayEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events_Day WHERE MonitorId=Monitors.Id AND DiskSpace IS NOT NULL), +WeekEvents=(SELECT COUNT(Id) FROM Events_Week WHERE MonitorId=Monitors.Id), +WeekEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events_Week WHERE MonitorId=Monitors.Id AND DiskSpace IS NOT NULL), +MonthEvents=(SELECT COUNT(Id) FROM Events_Month WHERE MonitorId=Monitors.Id), +MonthEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events_Month WHERE MonitorId=Monitors.Id AND DiskSpace IS NOT NULL), +ArchivedEvents=(SELECT COUNT(Id) FROM Events_Archived WHERE MonitorId=Monitors.Id), +ArchivedEventDiskSpace=(SELECT SUM(DiskSpace) FROM Events_Archived WHERE MonitorId=Monitors.Id AND DiskSpace IS NOT NULL); diff --git a/db/zm_update-1.31.39.sql b/db/zm_update-1.31.39.sql new file mode 100644 index 000000000..d40e3a779 --- /dev/null +++ b/db/zm_update-1.31.39.sql @@ -0,0 +1,275 @@ + +ALTER TABLE `Monitors` MODIFY `HourEvents` INT(10) DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `HourEventDiskSpace` BIGINT DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `DayEvents` INT(10) DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `DayEventDiskSpace` BIGINT DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `WeekEvents` INT(10) DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `WeekEventDiskSpace` BIGINT DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `MonthEvents` INT(10) DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `MonthEventDiskSpace` BIGINT DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `ArchivedEvents` INT(10) DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `ArchivedEventDiskSpace` BIGINT DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `TotalEvents` INT(10) DEFAULT NULL; +ALTER TABLE `Monitors` MODIFY `TotalEventDiskSpace` BIGINT DEFAULT NULL; + +delimiter // +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,1)-1, + HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Hour_update_trigger// + +CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; +// +DELIMITER ; + +delimiter // +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = COALESCE(DayEvents,1)-1, + DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_update_trigger; +CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + + +delimiter // +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = COALESCE(WeekEvents,1)-1, + WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_update_trigger; +CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +DELIMITER ; + +delimiter // +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = COALESCE(MonthEvents,1)-1, + MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_update_trigger; +CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+COALESCE(NEW.DiskSpace) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +drop procedure if exists update_storage_stats; +create procedure update_storage_stats(IN StorageId smallint(5), IN space BIGINT) + +sql security invoker + +deterministic + +begin + + update Storage set DiskSpace = COALESCE(DiskSpace,0) + COALESCE(space,0) where Id = StorageId; + +end; + +// + +drop trigger if exists event_update_trigger// + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + call update_storage_stats(OLD.StorageId, diff); + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + call update_storage_stats(NEW.StorageId, NEW.DiskSpace); + END IF; + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)-1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; + END IF; + ELSEIF ( NEW.Archived AND diff ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + END IF; + + IF ( diff ) THEN + UPDATE Monitors SET TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +delimiter ; + +DROP TRIGGER IF EXISTS event_insert_trigger; + +delimiter // +/* The assumption is that when an Event is inserted, it has no size yet, so don't bother updating the DiskSpace, just the count. + * The DiskSpace will get update in the Event Update Trigger + */ +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS event_delete_trigger// + +CREATE TRIGGER event_delete_trigger BEFORE DELETE ON Events +FOR EACH ROW +BEGIN + IF ( OLD.DiskSpace ) THEN + call update_storage_stats(OLD.StorageId, -OLD.DiskSpace); + END IF; + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = COALESCE(ArchivedEvents,1) - 1, + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0), + TotalEvents = COALESCE(TotalEvents,1) - 1, + TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = COALESCE(TotalEvents,1)-1, + TotalEventDiskSpace=COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + +DROP TRIGGER IF EXISTS Zone_Insert_Trigger// +CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Id=NEW.MonitorID; + END +// +DROP TRIGGER IF EXISTS Zone_Delete_Trigger// +CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Id=OLD.MonitorID; + END +// + +DELIMITER ; diff --git a/db/zm_update-1.31.4.sql b/db/zm_update-1.31.4.sql new file mode 100644 index 000000000..cebe2b4a3 --- /dev/null +++ b/db/zm_update-1.31.4.sql @@ -0,0 +1,42 @@ +-- +-- This adds Manufacturers and Models +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Manufacturers' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Manufacturers table exists'", + " + CREATE TABLE `Manufacturers` ( + `Id` int(10) unsigned NOT NULL auto_increment, + `Name` varchar(64) NOT NULL, + PRIMARY KEY (`Id`), + UNIQUE KEY (`Name`) + )" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.TABLES + WHERE table_name = 'Models' + AND table_schema = DATABASE() + ) > 0, + "SELECT 'Models table exists'", + "CREATE TABLE `Models` ( + `Id` int(10) unsigned NOT NULL auto_increment, + `Name` varchar(64) NOT NULL, + `ManufacturerId` int(10), + PRIMARY KEY (`Id`), + UNIQUE KEY (`ManufacturerId`,`Name`) + )" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.31.40.sql b/db/zm_update-1.31.40.sql new file mode 100644 index 000000000..79fc3836c --- /dev/null +++ b/db/zm_update-1.31.40.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Storage' + AND column_name = 'Url' + ) > 0, +"SELECT 'Column Url already exists in Storage'", +"ALTER TABLE `Storage` ADD `Url` VARCHAR(255) default NULL AFTER `Type`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.41.sql b/db/zm_update-1.31.41.sql new file mode 100644 index 000000000..e2b45df5b --- /dev/null +++ b/db/zm_update-1.31.41.sql @@ -0,0 +1,25 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Storage' + AND column_name = 'DoDelete' + ) > 0, +"SELECT 'Column DoDelete already exists in Storage'", +"ALTER TABLE `Storage` ADD `DoDelete` BOOLEAN NOT NULL default true AFTER `ServerId`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Events' + AND column_name = 'Locked' + ) > 0, +"SELECT 'Column Locked already exists in Events'", +"ALTER TABLE `Events` ADD `Locked` BOOLEAN NOT NULL default false AFTER `Scheme`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.31.42.sql b/db/zm_update-1.31.42.sql new file mode 100644 index 000000000..adb004baf --- /dev/null +++ b/db/zm_update-1.31.42.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'SignalCheckPoints' + ) > 0, +"SELECT 'Column SignalCheckPoints already exists in Storage'", +"ALTER TABLE `Monitors` ADD `SignalCheckPoints` INT UNSIGNED NOT NULL default '0' AFTER `DefaultScale`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.43.sql b/db/zm_update-1.31.43.sql new file mode 100644 index 000000000..c97405903 --- /dev/null +++ b/db/zm_update-1.31.43.sql @@ -0,0 +1,24 @@ +-- +-- This updates a 1.31.42 database to 1.31.43 +-- +-- Add WebSite enum to Monitor.Type +-- Add Refresh column to Monitors table +-- + +ALTER TABLE `Monitors` +CHANGE COLUMN `Type` `Type` ENUM('Local', 'Remote', 'File', 'Ffmpeg', 'Libvlc', 'cURL', 'WebSite') NOT NULL DEFAULT 'Local' ; + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'Refresh' + ) > 0, +"SELECT 'Column Refresh exists in Monitors'", +"ALTER TABLE Monitors ADD `Refresh` int(10) unsigned default NULL AFTER `ZoneCount`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.31.44.sql b/db/zm_update-1.31.44.sql new file mode 100644 index 000000000..3c8a1525a --- /dev/null +++ b/db/zm_update-1.31.44.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitor_Status' + AND column_name = 'CaptureBandwidth' + ) > 0, +"SELECT 'Column CaptureBandwidth already exists in Monitor_Status'", +"ALTER TABLE `Monitor_Status` ADD `CaptureBandwidth` INT NOT NULL default 0 AFTER `AnalysisFPS`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.45.sql b/db/zm_update-1.31.45.sql new file mode 100644 index 000000000..c3be6c4cd --- /dev/null +++ b/db/zm_update-1.31.45.sql @@ -0,0 +1,23 @@ +-- +-- This updates a 1.31.44 database to 1.31.45 +-- +-- Add WebSite enum to Monitor.Type +-- Add Refresh column to Monitors table + +-- This is the same as the update to 1.31.43, but due to Refresh not being added to zm_create.sql.in we need to have it +-- again in order to fix people who did a fresh install from 1.31.43 or 1.31.44. +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'Refresh' + ) > 0, +"SELECT 'Column Refresh exists in Monitors'", +"ALTER TABLE Monitors ADD `Refresh` int(10) unsigned default NULL AFTER `ZoneCount`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.46.sql b/db/zm_update-1.31.46.sql new file mode 100644 index 000000000..8c9767e75 --- /dev/null +++ b/db/zm_update-1.31.46.sql @@ -0,0 +1,2 @@ +ALTER TABLE Stats MODIFY COLUMN EventId bigint unsigned NOT NULL; + diff --git a/db/zm_update-1.31.47.sql b/db/zm_update-1.31.47.sql new file mode 100644 index 000000000..714afd133 --- /dev/null +++ b/db/zm_update-1.31.47.sql @@ -0,0 +1 @@ +ALTER TABLE Frames MODIFY COLUMN EventId bigint unsigned NOT NULL; diff --git a/db/zm_update-1.31.5.sql b/db/zm_update-1.31.5.sql new file mode 100644 index 000000000..859487e88 --- /dev/null +++ b/db/zm_update-1.31.5.sql @@ -0,0 +1,17 @@ +-- +-- Add StorageId column to Monitors +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Groups' + AND table_schema = DATABASE() + AND column_name = 'ParentId' + ) > 0, +"SELECT 'Column GroupId exists in Groups'", +"ALTER TABLE Groups ADD `ParentId` int(10) unsigned AFTER `Name`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.6.sql b/db/zm_update-1.31.6.sql new file mode 100644 index 000000000..ea1bb2a58 --- /dev/null +++ b/db/zm_update-1.31.6.sql @@ -0,0 +1 @@ +ALTER TABLE Monitors MODIFY `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','NVSocket') NOT NULL default 'Local'; diff --git a/db/zm_update-1.31.7.sql b/db/zm_update-1.31.7.sql new file mode 100644 index 000000000..1221d9adb --- /dev/null +++ b/db/zm_update-1.31.7.sql @@ -0,0 +1,12 @@ +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Groups' + AND column_name = 'MonitorIds' + ) > 0, + "ALTER TABLE Groups MODIFY `MonitorIds` text NOT NULL", + "SELECT 'Groups no longer has MonitorIds'" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.31.8.sql b/db/zm_update-1.31.8.sql new file mode 100644 index 000000000..70063ebb6 --- /dev/null +++ b/db/zm_update-1.31.8.sql @@ -0,0 +1,17 @@ +-- +-- Add StorageId column to Monitors +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Events' + AND table_schema = DATABASE() + AND column_name = 'DiskSpace' + ) > 0, +"SELECT 'Column DiskSpace exists in Events'", +"ALTER TABLE Events ADD `DiskSpace` bigint unsigned default null AFTER `Orientation`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.31.9.sql b/db/zm_update-1.31.9.sql new file mode 100644 index 000000000..2b937a3c7 --- /dev/null +++ b/db/zm_update-1.31.9.sql @@ -0,0 +1,17 @@ +-- +-- Add Type column to Storage +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Storage' + AND table_schema = DATABASE() + AND column_name = 'Type' + ) > 0, +"SELECT 'Column Type already exists in Storage'", +"ALTER TABLE Storage ADD `Type` enum('local','s3fs') NOT NULL default 'local' AFTER `Name`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.32.0.sql b/db/zm_update-1.32.0.sql new file mode 100644 index 000000000..f0ff1719b --- /dev/null +++ b/db/zm_update-1.32.0.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.31.47 database to 1.32.0 +-- +-- No changes required +-- diff --git a/db/zm_update-1.32.1.sql b/db/zm_update-1.32.1.sql new file mode 100644 index 000000000..ed9a1879b --- /dev/null +++ b/db/zm_update-1.32.1.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.32.0 database to 1.32.1 +-- +-- No changes required +-- diff --git a/db/zm_update-1.32.2.sql b/db/zm_update-1.32.2.sql new file mode 100644 index 000000000..0bb156dad --- /dev/null +++ b/db/zm_update-1.32.2.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.32.1 database to 1.32.2 +-- +-- No changes required +-- diff --git a/db/zm_update-1.32.3.sql b/db/zm_update-1.32.3.sql new file mode 100644 index 000000000..6c3e2c47f --- /dev/null +++ b/db/zm_update-1.32.3.sql @@ -0,0 +1,362 @@ +-- +-- This updates a 1.32.2 database to 1.32.3 +-- + +delimiter // +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,1)-1, + HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Hour_update_trigger// + +CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)-COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; +// +DELIMITER ; + +delimiter // +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = COALESCE(DayEvents,1)-1, + DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_update_trigger; +CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + + +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = COALESCE(WeekEvents,1)-1, + WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_update_trigger; +CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = COALESCE(MonthEvents,1)-1, + MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_update_trigger; +CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+COALESCE(NEW.DiskSpace) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +drop procedure if exists update_storage_stats// + +drop trigger if exists event_update_trigger// + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + UPDATE Storage SET DiskSpace = COALESCE(DiskSpace,0) + diff WHERE Id = OLD.StorageId; + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = COALESCE(DiskSpace,0) + NEW.DiskSpace WHERE Id = NEW.StorageId; + END IF; + IF ( OLD.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = COALESCE(DiskSpace,0) - OLD.DiskSpace WHERE Id = OLD.StorageId; + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)-1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; + END IF; + ELSEIF ( NEW.Archived AND diff ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + END IF; + + IF ( diff ) THEN + UPDATE Monitors SET TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +delimiter ; + +DROP TRIGGER IF EXISTS event_insert_trigger; + +delimiter // +/* The assumption is that when an Event is inserted, it has no size yet, so don't bother updating the DiskSpace, just the count. + * The DiskSpace will get update in the Event Update Trigger + */ +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS event_delete_trigger// + +CREATE TRIGGER event_delete_trigger BEFORE DELETE ON Events +FOR EACH ROW +BEGIN + IF ( OLD.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = COALESCE(DiskSpace,0) - CAST(OLD.DiskSpace AS SIGNED) WHERE Id = OLD.StorageId; + END IF; + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = COALESCE(ArchivedEvents,1) - 1, + ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0), + TotalEvents = COALESCE(TotalEvents,1) - 1, + TotalEventDiskSpace = COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = COALESCE(TotalEvents,1)-1, + TotalEventDiskSpace=COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0) + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + +DROP TRIGGER IF EXISTS Zone_Insert_Trigger// +CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Id=NEW.MonitorID; + END +// +DROP TRIGGER IF EXISTS Zone_Delete_Trigger// +CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Id=OLD.MonitorID; + END +// + +DELIMITER ; + +REPLACE INTO Events_Day SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 day); +REPLACE INTO Events_Week SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 week); +REPLACE INTO Events_Month SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 month); +REPLACE INTO Events_Archived SELECT Id,MonitorId,DiskSpace FROM Events WHERE Archived=1; + +UPDATE Monitors INNER JOIN ( + SELECT MonitorId, + COUNT(Id) AS TotalEvents, + SUM(DiskSpace) AS TotalEventDiskSpace, + SUM(IF(Archived,1,0)) AS ArchivedEvents, + SUM(IF(Archived,DiskSpace,0)) AS ArchivedEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),1,0)) AS HourEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),DiskSpace,0)) AS HourEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),1,0)) AS DayEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),DiskSpace,0)) AS DayEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),1,0)) AS WeekEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),DiskSpace,0)) AS WeekEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),1,0)) AS MonthEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),DiskSpace,0)) AS MonthEventDiskSpace + FROM Events GROUP BY MonitorId + ) AS E ON E.MonitorId=Monitors.Id SET + Monitors.TotalEvents = E.TotalEvents, + Monitors.TotalEventDiskSpace = E.TotalEventDiskSpace, + Monitors.ArchivedEvents = E.ArchivedEvents, + Monitors.ArchivedEventDiskSpace = E.ArchivedEventDiskSpace, + Monitors.HourEvents = E.HourEvents, + Monitors.HourEventDiskSpace = E.HourEventDiskSpace, + Monitors.DayEvents = E.DayEvents, + Monitors.DayEventDiskSpace = E.DayEventDiskSpace, + Monitors.WeekEvents = E.WeekEvents, + Monitors.WeekEventDiskSpace = E.WeekEventDiskSpace, + Monitors.MonthEvents = E.MonthEvents, + Monitors.MonthEventDiskSpace = E.MonthEventDiskSpace; + +-- +-- Add Protocol column to Storage +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'Protocol' + ) > 0, +"SELECT 'Column Protocol already exists in Servers'", +"ALTER TABLE Servers ADD `Protocol` TEXT AFTER `Id`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +-- +-- Add PathToIndex column to Storage +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'PathToIndex' + ) > 0, +"SELECT 'Column PathToIndex already exists in Servers'", +"ALTER TABLE Servers ADD `PathToIndex` TEXT AFTER `Hostname`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +-- +-- Add PathToZMS column to Storage +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'PathToZMS' + ) > 0, +"SELECT 'Column PathToZMS already exists in Servers'", +"ALTER TABLE Servers ADD `PathToZMS` TEXT AFTER `PathToIndex`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +-- +-- Add PathToApi column to Storage +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'PathToApi' + ) > 0, +"SELECT 'Column PathToApi already exists in Servers'", +"ALTER TABLE Servers ADD `PathToApi` TEXT AFTER `PathToZMS`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +-- +-- Add Port column to Storage +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'Port' + ) > 0, +"SELECT 'Column Port already exists in Servers'", +"ALTER TABLE Servers ADD `Port` INTEGER UNSIGNED AFTER `Hostname`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.0.sql b/db/zm_update-1.33.0.sql new file mode 100644 index 000000000..cc7a257c7 --- /dev/null +++ b/db/zm_update-1.33.0.sql @@ -0,0 +1,21 @@ +-- +-- This updates a 1.32.3 database to 1.33.0 +-- +-- +-- Remove DefaultView from Monitors table. +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) + FROM INFORMATION_SCHEMA.COLUMNS + WHERE table_name = 'Monitors' + AND table_schema = DATABASE() + AND column_name = 'DefaultView' + ) > 0, +"ALTER TABLE Monitors DROP COLUMN DefaultView", +"SELECT 'Column DefaultView no longer exists in Monitors'" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + diff --git a/db/zm_update-1.33.1.sql b/db/zm_update-1.33.1.sql new file mode 100644 index 000000000..ddac8adae --- /dev/null +++ b/db/zm_update-1.33.1.sql @@ -0,0 +1,16 @@ +-- +-- This updates a 1.33.0 database to 1.33.1 +-- +-- Add WebSite enum to Monitor.Type +-- Add Refresh column to Monitors table +-- + +ALTER TABLE `Monitors` +CHANGE COLUMN `Type` `Type` ENUM('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket') NOT NULL DEFAULT 'Local' ; + +ALTER TABLE `MonitorPresets` +CHANGE COLUMN `Type` `Type` ENUM('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket') NOT NULL DEFAULT 'Local' ; + +ALTER TABLE `Controls` +CHANGE COLUMN `Type` `Type` ENUM('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket') NOT NULL DEFAULT 'Local' ; + diff --git a/db/zm_update-1.33.10.sql b/db/zm_update-1.33.10.sql new file mode 100644 index 000000000..8eb8fc548 --- /dev/null +++ b/db/zm_update-1.33.10.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'MinSectionLength' + ) > 0, + "SELECT 'Column MinSectionLength already exists in Monitors'", + "ALTER TABLE Monitors ADD `MinSectionLength` int(10) unsigned NOT NULL default '10' AFTER SectionLength" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.11.sql b/db/zm_update-1.33.11.sql new file mode 100644 index 000000000..57b04ce11 --- /dev/null +++ b/db/zm_update-1.33.11.sql @@ -0,0 +1,24 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'DecoderHWAccelName' + ) > 0, + "SELECT 'Column DecoderHWAccelName already exists in Monitors'", + "ALTER TABLE Monitors ADD `DecoderHWAccelName` varchar(64) AFTER `Deinterlacing`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'DecoderHWAccelDevice' + ) > 0, + "SELECT 'Column DecoderHWAccelDevice already exists in Monitors'", + "ALTER TABLE Monitors ADD `DecoderHWAccelDevice` varchar(255) AFTER `DecoderHWAccelName`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.12.sql b/db/zm_update-1.33.12.sql new file mode 100644 index 000000000..8188ad841 --- /dev/null +++ b/db/zm_update-1.33.12.sql @@ -0,0 +1,27 @@ +-- +-- Add primary keys for Logs and Stats tables +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Logs' + AND column_name = 'Id' + ) > 0, +"SELECT 'Column Id already exists in Logs'", +"ALTER TABLE `Logs` ADD COLUMN `Id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`Id`)" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Stats' + AND column_name = 'Id' + ) > 0, +"SELECT 'Column Id already exists in Stats'", +"ALTER TABLE `Stats` ADD COLUMN `Id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT FIRST, ADD PRIMARY KEY (`Id`)" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.13.sql b/db/zm_update-1.33.13.sql new file mode 100644 index 000000000..8114205c0 --- /dev/null +++ b/db/zm_update-1.33.13.sql @@ -0,0 +1,6 @@ +-- +-- Add primary keys for Logs and Stats tables +-- + +SELECT "Modifying Monitors MaxFPS to DECIMAL(5,3)"; +ALTER TABLE `Monitors` MODIFY `MaxFPS` decimal(5,3) default NULL; diff --git a/db/zm_update-1.33.14.sql b/db/zm_update-1.33.14.sql new file mode 100644 index 000000000..83d0cfbba --- /dev/null +++ b/db/zm_update-1.33.14.sql @@ -0,0 +1,51 @@ +-- +-- Add CopyTo action to Filters +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'AutoCopy' + ) > 0, +"SELECT 'Column AutoCopy already exists in Filters'", +"ALTER TABLE Filters ADD `AutoCopy` tinyint(3) unsigned NOT NULL default '0' AFTER `AutoMove`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'AutoCopyTo' + ) > 0, +"SELECT 'Column AutoCopyTo already exists in Filters'", +"ALTER TABLE Filters ADD `AutoCopyTo` smallint(5) unsigned NOT NULL default '0' AFTER `AutoCopy`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'Query_json' + ) > 0, +"SELECT 'Column Query_json already exists in Filters'", +"ALTER TABLE `Filters` Change `Query` `Query_json` text NOT NULL" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Events' + AND column_name = 'SecondaryStorageId' + ) > 0, +"SELECT 'Column SecondaryStorageId already exists in Events'", +"ALTER TABLE `Events` ADD `SecondaryStorageId` smallint(5) unsigned default 0 AFTER `StorageId`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.15.sql b/db/zm_update-1.33.15.sql new file mode 100644 index 000000000..56b26fa2d --- /dev/null +++ b/db/zm_update-1.33.15.sql @@ -0,0 +1,19 @@ +ALTER TABLE Events MODIFY `Orientation` enum('0','90','180','270','hori','vert','ROTATE_0','ROTATE_90','ROTATE_180','ROTATE_270','FLIP_HORI','FLIP_VERT') NOT NULL default 'ROTATE_0'; +UPDATE Events SET Orientation='ROTATE_0' WHERE Orientation='0'; +UPDATE Events SET Orientation='ROTATE_90' WHERE Orientation='90'; +UPDATE Events SET Orientation='ROTATE_180' WHERE Orientation='180'; +UPDATE Events SET Orientation='ROTATE_270' WHERE Orientation='270'; +UPDATE Events SET Orientation='FLIP_HORI' WHERE Orientation='hori'; +UPDATE Events SET Orientation='FLIP_VERT' WHERE Orientation='vert'; + +ALTER TABLE Events MODIFY `Orientation` enum('ROTATE_0','ROTATE_90','ROTATE_180','ROTATE_270','FLIP_HORI','FLIP_VERT') NOT NULL default 'ROTATE_0'; + +ALTER TABLE Monitors MODIFY `Orientation` enum('0','90','180','270','hori','vert','ROTATE_0','ROTATE_90','ROTATE_180','ROTATE_270','FLIP_HORI','FLIP_VERT') NOT NULL default 'ROTATE_0'; +UPDATE Monitors SET Orientation='ROTATE_0' WHERE Orientation='0'; +UPDATE Monitors SET Orientation='ROTATE_90' WHERE Orientation='90'; +UPDATE Monitors SET Orientation='ROTATE_180' WHERE Orientation='180'; +UPDATE Monitors SET Orientation='ROTATE_270' WHERE Orientation='270'; +UPDATE Monitors SET Orientation='FLIP_HORI' WHERE Orientation='hori'; +UPDATE Monitors SET Orientation='FLIP_VERT' WHERE Orientation='vert'; + +ALTER TABLE Monitors MODIFY `Orientation` enum('ROTATE_0','ROTATE_90','ROTATE_180','ROTATE_270','FLIP_HORI','FLIP_VERT') NOT NULL default 'ROTATE_0'; diff --git a/db/zm_update-1.33.16.sql b/db/zm_update-1.33.16.sql new file mode 100644 index 000000000..87058e3f8 --- /dev/null +++ b/db/zm_update-1.33.16.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'Notes' + ) > 0, + "SELECT 'Column Notes already exists in Monitors'", + "ALTER TABLE `Monitors` ADD `Notes` TEXT AFTER `Name`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.2.sql b/db/zm_update-1.33.2.sql new file mode 100644 index 000000000..ea0237b7e --- /dev/null +++ b/db/zm_update-1.33.2.sql @@ -0,0 +1,13 @@ +-- +-- This updates a 1.33.0 database to 1.33.1 +-- +-- Add WebSite enum to Monitor.Type +-- Add Refresh column to Monitors table +-- + +ALTER TABLE `Events_Hour` MODIFY DiskSpace BIGINT default NULL; +ALTER TABLE `Events_Day` MODIFY DiskSpace BIGINT default NULL; +ALTER TABLE `Events_Week` MODIFY DiskSpace BIGINT default NULL; +ALTER TABLE `Events_Month` MODIFY DiskSpace BIGINT default NULL; +ALTER TABLE `Events_Archived` MODIFY DiskSpace BIGINT default NULL; + diff --git a/db/zm_update-1.33.3.sql b/db/zm_update-1.33.3.sql new file mode 100644 index 000000000..5488f809d --- /dev/null +++ b/db/zm_update-1.33.3.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Servers' + AND column_name = 'zmeventnotification' + ) > 0, + "SELECT 'Column zmeventnotification already exists in Servers'", + "ALTER TABLE Servers ADD `zmeventnotification` BOOLEAN NOT NULL DEFAULT FALSE AFTER `zmtrigger`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.4.sql b/db/zm_update-1.33.4.sql new file mode 100644 index 000000000..d9b498bc8 --- /dev/null +++ b/db/zm_update-1.33.4.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Monitors' + AND column_name = 'DefaultCodec' + ) > 0, + "SELECT 'Column DefaultCodec already exists in Monitors'", + "ALTER TABLE Monitors ADD `DefaultCodec` enum('auto','MP4','MJPEG') NOT NULL default 'auto' AFTER `DefaultScale`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.5.sql b/db/zm_update-1.33.5.sql new file mode 100644 index 000000000..39400b5d8 --- /dev/null +++ b/db/zm_update-1.33.5.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Controls' + AND column_name = 'CanReboot' + ) > 0, + "SELECT 'Column CanReboot already exists in Controls'", + "ALTER TABLE Controls ADD `CanReboot` tinyint(3) unsigned NOT NULL default '0' AFTER `CanReset`" + )); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.33.6.sql b/db/zm_update-1.33.6.sql new file mode 100644 index 000000000..159f80ac6 --- /dev/null +++ b/db/zm_update-1.33.6.sql @@ -0,0 +1 @@ +ALTER TABLE Users MODIFY MonitorIds text; diff --git a/db/zm_update-1.33.7.sql b/db/zm_update-1.33.7.sql new file mode 100644 index 000000000..b29fe0e88 --- /dev/null +++ b/db/zm_update-1.33.7.sql @@ -0,0 +1,283 @@ + +delimiter // +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,1)-1, + HourEventDiskSpace=GREATEST(COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Hour_update_trigger// + +CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET HourEventDiskSpace=GREATEST(COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; +// + +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = GREATEST(COALESCE(DayEvents,1)-1,0), + DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_update_trigger; +CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + + +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = COALESCE(WeekEvents,1)-1, + WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_update_trigger; +CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = COALESCE(MonthEvents,1)-1, + MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_update_trigger; +CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+COALESCE(NEW.DiskSpace) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +drop procedure if exists update_storage_stats// + +drop trigger if exists event_update_trigger// + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) + diff,0) WHERE Id = OLD.StorageId; + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = COALESCE(DiskSpace,0) + NEW.DiskSpace WHERE Id = NEW.StorageId; + END IF; + IF ( OLD.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) - OLD.DiskSpace,0) WHERE Id = OLD.StorageId; + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors + SET + ArchivedEvents = GREATEST(COALESCE(ArchivedEvents,0)-1,0), + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; + END IF; + ELSEIF ( NEW.Archived AND diff ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + END IF; + + IF ( diff ) THEN + UPDATE Monitors + SET + TotalEventDiskSpace = GREATEST(COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +DROP TRIGGER IF EXISTS event_insert_trigger// + +/* The assumption is that when an Event is inserted, it has no size yet, so don't bother updating the DiskSpace, just the count. + * The DiskSpace will get update in the Event Update Trigger + */ +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS event_delete_trigger// + +CREATE TRIGGER event_delete_trigger BEFORE DELETE ON Events +FOR EACH ROW +BEGIN + IF ( OLD.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) WHERE Id = OLD.StorageId; + END IF; + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = GREATEST(COALESCE(ArchivedEvents,1) - 1,0), + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0), + TotalEvents = GREATEST(COALESCE(TotalEvents,1) - 1,0), + TotalEventDiskSpace = GREATEST(COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = GREATEST(COALESCE(TotalEvents,1)-1,0), + TotalEventDiskSpace=GREATEST(COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + +DROP TRIGGER IF EXISTS Zone_Insert_Trigger// +CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Id=NEW.MonitorID; + END +// +DROP TRIGGER IF EXISTS Zone_Delete_Trigger// +CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Id=OLD.MonitorID; + END +// + +DELIMITER ; + +REPLACE INTO Events_Hour SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 hour); +REPLACE INTO Events_Day SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 day); +REPLACE INTO Events_Week SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 week); +REPLACE INTO Events_Month SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 month); +REPLACE INTO Events_Archived SELECT Id,MonitorId,DiskSpace FROM Events WHERE Archived=1; + +UPDATE Monitors INNER JOIN ( + SELECT MonitorId, + COUNT(Id) AS TotalEvents, + SUM(DiskSpace) AS TotalEventDiskSpace, + SUM(IF(Archived,1,0)) AS ArchivedEvents, + SUM(IF(Archived,DiskSpace,0)) AS ArchivedEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),1,0)) AS HourEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),DiskSpace,0)) AS HourEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),1,0)) AS DayEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),DiskSpace,0)) AS DayEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),1,0)) AS WeekEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),DiskSpace,0)) AS WeekEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),1,0)) AS MonthEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),DiskSpace,0)) AS MonthEventDiskSpace + FROM Events GROUP BY MonitorId + ) AS E ON E.MonitorId=Monitors.Id SET + Monitors.TotalEvents = E.TotalEvents, + Monitors.TotalEventDiskSpace = E.TotalEventDiskSpace, + Monitors.ArchivedEvents = E.ArchivedEvents, + Monitors.ArchivedEventDiskSpace = E.ArchivedEventDiskSpace, + Monitors.HourEvents = E.HourEvents, + Monitors.HourEventDiskSpace = E.HourEventDiskSpace, + Monitors.DayEvents = E.DayEvents, + Monitors.DayEventDiskSpace = E.DayEventDiskSpace, + Monitors.WeekEvents = E.WeekEvents, + Monitors.WeekEventDiskSpace = E.WeekEventDiskSpace, + Monitors.MonthEvents = E.MonthEvents, + Monitors.MonthEventDiskSpace = E.MonthEventDiskSpace; + diff --git a/db/zm_update-1.33.8.sql b/db/zm_update-1.33.8.sql new file mode 100644 index 000000000..a3fed9629 --- /dev/null +++ b/db/zm_update-1.33.8.sql @@ -0,0 +1,283 @@ + +delimiter // +DROP TRIGGER IF EXISTS Events_Hour_delete_trigger// +CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour +FOR EACH ROW BEGIN + UPDATE Monitors SET + HourEvents = GREATEST(COALESCE(HourEvents,1)-1,0), + HourEventDiskSpace=GREATEST(COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Hour_update_trigger// + +CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET HourEventDiskSpace=GREATEST(COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+diff WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; +// + +DROP TRIGGER IF EXISTS Events_Day_delete_trigger// +CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day +FOR EACH ROW BEGIN + UPDATE Monitors SET + DayEvents = GREATEST(COALESCE(DayEvents,1)-1,0), + DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Day_update_trigger; +CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + + +DROP TRIGGER IF EXISTS Events_Week_delete_trigger// +CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week +FOR EACH ROW BEGIN + UPDATE Monitors SET + WeekEvents = GREATEST(COALESCE(WeekEvents,1)-1,0), + WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Week_update_trigger; +CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +DROP TRIGGER IF EXISTS Events_Month_delete_trigger// +CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month +FOR EACH ROW BEGIN + UPDATE Monitors SET + MonthEvents = GREATEST(COALESCE(MonthEvents,1)-1,0), + MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS Events_Month_update_trigger; +CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month +FOR EACH ROW + BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( diff ) THEN + IF ( NEW.MonitorID != OLD.MonitorID ) THEN + UPDATE Monitors SET MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace),0) WHERE Monitors.Id=OLD.MonitorId; + UPDATE Monitors SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+COALESCE(NEW.DiskSpace) WHERE Monitors.Id=NEW.MonitorId; + ELSE + UPDATE Monitors SET MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)+diff,0) WHERE Monitors.Id=NEW.MonitorId; + END IF; + END IF; + END; + // + +drop procedure if exists update_storage_stats// + +drop trigger if exists event_update_trigger// + +CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events +FOR EACH ROW +BEGIN + declare diff BIGINT default 0; + + set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0); + IF ( NEW.StorageId = OLD.StorageID ) THEN + IF ( diff ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) + diff,0) WHERE Id = OLD.StorageId; + END IF; + ELSE + IF ( NEW.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = COALESCE(DiskSpace,0) + NEW.DiskSpace WHERE Id = NEW.StorageId; + END IF; + IF ( OLD.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) - OLD.DiskSpace,0) WHERE Id = OLD.StorageId; + END IF; + END IF; + + UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + + IF ( NEW.Archived != OLD.Archived ) THEN + IF ( NEW.Archived ) THEN + INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace); + UPDATE Monitors SET ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0) WHERE Id=NEW.MonitorId; + ELSEIF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors + SET + ArchivedEvents = GREATEST(COALESCE(ArchivedEvents,0)-1,0), + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + ELSE + IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + UPDATE Monitors SET + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; + END IF; + ELSEIF ( NEW.Archived AND diff ) THEN + UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id; + END IF; + + IF ( diff ) THEN + UPDATE Monitors + SET + TotalEventDiskSpace = GREATEST(COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; + +END; + +// + +DROP TRIGGER IF EXISTS event_insert_trigger// + +/* The assumption is that when an Event is inserted, it has no size yet, so don't bother updating the DiskSpace, just the count. + * The DiskSpace will get update in the Event Update Trigger + */ +CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events +FOR EACH ROW + BEGIN + + INSERT INTO Events_Hour (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Day (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Week (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + INSERT INTO Events_Month (EventId,MonitorId,StartTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartTime,0); + UPDATE Monitors SET + HourEvents = COALESCE(HourEvents,0)+1, + DayEvents = COALESCE(DayEvents,0)+1, + WeekEvents = COALESCE(WeekEvents,0)+1, + MonthEvents = COALESCE(MonthEvents,0)+1, + TotalEvents = COALESCE(TotalEvents,0)+1 + WHERE Id=NEW.MonitorId; +END; +// + +DROP TRIGGER IF EXISTS event_delete_trigger// + +CREATE TRIGGER event_delete_trigger BEFORE DELETE ON Events +FOR EACH ROW +BEGIN + IF ( OLD.DiskSpace ) THEN + UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) WHERE Id = OLD.StorageId; + END IF; + DELETE FROM Events_Hour WHERE EventId=OLD.Id; + DELETE FROM Events_Day WHERE EventId=OLD.Id; + DELETE FROM Events_Week WHERE EventId=OLD.Id; + DELETE FROM Events_Month WHERE EventId=OLD.Id; + IF ( OLD.Archived ) THEN + DELETE FROM Events_Archived WHERE EventId=OLD.Id; + UPDATE Monitors SET + ArchivedEvents = GREATEST(COALESCE(ArchivedEvents,1) - 1,0), + ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0), + TotalEvents = GREATEST(COALESCE(TotalEvents,1) - 1,0), + TotalEventDiskSpace = GREATEST(COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + ELSE + UPDATE Monitors SET + TotalEvents = GREATEST(COALESCE(TotalEvents,1)-1,0), + TotalEventDiskSpace=GREATEST(COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) + WHERE Id=OLD.MonitorId; + END IF; +END; + +// + +DROP TRIGGER IF EXISTS Zone_Insert_Trigger// +CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Id=NEW.MonitorID; + END +// +DROP TRIGGER IF EXISTS Zone_Delete_Trigger// +CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones +FOR EACH ROW + BEGIN + UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Id=OLD.MonitorID; + END +// + +DELIMITER ; + +REPLACE INTO Events_Hour SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 hour); +REPLACE INTO Events_Day SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 day); +REPLACE INTO Events_Week SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 week); +REPLACE INTO Events_Month SELECT Id,MonitorId,StartTime,DiskSpace FROM Events WHERE StartTime > DATE_SUB(NOW(), INTERVAL 1 month); +REPLACE INTO Events_Archived SELECT Id,MonitorId,DiskSpace FROM Events WHERE Archived=1; + +UPDATE Monitors INNER JOIN ( + SELECT MonitorId, + COUNT(Id) AS TotalEvents, + SUM(DiskSpace) AS TotalEventDiskSpace, + SUM(IF(Archived,1,0)) AS ArchivedEvents, + SUM(IF(Archived,DiskSpace,0)) AS ArchivedEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),1,0)) AS HourEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 hour),DiskSpace,0)) AS HourEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),1,0)) AS DayEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 day),DiskSpace,0)) AS DayEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),1,0)) AS WeekEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 week),DiskSpace,0)) AS WeekEventDiskSpace, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),1,0)) AS MonthEvents, + SUM(IF(StartTime > DATE_SUB(NOW(), INTERVAL 1 month),DiskSpace,0)) AS MonthEventDiskSpace + FROM Events GROUP BY MonitorId + ) AS E ON E.MonitorId=Monitors.Id SET + Monitors.TotalEvents = E.TotalEvents, + Monitors.TotalEventDiskSpace = E.TotalEventDiskSpace, + Monitors.ArchivedEvents = E.ArchivedEvents, + Monitors.ArchivedEventDiskSpace = E.ArchivedEventDiskSpace, + Monitors.HourEvents = E.HourEvents, + Monitors.HourEventDiskSpace = E.HourEventDiskSpace, + Monitors.DayEvents = E.DayEvents, + Monitors.DayEventDiskSpace = E.DayEventDiskSpace, + Monitors.WeekEvents = E.WeekEvents, + Monitors.WeekEventDiskSpace = E.WeekEventDiskSpace, + Monitors.MonthEvents = E.MonthEvents, + Monitors.MonthEventDiskSpace = E.MonthEventDiskSpace; + diff --git a/db/zm_update-1.33.9.sql b/db/zm_update-1.33.9.sql new file mode 100644 index 000000000..e0d289ba4 --- /dev/null +++ b/db/zm_update-1.33.9.sql @@ -0,0 +1,27 @@ +-- +-- Add per user API enable/disable and ability to set a minimum issued time for tokens +-- + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Users' + AND column_name = 'TokenMinExpiry' + ) > 0, +"SELECT 'Column TokenMinExpiry already exists in Users'", +"ALTER TABLE Users ADD `TokenMinExpiry` BIGINT UNSIGNED NOT NULL DEFAULT 0 AFTER `MonitorIds`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Users' + AND column_name = 'APIEnabled' + ) > 0, +"SELECT 'Column APIEnabled already exists in Users'", +"ALTER TABLE Users ADD `APIEnabled` tinyint(3) UNSIGNED NOT NULL default 1 AFTER `TokenMinExpiry`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.34.0.sql b/db/zm_update-1.34.0.sql new file mode 100644 index 000000000..b8bd3e4ed --- /dev/null +++ b/db/zm_update-1.34.0.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.33.16 database to 1.34.0 +-- +-- No changes required +-- diff --git a/db/zm_update-1.34.1.sql b/db/zm_update-1.34.1.sql new file mode 100644 index 000000000..65ba2e5ff --- /dev/null +++ b/db/zm_update-1.34.1.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.34.0 database to 1.34.1 +-- +-- No changes required +-- diff --git a/db/zm_update-1.34.2.sql b/db/zm_update-1.34.2.sql new file mode 100644 index 000000000..1fcc882d2 --- /dev/null +++ b/db/zm_update-1.34.2.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.34.1 database to 1.34.2 +-- +-- No changes required +-- diff --git a/db/zm_update-1.34.3.sql b/db/zm_update-1.34.3.sql new file mode 100644 index 000000000..b84207047 --- /dev/null +++ b/db/zm_update-1.34.3.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.34.2 database to 1.34.3 +-- +-- No changes required +-- diff --git a/db/zm_update-1.34.4.sql b/db/zm_update-1.34.4.sql new file mode 100644 index 000000000..2910943a0 --- /dev/null +++ b/db/zm_update-1.34.4.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.34.3 database to 1.34.4 +-- +-- No changes required +-- diff --git a/db/zm_update-1.34.5.sql b/db/zm_update-1.34.5.sql new file mode 100644 index 000000000..7e12b977f --- /dev/null +++ b/db/zm_update-1.34.5.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.34.4 database to 1.34.5 +-- +-- No changes required +-- diff --git a/db/zm_update-1.34.6.sql b/db/zm_update-1.34.6.sql new file mode 100644 index 000000000..1a58bee1f --- /dev/null +++ b/db/zm_update-1.34.6.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.34.5 database to 1.34.6 +-- +-- No changes required +-- diff --git a/db/zm_update-1.34.7.sql b/db/zm_update-1.34.7.sql new file mode 100644 index 000000000..ba86b1202 --- /dev/null +++ b/db/zm_update-1.34.7.sql @@ -0,0 +1,5 @@ +-- +-- This updates a 1.34.6 database to 1.34.7 +-- +-- No changes required +-- diff --git a/db/zm_update-1.35.0.sql b/db/zm_update-1.35.0.sql new file mode 100644 index 000000000..2e9132a63 --- /dev/null +++ b/db/zm_update-1.35.0.sql @@ -0,0 +1,41 @@ +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'EmailTo' + ) > 0, +"SELECT 'Column EmailTo already exists in Filters'", +"ALTER TABLE `Filters` ADD `EmailTo` TEXT AFTER `AutoEmail`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +UPDATE Filters SET EmailTo=(SELECT Value FROM Config WHERE Name='ZM_EMAIL_ADDRESS') WHERE AutoEmail=1; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'EmailSubject' + ) > 0, +"SELECT 'Column EmailSubject already exists in Filters'", +"ALTER TABLE `Filters` ADD `EmailSubject` TEXT AFTER `EmailTo`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +UPDATE Filters SET EmailSubject=(SELECT Value FROM Config WHERE Name='ZM_EMAIL_SUBJECT') WHERE AutoEmail=1; + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Filters' + AND column_name = 'EmailBody' + ) > 0, +"SELECT 'Column EmailBody already exists in Filters'", +"ALTER TABLE `Filters` ADD `EmailBody` TEXT AFTER `EmailSubject`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; + +UPDATE Filters SET EmailBody=(SELECT Value FROM Config WHERE Name='ZM_EMAIL_BODY') WHERE AutoEmail=1; diff --git a/db/zm_update-1.35.1.sql b/db/zm_update-1.35.1.sql new file mode 100644 index 000000000..d250cf751 --- /dev/null +++ b/db/zm_update-1.35.1.sql @@ -0,0 +1,12 @@ + +SET @s = (SELECT IF( + (SELECT COUNT(*) FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema = DATABASE() + AND table_name = 'Storage' + AND column_name = 'Enabled' + ) > 0, +"SELECT 'Column Enabled already exists in Storage'", +"ALTER TABLE `Storage` ADD `Enabled` BOOLEAN NOT NULL default true AFTER `DoDelete`" +)); + +PREPARE stmt FROM @s; +EXECUTE stmt; diff --git a/db/zm_update-1.35.2.sql b/db/zm_update-1.35.2.sql new file mode 100644 index 000000000..55eabd887 --- /dev/null +++ b/db/zm_update-1.35.2.sql @@ -0,0 +1 @@ +ALTER TABLE Monitors MODIFY `Type` enum('Local','Remote','File','Ffmpeg','Libvlc','cURL','WebSite','NVSocket','VNC') NOT NULL default 'Local'; diff --git a/db/zm_update-1.35.3.sql b/db/zm_update-1.35.3.sql new file mode 100644 index 000000000..23f24dd3d --- /dev/null +++ b/db/zm_update-1.35.3.sql @@ -0,0 +1,2 @@ +SELECT 'ALTERING Frames.Id to a BIGINT. This could take a long time.'; +ALTER TABLE Frames MODIFY Id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT; diff --git a/description-pak b/description-pak deleted file mode 100644 index 7afaa14a4..000000000 --- a/description-pak +++ /dev/null @@ -1 +0,0 @@ -Zoneminder with kfir performances patches and fixes from UnixMedia (nextime) diff --git a/distros/debian/apache.conf b/distros/debian/apache.conf index 6f2f30fd9..b0a22c4d8 100644 --- a/distros/debian/apache.conf +++ b/distros/debian/apache.conf @@ -1,8 +1,20 @@ Alias /zm /usr/share/zoneminder/www - - Options Indexes FollowSymLinks - - DirectoryIndex index.php - - + + + Options -Indexes +ExecCGI + AllowOverride All + AddHandler fcgid-script .php + FCGIWrapper /usr/bin/php5-cgi + Order allow,deny + Allow from all + + + + + Options -Indexes +FollowSymLinks + + DirectoryIndex index.php + + + diff --git a/distros/debian/control b/distros/debian/control index ebb59b3ab..6bb59f206 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -6,25 +6,28 @@ Build-Depends: debhelper (>= 9), cmake , libphp-serialization-perl , libgnutls28-dev | libgnutls-dev , libmysqlclient-dev | libmariadbclient-dev - , libjpeg8-dev + , libjpeg8-dev | libjpeg-dev , libpcre3-dev , libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev + , libavdevice-dev , libv4l-dev (>= 0.8.3) , libbz2-dev - , libav-tools + , ffmpeg | libav-tools + , net-tools , libnetpbm10-dev - , libavdevice-dev , libvlccore-dev, libvlc-dev , libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev , libgcrypt11-dev, libpolkit-gobject-1-dev , 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 + , libmodule-load-perl, libsys-mmap-perl, libjson-maybexs-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 , libdata-uuid-perl + , libssl-dev + , libcrypt-eksblowfish-perl, libdata-entropy-perl Standards-Version: 3.9.4 Package: zoneminder @@ -36,18 +39,23 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} , 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 + , libmodule-load-perl, libsys-mmap-perl, libjson-maybexs-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 , libdata-uuid-perl + ,libnumber-bytes-human-perl + ,libfile-slurp-perl , libpcre3 - , libav-tools, libavdevice53 + , ffmpeg | libav-tools, libavdevice53 | libavdevice55 | libavdevice57 , rsyslog | system-log-daemon - , netpbm , libjpeg8 + , netpbm , zip - , libvlccore5 | libvlccore7, libvlc5 + , libvlccore5 | libvlccore7 | libvlccore8, libvlc5 , libpolkit-gobject-1-0, php5-gd + , libssl + ,libcrypt-eksblowfish-perl, libdata-entropy-perl + Recommends: mysql-server | mariadb-server Description: Video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security diff --git a/distros/debian/install b/distros/debian/install index 97c5f7a03..337673313 100644 --- a/distros/debian/install +++ b/distros/debian/install @@ -6,3 +6,4 @@ usr/share/perl5/ZoneMinder.pm usr/share/zoneminder/db usr/share/zoneminder/www etc/zm +etc/zm/conf.d/* diff --git a/distros/debian/postinst b/distros/debian/postinst index 39e3dfc32..36472436a 100644 --- a/distros/debian/postinst +++ b/distros/debian/postinst @@ -5,6 +5,9 @@ set -e if [ "$1" = "configure" ]; then . /etc/zm/zm.conf + for i in /etc/zm/conf.d/*.conf; do + . $i + done; # 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 @@ -28,6 +31,10 @@ if [ "$1" = "configure" ]; then # 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 + if [ $? -ne 0 ]; then + echo "Error creating db." + exit 1; + fi # 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 @@ -38,6 +45,7 @@ if [ "$1" = "configure" ]; then invoke-rc.d zoneminder stop || true zmupdate.pl --nointeractive zmupdate.pl --nointeractive -f + echo "Done Updating, starting ZoneMinder" invoke-rc.d zoneminder start || true else echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' diff --git a/distros/debian/rules b/distros/debian/rules index 4bdc7cb0c..13e36d461 100755 --- a/distros/debian/rules +++ b/distros/debian/rules @@ -18,18 +18,21 @@ override_dh_auto_configure: -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 + -DZM_CONFIG_SUBDIR="/etc/zm/conf.d" \ + -DZM_CONFIG_DIR="/etc/zm" \ + -DZM_DIR_EVENTS="/var/cache/zoneminder/events" \ + -DZM_PATH_SHUTDOWN="/sbin/shutdown" \ + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" 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 + rm -f $(INSTDIR)/usr/share/zoneminder/www/api/lib/Cake/LICENSE.txt + rm -f $(INSTDIR)/usr/share/zoneminder/www/api/.gitignore + rm -rf $(INSTDIR)/usr/share/zoneminder/www/api/lib/Cake/Test override_dh_auto_test: # do not run tests... diff --git a/distros/fedora b/distros/fedora new file mode 120000 index 000000000..4d0827986 --- /dev/null +++ b/distros/fedora @@ -0,0 +1 @@ +redhat \ No newline at end of file diff --git a/distros/fedora/CMakeLists.txt b/distros/fedora/CMakeLists.txt deleted file mode 100644 index e6fc72add..000000000 --- a/distros/fedora/CMakeLists.txt +++ /dev/null @@ -1,52 +0,0 @@ -# CMakeLists.txt for the Fedora Target Distro. - -# Display a message to show the Fedora build options are being processed. -message([STATUS] "Starting Fedora Build Options" ...) - -# Create the ZoneMinder Apache config file -configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) -configure_file(zoneminder.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.conf @ONLY) -configure_file(zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY) -configure_file(zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY) - -# Download jscalendar & move files into position -file(DOWNLOAD http://iweb.dl.sourceforge.net/project/jscalendar/jscalendar/1.0/jscalendar-1.0.zip ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar-1.0.zip STATUS download_jsc) -if(download_jsc EQUAL 0) -message(STATUS "Jscalander successfully downloaded. Installing...") -execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ERROR_VARIABLE unzip_jsc) -message(STATUS "Status of jscalender script was: ${unzip_jsc}") -else(download_jsc EQUAL 0) -message(STATUS "Unable to download optional jscalander. Skipping...") -endif(download_jsc EQUAL 0) - -# Create several empty folders -file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp) - -# Install the empty folders -#install(DIRECTORY run DESTINATION /var DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_WRITE WORLD_READ WORLD_EXECUTE) -install(DIRECTORY sock swap DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(DIRECTORY zoneminder DESTINATION /var/log DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(DIRECTORY zoneminder DESTINATION /run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(DIRECTORY events images temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) - -# Create symlinks -install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/events \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/events\")") -install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/images \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/images\")") -install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/temp\")") -install(CODE "execute_process(COMMAND ln -sf ../../../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/api/app/tmp\")") - -# Fedora requires cambozola as a separate package so just link to it -install(CODE "execute_process(COMMAND ln -sf ../../java/cambozola.jar \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/cambozola.jar\")") - -# Install auxiliary files required to run zoneminder on Fedora -install(FILES zoneminder.conf DESTINATION /etc/httpd/conf.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) -install(FILES zoneminder.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) -install(FILES ../../misc/zoneminder-tmpfiles.conf DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) -install(FILES redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) - -# Install jscalendar -if(unzip_jsc STREQUAL "") -install(DIRECTORY jscalendar-1.0/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/tools/jscalendar) -endif(unzip_jsc STREQUAL "") diff --git a/distros/fedora/README.Fedora b/distros/fedora/README.Fedora deleted file mode 100644 index 025699933..000000000 --- a/distros/fedora/README.Fedora +++ /dev/null @@ -1,150 +0,0 @@ -What's New -========== - -1. The Apache ScriptAlias has been changed from "/cgi-bin/zm/zms" to - "/cgi-bin-zm/zms". This has been to done to avoid this bug: - https://bugzilla.redhat.com/show_bug.cgi?id=973067 - - IMPORTANT: You must manually inspect the value for PATH_ZMS under Options - and verify it is set to "/cgi-bin-zm/nph-zms". Failure to do so will result - in a broken system. You have been warned. - -2. Due to the active state of the ZoneMinder project, we now recommend granting - ALL permission to the ZoneMinder mysql account. This change must be done - manually before ZoneMinder will run. See the installation steps below. - -3. This package uses the HTTPS protocol by default to access the web portal. - Requests using HTTP will auto-redirect to HTTPS. See README.https for - more information. - -4. This package ships with the new ZoneMinder API enabled. - -New installs -============ - -1. This package supports either community-mysql-server or mariadb-server with - mariadb being the preferred choice. Unless you are already using MariaDB or - Mysql server, you need to ensure that the server is configured to start - during boot and properly secured by running: - - sudo yum install mariadb-server - sudo systemctl enable mariadb - sudo systemctl start mariadb.service - mysql_secure_installation - -2. Assuming the database is local and using the password for the root account - set during the previous step, you will need to create the ZoneMinder - database and configure a database account for ZoneMinder to use: - - mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql - mysql -uroot -p -e "grant all on zm.* to \ - 'zmuser'@localhost identified by 'zmpass';" - mysqladmin -uroot -p reload - - The database account credentials, zmuser/zmpass, are arbitrary. Set them to - anything that suits your environment. - -3. If you have chosen to change the zoneminder database account credentials to - something other than zmuser/zmpass, you must now edit /etc/zm/zm.conf. - Change ZM_DB_USER and ZM_DB_PASS to the values you created in the previous - step. - - This version of zoneminder no longer requires you to make a similar change - to the credentials in /usr/share/zoneminder/www/api/app/Config/database.php - This now happens dynamically. Do *not* make any changes to this file. - -4. Edit /etc/php.ini, uncomment the date.timezone line, and add your local - timezone. PHP will complain loudly if this is not set, or if it is set - incorrectly, and these complaints will show up in the zoneminder logging - system as errors. - - If you are not sure of the proper timezone specification to use, look at - http://php.net/date.timezone - -5. Disable SELinux - - We currently do not have the resources to create and maintain an accurate - SELinux policy for ZoneMinder on Fedora. We will gladly accept pull - reqeusts from anyone who wishes to do the work. In the meantime, SELinux - will need to be disabled or put into permissive mode. - - To immediately disbale SELinux for the current seesion, issue the following - from the command line: - - sudo setenforce 0 - - To permanently disable SELinux, edit /etc/selinux/config and change the - SELINUX line from "enforcing" to "disabled". This change will take - effect after a reboot. - -6. Install mod_ssl or configure /etc/httpd/conf.d/zoneminder.conf to meet your - needs. This package comes preconfigured for HTTPS using the default self - signed certificate on your system. The recommended way to complete this step - is to simply install mod_ssl: - - sudo yum install mod_ssl - - If this does not meet your needs, then read README.https to - learn about alternatives. When in doubt, install mod_ssl. - -7. Now start the web server: - - sudo systemctl enable httpd - sudo systemctl start httpd - -8. Now start zoneminder: - - sudo systemctl enable zoneminder - sudo systemctl start zoneminder - -Upgrades -======== - -1. Verify /etc/zm/zm.conf. - - If zm.conf was manually edited before running the upgrade, the installation - may not overwrite it. In this case, it will create the file - /etc/zm/zm.conf.rpmnew. - - For example, this will happen if you are using database account credentials - other than zmuser/zmpass. - - Compare /etc/zm/zm.conf to /etc/zm/zm.conf.rpmnew. Verify that zm.conf - contains any new config settings that may be in zm.conf.rpmnew. - - This version of zoneminder no longer requires you to make a similar change - to the credentials in /usr/share/zoneminder/www/api/app/Config/database.php - This now happens dynamically. Do *not* make any changes to this file. - -2. Verify permissions of the zmuser account. - - Over time, the database account permissions required for normal operation - have increased. Verify the zmuser database account has been granted all - permission to the ZoneMinder database: - - mysql -uroot -p -e "show grants for zmuser@localhost;" - - See step 2 of the Installation section to add missing permissions. - -3. Verify the ZoneMinder Apache configuration file in the folder - /etc/httpd/conf.d. You will have a file called "zoneminder.conf" and there - may also be a file called "zoneminder.conf.rpmnew". If the rpmnew file - exists, inspect it and merge anything new in that file with zoneminder.conf. - Verify the SSL REquirements meet your needs. Read README.https if necessary. - -4. Upgrade the database before starting ZoneMinder. - - Most upgrades can be performed by executing the following command: - - sudo zmupdate.pl - - Recent versions of ZoneMinder don't require any parameters added to the - zmupdate command. However, if ZoneMinder complains, you may need to call - zmupdate in the following manner: - - sudo zmupdate.pl --user=root --pass= --version= - -5. Now start zoneminder: - - sudo systemctl start zoneminder - diff --git a/distros/fedora/README.https b/distros/fedora/README.https deleted file mode 120000 index 18f7407c1..000000000 --- a/distros/fedora/README.https +++ /dev/null @@ -1 +0,0 @@ -../redhat/README.https \ No newline at end of file diff --git a/distros/fedora/archive/zoneminder-1.24.3-runlevel.patch b/distros/fedora/archive/zoneminder-1.24.3-runlevel.patch deleted file mode 100644 index de7b49b0b..000000000 --- a/distros/fedora/archive/zoneminder-1.24.3-runlevel.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./scripts/zm.in.runlevel ./scripts/zm.in ---- ./scripts/zm.in.runlevel 2010-11-28 15:22:05.000000000 -0600 -+++ ./scripts/zm.in 2011-03-24 21:39:01.973010160 -0500 -@@ -1,6 +1,6 @@ - #!/bin/sh - # description: ZoneMinder is the top Linux video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security applications.Copyright: Philip Coombes, Corey DeLasaux 2003-2008 --# chkconfig: 2345 99 00 -+# chkconfig: - 99 00 - # processname: zmpkg.pl - - # Source function library. diff --git a/distros/fedora/archive/zoneminder-1.24.4-installfix.patch b/distros/fedora/archive/zoneminder-1.24.4-installfix.patch deleted file mode 100644 index 8831d597a..000000000 --- a/distros/fedora/archive/zoneminder-1.24.4-installfix.patch +++ /dev/null @@ -1,22 +0,0 @@ -diff -up ./Makefile.am.installfix ./Makefile.am ---- ./Makefile.am.installfix 2011-06-19 15:51:14.000000000 -0500 -+++ ./Makefile.am 2011-08-13 20:33:30.288587436 -0500 -@@ -21,12 +21,12 @@ EXTRA_DIST = \ - # Yes, you are correct. This is a HACK! - install-data-hook: - ( cd $(DESTDIR)$(sysconfdir); chown $(webuser):$(webgroup) $(sysconf_DATA); chmod 600 $(sysconf_DATA) ) -- ( if ! test -e $(ZM_RUNDIR); then mkdir -p $(ZM_RUNDIR); fi; if test "$(ZM_RUNDIR)" != "/var/run"; then chown $(webuser):$(webgroup) $(ZM_RUNDIR); chmod u+w $(ZM_RUNDIR); fi ) -- ( if ! test -e $(ZM_TMPDIR); then mkdir -m 700 -p $(ZM_TMPDIR); fi; if test "$(ZM_TMPDIR)" != "/tmp"; then chown $(webuser):$(webgroup) $(ZM_TMPDIR); chmod u+w $(ZM_TMPDIR); fi ) -- ( if ! test -e $(ZM_LOGDIR); then mkdir -p $(ZM_LOGDIR); fi; if test "$(ZM_LOGDIR)" != "/var/log"; then chown $(webuser):$(webgroup) $(ZM_LOGDIR); chmod u+w $(ZM_LOGDIR); fi ) -+ ( 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_TMPDIR); then mkdir -m 700 -p $(DESTDIR)$(ZM_TMPDIR); fi; if test "$(DESTDIR)$(ZM_TMPDIR)" != "/tmp"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_TMPDIR); chmod u+w $(DESTDIR)$(ZM_TMPDIR); fi ) -+ ( if ! test -e $(DESTDIR)$(ZM_LOGDIR); then mkdir -p $(DESTDIR)$(ZM_LOGDIR); fi; if test "$(DESTDIR)$(ZM_LOGDIR)" != "/var/log"; then chown $(webuser):$(webgroup) $(DESTDIR)$(ZM_LOGDIR); chmod u+w $(DESTDIR)$(ZM_LOGDIR); fi ) - - uninstall-hook: - @-( cd $(DESTDIR)$(webdir); rm -rf events graphics images sounds temp ) -- @-( if test "$(ZM_RUNDIR)" != "/var/run"; then rm -rf $(ZM_RUNDIR); fi ) -- @-( if test "$(ZM_TMPDIR)" != "/tmp"; then rm -rf $(ZM_TMPDIR); fi ) -- @-( if test "$(ZM_LOGDIR)" != "/var/log"; then rm -rf $(ZM_LOGDIR); fi ) -+ @-( if test "$(DESTDIR)$(ZM_RUNDIR)" != "/var/run"; then rm -rf $(DESTDIR)$(ZM_RUNDIR); fi ) -+ @-( if test "$(DESTDIR)$(ZM_TMPDIR)" != "/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/distros/fedora/archive/zoneminder-1.26.0-defaults.patch b/distros/fedora/archive/zoneminder-1.26.0-defaults.patch deleted file mode 100644 index 3e5dda67c..000000000 --- a/distros/fedora/archive/zoneminder-1.26.0-defaults.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- configure.ac 2013-08-15 11:44:10.000000000 -0500 -+++ configure.ac.logdir 2013-08-17 09:20:07.326053328 -0500 -@@ -46,7 +46,7 @@ - AC_SUBST(ZM_TMPDIR,[/tmp/zm]) - fi - if test "$ZM_LOGDIR" == ""; then -- AC_SUBST(ZM_LOGDIR,[/var/log/zm]) -+ AC_SUBST(ZM_LOGDIR,[/var/log/zoneminder]) - fi - - LIB_ARCH=lib ---- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2013-08-01 18:14:45.175241378 -0500 -+++ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in.defaults 2013-08-07 18:57:42.525006149 -0500 -@@ -187,7 +187,7 @@ - }, - { - name => "ZM_PATH_ZMS", -- default => "/cgi-bin/nph-zms", -+ default => "/cgi-bin/zm/nph-zms", - description => "Web path to zms streaming server", - help => "The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.", - type => $types{rel_path}, -@@ -276,7 +276,7 @@ - }, - { - name => "ZM_OPT_CAMBOZOLA", -- default => "no", -+ default => "yes", - description => "Is the (optional) cambozola java streaming client installed", - help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.", - type => $types{boolean}, -@@ -526,7 +526,7 @@ - }, - { - name => "ZM_LOG_DEBUG_FILE", -- default => "@ZM_TMPDIR@/zm_debug.log+", -+ default => "/var/log/zoneminder/zm_debug_log+", - description => "Where extra debug is output to", - help => "This option allows you to specify a different target for debug output. All components have a default log file which will norally be in /tmp or /var/log and this is where debug will be written to if this value is empty. Adding a path here will temporarily redirect debug, and other logging output, to this file. This option is a simple filename and you are debugging several components then they will all try and write to the same file with undesirable consequences. Appending a '+' to the filename will cause the file to be created with a '.' suffix containing your process id. In this way debug from each run of a component is kept separate. This is the recommended setting as it will also prevent subsequent runs from overwriting the same log. You should ensure that permissions are set up to allow writing to the file and directory specified here.", - requires => [ { name => "ZM_LOG_DEBUG", value => "yes" } ], -@@ -623,7 +623,7 @@ - }, - { - name => "ZM_PATH_SOCKS", -- default => "@ZM_TMPDIR@", -+ default => "/var/lib/zoneminder/sock", - description => "Path to the various Unix domain socket files that ZoneMinder uses", - help => "ZoneMinder generally uses Unix domain sockets where possible. This reduces the need for port assignments and prevents external applications from possibly compromising the daemons. However each Unix socket requires a .sock file to be created. This option indicates where those socket files go.", - type => $types{abs_path}, -@@ -639,7 +639,7 @@ - }, - { - name => "ZM_PATH_SWAP", -- default => "@ZM_TMPDIR@", -+ default => "/dev/shm", - description => "Path to location for temporary swap images used in streaming", - help => "Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.", - type => $types{abs_path}, -@@ -902,7 +902,7 @@ - }, - { - name => "ZM_UPLOAD_FTP_LOC_DIR", -- default => "@ZM_TMPDIR@", -+ default => "/var/spool/zoneminder-upload", - description => "The local directory in which to create upload files", - help => "You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.", - requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], -@@ -1258,7 +1258,7 @@ - }, - { - name => "ZM_OPT_CONTROL", -- default => "no", -+ default => "yes", - description => "Support controllable (e.g. PTZ) cameras", - help => "ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.", - type => $types{boolean}, diff --git a/distros/fedora/archive/zoneminder-1.26.3-dbinstall.patch b/distros/fedora/archive/zoneminder-1.26.3-dbinstall.patch deleted file mode 100644 index 04af9e8b2..000000000 --- a/distros/fedora/archive/zoneminder-1.26.3-dbinstall.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- configure.ac 2013-09-05 10:33:08.000000000 -0500 -+++ configure.ac.dbinstall 2013-09-05 17:23:28.555553447 -0500 -@@ -1,13 +1,11 @@ - AC_PREREQ(2.59) --AC_INIT(zm,1.26.3,[http://www.zoneminder.com/forums/ - Please check FAQ first],ZoneMinder,http://www.zoneminder.com/downloads.html) -+AC_INIT(zm,1.26.3,[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_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS]) - --PATH_BUILD=`pwd` --AC_SUBST(PATH_BUILD) - TIME_BUILD=`date +'%s'` - AC_SUBST(TIME_BUILD) - -@@ -354,6 +352,8 @@ AC_PROG_PERL_MODULES(X10::ActiveHome,,AC - - 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") -diff -up ./db/Makefile.am.dbinstall ./db/Makefile.am ---- ./db/Makefile.am.dbinstall 2009-10-14 04:42:46.000000000 -0500 -+++ ./db/Makefile.am 2011-03-24 22:50:14.173912137 -0500 -@@ -1,7 +1,16 @@ - AUTOMAKE_OPTIONS = gnu - -+zmdbdatadir = $(pkgdatadir)/db -+ - EXTRA_DIST = \ - zm_create.sql.in \ -+ $(dbupgrade_scripts) -+ -+dist_zmdbdata_DATA = \ -+ zm_create.sql \ -+ $(dbupgrade_scripts) -+ -+dbupgrade_scripts = \ - zm_update-0.0.1.sql \ - zm_update-0.9.7.sql \ - zm_update-0.9.8.sql \ -diff -up ./scripts/zmupdate.pl.in.dbinstall ./scripts/zmupdate.pl.in ---- ./scripts/zmupdate.pl.in.dbinstall 2011-08-27 15:44:05.335602405 -0500 -+++ ./scripts/zmupdate.pl.in 2011-08-26 02:51:37.000000000 -0500 -@@ -424,7 +424,7 @@ if ( $version ) - } - else - { -- $command .= ZM_PATH_BUILD."/db"; -+ $command .= ZM_PATH_DATA."/db"; - } - $command .= "/zm_update-".$version.".sql"; - -diff -up ./zm.conf.in.dbinstall ./zm.conf.in ---- ./zm.conf.in.dbinstall 2008-07-25 04:48:16.000000000 -0500 -+++ ./zm.conf.in 2011-03-24 22:50:14.175912077 -0500 -@@ -12,8 +12,8 @@ - # Current version of ZoneMinder - ZM_VERSION=@VERSION@ - --# Path to build directory, used mostly for finding DB upgrade scripts --ZM_PATH_BUILD=@PATH_BUILD@ -+# Path to installed data directory, used mostly for finding DB upgrade scripts -+ZM_PATH_DATA=@PKGDATADIR@ - - # Build time, used to record when to trigger various checks - ZM_TIME_BUILD=@TIME_BUILD@ diff --git a/distros/fedora/archive/zoneminder-1.26.3-noffmpeg.patch b/distros/fedora/archive/zoneminder-1.26.3-noffmpeg.patch deleted file mode 100644 index e8e8d4b3e..000000000 --- a/distros/fedora/archive/zoneminder-1.26.3-noffmpeg.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- configure.ac 2013-09-10 12:42:56.000000000 -0500 -+++ configure.ac.noffmpeg 2013-09-14 17:25:41.988388970 -0500 -@@ -284,15 +284,15 @@ - 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)) -+dnl 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) -+dnl AC_CHECK_LIB(avcore,av_image_copy,,) -+dnl AC_CHECK_LIB(avcodec,avcodec_version,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming)) -+dnl AC_CHECK_LIB(avformat,avformat_version,,AC_MSG_WARN(libavformat.a is required for MPEG streaming)) -+dnl AC_CHECK_LIB(avcodec,avcodec_open,,AC_MSG_WARN(libavcodec.a is required for MPEG streaming)) -+dnl AC_CHECK_LIB(avformat,av_new_stream,,AC_MSG_WARN(libavformat.a is required for MPEG streaming)) -+dnl AC_CHECK_LIB(avdevice,avdevice_register_all,,AC_MSG_WARN(libavdevice.a may be required for MPEG streaming)) -+dnl AC_CHECK_LIB(swscale,sws_scale,,,-lswscale) - AC_CHECK_LIB(bz2,BZ2_bzCompress,,AC_MSG_WARN(zm requires libbz2.a for recent versions of ffmpeg)) - AC_CHECK_LIB(z,compress,,) - diff --git a/distros/fedora/archive/zoneminder-1.26.4-dbinstall.patch b/distros/fedora/archive/zoneminder-1.26.4-dbinstall.patch deleted file mode 100644 index 6c4a43d9d..000000000 --- a/distros/fedora/archive/zoneminder-1.26.4-dbinstall.patch +++ /dev/null @@ -1,81 +0,0 @@ ---- configure.ac 2013-09-05 10:33:08.000000000 -0500 -+++ configure.ac.dbinstall 2013-09-05 17:23:28.555553447 -0500 -@@ -1,13 +1,11 @@ - AC_PREREQ(2.59) --AC_INIT(zm,1.26.4,[http://www.zoneminder.com/forums/ - Please check FAQ first],ZoneMinder,http://www.zoneminder.com/downloads.html) -+AC_INIT(zm,1.26.4,[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_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS]) - --PATH_BUILD=`pwd` --AC_SUBST(PATH_BUILD) - TIME_BUILD=`date +'%s'` - AC_SUBST(TIME_BUILD) - -@@ -354,6 +352,8 @@ AC_PROG_PERL_MODULES(X10::ActiveHome,,AC - - 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") -diff -up ./db/Makefile.am.dbinstall ./db/Makefile.am ---- ./db/Makefile.am.dbinstall 2009-10-14 04:42:46.000000000 -0500 -+++ ./db/Makefile.am 2011-03-24 22:50:14.173912137 -0500 -@@ -1,7 +1,16 @@ - AUTOMAKE_OPTIONS = gnu - -+zmdbdatadir = $(pkgdatadir)/db -+ - EXTRA_DIST = \ - zm_create.sql.in \ -+ $(dbupgrade_scripts) -+ -+dist_zmdbdata_DATA = \ -+ zm_create.sql \ -+ $(dbupgrade_scripts) -+ -+dbupgrade_scripts = \ - zm_update-0.0.1.sql \ - zm_update-0.9.7.sql \ - zm_update-0.9.8.sql \ -diff -up ./scripts/zmupdate.pl.in.dbinstall ./scripts/zmupdate.pl.in ---- scripts/zmupdate.pl.in 2013-10-05 14:46:16.000000000 -0500 -+++ scripts/zmupdate.pl.in.dbinstall 2013-10-05 18:56:05.431045910 -0500 -@@ -429,7 +429,7 @@ if ( $version ) - } - else - { -- $command .= ZM_PATH_BUILD."/db"; -+ $command .= ZM_PATH_DATA."/db"; - } - $command .= "/zm_update-".$version.".sql"; - -@@ -1030,7 +1030,7 @@ if ( $version ) - if ( $version ge '1.26.0' ) { - - my @files; -- $updateDir = ZM_PATH_BUILD."/db" if ! $updateDir; -+ $updateDir = ZM_PATH_DATA."/db" if ! $updateDir; - opendir( my $dh, $updateDir ) || die "Can't open updateDir $!"; - @files = sort grep { (!/^\./) && /^zm_update\-[\d\.]+\.sql$/ && -f "$updateDir/$_" } readdir($dh); - closedir $dh; -diff -up ./zm.conf.in.dbinstall ./zm.conf.in ---- ./zm.conf.in.dbinstall 2008-07-25 04:48:16.000000000 -0500 -+++ ./zm.conf.in 2011-03-24 22:50:14.175912077 -0500 -@@ -12,8 +12,8 @@ - # Current version of ZoneMinder - ZM_VERSION=@VERSION@ - --# Path to build directory, used mostly for finding DB upgrade scripts --ZM_PATH_BUILD=@PATH_BUILD@ -+# Path to installed data directory, used mostly for finding DB upgrade scripts -+ZM_PATH_DATA=@PKGDATADIR@ - - # Build time, used to record when to trigger various checks - ZM_TIME_BUILD=@TIME_BUILD@ diff --git a/distros/fedora/archive/zoneminder.cmake.f19.spec b/distros/fedora/archive/zoneminder.cmake.f19.spec deleted file mode 100644 index 0af88f41f..000000000 --- a/distros/fedora/archive/zoneminder.cmake.f19.spec +++ /dev/null @@ -1,397 +0,0 @@ -%define zmuid $(id -un) -%define zmgid $(id -gn) -%define zmuid_final apache -%define zmgid_final apache - -%global _hardened_build 1 - -### Delete the lines below to build with ffmpeg and/or x10 -%define _without_ffmpeg 1 -%define _without_x10 1 - -Name: zoneminder -Version: 1.27 -Release: 1%{?dist} -Summary: A camera monitoring and analysis tool -Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ -# Mootools is inder the MIT license: http://mootools.net/ -License: GPLv2+ and LGPLv2+ and MIT -URL: http://www.zoneminder.com/ - -#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz -Source: ZoneMinder-%{version}.tar.gz - -Patch1: zoneminder-1.26.0-defaults.patch - -BuildRequires: cmake gnutls-devel systemd-units bzip2-devel -BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel -BuildRequires: perl(Archive::Tar) perl(Archive::Zip) -BuildRequires: perl(Date::Manip) perl(DBD::mysql) -BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent) -BuildRequires: perl(MIME::Entity) perl(MIME::Lite) -BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap) -BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign) -BuildRequires: perl(Expect) perl(Sys::Syslog) -BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel} -%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)} -# cmake needs the following installed at build time due to the way it auto-detects certain parameters -BuildRequires: httpd polkit-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg} - -Requires: httpd php php-mysql cambozola polkit -Requires: libjpeg-turbo vlc-core libcurl -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip) -Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP) -Requires: perl(LWP::Protocol::https) -%{!?_without_ffmpeg:Requires: ffmpeg} - -Requires(post): systemd-units systemd-sysv -Requires(post): /usr/bin/gpasswd -Requires(post): /usr/bin/less -Requires(preun): systemd-units -Requires(postun): systemd-units - -%description -ZoneMinder is a set of applications which is intended to provide a complete -solution allowing you to capture, analyse, record and monitor any cameras you -have attached to a Linux based machine. It is designed to run on kernels which -support the Video For Linux (V4L) interface and has been tested with cameras -attached to BTTV cards, various USB cameras and IP network cameras. It is -designed to support as many cameras as you can attach to your computer without -too much degradation of performance. - -%prep -%setup -q -n ZoneMinder-%{version} - -%patch1 -p0 -b .defaults -#%patch2 -p0 -b .noffmpeg - -%build -%cmake \ - -DZM_TARGET_DISTRO="f19" \ -%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \ -%{?_without_x10:-DZM_NO_X10=ON} \ - . - -make %{?_smp_mflags} - -%install -export DESTDIR=%{buildroot} -make install - -%post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi - -# Allow zoneminder access to local video sources, serial ports, and x10 -/usr/bin/gpasswd -a %{zmuid_final} video -/usr/bin/gpasswd -a %{zmuid_final} dialout - -# Display the README for post installation instructions -/usr/bin/less %{_docdir}/%{name}-%{version}/README.Fedora - -%preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || : - /bin/systemctl stop zoneminder.service > /dev/null 2>&1 || : -fi - -%postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : -fi - -%triggerun -- zoneminder < 1.25.0-4 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply zoneminder -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || : -/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : - - -%files -%defattr(-,root,root,-) -%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/jscalendar-doc -%config %attr(640,root,%{zmgid_final}) /etc/zm.conf -%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf -%config(noreplace) /etc/tmpfiles.d/zoneminder.conf -%config(noreplace) /etc/logrotate.d/zoneminder - -%{_unitdir}/zoneminder.service - -%{_bindir}/zma -%{_bindir}/zmaudit.pl -%{_bindir}/zmc -%{_bindir}/zmcontrol.pl -%{_bindir}/zmdc.pl -%{_bindir}/zmf -%{_bindir}/zmfilter.pl -# zmfix removed from zoneminder 1.26.6 -#%attr(4755,root,root) %{_bindir}/zmfix -%{_bindir}/zmpkg.pl -%{_bindir}/zmtrack.pl -%{_bindir}/zmtrigger.pl -%{_bindir}/zmu -%{_bindir}/zmupdate.pl -%{_bindir}/zmvideo.pl -%{_bindir}/zmwatch.pl -%{_bindir}/zmcamtool.pl -%{_bindir}/zmsystemctl.pl -%{!?_without_x10:%{_bindir}/zmx10.pl} -%{_bindir}/zmonvif-probe.pl - -%{perl_vendorlib}/ZoneMinder* -%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder* -%{perl_vendorlib}/ONVIF* -%{perl_vendorlib}/WSDiscovery* -%{perl_vendorlib}/WSSecurity* -%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ONVIF* -%{_mandir}/man*/* -%dir %{_libexecdir}/zoneminder -%{_libexecdir}/zoneminder/cgi-bin -%dir %{_datadir}/zoneminder -%{_datadir}/zoneminder/db -%{_datadir}/zoneminder/www - -%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy -%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules - -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder - - -%changelog -* Sun Aug 03 2014 Andrew Bauer - 1.27 -- Include ONVIF support files - -* Fri Mar 14 2014 Andrew Bauer - 1.27 -- Tweak build requirements for cmake - -* Sat Feb 01 2014 Andrew Bauer - 1.27 -- Add zmcamtool.pl. Bump version for 1.27 release. - -* Mon Dec 16 2013 Andrew Bauer - 1.26.5 -- This is a bug fixe release -- RTSP fixes, cmake enhancements, couple other misc fixes - -* Mon Oct 07 2013 Andrew Bauer - 1.26.4 -- Initial cmake build. - -* Sat Oct 05 2013 Andrew Bauer - 1.26.4 -- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch -- All files are now part of the zoneminder source tree. Update specfile accordingly. - -* Sat Sep 21 2013 Andrew Bauer - 1.26.3 -- Initial rebuild for ZoneMinder 1.26.3 release. - -* Fri Feb 15 2013 Fedora Release Engineering - 1.25.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Mon Jan 21 2013 Adam Tkac - 1.25.0-12 -- rebuild due to "jpeg8-ABI" feature drop - -* Mon Jan 7 2013 Remi Collet - 1.25.0-11 -- fix configuration file for httpd 2.4, #871502 - -* Fri Dec 21 2012 Adam Tkac - 1.25.0-10 -- rebuild against new libjpeg - -* Thu Aug 09 2012 Jason L Tibbitts III - 1.25.0-9 -- Add patch to work around v4l2 api breakage in 3.5 kernel. - -* Sun Jul 22 2012 Fedora Release Engineering - 1.25.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 23 2012 Petr Pisar - 1.25.0-7 -- Perl 5.16 rebuild - -* Wed Mar 21 2012 Jason L Tibbitts III - 1.25.0-6 -- Fix stupid thinko in sql modifications. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-5 -- Clean up macro usage. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-4 -- Convert to systemd. -- Add tmpfiles.d configuration since the initscript isn't around to create - /run/zoneminder. -- Remove some pointless executable permissions. -- Add logrotate file. - -* Wed Feb 22 2012 Jason L Tibbitts III - 1.25.0-3 -- Update README.Fedora to reference systemctl and mention timezone info in - php.ini. -- Add proper default for EYEZM_LOG_TO_FILE. - - -* Thu Feb 09 2012 Jason L Tibbitts III - 1.25.0-2 -- Rebuild for new pcre. - -* Thu Jan 19 2012 Jason L Tibbitts III - 1.25.0-1 -- Update to 1.25.0 -- Fix gcc4.7 build problems. -- Drop gcc4.4 build fixes; for whatever reason they now break the build. -- Clean up old patches. -- Force setting of ZM_TMPDIR and ZM_RUNDIR. - -* Sat Jan 14 2012 Fedora Release Engineering - 1.24.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-3 -- Re-add the dist-tag that somehow got lost. - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-2 -- Add patch for bug 711780 - fix syntax issue in Mapped.pm. -- Undo that patch, and undo another which was the cause of the whole mess. -- Fix up other patches so ZM_PATH_BUILD is both defined and useful. -- Make sure database creation mods actually take. -- Update Fedora-specific docs with some additional info. -- Use bundled mootools (javascript, so no guideline violation). -- Update download location. -- Update the gcrypt patch to actually work. -- Upstream changed the tarball without changing the version to patch a - vulnerability, so redownload. - -* Sun Aug 14 2011 Jason L Tibbitts III - 1.24.4-1 -- Initial attempt to upgrade to 1.24.4. -- Add patch from BZ 460310 to build against libgcrypt instead of requiring the - gnutls openssl libs. - -* Thu Jul 21 2011 Petr Sabata - 1.24.3-7.20110324svn3310 -- Perl mass rebuild - -* Wed Jul 20 2011 Petr Sabata - 1.24.3-6.20110324svn3310 -- Perl mass rebuild - -* Mon May 09 2011 Jason L Tibbitts III - 1.24.3-5.20110324svn3310 -- Bump for gnutls update. - -* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 -- Update to latest 1.24.3 subversion. Turns out that what upstream was calling - 1.24.3 is really just an occasionally updated devel snapshot. -- Rebase various patches. - -* Wed Mar 23 2011 Dan Horák - 1.24.3-3 -- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 -- Update to latest upstream version. -- Rebase patches. -- Initial incomplete attempt to disable v4l1 support. - -* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 -- Unbundle cambozola; instead link to the separately pacakged copy. -- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. -- Git rid of mixed space/tab usage by removing all tabs. -- Remove unnecessary Conflicts: line. -- Attempt to force short_open_tag on for the code directories. -- Move default location of sockets, swaps, logfiles and some temporary files to - make more sense and allow things to work better with a future selinux policy. -- Fix errors in README.Fedora. - -* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 -- rebuild against perl 5.10.1 -- use Perl vendorarch and archlib variables correctly - -* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 -- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 -- Initial update to 1.24.2. -- Rebase patches. -- Update mootools download location. -- Update to mootools 1.2.3. -- Add additional dependencies for some optional features. - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 -- Remove unused Sys::Mmap perl dependency RPM is finding - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 -- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 -- Added noffmpeg patch to make building outside mock easier - -* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 -- Patch for gcc 4.4 compilation errors -- Upgrade to 1.24.1 - -* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 -- rebuild for dependencies - -* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 -- Fix permissions on zm.conf - -* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 -- Initial attempt at packaging 1.23. - -* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 -- Add perl module compat dependency, bz #453590 - -* Tue May 6 2008 Martin Ebourne - 1.22.3-14 -- Remove default runlevel, bz #441315 - -* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 -- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. - -* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 -- Autorebuild for GCC 4.3 - -* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 -- Fix compilation on gcc 4.3 - -* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 -- Rebuild for new openssl - -* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 -- Fix licence tag - -* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 -- Fixes from testing by Jitz including missing dependencies and database creation - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 -- Disable crashtrace on ppc - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 -- Fix uid for directories in /var/lib/zoneminder - -* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 -- Added perl Archive::Tar dependency -- Disabled web interface due to lack of access control on the event images - -* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 -- Changes recommended in review by Jason Tibbitts - -* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 -- Standardised on package name of zoneminder - -* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 -- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/fedora/archive/zoneminder.conf b/distros/fedora/archive/zoneminder.conf deleted file mode 100644 index 66b3dc146..000000000 --- a/distros/fedora/archive/zoneminder.conf +++ /dev/null @@ -1,45 +0,0 @@ -# The Zoneminder web interface has been disabled by default due to a small -# security issue in the default install. -# -# When using Zoneminder's own authentication, recorded CCTV images are -# accessible from the web directly without passing the authentication. This -# means any attacker could see your CCTV images without a password. In order -# to avoid this you can disable Zoneminder's authentication and configure -# standard Apache authentication (see the Apache documentation for details on -# this). -# -# If you still wish to use Zoneminder's own authentication, or have an -# internal site which needs no authentication, you need to delete the line -# marked below and restart Apache. - -Alias /zm "/usr/share/zoneminder/www" - - Options -Indexes +MultiViews +FollowSymLinks - AllowOverride All - - # Apache 2.4 - Require all granted - - - # Apache 2.2 - Order deny,allow - Allow from all - - # The code unfortunately uses short tags in many places - php_value short_open_tag 1 - - -ScriptAlias /cgi-bin/zm "/usr/libexec/zoneminder/cgi-bin" - - AllowOverride All - Options +ExecCGI +FollowSymLinks - - # Apache 2.4 - Require all granted - - - # Apache 2.2 - Order deny,allow - Allow from all - - diff --git a/distros/fedora/archive/zoneminder.f19.spec b/distros/fedora/archive/zoneminder.f19.spec deleted file mode 100644 index d1be12aa2..000000000 --- a/distros/fedora/archive/zoneminder.f19.spec +++ /dev/null @@ -1,478 +0,0 @@ -%define cambrev 0.931 -%define moorev 1.3.2 -%define jscrev 1.0 - -%define zmuid $(id -un) -%define zmgid $(id -gn) -%define zmuid_final apache -%define zmgid_final apache - -%global _hardened_build 1 - -### Delete the lines below to build with ffmpeg and/or x10 -%define _without_ffmpeg 1 -%define _without_x10 1 - -Name: zoneminder -Version: 1.27 -Release: 1%{?dist} -Summary: A camera monitoring and analysis tool -Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ -# Mootools is inder the MIT license: http://mootools.net/ -License: GPLv2+ and LGPLv2+ and MIT -URL: http://www.zoneminder.com/ - -#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz -Source: ZoneMinder-%{version}.tar.gz -Source2: jscalendar-%{jscrev}.zip -#Source2: http://downloads.sourceforge.net/jscalendar/jscalendar-%{jscrev}.zip - -# Need to unravel the proper mootools files to grab from upstream, since the -# number of them keeps multiplying. In the meantime, rely on the ones bundled -# with zoneminder. As these are javascript, there is no guideline violation -# here. -#Source3: http://mootools.net/download/get/mootools-core-%{moorev}-full-compat-yc.js - -Patch1: zoneminder-1.24.3-runlevel.patch -Patch2: zoneminder-1.26.0-defaults.patch -%{?_without_ffmpeg:Patch3: zoneminder-1.26.3-noffmpeg.patch} - -BuildRequires: automake gnutls-devel systemd-units -BuildRequires: libtool bzip2-devel -BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel -BuildRequires: perl(Archive::Tar) perl(Archive::Zip) -BuildRequires: perl(Date::Manip) perl(DBD::mysql) -BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent::Determined) -BuildRequires: perl(MIME::Entity) perl(MIME::Lite) -BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap) -BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign) -BuildRequires: perl(Expect) perl(Sys::Syslog) -BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel -BuildRequires: autoconf autoconf-archive polkit-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel} -%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)} - -Requires: httpd php php-mysql cambozola polkit -Requires: libjpeg-turbo libcurl vlc-core ffmpeg -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip) -Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP) -Requires: perl(LWP::Protocol::https) - -Requires(post): systemd-units systemd-sysv -Requires(post): /usr/bin/gpasswd -Requires(post): /usr/bin/less -Requires(preun): systemd-units -Requires(postun): systemd-units - -%description -ZoneMinder is a set of applications which is intended to provide a complete -solution allowing you to capture, analyse, record and monitor any cameras you -have attached to a Linux based machine. It is designed to run on kernels which -support the Video For Linux (V4L) interface and has been tested with cameras -attached to BTTV cards, various USB cameras and IP network cameras. It is -designed to support as many cameras as you can attach to your computer without -too much degradation of performance. - -%prep -%setup -q -n ZoneMinder-%{version} - -# Unpack jscalendar and move some files around -%setup -q -D -T -a 2 -n ZoneMinder-%{version} -mkdir jscalendar-doc -pushd jscalendar-1.0 -mv *html *php doc/* README ../jscalendar-doc -rmdir doc -popd - -%patch1 -p0 -b .runlevel -%patch2 -p0 -b .defaults -%{?_without_ffmpeg:%patch3 -p0 -b .noffmpeg} - -chmod -x src/zm_event.cpp src/zm_user.h - -%build -libtoolize --force -aclocal -autoheader -automake --force-missing --add-missing -autoconf - -OPTS="" - -%configure \ - --disable-crashtrace \ - --with-libarch=%{_lib} \ - --with-mysql=%{_prefix} \ - --with-ffmpeg=%{_prefix} \ - --with-webdir=%{_datadir}/%{name}/www \ - --with-cgidir=%{_libexecdir}/%{name}/cgi-bin \ - --with-webuser=%{zmuid} \ - --with-webgroup=%{zmgid} \ - --enable-mmap=yes \ - --disable-debug \ - --with-webhost=zm.local \ - ZM_SSL_LIB="gnutls" \ - ZM_RUNDIR=/var/run/zoneminder \ - ZM_TMPDIR=/var/lib/zoneminder/temp \ -%ifarch x86_64 - CXXFLAGS="-D__STDC_CONSTANT_MACROS -msse2" \ -%else - CXXFLAGS="-D__STDC_CONSTANT_MACROS" \ -%endif - --with-extralibs="" \ - $OPTS - -make %{?_smp_mflags} -%{__perl} -pi -e 's/(ZM_WEB_USER=).*$/${1}%{zmuid_final}/;' \ - -e 's/(ZM_WEB_GROUP=).*$/${1}%{zmgid_final}/;' zm.conf - -%install -install -d %{buildroot}/%{_localstatedir}/run -make install DESTDIR=%{buildroot} \ - INSTALLDIRS=vendor -rm -rf %{buildroot}/%{perl_vendorarch} %{buildroot}/%{perl_archlib} -%{?_without_x10:%{__rm} -f %{buildroot}/%{_bindir}/zmx10.pl} - -install -m 755 -d %{buildroot}/var/log/zoneminder -for dir in events images temp -do - install -m 755 -d %{buildroot}/var/lib/zoneminder/$dir - if [ -d %{buildroot}/%{_datadir}/zoneminder/www/$dir ]; then - rmdir %{buildroot}/%{_datadir}/zoneminder/www/$dir - fi - ln -sf ../../../../var/lib/zoneminder/$dir %{buildroot}/%{_datadir}/zoneminder/www/$dir -done -install -m 755 -d %{buildroot}/var/lib/zoneminder/sock -install -m 755 -d %{buildroot}/var/lib/zoneminder/swap -install -m 755 -d %{buildroot}/var/spool/zoneminder-upload - -install -D -m 644 distros/fedora/zoneminder.conf %{buildroot}/etc/httpd/conf.d/zoneminder.conf -install -D -m 755 distros/fedora/redalert.wav %{buildroot}/%{_datadir}/zoneminder/www/sounds/redalert.wav -install -D -m 644 distros/fedora/zoneminder.service %{buildroot}/%{_unitdir}/zoneminder.service -install -D -m 644 distros/fedora/zoneminder.logrotate %{buildroot}/etc/logrotate.d/zoneminder - -# Install jscalendar - this really should be in its own package -install -d -m 755 %{buildroot}/%{_datadir}/%{name}/www/jscalendar -cp -rp jscalendar-1.0/* %{buildroot}/%{_datadir}/zoneminder/www/jscalendar - -# Set up cambozola -pushd %{buildroot}/%{_datadir}/zoneminder/www -%{__ln_s} ../../java/cambozola.jar -popd - -# Set up mootools -pushd %{buildroot}/%{_datadir}/%{name}/www -ln -f -s tools/mootools/mootools-core-%{moorev}-yc.js mootools-core.js -ln -f -s tools/mootools/mootools-more-%{moorev}.1-yc.js mootools-more.js -popd - -# Create an entry for tmpfiles.d -install -D -m 755 distros/fedora/zoneminder.tmpfiles %{buildroot}/etc/tmpfiles.d/zoneminder.conf - -install -m 755 -d %{buildroot}/run/zoneminder - - -%post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi - -# Allow zoneminder access to local video sources, serial ports, and x10 -/usr/bin/gpasswd -a %{zmuid_final} video -/usr/bin/gpasswd -a %{zmuid_final} dialout - -# Display the README for post installation instructions -/usr/bin/less %{_docdir}/%{name}-%{version}/README.Fedora - -%preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || : - /bin/systemctl stop zoneminder.service > /dev/null 2>&1 || : -fi - -%postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : -fi - -%triggerun -- zoneminder < 1.25.0-4 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply zoneminder -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || : -/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : - - -%files -%defattr(-,root,root,-) -%doc AUTHORS COPYING README.md distros/fedora/README.Fedora jscalendar-doc -%config %attr(640,root,%{zmgid_final}) /etc/zm.conf -%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf -%config(noreplace) /etc/tmpfiles.d/zoneminder.conf -%config(noreplace) /etc/logrotate.d/zoneminder - -%{_unitdir}/zoneminder.service - -%{_bindir}/zma -%{_bindir}/zmaudit.pl -%{_bindir}/zmc -%{_bindir}/zmcontrol.pl -%{_bindir}/zmdc.pl -%{_bindir}/zmf -%{_bindir}/zmfilter.pl -# zmfix removed from zoneminder 1.26.6 -#%attr(4755,root,root) %{_bindir}/zmfix -%{_bindir}/zmpkg.pl -%{_bindir}/zmtrack.pl -%{_bindir}/zmtrigger.pl -%{_bindir}/zmu -%{_bindir}/zmupdate.pl -%{_bindir}/zmvideo.pl -%{_bindir}/zmwatch.pl -%{_bindir}/zmcamtool.pl -%{_bindir}/zmsystemctl.pl -%{!?_without_x10:%{_bindir}/zmx10.pl} -%{_bindir}/zmonvif-probe.pl - -%{perl_vendorlib}/ZoneMinder* -%{perl_vendorlib}/ONVIF* -%{perl_vendorlib}/WSDiscovery* -%{perl_vendorlib}/WSSecurity* -%{_mandir}/man*/* -%dir %{_libexecdir}/zoneminder -%{_libexecdir}/zoneminder/cgi-bin -%dir %{_datadir}/zoneminder -%{_datadir}/zoneminder/db -%{_datadir}/zoneminder/www - -%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy -%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules - -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder - - -%changelog -* Sat Feb 01 2014 Andrew Bauer - 1.27 -- Add zmcamtool.pl. Bump version for 1.27 release. - -* Mon Dec 16 2013 Andrew Bauer - 1.26.5 -- This is a bug fixe release -- RTSP fixes, cmake enhancements, couple other misc fixes - -* Sat Oct 05 2013 Andrew Bauer - 1.26.4 -- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch -- All files are now part of the zoneminder source tree. Update specfile accordingly. - -* Sat Sep 21 2013 Andrew Bauer - 1.26.3 -- Initial rebuild for ZoneMinder 1.26.3 release. - -* Fri Feb 15 2013 Fedora Release Engineering - 1.25.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Mon Jan 21 2013 Adam Tkac - 1.25.0-12 -- rebuild due to "jpeg8-ABI" feature drop - -* Mon Jan 7 2013 Remi Collet - 1.25.0-11 -- fix configuration file for httpd 2.4, #871502 - -* Fri Dec 21 2012 Adam Tkac - 1.25.0-10 -- rebuild against new libjpeg - -* Thu Aug 09 2012 Jason L Tibbitts III - 1.25.0-9 -- Add patch to work around v4l2 api breakage in 3.5 kernel. - -* Sun Jul 22 2012 Fedora Release Engineering - 1.25.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 23 2012 Petr Pisar - 1.25.0-7 -- Perl 5.16 rebuild - -* Wed Mar 21 2012 Jason L Tibbitts III - 1.25.0-6 -- Fix stupid thinko in sql modifications. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-5 -- Clean up macro usage. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-4 -- Convert to systemd. -- Add tmpfiles.d configuration since the initscript isn't around to create - /run/zoneminder. -- Remove some pointless executable permissions. -- Add logrotate file. - -* Wed Feb 22 2012 Jason L Tibbitts III - 1.25.0-3 -- Update README.Fedora to reference systemctl and mention timezone info in - php.ini. -- Add proper default for EYEZM_LOG_TO_FILE. - - -* Thu Feb 09 2012 Jason L Tibbitts III - 1.25.0-2 -- Rebuild for new pcre. - -* Thu Jan 19 2012 Jason L Tibbitts III - 1.25.0-1 -- Update to 1.25.0 -- Fix gcc4.7 build problems. -- Drop gcc4.4 build fixes; for whatever reason they now break the build. -- Clean up old patches. -- Force setting of ZM_TMPDIR and ZM_RUNDIR. - -* Sat Jan 14 2012 Fedora Release Engineering - 1.24.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-3 -- Re-add the dist-tag that somehow got lost. - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-2 -- Add patch for bug 711780 - fix syntax issue in Mapped.pm. -- Undo that patch, and undo another which was the cause of the whole mess. -- Fix up other patches so ZM_PATH_BUILD is both defined and useful. -- Make sure database creation mods actually take. -- Update Fedora-specific docs with some additional info. -- Use bundled mootools (javascript, so no guideline violation). -- Update download location. -- Update the gcrypt patch to actually work. -- Upstream changed the tarball without changing the version to patch a - vulnerability, so redownload. - -* Sun Aug 14 2011 Jason L Tibbitts III - 1.24.4-1 -- Initial attempt to upgrade to 1.24.4. -- Add patch from BZ 460310 to build against libgcrypt instead of requiring the - gnutls openssl libs. - -* Thu Jul 21 2011 Petr Sabata - 1.24.3-7.20110324svn3310 -- Perl mass rebuild - -* Wed Jul 20 2011 Petr Sabata - 1.24.3-6.20110324svn3310 -- Perl mass rebuild - -* Mon May 09 2011 Jason L Tibbitts III - 1.24.3-5.20110324svn3310 -- Bump for gnutls update. - -* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 -- Update to latest 1.24.3 subversion. Turns out that what upstream was calling - 1.24.3 is really just an occasionally updated devel snapshot. -- Rebase various patches. - -* Wed Mar 23 2011 Dan Horák - 1.24.3-3 -- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 -- Update to latest upstream version. -- Rebase patches. -- Initial incomplete attempt to disable v4l1 support. - -* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 -- Unbundle cambozola; instead link to the separately pacakged copy. -- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. -- Git rid of mixed space/tab usage by removing all tabs. -- Remove unnecessary Conflicts: line. -- Attempt to force short_open_tag on for the code directories. -- Move default location of sockets, swaps, logfiles and some temporary files to - make more sense and allow things to work better with a future selinux policy. -- Fix errors in README.Fedora. - -* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 -- rebuild against perl 5.10.1 -- use Perl vendorarch and archlib variables correctly - -* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 -- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 -- Initial update to 1.24.2. -- Rebase patches. -- Update mootools download location. -- Update to mootools 1.2.3. -- Add additional dependencies for some optional features. - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 -- Remove unused Sys::Mmap perl dependency RPM is finding - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 -- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 -- Added noffmpeg patch to make building outside mock easier - -* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 -- Patch for gcc 4.4 compilation errors -- Upgrade to 1.24.1 - -* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 -- rebuild for dependencies - -* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 -- Fix permissions on zm.conf - -* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 -- Initial attempt at packaging 1.23. - -* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 -- Add perl module compat dependency, bz #453590 - -* Tue May 6 2008 Martin Ebourne - 1.22.3-14 -- Remove default runlevel, bz #441315 - -* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 -- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. - -* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 -- Autorebuild for GCC 4.3 - -* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 -- Fix compilation on gcc 4.3 - -* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 -- Rebuild for new openssl - -* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 -- Fix licence tag - -* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 -- Fixes from testing by Jitz including missing dependencies and database creation - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 -- Disable crashtrace on ppc - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 -- Fix uid for directories in /var/lib/zoneminder - -* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 -- Added perl Archive::Tar dependency -- Disabled web interface due to lack of access control on the event images - -* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 -- Changes recommended in review by Jason Tibbitts - -* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 -- Standardised on package name of zoneminder - -* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 -- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/fedora/archive/zoneminder.f20.spec b/distros/fedora/archive/zoneminder.f20.spec deleted file mode 100644 index 513a9cfee..000000000 --- a/distros/fedora/archive/zoneminder.f20.spec +++ /dev/null @@ -1,395 +0,0 @@ -%define zmuid $(id -un) -%define zmgid $(id -gn) -%define zmuid_final apache -%define zmgid_final apache - -%global _hardened_build 1 - -### Delete the lines below to build with ffmpeg and/or x10 -%define _without_ffmpeg 1 -%define _without_x10 1 - -Name: zoneminder -Version: 1.28.1 -Release: 1%{?dist} -Summary: A camera monitoring and analysis tool -Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ -# Mootools is inder the MIT license: http://mootools.net/ -License: GPLv2+ and LGPLv2+ and MIT -URL: http://www.zoneminder.com/ - -#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz -Source: ZoneMinder-%{version}.tar.gz - -BuildRequires: cmake gnutls-devel systemd-units bzip2-devel -BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel -BuildRequires: perl(Archive::Tar) perl(Archive::Zip) perl-podlators -BuildRequires: perl(Date::Manip) perl(DBD::mysql) -BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent) -BuildRequires: perl(MIME::Entity) perl(MIME::Lite) -BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap) -BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign) -BuildRequires: perl(Expect) perl(Sys::Syslog) -BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel} -%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)} -# cmake needs the following installed at build time due to the way it auto-detects certain parameters -BuildRequires: httpd polkit-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg} - -Requires: httpd php php-gd php-mysql cambozola polkit net-tools psmisc -Requires: libjpeg-turbo vlc-core libcurl -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip) -Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP) -Requires: perl(LWP::Protocol::https) -%{!?_without_ffmpeg:Requires: ffmpeg} - -Requires(post): systemd-units systemd-sysv -Requires(post): /usr/bin/gpasswd -Requires(post): /usr/bin/less -Requires(preun): systemd-units -Requires(postun): systemd-units - -%description -ZoneMinder is a set of applications which is intended to provide a complete -solution allowing you to capture, analyse, record and monitor any cameras you -have attached to a Linux based machine. It is designed to run on kernels which -support the Video For Linux (V4L) interface and has been tested with cameras -attached to BTTV cards, various USB cameras and IP network cameras. It is -designed to support as many cameras as you can attach to your computer without -too much degradation of performance. - -%prep -%setup -q -n ZoneMinder-%{version} - -# Change the following default values -./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin/zm/nph-zms -./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes -./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm -./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload -./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes -./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no -./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no - -%build -%cmake \ - -DZM_TARGET_DISTRO="f20" \ -%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \ -%{?_without_x10:-DZM_NO_X10=ON} \ - . - -make %{?_smp_mflags} - -%install -export DESTDIR=%{buildroot} -make install - -%post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi - -# Allow zoneminder access to local video sources, serial ports, and x10 -/usr/bin/gpasswd -a %{zmuid_final} video -/usr/bin/gpasswd -a %{zmuid_final} dialout - -# Display the README for post installation instructions -/usr/bin/less %{_docdir}/%{name}/README.Fedora - -%preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || : - /bin/systemctl stop zoneminder.service > /dev/null 2>&1 || : -fi - -%postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : -fi - -%triggerun -- zoneminder < 1.25.0-4 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply zoneminder -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || : -/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : - - -%files -%defattr(-,root,root,-) -%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/jscalendar-doc -%config %attr(640,root,%{zmgid_final}) /etc/zm.conf -%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf -%config(noreplace) /etc/tmpfiles.d/zoneminder.conf -%config(noreplace) /etc/logrotate.d/zoneminder - -%{_unitdir}/zoneminder.service - -%{_bindir}/zma -%{_bindir}/zmaudit.pl -%{_bindir}/zmc -%{_bindir}/zmcontrol.pl -%{_bindir}/zmdc.pl -%{_bindir}/zmf -%{_bindir}/zmfilter.pl -%{_bindir}/zmpkg.pl -%{_bindir}/zmtrack.pl -%{_bindir}/zmtrigger.pl -%{_bindir}/zmu -%{_bindir}/zmupdate.pl -%{_bindir}/zmvideo.pl -%{_bindir}/zmwatch.pl -%{_bindir}/zmcamtool.pl -%{_bindir}/zmsystemctl.pl -%{!?_without_x10:%{_bindir}/zmx10.pl} - -%{perl_vendorlib}/ZoneMinder* -%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder* -#%{perl_archlib}/ZoneMinder* -%{_mandir}/man*/* -%dir %{_libexecdir}/zoneminder -%{_libexecdir}/zoneminder/cgi-bin -%dir %{_datadir}/zoneminder -%{_datadir}/zoneminder/db -%{_datadir}/zoneminder/www - -%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy -%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules - -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder - - -%changelog -* Sun Oct 5 2014 Andrew Bauer - 1.28.0 -- Bump version for 1.28.0 release. - -* Fri Mar 14 2014 Andrew Bauer - 1.27 -- Tweak build requirements for cmake - -* Sat Feb 01 2014 Andrew Bauer - 1.27 -- Add zmcamtool.pl. Bump version for 1.27 release. - -* Mon Dec 16 2013 Andrew Bauer - 1.26.5 -- This is a bug fixe release -- RTSP fixes, cmake enhancements, couple other misc fixes - -* Mon Oct 07 2013 Andrew Bauer - 1.26.4 -- Initial cmake build. - -* Sat Oct 05 2013 Andrew Bauer - 1.26.4 -- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch -- All files are now part of the zoneminder source tree. Update specfile accordingly. - -* Sat Sep 21 2013 Andrew Bauer - 1.26.3 -- Initial rebuild for ZoneMinder 1.26.3 release. - -* Fri Feb 15 2013 Fedora Release Engineering - 1.25.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Mon Jan 21 2013 Adam Tkac - 1.25.0-12 -- rebuild due to "jpeg8-ABI" feature drop - -* Mon Jan 7 2013 Remi Collet - 1.25.0-11 -- fix configuration file for httpd 2.4, #871502 - -* Fri Dec 21 2012 Adam Tkac - 1.25.0-10 -- rebuild against new libjpeg - -* Thu Aug 09 2012 Jason L Tibbitts III - 1.25.0-9 -- Add patch to work around v4l2 api breakage in 3.5 kernel. - -* Sun Jul 22 2012 Fedora Release Engineering - 1.25.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 23 2012 Petr Pisar - 1.25.0-7 -- Perl 5.16 rebuild - -* Wed Mar 21 2012 Jason L Tibbitts III - 1.25.0-6 -- Fix stupid thinko in sql modifications. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-5 -- Clean up macro usage. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-4 -- Convert to systemd. -- Add tmpfiles.d configuration since the initscript isn't around to create - /run/zoneminder. -- Remove some pointless executable permissions. -- Add logrotate file. - -* Wed Feb 22 2012 Jason L Tibbitts III - 1.25.0-3 -- Update README.Fedora to reference systemctl and mention timezone info in - php.ini. -- Add proper default for EYEZM_LOG_TO_FILE. - - -* Thu Feb 09 2012 Jason L Tibbitts III - 1.25.0-2 -- Rebuild for new pcre. - -* Thu Jan 19 2012 Jason L Tibbitts III - 1.25.0-1 -- Update to 1.25.0 -- Fix gcc4.7 build problems. -- Drop gcc4.4 build fixes; for whatever reason they now break the build. -- Clean up old patches. -- Force setting of ZM_TMPDIR and ZM_RUNDIR. - -* Sat Jan 14 2012 Fedora Release Engineering - 1.24.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-3 -- Re-add the dist-tag that somehow got lost. - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-2 -- Add patch for bug 711780 - fix syntax issue in Mapped.pm. -- Undo that patch, and undo another which was the cause of the whole mess. -- Fix up other patches so ZM_PATH_BUILD is both defined and useful. -- Make sure database creation mods actually take. -- Update Fedora-specific docs with some additional info. -- Use bundled mootools (javascript, so no guideline violation). -- Update download location. -- Update the gcrypt patch to actually work. -- Upstream changed the tarball without changing the version to patch a - vulnerability, so redownload. - -* Sun Aug 14 2011 Jason L Tibbitts III - 1.24.4-1 -- Initial attempt to upgrade to 1.24.4. -- Add patch from BZ 460310 to build against libgcrypt instead of requiring the - gnutls openssl libs. - -* Thu Jul 21 2011 Petr Sabata - 1.24.3-7.20110324svn3310 -- Perl mass rebuild - -* Wed Jul 20 2011 Petr Sabata - 1.24.3-6.20110324svn3310 -- Perl mass rebuild - -* Mon May 09 2011 Jason L Tibbitts III - 1.24.3-5.20110324svn3310 -- Bump for gnutls update. - -* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 -- Update to latest 1.24.3 subversion. Turns out that what upstream was calling - 1.24.3 is really just an occasionally updated devel snapshot. -- Rebase various patches. - -* Wed Mar 23 2011 Dan Horák - 1.24.3-3 -- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 -- Update to latest upstream version. -- Rebase patches. -- Initial incomplete attempt to disable v4l1 support. - -* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 -- Unbundle cambozola; instead link to the separately pacakged copy. -- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. -- Git rid of mixed space/tab usage by removing all tabs. -- Remove unnecessary Conflicts: line. -- Attempt to force short_open_tag on for the code directories. -- Move default location of sockets, swaps, logfiles and some temporary files to - make more sense and allow things to work better with a future selinux policy. -- Fix errors in README.Fedora. - -* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 -- rebuild against perl 5.10.1 -- use Perl vendorarch and archlib variables correctly - -* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 -- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 -- Initial update to 1.24.2. -- Rebase patches. -- Update mootools download location. -- Update to mootools 1.2.3. -- Add additional dependencies for some optional features. - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 -- Remove unused Sys::Mmap perl dependency RPM is finding - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 -- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 -- Added noffmpeg patch to make building outside mock easier - -* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 -- Patch for gcc 4.4 compilation errors -- Upgrade to 1.24.1 - -* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 -- rebuild for dependencies - -* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 -- Fix permissions on zm.conf - -* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 -- Initial attempt at packaging 1.23. - -* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 -- Add perl module compat dependency, bz #453590 - -* Tue May 6 2008 Martin Ebourne - 1.22.3-14 -- Remove default runlevel, bz #441315 - -* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 -- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. - -* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 -- Autorebuild for GCC 4.3 - -* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 -- Fix compilation on gcc 4.3 - -* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 -- Rebuild for new openssl - -* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 -- Fix licence tag - -* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 -- Fixes from testing by Jitz including missing dependencies and database creation - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 -- Disable crashtrace on ppc - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 -- Fix uid for directories in /var/lib/zoneminder - -* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 -- Added perl Archive::Tar dependency -- Disabled web interface due to lack of access control on the event images - -* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 -- Changes recommended in review by Jason Tibbitts - -* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 -- Standardised on package name of zoneminder - -* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 -- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/fedora/archive/zoneminder.f21.spec b/distros/fedora/archive/zoneminder.f21.spec deleted file mode 100644 index 35662bf6c..000000000 --- a/distros/fedora/archive/zoneminder.f21.spec +++ /dev/null @@ -1,396 +0,0 @@ -%define zmuid $(id -un) -%define zmgid $(id -gn) -%define zmuid_final apache -%define zmgid_final apache - -%global _hardened_build 1 - -### Delete the lines below to build with ffmpeg and/or x10 -%define _without_ffmpeg 1 -%define _without_x10 1 - -Name: zoneminder -Version: 1.28.1 -Release: 1%{?dist} -Summary: A camera monitoring and analysis tool -Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ -# Mootools is inder the MIT license: http://mootools.net/ -License: GPLv2+ and LGPLv2+ and MIT -URL: http://www.zoneminder.com/ - -#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz -Source: ZoneMinder-%{version}.tar.gz - -BuildRequires: cmake gnutls-devel systemd-units bzip2-devel -BuildRequires: community-mysql-devel pcre-devel libjpeg-turbo-devel -BuildRequires: perl(Archive::Tar) perl(Archive::Zip) perl-podlators -BuildRequires: perl(Date::Manip) perl(DBD::mysql) -BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent) -BuildRequires: perl(MIME::Entity) perl(MIME::Lite) -BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap) -BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign) -BuildRequires: perl(Expect) perl(Sys::Syslog) -BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel} -%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)} -# cmake needs the following installed at build time due to the way it auto-detects certain parameters -BuildRequires: httpd polkit-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg} - -Requires: httpd php php-gd php-mysql cambozola polkit net-tools psmisc -Requires: libjpeg-turbo vlc-core libcurl -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip) -Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP) -Requires: perl(LWP::Protocol::https) -%{!?_without_ffmpeg:Requires: ffmpeg} - -Requires(post): systemd-units systemd-sysv -Requires(post): /usr/bin/gpasswd -Requires(post): /usr/bin/less -Requires(preun): systemd-units -Requires(postun): systemd-units - -%description -ZoneMinder is a set of applications which is intended to provide a complete -solution allowing you to capture, analyse, record and monitor any cameras you -have attached to a Linux based machine. It is designed to run on kernels which -support the Video For Linux (V4L) interface and has been tested with cameras -attached to BTTV cards, various USB cameras and IP network cameras. It is -designed to support as many cameras as you can attach to your computer without -too much degradation of performance. - -%prep -%setup -q -n ZoneMinder-%{version} - -# Change the following default values -./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin/zm/nph-zms -./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes -./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm -./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload -./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes -./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no -./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no - -%build -%cmake \ - -DZM_TARGET_DISTRO="f21" \ -%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \ -%{?_without_x10:-DZM_NO_X10=ON} \ - . - -make %{?_smp_mflags} - -%install -export DESTDIR=%{buildroot} -make install - -%post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi - -# Allow zoneminder access to local video sources, serial ports, and x10 -/usr/bin/gpasswd -a %{zmuid_final} video -/usr/bin/gpasswd -a %{zmuid_final} dialout - -# Display the README for post installation instructions -/usr/bin/less %{_docdir}/%{name}/README.Fedora - -%preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || : - /bin/systemctl stop zoneminder.service > /dev/null 2>&1 || : -fi - -%postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : -fi - -%triggerun -- zoneminder < 1.25.0-4 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply zoneminder -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || : -/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : - - -%files -%defattr(-,root,root,-) -%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/jscalendar-doc -%config %attr(640,root,%{zmgid_final}) /etc/zm/zm.conf -%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf -%config(noreplace) /etc/tmpfiles.d/zoneminder.conf -%config(noreplace) /etc/logrotate.d/zoneminder - -%{_unitdir}/zoneminder.service - -%{_bindir}/zma -%{_bindir}/zmaudit.pl -%{_bindir}/zmc -%{_bindir}/zmcontrol.pl -%{_bindir}/zmdc.pl -%{_bindir}/zmf -%{_bindir}/zmfilter.pl -%{_bindir}/zmpkg.pl -%{_bindir}/zmtrack.pl -%{_bindir}/zmtrigger.pl -%{_bindir}/zmu -%{_bindir}/zmupdate.pl -%{_bindir}/zmvideo.pl -%{_bindir}/zmwatch.pl -%{_bindir}/zmcamtool.pl -%{_bindir}/zmsystemctl.pl -%{!?_without_x10:%{_bindir}/zmx10.pl} - -%{perl_vendorlib}/ZoneMinder* -%{_mandir}/man*/* -%dir %{_libexecdir}/zoneminder -%{_libexecdir}/zoneminder/cgi-bin -%dir %{_datadir}/zoneminder -%{_datadir}/zoneminder/db -%{_datadir}/zoneminder/www - -%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy -%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules - -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder - - -%changelog -* Sat Feb 14 2015 Andrew Bauer - 1.28.1 -- Bump version for 1.28.1 release on Fedora 21. - -* Sun Oct 5 2014 Andrew Bauer - 1.28.0 -- Bump version for 1.28.0 release. - -* Fri Mar 14 2014 Andrew Bauer - 1.27 -- Tweak build requirements for cmake - -* Sat Feb 01 2014 Andrew Bauer - 1.27 -- Add zmcamtool.pl. Bump version for 1.27 release. - -* Mon Dec 16 2013 Andrew Bauer - 1.26.5 -- This is a bug fixe release -- RTSP fixes, cmake enhancements, couple other misc fixes - -* Mon Oct 07 2013 Andrew Bauer - 1.26.4 -- Initial cmake build. - -* Sat Oct 05 2013 Andrew Bauer - 1.26.4 -- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch -- All files are now part of the zoneminder source tree. Update specfile accordingly. - -* Sat Sep 21 2013 Andrew Bauer - 1.26.3 -- Initial rebuild for ZoneMinder 1.26.3 release. - -* Fri Feb 15 2013 Fedora Release Engineering - 1.25.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Mon Jan 21 2013 Adam Tkac - 1.25.0-12 -- rebuild due to "jpeg8-ABI" feature drop - -* Mon Jan 7 2013 Remi Collet - 1.25.0-11 -- fix configuration file for httpd 2.4, #871502 - -* Fri Dec 21 2012 Adam Tkac - 1.25.0-10 -- rebuild against new libjpeg - -* Thu Aug 09 2012 Jason L Tibbitts III - 1.25.0-9 -- Add patch to work around v4l2 api breakage in 3.5 kernel. - -* Sun Jul 22 2012 Fedora Release Engineering - 1.25.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 23 2012 Petr Pisar - 1.25.0-7 -- Perl 5.16 rebuild - -* Wed Mar 21 2012 Jason L Tibbitts III - 1.25.0-6 -- Fix stupid thinko in sql modifications. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-5 -- Clean up macro usage. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-4 -- Convert to systemd. -- Add tmpfiles.d configuration since the initscript isn't around to create - /run/zoneminder. -- Remove some pointless executable permissions. -- Add logrotate file. - -* Wed Feb 22 2012 Jason L Tibbitts III - 1.25.0-3 -- Update README.Fedora to reference systemctl and mention timezone info in - php.ini. -- Add proper default for EYEZM_LOG_TO_FILE. - - -* Thu Feb 09 2012 Jason L Tibbitts III - 1.25.0-2 -- Rebuild for new pcre. - -* Thu Jan 19 2012 Jason L Tibbitts III - 1.25.0-1 -- Update to 1.25.0 -- Fix gcc4.7 build problems. -- Drop gcc4.4 build fixes; for whatever reason they now break the build. -- Clean up old patches. -- Force setting of ZM_TMPDIR and ZM_RUNDIR. - -* Sat Jan 14 2012 Fedora Release Engineering - 1.24.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-3 -- Re-add the dist-tag that somehow got lost. - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-2 -- Add patch for bug 711780 - fix syntax issue in Mapped.pm. -- Undo that patch, and undo another which was the cause of the whole mess. -- Fix up other patches so ZM_PATH_BUILD is both defined and useful. -- Make sure database creation mods actually take. -- Update Fedora-specific docs with some additional info. -- Use bundled mootools (javascript, so no guideline violation). -- Update download location. -- Update the gcrypt patch to actually work. -- Upstream changed the tarball without changing the version to patch a - vulnerability, so redownload. - -* Sun Aug 14 2011 Jason L Tibbitts III - 1.24.4-1 -- Initial attempt to upgrade to 1.24.4. -- Add patch from BZ 460310 to build against libgcrypt instead of requiring the - gnutls openssl libs. - -* Thu Jul 21 2011 Petr Sabata - 1.24.3-7.20110324svn3310 -- Perl mass rebuild - -* Wed Jul 20 2011 Petr Sabata - 1.24.3-6.20110324svn3310 -- Perl mass rebuild - -* Mon May 09 2011 Jason L Tibbitts III - 1.24.3-5.20110324svn3310 -- Bump for gnutls update. - -* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 -- Update to latest 1.24.3 subversion. Turns out that what upstream was calling - 1.24.3 is really just an occasionally updated devel snapshot. -- Rebase various patches. - -* Wed Mar 23 2011 Dan Horák - 1.24.3-3 -- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 -- Update to latest upstream version. -- Rebase patches. -- Initial incomplete attempt to disable v4l1 support. - -* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 -- Unbundle cambozola; instead link to the separately pacakged copy. -- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. -- Git rid of mixed space/tab usage by removing all tabs. -- Remove unnecessary Conflicts: line. -- Attempt to force short_open_tag on for the code directories. -- Move default location of sockets, swaps, logfiles and some temporary files to - make more sense and allow things to work better with a future selinux policy. -- Fix errors in README.Fedora. - -* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 -- rebuild against perl 5.10.1 -- use Perl vendorarch and archlib variables correctly - -* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 -- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 -- Initial update to 1.24.2. -- Rebase patches. -- Update mootools download location. -- Update to mootools 1.2.3. -- Add additional dependencies for some optional features. - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 -- Remove unused Sys::Mmap perl dependency RPM is finding - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 -- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 -- Added noffmpeg patch to make building outside mock easier - -* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 -- Patch for gcc 4.4 compilation errors -- Upgrade to 1.24.1 - -* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 -- rebuild for dependencies - -* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 -- Fix permissions on zm.conf - -* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 -- Initial attempt at packaging 1.23. - -* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 -- Add perl module compat dependency, bz #453590 - -* Tue May 6 2008 Martin Ebourne - 1.22.3-14 -- Remove default runlevel, bz #441315 - -* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 -- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. - -* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 -- Autorebuild for GCC 4.3 - -* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 -- Fix compilation on gcc 4.3 - -* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 -- Rebuild for new openssl - -* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 -- Fix licence tag - -* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 -- Fixes from testing by Jitz including missing dependencies and database creation - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 -- Disable crashtrace on ppc - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 -- Fix uid for directories in /var/lib/zoneminder - -* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 -- Added perl Archive::Tar dependency -- Disabled web interface due to lack of access control on the event images - -* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 -- Changes recommended in review by Jason Tibbitts - -* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 -- Standardised on package name of zoneminder - -* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 -- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/fedora/archive/zoneminder.logrotate b/distros/fedora/archive/zoneminder.logrotate deleted file mode 100644 index 7bd1d189b..000000000 --- a/distros/fedora/archive/zoneminder.logrotate +++ /dev/null @@ -1,8 +0,0 @@ -/var/log/zoneminder/*.log { - missingok - notifempty - sharedscripts - postrotate - /usr/bin/zmpkg.pl logrot 2> /dev/null > /dev/null || : - endscript -} diff --git a/distros/fedora/archive/zoneminder.service b/distros/fedora/archive/zoneminder.service deleted file mode 100644 index fdd9b3af2..000000000 --- a/distros/fedora/archive/zoneminder.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Video security and surveillance system -After=mysqld.service - -[Service] -Type=forking -ExecStart=/usr/bin/zmpkg.pl start -ExecReload=/usr/bin/zmpkg.pl reload -PIDFile=/run/zoneminder/zm.pid - -[Install] -WantedBy=multi-user.target - diff --git a/distros/fedora/archive/zoneminder.tmpfiles b/distros/fedora/archive/zoneminder.tmpfiles deleted file mode 100644 index a56fa54ba..000000000 --- a/distros/fedora/archive/zoneminder.tmpfiles +++ /dev/null @@ -1 +0,0 @@ -d /run/zoneminder 0755 apache apache diff --git a/distros/fedora/jscalendar.sh b/distros/fedora/jscalendar.sh deleted file mode 120000 index 0d12509bb..000000000 --- a/distros/fedora/jscalendar.sh +++ /dev/null @@ -1 +0,0 @@ -../redhat/jscalendar.sh \ No newline at end of file diff --git a/distros/fedora/redalert.wav b/distros/fedora/redalert.wav deleted file mode 120000 index eec3dce64..000000000 --- a/distros/fedora/redalert.wav +++ /dev/null @@ -1 +0,0 @@ -../redhat/redalert.wav \ No newline at end of file diff --git a/distros/fedora/zoneminder-1.28.0-defaults.patch b/distros/fedora/zoneminder-1.28.0-defaults.patch deleted file mode 100644 index 30d4d87e4..000000000 --- a/distros/fedora/zoneminder-1.28.0-defaults.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2013-08-01 18:14:45.175241378 -0500 -+++ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in.defaults 2013-08-07 18:57:42.525006149 -0500 -@@ -187,7 +187,7 @@ - }, - { - name => "ZM_PATH_ZMS", -- default => "/cgi-bin/nph-zms", -+ default => "/cgi-bin/zm/nph-zms", - description => "Web path to zms streaming server", - help => "The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.", - type => $types{rel_path}, -@@ -276,7 +276,7 @@ - }, - { - name => "ZM_OPT_CAMBOZOLA", -- default => "no", -+ default => "yes", - description => "Is the (optional) cambozola java streaming client installed", - help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.", - type => $types{boolean}, -@@ -639,7 +639,7 @@ - }, - { - name => "ZM_PATH_SWAP", -- default => "@ZM_TMPDIR@", -+ default => "/dev/shm", - description => "Path to location for temporary swap images used in streaming", - help => "Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.", - type => $types{abs_path}, -@@ -902,7 +902,7 @@ - }, - { - name => "ZM_UPLOAD_FTP_LOC_DIR", -- default => "@ZM_TMPDIR@", -+ default => "/var/spool/zoneminder-upload", - description => "The local directory in which to create upload files", - help => "You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.", - requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], -@@ -1258,7 +1258,7 @@ - }, - { - name => "ZM_OPT_CONTROL", -- default => "no", -+ default => "yes", - description => "Support controllable (e.g. PTZ) cameras", - help => "ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.", - type => $types{boolean}, diff --git a/distros/fedora/zoneminder.conf.in b/distros/fedora/zoneminder.conf.in deleted file mode 120000 index fd0098cf5..000000000 --- a/distros/fedora/zoneminder.conf.in +++ /dev/null @@ -1 +0,0 @@ -../redhat/zoneminder.el7.conf.in \ No newline at end of file diff --git a/distros/fedora/zoneminder.f22.spec b/distros/fedora/zoneminder.f22.spec deleted file mode 120000 index 808e7cb9f..000000000 --- a/distros/fedora/zoneminder.f22.spec +++ /dev/null @@ -1 +0,0 @@ -zoneminder.f23.spec \ No newline at end of file diff --git a/distros/fedora/zoneminder.f23.spec b/distros/fedora/zoneminder.f23.spec deleted file mode 100644 index 5335b90cc..000000000 --- a/distros/fedora/zoneminder.f23.spec +++ /dev/null @@ -1,429 +0,0 @@ -%define zmuid $(id -un) -%define zmgid $(id -gn) -%define zmuid_final apache -%define zmgid_final apache - -%global _hardened_build 1 - -### Delete the lines below to build with ffmpeg and/or x10 -%define _without_ffmpeg 1 -%define _without_x10 1 - -Name: zoneminder -Version: 1.30.0 -Release: 1%{?dist} -Summary: A camera monitoring and analysis tool -Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ -# Mootools is inder the MIT license: http://mootools.net/ -License: GPLv2+ and LGPLv2+ and MIT -URL: http://www.zoneminder.com/ - -#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz -Source: ZoneMinder-%{version}.tar.gz - -BuildRequires: cmake gnutls-devel systemd-units bzip2-devel -BuildRequires: mariadb-devel pcre-devel libjpeg-turbo-devel -BuildRequires: perl(Archive::Tar) perl(Archive::Zip) perl-podlators -BuildRequires: perl(Date::Manip) perl(DBD::mysql) -BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent) -BuildRequires: perl(MIME::Entity) perl(MIME::Lite) -BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap) -BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign) -BuildRequires: perl(Expect) perl(Sys::Syslog) -BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg-devel} -%{!?_without_x10:BuildRequires: perl(X10::ActiveHome) perl(Astro::SunTime)} -# cmake needs the following installed at build time due to the way it auto-detects certain parameters -BuildRequires: httpd polkit-devel -%{!?_without_ffmpeg:BuildRequires: ffmpeg} - -Requires: httpd php php-gd php-mysql cambozola polkit net-tools psmisc -Requires: libjpeg-turbo vlc-core libcurl -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip) -Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP) -Requires: perl(LWP::Protocol::https) -%{!?_without_ffmpeg:Requires: ffmpeg} - -Requires(post): systemd-units systemd-sysv -Requires(post): /usr/bin/gpasswd -Requires(post): /usr/bin/less -Requires(preun): systemd-units -Requires(postun): systemd-units - -%description -ZoneMinder is a set of applications which is intended to provide a complete -solution allowing you to capture, analyse, record and monitor any cameras you -have attached to a Linux based machine. It is designed to run on kernels which -support the Video For Linux (V4L) interface and has been tested with cameras -attached to BTTV cards, various USB cameras and IP network cameras. It is -designed to support as many cameras as you can attach to your computer without -too much degradation of performance. - -%prep -%setup -q -n ZoneMinder-%{version} - -# Change the following default values -./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin-zm/nph-zms -./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes -./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm -./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload -./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes -./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no -./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no -./utils/zmeditconfigdata.sh ZM_OPT_FAST_DELETE no - -%build -%cmake \ - -DZM_TARGET_DISTRO="f23" \ -%{?_without_ffmpeg:-DZM_NO_FFMPEG=ON} \ -%{?_without_x10:-DZM_NO_X10=ON} \ - . - -make %{?_smp_mflags} - -%install -export DESTDIR=%{buildroot} -make install - -%post - -# Add any new PTZ control configurations to the database (will not overwrite) -%{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || : - -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi - -# Allow zoneminder access to local video sources, serial ports, and x10 -/usr/bin/gpasswd -a %{zmuid_final} video -/usr/bin/gpasswd -a %{zmuid_final} dialout - -# Upgrade from a previous version of zoneminder -if [ $1 -eq 2 ] ; then - - # Add any new PTZ control configurations to the database (will not overwrite) - %{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || : - - # Freshen the database - %{_bindir}/zmupdate.pl -f >/dev/null 2>&1 || : - - # We can't run this automatically when new sql account permissions need to - # be manually added first - # Run zmupdate non-interactively - #/usr/bin/zmupdate.pl --nointeractive -fi - -# Warn the end user to read the README file -echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, read README.Fedora to finish the\ninstallation or upgrade!\n" -echo -e "\nThe README file is located here: %{_docdir}/%{name}\n" - -%preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || : - /bin/systemctl stop zoneminder.service > /dev/null 2>&1 || : -fi - -%postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : -fi - -%triggerun -- zoneminder < 1.25.0-4 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply zoneminder -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || : -/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : - - -%files -%defattr(-,root,root,-) -%doc AUTHORS COPYING README.md distros/fedora/README.Fedora distros/fedora/README.https distros/fedora/jscalendar-doc -%config %attr(640,root,%{zmgid_final}) /etc/zm/zm.conf -%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf -%config(noreplace) /etc/tmpfiles.d/zoneminder.conf -%config(noreplace) /etc/logrotate.d/zoneminder - -%{_unitdir}/zoneminder.service - -%{_bindir}/zma -%{_bindir}/zmaudit.pl -%{_bindir}/zmc -%{_bindir}/zmcontrol.pl -%{_bindir}/zmdc.pl -%{_bindir}/zmf -%{_bindir}/zmfilter.pl -%{_bindir}/zmpkg.pl -%{_bindir}/zmtrack.pl -%{_bindir}/zmtrigger.pl -%{_bindir}/zmu -%{_bindir}/zmupdate.pl -%{_bindir}/zmvideo.pl -%{_bindir}/zmwatch.pl -%{_bindir}/zmcamtool.pl -%{_bindir}/zmsystemctl.pl -%{_bindir}/zmtelemetry.pl -%{!?_without_x10:%{_bindir}/zmx10.pl} -%{_bindir}/zmonvif-probe.pl - -%{perl_vendorlib}/ZoneMinder* -%{perl_vendorlib}/ONVIF* -%{perl_vendorlib}/WSDiscovery* -%{perl_vendorlib}/WSSecurity* -%{perl_vendorlib}/WSNotification* -%{_mandir}/man*/* -%dir %{_libexecdir}/zoneminder -%{_libexecdir}/zoneminder/cgi-bin -%dir %{_datadir}/zoneminder -%{_datadir}/zoneminder/db -%{_datadir}/zoneminder/www - -%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy -%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules - -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder - - -%changelog -* Thu Mar 3 2016 Andrew Bauer - 1.30.0 -- Bump version fo 1.30.0 release. - -* Sat Nov 21 2015 Andrew Bauer - 1.29.0 -- Bump version for 1.29.0 release on Fedora 23. - -* Sat Feb 14 2015 Andrew Bauer - 1.28.1 -- Bump version for 1.28.1 release on Fedora 21. - -* Sun Oct 5 2014 Andrew Bauer - 1.28.0 -- Bump version for 1.28.0 release. - -* Fri Mar 14 2014 Andrew Bauer - 1.27 -- Tweak build requirements for cmake - -* Sat Feb 01 2014 Andrew Bauer - 1.27 -- Add zmcamtool.pl. Bump version for 1.27 release. - -* Mon Dec 16 2013 Andrew Bauer - 1.26.5 -- This is a bug fixe release -- RTSP fixes, cmake enhancements, couple other misc fixes - -* Mon Oct 07 2013 Andrew Bauer - 1.26.4 -- Initial cmake build. - -* Sat Oct 05 2013 Andrew Bauer - 1.26.4 -- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch -- All files are now part of the zoneminder source tree. Update specfile accordingly. - -* Sat Sep 21 2013 Andrew Bauer - 1.26.3 -- Initial rebuild for ZoneMinder 1.26.3 release. - -* Fri Feb 15 2013 Fedora Release Engineering - 1.25.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Mon Jan 21 2013 Adam Tkac - 1.25.0-12 -- rebuild due to "jpeg8-ABI" feature drop - -* Mon Jan 7 2013 Remi Collet - 1.25.0-11 -- fix configuration file for httpd 2.4, #871502 - -* Fri Dec 21 2012 Adam Tkac - 1.25.0-10 -- rebuild against new libjpeg - -* Thu Aug 09 2012 Jason L Tibbitts III - 1.25.0-9 -- Add patch to work around v4l2 api breakage in 3.5 kernel. - -* Sun Jul 22 2012 Fedora Release Engineering - 1.25.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 23 2012 Petr Pisar - 1.25.0-7 -- Perl 5.16 rebuild - -* Wed Mar 21 2012 Jason L Tibbitts III - 1.25.0-6 -- Fix stupid thinko in sql modifications. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-5 -- Clean up macro usage. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-4 -- Convert to systemd. -- Add tmpfiles.d configuration since the initscript isn't around to create - /run/zoneminder. -- Remove some pointless executable permissions. -- Add logrotate file. - -* Wed Feb 22 2012 Jason L Tibbitts III - 1.25.0-3 -- Update README.Fedora to reference systemctl and mention timezone info in - php.ini. -- Add proper default for EYEZM_LOG_TO_FILE. - - -* Thu Feb 09 2012 Jason L Tibbitts III - 1.25.0-2 -- Rebuild for new pcre. - -* Thu Jan 19 2012 Jason L Tibbitts III - 1.25.0-1 -- Update to 1.25.0 -- Fix gcc4.7 build problems. -- Drop gcc4.4 build fixes; for whatever reason they now break the build. -- Clean up old patches. -- Force setting of ZM_TMPDIR and ZM_RUNDIR. - -* Sat Jan 14 2012 Fedora Release Engineering - 1.24.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-3 -- Re-add the dist-tag that somehow got lost. - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-2 -- Add patch for bug 711780 - fix syntax issue in Mapped.pm. -- Undo that patch, and undo another which was the cause of the whole mess. -- Fix up other patches so ZM_PATH_BUILD is both defined and useful. -- Make sure database creation mods actually take. -- Update Fedora-specific docs with some additional info. -- Use bundled mootools (javascript, so no guideline violation). -- Update download location. -- Update the gcrypt patch to actually work. -- Upstream changed the tarball without changing the version to patch a - vulnerability, so redownload. - -* Sun Aug 14 2011 Jason L Tibbitts III - 1.24.4-1 -- Initial attempt to upgrade to 1.24.4. -- Add patch from BZ 460310 to build against libgcrypt instead of requiring the - gnutls openssl libs. - -* Thu Jul 21 2011 Petr Sabata - 1.24.3-7.20110324svn3310 -- Perl mass rebuild - -* Wed Jul 20 2011 Petr Sabata - 1.24.3-6.20110324svn3310 -- Perl mass rebuild - -* Mon May 09 2011 Jason L Tibbitts III - 1.24.3-5.20110324svn3310 -- Bump for gnutls update. - -* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 -- Update to latest 1.24.3 subversion. Turns out that what upstream was calling - 1.24.3 is really just an occasionally updated devel snapshot. -- Rebase various patches. - -* Wed Mar 23 2011 Dan Horák - 1.24.3-3 -- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 -- Update to latest upstream version. -- Rebase patches. -- Initial incomplete attempt to disable v4l1 support. - -* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 -- Unbundle cambozola; instead link to the separately pacakged copy. -- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. -- Git rid of mixed space/tab usage by removing all tabs. -- Remove unnecessary Conflicts: line. -- Attempt to force short_open_tag on for the code directories. -- Move default location of sockets, swaps, logfiles and some temporary files to - make more sense and allow things to work better with a future selinux policy. -- Fix errors in README.Fedora. - -* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 -- rebuild against perl 5.10.1 -- use Perl vendorarch and archlib variables correctly - -* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 -- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 -- Initial update to 1.24.2. -- Rebase patches. -- Update mootools download location. -- Update to mootools 1.2.3. -- Add additional dependencies for some optional features. - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 -- Remove unused Sys::Mmap perl dependency RPM is finding - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 -- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 -- Added noffmpeg patch to make building outside mock easier - -* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 -- Patch for gcc 4.4 compilation errors -- Upgrade to 1.24.1 - -* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 -- rebuild for dependencies - -* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 -- Fix permissions on zm.conf - -* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 -- Initial attempt at packaging 1.23. - -* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 -- Add perl module compat dependency, bz #453590 - -* Tue May 6 2008 Martin Ebourne - 1.22.3-14 -- Remove default runlevel, bz #441315 - -* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 -- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. - -* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 -- Autorebuild for GCC 4.3 - -* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 -- Fix compilation on gcc 4.3 - -* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 -- Rebuild for new openssl - -* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 -- Fix licence tag - -* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 -- Fixes from testing by Jitz including missing dependencies and database creation - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 -- Disable crashtrace on ppc - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 -- Fix uid for directories in /var/lib/zoneminder - -* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 -- Added perl Archive::Tar dependency -- Disabled web interface due to lack of access control on the event images - -* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 -- Changes recommended in review by Jason Tibbitts - -* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 -- Standardised on package name of zoneminder - -* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 -- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/fedora/zoneminder.logrotate.in b/distros/fedora/zoneminder.logrotate.in deleted file mode 120000 index c7e334ca4..000000000 --- a/distros/fedora/zoneminder.logrotate.in +++ /dev/null @@ -1 +0,0 @@ -../redhat/zoneminder.el7.logrotate.in \ No newline at end of file diff --git a/distros/fedora/zoneminder.service.in b/distros/fedora/zoneminder.service.in deleted file mode 100644 index 8c6214b42..000000000 --- a/distros/fedora/zoneminder.service.in +++ /dev/null @@ -1,18 +0,0 @@ -# ZoneMinder systemd unit file for Fedora -# Replace mariadb with community-mysql if using mysql service instead of mariadb - -[Unit] -Description=ZoneMinder CCTV recording and security system -After=network.target mariadb.service httpd.service -Requires=mariadb.service httpd.service - -[Service] -User=@WEB_USER@ -Type=forking -ExecStart=@BINDIR@/zmpkg.pl start -ExecReload=@BINDIR@/zmpkg.pl restart -ExecStop=@BINDIR@/zmpkg.pl stop -PIDFile="@ZM_RUNDIR@/zm.pid" - -[Install] -WantedBy=multi-user.target diff --git a/distros/fedora/zoneminder.tmpfiles.in b/distros/fedora/zoneminder.tmpfiles.in deleted file mode 120000 index 0e4f721f6..000000000 --- a/distros/fedora/zoneminder.tmpfiles.in +++ /dev/null @@ -1 +0,0 @@ -../redhat/zoneminder.tmpfiles.in \ No newline at end of file diff --git a/distros/opensuse/CMakeLists.txt b/distros/opensuse/CMakeLists.txt index 10654f26d..6ce1a999f 100644 --- a/distros/opensuse/CMakeLists.txt +++ b/distros/opensuse/CMakeLists.txt @@ -8,16 +8,6 @@ SET(zmgid_final www) SET(webroot /srv/www/htdocs) SET(zm_webdir ${webroot}/zoneminder) -# Download jscalendar & move files into position -file(DOWNLOAD http://downloads.sourceforge.net/jscalendar/jscalendar-1.0.zip ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar-1.0.zip STATUS download_jsc) -if(download_jsc EQUAL 0) -message(STATUS "Jscalander successfully downloaded. Installing...") -execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ERROR_VARIABLE unzip_jsc) -message(STATUS "Status of jscalender script was: ${unzip_jsc}") -else(download_jsc EQUAL 0) -message(STATUS "Unable to download optional jscalander. Skipping...") -endif(download_jsc EQUAL 0) - # Create several empty folders file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp) @@ -45,7 +35,3 @@ install(FILES zoneminder.tmpfiles DESTINATION /etc/tmpfiles.d RENAME zoneminder. install(FILES redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) -# Install jscalendar -if(unzip_jsc STREQUAL "") -install(DIRECTORY jscalendar-1.0/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/tools/jscalendar) -endif(unzip_jsc STREQUAL "") diff --git a/distros/opensuse/jscalendar.sh b/distros/opensuse/jscalendar.sh deleted file mode 100755 index 80acaafec..000000000 --- a/distros/opensuse/jscalendar.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -unzip -o jscalendar-1.0.zip -mkdir -v jscalendar-doc -cd jscalendar-1.0 -mv -v *html *php doc/* README ../jscalendar-doc -rmdir -v doc diff --git a/distros/opensuse/redalert.wav b/distros/opensuse/redalert.wav index eec3dce64..7469d4f3b 120000 --- a/distros/opensuse/redalert.wav +++ b/distros/opensuse/redalert.wav @@ -1 +1 @@ -../redhat/redalert.wav \ No newline at end of file +../redhat/misc/redalert.wav \ No newline at end of file diff --git a/distros/opensuse/zoneminder.cmake.OS13.spec b/distros/opensuse/zoneminder.cmake.OS13.spec index e1a55d3cb..e1ed14325 100644 --- a/distros/opensuse/zoneminder.cmake.OS13.spec +++ b/distros/opensuse/zoneminder.cmake.OS13.spec @@ -16,7 +16,6 @@ Version: 1.27.0 Release: 1%{?dist} Summary: A camera monitoring and analysis tool Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ # Mootools is under the MIT license: http://mootools.net/ License: GPLv2+ and LGPLv2+ and MIT URL: http://www.zoneminder.com/ @@ -141,7 +140,7 @@ fi %files %defattr(-,root,root,-) -%doc AUTHORS COPYING README.md distros/opensuse/README.OpenSuse distros/opensuse/jscalendar-doc +%doc AUTHORS COPYING README.md distros/opensuse/README.OpenSuse %docdir /opt/zoneminder/share/man %config %attr(640,root,%{zmgid_final}) /etc/zm.conf %config(noreplace) %attr(644,root,root) /etc/apache2/conf.d/zoneminder.conf diff --git a/distros/redhat/CMakeLists.txt b/distros/redhat/CMakeLists.txt index 5de834109..f1a1bc75b 100644 --- a/distros/redhat/CMakeLists.txt +++ b/distros/redhat/CMakeLists.txt @@ -1,81 +1,82 @@ -# CMakeLists.txt for the Redhat/CentOS Target Distro. +# CMakeLists.txt for the Redhat Target Distros. + +# +# General strategy is to configure and install all files specific to Apache and Nginx +# Then let the rpm specfile sort them into the appropriate sub-package +# # Display a message to show the RHEL build options are being processed. -message([STATUS] "Starting RHEL Build Options" ...) +if(ZM_TARGET_DISTRO MATCHES "^el") + message([STATUS] "Starting RHEL Build Options" ...) +elseif(ZM_TARGET_DISTRO MATCHES "^fc") + message([STATUS] "Starting Fedora Build Options" ...) +else(ZM_TARGET_DISTRO MATCHES "^el") + message([WARNING] "Unknown Build Option Detected" ...) +endif(ZM_TARGET_DISTRO MATCHES "^el") -# Create the zoneminder service file -if(ZM_TARGET_DISTRO STREQUAL "el7") - configure_file(zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) - configure_file(zoneminder.el7.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el7.conf @ONLY) - configure_file(zoneminder.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.tmpfiles @ONLY) - configure_file(zoneminder.el7.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el7.logrotate @ONLY) -else(ZM_TARGET_DISTRO STREQUAL "el7") - configure_file(zoneminder.sysvinit.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.sysvinit @ONLY) - configure_file(zoneminder.el6.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el6.logrotate @ONLY) - configure_file(zoneminder.el6.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.el6.conf @ONLY) -endif(ZM_TARGET_DISTRO STREQUAL "el7") +# +# CONFIGURE STAGE +# -# Download jscalendar & move files into position -file(DOWNLOAD http://iweb.dl.sourceforge.net/project/jscalendar/jscalendar/1.0/jscalendar-1.0.zip ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar-1.0.zip LOG jsc_log STATUS download_jsc) -#message(STATUS "Log of jscalender script was: ${jsc_log}") -if(download_jsc EQUAL 0) - message(STATUS "Jscalander successfully downloaded. Installing...") - execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/jscalendar.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ERROR_VARIABLE unzip_jsc) - message(STATUS "Status of jscalender script was: ${unzip_jsc}") -else(download_jsc EQUAL 0) - message(STATUS "Unable to download optional jscalander. Skipping...") -endif(download_jsc EQUAL 0) +# Configure the common zoneminder files +configure_file(common/zoneminder.logrotate.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.logrotate @ONLY) +configure_file(common/zoneminder.service.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.service @ONLY) +file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events temp) -# Cambozola is now packaged in zmrepo -# Download cambozola & move files into position -#file(DOWNLOAD http://www.andywilcock.com/code/cambozola/cambozola-0.931.tar.gz ${CMAKE_CURRENT_SOURCE_DIR}/cambozola-0.931.tar.gz STATUS download_camb) -#if(download_camb EQUAL 0) -# message(STATUS "Cambozola successfully downloaded. Installing...") -# execute_process(COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/cambozola.sh WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ERROR_VARIABLE untar_camb) -# message(STATUS "Status of cambozola script was: ${untar_camb}") -#else(download_camb EQUAL 0) -# message(STATUS "Unable to download optional Cambozola. Skipping...") -#endif(download_camb EQUAL 0) +# Configure the Apache zoneminder files +configure_file(httpd/zm-httpd.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zm-httpd.conf @ONLY) +configure_file(httpd/zoneminder.httpd.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.httpd.conf @ONLY) +configure_file(httpd/zoneminder.httpd.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.httpd.tmpfiles.conf @ONLY) +configure_file(httpd/com.zoneminder.systemctl.rules.httpd.in ${CMAKE_CURRENT_SOURCE_DIR}/com.zoneminder.systemctl.rules.httpd @ONLY) -# Create several empty folders -file(MAKE_DIRECTORY sock swap zoneminder zoneminder-upload events images temp) +# Configure the Nginx zoneminder files +configure_file(nginx/zm-nginx.conf ${CMAKE_CURRENT_SOURCE_DIR}/zm-nginx.conf COPYONLY) +configure_file(nginx/zoneminder.nginx.conf.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.nginx.conf @ONLY) +configure_file(nginx/redirect.nginx.conf ${CMAKE_CURRENT_SOURCE_DIR}/redirect.nginx.conf COPYONLY) +configure_file(nginx/zoneminder.nginx.tmpfiles.in ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.nginx.tmpfiles.conf @ONLY) +configure_file(nginx/zm-web-user.conf ${CMAKE_CURRENT_SOURCE_DIR}/zm-web-user.conf COPYONLY) +configure_file(nginx/zoneminder.php-fpm.conf ${CMAKE_CURRENT_SOURCE_DIR}/zoneminder.php-fpm.conf COPYONLY) +configure_file(nginx/com.zoneminder.systemctl.rules.nginx ${CMAKE_CURRENT_SOURCE_DIR}/com.zoneminder.systemctl.rules.nginx COPYONLY) + +# +# INSTALLATION STAGE +# + + +# Install the common zoneminder files +install(FILES zoneminder.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) -# Install the empty folders -#install(DIRECTORY run DESTINATION /var DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_WRITE GROUP_READ GROUP_EXECUTE WORLD_WRITE WORLD_READ WORLD_EXECUTE) install(DIRECTORY sock swap DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(DIRECTORY zoneminder DESTINATION /var/log DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(DIRECTORY zoneminder DESTINATION /run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +install(DIRECTORY zoneminder DESTINATION /var/run DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +install(DIRECTORY zoneminder DESTINATION /var/cache DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) install(DIRECTORY zoneminder-upload DESTINATION /var/spool DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -install(DIRECTORY events images temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) +install(DIRECTORY events temp DESTINATION /var/lib/zoneminder DIRECTORY_PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -# Create symlinks -install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/events \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/events\")") -install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/images \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/images\")") -install(CODE "execute_process(COMMAND ln -sf ../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/temp\")") +# Install the Apache zoneminder files +install(FILES zm-httpd.conf DESTINATION /usr/lib/systemd/system/zoneminder.service.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES zoneminder.httpd.conf DESTINATION /etc/zm/www PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES zoneminder.httpd.tmpfiles.conf DESTINATION /usr/lib/tmpfiles.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES com.zoneminder.systemctl.rules.httpd DESTINATION /etc/zm/www PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) + +# Install the Nginx zoneminder files +install(FILES zm-nginx.conf DESTINATION /usr/lib/systemd/system/zoneminder.service.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES zoneminder.nginx.conf DESTINATION /etc/zm/www PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES redirect.nginx.conf DESTINATION /etc/zm/www PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES zoneminder.nginx.tmpfiles.conf DESTINATION /usr/lib/tmpfiles.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES com.zoneminder.systemctl.rules.nginx DESTINATION /etc/zm/www PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES zm-web-user.conf DESTINATION /etc/zm/conf.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) +install(FILES zoneminder.php-fpm.conf DESTINATION /etc/php-fpm.d PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) + +# Miscellaneous + +# Symlink the cake php temp folder to the ZoneMinder temp folder install(CODE "execute_process(COMMAND ln -sf ../../../../../../var/lib/zoneminder/temp \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/api/app/tmp\")") -# Link to Cambozola, which is now packaged in zmrepo +# Link to Cambozola install(CODE "execute_process(COMMAND ln -sf ../../java/cambozola.jar \"\$ENV{DESTDIR}${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/cambozola.jar\")") -# Install auxiliary files required to run zoneminder on CentOS -install(FILES redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -if(ZM_TARGET_DISTRO STREQUAL "el7") - install(FILES zoneminder.el7.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) - install(FILES zoneminder.el7.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) - install(FILES zoneminder.service DESTINATION /usr/lib/systemd/system PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) - install(FILES ../../misc/zoneminder-tmpfiles.conf DESTINATION /etc/tmpfiles.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) -else(ZM_TARGET_DISTRO STREQUAL "el7") - install(FILES zoneminder.el6.conf DESTINATION /etc/httpd/conf.d RENAME zoneminder.conf PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) - install(FILES zoneminder.el6.logrotate DESTINATION /etc/logrotate.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) - install(FILES zoneminder.sysvinit DESTINATION /etc/rc.d/init.d RENAME zoneminder PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ) -endif(ZM_TARGET_DISTRO STREQUAL "el7") +# Install auxiliary files +install(FILES common/redalert.wav DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/sounds PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE) -# Install jscalendar -if(unzip_jsc STREQUAL "") - install(DIRECTORY jscalendar-1.0/ DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www/tools/jscalendar) -endif(unzip_jsc STREQUAL "") - -# Install cambozola -if(untar_camb STREQUAL "") - install(FILES cambozola-0.931/dist/cambozola.jar DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/zoneminder/www) -endif(untar_camb STREQUAL "") diff --git a/distros/redhat/README.CentOS b/distros/redhat/README.CentOS deleted file mode 100644 index f9c7ea1fb..000000000 --- a/distros/redhat/README.CentOS +++ /dev/null @@ -1,133 +0,0 @@ -What's New -========== - -1. Due to the active state of the ZoneMinder project, we now recommend granting - ALL permission to the ZoneMinder mysql account. This change must be done - manually before ZoneMinder will run. See the installation steps below. - -2. This package uses the HTTPS protocol by default to access the web portal. - Requests using HTTP will auto-redirect to HTTPS. See README.https for - more information. - -3. The php package that ships with CentOS 6 does not support the new ZoneMinder - API. If you require API functionality (such as using a mobile app) then you - should consider an upgrade to CentOS 7 or use Fedora. - -New installs -============ - -1. Unless you are already using MySQL server, you need to ensure that - the server is confired to start during boot and properly secured - by running: - - sudo service mysqld start - /usr/bin/mysql_secure_installation - sudo chkconfig mysqld on - -2. Using the password for the root account set during the previous step, you - will need to create the ZoneMinder database and configure a database - account for ZoneMinder to use: - - mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql - mysql -uroot -p -e "grant all on zm.* to \ - 'zmuser'@localhost identified by 'zmpass';" - mysqladmin -uroot -p reload - - The database account credentials, zmuser/zmpass, are arbitrary. Set them to - anything that suits your environment. - -3. If you have chosen to change the zoneminder mysql credentials to something - other than zmuser/zmpass then you must now edit /etc/zm.conf. Change - ZM_DB_USER and ZM_DB_PASS to the values you created in the previous step. - -4. Edit /etc/php.ini, uncomment the date.timezone line, and add your local - timezone. PHP will complain loudly if this is not set, or if it is set - incorrectly, and these complaints will show up in the zoneminder logging - system as errors - - If you are not sure of the proper timezone specification to use, look at - http://php.net/date.timezone - -5. Install mod_ssl or configure /etc/httpd/conf.d/zoneminder.conf to meet your - needs. This package comes preconfigured for HTTPS using the default self - signed certificate on your system. The recommended way to complete this step - is to simply install mod_ssl: - - sudo yum install mod_ssl - - If this does not meet your needs, then read README.https to - learn about alternatives. When in doubt, install mod_ssl. - -6. Configure the web server to start automatically: - - sudo chkconfig httpd on - sudo service httpd start - -7. This package will automatically configure and install an SELinux policy - called local_zoneminder. A copy of this policy is in the documentation - folder. - - It is still possible to run into SELinux issues, however. If this is case, - you can disable SELinux permanently by editing the following: - - /etc/selinux/conf - - Change SELINUX line from "enforcing" to "disabled". This change will not - take effect until a reboot, however. To avoid a reboot, execute the - following from the commandline: - - sudo setenforce 0 - -8. Finally, you may start the ZoneMinder service: - - sudo service zoneminder start - - Then point your web browser to http:///zm - -Upgrades -======== - -1. Verify /etc/zm.conf. - - If zm.conf was manually edited before running the upgrade, the installation - may not overwrite it. In this case, it will create the file - /etc/zm.conf.rpmnew. - - For example, this will happen if you are using database account credentials - other than zmuser/zmpass. - - Compare /etc/zm.conf to /etc/zm.conf.rpmnew. Verify that zm.conf - contains any new config settings that may be in zm.conf.rpmnew. - -2. Verify permissions of the zmuser account. - - Over time, the database account permissions required for normal operation - have increased. Verify the zmuser database account has been granted all - permission to the ZoneMinder database: - - mysql -uroot -p -e "show grants for zmuser@localhost;" - - See step 2 of the Installation section to add missing permissions. - -3. Verify the ZoneMinder Apache configuration file in the folder - /etc/httpd/conf.d. You will have a file called "zoneminder.conf" and there - may also be a file called "zoneminder.conf.rpmnew". If the rpmnew file - exists, inspect it and merge anything new in that file with zoneminder.conf. - Verify the SSL REquirements meet your needs. Read README.https if necessary. - -4. Upgrade the database before starting ZoneMinder. - - Most upgrades can be performed by executing the following command: - - sudo zmupdate.pl - - Recent versions of ZoneMinder don't require any parameters added to the - zmupdate command. However, if ZoneMinder complains, you may need to call - zmupdate in the following manner: - - sudo zmupdate.pl --user=root --pass= --version= - -5. Now start zoneminder: - - sudo service zoneminder start - diff --git a/distros/redhat/README.Centos7 b/distros/redhat/README.Centos7 deleted file mode 100644 index 1cd26a1af..000000000 --- a/distros/redhat/README.Centos7 +++ /dev/null @@ -1,148 +0,0 @@ -What's New -========== - -1. The Apache ScriptAlias has been changed from "/cgi-bin/zm/zms" to - "/cgi-bin-zm/zms". This has been to done to avoid this bug: - https://bugzilla.redhat.com/show_bug.cgi?id=973067 - - IMPORTANT: You must manually verify the value of PATH_ZMS under Options. - Make sure it is set to "/cgi-bin-zm/nph-zms". Failure to do so will result - in a broken system. You have been warned. - -2. Due to the active state of the ZoneMinder project, we now recommend granting - ALL permission to the ZoneMinder mysql account. This change must be done - manually before ZoneMinder will run. See the installation steps below. - -3. This package uses the HTTPS protocol by default to access the web portal. - Requests using HTTP will auto-redirect to HTTPS. See README.https for - more information. - -4. This package ships with the new ZoneMinder API enabled. - -New installs -============ - -1. Unless you are already using MariaDB server, you need to ensure that - the server is configured to start during boot and properly secured - by running: - - sudo systemctl enable mariadb - sudo systemctl start mariadb - sudo mysql_secure_installation - -2. Using the password for the root account set during the previous step, you - will need to create the ZoneMinder database and configure a database - account for ZoneMinder to use: - - mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql - mysql -uroot -p -e "grant all on zm.* to \ - 'zmuser'@localhost identified by 'zmpass';" - mysqladmin -uroot -p reload - - The database account credentials, zmuser/zmpass, are arbitrary. Set them to - anything that suits your environment. - -3. If you have chosen to change the zoneminder database account credentials to - something other than zmuser/zmpass, you must now edit /etc/zm/zm.conf. - Change ZM_DB_USER and ZM_DB_PASS to the values you created in the previous - step. - - This version of zoneminder no longer requires you to make a similar change - to the credentials in /usr/share/zoneminder/www/api/app/Config/database.php - This now happens dynamically. Do *not* make any changes to this file. - -4. Edit /etc/php.ini, uncomment the date.timezone line, and add your local - timezone. PHP will complain loudly if this is not set, or if it is set - incorrectly, and these complaints will show up in the zoneminder logging - system as errors. - - If you are not sure of the proper timezone specification to use, look at - http://php.net/date.timezone - -5. Disable SELinux - - We currently do not have the resources to create and maintain an accurate - SELinux policy for ZoneMinder on CentOS 7. We will gladly accept pull - reqeusts from anyone who wishes to do the work. In the meantime, SELinux - will need to be disabled or put into permissive mode. - - To immediately disbale SELinux for the current seesion, issue the following - from the command line: - - sudo setenforce 0 - - To permanently disable SELinux, edit /etc/selinux/config and change the - SELINUX line from "enforcing" to "disabled". This change will take - effect after a reboot. - -6. Install mod_ssl or configure /etc/httpd/conf.d/zoneminder.conf to meet your - needs. This package comes preconfigured for HTTPS using the default self - signed certificate on your system. The recommended way to complete this step - is to simply install mod_ssl: - - sudo yum install mod_ssl - - If this does not meet your needs, then read README.https to - learn about alternatives. When in doubt, install mod_ssl. - -7. Now start the web server: - - sudo systemctl enable httpd - sudo systemctl start httpd - -8. Now start zoneminder: - - sudo systemctl enable zoneminder - sudo systemctl start zoneminder - -Upgrades -======== - -1. Verify /etc/zm/zm.conf. - - If zm.conf was manually edited before running the upgrade, the installation - may not overwrite it. In this case, it will create the file - /etc/zm/zm.conf.rpmnew. - - For example, this will happen if you are using database account credentials - other than zmuser/zmpass. - - Compare /etc/zm/zm.conf to /etc/zm/zm.conf.rpmnew. Verify that zm.conf - contains any new config settings that may be in zm.conf.rpmnew. - - This version of zoneminder no longer requires you to make a similar change - to the credentials in /usr/share/zoneminder/www/api/app/Config/database.php - This now happens dynamically. Do *not* make any changes to this file. - -2. Verify permissions of the zmuser account. - - Over time, the database account permissions required for normal operation - have increased. Verify the zmuser database account has been granted all - permission to the ZoneMinder database: - - mysql -uroot -p -e "show grants for zmuser@localhost;" - - See step 2 of the Installation section to add missing permissions. - -3. Verify the ZoneMinder Apache configuration file in the folder - /etc/httpd/conf.d. You will have a file called "zoneminder.conf" and there - may also be a file called "zoneminder.conf.rpmnew". If the rpmnew file - exists, inspect it and merge anything new in that file with zoneminder.conf. - Verify the SSL REquirements meet your needs. Read README.https if necessary. - -4. Upgrade the database before starting ZoneMinder. - - Most upgrades can be performed by executing the following command: - - sudo zmupdate.pl - - Recent versions of ZoneMinder don't require any parameters added to the - zmupdate command. However, if ZoneMinder complains, you may need to call - zmupdate in the following manner: - - sudo zmupdate.pl --user=root --pass= --version= - -5. Now start zoneminder: - - sudo systemctl start zoneminder - diff --git a/distros/redhat/README.https b/distros/redhat/README.https deleted file mode 100644 index 23affeb96..000000000 --- a/distros/redhat/README.https +++ /dev/null @@ -1,25 +0,0 @@ -HTTPS is now a requirement -========================== - -This package now depends on Apache's mod_ssl pacakge. This will automatically -be installed along with ZoneMinder. Upon installation, the mod_ssl package -will create a default, self-signed certificate. This is the certificate that -ZoneMinder will use out of the box. - -Since the certificate is self-signed, you will get a warning from your browser -the first time you access the web portal. This is normal. - -This is not intended to be an all encompasing solution for everyone. ZoneMinder -will work just fine over HTTPS the way it is currently configured. However, -here are a couple of considerations you may want to take. - -1. Create your own certificate. The CentOS wiki has a guide that describes how - to do this: https://wiki.centos.org/HowTos/Https . Additionally, Googling - "centos certificate" reveals many articles on the subject. Note that some - third party applications, such as zmNinja, will require you to create a - certificate different than the default certificate on your machine. - -2. You can turn off HTTPS entirely by simply commenting out the SSLRequireSSL - directives found in /etc/httpd/conf.d/zoneminder.conf. You should also - comment out the HTTP -> HTTPS Rewrite rule. - diff --git a/distros/redhat/archive/zm-init b/distros/redhat/archive/zm-init deleted file mode 100644 index 90e645f43..000000000 --- a/distros/redhat/archive/zm-init +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh -#$Id: zm-init,v 1.1 2005/04/19 00:49:53 hunter Exp $ - -# -# Copyright (C) 2005 Serg Oskin -# - -ZM_VERSION= -ZM_CONFIG=/etc/zm.conf -ZM_PATH=/usr/lib/zm - -if [ -f $ZM_CONFIG ]; then - . $ZM_CONFIG -else - echo "ERROR: $ZM_CONFIG not found." - exit 1 -fi -for n in ZM_DB_SERVER ZM_DB_NAME ZM_DB_USER ZM_DB_PASS; do - eval "val=\$$n" - if [ "$val" = "" ]; then - echo "ERROR($ZM_CONFIG): $n should exist and be not empty." - exit 1 - fi -done - -if [ "$ZM_DB_SERVER" = "localhost" ]; then - ClientHost=localhost -else - ClientHost=`hostname` -fi - - -sql=/tmp/zm.crdb.sql -echo "" >$sql -chmod 600 $sql - -echo "CREATE DATABASE /*!32312 IF NOT EXISTS*/ $ZM_DB_NAME;" >>$sql -echo "USE $ZM_DB_NAME;" >>$sql - -echo "GRANT all on $ZM_DB_NAME.* TO '$ZM_DB_USER'@'$ClientHost' IDENTIFIED BY '$ZM_DB_PASS';" >>$sql - -echo -n "Enter MySQL Administrator username: " -read admin -cat $sql | mysql -B -h $ZM_DB_SERVER -u $admin -p -rm -f $sql - -cat /usr/lib/zm/init/zmschema.sql | mysql -h $ZM_DB_SERVER -u $ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME -( cd $ZM_PATH/init; perl $ZM_PATH/init/zmoptions -f $ZM_PATH/init/zmconfig.txt ) diff --git a/distros/redhat/archive/zoneminder-1.26.0-dbinstall.patch b/distros/redhat/archive/zoneminder-1.26.0-dbinstall.patch deleted file mode 100644 index 5b688a75d..000000000 --- a/distros/redhat/archive/zoneminder-1.26.0-dbinstall.patch +++ /dev/null @@ -1,72 +0,0 @@ ---- configure.ac 2013-09-05 10:33:08.000000000 -0500 -+++ configure.ac.dbinstall 2013-09-05 17:23:28.555553447 -0500 -@@ -1,13 +1,11 @@ - AC_PREREQ(2.59) --AC_INIT(zm,1.26.0,[http://www.zoneminder.com/forums/ - Please check FAQ first],ZoneMinder,http://www.zoneminder.com/downloads.html) -+AC_INIT(zm,1.26.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_SUBST([AM_CXXFLAGS], [-D__STDC_CONSTANT_MACROS]) - --PATH_BUILD=`pwd` --AC_SUBST(PATH_BUILD) - TIME_BUILD=`date +'%s'` - AC_SUBST(TIME_BUILD) - -@@ -354,6 +352,8 @@ AC_PROG_PERL_MODULES(X10::ActiveHome,,AC - - 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") -diff -up ./db/Makefile.am.dbinstall ./db/Makefile.am ---- ./db/Makefile.am.dbinstall 2009-10-14 04:42:46.000000000 -0500 -+++ ./db/Makefile.am 2011-03-24 22:50:14.173912137 -0500 -@@ -1,7 +1,16 @@ - AUTOMAKE_OPTIONS = gnu - -+zmdbdatadir = $(pkgdatadir)/db -+ - EXTRA_DIST = \ - zm_create.sql.in \ -+ $(dbupgrade_scripts) -+ -+dist_zmdbdata_DATA = \ -+ zm_create.sql \ -+ $(dbupgrade_scripts) -+ -+dbupgrade_scripts = \ - zm_update-0.0.1.sql \ - zm_update-0.9.7.sql \ - zm_update-0.9.8.sql \ -diff -up ./scripts/zmupdate.pl.in.dbinstall ./scripts/zmupdate.pl.in ---- ./scripts/zmupdate.pl.in.dbinstall 2011-08-27 15:44:05.335602405 -0500 -+++ ./scripts/zmupdate.pl.in 2011-08-26 02:51:37.000000000 -0500 -@@ -424,7 +424,7 @@ if ( $version ) - } - else - { -- $command .= ZM_PATH_BUILD."/db"; -+ $command .= ZM_PATH_DATA."/db"; - } - $command .= "/zm_update-".$version.".sql"; - -diff -up ./zm.conf.in.dbinstall ./zm.conf.in ---- ./zm.conf.in.dbinstall 2008-07-25 04:48:16.000000000 -0500 -+++ ./zm.conf.in 2011-03-24 22:50:14.175912077 -0500 -@@ -12,8 +12,8 @@ - # Current version of ZoneMinder - ZM_VERSION=@VERSION@ - --# Path to build directory, used mostly for finding DB upgrade scripts --ZM_PATH_BUILD=@PATH_BUILD@ -+# Path to installed data directory, used mostly for finding DB upgrade scripts -+ZM_PATH_DATA=@PKGDATADIR@ - - # Build time, used to record when to trigger various checks - ZM_TIME_BUILD=@TIME_BUILD@ diff --git a/distros/redhat/archive/zoneminder-1.26.0-defaults.patch b/distros/redhat/archive/zoneminder-1.26.0-defaults.patch deleted file mode 100644 index 3e5dda67c..000000000 --- a/distros/redhat/archive/zoneminder-1.26.0-defaults.patch +++ /dev/null @@ -1,76 +0,0 @@ ---- configure.ac 2013-08-15 11:44:10.000000000 -0500 -+++ configure.ac.logdir 2013-08-17 09:20:07.326053328 -0500 -@@ -46,7 +46,7 @@ - AC_SUBST(ZM_TMPDIR,[/tmp/zm]) - fi - if test "$ZM_LOGDIR" == ""; then -- AC_SUBST(ZM_LOGDIR,[/var/log/zm]) -+ AC_SUBST(ZM_LOGDIR,[/var/log/zoneminder]) - fi - - LIB_ARCH=lib ---- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2013-08-01 18:14:45.175241378 -0500 -+++ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in.defaults 2013-08-07 18:57:42.525006149 -0500 -@@ -187,7 +187,7 @@ - }, - { - name => "ZM_PATH_ZMS", -- default => "/cgi-bin/nph-zms", -+ default => "/cgi-bin/zm/nph-zms", - description => "Web path to zms streaming server", - help => "The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.", - type => $types{rel_path}, -@@ -276,7 +276,7 @@ - }, - { - name => "ZM_OPT_CAMBOZOLA", -- default => "no", -+ default => "yes", - description => "Is the (optional) cambozola java streaming client installed", - help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.", - type => $types{boolean}, -@@ -526,7 +526,7 @@ - }, - { - name => "ZM_LOG_DEBUG_FILE", -- default => "@ZM_TMPDIR@/zm_debug.log+", -+ default => "/var/log/zoneminder/zm_debug_log+", - description => "Where extra debug is output to", - help => "This option allows you to specify a different target for debug output. All components have a default log file which will norally be in /tmp or /var/log and this is where debug will be written to if this value is empty. Adding a path here will temporarily redirect debug, and other logging output, to this file. This option is a simple filename and you are debugging several components then they will all try and write to the same file with undesirable consequences. Appending a '+' to the filename will cause the file to be created with a '.' suffix containing your process id. In this way debug from each run of a component is kept separate. This is the recommended setting as it will also prevent subsequent runs from overwriting the same log. You should ensure that permissions are set up to allow writing to the file and directory specified here.", - requires => [ { name => "ZM_LOG_DEBUG", value => "yes" } ], -@@ -623,7 +623,7 @@ - }, - { - name => "ZM_PATH_SOCKS", -- default => "@ZM_TMPDIR@", -+ default => "/var/lib/zoneminder/sock", - description => "Path to the various Unix domain socket files that ZoneMinder uses", - help => "ZoneMinder generally uses Unix domain sockets where possible. This reduces the need for port assignments and prevents external applications from possibly compromising the daemons. However each Unix socket requires a .sock file to be created. This option indicates where those socket files go.", - type => $types{abs_path}, -@@ -639,7 +639,7 @@ - }, - { - name => "ZM_PATH_SWAP", -- default => "@ZM_TMPDIR@", -+ default => "/dev/shm", - description => "Path to location for temporary swap images used in streaming", - help => "Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.", - type => $types{abs_path}, -@@ -902,7 +902,7 @@ - }, - { - name => "ZM_UPLOAD_FTP_LOC_DIR", -- default => "@ZM_TMPDIR@", -+ default => "/var/spool/zoneminder-upload", - description => "The local directory in which to create upload files", - help => "You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.", - requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], -@@ -1258,7 +1258,7 @@ - }, - { - name => "ZM_OPT_CONTROL", -- default => "no", -+ default => "yes", - description => "Support controllable (e.g. PTZ) cameras", - help => "ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.", - type => $types{boolean}, diff --git a/distros/redhat/archive/zoneminder-1.28.0-defaults.patch b/distros/redhat/archive/zoneminder-1.28.0-defaults.patch deleted file mode 100644 index 30d4d87e4..000000000 --- a/distros/redhat/archive/zoneminder-1.28.0-defaults.patch +++ /dev/null @@ -1,47 +0,0 @@ ---- scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in 2013-08-01 18:14:45.175241378 -0500 -+++ scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in.defaults 2013-08-07 18:57:42.525006149 -0500 -@@ -187,7 +187,7 @@ - }, - { - name => "ZM_PATH_ZMS", -- default => "/cgi-bin/nph-zms", -+ default => "/cgi-bin/zm/nph-zms", - description => "Web path to zms streaming server", - help => "The ZoneMinder streaming server is required to send streamed images to your browser. It will be installed into the cgi-bin path given at configuration time. This option determines what the web path to the server is rather than the local path on your machine. Ordinarily the streaming server runs in parser-header mode however if you experience problems with streaming you can change this to non-parsed-header (nph) mode by changing 'zms' to 'nph-zms'.", - type => $types{rel_path}, -@@ -276,7 +276,7 @@ - }, - { - name => "ZM_OPT_CAMBOZOLA", -- default => "no", -+ default => "yes", - description => "Is the (optional) cambozola java streaming client installed", - help => "Cambozola is a handy low fat cheese flavoured Java applet that ZoneMinder uses to view image streams on browsers such as Internet Explorer that don't natively support this format. If you use this browser it is highly recommended to install this from http://www.charliemouse.com/code/cambozola/ however if it is not installed still images at a lower refresh rate can still be viewed.", - type => $types{boolean}, -@@ -639,7 +639,7 @@ - }, - { - name => "ZM_PATH_SWAP", -- default => "@ZM_TMPDIR@", -+ default => "/dev/shm", - description => "Path to location for temporary swap images used in streaming", - help => "Buffered playback requires temporary swap images to be stored for each instance of the streaming daemons. This option determines where these images will be stored. The images will actually be stored in sub directories beneath this location and will be automatically cleaned up after a period of time.", - type => $types{abs_path}, -@@ -902,7 +902,7 @@ - }, - { - name => "ZM_UPLOAD_FTP_LOC_DIR", -- default => "@ZM_TMPDIR@", -+ default => "/var/spool/zoneminder-upload", - description => "The local directory in which to create upload files", - help => "You can use filters to instruct ZoneMinder to upload events to a remote ftp server. This option indicates the local directory that ZoneMinder should use for temporary upload files. These are files that are created from events, uploaded and then deleted.", - requires => [ { name => "ZM_OPT_UPLOAD", value => "yes" } ], -@@ -1258,7 +1258,7 @@ - }, - { - name => "ZM_OPT_CONTROL", -- default => "no", -+ default => "yes", - description => "Support controllable (e.g. PTZ) cameras", - help => "ZoneMinder includes limited support for controllable cameras. A number of sample protocols are included and others can easily be added. If you wish to control your cameras via ZoneMinder then select this option otherwise if you only have static cameras or use other control methods then leave this option off.", - type => $types{boolean}, diff --git a/distros/redhat/archive/zoneminder-runlevel.patch b/distros/redhat/archive/zoneminder-runlevel.patch deleted file mode 100644 index de7b49b0b..000000000 --- a/distros/redhat/archive/zoneminder-runlevel.patch +++ /dev/null @@ -1,11 +0,0 @@ -diff -up ./scripts/zm.in.runlevel ./scripts/zm.in ---- ./scripts/zm.in.runlevel 2010-11-28 15:22:05.000000000 -0600 -+++ ./scripts/zm.in 2011-03-24 21:39:01.973010160 -0500 -@@ -1,6 +1,6 @@ - #!/bin/sh - # description: ZoneMinder is the top Linux video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security applications.Copyright: Philip Coombes, Corey DeLasaux 2003-2008 --# chkconfig: 2345 99 00 -+# chkconfig: - 99 00 - # processname: zmpkg.pl - - # Source function library. diff --git a/distros/redhat/archive/zoneminder.el6.spec b/distros/redhat/archive/zoneminder.el6.spec deleted file mode 100644 index 46bce099a..000000000 --- a/distros/redhat/archive/zoneminder.el6.spec +++ /dev/null @@ -1,434 +0,0 @@ -%define cambrev 0.931 -%define moorev 1.3.2 -%define jscrev 1.0 - -%define zmuid $(id -un) -%define zmgid $(id -gn) -%define zmuid_final apache -%define zmgid_final apache - -Name: zoneminder -Version: 1.27 -Release: 1%{?dist} -Summary: A camera monitoring and analysis tool -Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ -# Mootools is inder the MIT license: http://mootools.net/ -# Cambozola is GPL: http://www.charliemouse.com/code/cambozola/ -License: GPLv2+ and LGPLv2+ and MIT -URL: http://www.zoneminder.com/ - -#Source0: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz -Source0: ZoneMinder-%{version}.tar.gz -Source1: jscalendar-%{jscrev}.zip -#Source1: http://downloads.sourceforge.net/jscalendar/jscalendar-%{jscrev}.zip - -# Mootools is currently bundled in the zoneminder tarball -#Source2: mootools-core-%{moorev}-full-compat-yc.js -#Source2: http://mootools.net/download/get/mootools-core-%{moorev}-full-compat-yc.js - -Source3: cambozola-%{cambrev}.tar.gz -#Source3: http://www.andywilcock.com/code/cambozola/cambozola-%{cambrev}.tar.gz - -#Patch1: zoneminder-1.26.4-dbinstall.patch -Patch2: zoneminder-runlevel.patch -#Patch3: zoneminder-1.25.0-installfix.patch -Patch4: zoneminder-1.26.0-defaults.patch - -# BuildRoot is depreciated and ignored in EPEL6 -#BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - -BuildRequires: automake gnutls-devel bzip2-devel libtool -BuildRequires: mysql-devel pcre-devel libjpeg-turbo-devel -BuildRequires: perl(Archive::Tar) perl(Archive::Zip) -BuildRequires: perl(Date::Manip) perl(DBD::mysql) -BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent) -BuildRequires: perl(MIME::Entity) perl(MIME::Lite) -BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap) -BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign) -BuildRequires: perl(Expect) perl(X10::ActiveHome) perl(Astro::SunTime) -BuildRequires: libcurl-devel vlc-devel polkit-devel ffmpeg-devel >= 0.4.9 - -Requires: httpd php php-mysql mysql-server libjpeg-turbo polkit -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip) -Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP) -Requires: libcurl vlc-core ffmpeg >= 0.4.9 - -Requires(post): /sbin/chkconfig -Requires(post): /usr/bin/checkmodule -Requires(post): /usr/bin/semodule_package -Requires(post): /usr/sbin/semodule -Requires(post): /usr/bin/gpasswd -Requires(post): /usr/bin/less -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -Requires(preun): /usr/sbin/semodule -Requires(postun): /sbin/service - - -%description -ZoneMinder is a set of applications which is intended to provide a complete -solution allowing you to capture, analyse, record and monitor any cameras you -have attached to a Linux based machine. It is designed to run on kernels which -support the Video For Linux (V4L) interface and has been tested with cameras -attached to BTTV cards, various USB cameras and IP network cameras. It is -designed to support as many cameras as you can attach to your computer without -too much degradation of performance. - - -%prep -%setup -q -n ZoneMinder-%{version} - -# Unpack jscalendar and move some files around -%setup -q -D -T -a 1 -n ZoneMinder-%{version} -mkdir jscalendar-doc -pushd jscalendar-%{jscrev} -mv *html *php doc/* README ../jscalendar-doc -rmdir doc -popd - -# Unpack Cambozola and move some files around -%setup -q -D -T -a 3 -n ZoneMinder-%{version} -mkdir cambozola-doc -pushd cambozola-%{cambrev} -mv application.properties build.xml dist.sh *html LICENSE testPages/* ../cambozola-doc -rmdir testPages -popd - -#%patch1 -p0 -b .dbinstall -%patch2 -p0 -b .runlevel -#%patch3 -p0 -b .installfix -%patch4 -p0 - -%build -libtoolize --force -aclocal -autoheader -automake --force-missing --add-missing -autoconf - -OPTS="" -%ifnarch %{ix86} x86_64 - OPTS="$OPTS --disable-crashtrace" -%endif - -%configure \ - --with-libarch=%{_lib} \ -%ifarch %{ix86} %{x8664} - --enable-crashtrace \ -%else - --disable-crashtrace \ -%endif - --with-mysql=%{_prefix} \ - --with-ffmpeg=%{_prefix} \ - --with-webdir=%{_datadir}/%{name}/www \ - --with-cgidir=%{_libexecdir}/%{name}/cgi-bin \ - --with-webuser=%{zmuid} \ - --with-webgroup=%{zmgid} \ - --enable-mmap=yes \ - --disable-debug \ - --with-webhost=zm.local \ - ZM_SSL_LIB="gnutls" \ - ZM_RUNDIR=/var/run/zoneminder \ - ZM_TMPDIR=/var/lib/zoneminder/temp \ -%ifarch x86_64 - CXXFLAGS="-D__STDC_CONSTANT_MACROS -msse2" \ -%else - CXXFLAGS="-D__STDC_CONSTANT_MACROS" \ -%endif - --with-extralibs="" - -make %{?_smp_mflags} -%{__perl} -pi -e 's/(ZM_WEB_USER=).*$/${1}%{zmuid_final}/;' \ - -e 's/(ZM_WEB_GROUP=).*$/${1}%{zmgid_final}/;' zm.conf - -%install -install -d %{buildroot}/%{_localstatedir}/run -install -d %{buildroot}/etc/logrotate.d - -make install DESTDIR=%{buildroot} \ - INSTALLDIRS=vendor - -rm -rf %{buildroot}/%{perl_vendorarch} %{buildroot}/%{perl_archlib} - -install -m 755 -d %{buildroot}/%{_localstatedir}/log/zoneminder -for dir in events images temp -do - install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/$dir - if [ -d %{buildroot}/%{_datadir}/zoneminder/www/$dir ]; then - rmdir %{buildroot}/%{_datadir}/%{name}/www/$dir - fi - ln -sf ../../../..%{_localstatedir}/lib/zoneminder/$dir %{buildroot}/%{_datadir}/%{name}/www/$dir -done -install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/sock -install -m 755 -d %{buildroot}/%{_localstatedir}/lib/zoneminder/swap -install -m 755 -d %{buildroot}/%{_localstatedir}/spool/zoneminder-upload - -install -D -m 755 scripts/zm %{buildroot}/%{_initrddir}/zoneminder -install -D -m 644 distros/redhat/zoneminder.conf %{buildroot}/%{_sysconfdir}/httpd/conf.d/zoneminder.conf -install -D -m 755 distros/redhat/redalert.wav %{buildroot}/%{_datadir}/%{name}/www/sounds/redalert.wav -install distros/redhat/zm-logrotate_d $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/%{name} - -# Install jscalendar -install -d -m 755 %{buildroot}/%{_datadir}/%{name}/www/jscalendar -cp -rp jscalendar-%{jscrev}/* %{buildroot}/%{_datadir}/%{name}/www/jscalendar - -# Install Cambozola -cp -rp cambozola-%{cambrev}/dist/cambozola.jar %{buildroot}/%{_datadir}/%{name}/www/ -rm -rf cambozola-%{cambrev} - -# Install mootools -pushd %{buildroot}/%{_datadir}/%{name}/www -#install -m 644 %{Source2} mootools-core-%{moorev}-full-compat-yc.js -#ln -s mootools-core-%{moorev}-full-compat-yc.js mootools.js -ln -f -s tools/mootools/mootools-core-%{moorev}-yc.js mootools-core.js -ln -f -s tools/mootools/mootools-more-%{moorev}.1-yc.js mootools-more.js -popd - -%post -/sbin/chkconfig --add zoneminder -/sbin/chkconfig zoneminder on - -# Allow zoneminder access to local video sources, serial ports, and x10 -echo -/usr/bin/gpasswd -a %{zmuid_final} video -/usr/bin/gpasswd -a %{zmuid_final} dialout - -# Create and load zoneminder selinux policy module -echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wait.\n" -/usr/bin/checkmodule -M -m -o %{_docdir}/%{name}-%{version}/local_zoneminder.mod %{_docdir}/%{name}-%{version}/local_zoneminder.te > /dev/null -/usr/bin/semodule_package -o %{_docdir}/%{name}-%{version}/local_zoneminder.pp -m %{_docdir}/%{name}-%{version}/local_zoneminder.mod > /dev/null -/usr/sbin/semodule -i %{_docdir}/%{name}-%{version}/local_zoneminder.pp > /dev/null - -# Display the README for post installation instructions -/usr/bin/less %{_docdir}/%{name}-%{version}/README.CentOS - -%preun -if [ $1 -eq 0 ]; then - /sbin/service zoneminder stop > /dev/null 2>&1 || : - /sbin/chkconfig --del zoneminder - echo -e "\nRemoving ZoneMinder SELinux policy module. Please wait.\n" - /usr/sbin/semodule -r local_zoneminder.pp -fi - - -%postun -if [ $1 -ge 1 ]; then - /sbin/service zoneminder condrestart > /dev/null 2>&1 || : -fi - - -%files -%defattr(-,root,root,-) -%doc AUTHORS BUGS ChangeLog COPYING LICENSE NEWS README.md distros/redhat/README.CentOS jscalendar-doc cambozola-doc distros/redhat/local_zoneminder.te -%config %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm.conf -%config(noreplace) %attr(644,root,root) %{_sysconfdir}/httpd/conf.d/zoneminder.conf -%config(noreplace) /etc/logrotate.d/%{name} -%attr(755,root,root) %{_initrddir}/zoneminder - -%{_bindir}/zma -%{_bindir}/zmaudit.pl -%{_bindir}/zmc -%{_bindir}/zmcontrol.pl -%{_bindir}/zmdc.pl -%{_bindir}/zmf -%{_bindir}/zmfilter.pl -# zmfix removed from zoneminder 1.26.6 -#%attr(4755,root,root) %{_bindir}/zmfix -%{_bindir}/zmpkg.pl -%{_bindir}/zmtrack.pl -%{_bindir}/zmtrigger.pl -%{_bindir}/zmu -%{_bindir}/zmupdate.pl -%{_bindir}/zmvideo.pl -%{_bindir}/zmwatch.pl -%{_bindir}/zmcamtool.pl -%{_bindir}/zmsystemctl.pl -%{_bindir}/zmx10.pl -%{_bindir}/zmonvif-probe.pl - -%{perl_vendorlib}/ZoneMinder* -%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ZoneMinder* -#%{perl_vendorlib}/ONVIF* -#%{perl_vendorlib}/WSDiscovery* -#%{perl_vendorlib}/WSSecurity* -#%{perl_vendorlib}/%{_arch}-linux-thread-multi/auto/ONVIF* -%{_mandir}/man*/* -%dir %{_libexecdir}/%{name} -%{_libexecdir}/%{name}/cgi-bin -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/db -%{_datadir}/%{name}/www - -%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy -%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules - -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/events -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/images -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/sock -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/swap -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/temp -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/log/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/spool/zoneminder-upload - - -%changelog -* Sun Aug 03 2014 Andrew Bauer - 1.27 -- Include ONVIF support files - -* Fri Mar 14 2014 Andrew Bauer - 1.27 -- Tweak build requirements for cmake - -* Sat Feb 01 2014 Andrew Bauer - 1.27 -- Add zmcamtool.pl. Bump version for 1.27 release. - -* Mon Dec 16 2013 Andrew Bauer - 1.26.5 -- This is a bug fixe release -- RTSP fixes, cmake enhancements, couple other misc fixes - -* Sun Oct 06 2013 Andrew Bauer - 1.26.4 -- All files are now part of the zoneminder source tree. Update specfile accordingly. - -* Thu Sep 05 2013 Andrew Bauer - 1.26.0 -- 1.26.0 Release -- https://github.com/ZoneMinder/ZoneMinder/archive/v1.26.0.tar.gz - -* Sun Sep 01 2013 Andrew Bauer - 1.26.0-beta -- Update SELinux policy module - -* Thu Aug 29 2013 Andrew Bauer - 1.26.0-beta -- Third Beta release -- https://github.com/ZoneMinder/ZoneMinder/tree/release-1.26 -- Reduce number of uneeded dependencies by integrating cambozola into spec file - -* Thu Aug 15 2013 Andrew Bauer - 1.26.0-beta -- Initial Beta release -- https://github.com/ZoneMinder/ZoneMinder/tree/release-1.26 - -* Sun Aug 11 2013 Andrew Bauer - 1.25.0-kfirproper -- Modified specfile to work with kfir-proper branch -- https://github.com/ZoneMinder/ZoneMinder/tree/kfir-proper - -* Wed Aug 07 2013 Andrew Bauer - 1.25.0-2svn3827 -- Move RHEL/CentOS specific defaults to a patch file -- Add bzip2-devel as a build dependency -- Default ZM_SSL_LIB back to gnutls. AUTH_RELAY = hashed didn't work with openssl. - -* Fri Aug 02 2013 Andrew Bauer - 1.25.0-1svn3827 -- Update to latest 1.25.0 subversion. -- Does not compile with modern versions of ffmpeg. Configure to work only with older versions. -- Does not compile with gcc 4.7. Configure to build with gcc less than 4.7. - -* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 -- Update to latest 1.24.3 subversion. Turns out that what upstream was calling - 1.24.3 is really just an occasionally updated devel snapshot. -- Rebase various patches. - -* Wed Mar 23 2011 Dan Horák - 1.24.3-3 -- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 -- Update to latest upstream version. -- Rebase patches. -- Initial incomplete attempt to disable v4l1 support. - -* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 -- Unbundle cambozola; instead link to the separately pacakged copy. -- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. -- Git rid of mixed space/tab usage by removing all tabs. -- Remove unnecessary Conflicts: line. -- Attempt to force short_open_tag on for the code directories. -- Move default location of sockets, swaps, logfiles and some temporary files to - make more sense and allow things to work better with a future selinux policy. -- Fix errors in README.CentOS. - -* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 -- rebuild against perl 5.10.1 -- use Perl vendorarch and archlib variables correctly - -* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 -- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 -- Initial update to 1.24.2. -- Rebase patches. -- Update mootools download location. -- Update to mootools 1.2.3. -- Add additional dependencies for some optional features. - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 -- Remove unused Sys::Mmap perl dependency RPM is finding - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 -- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 -- Added noffmpeg patch to make building outside mock easier - -* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 -- Patch for gcc 4.4 compilation errors -- Upgrade to 1.24.1 - -* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 -- rebuild for dependencies - -* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 -- Fix permissions on zm.conf - -* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 -- Initial attempt at packaging 1.23. - -* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 -- Add perl module compat dependency, bz #453590 - -* Tue May 6 2008 Martin Ebourne - 1.22.3-14 -- Remove default runlevel, bz #441315 - -* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 -- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. - -* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 -- Autorebuild for GCC 4.3 - -* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 -- Fix compilation on gcc 4.3 - -* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 -- Rebuild for new openssl - -* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 -- Fix licence tag - -* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 -- Fixes from testing by Jitz including missing dependencies and database creation - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 -- Disable crashtrace on ppc - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 -- Fix uid for directories in /var/lib/zoneminder - -* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 -- Added perl Archive::Tar dependency -- Disabled web interface due to lack of access control on the event images - -* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 -- Changes recommended in review by Jason Tibbitts - -* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 -- Standardised on package name of zoneminder - -* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 -- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/redhat/cambozola.sh b/distros/redhat/cambozola.sh deleted file mode 100755 index 645c5aa77..000000000 --- a/distros/redhat/cambozola.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -tar -xvzf cambozola-0.931.tar.gz -mkdir -v cambozola-doc -cd cambozola-0.931 -mv -v application.properties build.xml dist.sh *html LICENSE testPages/* ../cambozola-doc -rmdir -v testPages diff --git a/distros/redhat/redalert.wav b/distros/redhat/common/redalert.wav similarity index 100% rename from distros/redhat/redalert.wav rename to distros/redhat/common/redalert.wav diff --git a/distros/redhat/common/zoneminder.logrotate.in b/distros/redhat/common/zoneminder.logrotate.in new file mode 100644 index 000000000..210a84c07 --- /dev/null +++ b/distros/redhat/common/zoneminder.logrotate.in @@ -0,0 +1,12 @@ +@ZM_LOGDIR@/*.log { + missingok + notifempty + sharedscripts + delaycompress + compress + postrotate + @BINDIR@/zmpkg.pl logrot > /dev/null 2>/dev/null || true + endscript + daily + rotate 7 +} diff --git a/distros/redhat/common/zoneminder.service.in b/distros/redhat/common/zoneminder.service.in new file mode 100644 index 000000000..8551a60e2 --- /dev/null +++ b/distros/redhat/common/zoneminder.service.in @@ -0,0 +1,21 @@ +# ZoneMinder systemd unit file for RedHat distros and clones +# See drop-in folder for additional config directives + +[Unit] +Description=ZoneMinder CCTV recording and security system +After=network.target mariadb.service +Requires=mariadb.service + +[Service] +Type=forking +ExecStart=@BINDIR@/zmpkg.pl start +ExecReload=@BINDIR@/zmpkg.pl restart +ExecStop=@BINDIR@/zmpkg.pl stop +PIDFile=@ZM_RUNDIR@/zm.pid +Environment=TZ=/etc/localtime +RuntimeDirectory=zoneminder +RuntimeDirectoryMode=0755 + +[Install] +WantedBy=multi-user.target + diff --git a/distros/redhat/httpd/com.zoneminder.systemctl.rules.httpd.in b/distros/redhat/httpd/com.zoneminder.systemctl.rules.httpd.in new file mode 100644 index 000000000..d101dad69 --- /dev/null +++ b/distros/redhat/httpd/com.zoneminder.systemctl.rules.httpd.in @@ -0,0 +1,7 @@ +polkit.addRule(function(action, subject) { + if (action.id == "com.zoneminder.policykit.pkexec.run-zmsystemctl" && + subject.user != "@WEB_USER@") { + return polkit.Result.NO; + } + +}); diff --git a/distros/redhat/httpd/zm-httpd.conf.in b/distros/redhat/httpd/zm-httpd.conf.in new file mode 100644 index 000000000..1a00d8d9b --- /dev/null +++ b/distros/redhat/httpd/zm-httpd.conf.in @@ -0,0 +1,8 @@ +# Additional config directives for ZoneMinder with Apache web server + +[Unit] +After=httpd.service + +[Service] +User=@WEB_USER@ +Group=@WEB_GROUP@ diff --git a/distros/redhat/httpd/zoneminder.httpd.conf.in b/distros/redhat/httpd/zoneminder.httpd.conf.in new file mode 100644 index 000000000..a52c1166a --- /dev/null +++ b/distros/redhat/httpd/zoneminder.httpd.conf.in @@ -0,0 +1,88 @@ +# +# ZoneMinder Apache configuration file +# With SSLRequire and HTTPS auto redirect +# Modify this configuration to suit your requirements +# + +# Auto Redirect HTTP requests to HTTPS +RewriteEngine On +RewriteCond %{HTTPS} !=on +RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L] + +# Order matters. This alias must come first. +Alias /zm/cache "@ZM_CACHEDIR@" + + SSLRequireSSL + Options -Indexes +MultiViews +FollowSymLinks + AllowOverride None + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + +Alias /zm "@ZM_WEBDIR@" + + # explicitly set index.php as the only directoryindex + DirectoryIndex disabled + DirectoryIndex index.php + SSLRequireSSL + Options -Indexes +MultiViews +FollowSymLinks + AllowOverride None + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + +ScriptAlias /cgi-bin-zm "@ZM_CGIDIR@" + + SSLRequireSSL + AllowOverride None + Options +ExecCGI +FollowSymLinks + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + +# For better visibility, the following directives have been migrated from the +# default .htaccess files included with the CakePHP project. +# Parameters not set here are inherited from the parent directive above. + + RewriteEngine on + RewriteRule ^$ app/webroot/ [L] + RewriteRule (.*) app/webroot/$1 [L] + RewriteBase /zm/api + + + + RewriteEngine on + RewriteRule ^$ webroot/ [L] + RewriteRule (.*) webroot/$1 [L] + RewriteBase /zm/api + + + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + RewriteBase /zm/api + + diff --git a/distros/redhat/httpd/zoneminder.httpd.tmpfiles.in b/distros/redhat/httpd/zoneminder.httpd.tmpfiles.in new file mode 100644 index 000000000..b403fb24d --- /dev/null +++ b/distros/redhat/httpd/zoneminder.httpd.tmpfiles.in @@ -0,0 +1,5 @@ +D @ZM_TMPDIR@ 0755 @WEB_USER@ @WEB_GROUP@ +D @ZM_SOCKDIR@ 0755 @WEB_USER@ @WEB_GROUP@ +D @ZM_CACHEDIR@ 0755 @WEB_USER@ @WEB_GROUP@ +d @ZM_DIR_EVENTS@ 0755 @WEB_USER@ @WEB_GROUP@ + diff --git a/distros/redhat/jscalendar.sh b/distros/redhat/jscalendar.sh deleted file mode 100755 index 80acaafec..000000000 --- a/distros/redhat/jscalendar.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/bash - -unzip -o jscalendar-1.0.zip -mkdir -v jscalendar-doc -cd jscalendar-1.0 -mv -v *html *php doc/* README ../jscalendar-doc -rmdir -v doc diff --git a/distros/redhat/local_zoneminder.te b/distros/redhat/local_zoneminder.te deleted file mode 100644 index c49505785..000000000 --- a/distros/redhat/local_zoneminder.te +++ /dev/null @@ -1,125 +0,0 @@ -module local_zoneminder 1.2; - -require { - type afs_ka_port_t; - type netsupport_port_t; - type port_t; - type presence_port_t; - type postfix_master_t; - type postfix_qmgr_t; - type postfix_pickup_t; - type httpd_t; - type var_lib_t; - type ionixnetmon_port_t; - type glance_port_t; - type mmcc_port_t; - type postfix_master_t; - type commplex_port_t; - type syslogd_port_t; - type dcc_port_t; - type sip_port_t; - type amqp_port_t; - type condor_port_t; - type afs_fs_port_t; - type nodejs_debug_port_t; - type httpd_var_lib_t; - type websm_port_t; - type afs_pt_port_t; - type postfix_qmgr_t; - type git_port_t; - type ipp_port_t; - type aol_port_t; - type unconfined_t; - type kernel_t; - type init_t; - type auditd_t; - type mysqld_t; - type httpd_log_t; - type syslogd_t; - type httpd_t; - type initrc_state_t; - type initrc_t; - type var_lib_t; - type udev_t; - type mysqld_safe_t; - type sshd_t; - type crond_t; - type getty_t; - type httpd_var_lib_t; - type initrc_var_run_t; - type tmpfs_t; - type dhcpc_t; - type v4l_device_t; - type file_t; - class sock_file { write create unlink }; - class unix_stream_socket { read connectto }; - class lnk_file { write create getattr read lock unlink }; - class dir {search getattr }; - class udp_socket name_bind; - class file { write getattr read lock unlink open }; - class shm { unix_read unix_write associate read write getattr }; - class chr_file getattr; -} - -#============= httpd_t ============== -allow httpd_t auditd_t:dir { search getattr }; -allow httpd_t auditd_t:file { read getattr open }; -allow httpd_t crond_t:dir { search getattr }; -allow httpd_t crond_t:file { read getattr open }; -allow httpd_t dhcpc_t:dir { search getattr }; -allow httpd_t dhcpc_t:file { read getattr open }; -allow httpd_t getty_t:dir { search getattr }; -allow httpd_t getty_t:file { read getattr open }; -allow httpd_t httpd_log_t:file write; -allow httpd_t httpd_var_lib_t:lnk_file { write getattr read lock unlink }; -allow httpd_t init_t:dir { search getattr }; -allow httpd_t init_t:file { read getattr open }; -#!!!! The source type 'httpd_t' can write to a 'file' of the following types: -#squirrelmail_spool_t, mirrormanager_var_run_t, dirsrvadmin_config_t, httpd_lock_t, httpd_tmp_t, dirsrv_config_t, dirsrvadmin_tmp_t, httpd_cache_t, httpd_tmpfs_t, httpd_squirrelmail_t, dirsrv_var_run_t, dirsrv_var_log_t, httpd_var_lib_t, httpd_var_run_t, zarafa_var_lib_t, httpd_prewikka_rw_content_t, httpd_mediawiki_rw_content_t, httpd_squid_rw_content_t, passenger_var_run_t, httpd_smokeping_cgi_rw_content_t, httpd_openshift_rw_content_t, httpd_dirsrvadmin_rw_content_t, httpd_w3c_validator_rw_content_t, httpd_collectd_rw_content_t, cluster_var_lib_t, cluster_var_run_t, httpd_user_rw_content_t, httpd_awstats_rw_content_t, httpdcontent, root_t, httpd_cobbler_rw_content_t, httpd_munin_rw_content_t, cluster_conf_t, httpd_bugzilla_rw_content_t, passenger_tmp_t, httpd_cvs_rw_content_t, httpd_git_rw_content_t, httpd_sys_rw_content_t, httpd_sys_rw_content_t, httpd_nagios_rw_content_t, httpd_apcupsd_cgi_rw_content_t, httpd_nutups_cgi_rw_content_t, httpd_dspam_rw_content_t - -allow httpd_t initrc_state_t:file { read write getattr unlink open }; -allow httpd_t initrc_t:unix_stream_socket connectto; -allow httpd_t initrc_t:shm { unix_read unix_write associate read write getattr }; -allow httpd_t initrc_var_run_t:file { write read lock open }; -allow httpd_t kernel_t:dir { search getattr }; -allow httpd_t kernel_t:file { read getattr open }; -allow httpd_t mysqld_safe_t:dir { search getattr }; -allow httpd_t mysqld_safe_t:file { read getattr open }; -allow httpd_t mysqld_t:dir { search getattr }; -allow httpd_t mysqld_t:file { read getattr open }; -allow httpd_t sshd_t:dir { search getattr }; -allow httpd_t sshd_t:file { read getattr open }; -allow httpd_t syslogd_t:dir { search getattr }; -allow httpd_t syslogd_t:file { read getattr open }; -allow httpd_t tmpfs_t:sock_file write; -allow httpd_t udev_t:dir { search getattr }; -allow httpd_t udev_t:file { read getattr open }; -allow httpd_t unconfined_t:dir { search getattr }; -allow httpd_t unconfined_t:file { read getattr open }; -allow httpd_t var_lib_t:lnk_file { write getattr read lock unlink }; -allow httpd_t var_lib_t:sock_file { write unlink }; -allow httpd_t v4l_device_t:chr_file getattr; -allow httpd_t afs_fs_port_t:udp_socket name_bind; -allow httpd_t afs_ka_port_t:udp_socket name_bind; -allow httpd_t afs_pt_port_t:udp_socket name_bind; -allow httpd_t amqp_port_t:udp_socket name_bind; -allow httpd_t aol_port_t:udp_socket name_bind; -allow httpd_t commplex_port_t:udp_socket name_bind; -allow httpd_t condor_port_t:udp_socket name_bind; -allow httpd_t dcc_port_t:udp_socket name_bind; -allow httpd_t git_port_t:udp_socket name_bind; -allow httpd_t glance_port_t:udp_socket name_bind; -allow httpd_t httpd_var_lib_t:lnk_file create; -allow httpd_t ionixnetmon_port_t:udp_socket name_bind; -allow httpd_t ipp_port_t:udp_socket name_bind; -allow httpd_t mmcc_port_t:udp_socket name_bind; -allow httpd_t netsupport_port_t:udp_socket name_bind; -allow httpd_t nodejs_debug_port_t:udp_socket name_bind; -allow httpd_t port_t:udp_socket name_bind; -allow httpd_t postfix_master_t:dir { search getattr }; -allow httpd_t postfix_master_t:file { read getattr open }; -allow httpd_t postfix_pickup_t:dir { search getattr }; -allow httpd_t postfix_pickup_t:file { read getattr open }; -allow httpd_t postfix_qmgr_t:dir { search getattr }; -allow httpd_t postfix_qmgr_t:file { read getattr open }; -allow httpd_t presence_port_t:udp_socket name_bind; diff --git a/distros/redhat/nginx/com.zoneminder.systemctl.rules.nginx b/distros/redhat/nginx/com.zoneminder.systemctl.rules.nginx new file mode 100644 index 000000000..8eaa78d5c --- /dev/null +++ b/distros/redhat/nginx/com.zoneminder.systemctl.rules.nginx @@ -0,0 +1,7 @@ +polkit.addRule(function(action, subject) { + if (action.id == "com.zoneminder.policykit.pkexec.run-zmsystemctl" && + subject.user != "nginx") { + return polkit.Result.NO; + } + +}); diff --git a/distros/redhat/nginx/redirect.nginx.conf b/distros/redhat/nginx/redirect.nginx.conf new file mode 100644 index 000000000..67ef08124 --- /dev/null +++ b/distros/redhat/nginx/redirect.nginx.conf @@ -0,0 +1,2 @@ +# Auto redirect to https +return 301 https://$host$request_uri; diff --git a/distros/redhat/nginx/zm-nginx.conf b/distros/redhat/nginx/zm-nginx.conf new file mode 100644 index 000000000..5f0319b17 --- /dev/null +++ b/distros/redhat/nginx/zm-nginx.conf @@ -0,0 +1,9 @@ +# Additional config directives for ZoneMinder with Nginx web server + +[Unit] +After=nginx.service php-fpm.service fcgiwrap.service +Requires=php-fpm.service fcgiwrap@nginx.service + +[Service] +User=nginx +Group=nginx diff --git a/distros/redhat/nginx/zm-web-user.conf b/distros/redhat/nginx/zm-web-user.conf new file mode 100644 index 000000000..3146679fd --- /dev/null +++ b/distros/redhat/nginx/zm-web-user.conf @@ -0,0 +1,3 @@ +ZM_WEB_USER=nginx +ZM_WEB_GROUP=nginx + diff --git a/distros/redhat/nginx/zoneminder.nginx.conf.in b/distros/redhat/nginx/zoneminder.nginx.conf.in new file mode 100644 index 000000000..2976a83b2 --- /dev/null +++ b/distros/redhat/nginx/zoneminder.nginx.conf.in @@ -0,0 +1,57 @@ +server { + listen 443 ssl default_server; + listen [::]:443 ssl default_server; + server_name = localhost $hostname; + + ssl_certificate "/etc/pki/tls/certs/localhost.crt"; + ssl_certificate_key "/etc/pki/tls/private/localhost.key"; + ssl_session_cache shared:SSL:1m; + ssl_session_timeout 10m; + ssl_ciphers PROFILE=SYSTEM; + ssl_prefer_server_ciphers on; + + # Auto redirect to server/zm when no url suffix was given + location = / { + return 301 zm; + } + + location /cgi-bin-zm { + gzip off; + alias "@ZM_CGIDIR@"; + + include /etc/nginx/fastcgi_params; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_pass unix:/run/fcgiwrap/fcgiwrap-nginx.sock; + } + + location /zm/cache { + alias "@ZM_CACHEDIR@"; + } + + location /zm { + gzip off; + alias "@ZM_WEBDIR@"; + index index.php; + + location ~ \.php$ { + try_files $uri =404; + expires epoch; + include /etc/nginx/fastcgi_params; + fastcgi_param SCRIPT_FILENAME $request_filename; + fastcgi_index index.php; + fastcgi_pass unix:/run/php-fpm/www.sock; + } + + location ~ \.(jpg|jpeg|gif|png|ico)$ { + access_log off; + expires 33d; + } + + location /zm/api/ { + alias "@ZM_WEBDIR@"; + rewrite ^/zm/api(.+)$ /zm/api/app/webroot/index.php?p=$1 last; + } + } + +} + diff --git a/distros/redhat/nginx/zoneminder.nginx.tmpfiles.in b/distros/redhat/nginx/zoneminder.nginx.tmpfiles.in new file mode 100644 index 000000000..502b817d8 --- /dev/null +++ b/distros/redhat/nginx/zoneminder.nginx.tmpfiles.in @@ -0,0 +1,5 @@ +D @ZM_TMPDIR@ 0755 nginx nginx +D @ZM_SOCKDIR@ 0755 nginx nginx +D @ZM_CACHEDIR@ 0755 nginx nginx +d @ZM_DIR_EVENTS@ 0755 nginx nginx + diff --git a/distros/redhat/nginx/zoneminder.php-fpm.conf b/distros/redhat/nginx/zoneminder.php-fpm.conf new file mode 100644 index 000000000..cd60a5120 --- /dev/null +++ b/distros/redhat/nginx/zoneminder.php-fpm.conf @@ -0,0 +1,14 @@ +; This config file is needed when using ZoneMinder with web servers other +; than Apache. You can ignore this file if you are using Apache web server. +; Change the user and group of the default pool to the web server account +[www] + +user = nginx +group = nginx + +; These parameters are typically a tradoff between performance and memory +; consumption. See the contents of www.conf for details. + +pm = ondemand +pm.max_children = 50 +pm.process_idle_timeout = 10s diff --git a/distros/redhat/readme/README b/distros/redhat/readme/README new file mode 100644 index 000000000..f0fff828f --- /dev/null +++ b/distros/redhat/readme/README @@ -0,0 +1,32 @@ +What's New +========== + +1. See the ZoneMinder release notes for a list of new features: + https://github.com/ZoneMinder/zoneminder/releases + +2. The contents of the ZoneMinder Apache config file have changed. In + addition, this ZoneMinder package now requires you to manually symlink the + ZoneMinder Apache config file. See new install step 6 and upgrade step 3 + in the appropriate README for details. + +3. This package has been split into sub-packages to allow compatibility with + other web servers. Here is a breakdown of the available packages: + + zoneminder - Meta-package installs zoneminder-common and zoneminder-httpd + This exists soley for backwards compatibility. + zoneminder-common - Common files that do not differ based on the web server + zoneminder-httpd - Files needed for compatibility with the Apache web server + zoneminder-nginx - Files needed for compatibility with the Nginx web server + + You can switch between different subpackages with dnf/yum. Be advised that, + switching between httpd <-> nginx requires manaully changing ownership of + all event folders and the php session folder after the change. + +4. The timezone must now be set from the ZoneMinder web console. See the + appropriate README, mentioned in the next step, for details. + +6. Continue on to the next README that corresponds to your chosen webserver: + + README.httpd - Follow these steps when using Apache + README.nginx - Follow these steps when using Nginx + diff --git a/distros/redhat/readme/README.httpd b/distros/redhat/readme/README.httpd new file mode 100644 index 000000000..1ba0ee688 --- /dev/null +++ b/distros/redhat/readme/README.httpd @@ -0,0 +1,173 @@ +New installs +============ + +NOTE: EL7 users should replace "dnf" with "yum" in the instructions below. + +1. Unless you are already using MariaDB server, you need to ensure that the + server is configured to start during boot and properly secured by running: + + sudo dnf install mariadb-server + sudo systemctl enable mariadb + sudo systemctl start mariadb.service + mysql_secure_installation + +2. Assuming the database is local and using the password for the root account + set during the previous step, you will need to create the ZoneMinder + database and configure a database account for ZoneMinder to use: + + mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql + mysql -uroot -p -e "grant all on zm.* to \ + 'zmuser'@localhost identified by 'zmpass';" + mysqladmin -uroot -p reload + + The database account credentials, zmuser/zmpass, are arbitrary. Set them to + anything that suits your environment. + +3. If you have chosen to change the zoneminder database account credentials to + something other than zmuser/zmpass, you must now create a config file under + /etc/zm/conf.d and set your credentials there. For example, create the file + /etc/zm/conf.d/zm-db-user.conf and add the following content to it: + + ZM_DB_USER = {username of the sql account you want to use} + ZM_DB_PASS = {password of the sql account you want to use} + + Once the file has been saved, set proper file & ownership permissions on it: + + sudo chown root:apache *.conf + sudo chmod 640 *.conf + +4. Manually setting the timezone in /etc/php.ini is deprecated. + + Instead, navigate to Options -> System from the ZoneMinder web console. + Do this after completing step 10, below. + + Note that timezone errors will appear in the ZoneMinder log until this + has been completed. + +5. Disable SELinux + + SELinux must be disabled or put into permissive mode. This is not optional! + + To immediately disbale SELinux for the current seesion, issue the following + from the command line: + + sudo setenforce 0 + + To permanently disable SELinux, edit /etc/selinux/config and change the + SELINUX line from "enforcing" to "disabled". This change will take + effect after a reboot. + +6. Configure the web server + + This package uses the HTTPS protocol by default to access the web portal, + using the default self signed certificate on your system. Requests using + HTTP will auto-redirect to HTTPS. + + Inspect the web server configuration file and verify it meets your needs: + + /etc/zm/www/zoneminder.httpd.conf + + If you are running other web enabled services then you may need to edit + this file to suite. See README.https to learn about other alternatives. + + When in doubt, proceed with the default: + + sudo ln -sf /etc/zm/www/zoneminder.httpd.conf /etc/httpd/conf.d/ + sudo dnf install mod_ssl + +7. Now start the web server: + + sudo systemctl enable httpd + sudo systemctl start httpd + +8. Now start zoneminder: + + sudo systemctl enable zoneminder + sudo systemctl start zoneminder + +9. Optionally configure the firewall + + All Redhat distros ship with the firewall enabled. That means you will not + be able to access the ZoneMinder web console from a remote machine until + changes are made to the firewall. + + What follows are a set of minimal commands to allow remote access to the + ZoneMinder web console and also allow ZoneMinder's ONVIF discovery to + work. The following commands do not put any restrictions on which remote + machine(s) have access to the listed ports or services. + + sudo firewall-cmd --permanent --zone=public --add-service=http + sudo firewall-cmd --permanent --zone=public --add-service=https + sudo firewall-cmd --permanent --zone=public --add-port=3702/udp + sudo firewall-cmd --reload + + Additional changes to the firewall may be required, depending on your + security requirements and how you use the system. It is up to you to verify + these commands are sufficient. + +10. Access the ZoneMinder web console + + You may now access the ZoneMinder web console from your web browser using + an appropriate url. Here are some examples: + + http://localhost/zm (works from the local machine only) + http://{machine name}/zm (works only if dns is configured for your network) + http://{ip address}/zm + +Upgrades +======== + +1. Conf.d folder support has been added to ZoneMinder. Any custom + changes previously made to zm.conf must now be made in one or more custom + config files, created under the conf.d folder. Do this now. See + /etc/zm/conf.d/README for details. Once you recreate any custom config changes + under the conf.d folder, they will remain in place indefinitely. + +2. Verify permissions of the zmuser account. + + Over time, the database account permissions required for normal operation + have increased. Verify the zmuser database account has been granted all + permission to the ZoneMinder database: + + mysql -uroot -p -e "show grants for zmuser@localhost;" + + See step 2 of the Installation section to add missing permissions. + +3. Verify the ZoneMinder Apache configuration file in the folder + /etc/zm/www. You will have a file called "zoneminder.httpd.conf" and there + may also be one or more files with "rpmnew" extenstion. If the rpmnew file + exists, inspect it and merge anything new in that file with zoneminder.conf. + Verify the SSL Requirements meet your needs. Read README.https if necessary. + + The contents of this file must be merged into your Apache configuration. + See step 6 of the installation section if you have not already done this + during a previous upgrade. + + IMPORTANT: Failure to complete this step properly will result in a mostly + empty or significantly corrupted web console post-upgrade. + +4. Upgrade the database before starting ZoneMinder. + + Most upgrades can be performed by executing the following command: + + sudo zmupdate.pl + + Recent versions of ZoneMinder don't require any parameters added to the + zmupdate command. However, if ZoneMinder complains, you may need to call + zmupdate in the following manner: + + sudo zmupdate.pl --user=root --pass= --version= + +5. Now restart the web server then start zoneminder: + + sudo systemctl restart httpd + sudo systemctl start zoneminder + +6. Manually setting the timezone in /etc/php.ini is deprecated. + + Instead, navigate to Options -> System from the ZoneMinder web console. + Do this now. + + Note that timezone errors will appear in the ZoneMinder log until this + has been completed. + diff --git a/distros/redhat/readme/README.https b/distros/redhat/readme/README.https new file mode 100644 index 000000000..620588bf9 --- /dev/null +++ b/distros/redhat/readme/README.https @@ -0,0 +1,27 @@ +HTTPS is now the default +======================== + +By default, ZoneMinder will use the certifciate created when the mod_ssl +pacakge was installed on your system. + +Since the certificate is self-signed, you will get a warning from your browser +the first time you access the web portal. This is normal. + +This is not intended to be an all encompasing solution for everyone. ZoneMinder +will work just fine over HTTPS the way it is currently configured. However, +here are a couple of considerations you may want to take to improve your +experience. + +1. Install a fully signed certificate from letsencrypt, using certbot. See the + certbot site for more information. This free service is very easy to set up. + https://certbot.eff.org/all-instructions/ + +2. Create your own certificate. The CentOS wiki has a guide that describes how + to do this: https://wiki.centos.org/HowTos/Https . Additionally, Googling + "centos certificate" reveals many articles on the subject. + +3. When using Apache, you can turn off HTTPS entirely by simply commenting + out the SSLRequireSSL directives found in + /etc/zm/www/zoneminder.apache.conf. You should also comment out the + HTTP -> HTTPS Rewrite rule. + diff --git a/distros/redhat/readme/README.nginx b/distros/redhat/readme/README.nginx new file mode 100644 index 000000000..8bc3bbdc1 --- /dev/null +++ b/distros/redhat/readme/README.nginx @@ -0,0 +1,179 @@ +New installs +============ + +1. Unless you are already using MariaDB server, you need to ensure that the + server is configured to start during boot and properly secured by running: + + sudo dnf install mariadb-server + sudo systemctl enable mariadb + sudo systemctl start mariadb.service + mysql_secure_installation + +2. Assuming the database is local and using the password for the root account + set during the previous step, you will need to create the ZoneMinder + database and configure a database account for ZoneMinder to use: + + mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql + mysql -uroot -p -e "grant all on zm.* to \ + 'zmuser'@localhost identified by 'zmpass';" + mysqladmin -uroot -p reload + + The database account credentials, zmuser/zmpass, are arbitrary. Set them to + anything that suits your environment. + +3. If you have chosen to change the zoneminder database account credentials to + something other than zmuser/zmpass, you must now create a config file under + /etc/zm/conf.d and set your credentials there. For example, create the file + /etc/zm/conf.d/zm-db-user.conf and add the following content to it: + + ZM_DB_USER = {username of the sql account you want to use} + ZM_DB_PASS = {password of the sql account you want to use} + + Once the file has been saved, set proper file & ownership permissions on it: + + sudo chown root:nginx *.conf + sudo chmod 640 *.conf + +4. Manually setting the timezone in /etc/php.ini is deprecated. + + Instead, navigate to Options -> System from the ZoneMinder web console. + Do this after completing step 10, below. + + Note that timezone errors will appear in the ZoneMinder log until this + has been completed. + +5. Disable SELinux + + We currently do not have the resources to create and maintain an accurate + SELinux policy for ZoneMinder on Fedora. We will gladly accept pull + reqeusts from anyone who wishes to do the work. In the meantime, SELinux + will need to be disabled or put into permissive mode. + + To immediately disbale SELinux for the current seesion, issue the following + from the command line: + + sudo setenforce 0 + + To permanently disable SELinux, edit /etc/selinux/config and change the + SELINUX line from "enforcing" to "disabled". This change will take + effect after a reboot. + +6. Configure the web server + + This package uses the HTTPS protocol by default to access the web portal, + using the default self signed certificate on your system. + + Inspect the web server configuration file and verify it meets your needs: + + /etc/zm/www/zoneminder.conf + + If you are running other web enabled services then you may need to edit + this file to suite. See README.https to learn about other alternatives. + + If you wish http requests to auto-redirect to https requests, then link or + copy /etc/zm/www/redirect.nginx.conf into /etc/nginx/default.d folder. + + When in doubt, proceed with the default: + + sudo ln -sf /etc/zm/www/zoneminder.nginx.conf /etc/nginx/conf.d/ + sudo ln -sf /etc/zm/www/redirect.nginx.conf /etc/nginx/default.d/ + +7. Edit /etc/sysconfig/fcgiwrap and set DAEMON_PROCS to the maximum number of + simulatneous streams the server should support. Generally, a good minimum + value for this equals the total number of cameras you expect to view at the + same time. + +8. Now start the web server: + + sudo systemctl enable nginx + sudo systemctl start nginx + +9. Now start zoneminder: + + sudo systemctl enable zoneminder + sudo systemctl start zoneminder + +10. Optionally configure the firewall + + All Redhat distros ship with the firewall enabled. That means you will not + be able to access the ZoneMinder web console from a remote machine until + changes are made to the firewall. + + What follows are a set of minimal commands to allow remote access to the + ZoneMinder web console and also allow ZoneMinder's ONVIF discovery to + work. The following commands do not put any restrictions on which remote + machine(s) have access to the listed ports or services. + + sudo firewall-cmd --permanent --zone=public --add-service=http + sudo firewall-cmd --permanent --zone=public --add-service=https + sudo firewall-cmd --permanent --zone=public --add-port=3702/udp + sudo firewall-cmd --reload + + Additional changes to the firewall may be required, depending on your + security requirements and how you use the system. It is up to you to verify + these commands are sufficient. + +11. Access the ZoneMinder web console + + You may now access the ZoneMinder web console from your web browser using + an appropriate url. Here are some examples: + + http://localhost/zm (works from the local machine only) + http://{machine name}/zm (works only if dns is configured for your network) + http://{ip address}/zm + +Upgrades +======== + +1. Conf.d folder support has been added to ZoneMinder. Any custom + changes previously made to zm.conf must now be made in one or more custom + config files, created under the conf.d folder. Do this now. See + /etc/zm/conf.d/README for details. Once you recreate any custom config changes + under the conf.d folder, they will remain in place indefinitely. + +2. Verify permissions of the zmuser account. + + Over time, the database account permissions required for normal operation + have increased. Verify the zmuser database account has been granted all + permission to the ZoneMinder database: + + mysql -uroot -p -e "show grants for zmuser@localhost;" + + See step 2 of the Installation section to add missing permissions. + +3. Verify the ZoneMinder Nginx configuration file in the folder + /etc/zm/www. You will have a file called "zoneminder.conf" and there + may also be a file called "zoneminder.conf.rpmnew". If the rpmnew file + exists, inspect it and merge anything new in that file with zoneminder.conf. + Verify the SSL REquirements meet your needs. Read README.https if necessary. + + The contents of this file must be merged into your Nginx configuration. + See step 6 of the installation section if you have not already done this + during a previous upgrade. + +4. Upgrade the database before starting ZoneMinder. + + Most upgrades can be performed by executing the following command: + + sudo zmupdate.pl + + Recent versions of ZoneMinder don't require any parameters added to the + zmupdate command. However, if ZoneMinder complains, you may need to call + zmupdate in the following manner: + + sudo zmupdate.pl --user=root --pass= --version= + +5. Now restart nginx and php-fpm then start zoneminder: + + sudo systemctl restart nginx + sudo systemctl restart php-fpm + sudo systemctl start zoneminder + +6. Manually setting the timezone in /etc/php.ini is deprecated. + + Instead, navigate to Options -> System from the ZoneMinder web console. + Do this now. + + Note that timezone errors will appear in the ZoneMinder log until this + has been completed. + diff --git a/distros/redhat/zoneminder.el6.conf.in b/distros/redhat/zoneminder.el6.conf.in deleted file mode 100644 index 0fbee6a62..000000000 --- a/distros/redhat/zoneminder.el6.conf.in +++ /dev/null @@ -1,28 +0,0 @@ -# -# ZoneMinder Apache configuration file -# With SSLRequire and HTTPS auto redirect -# Modify this configuration to suit your requirements -# - -# Auto Redirect HTTP requests to HTTPS -RewriteEngine On -RewriteCond %{HTTPS} !=on -RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L] - -Alias /zm "@ZM_WEBDIR@" - - SSLRequireSSL - Options -Indexes MultiViews FollowSymLinks - AllowOverride All - Order allow,deny - Allow from all - - -ScriptAlias /cgi-bin/zm "@ZM_CGIDIR@" - - SSLRequireSSL - AllowOverride All - Options ExecCGI FollowSymLinks - Order allow,deny - Allow from all - diff --git a/distros/redhat/zoneminder.el6.logrotate.in b/distros/redhat/zoneminder.el6.logrotate.in deleted file mode 100644 index 5b852cba7..000000000 --- a/distros/redhat/zoneminder.el6.logrotate.in +++ /dev/null @@ -1,7 +0,0 @@ -@ZM_LOGDIR@/*log -{ - weekly - notifempty - missingok - create 660 http http -} diff --git a/distros/redhat/zoneminder.el6.spec b/distros/redhat/zoneminder.el6.spec deleted file mode 100644 index 0b7770b50..000000000 --- a/distros/redhat/zoneminder.el6.spec +++ /dev/null @@ -1,363 +0,0 @@ -%define zmuid $(id -un) -%define zmgid $(id -gn) -%define zmuid_final apache -%define zmgid_final apache - -Name: zoneminder -Version: 1.30.0 -Release: 1%{?dist} -Summary: A camera monitoring and analysis tool -Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ -# Mootools is inder the MIT license: http://mootools.net/ -# Cambozola is GPL: http://www.charliemouse.com/code/cambozola/ -License: GPLv2+ and LGPLv2+ and MIT -URL: http://www.zoneminder.com/ - -#Source0: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz -Source0: ZoneMinder-%{version}.tar.gz - -BuildRequires: cmake gnutls-devel bzip2-devel -BuildRequires: mysql-devel pcre-devel libjpeg-turbo-devel -BuildRequires: perl(Archive::Tar) perl(Archive::Zip) -BuildRequires: perl(Date::Manip) perl(DBD::mysql) -BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent) -BuildRequires: perl(MIME::Entity) perl(MIME::Lite) -BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap) -BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign) -BuildRequires: perl(Expect) perl(X10::ActiveHome) perl(Astro::SunTime) -BuildRequires: libcurl-devel vlc-devel ffmpeg-devel polkit-devel -# cmake needs the following installed at build time due to the way it auto-detects certain parameters -BuildRequires: httpd ffmpeg - -Requires: httpd php php-gd php-mysql mysql-server libjpeg-turbo cambozola polkit net-tools -Requires: psmisc perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip) -Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP) -Requires: libcurl vlc-core ffmpeg - -Requires(post): /sbin/chkconfig -Requires(post): /usr/bin/checkmodule -Requires(post): /usr/bin/semodule_package -Requires(post): /usr/sbin/semodule -Requires(post): /usr/bin/gpasswd -Requires(post): /usr/bin/less -Requires(preun): /sbin/chkconfig -Requires(preun): /sbin/service -Requires(preun): /usr/sbin/semodule -Requires(postun): /sbin/service - - -%description -ZoneMinder is a set of applications which is intended to provide a complete -solution allowing you to capture, analyse, record and monitor any cameras you -have attached to a Linux based machine. It is designed to run on kernels which -support the Video For Linux (V4L) interface and has been tested with cameras -attached to BTTV cards, various USB cameras and IP network cameras. It is -designed to support as many cameras as you can attach to your computer without -too much degradation of performance. - - -%prep -%setup -q -n ZoneMinder-%{version} - -# Change the following default values -./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin/zm/nph-zms -./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes -./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm -./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload -./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes -./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no -./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no -./utils/zmeditconfigdata.sh ZM_OPT_FAST_DELETE no - -%build -# Have to override CMAKE_INSTALL_LIBDIR for cmake < 2.8.7 due to this bug: -# https://bugzilla.redhat.com/show_bug.cgi?id=795542 -%cmake -DZM_TARGET_DISTRO="el6" -DCMAKE_INSTALL_LIBDIR:PATH=%{_lib} . - -make %{?_smp_mflags} - -%install -export DESTDIR=%{buildroot} -make install - -%post -/sbin/chkconfig --add zoneminder -/sbin/chkconfig zoneminder on - -# Allow zoneminder access to local video sources, serial ports, and x10 -echo -/usr/bin/gpasswd -a %{zmuid_final} video -/usr/bin/gpasswd -a %{zmuid_final} dialout - -# Create and load zoneminder selinux policy module -echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wait.\n" -/usr/bin/checkmodule -M -m -o %{_docdir}/%{name}-%{version}/local_zoneminder.mod %{_docdir}/%{name}-%{version}/local_zoneminder.te > /dev/null -/usr/bin/semodule_package -o %{_docdir}/%{name}-%{version}/local_zoneminder.pp -m %{_docdir}/%{name}-%{version}/local_zoneminder.mod > /dev/null -/usr/sbin/semodule -i %{_docdir}/%{name}-%{version}/local_zoneminder.pp > /dev/null - -# Upgrade from a previous version of zoneminder -if [ $1 -eq 2 ] ; then - - # Add any new PTZ control configurations to the database (will not overwrite) - %{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || : - - # Freshen the database - %{_bindir}/zmupdate.pl -f >/dev/null 2>&1 || : - - # We can't run this automatically when new sql account permissions need to - # be manually added first - # Run zmupdate non-interactively - #/usr/bin/zmupdate.pl --nointeractive -fi - -# Warn the end user to read the README file -echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, read README.Centos to finish the\ninstallation or upgrade!\n" -echo -e "\nThe README file is located here: %{_docdir}/%{name}-%{version}.\n" - -%preun -if [ $1 -eq 0 ]; then - /sbin/service zoneminder stop > /dev/null 2>&1 || : - /sbin/chkconfig --del zoneminder - echo -e "\nRemoving ZoneMinder SELinux policy module. Please wait.\n" - /usr/sbin/semodule -r local_zoneminder.pp -fi - - -%postun -if [ $1 -ge 1 ]; then - /sbin/service zoneminder condrestart > /dev/null 2>&1 || : -fi - -# Remove the doc folder. -rm -rf %{_docdir}/%{name}-%{version} - -%files -%defattr(-,root,root,-) -%doc AUTHORS BUGS ChangeLog COPYING LICENSE NEWS README.md distros/redhat/README.CentOS distros/redhat/README.https distros/redhat/jscalendar-doc -%doc distros/redhat/local_zoneminder.te -%config %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm.conf -%config(noreplace) %attr(644,root,root) %{_sysconfdir}/httpd/conf.d/zoneminder.conf -%config(noreplace) /etc/logrotate.d/%{name} -%attr(755,root,root) %{_initrddir}/zoneminder - -%{_bindir}/zma -%{_bindir}/zmaudit.pl -%{_bindir}/zmc -%{_bindir}/zmcontrol.pl -%{_bindir}/zmdc.pl -%{_bindir}/zmf -%{_bindir}/zmfilter.pl -%{_bindir}/zmpkg.pl -%{_bindir}/zmtrack.pl -%{_bindir}/zmtrigger.pl -%{_bindir}/zmu -%{_bindir}/zmupdate.pl -%{_bindir}/zmvideo.pl -%{_bindir}/zmwatch.pl -%{_bindir}/zmcamtool.pl -%{_bindir}/zmsystemctl.pl -%{_bindir}/zmtelemetry.pl -%{_bindir}/zmx10.pl -%{_bindir}/zmonvif-probe.pl - -%{perl_vendorlib}/ZoneMinder* -%{perl_vendorarch}/auto/ZoneMinder/.packlist -%{perl_vendorarch}/auto/ONVIF/.packlist -%{perl_vendorlib}/ONVIF* -%{perl_vendorlib}/WSDiscovery* -%{perl_vendorlib}/WSSecurity* -%{perl_vendorlib}/WSNotification* -%{_mandir}/man*/* -%dir %{_libexecdir}/%{name} -%{_libexecdir}/%{name}/cgi-bin -%dir %{_datadir}/%{name} -%{_datadir}/%{name}/db -%{_datadir}/%{name}/www - -%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy -%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules - -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/events -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/images -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/sock -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/swap -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/lib/zoneminder/temp -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/log/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/spool/zoneminder-upload - -%changelog -* Thu Mar 3 2016 Andrew Bauer - 1.30.0 -- Bump version fo 1.30.0 release. - -* Tue Sep 8 2015 Andrew Bauer - 1.28.1 -- Require https, freshen dB on updates. - -* Wed Feb 18 2015 Andrew Bauer - 1.28.1 -- Include ONVIF support files - -* Sun Oct 5 2014 Andrew Bauer - 1.28.0 -- Bump version for 1.28.0 release. - -* Fri Mar 14 2014 Andrew Bauer - 1.27 -- Tweak build requirements for cmake - -* Sat Feb 01 2014 Andrew Bauer - 1.27 -- Add zmcamtool.pl. Bump version for 1.27 release. - -* Mon Dec 16 2013 Andrew Bauer - 1.26.5 -- This is a bug fixe release -- RTSP fixes, cmake enhancements, couple other misc fixes - -* Sat Oct 19 2013 Andrew Bauer - 1.26.4 -- Streamline the cmake build. Move much code into cmakelist.txt file. - -* Mon Oct 07 2013 Andrew Bauer - 1.26.4 -- Initial cmake build. - -* Sun Oct 06 2013 Andrew Bauer - 1.26.4 -- All files are now part of the zoneminder source tree. Update specfile accordingly. - -* Thu Sep 05 2013 Andrew Bauer - 1.26.0 -- 1.26.0 Release -- https://github.com/ZoneMinder/ZoneMinder/archive/v1.26.0.tar.gz - -* Sun Sep 01 2013 Andrew Bauer - 1.26.0-beta -- Update SELinux policy module - -* Thu Aug 29 2013 Andrew Bauer - 1.26.0-beta -- Third Beta release -- https://github.com/ZoneMinder/ZoneMinder/tree/release-1.26 -- Reduce number of uneeded dependencies by integrating cambozola into spec file - -* Thu Aug 15 2013 Andrew Bauer - 1.26.0-beta -- Initial Beta release -- https://github.com/ZoneMinder/ZoneMinder/tree/release-1.26 - -* Sun Aug 11 2013 Andrew Bauer - 1.25.0-kfirproper -- Modified specfile to work with kfir-proper branch -- https://github.com/ZoneMinder/ZoneMinder/tree/kfir-proper - -* Wed Aug 07 2013 Andrew Bauer - 1.25.0-2svn3827 -- Move RHEL/CentOS specific defaults to a patch file -- Add bzip2-devel as a build dependency -- Default ZM_SSL_LIB back to gnutls. AUTH_RELAY = hashed didn't work with openssl. - -* Fri Aug 02 2013 Andrew Bauer - 1.25.0-1svn3827 -- Update to latest 1.25.0 subversion. -- Does not compile with modern versions of ffmpeg. Configure to work only with older versions. -- Does not compile with gcc 4.7. Configure to build with gcc less than 4.7. - -* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 -- Update to latest 1.24.3 subversion. Turns out that what upstream was calling - 1.24.3 is really just an occasionally updated devel snapshot. -- Rebase various patches. - -* Wed Mar 23 2011 Dan Horák - 1.24.3-3 -- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 -- Update to latest upstream version. -- Rebase patches. -- Initial incomplete attempt to disable v4l1 support. - -* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 -- Unbundle cambozola; instead link to the separately pacakged copy. -- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. -- Git rid of mixed space/tab usage by removing all tabs. -- Remove unnecessary Conflicts: line. -- Attempt to force short_open_tag on for the code directories. -- Move default location of sockets, swaps, logfiles and some temporary files to - make more sense and allow things to work better with a future selinux policy. -- Fix errors in README.CentOS. - -* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 -- rebuild against perl 5.10.1 -- use Perl vendorarch and archlib variables correctly - -* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 -- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 -- Initial update to 1.24.2. -- Rebase patches. -- Update mootools download location. -- Update to mootools 1.2.3. -- Add additional dependencies for some optional features. - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 -- Remove unused Sys::Mmap perl dependency RPM is finding - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 -- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 -- Added noffmpeg patch to make building outside mock easier - -* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 -- Patch for gcc 4.4 compilation errors -- Upgrade to 1.24.1 - -* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 -- rebuild for dependencies - -* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 -- Fix permissions on zm.conf - -* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 -- Initial attempt at packaging 1.23. - -* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 -- Add perl module compat dependency, bz #453590 - -* Tue May 6 2008 Martin Ebourne - 1.22.3-14 -- Remove default runlevel, bz #441315 - -* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 -- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. - -* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 -- Autorebuild for GCC 4.3 - -* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 -- Fix compilation on gcc 4.3 - -* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 -- Rebuild for new openssl - -* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 -- Fix licence tag - -* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 -- Fixes from testing by Jitz including missing dependencies and database creation - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 -- Disable crashtrace on ppc - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 -- Fix uid for directories in /var/lib/zoneminder - -* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 -- Added perl Archive::Tar dependency -- Disabled web interface due to lack of access control on the event images - -* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 -- Changes recommended in review by Jason Tibbitts - -* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 -- Standardised on package name of zoneminder - -* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 -- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/redhat/zoneminder.el7.conf.in b/distros/redhat/zoneminder.el7.conf.in deleted file mode 100644 index 564e4ccbd..000000000 --- a/distros/redhat/zoneminder.el7.conf.in +++ /dev/null @@ -1,43 +0,0 @@ -# -# ZoneMinder Apache configuration file -# With SSLRequire and HTTPS auto redirect -# Modify this configuration to suit your requirements -# - -# Auto Redirect HTTP requests to HTTPS -RewriteEngine On -RewriteCond %{HTTPS} !=on -RewriteRule ^/?(zm)(.*) https://%{SERVER_NAME}/$1$2 [R,L] - -Alias /zm "@ZM_WEBDIR@" - - SSLRequireSSL - Options -Indexes +MultiViews +FollowSymLinks - AllowOverride All - - # Apache 2.4 - Require all granted - - - # Apache 2.2 - Order deny,allow - Allow from all - - - -ScriptAlias /cgi-bin-zm "@ZM_CGIDIR@" - - SSLRequireSSL - AllowOverride All - Options +ExecCGI +FollowSymLinks - - # Apache 2.4 - Require all granted - - - # Apache 2.2 - Order deny,allow - Allow from all - - - diff --git a/distros/redhat/zoneminder.el7.logrotate.in b/distros/redhat/zoneminder.el7.logrotate.in deleted file mode 100644 index b4919eb5e..000000000 --- a/distros/redhat/zoneminder.el7.logrotate.in +++ /dev/null @@ -1,8 +0,0 @@ -@ZM_LOGDIR@/*.log { - missingok - notifempty - sharedscripts - postrotate - @BINDIR@/zmpkg.pl logrot 2> /dev/null > /dev/null || : - endscript -} diff --git a/distros/redhat/zoneminder.el7.spec b/distros/redhat/zoneminder.el7.spec deleted file mode 100644 index b72e0bbe7..000000000 --- a/distros/redhat/zoneminder.el7.spec +++ /dev/null @@ -1,427 +0,0 @@ -%define zmuid $(id -un) -%define zmgid $(id -gn) -%define zmuid_final apache -%define zmgid_final apache - -%global _hardened_build 1 - -Name: zoneminder -Version: 1.30.0 -Release: 1%{?dist} -Summary: A camera monitoring and analysis tool -Group: System Environment/Daemons -# jscalendar is LGPL (any version): http://www.dynarch.com/projects/calendar/ -# Mootools is inder the MIT license: http://mootools.net/ -License: GPLv2+ and LGPLv2+ and MIT -URL: http://www.zoneminder.com/ - -#Source: https://github.com/ZoneMinder/ZoneMinder/archive/v%{version}.tar.gz -Source: ZoneMinder-%{version}.tar.gz - -BuildRequires: cmake gnutls-devel systemd-units bzip2-devel -BuildRequires: mariadb-devel pcre-devel libjpeg-turbo-devel -BuildRequires: perl(Archive::Tar) perl(Archive::Zip) perl-podlators -BuildRequires: perl(Date::Manip) perl(DBD::mysql) -BuildRequires: perl(ExtUtils::MakeMaker) perl(LWP::UserAgent) -BuildRequires: perl(MIME::Entity) perl(MIME::Lite) -BuildRequires: perl(PHP::Serialization) perl(Sys::Mmap) -BuildRequires: perl(Time::HiRes) perl(Net::SFTP::Foreign) -BuildRequires: perl(Expect) perl(Sys::Syslog) -BuildRequires: gcc gcc-c++ vlc-devel libcurl-devel libv4l-devel -BuildRequires: ffmpeg ffmpeg-devel perl(X10::ActiveHome) perl(Astro::SunTime) -# cmake needs the following installed at build time due to the way it auto-detects certain parameters -BuildRequires: httpd polkit-devel - -Requires: httpd php php-gd php-mysql mariadb-server cambozola polkit net-tools -Requires: psmisc libjpeg-turbo vlc-core libcurl -Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) -Requires: perl(DBD::mysql) perl(Archive::Tar) perl(Archive::Zip) -Requires: perl(MIME::Entity) perl(MIME::Lite) perl(Net::SMTP) perl(Net::FTP) -Requires: perl(LWP::Protocol::https) ffmpeg - -Requires(post): systemd-units systemd-sysv -Requires(post): /usr/bin/gpasswd -Requires(post): /usr/bin/less -Requires(preun): systemd-units -Requires(postun): systemd-units - -%description -ZoneMinder is a set of applications which is intended to provide a complete -solution allowing you to capture, analyse, record and monitor any cameras you -have attached to a Linux based machine. It is designed to run on kernels which -support the Video For Linux (V4L) interface and has been tested with cameras -attached to BTTV cards, various USB cameras and IP network cameras. It is -designed to support as many cameras as you can attach to your computer without -too much degradation of performance. - -%prep -%setup -q -n ZoneMinder-%{version} - -# Change the following default values -./utils/zmeditconfigdata.sh ZM_PATH_ZMS /cgi-bin-zm/nph-zms -./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes -./utils/zmeditconfigdata.sh ZM_PATH_SWAP /dev/shm -./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR /var/spool/zoneminder-upload -./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes -./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no -./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no -./utils/zmeditconfigdata.sh ZM_OPT_FAST_DELETE no - -%build -%cmake \ - -DZM_TARGET_DISTRO="el7" \ - . - -make %{?_smp_mflags} - -%install -export DESTDIR=%{buildroot} -make install - -%post -if [ $1 -eq 1 ] ; then - # Initial installation - /bin/systemctl daemon-reload >/dev/null 2>&1 || : -fi - -# Allow zoneminder access to local video sources, serial ports, and x10 -/usr/bin/gpasswd -a %{zmuid_final} video -/usr/bin/gpasswd -a %{zmuid_final} dialout - -# Disabled. SELinux policy does not work for RHEL 7. -# Create and load zoneminder selinux policy module -#echo -e "\nCreating and installing a ZoneMinder SELinux policy module. Please wait.\n" -#/usr/bin/checkmodule -M -m -o %{_docdir}/%{name}-%{version}/local_zoneminder.mod %{_docdir}/%{name}-%{version}/local_zoneminder.te > /dev/null -#/usr/bin/semodule_package -o %{_docdir}/%{name}-%{version}/local_zoneminder.pp -m %{_docdir}/%{name}-%{version}/local_zoneminder.mod > /dev/null -#/usr/sbin/semodule -i %{_docdir}/%{name}-%{version}/local_zoneminder.pp > /dev/null - -# Upgrade from a previous version of zoneminder -if [ $1 -eq 2 ] ; then - - # Add any new PTZ control configurations to the database (will not overwrite) - %{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || : - - # Freshen the database - %{_bindir}/zmupdate.pl -f >/dev/null 2>&1 || : - - # We can't run this automatically when new sql account permissions need to - # be manually added first - # Run zmupdate non-interactively - #/usr/bin/zmupdate.pl --nointeractive -fi - -# Warn the end user to read the README file -echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, read README.Centos7 to finish the\ninstallation or upgrade!\n" -echo -e "\nThe README file is located here: %{_docdir}/%{name}-%{version}.\n" - -%preun -if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable zoneminder.service > /dev/null 2>&1 || : - /bin/systemctl stop zoneminder.service > /dev/null 2>&1 || : -# echo -e "\nRemoving ZoneMinder SELinux policy module. Please wait.\n" -# /usr/sbin/semodule -r local_zoneminder.pp -fi - -%postun -/bin/systemctl daemon-reload >/dev/null 2>&1 || : -if [ $1 -ge 1 ] ; then - # Package upgrade, not uninstall - /bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : -fi - -%triggerun -- zoneminder < 1.25.0-4 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply zoneminder -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save zoneminder >/dev/null 2>&1 ||: - -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del zoneminder >/dev/null 2>&1 || : -/bin/systemctl try-restart zoneminder.service >/dev/null 2>&1 || : - -%files -%defattr(-,root,root,-) -%doc AUTHORS BUGS ChangeLog COPYING LICENSE NEWS README.md distros/redhat/README.Centos7 distros/redhat/README.https distros/redhat/jscalendar-doc -%doc distros/redhat/local_zoneminder.te -%config %attr(640,root,%{zmgid_final}) /etc/zm/zm.conf -%config(noreplace) %attr(644,root,root) /etc/httpd/conf.d/zoneminder.conf -%config(noreplace) /etc/tmpfiles.d/zoneminder.conf -%config(noreplace) /etc/logrotate.d/zoneminder - -%{_unitdir}/zoneminder.service - -%{_bindir}/zma -%{_bindir}/zmaudit.pl -%{_bindir}/zmc -%{_bindir}/zmcontrol.pl -%{_bindir}/zmdc.pl -%{_bindir}/zmf -%{_bindir}/zmfilter.pl -%{_bindir}/zmpkg.pl -%{_bindir}/zmtrack.pl -%{_bindir}/zmtrigger.pl -%{_bindir}/zmu -%{_bindir}/zmupdate.pl -%{_bindir}/zmvideo.pl -%{_bindir}/zmwatch.pl -%{_bindir}/zmcamtool.pl -%{_bindir}/zmsystemctl.pl -%{_bindir}/zmtelemetry.pl -%{_bindir}/zmx10.pl -%{_bindir}/zmonvif-probe.pl - -%{perl_vendorlib}/ZoneMinder* -%{perl_vendorarch}/auto/ZoneMinder/.packlist -%{perl_vendorarch}/auto/ONVIF/.packlist -%{perl_vendorlib}/ONVIF* -%{perl_vendorlib}/WSDiscovery* -%{perl_vendorlib}/WSSecurity* -%{perl_vendorlib}/WSNotification* -%{_mandir}/man*/* -%dir %{_libexecdir}/zoneminder -%{_libexecdir}/zoneminder/cgi-bin -%dir %{_datadir}/zoneminder -%{_datadir}/zoneminder/db -%{_datadir}/zoneminder/www - -%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy -%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules - -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/events -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/images -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/sock -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/swap -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/lib/zoneminder/temp -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/log/zoneminder -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /var/spool/zoneminder-upload -%dir %attr(755,%{zmuid_final},%{zmgid_final}) /run/zoneminder - - -%changelog -* Thu Mar 3 2016 Andrew Bauer - 1.30.0 -- Bump version fo 1.30.0 release. - -* Mon Sep 7 2015 Andrew Bauer - 1.28.1 -- Require https, disable selinux module, freshen dB on updates. - -* Sun Feb 8 2015 Andrew Bauer - 1.28.1 -- Initial release for CentOS 7. - -* Sun Oct 5 2014 Andrew Bauer - 1.28.0 -- Bump version for 1.28.0 release. - -* Fri Mar 14 2014 Andrew Bauer - 1.27 -- Tweak build requirements for cmake - -* Sat Feb 01 2014 Andrew Bauer - 1.27 -- Add zmcamtool.pl. Bump version for 1.27 release. - -* Mon Dec 16 2013 Andrew Bauer - 1.26.5 -- This is a bug fixe release -- RTSP fixes, cmake enhancements, couple other misc fixes - -* Mon Oct 07 2013 Andrew Bauer - 1.26.4 -- Initial cmake build. - -* Sat Oct 05 2013 Andrew Bauer - 1.26.4 -- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch -- All files are now part of the zoneminder source tree. Update specfile accordingly. - -* Sat Sep 21 2013 Andrew Bauer - 1.26.3 -- Initial rebuild for ZoneMinder 1.26.3 release. - -* Fri Feb 15 2013 Fedora Release Engineering - 1.25.0-13 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild - -* Mon Jan 21 2013 Adam Tkac - 1.25.0-12 -- rebuild due to "jpeg8-ABI" feature drop - -* Mon Jan 7 2013 Remi Collet - 1.25.0-11 -- fix configuration file for httpd 2.4, #871502 - -* Fri Dec 21 2012 Adam Tkac - 1.25.0-10 -- rebuild against new libjpeg - -* Thu Aug 09 2012 Jason L Tibbitts III - 1.25.0-9 -- Add patch to work around v4l2 api breakage in 3.5 kernel. - -* Sun Jul 22 2012 Fedora Release Engineering - 1.25.0-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild - -* Sat Jun 23 2012 Petr Pisar - 1.25.0-7 -- Perl 5.16 rebuild - -* Wed Mar 21 2012 Jason L Tibbitts III - 1.25.0-6 -- Fix stupid thinko in sql modifications. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-5 -- Clean up macro usage. - -* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-4 -- Convert to systemd. -- Add tmpfiles.d configuration since the initscript isn't around to create - /run/zoneminder. -- Remove some pointless executable permissions. -- Add logrotate file. - -* Wed Feb 22 2012 Jason L Tibbitts III - 1.25.0-3 -- Update README.Fedora to reference systemctl and mention timezone info in - php.ini. -- Add proper default for EYEZM_LOG_TO_FILE. - - -* Thu Feb 09 2012 Jason L Tibbitts III - 1.25.0-2 -- Rebuild for new pcre. - -* Thu Jan 19 2012 Jason L Tibbitts III - 1.25.0-1 -- Update to 1.25.0 -- Fix gcc4.7 build problems. -- Drop gcc4.4 build fixes; for whatever reason they now break the build. -- Clean up old patches. -- Force setting of ZM_TMPDIR and ZM_RUNDIR. - -* Sat Jan 14 2012 Fedora Release Engineering - 1.24.4-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-3 -- Re-add the dist-tag that somehow got lost. - -* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-2 -- Add patch for bug 711780 - fix syntax issue in Mapped.pm. -- Undo that patch, and undo another which was the cause of the whole mess. -- Fix up other patches so ZM_PATH_BUILD is both defined and useful. -- Make sure database creation mods actually take. -- Update Fedora-specific docs with some additional info. -- Use bundled mootools (javascript, so no guideline violation). -- Update download location. -- Update the gcrypt patch to actually work. -- Upstream changed the tarball without changing the version to patch a - vulnerability, so redownload. - -* Sun Aug 14 2011 Jason L Tibbitts III - 1.24.4-1 -- Initial attempt to upgrade to 1.24.4. -- Add patch from BZ 460310 to build against libgcrypt instead of requiring the - gnutls openssl libs. - -* Thu Jul 21 2011 Petr Sabata - 1.24.3-7.20110324svn3310 -- Perl mass rebuild - -* Wed Jul 20 2011 Petr Sabata - 1.24.3-6.20110324svn3310 -- Perl mass rebuild - -* Mon May 09 2011 Jason L Tibbitts III - 1.24.3-5.20110324svn3310 -- Bump for gnutls update. - -* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 -- Update to latest 1.24.3 subversion. Turns out that what upstream was calling - 1.24.3 is really just an occasionally updated devel snapshot. -- Rebase various patches. - -* Wed Mar 23 2011 Dan Horák - 1.24.3-3 -- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) - -* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild - -* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 -- Update to latest upstream version. -- Rebase patches. -- Initial incomplete attempt to disable v4l1 support. - -* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 -- Unbundle cambozola; instead link to the separately pacakged copy. -- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. -- Git rid of mixed space/tab usage by removing all tabs. -- Remove unnecessary Conflicts: line. -- Attempt to force short_open_tag on for the code directories. -- Move default location of sockets, swaps, logfiles and some temporary files to - make more sense and allow things to work better with a future selinux policy. -- Fix errors in README.Fedora. - -* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 -- Mass rebuild with perl-5.12.0 - -* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 -- rebuild against perl 5.10.1 -- use Perl vendorarch and archlib variables correctly - -* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 -- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. - -* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 -- Initial update to 1.24.2. -- Rebase patches. -- Update mootools download location. -- Update to mootools 1.2.3. -- Add additional dependencies for some optional features. - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 -- Remove unused Sys::Mmap perl dependency RPM is finding - -* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 -- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 -- Added noffmpeg patch to make building outside mock easier - -* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 -- Patch for gcc 4.4 compilation errors -- Upgrade to 1.24.1 - -* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild - -* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 -- rebuild for dependencies - -* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 -- Fix permissions on zm.conf - -* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 -- Initial attempt at packaging 1.23. - -* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 -- Add perl module compat dependency, bz #453590 - -* Tue May 6 2008 Martin Ebourne - 1.22.3-14 -- Remove default runlevel, bz #441315 - -* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 -- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. - -* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 -- Autorebuild for GCC 4.3 - -* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 -- Fix compilation on gcc 4.3 - -* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 -- Rebuild for new openssl - -* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 -- Fix licence tag - -* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 -- Fixes from testing by Jitz including missing dependencies and database creation - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 -- Disable crashtrace on ppc - -* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 -- Fix uid for directories in /var/lib/zoneminder - -* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 -- Added perl Archive::Tar dependency -- Disabled web interface due to lack of access control on the event images - -* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 -- Changes recommended in review by Jason Tibbitts - -* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 -- Standardised on package name of zoneminder - -* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 -- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/redhat/zoneminder.service.in b/distros/redhat/zoneminder.service.in deleted file mode 100644 index 7afe8473a..000000000 --- a/distros/redhat/zoneminder.service.in +++ /dev/null @@ -1,18 +0,0 @@ -# ZoneMinder systemd unit file for CentOS 7 - -[Unit] -Description=ZoneMinder CCTV recording and security system -After=network.target mariadb.service httpd.service -Requires=mariadb.service httpd.service - -[Service] -User=@WEB_USER@ -Type=forking -ExecStart=@BINDIR@/zmpkg.pl start -ExecReload=@BINDIR@/zmpkg.pl restart -ExecStop=@BINDIR@/zmpkg.pl stop -PIDFile="@ZM_RUNDIR@/zm.pid" - -[Install] -WantedBy=multi-user.target - diff --git a/distros/redhat/zoneminder.spec b/distros/redhat/zoneminder.spec new file mode 100644 index 000000000..0eaf5e494 --- /dev/null +++ b/distros/redhat/zoneminder.spec @@ -0,0 +1,732 @@ +# Leaving this to allow one to build zoneminder-http subpackage using arbitrary user account +%global zmuid_final apache +%global zmgid_final apache + +# Crud is configured as a git submodule +%global crud_version 3.1.0-zm + +# CakePHP-Enum-Behavior is configured as a git submodule +%global ceb_version 1.0-zm + +%global sslcert %{_sysconfdir}/pki/tls/certs/localhost.crt +%global sslkey %{_sysconfdir}/pki/tls/private/localhost.key + +# This will tell zoneminder's cmake process we are building against a known distro +%global zmtargetdistro %{?rhel:el%{rhel}}%{!?rhel:fc%{fedora}} + +# Fedora needs apcu backwards compatibility module +%if 0%{?fedora} +%global with_apcu_bc 1 +%endif + +# Newer php's keep json functions in a subpackage +%if 0%{?fedora} || 0%{?rhel} >= 8 +%global with_php_json 1 +%endif + +# The default for everything but el7 these days +%global _hardened_build 1 + +Name: zoneminder +Version: 1.35.3 +Release: 1%{?dist} +Summary: A camera monitoring and analysis tool +Group: System Environment/Daemons +# Mootools is inder the MIT license: http://mootools.net/ +# CakePHP is under the MIT license: https://github.com/cakephp/cakephp +# Crud is under the MIT license: https://github.com/FriendsOfCake/crud +# CakePHP-Enum-Behavior is under the MIT license: https://github.com/asper/CakePHP-Enum-Behavior +License: GPLv2+ and LGPLv2+ and MIT +URL: http://www.zoneminder.com/ + +Source0: https://github.com/ZoneMinder/ZoneMinder/archive/%{version}.tar.gz#/zoneminder-%{version}.tar.gz +Source1: https://github.com/ZoneMinder/crud/archive/v%{crud_version}.tar.gz#/crud-%{crud_version}.tar.gz +Source2: https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/%{ceb_version}.tar.gz#/cakephp-enum-behavior-%{ceb_version}.tar.gz + +BuildRequires: systemd-devel +BuildRequires: mariadb-devel +BuildRequires: perl-podlators +BuildRequires: polkit-devel +BuildRequires: cmake3 +BuildRequires: gnutls-devel +BuildRequires: bzip2-devel +BuildRequires: pcre-devel +BuildRequires: libjpeg-turbo-devel +BuildRequires: findutils +BuildRequires: coreutils +BuildRequires: net-tools +BuildRequires: perl +BuildRequires: perl-generators +BuildRequires: perl(Archive::Tar) +BuildRequires: perl(Archive::Zip) +BuildRequires: perl(Date::Manip) +BuildRequires: perl(DBD::mysql) +BuildRequires: perl(ExtUtils::MakeMaker) +BuildRequires: perl(LWP::UserAgent) +BuildRequires: perl(MIME::Entity) +BuildRequires: perl(MIME::Lite) +BuildRequires: perl(PHP::Serialization) +BuildRequires: perl(Sys::Mmap) +BuildRequires: perl(Time::HiRes) +BuildRequires: perl(Net::SFTP::Foreign) +BuildRequires: perl(Expect) +BuildRequires: perl(Sys::Syslog) +BuildRequires: gcc +BuildRequires: gcc-c++ +BuildRequires: vlc-devel +BuildRequires: libcurl-devel +BuildRequires: libv4l-devel +BuildRequires: desktop-file-utils +BuildRequires: gzip +BuildRequires: zlib-devel + +# ZoneMinder looks for and records the location of the ffmpeg binary during build +BuildRequires: ffmpeg +BuildRequires: ffmpeg-devel + +# Required for mp4 container support +BuildRequires: libmp4v2-devel +BuildRequires: x264-devel + +# Allow existing user base to seamlessly transition to sub-packages +Requires: %{name}-common%{?_isa} = %{version}-%{release} +Requires: %{name}-httpd%{?_isa} = %{version}-%{release} + +%description +ZoneMinder is a set of applications which is intended to provide a complete +solution allowing you to capture, analyze, record and monitor any cameras you +have attached to a Linux based machine. It is designed to run on kernels which +support the Video For Linux (V4L) interface and has been tested with cameras +attached to BTTV cards, various USB cameras and IP network cameras. It is +designed to support as many cameras as you can attach to your computer without +too much degradation of performance. + +This is a meta package for backwards compatibility with the existing +ZoneMinder user base. + +%package common +Summary: Common files for ZoneMinder, not tied to a specific web server + +Requires: php-mysqli +Requires: php-common +Requires: php-gd +%{?with_php_json:Requires: php-json} +Requires: php-pecl-apcu +%{?with_apcu_bc:Requires: php-pecl-apcu-bc} +Requires: cambozola +Requires: net-tools +Requires: psmisc +Requires: polkit +Requires: libjpeg-turbo +Requires: vlc-core +Requires: ffmpeg +Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version)) +Requires: perl(DBD::mysql) +Requires: perl(Archive::Tar) +Requires: perl(Archive::Zip) +Requires: perl(MIME::Entity) +Requires: perl(MIME::Lite) +Requires: perl(Net::SMTP) +Requires: perl(Net::FTP) +Requires: perl(LWP::Protocol::https) +Requires: ca-certificates +Requires: zip +%{?systemd_requires} + +Requires(post): %{_bindir}/gpasswd +Requires(post): %{_bindir}/chown + +%description common +ZoneMinder is a set of applications which is intended to provide a complete +solution allowing you to capture, analyze, record and monitor any cameras you +have attached to a Linux based machine. It is designed to run on kernels which +support the Video For Linux (V4L) interface and has been tested with cameras +attached to BTTV cards, various USB cameras and IP network cameras. It is +designed to support as many cameras as you can attach to your computer without +too much degradation of performance. + +This is a meta-package that exists solely to allow the existing user base to +seamlessly transition to sub-packages. + +%package httpd +Summary: ZoneMinder configuration for Apache web server +Requires: %{name}-common%{?_isa} = %{version}-%{release} +Requires: httpd +Requires: php + +Conflicts: %{name}-nginx + +%description httpd +ZoneMinder is a set of applications which is intended to provide a complete +solution allowing you to capture, analyze, record and monitor any cameras you +have attached to a Linux based machine. It is designed to run on kernels which +support the Video For Linux (V4L) interface and has been tested with cameras +attached to BTTV cards, various USB cameras and IP network cameras. It is +designed to support as many cameras as you can attach to your computer without +too much degradation of performance. + +This sub-package contains configuration specific to Apache web server + +%package nginx +Summary: ZoneMinder configuration for Nginx web server +Requires: %{name}-common%{?_isa} = %{version}-%{release} +Requires: nginx +Requires: php-fpm +Requires: fcgiwrap + +Conflicts: %{name}-httpd + +%description nginx +ZoneMinder is a set of applications which is intended to provide a complete +solution allowing you to capture, analyze, record and monitor any cameras you +have attached to a Linux based machine. It is designed to run on kernels which +support the Video For Linux (V4L) interface and has been tested with cameras +attached to BTTV cards, various USB cameras and IP network cameras. It is +designed to support as many cameras as you can attach to your computer without +too much degradation of performance. + +This sub-package contains support for ZoneMinder with the Nginx web server + +%prep +%autosetup -p 1 -a 1 +rm -rf ./web/api/app/Plugin/Crud +mv -f crud-%{crud_version} ./web/api/app/Plugin/Crud + +# The all powerful autosetup macro does not work after the second source tarball +gzip -dc %{_sourcedir}/cakephp-enum-behavior-%{ceb_version}.tar.gz | tar -xvvf - +rm -rf ./web/api/app/Plugin/CakePHP-Enum-Behavior +mv -f CakePHP-Enum-Behavior-%{ceb_version} ./web/api/app/Plugin/CakePHP-Enum-Behavior + +# Change the following default values +./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes +./utils/zmeditconfigdata.sh ZM_UPLOAD_FTP_LOC_DIR %{_localstatedir}/spool/zoneminder-upload +./utils/zmeditconfigdata.sh ZM_OPT_CONTROL yes +./utils/zmeditconfigdata.sh ZM_CHECK_FOR_UPDATES no +./utils/zmeditconfigdata.sh ZM_DYN_SHOW_DONATE_REMINDER no +./utils/zmeditconfigdata.sh ZM_OPT_FAST_DELETE no + +%build +%cmake3 \ + -DZM_WEB_USER="%{zmuid_final}" \ + -DZM_WEB_GROUP="%{zmgid_final}" \ + -DZM_TARGET_DISTRO="%{zmtargetdistro}" \ + . + +%make_build + +%install +%make_install + +desktop-file-install \ + --dir %{buildroot}%{_datadir}/applications \ + --delete-original \ + --mode 644 \ + %{buildroot}%{_datadir}/applications/zoneminder.desktop + +# Remove unwanted files and folders +find %{buildroot} \( -name .htaccess -or -name .editorconfig -or -name .packlist -or -name .git -or -name .gitignore -or -name .gitattributes -or -name .travis.yml \) -type f -delete > /dev/null 2>&1 || : + +# Recursively change shebang in all relevant scripts and set execute permission +find %{buildroot}%{_datadir}/zoneminder/www/api \( -name cake -or -name cake.php \) -type f -exec sed -i 's\^#!/usr/bin/env bash$\#!%{_buildshell}\' {} \; -exec %{__chmod} 755 {} \; + +# Use the system cacert file rather then the one bundled with CakePHP +rm -f %{buildroot}%{_datadir}/zoneminder/www/api/lib/Cake/Config/cacert.pem +ln -s ../../../../../../../..%{_sysconfdir}/pki/tls/certs/ca-bundle.crt %{buildroot}%{_datadir}/zoneminder/www/api/lib/Cake/Config/cacert.pem + +# Handle the polkit file differently for web server agnostic support (see post) +rm -f %{buildroot}%{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules + +%post common +# Initial installation +if [ $1 -eq 1 ] ; then + %systemd_post %{name}.service +fi + +# Upgrade from a previous version of zoneminder +if [ $1 -eq 2 ] ; then + # Add any new PTZ control configurations to the database (will not overwrite) + %{_bindir}/zmcamtool.pl --import >/dev/null 2>&1 || : + + # Freshen the database + %{_bindir}/zmupdate.pl -f >/dev/null 2>&1 || : +fi + +# Warn the end user to read the README file +echo -e "\nVERY IMPORTANT: Before starting ZoneMinder, you must read the README file\nto finish the installation or upgrade!" +echo -e "\nThe README file is located here: %{_pkgdocdir}-common/README\n" + +%post httpd +# For the case of changing from nginx <-> httpd, files in these folders must change ownership if they exist +%{_bindir}/chown -R %{zmuid_final}:%{zmgid_final} %{_sharedstatedir}/php/session/* >/dev/null 2>&1 || : +%{_bindir}/chown -R %{zmuid_final}:%{zmgid_final} %{_localstatedir}/log/zoneminder/* >/dev/null 2>&1 || : + +ln -sf %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.httpd %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules +# backwards compatibility +ln -sf %{_sysconfdir}/zm/www/zoneminder.httpd.conf %{_sysconfdir}/zm/www/zoneminder.conf + +# Allow zoneminder access to local video sources, serial ports, and x10 +%{_bindir}/gpasswd -a %{zmuid_final} video >/dev/null 2>&1 || : +%{_bindir}/gpasswd -a %{zmuid_final} dialout >/dev/null 2>&1 || : + +%post nginx + +# Php package owns the session folder and sets group ownership to apache account +# We could override the folder permission, but adding nginx to the apache group works better +%{_bindir}/gpasswd -a nginx apache >/dev/null 2>&1 || : + +# For the case of changing from httpd <-> nginx, files in these folders must change ownership if they exist +%{_bindir}/chown -R nginx:nginx %{_sharedstatedir}/php/session/* >/dev/null 2>&1 || : +%{_bindir}/chown -R nginx:nginx %{_localstatedir}/log/zoneminder/* >/dev/null 2>&1 || : + +ln -sf %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.nginx %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules +# backwards compatibility +ln -sf %{_sysconfdir}/zm/www/zoneminder.nginx.conf %{_sysconfdir}/zm/www/zoneminder.conf + +# Allow zoneminder access to local video sources, serial ports, and x10 +%{_bindir}/gpasswd -a nginx video >/dev/null 2>&1 || : +%{_bindir}/gpasswd -a nginx dialout >/dev/null 2>&1 || : + +# Nginx does not create an SSL certificate like the apache package does so lets do that here +if [ -f %{sslkey} -o -f %{sslcert} ]; then + exit 0 +fi + +umask 077 +%{_bindir}/openssl genrsa -rand /proc/apm:/proc/cpuinfo:/proc/dma:/proc/filesystems:/proc/interrupts:/proc/ioports:/proc/pci:/proc/rtc:/proc/uptime 2048 > %{sslkey} 2> /dev/null + +FQDN=`hostname` +# A >59 char FQDN means "root@FQDN" exceeds 64-char max length for emailAddress +if [ "x${FQDN}" = "x" -o ${#FQDN} -gt 59 ]; then + FQDN=localhost.localdomain +fi + +cat << EOF | %{_bindir}/openssl req -new -key %{sslkey} \ + -x509 -sha256 -days 365 -set_serial $RANDOM -extensions v3_req \ + -out %{sslcert} 2>/dev/null +-- +SomeState +SomeCity +SomeOrganization +SomeOrganizationalUnit +${FQDN} +root@${FQDN} +EOF + +%preun +%systemd_preun %{name}.service + +%postun +%systemd_postun_with_restart %{name}.service + +%files +# nothing + +%files common +%license COPYING +%doc README.md distros/redhat/readme/README distros/redhat/readme/README.httpd distros/redhat/readme/README.nginx distros/redhat/readme/README.https + +# We want these two folders to have "normal" read permission +# compared to the folder contents +%dir %{_sysconfdir}/zm +%dir %{_sysconfdir}/zm/conf.d + +# Config folder contents contain sensitive info +# and should not be readable by normal users +%{_sysconfdir}/zm/conf.d/README + +%config(noreplace) %{_sysconfdir}/logrotate.d/zoneminder + +%{_unitdir}/zoneminder.service +%{_datadir}/polkit-1/actions/com.zoneminder.systemctl.policy +%{_bindir}/zmsystemctl.pl + +%{_bindir}/zma +%{_bindir}/zmaudit.pl +%{_bindir}/zmc +%{_bindir}/zmcontrol.pl +%{_bindir}/zmdc.pl +%{_bindir}/zmfilter.pl +%{_bindir}/zmpkg.pl +%{_bindir}/zmtrack.pl +%{_bindir}/zmtrigger.pl +%{_bindir}/zmu +%{_bindir}/zmupdate.pl +%{_bindir}/zmvideo.pl +%{_bindir}/zmwatch.pl +%{_bindir}/zmcamtool.pl +%{_bindir}/zmtelemetry.pl +%{_bindir}/zmx10.pl +%{_bindir}/zmonvif-probe.pl +%{_bindir}/zmstats.pl +%{_bindir}/zmrecover.pl + +%{perl_vendorlib}/ZoneMinder* +%{perl_vendorlib}/ONVIF* +%{perl_vendorlib}/WSDiscovery* +%{perl_vendorlib}/WSSecurity* +%{perl_vendorlib}/WSNotification* +%{_mandir}/man*/* + +%{_libexecdir}/zoneminder/ +%{_datadir}/zoneminder/ +%{_datadir}/applications/*zoneminder.desktop + +%files httpd +%config(noreplace) %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm/zm.conf +%config(noreplace) %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm/conf.d/0*.conf +%ghost %attr(640,root,%{zmgid_final}) %{_sysconfdir}/zm/conf.d/zmcustom.conf +%config(noreplace) %{_sysconfdir}/zm/www/zoneminder.httpd.conf +%ghost %{_sysconfdir}/zm/www/zoneminder.conf +%config(noreplace) %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.httpd +%ghost %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules + +%{_unitdir}/zoneminder.service.d/zm-httpd.conf +%{_tmpfilesdir}/zoneminder.httpd.tmpfiles.conf +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/events +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/sock +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/swap +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_sharedstatedir}/zoneminder/temp +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/cache/zoneminder +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/log/zoneminder +%dir %attr(755,%{zmuid_final},%{zmgid_final}) %{_localstatedir}/spool/zoneminder-upload + +%files nginx +%config(noreplace) %attr(640,root,nginx) %{_sysconfdir}/zm/zm.conf +%config(noreplace) %attr(640,root,nginx) %{_sysconfdir}/zm/conf.d/*.conf +%ghost %attr(640,root,nginx) %{_sysconfdir}/zm/conf.d/zmcustom.conf +%config(noreplace) %{_sysconfdir}/zm/www/zoneminder.nginx.conf +%config(noreplace) %{_sysconfdir}/zm/www/redirect.nginx.conf +%ghost %{_sysconfdir}/zm/www/zoneminder.conf +%config(noreplace) %{_sysconfdir}/zm/www/com.zoneminder.systemctl.rules.nginx +%ghost %{_datadir}/polkit-1/rules.d/com.zoneminder.systemctl.rules + +%config(noreplace) %{_sysconfdir}/php-fpm.d/zoneminder.php-fpm.conf + + +%{_unitdir}/zoneminder.service.d/zm-nginx.conf +%{_tmpfilesdir}/zoneminder.nginx.tmpfiles.conf +%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder +%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/events +%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/sock +%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/swap +%dir %attr(755,nginx,nginx) %{_sharedstatedir}/zoneminder/temp +%dir %attr(755,nginx,nginx) %{_localstatedir}/cache/zoneminder +%dir %attr(755,nginx,nginx) %{_localstatedir}/log/zoneminder +%dir %attr(755,nginx,nginx) %{_localstatedir}/spool/zoneminder-upload + +%changelog +* Tue Feb 04 2020 Andrew Bauer - 1.34.2-1 +- 1.34.2 Release + +* Fri Jan 31 2020 Andrew Bauer - 1.34.1-1 +- 1.34.1 Release + +* Sat Jan 18 2020 Andrew Bauer - 1.34.0-1 +- 1.34.0 Release + +* Tue Dec 17 2019 Leigh Scott - 1.32.3-5 +- Mass rebuild for x264 + +* Wed Aug 07 2019 Leigh Scott - 1.32.3-4 +- Rebuild for new ffmpeg version + +* Tue Mar 12 2019 Sérgio Basto - 1.32.3-3 +- Mass rebuild for x264 + +* Tue Mar 05 2019 RPM Fusion Release Engineering - 1.32.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Dec 08 2018 Andrew Bauer - 1.32.3-1 +- 1.32.3 Release +- Break into sub-packages + +* Tue Nov 13 2018 Antonio Trande - 1.32.2-2 +- Rebuild for ffmpeg-3.4.5 on el7 +- Use CMake3 + +* Sat Oct 13 2018 Andrew Bauer - 1.32.2-1 +- 1.32.2 release +- Bug fix release + +* Thu Oct 04 2018 Sérgio Basto - 1.32.1-2 +- Mass rebuild for x264 and/or x265 + +* Tue Oct 2 2018 Andrew Bauer - 1.32.1-1 +- 1.32.1 release +- Bug fix release + +* Wed Sep 12 2018 Andrew Bauer - 1.32.0-1 +- 1.32.0 release +- remove el6 (sys v init) support +- Make README name consistent across all supported distros +- remove jscalendar +- add requires php-json, zip +- support zm/conf.d folder +- support zm cache (busting) folder + +* Sun Aug 19 2018 Leigh Scott - 1.30.4-9 +- Rebuilt for Fedora 29 Mass Rebuild binutils issue + +* Fri Jul 27 2018 RPM Fusion Release Engineering - 1.30.4-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Mar 08 2018 RPM Fusion Release Engineering - 1.30.4-7 +- Rebuilt for new ffmpeg snapshot + +* Thu Mar 01 2018 RPM Fusion Release Engineering - 1.30.4-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Thu Jan 18 2018 Leigh Scott - 1.30.4-5 +- Rebuilt for ffmpeg-3.5 git + +* Thu Aug 31 2017 RPM Fusion Release Engineering - 1.30.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Tue May 09 2017 Andrew Bauer - 1.30.4-1 +- modify autosetup macro parameters +- modify requirements for php-pecl-acpu-bc package +- 1.30.4 release + +* Tue May 02 2017 Andrew Bauer - 1.30.3-1 +- 1.30.3 release + +* Thu Mar 30 2017 Andrew Bauer - 1.30.2-2 +- 1.30.2 release + +* Wed Feb 08 2017 Andrew Bauer - 1.30.2-1 +- Bump version for 1.30.2 release candidate 1 + +* Wed Dec 28 2016 Andrew Bauer - 1.30.1-2 +- Changes from rpmfusion #4393 + +* Fri Dec 23 2016 Andrew Bauer - 1.30.1-1 +- Consolidate fedora/centos spec files +- Add preliminary nginx support +- New contact email + +* Thu Mar 3 2016 Andrew Bauer - 1.30.0-1 +- Bump version fo 1.30.0 release. + +* Sat Nov 21 2015 Andrew Bauer - 1.29.0-1 +- Bump version for 1.29.0 release on Fedora 23. + +* Sat Feb 14 2015 Andrew Bauer - 1.28.1-1 +- Bump version for 1.28.1 release on Fedora 21. + +* Sun Oct 5 2014 Andrew Bauer - 1.28.0-1 +- Bump version for 1.28.0 release. + +* Fri Mar 14 2014 Andrew Bauer - 1.27-1 +- Tweak build requirements for cmake + +* Sat Feb 01 2014 Andrew Bauer - 1.27-1 +- Add zmcamtool.pl. Bump version for 1.27 release. + +* Mon Dec 16 2013 Andrew Bauer - 1.26.5-1 +- This is a bug fixe release +- RTSP fixes, cmake enhancements, couple other misc fixes + +* Mon Oct 07 2013 Andrew Bauer - 1.26.4-1 +- Initial cmake build. + +* Sat Oct 05 2013 Andrew Bauer - 1.26.4-1 +- Fedora specific path changes have been moved to zoneminder-1.26.0-defaults.patch +- All files are now part of the zoneminder source tree. Update specfile accordingly. + +* Sat Sep 21 2013 Andrew Bauer - 1.26.3-1 +- Initial rebuild for ZoneMinder 1.26.3 release. + +* Fri Feb 15 2013 Fedora Release Engineering - 1.25.0-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Mon Jan 21 2013 Adam Tkac - 1.25.0-12 +- rebuild due to "jpeg8-ABI" feature drop + +* Mon Jan 7 2013 Remi Collet - 1.25.0-11 +- fix configuration file for httpd 2.4, #871502 + +* Fri Dec 21 2012 Adam Tkac - 1.25.0-10 +- rebuild against new libjpeg + +* Thu Aug 09 2012 Jason L Tibbitts III - 1.25.0-9 +- Add patch to work around v4l2 api breakage in 3.5 kernel. + +* Sun Jul 22 2012 Fedora Release Engineering - 1.25.0-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jun 23 2012 Petr Pisar - 1.25.0-7 +- Perl 5.16 rebuild + +* Wed Mar 21 2012 Jason L Tibbitts III - 1.25.0-6 +- Fix stupid thinko in sql modifications. + +* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-5 +- Clean up macro usage. + +* Sat Feb 25 2012 Jason L Tibbitts III - 1.25.0-4 +- Convert to systemd. +- Add tmpfiles.d configuration since the initscript isn't around to create + /run/zoneminder. +- Remove some pointless executable permissions. +- Add logrotate file. + +* Wed Feb 22 2012 Jason L Tibbitts III - 1.25.0-3 +- Update README.Fedora to reference systemctl and mention timezone info in + php.ini. +- Add proper default for EYEZM_LOG_TO_FILE. + + +* Thu Feb 09 2012 Jason L Tibbitts III - 1.25.0-2 +- Rebuild for new pcre. + +* Thu Jan 19 2012 Jason L Tibbitts III - 1.25.0-1 +- Update to 1.25.0 +- Fix gcc4.7 build problems. +- Drop gcc4.4 build fixes; for whatever reason they now break the build. +- Clean up old patches. +- Force setting of ZM_TMPDIR and ZM_RUNDIR. + +* Sat Jan 14 2012 Fedora Release Engineering - 1.24.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-3 +- Re-add the dist-tag that somehow got lost. + +* Thu Sep 15 2011 Jason L Tibbitts III - 1.24.4-2 +- Add patch for bug 711780 - fix syntax issue in Mapped.pm. +- Undo that patch, and undo another which was the cause of the whole mess. +- Fix up other patches so ZM_PATH_BUILD is both defined and useful. +- Make sure database creation mods actually take. +- Update Fedora-specific docs with some additional info. +- Use bundled mootools (javascript, so no guideline violation). +- Update download location. +- Update the gcrypt patch to actually work. +- Upstream changed the tarball without changing the version to patch a + vulnerability, so redownload. + +* Sun Aug 14 2011 Jason L Tibbitts III - 1.24.4-1 +- Initial attempt to upgrade to 1.24.4. +- Add patch from BZ 460310 to build against libgcrypt instead of requiring the + gnutls openssl libs. + +* Thu Jul 21 2011 Petr Sabata - 1.24.3-7.20110324svn3310 +- Perl mass rebuild + +* Wed Jul 20 2011 Petr Sabata - 1.24.3-6.20110324svn3310 +- Perl mass rebuild + +* Mon May 09 2011 Jason L Tibbitts III - 1.24.3-5.20110324svn3310 +- Bump for gnutls update. + +* Thu Mar 24 2011 Jason L Tibbitts III - 1.24.3-4.20110324svn3310 +- Update to latest 1.24.3 subversion. Turns out that what upstream was calling + 1.24.3 is really just an occasionally updated devel snapshot. +- Rebase various patches. + +* Wed Mar 23 2011 Dan Horák - 1.24.3-3 +- rebuilt for mysql 5.5.10 (soname bump in libmysqlclient) + +* Tue Feb 08 2011 Fedora Release Engineering - 1.24.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jan 25 2011 Jason L Tibbitts III - 1.24.3-1 +- Update to latest upstream version. +- Rebase patches. +- Initial incomplete attempt to disable v4l1 support. + +* Fri Jan 21 2011 Jason L Tibbitts III - 1.24.2-6 +- Unbundle cambozola; instead link to the separately pacakged copy. +- Remove BuildRoot:, %%clean and buildroot cleaning in %%install. +- Git rid of mixed space/tab usage by removing all tabs. +- Remove unnecessary Conflicts: line. +- Attempt to force short_open_tag on for the code directories. +- Move default location of sockets, swaps, logfiles and some temporary files to + make more sense and allow things to work better with a future selinux policy. +- Fix errors in README.Fedora. + +* Wed Jun 02 2010 Marcela Maslanova - 1.24.2-5 +- Mass rebuild with perl-5.12.0 + +* Fri Dec 4 2009 Stepan Kasal - 1.24.2-4 +- rebuild against perl 5.10.1 +- use Perl vendorarch and archlib variables correctly + +* Mon Jul 27 2009 Fedora Release Engineering - 1.24.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-2 +- Bump release since 1.24.2-1 was mistakenly tagged a few months ago. + +* Wed Jul 22 2009 Jason L Tibbitts III - 1.24.2-1 +- Initial update to 1.24.2. +- Rebase patches. +- Update mootools download location. +- Update to mootools 1.2.3. +- Add additional dependencies for some optional features. + +* Sat Apr 11 2009 Martin Ebourne - 1.24.1-3 +- Remove unused Sys::Mmap perl dependency RPM is finding + +* Sat Apr 11 2009 Martin Ebourne - 1.24.1-2 +- Update gcc44 patch to disable -frepo, seems to be broken with gcc44 +- Added noffmpeg patch to make building outside mock easier + +* Sat Mar 21 2009 Martin Ebourne - 1.24.1-1 +- Patch for gcc 4.4 compilation errors +- Upgrade to 1.24.1 + +* Wed Feb 25 2009 Fedora Release Engineering - 1.23.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Sat Jan 24 2009 Caolán McNamara - 1.23.3-3 +- rebuild for dependencies + +* Mon Dec 15 2008 Martin Ebourne - 1.23.3-2 +- Fix permissions on zm.conf + +* Fri Jul 11 2008 Jason L Tibbitts III - 1.23.3-1 +- Initial attempt at packaging 1.23. + +* Tue Jul 1 2008 Martin Ebourne - 1.22.3-15 +- Add perl module compat dependency, bz #453590 + +* Tue May 6 2008 Martin Ebourne - 1.22.3-14 +- Remove default runlevel, bz #441315 + +* Mon Apr 28 2008 Jason L Tibbitts III - 1.22.3-13 +- Backport patch for CVE-2008-1381 from 1.23.3 to 1.22.3. + +* Tue Feb 19 2008 Fedora Release Engineering - 1.22.3-12 +- Autorebuild for GCC 4.3 + +* Thu Jan 3 2008 Martin Ebourne - 1.22.3-11 +- Fix compilation on gcc 4.3 + +* Thu Dec 6 2007 Martin Ebourne - 1.22.3-10 +- Rebuild for new openssl + +* Thu Aug 2 2007 Martin Ebourne - 1.22.3-8 +- Fix licence tag + +* Thu Jul 12 2007 Martin Ebourne - 1.22.3-7 +- Fixes from testing by Jitz including missing dependencies and database creation + +* Sat Jun 30 2007 Martin Ebourne - 1.22.3-6 +- Disable crashtrace on ppc + +* Sat Jun 30 2007 Martin Ebourne - 1.22.3-5 +- Fix uid for directories in /var/lib/zoneminder + +* Tue Jun 26 2007 Martin Ebourne - 1.22.3-4 +- Added perl Archive::Tar dependency +- Disabled web interface due to lack of access control on the event images + +* Sun Jun 10 2007 Martin Ebourne - 1.22.3-3 +- Changes recommended in review by Jason Tibbitts + +* Mon Apr 2 2007 Martin Ebourne - 1.22.3-2 +- Standardised on package name of zoneminder + +* Thu Dec 28 2006 Martin Ebourne - 1.22.3-1 +- First version. Uses some parts from zm-1.20.1 by Corey DeLasaux and Serg Oskin diff --git a/distros/redhat/zoneminder.sysvinit.in b/distros/redhat/zoneminder.sysvinit.in deleted file mode 100644 index f1c6c47c6..000000000 --- a/distros/redhat/zoneminder.sysvinit.in +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh -# description: ZoneMinder is the top Linux video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security applications.Copyright: Philip Coombes, Corey DeLasaux 2003-2008 -# chkconfig: - 99 00 -# processname: zmpkg.pl - -# Source function library. -. /etc/rc.d/init.d/functions - -prog=ZoneMinder -ZM_CONFIG="@ZM_CONFIG@" -pidfile="@ZM_RUNDIR@" -LOCKFILE=/var/lock/subsys/zm - -loadconf() -{ - if [ -f $ZM_CONFIG ]; then - . $ZM_CONFIG - else - echo "ERROR: $ZM_CONFIG not found." - return 1 - fi -} - -loadconf -command="$ZM_PATH_BIN/zmpkg.pl" - -start() -{ -# Commenting out as it is not needed. Leaving as a placeholder for future use. -# zmupdate || return $? - loadconf || return $? - #Make sure the directory for our PID folder exists or create one. - [ ! -d $pidfile ] \ - && mkdir -m 774 $pidfile \ - && chown $ZM_WEB_USER:$ZM_WEB_GROUP $pidfile - #Make sure the folder for the socks file exists or create one - GetPath="select Value from Config where Name='ZM_PATH_SOCKS'" - dbHost=`echo $ZM_DB_HOST | cut -d: -f1` - dbPort=`echo $ZM_DB_HOST | cut -d: -s -f2` - if [ "$dbPort" = "" ] - then - ZM_PATH_SOCK=`echo $GetPath | mysql -B -h$ZM_DB_HOST -u$ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME | grep -v '^Value'` - else - ZM_PATH_SOCK=`echo $GetPath | mysql -B -h$dbHost -P$dbPort -u$ZM_DB_USER -p$ZM_DB_PASS $ZM_DB_NAME | grep -v '^Value'` - fi - [ ! -d $ZM_PATH_SOCK ] \ - && mkdir -m 774 $ZM_PATH_SOCK \ - && chown $ZM_WEB_USER:$ZM_WEB_GROUP $ZM_PATH_SOCK - echo -n $"Starting $prog: " - $command start - RETVAL=$? - [ $RETVAL = 0 ] && success || failure - echo - [ $RETVAL = 0 ] && touch $LOCKFILE - return $RETVAL -} - -stop() -{ - loadconf - echo -n $"Stopping $prog: " - $command stop - RETVAL=$? - [ $RETVAL = 0 ] && success || failure - echo - [ $RETVAL = 0 ] && rm -f $LOCKFILE -} - -zmstatus() -{ - loadconf - result=`$command status` - if [ "$result" = "running" ]; then - echo "ZoneMinder is running" - $ZM_PATH_BIN/zmu -l - RETVAL=0 - else - echo "ZoneMinder is stopped" - RETVAL=1 - fi -} - -zmupdate() -{ - if [ -x $ZM_PATH_BIN/zmupdate.pl ]; then - $ZM_PATH_BIN/zmupdate.pl -f - fi -} - - -case "$1" in - 'start') - start - ;; - 'stop') - stop - ;; - 'restart') - stop - start - ;; - 'condrestart') - loadconf - result=`$ZM_PATH_BIN/zmdc.pl check` - if [ "$result" = "running" ]; then - $ZM_PATH_BIN/zmdc.pl shutdown > /dev/null - rm -f $LOCKFILE - start - fi - ;; - 'status') - status httpd - status mysqld - zmstatus - ;; - *) - echo "Usage: $0 { start | stop | restart | condrestart | status }" - RETVAL=1 - ;; -esac -exit $RETVAL diff --git a/distros/redhat/zoneminder.tmpfiles.in b/distros/redhat/zoneminder.tmpfiles.in deleted file mode 100644 index f655a9c9f..000000000 --- a/distros/redhat/zoneminder.tmpfiles.in +++ /dev/null @@ -1,3 +0,0 @@ -D @ZM_RUNDIR@ 0755 @WEB_USER@ @WEB_GROUP@ -D @ZM_TMPDIR@ 0755 @WEB_USER@ @WEB_GROUP@ -D @ZM_SOCKDIR@ 0755 @WEB_USER@ @WEB_GROUP@ diff --git a/distros/ubuntu1204/changelog b/distros/ubuntu1204/changelog deleted file mode 100644 index 74cf1d0b8..000000000 --- a/distros/ubuntu1204/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/conf/apache2/zoneminder.conf b/distros/ubuntu1204/conf/apache2/zoneminder.conf deleted file mode 100644 index fa596d5ab..000000000 --- a/distros/ubuntu1204/conf/apache2/zoneminder.conf +++ /dev/null @@ -1,20 +0,0 @@ -# Remember to enable cgi mod (i.e. "a2enmod cgi"). -ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" - - Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch - AllowOverride All - Require all granted - - -Alias /zm /usr/share/zoneminder/www - - php_flag register_globals off - Options Indexes FollowSymLinks - - DirectoryIndex index.php - - - - - AllowOverride All - diff --git a/distros/ubuntu1204/patches/default_cgi-path.patch b/distros/ubuntu1204/patches/default_cgi-path.patch deleted file mode 100644 index 8bfc2ba06..000000000 --- a/distros/ubuntu1204/patches/default_cgi-path.patch +++ /dev/null @@ -1,16 +0,0 @@ -Last-Update: 2015-08-16 -Forwarded: no -Author: Dmitry Smirnov -Description: correct path to CGI app according to default web server configuration. - ---- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in -+++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in -@@ -428,7 +428,7 @@ our @options = - }, - { - name => "ZM_PATH_ZMS", -- default => "/cgi-bin/nph-zms", -+ default => "/zm/cgi-bin/nph-zms", - description => "Web path to zms streaming server", - help => qqq(" - The ZoneMinder streaming server is required to send streamed diff --git a/distros/ubuntu1204/patches/series b/distros/ubuntu1204/patches/series deleted file mode 100644 index fc70f4006..000000000 --- a/distros/ubuntu1204/patches/series +++ /dev/null @@ -1,2 +0,0 @@ -default_cgi-path.patch -use_libjs-mootools.patch diff --git a/distros/ubuntu1204/patches/use_libjs-mootools.patch b/distros/ubuntu1204/patches/use_libjs-mootools.patch deleted file mode 100644 index b3925f6d0..000000000 --- a/distros/ubuntu1204/patches/use_libjs-mootools.patch +++ /dev/null @@ -1,18 +0,0 @@ -Last-Update: 2015-03-29 -Forwarded: no -Bug-Debian: http://bugs.debian.org/585590 -Reviewed-By: Dmitry Smirnov -Description: use mootools shipped by debian, rather than the zoneminder included mootools. - ---- a/web/skins/classic/includes/functions.php -+++ b/web/skins/classic/includes/functions.php -@@ -63,9 +63,8 @@ - } - ?> - - -- - - - /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/zoneminder.preinst b/distros/ubuntu1204/zoneminder.preinst deleted file mode 100644 index 3f75a1b3e..000000000 --- a/distros/ubuntu1204/zoneminder.preinst +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - -set -e - -## Remove obsolete symlink which is in the way of dh_apache2: -ol="/etc/apache2/conf-available/zoneminder.conf" -if [ -h "${ol}" ]; then - [ "$(readlink ${ol})" = "/etc/zm/apache.conf" ] && rm -f "${ol}" -fi - -abort=false -if [ -h /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 [ -h /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 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# diff --git a/distros/ubuntu1204/zoneminder.tmpfile b/distros/ubuntu1204/zoneminder.tmpfile deleted file mode 100644 index d307c6640..000000000 --- a/distros/ubuntu1204/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/apache.conf b/distros/ubuntu1504_cmake_split_packages/apache.conf index 6f2f30fd9..59efc6248 100644 --- a/distros/ubuntu1504_cmake_split_packages/apache.conf +++ b/distros/ubuntu1504_cmake_split_packages/apache.conf @@ -1,8 +1,19 @@ -Alias /zm /usr/share/zoneminder/www +# Remember to enable cgi mod (i.e. "a2enmod cgi"). +ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" + + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + AllowOverride All + Require all granted + +Alias /zm /usr/share/zoneminder/www - Options Indexes FollowSymLinks + Options -Indexes +FollowSymLinks DirectoryIndex index.php + + + AllowOverride All + diff --git a/distros/ubuntu1504_cmake_split_packages/control b/distros/ubuntu1504_cmake_split_packages/control index 5f313897f..b24d67cf2 100644 --- a/distros/ubuntu1504_cmake_split_packages/control +++ b/distros/ubuntu1504_cmake_split_packages/control @@ -45,7 +45,7 @@ Package: libzoneminder-perl Section: perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libdbi-perl, - libdevice-serialport-perl, libimage-info-perl, libjson-any-perl, + libdevice-serialport-perl, libimage-info-perl, libjson-any-perl, libjson-maybexs-perl, libsys-mmap-perl, liburi-encode-perl, libwww-perl Description: Perl libraries for ZoneMinder ZoneMinder is a video camera security and surveillance solution. diff --git a/distros/ubuntu1504_cmake_split_packages/rules b/distros/ubuntu1504_cmake_split_packages/rules index a534e8089..f6169c495 100755 --- a/distros/ubuntu1504_cmake_split_packages/rules +++ b/distros/ubuntu1504_cmake_split_packages/rules @@ -58,11 +58,13 @@ override_dh_auto_configure: -DZM_TMPDIR=/var/tmp/zm \ -DZM_LOGDIR=/var/log/zm \ -DZM_WEBDIR=/usr/share/zoneminder \ - -DZM_CONTENTDIR=/var/cache/zoneminder \ -DZM_CGIDIR=/usr/lib/cgi-bin \ -DZM_WEB_USER=www-data \ -DZM_WEB_GROUP=www-data \ - -DCMAKE_INSTALL_SYSCONFDIR=etc/zm + -DZM_CONFIG_SUBDIR="/etc/zm/conf.d" \ + -DZM_CONFIG_DIR="/etc/zm" \ + -DZM_DIR_EVENTS="/var/cache/zoneminder/events" \ + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" override_dh_auto_test: # do not run tests... diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.install b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.install index bd0a03bc2..4fdac1082 100644 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.install +++ b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.install @@ -1,4 +1,5 @@ etc/zm +etc/zm/conf.d/* usr/bin usr/share/polkit-1/actions usr/share/polkit-1/rules.d diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.links b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.links deleted file mode 100644 index e7d90d176..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.links +++ /dev/null @@ -1,3 +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 diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst index da2b444fe..5a4e5694d 100644 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst +++ b/distros/ubuntu1504_cmake_split_packages/zoneminder-core.postinst @@ -73,6 +73,9 @@ if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then # Run the ZoneMinder update tool zmupdate.pl --nointeractive + # Add any new PTZ control configurations to the database (will not overwrite) + zmcamtool.pl --import >/dev/null 2>&1 + fi #DEBHELPER# diff --git a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-base.links b/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-base.links deleted file mode 100644 index b00a147d6..000000000 --- a/distros/ubuntu1504_cmake_split_packages/zoneminder-ui-base.links +++ /dev/null @@ -1 +0,0 @@ -usr/lib/cgi-bin usr/share/zoneminder/cgi-bin diff --git a/distros/ubuntu1604/README.Debian b/distros/ubuntu1604/README.Debian index 8182e0678..4fe3464d2 100644 --- a/distros/ubuntu1604/README.Debian +++ b/distros/ubuntu1604/README.Debian @@ -23,8 +23,7 @@ configuration file: Upgrading database ------------------ -Prior to 1.28.1 database upgrade was performed automatically. -"zoneminder" service will refuse to start with outdated database. +The database is updated automatically on installation. You should not need to take this step. Assuming that database is on "localhost" then the following command can be used to upgrade "zm" database: @@ -45,17 +44,11 @@ The following command prints the current version of zoneminder database: Enabling service ---------------- -By default Zoneminder service is not starting automatically and need to be -manually activated once database is configured: - -On systemd: +By default Zoneminder service is not automatically started and needs to be +manually enabled once database is configured: sudo systemctl enable zoneminder.service -On SysV: - - sudo update-rc.d zoneminder enable - Web server set-up ----------------- @@ -82,10 +75,10 @@ Common configuration steps for Apache2: ## nginx / fcgiwrap -Nginx needs "php5-fpm" package to support PHP and "fcgiwrap" package +Nginx needs "php-fpm" package to support PHP and "fcgiwrap" package for binary "cgi-bin" applications: - sudo apt-get install php5-fpm fcgiwrap + sudo apt-get install php-fpm fcgiwrap To enable a URL alias that makes Zoneminder available from @@ -119,32 +112,9 @@ 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 +ZoneMinder is now able to be configured to use an alternative location for storing +events and images at compile time. This package makes use of that, so symlinks in +/usr/share/zoneminder/www are no longer necessary. Access to /dev/video* --------------------- diff --git a/distros/ubuntu1604/changelog b/distros/ubuntu1604/changelog index beef67111..616f75178 100644 --- a/distros/ubuntu1604/changelog +++ b/distros/ubuntu1604/changelog @@ -1,607 +1,3 @@ -zoneminder (1.29.0+dfsg-1) unstable; urgency=low - - * New upstream release [February 2016] (Closes: #788317, #770851). - - [ Dmitry Smirnov ] - * copyright/Files-Excluded += "onvif/*" due to licensing uncertainty. - * Fixed FTBFS when built with dpkg-buildpackage -A (Closes: #806126). - * FFmpeg 2.9 support. Thanks, Andreas Cadhalpun. (Closes: #803850). - * Use "ffmpeg" instead of "avconv": - + "libav_path.patch" replaced with "default_ffmpeg_path.patch". - * zoneminder/Depends: - - perl-modules (package-relation-with-perl-modules) - - libav-tools - * zoneminder/Recommends: - + ffmpeg | libav-tools - * Updated Vcs URLs. - * Build/install new man pages. - * Removed obsolete lintian-overrides. - * README: grant "index" right to DB user. - * systemd: start after MySQL but do not require the latter. - * Added new patch with spelling corrections. - * Removed obsolete patches: - - 783.patch - - 980-fix-image-size.patch - - cmake-fix-confpath.patch - - cmake.patch - - cmake-gnutls.patch - - fix-html-export.patch - - format-hardening.patch - - libv4l1-videodev.h.patch - - pod_man_fixes.patch - - pod_name_fixes.patch - - pod_zmupdate-to-pod2usage.patch - - respect-privacy.patch - - zmtrigger-plus.patch - - [ Vagrant Cascadian ] - * Remove myself from Uploaders. - - -- Dmitry Smirnov Tue, 09 Feb 2016 15:40:32 +1100 - -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 +zoneminder (1.31.39~20180223.27-stretch-1) unstable; urgency=low + * + -- Isaac Connor Fri, 23 Feb 2018 14:15:59 -0500 diff --git a/distros/ubuntu1604/conf/apache2/zoneminder.conf b/distros/ubuntu1604/conf/apache2/zoneminder.conf index 40fbf4d7c..e3164d36c 100644 --- a/distros/ubuntu1604/conf/apache2/zoneminder.conf +++ b/distros/ubuntu1604/conf/apache2/zoneminder.conf @@ -6,14 +6,52 @@ ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" Require all granted + +# Order matters. This alias must come first. +Alias /zm/cache /var/cache/zoneminder/cache + + Options -Indexes +FollowSymLinks + AllowOverride None + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + Alias /zm /usr/share/zoneminder/www - Options Indexes FollowSymLinks + Options -Indexes +FollowSymLinks DirectoryIndex index.php - - AllowOverride All +# For better visibility, the following directives have been migrated from the +# default .htaccess files included with the CakePHP project. +# Parameters not set here are inherited from the parent directive above. + + RewriteEngine on + RewriteRule ^$ app/webroot/ [L] + RewriteRule (.*) app/webroot/$1 [L] + RewriteBase /zm/api + + + + RewriteEngine on + RewriteRule ^$ webroot/ [L] + RewriteRule (.*) webroot/$1 [L] + RewriteBase /zm/api + + + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + RewriteBase /zm/api diff --git a/distros/ubuntu1604/control b/distros/ubuntu1604/control index c1ee3cc0d..00a8bd9ac 100644 --- a/distros/ubuntu1604/control +++ b/distros/ubuntu1604/control @@ -1,21 +1,25 @@ 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 +Maintainer: Isaac Connor +Uploaders: Isaac Connor +Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apache2-dev, dh-linktree, dh-systemd, dh-apache2 ,cmake + ,libx264-dev, libmp4v2-dev ,libavdevice-dev (>= 6:10~) ,libavcodec-dev (>= 6:10~) ,libavformat-dev (>= 6:10~) ,libavutil-dev (>= 6:10~) + ,libswresample-dev | libavresample-dev ,libswscale-dev (>= 6:10~) + ,ffmpeg | libav-tools + ,net-tools ,libbz2-dev - ,libgcrypt-dev + ,libgcrypt-dev | libgcrypt11-dev ,libcurl4-gnutls-dev ,libgnutls-openssl-dev - ,libjpeg-dev - ,libmysqlclient-dev + ,libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev + ,default-libmysqlclient-dev | libmysqlclient-dev | libmariadbclient-dev-compat ,libpcre3-dev ,libpolkit-gobject-1-dev ,libv4l-dev (>= 0.8.3) [!hurd-any] @@ -25,11 +29,15 @@ Build-Depends: debhelper (>= 9), dh-systemd, python-sphinx | python3-sphinx, apa ,libphp-serialization-perl ,libsys-mmap-perl [!hurd-any] ,libwww-perl - ,libdata-uuid-perl + ,libdata-uuid-perl + ,libssl-dev + ,libcrypt-eksblowfish-perl + ,libdata-entropy-perl + ,libvncserver-dev # Unbundled (dh_linktree): ,libjs-jquery ,libjs-mootools -Standards-Version: 3.9.6 +Standards-Version: 3.9.8 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 @@ -38,11 +46,12 @@ Package: zoneminder Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} ,javascript-common - ,libav-tools - ,libdate-manip-perl + ,libmp4v2-2, libx264-142|libx264-148|libx264-152|libx264-155 + ,libswscale-ffmpeg3|libswscale4|libswscale3|libswscale5 + ,libswresample2|libswresample3|libswresample24|libswresample-ffmpeg1 + ,ffmpeg | libav-tools + ,libdate-manip-perl, libmime-lite-perl, libmime-tools-perl ,libdbd-mysql-perl - ,libmime-lite-perl - ,libmime-tools-perl ,libphp-serialization-perl ,libmodule-load-conditional-perl ,libnet-sftp-foreign-perl @@ -50,26 +59,34 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} ,libdbd-mysql-perl ,libdevice-serialport-perl ,libimage-info-perl - ,libjson-any-perl + ,libjson-maybexs-perl ,libsys-mmap-perl [!hurd-any] ,liburi-encode-perl - ,libwww-perl + ,libwww-perl, liburi-perl ,libdata-dump-perl + ,libdatetime-perl ,libclass-std-fast-perl ,libsoap-wsdl-perl ,libio-socket-multicast-perl ,libdigest-sha-perl ,libsys-cpu-perl, libsys-meminfo-perl - ,libdata-uuid-perl - ,mysql-client | virtual-mysql-client + ,libdata-uuid-perl + ,libnumber-bytes-human-perl + ,libfile-slurp-perl + ,mysql-client | mariadb-client | virtual-mysql-client ,perl-modules - ,php5-mysql | php-mysql, php5-gd | php-gd + ,php5-mysql | php-mysql, php5-gd | php-gd , php5-apcu | php-apcu , php-apc | php-apcu-bc, php-json | php5-json ,policykit-1 ,rsyslog | system-log-daemon ,zip + ,libpcre3 + ,libssl | libssl1.0.0 | libssl1.1 + ,libcrypt-eksblowfish-perl + ,libdata-entropy-perl + ,libvncclient1 Recommends: ${misc:Recommends} ,libapache2-mod-php5 | libapache2-mod-php | php5-fpm | php-fpm - ,mysql-server | virtual-mysql-server + ,mysql-server | mariadb-server | virtual-mysql-server ,zoneminder-doc (>= ${source:Version}) ,ffmpeg Suggests: fcgiwrap, logrotate @@ -94,7 +111,7 @@ Description: video camera security and surveillance solution # ,libdbd-mysql-perl # ,libdevice-serialport-perl # ,libimage-info-perl -# ,libjson-any-perl +# ,libjson-maybexs-perl # ,libsys-mmap-perl [!hurd-any] # ,liburi-encode-perl # ,libwww-perl diff --git a/distros/ubuntu1604/patches/default_cgi-path.patch b/distros/ubuntu1604/patches/default_cgi-path.patch deleted file mode 100644 index 8bfc2ba06..000000000 --- a/distros/ubuntu1604/patches/default_cgi-path.patch +++ /dev/null @@ -1,16 +0,0 @@ -Last-Update: 2015-08-16 -Forwarded: no -Author: Dmitry Smirnov -Description: correct path to CGI app according to default web server configuration. - ---- a/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in -+++ b/scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm.in -@@ -428,7 +428,7 @@ our @options = - }, - { - name => "ZM_PATH_ZMS", -- default => "/cgi-bin/nph-zms", -+ default => "/zm/cgi-bin/nph-zms", - description => "Web path to zms streaming server", - help => qqq(" - The ZoneMinder streaming server is required to send streamed diff --git a/distros/ubuntu1604/patches/series b/distros/ubuntu1604/patches/series index fc70f4006..e69de29bb 100644 --- a/distros/ubuntu1604/patches/series +++ b/distros/ubuntu1604/patches/series @@ -1,2 +0,0 @@ -default_cgi-path.patch -use_libjs-mootools.patch diff --git a/distros/ubuntu1604/patches/use_libjs-mootools.patch b/distros/ubuntu1604/patches/use_libjs-mootools.patch deleted file mode 100644 index b3925f6d0..000000000 --- a/distros/ubuntu1604/patches/use_libjs-mootools.patch +++ /dev/null @@ -1,18 +0,0 @@ -Last-Update: 2015-03-29 -Forwarded: no -Bug-Debian: http://bugs.debian.org/585590 -Reviewed-By: Dmitry Smirnov -Description: use mootools shipped by debian, rather than the zoneminder included mootools. - ---- a/web/skins/classic/includes/functions.php -+++ b/web/skins/classic/includes/functions.php -@@ -63,9 +63,8 @@ - } - ?> - - -- - - - >/dev/null 2>&1 || : endscript daily rotate 7 + maxage 7 } diff --git a/distros/ubuntu1604/zoneminder.postinst b/distros/ubuntu1604/zoneminder.postinst index 64699d1ca..7b7af708b 100644 --- a/distros/ubuntu1604/zoneminder.postinst +++ b/distros/ubuntu1604/zoneminder.postinst @@ -1,59 +1,93 @@ #! /bin/sh -set -e +set +e if [ "$1" = "configure" ]; then + + . /etc/zm/zm.conf + for CONFFILE in /etc/zm/conf.d/*.conf; do + . "$CONFFILE" + done + + # 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 + if [ ! -e "/etc/apache2/mods-enabled/cgi.load" ] && [ "$(command -v a2enmod)" != "" ]; then + echo "The cgi module is not enabled in apache2. I am enabling it using a2enmod cgi." + a2enmod cgi + fi + if [ ! -e "/etc/apache2/mods-enabled/rewrite.load" ] && [ "$(command -v a2enmod)" != "" ]; then + echo "The rewrite module is not enabled in apache2. I am enabling it using a2enmod rewrite." + a2enmod rewrite + fi - . /etc/zm/zm.conf + if [ "$ZM_DB_HOST" = "localhost" ]; then - # 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 $? + if [ -e "/lib/systemd/system/mysql.service" ] || [ -e "/lib/systemd/system/mariadb.service" ] || [ -e "/etc/init.d/mysql" ]; then + # Ensure zoneminder is stopped + deb-systemd-invoke stop zoneminder.service || exit $? + + # + # Get mysql started if it isn't running + # + + if [ -e "/lib/systemd/system/mariadb.service" ]; then + DBSERVICE="mariadb.service" + else + DBSERVICE="mysql.service" + fi + echo "Detected db service is $DBSERVICE" + if systemctl is-failed --quiet $DBSERVICE; then + echo "$DBSERVICE is in a failed state; it will not be started." + echo "If you have already resolved the problem preventing $DBSERVICE from running," + echo "run sudo systemctl restart $DBSERVICE then run sudo dpkg-reconfigure zoneminder." + exit 1 + fi + + if ! systemctl is-active --quiet mysql.service mariadb.service; then + # Due to /etc/init.d service autogeneration, mysql.service always returns the status of mariadb.service + # However, mariadb.service will not return the status of mysql.service. + deb-systemd-invoke start $DBSERVICE + fi + + # Make sure systemctl status exit code is 0; i.e. the DB is running + if systemctl is-active --quiet "$DBSERVICE"; 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 + echo "Creating zm db" + cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf + if [ $? -ne 0 ]; then + echo "Error creating db." + exit 1; 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.' + # This creates the user. + echo "CREATE USER '${ZM_DB_USER}'@localhost IDENTIFIED BY '${ZM_DB_PASS}';" | mysql --defaults-file=/etc/mysql/debian.cnf mysql fi + echo "Updating permissions" + echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + zmupdate.pl --nointeractive + zmupdate.pl --nointeractive -f + + # Add any new PTZ control configurations to the database (will not overwrite) + zmcamtool.pl --import >/dev/null 2>&1 + echo "Done Updating; starting ZoneMinder." + else + echo 'NOTE: MySQL/MariaDB not running; please start mysql and run dpkg-reconfigure zoneminder when it is running.' + fi else - echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)" + echo 'MySQL/MariaDB not found; assuming remote server.' fi + else + echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)." + fi + deb-systemd-invoke restart zoneminder.service + fi #DEBHELPER# diff --git a/distros/ubuntu1604/zoneminder.preinst b/distros/ubuntu1604/zoneminder.preinst index 9459b48d0..6088c3ea9 100644 --- a/distros/ubuntu1604/zoneminder.preinst +++ b/distros/ubuntu1604/zoneminder.preinst @@ -8,29 +8,4 @@ if [ -h "${ol}" ]; then [ "$(readlink ${ol})" = "/etc/zm/apache.conf" ] && rm -f "${ol}" fi -abort=false -if [ -h /usr/share/zoneminder/www/events ]; then - l=$(readlink /usr/share/zoneminder/www/events) - if [ "$l" != "/var/cache/zoneminder/events" -a "$l" != "/var/cache/zoneminder/events/" ]; then - abort=true - fi -fi -if [ -h /usr/share/zoneminder/www/images ]; then - l=$(readlink /usr/share/zoneminder/www/images ) - if [ "$l" != "/var/cache/zoneminder/images" -a "$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# diff --git a/distros/ubuntu1604/zoneminder.service b/distros/ubuntu1604/zoneminder.service index e3575c039..cb2d6791e 100644 --- a/distros/ubuntu1604/zoneminder.service +++ b/distros/ubuntu1604/zoneminder.service @@ -13,8 +13,11 @@ 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 +PIDFile=/run/zm/zm.pid +Restart=always +RestartSec=10 +Environment=TZ=:/etc/localtime +TimeoutSec=600 [Install] WantedBy=multi-user.target diff --git a/distros/ubuntu1604/zoneminder.tmpfile b/distros/ubuntu1604/zoneminder.tmpfile index d307c6640..cbfdec1de 100644 --- a/distros/ubuntu1604/zoneminder.tmpfile +++ b/distros/ubuntu1604/zoneminder.tmpfile @@ -1,2 +1,4 @@ -d /var/run/zm 0755 www-data www-data -d /tmp/zm 0755 www-data www-data +d /run/zm 0755 www-data www-data +d /tmp/zm 0755 www-data www-data +d /var/tmp/zm 0755 www-data www-data +d /var/cache/zoneminder/cache 0755 www-data www-data diff --git a/distros/ubuntu1204/NEWS b/distros/ubuntu2004/NEWS similarity index 100% rename from distros/ubuntu1204/NEWS rename to distros/ubuntu2004/NEWS diff --git a/distros/ubuntu1204/README.Debian b/distros/ubuntu2004/README.Debian similarity index 64% rename from distros/ubuntu1204/README.Debian rename to distros/ubuntu2004/README.Debian index 2ba809fe4..4fe3464d2 100644 --- a/distros/ubuntu1204/README.Debian +++ b/distros/ubuntu2004/README.Debian @@ -8,7 +8,7 @@ Initializing database 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";'\ + 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" @@ -23,8 +23,7 @@ configuration file: Upgrading database ------------------ -Prior to 1.28.1 database upgrade was performed automatically. -"zoneminder" service will refuse to start with outdated database. +The database is updated automatically on installation. You should not need to take this step. Assuming that database is on "localhost" then the following command can be used to upgrade "zm" database: @@ -45,17 +44,11 @@ The following command prints the current version of zoneminder database: Enabling service ---------------- -By default Zoneminder service is not starting automatically and need to be -manually activated once database is configured: - -On systemd: +By default Zoneminder service is not automatically started and needs to be +manually enabled once database is configured: sudo systemctl enable zoneminder.service -On SysV: - - sudo update-rc.d zoneminder enable - Web server set-up ----------------- @@ -82,10 +75,10 @@ Common configuration steps for Apache2: ## nginx / fcgiwrap -Nginx needs "php5-fpm" package to support PHP and "fcgiwrap" package +Nginx needs "php-fpm" package to support PHP and "fcgiwrap" package for binary "cgi-bin" applications: - sudo apt-get install php5-fpm fcgiwrap + sudo apt-get install php-fpm fcgiwrap To enable a URL alias that makes Zoneminder available from @@ -119,32 +112,9 @@ 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 +ZoneMinder is now able to be configured to use an alternative location for storing +events and images at compile time. This package makes use of that, so symlinks in +/usr/share/zoneminder/www are no longer necessary. Access to /dev/video* --------------------- diff --git a/distros/ubuntu1204/TODO.Debian b/distros/ubuntu2004/TODO.Debian similarity index 100% rename from distros/ubuntu1204/TODO.Debian rename to distros/ubuntu2004/TODO.Debian diff --git a/distros/ubuntu2004/changelog b/distros/ubuntu2004/changelog new file mode 100644 index 000000000..616f75178 --- /dev/null +++ b/distros/ubuntu2004/changelog @@ -0,0 +1,3 @@ +zoneminder (1.31.39~20180223.27-stretch-1) unstable; urgency=low + * + -- Isaac Connor Fri, 23 Feb 2018 14:15:59 -0500 diff --git a/distros/ubuntu1204/clean b/distros/ubuntu2004/clean similarity index 100% rename from distros/ubuntu1204/clean rename to distros/ubuntu2004/clean diff --git a/distros/ubuntu1204/compat b/distros/ubuntu2004/compat similarity index 100% rename from distros/ubuntu1204/compat rename to distros/ubuntu2004/compat diff --git a/distros/ubuntu2004/conf/apache2/zoneminder.conf b/distros/ubuntu2004/conf/apache2/zoneminder.conf new file mode 100644 index 000000000..e3164d36c --- /dev/null +++ b/distros/ubuntu2004/conf/apache2/zoneminder.conf @@ -0,0 +1,57 @@ +# Remember to enable cgi mod (i.e. "a2enmod cgi"). +ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" + + Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch + AllowOverride All + Require all granted + + + +# Order matters. This alias must come first. +Alias /zm/cache /var/cache/zoneminder/cache + + Options -Indexes +FollowSymLinks + AllowOverride None + + # Apache 2.4 + Require all granted + + + # Apache 2.2 + Order deny,allow + Allow from all + + + +Alias /zm /usr/share/zoneminder/www + + Options -Indexes +FollowSymLinks + + DirectoryIndex index.php + + + +# For better visibility, the following directives have been migrated from the +# default .htaccess files included with the CakePHP project. +# Parameters not set here are inherited from the parent directive above. + + RewriteEngine on + RewriteRule ^$ app/webroot/ [L] + RewriteRule (.*) app/webroot/$1 [L] + RewriteBase /zm/api + + + + RewriteEngine on + RewriteRule ^$ webroot/ [L] + RewriteRule (.*) webroot/$1 [L] + RewriteBase /zm/api + + + + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule ^ index.php [L] + RewriteBase /zm/api + diff --git a/distros/ubuntu1204/control b/distros/ubuntu2004/control similarity index 73% rename from distros/ubuntu1204/control rename to distros/ubuntu2004/control index d7c2232cf..7304d34fb 100644 --- a/distros/ubuntu1204/control +++ b/distros/ubuntu2004/control @@ -1,31 +1,41 @@ Source: zoneminder Section: net Priority: optional -Maintainer: Dmitry Smirnov -Uploaders: Vagrant Cascadian -Build-Depends: debhelper (>= 9), python-sphinx | python3-sphinx, apache2-dev, dh-linktree +Maintainer: Isaac Connor +Uploaders: Isaac Connor +Build-Depends: debhelper, dh-systemd, python3-sphinx, dh-linktree, dh-systemd, dh-apache2 ,cmake - ,libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libavdevice-dev + ,libx264-dev, libmp4v2-dev + ,libavdevice-dev + ,libavcodec-dev + ,libavformat-dev + ,libavutil-dev + ,libswresample-dev + ,libswscale-dev + ,ffmpeg + ,net-tools ,libbz2-dev - ,libgcrypt-dev + ,libgcrypt20-dev ,libcurl4-gnutls-dev - ,libgnutls-openssl-dev - ,libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, - ,libmysqlclient-dev + ,libturbojpeg0-dev + ,default-libmysqlclient-dev | libmysqlclient-dev | libmariadbclient-dev-compat ,libpcre3-dev ,libpolkit-gobject-1-dev - ,libv4l-dev (>= 0.8.3) [!hurd-any] + ,libv4l-dev [!hurd-any] ,libvlc-dev ,libdate-manip-perl ,libdbd-mysql-perl ,libphp-serialization-perl ,libsys-mmap-perl [!hurd-any] ,libwww-perl - ,libdata-uuid-perl + ,libdata-uuid-perl + ,libssl-dev + ,libcrypt-eksblowfish-perl + ,libdata-entropy-perl # Unbundled (dh_linktree): ,libjs-jquery ,libjs-mootools -Standards-Version: 3.9.4 +Standards-Version: 3.9.8 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 @@ -34,36 +44,47 @@ Package: zoneminder Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends} ,javascript-common - ,libav-tools|ffmpeg - ,libdate-manip-perl + ,libmp4v2-2, libx264-155 + ,libswscale5 + ,libswresample3 + ,ffmpeg + ,libdate-manip-perl, libmime-lite-perl, libmime-tools-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 + ,libjson-maybexs-perl ,libsys-mmap-perl [!hurd-any] ,liburi-encode-perl - ,libwww-perl - ,libdata-uuid-perl - ,mysql-client | virtual-mysql-client + ,libwww-perl, liburi-perl + ,libdata-dump-perl + ,libdatetime-perl + ,libclass-std-fast-perl + ,libsoap-wsdl-perl + ,libio-socket-multicast-perl + ,libdigest-sha-perl + ,libsys-cpu-perl, libsys-meminfo-perl + ,libdata-uuid-perl + ,libnumber-bytes-human-perl + ,libfile-slurp-perl + ,mysql-client | mariadb-client | virtual-mysql-client ,perl-modules - ,php5-mysql, php5-gd + ,php-mysql, php-gd, php-apcu, php-apc | php-apcu-bc, php-json ,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 + ,libpcre3 + ,libcrypt-eksblowfish-perl + ,libdata-entropy-perl Recommends: ${misc:Recommends} - ,libapache2-mod-php5 | php5-fpm - ,mysql-server | virtual-mysql-server + ,libapache2-mod-php | php-fpm + ,mysql-server | mariadb-server | virtual-mysql-server ,zoneminder-doc (>= ${source:Version}) + ,ffmpeg Suggests: fcgiwrap, logrotate Description: video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security @@ -86,7 +107,7 @@ Description: video camera security and surveillance solution # ,libdbd-mysql-perl # ,libdevice-serialport-perl # ,libimage-info-perl -# ,libjson-any-perl +# ,libjson-maybexs-perl # ,libsys-mmap-perl [!hurd-any] # ,liburi-encode-perl # ,libwww-perl @@ -109,7 +130,7 @@ Package: zoneminder-doc Section: doc Architecture: all Multi-Arch: foreign -Depends: ${misc:Depends}, ${sphinxdoc:Depends} +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 diff --git a/distros/ubuntu1204/copyright b/distros/ubuntu2004/copyright similarity index 100% rename from distros/ubuntu1204/copyright rename to distros/ubuntu2004/copyright diff --git a/distros/ubuntu1204/examples/nginx.conf b/distros/ubuntu2004/examples/nginx.conf similarity index 100% rename from distros/ubuntu1204/examples/nginx.conf rename to distros/ubuntu2004/examples/nginx.conf diff --git a/distros/ubuntu1204/gbp.conf b/distros/ubuntu2004/gbp.conf similarity index 100% rename from distros/ubuntu1204/gbp.conf rename to distros/ubuntu2004/gbp.conf diff --git a/distros/ubuntu1204/libzoneminder-perl.install b/distros/ubuntu2004/libzoneminder-perl.install similarity index 100% rename from distros/ubuntu1204/libzoneminder-perl.install rename to distros/ubuntu2004/libzoneminder-perl.install diff --git a/web/api/app/Console/Command/Task/empty b/distros/ubuntu2004/patches/series similarity index 100% rename from web/api/app/Console/Command/Task/empty rename to distros/ubuntu2004/patches/series diff --git a/distros/ubuntu1204/rules b/distros/ubuntu2004/rules similarity index 78% rename from distros/ubuntu1204/rules rename to distros/ubuntu2004/rules index b467c870f..c671a1b03 100755 --- a/distros/ubuntu1204/rules +++ b/distros/ubuntu2004/rules @@ -13,22 +13,26 @@ endif %: dh $@ --parallel --buildsystem=cmake --builddirectory=dbuild \ - --with sphinxdoc,apache2,linktree + --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_CONFIG_SUBDIR="/etc/zm/conf.d" \ -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" + -DZM_CACHEDIR="/var/cache/zoneminder/cache" \ + -DZM_DIR_EVENTS="/var/cache/zoneminder/events" \ + -DZM_PATH_SHUTDOWN="/sbin/shutdown" \ + -DZM_PATH_ZMS="/zm/cgi-bin/nph-zms" override_dh_clean: dh_clean $(MANPAGES1) - $(RM) -r docs/_build docs/installationguide + $(RM) -r docs/_build build-indep: #$(MAKE) -C docs text @@ -58,11 +62,16 @@ override_dh_auto_install: override_dh_fixperms: dh_fixperms - ## 637685 - chmod -c o-r $(CURDIR)/debian/zoneminder/etc/zm/zm.conf + # + # As requested by the Debian Webapps Policy Manual §3.2.1 + chown root:www-data $(CURDIR)/debian/zoneminder/etc/zm/zm.conf + chmod 640 $(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 diff --git a/distros/ubuntu2004/source/format b/distros/ubuntu2004/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/distros/ubuntu2004/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/distros/ubuntu1204/source/lintian-overrides b/distros/ubuntu2004/source/lintian-overrides similarity index 100% rename from distros/ubuntu1204/source/lintian-overrides rename to distros/ubuntu2004/source/lintian-overrides diff --git a/distros/ubuntu1204/zoneminder-doc.doc-base b/distros/ubuntu2004/zoneminder-doc.doc-base similarity index 100% rename from distros/ubuntu1204/zoneminder-doc.doc-base rename to distros/ubuntu2004/zoneminder-doc.doc-base diff --git a/distros/ubuntu1204/zoneminder-doc.install b/distros/ubuntu2004/zoneminder-doc.install similarity index 100% rename from distros/ubuntu1204/zoneminder-doc.install rename to distros/ubuntu2004/zoneminder-doc.install diff --git a/distros/ubuntu1204/zoneminder-doc.links b/distros/ubuntu2004/zoneminder-doc.links similarity index 100% rename from distros/ubuntu1204/zoneminder-doc.links rename to distros/ubuntu2004/zoneminder-doc.links diff --git a/distros/ubuntu1204/zoneminder.apache2 b/distros/ubuntu2004/zoneminder.apache2 similarity index 100% rename from distros/ubuntu1204/zoneminder.apache2 rename to distros/ubuntu2004/zoneminder.apache2 diff --git a/distros/ubuntu1204/zoneminder.bug-presubj b/distros/ubuntu2004/zoneminder.bug-presubj similarity index 100% rename from distros/ubuntu1204/zoneminder.bug-presubj rename to distros/ubuntu2004/zoneminder.bug-presubj diff --git a/distros/ubuntu1204/zoneminder.dirs b/distros/ubuntu2004/zoneminder.dirs similarity index 72% rename from distros/ubuntu1204/zoneminder.dirs rename to distros/ubuntu2004/zoneminder.dirs index 4178482c1..6db3d5a95 100644 --- a/distros/ubuntu1204/zoneminder.dirs +++ b/distros/ubuntu2004/zoneminder.dirs @@ -3,4 +3,7 @@ var/lib/zm var/cache/zoneminder/events var/cache/zoneminder/images var/cache/zoneminder/temp +var/cache/zoneminder/cache usr/share/zoneminder/db +etc/zm/ +etc/zm/conf.d diff --git a/distros/ubuntu1204/zoneminder.docs b/distros/ubuntu2004/zoneminder.docs similarity index 100% rename from distros/ubuntu1204/zoneminder.docs rename to distros/ubuntu2004/zoneminder.docs diff --git a/distros/ubuntu1204/zoneminder.examples b/distros/ubuntu2004/zoneminder.examples similarity index 100% rename from distros/ubuntu1204/zoneminder.examples rename to distros/ubuntu2004/zoneminder.examples diff --git a/distros/ubuntu1204/zoneminder.install b/distros/ubuntu2004/zoneminder.install similarity index 91% rename from distros/ubuntu1204/zoneminder.install rename to distros/ubuntu2004/zoneminder.install index 8a26777c0..67b135de5 100644 --- a/distros/ubuntu1204/zoneminder.install +++ b/distros/ubuntu2004/zoneminder.install @@ -1,4 +1,5 @@ etc/zm/zm.conf +etc/zm/conf.d/* usr/bin usr/lib/zoneminder usr/share/polkit-1 diff --git a/distros/ubuntu2004/zoneminder.links b/distros/ubuntu2004/zoneminder.links new file mode 100644 index 000000000..b7258c3c4 --- /dev/null +++ b/distros/ubuntu2004/zoneminder.links @@ -0,0 +1 @@ +/var/tmp /usr/share/zoneminder/www/api/app/tmp diff --git a/distros/ubuntu1204/zoneminder.linktrees b/distros/ubuntu2004/zoneminder.linktrees similarity index 100% rename from distros/ubuntu1204/zoneminder.linktrees rename to distros/ubuntu2004/zoneminder.linktrees diff --git a/distros/ubuntu1204/zoneminder.lintian-overrides b/distros/ubuntu2004/zoneminder.lintian-overrides similarity index 100% rename from distros/ubuntu1204/zoneminder.lintian-overrides rename to distros/ubuntu2004/zoneminder.lintian-overrides diff --git a/distros/ubuntu1204/zoneminder.logrotate b/distros/ubuntu2004/zoneminder.logrotate similarity index 60% rename from distros/ubuntu1204/zoneminder.logrotate rename to distros/ubuntu2004/zoneminder.logrotate index ac7ce0795..6162e9c4d 100644 --- a/distros/ubuntu1204/zoneminder.logrotate +++ b/distros/ubuntu2004/zoneminder.logrotate @@ -1,10 +1,13 @@ -/var/log/zm/*log { +/var/log/zm/*.log { missingok notifempty sharedscripts + delaycompress + compress postrotate /usr/bin/zmpkg.pl logrot >>/dev/null 2>&1 || : endscript - weekly - rotate 3 + daily + rotate 7 + maxage 7 } diff --git a/distros/ubuntu1204/zoneminder.maintscript b/distros/ubuntu2004/zoneminder.maintscript similarity index 100% rename from distros/ubuntu1204/zoneminder.maintscript rename to distros/ubuntu2004/zoneminder.maintscript diff --git a/distros/ubuntu1204/zoneminder.manpages b/distros/ubuntu2004/zoneminder.manpages similarity index 100% rename from distros/ubuntu1204/zoneminder.manpages rename to distros/ubuntu2004/zoneminder.manpages diff --git a/distros/ubuntu2004/zoneminder.postinst b/distros/ubuntu2004/zoneminder.postinst new file mode 100644 index 000000000..a7f8f3131 --- /dev/null +++ b/distros/ubuntu2004/zoneminder.postinst @@ -0,0 +1,89 @@ +#! /bin/sh + +set +e + +if [ "$1" = "configure" ]; then + + . /etc/zm/zm.conf + for CONFFILE in /etc/zm/conf.d/*.conf; do + . "$CONFFILE" + done + + # 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 + if [ ! -e "/etc/apache2/mods-enabled/cgi.load" ] && [ "$(command -v a2enmod)" != "" ]; then + echo "The cgi module is not enabled in apache2. I am enabling it using a2enmod cgi." + a2enmod cgi + fi + + if [ "$ZM_DB_HOST" = "localhost" ]; then + + if [ -e "/lib/systemd/system/mysql.service" ] || [ -e "/lib/systemd/system/mariadb.service" ] || [ -e "/etc/init.d/mysql" ]; then + # Ensure zoneminder is stopped + deb-systemd-invoke stop zoneminder.service || exit $? + + # + # Get mysql started if it isn't running + # + + if [ -e "/lib/systemd/system/mariadb.service" ]; then + DBSERVICE="mariadb.service" + else + DBSERVICE="mysql.service" + fi + echo "Detected db service is $DBSERVICE" + if systemctl is-failed --quiet $DBSERVICE; then + echo "$DBSERVICE is in a failed state; it will not be started." + echo "If you have already resolved the problem preventing $DBSERVICE from running," + echo "run sudo systemctl restart $DBSERVICE then run sudo dpkg-reconfigure zoneminder." + exit 1 + fi + + if ! systemctl is-active --quiet mysql.service mariadb.service; then + # Due to /etc/init.d service autogeneration, mysql.service always returns the status of mariadb.service + # However, mariadb.service will not return the status of mysql.service. + deb-systemd-invoke start $DBSERVICE + fi + + # Make sure systemctl status exit code is 0; i.e. the DB is running + if systemctl is-active --quiet "$DBSERVICE"; 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 + echo "Creating zm db" + cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf + if [ $? -ne 0 ]; then + echo "Error creating db." + exit 1; + fi + # This creates the user. + echo "CREATE USER '${ZM_DB_USER}'@localhost IDENTIFIED BY '${ZM_DB_PASS}';" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + fi + echo "Updating permissions" + echo "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on ${ZM_DB_NAME}.* to '${ZM_DB_USER}'@localhost;" | mysql --defaults-file=/etc/mysql/debian.cnf mysql + + zmupdate.pl --nointeractive + zmupdate.pl --nointeractive -f + + # Add any new PTZ control configurations to the database (will not overwrite) + zmcamtool.pl --import >/dev/null 2>&1 + echo "Done Updating; starting ZoneMinder." + else + echo 'NOTE: MySQL/MariaDB not running; please start mysql and run dpkg-reconfigure zoneminder when it is running.' + fi + else + echo 'MySQL/MariaDB not found; assuming remote server.' + fi + + else + echo "Not doing database upgrade due to remote db server ($ZM_DB_HOST)." + fi + deb-systemd-invoke restart zoneminder.service + +fi + +#DEBHELPER# diff --git a/distros/ubuntu1204/zoneminder.postrm b/distros/ubuntu2004/zoneminder.postrm similarity index 100% rename from distros/ubuntu1204/zoneminder.postrm rename to distros/ubuntu2004/zoneminder.postrm diff --git a/distros/ubuntu2004/zoneminder.preinst b/distros/ubuntu2004/zoneminder.preinst new file mode 100644 index 000000000..6088c3ea9 --- /dev/null +++ b/distros/ubuntu2004/zoneminder.preinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +## Remove obsolete symlink which is in the way of dh_apache2: +ol="/etc/apache2/conf-available/zoneminder.conf" +if [ -h "${ol}" ]; then + [ "$(readlink ${ol})" = "/etc/zm/apache.conf" ] && rm -f "${ol}" +fi + +#DEBHELPER# diff --git a/distros/ubuntu1204/zoneminder.service b/distros/ubuntu2004/zoneminder.service similarity index 64% rename from distros/ubuntu1204/zoneminder.service rename to distros/ubuntu2004/zoneminder.service index d5b326d59..cb2d6791e 100644 --- a/distros/ubuntu1204/zoneminder.service +++ b/distros/ubuntu2004/zoneminder.service @@ -4,7 +4,8 @@ [Unit] Description=ZoneMinder CCTV recording and surveillance system After=network.target mysql.service -Requires=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 @@ -12,8 +13,11 @@ 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 +PIDFile=/run/zm/zm.pid +Restart=always +RestartSec=10 +Environment=TZ=:/etc/localtime +TimeoutSec=600 [Install] WantedBy=multi-user.target diff --git a/distros/ubuntu2004/zoneminder.tmpfile b/distros/ubuntu2004/zoneminder.tmpfile new file mode 100644 index 000000000..cbfdec1de --- /dev/null +++ b/distros/ubuntu2004/zoneminder.tmpfile @@ -0,0 +1,4 @@ +d /run/zm 0755 www-data www-data +d /tmp/zm 0755 www-data www-data +d /var/tmp/zm 0755 www-data www-data +d /var/cache/zoneminder/cache 0755 www-data www-data diff --git a/doc-pak/AUTHORS b/doc-pak/AUTHORS deleted file mode 100644 index 7f0362072..000000000 --- a/doc-pak/AUTHORS +++ /dev/null @@ -1,6 +0,0 @@ -ZoneMinder - A Linux based camera monitoring and analysis tool. - -This project was imagined and created by Philip Coombes in -September 2002, shortly after being burglarised of his power tools. - -mailto:philip.coombes@zoneminder.com diff --git a/doc-pak/BUGS b/doc-pak/BUGS deleted file mode 100644 index 3160e2dce..000000000 --- a/doc-pak/BUGS +++ /dev/null @@ -1 +0,0 @@ -Please see README file. diff --git a/doc-pak/COPYING b/doc-pak/COPYING deleted file mode 100644 index d60c31a97..000000000 --- a/doc-pak/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/doc-pak/ChangeLog b/doc-pak/ChangeLog deleted file mode 100644 index 3160e2dce..000000000 --- a/doc-pak/ChangeLog +++ /dev/null @@ -1 +0,0 @@ -Please see README file. diff --git a/doc-pak/INSTALL b/doc-pak/INSTALL deleted file mode 100644 index 1de0ac2ad..000000000 --- a/doc-pak/INSTALL +++ /dev/null @@ -1,185 +0,0 @@ -Basic Installation -================== - - These are generic installation instructions. - - Please see http://www.zoneminder.com/wiki/index.php/Documentation - for full details. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, a file -`config.cache' that saves the results of its tests to speed up -reconfiguring, and a file `config.log' containing compiler output -(useful mainly for debugging `configure'). - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If at some point `config.cache' -contains results you don't want to keep, you may remove or edit it. - - The file `configure.in' is used to create `configure' by a program -called `autoconf'. You only need `configure.in' if you want to change -it or regenerate `configure' using a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. You can give `configure' -initial values for variables by setting them in the environment. Using -a Bourne-compatible shell, you can do that on the command line like -this: - CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure - -Or on systems that have the `env' program, you can do it like this: - env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not supports the `VPATH' -variable, you have to compile the package for one architecture at a time -in the source code directory. After you have installed the package for -one architecture, use `make distclean' before reconfiguring for another -architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' can not figure out -automatically, but needs to determine by the type of host the package -will run on. Usually `configure' can figure that out, but if it prints -a message saying it can not guess the host type, give it the -`--host=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name with three fields: - CPU-COMPANY-SYSTEM - -See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the host type. - - If you are building compiler tools for cross-compiling, you can also -use the `--target=TYPE' option to select the type of system they will -produce code for and the `--build=TYPE' option to select the type of -system on which you are compiling the package. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Operation Controls -================== - - `configure' recognizes the following options to control how it -operates. - -`--cache-file=FILE' - Use and save the results of the tests in FILE instead of - `./config.cache'. Set FILE to `/dev/null' to disable caching, for - debugging `configure'. - -`--help' - Print a summary of the options to `configure', and exit. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`--version' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`configure' also accepts some other, not widely useful, options. diff --git a/doc-pak/NEWS b/doc-pak/NEWS deleted file mode 100644 index 3160e2dce..000000000 --- a/doc-pak/NEWS +++ /dev/null @@ -1 +0,0 @@ -Please see README file. diff --git a/doc-pak/README b/doc-pak/README deleted file mode 100644 index e3dfa62e1..000000000 --- a/doc-pak/README +++ /dev/null @@ -1,5 +0,0 @@ - -All documentation for ZoneMinder is now online at - -http://www.zoneminder.com/wiki/index.php/Documentation - diff --git a/doc-pak/TODO b/doc-pak/TODO deleted file mode 100644 index 69af9c87e..000000000 --- a/doc-pak/TODO +++ /dev/null @@ -1,2 +0,0 @@ -Please see README file. - diff --git a/docs/_static/Icon_External_Link.png b/docs/_static/Icon_External_Link.png new file mode 100644 index 000000000..16f9b92db Binary files /dev/null and b/docs/_static/Icon_External_Link.png differ diff --git a/docs/_static/README.txt b/docs/_static/README.txt new file mode 100644 index 000000000..acc1d59d9 --- /dev/null +++ b/docs/_static/README.txt @@ -0,0 +1,2 @@ +The external link icon is GPL licensed. Original license link: +https://commons.wikimedia.org/wiki/Category:External_link_icons#/media/File:Icon_External_Link.png diff --git a/docs/_static/zmstyle.css b/docs/_static/zmstyle.css index b8f0235f3..986614fa6 100644 --- a/docs/_static/zmstyle.css +++ b/docs/_static/zmstyle.css @@ -1,3 +1,18 @@ img { border: 1px solid black !important; } + +.admonition-todo { + border-top: 2px solid red; + border-bottom: 2px solid red; + border-left: 2px solid red; + border-right: 2px solid red; + background-color: #ff6347; + } + + a.reference.external:link, + a.reference.external:visited{ + background: url('./Icon_External_Link.png') center right no-repeat; + padding-right: 13px; + + } \ No newline at end of file diff --git a/docs/api.rst b/docs/api.rst index 9546a279a..23effc0b7 100644 --- a/docs/api.rst +++ b/docs/api.rst @@ -1,7 +1,8 @@ + API ==== -This document will provide an overview of ZoneMinder's API. This is work in progress. +This document will provide an overview of ZoneMinder's API. Overview ^^^^^^^^ @@ -13,48 +14,187 @@ The API is built in CakePHP and lives under the ``/api`` directory. It provides a RESTful service and supports CRUD (create, retrieve, update, delete) functions for Monitors, Events, Frames, Zones and Config. -Security +API Wrappers +^^^^^^^^^^^^^ +- pyzm is a python wrapper for the ZoneMinder APIs. It supports both the legacy and new token based API, as well as ZM logs/ZM shared memory support. See `its project site `__ for more details. Documentation is `here `__. + +API evolution +^^^^^^^^^^^^^^^ + +The ZoneMinder API has evolved over time. Broadly speaking the iterations were as follows: + +* Prior to version 1.29, there really was no API layer. Users had to use the same URLs that the web console used to 'mimic' operations, or use an XML skin +* Starting version 1.29, a v1.0 CakePHP based API was released which continues to evolve over time. From a security perspective, it still tied into ZM auth and required client cookies for many operations. Primarily, two authentication modes were offered: + + * You use cookies to maintain session state (``ZM_SESS_ID``) + * You use an authentication hash to validate yourself, which included encoding personal information and time stamps which at times caused timing validation issues, especially for mobile consumers + +* Starting version 1.34, ZoneMinder has introduced a new "token" based system which is based JWT. We have given it a '2.0' version ID. These tokens don't encode any personal data and can be statelessly passed around per request. It introduces concepts like access tokens, refresh tokens and per user level API revocation to manage security better. The internal components of ZoneMinder all support this new scheme now and if you are using the APIs we strongly recommend you migrate to 1.34 and use this new token system (as a side note, 1.34 also moves from MYSQL PASSWORD to Bcrypt for passwords, which is also a good reason why you should migate). +* Note that as of 1.34, both versions of API access will work (tokens and the older auth hash mechanism), however we no longer use sessions by default. You will have to add a ``stateful=1`` query parameter during login to tell ZM to set a COOKIE and store the required info in the session. This option is only available if ``OPT_USE_LEGACY_API_AUTH`` is set to ON. + +.. note:: + For the rest of the document, we will specifically highlight v2.0 only features. If you don't see a special mention, assume it applies for both API versions. + + + +Enabling API +^^^^^^^^^^^^^ + +ZoneMinder comes with APIs enabled. To check if APIs are enabled, visit ``Options->System``. If ``OPT_USE_API`` is enabled, your APIs are active. +For v2.0 APIs, you have an additional option right below it: + + * ``OPT_USE_LEGACY_API_AUTH`` which is enabled by default. When enabled, the `login.json` API (discussed later) will return both the old style (``auth=``) and new style (``token=``) credentials. The reason this is enabled by default is because any existing apps that use the API would break if they were not updated to use v2.0. (Note that zmNinja 1.3.057 and beyond will support tokens) + +Enabling secret key +^^^^^^^^^^^^^^^^^^^ + +* It is **important** that you create a "Secret Key". This needs to be a set of hard to guess characters, that only you know. ZoneMinder does not create a key for you. It is your responsibility to create it. If you haven't created one already, please do so by going to ``Options->Systems`` and populating ``AUTH_HASH_SECRET``. Don't forget to save. +* If you plan on using V2.0 token based security, **it is mandatory to populate this secret key**, as it is used to sign the token. If you don't, token authentication will fail. V1.0 did not mandate this requirement. + + +Getting an API key +^^^^^^^^^^^^^^^^^^^^^^^ + +To get an API key: + +:: + + curl -XPOST -d "user=yourusername&pass=yourpassword" https://yourserver/zm/api/host/login.json + + +If you want to use a stateful connection, so you don't have to pass auth credentials with each query, you can use the following: + +:: + + curl -XPOST -c cookies.txt -d "user=yourusername&pass=yourpassword&stateful=1" https://yourserver/zm/api/host/login.json + +This returns a payload like this for API v1.0: + +:: + + { + "credentials": "auth=05f3a50e8f7063", + "append_password": 0, + "version": "1.33.9", + "apiversion": "1.0" + } + +Or for API 2.0: + +:: + + { + "access_token": "eyJ0eXAiOiJKHE", + "access_token_expires": 3600, + "refresh_token": "eyJ0eXAiOimPs", + "refresh_token_expires": 86400, + "credentials": "auth=05f3a50e8f7063", # only if OPT_USE_LEGACY_API_AUTH is enabled + "append_password": 0, # only if OPT_USE_LEGACY_API_AUTH is enabled + "version": "1.33.9", + "apiversion": "2.0" + } + +Using these keys with subsequent requests +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Once you have the keys (a.k.a credentials (v1.0, v2.0) or token (v2.0)) you should now supply that key to subsequent API calls like this: + +:: + + # v1.0 or 2.0 based API access (will only work if AUTH_HASH_LOGINS is enabled + + # RECOMMENDED: v2.0 token based + curl -XGET https://yourserver/zm/api/monitors.json?token= + + # or, for legacy mode: + + curl -XGET https://yourserver/zm/api/monitors.json?auth= + + # or, if you specified -c cookies.txt in the original login request + + curl -b cookies.txt -XGET https://yourserver/zm/api/monitors.json + + +.. NOTE:: + + If you are using an ``HTTP GET`` request, the token/auth needs to be passed as a query parameter in the URL. If you are using an ``HTTP POST`` (like when you use the API to modify a monitor, for example), you can choose to pass the token as a data payload instead. The API layer discards data payloads for ``HTTP GET``. Finally, If you don't pass keys, you could also use cookies (not recommended as a general approach). + +Key lifetime (v1.0) +^^^^^^^^^^^^^^^^^^^^^ + +If you are using the old credentials mechanism present in v1.0, then the credentials will time out based on PHP session timeout (if you are using cookies), or the value of ``AUTH_HASH_TTL`` (if you are using ``auth=`` and have enabled ``AUTH_HASH_LOGINS``) which defaults to 2 hours. Note that there is no way to look at the hash and decipher how much time is remaining. So it is your responsibility to record the time you got the hash and assume it was generated at the time you got it and re-login before that time expires. + +Key lifetime (v2.0) +^^^^^^^^^^^^^^^^^^^^^^ + +In version 2.0, it is easy to know when a key will expire before you use it. You can find that out from the ``access_token_expires`` and ``refresh_token_expires`` values (in seconds) after you decode the JWT key (there are JWT decode libraries for every language you want). You should refresh the keys before the timeout occurs, or you will not be able to use the APIs. + +Understanding access/refresh tokens (v2.0) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you are using V2.0, then you need to know how to use these tokens effectively: + +* Access tokens are short lived. ZoneMinder issues access tokens that live for 3600 seconds (1 hour). +* Access tokens should be used for all subsequent API accesses. +* Refresh tokens should ONLY be used to generate new access tokens. For example, if an access token lives for 1 hour, before the hour completes, invoke the ``login.json`` API above with the refresh token to get a new access token. ZoneMinder issues refresh tokens that live for 24 hours. +* To generate a new refresh token before 24 hours are up, you will need to pass your user login and password to ``login.json`` + +**To Summarize:** + +* Pass your ``username`` and ``password`` to ``login.json`` only once in 24 hours to renew your tokens +* Pass your "refresh token" to ``login.json`` once in two hours (or whatever you have set the value of ``AUTH_HASH_TTL`` to) to renew your ``access token`` +* Use your ``access token`` for all API invocations. + +In fact, V2.0 will reject your request (if it is not to ``login.json``) if it comes with a refresh token instead of an access token to discourage usage of this token when it should not be used. + +This minimizes the amount of sensitive data that is sent over the wire and the lifetime durations are made so that if they get compromised, you can regenerate or invalidate them (more on this later) + +Understanding key security +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +* Version 1.0 uses an MD5 hash to generate the credentials. The hash is computed over your secret key (if available), username, password and some time parameters (along with remote IP if enabled). This is not a secure/recommended hashing mechanism. If your auth hash is compromised, an attacker will be able to use your hash till it expires. To avoid this, you could disable the user in ZoneMinder. Furthermore, enabling remote IP (``AUTH_HASH_REMOTE_IP``) requires that you issue future requests from the same IP that generated the tokens. While this may be considered an additional layer for security, this can cause issues with mobile devices. + +* Version 2.0 uses a different approach. The hash is a simple base64 encoded form of "claims", but signed with your secret key. Consider for example, the following access key: + +:: + + eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJab25lTWluZGVyIiwiaWF0IjoxNTU3OTQwNzUyLCJleHAiOjE1NTc5NDQzNTIsInVzZXIiOiJhZG1pbiIsInR5cGUiOiJhY2Nlc3MifQ.-5VOcpw3cFHiSTN5zfGDSrrPyVya1M8_2Anh5u6eNlI + +If you were to use any `JWT token verifier `__ it can easily decode that token and will show: + +:: + + { + "iss": "ZoneMinder", + "iat": 1557940752, + "exp": 1557944352, + "user": "admin", + "type": "access" + } + Invalid Signature + + +Don't be surprised. JWT tokens, by default, are `not meant to be encrypted `__. It is just an assertion of a claim. It states that the issuer of this token was ZoneMinder, +It was issued at (iat) Wednesday, 2019-05-15 17:19:12 UTC and will expire on (exp) Wednesday, 2019-05-15 18:19:12 UTC. This token claims to be owned by an admin and is an access token. If your token were to be stolen, this information is available to the person who stole it. Note that there are no sensitive details like passwords in this claim. + +However, that person will **not** have your secret key as part of this token and therefore, will NOT be able to create a new JWT token to get, say, a refresh token. They will however, be able to use your access token to access resources just like the auth hash above, till the access token expires (2 hrs). To revoke this token, you don't need to disable the user. Go to ``Options->API`` and tap on "Revoke All Access Tokens". This will invalidate the token immediately (this option will invalidate all tokens for all users, and new ones will need to be generated). + +Over time, we will provide you with more fine grained access to these options. + +**Summarizing good practices:** + +* Use HTTPS, not HTTP +* If possible, use free services like `LetsEncrypt `__ instead of self-signed certificates (sometimes this is not possible) +* Keep your tokens as private as possible, and use them as recommended above +* If you believe your tokens are compromised, revoke them, but also check if your attacker has compromised more than you think (example, they may also have your username/password or access to your system via other exploits, in which case they can regenerate as many tokens/credentials as they want). + + +.. NOTE:: + Subsequent sections don't explicitly callout the key addition to APIs. We assume that you will append the correct keys as per our explanation above. + + +Examples ^^^^^^^^^ -The APIs tie into ZoneMinder's existing security model. This means if you have -OPT_AUTH enabled, you need to log into ZoneMinder using the same browser you plan to -use the APIs from. If you are developing an app that relies on the API, you need -to do a POST login from the app into ZoneMinder before you can access the API. - -Then, you need to re-use the authentication information of the login (returned as cookie states) -with subsequent APIs for the authentication information to flow through to the APIs. - -This means if you plan to use cuRL to experiment with these APIs, you first need to do - -:: - - curl -d "username=XXXX&password=YYYY&action=login&view=console" -c cookies.txt http://yourzmip/zm/index.php - -replacing *XXXX* and *YYYY* with your username and password, respectively. - -Please make sure you do this in a directory where you have write permissions, otherwise cookies.txt will not be created -and the command will silently fail. - - -What the "-c cookies.txt" does is store a cookie state reflecting that you have logged into ZM. You now need -to apply that cookie state to all subsequent APIs. You do that by using a '-b cookies.txt' to subsequent APIs if you are -using CuRL like so: - -:: - - curl -b cookies.txt http://yourzmip/zm/api/monitors.json - -This would return a list of monitors and pass on the authentication information to the ZM API layer. - -So remember, if you are using authentication, please add a ``-b cookies.txt`` to each of the commands below if you are using -CuRL. If you are not using CuRL and writing your own app, you need to make sure you pass on cookies to subsequent requests -in your app. - -Examples (please read security notice above) -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -You will see each URL ending in either ``.xml`` or ``.json``. This is the -format of the request, and it determines the format that any data returned to -you will be in. I like json, however you can use xml if you'd like. (In all examples, replace 'server' with IP or hostname & port where ZoneMinder is running) @@ -74,6 +214,22 @@ Return a list of all monitors curl http://server/zm/api/monitors.json +It is worthwhile to note that starting ZM 1.32.3 and beyond, this API also returns a ``Monitor_Status`` object per monitor. It looks like this: + +:: + + "Monitor_Status": { + "MonitorId": "2", + "Status": "Connected", + "CaptureFPS": "1.67", + "AnalysisFPS": "1.67", + "CaptureBandwidth": "52095" + } + + +If you don't see this in your API, you are running an older version of ZM. This gives you a very convenient way to check monitor status without calling the ``daemonCheck`` API described later. + + Retrieve monitor 1 ^^^^^^^^^^^^^^^^^^^ @@ -89,7 +245,14 @@ This API changes monitor 1 to Modect and Enabled :: - curl -XPOST http://server/zm/api/monitors/1.json -d "Monitor[Function]=Modect&Monitor[Enabled]:true" + curl -XPOST http://server/zm/api/monitors/1.json -d "Monitor[Function]=Modect&Monitor[Enabled]=1" + +Get Daemon Status of Monitor 1 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +:: + + curl http://server/zm/api/monitors/daemonStatus/id:1/daemon:zmc.json Add a monitor ^^^^^^^^^^^^^^ @@ -98,15 +261,15 @@ This command will add a new http monitor. :: - curl -XPOST http://server/zm/api/monitors.json -d "Monitor[Name]=Cliff-Burton \ - &Monitor[Function]=Modect \ - &Monitor[Protocol]=http \ - &Monitor[Method]=simple \ - &Monitor[Host]=usr:pass@192.168.11.20 \ - &Monitor[Port]=80 \ - &Monitor[Path]=/mjpg/video.mjpg \ - &Monitor[Width]=704 \ - &Monitor[Height]=480 \ + curl -XPOST http://server/zm/api/monitors.json -d "Monitor[Name]=Cliff-Burton\ + &Monitor[Function]=Modect\ + &Monitor[Protocol]=http\ + &Monitor[Method]=simple\ + &Monitor[Host]=usr:pass@192.168.11.20\ + &Monitor[Port]=80\ + &Monitor[Path]=/mjpg/video.mjpg\ + &Monitor[Width]=704\ + &Monitor[Height]=480\ &Monitor[Colours]=4" Edit monitor 1 @@ -209,7 +372,7 @@ Return a list of events for a specific monitor Id =5 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :: - curl -XGET http://server/zm/api/events/events/index/MonitorId:5.json`` + curl -XGET http://server/zm/api/events/index/MonitorId:5.json Note that the same pagination logic applies if the list is too long @@ -220,7 +383,7 @@ Return a list of events for a specific monitor within a specific date/time range :: - http://server/zm/api/events/events/index/MonitorId:5/StartTime >=:2015-05-15 18:43:56/EndTime <=:2015-05-16 18:43:56.json + http://server/zm/api/events/index/MonitorId:5/StartTime >=:2015-05-15 18:43:56/EndTime <=:2015-05-16 18:43:56.json To try this in CuRL, you need to URL escape the spaces like so: @@ -258,6 +421,15 @@ This returns number of events per monitor that were recorded in the last day whe +Return sorted events +^^^^^^^^^^^^^^^^^^^^^^ + +This returns a list of events within a time range and also sorts it by descending order + +:: + + curl -XGET "http://server/zm/api/events/index/StartTime%20>=:2015-05-15%2018:43:56/EndTime%20<=:208:43:56.json?sort=StartTime&direction=desc" + Configuration Apis ^^^^^^^^^^^^^^^^^^^ @@ -272,7 +444,17 @@ This returns the full list of configuration parameters: Each configuration parameter has an Id, Name, Value and other fields. Chances are you are likely only going to focus on these 3. -(Example of changing config TBD) +The edit function of the Configs API is a little quirky at the moment. Its format deviates from the usual edit flow of other APIs. This will be fixed, eventually. For now, to change the "Value" of ZM_X10_HOUSE_CODE from A to B: + +:: + + curl -XPUT http://server/zm/api/configs/edit/ZM_X10_HOUSE_CODE.json -d "Config[Value]=B" + +To validate changes have been made: + +:: + + curl -XGET http://server/zm/api/configs/view/ZM_X10_HOUSE_CODE.json Run State Apis ^^^^^^^^^^^^^^^ @@ -294,33 +476,36 @@ Create a Zone :: - curl -XPOST http://server/zm/api/zones.json -d "Zone[Name]=Jason-Newsted \ - &Zone[MonitorId]=3 \ - &Zone[Type]=Active \ - &Zone[Units]=Percent \ - &Zone[NumCoords]=4 \ - &Zone[Coords]=0,0 639,0 639,479 0,479 \ - &Zone[AlarmRGB]=16711680 \ - &Zone[CheckMethod]=Blobs \ - &Zone[MinPixelThreshold]=25 \ - &Zone[MaxPixelThreshold]= \ - &Zone[MinAlarmPixels]=9216 \ - &Zone[MaxAlarmPixels]= \ - &Zone[FilterX]=3 \ - &Zone[FilterY]=3 \ - &Zone[MinFilterPixels]=9216 \ - &Zone[MaxFilterPixels]=230400 \ - &Zone[MinBlobPixels]=6144 \ - &Zone[MaxBlobPixels]= \ - &Zone[MinBlobs]=1 \ - &Zone[MaxBlobs]= \ + curl -XPOST http://server/zm/api/zones.json -d "Zone[Name]=Jason-Newsted\ + &Zone[MonitorId]=3\ + &Zone[Type]=Active\ + &Zone[Units]=Percent\ + &Zone[NumCoords]=4\ + &Zone[Coords]=0,0 639,0 639,479 0,479\ + &Zone[Area]=307200\ + &Zone[AlarmRGB]=16711680\ + &Zone[CheckMethod]=Blobs\ + &Zone[MinPixelThreshold]=25\ + &Zone[MaxPixelThreshold]=\ + &Zone[MinAlarmPixels]=9216\ + &Zone[MaxAlarmPixels]=\ + &Zone[FilterX]=3\ + &Zone[FilterY]=3\ + &Zone[MinFilterPixels]=9216\ + &Zone[MaxFilterPixels]=230400\ + &Zone[MinBlobPixels]=6144\ + &Zone[MaxBlobPixels]=\ + &Zone[MinBlobs]=1\ + &Zone[MaxBlobs]=\ &Zone[OverloadFrames]=0" -PTZ Control APIs -^^^^^^^^^^^^^^^^ +PTZ Control Meta-Data APIs +^^^^^^^^^^^^^^^^^^^^^^^^^^^ PTZ controls associated with a monitor are stored in the Controls table and not the Monitors table inside ZM. What that means is when you get the details of a Monitor, you will only know if it is controllable (isControllable:true) and the control ID. To be able to retrieve PTZ information related to that Control ID, you need to use the controls API +Note that these APIs only retrieve control data related to PTZ. They don't actually move the camera. See the "PTZ on live streams" section to move the camera. + This returns all the control definitions: :: @@ -338,7 +523,192 @@ ZM APIs have various APIs that help you in determining host (aka ZM) daemon stat :: - curl -XGET http://server/zm/api/host/daemonCheck.json # 1 = ZM running 0=not running curl -XGET http://server/zm/api/host/getLoad.json # returns current load of ZM - curl -XGET http://server/zm/api/host/getDiskPercent.json # returns in GB (not percentage), disk usage per monitor (that is, space taken to store various event related information,images etc. per monitor) `` + + # Note that ZM 1.32.3 onwards has the same information in Monitors.json which is more reliable and works for multi-server too. + curl -XGET http://server/zm/api/host/daemonCheck.json # 1 = ZM running 0=not running + + # The API below uses "du" to calculate disk space. We no longer recommend you use it if you have many events. Use the Storage APIs instead, described later + curl -XGET http://server/zm/api/host/getDiskPercent.json # returns in GB (not percentage), disk usage per monitor (that is,space taken to store various event related information,images etc. per monitor) + + +Storage and Server APIs +^^^^^^^^^^^^^^^^^^^^^^^ + +ZoneMinder introduced many new options that allowed you to configure multiserver/multistorage configurations. While a part of this was available in previous versions, a lot of rework was done as part of ZM 1.31 and 1.32. As part of that work, a lot of new and useful APIs were added. Some of these are part of ZM 1.32 and others will be part of ZM 1.32.3 (of course, if you build from master, you can access them right away, or wait till a stable release is out. + + + +This returns storage data for my single server install. If you are using multi-storage, you'll see many such "Storage" entries, one for each storage defined: + +:: + + curl http://server/zm/api/storage.json + +Returns: + +:: + + { + "storage": [ + { + "Storage": { + "Id": "0", + "Path": "\/var\/cache\/zoneminder\/events", + "Name": "Default", + "Type": "local", + "Url": null, + "DiskSpace": "364705447651", + "Scheme": "Medium", + "ServerId": null, + "DoDelete": true + } + } + ] + } + + + +"DiskSpace" is the disk used in bytes. While this doesn't return disk space data as rich as ``/host/getDiskPercent``, it is much more efficient. + +Similarly, + +:: + + curl http://server/zm/api/servers.json + +Returns: + +:: + + { + "servers": [ + { + "Server": { + "Id": "1", + "Name": "server1", + "Hostname": "server1.mydomain.com", + "State_Id": null, + "Status": "Running", + "CpuLoad": "0.9", + "TotalMem": "6186237952", + "FreeMem": "156102656", + "TotalSwap": "536866816", + "FreeSwap": "525697024", + "zmstats": false, + "zmaudit": false, + "zmtrigger": false + } + } + ] + } + +This only works if you have a multiserver setup in place. If you don't it will return an empty array. + +Other APIs +^^^^^^^^^^ +This is not a complete list. ZM supports more parameters/APIs. A good way to dive in is to look at the `API code `__ directly. + +Streaming Interface +^^^^^^^^^^^^^^^^^^^ +Developers working on their application often ask if there is an "API" to receive live streams, or recorded event streams. +It is possible to stream both live and recorded streams. This isn't strictly an "API" per-se (that is, it is not integrated +into the Cake PHP based API layer discussed here) and also why we've used the term "Interface" instead of an "API". + +Live Streams +~~~~~~~~~~~~~~ +What you need to know is that if you want to display "live streams", ZoneMinder sends you streaming JPEG images (MJPEG) +which can easily be rendered in a browser using an ``img src`` tag. + +For example: + +:: + + + + # or + + + + + + +will display a live feed from monitor id 1, scaled down by 50% in quality and resized to 640x480px. + +* This assumes ``/zm/cgi-bin`` is your CGI_BIN path. Change it to what is correct in your system +* The "auth" token you see above is required if you use ZoneMinder authentication. To understand how to get the auth token, please read the "Login, Logout & API security" section below. +* The "connkey" parameter is essentially a random number which uniquely identifies a stream. If you don't specify a connkey, ZM will generate its own. It is recommended to generate a connkey because you can then use it to "control" the stream (pause/resume etc.) +* Instead of dealing with the "auth" token, you can also use ``&user=username&pass=password`` where "username" and "password" are your ZoneMinder username and password respectively. Note that this is not recommended because you are transmitting them in a URL and even if you use HTTPS, they may show up in web server logs. + + +PTZ on live streams +------------------- +PTZ commands are pretty cryptic in ZoneMinder. This is not meant to be an exhaustive guide, but just something to whet your appetite: + + +Lets assume you have a monitor, with ID=6. Let's further assume you want to pan it left. + +You'd need to send a: +``POST`` command to ``https://yourserver/zm/index.php`` with the following data payload in the command (NOT in the URL) + +``view=request&request=control&id=6&control=moveConLeft&xge=30&yge=30`` + +Obviously, if you are using authentication, you need to be logged in for this to work. + +Like I said, at this stage, this is only meant to get you started. Explore the ZoneMinder code and use "Inspect source" as you use PTZ commands in the ZoneMinder source code. +`control_functions.php `__ is a great place to start. + + +Pre-recorded (past event) streams +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Similar to live playback, if you have chosen to store events in JPEG mode, you can play it back using: + +:: + + + + # or + + + + + +* This assumes ``/zm/cgi-bin`` is your CGI_BIN path. Change it to what is correct in your system +* This will playback event 293820, starting from frame 1 as an MJPEG stream +* Like before, you can add more parameters like ``scale`` etc. +* auth and connkey have the same meaning as before, and yes, you can replace auth by ``&user=usename&pass=password`` as before and the same security concerns cited above apply. + +If instead, you have chosen to use the MP4 (Video) storage mode for events, you can directly play back the saved video file: + +:: + + + + + # or + + + + +This above will play back the video recording for event 294690 + +What other parameters are supported? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +The best way to answer this question is to play with ZoneMinder console. Open a browser, play back live or recorded feed, and do an "Inspect Source" to see what parameters +are generated. Change and observe. + + + +Further Reading +^^^^^^^^^^^^^^^^ + +As described earlier, treat this document as an "introduction" to the important parts of the API and streaming interfaces. +There are several details that haven't yet been documented. Till they are, here are some resources: + +* zmNinja, the open source mobile app for ZoneMinder is 100% based on ZM APIs. Explore its `source code `__ to see how things work. +* Launch up ZM console in a browser, and do an "Inspect source". See how images are being rendered. Go to the networks tab of the inspect source console and look at network requests that are made when you pause/play/forward streams. +* If you still can't find an answer, post your question in the `forums `__ (not the github repo). + + diff --git a/docs/conf.py b/docs/conf.py index 9bda5df7b..9de7bd820 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -31,7 +31,7 @@ def setup(app): # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. -extensions = [] +extensions = ['sphinx.ext.todo'] # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -265,3 +265,6 @@ texinfo_documents = [ # If true, do not generate a @detailmenu in the "Top" node's menu. #texinfo_no_detailmenu = False + +# Display todos by setting to True +todo_include_todos = True diff --git a/docs/faq.rst b/docs/faq.rst index 1c5c36d09..56b67d082 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -1,14 +1,17 @@ FAQ ===== +.. todo:: needs to be reviewed - some entries may be old/invalid. I've done one round, but icOn needs to review. + This is the FAQ page. Feel free to contribute any FAQs that you think are missing. +.. note:: It is always a good idea to refer to the `ZoneMinder forums `__ for tips and tricks. While we try and make sure this FAQ is pruned/adjusted to align with the latest stable release, some of the entries may no longer be accurate (or there may be better suggestions in the forums). How can I stop ZoneMinder filling up my disk? --------------------------------------------- Recent versions of ZoneMinder come with a filter you can use for this purpose already included. -The filter is called **PurgeWhenFull** and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors. **Note** that this filter is automatically enabled if you do a frresh install of ZoneMinder including creating a new Database. If you already have an existing Database and are upgrading Zoneminder, it will retain the settings of the filter (which in earlier releases was disabled by default). So you may want to check if PurgeWhenFull is enabled and if not, enable it. +The filter is called **PurgeWhenFull** and to find it, choose one of the event counts from the console page, for instance events in the last hour, for one of your monitors. **Note** that this filter is automatically enabled if you do a fresh install of ZoneMinder including creating a new database. If you already have an existing database and are upgrading ZoneMinder, it will retain the settings of the filter (which in earlier releases was disabled by default). So you may want to check if PurgeWhenFull is enabled and if not, enable it. To enable it, go to Web Console, click on any of your Events of any of your monitors. This will bring up an event listing and a filter window. @@ -29,23 +32,22 @@ To delete events that are older than 7 days, create a new filter with "Date" set Save with 'Run Filter In Background' enabled to have it run automatically. Optional skip archived events: click on the plus sign next to -7 days to add another condition. "and" "archive status" equal to "unarchived only". -Optional slow delete: limit the number of results to 3. If you have a large backlog of events that would be deleted, this can hard spike the CPU usage for a long time. Limiting the number of results to only the first three each time the filter is run spreads out the delete processes over time, dramatically lessening the CPU load. +Optional slow delete: limit the number of results to a number, say ``10`` in the filter. If you have a large backlog of events that would be deleted, this can hard spike the CPU usage for a long time. Limiting the number of results to only the first three each time the filter is run spreads out the delete processes over time, dramatically lessening the CPU load. + + +.. warning:: We no longer recommend use enable ``OPT_FAST_DELETE`` or ``RUN_AUDIT`` anymore, unless you are using an old or low powered system to run Zoneminder. Please consider the remaining tips in this answer to be 'generally deprecated, use only if you must'. There are two methods for ZM to remove files when they are deleted that can be found in Options under the System tab ZM_OPT_FAST_DELETE and ZM_RUN_AUDIT. ZM_OPT_FAST_DELETE: -Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if your are trying to do a lot of events at once. It is recommended that you set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later. - - +Normally an event created as the result of an alarm consists of entries in one or more database tables plus the various files associated with it. When deleting events in the browser it can take a long time to remove all of this if you are trying to do a lot of events at once. If you are running on an older or under-powered system, you may want to set this option which means that the browser client only deletes the key entries in the events table, which means the events will no longer appear in the listing, and leaves the zmaudit daemon to clear up the rest later. If you do so, disk space will not be freed immediately so you will need to run zmaudit more frequently. On modern systems, we recommend that you leave this **off**. ZM_RUN_AUDIT: The zmaudit daemon exists to check that the saved information in the database and on the file system match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. This option controls whether zmaudit is run in the background and performs these checks and fixes continuously. This is recommended for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to not have zmaudit running unconditionally and schedule occasional checks at other, more convenient, times. - - ZM_AUDIT_CHECK_INTERVAL: The zmaudit daemon exists to check that the saved information in the database and on the files system match and are consistent with each other. If an error occurs or if you are using 'fast deletes' it may be that database records are deleted but files remain. In this case, and similar, zmaudit will remove redundant information to synchronize the two data stores. The default check interval of 900 seconds (15 minutes) is fine for most systems however if you have a very large number of events the process of scanning the database and file system may take a long time and impact performance. In this case you may prefer to make this interval much larger to reduce the impact on your system. This option determines how often these checks are performed. @@ -61,25 +63,36 @@ In *general* a good estimate of memory required would be: :: - Min Memory = 1.2 * ((image-width*image-height*image buffer size*target color space*number of cameras/8/1024/1024 ) + Min Bits of Memory = 20% overhead * (image-width*image-height*image buffer size*target color space*number of cameras) Where: + * image-width and image-height are the width and height of images that your camera is configured for (in my case, 1280x960). This value is in the Source tab for each monitor * image buffer size is the # of images ZM will keep in memory (this is used by ZM to make sure it has pre and post images before detecting an alarm - very useful because by the time an alarm is detected, the reason for the alarm may move out of view and a buffer is really useful for this, including for analyzing stats/scores). This value is in the buffers tab for each monitor * target color space is the color depth - 8bit, 24bit or 32bit. It's again in the source tab of each monitor -The 1.2 at the start is basically adding 20% on top of the calculation to account for image/stream overheads (this is an estimate) -So let's do the math. If we have 4 cameras running at 1280x960 with 32bit color space and one camera running at 640x480 with 8bit greyscale color space, the system would require: +The 20% overhead on top of the calculation to account for image/stream overheads (this is an estimate) -``1.2 * ((1280*960*50*32*4/8/1024/1024 ) + (640 *480 *50*8/8 /1024/1024))`` +The math breakdown for 4 cameras running at 1280x960 capture, 50 frame buffer, 24 bit color space: -Or, around 900MB of memory. +:: + + 1280*960 = 1,228,800 (bytes) + 1,228,800 * (3 bytes for 24 bit) = 3,686,400 (bytes) + 3,686,400 * 50 = 184,320,000 (bytes) + 184,320,000 * 4 = 737,280,000 (bytes) + 737,280,000 / 1024 = 720,000 (Kilobytes) + 720,000 / 1024 = 703.125 (Megabytes) + 703.125 / 1024 = 0.686 (Gigabytes) + +Around 700MB of memory. So if you have 2GB of memory, you should be all set. Right? **Not, really**: * This is just the base memory required to capture the streams. Remember ZM is always capturing streams irrespective of whether you are actually recording or not - to make sure its image ring buffer is there with pre images when an alarm kicks in. * You also need to account for other processes not related to ZM running in your box * You also need to account for other ZM processes - for example, I noticed the audit daemon takes up a good amount of memory when it runs, DB updates also take up memory + * If you are using H264 encoding, that buffers a lot of frames in memory as well. So a good rule of thumb is to make sure you have twice the memory as the calculation above (and if you are using the ZM server for other purposes, please factor in those memory requirements as well) @@ -88,167 +101,61 @@ So a good rule of thumb is to make sure you have twice the memory as the calcula As it turns out, ZM uses mapped memory and by default, 50% of your physical memory is what this will grow to. When you reach that limit , ZM breaks down with various errors. -(**Note**: Mapped memory is applicable when you install ZoneMinder with mapped memory support, which is the default mode. If you have specifically disabled mapped memory then please see the next FAQ enty on how to increase shared memory) - A good way to know how much memory is allocated to ZM for its operation is to do a ``df -h`` A sample output on Ubuntu: :: - pp@camerapc:~$ df -h + pp@camerapc:~$ df -h|grep "Filesystem\|shm" Filesystem Size Used Avail Use% Mounted on - /dev/sda1 226G 96G 119G 45% / - none 4.0K 0 4.0K 0% /sys/fs/cgroup - udev 1.8G 4.0K 1.8G 1% /dev - tmpfs 371M 816K 370M 1% /run - none 5.0M 0 5.0M 0% /run/lock tmpfs 2.6G 923M 1.7G 36% /run/shm - none 100M 0 100M 0% /run/user -The key item here is tmpfs --> the example above shows we have allocated 1.7G of mapped memory space of which 36% is used which is a healthy number. If you are seeing this to go beyond 70% you should probaby increase mapped memory +The key item here is tmpfs --> the example above shows we have allocated 1.7G of mapped memory space of which 36% is used which is a healthy number. If you are seeing ``Use%`` going beyond 70% you should probaby increase the mapped memory. + +For example, if you want to increase this limit to 70% of your memory, add the following to ``/etc/fstab`` +``tmpfs SHMPATH tmpfs defaults,noexec,nosuid,size=70% 0 0`` +where SHMPATH is the ``Mounted on`` path. Here, that would be ``/run/shm``. Other systems may be ``/dev/shm``. -If you want to increase this limit to 70% of your memory, add the following to ``/etc/fstab`` -``tmpfs /run/shm tmpfs defaults,noexec,nosuid,size=70% 0 0`` - - -What does a 'Can't shmget: Invalid argument' error in my logs mean? (and my camera does not display at higher resolutions) --------------------------------------------------------------------------------------------------------------------------------------- - -(*Note*: This is applicable for systems that have mapped memory disabled in ZoneMinder. By default, Mapped memory is enabled and unless you have disabled it manually, please refer to the "Math for Memory" question above and how to increase mapped memory limits) - -This error is discussed in the README in the following excerpt:- -''...this is caused by an attempt to allocate an amount of shared memory greater than your system can handle. The size it requests is based on the following formula, ``ring buffer size x image width x image height x 3 (for 24 bit images) + a bit of overhead``. - -So, for example: - -:: - - 384x288 capture resolution, that makes: 110 592 pixels - in 24 bit color that's x24 = 2 654 208 bits per frame - by 80 frames ring buffer x80 = 212 336 640 bits per camera - by 4 cameras x4 = 849 346 560 bits. - Plus 10% overhead = 934 281 216 bits - That's 116 785 152 bytes, and - = 114 048 kB, respectively 111.38 MB. - If my shared memory is set to 134 217 728, which is exactly 128MB, - that means I shouldn't have any problem. - (Note that 1 byte = 8 bits and 1kbyte = 1024bytes, 1MB = 1024 kB) - -If for instance you were using 24bit 640x480 then this would come to about 92Mb if you are using the default buffer size of 100. If this is too large then you can either reduce the image or buffer sizes or increase the maximum amount of shared memory available. If you are using RedHat then you can get details on how to change these settings `here `__ - -You should be able to use a similar procedure with other distributions to modify the shared memory pool without kernel recompilations though in some cases this may be necessary. Note, this error also sometimes occurs if you have an old shared memory segment lying around from a previous run that is too small. Use the ipcs and ipcrm system commands to check and remove it if necessary.'" - -You can often find out how many 4KB shared memory pages are available by typing the following :- - -:: - - # cat /proc/sys/kernel/shmall - 2097152 - -In recent kernels the shmall is set to 2097152 memory pages multiplied by 4096 bytes per page for a total of 8 GB of shared memory available. You only need to increase the shmall value if you have a computer with more than 8GB of memory and wish to use more of it for shared memory usage, such as large databases. - -The most shared memory bytes you can allocate in one go :- - -:: - - # cat /proc/sys/kernel/shmmax - 33554432 - -In recent kernels the shmmax is set to 33554432 bytes for only 32 MB of maximum shared memory allocatable at a time, hardly enough for ZoneMinder to go above 320 x 240 x 24-bit resolution at 40 frames in the buffer if it is using the /dev/shm shared memory device, so this value needs to be increased. If you are using ZoneMinder with the memory mapped (mmap) compile time option then this doesn't affect you. - -To change the value to 128 MB temporarily during this kernel execution type (for example) :- -``echo 536870912 >/proc/sys/kernel/shmmax`` - -*Be sure to restart ZoneMinder after this.* - -However be aware that sometimes you will only need to change the shmmax value as shmall is often large enough. Also changing these values in this way is only effective until your machine is rebooted. - -To change them permanently you will need to edit ``/etc/sysctl.conf`` and add the following lines (for example) :- -``kernel.shmmax = 536870912`` - -Or if your distribution has the ``/etc/sysctl.d/`` folder you can create a file in this folder without modifying the ``/etc/sysctl.d`` so you won't lose the changes during distro upgrades :- -```echo kernel.shmmax = 536870912 >/etc/sysctl.d/60-kernel-shm.conf``` - -To load these settings in the sysctl.conf file type: -``sysctl -p`` - -To check your shared memory settings type: -``ipcs -l`` - -Note that with Megapixel cameras like the Axis 207mw becoming cheaper and more attractive, the above memory settings are not adequate. To get Zoneminder working with a full 1280x1024 resolution camera in full color, increase ``134217728`` (128 MB) to, for example, ``268435456`` (256 MB) and multiple this value by each camera. - -These changes will now also be set the next time your machine is restarted. - -Versions 1.24.x of ZoneMinder also allows you to use an alternate method of shared memory allocation, `Mmap mapped memory `__ . This requires less configuration and can be simpler to use. Mapped memory allows you to use a special type of file as the placeholder for your memory and this file is 'mapped' into memory space for easy and fast access. - -To enable mapped memory in ZoneMinder you need add add the --enable--mmap=yes switch to your configure line. By default mapped memory files are created in /dev/shm which on most distributions is a dedicated pseudo-partition containing memory formatted as a filesystem. If your system uses a different path then this can be changed in ZoneMinder in Options->paths->PATH_MAP. It uses a filesystem type called `tmpfs `__. If you type ``df -h`` you should see this area and the size of memory it currently allows. To increase size for tmpfs you need to edit /etc/default/tmpfs. Search for: -``SHM_SIZE=128M`` -and change to something like -``SHM_SIZE=1G`` -then reboot the system. You could possibly need to change RUN_SIZE, too. - -It is important that you do not use a disk based filesystem for your memory mapped files as this will cause memory access to be extremely slow. ZoneMinder creates files called .zm.mmap. in the mapped memory filesystem. - -Mapped memory is subject to the same limitations in terms of total memory as using more traditional shared memory but does not require any configuration per allocation or chunk. In future versions of ZoneMinder this will be the default shared memory storage method. - -Another good article about shared memory settings can be found `here `__ . - -The essential difference was that the kernel.shmall setting is NOT in a direct memory setting in KB but in pages of memory. it is Max Pages of memory - -*For example:* If you want to allocate a maximum memory setting to 8GB you have to convert it to the number of pages (or segments). -with a page size of 4096. -kernel.shmall = 8000x1024x1024/4096 -``kernel.shmall = 2097152`` -NOT 8388608000 as would be suggested in the RedHat article linked above. - -shmmax is the max amount to allocate in one request - -this is is an actual memory size (as opposed to pages) set to 4GB -``kernel.shmmax = 4294967296`` - -The ``/etc/sysctl.conf`` would have these lines - -:: - - kernel.shmall = 2097152 - kernel.shmmax = 4294967296 - -As above, reload your sysctl.conf with ``sysctl -p`` and check that the settings are correct with ``ipcs -l``. I have enabled motion detection but it is not always being triggered when things happen in the camera view --------------------------------------------------------------------------------------------------------------- -ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (`here `__) however if you believe you have sensible settings configured then there are two diagnostic approaches you can use. +ZoneMinder uses zones to examine images for motion detection. When you create the initial zones you can choose from a number of preset values for sensitivity etc. Whilst these are usually a good starting point they are not always suitable for all situations and you will probably need to tweak the values for your specific circumstances. The meanings of the various settings are described in the documentation (`here `__). Another user contributed illustrated Zone definition guide can be found here: `An illustrated guide to Zones `__ + +However if you believe you have sensible settings configured then there are diagnostic approaches you can use. -Another user contributed illustrated Zone definition guide can be found here: `An illustrated guide to Zones `__ Event Statistics ^^^^^^^^^^^^^^^^^ -The first technique is to use event statistics. Firstly you should ensure they are switched on in Options->Logging->RECORD_EVENT_STATS. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the 'Stats' link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what 'real world' values are being generated. +The first technique is to use event statistics. Firstly you should ensure they are switched on in ``Options->Logging->RECORD_EVENT_STATS``. This will then cause the raw motion detection statistics for any subsequently generated events to be written to the DB. These can then be accessed by first clicking on the Frames or Alarm Frames values of the event from any event list view in the web gui. Then click on the score value to see the actual values that caused the event. Alternatively the stats can be accessed by clicking on the 'Stats' link when viewing any individual frame. The values displayed there correspond with the values that are used in the zone configuration and give you an idea of what 'real world' values are being generated. Note that if you are investigating why events 'do not' happen then these will not be saved and so won't be accessible. The best thing to do in that circumstance is to make your zone more sensitive so that it captures all events (perhap even ones you don't want) so you can get an idea of what values are being generated and then start to adjust back to less sensitive settings if necessary. You should make sure you test your settings under a variety of lighting conditions (e.g. day and night, sunny or dull) to get the best feel for that works and what doesn't. Using statistics will slow your system down to a small degree and use a little extra disk space in the DB so once you are happy you can switch them off again. However it is perfectly feasible to keep them permanently on if your system is able to cope which will allow you to review your setting periodically. -Diagnostic Images -^^^^^^^^^^^^^^^^^^^^ -The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using Options->Logging->RECORD_DIAG_IMAGES. +Diagnostic Images along with FIFO +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +The second approach is to use diagnostic images which are saved copies of the intermediate images that ZM uses when determining motion detection. These are switched on and off using ``Options->Logging->RECORD_DIAG_IMAGES``. + +.. note:: In addition to the detailed explanation below, a recently added ``RECORD_DIAG_IMAGES_FIFO`` option, also available in ``Options->Logging`` can be an invaluable tool to see how your current motion settings are affecting motion detection. The ``delta`` stream along with the ``raw`` (json output) stream can be invaluable to see the effect in real time. Please refer to the explanation of this feature in :doc:`/userguide/options/options_logging` There are two kinds of diagnostic images which are and are written (and continuously overwritten) to the top level monitor event directory. If an event occurs then the files are additionally copied to the event directory and renamed with the appropriate frame number as a prefix. -The first set are produced by the monitor on the image as a whole. The diag-r.jpg image is the current reference image against which all individual frames are compared and the diag-d.jpg image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identical pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think). +The first set are produced by the monitor on the image as a whole. The ``diag-r.jpg`` image is the current reference image against which all individual frames are compared and the ``diag-d.jpg`` image is the delta image highlighting the difference between the reference image and the last analysed image. In this images identical pixels will be black and the more different a pixel is the whiter it will be. Viewing this image and determining the colour of the pixels is a good way of getting a feel for the pixel differences you might expect (often more than you think). -The second set of diag images are labelled as diag--.jpg where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows, +The second set of diag images are labelled as ``diag--.jpg`` where zoneid is the id of the zone in question (Smile) and the stage is where in the alarm check process the image is generated from. So if you have several zones you can expect to see multiple files. Also these files are only interested in what is happening in their zone only and will ignore anything else outside of the zone. The stages that each number represents are as follows, -# Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black. -# Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event. -# Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what. -# Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image. +* Alarmed Pixels - This image shows all pixels in the zone that are considered to be alarmed as white pixels and all other pixels as black. +* Filtered Pixels - This is as stage one except that all pixels removed by the filters are now black. The white pixels represent the pixels that are candidates to generate an event. +* Raw Blobs - This image contains all alarmed pixels from stage 2 but aggrageted into blobs. Each blob will have a different greyscale value (between 1 and 254) so they can be difficult to spot with the naked eye but using a colour picker or photoshop will make it easier to see what blob is what. +* Filtered Blobs - This image is as stage 3 but under (or over) sized blobs have been removed. This is the final step before determining if an event has occurred, just prior to the number of blobs being counted. Thus this image forms the basis for determining whether an event is generated and outlining on alarmed images is done from the blobs in this image. Using the above images you should be able to tell at all stages what ZM is doing to determine if an event should happen or not. They are useful diagnostic tools but as is mentioned elsewhere they will massively slow your system down and take up a great deal more space. You should never leave ZM running for any length of time with diagnostic images on. + Why can't ZoneMinder capture images (either at all or just particularly fast) when I can see my camera just fine in xawtv or similar? ---------------------------------------------------------------------------------------------------------------------------------------------- @@ -258,14 +165,14 @@ On average a card that can capture at 25fps per chip PAL for one input will do m When using xawtv etc to view the stream you are not looking at an image captured using the frame grabber but the card's video memory mapped onto your screen. This requires no capture or processing unless you do an explicit capture via the J or ctrl-J keys for instance. Some cards or drivers do not support the frame grabber interface at all so may not work with ZoneMinder even though you can view the stream in xawtv. If you can grab a still using the grab functionality of xawtv then in general your card will work with ZoneMinder. -Why can't I see streamed images when I can see stills in the Zone window etc? +Why can't I see streamed images when I can see stills in the zone window etc? ------------------------------------------------------------------------------------- This issue is normally down to one of two causes -1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware pluging to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directly as the ZoneMinder php files. Then find the ZoneMinder Options->Images page and enable ZM_OPT_CAMBOZOLA and enter the web path to the .jar file in ZM_PATH_CAMBOZOLA. This will ordinarily just be cambozola.jar. Provided (Options / B/W tabs) WEB_H_CAN_STREAM is set to auto and WEB_H_STREAM_METHOD is set to jpeg then Cambozola should be loaded next time you try and view a stream. +1) You are using Internet Explorer and are trying to view multi-part jpeg streams. IE does not support these streams directly, unlike most other browsers. You will need to install Cambozola or another multi-part jpeg aware plugin to view them. To do this you will need to obtain the applet from the Downloads page and install the cambozola.jar file in the same directory as the ZoneMinder php files. Then find the ZoneMinder Options->Images page and enable ``OPT_CAMBOZOLA`` and enter the web path to the .jar file in ``PATH_CAMBOZOLA``. This will ordinarily just be cambozola.jar. Provided (Options / B/W tabs) ``WEB_H_CAN_STREAM`` is set to auto and ``WEB_H_STREAM_METHOD`` is set to jpeg then Cambozola should be loaded next time you try and view a stream. -'''NOTE''': If you find that the Cambozola applet loads in IE but the applet just displays the version # of Cambozola and the author's name (as opposed to seeing the streaming images), you may need to chmod (''-rwxrwxr-x'') your (''usr/share/zoneminder/'') cambozola.jar: +**NOTE**: If you find that the Cambozola applet loads in IE but the applet just displays the version of Cambozola and the author's name (as opposed to seeing the streaming images), you may need to chmod (``-rwxrwxr-x``) your (``usr/share/zoneminder/``) cambozola.jar: :: @@ -273,7 +180,9 @@ This issue is normally down to one of two causes Once I did this, images started to stream for me. -2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like ``ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"`` where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing Options->Paths->ZM_PATH_ZMS to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs. +2) The other common cause for being unable to view streams is that you have installed the ZoneMinder cgi binaries (zms and nph-zms) in a different directory than your web server is expecting. Make sure that the --with-cgidir option you use to the ZoneMinder configure script is the same as the CGI directory configure for your web server. If you are using Apache, which is the most common one, then in your httpd.conf file there should be a line like ``ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"`` where the last directory in the quotes is the one you have specified. If not then change one or the other to match. Be warned that configuring apache can be complex so changing the one passed to the ZoneMinder configure (and then rebuilding and reinstalling) is recommended in the first instance. If you change the apache config you will need to restart apache for the changes to take effect. If you still cannot see stream reliably then try changing ``ZM_PATH_ZMS`` in your ``/etc/zm/config`` directory to just use zms if nph-zms is specified, or vice versa. Also check in your apache error logs. + +Lastly, please look for errors created by the zmc processes. If zmc isn't running, then zms will not be able to get an image from it and will exit. I have several monitors configured but when I load the Montage view in FireFox why can I only see two? or, Why don't all my cameras display when I use the Montage view in FireFox? -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -297,6 +206,11 @@ change the 3 to a 1 network.http.max-persistent-connections-per-proxy -> 100 again network.http.max-persistent-connections-per-server -> 100 again + +I can't see more than 6 monitors in montage on my browser +--------------------------------------------------------- +Browsers such a Chrome and Safari only support upto 6 streams from the same domain. To work around that, take a look at the multi-port configuration discussed in the ``MIN_STREAMING_PORT`` configuration in :doc:`/userguide/options/options_network` + Why is ZoneMinder using so much CPU? --------------------------------------- @@ -306,12 +220,12 @@ There are a number of specific reasons why processor loads can be high either by The main causes are. - * Using a video palette other than greyscale or RGB24. This can cause a relatively minor performace hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn't support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into 'Monitor' mode so that only the capture daemons are running and monitor the process load of these (the 'zmc' processes) using top. Try it with various palettes to see if it makes a difference. + * Using a video palette other than greyscale or RGB24. This can cause a relatively minor performance hit, though still significant. Although some cameras and cards require using planar palettes ZM currently doesn't support this format internally and each frame is converted to an RGB representation prior to processing. Unless you have compelling reasons for using YUV or reduced RGB type palettes such as hitting USB transfer limits I would experiment to see if RGB24 or greyscale is quicker. Put your monitors into 'Monitor' mode so that only the capture daemons are running and monitor the process load of these (the 'zmc' processes) using top. Try it with various palettes to see if it makes a difference. * Big image sizes. A image of 640x480 requires at least four times the processing of a 320x240 image. Experiment with different sizes to see what effect it may have. Sometimes a large image is just two interlaced smaller frames so has no real benefit anyway. This is especially true for analog cameras/cards as image height over 320 (NTSC) or 352 PAL) are invariably interlaced. * Capture frame rates. Unless there's a compelling reason in your case there is often little benefit in running cameras at 25fps when 5-10fps would often get you results just as good. Try changing your monitor settings to limit your cameras to lower frame rates. You can still configure ZM to ignore these limits and capture as fast as possible when motion is detected. * Run function. Obviously running in Record or Mocord modes or in Modect with lots of events generates a lot of DB and file activity and so CPU and load will increase. - * Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don't want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching RECORD_EVENT_STATS on and seeing what the actual values of alarmed pixels etc are during sample events. - * Optimise your settings. After you've got some settings you're happy with then switching off RECORD_EVENT_STATS will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ZM_FAST_RGB_DIFFS, ZM_OPT_FRAME_SERVER and the JPEG_xxx_QUALITY ones. + * Basic default detection zones. By default when a camera is added one detection zone is added which covers the whole image with a default set of parameters. If your camera covers a view in which various regions are unlikely to generate a valid alarm (ie the sky) then I would experiment with reducing the zone sizes or adding inactive zones to blank out areas you don't want to monitor. Additionally the actual settings of the zone themselves may not be optimal. When doing motion detection the number of changed pixels above a threshold is examined, then this is filter, then contiguous regions are calculated to see if an alarm is generated. If any maximum or minimum threshold is exceeded according to your zone settings at any time the calculation stops. If your settings always result in the calculations going through to the last stage before being failed then additional CPU time is used unnecessarily. Make sure your maximum and minimumzone thresholds are set to sensible values and experiment by switching ``RECORD_EVENT_STATS`` on and seeing what the actual values of alarmed pixels etc are during sample events. + * Optimise your settings. After you've got some settings you're happy with then switching off ``RECORD_EVENT_STATS`` will prevent the statistics being written to the database which saves some time. Other settings which might make a difference are ``ZM_FAST_RGB_DIFFS`` and the ``JPEG_xxx_QUALITY`` ones. I'm sure there are other things which might make a difference such as what else you have running on the box and memory sizes (make sure there's no swapping going on). Also speed of disk etc will make some difference during event capture and also if you are watching the whole time then you may have a bunch of zms processes running also. @@ -325,17 +239,19 @@ Using the timeline view is only recommended when using FireFox, however even the This function has from time to time been corrupted in the SVN release or in the stable releases, try and reinstall from a fresh download. +.. _disk_bw_faq: + How much Hard Disk Space / Bandwidth do I need for ZM? --------------------------------------------------------------- -Please see `this excel sheet `__ or `this online excel sheet `__ (both are user contributed excel sheets) +Please see `this online excel sheet `__. Note that this is just an estimate -Or go to `this link `__ for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera. +Or go to `this link `__ for the Axis bandwidth calculator. Although this is aimed at Axis cameras it still produces valid results for any kind of IP camera. As a quick guide I have 4 cameras at 320x240 storing 1 fps except during alarm events. After 1 week 60GB of space in the volume where the events are stored (/var/www/html/zm) has been used. When I try and run ZoneMinder I get lots of audit permission errors in the logs and it won't start ------------------------------------------------------------------------------------------------------- -Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions (`link `__). +Many Linux distributions nowadays are built with security in mind. One of the latest methods of achieving this is via SELinux (Secure Linux) which controls who is able to run what in a more precise way then traditional accounting and file based permissions (`link `__). If you are seeing entries in your system log like: Jun 11 20:44:02 kernel: audit(1150033442.443:226): avc: denied { read } for pid=5068 @@ -348,38 +264,13 @@ Note that SELinux may cause errors other than those listed above. If you are in How do I enable ZoneMinder's security? ------------------------------------------- -In the console, click on Options. Check the box next to "ZM_OPT_USE_AUTH". You will immediately be asked to login. The default username is 'admin' and the password is 'admin'. +In the console, click on ``Options->System``. Check the box next to ``ZM_OPT_USE_AUTH``. You will immediately be asked to login. The default username is 'admin' and the password is 'admin'. To Manage Users: -In main console, go to Options->Users. +In main console, go to ``Options->Users``. -You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features; +You may also consider to use the web server security, for example, htaccess files under Apache scope; You may even use this as an additional/redundant security on top of Zoneminders built-in security features. Note that if you choose to enable webserver auth, zmNinja may have issues. Please read the `zmNinja FAQ on basic authentication `__ for more information. Also please note that zmNinja does not support digest authentication. -Why does ZM stop recording once I have 32000 events for my monitor? ------------------------------------------------------------------------- -Storing more than 32k files in a single folder is a limitation of some filesystems. To avoid this, enable USE_DEEP_STORAGE under Options. - -USE_DEEP_STORAGE is now the default for new ZoneMinder systems so this limitation should only apply to users upgrading from a previous version of ZoneMinder. - -Versions of ZM from 1.23.0 onwards allow you to have a deeper filesystem with fewer files per individual directory. As well as not being susceptible to the 32k limit, this is also somewhat faster. - -If you have upgraded from a previous version of ZoneMinder and this option is not already enabled, it is very important to follow the steps below to enable it on an existing system. Failure to properly follow these steps **WILL RESULT IN LOSS OF YOUR DATA!** - -:: - - # Stop ZoneMinder - # Backup your event data and the dB if you have the available storage - # Enable USE_DEEP_STORAGE under Options. - # From the command line, run "sudo zmupdate.pl --migrate-events" - # Monitor the output for any events that fail to convert. - # After the conversion completes, you can restart ZoneMinder - -Note that you can re-run the migrate-events command if any error messages scroll off the screen. - -You can read about the lack of a limit in the number of sub-directories in the ext4 filesystem at: `this link `__ -and see what tools may assist in your use of this filesystem `here `__ -If you search for ext3 or reiserfs on the forums you will find various threads on this issue with guidance on -how to convert. Managing system load (with IP Cameras in mind) ---------------------------------------------------- @@ -405,7 +296,7 @@ Zoneminder runs on Linux, Linux measures system load using "load", which is comp A load of 1.0 means the processor has "just enough to do right now". Also worth noting that a load of 4.0 means exactly the same for a quad processor machine - each number equals a single processor's workload. A very high load can be fine on a computer that has a stacked workload - such as a machine sending out bulk emails, or working its way through a knotty problem; it'll just keep churning away until it's done. However - Zoneminder needs to process information in real time so it can't afford to stack its jobs, it needs to deal with them right away. -For a better and full explanation of Load: `Please read this `__ +For a better and full explanation of Load: `Please read this `__ My load is too high, how can I reduce it? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -422,7 +313,7 @@ Zoneminder is *very* tweakable and it's possible to tune it to compromise. The f * Experiment with using jpeg instead of mjpeg. Some users have reported it gives better performance, but YMMV. - * Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more. Read `this `__ for an easy to understand explanation along with the official Zone guide. + * Tweak the zones. Keep them as small and as few as possible. Stick to one zone unless you really need more. Read `this `__ for an easy to understand explanation along with the official Zone guide. * Schedule. If you are running a linux system at near capacity, you'll need to think carefully about things like backups and scheduled tasks. updatedb - the process which maintains a file database so that 'locate' works quickly, is normally scheduled to run once a day and if on a busy system can create a heavy increase on the load. The same is true for scheduled backups, especially those which compress the files. Re-schedule these tasks to a time when the cpu is less likely to be busy, if possible - and also use the "nice" command to reduce their priority. (crontab and /etc/cron.daily/ are good places to start) @@ -435,73 +326,16 @@ More expensive options: * Faster CPU. Simple but effective. Zoneminder also works very well with multiple processor systems out of the box (if SMP is enabled in your kernel). The load of different cameras is spread across the processors. - * Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help. + * Try building Zoneminder with processor specific instructions that are optimised to the system it will be running on, also increasing the optimisation level of GCC beyond -O2 will help. This topic is beyond the scope of this document. -:: - - ./configure CFLAGS="-g -O3 -march=athlon-xp -mtune=athlon-xp" CXXFLAGS="-g -O3 -march=athlon-xp -mtune=athlon-xp" - -The above command is optimised for an Athlon XP cpu so you will need to use the specific processor tag for your cpu, also the compiler optimisation has been increased to -O3. - -You also need to put in your normal ./configure commands as if you were compiling with out this optimisation. - -A further note is that the compile must be performed on the system that Zoneminder will be running on as this optimisation will make it hardware specific code. - -Processor specific commands can be found in the GCC manual along with some more options that may increase performanc. -``__ - -The below command has been used to compile Zoneminder on a Athlon XP system running CentOS 5.5 and along with the libjpeg-turbo modification to reduce the CPU load in half, libjpeg-turbo reduced the load by 1/3 before the processor optimisation. -:: - - ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin CFLAGS="-g -O3 -march=athlon-xp -mtune=athlon-xp" CXXFLAGS="-D__STDC_CONSTANT_MACROS -g -O3 -march=athlon-xp -mtune=athlon-xp" --enable-mmap --sysconfdir=/etc/zm - -The following command has been used to compile Zoneminder 1.25 on a CentOS 6.0 system, the native command should choose the processor automatically during compile time, this needs to be performed on the actual system!!. - -:: - - CFLAGS="-g -O3 -march=native -mtune=native" CXXFLAGS="-D__STDC_CONSTANT_MACROS -g -O3 -march=native -mtune=native" ./configure --with-webdir=/var/www/html/zm --with-cgidir=/var/www/cgi-bin --with-webuser=apache --with-webgroup=apache ZM_DB_HOST=localhost ZM_DB_NAME=zm ZM_DB_USER=your_zm_user ZM_DB_PASS=your_zm_password ZM_SSL_LIB=openssl +Processor specific commands can be found in the `GCC manual `__ along with some more options that may increase performance. What about disks and bandwidth? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ A typical 100mbit LAN will cope with most setups easily. If you're feeding from cameras over smaller or internet links, obviously fps will be much lower. -Disk and Bandwidth calculators are referenced on the Zoneminder wiki here: http://www.zoneminder.com/wiki/index.php/FAQ#How_much_Hard_Disk_Space_.2F_Bandwidth_do_I_need_for_ZM.3F - - -Building ZoneMinder --------------------- - -When running configure I am getting a lot of messages about not being able to compile the ffmpeg libraries -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -If you see output from configure that looks like this - -:: - - checking libavcodec/avcodec.h usability... no - checking libavcodec/avcodec.h presence... yes - configure: WARNING: libavcodec/avcodec.h: present but cannot be compiled - configure: WARNING: libavcodec/avcodec.h: check for missing - prerequisite headers? - configure: WARNING: libavcodec/avcodec.h: see the Autoconf documentation - configure: WARNING: libavcodec/avcodec.h: section "Present But - Cannot Be Compiled" - configure: WARNING: libavcodec/avcodec.h: proceeding with the compiler's - result - configure: WARNING: ## ------------------------------------- ## - configure: WARNING: ## Report this to support@zoneminder.com ## - configure: WARNING: ## ------------------------------------- ## - -then it is caused not by the ZoneMinder build system but ffmpeg itself. However there is a workaround you can use which is to add ``CPPFLAGS=-D__STDC_CONSTANT_MACROS`` - -to the ZoneMinder ``./configure`` command which should solve the issue. However this is not a proper 'fix' as such, which can only come from the ffmpeg project itself. - -I cannot build ZoneMinder and am getting lots of undefined C++ template errors -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -This is almost certainly due to the 'ccache' package which attempts to speed up compilation by caching compiled objects. Unfortunately one of the side effects is that it breaks the GNU g++ template resolution method that ZoneMinder uses in building by prevent files getting recompiled. The simplest way around this is to remove the ccache package using your distros package manager. +Disk and Bandwidth calculators are referenced in :ref:`disk_bw_faq`. How do I build for X10 support? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -525,7 +359,7 @@ To save a run state you should first configure your monitors for Modect, Record, Now you can switch between these two states by selecting them from the same dialog you saved them, or from the command line from issue the command ''zmpkg.pl '', for example ''zmpkg.pl Daytime''. -The final step you need to take, is scheduling the time the changes take effect. For this you can use `cron `__. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows, +The final step you need to take, is scheduling the time the changes take effect. For this you can use `cron `__. A simple entry to change to the Daylight state at at 8am and to the nighttime state at 8pm would be as follows, :: @@ -539,50 +373,10 @@ Although the example above describes changing states at different times of day, How can I use ZoneMinder to trigger something else when there is an alarm? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing ``perldoc ZoneMinder``, ``perldoc ZoneMinder::SharedMem`` etc. -Below is an example script that checks all monitors for alarms and when one occurs, prints a message to the screen. You can add in your own code to make this reaction a little more useful. +ZoneMinder includes a perl API which means you can create a script to interact with the ZM shared memory data and use it in your own scripts to react to ZM alarms or to trigger ZM to generate new alarms. Full details are in the README or by doing ``perldoc ZoneMinder`` etc. -:: +ZoneMinder provides a sample alarm script called `zmalarm.pl `__ that you can refer to as a starting point. - #!/usr/bin/perl -w - - use strict; - - use ZoneMinder; - - $| = 1; - - zmDbgInit( "myscript", level=>0, to_log=>0, to_syslog=>0, to_term=>1 ); - - my $dbh = DBI->connect( "DBI:mysql:database=".ZM_DB_NAME.";host=".ZM_DB_HOST, ZM_DB_USER, ZM_DB_PASS ); - - my $sql = "select M.*, max(E.Id) as LastEventId from Monitors as M left join Events as E on M.Id = E.MonitorId where M.Function != 'None' group by (M.Id)"; - my $sth = $dbh->prepare_cached( $sql ) or die( "Can't prepare '$sql': ".$dbh->errstr() ); - - my $res = $sth->execute() or die( "Can't execute '$sql': ".$sth->errstr() ); - my @monitors; - while ( my $monitor = $sth->fetchrow_hashref() ) - { - push( @monitors, $monitor ); - } - - while( 1 ) - { - foreach my $monitor ( @monitors ) - { - next if ( !zmMemVerify( $monitor ) ); - - if ( my $last_event_id = zmHasAlarmed( $monitor, $monitor->{LastEventId} ) ) - { - $monitor->{LastEventId} = $last_event_id; - print( "Monitor ".$monitor->{Name}." has alarmed\n" ); - # - # Do your stuff here - # - } - } - sleep( 1 ); - } Trouble Shooting ------------------- @@ -591,13 +385,9 @@ This is also how to obtain the info that we need to help you on the forums. What logs should I check for errors? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -ZoneMinder creates its own logs and are usually located in the ``/tmp`` directory. +ZoneMinder creates its own logs and are usually located in the ``/var/log/`` directory. Refer to the logging discussion in :doc:`/userguide/options/options_logging` for more details on where logs are stored and how to enable various log levels. -The ZoneMinder logs for the RPM packages are located in ``/var/log/zm``. - -Depending on your problem errors can show up in any of these logs but, usually the logs of interest are ``zmdc.log`` and ``zmpkg.log`` if ZM is not able to start. - -Now since ZM is dependent on other components to work, you might not find errors in ZM but in the other components. +Since ZM is dependent on other components to work, you might not find errors in ZM but in the other components. :: @@ -613,8 +403,6 @@ If ZM is not functioning, you should always be able to find an error in at least This will append any data entered to any of these logs to your console screen (``-f``). To exit, hit [ctrl -c]. -More verbose logging for the ZoneMinder binaries is available by enabling the debug option from the control panel and will be placed in the path you have configured for the debug logs. Output can be limited to a specific binary as described in the Debug options page under the "?" marks. - How can I trouble shoot the hardware and/or software? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -638,12 +426,33 @@ The apache web server needs to have the right permissions and configuration to b Why am I getting broken images when trying to view events? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Zoneminder and the Apache web server need to have the right permissions. Check this forum topic and similar ones: -http://www.zoneminder.com/forums/viewtopic.php?p=48754#48754 +Zoneminder and the Apache web server need to have the right permissions. Check `this forum topic `__ and similar ones: + + + +I can review events for the current day, but ones from yesterday and beyond error out +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you've checked that the ``www-data`` user has permissions to the storage folders, perhaps your php.ini's timezone setting is incorrect. They _must_ match for certain playback functions. + +If you're using Linux, this can be found using the following command: + +:: + + timedatectl | grep "Time zone" + +If using FreeBSD, you can use this one-liner: + +:: + + cd /usr/share/zoneinfo/ && find * -type f -exec cmp -s {} /etc/localtime \; -print; + +Once you know what timezone your system is set to make sure you set the right time zone in ZM (Available in ``Options->System->TimeZone``) + Why is the image from my color camera appearing in black and white? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you recently upgraded to zoneminder 1.26, there is a per camera option that defaults to black and white and can be mis-set if your upgrade didn't happen right. See this thread: http://www.zoneminder.com/forums/viewtopic.php?f=30&t=21344 +If you recently upgraded to zoneminder 1.26, there is a per camera option that defaults to black and white and can be mis-set if your upgrade didn't happen right. See this thread: https://forums.zoneminder.com/viewtopic.php?f=30&t=21344 This may occur if you have a NTSC analog camera but have configured the source in ZoneMinder as PAL for the Device Format under the source tab. You may also be mislead because zmu can report the video port as being PAL when the camera is actually NTSC. Confirm the format of your analog camera by checking it's technical specifications, possibly found with the packaging it came in, on the manufacturers website, or even on the retail website where you purchased the camera. Change the Device Format setting to NTSC and set it to the lowest resolution of 320 x 240. If you have confirmed that the camera itself is NTSC format, but don't get a picture using the NTSC setting, consider increasing the shared memory '''kernel.shmall''' and '''kernel.shmmax''' settings in /etc/sysctl.conf to a larger value such as 268435456. This is also the reason you should start with the 320x240 resolution, so as to minimize the potential of memory problems which would interfere with your attempts to troubleshoot the device format issue. Once you have obtained a picture in the monitor using the NTSC format, then you can experiment with raising the resolution. @@ -653,39 +462,17 @@ If this camera is attached to a capture card, then you may have selected the wro Why do I only see black screens with a timestamp when monitoring my camera? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by '''zmu -d -q -v'''. 32768 may be appropriate values to try for these settings. After saving the settings, select Settings again to confirm they saved successfully. +In the monitor windows where you see the black screen with a timestamp, select settings and enter the Brightness, Contrast, Hue, and Color settings reported for the device by ``zmu -d -q -v``. 32768 may be appropriate values to try for these settings. After saving the settings, select Settings again to confirm they saved successfully. -I am getting messages about a backtrace in my logs, what do I do? -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -If you are seeing entries in your log like the following - -:: - - Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6 [0x3347230210]] - Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(memset+0xce) [0x334727684e]] - Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x40ee9a]] - Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x419946]] - Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma [0x4213cf]] - Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0x35c) [0x404674]] - Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /lib64/libc.so.6(__libc_start_main+0xf4) [0x334721da44]] - Jan 11 20:25:22 localhost zma_m2[19051]: ERR [Backtrace: /usr/local/bin/zma(cos+0xd1) [0x4043e9]] - Jan 11 20:25:22 localhost zma_m2[19051]: INF [Backtrace complete] - -then you can help diagnose the problem by running a special command to translate the hex addresses into helpful information. This command is called addr2line and you can type 'man addr2line' for more information. -Basically addr2line takes two sets of parameters, the first is the name of the binary file, and the second is a list of addresses. Both of these pieces of information are displayed in the logs. The filename is the first part after the 'Backtrace:' tag, in this case /usr/local/bin/zma, though it may well be different in your case. Some of the lines refer to libraries rather than the zma executable but those can be ignored for now, the important part is noting which ZM binary is involved. The binary file is passed in following the -e flag. The addresses to pass to addr2line are those contained in the '[]' pairs. Again you can ignore those that are on a line that refers to a library but it will not hurt if you include them. -So in the example above, the command would be ``addr2line -e /usr/local/bin/zma 0x40ee9a 0x419946 0x4213cf 0x404674 0x4043e9`` -This should then dump out a more symbolic list containing source file names and line numbers, and it is this information which will be helpful if posted to the forums. Sometimes addr2line fails to produce useful output. This is usually because either the problem is so severe that it has corrupted the stack and prevented useful information from being displayed, or that you have either compiled ZM without the -g flag for debug, or you have stripped the binaries of symbol information after installation. This this case you would need to rebuild temporarily with debug enabled for the information to be useful. - - -This error some times happens when a linked camera looses its link or it is corrupted by the user or some other system event, try deleting the affected cameras and recreating them in the Zoneminder console. How do I repair the MySQL Database? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ There is two ways to go about this. In most cases you can run from the command prompt -> -* mysqlcheck --all-databases --auto-repair -p'''your_database_password''' -u '''your_databse_user''' +``mysqlcheck --all-databases --auto-repair -p your_database_password -u your_databse_user`` -If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different). -> -* myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI +If that does not work then you will have to make sure that ZoneMinder is stopped then run the following (nothing should be using the database while running this and you will have to adjust for your correct path if it is different): + +``myisamchk --silent --force --fast --update-state -O key_buffer=64M -O sort_buffer=64M -O read_buffer=1M -O write_buffer=1M /var/lib/mysql/*/*.MYI`` How do I repair the MySQL Database when the cli fails? @@ -693,12 +480,12 @@ How do I repair the MySQL Database when the cli fails? In Ubuntu, the commands listed above do not seem to work. However, actually doing it by hand from within MySQL does. (But that is beyond the scope of this document) But that got me thinking... And phpmyadmin does work. Bring up a terminal. ``sudo apt-get install phpmyadmin`` -Now go to http://zoneminder_IP/ and stop the ZM service. Continue to http://zoneminder_IP/phpmyadmin and select the zoneminder database. Select and tables marked 'in use' and pick the action 'repare' to fix. Restart the zoneminder service from the web browser. Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker. +Now go to ``http://zoneminder_IP/`` and stop the ZM service. Continue to ``http://zoneminder_IP/phpmyadmin`` and select the zoneminder database. Select and tables marked 'in use' and pick the action 'repare' to fix. Restart the zoneminder service from the web browser. Remove or disable the phpmyadmin tool, as it is not always the most secure thing around, and opens your database wide to any skilled hacker. ``sudo apt-get remove phpmyadmin`` I upgraded by distribution and ZM stopped working ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Some possibilties (Incomplete list and subject to correction) +Some possibilities (Incomplete list and subject to correction) ``[[/usr/local/bin/zmfix: /usr/lib/libmysqlclient.so.15: version `MYSQL_5.0' not found (required by /usr/local/bin/zmfix)]]`` :: Solution: Recompile and reinstall Zoneminder. Any time you update a major version that ZoneMinder depends on, you need to recompile ZoneMinder. @@ -723,6 +510,8 @@ What causes "Invalid JPEG file structure: two SOI markers" from zmc (1.24.x) Some settings that used to be global only are now per camera. On the Monitor Source tab, if you are using Remote Protocol "HTTP" and Remote Method "Simple", try changing Remote Method to "Regexp". + + Miscellaneous ------------------- I see ZoneMinder is licensed under the GPL. What does that allow or restrict me in doing with ZoneMinder? @@ -736,10 +525,13 @@ The ZoneMinder license is described at the end of the documentation and consists 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. -This means that ZoneMinder is licensed under the terms described `here `__. There is a comprehensive FAQ covering the GPL at http://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue. +This means that ZoneMinder is licensed under the terms described `here `__. There is a comprehensive FAQ covering the GPL at https://www.gnu.org/licenses/gpl-faq.html but in essence you are allowed to redistribute or modify GPL licensed software provided that you release your distribution or modifications freely under the same terms. You are allowed to sell systems based on GPL software. You are not allowed to restrict or reduce the rights of GPL software in your distribution however. Of course if you are just making modifications for your system locally you are not releasing changes so you have no obligations in this case. I recommend reading the GPL FAQ for more in-depth coverage of this issue. Can I use ZoneMinder as part of my commercial product? ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms. The GPL does not permit you to include ZoneMinder in proprietary systems (see http://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circumstances. +The GPL license allows you produce systems based on GPL software provided your systems also adhere to that license and any modifications you make are also released under the same terms. The GPL does not permit you to include ZoneMinder in proprietary systems (see https://www.gnu.org/licenses/gpl-faq.html#GPLInProprietarySystem for details). If you wish to include ZoneMinder in this kind of system then you will need to license ZoneMinder under different terms. This is sometimes possible and you will need to contact me for further details in these circumstances. +I am having issues with zmNinja and/or Event Notification Server +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +zmNinja and the Event Notification Server are 3rd party solutions. The developer maintains exhaustive `documentation and FAQs `__. Please direct your questions there. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 46da979cf..740e9ec26 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,7 +10,9 @@ ZoneMinder Documentation faq contributing -Welcome to ZoneMinder's documentation, the following resources are available +Welcome to ZoneMinder's documentation. Please navigate to one of the links below. + +If you are facing issues that are not covered in the documentation, please feel free to check the `ZoneMinder Forums `__ or join the `ZoneMinder-Chat Slack channel `__ if you prefer real time interaction. :doc:`installationguide/index` Many distribution repos only hold older versions of ZoneMinder, current versions contain many bug fixes and updated functionality. Instructions here for installing updated packages or compiling from source. @@ -27,6 +29,9 @@ Welcome to ZoneMinder's documentation, the following resources are available :doc:`contributing` How to contribute to ZoneMinder. As a community project we always need help, you don't need to be a coder to test or update documentation. +`Event Notification Server and Machine Learning hooks `__ + Documentation for the 3rd party Event Notification Server and Machine Learning for Object/People/Face detection. + Indices and tables diff --git a/docs/installationguide/debian.rst b/docs/installationguide/debian.rst index 9294ebeb6..74a9ca81d 100644 --- a/docs/installationguide/debian.rst +++ b/docs/installationguide/debian.rst @@ -1,37 +1,316 @@ Debian ====== -A fresh build based on master branch running Debian 7 (wheezy)\: +.. contents:: + +Easy Way: Debian Stretch +------------------------ + +This procedure will guide you through the installation of ZoneMinder on Debian 9 (Stretch). This section has been tested with ZoneMinder 1.32.3 on Debian 9.8. + +**Step 1:** Make sure your system is up to date + +Open a console and use ``su`` command to become Root. + :: - root@host:~# aptitude install -y 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 libpcre3 libwww-perl libdbd-mysql-perl libsys-mmap-perl yasm automake autoconf libjpeg8-dev libjpeg8 apache2-mpm-prefork libapache2-mod-php5 php5-cli libphp-serialization-perl libgnutls-dev libjpeg8-dev libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libv4l-dev libtool ffmpeg libnetpbm10-dev libavdevice-dev libmime-lite-perl dh-autoreconf dpatch; + apt update + apt upgrade - root@host:~# git clone https://github.com/ZoneMinder/ZoneMinder.git zoneminder; - root@host:~# cd zoneminder; - root@host:~# ln -s distros/debian; - root@host:~# dpkg-checkbuilddeps; - root@host:~# dpkg-buildpackage; -One level above you'll now find a deb package matching the architecture of the build host: +**Step 2:** Setup Sudo (optional but recommended) + +By default Debian does not come with sudo, so you have to install it and configure it manually. This step is optional but recommended and the following instructions assume that you have setup sudo. If you prefer to setup ZoneMinder as root, do it at your own risk and adapt the following instructions accordingly. + :: - root@host:~# ls -1 ~/zoneminder*; - /root/zoneminder_1.26.4-1_amd64.changes - /root/zoneminder_1.26.4-1_amd64.deb - /root/zoneminder_1.26.4-1.dsc - /root/zoneminder_1.26.4-1.tar.gz + apt install sudo + usermod -a -G sudo + exit -The dpkg command itself does not resolve dependencies. That's what high-level interfaces like aptitude and apt-get are normally for. Unfortunately, unlike RPM, there's no easy way to install a separate deb package not contained with any repository. +Now your terminal session is back under your normal user. You can check that you are now part of the sudo group with the command ``groups``, "sudo" should appear in the list. If not, run ``newgrp sudo`` and check again with ``groups``. + + +**Step 3:** Install Apache and MySQL + +These are not dependencies for the ZoneMinder package as they could be installed elsewhere. If they are not installed yet in your system, you have to trigger their installation manually. -To overcome this "limitation" we'll use dpkg only to install the zoneminder package and apt-get to fetch all needed dependencies afterwards. Running dpkg-reconfigure in the end will ensure that the setup scripts e.g. for database provisioning were executed. :: - root@host:~# dpkg -i /root/zoneminder_1.26.4-1_amd64.deb; apt-get install -f; - root@host:~# dpkg-reconfigure zoneminder; + sudo apt install apache2 mysql-server + +**Step 4:** Add ZoneMinder's Package repository to your apt sources + +ZoneMinder's Debian packages are not included in Debian's official package repositories. To be able to install ZoneMinder with APT, you have to edit the list of apt sources and add ZoneMinder's repository. -Alternatively you may also use gdebi to automatically resolve dependencies during installation: :: - root@host:~# aptitude install -y gdebi; - root@host:~# gdebi /root/zoneminder_1.26.4-1_amd64.deb; + sudo nano /etc/apt/sources.list +Add the following to the bottom of the file + +:: + + # ZoneMinder repository + deb https://zmrepo.zoneminder.com/debian/release stretch/ + +CTRL+o and to save +CTRL+x to exit + +Because ZoneMinder's package repository provides a secure connection through HTTPS, apt must be enabled for HTTPS. +:: + + sudo apt install apt-transport-https + +Finally, download the GPG key for ZoneMinder's repository: +:: + + wget -O - https://zmrepo.zoneminder.com/debian/archive-keyring.gpg | sudo apt-key add - + + +**Step 5:** Install ZoneMinder + +:: + + sudo apt update + sudo apt install zoneminder + +**Step 6:** Read the Readme + +The rest of the install process is covered in the README.Debian, so feel free to have +a read. + +:: + + zcat /usr/share/doc/zoneminder/README.Debian.gz + + +**Step 7:** Enable ZoneMinder service + +:: + + sudo systemctl enable zoneminder.service + +**Step 8:** Configure Apache + +The following commands will setup the default /zm virtual directory and configure +required apache modules. + +:: + + sudo a2enconf zoneminder + sudo a2enmod rewrite + sudo a2enmod cgi # this is done automatically when installing the package. Redo this command manually only for troubleshooting. + + +**Step 9:** Edit Timezone in PHP + +Automated way: +:: + + sudo sed -i "s/;date.timezone =/date.timezone = $(sed 's/\//\\\//' /etc/timezone)/g" /etc/php/7.0/apache2/php.ini + +Manual way +:: + + sudo nano /etc/php/7.0/apache2/php.ini + +Search for [Date] (Ctrl + w then type Date and press Enter) and change +date.timezone for your time zone. Don't forget to remove the ; from in front +of date.timezone. + +:: + + [Date] + ; Defines the default timezone used by the date functions + ; http://php.net/date.timezone + date.timezone = America/New_York + +CTRL+o then [Enter] to save + +CTRL+x to exit + + +**Step 10:** Start ZoneMinder + +Reload Apache to enable your changes and then start ZoneMinder. + +:: + + sudo systemctl reload apache2 + sudo systemctl start zoneminder + +You are now ready to go with ZoneMinder. Open a browser and type either ``localhost/zm`` one the local machine or ``{IP-OF-ZM-SERVER}/zm`` if you connect from a remote computer. + + +Easy Way: Debian Jessie +----------------------- + +**Step 1:** Setup Sudo + +By default Debian does not come with sudo. Log in as root or use su command. +N.B. The instructions below are for setting up sudo for your current account, you can +do this as root if you prefer. + +:: + + apt-get update + apt-get install sudo + usermod -a -G sudo + exit + +Logout or try ``newgrp`` to reload user groups + +**Step 2:** Run sudo and update + +Now run session using sudo and ensure system is updated. +:: + + sudo -i + apt-get upgrade + +**Step 3:** Install Apache and MySQL + +These are not dependencies for the package as they could +be installed elsewhere. + +:: + + apt-get install apache2 mysql-server + +**Step 4:** Edit sources.list to add jessie-backports + +:: + + nano /etc/apt/sources.list + +Add the following to the bottom of the file + +:: + + # Backports repository + deb http://archive.debian.org/debian/ jessie-backports main contrib non-free + +CTRL+o and to save +CTRL+x to exit + +Run the following + +:: + + echo 'Acquire::Check-Valid-Until no;' > /etc/apt/apt.conf.d/99no-check-valid-until + +**Step 5:** Install ZoneMinder + +:: + + apt-get update + apt-get install zoneminder + +**Step 6:** Read the Readme + +The rest of the install process is covered in the README.Debian, so feel free to have +a read. + +:: + + zcat /usr/share/doc/zoneminder/README.Debian.gz + +**Step 7:** Setup Database + +Install the zm database and setup the user account. Refer to Hints in Ubuntu install +should you choose to change default database user and password. + +:: + + 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,index on zm.* to 'zmuser'@localhost identified by "zmpass";' | sudo mysql --defaults-file=/etc/mysql/debian.cnf mysql + +**Step 8:** zm.conf Permissions + +Adjust permissions to the zm.conf file to allow web account to access it. + +:: + + chgrp -c www-data /etc/zm/zm.conf + +**Step 9:** Setup ZoneMinder service + + :: + + systemctl enable zoneminder.service + +**Step 10:** Configure Apache + +The following commands will setup the default /zm virtual directory and configure +required apache modules. + +:: + + a2enconf zoneminder + a2enmod cgi + a2enmod rewrite + +**Step 11:** Edit Timezone in PHP + +:: + + nano /etc/php5/apache2/php.ini + +Search for [Date] (Ctrl + w then type Date and press Enter) and change +date.timezone for your time zone. **Don't forget to remove the ; from in front +of date.timezone** + +:: + + [Date] + ; Defines the default timezone used by the date functions + ; http://php.net/date.timezone + date.timezone = America/New_York + +CTRL+o then [Enter] to save + +CTRL+x to exit + + +**Step 12:** Please check the configuration + +Zoneminder 1.32.x + 1. Check path of ZM_PATH in '/etc/zm/conf.d/zmcustom.conf' is ZM_PATH_ZMS=/zm/cgi-bin/nph-zms + :: + cat /etc/zm/conf.d/zmcustom.conf + + 2. Check config of /etc/apache2/conf-enabled/zoneminder.conf has the same ScriptAlias /zm/cgi-bin that is configured + in ZM_PATH. The part /nph-zms has to be left out of the ScriptAlias + + ScriptAlias /zm/cgi-bin "/usr/lib/zoneminder/cgi-bin" + + + :: + cat /etc/apache2/conf-enabled/zoneminder.conf + +**Step 13:** Start ZoneMinder + +Reload Apache to enable your changes and then start ZoneMinder. + +:: + + systemctl reload apache2 + systemctl start zoneminder + +**Step 14:** Making sure ZoneMinder works + +1. Open up a browser and go to ``http://hostname_or_ip/zm`` - should bring up ZoneMinder Console + +2. (Optional API Check)Open up a tab in the same browser and go to ``http://hostname_or_ip/zm/api/host/getVersion.json`` + + If it is working correctly you should get version information similar to the example below: + + :: + + { + "version": "1.29.0", + "apiversion": "1.29.0.1" + } + +**Congratulations** Your installation is complete diff --git a/docs/installationguide/dedicateddrive.rst b/docs/installationguide/dedicateddrive.rst new file mode 100644 index 000000000..6a7367b8b --- /dev/null +++ b/docs/installationguide/dedicateddrive.rst @@ -0,0 +1,38 @@ +Dedicated Drive, Partition, or Network Share +============================================ + +One of the first steps the end user must perform after installing ZoneMinder is to dedicate an entire partition, drive, or network share for ZoneMinder's event storage. +The reason being, ZoneMinder will, by design, fill up your hard disk, and you don't want to do that to your root volume! + +The following steps apply to ZoneMinder 1.31 or newer, running on a typical Linux system, which uses systemd. +If you are using an older version of ZoneMinder, please follow the legacy steps in the `ZoneMinder Wiki `_. + +**Step 1:** Stop ZoneMinder +:: + + sudo systemctl stop zoneminder + +**Step 2:** Mount your dedicated drive, partition, or network share to the local filesystem in any folder of your choosing. +We recommend you use systemd to manage the mount points. +Instructions on how to accomplish this can be found `here `__ and `here `__. +Note that bind mounting ZoneMinder's images folder is optional. Newer version of ZoneMinder write very little, if anything, to the images folder. +Verify the dedicated drive, partition, or network share is successfully mounted before proceeding to the next step. + +**Step 3:** Set the owner and group to that of the web server user account. Debian based distros typically use "www-data" as the web server user account while many rpm based distros use "apache". +:: + + sudo chown -R apache:apache /path/to/your/zoneminder/events/folder + sudo chown -R apache:apache /path/to/your/zoneminder/images/folder + +Recall from the previous step, the images folder is optional. + +**Step 4:** Create a config file under /etc/zm/conf.d using your favorite text editor. Name the file anything you want just as long as it ends in ".conf". +Add the following content to the file and save your changes: +:: + + ZM_DIR_EVENTS=/full/path/to/the/events/folder + +**Step 5:** Start ZoneMinder and inspect the ZoneMinder log files for errors. +:: + + sudo systemctl start zoneminder diff --git a/docs/installationguide/easydocker.rst b/docs/installationguide/easydocker.rst new file mode 100644 index 000000000..899ce0e5d --- /dev/null +++ b/docs/installationguide/easydocker.rst @@ -0,0 +1,11 @@ +An Easy To Use Docker Image +=========================== +If you are interested in trying out ZoneMinder quickly, user Dan Landon maintains an easy to use docker image for ZoneMinder. With a few simple configuration changes, it also provides complete Event Notification Server and Machine Learning hook support. Please follow instructions in his repostory. He maintains two repositories: + +* If you want to run the latest stable release, please use his `zoneminder repository `__. +* If you want to run the latest zoneminder master, please use his `zoneminder master repository `__. + +In both cases, instructions are provided in the repo README files. + +If you are looking at building your own native (non docker) binary packages of ZoneMinder for your distro, please refer to the distro specific install guides or :doc:`packpack`. + diff --git a/docs/installationguide/images/zm_first_screen_post_install.png b/docs/installationguide/images/zm_first_screen_post_install.png index 568d7fcf5..59e2af6d3 100644 Binary files a/docs/installationguide/images/zm_first_screen_post_install.png and b/docs/installationguide/images/zm_first_screen_post_install.png differ diff --git a/docs/installationguide/index.rst b/docs/installationguide/index.rst index e030ed7cf..602632c94 100644 --- a/docs/installationguide/index.rst +++ b/docs/installationguide/index.rst @@ -1,12 +1,18 @@ Installation Guide ====================================== +.. todo:: This entire guide needs to be checked/updated as needed + Contents: .. toctree:: :maxdepth: 2 + easydocker + packpack ubuntu debian redhat + windows_wsl multiserver + dedicateddrive diff --git a/docs/installationguide/multiserver.rst b/docs/installationguide/multiserver.rst index e9ebefac2..14e52d29f 100644 --- a/docs/installationguide/multiserver.rst +++ b/docs/installationguide/multiserver.rst @@ -42,8 +42,6 @@ Note that these commands are just an example and might not be secure enough for 7. If you have chosen to change the ZoneMinder database account credentials to something other than zmuser/zmpass, you must now update zm.conf on each ZoneMinder Server. Change ZM_DB_USER and ZM_DB_PASS to the values you created in the previous step. -Additionally, you must also edit /usr/share/zoneminder/www/api/app/Config/database.php in a similar manner on each ZoneMinder Server. Scroll down and change login and password to the values you created in the previous step. - 8. All ZoneMinders Servers must share a common events folder. This can be done in any manner supported by the underlying operating system. From the Storage Server, share/export a folder to be used for ZoneMinder events. 9. From each ZoneMinder Server, mount the shared events folder on the Storage Server to the events folder on the local ZoneMinder Server. diff --git a/docs/installationguide/packpack.rst b/docs/installationguide/packpack.rst new file mode 100644 index 000000000..72fdf8661 --- /dev/null +++ b/docs/installationguide/packpack.rst @@ -0,0 +1,129 @@ +All Distros - A Docker Way to Build ZoneMinder +=============================================== + +.. note:: If you are looking for an easy way to run ZoneMinder and not interested in building your own docker image, please refer to :doc:`easydocker`. + +.. contents:: + +These instructions represent an alternative way to build ZoneMinder for any supported distro. + +Advantages: + +- Fewer steps and therefore much simpler +- Target distro agnostic - the steps are the same regardless of the target distro +- Host distro agnostic - the steps described here should work on any host Linux distro capable of running Bash and Docker + +Background +------------------------------------ + +These instructions leverage the power of the automated build system recently implemented in the ZoneMinder project. Behind the scenes, a project called `packpack `_ is utilized, to build ZoneMinder inside a Docker container. + +Procedure +------------------------------------ + +**Step 1:** Verify the target distro. + +- Open the project's `.travis.yml file `_ and verify the distro you want to build ZoneMinder for appears in the build matrix. The distros shown in the matrix are those known to build on ZoneMinder. If the distro you desire is in the list then continue to step two. + +- If the desired distro is not in the first list, then open the `packpack project README `_ and check if the desired distro is theoretically supported. If it is, then continue to step 2 with the understanding that you are heading out into uncharted territory. There could be problems. + +- If the desired distro does not appear in either list, then unfortuantely you cannot use the procedure described here. + +- If the desired distro architecture is arm, refer to `Appendix A - Enable Qemu On the Host`_ to enable qemu emulation on your amd64 host machine. + +**Step 2:** Install Docker. + +You need to have a working installation of Docker so head over to the `Docker site `_ and get it working. Before continuing to the next step, verify you can run the Docker "Hello World" container as a normal user. To run a Docker container as a normal user, issue the following: + +:: + + sudo gpasswd -a docker + newgrp docker + +Where is, you guessed it, the user name you log in with. + +**Step 3:** Git clone the ZoneMinder project. + +Clone the ZoneMinder project if you have not done so already. + +:: + + git clone https://github.com/ZoneMinder/ZoneMinder + cd ZoneMinder + +Alternatively, if you have already cloned the repo and wish to update it, do the following. + +:: + + cd ZoneMinder + git checkout master + git pull origin master + +**Step 4:** Checkout the revision of ZoneMinder you wish to build. + +A freshly cloned ZoneMinder git repo already points to the most recent commit in the master branch. If you want the latest development code then continue to the next step. If instead, you want to build a stable release then perform the following step. + +:: + + git checkout + +Where is one of the official ZoneMinder releases shown on the `releases page `_, such as 1.30.4. + +**Step 5:** Build ZoneMinder + +To start the build, simply execute the following command from the root folder of the local git repo: + +:: + + OS= DIST= utils/packpack/startpackpack.sh + +Where is the name of the distro you wish to build on, such as fedora, and is release name or number of the distro you wish to build on. Redhat distros expect a number for while Debian and Ubuntu distros expect a name. For example: + +:: + + OS=fedora DIST=25 utils/packpack/startpackpack.sh + +:: + + OS=ubuntu DIST=xenial utils/packpack/startpackpack.sh + +Once you enter the appropriate command, go get a coffee while a ZoneMinder package is built. When the build finished, you can find the resulting packages under a subfolder called "build". + +Note that this will build packages with x86_64 architecture. This build method can also build on some distros (debian & ubuntu only at the moment) using i386 architecture. You can do that by adding "ARCH=i386" parameter. + +:: + + OS=ubuntu DIST=xenial ARCH=i386 utils/packpack/startpackpack.sh + +For advanced users who really want to go out into uncharted waters, it is theoretically possible to build arm packages as well, as long as the host architecture is compatible. + +:: + + OS=ubuntu DIST=xenial ARCH=armhfp utils/packpack/startpackpack.sh + +Building arm packages in this manner has not been tested by us, however. + +Appendix A - Enable Qemu On the Host +------------------------------------ + +If you intend to build ZoneMinder packages for arm on an amd64 host, then Debian users can following these steps to enable transparent Qemu emulation: + +:: + + sudo apt-get install binfmt-support qemu qemu-user-static + +Verify arm emulation is enabled by issuing: + +:: + + sudo update-binfmts --enable qemu-arm + +You may get a message stating emulation for this processor is already enabled. + +More testing needs to be done for Redhat distros but it appears Fedora users can just run: + +:: + + sudo systemctl start systemd-binfmt + +.. todo:: Verify the details behind enabling qemu emulation on redhat distros. Pull requests are welcome. diff --git a/docs/installationguide/redhat.rst b/docs/installationguide/redhat.rst index e15d58aa7..d35f1fbd3 100644 --- a/docs/installationguide/redhat.rst +++ b/docs/installationguide/redhat.rst @@ -10,7 +10,7 @@ Background: RHEL, CentOS, and Clones These distributions are classified as enterprise operating systems and have a long operating lifetime of many years. By design, they will not have the latest and greatest versions of any package. Instead, stable packages are the emphasis. -Replacing any core package in these distributions with a newer package from a third party is expressly verboten. The ZoneMinder development team will not do this, and neither should you. If you have the perception that you've got to have a newer version of mysql, gnome, apache, etc. then, rather than upgrade these packages, you should instead consider using a different distribution such as Fedora. +Replacing any core package in these distributions with a newer package from a third party is expressly verboten. The ZoneMinder development team will not do this, and neither should you. If you have the perception that you've got to have a newer version of php, mysql, gnome, apache, etc. then, rather than upgrade these packages, you should instead consider using a different distribution such as Fedora. The ZoneMinder team will not provide support for systems which have had any core package replaced with a package from a third party. @@ -23,39 +23,68 @@ Fedora has a short life-cycle of just 6 months. However, Fedora, and consequentl If you desire newer packages than what is available in RHEL or CentOS, you should consider using Fedora. -Zmrepo – A ZoneMinder RPM Repository ------------------------------------- +How To Avoid Known Installation Problems +---------------------------------------- -Zmrepo is a turn key solution. It will install all of ZoneMinder's dependencies for you. This is the easiest and the recommended way to install ZoneMinder on any system running a Redhat based distribution. +The following notes are based on real problems which have occurred by those who came before you: -Zmrepo supports the two most recent, major releases of each Redhat based distro. - -The following notes are based on real problems which have occurred: - -- Zmrepo assumes you have installed the underlying distrubution **using the official installation media for that distro**. Third party "Spins" are not supported and may not work correctly. +- Zmrepo assumes you have installed the underlying distribution **using the official installation media for that distro**. Third party "Spins" may not work correctly. - ZoneMinder is intended to be installed in an environment dedicated to ZoneMinder. While ZoneMinder will play well with many applications, some invariably will not. Asterisk is one such example. -- Be advised that you need to start with a clean system before using zmrepo. +- Be advised that you need to start with a clean system before installing ZoneMinder. -- If you have previously installed ZoneMinder from-source, then your system is **NOT** clean. You must manually search for and delete all ZoneMinder related files before using zmrepo (look under /usr/local). Make uninstall helps, but it will not do this for you correctly. You **WILL** have problems if you ignore this step. +- If you have previously installed ZoneMinder from-source, then your system is **NOT** clean. You must manually search for and delete all ZoneMinder related files first (look under /usr/local). Issuing a "make uninstall" helps, but it will not do this for you correctly. You **WILL** have problems if you ignore this step. -- It is not necessary, and not recommended, to install a LAMP stack ahead of time. +- Unlike Debian/Ubuntu distros, it is not necessary, and not recommended, to install a LAMP stack ahead of time. -- Disable other third party repos and uninstall any of ZoneMinder's third party dependencies, which might already be on the system, especially ffmpeg and vlc. Attempting to install dependencies yourself often causes problems. +- Disable any other third party repos and uninstall any of ZoneMinder's third party dependencies, which might already be on the system, especially ffmpeg and vlc. Attempting to install dependencies yourself often causes problems. -- Each ZoneMinder rpm includes a README file under /usr/share/doc. You must follow the all steps in this README file, precisely, each and every time ZoneMinder is installed or upgraded. **Failure to do so is guaranteed to result in a non-functional system.** +- Each ZoneMinder rpm includes a README file under /usr/share/doc. You must follow all the steps in this README file, precisely, each and every time ZoneMinder is installed or upgraded. **Failure to do so is guaranteed to result in a non-functional system.** -To begin the installation of ZoneMinder on your Redhat based distro, please navigate to: http://zmrepo.zoneminder.com +How to Install ZoneMinder +------------------------- -How to Build a (Custom) ZoneMinder Package +ZoneMinder releases are now being hosted at RPM Fusion. New users should navigate the `RPM Fusion site `__ then follow the instructions to enable that repo. RHEL/CentOS users must also navaigate to the `EPEL Site `_ and enable that repo as well. Once enabled, install ZoneMinder from the commandline: + +:: + + sudo dnf install zoneminder + +Note that RHEL/CentOS 7 users should use yum instead of dnf. + +Once ZoneMinder has been installed, it is critically important that you read the README file under /usr/share/doc/zoneminder. ZoneMinder will not run without completing the steps outlined in the README. + +How to Install Nightly Development Builds +----------------------------------------- + +ZoneMinder development packages, which represent the most recent build from our master branch, are available from `zmrepo `_. + +The feedback we get from those who use these development packages is extremely helpful. However, please understand these packages are intended for testing the latest master branch only. They are not intended to be used on any production system. There will be new bugs, and new features may not be documented. This is bleeding edge, and there might be breakage. Please keep that in mind when using this repo. We know from our user forum that this can't be stated enough. + +How to Change from Zmrepo to RPM Fusion +--------------------------------------- + +As mentioned above, the place to get the latest ZoneMinder release is now `RPM Fusion `__. If you are currently using ZoneMinder release packages from Zmrepo, then the following steps will change you over to RPM Fusion: + +- Navigate to the `RPM Fusion site `__ and enable RPM Fusion on your system +- Now issue the following from the command line: + +:: + + sudo dnf remove zmrepo + sudo dnf update + +Note that RHEL/CentOS 7 users should use yum instead of dnf. + +How to Build Your Own ZoneMinder Package ------------------------------------------ -If you are looking to do development or the packages in zmrepo just don't suit you, then you should follow these steps to learn how to build your own ZoneMinder RPM. +If you are looking to do development or the available packages just don't suit you, then you can follow these steps to build your own ZoneMinder RPM. Background ********** -The following method documents how to build ZoneMinder into an RPM package, compatible with Fedora, Redhat, CentOS, and other compatible clones. This is exactly how the RPMS in zmrepo are built. +The following method documents how to build ZoneMinder into an RPM package, for Fedora, Redhat, CentOS, and other compatible clones. This is exactly how the RPMS in zmrepo are built. The method documented below was chosen because: @@ -67,22 +96,20 @@ The method documented below was chosen because: - Troubleshooting becomes easier if we are all building ZoneMinder the same way. -The build instructions below make use of a custom script called "buildzm.sh". Advanced users are encouraged to view the contents of this script. Notice that the script doesn't really do a whole lot. The goal of the script is to simply make the process a little easier for the first time user. Once you become familar with the build process, you can issue the mock commands found in the buildzm.sh script yourself if you so desire. - ***IMPORTANT*** -Certain commands in these instructions require root privileges while other commands do not. Pay close attention to this. If the instructions below state to issue a command without a “sudo†prefix, then you should *not* be root while issuing the command. Getting this incorrect will result in a failed build. +Certain commands in these instructions require root privileges while other commands do not. Pay close attention to this. If the instructions below state to issue a command without a “sudo†prefix, then you should *not* be root while issuing the command. Getting this incorrect will result in a failed build, or worse a broken system. Set Up Your Environment *********************** -Before you begin, set up an rpmbuild environment by following `this guide `_ by the CentOS developers. +Before you begin, set up an rpmbuild environment by following `this guide `_ by the CentOS developers. -Next, navigate to `Zmrepo `_, and follow the instructions to enable zmrepo on your system. +In addition, make sure RPM Fusion is enabled as described in the previous section `How to Install ZoneMinder`_. -With zmrepo enabled, issue the following command: +With RPM Fusion enabled, issue the following command: :: - sudo yum install zmrepo-mock-configs mock + sudo yum install mock-rpmfusion-free mock Add your user account to the group mock: @@ -96,108 +123,130 @@ Your build environment is now set up. Build from SRPM *************** -To continue, you need a ZoneMinder SRPM. For starters, let's use one of the SRPMS from zmrepo. Go browse the `Zmrepo `_ site and choose an appropriate SRPM and place it into the ~/rpmbuild/SRPMS folder. +To continue, you need a ZoneMinder SRPM. If you wish to rebuild a ZoneMinder release, then browse the `RPM Fusion site `__. If instead you wish to rebuild the latest source rpm from our master branch then browse the `Zmrepo site `_. -For CentOS 7, I have chosen the following SRPM: +For this example, I'll use one of the source rpms from zmrepo: :: - wget -P ~/rpmbuild/SRPMS http://zmrepo.zoneminder.com/el/7/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm + wget -P ~/rpmbuild/SRPMS http://zmrepo.zoneminder.com/el/7/SRPMS/zoneminder-1.31.1-1.el7.centos.src.rpm Now comes the fun part. To build ZoneMinder, issue the following command: :: - buildzm.sh zmrepo-el7-x86_64 ~/rpmbuild/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm + mock -r epel-7-x86_64-rpmfusion_free ~/rpmbuild/SRPMS/zoneminder-1.31.1-1.el7.centos.src.rpm Want to build ZoneMinder for Fedora, instead of CentOS, from the same host? Once you download the Fedora SRPM, issue the following: :: - buildzm.sh zmrepo-f21-x86_64 ~/rpmbuild/SRPMS/zoneminder-1.28.1-1.fc21.src.rpm + mock -r fedora-26-x86_64-rpmfusion_free ~/rpmbuild/SRPMS/zoneminder-1.31.1-1.el7.centos.src.rpm -Notice that the buildzm.sh tool requires the following parameters: +Notice that the mock tool requires the following parameters: :: - buildzm.sh MOCKCONFIG ZONEMINDER_SRPM + mock -r MOCKCONFIG ZONEMINDER_SRPM The list of available Mock config files are available here: :: - ls /etc/mock/zmrepo*.cfg + ls /etc/mock/*rpmfusion_free.cfg -You choose the config file based on the desired distro (e.g. el6, el7, f20, f21) and basearch (e.g. x86, x86_64, arhmhfp). Notice that, when specifying the Mock config as a commandline parameter, you should leave off the ".cfg" filename extension. +You choose the config file based on the desired distro (e.g. el7, f29, f30) and basearch (e.g. x86, x86_64, arhmhfp). Notice that, when specifying the Mock config as a commandline parameter, you should leave off the ".cfg" filename extension. Installation ************ -Once the build completes, you will be presented with a folder containing the RPM's that were built. Copy the newly built ZoneMinder RPM to the desired system, enable zmrepo per the instruction on the `Zmrepo `_ -website, and then install the rpm by issuing the appropriate yum install command. Finish the installation by following the zoneminder setup instructions in the distro specific readme file, named README.{distroname}, which will be installed into the /usr/share/doc/zoneminder* folder. - -Finally, you may want to consider editing the zmrepo repo file under /etc/yum.repos.d and placing an “exclude=zoneminder*†line into the config file. This will prevent your system from overwriting your manually built RPM with the ZoneMinder RPM found in the repo. - -How to Modify the Source Prior to Build -*************************************** -Before attempting this part of the instructions, make sure and follow the previous instructions for building one of the unmodified SRPMS from zmrepo. Knowing this part works will assist in troubleshooting should something go wrong. - -These instructions may vary depending on what exactly you want to do. The following example assumes you want to build a development snapshot from the master branch. - -From the previous instructions, we downloaded a CentOS 7 ZoneMinder SRPM and placed it into ~/rpmbuild/SRPMS. For this example, install it onto your system: +Once the build completes, you will be presented with a message stating where the newly built rpms can be found. It will look similar to this: :: - rpm -ivh ~/rpmbuild/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm + INFO: Results and/or logs in: /var/lib/mock/fedora-26-x86_64/result +Copy the newly built ZoneMinder RPMs to the desired system, enable RPM Fusion as described in `How to Install ZoneMinder`_, and then install the rpm by issuing the appropriate yum/dnf install command. Finish the installation by following the zoneminder setup instructions in the distro specific readme file, named README.{distroname}, which will be installed into the /usr/share/doc/zoneminder* folder. -IMPORTANT: This operation must be done with your normal user account. Do *not* perform this command as root. +Finally, you may want to consider editing the rpmfusion repo file under /etc/yum.repos.d and placing an “exclude=zoneminder*†line into the config file. This will prevent your system from overwriting your manually built RPM with the ZoneMinder RPM found in the repo. -Make sure you have git installed: +How to Create Your Own Source RPM +********************************* +In the previous section we described how to rebuild an existing ZoneMinder SRPM. The instructions which follow show how to build the ZoneMinder git source tree into a source rpm, which can be used in the previous section to build an rpm. + +Make sure git and rpmdevtools are installed: :: - sudo yum install git + sudo yum install git rpmdevtools -Now clone the ZoneMinder git repository: +Now clone the ZoneMinder git repository from your home folder: :: cd - git clone https://github.com/ZoneMinder/ZoneMinder - cd ZoneMinder - git submodule init - git submodule update + git clone https://github.com/ZoneMinder/zoneminder + cd zoneminder -This will create a sub-folder called ZoneMinder, which will contain the latest development. +This will create a sub-folder called ZoneMinder, which will contain the latest development source code. -We want to turn this into a tarball, but first we need to figure out what to name it. Look here: +If you have previsouly cloned the ZoneMinder git repo and wish to update it to the most recent, then issue these commands instead: :: - ls ~/rpmbuild/SOURCES - -The tarball from the previsouly installed SRPM should be there. This is the name we will use. For this example, the name is ZoneMinder-1.28.1.tar.gz. From one folder above the local ZoneMinder git repository, execute the following: + cd ~/zoneminder + git pull origin master + +Get the crud submodule tarball: :: - mv ZoneMinder ZoneMinder-1.28.1 - tar -cvzf ~/rpmbuild/SOURCES/ZoneMinder-1.28.1.tar.gz ZoneMinder-1.28.1/* + spectool -f -g -R -s 1 ~/zoneminder/distros/redhat/zoneminder.spec -The trailing "/\*" leaves off the hidden dot "." file and folders from the git repo, which is what we want. -Note that we are overwriting the original tarball. If you wish to keep the original tarball then create a copy prior to creating the new tarball. - -Now build a new src.rpm: +At this point, you can make changes to the source code. Depending on what you want to do with those changes, you generally want to create a new branch first: :: - rpmbuild -bs --nodeps ~/rpmbuild/SPECS/zoneminder.el7.spec + cd ~/zoneminder + git checkout -b mynewbranch -This step will overwrite the SRPM you originally downloaded, so you may want to back it up prior to completing this step. Note that the name of the specfile will vary slightly depending on the target distro. +Again, depending on what you want to do with those changes, you may want to commit your changes: -You should now have a new SRPM under ~/rpmbuild/SRPMS. In our example, the SRPM is called zoneminder-1.28.1-2.el7.centos.src.rpm. Now follow the previous instructions that describe how to use the buildzm script, using ~/rpmbuild/SRPMS/zoneminder-1.28.1-2.el7.centos.src.rpm as the path to your SRPM. +:: + cd ~/zoneminder + git add . + git commit +Once you have made your changes, it is time to turn your work into a new tarball, but first we need to look in the rpm specfile: + +:: + + less ~/zoneminder/distros/redhat/zoneminder.spec + +Scroll down until you see the Version field. Note the value, which will be in the format x.xx.x. Now create the tarball with the following command: + +:: + + cd ~/zoneminder + git archive --prefix=zoneminder-1.33.4/ -o ~/rpmbuild/SOURCES/zoneminder-1.33.4.tar.gz HEAD + +Replace "1.33.4" with the Version shown in the rpm specfile. + +From the root of the local ZoneMinder git repo, execute the following: + +:: + + cd ~/zoneminder + rpmbuild -bs --nodeps distros/redhat/zoneminder.spec + +This step will create a source rpm and it will tell you where it was saved. For example: + +:: + + Wrote: /home/abauer/rpmbuild/SRPMS/zoneminder-1.33.4-1.fc26.src.rpm + +Now follow the previous instructions `Build from SRPM`_ which describe how to build that source rpm into an rpm. diff --git a/docs/installationguide/ubuntu.rst b/docs/installationguide/ubuntu.rst index 80cb27552..7b714e51a 100644 --- a/docs/installationguide/ubuntu.rst +++ b/docs/installationguide/ubuntu.rst @@ -1,289 +1,480 @@ -Ubuntu Instruction -=================== +Ubuntu +====== .. contents:: -Easy Way: Install ZoneMinder from a package (Ubuntu 15.x+) ------------------------------------------------------------ -These instructions are for a brand new ubuntu 15.04 system which does not have ZM installed. +Easy Way: Ubuntu 18.04 (Bionic) +------------------------------- +These instructions are for a brand new ubuntu 18.04 system which does not have ZM +installed. -**Step 1**: Make sure we add the correct packages + +It is recommended that you use an Ubuntu Server install and select the LAMP option +during install to install Apache, MySQL and PHP. If you failed to do this you can +achieve the same result by running: :: - sudo add-apt-repository ppa:iconnor/zoneminder - sudo apt-get update + sudo apt-get install tasksel + sudo tasksel install lamp-server -if you don't have mysql already installed: +During installation it will ask you to set up a master/root password for the MySQL. +Installing LAMP is not ZoneMinder specific so you will find plenty of resources to +guide you with a quick search. + +**Step 1:** Either run commands in this install using sudo or use the below to become root +:: + + sudo -i + +**Step 2:** Update Repos + +.. topic :: Latest Release + + ZoneMinder is now part of the current standard Ubuntu repository, but + sometimes the official repository can lag behind. To find out check our + `releases page `_ for + the latest release. + + Alternatively, the ZoneMinder project team maintains a `PPA `_, which is updated immediately + following a new release of ZoneMinder. To use this repository instead of the + official Ubuntu repository, enter the following from the command line: + + :: + + add-apt-repository ppa:iconnor/zoneminder-1.34 + +Update repo and upgrade. :: - sudo apt-get install mysql-server + apt-get update + apt-get upgrade + apt-get dist-upgrade -This will ask you to set up a master password for the DB (you are asked for the mysql root password when installing mysql server). -**Step 2**: Install ZoneMinder +**Step 3:** Configure MySQL + +.. sidebar :: Note + + The MySQL default configuration file (/etc/mysql/mysql.cnf)is read through + several symbolic links beginning with /etc/mysql/my.cnf as follows: + + | /etc/mysql/my.cnf -> /etc/alternatives/my.cnf + | /etc/alternatives/my.cnf -> /etc/mysql/mysql.cnf + | /etc/mysql/mysql.cnf is a basic file + +Certain new defaults in MySQL 5.7 cause some issues with ZoneMinder < 1.32.0, +the workaround is to modify the sql_mode setting of MySQL. Please note that these +changes are NOT required for ZoneMinder 1.32.0 and some people have reported them +causing problems in 1.32.0. + +To better manage the MySQL server it is recommended to copy the sample config file and +replace the default my.cnf symbolic link. :: - sudo apt-get install zoneminder + rm /etc/mysql/my.cnf (this removes the current symbolic link) + cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf -**Step 3**: Configure the Database +To change MySQL settings: :: - sudo mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql - mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';" + nano /etc/mysql/my.cnf -You don't really need this, but no harm (needed if you are upgrading) +In the [mysqld] section add the following :: - sudo /usr/bin/zmupdate.pl + sql_mode = NO_ENGINE_SUBSTITUTION -**Step 4**: Configure systemd to recognize ZoneMinder and configure Apache correctly: +CTRL+o then [Enter] to save + +CTRL+x to exit + +Restart MySQL :: - sudo systemctl enable zoneminder - sudo a2enconf zoneminder - sudo a2enmod cgi - sudo chown -R www-data:www-data /usr/share/zoneminder/ + systemctl restart mysql -We need this for API routing to work: +**Step 4:** Install ZoneMinder :: - sudo a2enmod rewrite + apt-get install zoneminder -This is probably a bug with iconnor's PPA as of Oct 3, 2015 with package 1.28.107. After installing, ``zm.conf`` does not have the right read permissions, so we need to fix that. This may go away in future PPA releases: +**Step 5:** Configure the ZoneMinder Database + +This step should not be required on ZoneMinder 1.32.0. :: - sudo chown www-data:www-data /etc/zm/zm.conf + mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql + mysql -uroot -p -e "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';" -We also need to install php5-gd (as of 1.28.107, this is not installed) + +**Step 6:** Set permissions + +Set /etc/zm/zm.conf to root:www-data 740 and www-data access to content :: - sudo apt-get install php5-gd + chmod 740 /etc/zm/zm.conf + chown root:www-data /etc/zm/zm.conf + chown -R www-data:www-data /usr/share/zoneminder/ -**Step 5**: Edit Timezone in PHP +**Step 7:** Configure Apache correctly: :: - vi /etc/php5/apache2/php.ini + a2enmod cgi + a2enmod rewrite + a2enconf zoneminder -Look for [Date] and inside it you will see a date.timezone -that is commented. remove the comment and specific your timezone. -Please make sure the timezone is valid (see this: http://php.net/manual/en/timezones.php) - -In my case: +You may also want to enable to following modules to improve caching performance :: - date.timezone = America/New_York + a2enmod expires + a2enmod headers -**Step 6**: Restart services +**Step 8:** Enable and start Zoneminder :: - sudo service apache2 reload - sudo systemctl restart zoneminder + systemctl enable zoneminder + systemctl start zoneminder - -**Step 7: make sure live streaming works**: Make sure you can view Monitor streams: - -startup ZM console in your browser, go to ``Options->Path`` and make sure ``PATH_ZMS`` is set to ``/zm/cgi-bin/nph-zms`` and restart ZM (you should not need to do this for packages, as this should automatically work) - - -**Step 8**: If you have changed your DB login/password from zmuser/zmpass, the API won't know about it - -If you changed the DB password **after** installing ZM, the APIs will not be able to connect to the DB. - -If you have, go to ``zoneminder/www/api/app/Config`` & Edit ``database.php`` - -There is a class there called ``DATABASE_CONFIG`` - change the ``$default`` array to reflect your new details. Example: +**Step 9:** Edit Timezone in PHP :: - public $default = array( - 'datasource' => 'Database/Mysql', - 'persistent' => false, - 'host' => 'localhost', - 'login' => 'mynewDBusername', - 'password' => 'mynewDBpassword' - 'database' => 'zm', - 'prefix' => '', - //'encoding' => 'utf8', - ); + nano /etc/php/7.2/apache2/php.ini - -You are done. Lets proceed to make sure everything works: - -Making sure ZM and APIs work: - -1. open up a browser and go to ``http://localhost/zm`` - should bring up ZM -2. (OPTIONAL - just for peace of mind) open up a tab and go to ``http://localhost/zm/api`` - should bring up a screen showing CakePHP version with some green color boxes. Green is good. If you see red, or you don't see green, there may be a problem (should not happen). Ignore any warnings in yellow saying "DebugKit" not installed. You don't need it -3. open up a tab in the same browser and go to ``http://localhost/zm/api/host/getVersion.json`` - -If it responds with something like: +Search for [Date] (Ctrl + w then type Date and press Enter) and change +date.timezone for your time zone, see [this](https://www.php.net/manual/en/timezones.php). +**Don't forget to remove the ; from in front of date.timezone** :: - { - "version": "1.28.107", - "apiversion": "1.28.107.1" - } + [Date] + ; Defines the default timezone used by the date functions + ; http://php.net/date.timezone + date.timezone = America/New_York + +CTRL+o then [Enter] to save + +CTRL+x to exit + +**Step 10:** Reload Apache service + +:: + + systemctl reload apache2 + +**Step 11:** Making sure ZoneMinder works + +1. Open up a browser and go to ``http://hostname_or_ip/zm`` - should bring up ZoneMinder Console + +2. (Optional API Check)Open up a tab in the same browser and go to ``http://hostname_or_ip/zm/api/host/getVersion.json`` + + If it is working correctly you should get version information similar to the example below: + + :: + + { + "version": "1.29.0", + "apiversion": "1.29.0.1" + } + +**Congratulations** Your installation is complete + +PPA install may need some tweaking of ZMS_PATH in ZoneMinder options. `Socket_sendto or no live streaming`_ + +Easy Way: Ubuntu 16.04 (Xenial) +------------------------------- +These instructions are for a brand new ubuntu 16.04 system which does not have ZM +installed. -**Then your APIs are working** +It is recommended that you use an Ubuntu Server install and select the LAMP option +during install to install Apache, MySQL and PHP. If you failed to do this you can +achieve the same result by running: -Make sure ZM and APIs work with security: -1. Enable OPT_AUTH in ZM -2. Log out of ZM in browser -3. Open a NEW tab in the SAME BROWSER (important) and go to ``http://localhost/zm/api/host/getVersion.json`` - should give you "Unauthorized" along with a lot more of text -4. Go to another tab in the SAME BROWSER (important) and log into ZM -5. Repeat step 3 and it should give you the ZM and API version +:: -**Congrats** your installation is complete + sudo tasksel install lamp-server + +During installation it will ask you to set up a master/root password for the MySQL. +Installing LAMP is not ZoneMinder specific so you will find plenty of resources to +guide you with a quick search. + +**Step 1:** Either run commands in this install using sudo or use the below to become root +:: + + sudo -i + +**Step 2:** Update Repos + +.. topic :: Latest Release + + ZoneMinder is now part of the current standard Ubuntu repository, but + sometimes the official repository can lag behind. To find out check our + `releases page `_ for + the latest release. + + Alternatively, the ZoneMinder project team maintains a `PPA `_, which is updated immediately + following a new release of ZoneMinder. To use this repository instead of the + official Ubuntu repository, enter the following from the command line: + + :: + + add-apt-repository ppa:iconnor/zoneminder + add-apt-repository ppa:iconnor/zoneminder-1.32 + +Update repo and upgrade. + +:: + + apt-get update + apt-get upgrade + apt-get dist-upgrade -Easy Way: Install ZoneMinder from a package (Ubuntu 14.x) ------------------------------------------------------------ +**Step 3:** Configure MySQL + +.. sidebar :: Note + + The MySQL default configuration file (/etc/mysql/mysql.cnf)is read through + several symbolic links beginning with /etc/mysql/my.cnf as follows: + + | /etc/mysql/my.cnf -> /etc/alternatives/my.cnf + | /etc/alternatives/my.cnf -> /etc/mysql/mysql.cnf + | /etc/mysql/mysql.cnf is a basic file + +Certain new defaults in MySQL 5.7 cause some issues with ZoneMinder < 1.32.0, +the workaround is to modify the sql_mode setting of MySQL. Please note that these +changes are NOT required for ZoneMinder 1.32.0 and some people have reported them +causing problems in 1.32.0. + +To better manage the MySQL server it is recommended to copy the sample config file and +replace the default my.cnf symbolic link. + +:: + + rm /etc/mysql/my.cnf (this removes the current symbolic link) + cp /etc/mysql/mysql.conf.d/mysqld.cnf /etc/mysql/my.cnf + +To change MySQL settings: + +:: + + nano /etc/mysql/my.cnf + +In the [mysqld] section add the following + +:: + + sql_mode = NO_ENGINE_SUBSTITUTION + +CTRL+o then [Enter] to save + +CTRL+x to exit + +Restart MySQL + +:: + + systemctl restart mysql + + +**Step 4:** Install ZoneMinder + +:: + + apt-get install zoneminder + +**Step 5:** Configure the ZoneMinder Database + +This step should not be required on ZoneMinder 1.32.0. + +:: + + mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql + mysql -uroot -p -e "grant lock tables,alter,drop,select,insert,update,delete,create,index,alter routine,create routine, trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';" + + +**Step 6:** Set permissions + +Set /etc/zm/zm.conf to root:www-data 740 and www-data access to content + +:: + + chmod 740 /etc/zm/zm.conf + chown root:www-data /etc/zm/zm.conf + chown -R www-data:www-data /usr/share/zoneminder/ + +**Step 7:** Configure Apache correctly: + +:: + + a2enmod cgi + a2enmod rewrite + a2enconf zoneminder + +You may also want to enable to following modules to improve caching performance + +:: + + a2enmod expires + a2enmod headers + +**Step 8:** Enable and start Zoneminder + +:: + + systemctl enable zoneminder + systemctl start zoneminder + +**Step 9:** Edit Timezone in PHP + +:: + + nano /etc/php/7.0/apache2/php.ini + +Search for [Date] (Ctrl + w then type Date and press Enter) and change +date.timezone for your time zone, see [this](https://www.php.net/manual/en/timezones.php). +**Don't forget to remove the ; from in front of date.timezone** + +:: + + [Date] + ; Defines the default timezone used by the date functions + ; http://php.net/date.timezone + date.timezone = America/New_York + +CTRL+o then [Enter] to save + +CTRL+x to exit + +**Step 10:** Reload Apache service + +:: + + systemctl reload apache2 + +**Step 11:** Making sure ZoneMinder works + +1. Open up a browser and go to ``http://hostname_or_ip/zm`` - should bring up ZoneMinder Console + +2. (Optional API Check)Open up a tab in the same browser and go to ``http://hostname_or_ip/zm/api/host/getVersion.json`` + + If it is working correctly you should get version information similar to the example below: + + :: + + { + "version": "1.29.0", + "apiversion": "1.29.0.1" + } + +**Congratulations** Your installation is complete + +PPA install may need some tweaking of ZMS_PATH in ZoneMinder options. `Socket_sendto or no live streaming`_ + +Easy Way: Ubuntu 14.x (Trusty) +------------------------------ **These instructions are for a brand new ubuntu 14.x system which does not have ZM installed.** -**Step 1:** Install ZoneMinder +**Step 1:** Either run commands in this install using sudo or use the below to become root :: - sudo add-apt-repository ppa:iconnor/zoneminder - sudo apt-get update - sudo apt-get install zoneminder + sudo -i + +**Step 2:** Install ZoneMinder + +:: + + add-apt-repository ppa:iconnor/zoneminder + apt-get update + apt-get install zoneminder (just press OK for the prompts you get) -**Step 2:** Set up DB +**Step 3:** Set up DB :: - sudo mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql + mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';" -**Step 3:** Set up Apache +**Step 4:** Set up Apache :: - sudo a2enconf zoneminder - sudo a2enmod rewrite - sudo a2enmod cgi + a2enconf zoneminder + a2enmod rewrite + a2enmod cgi -**Step 4:**:Some tweaks that will be needed: - -Edit ``/etc/init.d/zoneminder``: - -add a ``sleep 10`` right after line 25 that reads ``echo -n "Starting $prog:"`` -(The reason we need this sleep is to make sure ZM starts after mysqld starts) - -As of Oct 3 2015, zm.conf is not readable by ZM. This is likely a bug and will go away in the next package +**Step 5:** Make zm.conf readable by web user. :: sudo chown www-data:www-data /etc/zm/zm.conf - -**Step 5**: If you have changed your DB login/password - -If you changed the DB password **after** installing ZM, the APIs will not be able to connect to the DB. - -If you have, go to ``/usr/share/zoneminder/www/api/app/Config`` & Edit ``database.php`` - -There is a class there called ``DATABASE_CONFIG`` - change the ``$default`` array to reflect your new details. Example: +**Step 6:** Edit Timezone in PHP :: - public $default = array( - 'datasource' => 'Database/Mysql', - 'persistent' => false, - 'host' => 'localhost', - 'login' => 'mynewDBusername', - 'password' => 'mynewDBpassword' - 'database' => 'zm', - 'prefix' => '', - //'encoding' => 'utf8',` - ); + nano /etc/php5/apache2/php.ini -We also need to install php5-gd (as of 1.28.107, this is not installed) +Search for [Date] (Ctrl + w then type Date and press Enter) and change +date.timezone for your time zone, see [this](https://www.php.net/manual/en/timezones.php). +**Don't forget to remove the ; from in front of date.timezone** :: - sudo apt-get install php5-gd + [Date] + ; Defines the default timezone used by the date functions + ; http://php.net/date.timezone + date.timezone = America/New_York +CTRL+o then [Enter] to save -**Step 6**: Edit Timezone in PHP +CTRL+x to exit -``sudo vi /etc/php5/apache2/php.ini`` -Look for [Date] and inside it you will see a date.timezone -that is commented. remove the comment and specific your timezone. -Please make sure the timezone is valid (see [this](http://php.net/manual/en/timezones.php)) - -In my case: +**Step 7:** Restart Apache service and start ZoneMinder :: - date.timezone = America/New_York + service apache2 reload + service zoneminder start -**Step 7: make sure live streaming works**: Make sure you can view Monitor streams: +**Step 8:** Making sure ZoneMinder works -startup ZM console in your browser, go to ``Options->Path`` and make sure ``PATH_ZMS`` is set to ``/zm/cgi-bin/nph-zms`` and restart ZM (you should not need to do this for packages, as this should automatically work) +1. Open up a browser and go to ``http://hostname_or_ip/zm`` - should bring up ZoneMinder Console +2. (Optional API Check)Open up a tab in the same browser and go to ``http://hostname_or_ip/zm/api/host/getVersion.json`` + If it is working correctly you should get version information similar to the example below: -restart: - -:: - - sudo service apache2 restart - sudo service zoneminder restart - -**Step 8**: Making sure ZM and APIs work: (optional - only if you need APIs) - -1. open up a browser and go to ``http://localhost/zm`` - should bring up ZM -2. (OPTIONAL - just for peace of mind) open up a tab and go to ``http://localhost/zm/api`` - should bring up a screen showing CakePHP version with some green color boxes. Green is good. If you see red, or you don't see green, there may be a problem (should not happen). Ignore any warnings in yellow saying "DebugKit" not installed. You don't need it -3. open up a tab in the same browser and go to ``http://localhost/zm/api/host/getVersion.json`` - -If it responds with something like: - -:: - - { - "version": "1.28.107", - "apiversion": "1.28.107.1" - } - -Then your APIs are working - -Make sure you can view Monitor View: -1. Open up ZM, configure your monitors and verify you can view Monitor feeds. -2. If not, open up ZM console in your browser, go to ``Options->Path`` and make sure ``PATH_ZMS`` is set to ``/zm/cgi-bin/nph-zms`` and restart ZM (you should not need to do this for packages, as this should automatically work) - -Make sure ZM and APIs work with security: -1. Enable OPT_AUTH in ZM -2. Log out of ZM in browser -3. Open a NEW tab in the SAME BROWSER (important) and go to ``http://localhost/zm/api/host/getVersion.json`` - should give you "Unauthorized" along with a lot more of text -4. Go to another tab in the SAME BROWSER (important) and log into ZM -5. Repeat step 3 and it should give you the ZM and API version - -**Congrats** Your installation is complete - + :: + { + "version": "1.29.0", + "apiversion": "1.29.0.1" + } +**Congratulations** Your installation is complete Harder Way: Build Package From Source -------------------------------------------- +------------------------------------- (These instructions assume installation from source on a ubuntu 15.x+ system) **Step 1:** Grab the package installer script @@ -307,19 +498,28 @@ To build the latest master snapshot: :: - ./do_debian_package.sh `lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'` `date +%Y%m%d`01 local master + ./do_debian_package.sh --snapshot=NOW --branch=master --type=local To build the latest stable release: :: - ./do_debian_package.sh `lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'` `date +%Y%m%d`01 local stable + ./do_debian_package.sh --snapshot=stable --type=local -Note that the ``lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'`` part simply extracts your distribution name - like "vivid", "trusty" etc. You can always replace it by your distro name if you know it. As far as the script goes, it checks if your distro is "trusty" in which case it pulls in pre-systemd release configurations and if its not "trusty" it assumes its based on systemd and pulls in systemd related config files. +Note that the distribution will be guessed using ``lsb_release -a 2>/dev/null | grep Codename | awk '{print $2}'`` +which simply extracts your distribution name - like "vivid", "trusty" etc. You +can always specify it using --distro=your distro name if you know it. As far as the script +goes, it checks if your distro is "trusty" in which case it pulls in pre-systemd +release configurations and if its not "trusty" it assumes its based on systemd +and pulls in systemd related config files. -(At the end the script will ask if you want to retain the checked out version of zoneminder. If you are a developer and are making local changes, make sure you select "y" so that the next time you do the build process mentioned here, it keeps your changes. Selecting any other value than "y" or "Y" will delete the checked out code and only retain the package) +(At the end the script will ask if you want to retain the checked out version of +ZoneMinder. If you are a developer and are making local changes, make sure you +select "y" so that the next time you do the build process mentioned here, it +keeps your changes. Selecting any other value than "y" or "Y" will delete the +checked out code and only retain the package) This should now create a bunch of .deb files @@ -335,57 +535,40 @@ This should now create a bunch of .deb files **Step 5:** Post install configuration -:: +Now that you have installed from your own package you can resume following the +standard install guide for your version, start at the step after Install Zoneminder. - sudo mysql -uroot -p < /usr/share/zoneminder/db/zm_create.sql - mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';" +Hints +----- +Make sure ZoneMinder and APIs work with security +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - sudo a2enmod cgi rewrite - sudo a2enconf zoneminder +1. Enable OPT_AUTH in ZoneMinder +2. Log out of ZoneMinder in browser +3. Open a new tab in the *same browser* (important) and go to + ``http://localhost/zm/api/host/getVersion.json`` - should give you "Unauthorized" + along with a lot more of text +4. Go to another tab in the SAME BROWSER (important) and log into ZM +5. Repeat step 3 and it should give you the ZM and API version + +Socket_sendto or no live streaming +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +After you have setup your camera make sure you can view Monitor streams, if not +check some of the common causes: + +* Check Apache cgi module is enabled. +* Check Apache /etc/apache2/conf-enabled/zoneminder.conf ScriptAlias matches PATH_ZMS. + + ScriptAlias **/zm/cgi-bin** /usr/lib/zoneminder/cgi-bin + + From console go to ``Options->Path`` and make sure PATH_ZMS is set to **/zm/cgi-bin/**\ nph-zms. +Changed Default DB User +^^^^^^^^^^^^^^^^^^^^^^^ -**Step 6:** Fix PHP TimeZone - -``sudo vi /etc/php5/apache2/php.ini`` - -Look for [Date] and inside it you will see a date.timezone that is commented. remove the comment and specific your timezone. Please make sure the timezone is valid (see http://php.net/manual/en/timezones.php) - -Example: - -``date.timezone = America/New_York`` - -**Step 7:** Fix some key permission issues and make sure API works - -:: - - sudo chown www-data /etc/zm/zm.conf - sudo chown -R www-data /usr/share/zoneminder/www/api/ - - -**Step 8:** Restart all services - -:: - - sudo service apache2 restart - sudo service zoneminder restart - -Check if ZM is running properly - -:: - - sudo service zoneminder status - - -**Step 9:** Make sure streaming works - set PATH_ZMS - -open up ZM console in your browser, go to Options->Path and make sure ``PATH_ZMS`` is set to ``/zm/cgi-bin/nph-zms`` and restart ZM - - -**Step 10:** Make sure everything works - -* point your browser to http://yourzmip/zm - you should see ZM console running -* point your browser to http://yourzmip/zm/api/host/getVersion.json - you should see an API version -* Configure your monitors and make sure its all a-ok - +If you have changed your DB login/password from zmuser/zmpass, you need to +update these values in zm.conf. +1. Edit zm.conf to change ZM_DB_USER and ZM_DB_PASS to the values you used. diff --git a/docs/installationguide/windows_wsl.rst b/docs/installationguide/windows_wsl.rst new file mode 100644 index 000000000..6861f522e --- /dev/null +++ b/docs/installationguide/windows_wsl.rst @@ -0,0 +1,10 @@ +Windows 10+ using WSL +======================= + +With Windows 10, Microsoft released the `Window Subsystem for Linux (WSL) `__ that enables you to run native Linux tools directly on Windows, alongside your traditional Windows desktop and modern store apps. To install WSL, please refer to the +`installation guide from Microsoft `__. + +ZoneMinder now runs on Windows 10+ systems which have WSL enabled. This guide will explain how to go about installing an Ubuntu ZM image on Windows 10+. + +.. todo:: Isaac to add instructions. + diff --git a/docs/userguide/components.rst b/docs/userguide/components.rst index 48aff0be4..064e27d5f 100644 --- a/docs/userguide/components.rst +++ b/docs/userguide/components.rst @@ -17,8 +17,6 @@ Binaries This is the ZoneMinder Capture daemon. This binary's job is to sit on a video device and suck frames off it as fast as possible, this should run at more or less constant speed. **zma** This is the ZoneMinder Analysis daemon. This is the component that goes through the captured frames and checks them for motion which might generate an alarm or event. It generally keeps up with the Capture daemon but if very busy may skip some frames to prevent it falling behind. -**zmf** - This is the ZoneMinder Frame daemon. This is an optional daemon that can run in concert with the Analysis daemon and whose function it is to actually write captured frames to disk. This frees up the Analysis daemon to do more analysis (!) and so keep up with the Capture daemon better. If it isn’t running or dies then the Analysis daemon just writes them itself. **zms** This is the ZoneMinder Streaming server. The web interface connects with this to get real-time or historical streamed images. It runs only when a live monitor stream or event stream is actually being viewed and dies when the event finishes or the associate web page is closed. If you find you have several zms processes running when nothing is being viewed then it is likely you need a patch for apache (see the Troubleshooting section). A non-parsed header version of zms, called nph-zms, is also installed and may be used instead depending on your web server configuration. **zmu** @@ -41,11 +39,11 @@ Finally some perl scripts in the scripts directory. These scripts all have some **zmpkg.pl** This is the ZoneMinder Package Control script. This is used by the web interface and service scripts to control the execution of the system as a whole. **zmdc.pl** - This is the ZoneMinder Daemon Control script. This is used by the web interface and the zmpkg.pl script to control and maintain the execution of the capture and analysis daemons, amongst others. You should not need to run this script yourself. + This is the ZoneMinder Daemon Control script. This is used by the web interface and the zmpkg.pl script to control and maintain the execution of the capture and analysis daemons, amongst others. You should not need to run this script yourself, although you can use it to start/top individual ZM processes. **zmfilter.pl** - This script controls the execution of saved filters and will be started and stopped by the web interface based on whether there are filters that have been defined to be autonomous. This script is also responsible for the automatic uploading of events to a 3rd party server. + This script controls the execution of saved filters and will be started and stopped by the web interface based on whether there are filters that have been defined to be autonomous(background). This script is also responsible for the automatic uploading of events to a 3rd party server. Prior to 1.32 there was one zmfilter.pl process. In 1.32 onwards we start a zmfilter.pl process for each background filter so that the processing time of one filter doesn't delay the processing of another filter. **zmaudit.pl** - This script is used to check the consistency of the event file system and database. It can delete orphaned events, i.e. ones that appear in one location and not the other as well as checking that all the various event related tables are in line. It can be run interactively or in batch mode either from the command line or a cron job or similar. In the zmconfig.pl there is an option to specify fast event deletes where the web interface only deletes the event entry from the database itself. If this is set then it is this script that tidies up the rest. + This script is used to check the consistency of the event file system and database. It can delete orphaned events, i.e. ones that appear in one location and not the other as well as checking that all the various event related tables are in line. It can be run interactively or in batch mode either from the command line or a cron job or similar. In the zmconfig.pl there is an option to specify fast event deletes where the web interface only deletes the event entry from the database itself. If this is set then it is this script that tidies up the rest. We do not recommend fast event deletion and we do not recommend having zmaudit.pl run in the background. It is a very ram cpu and disk io intensive program, constantly scanning every event. Please run it manually or from a cron job on weekends or something. **zmwatch.pl** This is a simple script purely designed to keep an eye on the capture daemons and restart them if they lockup. It has been known for sync problems in the video drivers to cause this so this script makes sure that nothing important gets missed. **zmupdate.pl** @@ -74,6 +72,9 @@ Finally some perl scripts in the scripts directory. These scripts all have some **zm** This is the (optional) ZoneMinder init script, see below for details. +**zmeventnotification.pl** + This is an optional 3rd party real time event notification server that also provides push notifications for zmNinja as well as machine learning powered object/face-detection. Please see `Event Notification Server Documentation `__ for more details (Note that the machine learning components are optional, and are developed in Python3) + Finally, there are also a number of ZoneMinder perl modules included. These are used by the scripts above, but can also be used by your own or 3rd party scripts. Full documentation for most modules is available in ‘pod’ form via ‘perldoc’ but the general purpose of each module is as follows. **ZoneMinder.pm** @@ -86,9 +87,15 @@ Finally, there are also a number of ZoneMinder perl modules included. These are This module contains the defined Debug and Error functions etc, that are used by scripts to produce diagnostic information in a standard format. **ZoneMinder/Database.pm** This module contains database access definitions and functions. Currently not a lot is in this module but it is included as a placeholder for future development. +**ZoneMinder/Event.pm** + This module contains functions to load, manipulate, delete, copy, move events. +**ZoneMinder/Filter.pm** + This module contains functions to load, execute etc filters. **ZoneMinder/SharedMem.pm** This module contains standard shared memory access functions. These can be used to access the current state of monitors etc as well as issuing commands to the monitors to switch things on and off. This module effectively provides a ZoneMinder API. **ZoneMinder/ConfigAdmin.pm** This module is a specialised module that contains the definition, and other information, about the various configuration options. It is not intended for use by 3rd parties. +**ZoneMinder/Control/\*.pm** + These modules contain implementations of the various PTZ protocols. **ZoneMinder/Trigger/\*.pm** These modules contain definitions of trigger channels and connections used by the zmtrigger.pl script. Although they can be used ‘as is’, they are really intended as examples that can be customised or specialised for different interfaces. Contributed modules for new channels or connections will be welcomed and included in future versions of ZoneMinder. diff --git a/docs/userguide/configfiles.rst b/docs/userguide/configfiles.rst new file mode 100644 index 000000000..879d181fd --- /dev/null +++ b/docs/userguide/configfiles.rst @@ -0,0 +1,47 @@ +Configuration Files +-------------------- +This section describes configuration files that ZoneMinder uses beyond the various Web UI options. + +.. _replacement_for_options_path: + +System Path Configurations +~~~~~~~~~~~~~~~~~~~~~~~~~~ +At one point of time, ZoneMinder stored various system path configurations under the Web UI (``Options->Paths``). This was removed a few versions ago and now resides in a configuration file. The motivation for this change can be read in `this discussion `__. + +Typically, path configurations now reside in ``/etc/zm``. + +Here is an example of the file hierarchy: + +:: + + /etc/zm + ├── conf.d + │   ├── 01-system-paths.conf + │   ├── 02-multiserver.conf + | ├── 03-custom.conf #optional + │   └── README + ├── objectconfig.ini # optional + ├── zm.conf + └── zmeventnotification.ini #optional + +The roles of the files are as follows: + +* ``zm.conf`` contains various base configuration entries. You should not edit this file as it may be overwritten on an upgrade. +* ``zmeventnotification.ini`` is only present if you have installed the ZoneMinder Event Notification Server. +* ``objectconfig.ini`` is only present if you have installed the machine learning hooks for the Event Notification Server. +* ``conf.d`` contains additional configuration items as follows: + + * ``01-system-paths.conf`` contains all the paths that were once part of ``Options->Paths`` in the Web UI. You should not edit this file as it may be overwritten on an upgrade + * ``02-multiserver.conf`` file consists of custom variables if you are deploying ZoneMinder in a multi-server configuration (see :doc:`/installationguide/multiserver`) + * ``03-custom.conf`` is an custom config file that I created to override specific variables in the path files. **This is the recommended way to customize entries**. Anything that you want to change should be in a new file inside ``conf.d``. Note that ZoneMinder will sort all the files alphabetically and run their contents in ascending order. So it doesn't really matter what you name them, as long as you make sure your changes are not overwritten by another file in the sorting sequence. It is therefore good practice to prefix your file names by ``nn-`` where ``nn`` is a monotonically increasing numerical sequence ``01-`` ``02-`` ``03-`` and so forth, so you know the order they will be processed. + +Timezone Configuration +~~~~~~~~~~~~~~~~~~~~~~~ +Earlier versions of ZoneMinder relied on ``php.ini`` to set Date/Time Zone. This is no longer the case. You can (and must) set the Timezone via the Web UI, starting ZoneMinder version 1.34. See :ref:`here `. + +Database Specific Configuration +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +.. todo:: do we really need to have this section? Not sure if its generic and not specific to ZM + +While the ZoneMinder specific database config entries reside in ``/etc/zm/zm.conf`` and related customizations discussed above, general database configuration items can be tweaked in ``/etc/mysql`` (or whichever path your DB server is installed) \ No newline at end of file diff --git a/docs/userguide/definemonitor.rst b/docs/userguide/definemonitor.rst index d69b44425..a5b622872 100644 --- a/docs/userguide/definemonitor.rst +++ b/docs/userguide/definemonitor.rst @@ -46,10 +46,28 @@ Linked Monitors This field allows you to select other monitors on your system that act as triggers for this monitor. So if you have a camera covering one aspect of your property you can force all cameras to record while that camera detects motion or other events. You can either directly enter a comma separated list of monitor ids or click on ‘Select’ to choose a selection. Be very careful not to create circular dependencies with this feature however you will have infinitely persisting alarms which is almost certainly not what you want! To unlink monitors you can ctrl-click. Maximum FPS - On some occasions you may have one or more cameras capable of high capture rates but find that you generally do not require this performance at all times and would prefer to lighten the load on your server. This option permits you to limit the maximum capture rate to a specified value. This may allow you to have more cameras supported on your system by reducing the CPU load or to allocate video bandwidth unevenly between cameras sharing the same video device. This value is only a rough guide and the lower the value you set the less close the actual FPS may approach it especially on shared devices where it can be difficult to synchronise two or more different capture rates precisely. This option controls the maximum FPS in the circumstance where no alarm is occurring only. (Note for IP cameras: ZoneMinder has no way to set or limit the mjpeg stream the camera passes, some cams you can set this through the url string, others do not. So if you're using mjpeg feeds you must NOT throttle here at the server end, only the cam end. If you want to use this feature, the server to throttle, then you MUST use jpeg instead of mjpeg method to get picture from the camera) + .. warning:: + Unless you know what you are doing, please leave this field empty, especially if you are configuring a network camera. More often than not, putting a value here adversely affects recording. + + On some occasions you may have one or more cameras capable of high capture rates but find that you generally do not require this performance at all times and would prefer to lighten the load on your server. This option permits you to limit the maximum capture rate to a specified value. This may allow you to have more cameras supported on your system by reducing the CPU load or to allocate video bandwidth unevenly between cameras sharing the same video device. This value is only a rough guide and the lower the value you set the less close the actual FPS may approach it especially on shared devices where it can be difficult to synchronise two or more different capture rates precisely. This option controls the maximum FPS in the circumstance where no alarm is occurring only. + + This feature is limited and will only work under the following conditions: + + #. Local cameras + #. Remote (IP) cameras in snapshot or jpeg mode **only** + + Using this field for video streams from IP cameras will cause undesirable results when the value is equal to or less than the frame rate from the camera. Note that placing a value higher than the camera's frame rate is allowed and can help prevent cpu spikes when communication from the camera is lost. + Alarm Maximum FPS + + .. warning:: + Unless you know what you are doing, please leave this field empty, especially if you are configuring a network camera. More often than not, putting a value here adversely affects recording. + + If you have specified a Maximum FPS it may be that you don’t want this limitation to apply when your monitor is recording motion or other event. This setting allows you to override the Maximum FPS value if this circumstance occurs. As with the Maximum FPS setting leaving this blank implies no limit so if you have set a maximum fps in the previous option then when an alarm occurs this limit would be ignored and ZoneMinder would capture as fast as possible for the duration of the alarm, returning to the limited value after the alarm has concluded. Equally you could set this to the same, or higher (or even lower) value than Maximum FPS for more precise control over the capture rate in the event of an alarm. + + **IMPORTANT:** This field is subject to the same limitations as the Maximum FPS field. Ignoring these limitations will produce undesriable results. Reference Image Blend %ge Each analysed image in ZoneMinder is a composite of previous images and is formed by applying the current image as a certain percentage of the previous reference image. Thus, if we entered the value of 10 here, each image’s part in the reference image will diminish by a factor of 0.9 each time round. So a typical reference image will be 10% the previous image, 9% the one before that and then 8.1%, 7.2%, 6.5% and so on of the rest of the way. An image will effectively vanish around 25 images later than when it was added. This blend value is what is specified here and if higher will make slower progressing events less detectable as the reference image would change more quickly. Similarly events will be deemed to be over much sooner as the reference image adapts to the new images more quickly. In signal processing terms the higher this value the steeper the event attack and decay of the signal. It depends on your particular requirements what the appropriate value would be for you but start with 10 here and adjust it (usually down) later if necessary. @@ -62,11 +80,18 @@ Source Tab FFmpeg ^^^^^^ + This is the **recommended** source type for most modern ip cameras. Source Path - Use this field to enter the full URL of the stream or file. Look in Supported Hardware > Network Cameras section, how to obtain these strings that may apply to your camera. RTSP streams may be specified here. + Use this field to enter the full URL of the stream or file your camera supports. This is usually an RTSP url. There are several methods to learn this: + + * Check the documentation that came with your camera + * Look for your camera in the hardware compatibilty list in the `hardware compatibility wiki `__ + * Try ZoneMinder's new ONVIF probe feature + * Download and install the `ONVIF Device Manager `__ onto a Windows machine + * Use Google to find third party sites, such as ispy, which document this information Source Colours - Specify the amount of colours in the captured image. Unlike with local cameras changing this has no controlling effect on the remote camera itself so ensure that your camera is actually capturing to this palette beforehand. + Specify the amount of colours in the captured image. 32 bit is the preferred choice here. Unlike with local cameras changing this has no controlling effect on the remote camera itself so ensure that your camera is actually capturing to this palette beforehand. Capture Width/Height Make sure you enter here the same values as they are in the remote camera's internal setting. Keep aspect ratio @@ -76,6 +101,7 @@ Orientation LibVLC ^^^^^^ + The fields for the LibVLC source type are configured the same way as the ffmpeg source type. We recommend only using this source type if issues are experienced with the ffmpeg source type. cURL ^^^^ @@ -88,7 +114,7 @@ Device Path/Channel Device Format Enter the video format of the video stream. This is defined in various system files (e.g. /usr/include/linux/videodev.h) but the two most common are 0 for PAL and 1 for NTSC. Capture Palette - Finally for the video part of the configuration enter the colour depth. ZoneMinder supports a handful of the most common palettes, so choose one here. If in doubt try grey first, and then 24 bit colour. If neither of these work very well then YUV420P or one of the others probably will. There is a slight performance penalty when using palettes other than grey or 24 bit colour as an internal conversion is involved. These other formats are intended to be supported natively in a future version but for now if you have the choice choose one of grey or 24 bit colour. + Finally for the video part of the configuration enter the colour depth. ZoneMinder supports a handful of the most common palettes, so choose one here. If in doubt try 32 bit colour first, then 24 bit colour, then grey. If none of these work very well, and your camera is local, then YUV420P or one of the others probably will. There is a slight performance penalty when using palettes other than 32, 24, or grey palettes as an internal conversion is involved. Recent versions of ZoneMinder support 32bit colour. This capture palette provides a performance boost when used on all modern Intel-based processors. Capture Width/Height The dimensions of the video stream your camera will supply. If your camera supports several just enter the one you'll want to use for this application, you can always change it later. However I would recommend starting with no larger than 320x240 or 384x288 and then perhaps increasing and seeing how performance is affected. This size should be adequate in most cases. Some cameras are quite choosy about the sizes you can use here so unusual sizes such as 197x333 should be avoided initially. Keep aspect ratio @@ -99,8 +125,12 @@ Orientation Remote ^^^^^^ +Remote Protocol + Choices are currently HTTP and RTSP. Before RTSP became the industry standard, many ip cameras streamed directly from their web portal. If you have an ip camera that does not speak RTSP then choose HTTP here. **If you camera does speak RTSP then you should change your source type to ffmpeg instead of selecting RTSP here.** The Remote -> RTSP method is no longer being maintained and may go away at some point in the future. +Remote Method + When HTTP is the Remote Protocol, your choices are Simple and Regexp. Most should choose Simple. When RTSP is the Remote Protocol, your choices are RTP/Unicast, RTP/Multicast, RTP/RTSP, RTP,RTSP,HTTP. Try each of these to determine which works with your camera. Most cameras will use either RTP/Unicast (UDP) or RTP/RTSP (TCP). Remote Host/Port/Path - Use these fields to enter the full URL of the camera. Basically if your camera is at http://camserver.home.net:8192/cameras/camera1.jpg then these fields will be camserver.home.net, 8192 and /cameras/camera1.jpg respectively. Leave the port at 80 if there is no special port required. If you require authentication to access your camera then add this onto the host name in the form :@.com. This will usually be 24 bit colour even if the image looks black and white. Look in Supported Hardware > Network Cameras section, how to obtain these strings that may apply to your camera. + Use these fields to enter the full URL of the camera. Basically if your camera is at ``http://camserver.home.net:8192/cameras/camera1.jpg`` then these fields will be camserver.home.net, 8192 and /cameras/camera1.jpg respectively. Leave the port at 80 if there is no special port required. If you require authentication to access your camera then add this onto the host name in the form :@.com. This will usually be 32 or 24 bit colour even if the image looks black and white. Look in Supported Hardware > Network Cameras section, how to obtain these strings that may apply to your camera. Remote Image Colours Specify the amount of colours in the captured image. Unlike with local cameras changing this has no controlling effect on the remote camera itself so ensure that your camera is actually capturing to this palette beforehand. Capture Width/Height @@ -118,7 +148,7 @@ File File Path Enter the full path to the file to be used as the image source. File Colours - Specify the amount of colours in the image. Usually 24 bit colour. + Specify the amount of colours in the image. Usually 32 bit colour. Capture Width/Height As per local devices. Keep aspect ratio @@ -126,6 +156,46 @@ Keep aspect ratio Orientation As per local devices. +WebSite +^^^^^^^ + +This Source Type allows one to configure an arbitrary website as a non-recordable, fully interactive, monitor in ZoneMinder. Note that sites with self-signed certificates will not display until the end user first manually navigates to the site and accpets the unsigned certificate. Also note that some sites will set an X-Frame option in the header, which discourages their site from being displayed within a frame. ZoneMinder will detect this condition and present a warning in the log. When this occurs, the end user can choose to install a browser plugin or extension to workaround this issue. + +Website URL + Enter the full http or https url to the desired website. + +Width (pixels) + Chose a desired width in pixels that gives an acceptable appearance. This may take some expirimentation. + +Height (pixels) + Chose a desired height in pixels that gives an acceptable appearance. This may take some expirimentation. + +Web Site Refresh + If the website in question has static content, optionally enter a time period in seconds for ZoneMinder to refresh the content. + +Storage Tab +----------- + +The storage section allows for each monitor to configure if and how video and audio are recorded. + +Save JPEGs + Records video in individual JPEG frames. Storing JPEG frames requires more storage space than h264 but it allows to view an event anytime while it is being recorded. + + * Disabled – video is not recorded as JPEG frames. If this setting is selected, then "Video Writer" should be enabled otherwise there is no video recording at all. + * Frames only – video is recorded in individual JPEG frames. + * Analysis images only (if available) – video is recorded in invidual JPEG frames with an overlay of the motion detection analysis information. Note that this overlay remains permanently visible in the frames. + * Frames + Analysis images (if available) – video is recorded twice, once as normal individual JPEG frames and once in invidual JPEG frames with analysis information overlaid. + +Video Writer + Records video in real video format. It provides much better compression results than saving JPEGs, thus longer video history can be stored. + + * Disabled – video is not recorded in video format. If this setting is selected, then "Save JPEGs" should be enabled otherwise there is no video recording at all. + * X264 Encode – the video or picture frames received from the camera are transcoded into h264 and stored as a video. This option is useful if the camera cannot natively stream h264. + * H264 Camera Passthrough – this option assumes that the camera is already sending an h264 stream. Video will be recorded as is, without any post-processing in zoneminder. Video characteristics such as bitrate, encoding mode, etc. should be set directly in the camera. + +Recording Audio + Check the box labeled "Whether to store the audio stream when saving an event." in order to save audio (if available) when events are recorded. + Timestamp Tab ------------- @@ -144,7 +214,8 @@ Warm-up Frames Pre/Post Event Image Buffer These options determine how many frames from before and after an event should be preserved with it. This allows you to view what happened immediately prior and subsequent to the event. A value of 10 for both of these will get you started but if you get a lot of short events and would prefer them to run together to form fewer longer ones then increase the Post Event buffer size. The pre-event buffer is a true buffer and should not really exceed half the ring buffer size. However the post-event buffer is just a count that is applied to captured frames and so can be managed more flexibly. You should also bear in mind the frame rate of the camera when choosing these values. For instance a network camera capturing at 1FPS will give you 10 seconds before and after each event if you chose 10 here. This may well be too much and pad out events more than necessary. However a fast video card may capture at 25FPS and you will want to ensure that this setting enables you to view a reasonable time frame pre and post event. Stream Replay Image Buffer - This option ... + The number of frames buffered to allow pausing and rewinding of the stream when live viewing a monitor. A value of 0 disables the feature. + Frames are buffered to ZM_PATH_SWAP. If this path points to a physical drive, a lot of IO will be caused during live view / montage. If you experience high system load in those situations, either disable the feature or use a RAM drive for ZM_PATH_SWAP. Alarm Frame Count This option allows you to specify how many consecutive alarm frames must occur before an alarm event is generated. The usual, and default, value is 1 which implies that any alarm frame will cause or participate in an event. You can enter any value up to 16 here to eliminate bogus events caused perhaps by screen flickers or other transients. Values over 3 or 4 are unlikely to be useful however. Please note that if you have statistics recording enabled then currently statistics are not recorded for the first ‘Alarm Frame Count’-1 frames of an event. So if you set this value to 5 then the first 4 frames will be missing statistics whereas the more usual value of 1 will ensure that all alarm frames have statistics recorded. @@ -209,3 +280,7 @@ Default Scale If your monitor has been defined with a particularly large or small image size then you can choose a default scale here with which to view the monitor so it is easier or more visible from the web interface. Web Colour Some elements of ZoneMinder now use colours to identify monitors on certain views. You can select which colour is used for each monitor here. Any specification that is valid for HTML colours is valid here, e.g. ‘red’ or ‘#ff0000’. A small swatch next to the input box displays the colour you have chosen. +Embed EXIF data into image: + Embeds EXIF data into each jpeg frame + + .. todo:: what about mp4s? diff --git a/docs/userguide/definezone.rst b/docs/userguide/definezone.rst index 0cacd3b91..1d00c71b4 100644 --- a/docs/userguide/definezone.rst +++ b/docs/userguide/definezone.rst @@ -29,7 +29,7 @@ Type Triggers an alarm when motion is detected within it, as long as no alarms have already been triggered in an Active zone. This is the most specialized of the zone types. For instance in the camera covering my garden I keep watch for a hedgehog that visits most nights and scoffs the food out of my cats bowls. By creating a sensitive Exclusive zone in that area I can ensure that a hedgehog alarm will only trigger if there is activity in that small area. If something much bigger occurs, like someone walking by it will trigger a regular alarm and not one from the Exclusive zone. Thus I can ensure I get alarms for big events and also special small events but not the noise in between. * Preclusive - This zone type is relatively recent. It is called a Preclusive zone because if it is triggered it actually precludes an alarm being generated for that image frame. So motion or other changes that occur in a Preclusive zone will have the effect of ensuring that no alarm occurs at all. The application for this zone type is primarily as a shortcut for detecting general large-scale lighting or other changes. Generally this may be achieved by limiting the maximum number of alarm pixels or other measure in an Active zone. However in some cases that zone may cover an area where the area of variable illumination occurs in different places as the sun and/or shadows move and it thus may be difficult to come up with general values. Additionally, if the sun comes out rapidly then although the initial change may be ignored in this way as the reference image catches up an alarm may ultimately be triggered as the image becomes less different. Using one or more Preclusive zones offers a different approach. Preclusive zones are designed to be fairly small, even just a few pixels across, with quite low alarm thresholds. They should be situated in areas of the image that are less likely to have motion occur such as high on a wall or in a corner. Should a general illumination change occur they would be triggered at least as early as any Active zones and prevent any other zones from generating an alarm. Obviously careful placement is required to ensure that they do not cancel any genuine alarms or that they are not so close together that any motion just hops from one Preclusive zone to another. Preclusive zones may also be used to reduce processing time by situating one over an Active zone. The Preclusive zone is processed first; if it is small, and is triggered, the rest of the zone/image will not be processed. + This zone type is relatively recent. It is called a Preclusive zone because if it is triggered it actually precludes an alarm being generated for that image frame. So motion or other changes that occur in a Preclusive zone will have the effect of ensuring that no alarm occurs at all. The application for this zone type is primarily as a shortcut for detecting general large-scale lighting or other changes. Generally this may be achieved by limiting the maximum number of alarm pixels or other measure in an Active zone. However in some cases that zone may cover an area where the area of variable illumination occurs in different places as the sun and/or shadows move and it thus may be difficult to come up with general values. Additionally, if the sun comes out rapidly then although the initial change may be ignored in this way as the reference image catches up an alarm may ultimately be triggered as the image becomes less different. Using one or more Preclusive zones offers a different approach. Preclusive zones are designed to be fairly small, even just a few pixels across, with quite low alarm thresholds. They should be situated in areas of the image that are less likely to have motion occur such as high on a wall or in a corner. Should a general illumination change occur they would be triggered at least as early as any Active zones and prevent any other zones from generating an alarm. Obviously careful placement is required to ensure that they do not cancel any genuine alarms or that they are not so close together that any motion just hops from one Preclusive zone to another. Preclusive zones may also be used to reduce processing time by situating one over an Active zone. The Preclusive zone is processed first; if it is small, and is triggered, the rest of the zone/image will not be processed. See Extend Alarm Frame Count below for a way to hold the preclusive zone active for an extended period. * Inactive Suppresses the detection of motion within it. This can be layered on top of any other zone type, preventing motion within the Inactive zone from being effective for any other zone type. Use inactive zones to cover areas in which nothing notable will ever happen or where you get false alarms that don't relate to what you are trying to monitor. Inactive zones may be overlaid on other zones to blank out areas, and are processed first (with the exception of Privacy zones, see below). As a general practice, you should try and make zones abut each other instead of overlapping to avoid repeated duplicate processing of the same area. @@ -40,6 +40,8 @@ Type Preset The preset chooser sets sensible default values based on computational needs (fast v. best) and sensitivity (low, medium, high.) It is not required that you select a preset, and you can alter any of the parameters after choosing a preset. For a small number of monitors with ZoneMinder running on modern equipment, Best, high sensitivity can be chosen as a good starting point. + It is important to understand that the available presets are intended merely as a starting point. Since every camera's view is unique, they are not guaranteed to work properly in every case. Presets tend to work acceptably for indoor cameras, where the objects of interest are relatively close and there typically are few or no unwanted objects moving within the cameras view. Presets, on the other hand, tend to not work acceptably for outdoor cameras, where the field of view is typically much wider, objects of interest are farther away, and changing weather patterns can cause false triggers. For outdoor cameras in particular, you will almost certainly have to tune your motion detection zone to get desired results. Please refer to `this guide `__ to learn how to do this. + Units * Pixels - Selecting this option will allow many of the following values to be entered (or viewed) in units of pixels. * Percentage - Selecting this option will allow may of the following values to be entered (or viewed) as a percentage. The sense of the percentage values refers to the area of the zone and not the image as a whole. This makes trying to work out necessary sizes rather easier. @@ -56,7 +58,7 @@ Alarm Colour These parameters can be used to individually colorize the zone overlay pattern. Alarms in this zone will be highlighted in the alarm colour. This option is irrelevant for Preclusive and Inactive zones and will be disabled. Alarm Check Methods - There are 3 Alarm Check Methods. They are sequential, and are layered: In AlarmedPixels mode, only the AlarmedPixel analysis is performed. In FilteredPixels mode, the AlarmedPixel analysis is performed first, followed by the AlarmedPixel analysis. In the Blobs mode, all 3 analysis methods are performed in order. An alarm is only triggered if *all* of the enabled analysis modes are triggered. For performance reasons, as soon as the criteria for one of the analysis modes is not met, the alarm checking for the frame is complete. Since the subsequent modes each require progressively more computations, it is a good idea to tune the parameters in each of the activated layers. + There are 3 Alarm Check Methods. They are sequential, and are layered: In AlarmedPixels mode, only the AlarmedPixel analysis is performed. In FilteredPixels mode, the AlarmedPixel analysis is performed first, followed by the FilteredPixel analysis. In the Blobs mode, all 3 analysis methods are performed in order. An alarm is only triggered if *all* of the enabled analysis modes are triggered. For performance reasons, as soon as the criteria for one of the analysis modes is not met, the alarm checking for the frame is complete. Since the subsequent modes each require progressively more computations, it is a good idea to tune the parameters in each of the activated layers. For reference purposes, the Zone Area box shows the area of the entire region of interest. In percent mode, this is 100. In Pixels mode, this is the pixel count of the region. All 3 Min/Max Area parameter groups are based on the Zone Area as the maximum sensible value, and all 3 are interpreted in the units specified in the Units input. @@ -102,7 +104,10 @@ Overload Frame Ignore Count * Number of Blobs > Max Blobs The idea is that after a change like a light going on that is considered too big to count as an alarm, it could take a couple of frames for things to settle down again. +Extend Alarm Frame Count + This field applies to Preclusive Zones only. Placing a value in this field holds the Preclusive zone active for the specified number of frames after the initial triggering event. This is useful in cases where a sudden change in light level triggers the Preclusive zone, but the zone needs to be held active for a few frames as the camera itself adjusts to that change in light level. + Other information ----------------- -Refer to `this `__ user contributed Zone guide for additional information will illustrations if you are new to zones and need more help. +Refer to `this `__ user contributed Zone guide for additional information will illustrations if you are new to zones and need more help. diff --git a/docs/userguide/filterevents.rst b/docs/userguide/filterevents.rst index bc0dcffe2..436034da0 100644 --- a/docs/userguide/filterevents.rst +++ b/docs/userguide/filterevents.rst @@ -8,10 +8,7 @@ Filters allow you to define complex conditions with associated actions in ZoneMi And many more. -The filter window can be accessed from various views, one of which is to simply tap on the filter button in the main web view: - -.. image:: images/filter-button.png - :width: 600px +The filter window can be accessed by tapping on the top level filter menu You can use the filter window to create your own filters or to modify existing ones. You can even save your favourite filters to re-use at a future date. Filtering itself is fairly simple; you first choose how many expressions you'd like your filter to contain. Changing this value will cause the window to redraw with a corresponding row for each expression. You then select what you want to filter on and how the expressions relate by choosing whether they are 'and' or 'or' relationships. For filters comprised of many expressions you will also get the option to bracket parts of the filter to ensure you can express it as desired. Then if you like choose how you want your results sorted and whether you want to limit the amount of events displayed. @@ -22,62 +19,78 @@ Here is what the filter window looks like :width: 800px * *A*: This is a dropdown list where you can select pre-defined filters. You will notice that ZoneMinder comes with a PurgeWhenFull filter that is configured to delete events if you reach 95% of disk space. -* *B* and *C*: This is where you specify conditions that need to match before the filter is executed. You use the "+" and "-" buttons to add/delete conditions -* *D*: This is where you specify what needs to happen when the conditions match: +* *B*: If you are creating a new filter, you can type in a name for your filter here +* *C*: This is where you specify conditions that need to match before the filter is executed. You use the "+" and "-" buttons to add/delete conditions +* *D*: This allows you to perform sorting and limiting operations on the output before you take an action +* *E*: This is where you specify what needs to happen when the conditions match: + * Archive all matches: sets the archive field to 1 in the Database for the matched events. Think of 'archiving' as grouping them under a special category - you can view archived events later and also make sure archived events don't get deleted, for example - * Email details of all matches: Sends an email to the configured address with details about the event. - The email can be customized as per TBD - * Execute command on all matches: Allows you to execute any arbitrary command on the matched events - * Delete all matches: Deletes all the matched events -* *E*: Use 'Submit' to 'test' your matching conditions. This will just match and show you what filters match. Use 'Execute' to actually execute the action after matching your conditions. Use 'Save' to save the filter for future use and 'Reset' to clear your settings + + .. todo :: + fill in what update used disk space, copy all matches, move all matches do. For the "create video" filter, put in more details on how it works, any dependencies etc. -.. NOTE:: More details on filter conditions: + * Update used disk space: + * Create video for all matches: creates a video file of all the events that match + * Execute command on all matches: Allows you to execute any arbitrary command on the matched events. You can use replacement tokens as subsequent arguents to the command, the last argument will be the absolute path to the event, preceeded by replacement arguents. eg: /usr/bin/script.sh %MN% will excecute as /usr/bin/script.sh MonitorName /path/to/event. + * Delete all matches: Deletes all the matched events. + * Copy all matches: + * Move all matches: + * Run filter in background: When checked, ZoneMinder will make sure the filter is checked regularly. For example, if you want to be notified of new events by email, you should make sure this is checked. Filters that are configured to run in the background have a “*†next to it. + * Run filter concurrently: Allows this filter to run in its own thread thereby letting other filters run in parallel. + +* *F*: Use 'List Matches' to 'test' your matching conditions. This will just match and show you what filters match. Use 'Execute' to actually execute the action after matching your conditions. Use 'Save' to save the filter for future use and 'Reset' to clear your settings + +.. note:: More details on filter conditions: There are several different elements to an event that you can filter on, some of which require further explanation. These are as follows, * 'Date/Time' which must evaluate to a date and a time together, * 'Date' and 'Time' which are variants which may only contain the relevant subsets of this, * 'Weekday' which as expected is a day of the week. - All of the preceding elements take a very flexible free format of dates and time based on the PHP strtotime function (http://www.php.net/manual/en/function.strtotime.php). This allows values such as 'last Wednesday' etc to be entered. We recommend acquainting yourself with this function to see what the allowed formats are. However automated filters are run in perl and so are parsed by the Date::Manip package. Not all date formats are available in both so if you are saved your filter to do automatic deletions or other tasks you should make sure that the date and time format you use is compatible with both methods. The safest type of format to use is ‘-3 day’ or similar with easily parseable numbers and units are in English. + All of the preceding elements take a very flexible free format of dates and time based on the PHP strtotime function (https://www.php.net/manual/en/function.strtotime.php). This allows values such as 'last Wednesday' etc to be entered. We recommend acquainting yourself with this function to see what the allowed formats are. However automated filters are run in perl and so are parsed by the Date::Manip package. Not all date formats are available in both so if you are saved your filter to do automatic deletions or other tasks you should make sure that the date and time format you use is compatible with both methods. The safest type of format to use is ‘-3 day’ or similar with easily parseable numbers and units are in English. The other things you can filter on are all fairly self explanatory, except perhaps for 'Archived' which you can use to include or exclude Archived events. In general you'll probably do most filtering on un-archived events. There are also two elements, Disk Blocks and Disk Percent which don’t directly relate to the events themselves but to the disk partition on which the events are stored. These allow you to specify an amount of disk usage either in blocks or in percentage as returned by the ‘df’ command. They relate to the amount of disk space used and not the amount left free. Once your filter is specified, clicking 'submit' will filter the events according to your specification. As the disk based elements are not event related directly if you create a filter and include the term ‘DiskPercent > 95’ then if your current disk usage is over that amount when you submit the filter then all events will be listed whereas if it is less then none at all will. As such the disk related terms will tend to be used mostly for automatic filters (see below). If you have created a filter you want to keep, you can name it and save it by clicking 'Save'. If you do this then the subsequent dialog will also allow you specify whether you want this filter automatically applied in order to delete events or upload events via ftp to another server and mail notifications of events to one or more email accounts. Emails and messages (essentially small emails intended for mobile phones or pagers) have a format defined in the Options screen, and may include a variety of tokens that can be substituted for various details of the event that caused them. This includes links to the event view or the filter as well as the option of attaching images or videos to the email itself. Be aware that tokens that represent links may require you to log in to access the actual page, and sometimes may function differently when viewed outside of the general ZoneMinder context. The tokens you can use are as follows. - * %EI% Id of the event - * %EN% Name of the event - * %EC% Cause of the event - * %ED% Event description - * %ET% Time of the event - * %EL% Length of the event - * %EF% Number of frames in the event - * %EFA% Number of alarm frames in the event - * %EST% Total score of the event - * %ESA% Average score of the event - * %ESM% Maximum score of the event - * %EP% Path to the event - * %EPS% Path to the event stream - * %EPI% Path to the event images - * %EPI1% Path to the first alarmed event image - * %EPIM% Path to the (first) event image with the highest score - * %EI1% Attach first alarmed event image - * %EIM% Attach (first) event image with the highest score - * %EV% Attach event mpeg video - * %MN% Name of the monitor - * %MET% Total number of events for the monitor - * %MEH% Number of events for the monitor in the last hour - * %MED% Number of events for the monitor in the last day - * %MEW% Number of events for the monitor in the last week - * %MEM% Number of events for the monitor in the last month - * %MEA% Number of archived events for the monitor - * %MP% Path to the monitor window - * %MPS% Path to the monitor stream - * %MPI% Path to the monitor recent image - * %FN% Name of the current filter that matched - * %FP% Path to the current filter that matched - * %ZP% Path to your ZoneMinder console + * %EI% Id of the event + * %EN% Name of the event + * %EC% Cause of the event + * %ED% Event description + * %ET% Time of the event + * %EL% Length of the event + * %EF% Number of frames in the event + * %EFA% Number of alarm frames in the event + * %EST% Total score of the event + * %ESA% Average score of the event + * %ESM% Maximum score of the event + * %EP% Path to the event + * %EPS% Path to the event stream + * %EPF1% Path to the frame view for the first alarmed event image + * %EPFM% Path to the frame view for the (first) event image with the highest score + * %EFMOD% Path to image containing object detection, in frame view + * %EPI% Path to the event images + * %EPI1% Path to the first alarmed event image, suitable for use in img tags + * %EPIM% Path to the (first) event image with the highest score, suitable for use in img tags + * %EIMOD% Path to image containing object detection, suitable for use in img tags + * %EI1% Attach first alarmed event image + * %EIM% Attach (first) event image with the highest score + * %EV% Attach event mpeg video + * %MN% Name of the monitor + * %MET% Total number of events for the monitor + * %MEH% Number of events for the monitor in the last hour + * %MED% Number of events for the monitor in the last day + * %MEW% Number of events for the monitor in the last week + * %MEM% Number of events for the monitor in the last month + * %MEA% Number of archived events for the monitor + * %MP% Path to the monitor window + * %MPS% Path to the monitor stream + * %MPI% Path to the monitor recent image + * %FN% Name of the current filter that matched + * %FP% Path to the current filter that matched + * %ZP% Path to your ZoneMinder console Finally you can also specify a script which is run on each matched event. This script should be readable and executable by your web server user. It will get run once per event and the relative path to the directory containing the event in question. Normally this will be of the form / so from this path you can derive both the monitor name and event id and perform any action you wish. Note that arbitrary commands are not allowed to be specified in the filter, for security the only thing it may contain is the full path to an executable. What that contains is entirely up to you however. @@ -87,21 +100,14 @@ Here is what the filter window looks like Saving filters ----------------- -.. image:: images/filter-save.png - :width: 400px - When saving filters, if you want the filter to run in the background make sure you select the "Run filter in background" option. When checked, ZoneMinder will make sure the filter is checked regularly. For example, if you want to be notified of new events by email, you should make sure this is checked. Filters that are configured to run in the background have a "*" next to it. -For example: - -.. image:: images/filter-choosefilter.png - :width: 400px How filters actually work -------------------------- It is useful to know how filters actually work behind the scenes in ZoneMinder, in the event you find your filter not functioning as intended: -* the primary filter processing process in ZoneMinder is a perl file called ``zmfilter.pl`` +* the primary filter processing process in ZoneMinder is a perl file called ``zmfilter.pl`` which retrieves filters from the Filters database table * zmfilter.pl runs every FILTER_EXECUTE_INTERVAL seconds (default is 20s, can be changed in Options->System) * in each run, it goes through all the filters which are marked as "Run in Background" and if the conditions match performs the specified action * zmfilter.pl also reloads all the filters every FILTER_RELOAD_DELAY seconds (default is 300s/5mins, can be changed in Options->System) diff --git a/docs/userguide/gettingstarted.rst b/docs/userguide/gettingstarted.rst index b2e92f63f..0b40d7fb9 100644 --- a/docs/userguide/gettingstarted.rst +++ b/docs/userguide/gettingstarted.rst @@ -5,32 +5,146 @@ Having followed the :doc:`/installationguide/index` for your distribution you sh .. image:: ../installationguide/images/zm_first_screen_post_install.png +.. _timezone_config: + +Setting Timezone +^^^^^^^^^^^^^^^^^ +Previous versions of ZoneMinder required the user to set up Timezone correctly in ``php.ini``. This is no longer the case. Starting 1.34, ZoneMinder allows you to specify the TimeZone in the UI. Please make sure it is set up correctly. The Timezone can be changed by selecting ``Options->System->Timezone`` + +.. image:: images/getting-started-timezone.png Enabling Authentication ^^^^^^^^^^^^^^^^^^^^^^^ We strongly recommend enabling authentication right away. There are some situations where certain users don't enable authentication, such as instances where the server is in a LAN not directly exposed to the Internet, and is only accessible via VPN etc., but in most cases, authentication should be enabled. So let's do that right away. -* Click on the Options link on the top right corner of the web interface -* You will now be presented with a screen full of options. Click on the "System" tab +* Click on the Options link on the top bar of the web interface +* You will now be presented with a sidebar full of options. Click on the "System" link .. image:: images/getting-started-enable-auth.png * The relevant portions to change are marked in red above -* Enable OPT_USE_ATH - this automatically switches to authentication mode with a default user (more on that later) +* Enable OPT_USE_AUTH - this automatically switches to authentication mode with a default user (more on that later) * Select a random string for AUTH_HASH_SECRET - this is used to make the authentication logic more secure, so - please generate your own string and please don't use the same value in the example. + please generate your own string and make sure it is sufficiently randomized and long. Note that if you plan to use APIs with ZoneMinder (needed by zmNinja/other apps), it is mandatory that you have this field populated * The other options highlighed above should already be set, but if not, please make sure they are +* Note that if you are planning to use zmNinja and plan to use ZM authentication, you must also: + + * set ``AUTH_RELAY`` to hashed + * Enable ``AUTH_HASH_LOGINS`` + * Click on Save at the bottom and that's it! The next time you refresh that page, you will now be presented with a login screen. Job well done! .. image:: images/getting-started-login.png -.. NOTE:: The default login/password is "admin/admin" +.. note:: The default login/password is "admin/admin" -Switching to flat theme -^^^^^^^^^^^^^^^^^^^^^^^ -What you see is what is called a "classic" skin. Zoneminder has a host of configuration options that you can customize over time. This guide is meant to get you started the easiest possible way, so we will not go into all the details. However, it is worthwhile to note that Zoneminder also has a 'flat' theme that depending on your preferences may look more modern. So let's use that as an example of introducing you to the Options menu +Understanding the Web Console +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Before we proceed, lets spend a few minutes understanding the key functions of the web console. +For the sake of illustration, we are going to use a populated zoneminder configuration with several monitors and events. + +.. image:: images/getting-started-understand-console.png + +This screen is called the "console" screen in ZoneMinder and shows a summary of your monitors, associated events and more information. + +* **A**: The options menu lets you configure many aspects of ZoneMinder. Refer to :doc:`options`. +* **B**: This brings up a color coded log window that shows various system and component level logs. This window is useful if you are trying to diagnose issues. Refer to :doc:`logging`. +* **C**: ZoneMinder allows you to group monitors gor logical separation. This option lets you create new groups, associate monitors to them and edit/delete existing groups. +* **D**: Filters are a powerful mechanism to perform actions when certain conditions are met. ZoneMinder comes with some preset filters that keep a tab of disk space and others. Many users create their own filters for more advanced actions like sending emails when certain events occur and more. Refer to :doc:`filterevents`. +* **E**: The Cycle option allows you to rotate between live views of each cofigured monitor. +* **F**: The Montage option shows a collage of your monitors. You can customize them including moving them around. +* **G**: Montage Review allows you to simultaneously view past events for different monitors. Note that this is a very resource intensive page and its performance will vary based on your system capabilities. +* **H**: Audit Events Report is more of a power user feature. This option looks for recording gaps in events and recording issues in mp4 files. +* **I**: This is the user you are currently logged in as. +* **J**: ZoneMinder allows you 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 + +* **K**: This line shows you system health information +* **L**: 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). +* **M**: 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. Green means the monitor is running. Red means there is something wrong with that camera. +* **N**: 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. +* **O**: 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. +* **P**: This is a "visual filter" which lets you 'filter' the console display based on text you enter. While this may not be particularly useful for small systems, ZoneMinder is also used in mega-installations will well over 200+ cameras and this visual filter helps reduce the monitors you are seeing at one time. + +Adding Monitors +^^^^^^^^^^^^^^^ +Now that we have a basic understanding of the web console, lets go about adding a new camera (monitor). For this example, lets assume we have an IP camera that streams RTSP at LAN IP address 192.168.1.33. + +.. sidebar:: Note + + This is meant to be a simple example. For a more detailed explanation of other options available when creating a monitor, please see :doc:`/userguide/definemonitor` + +The first thing we will need to know is how to access that camera's video feed. You will need to consult your camera's manual or check their forum. Zoneminder community users also have a frequently updated list right `here `__ that lists information about many cameras. If you don't find your list there and can't seem to find it elsewhere, feel free to register and ask in the `user forums `__. + +The camera we are using as an example here is a Foscam 9831W which is a 1280x960 RTSP camera, and the URL to access it's feed is *username:password@IPADDRESS:PORT/videoMain* + +Let's get started: + +Click on the "Add" button below: + +.. image:: images/getting-started-modern-look.png + :width: 600px + +This brings up the new monitor window: + +.. image:: images/getting-started-add-monitor-general.png + :width: 600px + +* We've given it a name of 'Garage', because, well, its better than Monitor-1 and this is my Garage camera. + +* There are various source types. As a brief introduction you'd want to use 'Local' if your camera is physically attached to your ZM server (like a USB camera, for example), and one of 'Remote', 'FFMpeg', 'Libvlc' or 'cURL' for a remote camera (not necessarily, but usually). For this example, let's go with 'FFMpeg'. + +.. note:: + As a thumb rule, if you have a camera accessible via IP and it does HTTP or RTSP, + start with FFMpeg first and libvlc if it doesn't work (:doc:`/userguide/definemonitor` + covers other modes in more details). If you are wondering what 'File' does, well, ZoneMinder was + built with compatibility in mind. Take a look at `this post + `__ to see how file can be used for leisure reading. + +* In this example, the Function is 'Modect', which means it will start recording if motion is detected on that camera feed. The parameters for what constitutes motion detected is specific in :doc:`definezone` + +* In Analysis FPS, we've put in 5FPS here. Note that you should not put an FPS that is greater than the camera FPS. In my case, 5FPS is sufficient for my needs + +.. note:: + Leave Maximum FPS and Alarm Maximum FPS **empty** if you are configuring an IP camera. In older versions of ZoneMinder, you were encouraged to put a value here, but that is no longer recommended. Infact, if you see your feed going much slower than the feed is supposed to go, or you get a lot of buffering/display issues, make sure this is empty. If you need to control camera FPS, please do it directly on the camera (via its own web interface, for example) + + +* We are done for the General tab. Let's move to the next tab + +.. image:: images/getting-started-add-monitor-source.png + :width: 800px + +* Let's select a protocol of RTSP and a remote method of RTP/RTSP (this is an RTSP camera) +* Note that starting ZM 1.34, GPUs are supported. In my case, I have an NVIDIA GeForce GTX1050i. These ``cuda`` and ``cuvid`` parameters are what my system supports to use the NVIDIA hardware decoder and GPU resources. If you don't have a GPU, or don't know how to configure your ffmpeg to support it, leave it empty for now. In future, we will add a section on how to set up a GPU + +**NOTE**: It is entirely possible that ``cuda`` and ``cuvid`` don't work for you and you need different values. Isaac uses ``cuda`` in ``DecoderHWAccelName`` and leaves ``DecoderHWAccelDevice`` empty. Try that too. + +.. todo:: + add GPU docs + +That's pretty much it. Click on Save. We are not going to explore the other tabs in this simple guide. + +You now have a configured monitor: + +.. image:: images/getting-started-add-monitor-modect-ready.png + + +And then, finally, to see if everything works, if you click on the garage monitor you just added, you should be able to see its live feed. If you don't, inspect your webserver logs and your ZoneMinder logs to see what is going on. + + +Switching to another theme +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +.. todo:: + Fix theme text after I clearly understand that System->CSS is doing + +When you first install ZoneMinder, you see is what is called a "classic" skin. Zoneminder has a host of configuration options that you can customize over time. This guide is meant to get you started the easiest possible way, so we will not go into all the details. However, it is worthwhile to note that Zoneminder also has a 'flat' theme that depending on your preferences may look more modern. So let's use that as an example of introducing you to the Options menu * Click on the Options link on the top right of the web interface in the image above * This will bring you to the options window as shown below. Click on the "System" tab and then select the @@ -51,98 +165,6 @@ Congratulations! You now have a modern looking interface. .. image:: images/getting-started-modern-look.png -Understanding the Web Console -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Before we proceed, lets spend a few minutes understanding the key functions of the web console. -For the sake of illustration, we are going to use a populated zoneminder configuration with several monitors and events. -Obviously, this does not reflect your current web console - which is essentially void of any useful information till now, -as we are yet to add things. Let's take a small break and understand what the various functions are before we configure our -own empty screen. - -.. image:: images/getting-started-understand-console.png - -* **A**: This is the username that is logged in. You are logged in as 'admin' here -* **B**: Click here to explore the various options of ZoneMinder and how to configure them. You already used this to enable authentication and change style above. Over time, you will find this to have many other things you will want to customize. -* **C**: This link, when clicked, opens up a color coded log window of what is going on in Zoneminder and often gives you good insight into what is going wrong or right. Note that the color here is red - that is an indication that some error occurred in ZoneMinder. You should click it and investigate. -* **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 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 -^^^^^^^^^^^^^^^ -Now that we have a basic understanding of the web console, lets go about adding a new camera (monitor). For this example, lets assume we have an IP camera that streams RTSP at LAN IP address 192.168.1.33. - -The first thing we will need to know is how to access that camera's video feed. You will need to consult your camera's manual or check their forum. Zoneminder community users also have a frequently updated list right `here `__ that lists information about many cameras. If you don't find your list there and can't seem to find it elsewhere, feel free to register and ask in the `user foums `__. - -The camera we are using as an example here is a Foscam 9831W which is a 1280x960 RTSP camera, and the URL to access it's feed is *username:password@IPADDRESS:PORT/videoMain* - -Let's get started: - -Click on the "Add new monitor" button below: - -.. image:: images/getting-started-modern-look.png - -This brings up the new monitor window: - -.. image:: images/getting-started-add-monitor-general.png - :width: 800px - -* We've given it a name of 'Garage', because, well, its better than Monitor-1 and this is my Garage camera. - -* There are various source types. As a brief introduction you'd want to use 'Local' if your camera is physically attached to your ZM server (like a USB camera, for example), and one of 'Remote', 'FFMpeg', 'Libvlc' or 'cURL' for a remote camera (not necessarily, but usually). For this example, let's go with 'Remote'. - -.. NOTE:: - As a thumb rule, if you have a camera accessible via IP and it does HTTP or RTSP, - start with Remote, then try FFMpeg and libvlc if it doesn't work (:doc:`/userguide/definemonitor` - covers other modes in more details). If you are wondering what 'File' does, well, ZoneMinder was - built with compatibility in mind. Take a look at `this post - `__ to see how file can be used for leisure reading. - -* Let's leave the Function as 'Monitor' just so we can use this as an example to change it later another way. Practically, feel free to select your mode right now - Modect, Record etc depending on what you want ZoneMinder to do with this camera - -* We've put in MaxFPS and AlarmFPS as 20 here. **You can leave this empty too**. Whatever you do here, *it's important to make sure these values are higher than the FPS of the camera*. The reason we've added a value here is that as of Aug 2015, if a camera goes offline, ZoneMinder eats up a lot of CPU trying to reach it and putting a larger value here than the actual FPS helps in that specific situation. - -.. NOTE:: - We strongly recommend not putting in a lower FPS here that the one configured inside your camera. - Zoneminder should not be used to manage camera frame rate. That always causes many problems. It's - much better you set the value directly in-camera and either leave this blank or specify a higher FPS - here. In this case, our actual camera FPS is 3 and we've set this value here to 10. - -* We are done for the General tab. Let's move to the next tab - -.. image:: images/getting-started-add-monitor-source.png - :width: 800px - -* Let's select a protocol of RTSP and a remote method of RTP/RTSP (this is an RTSP camera) -* The other boxes are mostly self-explanatory - -That's pretty much it. Click on Save. We are not going to explore the other tabs in this simple guide. - -You now have a configured monitor: - -.. image:: images/getting-started-add-monitor-orange.png - -If you want to change its mode from Monitor to say, Modect (Motion Detect), later all you need to do is click on the Function column that says 'Monitor' and change it to 'Modect' like so: - - -.. image:: images/getting-started-add-monitor-modect.png - -and we now have: - -.. image:: images/getting-started-add-monitor-modect-ready.png - -And then, finally, to see if everything works, lets click on the monitor name ('Garage' in this example) and that should bring up a live feed just like this: - -.. image:: images/getting-started-add-monitor-live.png Conclusion diff --git a/docs/userguide/images/README.TXT b/docs/userguide/images/README.TXT new file mode 100644 index 000000000..21f85c8c3 --- /dev/null +++ b/docs/userguide/images/README.TXT @@ -0,0 +1,2 @@ +The XML images present in this folder have been drawn using http://draw.io +To edit images, simple go to draw.io and load the .xml files diff --git a/docs/userguide/images/filter-button.png b/docs/userguide/images/filter-button.png deleted file mode 100644 index a480b1900..000000000 Binary files a/docs/userguide/images/filter-button.png and /dev/null differ diff --git a/docs/userguide/images/filter-filterview.png b/docs/userguide/images/filter-filterview.png index 561996668..e09f34b4d 100644 Binary files a/docs/userguide/images/filter-filterview.png and b/docs/userguide/images/filter-filterview.png differ diff --git a/docs/userguide/images/filter-save.png b/docs/userguide/images/filter-save.png deleted file mode 100644 index 96db574c6..000000000 Binary files a/docs/userguide/images/filter-save.png and /dev/null differ diff --git a/docs/userguide/images/getting-started-add-monitor-general.png b/docs/userguide/images/getting-started-add-monitor-general.png index 9b722907d..cf4c93487 100644 Binary files a/docs/userguide/images/getting-started-add-monitor-general.png and b/docs/userguide/images/getting-started-add-monitor-general.png differ diff --git a/docs/userguide/images/getting-started-add-monitor-live.png b/docs/userguide/images/getting-started-add-monitor-live.png deleted file mode 100644 index a1d7f4100..000000000 Binary files a/docs/userguide/images/getting-started-add-monitor-live.png and /dev/null differ diff --git a/docs/userguide/images/getting-started-add-monitor-modect-ready.png b/docs/userguide/images/getting-started-add-monitor-modect-ready.png index 338a0e097..fcac21140 100644 Binary files a/docs/userguide/images/getting-started-add-monitor-modect-ready.png and b/docs/userguide/images/getting-started-add-monitor-modect-ready.png differ diff --git a/docs/userguide/images/getting-started-add-monitor-modect.png b/docs/userguide/images/getting-started-add-monitor-modect.png deleted file mode 100644 index bc6795b37..000000000 Binary files a/docs/userguide/images/getting-started-add-monitor-modect.png and /dev/null differ diff --git a/docs/userguide/images/getting-started-add-monitor-orange.png b/docs/userguide/images/getting-started-add-monitor-orange.png deleted file mode 100644 index 9d5e227aa..000000000 Binary files a/docs/userguide/images/getting-started-add-monitor-orange.png and /dev/null differ diff --git a/docs/userguide/images/getting-started-add-monitor-source.png b/docs/userguide/images/getting-started-add-monitor-source.png index e8b19925e..a3b9324f5 100644 Binary files a/docs/userguide/images/getting-started-add-monitor-source.png and b/docs/userguide/images/getting-started-add-monitor-source.png differ diff --git a/docs/userguide/images/getting-started-audit-event.png b/docs/userguide/images/getting-started-audit-event.png new file mode 100644 index 000000000..91e1386d8 Binary files /dev/null and b/docs/userguide/images/getting-started-audit-event.png differ diff --git a/docs/userguide/images/getting-started-enable-auth.png b/docs/userguide/images/getting-started-enable-auth.png index 9160ffecc..ec376c478 100644 Binary files a/docs/userguide/images/getting-started-enable-auth.png and b/docs/userguide/images/getting-started-enable-auth.png differ diff --git a/docs/userguide/images/getting-started-login.png b/docs/userguide/images/getting-started-login.png index d981048c0..6b6c8e05d 100644 Binary files a/docs/userguide/images/getting-started-login.png and b/docs/userguide/images/getting-started-login.png differ diff --git a/docs/userguide/images/getting-started-modern-look.png b/docs/userguide/images/getting-started-modern-look.png index 34dbcdfc8..6cb62718c 100644 Binary files a/docs/userguide/images/getting-started-modern-look.png and b/docs/userguide/images/getting-started-modern-look.png differ diff --git a/docs/userguide/images/getting-started-timezone.png b/docs/userguide/images/getting-started-timezone.png new file mode 100644 index 000000000..e372eb8b0 Binary files /dev/null and b/docs/userguide/images/getting-started-timezone.png differ diff --git a/docs/userguide/images/getting-started-understand-console.png b/docs/userguide/images/getting-started-understand-console.png index f332b4977..89c735992 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/viewevents-stream.png b/docs/userguide/images/viewevents-stream.png index 672a74e4d..a1448e0bc 100644 Binary files a/docs/userguide/images/viewevents-stream.png and b/docs/userguide/images/viewevents-stream.png differ diff --git a/docs/userguide/images/viewmonitor-main.png b/docs/userguide/images/viewmonitor-main.png index 74354f0b0..80791ebb6 100644 Binary files a/docs/userguide/images/viewmonitor-main.png and b/docs/userguide/images/viewmonitor-main.png differ diff --git a/docs/userguide/images/viewmonitor-stream.png b/docs/userguide/images/viewmonitor-stream.png index 126a67bb2..58c35952c 100644 Binary files a/docs/userguide/images/viewmonitor-stream.png and b/docs/userguide/images/viewmonitor-stream.png differ diff --git a/docs/userguide/images/zm-system-overview.jpg b/docs/userguide/images/zm-system-overview.jpg index 1624e44c6..61594a337 100644 Binary files a/docs/userguide/images/zm-system-overview.jpg and b/docs/userguide/images/zm-system-overview.jpg differ diff --git a/docs/userguide/images/zm-system-overview.xml b/docs/userguide/images/zm-system-overview.xml index d0d55d5d0..8cbd3b3ca 100644 --- a/docs/userguide/images/zm-system-overview.xml +++ b/docs/userguide/images/zm-system-overview.xml @@ -1,2 +1 @@ - - \ No newline at end of file +7V1Zk6s2Fv41XZU82AWI9bGXdCZTuVW3pieVe/MyRRvazTS2HMC9/fqRAGF0JGyBhU33XKfS1yxmOct3VkkX6Hr1+msWbh6/4ChOLywjer1ANxeWZZqBTf6he96qPR4yqx3LLInqk3Y77pL3uN5p1Hu3SRTn3IkFxmmRbPidC7xex4uC2xdmGX7hT3vAKX/XTbiMhR13izAV9/6ZRMUjey832B34R5wsH+tb+5ZbHbgPF0/LDG/X9f0uLPRQfqrDq5Bdq37R/DGM8EtrF/rlAl1nGBfVt9XrdZxS2jKyVb+77TjaPHcWrwuVH1jVD57DdBuzJy6fq3hjtHh5TIr4bhMu6PYL4fcFunosVinZMslX8Y71QzzHWRG/tnbVT/BrjFdxkb2RU+qjNqNGLS1+vfnSIr1X73tsUd1kJ4Y1u5fNpXevTL7Uby2nABIo8NeXa/MMVHBMh6OCaYhkcCVUQBqIYMuIcA5REIhgn44IjowI6wkQoUGLExDBPwwI8Tq6pBhLttZ4HfOvH78mxTfy3Zg79dZ3ukW/r8mjtA7Rze/sV+voNqHPVJ4ZhfljHB2iZ4632SLmWFeE2TIuOJGOIw7pRZq3aOpIaMr2ZXEaFskzbx9khK7v8BUn5Hl3LAUQ17CUXaJ6m/pXbcCGF/L4CzXAyC5U0UC4UMn35rWVRCGQ6MPlOZDRtsE7S5BRxjsd+sA8Ep4KZ7GSkAoSaByNCqaMCufARkgFGTaORgUFb2mC4MiY10ZHJtYH4ZGRvQt2FOFTHSltu8P49UVKO3Dkj6wfKS0RJHoKRsP+NvN3YvKtJUCtI5xg5OR9CnaLRRrmebJgu+vTlEUmECUG9RQYB6KVM5bAIIAI7E69BcY5cCGNAiPi6ccWGIYnQzwwRn4XSIwzmsRAG+IMlRj3wIU0SszRtmdqEiOxSs6RRskdS2Ics+NOvd13y9l/IY0SI2Y2BIlpyQd1wZJFmP4e3sfpV5wnRYLX5Ng9Lgq8ap1wmSZLeqDAm5L3GX5qkmRWs+capzgrb4IMwzduqfg8EBFp7a8TY+QXLAnG+TdGdWRDH3X1uqSJxnmCc2+eLPA6nz8nUYz/Q76S58rD6mGvMlzUX29mNDukxeV0hfDDE8QMScTMdLrFTNXlZHnFH0zUzUTbPx0TvR9MHIWJTbrqFEwUM2Pvq5ewWDzON6nAzlMkCX2OFoj5W+0koSPSQkcgjETT8r6KFuchhA2ypSclhJg4FyjQ8sp2LpM0KWC7FkwLkO9f4ywhDxZn9b5OkrW9KyatU0l/2gGvuMHQ9KfNS73lIP5C+vwnJJreFV4nBQFNQv4ML+I8v7DctKBQmTyTr0v6tYSECC/ZIXKb1lFBOoiQF7w8ZHGevIf35Qklv9FVWAP9grCcyoFgAVZJFNEfXKXUZlw1RUgZxrexvw4TRJFigl0XWOvHudhlOpTVc2bMDWYAa6bNLC1CZUGLzl8APzzk8dFCIBaF+kKcEr37w7/Ba1RgCqDnIYkldC0NqKfgz1Dguas34/Qev/yy23FV7iAHHnGWvON1EaZVqLkfJzsC2MBi2xAp5WGt5aiCKFLNeZ0GRG0fGDpzKIiaMG0xWmaUOWw9QZTADvFd0w+OoZ5GDHVNBslNFKpFqIDzNGP2VS+KiqVEETBU3SRJjqoGBvNCyGwp6Tlzlrh097R03xIiH2DtVHW/8byaqgi4kEbd75fklnJ9mcXxWghuEQxV1dg8LZa6KJgHBvJt13ToX4vni+nOzYAEKZ5b/oVsUu8XAAlHGAtr5LcYDJWpgY+C10xeteC15Xs8Xh/r9GoFZNs6mWoej86uiM49S0sO8JxMy547AfLGKhe4NlHt1sffd/feGi28zHgaLUY/H0ujraM1+lj3CvG84n+vR5cV6jyT0WVP1OWeRT8HtnWgsXUZeF4wbzhYb1177jPzTv+CyFyjGouZrI+lxujsamzythwkHfXosUpWZV+Fn1deugdn4ZpqFdRinTX9iXjTtgu0yxiopvBC7ni5EVmvdSsV0mK8+/eWjgi5ogo6qxXwkpyRxg/F7uguQVJdJd+Ea+llHvC6mOXlqBt6FdPYvJJ/yl8aabKOZ4xB5dG5Jd7ich2mb+T3dGwNTeWscFns2+Vrqnvzz9M7jcMXMGuJl0CGOiTJcrWYnP2QVglJcl5pCDvFvUddCgG3zxUslC8pS9l7LJTySIZj+xGVoWRPQ+tYjUOod5cQUGjeN2dD1fR3mcHI25DfuH8JzOWuO17y1pElcD4IQC3CTbHNKEDVrs515UBQ/aUOKKbQlYWrOP8BWnvKSqcELTEncSPSm/WhLN6IHEQl3c5SfyNxCE8oSbeqLcMRDa0oTr+ITwLvbQwXsb5du8NZ8YiXmJj7dgFPEc95IzB1FxIZIDU+tEkBjmc1YWm6A6IJQcO31mkbekK+54HhYMnA2Ptcwvn19k7sqicYbC/6dcMMdztOLH6MfGCggWefxpGA9yXipMWRUHyfEfwKWVPFB/Er8gKXXgXzHSpPIkryJ3ohyw1X1PxUf6nHERZhSpuBjIQ+0c3VD2+jbUQD3ohKRjSahjmSuyGmW95XRZYsl3F2nkZGmGls4Lrd0zNSI6OjMu5be0vPIT+kI90c+M2OrpYfSUBKvt+8tjfeehoGMOTcO6evIsjK4Kx0YM4De/fhY0vyuHOj/XFHcWRcMJCHeWLaHBOx/4QAaZwRr5YieKX0bfxe3+f0H4rt/B5Jr1LpdVA4p234lLELnEXJeroNoJzWLale1t/BqICbX+h/9JwsjBJy54NRFEMRPR1PTSP3sX49n4ebmWNk710x5fZnfE923MXZMxWufuZEiUc1H5TZ09siIdAoaLtoLtokJJubR4dRcmWzDpDtX//4jfz9afO4KXWW+ln/vPv5k5AYnZbEYtKlJPHl198+Bz2RI/qUMmKyyvRRxFTJy0zFifJNv8uJ+iQlQWR6clHo3zPJX8iCtUVt+Rxwn0CvG+Sq5GfOJp+9xqXrLCgxDJxw+28jukyU4cx3yqlJ40DcoC/L44pZnm1OPaHbMFol4txBLLO/XaWXCzpAYPBI2MkZJY+NzmlKdmojyGHvwSCjpCuyZ7TWqfKSyY462/zVdFk2q4Q1KV22QLBrw/5N5fwtKDMgWK/QZZYAZtj1YE5tZkmMzt9Xm6flmYYT+3xOEklmuhprODG71aQMdCdNJ2wv7eCAaijby65wQrOOwSmJmIHXpWOeylicqYQmVtv3M+aehlRuW1YZ3uxN77rnHS8P5NceOtTTBTNUIcVJ8PrKL3xgpDl08cQ8BZ93vc3i3Y6w2OaCeE800drX+WSarCXH6hiWHrzluT9Kf7SnK7uiz5HthJupmEHoywQDXU2LNQOwzATEI12upgAjejtUPIUMyAeeiSmlEnS/Te8B3nTKaY8Q1gcSwJrQ2rV6W5RkHVMvebKREVVxjTZ0cOzr6PTwaaMH7OWo0hFGvsiSTdEq11UX7ajXMfKvcUFBZfykePUSN3tDYHU++qDpB0nmZbUkiKQlvOk3ufwgl7LxGi3oNU4drL3AI66ujZBjuYZpOmB6L2TODd/1DMcyLGQKeqWK5PQuYIJlT62oPwBu/SnGs8Mmkig3d0FHuXUw6mgHFAzEhKiDS1WdtanEg8ECzD8qCxnMTClmmfu6C35HdK7LXfDFqLlpFvmc0QXTWC3Rhe0aYOIvpEVOZ3DSGiheWuINXww5tXgd4ZpSCWVRRfqCbkXxc0KAQtEFmVIXaKcUavBVPKcj6mjX8iU+J0LdEqW8Do4YKbyv6mmpzpOY9gzgEQSnaw8NpmzIxeqwkkF2p+X+uT5vy+yh3Qoe7ChSjNUHQGQgyyprgMhFuIqzkP58Ey+SByIX5WRxBV7QOeGMvG6pM37axFlacnrxFC7jn1UB9EN0Mvlg7pAmN9KSx0AyxaMWfZfZvmnqu8d57qCJRH2uR4b3bW88UEUIpsIwa6+4NtGASUngndDQcNDqeGTdnjqsIWvu8A6m2HrXKXgTMTk+mHNucJUUiqOpOGlGbykCD8waZLRJkdiy1Jiir//+S5CoTxL0BcfPr1MfJe4XNFvWcaKqNaQLRKde4CnL76bJ+mmvtqsOQQXDXeHEGGrpqf2GbCJ44vrO3HR3H9DNagdz1PpYIO2oDDY+P0YpGC19GSgsvnJucRkuE7uZZXmm8TE3Kzdrd2Ga6TabrrKh3dngQmOuiCpbA2S7icIiLnMCxoz8v91Q4C3HBtOhFP1Cj/ayKYGmNEqzanmjiJLSnSlhqpZIQtbcR4xVMWiU7TQiMwRXs/AlmZiRxpg085pNytPtX1PxVAMzJkAT7uhFcPjq0G4tOHHIiJPPNePqW3LUzMdvVAr6aXuoGiXSUubwDDA+aMYWCj5WrhC47BhtVabRPRuHahLPNGVZPOK3xPlbXsSrvr0VEV5sVyW3TtBfocEgWCZvEBxxeIfb02lStwc9F2PJ4yUlLWcRxmnj3Ruy8ItRq07pd6K2OTh/kwEWxVAeoQGXDR0puybcp35g1eeqS5260igNvTinL9xGSfFhfT7L4lXcNEUdH8/nE53oU+v44ZXroYOnnHpvxGXKmCCsmzLUx0OgV3qkVKn4vN7ex4Ln16kybZBg6gpbNA5DlPcK9ljzfFqLLJpgkLCQCFHOqMCV2EcaNNJMeQ7uo0/oPne7d/wWX2hvumlqv2+AiAcavXXYOVMWivzg115+wRGKTd/aKfj1uVcnH4VfQhuXKWbYR+PX516IfBR+wQXUZMtLj8YvhQETn4pfY5Q/LAOMdzDURi5pYaBC4PapGKhD4UC5yhcD7bHYZSkEKT/YBefLAIGjuGLAaOyyfrCrNxqCINGxTsivKTbpHZ29ZsHyRLIAHkjkOENnBvagpCjOejckULfEQP2xKDZldemWTulQdnzPF0RNrdv3lSA1n6UuaWnsxDMCMOvYpFagbVYtFVeGJ9hoGff0Xd5X0aKsGFyX6lNe4D4uX6HsnCrPTB4owbIKVA8LxuccKtWs1cSUVVKeaPrZufqEhhpkuHq6u/vmEpFKgm/ev17++Pv+edYwuAPc5QvLlPrWGMfdOb9jaotLBv43Loq3u2pQfLgtMM/ePZ0o/WcN4pYuFZHfUgR+ZYVTJfj378n7Q57hv+4WT4unIMJf3v+eyTTqfRU/k5da44KOoilDqwEVuMZh2aXGBcmU0K9TWF04tt3xJHMeN++juyWtg3r/n7msoxjpeS5gpCtj5DjupJyNaNo+5tywgraf2b2QxZ75BoZjnDD5wAHQ2w80Ahaey+d14fS4QytfDl0DqXM1DGSCPhBdy1/A6RI0T2PQoSmiz10ai4vdAMuqa+s+2zVs3X75nbIQ46cP0xyovJKFstPNq80+HNrXNqhtfYsZL6WzYA4GAw5x2Mlmhmk73+50alK+4CimZ/wP \ No newline at end of file diff --git a/docs/userguide/index.rst b/docs/userguide/index.rst index 35bfcf39d..905a87292 100644 --- a/docs/userguide/index.rst +++ b/docs/userguide/index.rst @@ -15,4 +15,5 @@ User Guide cameracontrol mobile logging + configfiles diff --git a/docs/userguide/introduction.rst b/docs/userguide/introduction.rst index 8da67a5e9..a6573a24d 100644 --- a/docs/userguide/introduction.rst +++ b/docs/userguide/introduction.rst @@ -1,15 +1,14 @@ Introduction ============ -Welcome to ZoneMinder, the all-in-one Linux GPL'd security camera solution. +Welcome to ZoneMinder, the all-in-one security camera solution for Linux with GPL License. -Most commercial "security systems" are designed as a monitoring system that also records. Recording quality can vary from bad to unusable, locating the relevant video can range from challenging to impractical, and exporting can often only be done with the manual present. ZoneMinder was designed primarily to record, and allow easy searches and exporting. Recordings are of the best possible quality, easy to filter and find, and simple to export using any system with a web browser. It also monitors. +Commercial "security systems" are often designed as a monitoring system with little attention to recording quality. In such a system, locating and exporting relevant video can be challenging and often requires extensive human intervention. ZoneMinder was designed to provide the best possible record quality while allowing easy searching, filtering and exporting of security footage. -ZoneMinder is designed around a series of independent components that only function when necessary limiting any wasted resource and maximising the efficiency of your machine. A fairly ancient Pentium II PC should be able to track one camera per device at up to 25 frames per second with this dropping by half approximately for each additional camera on the same device. Additional cameras on other devices do not interact so can maintain this frame rate. Even monitoring several cameras still will not overload the CPU as frame processing is designed to synchronise with capture and not stall it. +ZoneMinder is designed around a series of independent components that only function when necessary, limiting any wasted resource and maximising the efficiency of your machine. An outdated Pentium II PC can have multiple recording devices connected to it, and it is able to track one camera per device at up to 25 frames per second, which drops by approximately half for each additional camera on the same device. Additional cameras on devices that do not interact with other devices can maintain the 25 frame rate per second. Monitoring several cameras will not overload the CPU as frame processing is designed to synchronise with capture. -As well as being fast ZoneMinder is designed to be friendly and even more than that, actually useful. As well as the fast video interface core it also comes with a user friendly and comprehensive PHP based web interface allowing you to control and monitor your cameras from home, at work, on the road, or even a web enabled cell phone. It supports variable web capabilities based on available bandwidth. The web interface also allows you to view events that your cameras have captured and archive them or review them time and again, or delete the ones you no longer wish to keep. The web pages directly interact with the core daemons ensuring full co-operation at all times. ZoneMinder can even be installed as a system service ensuring it is right there if your computer has to reboot for any reason. +A fast video interface core, a user-friendly and comprehensive PHP based web interface allows ZoneMinder to be efficient, friendly and most importantly useful. You can control and monitor your cameras from home, at work, on the road, or a web-enabled cell phone. It supports variable web capabilities based on available bandwidth. The web interface also allows you to view events that your cameras have captured, which can be archived, reviewed or deleted. The web application directly interacts with the core daemons ensuring full co-operation at all times. ZoneMinder can also be installed as a system service to reboot a system remotely. -The core of ZoneMinder is the capture and analysis of images and there is a highly configurable set of parameters that allow you to ensure that you can eliminate false positives whilst ensuring that anything you don't want to miss will be captured and saved. ZoneMinder allows you to define a set of 'zones' for each camera of varying sensitivity and functionality. This allows you to eliminate regions that you don't wish to track or define areas that will alarm if various thresholds are exceeded in conjunction with other zones. - -ZoneMinder is free, but if you do find it useful then please feel free to visit http://www.zoneminder.com/donate.html and help to fund future improvements to ZoneMinder. +The core of ZoneMinder is the capture and analysis of images and a highly configurable set of parameters that eliminate false positives whilst ensuring minimum loss of footage. For example, you can define a set of 'zones' for each camera of varying sensitivity and functionality. This eliminates zones that you don't wish to track or define areas that will alarm if various thresholds are exceeded in conjunction with other zones. +ZoneMinder is free under GPL License, but if you do find it useful, then please feel free to visit https://zoneminder.com/donate/ and help us fund our future improvements. diff --git a/docs/userguide/logging.rst b/docs/userguide/logging.rst index 4256079ae..a6dfdb0c0 100644 --- a/docs/userguide/logging.rst +++ b/docs/userguide/logging.rst @@ -1,18 +1,33 @@ Logging ======= -Most components of ZoneMinder can emit informational, warning, error and debug messages in a standard format. These messages can be logged in one or more locations. By default all messages produced by scripts are logged in diff --git a/web/api/app/View/Monitors/json/add.ctp b/web/api/app/View/Monitors/json/add.ctp new file mode 100644 index 000000000..77d2dd08b --- /dev/null +++ b/web/api/app/View/Monitors/json/add.ctp @@ -0,0 +1,2 @@ +echo json_encode($message); +echo json_encode($monitor); diff --git a/web/api/app/View/Monitors/json/daemon_control.ctp b/web/api/app/View/Monitors/json/daemon_control.ctp new file mode 100644 index 000000000..4dbb0a055 --- /dev/null +++ b/web/api/app/View/Monitors/json/daemon_control.ctp @@ -0,0 +1 @@ +echo json_encode($status_text); diff --git a/web/api/app/View/Monitors/xml/add.ctp b/web/api/app/View/Monitors/xml/add.ctp new file mode 100644 index 000000000..09fb8979a --- /dev/null +++ b/web/api/app/View/Monitors/xml/add.ctp @@ -0,0 +1,2 @@ +$xml = Xml::fromArray(array('response' => $message)); +echo $xml->asXML(); diff --git a/web/api/app/View/Monitors/xml/daemon_control.ctp b/web/api/app/View/Monitors/xml/daemon_control.ctp new file mode 100644 index 000000000..8e7d3a290 --- /dev/null +++ b/web/api/app/View/Monitors/xml/daemon_control.ctp @@ -0,0 +1,2 @@ +$xml = Xml::fromArray(array('response' => $status_text)); +echo $xml->asXML(); diff --git a/web/api/app/View/Scaffolds/empty b/web/api/app/View/Scaffolds/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/api/app/View/Servers/xml/index.ctp b/web/api/app/View/Servers/xml/index.ctp index 37afc918b..9bb514fff 100644 --- a/web/api/app/View/Servers/xml/index.ctp +++ b/web/api/app/View/Servers/xml/index.ctp @@ -1,2 +1,2 @@ -$xml = Xml::fromArray(array('response' => $monitors)); +$xml = Xml::fromArray(array('response' => $servers)); echo $xml->asXML(); diff --git a/web/api/app/View/Servers/xml/view.ctp b/web/api/app/View/Servers/xml/view.ctp index b33c6e79a..3b2a3fdad 100644 --- a/web/api/app/View/Servers/xml/view.ctp +++ b/web/api/app/View/Servers/xml/view.ctp @@ -1,2 +1,2 @@ -$xml = Xml::fromArray(array('response' => $monitor)); +$xml = Xml::fromArray(array('response' => $server)); echo $xml->asXML(); diff --git a/web/api/app/View/Users/add.ctp b/web/api/app/View/Users/add.ctp new file mode 100644 index 000000000..fc374d5ca --- /dev/null +++ b/web/api/app/View/Users/add.ctp @@ -0,0 +1,15 @@ + +
+Form->create('User'); ?> +
+ + Form->input('username'); + echo $this->Form->input('password'); + echo $this->Form->input('role', array( + 'options' => array('admin' => 'Admin', 'author' => 'Author') + )); + ?> +
+Form->end(__('Submit')); ?> +
+ diff --git a/web/api/app/View/Users/json/index.ctp b/web/api/app/View/Users/json/index.ctp new file mode 100644 index 000000000..b425392b0 --- /dev/null +++ b/web/api/app/View/Users/json/index.ctp @@ -0,0 +1,5 @@ +Paginator->params(); + echo json_encode($array); +?> diff --git a/web/api/app/View/Users/json/view.ctp b/web/api/app/View/Users/json/view.ctp new file mode 100644 index 000000000..35fe5faa9 --- /dev/null +++ b/web/api/app/View/Users/json/view.ctp @@ -0,0 +1 @@ +echo json_encode($user); diff --git a/web/api/app/View/Users/login.ctp b/web/api/app/View/Users/login.ctp new file mode 100644 index 000000000..335ad3108 --- /dev/null +++ b/web/api/app/View/Users/login.ctp @@ -0,0 +1,13 @@ +
+Session->flash('auth'); ?> +Form->create('User'); ?> +
+ + + + Form->input('username'); + echo $this->Form->input('password'); + ?> +
+Form->end(__('Login')); ?> +
diff --git a/web/api/app/View/Users/xml/index.ctp b/web/api/app/View/Users/xml/index.ctp new file mode 100644 index 000000000..af960238f --- /dev/null +++ b/web/api/app/View/Users/xml/index.ctp @@ -0,0 +1,2 @@ +$xml = Xml::fromArray(array('response' => $events)); +echo $xml->asXML(); diff --git a/web/api/app/View/Users/xml/view.ctp b/web/api/app/View/Users/xml/view.ctp new file mode 100644 index 000000000..7f64e422f --- /dev/null +++ b/web/api/app/View/Users/xml/view.ctp @@ -0,0 +1,2 @@ +$xml = Xml::fromArray(array('response' => $event)); +echo $xml->asXML(); diff --git a/web/api/app/View/View/Elements/empty b/web/api/app/View/View/Elements/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/api/app/View/View/Scaffolds/empty b/web/api/app/View/View/Scaffolds/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/api/app/webroot/.htaccess b/web/api/app/webroot/.htaccess deleted file mode 100644 index f08afa8b2..000000000 --- a/web/api/app/webroot/.htaccess +++ /dev/null @@ -1,7 +0,0 @@ - - RewriteEngine On - RewriteCond %{REQUEST_FILENAME} !-d - RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^ index.php [L] - RewriteBase /zm/api - diff --git a/web/api/app/webroot/files/empty b/web/api/app/webroot/files/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/api/app/webroot/js/empty b/web/api/app/webroot/js/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/api/lib/Cake/Cache/Cache.php b/web/api/lib/Cake/Cache/Cache.php index a7a01d0a1..3db66c4f9 100644 --- a/web/api/lib/Cake/Cache/Cache.php +++ b/web/api/lib/Cake/Cache/Cache.php @@ -1,17 +1,17 @@ _groupPrefix)) { - $prefix = vsprintf($this->_groupPrefix, $this->groups()); + $prefix = md5(implode('_', $this->groups())); } $key = preg_replace('/[\s]+/', '_', strtolower(trim(str_replace(array(DS, '/', '.'), '_', strval($key))))); diff --git a/web/api/lib/Cake/Cache/Engine/ApcEngine.php b/web/api/lib/Cake/Cache/Engine/ApcEngine.php index da31651e3..329e87196 100644 --- a/web/api/lib/Cake/Cache/Engine/ApcEngine.php +++ b/web/api/lib/Cake/Cache/Engine/ApcEngine.php @@ -2,18 +2,18 @@ /** * APC storage engine for cache. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Cache.Engine * @since CakePHP(tm) v 1.2.0.4933 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** @@ -31,6 +31,13 @@ class ApcEngine extends CacheEngine { */ protected $_compiledGroupNames = array(); +/** + * APC or APCu extension + * + * @var string + */ + protected $_apcExtension = 'apc'; + /** * Initialize the Cache Engine * @@ -47,6 +54,10 @@ class ApcEngine extends CacheEngine { } $settings += array('engine' => 'Apc'); parent::init($settings); + if (function_exists('apcu_dec')) { + $this->_apcExtension = 'apcu'; + return true; + } return function_exists('apc_dec'); } @@ -63,8 +74,9 @@ class ApcEngine extends CacheEngine { if ($duration) { $expires = time() + $duration; } - apc_store($key . '_expires', $expires, $duration); - return apc_store($key, $value, $duration); + $func = $this->_apcExtension . '_store'; + $func($key . '_expires', $expires, $duration); + return $func($key, $value, $duration); } /** @@ -75,11 +87,12 @@ class ApcEngine extends CacheEngine { */ public function read($key) { $time = time(); - $cachetime = (int)apc_fetch($key . '_expires'); + $func = $this->_apcExtension . '_fetch'; + $cachetime = (int)$func($key . '_expires'); if ($cachetime !== 0 && ($cachetime < $time || ($time + $this->settings['duration']) < $cachetime)) { return false; } - return apc_fetch($key); + return $func($key); } /** @@ -90,7 +103,8 @@ class ApcEngine extends CacheEngine { * @return New incremented value, false otherwise */ public function increment($key, $offset = 1) { - return apc_inc($key, $offset); + $func = $this->_apcExtension . '_inc'; + return $func($key, $offset); } /** @@ -101,7 +115,8 @@ class ApcEngine extends CacheEngine { * @return New decremented value, false otherwise */ public function decrement($key, $offset = 1) { - return apc_dec($key, $offset); + $func = $this->_apcExtension . '_dec'; + return $func($key, $offset); } /** @@ -111,7 +126,8 @@ class ApcEngine extends CacheEngine { * @return bool True if the value was successfully deleted, false if it didn't exist or couldn't be removed */ public function delete($key) { - return apc_delete($key); + $func = $this->_apcExtension . '_delete'; + return $func($key); } /** @@ -125,19 +141,20 @@ class ApcEngine extends CacheEngine { if ($check) { return true; } + $func = $this->_apcExtension . '_delete'; if (class_exists('APCIterator', false)) { $iterator = new APCIterator( 'user', '/^' . preg_quote($this->settings['prefix'], '/') . '/', APC_ITER_NONE ); - apc_delete($iterator); + $func($iterator); return true; } - $cache = apc_cache_info('user'); + $cache = $this->_apcExtension === 'apc' ? apc_cache_info('user') : apcu_cache_info(); foreach ($cache['cache_list'] as $key) { if (strpos($key['info'], $this->settings['prefix']) === 0) { - apc_delete($key['info']); + $func($key['info']); } } return true; @@ -157,11 +174,13 @@ class ApcEngine extends CacheEngine { } } - $groups = apc_fetch($this->_compiledGroupNames); + $fetchFunc = $this->_apcExtension . '_fetch'; + $storeFunc = $this->_apcExtension . '_store'; + $groups = $fetchFunc($this->_compiledGroupNames); if (count($groups) !== count($this->settings['groups'])) { foreach ($this->_compiledGroupNames as $group) { if (!isset($groups[$group])) { - apc_store($group, 1); + $storeFunc($group, 1); $groups[$group] = 1; } } @@ -184,7 +203,8 @@ class ApcEngine extends CacheEngine { * @return bool success */ public function clearGroup($group) { - apc_inc($this->settings['prefix'] . $group, 1, $success); + $func = $this->_apcExtension . '_inc'; + $func($this->settings['prefix'] . $group, 1, $success); return $success; } @@ -203,7 +223,8 @@ class ApcEngine extends CacheEngine { if ($duration) { $expires = time() + $duration; } - apc_add($key . '_expires', $expires, $duration); - return apc_add($key, $value, $duration); + $func = $this->_apcExtension . '_add'; + $func($key . '_expires', $expires, $duration); + return $func($key, $value, $duration); } } diff --git a/web/api/lib/Cake/Cache/Engine/FileEngine.php b/web/api/lib/Cake/Cache/Engine/FileEngine.php index d650e60ee..9b8eae0a7 100644 --- a/web/api/lib/Cake/Cache/Engine/FileEngine.php +++ b/web/api/lib/Cake/Cache/Engine/FileEngine.php @@ -6,17 +6,17 @@ * * You can configure a FileEngine cache, using Cache::config() * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2.0.4933 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** @@ -132,7 +132,7 @@ class FileEngine extends CacheEngine { } $expires = time() + $duration; - $contents = $expires . $lineBreak . $data . $lineBreak; + $contents = implode(array($expires, $lineBreak, $data, $lineBreak)); if ($this->settings['lock']) { $this->_File->flock(LOCK_EX); @@ -267,6 +267,10 @@ class FileEngine extends CacheEngine { } $dir = dir($path); + if ($dir === false) { + return; + } + while (($entry = $dir->read()) !== false) { if (substr($entry, 0, $prefixLength) !== $this->settings['prefix']) { continue; diff --git a/web/api/lib/Cake/Cache/Engine/MemcacheEngine.php b/web/api/lib/Cake/Cache/Engine/MemcacheEngine.php index eba2ec451..d70c1c56d 100644 --- a/web/api/lib/Cake/Cache/Engine/MemcacheEngine.php +++ b/web/api/lib/Cake/Cache/Engine/MemcacheEngine.php @@ -2,18 +2,18 @@ /** * Memcache storage engine for cache * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Cache.Engine * @since CakePHP(tm) v 1.2.0.4933 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** diff --git a/web/api/lib/Cake/Cache/Engine/MemcachedEngine.php b/web/api/lib/Cake/Cache/Engine/MemcachedEngine.php index cc101a2bf..655eb5d1c 100644 --- a/web/api/lib/Cake/Cache/Engine/MemcachedEngine.php +++ b/web/api/lib/Cake/Cache/Engine/MemcachedEngine.php @@ -1,16 +1,16 @@ _Redis->get($key); - if (ctype_digit($value)) { - $value = (int)$value; + if (preg_match('/^[-]?\d+$/', $value)) { + return (int)$value; } if ($value !== false && is_string($value)) { - $value = unserialize($value); + return unserialize($value); } return $value; } diff --git a/web/api/lib/Cake/Cache/Engine/WincacheEngine.php b/web/api/lib/Cake/Cache/Engine/WincacheEngine.php index e5c9d7bd7..dc8348171 100644 --- a/web/api/lib/Cake/Cache/Engine/WincacheEngine.php +++ b/web/api/lib/Cake/Cache/Engine/WincacheEngine.php @@ -4,18 +4,18 @@ * * Supports wincache 1.1.0 and higher. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Cache.Engine * @since CakePHP(tm) v 1.2.0.4933 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** diff --git a/web/api/lib/Cake/Cache/Engine/XcacheEngine.php b/web/api/lib/Cake/Cache/Engine/XcacheEngine.php index c46a7b9c5..2ce3324f1 100644 --- a/web/api/lib/Cake/Cache/Engine/XcacheEngine.php +++ b/web/api/lib/Cake/Cache/Engine/XcacheEngine.php @@ -2,18 +2,18 @@ /** * Xcache storage engine for cache. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Cache.Engine * @since CakePHP(tm) v 1.2.0.4947 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** diff --git a/web/api/lib/Cake/Config/cacert.pem b/web/api/lib/Cake/Config/cacert.pem index 4ef2da5c9..b4109e40a 100644 --- a/web/api/lib/Cake/Config/cacert.pem +++ b/web/api/lib/Cake/Config/cacert.pem @@ -1,76 +1,25 @@ ## -## ca-bundle.crt -- Bundle of CA Root Certificates +## Bundle of CA Root Certificates ## -## Certificate data from Mozilla as of: Thu Oct 18 19:05:59 2012 +## Certificate data from Mozilla as of: Wed Jan 20 04:12:04 2016 +## +## The Equifax Secure CA was readded as there were replies to the issue +## that updated this certificate bundle. ## ## This is a bundle of X.509 certificates of public Certificate Authorities ## (CA). These were automatically extracted from Mozilla's root certificates -## file (certdata.txt). This file can be found in the mozilla source tree: -## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1 +## file (certdata.txt). This file can be found in the mozilla source tree: +## http://hg.mozilla.org/releases/mozilla-release/raw-file/default/security/nss/lib/ckfw/builtins/certdata.txt ## ## It contains the certificates in PEM format and therefore ## can be directly used with curl / libcurl / php_curl, or with ## an Apache+mod_ssl webserver for SSL client authentication. ## Just configure this file as the SSLCACertificateFile. ## - -# @(#) $RCSfile: certdata.txt,v $ $Revision: 1.86 $ $Date: 2012/10/18 16:26:52 $ - -GTE CyberTrust Global Root -========================== ------BEGIN CERTIFICATE----- -MIICWjCCAcMCAgGlMA0GCSqGSIb3DQEBBAUAMHUxCzAJBgNVBAYTAlVTMRgwFgYDVQQKEw9HVEUg -Q29ycG9yYXRpb24xJzAlBgNVBAsTHkdURSBDeWJlclRydXN0IFNvbHV0aW9ucywgSW5jLjEjMCEG -A1UEAxMaR1RFIEN5YmVyVHJ1c3QgR2xvYmFsIFJvb3QwHhcNOTgwODEzMDAyOTAwWhcNMTgwODEz -MjM1OTAwWjB1MQswCQYDVQQGEwJVUzEYMBYGA1UEChMPR1RFIENvcnBvcmF0aW9uMScwJQYDVQQL -Ex5HVEUgQ3liZXJUcnVzdCBTb2x1dGlvbnMsIEluYy4xIzAhBgNVBAMTGkdURSBDeWJlclRydXN0 -IEdsb2JhbCBSb290MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCVD6C28FCc6HrHiM3dFw4u -sJTQGz0O9pTAipTHBsiQl8i4ZBp6fmw8U+E3KHNgf7KXUwefU/ltWJTSr41tiGeA5u2ylc9yMcql -HHK6XALnZELn+aks1joNrI1CqiQBOeacPwGFVw1Yh0X404Wqk2kmhXBIgD8SFcd5tB8FLztimQID -AQABMA0GCSqGSIb3DQEBBAUAA4GBAG3rGwnpXtlR22ciYaQqPEh346B8pt5zohQDhT37qw4wxYMW -M4ETCJ57NE7fQMh017l93PR2VX2bY1QY6fDq81yx2YtCHrnAlU66+tXifPVoYb+O7AWXX1uw16OF -NMQkpw0PlZPvy5TYnh+dXIVtx6quTx8itc2VrbqnzPmrC3p/ ------END CERTIFICATE----- - -Thawte Server CA -================ ------BEGIN CERTIFICATE----- -MIIDEzCCAnygAwIBAgIBATANBgkqhkiG9w0BAQQFADCBxDELMAkGA1UEBhMCWkExFTATBgNVBAgT -DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs -dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcGA1UE -AxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0ZS5j -b20wHhcNOTYwODAxMDAwMDAwWhcNMjAxMjMxMjM1OTU5WjCBxDELMAkGA1UEBhMCWkExFTATBgNV -BAgTDFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29u -c3VsdGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEZMBcG -A1UEAxMQVGhhd3RlIFNlcnZlciBDQTEmMCQGCSqGSIb3DQEJARYXc2VydmVyLWNlcnRzQHRoYXd0 -ZS5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANOkUG7I/1Zr5s9dtuoMaHVHoqrC2oQl -/Kj0R1HahbUgdJSGHg91yekIYfUGbTBuFRkC6VLAYttNmZ7iagxEOM3+vuNkCXDF/rFrKbYvScg7 -1CcEJRCXL+eQbcAoQpnXTEPew/UhbVSfXcNY4cDk2VuwuNy0e982OsK1ZiIS1ocNAgMBAAGjEzAR -MA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAB/pMaVz7lcxG7oWDTSEwjsrZqG9J -GubaUeNgcGyEYRGhGshIPllDfU+VPaGLtwtimHp1it2ITk6eQNuozDJ0uW8NxuOzRAvZim+aKZuZ -GCg70eNAKJpaPNW15yAbi8qkq43pUdniTCxZqdq5snUb9kLy78fyGPmJvKP/iiMucEc= ------END CERTIFICATE----- - -Thawte Premium Server CA -======================== ------BEGIN CERTIFICATE----- -MIIDJzCCApCgAwIBAgIBATANBgkqhkiG9w0BAQQFADCBzjELMAkGA1UEBhMCWkExFTATBgNVBAgT -DFdlc3Rlcm4gQ2FwZTESMBAGA1UEBxMJQ2FwZSBUb3duMR0wGwYDVQQKExRUaGF3dGUgQ29uc3Vs -dGluZyBjYzEoMCYGA1UECxMfQ2VydGlmaWNhdGlvbiBTZXJ2aWNlcyBEaXZpc2lvbjEhMB8GA1UE -AxMYVGhhd3RlIFByZW1pdW0gU2VydmVyIENBMSgwJgYJKoZIhvcNAQkBFhlwcmVtaXVtLXNlcnZl -ckB0aGF3dGUuY29tMB4XDTk2MDgwMTAwMDAwMFoXDTIwMTIzMTIzNTk1OVowgc4xCzAJBgNVBAYT -AlpBMRUwEwYDVQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU -VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2 -aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBDQTEoMCYGCSqGSIb3DQEJARYZ -cHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0jY2 -aovXwlue2oFBYo847kkEVdbQ7xwblRZH7xhINTpS9CtqBo87L+pW46+GjZ4X9560ZXUCTe/LCaIh -Udib0GfQug2SBhRz1JPLlyoAnFxODLz6FVL88kRu2hFKbgifLy3j+ao6hnO2RlNYyIkFvYMRuHM/ -qgeN9EJN50CdHDcCAwEAAaMTMBEwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQQFAAOBgQAm -SCwWwlj66BZ0DKqqX1Q/8tfJeGBeXm43YyJ3Nn6yF8Q0ufUIhfzJATj/Tb7yFkJD57taRvvBxhEf -8UqwKEbJw8RCfbz6q1lu1bdRiBHjpIUZa4JMpAwSremkrj/xw0llmozFyD4lt5SZu5IycQfwhl7t -UCemDaYj+bvLpgcUQg== ------END CERTIFICATE----- - +## Conversion done with mk-ca-bundle.pl version 1.25. +## SHA1: 0ab47e2f41518f8d223eab517cb799e5b071231e +## +# Equifax Secure CA ================= -----BEGIN CERTIFICATE----- @@ -91,118 +40,6 @@ BIZCe/zuf6IWUrVnZ9NA2zsmWLIodz2uFHdh1voqZiegDfqnc1zqcPGUIWVEX/r87yloqaKHee95 70+sB3c4 -----END CERTIFICATE----- -Digital Signature Trust Co. Global CA 1 -======================================= ------BEGIN CERTIFICATE----- -MIIDKTCCApKgAwIBAgIENnAVljANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE -ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMTAeFw05ODEy -MTAxODEwMjNaFw0xODEyMTAxODQwMjNaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs -IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUxMIGdMA0GCSqGSIb3DQEBAQUA -A4GLADCBhwKBgQCgbIGpzzQeJN3+hijM3oMv+V7UQtLodGBmE5gGHKlREmlvMVW5SXIACH7TpWJE -NySZj9mDSI+ZbZUTu0M7LklOiDfBu1h//uG9+LthzfNHwJmm8fOR6Hh8AMthyUQncWlVSn5JTe2i -o74CTADKAqjuAQIxZA9SLRN0dja1erQtcQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo -BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0 -dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTExDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw -IoAPMTk5ODEyMTAxODEwMjNagQ8yMDE4MTIxMDE4MTAyM1owCwYDVR0PBAQDAgEGMB8GA1UdIwQY -MBaAFGp5fpFpRhgTCgJ3pVlbYJglDqL4MB0GA1UdDgQWBBRqeX6RaUYYEwoCd6VZW2CYJQ6i+DAM -BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB -ACIS2Hod3IEGtgllsofIH160L+nEHvI8wbsEkBFKg05+k7lNQseSJqBcNJo4cvj9axY+IO6CizEq -kzaFI4iKPANo08kJD038bKTaKHKTDomAsH3+gG9lbRgzl4vCa4nuYD3Im+9/KzJic5PLPON74nZ4 -RbyhkwS7hp86W0N6w4pl ------END CERTIFICATE----- - -Digital Signature Trust Co. Global CA 3 -======================================= ------BEGIN CERTIFICATE----- -MIIDKTCCApKgAwIBAgIENm7TzjANBgkqhkiG9w0BAQUFADBGMQswCQYDVQQGEwJVUzEkMCIGA1UE -ChMbRGlnaXRhbCBTaWduYXR1cmUgVHJ1c3QgQ28uMREwDwYDVQQLEwhEU1RDQSBFMjAeFw05ODEy -MDkxOTE3MjZaFw0xODEyMDkxOTQ3MjZaMEYxCzAJBgNVBAYTAlVTMSQwIgYDVQQKExtEaWdpdGFs -IFNpZ25hdHVyZSBUcnVzdCBDby4xETAPBgNVBAsTCERTVENBIEUyMIGdMA0GCSqGSIb3DQEBAQUA -A4GLADCBhwKBgQC/k48Xku8zExjrEH9OFr//Bo8qhbxe+SSmJIi2A7fBw18DW9Fvrn5C6mYjuGOD -VvsoLeE4i7TuqAHhzhy2iCoiRoX7n6dwqUcUP87eZfCocfdPJmyMvMa1795JJ/9IKn3oTQPMx7JS -xhcxEzu1TdvIxPbDDyQq2gyd55FbgM2UnQIBA6OCASQwggEgMBEGCWCGSAGG+EIBAQQEAwIABzBo -BgNVHR8EYTBfMF2gW6BZpFcwVTELMAkGA1UEBhMCVVMxJDAiBgNVBAoTG0RpZ2l0YWwgU2lnbmF0 -dXJlIFRydXN0IENvLjERMA8GA1UECxMIRFNUQ0EgRTIxDTALBgNVBAMTBENSTDEwKwYDVR0QBCQw -IoAPMTk5ODEyMDkxOTE3MjZagQ8yMDE4MTIwOTE5MTcyNlowCwYDVR0PBAQDAgEGMB8GA1UdIwQY -MBaAFB6CTShlgDzJQW6sNS5ay97u+DlbMB0GA1UdDgQWBBQegk0oZYA8yUFurDUuWsve7vg5WzAM -BgNVHRMEBTADAQH/MBkGCSqGSIb2fQdBAAQMMAobBFY0LjADAgSQMA0GCSqGSIb3DQEBBQUAA4GB -AEeNg61i8tuwnkUiBbmi1gMOOHLnnvx75pO2mqWilMg0HZHRxdf0CiUPPXiBng+xZ8SQTGPdXqfi -up/1902lMXucKS1M/mQ+7LZT/uqb7YLbdHVLB3luHtgZg3Pe9T7Qtd7nS2h9Qy4qIOF+oHhEngj1 -mPnHfxsb1gYgAlihw6ID ------END CERTIFICATE----- - -Verisign Class 3 Public Primary Certification Authority -======================================================= ------BEGIN CERTIFICATE----- -MIICPDCCAaUCEHC65B0Q2Sk0tjjKewPMur8wDQYJKoZIhvcNAQECBQAwXzELMAkGA1UEBhMCVVMx -FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMTIzNTk1OVow -XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz -IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 -f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol -hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBAgUAA4GBALtMEivPLCYA -TxQT3ab7/AoRhIzzKBxnki98tsX63/Dolbwdj2wsqFHMc9ikwFPwTtYmwHYBV4GSXiHx0bH/59Ah -WM1pF+NEHJwZRDmJXNycAA9WjQKZ7aKQRUzkuxCkPfAyAw7xzvjoyVGM5mKf5p/AfbdynMk2Omuf -Tqj/ZA1k ------END CERTIFICATE----- - -Verisign Class 1 Public Primary Certification Authority - G2 -============================================================ ------BEGIN CERTIFICATE----- -MIIDAjCCAmsCEEzH6qqYPnHTkxD4PTqJkZIwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz -dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMSBQdWJsaWMgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz -dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCq0Lq+Fi24g9TK0g+8djHKlNgd -k4xWArzZbxpvUjZudVYKVdPfQ4chEWWKfo+9Id5rMj8bhDSVBZ1BNeuS65bdqlk/AVNtmU/t5eIq -WpDBucSmFc/IReumXY6cPvBkJHalzasab7bYe1FhbqZ/h8jit+U03EGI6glAvnOSPWvndQIDAQAB -MA0GCSqGSIb3DQEBBQUAA4GBAKlPww3HZ74sy9mozS11534Vnjty637rXC0Jh9ZrbWB85a7FkCMM -XErQr7Fd88e2CtvgFZMN3QO8x3aKtd1Pw5sTdbgBwObJW2uluIncrKTdcu1OofdPvAbT6shkdHvC -lUGcZXNY8ZCaPGqxmMnEh7zPRW1F4m4iP/68DzFc6PLZ ------END CERTIFICATE----- - -Verisign Class 2 Public Primary Certification Authority - G2 -============================================================ ------BEGIN CERTIFICATE----- -MIIDAzCCAmwCEQC5L2DMiJ+hekYJuFtwbIqvMA0GCSqGSIb3DQEBBQUAMIHBMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGljIFByaW1h -cnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNp -Z24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1 -c3QgTmV0d29yazAeFw05ODA1MTgwMDAwMDBaFw0yODA4MDEyMzU5NTlaMIHBMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xPDA6BgNVBAsTM0NsYXNzIDIgUHVibGljIFByaW1h -cnkgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMjE6MDgGA1UECxMxKGMpIDE5OTggVmVyaVNp -Z24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ugb25seTEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1 -c3QgTmV0d29yazCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAp4gBIXQs5xoD8JjhlzwPIQjx -nNuX6Zr8wgQGE75fUsjMHiwSViy4AWkszJkfrbCWrnkE8hM5wXuYuggs6MKEEyyqaekJ9MepAqRC -wiNPStjwDqL7MWzJ5m+ZJwf15vRMeJ5t60aG+rmGyVTyssSv1EYcWskVMP8NbPUtDm3Of3cCAwEA -ATANBgkqhkiG9w0BAQUFAAOBgQByLvl/0fFx+8Se9sVeUYpAmLho+Jscg9jinb3/7aHmZuovCfTK -1+qlK5X2JGCGTUQug6XELaDTrnhpb3LabK4I8GOSN+a7xDAXrXfMSTWqz9iP0b63GJZHc2pUIjRk -LbYWm1lbtFFZOrMLFPQS32eg9K0yZF6xRnInjBJ7xUS0rg== ------END CERTIFICATE----- - -Verisign Class 3 Public Primary Certification Authority - G2 -============================================================ ------BEGIN CERTIFICATE----- -MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz -dCBOZXR3b3JrMB4XDTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMgUHJpbWFy -eSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2ln -biwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVz -dCBOZXR3b3JrMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMXtERXVxp0KvTuWpMmR9ZmDCO -FoUgRm1HP9SFIIThbbP4pO0M8RcPO/mn+SXXwc+EY/J8Y8+iR/LGWzOOZEAEaMGAuWQcRXfH2G71 -lSk8UOg013gfqLptQ5GVj0VXXn7F+8qkBOvqlzdUMG+7AUcyM83cV5tkaWH4mx0ciU9cZwIDAQAB -MA0GCSqGSIb3DQEBBQUAA4GBAFFNzb5cy5gZnBWyATl4Lk0PZ3BwmcYQWpSkU01UbSuvDV1Ai2TT -1+7eVmGSX6bEHRBhNtMsJzzoKQm5EWR0zLVznxxIqbxhAe7iF6YM40AIOw7n60RzKprxaZLvcRTD -Oaxxp5EJb+RxBrO6WVcmeQD2+A2iMzAo1KpYoJ2daZH9 ------END CERTIFICATE----- GlobalSign Root CA ================== @@ -247,111 +84,6 @@ BgkqhkiG9w0BAQUFAAOCAQEAmYFThxxol4aR7OBKuEQLq4GsJ0/WwbgcQ3izDJr86iw8bmEbTUsp TBj0/VLZjmmx6BEP3ojY+x1J96relc8geMJgEtslQIxq/H5COEBkEveegeGTLg== -----END CERTIFICATE----- -ValiCert Class 1 VA -=================== ------BEGIN CERTIFICATE----- -MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp -b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs -YXNzIDEgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh -bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNTIy -MjM0OFoXDTE5MDYyNTIyMjM0OFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 -d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDEg -UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 -LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDYWYJ6ibiWuqYvaG9YLqdUHAZu9OqNSLwxlBfw8068srg1knaw0KWlAdcAAxIi -GQj4/xEjm84H9b9pGib+TunRf50sQB1ZaG6m+FiwnRqP0z/x3BkGgagO4DrdyFNFCQbmD3DD+kCm -DuJWBQ8YTfwggtFzVXSNdnKgHZ0dwN0/cQIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFBoPUn0LBwG -lN+VYH+Wexf+T3GtZMjdd9LvWVXoP+iOBSoh8gfStadS/pyxtuJbdxdA6nLWI8sogTLDAHkY7FkX -icnGah5xyf23dKUlRWnFSKsZ4UWKJWsZ7uW7EvV/96aNUcPwnXS3qT6gpf+2SQMT2iLM7XGCK5nP -Orf1LXLI ------END CERTIFICATE----- - -ValiCert Class 2 VA -=================== ------BEGIN CERTIFICATE----- -MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp -b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs -YXNzIDIgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh -bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw -MTk1NFoXDTE5MDYyNjAwMTk1NFowgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 -d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDIg -UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 -LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDOOnHK5avIWZJV16vYdA757tn2VUdZZUcOBVXc65g2PFxTXdMwzzjsvUGJ7SVC -CSRrCl6zfN1SLUzm1NZ9WlmpZdRJEy0kTRxQb7XBhVQ7/nHk01xC+YDgkRoKWzk2Z/M/VXwbP7Rf -ZHM047QSv4dk+NoS/zcnwbNDu+97bi5p9wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBADt/UG9vUJSZ -SWI4OB9L+KXIPqeCgfYrx+jFzug6EILLGACOTb2oWH+heQC1u+mNr0HZDzTuIYEZoDJJKPTEjlbV -UjP9UNV+mWwD5MlM/Mtsq2azSiGM5bUMMj4QssxsodyamEwCW/POuZ6lcg5Ktz885hZo+L7tdEy8 -W9ViH0Pd ------END CERTIFICATE----- - -RSA Root Certificate 1 -====================== ------BEGIN CERTIFICATE----- -MIIC5zCCAlACAQEwDQYJKoZIhvcNAQEFBQAwgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRp -b24gTmV0d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENs -YXNzIDMgUG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZh -bGljZXJ0LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMB4XDTk5MDYyNjAw -MjIzM1oXDTE5MDYyNjAwMjIzM1owgbsxJDAiBgNVBAcTG1ZhbGlDZXJ0IFZhbGlkYXRpb24gTmV0 -d29yazEXMBUGA1UEChMOVmFsaUNlcnQsIEluYy4xNTAzBgNVBAsTLFZhbGlDZXJ0IENsYXNzIDMg -UG9saWN5IFZhbGlkYXRpb24gQXV0aG9yaXR5MSEwHwYDVQQDExhodHRwOi8vd3d3LnZhbGljZXJ0 -LmNvbS8xIDAeBgkqhkiG9w0BCQEWEWluZm9AdmFsaWNlcnQuY29tMIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDjmFGWHOjVsQaBalfDcnWTq8+epvzzFlLWLU2fNUSoLgRNB0mKOCn1dzfnt6td -3zZxFJmP3MKS8edgkpfs2Ejcv8ECIMYkpChMMFp2bbFc893enhBxoYjHW5tBbcqwuI4V7q0zK89H -BFx1cQqYJJgpp0lZpd34t0NiYfPT4tBVPwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFa7AliEZwgs -3x/be0kz9dNnnfS0ChCzycUs4pJqcXgn8nCDQtM+z6lU9PHYkhaM0QTLS6vJn0WuPIqpsHEzXcjF -V9+vqDWzf4mH6eglkrh/hXqu1rweN1gqZ8mRzyqBPu3GOd/APhmcGcwTTYJBtYze4D1gCCAPRX5r -on+jjBXu ------END CERTIFICATE----- - -Verisign Class 1 Public Primary Certification Authority - G3 -============================================================ ------BEGIN CERTIFICATE----- -MIIEGjCCAwICEQCLW3VWhFSFCwDPrzhIzrGkMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv -cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl -IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDEgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw -CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy -dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDEgUHVibGljIFByaW1hcnkg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAN2E1Lm0+afY8wR4nN493GwTFtl63SRRZsDHJlkNrAYIwpTRMx/wgzUfbhvI3qpuFU5UJ+/E -bRrsC+MO8ESlV8dAWB6jRx9x7GD2bZTIGDnt/kIYVt/kTEkQeE4BdjVjEjbdZrwBBDajVWjVojYJ -rKshJlQGrT/KFOCsyq0GHZXi+J3x4GD/wn91K0zM2v6HmSHquv4+VNfSWXjbPG7PoBMAGrgnoeS+ -Z5bKoMWznN3JdZ7rMJpfo83ZrngZPyPpXNspva1VyBtUjGP26KbqxzcSXKMpHgLZ2x87tNcPVkeB -FQRKr4Mn0cVYiMHd9qqnoxjaaKptEVHhv2Vrn5Z20T0CAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA -q2aN17O6x5q25lXQBfGfMY1aqtmqRiYPce2lrVNWYgFHKkTp/j90CxObufRNG7LRX7K20ohcs5/N -y9Sn2WCVhDr4wTcdYcrnsMXlkdpUpqwxga6X3s0IrLjAl4B/bnKk52kTlWUfxJM8/XmPBNQ+T+r3 -ns7NZ3xPZQL/kYVUc8f/NveGLezQXk//EZ9yBta4GvFMDSZl4kSAHsef493oCtrspSCAaWihT37h -a88HQfqDjrw43bAuEbFrskLMmrz5SCJ5ShkPshw+IHTZasO+8ih4E1Z5T21Q6huwtVexN2ZYI/Pc -D98Kh8TvhgXVOBRgmaNL3gaWcSzy27YfpO8/7g== ------END CERTIFICATE----- - -Verisign Class 2 Public Primary Certification Authority - G3 -============================================================ ------BEGIN CERTIFICATE----- -MIIEGTCCAwECEGFwy0mMX5hFKeewptlQW3owDQYJKoZIhvcNAQEFBQAwgcoxCzAJBgNVBAYTAlVT -MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1c3QgTmV0d29y -azE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9yaXplZCB1c2Ug -b25seTFFMEMGA1UEAxM8VmVyaVNpZ24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0 -aW9uIEF1dGhvcml0eSAtIEczMB4XDTk5MTAwMTAwMDAwMFoXDTM2MDcxNjIzNTk1OVowgcoxCzAJ -BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjEfMB0GA1UECxMWVmVyaVNpZ24gVHJ1 -c3QgTmV0d29yazE6MDgGA1UECxMxKGMpIDE5OTkgVmVyaVNpZ24sIEluYy4gLSBGb3IgYXV0aG9y -aXplZCB1c2Ugb25seTFFMEMGA1UEAxM8VmVyaVNpZ24gQ2xhc3MgMiBQdWJsaWMgUHJpbWFyeSBD -ZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEczMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKC -AQEArwoNwtUs22e5LeWUJ92lvuCwTY+zYVY81nzD9M0+hsuiiOLh2KRpxbXiv8GmR1BeRjmL1Za6 -tW8UvxDOJxOeBUebMXoT2B/Z0wI3i60sR/COgQanDTAM6/c8DyAd3HJG7qUCyFvDyVZpTMUYwZF7 -C9UTAJu878NIPkZgIIUq1ZC2zYugzDLdt/1AVbJQHFauzI13TccgTacxdu9okoqQHgiBVrKtaaNS -0MscxCM9H5n+TOgWY47GCI72MfbS+uV23bUckqNJzc0BzWjNqWm6o+sdDZykIKbBoMXRRkwXbdKs -Zj+WjOCE1Db/IlnF+RFgqF8EffIa9iVCYQ/ESrg+iQIDAQABMA0GCSqGSIb3DQEBBQUAA4IBAQA0 -JhU8wI1NQ0kdvekhktdmnLfexbjQ5F1fdiLAJvmEOjr5jLX77GDx6M4EsMjdpwOPMPOY36TmpDHf -0xwLRtxyID+u7gU8pDM/CzmscHhzS5kr3zDCVLCoO1Wh/hYozUK9dG6A2ydEp85EXdQbkJgNHkKU -sQAsBNB0owIFImNjzYO1+8FtYmtpdf1dcEG59b98377BMnMiIYtYgXsVkXq642RIsH/7NiXaldDx -JBQX3RiAa0YjOVT1jmIJBB2UkKab5iXiQkWquJCtvgiPqQtCGJTPcjnhsUPgKM+351psE2tJs//j -GHyJizNdrDPXp/naOlXJWBD5qu9ats9LS98q ------END CERTIFICATE----- - Verisign Class 3 Public Primary Certification Authority - G3 ============================================================ -----BEGIN CERTIFICATE----- @@ -376,65 +108,14 @@ xuKhXFSbplQAz/DxwceYMBo7Nhbbo27q/a2ywtrvAkcTisDxszGtTxzhT5yvDwyd93gN2PQ1VoDa t20Xj50egWTh/sVFuq1ruQp6Tk9LhO5L8X3dEQ== -----END CERTIFICATE----- -Verisign Class 4 Public Primary Certification Authority - G3 -============================================================ ------BEGIN CERTIFICATE----- -MIIEGjCCAwICEQDsoKeLbnVqAc/EfMwvlF7XMA0GCSqGSIb3DQEBBQUAMIHKMQswCQYDVQQGEwJV -UzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRydXN0IE5ldHdv -cmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhvcml6ZWQgdXNl -IG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkgQ2VydGlmaWNh -dGlvbiBBdXRob3JpdHkgLSBHMzAeFw05OTEwMDEwMDAwMDBaFw0zNjA3MTYyMzU5NTlaMIHKMQsw -CQYDVQQGEwJVUzEXMBUGA1UEChMOVmVyaVNpZ24sIEluYy4xHzAdBgNVBAsTFlZlcmlTaWduIFRy -dXN0IE5ldHdvcmsxOjA4BgNVBAsTMShjKSAxOTk5IFZlcmlTaWduLCBJbmMuIC0gRm9yIGF1dGhv -cml6ZWQgdXNlIG9ubHkxRTBDBgNVBAMTPFZlcmlTaWduIENsYXNzIDQgUHVibGljIFByaW1hcnkg -Q2VydGlmaWNhdGlvbiBBdXRob3JpdHkgLSBHMzCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC -ggEBAK3LpRFpxlmr8Y+1GQ9Wzsy1HyDkniYlS+BzZYlZ3tCD5PUPtbut8XzoIfzk6AzufEUiGXaS -tBO3IFsJ+mGuqPKljYXCKtbeZjbSmwL0qJJgfJxptI8kHtCGUvYynEFYHiK9zUVilQhu0GbdU6LM -8BDcVHOLBKFGMzNcF0C5nk3T875Vg+ixiY5afJqWIpA7iCXy0lOIAgwLePLmNxdLMEYH5IBtptiW -Lugs+BGzOA1mppvqySNb247i8xOOGlktqgLw7KSHZtzBP/XYufTsgsbSPZUd5cBPhMnZo0QoBmrX -Razwa2rvTl/4EYIeOGM0ZlDUPpNz+jDDZq3/ky2X7wMCAwEAATANBgkqhkiG9w0BAQUFAAOCAQEA -j/ola09b5KROJ1WrIhVZPMq1CtRK26vdoV9TxaBXOcLORyu+OshWv8LZJxA6sQU8wHcxuzrTBXtt -mhwwjIDLk5Mqg6sFUYICABFna/OIYUdfA5PVWw3g8dShMjWFsjrbsIKr0csKvE+MW8VLADsfKoKm -fjaF3H48ZwC15DtS4KjrXRX5xm3wrR0OhbepmnMUWluPQSjA1egtTaRezarZ7c7c2NU8Qh0XwRJd -RTjDOPP8hS6DRkiy1yBfkjaP53kPmF6Z6PDQpLv1U70qzlmwr25/bLvSHgCwIe34QWKCudiyxLtG -UPMxxY8BqHTr9Xgn2uf3ZkPznoM+IKrDNWCRzg== ------END CERTIFICATE----- - -Entrust.net Secure Server CA -============================ ------BEGIN CERTIFICATE----- -MIIE2DCCBEGgAwIBAgIEN0rSQzANBgkqhkiG9w0BAQUFADCBwzELMAkGA1UEBhMCVVMxFDASBgNV -BAoTC0VudHJ1c3QubmV0MTswOQYDVQQLEzJ3d3cuZW50cnVzdC5uZXQvQ1BTIGluY29ycC4gYnkg -cmVmLiAobGltaXRzIGxpYWIuKTElMCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRl -ZDE6MDgGA1UEAxMxRW50cnVzdC5uZXQgU2VjdXJlIFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhv -cml0eTAeFw05OTA1MjUxNjA5NDBaFw0xOTA1MjUxNjM5NDBaMIHDMQswCQYDVQQGEwJVUzEUMBIG -A1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5ldC9DUFMgaW5jb3JwLiBi -eSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBFbnRydXN0Lm5ldCBMaW1p -dGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENlcnRpZmljYXRpb24gQXV0 -aG9yaXR5MIGdMA0GCSqGSIb3DQEBAQUAA4GLADCBhwKBgQDNKIM0VBuJ8w+vN5Ex/68xYMmo6LIQ -aO2f55M28Qpku0f1BBc/I0dNxScZgSYMVHINiC3ZH5oSn7yzcdOAGT9HZnuMNSjSuQrfJNqc1lB5 -gXpa0zf3wkrYKZImZNHkmGw6AIr1NJtl+O3jEP/9uElY3KDegjlrgbEWGWG5VLbmQwIBA6OCAdcw -ggHTMBEGCWCGSAGG+EIBAQQEAwIABzCCARkGA1UdHwSCARAwggEMMIHeoIHboIHYpIHVMIHSMQsw -CQYDVQQGEwJVUzEUMBIGA1UEChMLRW50cnVzdC5uZXQxOzA5BgNVBAsTMnd3dy5lbnRydXN0Lm5l -dC9DUFMgaW5jb3JwLiBieSByZWYuIChsaW1pdHMgbGlhYi4pMSUwIwYDVQQLExwoYykgMTk5OSBF -bnRydXN0Lm5ldCBMaW1pdGVkMTowOAYDVQQDEzFFbnRydXN0Lm5ldCBTZWN1cmUgU2VydmVyIENl -cnRpZmljYXRpb24gQXV0aG9yaXR5MQ0wCwYDVQQDEwRDUkwxMCmgJ6AlhiNodHRwOi8vd3d3LmVu -dHJ1c3QubmV0L0NSTC9uZXQxLmNybDArBgNVHRAEJDAigA8xOTk5MDUyNTE2MDk0MFqBDzIwMTkw -NTI1MTYwOTQwWjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAU8BdiE1U9s/8KAGv7UISX8+1i0Bow -HQYDVR0OBBYEFPAXYhNVPbP/CgBr+1CEl/PtYtAaMAwGA1UdEwQFMAMBAf8wGQYJKoZIhvZ9B0EA -BAwwChsEVjQuMAMCBJAwDQYJKoZIhvcNAQEFBQADgYEAkNwwAvpkdMKnCqV8IY00F6j7Rw7/JXyN -Ewr75Ji174z4xRAN95K+8cPV1ZVqBLssziY2ZcgxxufuP+NXdYR6Ee9GTxj005i7qIcyunL2POI9 -n9cd2cNgQ4xYDiKWL2KjLB+6rQXvqzJ4h6BUcxm1XAX5Uj5tLUUL9wqT6u0G+bI= ------END CERTIFICATE----- - Entrust.net Premium 2048 Secure Server CA ========================================= -----BEGIN CERTIFICATE----- -MIIEXDCCA0SgAwIBAgIEOGO5ZjANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u +MIIEKjCCAxKgAwIBAgIEOGPe+DANBgkqhkiG9w0BAQUFADCBtDEUMBIGA1UEChMLRW50cnVzdC5u ZXQxQDA+BgNVBAsUN3d3dy5lbnRydXN0Lm5ldC9DUFNfMjA0OCBpbmNvcnAuIGJ5IHJlZi4gKGxp bWl0cyBsaWFiLikxJTAjBgNVBAsTHChjKSAxOTk5IEVudHJ1c3QubmV0IExpbWl0ZWQxMzAxBgNV BAMTKkVudHJ1c3QubmV0IENlcnRpZmljYXRpb24gQXV0aG9yaXR5ICgyMDQ4KTAeFw05OTEyMjQx -NzUwNTFaFw0xOTEyMjQxODIwNTFaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 +NzUwNTFaFw0yOTA3MjQxNDE1MTJaMIG0MRQwEgYDVQQKEwtFbnRydXN0Lm5ldDFAMD4GA1UECxQ3 d3d3LmVudHJ1c3QubmV0L0NQU18yMDQ4IGluY29ycC4gYnkgcmVmLiAobGltaXRzIGxpYWIuKTEl MCMGA1UECxMcKGMpIDE5OTkgRW50cnVzdC5uZXQgTGltaXRlZDEzMDEGA1UEAxMqRW50cnVzdC5u ZXQgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgKDIwNDgpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A @@ -442,14 +123,13 @@ MIIBCgKCAQEArU1LqRKGsuqjIAcVFmQqK0vRvwtKTY7tgHalZ7d4QMBzQshowNtTK91euHaYNZOL Gp18EzoOH1u3Hs/lJBQesYGpjX24zGtLA/ECDNyrpUAkAH90lKGdCCmziAv1h3edVc3kw37XamSr hRSGlVuXMlBvPci6Zgzj/L24ScF2iUkZ/cCovYmjZy/Gn7xxGWC4LeksyZB2ZnuU4q941mVTXTzW nLLPKQP5L6RQstRIzgUyVYr9smRMDuSYB3Xbf9+5CFVghTAp+XtIpGmG4zU/HoZdenoVve8AjhUi -VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo3QwcjARBglghkgBhvhC -AQEEBAMCAAcwHwYDVR0jBBgwFoAUVeSB0RGAvtiJuQijMfmhJAkWuXAwHQYDVR0OBBYEFFXkgdER -gL7YibkIozH5oSQJFrlwMB0GCSqGSIb2fQdBAAQQMA4bCFY1LjA6NC4wAwIEkDANBgkqhkiG9w0B -AQUFAAOCAQEAWUesIYSKF8mciVMeuoCFGsY8Tj6xnLZ8xpJdGGQC49MGCBFhfGPjK50xA3B20qMo -oPS7mmNz7W3lKtvtFKkrxjYR0CvrB4ul2p5cGZ1WEvVUKcgF7bISKo30Axv/55IQh7A6tcOdBTcS -o8f0FbnVpDkWm1M6I5HxqIKiaohowXkCIryqptau37AUX7iH0N18f3v/rxzP5tsHrV7bhZ3QKw0z -2wTR5klAEyt2+z7pnIkPFc4YsIV4IU9rTw76NmfNB/L/CNDi3tm/Kq+4h4YhPATKt5Rof8886ZjX -OP/swNlQ8C5LWK5Gb9Auw2DaclVyvUxFnmG6v4SBkgPR0ml8xQ== +VBcAkCaTvA5JaJG/+EfTnZVCwQ5N328mz8MYIWJmQ3DW1cAH4QIDAQABo0IwQDAOBgNVHQ8BAf8E +BAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUVeSB0RGAvtiJuQijMfmhJAkWuXAwDQYJ +KoZIhvcNAQEFBQADggEBADubj1abMOdTmXx6eadNl9cZlZD7Bh/KM3xGY4+WZiT6QBshJ8rmcnPy +T/4xmf3IDExoU8aAghOY+rat2l098c5u9hURlIIM7j+VrxGrD9cv3h8Dj1csHsm7mhpElesYT6Yf +zX1XEC+bBAlahLVu2B064dae0Wx5XnkcFMXj0EyTO2U87d89vqbllRrDtRnDvV5bu/8j72gZyxKT +J1wDLW8w0B62GqzeWvfRqqgnpv55gcR5mTNXuhKwqeBCbJPKVt7+bYQLCIt+jerXmCHG8+c8eS9e +nNFMFY3h7CI3zJpDC5fcgJCNs2ebb0gIFVbPv/ErfF6adulZkMV8gzURZVE= -----END CERTIFICATE----- Baltimore CyberTrust Root @@ -473,60 +153,6 @@ Y71k5h+3zvDyny67G7fyUIhzksLi4xaNmjICq44Y3ekQEe5+NauQrz4wlHrQMz2nZQ/1/I6eYs9H RCwBXbsdtTLSR9I4LtD+gdwyah617jzV/OeBHRnDJELqYzmp -----END CERTIFICATE----- -Equifax Secure Global eBusiness CA -================================== ------BEGIN CERTIFICATE----- -MIICkDCCAfmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBaMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT -RXF1aWZheCBTZWN1cmUgSW5jLjEtMCsGA1UEAxMkRXF1aWZheCBTZWN1cmUgR2xvYmFsIGVCdXNp -bmVzcyBDQS0xMB4XDTk5MDYyMTA0MDAwMFoXDTIwMDYyMTA0MDAwMFowWjELMAkGA1UEBhMCVVMx -HDAaBgNVBAoTE0VxdWlmYXggU2VjdXJlIEluYy4xLTArBgNVBAMTJEVxdWlmYXggU2VjdXJlIEds -b2JhbCBlQnVzaW5lc3MgQ0EtMTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAuucXkAJlsTRV -PEnCUdXfp9E3j9HngXNBUmCbnaEXJnitx7HoJpQytd4zjTov2/KaelpzmKNc6fuKcxtc58O/gGzN -qfTWK8D3+ZmqY6KxRwIP1ORROhI8bIpaVIRw28HFkM9yRcuoWcDNM50/o5brhTMhHD4ePmBudpxn -hcXIw2ECAwEAAaNmMGQwEQYJYIZIAYb4QgEBBAQDAgAHMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0j -BBgwFoAUvqigdHJQa0S3ySPY+6j/s1draGwwHQYDVR0OBBYEFL6ooHRyUGtEt8kj2Puo/7NXa2hs -MA0GCSqGSIb3DQEBBAUAA4GBADDiAVGqx+pf2rnQZQ8w1j7aDRRJbpGTJxQx78T3LUX47Me/okEN -I7SS+RkAZ70Br83gcfxaz2TE4JaY0KNA4gGK7ycH8WUBikQtBmV1UsCGECAhX2xrD2yuCRyv8qIY -NMR1pHMc8Y3c7635s3a0kr/clRAevsvIO1qEYBlWlKlV ------END CERTIFICATE----- - -Equifax Secure eBusiness CA 1 -============================= ------BEGIN CERTIFICATE----- -MIICgjCCAeugAwIBAgIBBDANBgkqhkiG9w0BAQQFADBTMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT -RXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNzIENB -LTEwHhcNOTkwNjIxMDQwMDAwWhcNMjAwNjIxMDQwMDAwWjBTMQswCQYDVQQGEwJVUzEcMBoGA1UE -ChMTRXF1aWZheCBTZWN1cmUgSW5jLjEmMCQGA1UEAxMdRXF1aWZheCBTZWN1cmUgZUJ1c2luZXNz -IENBLTEwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAM4vGbwXt3fek6lfWg0XTzQaDJj0ItlZ -1MRoRvC0NcWFAyDGr0WlIVFFQesWWDYyb+JQYmT5/VGcqiTZ9J2DKocKIdMSODRsjQBuWqDZQu4a -IZX5UkxVWsUPOE9G+m34LjXWHXzr4vCwdYDIqROsvojvOm6rXyo4YgKwEnv+j6YDAgMBAAGjZjBk -MBEGCWCGSAGG+EIBAQQEAwIABzAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEp4MlIR21kW -Nl7fwRQ2QGpHfEyhMB0GA1UdDgQWBBRKeDJSEdtZFjZe38EUNkBqR3xMoTANBgkqhkiG9w0BAQQF -AAOBgQB1W6ibAxHm6VZMzfmpTMANmvPMZWnmJXbMWbfWVMMdzZmsGd20hdXgPfxiIKeES1hl8eL5 -lSE/9dR+WB5Hh1Q+WKG1tfgq73HnvMP2sUlG4tega+VWeponmHxGYhTnyfxuAxJ5gDgdSIKN/Bf+ -KpYrtWKmpj29f5JZzVoqgrI3eQ== ------END CERTIFICATE----- - -Equifax Secure eBusiness CA 2 -============================= ------BEGIN CERTIFICATE----- -MIIDIDCCAomgAwIBAgIEN3DPtTANBgkqhkiG9w0BAQUFADBOMQswCQYDVQQGEwJVUzEXMBUGA1UE -ChMORXF1aWZheCBTZWN1cmUxJjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0y -MB4XDTk5MDYyMzEyMTQ0NVoXDTE5MDYyMzEyMTQ0NVowTjELMAkGA1UEBhMCVVMxFzAVBgNVBAoT -DkVxdWlmYXggU2VjdXJlMSYwJAYDVQQLEx1FcXVpZmF4IFNlY3VyZSBlQnVzaW5lc3MgQ0EtMjCB -nzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA5Dk5kx5SBhsoNviyoynF7Y6yEb3+6+e0dMKP/wXn -2Z0GvxLIPw7y1tEkshHe0XMJitSxLJgJDR5QRrKDpkWNYmi7hRsgcDKqQM2mll/EcTc/BPO3QSQ5 -BxoeLmFYoBIL5aXfxavqN3HMHMg3OrmXUqesxWoklE6ce8/AatbfIb0CAwEAAaOCAQkwggEFMHAG -A1UdHwRpMGcwZaBjoGGkXzBdMQswCQYDVQQGEwJVUzEXMBUGA1UEChMORXF1aWZheCBTZWN1cmUx -JjAkBgNVBAsTHUVxdWlmYXggU2VjdXJlIGVCdXNpbmVzcyBDQS0yMQ0wCwYDVQQDEwRDUkwxMBoG -A1UdEAQTMBGBDzIwMTkwNjIzMTIxNDQ1WjALBgNVHQ8EBAMCAQYwHwYDVR0jBBgwFoAUUJ4L6q9e -uSBIplBqy/3YIHqngnYwHQYDVR0OBBYEFFCeC+qvXrkgSKZQasv92CB6p4J2MAwGA1UdEwQFMAMB -Af8wGgYJKoZIhvZ9B0EABA0wCxsFVjMuMGMDAgbAMA0GCSqGSIb3DQEBBQUAA4GBAAyGgq3oThr1 -jokn4jVYPSm0B482UJW/bsGe68SQsoWou7dC4A8HOd/7npCy0cE+U58DRLB+S/Rv5Hwf5+Kx5Lia -78O9zt4LMjTZ3ijtM2vE1Nc9ElirfQkty3D1E4qUoSek1nDFbZS1yX2doNLGCEnZZpum0/QL3MUm -V+GRMOrN ------END CERTIFICATE----- - AddTrust Low-Value Services Root ================================ -----BEGIN CERTIFICATE----- @@ -772,84 +398,6 @@ gn2Z9DH2canPLAEnpQW5qrJITirvn5NSUZU8UnOOVkwXQMAJKOSLakhT2+zNVVXxxvjpoixMptEm X36vWkzaH6byHCx+rgIW0lbQL1dTR+iS -----END CERTIFICATE----- -UTN-USER First-Network Applications -=================================== ------BEGIN CERTIFICATE----- -MIIEZDCCA0ygAwIBAgIQRL4Mi1AAJLQR0zYwS8AzdzANBgkqhkiG9w0BAQUFADCBozELMAkGA1UE -BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl -IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzAp -BgNVBAMTIlVUTi1VU0VSRmlyc3QtTmV0d29yayBBcHBsaWNhdGlvbnMwHhcNOTkwNzA5MTg0ODM5 -WhcNMTkwNzA5MTg1NzQ5WjCBozELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5T -YWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhlIFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExho -dHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xKzApBgNVBAMTIlVUTi1VU0VSRmlyc3QtTmV0d29yayBB -cHBsaWNhdGlvbnMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCz+5Gh5DZVhawGNFug -mliy+LUPBXeDrjKxdpJo7CNKyXY/45y2N3kDuatpjQclthln5LAbGHNhSuh+zdMvZOOmfAz6F4Cj -DUeJT1FxL+78P/m4FoCHiZMlIJpDgmkkdihZNaEdwH+DBmQWICzTSaSFtMBhf1EI+GgVkYDLpdXu -Ozr0hAReYFmnjDRy7rh4xdE7EkpvfmUnuaRVxblvQ6TFHSyZwFKkeEwVs0CYCGtDxgGwenv1axwi -P8vv/6jQOkt2FZ7S0cYu49tXGzKiuG/ohqY/cKvlcJKrRB5AUPuco2LkbG6gyN7igEL66S/ozjIE -j3yNtxyjNTwV3Z7DrpelAgMBAAGjgZEwgY4wCwYDVR0PBAQDAgHGMA8GA1UdEwEB/wQFMAMBAf8w -HQYDVR0OBBYEFPqGydvguul49Uuo1hXf8NPhahQ8ME8GA1UdHwRIMEYwRKBCoECGPmh0dHA6Ly9j -cmwudXNlcnRydXN0LmNvbS9VVE4tVVNFUkZpcnN0LU5ldHdvcmtBcHBsaWNhdGlvbnMuY3JsMA0G -CSqGSIb3DQEBBQUAA4IBAQCk8yXM0dSRgyLQzDKrm5ZONJFUICU0YV8qAhXhi6r/fWRRzwr/vH3Y -IWp4yy9Rb/hCHTO967V7lMPDqaAt39EpHx3+jz+7qEUqf9FuVSTiuwL7MT++6LzsQCv4AdRWOOTK -RIK1YSAhZ2X28AvnNPilwpyjXEAfhZOVBt5P1CeptqX8Fs1zMT+4ZSfP1FMa8Kxun08FDAOBp4Qp -xFq9ZFdyrTvPNximmMatBrTcCKME1SmklpoSZ0qMYEWd8SOasACcaLWYUNPvji6SZbFIPiG+FTAq -DbUMo2s/rn9X9R+WfN9v3YIwLGUbQErNaLly7HF27FSOH4UMAWr6pjisH8SE ------END CERTIFICATE----- - -America Online Root Certification Authority 1 -============================================= ------BEGIN CERTIFICATE----- -MIIDpDCCAoygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT -QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp -Y2F0aW9uIEF1dGhvcml0eSAxMB4XDTAyMDUyODA2MDAwMFoXDTM3MTExOTIwNDMwMFowYzELMAkG -A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg -T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMTCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBAKgv6KRpBgNHw+kqmP8ZonCaxlCyfqXfaE0bfA+2l2h9LaaLl+lkhsmj76CG -v2BlnEtUiMJIxUo5vxTjWVXlGbR0yLQFOVwWpeKVBeASrlmLojNoWBym1BW32J/X3HGrfpq/m44z -DyL9Hy7nBzbvYjnF3cu6JRQj3gzGPTzOggjmZj7aUTsWOqMFf6Dch9Wc/HKpoH145LcxVR5lu9Rh -sCFg7RAycsWSJR74kEoYeEfffjA3PlAb2xzTa5qGUwew76wGePiEmf4hjUyAtgyC9mZweRrTT6PP -8c9GsEsPPt2IYriMqQkoO3rHl+Ee5fSfwMCuJKDIodkP1nsmgmkyPacCAwEAAaNjMGEwDwYDVR0T -AQH/BAUwAwEB/zAdBgNVHQ4EFgQUAK3Zo/Z59m50qX8zPYEX10zPM94wHwYDVR0jBBgwFoAUAK3Z -o/Z59m50qX8zPYEX10zPM94wDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEBBQUAA4IBAQB8itEf -GDeC4Liwo+1WlchiYZwFos3CYiZhzRAW18y0ZTTQEYqtqKkFZu90821fnZmv9ov761KyBZiibyrF -VL0lvV+uyIbqRizBs73B6UlwGBaXCBOMIOAbLjpHyx7kADCVW/RFo8AasAFOq73AI25jP4BKxQft -3OJvx8Fi8eNy1gTIdGcL+oiroQHIb/AUr9KZzVGTfu0uOMe9zkZQPXLjeSWdm4grECDdpbgyn43g -Kd8hdIaC2y+CMMbHNYaz+ZZfRtsMRf3zUMNvxsNIrUam4SdHCh0Om7bCd39j8uB9Gr784N/Xx6ds -sPmuujz9dLQR6FgNgLzTqIA6me11zEZ7 ------END CERTIFICATE----- - -America Online Root Certification Authority 2 -============================================= ------BEGIN CERTIFICATE----- -MIIFpDCCA4ygAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJVUzEcMBoGA1UEChMT -QW1lcmljYSBPbmxpbmUgSW5jLjE2MDQGA1UEAxMtQW1lcmljYSBPbmxpbmUgUm9vdCBDZXJ0aWZp -Y2F0aW9uIEF1dGhvcml0eSAyMB4XDTAyMDUyODA2MDAwMFoXDTM3MDkyOTE0MDgwMFowYzELMAkG -A1UEBhMCVVMxHDAaBgNVBAoTE0FtZXJpY2EgT25saW5lIEluYy4xNjA0BgNVBAMTLUFtZXJpY2Eg -T25saW5lIFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkgMjCCAiIwDQYJKoZIhvcNAQEBBQAD -ggIPADCCAgoCggIBAMxBRR3pPU0Q9oyxQcngXssNt79Hc9PwVU3dxgz6sWYFas14tNwC206B89en -fHG8dWOgXeMHDEjsJcQDIPT/DjsS/5uN4cbVG7RtIuOx238hZK+GvFciKtZHgVdEglZTvYYUAQv8 -f3SkWq7xuhG1m1hagLQ3eAkzfDJHA1zEpYNI9FdWboE2JxhP7JsowtS013wMPgwr38oE18aO6lhO -qKSlGBxsRZijQdEt0sdtjRnxrXm3gT+9BoInLRBYBbV4Bbkv2wxrkJB+FFk4u5QkE+XRnRTf04JN -RvCAOVIyD+OEsnpD8l7eXz8d3eOyG6ChKiMDbi4BFYdcpnV1x5dhvt6G3NRI270qv0pV2uh9UPu0 -gBe4lL8BPeraunzgWGcXuVjgiIZGZ2ydEEdYMtA1fHkqkKJaEBEjNa0vzORKW6fIJ/KD3l67Xnfn -6KVuY8INXWHQjNJsWiEOyiijzirplcdIz5ZvHZIlyMbGwcEMBawmxNJ10uEqZ8A9W6Wa6897Gqid -FEXlD6CaZd4vKL3Ob5Rmg0gp2OpljK+T2WSfVVcmv2/LNzGZo2C7HK2JNDJiuEMhBnIMoVxtRsX6 -Kc8w3onccVvdtjc+31D1uAclJuW8tf48ArO3+L5DwYcRlJ4jbBeKuIonDFRH8KmzwICMoCfrHRnj -B453cMor9H124HhnAgMBAAGjYzBhMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFE1FwWg4u3Op -aaEg5+31IqEjFNeeMB8GA1UdIwQYMBaAFE1FwWg4u3OpaaEg5+31IqEjFNeeMA4GA1UdDwEB/wQE -AwIBhjANBgkqhkiG9w0BAQUFAAOCAgEAZ2sGuV9FOypLM7PmG2tZTiLMubekJcmnxPBUlgtk87FY -T15R/LKXeydlwuXK5w0MJXti4/qftIe3RUavg6WXSIylvfEWK5t2LHo1YGwRgJfMqZJS5ivmae2p -+DYtLHe/YUjRYwu5W1LtGLBDQiKmsXeu3mnFzcccobGlHBD7GL4acN3Bkku+KVqdPzW+5X1R+FXg -JXUjhx5c3LqdsKyzadsXg8n33gy8CNyRnqjQ1xU3c6U1uPx+xURABsPr+CKAXEfOAuMRn0T//Zoy -zH1kUQ7rVyZ2OuMeIjzCpjbdGe+n/BLzJsBZMYVMnNjP36TMzCmT/5RtdlwTCJfy7aULTd3oyWgO -ZtMADjMSW7yV5TKQqLPGbIOtd+6Lfn6xqavT4fG2wLHqiMDn05DpKJKUe2h7lyoKZy2FAjgQ5ANh -1NolNscIWC2hp1GvMApJ9aZphwctREZ2jirlmjvXGKL8nDgQzMY70rUXOm/9riW99XJZZLF0Kjhf -GEzfz3EEWjbUvy+ZnOjZurGV5gJLIaFb1cFPj65pbVPbAZO1XB4Y3WRayhgoPmMEEf0cjQAPuDff -Z4qdZqkCapH/E8ovXYO8h5Ns3CRRFgQlZvqz2cK6Kb6aSDiCmfS/O0oxGfm/jiEzFMpPVF/7zvuP -cX/9XhmgD0uRuMRUvAawRY8mkaKO/qk= ------END CERTIFICATE----- - Visa eCommerce Root =================== -----BEGIN CERTIFICATE----- @@ -1084,26 +632,6 @@ s58+OmJYxUmtYg5xpTKqL8aJdkNAExNnPaJUJRDL8Try2frbSVa7pv6nQTXD4IhhyYjH3zYQIphZ FL39vmwLAw== -----END CERTIFICATE----- -Sonera Class 1 Root CA -====================== ------BEGIN CERTIFICATE----- -MIIDIDCCAgigAwIBAgIBJDANBgkqhkiG9w0BAQUFADA5MQswCQYDVQQGEwJGSTEPMA0GA1UEChMG -U29uZXJhMRkwFwYDVQQDExBTb25lcmEgQ2xhc3MxIENBMB4XDTAxMDQwNjEwNDkxM1oXDTIxMDQw -NjEwNDkxM1owOTELMAkGA1UEBhMCRkkxDzANBgNVBAoTBlNvbmVyYTEZMBcGA1UEAxMQU29uZXJh -IENsYXNzMSBDQTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALWJHytPZwp5/8Ue+H88 -7dF+2rDNbS82rDTG29lkFwhjMDMiikzujrsPDUJVyZ0upe/3p4zDq7mXy47vPxVnqIJyY1MPQYx9 -EJUkoVqlBvqSV536pQHydekfvFYmUk54GWVYVQNYwBSujHxVX3BbdyMGNpfzJLWaRpXk3w0LBUXl -0fIdgrvGE+D+qnr9aTCU89JFhfzyMlsy3uhsXR/LpCJ0sICOXZT3BgBLqdReLjVQCfOAl/QMF645 -2F/NM8EcyonCIvdFEu1eEpOdY6uCLrnrQkFEy0oaAIINnvmLVz5MxxftLItyM19yejhW1ebZrgUa -HXVFsculJRwSVzb9IjcCAwEAAaMzMDEwDwYDVR0TAQH/BAUwAwEB/zARBgNVHQ4ECgQIR+IMi/ZT -iFIwCwYDVR0PBAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQCLGrLJXWG04bkruVPRsoWdd44W7hE9 -28Jj2VuXZfsSZ9gqXLar5V7DtxYvyOirHYr9qxp81V9jz9yw3Xe5qObSIjiHBxTZ/75Wtf0HDjxV -yhbMp6Z3N/vbXB9OWQaHowND9Rart4S9Tu+fMTfwRvFAttEMpWT4Y14h21VOTzF2nBBhjrZTOqMR -vq9tfB69ri3iDGnHhVNoomG6xT60eVR4ngrHAr5i0RGCS2UvkVrCqIexVmiUefkl98HVrhq4uz2P -qYo4Ffdz0Fpg0YCw8NzVUM1O7pJIae2yIx4wzMiUyLb1O4Z/P6Yun/Y+LLWSlj7fLJOK/4GMDw9Z -IRlXvVWa ------END CERTIFICATE----- - Sonera Class 2 Root CA ====================== -----BEGIN CERTIFICATE----- @@ -1146,109 +674,6 @@ nGQI0DvDKcWy7ZAEwbEpkcUwb8GpcjPM/l0WFywRaed+/sWDCN+83CI6LiBpIzlWYGeQiy52OfsR iJf2fL1LuCAWZwWN4jvBcj+UlTfHXbme2JOhF4//DGYVwSR8MnwDHTuhWEUykw== -----END CERTIFICATE----- -TDC Internet Root CA -==================== ------BEGIN CERTIFICATE----- -MIIEKzCCAxOgAwIBAgIEOsylTDANBgkqhkiG9w0BAQUFADBDMQswCQYDVQQGEwJESzEVMBMGA1UE -ChMMVERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTAeFw0wMTA0MDUx -NjMzMTdaFw0yMTA0MDUxNzAzMTdaMEMxCzAJBgNVBAYTAkRLMRUwEwYDVQQKEwxUREMgSW50ZXJu -ZXQxHTAbBgNVBAsTFFREQyBJbnRlcm5ldCBSb290IENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAxLhAvJHVYx/XmaCLDEAedLdInUaMArLgJF/wGROnN4NrXceO+YQwzho7+vvOi20j -xsNuZp+Jpd/gQlBn+h9sHvTQBda/ytZO5GhgbEaqHF1j4QeGDmUApy6mcca8uYGoOn0a0vnRrEvL -znWv3Hv6gXPU/Lq9QYjUdLP5Xjg6PEOo0pVOd20TDJ2PeAG3WiAfAzc14izbSysseLlJ28TQx5yc -5IogCSEWVmb/Bexb4/DPqyQkXsN/cHoSxNK1EKC2IeGNeGlVRGn1ypYcNIUXJXfi9i8nmHj9eQY6 -otZaQ8H/7AQ77hPv01ha/5Lr7K7a8jcDR0G2l8ktCkEiu7vmpwIDAQABo4IBJTCCASEwEQYJYIZI -AYb4QgEBBAQDAgAHMGUGA1UdHwReMFwwWqBYoFakVDBSMQswCQYDVQQGEwJESzEVMBMGA1UEChMM -VERDIEludGVybmV0MR0wGwYDVQQLExRUREMgSW50ZXJuZXQgUm9vdCBDQTENMAsGA1UEAxMEQ1JM -MTArBgNVHRAEJDAigA8yMDAxMDQwNTE2MzMxN1qBDzIwMjEwNDA1MTcwMzE3WjALBgNVHQ8EBAMC -AQYwHwYDVR0jBBgwFoAUbGQBx/2FbazI2p5QCIUItTxWqFAwHQYDVR0OBBYEFGxkAcf9hW2syNqe -UAiFCLU8VqhQMAwGA1UdEwQFMAMBAf8wHQYJKoZIhvZ9B0EABBAwDhsIVjUuMDo0LjADAgSQMA0G -CSqGSIb3DQEBBQUAA4IBAQBOQ8zR3R0QGwZ/t6T609lN+yOfI1Rb5osvBCiLtSdtiaHsmGnc540m -gwV5dOy0uaOXwTUA/RXaOYE6lTGQ3pfphqiZdwzlWqCE/xIWrG64jcN7ksKsLtB9KOy282A4aW8+ -2ARVPp7MVdK6/rtHBNcK2RYKNCn1WBPVT8+PVkuzHu7TmHnaCB4Mb7j4Fifvwm899qNLPg7kbWzb -O0ESm70NRyN/PErQr8Cv9u8btRXE64PECV90i9kR+8JWsTz4cMo0jUNAE4z9mQNUecYu6oah9jrU -Cbz0vGbMPVjQV0kK7iXiQe4T+Zs4NNEA9X7nlB38aQNiuJkFBT1reBK9sG9l ------END CERTIFICATE----- - -TDC OCES Root CA -================ ------BEGIN CERTIFICATE----- -MIIFGTCCBAGgAwIBAgIEPki9xDANBgkqhkiG9w0BAQUFADAxMQswCQYDVQQGEwJESzEMMAoGA1UE -ChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTAeFw0wMzAyMTEwODM5MzBaFw0zNzAyMTEwOTA5 -MzBaMDExCzAJBgNVBAYTAkRLMQwwCgYDVQQKEwNUREMxFDASBgNVBAMTC1REQyBPQ0VTIENBMIIB -IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArGL2YSCyz8DGhdfjeebM7fI5kqSXLmSjhFuH -nEz9pPPEXyG9VhDr2y5h7JNp46PMvZnDBfwGuMo2HP6QjklMxFaaL1a8z3sM8W9Hpg1DTeLpHTk0 -zY0s2RKY+ePhwUp8hjjEqcRhiNJerxomTdXkoCJHhNlktxmW/OwZ5LKXJk5KTMuPJItUGBxIYXvV -iGjaXbXqzRowwYCDdlCqT9HU3Tjw7xb04QxQBr/q+3pJoSgrHPb8FTKjdGqPqcNiKXEx5TukYBde -dObaE+3pHx8b0bJoc8YQNHVGEBDjkAB2QMuLt0MJIf+rTpPGWOmlgtt3xDqZsXKVSQTwtyv6e1mO -3QIDAQABo4ICNzCCAjMwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwgewGA1UdIASB -5DCB4TCB3gYIKoFQgSkBAQEwgdEwLwYIKwYBBQUHAgEWI2h0dHA6Ly93d3cuY2VydGlmaWthdC5k -ay9yZXBvc2l0b3J5MIGdBggrBgEFBQcCAjCBkDAKFgNUREMwAwIBARqBgUNlcnRpZmlrYXRlciBm -cmEgZGVubmUgQ0EgdWRzdGVkZXMgdW5kZXIgT0lEIDEuMi4yMDguMTY5LjEuMS4xLiBDZXJ0aWZp -Y2F0ZXMgZnJvbSB0aGlzIENBIGFyZSBpc3N1ZWQgdW5kZXIgT0lEIDEuMi4yMDguMTY5LjEuMS4x -LjARBglghkgBhvhCAQEEBAMCAAcwgYEGA1UdHwR6MHgwSKBGoESkQjBAMQswCQYDVQQGEwJESzEM -MAoGA1UEChMDVERDMRQwEgYDVQQDEwtUREMgT0NFUyBDQTENMAsGA1UEAxMEQ1JMMTAsoCqgKIYm -aHR0cDovL2NybC5vY2VzLmNlcnRpZmlrYXQuZGsvb2Nlcy5jcmwwKwYDVR0QBCQwIoAPMjAwMzAy -MTEwODM5MzBagQ8yMDM3MDIxMTA5MDkzMFowHwYDVR0jBBgwFoAUYLWF7FZkfhIZJ2cdUBVLc647 -+RIwHQYDVR0OBBYEFGC1hexWZH4SGSdnHVAVS3OuO/kSMB0GCSqGSIb2fQdBAAQQMA4bCFY2LjA6 -NC4wAwIEkDANBgkqhkiG9w0BAQUFAAOCAQEACromJkbTc6gJ82sLMJn9iuFXehHTuJTXCRBuo7E4 -A9G28kNBKWKnctj7fAXmMXAnVBhOinxO5dHKjHiIzxvTkIvmI/gLDjNDfZziChmPyQE+dF10yYsc -A+UYyAFMP8uXBV2YcaaYb7Z8vTd/vuGTJW1v8AqtFxjhA7wHKcitJuj4YfD9IQl+mo6paH1IYnK9 -AOoBmbgGglGBTvH1tJFUuSN6AJqfXY3gPGS5GhKSKseCRHI53OI8xthV9RVOyAUO28bQYqbsFbS1 -AoLbrIyigfCbmTH1ICCoiGEKB5+U/NDXG8wuF/MEJ3Zn61SD/aSQfgY9BKNDLdr8C2LqL19iUw== ------END CERTIFICATE----- - -UTN DATACorp SGC Root CA -======================== ------BEGIN CERTIFICATE----- -MIIEXjCCA0agAwIBAgIQRL4Mi1AAIbQR0ypoBqmtaTANBgkqhkiG9w0BAQUFADCBkzELMAkGA1UE -BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl -IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xGzAZ -BgNVBAMTElVUTiAtIERBVEFDb3JwIFNHQzAeFw05OTA2MjQxODU3MjFaFw0xOTA2MjQxOTA2MzBa -MIGTMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQxFzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4w -HAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRy -dXN0LmNvbTEbMBkGA1UEAxMSVVROIC0gREFUQUNvcnAgU0dDMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEA3+5YEKIrblXEjr8uRgnn4AgPLit6E5Qbvfa2gI5lBZMAHryv4g+OGQ0SR+ys -raP6LnD43m77VkIVni5c7yPeIbkFdicZD0/Ww5y0vpQZY/KmEQrrU0icvvIpOxboGqBMpsn0GFlo -wHDyUwDAXlCCpVZvNvlK4ESGoE1O1kduSUrLZ9emxAW5jh70/P/N5zbgnAVssjMiFdC04MwXwLLA -9P4yPykqlXvY8qdOD1R8oQ2AswkDwf9c3V6aPryuvEeKaq5xyh+xKrhfQgUL7EYw0XILyulWbfXv -33i+Ybqypa4ETLyorGkVl73v67SMvzX41MPRKA5cOp9wGDMgd8SirwIDAQABo4GrMIGoMAsGA1Ud -DwQEAwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRTMtGzz3/64PGgXYVOktKeRR20TzA9 -BgNVHR8ENjA0MDKgMKAuhixodHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLURBVEFDb3JwU0dD -LmNybDAqBgNVHSUEIzAhBggrBgEFBQcDAQYKKwYBBAGCNwoDAwYJYIZIAYb4QgQBMA0GCSqGSIb3 -DQEBBQUAA4IBAQAnNZcAiosovcYzMB4p/OL31ZjUQLtgyr+rFywJNn9Q+kHcrpY6CiM+iVnJowft -Gzet/Hy+UUla3joKVAgWRcKZsYfNjGjgaQPpxE6YsjuMFrMOoAyYUJuTqXAJyCyjj98C5OBxOvG0 -I3KgqgHf35g+FFCgMSa9KOlaMCZ1+XtgHI3zzVAmbQQnmt/VDUVHKWss5nbZqSl9Mt3JNjy9rjXx -EZ4du5A/EkdOjtd+D2JzHVImOBwYSf0wdJrE5SIv2MCN7ZF6TACPcn9d2t0bi0Vr591pl6jFVkwP -DPafepE39peC4N1xaf92P2BNPM/3mfnGV/TJVTl4uix5yaaIK/QI ------END CERTIFICATE----- - -UTN USERFirst Email Root CA -=========================== ------BEGIN CERTIFICATE----- -MIIEojCCA4qgAwIBAgIQRL4Mi1AAJLQR0zYlJWfJiTANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UE -BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl -IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xNjA0 -BgNVBAMTLVVUTi1VU0VSRmlyc3QtQ2xpZW50IEF1dGhlbnRpY2F0aW9uIGFuZCBFbWFpbDAeFw05 -OTA3MDkxNzI4NTBaFw0xOTA3MDkxNzM2NThaMIGuMQswCQYDVQQGEwJVUzELMAkGA1UECBMCVVQx -FzAVBgNVBAcTDlNhbHQgTGFrZSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsx -ITAfBgNVBAsTGGh0dHA6Ly93d3cudXNlcnRydXN0LmNvbTE2MDQGA1UEAxMtVVROLVVTRVJGaXJz -dC1DbGllbnQgQXV0aGVudGljYXRpb24gYW5kIEVtYWlsMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEAsjmFpPJ9q0E7YkY3rs3BYHW8OWX5ShpHornMSMxqmNVNNRm5pELlzkniii8efNIx -B8dOtINknS4p1aJkxIW9hVE1eaROaJB7HHqkkqgX8pgV8pPMyaQylbsMTzC9mKALi+VuG6JG+ni8 -om+rWV6lL8/K2m2qL+usobNqqrcuZzWLeeEeaYji5kbNoKXqvgvOdjp6Dpvq/NonWz1zHyLmSGHG -TPNpsaguG7bUMSAsvIKKjqQOpdeJQ/wWWq8dcdcRWdq6hw2v+vPhwvCkxWeM1tZUOt4KpLoDd7Nl -yP0e03RiqhjKaJMeoYV+9Udly/hNVyh00jT/MLbu9mIwFIws6wIDAQABo4G5MIG2MAsGA1UdDwQE -AwIBxjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBSJgmd9xJ0mcABLtFBIfN49rgRufTBYBgNV -HR8EUTBPME2gS6BJhkdodHRwOi8vY3JsLnVzZXJ0cnVzdC5jb20vVVROLVVTRVJGaXJzdC1DbGll -bnRBdXRoZW50aWNhdGlvbmFuZEVtYWlsLmNybDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUH -AwQwDQYJKoZIhvcNAQEFBQADggEBALFtYV2mGn98q0rkMPxTbyUkxsrt4jFcKw7u7mFVbwQ+zzne -xRtJlOTrIEy05p5QLnLZjfWqo7NK2lYcYJeA3IKirUq9iiv/Cwm0xtcgBEXkzYABurorbs6q15L+ -5K/r9CYdFip/bDCVNy8zEqx/3cfREYxRmLLQo5HQrfafnoOTHh1CuEava2bwm3/q4wMC5QJRwarV -NZ1yQAOJujEdxRBoUp7fooXFXAimeOZTT7Hot9MUnpOmw2TjrH5xzbyf6QMbzPvprDHBr3wVdAKZ -w7JHpsIyYdfHb0gkUSeh1YdV8nuPmD0Wnu51tvjQjvLzxq4oW6fw8zYX/MMF08oDSlQ= ------END CERTIFICATE----- - UTN USERFirst Hardware Root CA ============================== -----BEGIN CERTIFICATE----- @@ -1275,31 +700,6 @@ iCrVWFCVH/A7HFe7fRQ5YiuayZSSKqMiDP+JJn1fIytH1xUdqWqeUQ0qUZ6B+dQ7XnASfxAynB67 nfhmqA== -----END CERTIFICATE----- -UTN USERFirst Object Root CA -============================ ------BEGIN CERTIFICATE----- -MIIEZjCCA06gAwIBAgIQRL4Mi1AAJLQR0zYt4LNfGzANBgkqhkiG9w0BAQUFADCBlTELMAkGA1UE -BhMCVVMxCzAJBgNVBAgTAlVUMRcwFQYDVQQHEw5TYWx0IExha2UgQ2l0eTEeMBwGA1UEChMVVGhl -IFVTRVJUUlVTVCBOZXR3b3JrMSEwHwYDVQQLExhodHRwOi8vd3d3LnVzZXJ0cnVzdC5jb20xHTAb -BgNVBAMTFFVUTi1VU0VSRmlyc3QtT2JqZWN0MB4XDTk5MDcwOTE4MzEyMFoXDTE5MDcwOTE4NDAz -NlowgZUxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtlIENpdHkx -HjAcBgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMYaHR0cDovL3d3dy51c2Vy -dHJ1c3QuY29tMR0wGwYDVQQDExRVVE4tVVNFUkZpcnN0LU9iamVjdDCCASIwDQYJKoZIhvcNAQEB -BQADggEPADCCAQoCggEBAM6qgT+jo2F4qjEAVZURnicPHxzfOpuCaDDASmEd8S8O+r5596Uj71VR -loTN2+O5bj4x2AogZ8f02b+U60cEPgLOKqJdhwQJ9jCdGIqXsqoc/EHSoTbL+z2RuufZcDX65OeQ -w5ujm9M89RKZd7G3CeBo5hy485RjiGpq/gt2yb70IuRnuasaXnfBhQfdDWy/7gbHd2pBnqcP1/vu -lBe3/IW+pKvEHDHd17bR5PDv3xaPslKT16HUiaEHLr/hARJCHhrh2JU022R5KP+6LhHC5ehbkkj7 -RwvCbNqtMoNB86XlQXD9ZZBt+vpRxPm9lisZBCzTbafc8H9vg2XiaquHhnUCAwEAAaOBrzCBrDAL -BgNVHQ8EBAMCAcYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU2u1kdBScFDyr3ZmpvVsoTYs8 -ydgwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL2NybC51c2VydHJ1c3QuY29tL1VUTi1VU0VSRmly -c3QtT2JqZWN0LmNybDApBgNVHSUEIjAgBggrBgEFBQcDAwYIKwYBBQUHAwgGCisGAQQBgjcKAwQw -DQYJKoZIhvcNAQEFBQADggEBAAgfUrE3RHjb/c652pWWmKpVZIC1WkDdIaXFwfNfLEzIR1pp6ujw -NTX00CXzyKakh0q9G7FzCL3Uw8q2NbtZhncxzaeAFK4T7/yxSPlrJSUtUbYsbUXBmMiKVl0+7kNO -PmsnjtA6S4ULX9Ptaqd1y9Fahy85dRNacrACgZ++8A+EVCBibGnU4U3GDZlDAQ0Slox4nb9QorFE -qmrPF3rPbw/U+CRVX/A0FklmPlBGyWNxODFiuGK581OtbLUrohKqGU8J2l7nk8aOFAj+8DCAGKCG -hU3IfdeLA/5u1fedFqySLKAj5ZyRUh+U3xeUc8OzwcFxBSAAeL0TUh2oPs0AH8g= ------END CERTIFICATE----- - Camerfirma Chambers of Commerce Root ==================================== -----BEGIN CERTIFICATE----- @@ -1354,42 +754,6 @@ IBHNfTIzSJRUTN3cecQwn+uOuFW114hcxWokPbLTBQNRxgfvzBRydD1ucs4YKIxKoHflCStFREes t2d/AYoFWpO+ocH/+OcOZ6RHSXZddZAa9SaP8A== -----END CERTIFICATE----- -NetLock Qualified (Class QA) Root -================================= ------BEGIN CERTIFICATE----- -MIIG0TCCBbmgAwIBAgIBezANBgkqhkiG9w0BAQUFADCByTELMAkGA1UEBhMCSFUxETAPBgNVBAcT -CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV -BAsTEVRhbnVzaXR2YW55a2lhZG9rMUIwQAYDVQQDEzlOZXRMb2NrIE1pbm9zaXRldHQgS296amVn -eXpvaSAoQ2xhc3MgUUEpIFRhbnVzaXR2YW55a2lhZG8xHjAcBgkqhkiG9w0BCQEWD2luZm9AbmV0 -bG9jay5odTAeFw0wMzAzMzAwMTQ3MTFaFw0yMjEyMTUwMTQ3MTFaMIHJMQswCQYDVQQGEwJIVTER -MA8GA1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRvbnNhZ2kgS2Z0 -LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxQjBABgNVBAMTOU5ldExvY2sgTWlub3NpdGV0 -dCBLb3pqZWd5em9pIChDbGFzcyBRQSkgVGFudXNpdHZhbnlraWFkbzEeMBwGCSqGSIb3DQEJARYP -aW5mb0BuZXRsb2NrLmh1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAx1Ilstg91IRV -CacbvWy5FPSKAtt2/GoqeKvld/Bu4IwjZ9ulZJm53QE+b+8tmjwi8F3JV6BVQX/yQ15YglMxZc4e -8ia6AFQer7C8HORSjKAyr7c3sVNnaHRnUPYtLmTeriZ539+Zhqurf4XsoPuAzPS4DB6TRWO53Lhb -m+1bOdRfYrCnjnxmOCyqsQhjF2d9zL2z8cM/z1A57dEZgxXbhxInlrfa6uWdvLrqOU+L73Sa58XQ -0uqGURzk/mQIKAR5BevKxXEOC++r6uwSEaEYBTJp0QwsGj0lmT+1fMptsK6ZmfoIYOcZwvK9UdPM -0wKswREMgM6r3JSda6M5UzrWhQIDAMV9o4ICwDCCArwwEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNV -HQ8BAf8EBAMCAQYwggJ1BglghkgBhvhCAQ0EggJmFoICYkZJR1lFTEVNISBFemVuIHRhbnVzaXR2 -YW55IGEgTmV0TG9jayBLZnQuIE1pbm9zaXRldHQgU3pvbGdhbHRhdGFzaSBTemFiYWx5emF0YWJh -biBsZWlydCBlbGphcmFzb2sgYWxhcGphbiBrZXN6dWx0LiBBIG1pbm9zaXRldHQgZWxla3Ryb25p -a3VzIGFsYWlyYXMgam9naGF0YXMgZXJ2ZW55ZXN1bGVzZW5laywgdmFsYW1pbnQgZWxmb2dhZGFz -YW5hayBmZWx0ZXRlbGUgYSBNaW5vc2l0ZXR0IFN6b2xnYWx0YXRhc2kgU3phYmFseXphdGJhbiwg -YXogQWx0YWxhbm9zIFN6ZXJ6b2Rlc2kgRmVsdGV0ZWxla2JlbiBlbG9pcnQgZWxsZW5vcnplc2kg -ZWxqYXJhcyBtZWd0ZXRlbGUuIEEgZG9rdW1lbnR1bW9rIG1lZ3RhbGFsaGF0b2sgYSBodHRwczov -L3d3dy5uZXRsb2NrLmh1L2RvY3MvIGNpbWVuIHZhZ3kga2VyaGV0b2sgYXogaW5mb0BuZXRsb2Nr -Lm5ldCBlLW1haWwgY2ltZW4uIFdBUk5JTkchIFRoZSBpc3N1YW5jZSBhbmQgdGhlIHVzZSBvZiB0 -aGlzIGNlcnRpZmljYXRlIGFyZSBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIFF1YWxpZmllZCBDUFMg -YXZhaWxhYmxlIGF0IGh0dHBzOi8vd3d3Lm5ldGxvY2suaHUvZG9jcy8gb3IgYnkgZS1tYWlsIGF0 -IGluZm9AbmV0bG9jay5uZXQwHQYDVR0OBBYEFAlqYhaSsFq7VQ7LdTI6MuWyIckoMA0GCSqGSIb3 -DQEBBQUAA4IBAQCRalCc23iBmz+LQuM7/KbD7kPgz/PigDVJRXYC4uMvBcXxKufAQTPGtpvQMznN -wNuhrWw3AkxYQTvyl5LGSKjN5Yo5iWH5Upfpvfb5lHTocQ68d4bDBsxafEp+NFAwLvt/MpqNPfMg -W/hqyobzMUwsWYACff44yTB1HLdV47yfuqhthCgFdbOLDcCRVCHnpgu0mfVRQdzNo0ci2ccBgcTc -R08m6h/t280NmPSjnLRzMkqWmf68f8glWPhY83ZmiVSkpj7EUFy6iRiCdUgh0k8T6GB+B3bbELVR -5qq5aKrN9p2QdRLqOBrKROi3macqaJVmlaut74nLYKkGEsaUR+ko ------END CERTIFICATE----- - NetLock Notary (Class A) Root ============================= -----BEGIN CERTIFICATE----- @@ -1425,64 +789,6 @@ KuZoPL9coAob4Q566eKAw+np9v1sEZ7Q5SgnK1QyQhSCdeZK8CtmdWOMovsEPoMOmzbwGOQmIMOM 8CgHrTwXZoi1/baI -----END CERTIFICATE----- -NetLock Business (Class B) Root -=============================== ------BEGIN CERTIFICATE----- -MIIFSzCCBLSgAwIBAgIBaTANBgkqhkiG9w0BAQQFADCBmTELMAkGA1UEBhMCSFUxETAPBgNVBAcT -CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV -BAsTEVRhbnVzaXR2YW55a2lhZG9rMTIwMAYDVQQDEylOZXRMb2NrIFV6bGV0aSAoQ2xhc3MgQikg -VGFudXNpdHZhbnlraWFkbzAeFw05OTAyMjUxNDEwMjJaFw0xOTAyMjAxNDEwMjJaMIGZMQswCQYD -VQQGEwJIVTERMA8GA1UEBxMIQnVkYXBlc3QxJzAlBgNVBAoTHk5ldExvY2sgSGFsb3phdGJpenRv -bnNhZ2kgS2Z0LjEaMBgGA1UECxMRVGFudXNpdHZhbnlraWFkb2sxMjAwBgNVBAMTKU5ldExvY2sg -VXpsZXRpIChDbGFzcyBCKSBUYW51c2l0dmFueWtpYWRvMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB -iQKBgQCx6gTsIKAjwo84YM/HRrPVG/77uZmeBNwcf4xKgZjupNTKihe5In+DCnVMm8Bp2GQ5o+2S -o/1bXHQawEfKOml2mrriRBf8TKPV/riXiK+IA4kfpPIEPsgHC+b5sy96YhQJRhTKZPWLgLViqNhr -1nGTLbO/CVRY7QbrqHvcQ7GhaQIDAQABo4ICnzCCApswEgYDVR0TAQH/BAgwBgEB/wIBBDAOBgNV -HQ8BAf8EBAMCAAYwEQYJYIZIAYb4QgEBBAQDAgAHMIICYAYJYIZIAYb4QgENBIICURaCAk1GSUdZ -RUxFTSEgRXplbiB0YW51c2l0dmFueSBhIE5ldExvY2sgS2Z0LiBBbHRhbGFub3MgU3pvbGdhbHRh -dGFzaSBGZWx0ZXRlbGVpYmVuIGxlaXJ0IGVsamFyYXNvayBhbGFwamFuIGtlc3p1bHQuIEEgaGl0 -ZWxlc2l0ZXMgZm9seWFtYXRhdCBhIE5ldExvY2sgS2Z0LiB0ZXJtZWtmZWxlbG9zc2VnLWJpenRv -c2l0YXNhIHZlZGkuIEEgZGlnaXRhbGlzIGFsYWlyYXMgZWxmb2dhZGFzYW5hayBmZWx0ZXRlbGUg -YXogZWxvaXJ0IGVsbGVub3J6ZXNpIGVsamFyYXMgbWVndGV0ZWxlLiBBeiBlbGphcmFzIGxlaXJh -c2EgbWVndGFsYWxoYXRvIGEgTmV0TG9jayBLZnQuIEludGVybmV0IGhvbmxhcGphbiBhIGh0dHBz -Oi8vd3d3Lm5ldGxvY2submV0L2RvY3MgY2ltZW4gdmFneSBrZXJoZXRvIGF6IGVsbGVub3J6ZXNA -bmV0bG9jay5uZXQgZS1tYWlsIGNpbWVuLiBJTVBPUlRBTlQhIFRoZSBpc3N1YW5jZSBhbmQgdGhl -IHVzZSBvZiB0aGlzIGNlcnRpZmljYXRlIGlzIHN1YmplY3QgdG8gdGhlIE5ldExvY2sgQ1BTIGF2 -YWlsYWJsZSBhdCBodHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIG9yIGJ5IGUtbWFpbCBhdCBj -cHNAbmV0bG9jay5uZXQuMA0GCSqGSIb3DQEBBAUAA4GBAATbrowXr/gOkDFOzT4JwG06sPgzTEdM -43WIEJessDgVkcYplswhwG08pXTP2IKlOcNl40JwuyKQ433bNXbhoLXan3BukxowOR0w2y7jfLKR -stE3Kfq51hdcR0/jHTjrn9V7lagonhVK0dHQKwCXoOKSNitjrFgBazMpUIaD8QFI ------END CERTIFICATE----- - -NetLock Express (Class C) Root -============================== ------BEGIN CERTIFICATE----- -MIIFTzCCBLigAwIBAgIBaDANBgkqhkiG9w0BAQQFADCBmzELMAkGA1UEBhMCSFUxETAPBgNVBAcT -CEJ1ZGFwZXN0MScwJQYDVQQKEx5OZXRMb2NrIEhhbG96YXRiaXp0b25zYWdpIEtmdC4xGjAYBgNV -BAsTEVRhbnVzaXR2YW55a2lhZG9rMTQwMgYDVQQDEytOZXRMb2NrIEV4cHJlc3N6IChDbGFzcyBD -KSBUYW51c2l0dmFueWtpYWRvMB4XDTk5MDIyNTE0MDgxMVoXDTE5MDIyMDE0MDgxMVowgZsxCzAJ -BgNVBAYTAkhVMREwDwYDVQQHEwhCdWRhcGVzdDEnMCUGA1UEChMeTmV0TG9jayBIYWxvemF0Yml6 -dG9uc2FnaSBLZnQuMRowGAYDVQQLExFUYW51c2l0dmFueWtpYWRvazE0MDIGA1UEAxMrTmV0TG9j -ayBFeHByZXNzeiAoQ2xhc3MgQykgVGFudXNpdHZhbnlraWFkbzCBnzANBgkqhkiG9w0BAQEFAAOB -jQAwgYkCgYEA6+ywbGGKIyWvYCDj2Z/8kwvbXY2wobNAOoLO/XXgeDIDhlqGlZHtU/qdQPzm6N3Z -W3oDvV3zOwzDUXmbrVWg6dADEK8KuhRC2VImESLH0iDMgqSaqf64gXadarfSNnU+sYYJ9m5tfk63 -euyucYT2BDMIJTLrdKwWRMbkQJMdf60CAwEAAaOCAp8wggKbMBIGA1UdEwEB/wQIMAYBAf8CAQQw -DgYDVR0PAQH/BAQDAgAGMBEGCWCGSAGG+EIBAQQEAwIABzCCAmAGCWCGSAGG+EIBDQSCAlEWggJN -RklHWUVMRU0hIEV6ZW4gdGFudXNpdHZhbnkgYSBOZXRMb2NrIEtmdC4gQWx0YWxhbm9zIFN6b2xn -YWx0YXRhc2kgRmVsdGV0ZWxlaWJlbiBsZWlydCBlbGphcmFzb2sgYWxhcGphbiBrZXN6dWx0LiBB -IGhpdGVsZXNpdGVzIGZvbHlhbWF0YXQgYSBOZXRMb2NrIEtmdC4gdGVybWVrZmVsZWxvc3NlZy1i -aXp0b3NpdGFzYSB2ZWRpLiBBIGRpZ2l0YWxpcyBhbGFpcmFzIGVsZm9nYWRhc2FuYWsgZmVsdGV0 -ZWxlIGF6IGVsb2lydCBlbGxlbm9yemVzaSBlbGphcmFzIG1lZ3RldGVsZS4gQXogZWxqYXJhcyBs -ZWlyYXNhIG1lZ3RhbGFsaGF0byBhIE5ldExvY2sgS2Z0LiBJbnRlcm5ldCBob25sYXBqYW4gYSBo -dHRwczovL3d3dy5uZXRsb2NrLm5ldC9kb2NzIGNpbWVuIHZhZ3kga2VyaGV0byBheiBlbGxlbm9y -emVzQG5ldGxvY2submV0IGUtbWFpbCBjaW1lbi4gSU1QT1JUQU5UISBUaGUgaXNzdWFuY2UgYW5k -IHRoZSB1c2Ugb2YgdGhpcyBjZXJ0aWZpY2F0ZSBpcyBzdWJqZWN0IHRvIHRoZSBOZXRMb2NrIENQ -UyBhdmFpbGFibGUgYXQgaHR0cHM6Ly93d3cubmV0bG9jay5uZXQvZG9jcyBvciBieSBlLW1haWwg -YXQgY3BzQG5ldGxvY2submV0LjANBgkqhkiG9w0BAQQFAAOBgQAQrX/XDDKACtiG8XmYta3UzbM2 -xJZIwVzNmtkFLp++UOv0JhQQLdRmF/iewSf98e3ke0ugbLWrmldwpu2gpO0u9f38vf5NNwgMvOOW -gyL1SRt/Syu0VMGAfJlOHdCM7tCs5ZL6dVb+ZKATj7i4Fp1hBWeAyNDYpQcCNJgEjTME1A== ------END CERTIFICATE----- - XRamp Global CA Root ==================== -----BEGIN CERTIFICATE----- @@ -1626,54 +932,6 @@ CZBUkQM8R+XVyWXgt0t97EfTsws+rZ7QdAAO671RrcDeLMDDav7v3Aun+kbfYNucpllQdSNpc5Oy +fwC00fmcc4QAu4njIT/rEUNE1yDMuAlpYYsfPQS -----END CERTIFICATE----- -Firmaprofesional Root CA -======================== ------BEGIN CERTIFICATE----- -MIIEVzCCAz+gAwIBAgIBATANBgkqhkiG9w0BAQUFADCBnTELMAkGA1UEBhMCRVMxIjAgBgNVBAcT -GUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMTOUF1dG9yaWRhZCBkZSBDZXJ0aWZp -Y2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2ODEmMCQGCSqGSIb3DQEJARYXY2FA -ZmlybWFwcm9mZXNpb25hbC5jb20wHhcNMDExMDI0MjIwMDAwWhcNMTMxMDI0MjIwMDAwWjCBnTEL -MAkGA1UEBhMCRVMxIjAgBgNVBAcTGUMvIE11bnRhbmVyIDI0NCBCYXJjZWxvbmExQjBABgNVBAMT -OUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwgQ0lGIEE2MjYzNDA2 -ODEmMCQGCSqGSIb3DQEJARYXY2FAZmlybWFwcm9mZXNpb25hbC5jb20wggEiMA0GCSqGSIb3DQEB -AQUAA4IBDwAwggEKAoIBAQDnIwNvbyOlXnjOlSztlB5uCp4Bx+ow0Syd3Tfom5h5VtP8c9/Qit5V -j1H5WuretXDE7aTt/6MNbg9kUDGvASdYrv5sp0ovFy3Tc9UTHI9ZpTQsHVQERc1ouKDAA6XPhUJH -lShbz++AbOCQl4oBPB3zhxAwJkh91/zpnZFx/0GaqUC1N5wpIE8fUuOgfRNtVLcK3ulqTgesrBlf -3H5idPayBQC6haD9HThuy1q7hryUZzM1gywfI834yJFxzJeL764P3CkDG8A563DtwW4O2GcLiam8 -NeTvtjS0pbbELaW+0MOUJEjb35bTALVmGotmBQ/dPz/LP6pemkr4tErvlTcbAgMBAAGjgZ8wgZww -KgYDVR0RBCMwIYYfaHR0cDovL3d3dy5maXJtYXByb2Zlc2lvbmFsLmNvbTASBgNVHRMBAf8ECDAG -AQH/AgEBMCsGA1UdEAQkMCKADzIwMDExMDI0MjIwMDAwWoEPMjAxMzEwMjQyMjAwMDBaMA4GA1Ud -DwEB/wQEAwIBBjAdBgNVHQ4EFgQUMwugZtHq2s7eYpMEKFK1FH84aLcwDQYJKoZIhvcNAQEFBQAD -ggEBAEdz/o0nVPD11HecJ3lXV7cVVuzH2Fi3AQL0M+2TUIiefEaxvT8Ub/GzR0iLjJcG1+p+o1wq -u00vR+L4OQbJnC4xGgN49Lw4xiKLMzHwFgQEffl25EvXwOaD7FnMP97/T2u3Z36mhoEyIwOdyPdf -wUpgpZKpsaSgYMN4h7Mi8yrrW6ntBas3D7Hi05V2Y1Z0jFhyGzflZKG+TQyTmAyX9odtsz/ny4Cm -7YjHX1BiAuiZdBbQ5rQ58SfLyEDW44YQqSMSkuBpQWOnryULwMWSyx6Yo1q6xTMPoJcB3X/ge9YG -VM+h4k0460tQtcsm9MracEpqoeJ5quGnM/b9Sh/22WA= ------END CERTIFICATE----- - -Wells Fargo Root CA -=================== ------BEGIN CERTIFICATE----- -MIID5TCCAs2gAwIBAgIEOeSXnjANBgkqhkiG9w0BAQUFADCBgjELMAkGA1UEBhMCVVMxFDASBgNV -BAoTC1dlbGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhv -cml0eTEvMC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwHhcN -MDAxMDExMTY0MTI4WhcNMjEwMTE0MTY0MTI4WjCBgjELMAkGA1UEBhMCVVMxFDASBgNVBAoTC1dl -bGxzIEZhcmdvMSwwKgYDVQQLEyNXZWxscyBGYXJnbyBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEv -MC0GA1UEAxMmV2VsbHMgRmFyZ28gUm9vdCBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggEiMA0GCSqG -SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVqDM7Jvk0/82bfuUER84A4n135zHCLielTWi5MbqNQ1mX -x3Oqfz1cQJ4F5aHiidlMuD+b+Qy0yGIZLEWukR5zcUHESxP9cMIlrCL1dQu3U+SlK93OvRw6esP3 -E48mVJwWa2uv+9iWsWCaSOAlIiR5NM4OJgALTqv9i86C1y8IcGjBqAr5dE8Hq6T54oN+J3N0Prj5 -OEL8pahbSCOz6+MlsoCultQKnMJ4msZoGK43YjdeUXWoWGPAUe5AeH6orxqg4bB4nVCMe+ez/I4j -sNtlAHCEAQgAFG5Uhpq6zPk3EPbg3oQtnaSFN9OH4xXQwReQfhkhahKpdv0SAulPIV4XAgMBAAGj -YTBfMA8GA1UdEwEB/wQFMAMBAf8wTAYDVR0gBEUwQzBBBgtghkgBhvt7hwcBCzAyMDAGCCsGAQUF -BwIBFiRodHRwOi8vd3d3LndlbGxzZmFyZ28uY29tL2NlcnRwb2xpY3kwDQYJKoZIhvcNAQEFBQAD -ggEBANIn3ZwKdyu7IvICtUpKkfnRLb7kuxpo7w6kAOnu5+/u9vnldKTC2FJYxHT7zmu1Oyl5GFrv -m+0fazbuSCUlFLZWohDo7qd/0D+j0MNdJu4HzMPBJCGHHt8qElNvQRbn7a6U+oxy+hNH8Dx+rn0R -OhPs7fpvcmR7nX1/Jv16+yWt6j4pf0zjAFcysLPp7VMX2YuyFA4w6OXVE8Zkr8QA1dhYJPz1j+zx -x32l2w8n0cbyQIjmH/ZhqPRCyLk306m+LFZ4wnKbWV01QIroTmMatukgalHizqSQ33ZwmVxwQ023 -tqcZZE6St8WRPH9IFmV7Fv3L/PvZ1dZPIWU7Sn9Ho/s= ------END CERTIFICATE----- - Swisscom Root CA 1 ================== -----BEGIN CERTIFICATE----- @@ -1838,85 +1096,6 @@ vFcj4jjSm2jzVhKIT0J8uDHEtdvkyCE06UgRNe76x5JXxZ805Mf29w4LTJxoeHtxMcfrHuBnQfO3 oKfN5XozNmr6mis= -----END CERTIFICATE----- -TURKTRUST Certificate Services Provider Root 1 -============================================== ------BEGIN CERTIFICATE----- -MIID+zCCAuOgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBtzE/MD0GA1UEAww2VMOcUktUUlVTVCBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGDAJUUjEP -MA0GA1UEBwwGQU5LQVJBMVYwVAYDVQQKDE0oYykgMjAwNSBUw5xSS1RSVVNUIEJpbGdpIMSwbGV0 -acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjAeFw0wNTA1MTMx -MDI3MTdaFw0xNTAzMjIxMDI3MTdaMIG3MT8wPQYDVQQDDDZUw5xSS1RSVVNUIEVsZWt0cm9uaWsg -U2VydGlmaWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLExCzAJBgNVBAYMAlRSMQ8wDQYDVQQHDAZB -TktBUkExVjBUBgNVBAoMTShjKSAyMDA1IFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBC -aWxpxZ9pbSBHw7x2ZW5sacSfaSBIaXptZXRsZXJpIEEuxZ4uMIIBIjANBgkqhkiG9w0BAQEFAAOC -AQ8AMIIBCgKCAQEAylIF1mMD2Bxf3dJ7XfIMYGFbazt0K3gNfUW9InTojAPBxhEqPZW8qZSwu5GX -yGl8hMW0kWxsE2qkVa2kheiVfrMArwDCBRj1cJ02i67L5BuBf5OI+2pVu32Fks66WJ/bMsW9Xe8i -Si9BB35JYbOG7E6mQW6EvAPs9TscyB/C7qju6hJKjRTP8wrgUDn5CDX4EVmt5yLqS8oUBt5CurKZ -8y1UiBAG6uEaPj1nH/vO+3yC6BFdSsG5FOpU2WabfIl9BJpiyelSPJ6c79L1JuTm5Rh8i27fbMx4 -W09ysstcP4wFjdFMjK2Sx+F4f2VsSQZQLJ4ywtdKxnWKWU51b0dewQIDAQABoxAwDjAMBgNVHRME -BTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAV9VX/N5aAWSGk/KEVTCD21F/aAyT8z5Aa9CEKmu46 -sWrv7/hg0Uw2ZkUd82YCdAR7kjCo3gp2D++Vbr3JN+YaDayJSFvMgzbC9UZcWYJWtNX+I7TYVBxE -q8Sn5RTOPEFhfEPmzcSBCYsk+1Ql1haolgxnB2+zUEfjHCQo3SqYpGH+2+oSN7wBGjSFvW5P55Fy -B0SFHljKVETd96y5y4khctuPwGkplyqjrhgjlxxBKot8KsF8kOipKMDTkcatKIdAaLX/7KfS0zgY -nNN9aV3wxqUeJBujR/xpB2jn5Jq07Q+hh4cCzofSSE7hvP/L8XKSRGQDJereW26fyfJOrN3H ------END CERTIFICATE----- - -TURKTRUST Certificate Services Provider Root 2 -============================================== ------BEGIN CERTIFICATE----- -MIIEPDCCAySgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP -MA0GA1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg -QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwHhcN -MDUxMTA3MTAwNzU3WhcNMTUwOTE2MTAwNzU3WjCBvjE/MD0GA1UEAww2VMOcUktUUlVTVCBFbGVr -dHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEPMA0G -A1UEBwwGQW5rYXJhMV0wWwYDVQQKDFRUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls -acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgS2FzxLFtIDIwMDUwggEiMA0G -CSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCpNn7DkUNMwxmYCMjHWHtPFoylzkkBH3MOrHUTpvqe -LCDe2JAOCtFp0if7qnefJ1Il4std2NiDUBd9irWCPwSOtNXwSadktx4uXyCcUHVPr+G1QRT0mJKI -x+XlZEdhR3n9wFHxwZnn3M5q+6+1ATDcRhzviuyV79z/rxAc653YsKpqhRgNF8k+v/Gb0AmJQv2g -QrSdiVFVKc8bcLyEVK3BEx+Y9C52YItdP5qtygy/p1Zbj3e41Z55SZI/4PGXJHpsmxcPbe9TmJEr -5A++WXkHeLuXlfSfadRYhwqp48y2WBmfJiGxxFmNskF1wK1pzpwACPI2/z7woQ8arBT9pmAPAgMB -AAGjQzBBMB0GA1UdDgQWBBTZN7NOBf3Zz58SFq62iS/rJTqIHDAPBgNVHQ8BAf8EBQMDBwYAMA8G -A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEFBQADggEBAHJglrfJ3NgpXiOFX7KzLXb7iNcX/ntt -Rbj2hWyfIvwqECLsqrkw9qtY1jkQMZkpAL2JZkH7dN6RwRgLn7Vhy506vvWolKMiVW4XSf/SKfE4 -Jl3vpao6+XF75tpYHdN0wgH6PmlYX63LaL4ULptswLbcoCb6dxriJNoaN+BnrdFzgw2lGh1uEpJ+ -hGIAF728JRhX8tepb1mIvDS3LoV4nZbcFMMsilKbloxSZj2GFotHuFEJjOp9zYhys2AzsfAKRO8P -9Qk3iCQOLGsgOqL6EfJANZxEaGM7rDNvY7wsu/LSy3Z9fYjYHcgFHW68lKlmjHdxx/qR+i9Rnuk5 -UrbnBEI= ------END CERTIFICATE----- - -SwissSign Platinum CA - G2 -========================== ------BEGIN CERTIFICATE----- -MIIFwTCCA6mgAwIBAgIITrIAZwwDXU8wDQYJKoZIhvcNAQEFBQAwSTELMAkGA1UEBhMCQ0gxFTAT -BgNVBAoTDFN3aXNzU2lnbiBBRzEjMCEGA1UEAxMaU3dpc3NTaWduIFBsYXRpbnVtIENBIC0gRzIw -HhcNMDYxMDI1MDgzNjAwWhcNMzYxMDI1MDgzNjAwWjBJMQswCQYDVQQGEwJDSDEVMBMGA1UEChMM -U3dpc3NTaWduIEFHMSMwIQYDVQQDExpTd2lzc1NpZ24gUGxhdGludW0gQ0EgLSBHMjCCAiIwDQYJ -KoZIhvcNAQEBBQADggIPADCCAgoCggIBAMrfogLi2vj8Bxax3mCq3pZcZB/HL37PZ/pEQtZ2Y5Wu -669yIIpFR4ZieIbWIDkm9K6j/SPnpZy1IiEZtzeTIsBQnIJ71NUERFzLtMKfkr4k2HtnIuJpX+UF -eNSH2XFwMyVTtIc7KZAoNppVRDBopIOXfw0enHb/FZ1glwCNioUD7IC+6ixuEFGSzH7VozPY1kne -WCqv9hbrS3uQMpe5up1Y8fhXSQQeol0GcN1x2/ndi5objM89o03Oy3z2u5yg+gnOI2Ky6Q0f4nIo -j5+saCB9bzuohTEJfwvH6GXp43gOCWcwizSC+13gzJ2BbWLuCB4ELE6b7P6pT1/9aXjvCR+htL/6 -8++QHkwFix7qepF6w9fl+zC8bBsQWJj3Gl/QKTIDE0ZNYWqFTFJ0LwYfexHihJfGmfNtf9dng34T -aNhxKFrYzt3oEBSa/m0jh26OWnA81Y0JAKeqvLAxN23IhBQeW71FYyBrS3SMvds6DsHPWhaPpZjy -domyExI7C3d3rLvlPClKknLKYRorXkzig3R3+jVIeoVNjZpTxN94ypeRSCtFKwH3HBqi7Ri6Cr2D -+m+8jVeTO9TUps4e8aCxzqv9KyiaTxvXw3LbpMS/XUz13XuWae5ogObnmLo2t/5u7Su9IPhlGdpV -CX4l3P5hYnL5fhgC72O00Puv5TtjjGePAgMBAAGjgawwgakwDgYDVR0PAQH/BAQDAgEGMA8GA1Ud -EwEB/wQFMAMBAf8wHQYDVR0OBBYEFFCvzAeHFUdvOMW0ZdHelarp35zMMB8GA1UdIwQYMBaAFFCv -zAeHFUdvOMW0ZdHelarp35zMMEYGA1UdIAQ/MD0wOwYJYIV0AVkBAQEBMC4wLAYIKwYBBQUHAgEW -IGh0dHA6Ly9yZXBvc2l0b3J5LnN3aXNzc2lnbi5jb20vMA0GCSqGSIb3DQEBBQUAA4ICAQAIhab1 -Fgz8RBrBY+D5VUYI/HAcQiiWjrfFwUF1TglxeeVtlspLpYhg0DB0uMoI3LQwnkAHFmtllXcBrqS3 -NQuB2nEVqXQXOHtYyvkv+8Bldo1bAbl93oI9ZLi+FHSjClTTLJUYFzX1UWs/j6KWYTl4a0vlpqD4 -U99REJNi54Av4tHgvI42Rncz7Lj7jposiU0xEQ8mngS7twSNC/K5/FqdOxa3L8iYq/6KUFkuozv8 -KV2LwUvJ4ooTHbG/u0IdUt1O2BReEMYxB+9xJ/cbOQncguqLs5WGXv312l0xpuAxtpTmREl0xRbl -9x8DYSjFyMsSoEJL+WuICI20MhjzdZ/EfwBPBZWcoxcCw7NTm6ogOSkrZvqdr16zktK1puEa+S1B -aYEUtLS17Yk9zvupnTVCRLEcFHOBzyoBNZox1S2PbYTfgE1X4z/FhHXaicYwu+uPyyIIoK6q8QNs -OktNCaUOcsZWayFCTiMlFGiudgp8DAdwZPmaL/YFOSbGDI8Zf0NebvRbFS/bYV3mZy8/CJT5YLSY -Mdp08YSTcU1f+2BY0fvEwW2JorsgH51xkcsymxM9Pn2SUjWskpSi0xjCfMfqr3YFFt1nJ8J+HAci -IfNAChs0B0QTwoRqjt8ZWr9/6x3iGjjRXK9HkmuAtTClyY3YqzGBH9/CZjfTk6mFhnll0g== ------END CERTIFICATE----- - SwissSign Gold CA - G2 ====================== -----BEGIN CERTIFICATE----- @@ -2254,32 +1433,6 @@ hNVQA7bihKOmNqoROgHhGEvWRGizPflTdISzRpFGlgC3gCy24eMQ4tui5yiPAZZiFj4A4xylNoEY okxSdsARo27mHbrjWr42U8U+dY+GaSlYU7Wcu2+fXMUY7N0v4ZjJ/L7fCg0= -----END CERTIFICATE----- -S-TRUST Authentication and Encryption Root CA 2005 PN -===================================================== ------BEGIN CERTIFICATE----- -MIIEezCCA2OgAwIBAgIQNxkY5lNUfBq1uMtZWts1tzANBgkqhkiG9w0BAQUFADCBrjELMAkGA1UE -BhMCREUxIDAeBgNVBAgTF0JhZGVuLVd1ZXJ0dGVtYmVyZyAoQlcpMRIwEAYDVQQHEwlTdHV0dGdh -cnQxKTAnBgNVBAoTIERldXRzY2hlciBTcGFya2Fzc2VuIFZlcmxhZyBHbWJIMT4wPAYDVQQDEzVT -LVRSVVNUIEF1dGhlbnRpY2F0aW9uIGFuZCBFbmNyeXB0aW9uIFJvb3QgQ0EgMjAwNTpQTjAeFw0w -NTA2MjIwMDAwMDBaFw0zMDA2MjEyMzU5NTlaMIGuMQswCQYDVQQGEwJERTEgMB4GA1UECBMXQmFk -ZW4tV3VlcnR0ZW1iZXJnIChCVykxEjAQBgNVBAcTCVN0dXR0Z2FydDEpMCcGA1UEChMgRGV1dHNj -aGVyIFNwYXJrYXNzZW4gVmVybGFnIEdtYkgxPjA8BgNVBAMTNVMtVFJVU1QgQXV0aGVudGljYXRp -b24gYW5kIEVuY3J5cHRpb24gUm9vdCBDQSAyMDA1OlBOMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A -MIIBCgKCAQEA2bVKwdMz6tNGs9HiTNL1toPQb9UY6ZOvJ44TzbUlNlA0EmQpoVXhOmCTnijJ4/Ob -4QSwI7+Vio5bG0F/WsPoTUzVJBY+h0jUJ67m91MduwwA7z5hca2/OnpYH5Q9XIHV1W/fuJvS9eXL -g3KSwlOyggLrra1fFi2SU3bxibYs9cEv4KdKb6AwajLrmnQDaHgTncovmwsdvs91DSaXm8f1Xgqf -eN+zvOyauu9VjxuapgdjKRdZYgkqeQd3peDRF2npW932kKvimAoA0SVtnteFhy+S8dF2g08LOlk3 -KC8zpxdQ1iALCvQm+Z845y2kuJuJja2tyWp9iRe79n+Ag3rm7QIDAQABo4GSMIGPMBIGA1UdEwEB -/wQIMAYBAf8CAQAwDgYDVR0PAQH/BAQDAgEGMCkGA1UdEQQiMCCkHjAcMRowGAYDVQQDExFTVFJv -bmxpbmUxLTIwNDgtNTAdBgNVHQ4EFgQUD8oeXHngovMpttKFswtKtWXsa1IwHwYDVR0jBBgwFoAU -D8oeXHngovMpttKFswtKtWXsa1IwDQYJKoZIhvcNAQEFBQADggEBAK8B8O0ZPCjoTVy7pWMciDMD -pwCHpB8gq9Yc4wYfl35UvbfRssnV2oDsF9eK9XvCAPbpEW+EoFolMeKJ+aQAPzFoLtU96G7m1R08 -P7K9n3frndOMusDXtk3sU5wPBG7qNWdX4wple5A64U8+wwCSersFiXOMy6ZNwPv2AtawB6MDwidA -nwzkhYItr5pCHdDHjfhA7p0GVxzZotiAFP7hYy0yh9WUUpY6RsZxlj33mA6ykaqP2vROJAA5Veit -F7nTNCtKqUDMFypVZUF0Qn71wK/Ik63yGFs9iQzbRzkk+OBM8h+wPQrKBU6JIRrjKpms/H+h8Q8b -Hz2eBIPdltkdOpQ= ------END CERTIFICATE----- - Microsec e-Szigno Root CA ========================= -----BEGIN CERTIFICATE----- @@ -2342,117 +1495,6 @@ PBS1xp81HlDQwY9qcEQCYsuuHWhBp6pX6FOqB9IG9tUUBguRA3UsbHK1YZWaDYu5Def131TN3ubY WyH8EZE0vkHve52Xdf+XlcCWWC/qu0bXu+TZLg== -----END CERTIFICATE----- -AC Ra\xC3\xADz Certic\xC3\xA1mara S.A. -====================================== ------BEGIN CERTIFICATE----- -MIIGZjCCBE6gAwIBAgIPB35Sk3vgFeNX8GmMy+wMMA0GCSqGSIb3DQEBBQUAMHsxCzAJBgNVBAYT -AkNPMUcwRQYDVQQKDD5Tb2NpZWRhZCBDYW1lcmFsIGRlIENlcnRpZmljYWNpw7NuIERpZ2l0YWwg -LSBDZXJ0aWPDoW1hcmEgUy5BLjEjMCEGA1UEAwwaQUMgUmHDrXogQ2VydGljw6FtYXJhIFMuQS4w -HhcNMDYxMTI3MjA0NjI5WhcNMzAwNDAyMjE0MjAyWjB7MQswCQYDVQQGEwJDTzFHMEUGA1UECgw+ -U29jaWVkYWQgQ2FtZXJhbCBkZSBDZXJ0aWZpY2FjacOzbiBEaWdpdGFsIC0gQ2VydGljw6FtYXJh -IFMuQS4xIzAhBgNVBAMMGkFDIFJhw616IENlcnRpY8OhbWFyYSBTLkEuMIICIjANBgkqhkiG9w0B -AQEFAAOCAg8AMIICCgKCAgEAq2uJo1PMSCMI+8PPUZYILrgIem08kBeGqentLhM0R7LQcNzJPNCN -yu5LF6vQhbCnIwTLqKL85XXbQMpiiY9QngE9JlsYhBzLfDe3fezTf3MZsGqy2IiKLUV0qPezuMDU -2s0iiXRNWhU5cxh0T7XrmafBHoi0wpOQY5fzp6cSsgkiBzPZkc0OnB8OIMfuuzONj8LSWKdf/WU3 -4ojC2I+GdV75LaeHM/J4Ny+LvB2GNzmxlPLYvEqcgxhaBvzz1NS6jBUJJfD5to0EfhcSM2tXSExP -2yYe68yQ54v5aHxwD6Mq0Do43zeX4lvegGHTgNiRg0JaTASJaBE8rF9ogEHMYELODVoqDA+bMMCm -8Ibbq0nXl21Ii/kDwFJnmxL3wvIumGVC2daa49AZMQyth9VXAnow6IYm+48jilSH5L887uvDdUhf -HjlvgWJsxS3EF1QZtzeNnDeRyPYL1epjb4OsOMLzP96a++EjYfDIJss2yKHzMI+ko6Kh3VOz3vCa -Mh+DkXkwwakfU5tTohVTP92dsxA7SH2JD/ztA/X7JWR1DhcZDY8AFmd5ekD8LVkH2ZD6mq093ICK -5lw1omdMEWux+IBkAC1vImHFrEsm5VoQgpukg3s0956JkSCXjrdCx2bD0Omk1vUgjcTDlaxECp1b -czwmPS9KvqfJpxAe+59QafMCAwEAAaOB5jCB4zAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQE -AwIBBjAdBgNVHQ4EFgQU0QnQ6dfOeXRU+Tows/RtLAMDG2gwgaAGA1UdIASBmDCBlTCBkgYEVR0g -ADCBiTArBggrBgEFBQcCARYfaHR0cDovL3d3dy5jZXJ0aWNhbWFyYS5jb20vZHBjLzBaBggrBgEF -BQcCAjBOGkxMaW1pdGFjaW9uZXMgZGUgZ2FyYW507WFzIGRlIGVzdGUgY2VydGlmaWNhZG8gc2Ug -cHVlZGVuIGVuY29udHJhciBlbiBsYSBEUEMuMA0GCSqGSIb3DQEBBQUAA4ICAQBclLW4RZFNjmEf -AygPU3zmpFmps4p6xbD/CHwso3EcIRNnoZUSQDWDg4902zNc8El2CoFS3UnUmjIz75uny3XlesuX -EpBcunvFm9+7OSPI/5jOCk0iAUgHforA1SBClETvv3eiiWdIG0ADBaGJ7M9i4z0ldma/Jre7Ir5v -/zlXdLp6yQGVwZVR6Kss+LGGIOk/yzVb0hfpKv6DExdA7ohiZVvVO2Dpezy4ydV/NgIlqmjCMRW3 -MGXrfx1IebHPOeJCgBbT9ZMj/EyXyVo3bHwi2ErN0o42gzmRkBDI8ck1fj+404HGIGQatlDCIaR4 -3NAvO2STdPCWkPHv+wlaNECW8DYSwaN0jJN+Qd53i+yG2dIPPy3RzECiiWZIHiCznCNZc6lEc7wk -eZBWN7PGKX6jD/EpOe9+XCgycDWs2rjIdWb8m0w5R44bb5tNAlQiM+9hup4phO9OSzNHdpdqy35f -/RWmnkJDW2ZaiogN9xa5P1FlK2Zqi9E4UqLWRhH6/JocdJ6PlwsCT2TG9WjTSy3/pDceiz+/RL5h -RqGEPQgnTIEgd4kI6mdAXmwIUV80WoyWaM3X94nCHNMyAK9Sy9NgWyo6R35rMDOhYil/SrnhLecU -Iw4OGEfhefwVVdCx/CVxY3UzHCMrr1zZ7Ud3YA47Dx7SwNxkBYn8eNZcLCZDqQ== ------END CERTIFICATE----- - -TC TrustCenter Class 2 CA II -============================ ------BEGIN CERTIFICATE----- -MIIEqjCCA5KgAwIBAgIOLmoAAQACH9dSISwRXDswDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC -REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy -IENsYXNzIDIgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2VudGVyIENsYXNzIDIgQ0EgSUkwHhcNMDYw -MTEyMTQzODQzWhcNMjUxMjMxMjI1OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1 -c3RDZW50ZXIgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQTElMCMGA1UE -AxMcVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMiBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBAKuAh5uO8MN8h9foJIIRszzdQ2Lu+MNF2ujhoF/RKrLqk2jftMjWQ+nEdVl//OEd+DFw -IxuInie5e/060smp6RQvkL4DUsFJzfb95AhmC1eKokKguNV/aVyQMrKXDcpK3EY+AlWJU+MaWss2 -xgdW94zPEfRMuzBwBJWl9jmM/XOBCH2JXjIeIqkiRUuwZi4wzJ9l/fzLganx4Duvo4bRierERXlQ -Xa7pIXSSTYtZgo+U4+lK8edJsBTj9WLL1XK9H7nSn6DNqPoByNkN39r8R52zyFTfSUrxIan+GE7u -SNQZu+995OKdy1u2bv/jzVrndIIFuoAlOMvkaZ6vQaoahPUCAwEAAaOCATQwggEwMA8GA1UdEwEB -/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTjq1RMgKHbVkO3kUrL84J6E1wIqzCB -7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2NybC92Mi90 -Y19jbGFzc18yX2NhX0lJLmNybIaBn2xkYXA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBU -cnVzdENlbnRlciUyMENsYXNzJTIwMiUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i -SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u -TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEAjNfffu4bgBCzg/XbEeprS6iSGNn3Bzn1LL4G -dXpoUxUc6krtXvwjshOg0wn/9vYua0Fxec3ibf2uWWuFHbhOIprtZjluS5TmVfwLG4t3wVMTZonZ -KNaL80VKY7f9ewthXbhtvsPcW3nS7Yblok2+XnR8au0WOB9/WIFaGusyiC2y8zl3gK9etmF1Kdsj -TYjKUCjLhdLTEKJZbtOTVAB6okaVhgWcqRmY5TFyDADiZ9lA4CQze28suVyrZZ0srHbqNZn1l7kP -JOzHdiEoZa5X6AeIdUpWoNIFOqTmjZKILPPy4cHGYdtBxceb9w4aUUXCYWvcZCcXjFq32nQozZfk -vQ== ------END CERTIFICATE----- - -TC TrustCenter Class 3 CA II -============================ ------BEGIN CERTIFICATE----- -MIIEqjCCA5KgAwIBAgIOSkcAAQAC5aBd1j8AUb8wDQYJKoZIhvcNAQEFBQAwdjELMAkGA1UEBhMC -REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxIjAgBgNVBAsTGVRDIFRydXN0Q2VudGVy -IENsYXNzIDMgQ0ExJTAjBgNVBAMTHFRDIFRydXN0Q2VudGVyIENsYXNzIDMgQ0EgSUkwHhcNMDYw -MTEyMTQ0MTU3WhcNMjUxMjMxMjI1OTU5WjB2MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMgVHJ1 -c3RDZW50ZXIgR21iSDEiMCAGA1UECxMZVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQTElMCMGA1UE -AxMcVEMgVHJ1c3RDZW50ZXIgQ2xhc3MgMyBDQSBJSTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBALTgu1G7OVyLBMVMeRwjhjEQY0NVJz/GRcekPewJDRoeIMJWHt4bNwcwIi9v8Qbxq63W -yKthoy9DxLCyLfzDlml7forkzMA5EpBCYMnMNWju2l+QVl/NHE1bWEnrDgFPZPosPIlY2C8u4rBo -6SI7dYnWRBpl8huXJh0obazovVkdKyT21oQDZogkAHhg8fir/gKya/si+zXmFtGt9i4S5Po1auUZ -uV3bOx4a+9P/FRQI2AlqukWdFHlgfa9Aigdzs5OW03Q0jTo3Kd5c7PXuLjHCINy+8U9/I1LZW+Jk -2ZyqBwi1Rb3R0DHBq1SfqdLDYmAD8bs5SpJKPQq5ncWg/jcCAwEAAaOCATQwggEwMA8GA1UdEwEB -/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTUovyfs8PYA9NXXAek0CSnwPIA1DCB -7QYDVR0fBIHlMIHiMIHfoIHcoIHZhjVodHRwOi8vd3d3LnRydXN0Y2VudGVyLmRlL2NybC92Mi90 -Y19jbGFzc18zX2NhX0lJLmNybIaBn2xkYXA6Ly93d3cudHJ1c3RjZW50ZXIuZGUvQ049VEMlMjBU -cnVzdENlbnRlciUyMENsYXNzJTIwMyUyMENBJTIwSUksTz1UQyUyMFRydXN0Q2VudGVyJTIwR21i -SCxPVT1yb290Y2VydHMsREM9dHJ1c3RjZW50ZXIsREM9ZGU/Y2VydGlmaWNhdGVSZXZvY2F0aW9u -TGlzdD9iYXNlPzANBgkqhkiG9w0BAQUFAAOCAQEANmDkcPcGIEPZIxpC8vijsrlNirTzwppVMXzE -O2eatN9NDoqTSheLG43KieHPOh6sHfGcMrSOWXaiQYUlN6AT0PV8TtXqluJucsG7Kv5sbviRmEb8 -yRtXW+rIGjs/sFGYPAfaLFkB2otE6OF0/ado3VS6g0bsyEa1+K+XwDsJHI/OcpY9M1ZwvJbL2NV9 -IJqDnxrcOfHFcqMRA/07QlIp2+gB95tejNaNhk4Z+rwcvsUhpYeeeC422wlxo3I0+GzjBgnyXlal -092Y+tTmBvTwtiBjS+opvaqCZh77gaqnN60TGOaSw4HBM7uIHqHn4rS9MWwOUT1v+5ZWgOI2F9Hc -5A== ------END CERTIFICATE----- - -TC TrustCenter Universal CA I -============================= ------BEGIN CERTIFICATE----- -MIID3TCCAsWgAwIBAgIOHaIAAQAC7LdggHiNtgYwDQYJKoZIhvcNAQEFBQAweTELMAkGA1UEBhMC -REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy -IFVuaXZlcnNhbCBDQTEmMCQGA1UEAxMdVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIEkwHhcN -MDYwMzIyMTU1NDI4WhcNMjUxMjMxMjI1OTU5WjB5MQswCQYDVQQGEwJERTEcMBoGA1UEChMTVEMg -VHJ1c3RDZW50ZXIgR21iSDEkMCIGA1UECxMbVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBMSYw -JAYDVQQDEx1UQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0EgSTCCASIwDQYJKoZIhvcNAQEBBQAD -ggEPADCCAQoCggEBAKR3I5ZEr5D0MacQ9CaHnPM42Q9e3s9B6DGtxnSRJJZ4Hgmgm5qVSkr1YnwC -qMqs+1oEdjneX/H5s7/zA1hV0qq34wQi0fiU2iIIAI3TfCZdzHd55yx4Oagmcw6iXSVphU9VDprv -xrlE4Vc93x9UIuVvZaozhDrzznq+VZeujRIPFDPiUHDDSYcTvFHe15gSWu86gzOSBnWLknwSaHtw -ag+1m7Z3W0hZneTvWq3zwZ7U10VOylY0Ibw+F1tvdwxIAUMpsN0/lm7mlaoMwCC2/T42J5zjXM9O -gdwZu5GQfezmlwQek8wiSdeXhrYTCjxDI3d+8NzmzSQfO4ObNDqDNOMCAwEAAaNjMGEwHwYDVR0j -BBgwFoAUkqR1LKSevoFE63n8isWVpesQdXMwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMC -AYYwHQYDVR0OBBYEFJKkdSyknr6BROt5/IrFlaXrEHVzMA0GCSqGSIb3DQEBBQUAA4IBAQAo0uCG -1eb4e/CX3CJrO5UUVg8RMKWaTzqwOuAGy2X17caXJ/4l8lfmXpWMPmRgFVp/Lw0BxbFg/UU1z/Cy -vwbZ71q+s2IhtNerNXxTPqYn8aEt2hojnczd7Dwtnic0XQ/CNnm8yUpiLe1r2X1BQ3y2qsrtYbE3 -ghUJGooWMNjsydZHcnhLEEYUjl8Or+zHL6sQ17bxbuyGssLoDZJz3KL0Dzq/YSMQiZxIQG5wALPT -ujdEWBF6AmqI8Dc08BnprNRlc/ZpjGSUOnmFKbAWKwyCPwacx/0QK54PLLae4xW/2TYcuiUaUj0a -7CIMHOCkoj3w6DnPgcB77V0fb8XQC9eY ------END CERTIFICATE----- - Deutsche Telekom Root CA 2 ========================== -----BEGIN CERTIFICATE----- @@ -2475,50 +1517,6 @@ dyd1Lx+4ivn+xbrYNuSD7Odlt79jWvNGr4GUN9RBjNYj1h7P9WgbRGOiWrqnNVmh5XAFmw4jV5mU Cm26OWMohpLzGITY+9HPBVZkVw== -----END CERTIFICATE----- -ComSign CA -========== ------BEGIN CERTIFICATE----- -MIIDkzCCAnugAwIBAgIQFBOWgxRVjOp7Y+X8NId3RDANBgkqhkiG9w0BAQUFADA0MRMwEQYDVQQD -EwpDb21TaWduIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQGEwJJTDAeFw0wNDAzMjQxMTMy -MThaFw0yOTAzMTkxNTAyMThaMDQxEzARBgNVBAMTCkNvbVNpZ24gQ0ExEDAOBgNVBAoTB0NvbVNp -Z24xCzAJBgNVBAYTAklMMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8ORUaSvTx49q -ROR+WCf4C9DklBKK8Rs4OC8fMZwG1Cyn3gsqrhqg455qv588x26i+YtkbDqthVVRVKU4VbirgwTy -P2Q298CNQ0NqZtH3FyrV7zb6MBBC11PN+fozc0yz6YQgitZBJzXkOPqUm7h65HkfM/sb2CEJKHxN -GGleZIp6GZPKfuzzcuc3B1hZKKxC+cX/zT/npfo4sdAMx9lSGlPWgcxCejVb7Us6eva1jsz/D3zk -YDaHL63woSV9/9JLEYhwVKZBqGdTUkJe5DSe5L6j7KpiXd3DTKaCQeQzC6zJMw9kglcq/QytNuEM -rkvF7zuZ2SOzW120V+x0cAwqTwIDAQABo4GgMIGdMAwGA1UdEwQFMAMBAf8wPQYDVR0fBDYwNDAy -oDCgLoYsaHR0cDovL2ZlZGlyLmNvbXNpZ24uY28uaWwvY3JsL0NvbVNpZ25DQS5jcmwwDgYDVR0P -AQH/BAQDAgGGMB8GA1UdIwQYMBaAFEsBmz5WGmU2dst7l6qSBe4y5ygxMB0GA1UdDgQWBBRLAZs+ -VhplNnbLe5eqkgXuMucoMTANBgkqhkiG9w0BAQUFAAOCAQEA0Nmlfv4pYEWdfoPPbrxHbvUanlR2 -QnG0PFg/LUAlQvaBnPGJEMgOqnhPOAlXsDzACPw1jvFIUY0McXS6hMTXcpuEfDhOZAYnKuGntewI -mbQKDdSFc8gS4TXt8QUxHXOZDOuWyt3T5oWq8Ir7dcHyCTxlZWTzTNity4hp8+SDtwy9F1qWF8pb -/627HOkthIDYIb6FUtnUdLlphbpN7Sgy6/lhSuTENh4Z3G+EER+V9YMoGKgzkkMn3V0TBEVPh9VG -zT2ouvDzuFYkRes3x+F2T3I5GN9+dHLHcy056mDmrRGiVod7w2ia/viMcKjfZTL0pECMocJEAw6U -AGegcQCCSA== ------END CERTIFICATE----- - -ComSign Secured CA -================== ------BEGIN CERTIFICATE----- -MIIDqzCCApOgAwIBAgIRAMcoRwmzuGxFjB36JPU2TukwDQYJKoZIhvcNAQEFBQAwPDEbMBkGA1UE -AxMSQ29tU2lnbiBTZWN1cmVkIENBMRAwDgYDVQQKEwdDb21TaWduMQswCQYDVQQGEwJJTDAeFw0w -NDAzMjQxMTM3MjBaFw0yOTAzMTYxNTA0NTZaMDwxGzAZBgNVBAMTEkNvbVNpZ24gU2VjdXJlZCBD -QTEQMA4GA1UEChMHQ29tU2lnbjELMAkGA1UEBhMCSUwwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAw -ggEKAoIBAQDGtWhfHZQVw6QIVS3joFd67+l0Kru5fFdJGhFeTymHDEjWaueP1H5XJLkGieQcPOqs -49ohgHMhCu95mGwfCP+hUH3ymBvJVG8+pSjsIQQPRbsHPaHA+iqYHU4Gk/v1iDurX8sWv+bznkqH -7Rnqwp9D5PGBpX8QTz7RSmKtUxvLg/8HZaWSLWapW7ha9B20IZFKF3ueMv5WJDmyVIRD9YTC2LxB -kMyd1mja6YJQqTtoz7VdApRgFrFD2UNd3V2Hbuq7s8lr9gOUCXDeFhF6K+h2j0kQmHe5Y1yLM5d1 -9guMsqtb3nQgJT/j8xH5h2iGNXHDHYwt6+UarA9z1YJZQIDTAgMBAAGjgacwgaQwDAYDVR0TBAUw -AwEB/zBEBgNVHR8EPTA7MDmgN6A1hjNodHRwOi8vZmVkaXIuY29tc2lnbi5jby5pbC9jcmwvQ29t -U2lnblNlY3VyZWRDQS5jcmwwDgYDVR0PAQH/BAQDAgGGMB8GA1UdIwQYMBaAFMFL7XC29z58ADsA -j8c+DkWfHl3sMB0GA1UdDgQWBBTBS+1wtvc+fAA7AI/HPg5Fnx5d7DANBgkqhkiG9w0BAQUFAAOC -AQEAFs/ukhNQq3sUnjO2QiBq1BW9Cav8cujvR3qQrFHBZE7piL1DRYHjZiM/EoZNGeQFsOY3wo3a -BijJD4mkU6l1P7CW+6tMM1X5eCZGbxs2mPtCdsGCuY7e+0X5YxtiOzkGynd6qDwJz2w2PQ8KRUtp -FhpFfTMDZflScZAmlaxMDPWLkz/MdXSFmLr/YnpNH4n+rr2UAJm/EaXc4HnFFgt9AmEd6oX5AhVP -51qJThRv4zdLhfXBPGHg/QVBspJ/wx2g0K5SZGBrGMYmnNj1ZOQ2GmKfig8+/21OGVZOIJFsnzQz -OjRXUDpvgV4GxvU+fE6OK85lBi5d0ipTdF7Tbieejw== ------END CERTIFICATE----- - Cybertrust Global Root ====================== -----BEGIN CERTIFICATE----- @@ -2620,26 +1618,6 @@ fZleHwzoq0QkKXJAPTZSr4xYkHPB7GEseaHsh7U/2k3ZIQAw3pDaDtMaSKk+hQsUi4y8QZ5q9w5w wDX3OaJdZtB7WZ+oRxKaJyOkLY4ng5IgodcVf/EuGO70SH8vf/GhGLWhC5SgYiAynB321O+/TIho -----END CERTIFICATE----- -Buypass Class 3 CA 1 -==================== ------BEGIN CERTIFICATE----- -MIIDUzCCAjugAwIBAgIBAjANBgkqhkiG9w0BAQUFADBLMQswCQYDVQQGEwJOTzEdMBsGA1UECgwU -QnV5cGFzcyBBUy05ODMxNjMzMjcxHTAbBgNVBAMMFEJ1eXBhc3MgQ2xhc3MgMyBDQSAxMB4XDTA1 -MDUwOTE0MTMwM1oXDTE1MDUwOTE0MTMwM1owSzELMAkGA1UEBhMCTk8xHTAbBgNVBAoMFEJ1eXBh -c3MgQVMtOTgzMTYzMzI3MR0wGwYDVQQDDBRCdXlwYXNzIENsYXNzIDMgQ0EgMTCCASIwDQYJKoZI -hvcNAQEBBQADggEPADCCAQoCggEBAKSO13TZKWTeXx+HgJHqTjnmGcZEC4DVC69TB4sSveZn8AKx -ifZgisRbsELRwCGoy+Gb72RRtqfPFfV0gGgEkKBYouZ0plNTVUhjP5JW3SROjvi6K//zNIqeKNc0 -n6wv1g/xpC+9UrJJhW05NfBEMJNGJPO251P7vGGvqaMU+8IXF4Rs4HyI+MkcVyzwPX6UvCWThOia -AJpFBUJXgPROztmuOfbIUxAMZTpHe2DC1vqRycZxbL2RhzyRhkmr8w+gbCZ2Xhysm3HljbybIR6c -1jh+JIAVMYKWsUnTYjdbiAwKYjT+p0h+mbEwi5A3lRyoH6UsjfRVyNvdWQrCrXig9IsCAwEAAaNC -MEAwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUOBTmyPCppAP0Tj4io1vy1uCtQHQwDgYDVR0P -AQH/BAQDAgEGMA0GCSqGSIb3DQEBBQUAA4IBAQABZ6OMySU9E2NdFm/soT4JXJEVKirZgCFPBdy7 -pYmrEzMqnji3jG8CcmPHc3ceCQa6Oyh7pEfJYWsICCD8igWKH7y6xsL+z27sEzNxZy5p+qksP2bA -EllNC1QCkoS72xLvg3BweMhT+t/Gxv/ciC8HwEmdMldg0/L2mSlf56oBzKwzqBwKu5HEA6BvtjT5 -htOzdlSY9EqBs1OdTUDs5XcTRa9bqh/YL0yCe/4qxFi7T/ye/QNlGioOw6UgFpRreaaiErS7GqQj -el/wroQk5PMr+4okoyeYZdowdXb8GZHo2+ubPzK/QJcHJrrM85SFSnonk8+QQtS4Wxam58tAA915 ------END CERTIFICATE----- - EBG Elektronik Sertifika Hizmet Sa\xC4\x9Flay\xc4\xb1\x63\xc4\xb1s\xc4\xb1 ========================================================================== -----BEGIN CERTIFICATE----- @@ -2865,7 +1843,7 @@ A2gAMGUCMGYhDBgmYFo4e1ZC4Kf8NoRRkSAsdk1DPcQdhCPQrNZ8NQbOzWm9kA3bbEhCHQ6qQgIx AJw9SDkjOVgaFRJZap7v1VmyHVIsmXHNxynfGyphe3HR3vPA5Q06Sqotp9iGKt0uEA== -----END CERTIFICATE----- -NetLock Arany (Class Gold) FÅ‘tanúsítvány +NetLock Arany (Class Gold) Főtanúsítvány ============================================ -----BEGIN CERTIFICATE----- MIIEFTCCAv2gAwIBAgIGSUEs5AAQMA0GCSqGSIb3DQEBCwUAMIGnMQswCQYDVQQGEwJIVTERMA8G @@ -3045,38 +2023,6 @@ MCwXEGCSn1WHElkQwg9naRHMTh5+Spqtr0CodaxWkHS4oJyleW/c6RrIaQXpuvoDs3zk4E7Czp3o tkYNbn5XOmeUwssfnHdKZ05phkOTOPu220+DkdRgfks+KzgHVZhepA== -----END CERTIFICATE----- -Verisign Class 1 Public Primary Certification Authority -======================================================= ------BEGIN CERTIFICATE----- -MIICPDCCAaUCED9pHoGc8JpK83P/uUii5N0wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx -FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAxIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow -XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAx -IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDlGb9to1ZhLZlIcfZn3rmN67eehoAKkQ76OCWvRoiC5XOooJskXQ0fzGVuDLDQ -VoQYh5oGmxChc9+0WDlrbsH2FdWoqD+qEgaNMax/sDTXjzRniAnNFBHiTkVWaR94AoDa3EeRKbs2 -yWNcxeDXLYd7obcysHswuiovMaruo2fa2wIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAFgVKTk8d6Pa -XCUDfGD67gmZPCcQcMgMCeazh88K4hiWNWLMv5sneYlfycQJ9M61Hd8qveXbhpxoJeUwfLaJFf5n -0a3hUKw8fGJLj7qE1xIVGx/KXQ/BUpQqEZnae88MNhPVNdwQGVnqlMEAv3WP2fr9dgTbYruQagPZ -RjXZ+Hxb ------END CERTIFICATE----- - -Verisign Class 3 Public Primary Certification Authority -======================================================= ------BEGIN CERTIFICATE----- -MIICPDCCAaUCEDyRMcsf9tAbDpq40ES/Er4wDQYJKoZIhvcNAQEFBQAwXzELMAkGA1UEBhMCVVMx -FzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAzIFB1YmxpYyBQcmltYXJ5 -IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTk2MDEyOTAwMDAwMFoXDTI4MDgwMjIzNTk1OVow -XzELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTcwNQYDVQQLEy5DbGFzcyAz -IFB1YmxpYyBQcmltYXJ5IENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIGfMA0GCSqGSIb3DQEBAQUA -A4GNADCBiQKBgQDJXFme8huKARS0EN8EQNvjV69qRUCPhAwL0TPZ2RHP7gJYHyX3KqhEBarsAx94 -f56TuZoAqiN91qyFomNFx3InzPRMxnVx0jnvT0Lwdd8KkMaOIG+YD/isI19wKTakyYbnsZogy1Ol -hec9vn2a/iRFM9x2Fe0PonFkTGUugWhFpwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBABByUqkFFBky -CEHwxWsKzH4PIRnN5GfcX6kb5sroc50i2JhucwNhkcV8sEVAbkSdjbCxlnRhLQ2pRdKkkirWmnWX -bj9T/UWZYB2oK0z5XqcJ2HUw19JlYD1n1khVdWk/kfVIC0dpImmClr7JyDiGSnoscxlIaU5rfGW/ -D/xwzoiQ ------END CERTIFICATE----- - Microsec e-Szigno Root CA 2009 ============================== -----BEGIN CERTIFICATE----- @@ -3101,28 +2047,6 @@ yULyMtd6YebS2z3PyKnJm9zbWETXbzivf3jTo60adbocwTZ8jx5tHMN1Rq41Bab2XD0h7lbwyYIi LXpUq3DDfSJlgnCW -----END CERTIFICATE----- -E-Guven Kok Elektronik Sertifika Hizmet Saglayicisi -=================================================== ------BEGIN CERTIFICATE----- -MIIDtjCCAp6gAwIBAgIQRJmNPMADJ72cdpW56tustTANBgkqhkiG9w0BAQUFADB1MQswCQYDVQQG -EwJUUjEoMCYGA1UEChMfRWxla3Ryb25payBCaWxnaSBHdXZlbmxpZ2kgQS5TLjE8MDoGA1UEAxMz -ZS1HdXZlbiBLb2sgRWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhZ2xheWljaXNpMB4XDTA3 -MDEwNDExMzI0OFoXDTE3MDEwNDExMzI0OFowdTELMAkGA1UEBhMCVFIxKDAmBgNVBAoTH0VsZWt0 -cm9uaWsgQmlsZ2kgR3V2ZW5saWdpIEEuUy4xPDA6BgNVBAMTM2UtR3V2ZW4gS29rIEVsZWt0cm9u -aWsgU2VydGlmaWthIEhpem1ldCBTYWdsYXlpY2lzaTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC -AQoCggEBAMMSIJ6wXgBljU5Gu4Bc6SwGl9XzcslwuedLZYDBS75+PNdUMZTe1RK6UxYC6lhj71vY -8+0qGqpxSKPcEC1fX+tcS5yWCEIlKBHMilpiAVDV6wlTL/jDj/6z/P2douNffb7tC+Bg62nsM+3Y -jfsSSYMAyYuXjDtzKjKzEve5TfL0TW3H5tYmNwjy2f1rXKPlSFxYvEK+A1qBuhw1DADT9SN+cTAI -JjjcJRFHLfO6IxClv7wC90Nex/6wN1CZew+TzuZDLMN+DfIcQ2Zgy2ExR4ejT669VmxMvLz4Bcpk -9Ok0oSy1c+HCPujIyTQlCFzz7abHlJ+tiEMl1+E5YP6sOVkCAwEAAaNCMEAwDgYDVR0PAQH/BAQD -AgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFJ/uRLOU1fqRTy7ZVZoEVtstxNulMA0GCSqG -SIb3DQEBBQUAA4IBAQB/X7lTW2M9dTLn+sR0GstG30ZpHFLPqk/CaOv/gKlR6D1id4k9CnU58W5d -F4dvaAXBlGzZXd/aslnLpRCKysw5zZ/rTt5S/wzw9JKp8mxTq5vSR6AfdPebmvEvFZ96ZDAYBzwq -D2fK/A+JYZ1lpTzlvBNbCNvj/+27BrtqBrF6T2XGgv0enIu1De5Iu7i9qgi0+6N8y5/NkHZchpZ4 -Vwpm+Vganf2XKWDeEaaQHBkc7gGWIjQ0LpH5t8Qn0Xvmv/uARFoW5evg1Ao4vOSR49XrXMGs3xtq -fJ7lddK2l4fbzIcrQzqECK+rPNv3PGYxhrCdU3nt+CPeQuMtgvEP5fqX ------END CERTIFICATE----- - GlobalSign Root CA - R3 ======================= -----BEGIN CERTIFICATE----- @@ -3144,29 +2068,6 @@ YIvDQVETI53O9zJrlAGomecsMx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7r kpeDMdmztcpHWD9f -----END CERTIFICATE----- -TC TrustCenter Universal CA III -=============================== ------BEGIN CERTIFICATE----- -MIID4TCCAsmgAwIBAgIOYyUAAQACFI0zFQLkbPQwDQYJKoZIhvcNAQEFBQAwezELMAkGA1UEBhMC -REUxHDAaBgNVBAoTE1RDIFRydXN0Q2VudGVyIEdtYkgxJDAiBgNVBAsTG1RDIFRydXN0Q2VudGVy -IFVuaXZlcnNhbCBDQTEoMCYGA1UEAxMfVEMgVHJ1c3RDZW50ZXIgVW5pdmVyc2FsIENBIElJSTAe -Fw0wOTA5MDkwODE1MjdaFw0yOTEyMzEyMzU5NTlaMHsxCzAJBgNVBAYTAkRFMRwwGgYDVQQKExNU -QyBUcnVzdENlbnRlciBHbWJIMSQwIgYDVQQLExtUQyBUcnVzdENlbnRlciBVbml2ZXJzYWwgQ0Ex -KDAmBgNVBAMTH1RDIFRydXN0Q2VudGVyIFVuaXZlcnNhbCBDQSBJSUkwggEiMA0GCSqGSIb3DQEB -AQUAA4IBDwAwggEKAoIBAQDC2pxisLlxErALyBpXsq6DFJmzNEubkKLF5+cvAqBNLaT6hdqbJYUt -QCggbergvbFIgyIpRJ9Og+41URNzdNW88jBmlFPAQDYvDIRlzg9uwliT6CwLOunBjvvya8o84pxO -juT5fdMnnxvVZ3iHLX8LR7PH6MlIfK8vzArZQe+f/prhsq75U7Xl6UafYOPfjdN/+5Z+s7Vy+Eut -CHnNaYlAJ/Uqwa1D7KRTyGG299J5KmcYdkhtWyUB0SbFt1dpIxVbYYqt8Bst2a9c8SaQaanVDED1 -M4BDj5yjdipFtK+/fz6HP3bFzSreIMUWWMv5G/UPyw0RUmS40nZid4PxWJ//AgMBAAGjYzBhMB8G -A1UdIwQYMBaAFFbn4VslQ4Dg9ozhcbyO5YAvxEjiMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/ -BAQDAgEGMB0GA1UdDgQWBBRW5+FbJUOA4PaM4XG8juWAL8RI4jANBgkqhkiG9w0BAQUFAAOCAQEA -g8ev6n9NCjw5sWi+e22JLumzCecYV42FmhfzdkJQEw/HkG8zrcVJYCtsSVgZ1OK+t7+rSbyUyKu+ -KGwWaODIl0YgoGhnYIg5IFHYaAERzqf2EQf27OysGh+yZm5WZ2B6dF7AbZc2rrUNXWZzwCUyRdhK -BgePxLcHsU0GDeGl6/R1yrqc0L2z0zIkTO5+4nYES0lT2PLpVDP85XEfPRRclkvxOvIAu2y0+pZV -CIgJwcyRGSmwIC3/yzikQOEXvnlhgP8HA4ZMTnsGnxGGjYnuJ8Tb4rwZjgvDwxPHLQNjO9Po5KIq -woIIlBZU8O8fJ5AluA0OKBtHd0e9HKgl8ZS0Zg== ------END CERTIFICATE----- - Autoridad de Certificacion Firmaprofesional CIF A62634068 ========================================================= -----BEGIN CERTIFICATE----- @@ -3482,7 +2383,7 @@ Zt3hrvJBW8qYVoNzcOSGGtIxQbovvi0TWnZvTuhOgQ4/WwMioBK+ZlgRSssDxLQqKi2WF+A5VLxI 03YnnZotBqbJ7DnSq9ufmgsnAjUpsUCV5/nonFWIGUbWtzT1fs45mtk48VH3Tyw= -----END CERTIFICATE----- -Certinomis - Autorité Racine +Certinomis - Autorité Racine ============================= -----BEGIN CERTIFICATE----- MIIFnDCCA4SgAwIBAgIBATANBgkqhkiG9w0BAQUFADBjMQswCQYDVQQGEwJGUjETMBEGA1UEChMK @@ -3548,29 +2449,6 @@ iJ35Rld8TWCvmHMTI6QgkYH60GFmuH3Rr9ZvHmw96RH9qfmCIoaZM3Fa6hlXPZHNqcCjbgcTpsnt +GijnsNacgmHKNHEc8RzGF9QdRYxn7fofMM= -----END CERTIFICATE----- -A-Trust-nQual-03 -================ ------BEGIN CERTIFICATE----- -MIIDzzCCAregAwIBAgIDAWweMA0GCSqGSIb3DQEBBQUAMIGNMQswCQYDVQQGEwJBVDFIMEYGA1UE -Cgw/QS1UcnVzdCBHZXMuIGYuIFNpY2hlcmhlaXRzc3lzdGVtZSBpbSBlbGVrdHIuIERhdGVudmVy -a2VociBHbWJIMRkwFwYDVQQLDBBBLVRydXN0LW5RdWFsLTAzMRkwFwYDVQQDDBBBLVRydXN0LW5R -dWFsLTAzMB4XDTA1MDgxNzIyMDAwMFoXDTE1MDgxNzIyMDAwMFowgY0xCzAJBgNVBAYTAkFUMUgw -RgYDVQQKDD9BLVRydXN0IEdlcy4gZi4gU2ljaGVyaGVpdHNzeXN0ZW1lIGltIGVsZWt0ci4gRGF0 -ZW52ZXJrZWhyIEdtYkgxGTAXBgNVBAsMEEEtVHJ1c3QtblF1YWwtMDMxGTAXBgNVBAMMEEEtVHJ1 -c3QtblF1YWwtMDMwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCtPWFuA/OQO8BBC4SA -zewqo51ru27CQoT3URThoKgtUaNR8t4j8DRE/5TrzAUjlUC5B3ilJfYKvUWG6Nm9wASOhURh73+n -yfrBJcyFLGM/BWBzSQXgYHiVEEvc+RFZznF/QJuKqiTfC0Li21a8StKlDJu3Qz7dg9MmEALP6iPE -SU7l0+m0iKsMrmKS1GWH2WrX9IWf5DMiJaXlyDO6w8dB3F/GaswADm0yqLaHNgBid5seHzTLkDx4 -iHQF63n1k3Flyp3HaxgtPVxO59X4PzF9j4fsCiIvI+n+u33J4PTs63zEsMMtYrWacdaxaujs2e3V -cuy+VwHOBVWf3tFgiBCzAgMBAAGjNjA0MA8GA1UdEwEB/wQFMAMBAf8wEQYDVR0OBAoECERqlWdV -eRFPMA4GA1UdDwEB/wQEAwIBBjANBgkqhkiG9w0BAQUFAAOCAQEAVdRU0VlIXLOThaq/Yy/kgM40 -ozRiPvbY7meIMQQDbwvUB/tOdQ/TLtPAF8fGKOwGDREkDg6lXb+MshOWcdzUzg4NCmgybLlBMRmr -sQd7TZjTXLDR8KdCoLXEjq/+8T/0709GAHbrAvv5ndJAlseIOrifEXnzgGWovR/TeIGgUUw3tKZd -JXDRZslo+S4RFGjxVJgIrCaSD96JntT6s3kr0qN51OyLrIdTaEJMUVF0HhsnLuP1Hyl0Te2v9+GS -mYHovjrHF1D2t8b8m7CKa9aIA5GPBnc6hQLdmNVDeD/GMBWsm2vLV7eJUYs66MmEDNuxUCAKGkq6 -ahq97BvIxYSazQ== ------END CERTIFICATE----- - TWCA Root Certification Authority ================================= -----BEGIN CERTIFICATE----- @@ -3848,31 +2726,6 @@ eOzI8k1MGt6CKfjBWtrt7uYnXuhF0J0cUahoq0Tj0Itq4/g7u9xN12TyUb7mqqta6THuBrxzvxNi Cp/HuZc= -----END CERTIFICATE----- -TÃœRKTRUST Elektronik Sertifika Hizmet SaÄŸlayıcısı -====================================================== ------BEGIN CERTIFICATE----- -MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOcUktUUlVTVCBF -bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP -MA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg -QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4X -DTA3MTIyNTE4MzcxOVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxl -a3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMCVFIxDzAN -BgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp -bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4gKGMpIEFyYWzEsWsgMjAwNzCCASIw -DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9N -YvDdE3ePYakqtdTyuTFYKTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQv -KUmi8wUG+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveGHtya -KhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6PIzdezKKqdfcYbwnT -rqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M733WB2+Y8a+xwXrXgTW4qhe04MsC -AwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHkYb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAP -BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/s -Px+EnWVUXKgWAkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I -aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5mxRZNTZPz/OO -Xl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsaXRik7r4EW5nVcV9VZWRi1aKb -BFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZqxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAK -poRq0Tl9 ------END CERTIFICATE----- - T-TeleSec GlobalRoot Class 3 ============================ -----BEGIN CERTIFICATE----- @@ -3918,3 +2771,1146 @@ uSlNDUmJEYcyW+ZLBMjkXOZ0c5RdFpgTlf7727FE5TpwrDdr5rMzcijJs1eg9gIWiAYLtqZLICjU 3j2LrTcFU3T+bsy8QxdxXvnFzBqpYe73dgzzcvRyrc9yAjYHR8/vGVCJYMzpJJUPwssd8m92kMfM dcGWxZ0= -----END CERTIFICATE----- + +TURKTRUST Certificate Services Provider Root 2007 +================================================= +-----BEGIN CERTIFICATE----- +MIIEPTCCAyWgAwIBAgIBATANBgkqhkiG9w0BAQUFADCBvzE/MD0GA1UEAww2VMOcUktUUlVTVCBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxMQswCQYDVQQGEwJUUjEP +MA0GA1UEBwwGQW5rYXJhMV4wXAYDVQQKDFVUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUg +QmlsacWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLiAoYykgQXJhbMSxayAyMDA3MB4X +DTA3MTIyNTE4MzcxOVoXDTE3MTIyMjE4MzcxOVowgb8xPzA9BgNVBAMMNlTDnFJLVFJVU1QgRWxl +a3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsTELMAkGA1UEBhMCVFIxDzAN +BgNVBAcMBkFua2FyYTFeMFwGA1UECgxVVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp +bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4gKGMpIEFyYWzEsWsgMjAwNzCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKu3PgqMyKVYFeaK7yc9SrToJdPNM8Ig3BnuiD9N +YvDdE3ePYakqtdTyuTFYKTsvP2qcb3N2Je40IIDu6rfwxArNK4aUyeNgsURSsloptJGXg9i3phQv +KUmi8wUG+7RP2qFsmmaf8EMJyupyj+sA1zU511YXRxcw9L6/P8JorzZAwan0qafoEGsIiveGHtya +KhUG9qPw9ODHFNRRf8+0222vR5YXm3dx2KdxnSQM9pQ/hTEST7ruToK4uT6PIzdezKKqdfcYbwnT +rqdUKDT74eA7YH2gvnmJhsifLfkKS8RQouf9eRbHegsYz85M733WB2+Y8a+xwXrXgTW4qhe04MsC +AwEAAaNCMEAwHQYDVR0OBBYEFCnFkKslrxHkYb+j/4hhkeYO/pyBMA4GA1UdDwEB/wQEAwIBBjAP +BgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBQUAA4IBAQAQDdr4Ouwo0RSVgrESLFF6QSU2TJ/s +Px+EnWVUXKgWAkD6bho3hO9ynYYKVZ1WKKxmLNA6VpM0ByWtCLCPyA8JWcqdmBzlVPi5RX9ql2+I +aE1KBiY3iAIOtsbWcpnOa3faYjGkVh+uX4132l32iPwa2Z61gfAyuOOI0JzzaqC5mxRZNTZPz/OO +Xl0XrRWV2N2y1RVuAE6zS89mlOTgzbUF2mNXi+WzqtvALhyQRNsaXRik7r4EW5nVcV9VZWRi1aKb +BFmGyGJ353yCRWo9F7/snXUMrqNvWtMvmDb08PUZqxFdyKbjKlhqQgnDvZImZjINXQhVdP+MmNAK +poRq0Tl9 +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 2009 +============================== +-----BEGIN CERTIFICATE----- +MIIEMzCCAxugAwIBAgIDCYPzMA0GCSqGSIb3DQEBCwUAME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTAe +Fw0wOTExMDUwODM1NThaFw0yOTExMDUwODM1NThaME0xCzAJBgNVBAYTAkRFMRUwEwYDVQQKDAxE +LVRydXN0IEdtYkgxJzAlBgNVBAMMHkQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgMjAwOTCCASIw +DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBANOySs96R+91myP6Oi/WUEWJNTrGa9v+2wBoqOAD +ER03UAifTUpolDWzU9GUY6cgVq/eUXjsKj3zSEhQPgrfRlWLJ23DEE0NkVJD2IfgXU42tSHKXzlA +BF9bfsyjxiupQB7ZNoTWSPOSHjRGICTBpFGOShrvUD9pXRl/RcPHAY9RySPocq60vFYJfxLLHLGv +KZAKyVXMD9O0Gu1HNVpK7ZxzBCHQqr0ME7UAyiZsxGsMlFqVlNpQmvH/pStmMaTJOKDfHR+4CS7z +p+hnUquVH+BGPtikw8paxTGA6Eian5Rp/hnd2HN8gcqW3o7tszIFZYQ05ub9VxC1X3a/L7AQDcUC +AwEAAaOCARowggEWMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFP3aFMSfMN4hvR5COfyrYyNJ +4PGEMA4GA1UdDwEB/wQEAwIBBjCB0wYDVR0fBIHLMIHIMIGAoH6gfIZ6bGRhcDovL2RpcmVjdG9y +eS5kLXRydXN0Lm5ldC9DTj1ELVRSVVNUJTIwUm9vdCUyMENsYXNzJTIwMyUyMENBJTIwMiUyMDIw +MDksTz1ELVRydXN0JTIwR21iSCxDPURFP2NlcnRpZmljYXRlcmV2b2NhdGlvbmxpc3QwQ6BBoD+G +PWh0dHA6Ly93d3cuZC10cnVzdC5uZXQvY3JsL2QtdHJ1c3Rfcm9vdF9jbGFzc18zX2NhXzJfMjAw +OS5jcmwwDQYJKoZIhvcNAQELBQADggEBAH+X2zDI36ScfSF6gHDOFBJpiBSVYEQBrLLpME+bUMJm +2H6NMLVwMeniacfzcNsgFYbQDfC+rAF1hM5+n02/t2A7nPPKHeJeaNijnZflQGDSNiH+0LS4F9p0 +o3/U37CYAqxva2ssJSRyoWXuJVrl5jLn8t+rSfrzkGkj2wTZ51xY/GXUl77M/C4KzCUqNQT4YJEV +dT1B/yMfGchs64JTBKbkTCJNjYy6zltz7GRUUG3RnFX7acM2w4y8PIWmawomDeCTmGCufsYkl4ph +X5GOZpIJhzbNi5stPvZR1FDUWSi9g/LMKHtThm3YJohw1+qRzT65ysCQblrGXnRl11z+o+I= +-----END CERTIFICATE----- + +D-TRUST Root Class 3 CA 2 EV 2009 +================================= +-----BEGIN CERTIFICATE----- +MIIEQzCCAyugAwIBAgIDCYP0MA0GCSqGSIb3DQEBCwUAMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTAeFw0wOTExMDUwODUwNDZaFw0yOTExMDUwODUwNDZaMFAxCzAJBgNVBAYTAkRFMRUwEwYDVQQK +DAxELVRydXN0IEdtYkgxKjAoBgNVBAMMIUQtVFJVU1QgUm9vdCBDbGFzcyAzIENBIDIgRVYgMjAw +OTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJnxhDRwui+3MKCOvXwEz75ivJn9gpfS +egpnljgJ9hBOlSJzmY3aFS3nBfwZcyK3jpgAvDw9rKFs+9Z5JUut8Mxk2og+KbgPCdM03TP1YtHh +zRnp7hhPTFiu4h7WDFsVWtg6uMQYZB7jM7K1iXdODL/ZlGsTl28So/6ZqQTMFexgaDbtCHu39b+T +7WYxg4zGcTSHThfqr4uRjRxWQa4iN1438h3Z0S0NL2lRp75mpoo6Kr3HGrHhFPC+Oh25z1uxav60 +sUYgovseO3Dvk5h9jHOW8sXvhXCtKSb8HgQ+HKDYD8tSg2J87otTlZCpV6LqYQXY+U3EJ/pure35 +11H3a6UCAwEAAaOCASQwggEgMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFNOUikxiEyoZLsyv +cop9NteaHNxnMA4GA1UdDwEB/wQEAwIBBjCB3QYDVR0fBIHVMIHSMIGHoIGEoIGBhn9sZGFwOi8v +ZGlyZWN0b3J5LmQtdHJ1c3QubmV0L0NOPUQtVFJVU1QlMjBSb290JTIwQ2xhc3MlMjAzJTIwQ0El +MjAyJTIwRVYlMjAyMDA5LE89RC1UcnVzdCUyMEdtYkgsQz1ERT9jZXJ0aWZpY2F0ZXJldm9jYXRp +b25saXN0MEagRKBChkBodHRwOi8vd3d3LmQtdHJ1c3QubmV0L2NybC9kLXRydXN0X3Jvb3RfY2xh +c3NfM19jYV8yX2V2XzIwMDkuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA07XtaPKSUiO8aEXUHL7P+ +PPoeUSbrh/Yp3uDx1MYkCenBz1UbtDDZzhr+BlGmFaQt77JLvyAoJUnRpjZ3NOhk31KxEcdzes05 +nsKtjHEh8lprr988TlWvsoRlFIm5d8sqMb7Po23Pb0iUMkZv53GMoKaEGTcH8gNFCSuGdXzfX2lX +ANtu2KZyIktQ1HWYVt+3GP9DQ1CuekR78HlR10M9p9OB0/DJT7naxpeG0ILD5EJt/rDiZE4OJudA +NCa1CInXCGNjOCd1HjPqbqjdn5lPdE2BiYBL3ZqXKVwvvoFBuYz/6n1gBp7N1z3TLqMVvKjmJuVv +w9y4AyHqnxbxLFS1 +-----END CERTIFICATE----- + +PSCProcert +========== +-----BEGIN CERTIFICATE----- +MIIJhjCCB26gAwIBAgIBCzANBgkqhkiG9w0BAQsFADCCAR4xPjA8BgNVBAMTNUF1dG9yaWRhZCBk +ZSBDZXJ0aWZpY2FjaW9uIFJhaXogZGVsIEVzdGFkbyBWZW5lem9sYW5vMQswCQYDVQQGEwJWRTEQ +MA4GA1UEBxMHQ2FyYWNhczEZMBcGA1UECBMQRGlzdHJpdG8gQ2FwaXRhbDE2MDQGA1UEChMtU2lz +dGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMUMwQQYDVQQLEzpTdXBl +cmludGVuZGVuY2lhIGRlIFNlcnZpY2lvcyBkZSBDZXJ0aWZpY2FjaW9uIEVsZWN0cm9uaWNhMSUw +IwYJKoZIhvcNAQkBFhZhY3JhaXpAc3VzY2VydGUuZ29iLnZlMB4XDTEwMTIyODE2NTEwMFoXDTIw +MTIyNTIzNTk1OVowgdExJjAkBgkqhkiG9w0BCQEWF2NvbnRhY3RvQHByb2NlcnQubmV0LnZlMQ8w +DQYDVQQHEwZDaGFjYW8xEDAOBgNVBAgTB01pcmFuZGExKjAoBgNVBAsTIVByb3ZlZWRvciBkZSBD +ZXJ0aWZpY2Fkb3MgUFJPQ0VSVDE2MDQGA1UEChMtU2lzdGVtYSBOYWNpb25hbCBkZSBDZXJ0aWZp +Y2FjaW9uIEVsZWN0cm9uaWNhMQswCQYDVQQGEwJWRTETMBEGA1UEAxMKUFNDUHJvY2VydDCCAiIw +DQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANW39KOUM6FGqVVhSQ2oh3NekS1wwQYalNo97BVC +wfWMrmoX8Yqt/ICV6oNEolt6Vc5Pp6XVurgfoCfAUFM+jbnADrgV3NZs+J74BCXfgI8Qhd19L3uA +3VcAZCP4bsm+lU/hdezgfl6VzbHvvnpC2Mks0+saGiKLt38GieU89RLAu9MLmV+QfI4tL3czkkoh +RqipCKzx9hEC2ZUWno0vluYC3XXCFCpa1sl9JcLB/KpnheLsvtF8PPqv1W7/U0HU9TI4seJfxPmO +EO8GqQKJ/+MMbpfg353bIdD0PghpbNjU5Db4g7ayNo+c7zo3Fn2/omnXO1ty0K+qP1xmk6wKImG2 +0qCZyFSTXai20b1dCl53lKItwIKOvMoDKjSuc/HUtQy9vmebVOvh+qBa7Dh+PsHMosdEMXXqP+UH +0quhJZb25uSgXTcYOWEAM11G1ADEtMo88aKjPvM6/2kwLkDd9p+cJsmWN63nOaK/6mnbVSKVUyqU +td+tFjiBdWbjxywbk5yqjKPK2Ww8F22c3HxT4CAnQzb5EuE8XL1mv6JpIzi4mWCZDlZTOpx+FIyw +Bm/xhnaQr/2v/pDGj59/i5IjnOcVdo/Vi5QTcmn7K2FjiO/mpF7moxdqWEfLcU8UC17IAggmosvp +r2uKGcfLFFb14dq12fy/czja+eevbqQ34gcnAgMBAAGjggMXMIIDEzASBgNVHRMBAf8ECDAGAQH/ +AgEBMDcGA1UdEgQwMC6CD3N1c2NlcnRlLmdvYi52ZaAbBgVghl4CAqASDBBSSUYtRy0yMDAwNDAz +Ni0wMB0GA1UdDgQWBBRBDxk4qpl/Qguk1yeYVKIXTC1RVDCCAVAGA1UdIwSCAUcwggFDgBStuyId +xuDSAaj9dlBSk+2YwU2u06GCASakggEiMIIBHjE+MDwGA1UEAxM1QXV0b3JpZGFkIGRlIENlcnRp +ZmljYWNpb24gUmFpeiBkZWwgRXN0YWRvIFZlbmV6b2xhbm8xCzAJBgNVBAYTAlZFMRAwDgYDVQQH +EwdDYXJhY2FzMRkwFwYDVQQIExBEaXN0cml0byBDYXBpdGFsMTYwNAYDVQQKEy1TaXN0ZW1hIE5h +Y2lvbmFsIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExQzBBBgNVBAsTOlN1cGVyaW50ZW5k +ZW5jaWEgZGUgU2VydmljaW9zIGRlIENlcnRpZmljYWNpb24gRWxlY3Ryb25pY2ExJTAjBgkqhkiG +9w0BCQEWFmFjcmFpekBzdXNjZXJ0ZS5nb2IudmWCAQowDgYDVR0PAQH/BAQDAgEGME0GA1UdEQRG +MESCDnByb2NlcnQubmV0LnZloBUGBWCGXgIBoAwMClBTQy0wMDAwMDKgGwYFYIZeAgKgEgwQUklG +LUotMzE2MzUzNzMtNzB2BgNVHR8EbzBtMEagRKBChkBodHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52 +ZS9sY3IvQ0VSVElGSUNBRE8tUkFJWi1TSEEzODRDUkxERVIuY3JsMCOgIaAfhh1sZGFwOi8vYWNy +YWl6LnN1c2NlcnRlLmdvYi52ZTA3BggrBgEFBQcBAQQrMCkwJwYIKwYBBQUHMAGGG2h0dHA6Ly9v +Y3NwLnN1c2NlcnRlLmdvYi52ZTBBBgNVHSAEOjA4MDYGBmCGXgMBAjAsMCoGCCsGAQUFBwIBFh5o +dHRwOi8vd3d3LnN1c2NlcnRlLmdvYi52ZS9kcGMwDQYJKoZIhvcNAQELBQADggIBACtZ6yKZu4Sq +T96QxtGGcSOeSwORR3C7wJJg7ODU523G0+1ng3dS1fLld6c2suNUvtm7CpsR72H0xpkzmfWvADmN +g7+mvTV+LFwxNG9s2/NkAZiqlCxB3RWGymspThbASfzXg0gTB1GEMVKIu4YXx2sviiCtxQuPcD4q +uxtxj7mkoP3YldmvWb8lK5jpY5MvYB7Eqvh39YtsL+1+LrVPQA3uvFd359m21D+VJzog1eWuq2w1 +n8GhHVnchIHuTQfiSLaeS5UtQbHh6N5+LwUeaO6/u5BlOsju6rEYNxxik6SgMexxbJHmpHmJWhSn +FFAFTKQAVzAswbVhltw+HoSvOULP5dAssSS830DD7X9jSr3hTxJkhpXzsOfIt+FTvZLm8wyWuevo +5pLtp4EJFAv8lXrPj9Y0TzYS3F7RNHXGRoAvlQSMx4bEqCaJqD8Zm4G7UaRKhqsLEQ+xrmNTbSjq +3TNWOByyrYDT13K9mmyZY+gAu0F2BbdbmRiKw7gSXFbPVgx96OLP7bx0R/vu0xdOIk9W/1DzLuY5 +poLWccret9W6aAjtmcz9opLLabid+Qqkpj5PkygqYWwHJgD/ll9ohri4zspV4KuxPX+Y1zMOWj3Y +eMLEYC/HYvBhkdI4sPaeVdtAgAUSM84dkpvRabP/v/GSCmE1P93+hvS84Bpxs2Km +-----END CERTIFICATE----- + +China Internet Network Information Center EV Certificates Root +============================================================== +-----BEGIN CERTIFICATE----- +MIID9zCCAt+gAwIBAgIESJ8AATANBgkqhkiG9w0BAQUFADCBijELMAkGA1UEBhMCQ04xMjAwBgNV +BAoMKUNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyMUcwRQYDVQQDDD5D +aGluYSBJbnRlcm5ldCBOZXR3b3JrIEluZm9ybWF0aW9uIENlbnRlciBFViBDZXJ0aWZpY2F0ZXMg +Um9vdDAeFw0xMDA4MzEwNzExMjVaFw0zMDA4MzEwNzExMjVaMIGKMQswCQYDVQQGEwJDTjEyMDAG +A1UECgwpQ2hpbmEgSW50ZXJuZXQgTmV0d29yayBJbmZvcm1hdGlvbiBDZW50ZXIxRzBFBgNVBAMM +PkNoaW5hIEludGVybmV0IE5ldHdvcmsgSW5mb3JtYXRpb24gQ2VudGVyIEVWIENlcnRpZmljYXRl +cyBSb290MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAm35z7r07eKpkQ0H1UN+U8i6y +jUqORlTSIRLIOTJCBumD1Z9S7eVnAztUwYyZmczpwA//DdmEEbK40ctb3B75aDFk4Zv6dOtouSCV +98YPjUesWgbdYavi7NifFy2cyjw1l1VxzUOFsUcW9SxTgHbP0wBkvUCZ3czY28Sf1hNfQYOL+Q2H +klY0bBoQCxfVWhyXWIQ8hBouXJE0bhlffxdpxWXvayHG1VA6v2G5BY3vbzQ6sm8UY78WO5upKv23 +KzhmBsUs4qpnHkWnjQRmQvaPK++IIGmPMowUc9orhpFjIpryp9vOiYurXccUwVswah+xt54ugQEC +7c+WXmPbqOY4twIDAQABo2MwYTAfBgNVHSMEGDAWgBR8cks5x8DbYqVPm6oYNJKiyoOCWTAPBgNV +HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUfHJLOcfA22KlT5uqGDSSosqD +glkwDQYJKoZIhvcNAQEFBQADggEBACrDx0M3j92tpLIM7twUbY8opJhJywyA6vPtI2Z1fcXTIWd5 +0XPFtQO3WKwMVC/GVhMPMdoG52U7HW8228gd+f2ABsqjPWYWqJ1MFn3AlUa1UeTiH9fqBk1jjZaM +7+czV0I664zBechNdn3e9rG3geCg+aF4RhcaVpjwTj2rHO3sOdwHSPdj/gauwqRcalsyiMXHM4Ws +ZkJHwlgkmeHlPuV1LI5D1l08eB6olYIpUNHRFrrvwb562bTYzB5MRuF3sTGrvSrIzo9uoV1/A3U0 +5K2JRVRevq4opbs/eHnrc7MKDf2+yfdWrPa37S+bISnHOLaVxATywy39FCqQmbkHzJ8= +-----END CERTIFICATE----- + +Swisscom Root CA 2 +================== +-----BEGIN CERTIFICATE----- +MIIF2TCCA8GgAwIBAgIQHp4o6Ejy5e/DfEoeWhhntjANBgkqhkiG9w0BAQsFADBkMQswCQYDVQQG +EwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsTHERpZ2l0YWwgQ2VydGlmaWNhdGUgU2Vy +dmljZXMxGzAZBgNVBAMTElN3aXNzY29tIFJvb3QgQ0EgMjAeFw0xMTA2MjQwODM4MTRaFw0zMTA2 +MjUwNzM4MTRaMGQxCzAJBgNVBAYTAmNoMREwDwYDVQQKEwhTd2lzc2NvbTElMCMGA1UECxMcRGln +aXRhbCBDZXJ0aWZpY2F0ZSBTZXJ2aWNlczEbMBkGA1UEAxMSU3dpc3Njb20gUm9vdCBDQSAyMIIC +IjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAlUJOhJ1R5tMJ6HJaI2nbeHCOFvErjw0DzpPM +LgAIe6szjPTpQOYXTKueuEcUMncy3SgM3hhLX3af+Dk7/E6J2HzFZ++r0rk0X2s682Q2zsKwzxNo +ysjL67XiPS4h3+os1OD5cJZM/2pYmLcX5BtS5X4HAB1f2uY+lQS3aYg5oUFgJWFLlTloYhyxCwWJ +wDaCFCE/rtuh/bxvHGCGtlOUSbkrRsVPACu/obvLP+DHVxxX6NZp+MEkUp2IVd3Chy50I9AU/SpH +Wrumnf2U5NGKpV+GY3aFy6//SSj8gO1MedK75MDvAe5QQQg1I3ArqRa0jG6F6bYRzzHdUyYb3y1a +SgJA/MTAtukxGggo5WDDH8SQjhBiYEQN7Aq+VRhxLKX0srwVYv8c474d2h5Xszx+zYIdkeNL6yxS +NLCK/RJOlrDrcH+eOfdmQrGrrFLadkBXeyq96G4DsguAhYidDMfCd7Camlf0uPoTXGiTOmekl9Ab +mbeGMktg2M7v0Ax/lZ9vh0+Hio5fCHyqW/xavqGRn1V9TrALacywlKinh/LTSlDcX3KwFnUey7QY +Ypqwpzmqm59m2I2mbJYV4+by+PGDYmy7Velhk6M99bFXi08jsJvllGov34zflVEpYKELKeRcVVi3 +qPyZ7iVNTA6z00yPhOgpD/0QVAKFyPnlw4vP5w8CAwEAAaOBhjCBgzAOBgNVHQ8BAf8EBAMCAYYw +HQYDVR0hBBYwFDASBgdghXQBUwIBBgdghXQBUwIBMBIGA1UdEwEB/wQIMAYBAf8CAQcwHQYDVR0O +BBYEFE0mICKJS9PVpAqhb97iEoHF8TwuMB8GA1UdIwQYMBaAFE0mICKJS9PVpAqhb97iEoHF8Twu +MA0GCSqGSIb3DQEBCwUAA4ICAQAyCrKkG8t9voJXiblqf/P0wS4RfbgZPnm3qKhyN2abGu2sEzsO +v2LwnN+ee6FTSA5BesogpxcbtnjsQJHzQq0Qw1zv/2BZf82Fo4s9SBwlAjxnffUy6S8w5X2lejjQ +82YqZh6NM4OKb3xuqFp1mrjX2lhIREeoTPpMSQpKwhI3qEAMw8jh0FcNlzKVxzqfl9NX+Ave5XLz +o9v/tdhZsnPdTSpxsrpJ9csc1fV5yJmz/MFMdOO0vSk3FQQoHt5FRnDsr7p4DooqzgB53MBfGWcs +a0vvaGgLQ+OswWIJ76bdZWGgr4RVSJFSHMYlkSrQwSIjYVmvRRGFHQEkNI/Ps/8XciATwoCqISxx +OQ7Qj1zB09GOInJGTB2Wrk9xseEFKZZZ9LuedT3PDTcNYtsmjGOpI99nBjx8Oto0QuFmtEYE3saW +mA9LSHokMnWRn6z3aOkquVVlzl1h0ydw2Df+n7mvoC5Wt6NlUe07qxS/TFED6F+KBZvuim6c779o ++sjaC+NCydAXFJy3SuCvkychVSa1ZC+N8f+mQAWFBVzKBxlcCxMoTFh/wqXvRdpg065lYZ1Tg3TC +rvJcwhbtkj6EPnNgiLx29CzP0H1907he0ZESEOnN3col49XtmS++dYFLJPlFRpTJKSFTnCZFqhMX +5OfNeOI5wSsSnqaeG8XmDtkx2Q== +-----END CERTIFICATE----- + +Swisscom Root EV CA 2 +===================== +-----BEGIN CERTIFICATE----- +MIIF4DCCA8igAwIBAgIRAPL6ZOJ0Y9ON/RAdBB92ylgwDQYJKoZIhvcNAQELBQAwZzELMAkGA1UE +BhMCY2gxETAPBgNVBAoTCFN3aXNzY29tMSUwIwYDVQQLExxEaWdpdGFsIENlcnRpZmljYXRlIFNl +cnZpY2VzMR4wHAYDVQQDExVTd2lzc2NvbSBSb290IEVWIENBIDIwHhcNMTEwNjI0MDk0NTA4WhcN +MzEwNjI1MDg0NTA4WjBnMQswCQYDVQQGEwJjaDERMA8GA1UEChMIU3dpc3Njb20xJTAjBgNVBAsT +HERpZ2l0YWwgQ2VydGlmaWNhdGUgU2VydmljZXMxHjAcBgNVBAMTFVN3aXNzY29tIFJvb3QgRVYg +Q0EgMjCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMT3HS9X6lds93BdY7BxUglgRCgz +o3pOCvrY6myLURYaVa5UJsTMRQdBTxB5f3HSek4/OE6zAMaVylvNwSqD1ycfMQ4jFrclyxy0uYAy +Xhqdk/HoPGAsp15XGVhRXrwsVgu42O+LgrQ8uMIkqBPHoCE2G3pXKSinLr9xJZDzRINpUKTk4Rti +GZQJo/PDvO/0vezbE53PnUgJUmfANykRHvvSEaeFGHR55E+FFOtSN+KxRdjMDUN/rhPSays/p8Li +qG12W0OfvrSdsyaGOx9/5fLoZigWJdBLlzin5M8J0TbDC77aO0RYjb7xnglrPvMyxyuHxuxenPaH +Za0zKcQvidm5y8kDnftslFGXEBuGCxobP/YCfnvUxVFkKJ3106yDgYjTdLRZncHrYTNaRdHLOdAG +alNgHa/2+2m8atwBz735j9m9W8E6X47aD0upm50qKGsaCnw8qyIL5XctcfaCNYGu+HuB5ur+rPQa +m3Rc6I8k9l2dRsQs0h4rIWqDJ2dVSqTjyDKXZpBy2uPUZC5f46Fq9mDU5zXNysRojddxyNMkM3Ox +bPlq4SjbX8Y96L5V5jcb7STZDxmPX2MYWFCBUWVv8p9+agTnNCRxunZLWB4ZvRVgRaoMEkABnRDi +xzgHcgplwLa7JSnaFp6LNYth7eVxV4O1PHGf40+/fh6Bn0GXAgMBAAGjgYYwgYMwDgYDVR0PAQH/ +BAQDAgGGMB0GA1UdIQQWMBQwEgYHYIV0AVMCAgYHYIV0AVMCAjASBgNVHRMBAf8ECDAGAQH/AgED +MB0GA1UdDgQWBBRF2aWBbj2ITY1x0kbBbkUe88SAnTAfBgNVHSMEGDAWgBRF2aWBbj2ITY1x0kbB +bkUe88SAnTANBgkqhkiG9w0BAQsFAAOCAgEAlDpzBp9SSzBc1P6xXCX5145v9Ydkn+0UjrgEjihL +j6p7jjm02Vj2e6E1CqGdivdj5eu9OYLU43otb98TPLr+flaYC/NUn81ETm484T4VvwYmneTwkLbU +wp4wLh/vx3rEUMfqe9pQy3omywC0Wqu1kx+AiYQElY2NfwmTv9SoqORjbdlk5LgpWgi/UOGED1V7 +XwgiG/W9mR4U9s70WBCCswo9GcG/W6uqmdjyMb3lOGbcWAXH7WMaLgqXfIeTK7KK4/HsGOV1timH +59yLGn602MnTihdsfSlEvoqq9X46Lmgxk7lq2prg2+kupYTNHAq4Sgj5nPFhJpiTt3tm7JFe3VE/ +23MPrQRYCd0EApUKPtN236YQHoA96M2kZNEzx5LH4k5E4wnJTsJdhw4Snr8PyQUQ3nqjsTzyP6Wq +J3mtMX0f/fwZacXduT98zca0wjAefm6S139hdlqP65VNvBFuIXxZN5nQBrz5Bm0yFqXZaajh3DyA +HmBR3NdUIR7KYndP+tiPsys6DXhyyWhBWkdKwqPrGtcKqzwyVcgKEZzfdNbwQBUdyLmPtTbFr/gi +uMod89a2GQ+fYWVq6nTIfI/DT11lgh/ZDYnadXL77/FHZxOzyNEZiCcmmpl5fx7kLD977vHeTYuW +l8PVP3wbI+2ksx0WckNLIOFZfsLorSa/ovc= +-----END CERTIFICATE----- + +CA Disig Root R1 +================ +-----BEGIN CERTIFICATE----- +MIIFaTCCA1GgAwIBAgIJAMMDmu5QkG4oMA0GCSqGSIb3DQEBBQUAMFIxCzAJBgNVBAYTAlNLMRMw +EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp +ZyBSb290IFIxMB4XDTEyMDcxOTA5MDY1NloXDTQyMDcxOTA5MDY1NlowUjELMAkGA1UEBhMCU0sx +EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp +c2lnIFJvb3QgUjEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCqw3j33Jijp1pedxiy +3QRkD2P9m5YJgNXoqqXinCaUOuiZc4yd39ffg/N4T0Dhf9Kn0uXKE5Pn7cZ3Xza1lK/oOI7bm+V8 +u8yN63Vz4STN5qctGS7Y1oprFOsIYgrY3LMATcMjfF9DCCMyEtztDK3AfQ+lekLZWnDZv6fXARz2 +m6uOt0qGeKAeVjGu74IKgEH3G8muqzIm1Cxr7X1r5OJeIgpFy4QxTaz+29FHuvlglzmxZcfe+5nk +CiKxLU3lSCZpq+Kq8/v8kiky6bM+TR8noc2OuRf7JT7JbvN32g0S9l3HuzYQ1VTW8+DiR0jm3hTa +YVKvJrT1cU/J19IG32PK/yHoWQbgCNWEFVP3Q+V8xaCJmGtzxmjOZd69fwX3se72V6FglcXM6pM6 +vpmumwKjrckWtc7dXpl4fho5frLABaTAgqWjR56M6ly2vGfb5ipN0gTco65F97yLnByn1tUD3AjL +LhbKXEAz6GfDLuemROoRRRw1ZS0eRWEkG4IupZ0zXWX4Qfkuy5Q/H6MMMSRE7cderVC6xkGbrPAX +ZcD4XW9boAo0PO7X6oifmPmvTiT6l7Jkdtqr9O3jw2Dv1fkCyC2fg69naQanMVXVz0tv/wQFx1is +XxYb5dKj6zHbHzMVTdDypVP1y+E9Tmgt2BLdqvLmTZtJ5cUoobqwWsagtQIDAQABo0IwQDAPBgNV +HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUiQq0OJMa5qvum5EY+fU8PjXQ +04IwDQYJKoZIhvcNAQEFBQADggIBADKL9p1Kyb4U5YysOMo6CdQbzoaz3evUuii+Eq5FLAR0rBNR +xVgYZk2C2tXck8An4b58n1KeElb21Zyp9HWc+jcSjxyT7Ff+Bw+r1RL3D65hXlaASfX8MPWbTx9B +LxyE04nH4toCdu0Jz2zBuByDHBb6lM19oMgY0sidbvW9adRtPTXoHqJPYNcHKfyyo6SdbhWSVhlM +CrDpfNIZTUJG7L399ldb3Zh+pE3McgODWF3vkzpBemOqfDqo9ayk0d2iLbYq/J8BjuIQscTK5Gfb +VSUZP/3oNn6z4eGBrxEWi1CXYBmCAMBrTXO40RMHPuq2MU/wQppt4hF05ZSsjYSVPCGvxdpHyN85 +YmLLW1AL14FABZyb7bq2ix4Eb5YgOe2kfSnbSM6C3NQCjR0EMVrHS/BsYVLXtFHCgWzN4funodKS +ds+xDzdYpPJScWc/DIh4gInByLUfkmO+p3qKViwaqKactV2zY9ATIKHrkWzQjX2v3wvkF7mGnjix +lAxYjOBVqjtjbZqJYLhkKpLGN/R+Q0O3c+gB53+XD9fyexn9GtePyfqFa3qdnom2piiZk4hA9z7N +UaPK6u95RyG1/jLix8NRb76AdPCkwzryT+lf3xkK8jsTQ6wxpLPn6/wY1gGp8yqPNg7rtLG8t0zJ +a7+h89n07eLw4+1knj0vllJPgFOL +-----END CERTIFICATE----- + +CA Disig Root R2 +================ +-----BEGIN CERTIFICATE----- +MIIFaTCCA1GgAwIBAgIJAJK4iNuwisFjMA0GCSqGSIb3DQEBCwUAMFIxCzAJBgNVBAYTAlNLMRMw +EQYDVQQHEwpCcmF0aXNsYXZhMRMwEQYDVQQKEwpEaXNpZyBhLnMuMRkwFwYDVQQDExBDQSBEaXNp +ZyBSb290IFIyMB4XDTEyMDcxOTA5MTUzMFoXDTQyMDcxOTA5MTUzMFowUjELMAkGA1UEBhMCU0sx +EzARBgNVBAcTCkJyYXRpc2xhdmExEzARBgNVBAoTCkRpc2lnIGEucy4xGTAXBgNVBAMTEENBIERp +c2lnIFJvb3QgUjIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCio8QACdaFXS1tFPbC +w3OeNcJxVX6B+6tGUODBfEl45qt5WDza/3wcn9iXAng+a0EE6UG9vgMsRfYvZNSrXaNHPWSb6Wia +xswbP7q+sos0Ai6YVRn8jG+qX9pMzk0DIaPY0jSTVpbLTAwAFjxfGs3Ix2ymrdMxp7zo5eFm1tL7 +A7RBZckQrg4FY8aAamkw/dLukO8NJ9+flXP04SXabBbeQTg06ov80egEFGEtQX6sx3dOy1FU+16S +GBsEWmjGycT6txOgmLcRK7fWV8x8nhfRyyX+hk4kLlYMeE2eARKmK6cBZW58Yh2EhN/qwGu1pSqV +g8NTEQxzHQuyRpDRQjrOQG6Vrf/GlK1ul4SOfW+eioANSW1z4nuSHsPzwfPrLgVv2RvPN3YEyLRa +5Beny912H9AZdugsBbPWnDTYltxhh5EF5EQIM8HauQhl1K6yNg3ruji6DOWbnuuNZt2Zz9aJQfYE +koopKW1rOhzndX0CcQ7zwOe9yxndnWCywmZgtrEE7snmhrmaZkCo5xHtgUUDi/ZnWejBBhG93c+A +Ak9lQHhcR1DIm+YfgXvkRKhbhZri3lrVx/k6RGZL5DJUfORsnLMOPReisjQS1n6yqEm70XooQL6i +Fh/f5DcfEXP7kAplQ6INfPgGAVUzfbANuPT1rqVCV3w2EYx7XsQDnYx5nQIDAQABo0IwQDAPBgNV +HRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUtZn4r7CU9eMg1gqtzk5WpC5u +Qu0wDQYJKoZIhvcNAQELBQADggIBACYGXnDnZTPIgm7ZnBc6G3pmsgH2eDtpXi/q/075KMOYKmFM +tCQSin1tERT3nLXK5ryeJ45MGcipvXrA1zYObYVybqjGom32+nNjf7xueQgcnYqfGopTpti72TVV +sRHFqQOzVju5hJMiXn7B9hJSi+osZ7z+Nkz1uM/Rs0mSO9MpDpkblvdhuDvEK7Z4bLQjb/D907Je +dR+Zlais9trhxTF7+9FGs9K8Z7RiVLoJ92Owk6Ka+elSLotgEqv89WBW7xBci8QaQtyDW2QOy7W8 +1k/BfDxujRNt+3vrMNDcTa/F1balTFtxyegxvug4BkihGuLq0t4SOVga/4AOgnXmt8kHbA7v/zjx +mHHEt38OFdAlab0inSvtBfZGR6ztwPDUO+Ls7pZbkBNOHlY667DvlruWIxG68kOGdGSVyCh13x01 +utI3gzhTODY7z2zp+WsO0PsE6E9312UBeIYMej4hYvF/Y3EMyZ9E26gnonW+boE+18DrG5gPcFw0 +sorMwIUY6256s/daoQe/qUKS82Ail+QUoQebTnbAjn39pCXHR+3/H3OszMOl6W8KjptlwlCFtaOg +UxLMVYdh84GuEEZhvUQhuMI9dM9+JDX6HAcOmz0iyu8xL4ysEr3vQCj8KWefshNPZiTEUxnpHikV +7+ZtsH8tZ/3zbBt1RqPlShfppNcL +-----END CERTIFICATE----- + +ACCVRAIZ1 +========= +-----BEGIN CERTIFICATE----- +MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UEAwwJQUNDVlJB +SVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQswCQYDVQQGEwJFUzAeFw0xMTA1 +MDUwOTM3MzdaFw0zMDEyMzEwOTM3MzdaMEIxEjAQBgNVBAMMCUFDQ1ZSQUlaMTEQMA4GA1UECwwH +UEtJQUNDVjENMAsGA1UECgwEQUNDVjELMAkGA1UEBhMCRVMwggIiMA0GCSqGSIb3DQEBAQUAA4IC +DwAwggIKAoICAQCbqau/YUqXry+XZpp0X9DZlv3P4uRm7x8fRzPCRKPfmt4ftVTdFXxpNRFvu8gM +jmoYHtiP2Ra8EEg2XPBjs5BaXCQ316PWywlxufEBcoSwfdtNgM3802/J+Nq2DoLSRYWoG2ioPej0 +RGy9ocLLA76MPhMAhN9KSMDjIgro6TenGEyxCQ0jVn8ETdkXhBilyNpAlHPrzg5XPAOBOp0KoVdD +aaxXbXmQeOW1tDvYvEyNKKGno6e6Ak4l0Squ7a4DIrhrIA8wKFSVf+DuzgpmndFALW4ir50awQUZ +0m/A8p/4e7MCQvtQqR0tkw8jq8bBD5L/0KIV9VMJcRz/RROE5iZe+OCIHAr8Fraocwa48GOEAqDG +WuzndN9wrqODJerWx5eHk6fGioozl2A3ED6XPm4pFdahD9GILBKfb6qkxkLrQaLjlUPTAYVtjrs7 +8yM2x/474KElB0iryYl0/wiPgL/AlmXz7uxLaL2diMMxs0Dx6M/2OLuc5NF/1OVYm3z61PMOm3WR +5LpSLhl+0fXNWhn8ugb2+1KoS5kE3fj5tItQo05iifCHJPqDQsGH+tUtKSpacXpkatcnYGMN285J +9Y0fkIkyF/hzQ7jSWpOGYdbhdQrqeWZ2iE9x6wQl1gpaepPluUsXQA+xtrn13k/c4LOsOxFwYIRK +Q26ZIMApcQrAZQIDAQABo4ICyzCCAscwfQYIKwYBBQUHAQEEcTBvMEwGCCsGAQUFBzAChkBodHRw +Oi8vd3d3LmFjY3YuZXMvZmlsZWFkbWluL0FyY2hpdm9zL2NlcnRpZmljYWRvcy9yYWl6YWNjdjEu +Y3J0MB8GCCsGAQUFBzABhhNodHRwOi8vb2NzcC5hY2N2LmVzMB0GA1UdDgQWBBTSh7Tj3zcnk1X2 +VuqB5TbMjB4/vTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFNKHtOPfNyeTVfZW6oHlNsyM +Hj+9MIIBcwYDVR0gBIIBajCCAWYwggFiBgRVHSAAMIIBWDCCASIGCCsGAQUFBwICMIIBFB6CARAA +QQB1AHQAbwByAGkAZABhAGQAIABkAGUAIABDAGUAcgB0AGkAZgBpAGMAYQBjAGkA8wBuACAAUgBh +AO0AegAgAGQAZQAgAGwAYQAgAEEAQwBDAFYAIAAoAEEAZwBlAG4AYwBpAGEAIABkAGUAIABUAGUA +YwBuAG8AbABvAGcA7QBhACAAeQAgAEMAZQByAHQAaQBmAGkAYwBhAGMAaQDzAG4AIABFAGwAZQBj +AHQAcgDzAG4AaQBjAGEALAAgAEMASQBGACAAUQA0ADYAMAAxADEANQA2AEUAKQAuACAAQwBQAFMA +IABlAG4AIABoAHQAdABwADoALwAvAHcAdwB3AC4AYQBjAGMAdgAuAGUAczAwBggrBgEFBQcCARYk +aHR0cDovL3d3dy5hY2N2LmVzL2xlZ2lzbGFjaW9uX2MuaHRtMFUGA1UdHwROMEwwSqBIoEaGRGh0 +dHA6Ly93d3cuYWNjdi5lcy9maWxlYWRtaW4vQXJjaGl2b3MvY2VydGlmaWNhZG9zL3JhaXphY2N2 +MV9kZXIuY3JsMA4GA1UdDwEB/wQEAwIBBjAXBgNVHREEEDAOgQxhY2N2QGFjY3YuZXMwDQYJKoZI +hvcNAQEFBQADggIBAJcxAp/n/UNnSEQU5CmH7UwoZtCPNdpNYbdKl02125DgBS4OxnnQ8pdpD70E +R9m+27Up2pvZrqmZ1dM8MJP1jaGo/AaNRPTKFpV8M9xii6g3+CfYCS0b78gUJyCpZET/LtZ1qmxN +YEAZSUNUY9rizLpm5U9EelvZaoErQNV/+QEnWCzI7UiRfD+mAM/EKXMRNt6GGT6d7hmKG9Ww7Y49 +nCrADdg9ZuM8Db3VlFzi4qc1GwQA9j9ajepDvV+JHanBsMyZ4k0ACtrJJ1vnE5Bc5PUzolVt3OAJ +TS+xJlsndQAJxGJ3KQhfnlmstn6tn1QwIgPBHnFk/vk4CpYY3QIUrCPLBhwepH2NDd4nQeit2hW3 +sCPdK6jT2iWH7ehVRE2I9DZ+hJp4rPcOVkkO1jMl1oRQQmwgEh0q1b688nCBpHBgvgW1m54ERL5h +I6zppSSMEYCUWqKiuUnSwdzRp+0xESyeGabu4VXhwOrPDYTkF7eifKXeVSUG7szAh1xA2syVP1Xg +Nce4hL60Xc16gwFy7ofmXx2utYXGJt/mwZrpHgJHnyqobalbz+xFd3+YJ5oyXSrjhO7FmGYvliAd +3djDJ9ew+f7Zfc3Qn48LFFhRny+Lwzgt3uiP1o2HpPVWQxaZLPSkVrQ0uGE3ycJYgBugl6H8WY3p +EfbRD0tVNEYqi4Y7 +-----END CERTIFICATE----- + +TWCA Global Root CA +=================== +-----BEGIN CERTIFICATE----- +MIIFQTCCAymgAwIBAgICDL4wDQYJKoZIhvcNAQELBQAwUTELMAkGA1UEBhMCVFcxEjAQBgNVBAoT +CVRBSVdBTi1DQTEQMA4GA1UECxMHUm9vdCBDQTEcMBoGA1UEAxMTVFdDQSBHbG9iYWwgUm9vdCBD +QTAeFw0xMjA2MjcwNjI4MzNaFw0zMDEyMzExNTU5NTlaMFExCzAJBgNVBAYTAlRXMRIwEAYDVQQK +EwlUQUlXQU4tQ0ExEDAOBgNVBAsTB1Jvb3QgQ0ExHDAaBgNVBAMTE1RXQ0EgR2xvYmFsIFJvb3Qg +Q0EwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCwBdvI64zEbooh745NnHEKH1Jw7W2C +nJfF10xORUnLQEK1EjRsGcJ0pDFfhQKX7EMzClPSnIyOt7h52yvVavKOZsTuKwEHktSz0ALfUPZV +r2YOy+BHYC8rMjk1Ujoog/h7FsYYuGLWRyWRzvAZEk2tY/XTP3VfKfChMBwqoJimFb3u/Rk28OKR +Q4/6ytYQJ0lM793B8YVwm8rqqFpD/G2Gb3PpN0Wp8DbHzIh1HrtsBv+baz4X7GGqcXzGHaL3SekV +tTzWoWH1EfcFbx39Eb7QMAfCKbAJTibc46KokWofwpFFiFzlmLhxpRUZyXx1EcxwdE8tmx2RRP1W +KKD+u4ZqyPpcC1jcxkt2yKsi2XMPpfRaAok/T54igu6idFMqPVMnaR1sjjIsZAAmY2E2TqNGtz99 +sy2sbZCilaLOz9qC5wc0GZbpuCGqKX6mOL6OKUohZnkfs8O1CWfe1tQHRvMq2uYiN2DLgbYPoA/p +yJV/v1WRBXrPPRXAb94JlAGD1zQbzECl8LibZ9WYkTunhHiVJqRaCPgrdLQABDzfuBSO6N+pjWxn +kjMdwLfS7JLIvgm/LCkFbwJrnu+8vyq8W8BQj0FwcYeyTbcEqYSjMq+u7msXi7Kx/mzhkIyIqJdI +zshNy/MGz19qCkKxHh53L46g5pIOBvwFItIm4TFRfTLcDwIDAQABoyMwITAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG9w0BAQsFAAOCAgEAXzSBdu+WHdXltdkCY4QWwa6g +cFGn90xHNcgL1yg9iXHZqjNB6hQbbCEAwGxCGX6faVsgQt+i0trEfJdLjbDorMjupWkEmQqSpqsn +LhpNgb+E1HAerUf+/UqdM+DyucRFCCEK2mlpc3INvjT+lIutwx4116KD7+U4x6WFH6vPNOw/KP4M +8VeGTslV9xzU2KV9Bnpv1d8Q34FOIWWxtuEXeZVFBs5fzNxGiWNoRI2T9GRwoD2dKAXDOXC4Ynsg +/eTb6QihuJ49CcdP+yz4k3ZB3lLg4VfSnQO8d57+nile98FRYB/e2guyLXW3Q0iT5/Z5xoRdgFlg +lPx4mI88k1HtQJAH32RjJMtOcQWh15QaiDLxInQirqWm2BJpTGCjAu4r7NRjkgtevi92a6O2JryP +A9gK8kxkRr05YuWW6zRjESjMlfGt7+/cgFhI6Uu46mWs6fyAtbXIRfmswZ/ZuepiiI7E8UuDEq3m +i4TWnsLrgxifarsbJGAzcMzs9zLzXNl5fe+epP7JI8Mk7hWSsT2RTyaGvWZzJBPqpK5jwa19hAM8 +EHiGG3njxPPyBJUgriOCxLM6AGK/5jYk4Ve6xx6QddVfP5VhK8E7zeWzaGHQRiapIVJpLesux+t3 +zqY6tQMzT3bR51xUAV3LePTJDL/PEo4XLSNolOer/qmyKwbQBM0= +-----END CERTIFICATE----- + +TeliaSonera Root CA v1 +====================== +-----BEGIN CERTIFICATE----- +MIIFODCCAyCgAwIBAgIRAJW+FqD3LkbxezmCcvqLzZYwDQYJKoZIhvcNAQEFBQAwNzEUMBIGA1UE +CgwLVGVsaWFTb25lcmExHzAdBgNVBAMMFlRlbGlhU29uZXJhIFJvb3QgQ0EgdjEwHhcNMDcxMDE4 +MTIwMDUwWhcNMzIxMDE4MTIwMDUwWjA3MRQwEgYDVQQKDAtUZWxpYVNvbmVyYTEfMB0GA1UEAwwW +VGVsaWFTb25lcmEgUm9vdCBDQSB2MTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAMK+ +6yfwIaPzaSZVfp3FVRaRXP3vIb9TgHot0pGMYzHw7CTww6XScnwQbfQ3t+XmfHnqjLWCi65ItqwA +3GV17CpNX8GH9SBlK4GoRz6JI5UwFpB/6FcHSOcZrr9FZ7E3GwYq/t75rH2D+1665I+XZ75Ljo1k +B1c4VWk0Nj0TSO9P4tNmHqTPGrdeNjPUtAa9GAH9d4RQAEX1jF3oI7x+/jXh7VB7qTCNGdMJjmhn +Xb88lxhTuylixcpecsHHltTbLaC0H2kD7OriUPEMPPCs81Mt8Bz17Ww5OXOAFshSsCPN4D7c3TxH +oLs1iuKYaIu+5b9y7tL6pe0S7fyYGKkmdtwoSxAgHNN/Fnct7W+A90m7UwW7XWjH1Mh1Fj+JWov3 +F0fUTPHSiXk+TT2YqGHeOh7S+F4D4MHJHIzTjU3TlTazN19jY5szFPAtJmtTfImMMsJu7D0hADnJ +oWjiUIMusDor8zagrC/kb2HCUQk5PotTubtn2txTuXZZNp1D5SDgPTJghSJRt8czu90VL6R4pgd7 +gUY2BIbdeTXHlSw7sKMXNeVzH7RcWe/a6hBle3rQf5+ztCo3O3CLm1u5K7fsslESl1MpWtTwEhDc +TwK7EpIvYtQ/aUN8Ddb8WHUBiJ1YFkveupD/RwGJBmr2X7KQarMCpgKIv7NHfirZ1fpoeDVNAgMB +AAGjPzA9MA8GA1UdEwEB/wQFMAMBAf8wCwYDVR0PBAQDAgEGMB0GA1UdDgQWBBTwj1k4ALP1j5qW +DNXr+nuqF+gTEjANBgkqhkiG9w0BAQUFAAOCAgEAvuRcYk4k9AwI//DTDGjkk0kiP0Qnb7tt3oNm +zqjMDfz1mgbldxSR651Be5kqhOX//CHBXfDkH1e3damhXwIm/9fH907eT/j3HEbAek9ALCI18Bmx +0GtnLLCo4MBANzX2hFxc469CeP6nyQ1Q6g2EdvZR74NTxnr/DlZJLo961gzmJ1TjTQpgcmLNkQfW +pb/ImWvtxBnmq0wROMVvMeJuScg/doAmAyYp4Db29iBT4xdwNBedY2gea+zDTYa4EzAvXUYNR0PV +G6pZDrlcjQZIrXSHX8f8MVRBE+LHIQ6e4B4N4cB7Q4WQxYpYxmUKeFfyxiMPAdkgS94P+5KFdSpc +c41teyWRyu5FrgZLAMzTsVlQ2jqIOylDRl6XK1TOU2+NSueW+r9xDkKLfP0ooNBIytrEgUy7onOT +JsjrDNYmiLbAJM+7vVvrdX3pCI6GMyx5dwlppYn8s3CQh3aP0yK7Qs69cwsgJirQmz1wHiRszYd2 +qReWt88NkvuOGKmYSdGe/mBEciG5Ge3C9THxOUiIkCR1VBatzvT4aRRkOfujuLpwQMcnHL/EVlP6 +Y2XQ8xwOFvVrhlhNGNTkDY6lnVuR3HYkUD/GKvvZt5y11ubQ2egZixVxSK236thZiNSQvxaz2ems +WWFUyBy6ysHK4bkgTI86k4mloMy/0/Z1pHWWbVY= +-----END CERTIFICATE----- + +E-Tugra Certification Authority +=============================== +-----BEGIN CERTIFICATE----- +MIIGSzCCBDOgAwIBAgIIamg+nFGby1MwDQYJKoZIhvcNAQELBQAwgbIxCzAJBgNVBAYTAlRSMQ8w +DQYDVQQHDAZBbmthcmExQDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamls +ZXJpIHZlIEhpem1ldGxlcmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBN +ZXJrZXppMSgwJgYDVQQDDB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTEzMDMw +NTEyMDk0OFoXDTIzMDMwMzEyMDk0OFowgbIxCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmEx +QDA+BgNVBAoMN0UtVHXEn3JhIEVCRyBCaWxpxZ9pbSBUZWtub2xvamlsZXJpIHZlIEhpem1ldGxl +cmkgQS7Fni4xJjAkBgNVBAsMHUUtVHVncmEgU2VydGlmaWthc3lvbiBNZXJrZXppMSgwJgYDVQQD +DB9FLVR1Z3JhIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MIICIjANBgkqhkiG9w0BAQEFAAOCAg8A +MIICCgKCAgEA4vU/kwVRHoViVF56C/UYB4Oufq9899SKa6VjQzm5S/fDxmSJPZQuVIBSOTkHS0vd +hQd2h8y/L5VMzH2nPbxHD5hw+IyFHnSOkm0bQNGZDbt1bsipa5rAhDGvykPL6ys06I+XawGb1Q5K +CKpbknSFQ9OArqGIW66z6l7LFpp3RMih9lRozt6Plyu6W0ACDGQXwLWTzeHxE2bODHnv0ZEoq1+g +ElIwcxmOj+GMB6LDu0rw6h8VqO4lzKRG+Bsi77MOQ7osJLjFLFzUHPhdZL3Dk14opz8n8Y4e0ypQ +BaNV2cvnOVPAmJ6MVGKLJrD3fY185MaeZkJVgkfnsliNZvcHfC425lAcP9tDJMW/hkd5s3kc91r0 +E+xs+D/iWR+V7kI+ua2oMoVJl0b+SzGPWsutdEcf6ZG33ygEIqDUD13ieU/qbIWGvaimzuT6w+Gz +rt48Ue7LE3wBf4QOXVGUnhMMti6lTPk5cDZvlsouDERVxcr6XQKj39ZkjFqzAQqptQpHF//vkUAq +jqFGOjGY5RH8zLtJVor8udBhmm9lbObDyz51Sf6Pp+KJxWfXnUYTTjF2OySznhFlhqt/7x3U+Lzn +rFpct1pHXFXOVbQicVtbC/DP3KBhZOqp12gKY6fgDT+gr9Oq0n7vUaDmUStVkhUXU8u3Zg5mTPj5 +dUyQ5xJwx0UCAwEAAaNjMGEwHQYDVR0OBBYEFC7j27JJ0JxUeVz6Jyr+zE7S6E5UMA8GA1UdEwEB +/wQFMAMBAf8wHwYDVR0jBBgwFoAULuPbsknQnFR5XPonKv7MTtLoTlQwDgYDVR0PAQH/BAQDAgEG +MA0GCSqGSIb3DQEBCwUAA4ICAQAFNzr0TbdF4kV1JI+2d1LoHNgQk2Xz8lkGpD4eKexd0dCrfOAK +kEh47U6YA5n+KGCRHTAduGN8qOY1tfrTYXbm1gdLymmasoR6d5NFFxWfJNCYExL/u6Au/U5Mh/jO +XKqYGwXgAEZKgoClM4so3O0409/lPun++1ndYYRP0lSWE2ETPo+Aab6TR7U1Q9Jauz1c77NCR807 +VRMGsAnb/WP2OogKmW9+4c4bU2pEZiNRCHu8W1Ki/QY3OEBhj0qWuJA3+GbHeJAAFS6LrVE1Uweo +a2iu+U48BybNCAVwzDk/dr2l02cmAYamU9JgO3xDf1WKvJUawSg5TB9D0pH0clmKuVb8P7Sd2nCc +dlqMQ1DujjByTd//SffGqWfZbawCEeI6FiWnWAjLb1NBnEg4R2gz0dfHj9R0IdTDBZB6/86WiLEV +KV0jq9BgoRJP3vQXzTLlyb/IQ639Lo7xr+L0mPoSHyDYwKcMhcWQ9DstliaxLL5Mq+ux0orJ23gT +Dx4JnW2PAJ8C2sH6H3p6CcRK5ogql5+Ji/03X186zjhZhkuvcQu02PJwT58yE+Owp1fl2tpDy4Q0 +8ijE6m30Ku/Ba3ba+367hTzSU8JNvnHhRdH9I2cNE3X7z2VnIp2usAnRCf8dNL/+I5c30jn6PQ0G +C7TbO6Orb1wdtn7os4I07QZcJA== +-----END CERTIFICATE----- + +T-TeleSec GlobalRoot Class 2 +============================ +-----BEGIN CERTIFICATE----- +MIIDwzCCAqugAwIBAgIBATANBgkqhkiG9w0BAQsFADCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoM +IlQtU3lzdGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBU +cnVzdCBDZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwHhcNMDgx +MDAxMTA0MDE0WhcNMzMxMDAxMjM1OTU5WjCBgjELMAkGA1UEBhMCREUxKzApBgNVBAoMIlQtU3lz +dGVtcyBFbnRlcnByaXNlIFNlcnZpY2VzIEdtYkgxHzAdBgNVBAsMFlQtU3lzdGVtcyBUcnVzdCBD +ZW50ZXIxJTAjBgNVBAMMHFQtVGVsZVNlYyBHbG9iYWxSb290IENsYXNzIDIwggEiMA0GCSqGSIb3 +DQEBAQUAA4IBDwAwggEKAoIBAQCqX9obX+hzkeXaXPSi5kfl82hVYAUdAqSzm1nzHoqvNK38DcLZ +SBnuaY/JIPwhqgcZ7bBcrGXHX+0CfHt8LRvWurmAwhiCFoT6ZrAIxlQjgeTNuUk/9k9uN0goOA/F +vudocP05l03Sx5iRUKrERLMjfTlH6VJi1hKTXrcxlkIF+3anHqP1wvzpesVsqXFP6st4vGCvx970 +2cu+fjOlbpSD8DT6IavqjnKgP6TeMFvvhk1qlVtDRKgQFRzlAVfFmPHmBiiRqiDFt1MmUUOyCxGV +WOHAD3bZwI18gfNycJ5v/hqO2V81xrJvNHy+SE/iWjnX2J14np+GPgNeGYtEotXHAgMBAAGjQjBA +MA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBS/WSA2AHmgoCJrjNXy +YdK4LMuCSjANBgkqhkiG9w0BAQsFAAOCAQEAMQOiYQsfdOhyNsZt+U2e+iKo4YFWz827n+qrkRk4 +r6p8FU3ztqONpfSO9kSpp+ghla0+AGIWiPACuvxhI+YzmzB6azZie60EI4RYZeLbK4rnJVM3YlNf +vNoBYimipidx5joifsFvHZVwIEoHNN/q/xWA5brXethbdXwFeilHfkCoMRN3zUA7tFFHei4R40cR +3p1m0IvVVGb6g1XqfMIpiRvpb7PO4gWEyS8+eIVibslfwXhjdFjASBgMmTnrpMwatXlajRWc2BQN +9noHV8cigwUtPJslJj0Ys6lDfMjIq2SPDqO/nBudMNva0Bkuqjzx+zOAduTNrRlPBSeOE6Fuwg== +-----END CERTIFICATE----- + +Atos TrustedRoot 2011 +===================== +-----BEGIN CERTIFICATE----- +MIIDdzCCAl+gAwIBAgIIXDPLYixfszIwDQYJKoZIhvcNAQELBQAwPDEeMBwGA1UEAwwVQXRvcyBU +cnVzdGVkUm9vdCAyMDExMQ0wCwYDVQQKDARBdG9zMQswCQYDVQQGEwJERTAeFw0xMTA3MDcxNDU4 +MzBaFw0zMDEyMzEyMzU5NTlaMDwxHjAcBgNVBAMMFUF0b3MgVHJ1c3RlZFJvb3QgMjAxMTENMAsG +A1UECgwEQXRvczELMAkGA1UEBhMCREUwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCV +hTuXbyo7LjvPpvMpNb7PGKw+qtn4TaA+Gke5vJrf8v7MPkfoepbCJI419KkM/IL9bcFyYie96mvr +54rMVD6QUM+A1JX76LWC1BTFtqlVJVfbsVD2sGBkWXppzwO3bw2+yj5vdHLqqjAqc2K+SZFhyBH+ +DgMq92og3AIVDV4VavzjgsG1xZ1kCWyjWZgHJ8cblithdHFsQ/H3NYkQ4J7sVaE3IqKHBAUsR320 +HLliKWYoyrfhk/WklAOZuXCFteZI6o1Q/NnezG8HDt0Lcp2AMBYHlT8oDv3FdU9T1nSatCQujgKR +z3bFmx5VdJx4IbHwLfELn8LVlhgf8FQieowHAgMBAAGjfTB7MB0GA1UdDgQWBBSnpQaxLKYJYO7R +l+lwrrw7GWzbITAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFKelBrEspglg7tGX6XCuvDsZ +bNshMBgGA1UdIAQRMA8wDQYLKwYBBAGwLQMEAQEwDgYDVR0PAQH/BAQDAgGGMA0GCSqGSIb3DQEB +CwUAA4IBAQAmdzTblEiGKkGdLD4GkGDEjKwLVLgfuXvTBznk+j57sj1O7Z8jvZfza1zv7v1Apt+h +k6EKhqzvINB5Ab149xnYJDE0BAGmuhWawyfc2E8PzBhj/5kPDpFrdRbhIfzYJsdHt6bPWHJxfrrh +TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9 +61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G +3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed +-----END CERTIFICATE----- + +QuoVadis Root CA 1 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIUeFhfLq0sGUvjNwc1NBMotZbUZZMwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMSBHMzAeFw0xMjAxMTIxNzI3NDRaFw00MjAxMTIxNzI3NDRaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDEg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCgvlAQjunybEC0BJyFuTHK3C3kEakE +PBtVwedYMB0ktMPvhd6MLOHBPd+C5k+tR4ds7FtJwUrVu4/sh6x/gpqG7D0DmVIB0jWerNrwU8lm +PNSsAgHaJNM7qAJGr6Qc4/hzWHa39g6QDbXwz8z6+cZM5cOGMAqNF34168Xfuw6cwI2H44g4hWf6 +Pser4BOcBRiYz5P1sZK0/CPTz9XEJ0ngnjybCKOLXSoh4Pw5qlPafX7PGglTvF0FBM+hSo+LdoIN +ofjSxxR3W5A2B4GbPgb6Ul5jxaYA/qXpUhtStZI5cgMJYr2wYBZupt0lwgNm3fME0UDiTouG9G/l +g6AnhF4EwfWQvTA9xO+oabw4m6SkltFi2mnAAZauy8RRNOoMqv8hjlmPSlzkYZqn0ukqeI1RPToV +7qJZjqlc3sX5kCLliEVx3ZGZbHqfPT2YfF72vhZooF6uCyP8Wg+qInYtyaEQHeTTRCOQiJ/GKubX +9ZqzWB4vMIkIG1SitZgj7Ah3HJVdYdHLiZxfokqRmu8hqkkWCKi9YSgxyXSthfbZxbGL0eUQMk1f +iyA6PEkfM4VZDdvLCXVDaXP7a3F98N/ETH3Goy7IlXnLc6KOTk0k+17kBL5yG6YnLUlamXrXXAkg +t3+UuU/xDRxeiEIbEbfnkduebPRq34wGmAOtzCjvpUfzUwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUo5fW816iEOGrRZ88F2Q87gFwnMwwDQYJKoZI +hvcNAQELBQADggIBABj6W3X8PnrHX3fHyt/PX8MSxEBd1DKquGrX1RUVRpgjpeaQWxiZTOOtQqOC +MTaIzen7xASWSIsBx40Bz1szBpZGZnQdT+3Btrm0DWHMY37XLneMlhwqI2hrhVd2cDMT/uFPpiN3 +GPoajOi9ZcnPP/TJF9zrx7zABC4tRi9pZsMbj/7sPtPKlL92CiUNqXsCHKnQO18LwIE6PWThv6ct +Tr1NxNgpxiIY0MWscgKCP6o6ojoilzHdCGPDdRS5YCgtW2jgFqlmgiNR9etT2DGbe+m3nUvriBbP ++V04ikkwj+3x6xn0dxoxGE1nVGwvb2X52z3sIexe9PSLymBlVNFxZPT5pqOBMzYzcfCkeF9OrYMh +3jRJjehZrJ3ydlo28hP0r+AJx2EqbPfgna67hkooby7utHnNkDPDs3b69fBsnQGQ+p6Q9pxyz0fa +wx/kNSBT8lTR32GDpgLiJTjehTItXnOQUl1CxM49S+H5GYQd1aJQzEH7QRTDvdbJWqNjZgKAvQU6 +O0ec7AAmTPWIUb+oI38YB7AL7YsmoWTTYUrrXJ/es69nA7Mf3W1daWhpq1467HxpvMc7hU6eFbm0 +FU/DlXpY18ls6Wy58yljXrQs8C097Vpl4KlbQMJImYFtnh8GKjwStIsPm6Ik8KaN1nrgS7ZklmOV +hMJKzRwuJIczYOXD +-----END CERTIFICATE----- + +QuoVadis Root CA 2 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIURFc0JFuBiZs18s64KztbpybwdSgwDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMiBHMzAeFw0xMjAxMTIxODU5MzJaFw00MjAxMTIxODU5MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDIg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQChriWyARjcV4g/Ruv5r+LrI3HimtFh +ZiFfqq8nUeVuGxbULX1QsFN3vXg6YOJkApt8hpvWGo6t/x8Vf9WVHhLL5hSEBMHfNrMWn4rjyduY +NM7YMxcoRvynyfDStNVNCXJJ+fKH46nafaF9a7I6JaltUkSs+L5u+9ymc5GQYaYDFCDy54ejiK2t +oIz/pgslUiXnFgHVy7g1gQyjO/Dh4fxaXc6AcW34Sas+O7q414AB+6XrW7PFXmAqMaCvN+ggOp+o +MiwMzAkd056OXbxMmO7FGmh77FOm6RQ1o9/NgJ8MSPsc9PG/Srj61YxxSscfrf5BmrODXfKEVu+l +V0POKa2Mq1W/xPtbAd0jIaFYAI7D0GoT7RPjEiuA3GfmlbLNHiJuKvhB1PLKFAeNilUSxmn1uIZo +L1NesNKqIcGY5jDjZ1XHm26sGahVpkUG0CM62+tlXSoREfA7T8pt9DTEceT/AFr2XK4jYIVz8eQQ +sSWu1ZK7E8EM4DnatDlXtas1qnIhO4M15zHfeiFuuDIIfR0ykRVKYnLP43ehvNURG3YBZwjgQQvD +6xVu+KQZ2aKrr+InUlYrAoosFCT5v0ICvybIxo/gbjh9Uy3l7ZizlWNof/k19N+IxWA1ksB8aRxh +lRbQ694Lrz4EEEVlWFA4r0jyWbYW8jwNkALGcC4BrTwV1wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQU7edvdlq/YOxJW8ald7tyFnGbxD0wDQYJKoZI +hvcNAQELBQADggIBAJHfgD9DCX5xwvfrs4iP4VGyvD11+ShdyLyZm3tdquXK4Qr36LLTn91nMX66 +AarHakE7kNQIXLJgapDwyM4DYvmL7ftuKtwGTTwpD4kWilhMSA/ohGHqPHKmd+RCroijQ1h5fq7K +pVMNqT1wvSAZYaRsOPxDMuHBR//47PERIjKWnML2W2mWeyAMQ0GaW/ZZGYjeVYg3UQt4XAoeo0L9 +x52ID8DyeAIkVJOviYeIyUqAHerQbj5hLja7NQ4nlv1mNDthcnPxFlxHBlRJAHpYErAK74X9sbgz +dWqTHBLmYF5vHX/JHyPLhGGfHoJE+V+tYlUkmlKY7VHnoX6XOuYvHxHaU4AshZ6rNRDbIl9qxV6X +U/IyAgkwo1jwDQHVcsaxfGl7w/U2Rcxhbl5MlMVerugOXou/983g7aEOGzPuVBj+D77vfoRrQ+Nw +mNtddbINWQeFFSM51vHfqSYP1kjHs6Yi9TM3WpVHn3u6GBVv/9YUZINJ0gpnIdsPNWNgKCLjsZWD +zYWm3S8P52dSbrsvhXz1SnPnxT7AvSESBT/8twNJAlvIJebiVDj1eYeMHVOyToV7BjjHLPj4sHKN +JeV3UvQDHEimUF+IIDBu8oJDqz2XhOdT+yHBTw8imoa4WSr2Rz0ZiC3oheGe7IUIarFsNMkd7Egr +O3jtZsSOeWmD3n+M +-----END CERTIFICATE----- + +QuoVadis Root CA 3 G3 +===================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIULvWbAiin23r/1aOp7r0DoM8Sah0wDQYJKoZIhvcNAQELBQAwSDELMAkG +A1UEBhMCQk0xGTAXBgNVBAoTEFF1b1ZhZGlzIExpbWl0ZWQxHjAcBgNVBAMTFVF1b1ZhZGlzIFJv +b3QgQ0EgMyBHMzAeFw0xMjAxMTIyMDI2MzJaFw00MjAxMTIyMDI2MzJaMEgxCzAJBgNVBAYTAkJN +MRkwFwYDVQQKExBRdW9WYWRpcyBMaW1pdGVkMR4wHAYDVQQDExVRdW9WYWRpcyBSb290IENBIDMg +RzMwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCzyw4QZ47qFJenMioKVjZ/aEzHs286 +IxSR/xl/pcqs7rN2nXrpixurazHb+gtTTK/FpRp5PIpM/6zfJd5O2YIyC0TeytuMrKNuFoM7pmRL +Mon7FhY4futD4tN0SsJiCnMK3UmzV9KwCoWdcTzeo8vAMvMBOSBDGzXRU7Ox7sWTaYI+FrUoRqHe +6okJ7UO4BUaKhvVZR74bbwEhELn9qdIoyhA5CcoTNs+cra1AdHkrAj80//ogaX3T7mH1urPnMNA3 +I4ZyYUUpSFlob3emLoG+B01vr87ERRORFHAGjx+f+IdpsQ7vw4kZ6+ocYfx6bIrc1gMLnia6Et3U +VDmrJqMz6nWB2i3ND0/kA9HvFZcba5DFApCTZgIhsUfei5pKgLlVj7WiL8DWM2fafsSntARE60f7 +5li59wzweyuxwHApw0BiLTtIadwjPEjrewl5qW3aqDCYz4ByA4imW0aucnl8CAMhZa634RylsSqi +Md5mBPfAdOhx3v89WcyWJhKLhZVXGqtrdQtEPREoPHtht+KPZ0/l7DxMYIBpVzgeAVuNVejH38DM +dyM0SXV89pgR6y3e7UEuFAUCf+D+IOs15xGsIs5XPd7JMG0QA4XN8f+MFrXBsj6IbGB/kE+V9/Yt +rQE5BwT6dYB9v0lQ7e/JxHwc64B+27bQ3RP+ydOc17KXqQIDAQABo0IwQDAPBgNVHRMBAf8EBTAD +AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUxhfQvKjqAkPyGwaZXSuQILnXnOQwDQYJKoZI +hvcNAQELBQADggIBADRh2Va1EodVTd2jNTFGu6QHcrxfYWLopfsLN7E8trP6KZ1/AvWkyaiTt3px +KGmPc+FSkNrVvjrlt3ZqVoAh313m6Tqe5T72omnHKgqwGEfcIHB9UqM+WXzBusnIFUBhynLWcKzS +t/Ac5IYp8M7vaGPQtSCKFWGafoaYtMnCdvvMujAWzKNhxnQT5WvvoxXqA/4Ti2Tk08HS6IT7SdEQ +TXlm66r99I0xHnAUrdzeZxNMgRVhvLfZkXdxGYFgu/BYpbWcC/ePIlUnwEsBbTuZDdQdm2NnL9Du +DcpmvJRPpq3t/O5jrFc/ZSXPsoaP0Aj/uHYUbt7lJ+yreLVTubY/6CD50qi+YUbKh4yE8/nxoGib +Ih6BJpsQBJFxwAYf3KDTuVan45gtf4Od34wrnDKOMpTwATwiKp9Dwi7DmDkHOHv8XgBCH/MyJnmD +hPbl8MFREsALHgQjDFSlTC9JxUrRtm5gDWv8a4uFJGS3iQ6rJUdbPM9+Sb3H6QrG2vd+DhcI00iX +0HGS8A85PjRqHH3Y8iKuu2n0M7SmSFXRDw4m6Oy2Cy2nhTXN/VnIn9HNPlopNLk9hM6xZdRZkZFW +dSHBd575euFgndOtBBj0fOtek49TSiIp+EgrPk2GrFt/ywaZWWDYWGWVjUTR939+J399roD1B0y2 +PpxxVJkES/1Y+Zj0 +-----END CERTIFICATE----- + +DigiCert Assured ID Root G2 +=========================== +-----BEGIN CERTIFICATE----- +MIIDljCCAn6gAwIBAgIQC5McOtY5Z+pnI7/Dr5r0SzANBgkqhkiG9w0BAQsFADBlMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQw +IgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIwHhcNMTMwODAxMTIwMDAwWhcNMzgw +MTE1MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQL +ExB3d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzIw +ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDZ5ygvUj82ckmIkzTz+GoeMVSAn61UQbVH +35ao1K+ALbkKz3X9iaV9JPrjIgwrvJUXCzO/GU1BBpAAvQxNEP4HteccbiJVMWWXvdMX0h5i89vq +bFCMP4QMls+3ywPgym2hFEwbid3tALBSfK+RbLE4E9HpEgjAALAcKxHad3A2m67OeYfcgnDmCXRw +VWmvo2ifv922ebPynXApVfSr/5Vh88lAbx3RvpO704gqu52/clpWcTs/1PPRCv4o76Pu2ZmvA9OP +YLfykqGxvYmJHzDNw6YuYjOuFgJ3RFrngQo8p0Quebg/BLxcoIfhG69Rjs3sLPr4/m3wOnyqi+Rn +lTGNAgMBAAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTO +w0q5mVXyuNtgv6l+vVa1lzan1jANBgkqhkiG9w0BAQsFAAOCAQEAyqVVjOPIQW5pJ6d1Ee88hjZv +0p3GeDgdaZaikmkuOGybfQTUiaWxMTeKySHMq2zNixya1r9I0jJmwYrA8y8678Dj1JGG0VDjA9tz +d29KOVPt3ibHtX2vK0LRdWLjSisCx1BL4GnilmwORGYQRI+tBev4eaymG+g3NJ1TyWGqolKvSnAW +hsI6yLETcDbYz+70CjTVW0z9B5yiutkBclzzTcHdDrEcDcRjvq30FPuJ7KJBDkzMyFdA0G4Dqs0M +jomZmWzwPDCvON9vvKO+KSAnq3T/EyJ43pdSVR6DtVQgA+6uwE9W3jfMw3+qBCe703e4YtsXfJwo +IhNzbM8m9Yop5w== +-----END CERTIFICATE----- + +DigiCert Assured ID Root G3 +=========================== +-----BEGIN CERTIFICATE----- +MIICRjCCAc2gAwIBAgIQC6Fa+h3foLVJRK/NJKBs7DAKBggqhkjOPQQDAzBlMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSQwIgYD +VQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBlMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSQwIgYDVQQDExtEaWdpQ2VydCBBc3N1cmVkIElEIFJvb3QgRzMwdjAQ +BgcqhkjOPQIBBgUrgQQAIgNiAAQZ57ysRGXtzbg/WPuNsVepRC0FFfLvC/8QdJ+1YlJfZn4f5dwb +RXkLzMZTCp2NXQLZqVneAlr2lSoOjThKiknGvMYDOAdfVdp+CW7if17QRSAPWXYQ1qAk8C3eNvJs +KTmjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTL0L2p4ZgF +UaFNN6KDec6NHSrkhDAKBggqhkjOPQQDAwNnADBkAjAlpIFFAmsSS3V0T8gj43DydXLefInwz5Fy +YZ5eEJJZVrmDxxDnOOlYJjZ91eQ0hjkCMHw2U/Aw5WJjOpnitqM7mzT6HtoQknFekROn3aRukswy +1vUhZscv6pZjamVFkpUBtA== +-----END CERTIFICATE----- + +DigiCert Global Root G2 +======================= +-----BEGIN CERTIFICATE----- +MIIDjjCCAnagAwIBAgIQAzrx5qcRqaC7KGSxHQn65TANBgkqhkiG9w0BAQsFADBhMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAw +HgYDVQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMjAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUx +MjAwMDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3 +dy5kaWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEcyMIIBIjANBgkq +hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuzfNNNx7a8myaJCtSnX/RrohCgiN9RlUyfuI2/Ou8jqJ +kTx65qsGGmvPrC3oXgkkRLpimn7Wo6h+4FR1IAWsULecYxpsMNzaHxmx1x7e/dfgy5SDN67sH0NO +3Xss0r0upS/kqbitOtSZpLYl6ZtrAGCSYP9PIUkY92eQq2EGnI/yuum06ZIya7XzV+hdG82MHauV +BJVJ8zUtluNJbd134/tJS7SsVQepj5WztCO7TG1F8PapspUwtP1MVYwnSlcUfIKdzXOS0xZKBgyM +UNGPHgm+F6HmIcr9g+UQvIOlCsRnKPZzFBQ9RnbDhxSJITRNrw9FDKZJobq7nMWxM4MphQIDAQAB +o0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUTiJUIBiV5uNu +5g/6+rkS7QYXjzkwDQYJKoZIhvcNAQELBQADggEBAGBnKJRvDkhj6zHd6mcY1Yl9PMWLSn/pvtsr +F9+wX3N3KjITOYFnQoQj8kVnNeyIv/iPsGEMNKSuIEyExtv4NeF22d+mQrvHRAiGfzZ0JFrabA0U +WTW98kndth/Jsw1HKj2ZL7tcu7XUIOGZX1NGFdtom/DzMNU+MeKNhJ7jitralj41E6Vf8PlwUHBH +QRFXGU7Aj64GxJUTFy8bJZ918rGOmaFvE7FBcf6IKshPECBV1/MUReXgRPTqh5Uykw7+U0b6LJ3/ +iyK5S9kJRaTepLiaWN0bfVKfjllDiIGknibVb63dDcY3fe0Dkhvld1927jyNxF1WW6LZZm6zNTfl +MrY= +-----END CERTIFICATE----- + +DigiCert Global Root G3 +======================= +-----BEGIN CERTIFICATE----- +MIICPzCCAcWgAwIBAgIQBVVWvPJepDU1w6QP1atFcjAKBggqhkjOPQQDAzBhMQswCQYDVQQGEwJV +UzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSAwHgYD +VQQDExdEaWdpQ2VydCBHbG9iYWwgUm9vdCBHMzAeFw0xMzA4MDExMjAwMDBaFw0zODAxMTUxMjAw +MDBaMGExCzAJBgNVBAYTAlVTMRUwEwYDVQQKEwxEaWdpQ2VydCBJbmMxGTAXBgNVBAsTEHd3dy5k +aWdpY2VydC5jb20xIDAeBgNVBAMTF0RpZ2lDZXJ0IEdsb2JhbCBSb290IEczMHYwEAYHKoZIzj0C +AQYFK4EEACIDYgAE3afZu4q4C/sLfyHS8L6+c/MzXRq8NOrexpu80JX28MzQC7phW1FGfp4tn+6O +YwwX7Adw9c+ELkCDnOg/QW07rdOkFFk2eJ0DQ+4QE2xy3q6Ip6FrtUPOZ9wj/wMco+I+o0IwQDAP +BgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB/wQEAwIBhjAdBgNVHQ4EFgQUs9tIpPmhxdiuNkHMEWNp +Yim8S8YwCgYIKoZIzj0EAwMDaAAwZQIxAK288mw/EkrRLTnDCgmXc/SINoyIJ7vmiI1Qhadj+Z4y +3maTD/HMsQmP3Wyr+mt/oAIwOWZbwmSNuJ5Q3KjVSaLtx9zRSX8XAbjIho9OjIgrqJqpisXRAL34 +VOKa5Vt8sycX +-----END CERTIFICATE----- + +DigiCert Trusted Root G4 +======================== +-----BEGIN CERTIFICATE----- +MIIFkDCCA3igAwIBAgIQBZsbV56OITLiOQe9p3d1XDANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQG +EwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEw +HwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwHhcNMTMwODAxMTIwMDAwWhcNMzgwMTE1 +MTIwMDAwWjBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3 +d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQwggIiMA0G +CSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC/5pBzaN675F1KPDAiMGkz7MKnJS7JIT3yithZwuEp +pz1Yq3aaza57G4QNxDAf8xukOBbrVsaXbR2rsnnyyhHS5F/WBTxSD1Ifxp4VpX6+n6lXFllVcq9o +k3DCsrp1mWpzMpTREEQQLt+C8weE5nQ7bXHiLQwb7iDVySAdYyktzuxeTsiT+CFhmzTrBcZe7Fsa +vOvJz82sNEBfsXpm7nfISKhmV1efVFiODCu3T6cw2Vbuyntd463JT17lNecxy9qTXtyOj4DatpGY +QJB5w3jHtrHEtWoYOAMQjdjUN6QuBX2I9YI+EJFwq1WCQTLX2wRzKm6RAXwhTNS8rhsDdV14Ztk6 +MUSaM0C/CNdaSaTC5qmgZ92kJ7yhTzm1EVgX9yRcRo9k98FpiHaYdj1ZXUJ2h4mXaXpI8OCiEhtm +mnTK3kse5w5jrubU75KSOp493ADkRSWJtppEGSt+wJS00mFt6zPZxd9LBADMfRyVw4/3IbKyEbe7 +f/LVjHAsQWCqsWMYRJUadmJ+9oCw++hkpjPRiQfhvbfmQ6QYuKZ3AeEPlAwhHbJUKSWJbOUOUlFH +dL4mrLZBdd56rF+NP8m800ERElvlEFDrMcXKchYiCd98THU/Y+whX8QgUWtvsauGi0/C1kVfnSD8 +oR7FwI+isX4KJpn15GkvmB0t9dmpsh3lGwIDAQABo0IwQDAPBgNVHRMBAf8EBTADAQH/MA4GA1Ud +DwEB/wQEAwIBhjAdBgNVHQ4EFgQU7NfjgtJxXWRM3y5nP+e6mK4cD08wDQYJKoZIhvcNAQEMBQAD +ggIBALth2X2pbL4XxJEbw6GiAI3jZGgPVs93rnD5/ZpKmbnJeFwMDF/k5hQpVgs2SV1EY+CtnJYY +ZhsjDT156W1r1lT40jzBQ0CuHVD1UvyQO7uYmWlrx8GnqGikJ9yd+SeuMIW59mdNOj6PWTkiU0Tr +yF0Dyu1Qen1iIQqAyHNm0aAFYF/opbSnr6j3bTWcfFqK1qI4mfN4i/RN0iAL3gTujJtHgXINwBQy +7zBZLq7gcfJW5GqXb5JQbZaNaHqasjYUegbyJLkJEVDXCLG4iXqEI2FCKeWjzaIgQdfRnGTZ6iah +ixTXTBmyUEFxPT9NcCOGDErcgdLMMpSEDQgJlxxPwO5rIHQw0uA5NBCFIRUBCOhVMt5xSdkoF1BN +5r5N0XWs0Mr7QbhDparTwwVETyw2m+L64kW4I1NsBm9nVX9GtUw/bihaeSbSpKhil9Ie4u1Ki7wb +/UdKDd9nZn6yW0HQO+T0O/QEY+nvwlQAUaCKKsnOeMzV6ocEGLPOr0mIr/OSmbaz5mEP0oUA51Aa +5BuVnRmhuZyxm7EAHu/QD09CbMkKvO5D+jpxpchNJqU1/YldvIViHTLSoCtU7ZpXwdv6EM8Zt4tK +G48BtieVU+i2iW1bvGjUI+iLUaJW+fCmgKDWHrO8Dw9TdSmq6hN35N6MgSGtBxBHEa2HPQfRdbzP +82Z+ +-----END CERTIFICATE----- + +WoSign +====== +-----BEGIN CERTIFICATE----- +MIIFdjCCA16gAwIBAgIQXmjWEXGUY1BWAGjzPsnFkTANBgkqhkiG9w0BAQUFADBVMQswCQYDVQQG +EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxKjAoBgNVBAMTIUNlcnRpZmljYXRpb24g +QXV0aG9yaXR5IG9mIFdvU2lnbjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMFUxCzAJ +BgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEqMCgGA1UEAxMhQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkgb2YgV29TaWduMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA +vcqNrLiRFVaXe2tcesLea9mhsMMQI/qnobLMMfo+2aYpbxY94Gv4uEBf2zmoAHqLoE1UfcIiePyO +CbiohdfMlZdLdNiefvAA5A6JrkkoRBoQmTIPJYhTpA2zDxIIFgsDcSccf+Hb0v1naMQFXQoOXXDX +2JegvFNBmpGN9J42Znp+VsGQX+axaCA2pIwkLCxHC1l2ZjC1vt7tj/id07sBMOby8w7gLJKA84X5 +KIq0VC6a7fd2/BVoFutKbOsuEo/Uz/4Mx1wdC34FMr5esAkqQtXJTpCzWQ27en7N1QhatH/YHGkR ++ScPewavVIMYe+HdVHpRaG53/Ma/UkpmRqGyZxq7o093oL5d//xWC0Nyd5DKnvnyOfUNqfTq1+ez +EC8wQjchzDBwyYaYD8xYTYO7feUapTeNtqwylwA6Y3EkHp43xP901DfA4v6IRmAR3Qg/UDaruHqk +lWJqbrDKaiFaafPz+x1wOZXzp26mgYmhiMU7ccqjUu6Du/2gd/Tkb+dC221KmYo0SLwX3OSACCK2 +8jHAPwQ+658geda4BmRkAjHXqc1S+4RFaQkAKtxVi8QGRkvASh0JWzko/amrzgD5LkhLJuYwTKVY +yrREgk/nkR4zw7CT/xH8gdLKH3Ep3XZPkiWvHYG3Dy+MwwbMLyejSuQOmbp8HkUff6oZRZb9/D0C +AwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFOFmzw7R +8bNLtwYgFP6HEtX2/vs+MA0GCSqGSIb3DQEBBQUAA4ICAQCoy3JAsnbBfnv8rWTjMnvMPLZdRtP1 +LOJwXcgu2AZ9mNELIaCJWSQBnfmvCX0KI4I01fx8cpm5o9dU9OpScA7F9dY74ToJMuYhOZO9sxXq +T2r09Ys/L3yNWC7F4TmgPsc9SnOeQHrAK2GpZ8nzJLmzbVUsWh2eJXLOC62qx1ViC777Y7NhRCOj +y+EaDveaBk3e1CNOIZZbOVtXHS9dCF4Jef98l7VNg64N1uajeeAz0JmWAjCnPv/So0M/BVoG6kQC +2nz4SNAzqfkHx5Xh9T71XXG68pWpdIhhWeO/yloTunK0jF02h+mmxTwTv97QRCbut+wucPrXnbes +5cVAWubXbHssw1abR80LzvobtCHXt2a49CUwi1wNuepnsvRtrtWhnk/Yn+knArAdBtaP4/tIEp9/ +EaEQPkxROpaw0RPxx9gmrjrKkcRpnd8BKWRRb2jaFOwIQZeQjdCygPLPwj2/kWjFgGcexGATVdVh +mVd8upUPYUk6ynW8yQqTP2cOEvIo4jEbwFcW3wh8GcF+Dx+FHgo2fFt+J7x6v+Db9NpSvd4MVHAx +kUOVyLzwPt0JfjBkUO1/AaQzZ01oT74V77D2AhGiGxMlOtzCWfHjXEa7ZywCRuoeSKbmW9m1vFGi +kpbbqsY3Iqb+zCB0oy2pLmvLwIIRIbWTee5Ehr7XHuQe+w== +-----END CERTIFICATE----- + +WoSign China +============ +-----BEGIN CERTIFICATE----- +MIIFWDCCA0CgAwIBAgIQUHBrzdgT/BtOOzNy0hFIjTANBgkqhkiG9w0BAQsFADBGMQswCQYDVQQG +EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMMEkNBIOayg+mAmuagueiv +geS5pjAeFw0wOTA4MDgwMTAwMDFaFw0zOTA4MDgwMTAwMDFaMEYxCzAJBgNVBAYTAkNOMRowGAYD +VQQKExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAwwSQ0Eg5rKD6YCa5qC56K+B5LmmMIICIjAN +BgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA0EkhHiX8h8EqwqzbdoYGTufQdDTc7WU1/FDWiD+k +8H/rD195L4mx/bxjWDeTmzj4t1up+thxx7S8gJeNbEvxUNUqKaqoGXqW5pWOdO2XCld19AXbbQs5 +uQF/qvbW2mzmBeCkTVL829B0txGMe41P/4eDrv8FAxNXUDf+jJZSEExfv5RxadmWPgxDT74wwJ85 +dE8GRV2j1lY5aAfMh09Qd5Nx2UQIsYo06Yms25tO4dnkUkWMLhQfkWsZHWgpLFbE4h4TV2TwYeO5 +Ed+w4VegG63XX9Gv2ystP9Bojg/qnw+LNVgbExz03jWhCl3W6t8Sb8D7aQdGctyB9gQjF+BNdeFy +b7Ao65vh4YOhn0pdr8yb+gIgthhid5E7o9Vlrdx8kHccREGkSovrlXLp9glk3Kgtn3R46MGiCWOc +76DbT52VqyBPt7D3h1ymoOQ3OMdc4zUPLK2jgKLsLl3Az+2LBcLmc272idX10kaO6m1jGx6KyX2m ++Jzr5dVjhU1zZmkR/sgO9MHHZklTfuQZa/HpelmjbX7FF+Ynxu8b22/8DU0GAbQOXDBGVWCvOGU6 +yke6rCzMRh+yRpY/8+0mBe53oWprfi1tWFxK1I5nuPHa1UaKJ/kR8slC/k7e3x9cxKSGhxYzoacX +GKUN5AXlK8IrC6KVkLn9YDxOiT7nnO4fuwECAwEAAaNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1Ud +EwEB/wQFMAMBAf8wHQYDVR0OBBYEFOBNv9ybQV0T6GTwp+kVpOGBwboxMA0GCSqGSIb3DQEBCwUA +A4ICAQBqinA4WbbaixjIvirTthnVZil6Xc1bL3McJk6jfW+rtylNpumlEYOnOXOvEESS5iVdT2H6 +yAa+Tkvv/vMx/sZ8cApBWNromUuWyXi8mHwCKe0JgOYKOoICKuLJL8hWGSbueBwj/feTZU7n85iY +r83d2Z5AiDEoOqsuC7CsDCT6eiaY8xJhEPRdF/d+4niXVOKM6Cm6jBAyvd0zaziGfjk9DgNyp115 +j0WKWa5bIW4xRtVZjc8VX90xJc/bYNaBRHIpAlf2ltTW/+op2znFuCyKGo3Oy+dCMYYFaA6eFN0A +kLppRQjbbpCBhqcqBT/mhDn4t/lXX0ykeVoQDF7Va/81XwVRHmyjdanPUIPTfPRm94KNPQx96N97 +qA4bLJyuQHCH2u2nFoJavjVsIE4iYdm8UXrNemHcSxH5/mc0zy4EZmFcV5cjjPOGG0jfKq+nwf/Y +jj4Du9gqsPoUJbJRa4ZDhS4HIxaAjUz7tGM7zMN07RujHv41D198HRaG9Q7DlfEvr10lO1Hm13ZB +ONFLAzkopR6RctR9q5czxNM+4Gm2KHmgCY0c0f9BckgG/Jou5yD5m6Leie2uPAmvylezkolwQOQv +T8Jwg0DXJCxr5wkf09XHwQj02w47HAcLQxGEIYbpgNR12KvxAmLBsX5VYc8T1yaw15zLKYs4SgsO +kI26oQ== +-----END CERTIFICATE----- + +COMODO RSA Certification Authority +================================== +-----BEGIN CERTIFICATE----- +MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCBhTELMAkGA1UE +BhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgG +A1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMTE5MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMC +R0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UE +ChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR6FSS0gpWsawNJN3Fz0Rn +dJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8Xpz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZ +FGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+ +5eNu/Nio5JIk2kNrYrhV/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pG +x8cgoLEfZd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z+pUX +2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7wqP/0uK3pN/u6uPQL +OvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZahSL0896+1DSJMwBGB7FY79tOi4lu3 +sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVICu9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+C +GCe01a60y1Dma/RMhnEw6abfFobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5 +WdYgGq/yapiqcrxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E +FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8w +DQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvlwFTPoCWOAvn9sKIN9SCYPBMt +rFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+ +nq6PK7o9mfjYcwlYRm6mnPTXJ9OV2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSg +tZx8jb8uk2IntznaFxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwW +sRqZCuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiKboHGhfKp +pC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmckejkk9u+UJueBPSZI9FoJA +zMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yLS0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHq +ZJx64SIDqZxubw5lT2yHh17zbqD5daWbQOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk52 +7RH89elWsn2/x20Kk4yl0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7I +LaZRfyHBNVOFBkpdn627G190 +-----END CERTIFICATE----- + +USERTrust RSA Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQK +ExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNh +dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCAEmUXNg7D2wiz +0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2j +Y0K2dvKpOyuR+OJv0OwWIJAJPuLodMkYtJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFn +RghRy4YUVD+8M/5+bJz/Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O ++T23LLb2VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT79uq +/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6c0Plfg6lZrEpfDKE +Y1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmTYo61Zs8liM2EuLE/pDkP2QKe6xJM +lXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97lc6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8 +yexDJtC/QV9AqURE9JnnV4eeUB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+ +eLf8ZxXhyVeEHg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd +BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQF +MAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPFUp/L+M+ZBn8b2kMVn54CVVeW +FPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KOVWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ +7l8wXEskEVX/JJpuXior7gtNn3/3ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQ +Eg9zKC7F4iRO/Fjs8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM +8WcRiQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYzeSf7dNXGi +FSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZXHlKYC6SQK5MNyosycdi +yA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9c +J2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRBVXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGw +sAvgnEzDHNb842m1R0aBL6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gx +Q+6IHdfGjjxDah2nGN59PRbxYvnKkKj9 +-----END CERTIFICATE----- + +USERTrust ECC Certification Authority +===================================== +-----BEGIN CERTIFICATE----- +MIICjzCCAhWgAwIBAgIQXIuZxVqUxdJxVt7NiYDMJjAKBggqhkjOPQQDAzCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwHhcNMTAwMjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMC +VVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU +aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBFQ0MgQ2VydGlmaWNhdGlv +biBBdXRob3JpdHkwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAQarFRaqfloI+d61SRvU8Za2EurxtW2 +0eZzca7dnNYMYf3boIkDuAUU7FfO7l0/4iGzzvfUinngo4N+LZfQYcTxmdwlkWOrfzCjtHDix6Ez +nPO/LlxTsV+zfTJ/ijTjeXmjQjBAMB0GA1UdDgQWBBQ64QmG1M8ZwpZ2dEl23OA1xmNjmjAOBgNV +HQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAKBggqhkjOPQQDAwNoADBlAjA2Z6EWCNzklwBB +HU6+4WMBzzuqQhFkoJ2UOQIReVx7Hfpkue4WQrO/isIJxOzksU0CMQDpKmFHjFJKS04YcPbWRNZu +9YO6bVi9JNlWSOrvxKJGgYhqOkbRqZtNyWHa0V1Xahg= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R4 +=========================== +-----BEGIN CERTIFICATE----- +MIIB4TCCAYegAwIBAgIRKjikHJYKBN5CsiilC+g0mAIwCgYIKoZIzj0EAwIwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI0MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuMZ5049sJQ6fLjkZHAOkrprl +OQcJFspjsbmG+IpXwVfOQvpzofdlQv8ewQCybnMO/8ch5RikqtlxP6jUuc6MHaNCMEAwDgYDVR0P +AQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFFSwe61FuOJAf/sKbvu+M8k8o4TV +MAoGCCqGSM49BAMCA0gAMEUCIQDckqGgE6bPA7DmxCGXkPoUVy0D7O48027KqGx2vKLeuwIgJ6iF +JzWbVsaj8kfSt24bAgAXqmemFZHe+pTsewv4n4Q= +-----END CERTIFICATE----- + +GlobalSign ECC Root CA - R5 +=========================== +-----BEGIN CERTIFICATE----- +MIICHjCCAaSgAwIBAgIRYFlJ4CYuu1X5CneKcflK2GwwCgYIKoZIzj0EAwMwUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMB4XDTEyMTExMzAwMDAwMFoXDTM4MDExOTAzMTQwN1owUDEkMCIGA1UECxMb +R2xvYmFsU2lnbiBFQ0MgUm9vdCBDQSAtIFI1MRMwEQYDVQQKEwpHbG9iYWxTaWduMRMwEQYDVQQD +EwpHbG9iYWxTaWduMHYwEAYHKoZIzj0CAQYFK4EEACIDYgAER0UOlvt9Xb/pOdEh+J8LttV7HpI6 +SFkc8GIxLcB6KP4ap1yztsyX50XUWPrRd21DosCHZTQKH3rd6zwzocWdTaRvQZU4f8kehOvRnkmS +h5SHDDqFSmafnVmTTZdhBoZKo0IwQDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAd +BgNVHQ4EFgQUPeYpSJvqB8ohREom3m7e0oPQn1kwCgYIKoZIzj0EAwMDaAAwZQIxAOVpEslu28Yx +uglB4Zf4+/2a4n0Sye18ZNPLBSWLVtmg515dTguDnFt2KaAJJiFqYgIwcdK1j1zqO+F4CYWodZI7 +yFz9SO8NdCKoCOJuxUnOxwy8p2Fp8fc74SrL+SvzZpA3 +-----END CERTIFICATE----- + +Staat der Nederlanden Root CA - G3 +================================== +-----BEGIN CERTIFICATE----- +MIIFdDCCA1ygAwIBAgIEAJiiOTANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSswKQYDVQQDDCJTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +Um9vdCBDQSAtIEczMB4XDTEzMTExNDExMjg0MloXDTI4MTExMzIzMDAwMFowWjELMAkGA1UEBhMC +TkwxHjAcBgNVBAoMFVN0YWF0IGRlciBOZWRlcmxhbmRlbjErMCkGA1UEAwwiU3RhYXQgZGVyIE5l +ZGVybGFuZGVuIFJvb3QgQ0EgLSBHMzCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBAL4y +olQPcPssXFnrbMSkUeiFKrPMSjTysF/zDsccPVMeiAho2G89rcKezIJnByeHaHE6n3WWIkYFsO2t +x1ueKt6c/DrGlaf1F2cY5y9JCAxcz+bMNO14+1Cx3Gsy8KL+tjzk7FqXxz8ecAgwoNzFs21v0IJy +EavSgWhZghe3eJJg+szeP4TrjTgzkApyI/o1zCZxMdFyKJLZWyNtZrVtB0LrpjPOktvA9mxjeM3K +Tj215VKb8b475lRgsGYeCasH/lSJEULR9yS6YHgamPfJEf0WwTUaVHXvQ9Plrk7O53vDxk5hUUur +mkVLoR9BvUhTFXFkC4az5S6+zqQbwSmEorXLCCN2QyIkHxcE1G6cxvx/K2Ya7Irl1s9N9WMJtxU5 +1nus6+N86U78dULI7ViVDAZCopz35HCz33JvWjdAidiFpNfxC95DGdRKWCyMijmev4SH8RY7Ngzp +07TKbBlBUgmhHbBqv4LvcFEhMtwFdozL92TkA1CvjJFnq8Xy7ljY3r735zHPbMk7ccHViLVlvMDo +FxcHErVc0qsgk7TmgoNwNsXNo42ti+yjwUOH5kPiNL6VizXtBznaqB16nzaeErAMZRKQFWDZJkBE +41ZgpRDUajz9QdwOWke275dhdU/Z/seyHdTtXUmzqWrLZoQT1Vyg3N9udwbRcXXIV2+vD3dbAgMB +AAGjQjBAMA8GA1UdEwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRUrfrHkleu +yjWcLhL75LpdINyUVzANBgkqhkiG9w0BAQsFAAOCAgEAMJmdBTLIXg47mAE6iqTnB/d6+Oea31BD +U5cqPco8R5gu4RV78ZLzYdqQJRZlwJ9UXQ4DO1t3ApyEtg2YXzTdO2PCwyiBwpwpLiniyMMB8jPq +KqrMCQj3ZWfGzd/TtiunvczRDnBfuCPRy5FOCvTIeuXZYzbB1N/8Ipf3YF3qKS9Ysr1YvY2WTxB1 +v0h7PVGHoTx0IsL8B3+A3MSs/mrBcDCw6Y5p4ixpgZQJut3+TcCDjJRYwEYgr5wfAvg1VUkvRtTA +8KCWAg8zxXHzniN9lLf9OtMJgwYh/WA9rjLA0u6NpvDntIJ8CsxwyXmA+P5M9zWEGYox+wrZ13+b +8KKaa8MFSu1BYBQw0aoRQm7TIwIEC8Zl3d1Sd9qBa7Ko+gE4uZbqKmxnl4mUnrzhVNXkanjvSr0r +mj1AfsbAddJu+2gw7OyLnflJNZoaLNmzlTnVHpL3prllL+U9bTpITAjc5CgSKL59NVzq4BZ+Extq +1z7XnvwtdbLBFNUjA9tbbws+eC8N3jONFrdI54OagQ97wUNNVQQXOEpR1VmiiXTTn74eS9fGbbeI +JG9gkaSChVtWQbzQRKtqE77RLFi3EjNYsjdj3BP1lB0/QFH1T/U67cjF68IeHRaVesd+QnGTbksV +tzDfqu1XhUisHWrdOWnk4Xl4vs4Fv6EM94B7IWcnMFk= +-----END CERTIFICATE----- + +Staat der Nederlanden EV Root CA +================================ +-----BEGIN CERTIFICATE----- +MIIFcDCCA1igAwIBAgIEAJiWjTANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQGEwJOTDEeMBwGA1UE +CgwVU3RhYXQgZGVyIE5lZGVybGFuZGVuMSkwJwYDVQQDDCBTdGFhdCBkZXIgTmVkZXJsYW5kZW4g +RVYgUm9vdCBDQTAeFw0xMDEyMDgxMTE5MjlaFw0yMjEyMDgxMTEwMjhaMFgxCzAJBgNVBAYTAk5M +MR4wHAYDVQQKDBVTdGFhdCBkZXIgTmVkZXJsYW5kZW4xKTAnBgNVBAMMIFN0YWF0IGRlciBOZWRl +cmxhbmRlbiBFViBSb290IENBMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA48d+ifkk +SzrSM4M1LGns3Amk41GoJSt5uAg94JG6hIXGhaTK5skuU6TJJB79VWZxXSzFYGgEt9nCUiY4iKTW +O0Cmws0/zZiTs1QUWJZV1VD+hq2kY39ch/aO5ieSZxeSAgMs3NZmdO3dZ//BYY1jTw+bbRcwJu+r +0h8QoPnFfxZpgQNH7R5ojXKhTbImxrpsX23Wr9GxE46prfNeaXUmGD5BKyF/7otdBwadQ8QpCiv8 +Kj6GyzyDOvnJDdrFmeK8eEEzduG/L13lpJhQDBXd4Pqcfzho0LKmeqfRMb1+ilgnQ7O6M5HTp5gV +XJrm0w912fxBmJc+qiXbj5IusHsMX/FjqTf5m3VpTCgmJdrV8hJwRVXj33NeN/UhbJCONVrJ0yPr +08C+eKxCKFhmpUZtcALXEPlLVPxdhkqHz3/KRawRWrUgUY0viEeXOcDPusBCAUCZSCELa6fS/ZbV +0b5GnUngC6agIk440ME8MLxwjyx1zNDFjFE7PZQIZCZhfbnDZY8UnCHQqv0XcgOPvZuM5l5Tnrmd +74K74bzickFbIZTTRTeU0d8JOV3nI6qaHcptqAqGhYqCvkIH1vI4gnPah1vlPNOePqc7nvQDs/nx +fRN0Av+7oeX6AHkcpmZBiFxgV6YuCcS6/ZrPpx9Aw7vMWgpVSzs4dlG4Y4uElBbmVvMCAwEAAaNC +MEAwDwYDVR0TAQH/BAUwAwEB/zAOBgNVHQ8BAf8EBAMCAQYwHQYDVR0OBBYEFP6rAJCYniT8qcwa +ivsnuL8wbqg7MA0GCSqGSIb3DQEBCwUAA4ICAQDPdyxuVr5Os7aEAJSrR8kN0nbHhp8dB9O2tLsI +eK9p0gtJ3jPFrK3CiAJ9Brc1AsFgyb/E6JTe1NOpEyVa/m6irn0F3H3zbPB+po3u2dfOWBfoqSmu +c0iH55vKbimhZF8ZE/euBhD/UcabTVUlT5OZEAFTdfETzsemQUHSv4ilf0X8rLiltTMMgsT7B/Zq +5SWEXwbKwYY5EdtYzXc7LMJMD16a4/CrPmEbUCTCwPTxGfARKbalGAKb12NMcIxHowNDXLldRqAN +b/9Zjr7dn3LDWyvfjFvO5QxGbJKyCqNMVEIYFRIYvdr8unRu/8G2oGTYqV9Vrp9canaW2HNnh/tN +f1zuacpzEPuKqf2evTY4SUmH9A4U8OmHuD+nT3pajnnUk+S7aFKErGzp85hwVXIy+TSrK0m1zSBi +5Dp6Z2Orltxtrpfs/J92VoguZs9btsmksNcFuuEnL5O7Jiqik7Ab846+HUCjuTaPPoIaGl6I6lD4 +WeKDRikL40Rc4ZW2aZCaFG+XroHPaO+Zmr615+F/+PoTRxZMzG0IQOeLeG9QgkRQP2YGiqtDhFZK +DyAthg710tvSeopLzaXoTvFeJiUBWSOgftL2fiFX1ye8FVdMpEbB4IMeDExNH08GGeL5qPQ6gqGy +eUN51q1veieQA6TqJIc/2b3Z6fJfUEkc7uzXLg== +-----END CERTIFICATE----- + +IdenTrust Commercial Root CA 1 +============================== +-----BEGIN CERTIFICATE----- +MIIFYDCCA0igAwIBAgIQCgFCgAAAAUUjyES1AAAAAjANBgkqhkiG9w0BAQsFADBKMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBS +b290IENBIDEwHhcNMTQwMTE2MTgxMjIzWhcNMzQwMTE2MTgxMjIzWjBKMQswCQYDVQQGEwJVUzES +MBAGA1UEChMJSWRlblRydXN0MScwJQYDVQQDEx5JZGVuVHJ1c3QgQ29tbWVyY2lhbCBSb290IENB +IDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCnUBneP5k91DNG8W9RYYKyqU+PZ4ld +hNlT3Qwo2dfw/66VQ3KZ+bVdfIrBQuExUHTRgQ18zZshq0PirK1ehm7zCYofWjK9ouuU+ehcCuz/ +mNKvcbO0U59Oh++SvL3sTzIwiEsXXlfEU8L2ApeN2WIrvyQfYo3fw7gpS0l4PJNgiCL8mdo2yMKi +1CxUAGc1bnO/AljwpN3lsKImesrgNqUZFvX9t++uP0D1bVoE/c40yiTcdCMbXTMTEl3EASX2MN0C +XZ/g1Ue9tOsbobtJSdifWwLziuQkkORiT0/Br4sOdBeo0XKIanoBScy0RnnGF7HamB4HWfp1IYVl +3ZBWzvurpWCdxJ35UrCLvYf5jysjCiN2O/cz4ckA82n5S6LgTrx+kzmEB/dEcH7+B1rlsazRGMzy +NeVJSQjKVsk9+w8YfYs7wRPCTY/JTw436R+hDmrfYi7LNQZReSzIJTj0+kuniVyc0uMNOYZKdHzV +WYfCP04MXFL0PfdSgvHqo6z9STQaKPNBiDoT7uje/5kdX7rL6B7yuVBgwDHTc+XvvqDtMwt0viAg +xGds8AgDelWAf0ZOlqf0Hj7h9tgJ4TNkK2PXMl6f+cB7D3hvl7yTmvmcEpB4eoCHFddydJxVdHix +uuFucAS6T6C6aMN7/zHwcz09lCqxC0EOoP5NiGVreTO01wIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU7UQZwNPwBovupHu+QucmVMiONnYwDQYJKoZI +hvcNAQELBQADggIBAA2ukDL2pkt8RHYZYR4nKM1eVO8lvOMIkPkp165oCOGUAFjvLi5+U1KMtlwH +6oi6mYtQlNeCgN9hCQCTrQ0U5s7B8jeUeLBfnLOic7iPBZM4zY0+sLj7wM+x8uwtLRvM7Kqas6pg +ghstO8OEPVeKlh6cdbjTMM1gCIOQ045U8U1mwF10A0Cj7oV+wh93nAbowacYXVKV7cndJZ5t+qnt +ozo00Fl72u1Q8zW/7esUTTHHYPTa8Yec4kjixsU3+wYQ+nVZZjFHKdp2mhzpgq7vmrlR94gjmmmV +YjzlVYA211QC//G5Xc7UI2/YRYRKW2XviQzdFKcgyxilJbQN+QHwotL0AMh0jqEqSI5l2xPE4iUX +feu+h1sXIFRRk0pTAwvsXcoz7WL9RccvW9xYoIA55vrX/hMUpu09lEpCdNTDd1lzzY9GvlU47/ro +kTLql1gEIt44w8y8bckzOmoKaT+gyOpyj4xjhiO9bTyWnpXgSUyqorkqG5w2gXjtw+hG4iZZRHUe +2XWJUc0QhJ1hYMtd+ZciTY6Y5uN/9lu7rs3KSoFrXgvzUeF0K+l+J6fZmUlO+KWA2yUPHGNiiskz +Z2s8EIPGrd6ozRaOjfAHN3Gf8qv8QfXBi+wAN10J5U6A7/qxXDgGpRtK4dw4LTzcqx+QGtVKnO7R +cGzM7vRX+Bi6hG6H +-----END CERTIFICATE----- + +IdenTrust Public Sector Root CA 1 +================================= +-----BEGIN CERTIFICATE----- +MIIFZjCCA06gAwIBAgIQCgFCgAAAAUUjz0Z8AAAAAjANBgkqhkiG9w0BAQsFADBNMQswCQYDVQQG +EwJVUzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3Rv +ciBSb290IENBIDEwHhcNMTQwMTE2MTc1MzMyWhcNMzQwMTE2MTc1MzMyWjBNMQswCQYDVQQGEwJV +UzESMBAGA1UEChMJSWRlblRydXN0MSowKAYDVQQDEyFJZGVuVHJ1c3QgUHVibGljIFNlY3RvciBS +b290IENBIDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQC2IpT8pEiv6EdrCvsnduTy +P4o7ekosMSqMjbCpwzFrqHd2hCa2rIFCDQjrVVi7evi8ZX3yoG2LqEfpYnYeEe4IFNGyRBb06tD6 +Hi9e28tzQa68ALBKK0CyrOE7S8ItneShm+waOh7wCLPQ5CQ1B5+ctMlSbdsHyo+1W/CD80/HLaXI +rcuVIKQxKFdYWuSNG5qrng0M8gozOSI5Cpcu81N3uURF/YTLNiCBWS2ab21ISGHKTN9T0a9SvESf +qy9rg3LvdYDaBjMbXcjaY8ZNzaxmMc3R3j6HEDbhuaR672BQssvKplbgN6+rNBM5Jeg5ZuSYeqoS +mJxZZoY+rfGwyj4GD3vwEUs3oERte8uojHH01bWRNszwFcYr3lEXsZdMUD2xlVl8BX0tIdUAvwFn +ol57plzy9yLxkA2T26pEUWbMfXYD62qoKjgZl3YNa4ph+bz27nb9cCvdKTz4Ch5bQhyLVi9VGxyh +LrXHFub4qjySjmm2AcG1hp2JDws4lFTo6tyePSW8Uybt1as5qsVATFSrsrTZ2fjXctscvG29ZV/v +iDUqZi/u9rNl8DONfJhBaUYPQxxp+pu10GFqzcpL2UyQRqsVWaFHVCkugyhfHMKiq3IXAAaOReyL +4jM9f9oZRORicsPfIsbyVtTdX5Vy7W1f90gDW/3FKqD2cyOEEBsB5wIDAQABo0IwQDAOBgNVHQ8B +Af8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU43HgntinQtnbcZFrlJPrw6PRFKMw +DQYJKoZIhvcNAQELBQADggIBAEf63QqwEZE4rU1d9+UOl1QZgkiHVIyqZJnYWv6IAcVYpZmxI1Qj +t2odIFflAWJBF9MJ23XLblSQdf4an4EKwt3X9wnQW3IV5B4Jaj0z8yGa5hV+rVHVDRDtfULAj+7A +mgjVQdZcDiFpboBhDhXAuM/FSRJSzL46zNQuOAXeNf0fb7iAaJg9TaDKQGXSc3z1i9kKlT/YPyNt +GtEqJBnZhbMX73huqVjRI9PHE+1yJX9dsXNw0H8GlwmEKYBhHfpe/3OsoOOJuBxxFcbeMX8S3OFt +m6/n6J91eEyrRjuazr8FGF1NFTwWmhlQBJqymm9li1JfPFgEKCXAZmExfrngdbkaqIHWchezxQMx +NRF4eKLg6TCMf4DfWN88uieW4oA0beOY02QnrEh+KHdcxiVhJfiFDGX6xDIvpZgF5PgLZxYWxoK4 +Mhn5+bl53B/N66+rDt0b20XkeucC4pVd/GnwU2lhlXV5C15V5jgclKlZM57IcXR5f1GJtshquDDI +ajjDbp7hNxbqBWJMWxJH7ae0s1hWx0nzfxJoCTFx8G34Tkf71oXuxVhAGaQdp/lLQzfcaFpPz+vC +ZHTetBXZ9FRUGi8c15dxVJCO2SCdUyt/q4/i6jC8UDfv8Ue1fXwsBOxonbRJRBD0ckscZOf85muQ +3Wl9af0AVqW3rLatt8o+Ae+c +-----END CERTIFICATE----- + +Entrust Root Certification Authority - G2 +========================================= +-----BEGIN CERTIFICATE----- +MIIEPjCCAyagAwIBAgIESlOMKDANBgkqhkiG9w0BAQsFADCBvjELMAkGA1UEBhMCVVMxFjAUBgNV +BAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVy +bXMxOTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ug +b25seTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIw +HhcNMDkwNzA3MTcyNTU0WhcNMzAxMjA3MTc1NTU0WjCBvjELMAkGA1UEBhMCVVMxFjAUBgNVBAoT +DUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVnYWwtdGVybXMx +OTA3BgNVBAsTMChjKSAyMDA5IEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXplZCB1c2Ugb25s +eTEyMDAGA1UEAxMpRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5IC0gRzIwggEi +MA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC6hLZy254Ma+KZ6TABp3bqMriVQRrJ2mFOWHLP +/vaCeb9zYQYKpSfYs1/TRU4cctZOMvJyig/3gxnQaoCAAEUesMfnmr8SVycco2gvCoe9amsOXmXz +HHfV1IWNcCG0szLni6LVhjkCsbjSR87kyUnEO6fe+1R9V77w6G7CebI6C1XiUJgWMhNcL3hWwcKU +s/Ja5CeanyTXxuzQmyWC48zCxEXFjJd6BmsqEZ+pCm5IO2/b1BEZQvePB7/1U1+cPvQXLOZprE4y +TGJ36rfo5bs0vBmLrpxR57d+tVOxMyLlbc9wPBr64ptntoP0jaWvYkxN4FisZDQSA/i2jZRjJKRx +AgMBAAGjQjBAMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBRqciZ6 +0B7vfec7aVHUbI2fkBJmqzANBgkqhkiG9w0BAQsFAAOCAQEAeZ8dlsa2eT8ijYfThwMEYGprmi5Z +iXMRrEPR9RP/jTkrwPK9T3CMqS/qF8QLVJ7UG5aYMzyorWKiAHarWWluBh1+xLlEjZivEtRh2woZ +Rkfz6/djwUAFQKXSt/S1mja/qYh2iARVBCuch38aNzx+LaUa2NSJXsq9rD1s2G2v1fN2D807iDgi +nWyTmsQ9v4IbZT+mD12q/OWyFcq1rca8PdCE6OoGcrBNOTJ4vz4RnAuknZoh8/CbCzB428Hch0P+ +vGOaysXCHMnHjf87ElgI5rY97HosTvuDls4MPGmHVHOkc8KT/1EQrBVUAdj8BbGJoX90g5pJ19xO +e4pIb4tF9g== +-----END CERTIFICATE----- + +Entrust Root Certification Authority - EC1 +========================================== +-----BEGIN CERTIFICATE----- +MIIC+TCCAoCgAwIBAgINAKaLeSkAAAAAUNCR+TAKBggqhkjOPQQDAzCBvzELMAkGA1UEBhMCVVMx +FjAUBgNVBAoTDUVudHJ1c3QsIEluYy4xKDAmBgNVBAsTH1NlZSB3d3cuZW50cnVzdC5uZXQvbGVn +YWwtdGVybXMxOTA3BgNVBAsTMChjKSAyMDEyIEVudHJ1c3QsIEluYy4gLSBmb3IgYXV0aG9yaXpl +ZCB1c2Ugb25seTEzMDEGA1UEAxMqRW50cnVzdCBSb290IENlcnRpZmljYXRpb24gQXV0aG9yaXR5 +IC0gRUMxMB4XDTEyMTIxODE1MjUzNloXDTM3MTIxODE1NTUzNlowgb8xCzAJBgNVBAYTAlVTMRYw +FAYDVQQKEw1FbnRydXN0LCBJbmMuMSgwJgYDVQQLEx9TZWUgd3d3LmVudHJ1c3QubmV0L2xlZ2Fs +LXRlcm1zMTkwNwYDVQQLEzAoYykgMjAxMiBFbnRydXN0LCBJbmMuIC0gZm9yIGF1dGhvcml6ZWQg +dXNlIG9ubHkxMzAxBgNVBAMTKkVudHJ1c3QgUm9vdCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAt +IEVDMTB2MBAGByqGSM49AgEGBSuBBAAiA2IABIQTydC6bUF74mzQ61VfZgIaJPRbiWlH47jCffHy +AsWfoPZb1YsGGYZPUxBtByQnoaD41UcZYUx9ypMn6nQM72+WCf5j7HBdNq1nd67JnXxVRDqiY1Ef +9eNi1KlHBz7MIKNCMEAwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYE +FLdj5xrdjekIplWDpOBqUEFlEUJJMAoGCCqGSM49BAMDA2cAMGQCMGF52OVCR98crlOZF7ZvHH3h +vxGU0QOIdeSNiaSKd0bebWHvAvX7td/M/k7//qnmpwIwW5nXhTcGtXsI/esni0qU+eH6p44mCOh8 +kmhtc9hvJqwhAriZtyZBWyVgrtBIGu4G +-----END CERTIFICATE----- + +CFCA EV ROOT +============ +-----BEGIN CERTIFICATE----- +MIIFjTCCA3WgAwIBAgIEGErM1jANBgkqhkiG9w0BAQsFADBWMQswCQYDVQQGEwJDTjEwMC4GA1UE +CgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQDDAxDRkNB +IEVWIFJPT1QwHhcNMTIwODA4MDMwNzAxWhcNMjkxMjMxMDMwNzAxWjBWMQswCQYDVQQGEwJDTjEw +MC4GA1UECgwnQ2hpbmEgRmluYW5jaWFsIENlcnRpZmljYXRpb24gQXV0aG9yaXR5MRUwEwYDVQQD +DAxDRkNBIEVWIFJPT1QwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDXXWvNED8fBVnV +BU03sQ7smCuOFR36k0sXgiFxEFLXUWRwFsJVaU2OFW2fvwwbwuCjZ9YMrM8irq93VCpLTIpTUnrD +7i7es3ElweldPe6hL6P3KjzJIx1qqx2hp/Hz7KDVRM8Vz3IvHWOX6Jn5/ZOkVIBMUtRSqy5J35DN +uF++P96hyk0g1CXohClTt7GIH//62pCfCqktQT+x8Rgp7hZZLDRJGqgG16iI0gNyejLi6mhNbiyW +ZXvKWfry4t3uMCz7zEasxGPrb382KzRzEpR/38wmnvFyXVBlWY9ps4deMm/DGIq1lY+wejfeWkU7 +xzbh72fROdOXW3NiGUgthxwG+3SYIElz8AXSG7Ggo7cbcNOIabla1jj0Ytwli3i/+Oh+uFzJlU9f +py25IGvPa931DfSCt/SyZi4QKPaXWnuWFo8BGS1sbn85WAZkgwGDg8NNkt0yxoekN+kWzqotaK8K +gWU6cMGbrU1tVMoqLUuFG7OA5nBFDWteNfB/O7ic5ARwiRIlk9oKmSJgamNgTnYGmE69g60dWIol +hdLHZR4tjsbftsbhf4oEIRUpdPA+nJCdDC7xij5aqgwJHsfVPKPtl8MeNPo4+QgO48BdK4PRVmrJ +tqhUUy54Mmc9gn900PvhtgVguXDbjgv5E1hvcWAQUhC5wUEJ73IfZzF4/5YFjQIDAQABo2MwYTAf +BgNVHSMEGDAWgBTj/i39KNALtbq2osS/BqoFjJP7LzAPBgNVHRMBAf8EBTADAQH/MA4GA1UdDwEB +/wQEAwIBBjAdBgNVHQ4EFgQU4/4t/SjQC7W6tqLEvwaqBYyT+y8wDQYJKoZIhvcNAQELBQADggIB +ACXGumvrh8vegjmWPfBEp2uEcwPenStPuiB/vHiyz5ewG5zz13ku9Ui20vsXiObTej/tUxPQ4i9q +ecsAIyjmHjdXNYmEwnZPNDatZ8POQQaIxffu2Bq41gt/UP+TqhdLjOztUmCypAbqTuv0axn96/Ua +4CUqmtzHQTb3yHQFhDmVOdYLO6Qn+gjYXB74BGBSESgoA//vU2YApUo0FmZ8/Qmkrp5nGm9BC2sG +E5uPhnEFtC+NiWYzKXZUmhH4J/qyP5Hgzg0b8zAarb8iXRvTvyUFTeGSGn+ZnzxEk8rUQElsgIfX +BDrDMlI1Dlb4pd19xIsNER9Tyx6yF7Zod1rg1MvIB671Oi6ON7fQAUtDKXeMOZePglr4UeWJoBjn +aH9dCi77o0cOPaYjesYBx4/IXr9tgFa+iiS6M+qf4TIRnvHST4D2G0CvOJ4RUHlzEhLN5mydLIhy +PDCBBpEi6lmt2hkuIsKNuYyH4Ga8cyNfIWRjgEj1oDwYPZTISEEdQLpe/v5WOaHIz16eGWRGENoX +kbcFgKyLmZJ956LYBws2J+dIeWCKw9cTXPhyQN9Ky8+ZAAoACxGV2lZFA4gKn2fQ1XmxqI1AbQ3C +ekD6819kR5LLU7m7Wc5P/dAVUwHY3+vZ5nbv0CO7O6l5s9UCKc2Jo5YPSjXnTkLAdc0Hz+Ys63su +-----END CERTIFICATE----- + +TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H5 +========================================================= +-----BEGIN CERTIFICATE----- +MIIEJzCCAw+gAwIBAgIHAI4X/iQggTANBgkqhkiG9w0BAQsFADCBsTELMAkGA1UEBhMCVFIxDzAN +BgNVBAcMBkFua2FyYTFNMEsGA1UECgxEVMOcUktUUlVTVCBCaWxnaSDEsGxldGnFn2ltIHZlIEJp +bGnFn2ltIEfDvHZlbmxpxJ9pIEhpem1ldGxlcmkgQS7Fni4xQjBABgNVBAMMOVTDnFJLVFJVU1Qg +RWxla3Ryb25payBTZXJ0aWZpa2EgSGl6bWV0IFNhxJ9sYXnEsWPEsXPEsSBINTAeFw0xMzA0MzAw +ODA3MDFaFw0yMzA0MjgwODA3MDFaMIGxMQswCQYDVQQGEwJUUjEPMA0GA1UEBwwGQW5rYXJhMU0w +SwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmlsacWfaW0gR8O8dmVubGnE +n2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBFbGVrdHJvbmlrIFNlcnRp +ZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg1MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEApCUZ4WWe60ghUEoI5RHwWrom/4NZzkQqL/7hzmAD/I0Dpe3/a6i6zDQGn1k19uwsu537 +jVJp45wnEFPzpALFp/kRGml1bsMdi9GYjZOHp3GXDSHHmflS0yxjXVW86B8BSLlg/kJK9siArs1m +ep5Fimh34khon6La8eHBEJ/rPCmBp+EyCNSgBbGM+42WAA4+Jd9ThiI7/PS98wl+d+yG6w8z5UNP +9FR1bSmZLmZaQ9/LXMrI5Tjxfjs1nQ/0xVqhzPMggCTTV+wVunUlm+hkS7M0hO8EuPbJbKoCPrZV +4jI3X/xml1/N1p7HIL9Nxqw/dV8c7TKcfGkAaZHjIxhT6QIDAQABo0IwQDAdBgNVHQ4EFgQUVpkH +HtOsDGlktAxQR95DLL4gwPswDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZI +hvcNAQELBQADggEBAJ5FdnsXSDLyOIspve6WSk6BGLFRRyDN0GSxDsnZAdkJzsiZ3GglE9Rc8qPo +BP5yCccLqh0lVX6Wmle3usURehnmp349hQ71+S4pL+f5bFgWV1Al9j4uPqrtd3GqqpmWRgqujuwq +URawXs3qZwQcWDD1YIq9pr1N5Za0/EKJAWv2cMhQOQwt1WbZyNKzMrcbGW3LM/nfpeYVhDfwwvJl +lpKQd/Ct9JDpEXjXk4nAPQu6KfTomZ1yju2dL+6SfaHx/126M2CFYv4HAqGEVka+lgqaE9chTLd8 +B59OTj+RdPsnnRHM3eaxynFNExc5JsUpISuTKWqW+qtB4Uu2NQvAmxU= +-----END CERTIFICATE----- + +TÜRKTRUST Elektronik Sertifika Hizmet Sağlayıcısı H6 +========================================================= +-----BEGIN CERTIFICATE----- +MIIEJjCCAw6gAwIBAgIGfaHyZeyKMA0GCSqGSIb3DQEBCwUAMIGxMQswCQYDVQQGEwJUUjEPMA0G +A1UEBwwGQW5rYXJhMU0wSwYDVQQKDERUw5xSS1RSVVNUIEJpbGdpIMSwbGV0acWfaW0gdmUgQmls +acWfaW0gR8O8dmVubGnEn2kgSGl6bWV0bGVyaSBBLsWeLjFCMEAGA1UEAww5VMOcUktUUlVTVCBF +bGVrdHJvbmlrIFNlcnRpZmlrYSBIaXptZXQgU2HEn2xhecSxY8Sxc8SxIEg2MB4XDTEzMTIxODA5 +MDQxMFoXDTIzMTIxNjA5MDQxMFowgbExCzAJBgNVBAYTAlRSMQ8wDQYDVQQHDAZBbmthcmExTTBL +BgNVBAoMRFTDnFJLVFJVU1QgQmlsZ2kgxLBsZXRpxZ9pbSB2ZSBCaWxpxZ9pbSBHw7x2ZW5sacSf +aSBIaXptZXRsZXJpIEEuxZ4uMUIwQAYDVQQDDDlUw5xSS1RSVVNUIEVsZWt0cm9uaWsgU2VydGlm +aWthIEhpem1ldCBTYcSfbGF5xLFjxLFzxLEgSDYwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK +AoIBAQCdsGjW6L0UlqMACprx9MfMkU1xeHe59yEmFXNRFpQJRwXiM/VomjX/3EsvMsew7eKC5W/a +2uqsxgbPJQ1BgfbBOCK9+bGlprMBvD9QFyv26WZV1DOzXPhDIHiTVRZwGTLmiddk671IUP320EED +wnS3/faAz1vFq6TWlRKb55cTMgPp1KtDWxbtMyJkKbbSk60vbNg9tvYdDjTu0n2pVQ8g9P0pu5Fb +HH3GQjhtQiht1AH7zYiXSX6484P4tZgvsycLSF5W506jM7NE1qXyGJTtHB6plVxiSvgNZ1GpryHV ++DKdeboaX+UEVU0TRv/yz3THGmNtwx8XEsMeED5gCLMxAgMBAAGjQjBAMB0GA1UdDgQWBBTdVRcT +9qzoSCHK77Wv0QAy7Z6MtTAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zANBgkqhkiG +9w0BAQsFAAOCAQEAb1gNl0OqFlQ+v6nfkkU/hQu7VtMMUszIv3ZnXuaqs6fvuay0EBQNdH49ba3R +fdCaqaXKGDsCQC4qnFAUi/5XfldcEQlLNkVS9z2sFP1E34uXI9TDwe7UU5X+LEr+DXCqu4svLcsy +o4LyVN/Y8t3XSHLuSqMplsNEzm61kod2pLv0kmzOLBQJZo6NrRa1xxsJYTvjIKIDgI6tflEATseW +hvtDmHd9KMeP2Cpu54Rvl0EpABZeTeIT6lnAY2c6RPuY/ATTMHKm9ocJV612ph1jmv3XZch4gyt1 +O6VbuA1df74jrlZVlFjvH4GMKrLN5ptjnhi85WsGtAuYSyher4hYyw== +-----END CERTIFICATE----- + +Certinomis - Root CA +==================== +-----BEGIN CERTIFICATE----- +MIIFkjCCA3qgAwIBAgIBATANBgkqhkiG9w0BAQsFADBaMQswCQYDVQQGEwJGUjETMBEGA1UEChMK +Q2VydGlub21pczEXMBUGA1UECxMOMDAwMiA0MzM5OTg5MDMxHTAbBgNVBAMTFENlcnRpbm9taXMg +LSBSb290IENBMB4XDTEzMTAyMTA5MTcxOFoXDTMzMTAyMTA5MTcxOFowWjELMAkGA1UEBhMCRlIx +EzARBgNVBAoTCkNlcnRpbm9taXMxFzAVBgNVBAsTDjAwMDIgNDMzOTk4OTAzMR0wGwYDVQQDExRD +ZXJ0aW5vbWlzIC0gUm9vdCBDQTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANTMCQos +P5L2fxSeC5yaah1AMGT9qt8OHgZbn1CF6s2Nq0Nn3rD6foCWnoR4kkjW4znuzuRZWJflLieY6pOo +d5tK8O90gC3rMB+12ceAnGInkYjwSond3IjmFPnVAy//ldu9n+ws+hQVWZUKxkd8aRi5pwP5ynap +z8dvtF4F/u7BUrJ1Mofs7SlmO/NKFoL21prbcpjp3vDFTKWrteoB4owuZH9kb/2jJZOLyKIOSY00 +8B/sWEUuNKqEUL3nskoTuLAPrjhdsKkb5nPJWqHZZkCqqU2mNAKthH6yI8H7KsZn9DS2sJVqM09x +RLWtwHkziOC/7aOgFLScCbAK42C++PhmiM1b8XcF4LVzbsF9Ri6OSyemzTUK/eVNfaoqoynHWmgE +6OXWk6RiwsXm9E/G+Z8ajYJJGYrKWUM66A0ywfRMEwNvbqY/kXPLynNvEiCL7sCCeN5LLsJJwx3t +FvYk9CcbXFcx3FXuqB5vbKziRcxXV4p1VxngtViZSTYxPDMBbRZKzbgqg4SGm/lg0h9tkQPTYKbV +PZrdd5A9NaSfD171UkRpucC63M9933zZxKyGIjK8e2uR73r4F2iw4lNVYC2vPsKD2NkJK/DAZNuH +i5HMkesE/Xa0lZrmFAYb1TQdvtj/dBxThZngWVJKYe2InmtJiUZ+IFrZ50rlau7SZRFDAgMBAAGj +YzBhMA4GA1UdDwEB/wQEAwIBBjAPBgNVHRMBAf8EBTADAQH/MB0GA1UdDgQWBBTvkUz1pcMw6C8I +6tNxIqSSaHh02TAfBgNVHSMEGDAWgBTvkUz1pcMw6C8I6tNxIqSSaHh02TANBgkqhkiG9w0BAQsF +AAOCAgEAfj1U2iJdGlg+O1QnurrMyOMaauo++RLrVl89UM7g6kgmJs95Vn6RHJk/0KGRHCwPT5iV +WVO90CLYiF2cN/z7ZMF4jIuaYAnq1fohX9B0ZedQxb8uuQsLrbWwF6YSjNRieOpWauwK0kDDPAUw +Pk2Ut59KA9N9J0u2/kTO+hkzGm2kQtHdzMjI1xZSg081lLMSVX3l4kLr5JyTCcBMWwerx20RoFAX +lCOotQqSD7J6wWAsOMwaplv/8gzjqh8c3LigkyfeY+N/IZ865Z764BNqdeuWXGKRlI5nU7aJ+BIJ +y29SWwNyhlCVCNSNh4YVH5Uk2KRvms6knZtt0rJ2BobGVgjF6wnaNsIbW0G+YSrjcOa4pvi2WsS9 +Iff/ql+hbHY5ZtbqTFXhADObE5hjyW/QASAJN1LnDE8+zbz1X5YnpyACleAu6AdBBR8Vbtaw5Bng +DwKTACdyxYvRVB9dSsNAl35VpnzBMwQUAR1JIGkLGZOdblgi90AMRgwjY/M50n92Uaf0yKHxDHYi +I0ZSKS3io0EHVmmY0gUJvGnHWmHNj4FgFU2A3ZDifcRQ8ow7bkrHxuaAKzyBvBGAFhAn1/DNP3nM +cyrDflOR1m749fPH0FFNjkulW+YZFzvWgQncItzujrnEj1PhZ7szuIgVRs/taTX/dQ1G885x4cVr +hkIGuUE= +-----END CERTIFICATE----- + +OISTE WISeKey Global Root GB CA +=============================== +-----BEGIN CERTIFICATE----- +MIIDtTCCAp2gAwIBAgIQdrEgUnTwhYdGs/gjGvbCwDANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQG +EwJDSDEQMA4GA1UEChMHV0lTZUtleTEiMCAGA1UECxMZT0lTVEUgRm91bmRhdGlvbiBFbmRvcnNl +ZDEoMCYGA1UEAxMfT0lTVEUgV0lTZUtleSBHbG9iYWwgUm9vdCBHQiBDQTAeFw0xNDEyMDExNTAw +MzJaFw0zOTEyMDExNTEwMzFaMG0xCzAJBgNVBAYTAkNIMRAwDgYDVQQKEwdXSVNlS2V5MSIwIAYD +VQQLExlPSVNURSBGb3VuZGF0aW9uIEVuZG9yc2VkMSgwJgYDVQQDEx9PSVNURSBXSVNlS2V5IEds +b2JhbCBSb290IEdCIENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2Be3HEokKtaX +scriHvt9OO+Y9bI5mE4nuBFde9IllIiCFSZqGzG7qFshISvYD06fWvGxWuR51jIjK+FTzJlFXHtP +rby/h0oLS5daqPZI7H17Dc0hBt+eFf1Biki3IPShehtX1F1Q/7pn2COZH8g/497/b1t3sWtuuMlk +9+HKQUYOKXHQuSP8yYFfTvdv37+ErXNku7dCjmn21HYdfp2nuFeKUWdy19SouJVUQHMD9ur06/4o +Qnc/nSMbsrY9gBQHTC5P99UKFg29ZkM3fiNDecNAhvVMKdqOmq0NpQSHiB6F4+lT1ZvIiwNjeOvg +GUpuuy9rM2RYk61pv48b74JIxwIDAQABo1EwTzALBgNVHQ8EBAMCAYYwDwYDVR0TAQH/BAUwAwEB +/zAdBgNVHQ4EFgQUNQ/INmNe4qPs+TtmFc5RUuORmj0wEAYJKwYBBAGCNxUBBAMCAQAwDQYJKoZI +hvcNAQELBQADggEBAEBM+4eymYGQfp3FsLAmzYh7KzKNbrghcViXfa43FK8+5/ea4n32cZiZBKpD +dHij40lhPnOMTZTg+XHEthYOU3gf1qKHLwI5gSk8rxWYITD+KJAAjNHhy/peyP34EEY7onhCkRd0 +VQreUGdNZtGn//3ZwLWoo4rOZvUPQ82nK1d7Y0Zqqi5S2PTt4W2tKZB4SLrhI6qjiey1q5bAtEui +HZeeevJuQHHfaPFlTc58Bd9TZaml8LGXBHAVRgOY1NK/VLSgWH1Sb9pWJmLU2NuJMW8c8CLC02Ic +Nc1MaRVUGpCY3useX8p3x8uOPUNpnJpY0CQ73xtAln41rYHHTnG6iBM= +-----END CERTIFICATE----- + +Certification Authority of WoSign G2 +==================================== +-----BEGIN CERTIFICATE----- +MIIDfDCCAmSgAwIBAgIQayXaioidfLwPBbOxemFFRDANBgkqhkiG9w0BAQsFADBYMQswCQYDVQQG +EwJDTjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxLTArBgNVBAMTJENlcnRpZmljYXRpb24g +QXV0aG9yaXR5IG9mIFdvU2lnbiBHMjAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMFgx +CzAJBgNVBAYTAkNOMRowGAYDVQQKExFXb1NpZ24gQ0EgTGltaXRlZDEtMCsGA1UEAxMkQ2VydGlm +aWNhdGlvbiBBdXRob3JpdHkgb2YgV29TaWduIEcyMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB +CgKCAQEAvsXEoCKASU+/2YcRxlPhuw+9YH+v9oIOH9ywjj2X4FA8jzrvZjtFB5sg+OPXJYY1kBai +XW8wGQiHC38Gsp1ij96vkqVg1CuAmlI/9ZqD6TRay9nVYlzmDuDfBpgOgHzKtB0TiGsOqCR3A9Du +W/PKaZE1OVbFbeP3PU9ekzgkyhjpJMuSA93MHD0JcOQg5PGurLtzaaNjOg9FD6FKmsLRY6zLEPg9 +5k4ot+vElbGs/V6r+kHLXZ1L3PR8du9nfwB6jdKgGlxNIuG12t12s9R23164i5jIFFTMaxeSt+BK +v0mUYQs4kI9dJGwlezt52eJ+na2fmKEG/HgUYFf47oB3sQIDAQABo0IwQDAOBgNVHQ8BAf8EBAMC +AQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQU+mCp62XF3RYUCE4MD42b4Pdkr2cwDQYJKoZI +hvcNAQELBQADggEBAFfDejaCnI2Y4qtAqkePx6db7XznPWZaOzG73/MWM5H8fHulwqZm46qwtyeY +P0nXYGdnPzZPSsvxFPpahygc7Y9BMsaV+X3avXtbwrAh449G3CE4Q3RM+zD4F3LBMvzIkRfEzFg3 +TgvMWvchNSiDbGAtROtSjFA9tWwS1/oJu2yySrHFieT801LYYRf+epSEj3m2M1m6D8QL4nCgS3gu ++sif/a+RZQp4OBXllxcU3fngLDT4ONCEIgDAFFEYKwLcMFrw6AF8NTojrwjkr6qOKEJJLvD1mTS+ +7Q9LGOHSJDy7XUe3IfKN0QqZjuNuPq1w4I+5ysxugTH2e5x6eeRncRg= +-----END CERTIFICATE----- + +CA WoSign ECC Root +================== +-----BEGIN CERTIFICATE----- +MIICCTCCAY+gAwIBAgIQaEpYcIBr8I8C+vbe6LCQkDAKBggqhkjOPQQDAzBGMQswCQYDVQQGEwJD +TjEaMBgGA1UEChMRV29TaWduIENBIExpbWl0ZWQxGzAZBgNVBAMTEkNBIFdvU2lnbiBFQ0MgUm9v +dDAeFw0xNDExMDgwMDU4NThaFw00NDExMDgwMDU4NThaMEYxCzAJBgNVBAYTAkNOMRowGAYDVQQK +ExFXb1NpZ24gQ0EgTGltaXRlZDEbMBkGA1UEAxMSQ0EgV29TaWduIEVDQyBSb290MHYwEAYHKoZI +zj0CAQYFK4EEACIDYgAE4f2OuEMkq5Z7hcK6C62N4DrjJLnSsb6IOsq/Srj57ywvr1FQPEd1bPiU +t5v8KB7FVMxjnRZLU8HnIKvNrCXSf4/CwVqCXjCLelTOA7WRf6qU0NGKSMyCBSah1VES1ns2o0Iw +QDAOBgNVHQ8BAf8EBAMCAQYwDwYDVR0TAQH/BAUwAwEB/zAdBgNVHQ4EFgQUqv3VWqP2h4syhf3R +MluARZPzA7gwCgYIKoZIzj0EAwMDaAAwZQIxAOSkhLCB1T2wdKyUpOgOPQB0TKGXa/kNUTyh2Tv0 +Daupn75OcsqF1NnstTJFGG+rrQIwfcf3aWMvoeGY7xMQ0Xk/0f7qO3/eVvSQsRUR2LIiFdAvwyYu +a/GRspBl9JrmkO5K +-----END CERTIFICATE----- diff --git a/web/api/lib/Cake/Config/config.php b/web/api/lib/Cake/Config/config.php index cd3a398c4..755944ab4 100644 --- a/web/api/lib/Cake/Config/config.php +++ b/web/api/lib/Cake/Config/config.php @@ -2,18 +2,18 @@ /** * Core Configurations. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Config * @since CakePHP(tm) v 1.1.11.4062 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ $versionFile = file(CAKE . 'VERSION.txt'); diff --git a/web/api/lib/Cake/Config/routes.php b/web/api/lib/Cake/Config/routes.php index 7bcc0c06b..5d603ed8e 100644 --- a/web/api/lib/Cake/Config/routes.php +++ b/web/api/lib/Cake/Config/routes.php @@ -1,17 +1,17 @@ _path = $path; $this->_section = $section; diff --git a/web/api/lib/Cake/Configure/PhpReader.php b/web/api/lib/Cake/Configure/PhpReader.php index d15a41b83..40176ce9f 100644 --- a/web/api/lib/Cake/Configure/PhpReader.php +++ b/web/api/lib/Cake/Configure/PhpReader.php @@ -2,17 +2,17 @@ /** * PhpReader file * - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/2.0/en/development/configuration.html#loading-configuration-files CakePHP(tm) Configuration + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://book.cakephp.org/2.0/en/development/configuration.html#loading-configuration-files CakePHP(tm) Configuration * @package Cake.Configure * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('CakePlugin', 'Core'); @@ -38,11 +38,11 @@ class PhpReader implements ConfigReaderInterface { /** * Constructor for PHP Config file reading. * - * @param string $path The path to read config files from. Defaults to APP . 'Config' . DS + * @param string $path The path to read config files from. Defaults to CONFIG */ public function __construct($path = null) { if (!$path) { - $path = APP . 'Config' . DS; + $path = CONFIG; } $this->_path = $path; } diff --git a/web/api/lib/Cake/Console/Command/AclShell.php b/web/api/lib/Cake/Console/Command/AclShell.php index 15536ebb6..10db318eb 100644 --- a/web/api/lib/Cake/Console/Command/AclShell.php +++ b/web/api/lib/Cake/Console/Command/AclShell.php @@ -2,17 +2,17 @@ /** * Acl Shell provides Acl access in the CLI environment * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2.0.5012 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -89,7 +89,7 @@ class AclShell extends AppShell { $this->args = null; return $this->DbConfig->execute(); } - require_once APP . 'Config' . DS . 'database.php'; + require_once CONFIG . 'database.php'; if (!in_array($this->command, array('initdb'))) { $collection = new ComponentCollection(); diff --git a/web/api/lib/Cake/Console/Command/ApiShell.php b/web/api/lib/Cake/Console/Command/ApiShell.php index 8b0c979d7..3c3dd1cef 100644 --- a/web/api/lib/Cake/Console/Command/ApiShell.php +++ b/web/api/lib/Cake/Console/Command/ApiShell.php @@ -4,17 +4,17 @@ * * Implementation of a Cake Shell to show CakePHP core method signatures. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2.0.5012 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); diff --git a/web/api/lib/Cake/Console/Command/AppShell.php b/web/api/lib/Cake/Console/Command/AppShell.php index 4ea0f2dd8..030ae49fd 100644 --- a/web/api/lib/Cake/Console/Command/AppShell.php +++ b/web/api/lib/Cake/Console/Command/AppShell.php @@ -2,17 +2,17 @@ /** * AppShell file * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('Shell', 'Console'); diff --git a/web/api/lib/Cake/Console/Command/BakeShell.php b/web/api/lib/Cake/Console/Command/BakeShell.php index c1e59c690..e0db7bc0c 100644 --- a/web/api/lib/Cake/Console/Command/BakeShell.php +++ b/web/api/lib/Cake/Console/Command/BakeShell.php @@ -6,17 +6,17 @@ * application development by writing fully functional skeleton controllers, * models, and views. Going further, Bake can also write Unit Tests for you. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2.0.5012 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -30,7 +30,7 @@ App::uses('Model', 'Model'); * models, and views. Going further, Bake can also write Unit Tests for you. * * @package Cake.Console.Command - * @link http://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html + * @link https://book.cakephp.org/2.0/en/console-and-shells/code-generation-with-bake.html */ class BakeShell extends AppShell { diff --git a/web/api/lib/Cake/Console/Command/CommandListShell.php b/web/api/lib/Cake/Console/Command/CommandListShell.php index ca6620a5b..49b987783 100644 --- a/web/api/lib/Cake/Console/Command/CommandListShell.php +++ b/web/api/lib/Cake/Console/Command/CommandListShell.php @@ -1,17 +1,17 @@ out(" -working: " . rtrim(APP, DS)); $this->out(" -root: " . rtrim(ROOT, DS)); $this->out(" -core: " . rtrim(CORE_PATH, DS)); + $this->out(" -webroot: " . rtrim(WWW_ROOT, DS)); $this->out(""); $this->out(__d('cake_console', "Changing Paths:"), 2); $this->out(__d('cake_console', "Your working path should be the same as your application path. To change your path use the '-app' param.")); diff --git a/web/api/lib/Cake/Console/Command/CompletionShell.php b/web/api/lib/Cake/Console/Command/CompletionShell.php index 57e86f949..3d6fa17e0 100644 --- a/web/api/lib/Cake/Console/Command/CompletionShell.php +++ b/web/api/lib/Cake/Console/Command/CompletionShell.php @@ -1,17 +1,17 @@ __d('cake_console', 'Path to read and write schema.php'), - 'default' => APP . 'Config' . DS . 'Schema' + 'default' => CONFIG . 'Schema' ); $file = array( 'help' => __d('cake_console', 'File name to read and write.'), diff --git a/web/api/lib/Cake/Console/Command/ServerShell.php b/web/api/lib/Cake/Console/Command/ServerShell.php index 8c7d5e5e3..014d3978a 100644 --- a/web/api/lib/Cake/Console/Command/ServerShell.php +++ b/web/api/lib/Cake/Console/Command/ServerShell.php @@ -2,17 +2,17 @@ /** * built-in Server Shell * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.3.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -78,7 +78,7 @@ class ServerShell extends AppShell { * or otherwise modify the pre-command flow. * * @return void - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::startup + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::startup */ public function startup() { if (!empty($this->params['host'])) { diff --git a/web/api/lib/Cake/Console/Command/Task/BakeTask.php b/web/api/lib/Cake/Console/Command/Task/BakeTask.php index 8298e112a..c886c95e6 100644 --- a/web/api/lib/Cake/Console/Command/Task/BakeTask.php +++ b/web/api/lib/Cake/Console/Command/Task/BakeTask.php @@ -2,17 +2,17 @@ /** * Base class for Bake Tasks. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); diff --git a/web/api/lib/Cake/Console/Command/Task/CommandTask.php b/web/api/lib/Cake/Console/Command/Task/CommandTask.php index fca006a72..99c888f8e 100644 --- a/web/api/lib/Cake/Console/Command/Task/CommandTask.php +++ b/web/api/lib/Cake/Console/Command/Task/CommandTask.php @@ -1,16 +1,16 @@ doComponents(); $wannaUseSession = $this->in( - __d('cake_console', "Would you like to use Session flash messages?"), array('y', 'n'), 'y' + __d('cake_console', "Would you like to use the FlashComponent to display flash messages?"), array('y', 'n'), 'y' ); if (strtolower($wannaUseSession) === 'y') { - array_push($components, 'Session'); + array_push($components, 'Session', 'Flash'); } array_unique($components); } @@ -331,6 +331,12 @@ class ControllerTask extends BakeTask { public function bake($controllerName, $actions = '', $helpers = null, $components = null) { $this->out("\n" . __d('cake_console', 'Baking controller class for %s...', $controllerName), 1, Shell::QUIET); + if ($helpers === null) { + $helpers = array(); + } + if ($components === null) { + $components = array(); + } $isScaffold = ($actions === 'scaffold') ? true : false; $this->Template->set(array( @@ -384,9 +390,9 @@ class ControllerTask extends BakeTask { * @return array Components the user wants to use. */ public function doComponents() { - $components = array('Paginator', 'Flash'); + $components = array('Paginator'); return array_merge($components, $this->_doPropertyChoices( - __d('cake_console', "Would you like this controller to use other components\nbesides PaginatorComponent and FlashComponent?"), + __d('cake_console', "Would you like this controller to use other components\nbesides PaginatorComponent?"), __d('cake_console', "Please provide a comma separated list of the component names you'd like to use.\nExample: 'Acl, Security, RequestHandler'") )); } diff --git a/web/api/lib/Cake/Console/Command/Task/DbConfigTask.php b/web/api/lib/Cake/Console/Command/Task/DbConfigTask.php index ee1aa6c99..c76b87bcd 100644 --- a/web/api/lib/Cake/Console/Command/Task/DbConfigTask.php +++ b/web/api/lib/Cake/Console/Command/Task/DbConfigTask.php @@ -2,17 +2,17 @@ /** * The DbConfig Task handles creating and updating the database.php * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -64,7 +64,7 @@ class DbConfigTask extends AppShell { * @return void */ public function initialize() { - $this->path = APP . 'Config' . DS; + $this->path = CONFIG; } /** diff --git a/web/api/lib/Cake/Console/Command/Task/ExtractTask.php b/web/api/lib/Cake/Console/Command/Task/ExtractTask.php index 740528f70..eaa691e31 100644 --- a/web/api/lib/Cake/Console/Command/Task/ExtractTask.php +++ b/web/api/lib/Cake/Console/Command/Task/ExtractTask.php @@ -2,17 +2,17 @@ /** * Language string extractor * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2.0.5012 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); diff --git a/web/api/lib/Cake/Console/Command/Task/FixtureTask.php b/web/api/lib/Cake/Console/Command/Task/FixtureTask.php index 1f578d083..7b2ee52e7 100644 --- a/web/api/lib/Cake/Console/Command/Task/FixtureTask.php +++ b/web/api/lib/Cake/Console/Command/Task/FixtureTask.php @@ -2,17 +2,17 @@ /** * The FixtureTask handles creating and updating fixture files. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -125,7 +125,8 @@ class FixtureTask extends BakeTask { return $this->all(); } $model = $this->_modelName($this->args[0]); - $this->bake($model); + $importOptions = $this->importOptions($model); + $this->bake($model, false, $importOptions); } } @@ -177,24 +178,29 @@ class FixtureTask extends BakeTask { */ public function importOptions($modelName) { $options = array(); + $plugin = ''; + if (isset($this->params['plugin'])) { + $plugin = $this->params['plugin'] . '.'; + } if (!empty($this->params['schema'])) { - $options['schema'] = $modelName; - } else { + $options['schema'] = $plugin . $modelName; + } elseif ($this->interactive) { $doSchema = $this->in(__d('cake_console', 'Would you like to import schema for this fixture?'), array('y', 'n'), 'n'); if ($doSchema === 'y') { $options['schema'] = $modelName; } } + if (!empty($this->params['records'])) { - $doRecords = 'y'; - } else { + $options['fromTable'] = true; + } elseif ($this->interactive) { $doRecords = $this->in(__d('cake_console', 'Would you like to use record importing for this fixture?'), array('y', 'n'), 'n'); + if ($doRecords === 'y') { + $options['records'] = true; + } } - if ($doRecords === 'y') { - $options['records'] = true; - } - if ($doRecords === 'n') { + if (!isset($options['records']) && $this->interactive) { $prompt = __d('cake_console', "Would you like to build this fixture with data from %s's table?", $modelName); $fromTable = $this->in($prompt, array('y', 'n'), 'n'); if (strtolower($fromTable) === 'y') { @@ -329,6 +335,9 @@ class FixtureTask extends BakeTask { } $insert = ''; switch ($fieldInfo['type']) { + case 'tinyinteger': + case 'smallinteger': + case 'biginteger': case 'integer': case 'float': $insert = $i + 1; diff --git a/web/api/lib/Cake/Console/Command/Task/ModelTask.php b/web/api/lib/Cake/Console/Command/Task/ModelTask.php index 2dc03a5c3..4619655f9 100644 --- a/web/api/lib/Cake/Console/Command/Task/ModelTask.php +++ b/web/api/lib/Cake/Console/Command/Task/ModelTask.php @@ -2,17 +2,17 @@ /** * The ModelTask handles creating and updating models files. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -450,6 +450,10 @@ class ModelTask extends BakeTask { $guess = $methods['notBlank']; } elseif ($metaData['type'] === 'integer') { $guess = $methods['numeric']; + } elseif ($metaData['type'] === 'smallinteger') { + $guess = $methods['numeric']; + } elseif ($metaData['type'] === 'tinyinteger') { + $guess = $methods['numeric']; } elseif ($metaData['type'] === 'float') { $guess = $methods['numeric']; } elseif ($metaData['type'] === 'boolean') { diff --git a/web/api/lib/Cake/Console/Command/Task/PluginTask.php b/web/api/lib/Cake/Console/Command/Task/PluginTask.php index 7cd507942..10a00864a 100644 --- a/web/api/lib/Cake/Console/Command/Task/PluginTask.php +++ b/web/api/lib/Cake/Console/Command/Task/PluginTask.php @@ -1,16 +1,16 @@ path = current(App::path('plugins')); - $this->bootstrap = APP . 'Config' . DS . 'bootstrap.php'; + $this->bootstrap = CONFIG . 'bootstrap.php'; } /** diff --git a/web/api/lib/Cake/Console/Command/Task/ProjectTask.php b/web/api/lib/Cake/Console/Command/Task/ProjectTask.php index df1ab19db..ed38f6855 100644 --- a/web/api/lib/Cake/Console/Command/Task/ProjectTask.php +++ b/web/api/lib/Cake/Console/Command/Task/ProjectTask.php @@ -2,17 +2,17 @@ /** * The Project Task handles creating the base application * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -79,14 +79,14 @@ class ProjectTask extends AppShell { if ($this->securitySalt($path) === true) { $this->out(__d('cake_console', ' * Random hash key created for \'Security.salt\'')); } else { - $this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', APP . 'Config' . DS . 'core.php')); + $this->err(__d('cake_console', 'Unable to generate random hash for \'Security.salt\', you should change it in %s', CONFIG . 'core.php')); $success = false; } if ($this->securityCipherSeed($path) === true) { $this->out(__d('cake_console', ' * Random seed created for \'Security.cipherSeed\'')); } else { - $this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', APP . 'Config' . DS . 'core.php')); + $this->err(__d('cake_console', 'Unable to generate random seed for \'Security.cipherSeed\', you should change it in %s', CONFIG . 'core.php')); $success = false; } @@ -362,7 +362,7 @@ class ProjectTask extends AppShell { * @return bool Success */ public function cakeAdmin($name) { - $path = (empty($this->configPath)) ? APP . 'Config' . DS : $this->configPath; + $path = (empty($this->configPath)) ? CONFIG : $this->configPath; $File = new File($path . 'core.php'); $contents = $File->read(); if (preg_match('%(\s*[/]*Configure::write\(\'Routing.prefixes\',[\s\'a-z,\)\(]*\);)%', $contents, $match)) { diff --git a/web/api/lib/Cake/Console/Command/Task/TemplateTask.php b/web/api/lib/Cake/Console/Command/Task/TemplateTask.php index d5dfc4440..0691bf5c2 100644 --- a/web/api/lib/Cake/Console/Command/Task/TemplateTask.php +++ b/web/api/lib/Cake/Console/Command/Task/TemplateTask.php @@ -2,17 +2,17 @@ /** * Template Task can generate templated output Used in other Tasks * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); diff --git a/web/api/lib/Cake/Console/Command/Task/TestTask.php b/web/api/lib/Cake/Console/Command/Task/TestTask.php index a147951c2..342494e57 100644 --- a/web/api/lib/Cake/Console/Command/Task/TestTask.php +++ b/web/api/lib/Cake/Console/Command/Task/TestTask.php @@ -2,17 +2,17 @@ /** * The TestTask handles creating and updating test files. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -367,7 +367,7 @@ class TestTask extends BakeTask { * Generate the list of fixtures that will be required to run this test based on * loaded models. * - * @param object $subject The object you want to generate fixtures for. + * @param CakeObject $subject The object you want to generate fixtures for. * @return array Array of fixtures to be included in the test. */ public function generateFixtureList($subject) { diff --git a/web/api/lib/Cake/Console/Command/Task/ViewTask.php b/web/api/lib/Cake/Console/Command/Task/ViewTask.php index 06ecf0013..fa7ddef44 100644 --- a/web/api/lib/Cake/Console/Command/Task/ViewTask.php +++ b/web/api/lib/Cake/Console/Command/Task/ViewTask.php @@ -2,17 +2,17 @@ /** * The View Tasks handles creating and updating view files. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 1.2 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); diff --git a/web/api/lib/Cake/Console/Command/TestShell.php b/web/api/lib/Cake/Console/Command/TestShell.php index 4dfacfdfc..b12f6a078 100644 --- a/web/api/lib/Cake/Console/Command/TestShell.php +++ b/web/api/lib/Cake/Console/Command/TestShell.php @@ -4,17 +4,17 @@ * * This Shell allows the running of test suites via the cake command line * - * CakePHP(tm) Tests - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) Tests + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/2.0/en/development/testing.html + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://book.cakephp.org/2.0/en/development/testing.html * @since CakePHP(tm) v 1.2.0.4433 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('Shell', 'Console'); @@ -71,6 +71,9 @@ class TestShell extends Shell { ))->addOption('coverage-clover', array( 'help' => __d('cake_console', ' Write code coverage data in Clover XML format.'), 'default' => false + ))->addOption('coverage-text', array( + 'help' => __d('cake_console', 'Output code coverage report in Text format.'), + 'boolean' => true ))->addOption('testdox-html', array( 'help' => __d('cake_console', ' Write agile documentation in HTML format to file.'), 'default' => false @@ -152,6 +155,7 @@ class TestShell extends Shell { 'default' => false ))->addOption('directive', array( 'help' => __d('cake_console', 'key[=value] Sets a php.ini value.'), + 'short' => 'd', 'default' => false ))->addOption('fixture', array( 'help' => __d('cake_console', 'Choose a custom fixture manager.') @@ -234,7 +238,11 @@ class TestShell extends Shell { if ($value === false) { continue; } - $options[] = '--' . $param; + if ($param === 'directive') { + $options[] = '-d'; + } else { + $options[] = '--' . $param; + } if (is_string($value)) { $options[] = $value; } diff --git a/web/api/lib/Cake/Console/Command/TestsuiteShell.php b/web/api/lib/Cake/Console/Command/TestsuiteShell.php index d37ac501b..911f787c9 100644 --- a/web/api/lib/Cake/Console/Command/TestsuiteShell.php +++ b/web/api/lib/Cake/Console/Command/TestsuiteShell.php @@ -4,17 +4,17 @@ * * This is a bc wrapper for the newer Test shell * - * CakePHP(tm) Tests - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) Tests + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://book.cakephp.org/2.0/en/development/testing.html + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://book.cakephp.org/2.0/en/development/testing.html * @since CakePHP(tm) v 1.2.0.4433 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('TestShell', 'Console/Command'); diff --git a/web/api/lib/Cake/Console/Command/UpgradeShell.php b/web/api/lib/Cake/Console/Command/UpgradeShell.php index 12b3fbc9d..f9d1223af 100644 --- a/web/api/lib/Cake/Console/Command/UpgradeShell.php +++ b/web/api/lib/Cake/Console/Command/UpgradeShell.php @@ -2,18 +2,18 @@ /** * Upgrade Shell * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Console.Command * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('AppShell', 'Console/Command'); @@ -532,7 +532,7 @@ class UpgradeShell extends AppShell { /** * Update components. * - * - Make components that extend Object to extend Component. + * - Make components that extend CakeObject to extend Component. * * @return void */ @@ -547,6 +547,11 @@ class UpgradeShell extends AppShell { '/([a-zA-Z]*Component extends) Object/', '\1 Component' ), + array( + '*Component extends CakeObject to *Component extends Component', + '/([a-zA-Z]*Component extends) CakeObject/', + '\1 Component' + ), ); $this->_filesRegexpUpdate($patterns); diff --git a/web/api/lib/Cake/Console/ConsoleErrorHandler.php b/web/api/lib/Cake/Console/ConsoleErrorHandler.php index 7cbb2df15..3df0bf734 100644 --- a/web/api/lib/Cake/Console/ConsoleErrorHandler.php +++ b/web/api/lib/Cake/Console/ConsoleErrorHandler.php @@ -2,17 +2,17 @@ /** * ErrorHandler for Console Shells * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('ErrorHandler', 'Error'); diff --git a/web/api/lib/Cake/Console/ConsoleInput.php b/web/api/lib/Cake/Console/ConsoleInput.php index 551635b82..dc416ce82 100644 --- a/web/api/lib/Cake/Console/ConsoleInput.php +++ b/web/api/lib/Cake/Console/ConsoleInput.php @@ -2,18 +2,18 @@ /** * ConsoleInput file. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Console * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** diff --git a/web/api/lib/Cake/Console/ConsoleInputArgument.php b/web/api/lib/Cake/Console/ConsoleInputArgument.php index 08dbc21e9..36f085509 100644 --- a/web/api/lib/Cake/Console/ConsoleInputArgument.php +++ b/web/api/lib/Cake/Console/ConsoleInputArgument.php @@ -2,17 +2,17 @@ /** * ConsoleArgumentOption file * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** @@ -159,7 +159,7 @@ class ConsoleInputArgument { $option = $parent->addChild('argument'); $option->addAttribute('name', $this->_name); $option->addAttribute('help', $this->_help); - $option->addAttribute('required', $this->isRequired()); + $option->addAttribute('required', (int)$this->isRequired()); $choices = $option->addChild('choices'); foreach ($this->_choices as $valid) { $choices->addChild('choice', $valid); diff --git a/web/api/lib/Cake/Console/ConsoleInputOption.php b/web/api/lib/Cake/Console/ConsoleInputOption.php index 3a4b7a1c9..139c98353 100644 --- a/web/api/lib/Cake/Console/ConsoleInputOption.php +++ b/web/api/lib/Cake/Console/ConsoleInputOption.php @@ -2,17 +2,17 @@ /** * ConsoleInputOption file * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** @@ -205,10 +205,11 @@ class ConsoleInputOption { $option->addAttribute('name', '--' . $this->_name); $short = ''; if (strlen($this->_short)) { - $short = $this->_short; + $short = '-' . $this->_short; } - $option->addAttribute('short', '-' . $short); - $option->addAttribute('boolean', $this->_boolean); + $option->addAttribute('short', $short); + $option->addAttribute('help', $this->_help); + $option->addAttribute('boolean', (int)$this->_boolean); $option->addChild('default', $this->_default); $choices = $option->addChild('choices'); foreach ($this->_choices as $valid) { diff --git a/web/api/lib/Cake/Console/ConsoleInputSubcommand.php b/web/api/lib/Cake/Console/ConsoleInputSubcommand.php index 65c10db06..b67210698 100644 --- a/web/api/lib/Cake/Console/ConsoleInputSubcommand.php +++ b/web/api/lib/Cake/Console/ConsoleInputSubcommand.php @@ -2,17 +2,17 @@ /** * ConsoleInputSubcommand file * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** diff --git a/web/api/lib/Cake/Console/ConsoleOptionParser.php b/web/api/lib/Cake/Console/ConsoleOptionParser.php index f54c5460d..f90dbc4e1 100644 --- a/web/api/lib/Cake/Console/ConsoleOptionParser.php +++ b/web/api/lib/Cake/Console/ConsoleOptionParser.php @@ -2,17 +2,17 @@ /** * ConsoleOptionParser file * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('TaskCollection', 'Console'); diff --git a/web/api/lib/Cake/Console/ConsoleOutput.php b/web/api/lib/Cake/Console/ConsoleOutput.php index ec6fb3941..4690a850b 100644 --- a/web/api/lib/Cake/Console/ConsoleOutput.php +++ b/web/api/lib/Cake/Console/ConsoleOutput.php @@ -2,17 +2,17 @@ /** * ConsoleOutput file. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** diff --git a/web/api/lib/Cake/Console/HelpFormatter.php b/web/api/lib/Cake/Console/HelpFormatter.php index 3a8fac98f..0c4259aae 100644 --- a/web/api/lib/Cake/Console/HelpFormatter.php +++ b/web/api/lib/Cake/Console/HelpFormatter.php @@ -2,16 +2,16 @@ /** * HelpFormatter * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('CakeText', 'Utility'); @@ -182,7 +182,6 @@ class HelpFormatter { $xml->addChild('command', $parser->command()); $xml->addChild('description', $parser->description()); - $xml->addChild('epilog', $parser->epilog()); $subcommands = $xml->addChild('subcommands'); foreach ($parser->subcommands() as $command) { $command->xml($subcommands); @@ -195,6 +194,7 @@ class HelpFormatter { foreach ($parser->arguments() as $argument) { $argument->xml($arguments); } + $xml->addChild('epilog', $parser->epilog()); return $string ? $xml->asXml() : $xml; } diff --git a/web/api/lib/Cake/Console/Helper/BaseShellHelper.php b/web/api/lib/Cake/Console/Helper/BaseShellHelper.php index f06a17aac..96f12c1bb 100644 --- a/web/api/lib/Cake/Console/Helper/BaseShellHelper.php +++ b/web/api/lib/Cake/Console/Helper/BaseShellHelper.php @@ -1,16 +1,16 @@ name) { @@ -222,7 +222,7 @@ class Shell extends Object { * allows configuration of tasks prior to shell execution * * @return void - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::initialize + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::initialize */ public function initialize() { $this->_loadModels(); @@ -237,7 +237,7 @@ class Shell extends Object { * or otherwise modify the pre-command flow. * * @return void - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::startup + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::startup */ public function startup() { $this->_welcome(); @@ -340,7 +340,7 @@ class Shell extends Object { * * @param string $task The task name to check. * @return bool Success - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hasTask + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hasTask */ public function hasTask($task) { return isset($this->_taskMap[Inflector::camelize($task)]); @@ -351,7 +351,7 @@ class Shell extends Object { * * @param string $name The method name to check. * @return bool - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hasMethod + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hasMethod */ public function hasMethod($name) { try { @@ -369,7 +369,7 @@ class Shell extends Object { } /** - * Dispatch a command to another Shell. Similar to Object::requestAction() + * Dispatch a command to another Shell. Similar to CakeObject::requestAction() * but intended for running shells from other shells. * * ### Usage: @@ -387,7 +387,7 @@ class Shell extends Object { * `return $this->dispatchShell('schema', 'create', 'i18n', '--dry');` * * @return mixed The return of the other shell. - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::dispatchShell + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::dispatchShell */ public function dispatchShell() { $args = func_get_args(); @@ -415,8 +415,8 @@ class Shell extends Object { * @param string $command The command name to run on this shell. If this argument is empty, * and the shell has a `main()` method, that will be called instead. * @param array $argv Array of arguments to run the shell with. This array should be missing the shell name. - * @return void - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::runCommand + * @return int|bool + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::runCommand */ public function runCommand($command, $argv) { $isTask = $this->hasTask($command); @@ -431,6 +431,7 @@ class Shell extends Object { try { list($this->params, $this->args) = $this->OptionParser->parse($argv, $command); } catch (ConsoleException $e) { + $this->err(__d('cake_console', 'Error: %s', $e->getMessage())); $this->out($this->OptionParser->help($command)); return false; } @@ -468,7 +469,7 @@ class Shell extends Object { * Display the help in the correct format * * @param string $command The command to get help for. - * @return void + * @return int|bool */ protected function _displayHelp($command) { $format = 'text'; @@ -487,7 +488,7 @@ class Shell extends Object { * By overriding this method you can configure the ConsoleOptionParser before returning it. * * @return ConsoleOptionParser - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::getOptionParser + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::getOptionParser */ public function getOptionParser() { $name = ($this->plugin ? $this->plugin . '.' : '') . $this->name; @@ -533,7 +534,7 @@ class Shell extends Object { * @param string|array $options Array or string of options. * @param string $default Default input value. * @return mixed Either the default value, or the user-provided input. - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::in + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::in */ public function in($prompt, $options = null, $default = null) { if (!$this->interactive) { @@ -570,7 +571,7 @@ class Shell extends Object { * @param string $prompt Prompt text. * @param string|array $options Array or string of options. * @param string $default Default input value. - * @return Either the default value, or the user-provided input. + * @return string|int the default value, or the user-provided input. */ protected function _getInput($prompt, $options, $default) { if (!is_array($options)) { @@ -612,7 +613,7 @@ class Shell extends Object { * @param string|int|array $options Array of options to use, or an integer to wrap the text to. * @return string Wrapped / indented text * @see CakeText::wrap() - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::wrapText + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::wrapText */ public function wrapText($text, $options = array()) { return CakeText::wrap($text, $options); @@ -633,7 +634,7 @@ class Shell extends Object { * @param int $newlines Number of newlines to append * @param int $level The message's output level, see above. * @return int|bool Returns the number of bytes returned from writing to stdout. - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::out + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::out */ public function out($message = null, $newlines = 1, $level = Shell::NORMAL) { $currentLevel = Shell::NORMAL; @@ -688,7 +689,7 @@ class Shell extends Object { * @param string|array $message A string or an array of strings to output * @param int $newlines Number of newlines to append * @return void - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::err + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::err */ public function err($message = null, $newlines = 1) { $this->stderr->write($message, $newlines); @@ -699,7 +700,7 @@ class Shell extends Object { * * @param int $multiplier Number of times the linefeed sequence should be repeated * @return string - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::nl + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::nl */ public function nl($multiplier = 1) { return str_repeat(ConsoleOutput::LF, $multiplier); @@ -711,7 +712,7 @@ class Shell extends Object { * @param int $newlines Number of newlines to pre- and append * @param int $width Width of the line, defaults to 63 * @return void - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hr + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::hr */ public function hr($newlines = 0, $width = 63) { $this->out(null, $newlines); @@ -725,8 +726,8 @@ class Shell extends Object { * * @param string $title Title of the error * @param string $message An optional error message - * @return void - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::error + * @return int + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::error */ public function error($title, $message = null) { $this->err(__d('cake_console', 'Error: %s', $title)); @@ -742,7 +743,7 @@ class Shell extends Object { * Clear the console * * @return void - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::clear + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::clear */ public function clear() { if (empty($this->params['noclear'])) { @@ -760,7 +761,7 @@ class Shell extends Object { * @param string $path Where to put the file. * @param string $contents Content to put in the file. * @return bool Success - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::createFile + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::createFile */ public function createFile($path, $contents) { $path = str_replace(DS . DS, DS, $path); @@ -849,7 +850,7 @@ class Shell extends Object { * * @param string $file Absolute file path * @return string short path - * @link http://book.cakephp.org/2.0/en/console-and-shells.html#Shell::shortPath + * @link https://book.cakephp.org/2.0/en/console-and-shells.html#Shell::shortPath */ public function shortPath($file) { $shortPath = str_replace(ROOT, null, $file); @@ -974,15 +975,48 @@ class Shell extends Object { CakeLog::drop('stderr'); return; } + if (!$this->_loggerIsConfigured("stdout")) { + $this->_configureStdOutLogger(); + } + if (!$this->_loggerIsConfigured("stderr")) { + $this->_configureStdErrLogger(); + } + } + +/** + * Configure the stdout logger + * + * @return void + */ + protected function _configureStdOutLogger() { CakeLog::config('stdout', array( 'engine' => 'Console', 'types' => array('notice', 'info'), 'stream' => $this->stdout, )); + } + +/** + * Configure the stderr logger + * + * @return void + */ + protected function _configureStdErrLogger() { CakeLog::config('stderr', array( 'engine' => 'Console', 'types' => array('emergency', 'alert', 'critical', 'error', 'warning', 'debug'), 'stream' => $this->stderr, )); } + +/** + * Checks if the given logger is configured + * + * @param string $logger The name of the logger to check + * @return bool + */ + protected function _loggerIsConfigured($logger) { + $configured = CakeLog::configured(); + return in_array($logger, $configured); + } } diff --git a/web/api/lib/Cake/Console/ShellDispatcher.php b/web/api/lib/Cake/Console/ShellDispatcher.php index d53851127..9f21befb2 100644 --- a/web/api/lib/Cake/Console/ShellDispatcher.php +++ b/web/api/lib/Cake/Console/ShellDispatcher.php @@ -2,17 +2,17 @@ /** * ShellDispatcher file * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** @@ -106,7 +106,7 @@ class ShellDispatcher { $message = "This file has been loaded incorrectly and cannot continue.\n" . "Please make sure that " . DS . 'lib' . DS . 'Cake' . DS . "Console is in your system path,\n" . "and check the cookbook for the correct usage of this command.\n" . - "(http://book.cakephp.org/)"; + "(https://book.cakephp.org/)"; throw new CakeException($message); } @@ -129,15 +129,22 @@ class ShellDispatcher { define('APP', $this->params['working'] . DS); } if (!defined('WWW_ROOT')) { - define('WWW_ROOT', APP . $this->params['webroot'] . DS); + if (!$this->_isAbsolutePath($this->params['webroot'])) { + $webroot = realpath(APP . $this->params['webroot']); + } else { + $webroot = $this->params['webroot']; + } + define('WWW_ROOT', $webroot . DS); } if (!defined('TMP') && !is_dir(APP . 'tmp')) { define('TMP', CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'tmp' . DS); } + + // $boot is used by Cake/bootstrap.php file $boot = file_exists(ROOT . DS . APP_DIR . DS . 'Config' . DS . 'bootstrap.php'); require CORE_PATH . 'Cake' . DS . 'bootstrap.php'; - if (!file_exists(APP . 'Config' . DS . 'core.php')) { + if (!file_exists(CONFIG . 'core.php')) { include_once CAKE_CORE_INCLUDE_PATH . DS . 'Cake' . DS . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'Config' . DS . 'core.php'; App::build(); } @@ -305,25 +312,45 @@ class ShellDispatcher { } } - if ($params['app'][0] === '/' || preg_match('/([a-z])(:)/i', $params['app'], $matches)) { + if ($this->_isAbsolutePath($params['app'])) { $params['root'] = dirname($params['app']); } elseif (strpos($params['app'], '/')) { $params['root'] .= '/' . dirname($params['app']); } - + $isWindowsAppPath = $this->_isWindowsPath($params['app']); $params['app'] = basename($params['app']); $params['working'] = rtrim($params['root'], '/'); if (!$isWin || !preg_match('/^[A-Z]:$/i', $params['app'])) { $params['working'] .= '/' . $params['app']; } - if (!empty($matches[0]) || !empty($isWin)) { + if ($isWindowsAppPath || !empty($isWin)) { $params = str_replace('/', '\\', $params); } $this->params = $params + $this->params; } +/** + * Checks whether the given path is absolute or relative. + * + * @param string $path absolute or relative path. + * @return bool + */ + protected function _isAbsolutePath($path) { + return $path[0] === '/' || $this->_isWindowsPath($path); + } + +/** + * Checks whether the given path is Window OS path. + * + * @param string $path absolute path. + * @return bool + */ + protected function _isWindowsPath($path) { + return preg_match('/([a-z])(:)/i', $path) == 1; + } + /** * Parses out the paths from from the argv * @@ -332,7 +359,7 @@ class ShellDispatcher { */ protected function _parsePaths($args) { $parsed = array(); - $keys = array('-working', '--working', '-app', '--app', '-root', '--root'); + $keys = array('-working', '--working', '-app', '--app', '-root', '--root', '-webroot', '--webroot'); $args = (array)$args; foreach ($keys as $key) { while (($index = array_search($key, $args)) !== false) { diff --git a/web/api/lib/Cake/Console/TaskCollection.php b/web/api/lib/Cake/Console/TaskCollection.php index 3fafddd13..5d2e7a7a9 100644 --- a/web/api/lib/Cake/Console/TaskCollection.php +++ b/web/api/lib/Cake/Console/TaskCollection.php @@ -3,17 +3,17 @@ * Task collection is used as a registry for loaded tasks and handles loading * and constructing task class objects. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ App::uses('ObjectCollection', 'Utility'); @@ -64,7 +64,7 @@ class TaskCollection extends ObjectCollection { * * @param string $task Task name to load * @param array $settings Settings for the task. - * @return Task A task object, Either the existing loaded task or a new one. + * @return AppShell A task object, Either the existing loaded task or a new one. * @throws MissingTaskException when the task could not be found */ public function load($task, $settings = array()) { diff --git a/web/api/lib/Cake/Console/Templates/default/actions/controller_actions.ctp b/web/api/lib/Cake/Console/Templates/default/actions/controller_actions.ctp index dfc309215..8a943b9e7 100644 --- a/web/api/lib/Cake/Console/Templates/default/actions/controller_actions.ctp +++ b/web/api/lib/Cake/Console/Templates/default/actions/controller_actions.ctp @@ -2,18 +2,18 @@ /** * Bake Template for Controller action generation. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Console.Templates.default.actions * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ ?> diff --git a/web/api/lib/Cake/Console/Templates/default/classes/controller.ctp b/web/api/lib/Cake/Console/Templates/default/classes/controller.ctp index 6beb4b401..30a9846d3 100644 --- a/web/api/lib/Cake/Console/Templates/default/classes/controller.ctp +++ b/web/api/lib/Cake/Console/Templates/default/classes/controller.ctp @@ -4,18 +4,18 @@ * * Allows templating of Controllers generated from bake. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package Cake.Console.Templates.default.classes * @since CakePHP(tm) v 1.3 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ echo "
diff --git a/web/api/lib/Cake/Console/Templates/default/views/index.ctp b/web/api/lib/Cake/Console/Templates/default/views/index.ctp index cf77c0ed9..72277141f 100644 --- a/web/api/lib/Cake/Console/Templates/default/views/index.ctp +++ b/web/api/lib/Cake/Console/Templates/default/views/index.ctp @@ -1,17 +1,17 @@
diff --git a/web/api/lib/Cake/Console/Templates/default/views/view.ctp b/web/api/lib/Cake/Console/Templates/default/views/view.ctp index 3acfad8be..b229b9f11 100644 --- a/web/api/lib/Cake/Console/Templates/default/views/view.ctp +++ b/web/api/lib/Cake/Console/Templates/default/views/view.ctp @@ -1,17 +1,17 @@
diff --git a/web/api/lib/Cake/Console/Templates/skel/.htaccess b/web/api/lib/Cake/Console/Templates/skel/.htaccess deleted file mode 100644 index 128e7871b..000000000 --- a/web/api/lib/Cake/Console/Templates/skel/.htaccess +++ /dev/null @@ -1,5 +0,0 @@ - - RewriteEngine on - RewriteRule ^$ webroot/ [L] - RewriteRule (.*) webroot/$1 [L] - \ No newline at end of file diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php index 9a4f54337..12ad8ee98 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php +++ b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.php @@ -4,7 +4,7 @@ * * Use it to configure database for ACL * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config.Schema * @since CakePHP(tm) v 0.2.9 */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql index 0bf3f7687..cbb0ccece 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql +++ b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/db_acl.sql @@ -1,11 +1,11 @@ # $Id$ # -# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) +# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) # # Licensed under The MIT License # For full copyright and license information, please see the LICENSE.txt # Redistributions of files must retain the above copyright notice. -# MIT License (http://www.opensource.org/licenses/mit-license.php) +# MIT License (https://opensource.org/licenses/mit-license.php) CREATE TABLE acos ( id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT, diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php index cd598b35e..63dc0db9f 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php +++ b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/i18n.php @@ -4,18 +4,18 @@ * * Use it to configure database for i18n * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config.Schema * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql index 66a42bd19..a1a4e6893 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql +++ b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/i18n.sql @@ -1,11 +1,11 @@ # $Id$ # -# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) +# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) # # Licensed under The MIT License # For full copyright and license information, please see the LICENSE.txt # Redistributions of files must retain the above copyright notice. -# MIT License (http://www.opensource.org/licenses/mit-license.php) +# MIT License (https://opensource.org/licenses/mit-license.php) CREATE TABLE i18n ( id int(10) NOT NULL auto_increment, diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/sessions.php b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/sessions.php index bd7b1efc3..b766ebff0 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/sessions.php +++ b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/sessions.php @@ -4,18 +4,18 @@ * * Use it to configure database for Sessions * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config.Schema * @since CakePHP(tm) v 0.2.9 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ /** diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql index 76845bdc8..e19755622 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql +++ b/web/api/lib/Cake/Console/Templates/skel/Config/Schema/sessions.sql @@ -1,13 +1,13 @@ # $Id$ # -# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) +# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) # 1785 E. Sahara Avenue, Suite 490-204 # Las Vegas, Nevada 89104 # # Licensed under The MIT License # For full copyright and license information, please see the LICENSE.txt # Redistributions of files must retain the above copyright notice. -# MIT License (http://www.opensource.org/licenses/mit-license.php) +# MIT License (https://opensource.org/licenses/mit-license.php) CREATE TABLE cake_sessions ( id varchar(255) NOT NULL default '', diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/acl.ini.php b/web/api/lib/Cake/Console/Templates/skel/Config/acl.ini.php index 5f37e1c97..1f9315869 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/acl.ini.php +++ b/web/api/lib/Cake/Console/Templates/skel/Config/acl.ini.php @@ -2,7 +2,7 @@ ;/** ; * ACL Configuration ; * -; * @link http://cakephp.org CakePHP(tm) Project +; * @link https://cakephp.org CakePHP(tm) Project ; * @package app.Config ; * @since CakePHP(tm) v 0.10.0.1076 ; */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/acl.php b/web/api/lib/Cake/Console/Templates/skel/Config/acl.php index d008979c9..2fe93fea4 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/acl.php +++ b/web/api/lib/Cake/Console/Templates/skel/Config/acl.php @@ -4,7 +4,7 @@ * * Use it to configure access control of your CakePHP application. * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config * @since CakePHP(tm) v 2.1 */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/bootstrap.php b/web/api/lib/Cake/Console/Templates/skel/Config/bootstrap.php index 0cf81bec3..6d05aabbb 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/bootstrap.php +++ b/web/api/lib/Cake/Console/Templates/skel/Config/bootstrap.php @@ -8,7 +8,7 @@ * You should also use this file to include any files that provide global functions/constants * that your application uses. * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config * @since CakePHP(tm) v 0.10.8.2117 */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/core.php b/web/api/lib/Cake/Console/Templates/skel/Config/core.php index 18d645a33..864777666 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/core.php +++ b/web/api/lib/Cake/Console/Templates/skel/Config/core.php @@ -4,7 +4,7 @@ * * Use it to configure core behavior of Cake. * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config * @since CakePHP(tm) v 0.2.9 */ @@ -104,7 +104,7 @@ * will override the automatic detection of full base URL and can be * useful when generating links from the CLI (e.g. sending emails) */ - //Configure::write('App.fullBaseUrl', 'http://example.com'); + //Configure::write('App.fullBaseUrl', 'https://example.com'); /** * Web path to the public images directory under webroot. @@ -273,7 +273,7 @@ * 'mask' => 0664, //[optional] * )); * - * APC (http://pecl.php.net/package/APC) + * APC (https://pecl.php.net/package/APC) * * Cache::config('default', array( * 'engine' => 'Apc', //[required] @@ -282,7 +282,7 @@ * 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string * )); * - * Xcache (http://xcache.lighttpd.net/) + * Xcache (https://xcache.lighttpd.net/) * * Cache::config('default', array( * 'engine' => 'Xcache', //[required] @@ -307,7 +307,7 @@ * 'compress' => false, // [optional] compress data in Memcache (slower, but uses less memory) * )); * - * Wincache (http://php.net/wincache) + * Wincache (https://secure.php.net/wincache) * * Cache::config('default', array( * 'engine' => 'Wincache', //[required] diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/database.php.default b/web/api/lib/Cake/Console/Templates/skel/Config/database.php.default index cc549a5f6..202b821e7 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/database.php.default +++ b/web/api/lib/Cake/Console/Templates/skel/Config/database.php.default @@ -1,6 +1,6 @@ * Array of key/value pairs, on connection it executes SET statements for each pair - * For MySQL : http://dev.mysql.com/doc/refman/5.6/en/set-statement.html - * For Postgres : http://www.postgresql.org/docs/9.2/static/sql-set.html - * For Sql Server : http://msdn.microsoft.com/en-us/library/ms190356.aspx + * For MySQL : https://dev.mysql.com/doc/refman/5.6/en/set-statement.html + * For Postgres : https://www.postgresql.org/docs/9.2/static/sql-set.html + * For Sql Server : https://msdn.microsoft.com/en-us/library/ms190356.aspx * * flags => * A key/value array of driver specific connection options. diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/email.php.default b/web/api/lib/Cake/Console/Templates/skel/Config/email.php.default index 0a01e38d0..aadb515d9 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/email.php.default +++ b/web/api/lib/Cake/Console/Templates/skel/Config/email.php.default @@ -4,7 +4,7 @@ * * Use it to configure email transports of Cake. * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config * @since CakePHP(tm) v 2.0.0 */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Config/routes.php b/web/api/lib/Cake/Console/Templates/skel/Config/routes.php index 2562ebed6..ac19d9f51 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Config/routes.php +++ b/web/api/lib/Cake/Console/Templates/skel/Config/routes.php @@ -6,7 +6,7 @@ * Routes are very important mechanism that allows you to freely connect * different URLs to chosen controllers and their actions (functions). * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Config * @since CakePHP(tm) v 0.2.9 */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Console/Command/AppShell.php b/web/api/lib/Cake/Console/Templates/skel/Console/Command/AppShell.php index 04a3430f0..f73c35afe 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Console/Command/AppShell.php +++ b/web/api/lib/Cake/Console/Templates/skel/Console/Command/AppShell.php @@ -2,7 +2,7 @@ /** * AppShell file * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @since CakePHP(tm) v 2.0 */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Console/cake b/web/api/lib/Cake/Console/Templates/skel/Console/cake index 67454513d..fee8e35a3 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Console/cake +++ b/web/api/lib/Cake/Console/Templates/skel/Console/cake @@ -3,18 +3,18 @@ # # Bake is a shell script for running CakePHP bake script # -# CakePHP(tm) : Rapid Development Framework (http://cakephp.org) -# Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) +# CakePHP(tm) : Rapid Development Framework (https://cakephp.org) +# Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) # # Licensed under The MIT License # For full copyright and license information, please see the LICENSE.txt # Redistributions of files must retain the above copyright notice. # -# @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) -# @link http://cakephp.org CakePHP(tm) Project +# @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) +# @link https://cakephp.org CakePHP(tm) Project # @package app.Console # @since CakePHP(tm) v 1.2.0.5012 -# @license http://www.opensource.org/licenses/mit-license.php MIT License +# @license https://opensource.org/licenses/mit-license.php MIT License # ################################################################################ diff --git a/web/api/lib/Cake/Console/Templates/skel/Console/cake.bat b/web/api/lib/Cake/Console/Templates/skel/Console/cake.bat index 0aa43c024..31bde01b1 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Console/cake.bat +++ b/web/api/lib/Cake/Console/Templates/skel/Console/cake.bat @@ -1,30 +1,30 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -:: -:: Bake is a shell script for running CakePHP bake script -:: -:: CakePHP(tm) : Rapid Development Framework (http://cakephp.org) -:: Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) -:: -:: Licensed under The MIT License -:: Redistributions of files must retain the above copyright notice. -:: -:: @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) -:: @link http://cakephp.org CakePHP(tm) Project -:: @package app.Console -:: @since CakePHP(tm) v 2.0 -:: -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: - -:: In order for this script to work as intended, the cake\console\ folder must be in your PATH - -@echo. -@echo off - -SET app=%0 -SET lib=%~dp0 - -php -q "%lib%cake.php" -working "%CD% " %* - -echo. - -exit /B %ERRORLEVEL% +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +:: +:: Bake is a shell script for running CakePHP bake script +:: +:: CakePHP(tm) : Rapid Development Framework (https://cakephp.org) +:: Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) +:: +:: Licensed under The MIT License +:: Redistributions of files must retain the above copyright notice. +:: +:: @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) +:: @link https://cakephp.org CakePHP(tm) Project +:: @package app.Console +:: @since CakePHP(tm) v 2.0 +:: +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + +:: In order for this script to work as intended, the cake\console\ folder must be in your PATH + +@echo. +@echo off + +SET app=%0 +SET lib=%~dp0 + +php -q "%lib%cake.php" -working "%CD% " %* + +echo. + +exit /B %ERRORLEVEL% diff --git a/web/api/lib/Cake/Console/Templates/skel/Console/cake.php b/web/api/lib/Cake/Console/Templates/skel/Console/cake.php index f5b262a2a..280613a27 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Console/cake.php +++ b/web/api/lib/Cake/Console/Templates/skel/Console/cake.php @@ -3,15 +3,15 @@ /** * Command-line code generation utility to automate programmer chores. * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package app.Console * @since CakePHP(tm) v 2.0 */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Controller/AppController.php b/web/api/lib/Cake/Console/Templates/skel/Controller/AppController.php index db4b9e2c3..4e927f693 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Controller/AppController.php +++ b/web/api/lib/Cake/Console/Templates/skel/Controller/AppController.php @@ -5,7 +5,7 @@ * This file is application-wide controller file. You can put all * application-wide controller-related methods here. * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Controller * @since CakePHP(tm) v 0.2.9 */ @@ -19,7 +19,7 @@ App::uses('Controller', 'Controller'); * will inherit them. * * @package app.Controller - * @link http://book.cakephp.org/2.0/en/controllers.html#the-app-controller + * @link https://book.cakephp.org/2.0/en/controllers.html#the-app-controller */ class AppController extends Controller { } diff --git a/web/api/lib/Cake/Console/Templates/skel/Controller/PagesController.php b/web/api/lib/Cake/Console/Templates/skel/Controller/PagesController.php index eb023a573..75df741de 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Controller/PagesController.php +++ b/web/api/lib/Cake/Console/Templates/skel/Controller/PagesController.php @@ -4,7 +4,7 @@ * * This file will render views from views/pages/ * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Controller * @since CakePHP(tm) v 0.2.9 */ @@ -17,7 +17,7 @@ App::uses('AppController', 'Controller'); * Override this controller by placing a copy in controllers directory of an application * * @package app.Controller - * @link http://book.cakephp.org/2.0/en/controllers/pages-controller.html + * @link https://book.cakephp.org/2.0/en/controllers/pages-controller.html */ class PagesController extends AppController { @@ -32,6 +32,7 @@ class PagesController extends AppController { * Displays a view * * @return void + * @throws ForbiddenException When a directory traversal attempt. * @throws NotFoundException When the view file could not be found * or MissingViewException in debug mode. */ @@ -42,6 +43,9 @@ class PagesController extends AppController { if (!$count) { return $this->redirect('/'); } + if (in_array('..', $path, true) || in_array('.', $path, true)) { + throw new ForbiddenException(); + } $page = $subpage = $title_for_layout = null; if (!empty($path[0])) { diff --git a/web/api/lib/Cake/Console/Templates/skel/Model/AppModel.php b/web/api/lib/Cake/Console/Templates/skel/Model/AppModel.php index eef715013..cc5ca8fb5 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Model/AppModel.php +++ b/web/api/lib/Cake/Console/Templates/skel/Model/AppModel.php @@ -5,7 +5,7 @@ * This file is application-wide model file. You can put all * application-wide model-related methods here. * - * @link http://cakephp.org CakePHP(tm) Project + * @link https://cakephp.org CakePHP(tm) Project * @package app.Model * @since CakePHP(tm) v 0.2.9 */ diff --git a/web/api/lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php b/web/api/lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php index 9929fa582..98b803cc1 100644 --- a/web/api/lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php +++ b/web/api/lib/Cake/Console/Templates/skel/Test/Case/AllTestsTest.php @@ -2,18 +2,18 @@ /** * AllTests file * - * CakePHP(tm) : Rapid Development Framework (http://cakephp.org) - * Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) + * CakePHP(tm) : Rapid Development Framework (https://cakephp.org) + * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) * * Licensed under The MIT License * For full copyright and license information, please see the LICENSE.txt * Redistributions of files must retain the above copyright notice. * - * @copyright Copyright (c) Cake Software Foundation, Inc. (http://cakefoundation.org) - * @link http://cakephp.org CakePHP(tm) Project + * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org) + * @link https://cakephp.org CakePHP(tm) Project * @package app.Test.Case * @since CakePHP(tm) v 2.5 - * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @license https://opensource.org/licenses/mit-license.php MIT License */ class AllTestsTest extends CakeTestSuite { diff --git a/web/api/lib/Cake/Console/Templates/skel/View/Elements/empty b/web/api/lib/Cake/Console/Templates/skel/View/Elements/empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/web/api/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp b/web/api/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp index a1333dc19..f4dd9e6ae 100644 --- a/web/api/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp +++ b/web/api/lib/Cake/Console/Templates/skel/View/Emails/html/default.ctp @@ -1,17 +1,17 @@ \ No newline at end of file diff --git a/web/api/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp b/web/api/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp index 6c84d88fa..ff6730d08 100644 --- a/web/api/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp +++ b/web/api/lib/Cake/Console/Templates/skel/View/Errors/error400.ctp @@ -1,6 +1,6 @@ fetch('content'); ?> -

This email was sent using the CakePHP Framework

+

This email was sent using the CakePHP Framework

\ No newline at end of file diff --git a/web/api/lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp b/web/api/lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp index 539615895..82a1e195b 100644 --- a/web/api/lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp +++ b/web/api/lib/Cake/Console/Templates/skel/View/Layouts/Emails/text/default.ctp @@ -1,19 +1,19 @@ fetch('content'); ?> -This email was sent using the CakePHP Framework, http://cakephp.org. +This email was sent using the CakePHP Framework, https://cakephp.org. diff --git a/web/api/lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp b/web/api/lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp index f2338e66e..950d4d9e7 100644 --- a/web/api/lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp +++ b/web/api/lib/Cake/Console/Templates/skel/View/Layouts/ajax.ctp @@ -1,6 +1,6 @@
@@ -39,7 +39,7 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework