Install/Update on Ubuntu 20.04 LTS (Focal Fossa)

Hello folks,

I wonder how I can install/update bluecherry on Ubuntu 20.04 LTS (Focal Fossa). I it had running prior 18.04 LTS (Bionic Beaver) but in the context to make the database work again, I had to deinstall bluecherry.

Now the database works, but I can’t install bluecherry. If I add the repository I get the message it missed these libraries:
bluecherry : Depends: libmysqlclient20 (>= 5.7.11) but it is not installable
Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable
I have those libraries installed, but in more later version. Furthermore it looks the installer wants php5, which is not avaiable any more in Ubuntu 20.04.

Any ideas how to install?

As there is no prebuild install candidate for ubuntu 20.04 I thought I just build the software from source.

I checked out with git and found out I need OpenCV. So I searched and found a manual to install 3.4.4 on Ubuntu 18.04. Followed the guide and build 3.4.4. Sadly bluecherry won’t install with this error message:

/usr/bin/ld: bc-thread.o: in function cv::String::~String()': /usr/local/include/opencv2/core/cvstd.hpp:648: undefined reference to cv::String::deallocate()’
/usr/bin/ld: /usr/local/include/opencv2/core/cvstd.hpp:648: undefined reference to cv::String::deallocate()' /usr/bin/ld: bc-thread.o: in function cv::String::operator=(cv::String const&)’:
/usr/local/include/opencv2/core/cvstd.hpp:656: undefined reference to cv::String::deallocate()' /usr/bin/ld: motion_processor.o: in function motion_processor::match_ref_frame_opencv(cv::Mat&, cv::Mat&, double, int, int)’:
/usr/src/bluecherry-apps/server/motion_processor.cpp:295: undefined reference to `cv::findContours(cv::_InputOutputArray const&, cv::OutputArray const&, int, int, cv::Point)’
collect2: error: ld returned 1 exit status
make[2]: *** [BCMK:26: bc-server] Error 1
make[2]: Leaving directory ‘/usr/src/bluecherry-apps/server’
make[1]: *** [Makefile:20: server/all] Error 2
make[1]: Leaving directory ‘/usr/src/bluecherry-apps’
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:12: binary] Error 255

Damn! I checked out the latest version for OpenCV (4.3) with git, compiled and installed it. But bluecherry won’t use it as it get’s installed into /usr/local/include/opencv4 and bluecherry want’s opencv2. So renamed the old directory and linked the new to the old name. Then I got this error message:

In file included from bc-thread.cpp:32:
motion_processor.h:5:10: fatal error: opencv2/opencv.hpp: No such file or directory
5 | #include “opencv2/opencv.hpp”

So I got me the latest version for OpenCV in the 3.4 tree. That is 3.4.10 and the opencv_contrib. I build it, installed it and got then this error message:

In file included from /usr/local/include/opencv2/opencv2/core.hpp:3293,
from /usr/local/include/opencv2/opencv.hpp:52,
from motion_processor.h:5,
from bc-thread.cpp:32:
/usr/local/include/opencv2/core/utility.hpp: In instantiation of ‘T cv::CommandLineParser::get(int, bool) const [with T = cv::String]’:
/usr/local/include/opencv2/core/utility.hpp:1072:43: required from here
/usr/local/include/opencv2/core/utility.hpp:922:9: error: cannot convert ‘const cv::Param’ to ‘int’
922 | getByIndex(index, space_delete, ParamType::type, (void*)&val);
| ^~~~~~~~~~
/usr/local/include/opencv2/core/utility.hpp:961:55: note: initializing argument 3 of ‘void cv::CommandLineParser::getByIndex(int, bool, int, void*) const’
961 | void getByIndex(int index, bool space_delete, int type, void* dst) const;
| ^~
/usr/local/include/opencv2/core/utility.hpp: In instantiation of ‘T cv::CommandLineParser::get(const cv::String&, bool) const [with T = cv::String]’:
/usr/local/include/opencv2/core/utility.hpp:1076:42: required from here
/usr/local/include/opencv2/core/utility.hpp:890:9: error: cannot convert ‘const cv::Param’ to ‘int’
890 | getByName(name, space_delete, ParamType::type, (void*)&val);
| ^
~~~~~~
/usr/local/include/opencv2/core/utility.hpp:960:63: note: initializing argument 3 of ‘void cv::CommandLineParser::getByName(const cv::String&, bool, int, void*) const’
960 | void getByName(const String& name, bool space_delete, int type, void* dst) const;
| ~~^~
make[2]: *** [: bc-thread.o] Error 1
make[2]: Leaving directory ‘/usr/src/bluecherry-apps/server’
make[1]: *** [Makefile:20: server/all] Error 2
make[1]: Leaving directory ‘/usr/src/bluecherry-apps’
dh_auto_build: error: make -j1 returned exit code 2
make: *** [debian/rules:12: binary] Error 255

Bummer! Well, then I went a version down to bluecherry 3.01:

wget https://github.com/bluecherrydvr/bluecherry-apps/archive/v3.0.1.zip
mv v3.0.1.zip bluecherry-apps_v3.0.1.zip
unzip bluecherry-apps_v3.0.1.zip
cd bluecherry-apps-3.0.1/
scripts/build_pkg_native.sh

  • git submodule foreach --recursive ‘git clean -dxf && git reset --hard’
    fatal: not a git repository (or any of the parent directories): .git

And further down to 2.8.1:

wget https://github.com/bluecherrydvr/bluecherry-apps/archive/v2.8.1.zip
mv v2.8.1.zip bluecherry-apps_v2.8.1.zip
cd bluecherry-apps-2.8.1
scripts/build_pkg_native.sh

  • git submodule foreach --recursive ‘git clean -dxf && git reset --hard’
    fatal: not a git repository (or any of the parent directories): .git

Is there any documentation how to build bluecherry? I could not find anything.

I tried to install the unstable version, but hit depency problems too:

wget --no-check-certificate --output-document=/etc/apt/sources.list.d/bluecherry-bionic.list https://dl.bluecherrydvr.com/sources.list.d/bluecherry-bionic-unstable.list
apt-get update
apt-get upgrade
apt-get install bluecherry

bluecherry : Depends: libopencv-core3.2 but it is not installable
Depends: libopencv-imgproc3.2 but it is not installable

Maybe I can install those depencies as deb packages:

wget http://archive.ubuntu.com/ubuntu/pool/universe/o/opencv/libopencv-core3.2_3.2.0+dfsg-4build2_amd64.deb
dpkg -i libopencv-core3.2_3.2.0+dfsg-4build2_amd64.deb

wget http://archive.ubuntu.com/ubuntu/pool/universe/o/opencv/libopencv-imgproc3.2_3.2.0+dfsg-4build2_amd64.deb
dpkg -i libopencv-imgproc3.2_3.2.0+dfsg-4build2_amd64.deb

After that I could start install bluecherry with this command without depenency warnings:
apt-get install bluecherry

At the moment the install process is still running.

The install went through, but with errors. My system does not have php5 any more. Ubuntu 20.04 has only php 7.4 maybe that is a problem. I had to manually delete the both php5 setups in ‘enabled modules’ to start up my apache again.

Here is the complete output during installation procedure. Maybe this helps someone:

Reading package lists… Done
Building dependency tree
Reading state information… Done
The following additional packages will be installed:
libmysqlclient20 vainfo
Suggested packages:
mail-transport-agent
The following packages will be REMOVED:
libmysqlclient20:i386
The following NEW packages will be installed:
bluecherry libmysqlclient20 vainfo
0 upgraded, 3 newly installed, 1 to remove and 0 not upgraded.
Need to get 5,027 kB of archives.
After this operation, 17.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://de.archive.ubuntu.com/ubuntu focal/universe amd64 vainfo amd64 2.6.0+ds1-1 [13.2 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libmysqlclient20 amd64 5.7.30-0ubuntu0.16.04.1 [685 kB]
Get:3 http://unstable.bluecherrydvr.com bionic/main amd64 bluecherry amd64 3:3.0.1 [4,329 kB]
Fetched 5,027 kB in 2s (3,154 kB/s)
Preconfiguring packages …
E: Can not write log (Is /dev/pts mounted?) - posix_openpt (19: No such device)
(Reading database … 784627 files and directories currently installed.)
Removing libmysqlclient20:i386 (5.7.30-0ubuntu0.18.04.1) …
Selecting previously unselected package libmysqlclient20:amd64.
(Reading database … 784623 files and directories currently installed.)
Preparing to unpack …/libmysqlclient20_5.7.30-0ubuntu0.16.04.1_amd64.deb …
Unpacking libmysqlclient20:amd64 (5.7.30-0ubuntu0.16.04.1) …
Selecting previously unselected package vainfo.
Preparing to unpack …/vainfo_2.6.0+ds1-1_amd64.deb …
Unpacking vainfo (2.6.0+ds1-1) …
Selecting previously unselected package bluecherry.
Preparing to unpack …/bluecherry_3%3a3.0.1_amd64.deb …
groupadd: group ‘bluecherry’ already exists
Unpacking bluecherry (3:3.0.1) …
Setting up libmysqlclient20:amd64 (5.7.30-0ubuntu0.16.04.1) …
Setting up vainfo (2.6.0+ds1-1) …
Setting up bluecherry (3:3.0.1) …
++ for x in /etc/-release
++ [[ ! -d /etc/lsb-release ]]
++ source /etc/lsb-release
+++ DISTRIB_ID=Ubuntu
+++ DISTRIB_RELEASE=20.04
+++ DISTRIB_CODENAME=focal
+++ DISTRIB_DESCRIPTION=‘Ubuntu 20.04 LTS’
++ for x in /etc/
-release
++ [[ ! -d /etc/os-release ]]
++ source /etc/os-release
+++ NAME=Ubuntu
+++ VERSION=‘20.04 LTS (Focal Fossa)’
+++ ID=ubuntu
+++ ID_LIKE=debian
+++ PRETTY_NAME=‘Ubuntu 20.04 LTS’
+++ VERSION_ID=20.04
+++ HOME_URL=https://www.ubuntu.com/
+++ SUPPORT_URL=https://help.ubuntu.com/
+++ BUG_REPORT_URL=https://bugs.launchpad.net/ubuntu/
+++ PRIVACY_POLICY_URL=https://www.ubuntu.com/legal/terms-and-policies/privacy-policy
+++ VERSION_CODENAME=focal
+++ UBUNTU_CODENAME=focal
+++ cat /etc/os-release
+++ grep ‘^ID=’
+++ grep centos
++ [[ -n ‘’ ]]
++ IN_DEB=1
++ [[ -n 1 ]]
++ . /usr/share/debconf/confmodule
+++ ‘[’ ‘!’ ‘’ ‘]’
+++ PERL_DL_NONLAZY=1
+++ export PERL_DL_NONLAZY
+++ ‘[’ ‘’ ‘]’
+++ exec /usr/share/debconf/frontend /var/lib/dpkg/info/bluecherry.postinst configure 2:2.8.8
++ for x in /etc/-release
++ [[ ! -d /etc/lsb-release ]]
++ source /etc/lsb-release
+++ DISTRIB_ID=Ubuntu
+++ DISTRIB_RELEASE=20.04
+++ DISTRIB_CODENAME=focal
+++ DISTRIB_DESCRIPTION=‘Ubuntu 20.04 LTS’
++ for x in /etc/
-release
++ [[ ! -d /etc/os-release ]]
++ source /etc/os-release
+++ NAME=Ubuntu
+++ VERSION=‘20.04 LTS (Focal Fossa)’
+++ ID=ubuntu
+++ ID_LIKE=debian
+++ PRETTY_NAME=‘Ubuntu 20.04 LTS’
+++ VERSION_ID=20.04
+++ HOME_URL=https://www.ubuntu.com/
+++ SUPPORT_URL=https://help.ubuntu.com/
+++ BUG_REPORT_URL=https://bugs.launchpad.net/ubuntu/
+++ PRIVACY_POLICY_URL=https://www.ubuntu.com/legal/terms-and-policies/privacy-policy
+++ VERSION_CODENAME=focal
+++ UBUNTU_CODENAME=focal
+++ cat /etc/os-release
+++ grep ‘^ID=’
+++ grep centos
++ [[ -n ‘’ ]]
++ IN_DEB=1
++ [[ -n 1 ]]
++ . /usr/share/debconf/confmodule
+++ ‘[’ ‘!’ 1 ‘]’
+++ ‘[’ -z ‘’ ‘]’
+++ exec
+++ ‘[’ ‘’ ‘]’
+++ exec
+++ DEBCONF_REDIR=1
+++ export DEBCONF_REDIR
++ case “$1” in
++ [[ -n 1 ]]
++ ucfr bluecherry /etc/bluecherry.conf
++ echo -e ‘\n\n\tVerifying permissions of existing files, please wait\n\n’

    Verifying permissions of existing files, please wait

++ [[ -d /var/lib/bluecherry ]]
++ chown -R bluecherry:bluecherry /var/lib/bluecherry
++ chmod -R 770 /var/lib/bluecherry
++ [[ -n 1 ]]
++ chown -R bluecherry:bluecherry /var/run/bluecherry
++ chmod -R 750 /var/run/bluecherry
++ touch /var/log/bluecherry.log
++ id syslog
++ chown syslog:bluecherry /var/log/bluecherry.log
++ chmod 640 /var/log/bluecherry.log
+++ cat /etc/os-release
+++ grep ‘^ID=’
+++ grep debian
++ [[ -n ‘’ ]]
++ [[ -n 1 ]]
++ a2enmod ssl
Considering dependency setenvif for ssl:
Module setenvif already enabled
Considering dependency mime for ssl:
Module mime already enabled
Considering dependency socache_shmcb for ssl:
Module socache_shmcb already enabled
Module ssl already enabled
++ a2enmod rewrite
Module rewrite already enabled
++ [[ focal == \x\e\n\i\a\l ]]
++ [[ 20.04 LTS (Focal Fossa) == \9\ (\s\t\r\e\t\c\h) ]]
++ [[ focal == \b\i\o\n\i\c ]]
++ a2enmod php5
Enabling module php5.
To activate the new configuration, you need to run:
systemctl restart apache2
++ [[ -n 1 ]]
++ rm /etc/apache2/sites-enabled/bluecherry /etc/apache2/sites-available/bluecherry
rm: cannot remove ‘/etc/apache2/sites-enabled/bluecherry’: No such file or directory
rm: cannot remove ‘/etc/apache2/sites-available/bluecherry’: No such file or directory
++ true
++ a2ensite bluecherry.conf
Enabling site bluecherry.
To activate the new configuration, you need to run:
systemctl reload apache2
++ [[ -n 1 ]]
++ rm /etc/php5/conf.d/bluecherry.ini
rm: cannot remove ‘/etc/php5/conf.d/bluecherry.ini’: No such file or directory
++ true
+++ which service
++ ‘[’ ‘!’ -z /usr/sbin/service ‘]’
++ service rsyslog restart
++ stop_apache
++ [[ -n 1 ]]
+++ which service
++ ‘[’ ‘!’ -z /usr/sbin/service ‘]’
++ service apache2 stop
++ ‘[’ ‘!’ -e /var/lib/.bcins ‘]’
++ ‘[’ -x /sbin/apparmor_parser ‘]’
++ :
++ [[ -s /etc/bluecherry.conf ]]
++ . /usr/share/bluecherry/load_db_creds.sh
++++ sed ‘/(userhost|host|dbname|user|password)/!d;s/ *= */=/;s/"/’’’/g’ /etc/bluecherry.conf
+++ eval ‘dbname=’’‘bluecherry’’’;’ ‘user=’’‘bluecherry’’’;’ ‘password=’’‘SecretPassword’’’;’ ‘host=’’‘localhost’’’;’ ‘#’ You can set host/port as well, or specify a socket but we use
++++ dbname=bluecherry
++++ user=bluecherry
++++ password=SecretPassword
++++ host=localhost
+++ host=localhost
++ echo exit
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
+++ mktemp /var/lib/bluecherry/bc_db_backup.XXXXXXXXXX.sql.gz
++ DB_BACKUP_GZ_FILE=/var/lib/bluecherry/bc_db_backup.6dZBDRkzR1.sql.gz
++ echo ‘Going to updgrade Bluecherry DB. Taking a backup into /var/lib/bluecherry/bc_db_backup.6dZBDRkzR1.sql.gz just in case’
Going to updgrade Bluecherry DB. Taking a backup into /var/lib/bluecherry/bc_db_backup.6dZBDRkzR1.sql.gz just in case
++ mysqldump -h localhost bluecherry -ubluecherry -pSecretPassword
++ gzip -c
mysqldump: [Warning] Using a password on the command line interface can be insecure.
++ /usr/share/bluecherry/bc_db_tool.sh upgrade_db bluecherry bluecherry SecretPassword localhost
++ cat /etc/os-release
++ grep ‘^ID=’
++ grep centos

  • [[ -n ‘’ ]]
  • IN_DEB=1
  • MODE=upgrade_db
  • case “$MODE” in
  • [[ 5 -lt 4 ]]
  • upgrade_db bluecherry bluecherry SecretPassword localhost
  • echo upgrade_db bluecherry bluecherry SecretPassword localhost
    upgrade_db bluecherry bluecherry SecretPassword localhost
  • dbname=bluecherry
  • user=bluecherry
  • password=SecretPassword
  • host=localhost
  • trap db_upgrade_err ERR
  • check_mysql_connect bluecherry bluecherry SecretPassword localhost
  • dbname=bluecherry
  • user=bluecherry
  • password=SecretPassword
  • host=localhost
  • mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
  • echo exit
    mysql: [Warning] Using a password on the command line interface can be insecure.
    ++ echo ‘SELECT value from GlobalSettings WHERE parameter = ‘’‘G_DB_VERSION’’’’
    ++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
    ++ tail -n 1
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • DB_VERSION=2080800
    ++ cat /usr/share/bluecherry/installed_db_version
  • PACKAGE_DB_VERSION=3000003
  • [[ 2080800 != \3\0\0\0\0\0\3 ]]
  • echo package db version in base ‘“2080800”’ ‘!=’ ‘“3000003”’ ‘(in packege db version)’
    package db version in base “2080800” != “3000003” (in packege db version)
  • echo Upgradeing Database…
    Upgradeing Database…
  • [[ 2080800 == ‘’ ]]
  • apply_db_patches
  • pushd /usr/share/bluecherry/mysql-upgrade
    /usr/share/bluecherry/mysql-upgrade /
  • export dbname user password host
    ++ ls
    ++ sort -n
  • for x in ls | sort -n
  • [[ 2020300 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2020400 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2020500 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2020600 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2020700 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2020800 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2020900 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2050300 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2051800 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2070200 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2070700 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2080600 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 2080800 -gt 2080800 ]]
  • for x in ls | sort -n
  • [[ 3000000 -gt 2080800 ]]
  • pushd 3000000
    /usr/share/bluecherry/mysql-upgrade/3000000 /usr/share/bluecherry/mysql-upgrade /
  • for y in *.sh
  • ./add_change_password_column_to_Users.sh
    mysql: [Warning] Using a password on the command line interface can be insecure.
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • popd
    /usr/share/bluecherry/mysql-upgrade /
  • DB_VERSION=3000000
  • for x in ls | sort -n
  • [[ 3000001 -gt 3000000 ]]
  • pushd 3000001
    /usr/share/bluecherry/mysql-upgrade/3000001 /usr/share/bluecherry/mysql-upgrade /
  • for y in *.sh
  • ./add_reencode_column_to_Devices.sh
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • popd
    /usr/share/bluecherry/mysql-upgrade /
  • DB_VERSION=3000001
  • for x in ls | sort -n
  • [[ 3000002 -gt 3000001 ]]
  • pushd 3000002
    /usr/share/bluecherry/mysql-upgrade/3000002 /usr/share/bluecherry/mysql-upgrade /
  • for y in *.sh
  • ./make_device_id_fk_cascade.sh
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • popd
    /usr/share/bluecherry/mysql-upgrade /
  • DB_VERSION=3000002
  • for x in ls | sort -n
  • [[ 3000003 -gt 3000002 ]]
  • pushd 3000003
    /usr/share/bluecherry/mysql-upgrade/3000003 /usr/share/bluecherry/mysql-upgrade /
  • for y in *.sh
  • ./add_substream_columns_to_Devices.sh
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • popd
    /usr/share/bluecherry/mysql-upgrade /
  • DB_VERSION=3000003
  • popd
    /
    ++ cat /usr/share/bluecherry/installed_db_version
  • [[ 3000003 != \3\0\0\0\0\0\3 ]]
  • echo ‘UPDATE GlobalSettings SET value=’’‘3000003’’’ WHERE parameter = ‘’‘G_DB_VERSION’’’’
  • mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
    mysql: [Warning] Using a password on the command line interface can be insecure.
    ++ cat /usr/share/bluecherry/installed_db_version
  • [[ 3000003 != \3\0\0\0\0\0\3 ]]
  • echo ‘DELETE FROM GlobalSettings WHERE parameter = ‘’‘G_DB_VERSION’’’’
  • mysql -h localhost -ubluecherry -pSecretPassword -Dbluecherry
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • echo ‘INSERT INTO GlobalSettings (parameter, value) VALUES (’’‘G_DB_VERSION’’’, ‘’‘3000003’’’)’
  • mysql -h localhost -ubluecherry -pSecretPassword -Dbluecherry
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • fix_motion_maps bluecherry bluecherry SecretPassword localhost
  • dbname=bluecherry
  • user=bluecherry
  • password=SecretPassword
  • host=localhost
  • echo ‘Fixing motion maps…’
    Fixing motion maps…
  • mysql -h localhost -ubluecherry -pSecretPassword -Dbluecherry
  • echo ‘update Devices set motion_map = repeat(’’‘3’’’, 768) where protocol like ‘’‘IP%’’’ and length(motion_map) <> 768;’
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • mysql -h localhost -ubluecherry -pSecretPassword -Dbluecherry
  • echo ‘update Devices set motion_map = repeat(’’‘3’’’, 192) where driver = ‘’‘tw5864’’’ and length(motion_map) <> 192;’
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • echo ‘update Devices set motion_map = repeat(’’‘3’’’, 396) where driver like ‘’‘solo6%’’’ and length(motion_map) <> 396;’
  • mysql -h localhost -ubluecherry -pSecretPassword -Dbluecherry
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • echo ‘update Devices set motion_map = repeat(’’‘3’’’, 330) where driver like ‘’‘solo6%’’’ and length(motion_map) <> 330;’
  • mysql -h localhost -ubluecherry -pSecretPassword -Dbluecherry
    mysql: [Warning] Using a password on the command line interface can be insecure.
  • exit 0
    ++ /usr/share/bluecherry/compare.sh
    mysqldump: [Warning] Using a password on the command line interface can be insecure.
    — /dev/fd/63 2020-05-07 23:37:08.303313375 +0200
    +++ /dev/fd/62 2020-05-07 23:37:08.303313375 +0200
    @@ -2,7 +2,7 @@
    /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT /;
    /
    !40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS /;
    /
    !40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION /;
    -/
    !40101 SET NAMES utf8 /;
    +/
    !50503 SET NAMES utf8mb4 /;
    /
    !40103 SET @OLD_TIME_ZONE=@@TIME_ZONE /;
    /
    !40103 SET TIME_ZONE=’+00:00’ /;
    /
    !40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 /;
    @@ -11,20 +11,20 @@
    /
    !40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 /;
    DROP TABLE IF EXISTS ActiveUsers;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE ActiveUsers (
  • id int(11) DEFAULT NULL,
  • id int DEFAULT NULL,
    ip varchar(64) DEFAULT NULL,
    from_client tinyint(1) DEFAULT NULL,
  • time int(11) DEFAULT NULL,
  • time int DEFAULT NULL,
    kick tinyint(1) DEFAULT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS AvailableSources;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE AvailableSources (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • id int NOT NULL AUTO_INCREMENT,
    device varchar(255) DEFAULT NULL,
    driver varchar(255) DEFAULT NULL,
    card_id varchar(255) NOT NULL,
    @@ -35,9 +35,9 @@
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS Devices;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE Devices (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • id int NOT NULL AUTO_INCREMENT,
    device_name varchar(100) DEFAULT NULL,
    protocol varchar(50) DEFAULT NULL,
    device varbinary(256) DEFAULT NULL,
    @@ -46,40 +46,40 @@
    rtsp_password varbinary(256) DEFAULT NULL,
    rtsp_rtp_prefer_tcp tinyint(1) NOT NULL DEFAULT ‘1’,
    mjpeg_path varbinary(256) DEFAULT NULL,
  • onvif_port mediumint(5) DEFAULT ‘80’,
  • onvif_port mediumint DEFAULT ‘80’,
    ptz_control_path varbinary(256) DEFAULT NULL,
    ptz_control_protocol varchar(32) DEFAULT NULL,
    ptz_serial_values varchar(64) DEFAULT NULL,
  • resolutionX smallint(6) DEFAULT NULL,
  • resolutionY smallint(6) DEFAULT NULL,
  • resolutionX smallint DEFAULT NULL,
  • resolutionY smallint DEFAULT NULL,
    model varchar(30) DEFAULT NULL,
  • channel int(11) NOT NULL DEFAULT ‘0’,
  • channel int NOT NULL DEFAULT ‘0’,
    invert tinyint(1) NOT NULL DEFAULT ‘0’,
  • audio_volume smallint(6) DEFAULT ‘50’,
  • saturation smallint(6) DEFAULT ‘50’,
  • brightness smallint(6) DEFAULT ‘50’,
  • hue smallint(6) DEFAULT ‘50’,
  • contrast smallint(6) DEFAULT ‘50’,
  • video_quality smallint(6) DEFAULT ‘100’,
  • video_interval smallint(6) DEFAULT NULL,
  • audio_volume smallint DEFAULT ‘50’,
  • saturation smallint DEFAULT ‘50’,
  • brightness smallint DEFAULT ‘50’,
  • hue smallint DEFAULT ‘50’,
  • contrast smallint DEFAULT ‘50’,
  • video_quality smallint DEFAULT ‘100’,
  • video_interval smallint DEFAULT NULL,
    signal_type varchar(6) DEFAULT NULL,
  • buffer_prerecording smallint(6) DEFAULT ‘3’,
  • buffer_postrecording smallint(6) DEFAULT ‘3’,
  • buffer_prerecording smallint DEFAULT ‘3’,
  • buffer_postrecording smallint DEFAULT ‘3’,
    motion_map varchar(768) NOT NULL DEFAULT ‘333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333’,
    motion_algorithm tinyint(1) DEFAULT ‘1’,
    frame_downscale_factor decimal(4,3) DEFAULT ‘0.500’,
  • min_motion_area smallint(6) DEFAULT ‘5’,
  • motion_analysis_ssw_length int(11) DEFAULT ‘-1’,
  • motion_analysis_percentage int(11) DEFAULT ‘-1’,
  • min_motion_area smallint DEFAULT ‘5’,
  • motion_analysis_ssw_length int DEFAULT ‘-1’,
  • motion_analysis_percentage int DEFAULT ‘-1’,
    schedule varchar(168) NOT NULL DEFAULT ‘CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC’,
    schedule_override_global tinyint(1) DEFAULT ‘0’,
    disabled tinyint(1) DEFAULT ‘0’,
    audio_disabled tinyint(1) DEFAULT ‘1’,
  • debug_level tinyint(4) DEFAULT ‘0’,
  • debug_level tinyint DEFAULT ‘0’,
    reencode_livestream tinyint(1) DEFAULT ‘0’,
  • reencode_bitrate int(11) NOT NULL DEFAULT ‘64000’,
  • reencode_frame_width smallint(6) NOT NULL DEFAULT ‘352’,
  • reencode_frame_height smallint(6) NOT NULL DEFAULT ‘240’,
  • reencode_bitrate int NOT NULL DEFAULT ‘64000’,
  • reencode_frame_width smallint NOT NULL DEFAULT ‘352’,
  • reencode_frame_height smallint NOT NULL DEFAULT ‘240’,
    substream_mode tinyint(1) DEFAULT ‘0’,
    substream_path varchar(255) DEFAULT NULL,
    PRIMARY KEY (id),
    @@ -89,23 +89,23 @@
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS EventComments;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE EventComments (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • time int(11) NOT NULL,
  • event_id int(11) DEFAULT NULL,
  • user_id int(11) DEFAULT NULL,
  • id int NOT NULL AUTO_INCREMENT,
  • time int NOT NULL,
  • event_id int DEFAULT NULL,
  • user_id int DEFAULT NULL,
    comment varchar(160) DEFAULT NULL,
    PRIMARY KEY (id),
    KEY event_id (event_id),
    KEY user_id (user_id),
  • CONSTRAINT EventComments_ibfk_1 FOREIGN KEY (event_id) REFERENCES EventsCam (id) ON DELETE CASCADE,
  • CONSTRAINT EventComments_ibfk_2 FOREIGN KEY (user_id) REFERENCES Users (id)
  • CONSTRAINT EventComments_ibfk_1 FOREIGN KEY (event_id) REFERENCES EventsCam (id) ON DELETE CASCADE ON UPDATE RESTRICT,
  • CONSTRAINT EventComments_ibfk_2 FOREIGN KEY (user_id) REFERENCES Users (id) ON DELETE RESTRICT ON UPDATE RESTRICT
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS EventLevels;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 /;
    CREATE TABLE EventLevels (
    id varchar(10) NOT NULL,
    PRIMARY KEY (id)
    @@ -113,23 +113,23 @@
    /
    !40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS EventTags;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE EventTags (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • time int(11) NOT NULL,
  • event_id int(11) DEFAULT NULL,
  • id int NOT NULL AUTO_INCREMENT,
  • time int NOT NULL,
  • event_id int DEFAULT NULL,
    tag_id varchar(10) DEFAULT NULL,
  • user_id int(11) DEFAULT NULL,
  • user_id int DEFAULT NULL,
    PRIMARY KEY (id),
    KEY event_id (event_id),
    KEY user_id (user_id),
  • CONSTRAINT EventTags_ibfk_1 FOREIGN KEY (event_id) REFERENCES EventsCam (id) ON DELETE CASCADE,
  • CONSTRAINT EventTags_ibfk_2 FOREIGN KEY (user_id) REFERENCES Users (id)
  • CONSTRAINT EventTags_ibfk_1 FOREIGN KEY (event_id) REFERENCES EventsCam (id) ON DELETE CASCADE ON UPDATE RESTRICT,
  • CONSTRAINT EventTags_ibfk_2 FOREIGN KEY (user_id) REFERENCES Users (id) ON DELETE RESTRICT ON UPDATE RESTRICT
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS EventTypesCam;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 /;
    CREATE TABLE EventTypesCam (
    id varchar(255) NOT NULL,
    PRIMARY KEY (id)
    @@ -137,7 +137,7 @@
    /
    !40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS EventTypesSys;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 /;
    CREATE TABLE EventTypesSys (
    id varchar(255) NOT NULL,
    PRIMARY KEY (id)
    @@ -145,16 +145,16 @@
    /
    !40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS EventsCam;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE EventsCam (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • time int(11) NOT NULL,
  • id int NOT NULL AUTO_INCREMENT,
  • time int NOT NULL,
    level_id varchar(10) DEFAULT NULL,
  • device_id int(11) DEFAULT NULL,
  • device_id int DEFAULT NULL,
    type_id varchar(10) DEFAULT NULL,
  • length int(11) DEFAULT ‘0’,
  • length int DEFAULT ‘0’,
    archive tinyint(1) NOT NULL DEFAULT ‘0’,
  • media_id int(11) DEFAULT NULL,
  • media_id int DEFAULT NULL,
    details text,
    PRIMARY KEY (id),
    KEY media_id (media_id),
    @@ -162,18 +162,18 @@
    KEY device_id (device_id),
    KEY type_id (type_id),
    KEY time_index (time) USING BTREE,
  • CONSTRAINT EventsCam_ibfk_1 FOREIGN KEY (media_id) REFERENCES Media (id) ON DELETE CASCADE,
  • CONSTRAINT EventsCam_ibfk_2 FOREIGN KEY (level_id) REFERENCES EventLevels (id),
  • CONSTRAINT EventsCam_ibfk_1 FOREIGN KEY (media_id) REFERENCES Media (id) ON DELETE CASCADE ON UPDATE RESTRICT,
  • CONSTRAINT EventsCam_ibfk_2 FOREIGN KEY (level_id) REFERENCES EventLevels (id) ON DELETE RESTRICT ON UPDATE RESTRICT,
    CONSTRAINT EventsCam_ibfk_3 FOREIGN KEY (device_id) REFERENCES Devices (id) ON UPDATE CASCADE,
  • CONSTRAINT EventsCam_ibfk_4 FOREIGN KEY (type_id) REFERENCES EventTypesCam (id)
  • CONSTRAINT EventsCam_ibfk_4 FOREIGN KEY (type_id) REFERENCES EventTypesCam (id) ON DELETE RESTRICT ON UPDATE RESTRICT
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS EventsSystem;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE EventsSystem (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • time int(11) NOT NULL,
  • id int NOT NULL AUTO_INCREMENT,
  • time int NOT NULL,
    level_id varchar(10) DEFAULT NULL,
    type_id varchar(10) DEFAULT NULL,
    more varchar(64) DEFAULT NULL,
    @@ -181,13 +181,13 @@
    PRIMARY KEY (id),
    KEY level_id (level_id),
    KEY type_id (type_id),
  • CONSTRAINT EventsSystem_ibfk_1 FOREIGN KEY (level_id) REFERENCES EventLevels (id),
  • CONSTRAINT EventsSystem_ibfk_2 FOREIGN KEY (type_id) REFERENCES EventTypesSys (id)
  • CONSTRAINT EventsSystem_ibfk_1 FOREIGN KEY (level_id) REFERENCES EventLevels (id) ON DELETE RESTRICT ON UPDATE RESTRICT,
  • CONSTRAINT EventsSystem_ibfk_2 FOREIGN KEY (type_id) REFERENCES EventTypesSys (id) ON DELETE RESTRICT ON UPDATE RESTRICT
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS GlobalSettings;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 /;
    CREATE TABLE GlobalSettings (
    parameter varchar(60) NOT NULL,
    value varchar(255) DEFAULT NULL,
    @@ -196,23 +196,23 @@
    /
    !40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS Licenses;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE Licenses (
    license varchar(64) NOT NULL,
    authorization varchar(64) NOT NULL,
  • added int(11) NOT NULL,
  • added int NOT NULL,
    PRIMARY KEY (license)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS Media;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE Media (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • start int(11) NOT NULL,
  • end int(11) NOT NULL DEFAULT ‘0’,
  • size int(11) DEFAULT NULL,
  • device_id int(11) NOT NULL,
  • id int NOT NULL AUTO_INCREMENT,
  • start int NOT NULL,
  • end int NOT NULL DEFAULT ‘0’,
  • size int DEFAULT NULL,
  • device_id int NOT NULL,
    filepath varchar(1024) NOT NULL,
    archive tinyint(1) NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (id),
    @@ -222,11 +222,11 @@
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS PTZPresets;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE PTZPresets (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • device_id int(11) NOT NULL,
  • preset_id int(11) NOT NULL,
  • id int NOT NULL AUTO_INCREMENT,
  • device_id int NOT NULL,
  • preset_id int NOT NULL,
    preset_name varchar(64) DEFAULT NULL,
    PRIMARY KEY (id),
    UNIQUE KEY device_id_2 (device_id,preset_id),
    @@ -236,9 +236,9 @@
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS RtspAuthTokens;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE RtspAuthTokens (
  • user_id int(11) NOT NULL,
  • user_id int NOT NULL,
    token varchar(100) NOT NULL,
    date timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
    UNIQUE KEY uniq_session (user_id,token)
    @@ -246,18 +246,18 @@
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS ServerStatus;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE ServerStatus (
  • pid int(11) NOT NULL,
  • timestamp int(11) NOT NULL,
  • pid int NOT NULL,
  • timestamp int NOT NULL,
    message text
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS Storage;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE Storage (
  • priority int(11) NOT NULL,
  • priority int NOT NULL,
    path varchar(255) NOT NULL,
    max_thresh decimal(5,2) NOT NULL,
    min_thresh decimal(5,2) NOT NULL,
    @@ -267,18 +267,18 @@
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS TagNames;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE TagNames (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • id int NOT NULL AUTO_INCREMENT,
    name varchar(255) DEFAULT NULL,
    PRIMARY KEY (id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS Users;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE Users (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • id int NOT NULL AUTO_INCREMENT,
    username varchar(40) DEFAULT NULL,
    password varchar(64) DEFAULT NULL,
    salt char(4) DEFAULT NULL,
    @@ -300,9 +300,9 @@
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS ipPtzCommandPresets;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE ipPtzCommandPresets (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • id int NOT NULL AUTO_INCREMENT,
    name varchar(128) NOT NULL,
    driver varchar(12) DEFAULT ‘’,
    mright varchar(128) NOT NULL,
    @@ -331,35 +331,35 @@
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS notificationSchedules;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE notificationSchedules (
  • id mediumint(9) NOT NULL AUTO_INCREMENT,
  • id mediumint NOT NULL AUTO_INCREMENT,
    day varchar(7) NOT NULL,
  • s_hr tinyint(4) NOT NULL,
  • s_min tinyint(4) NOT NULL,
  • e_hr tinyint(4) NOT NULL,
  • e_min tinyint(4) NOT NULL,
  • s_hr tinyint NOT NULL,
  • s_min tinyint NOT NULL,
  • e_hr tinyint NOT NULL,
  • e_min tinyint NOT NULL,
    cameras varchar(255) NOT NULL,
    users varchar(255) NOT NULL,
  • nlimit mediumint(8) unsigned NOT NULL DEFAULT ‘0’,
  • nlimit mediumint unsigned NOT NULL DEFAULT ‘0’,
    disabled tinyint(1) NOT NULL DEFAULT ‘0’,
    PRIMARY KEY (id)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS notificationsSent;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE notificationsSent (
  • rule_id smallint(5) unsigned NOT NULL,
  • time int(11) NOT NULL
  • rule_id smallint unsigned NOT NULL,
  • time int NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    /*!40101 SET character_set_client = @saved_cs_client /;
    DROP TABLE IF EXISTS userLayouts;
    /
    !40101 SET @saved_cs_client = @@character_set_client /;
    -/
    !40101 SET character_set_client = utf8 /;
    +/
    !50503 SET character_set_client = utf8mb4 */;
    CREATE TABLE userLayouts (
  • id int(11) NOT NULL AUTO_INCREMENT,
  • user_id int(11) DEFAULT NULL,
  • id int NOT NULL AUTO_INCREMENT,
  • user_id int DEFAULT NULL,
    layout_name varchar(50) DEFAULT NULL,
    layout varchar(255) DEFAULT NULL,
    PRIMARY KEY (id)
    Database doesn’t match reference schema
    ++ echo ‘Loaded database scheme missmatch. Please load it manualy or restore from backup’
    Loaded database scheme missmatch. Please load it manualy or restore from backup
    ++ [[ -s /var/lib/bluecherry/bc_db_backup.6dZBDRkzR1.sql.gz ]]
    ++ restore_mysql_backup bluecherry bluecherry SecretPassword localhost
    ++ dbname=bluecherry
    ++ user=bluecherry
    ++ password=SecretPassword
    ++ host=localhost
    ++ echo -e ‘An error occurred while migrating your database to the latest version. Please contact Bluecherry support here: support@bluecherrydvr.com . Provide full uncut output from console (the above text).\n\nATTENTION! The above log contains your MySQL logins and passwords, please do not post these logs on public forums.\n’
    An error occurred while migrating your database to the latest version. Please contact Bluecherry support here: support@bluecherrydvr.com . Provide full uncut output from console (the above text).

ATTENTION! The above log contains your MySQL logins and passwords, please do not post these logs on public forums.

++ [[ -s /var/lib/bluecherry/bc_db_backup.6dZBDRkzR1.sql.gz ]]
++ echo ‘Restoring DB from previously taken backup in /var/lib/bluecherry/bc_db_backup.6dZBDRkzR1.sql.gz’
Restoring DB from previously taken backup in /var/lib/bluecherry/bc_db_backup.6dZBDRkzR1.sql.gz
+++ echo ‘show tables’
+++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
+++ tail -n +2
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE ActiveUsers’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE AvailableSources’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE Devices’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE EventComments’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE EventLevels’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE EventTags’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE EventTypesCam’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE EventTypesSys’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE EventsCam’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE EventsSystem’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE GlobalSettings’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE Licenses’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE Media’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE PTZPresets’
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE RtspAuthTokens’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE ServerStatus’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE Storage’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE TagNames’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE Users’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE ipPtzCommandPresets’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE notificationSchedules’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE notificationsSent’
mysql: [Warning] Using a password on the command line interface can be insecure.
++ for x in echo "show tables" | mysql -h "$host" -D"$dbname" -u"$user" -p"$password"| tail -n +2
++ echo ‘SET FOREIGN_KEY_CHECKS=0; DROP TABLE userLayouts’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ echo ‘SET FOREIGN_KEY_CHECKS=1’
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
mysql: [Warning] Using a password on the command line interface can be insecure.
++ mysql -h localhost -Dbluecherry -ubluecherry -pSecretPassword
++ gunzip -c /var/lib/bluecherry/bc_db_backup.6dZBDRkzR1.sql.gz
mysql: [Warning] Using a password on the command line interface can be insecure.
++ exit 1
dpkg: error processing package bluecherry (–configure):
installed bluecherry package post-installation script subprocess returned error exit status 1
Processing triggers for rsyslog (8.2001.0-1ubuntu1) …
Processing triggers for systemd (245.4-4ubuntu3) …
Processing triggers for man-db (2.9.1-1) …
Processing triggers for ureadahead (0.100.0-21) …
Processing triggers for libc-bin (2.31-0ubuntu9) …
Errors were encountered while processing:
bluecherry
Error: Timeout was reached
E: Sub-process /usr/bin/dpkg returned an error code (1)

The unstable version had a dependency for openCV 3.2. That brought me to the idea, to build the 3.2 version. Sadly the compile process had errors. I fixed an error in the cmakes files, but there were two more.

wget https://github.com/opencv/opencv/archive/3.2.0.zip
mv 3.2.0.zip opencv_3.2.0.zip

wget https://github.com/opencv/opencv_contrib/archive/3.2.0.zip
mv 3.2.0.zip opencv_contrib_3.2.0.zip

unzip opencv_contrib_3.2.0.zip
unzip opencv_3.2.0.zip

mkdir opencv_build_directory-3.2.0

opencv-3.2.0
opencv_contrib-3.2.0

cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D WITH_CUDA=OFF
-D INSTALL_PYTHON_EXAMPLES=ON
-DOPENCV_EXTRA_MODULES_PATH=/usr/src/opencv_contrib-3.2.0/modules
-D OPENCV_ENABLE_NONFREE=ON
-D BUILD_EXAMPLES=ON
-S /usr/src/opencv-3.2.0
-B /usr/src/opencv_build_directory-3.2.0

I got this error:

CMake Error at cmake/OpenCVCompilerOptions.cmake:21 (else):
A duplicate ELSE command was found inside an IF block.
Call Stack (most recent call first):
CMakeLists.txt:495 (include)

And corrected it:

Old version:
[…]
else()
message(STATUS “Unable to compile program with enabled ccache, reverting…”)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE “${__OLD_RULE_LAUNCH_COMPILE}”)
endif()
else()
message(STATUS “Looking for ccache - not found”)
endif()
endif()
endif()

Corrected if statement:
[…]
else()
message(STATUS “Unable to compile program with enabled ccache, reverting…”)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE “${__OLD_RULE_LAUNCH_COMPILE}”)
endif()
endif()
else()
message(STATUS “Looking for ccache - not found”)
endif()
endif()

Compile with:
make -j5

And I got this:
make[2]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:154: modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_ffmpeg.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:5041: modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Try to make it build without ffmpeg:
cmake -D CMAKE_BUILD_TYPE=RELEASE
-D CMAKE_INSTALL_PREFIX=/usr/local
-D WITH_CUDA=OFF
-D INSTALL_PYTHON_EXAMPLES=ON
-DOPENCV_EXTRA_MODULES_PATH=/usr/src/opencv_contrib-3.2.0/modules
-D OPENCV_ENABLE_NONFREE=ON
-D BUILD_EXAMPLES=ON
-D WITH_FFMPEG=OFF
-S /usr/src/opencv-3.2.0
-B /usr/src/opencv_build_directory-3.2.0

And got this error message:
collect2: error: ld returned 1 exit status
make[2]: *** [modules/core/CMakeFiles/opencv_perf_core.dir/build.make:529: bin/opencv_perf_core] Error 1
make[1]: *** [CMakeFiles/Makefile2:3713: modules/core/CMakeFiles/opencv_perf_core.dir/all] Error 2
make: *** [Makefile:163: all] Error 2