summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD22
-rw-r--r--zoneminder-httpd.conf4
-rw-r--r--zoneminder-nginx.conf5
-rw-r--r--zoneminder-php.ini1
-rw-r--r--zoneminder.install79
6 files changed, 75 insertions, 50 deletions
diff --git a/.SRCINFO b/.SRCINFO
index aa096ebd651b..829dcccdc1d4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = zoneminder
pkgdesc = A full-featured, open source, state-of-the-art video surveillance software system
- pkgver = 1.32.2
- pkgrel = 3
+ pkgver = 1.32.3
+ pkgrel = 1
url = https://zoneminder.com/
install = zoneminder.install
arch = x86_64
@@ -49,7 +49,7 @@ pkgbase = zoneminder
conflicts = zoneminder-git
backup = etc/nginx/sites-available/zoneminder.conf
backup = etc/httpd/conf/extra/zoneminder.conf
- source = https://github.com/ZoneMinder/ZoneMinder/archive/1.32.2.tar.gz
+ source = https://github.com/ZoneMinder/ZoneMinder/archive/1.32.3.tar.gz
source = https://github.com/FriendsOfCake/crud/archive/v3.2.0.tar.gz
source = https://github.com/ZoneMinder/CakePHP-Enum-Behavior/archive/1.0-zm.tar.gz
source = zoneminder-nginx.conf
@@ -58,12 +58,12 @@ pkgbase = zoneminder
source = zoneminder.service
source = zoneminder-tmpfile.conf
source = fcgiwrap-multiwatch.service
- sha256sums = cf72cbd45d91ef0232c123dac5f908993f8941a62b9ae96975c4e6043bd4b9a9
+ sha256sums = 9a7e61c529a6269ff0344403369b160b8c8da48615c4172377c465da0b0074b1
sha256sums = 55be29e1eccb44d4ad0db8b23c37cec50f5341f8e498583d472ed1f0493876e3
sha256sums = dbd231e97b950c698f0f501d6a53c7291c9985e766b09e3afe00cfe69a969f44
- sha256sums = b9d5694e12db2d79701769cb93a178e99d1a4c52c1c98ecdc7edaf8ede4b6820
- sha256sums = 1944e27db3b17edac152209b2b35e914ed9700a2ffe0255b012661197a328178
- sha256sums = 7905ceddbb049de0f9bf4f1eb58779dfe310a65c4d2ec44854d592d4f31b6a72
+ sha256sums = be503e5cedf42383122a1f96a6e00e25d473f8c1c536c000db748dbde12c88b0
+ sha256sums = 9657fd9fdbdb4a96e3c31c9453610200258711f5ae2f6e46d3eeb9676ae857a6
+ sha256sums = 479f290d3c92938cd929020ad140d613814b912b4302c2758be6446ebfb8a4ac
sha256sums = 3e4de227e3154dffa887f2286c339ab3cf456f6d74a400b2786192b7e2b129c0
sha256sums = b69ac1deaaf3cf84b4ae4dbab794e1b062823de817f1e3a816ccf5438db440c0
sha256sums = e95f9bef77aef647dd633bd9ad75dc099b6d7184684e133f2f20702de83a6260
diff --git a/PKGBUILD b/PKGBUILD
index 38052ac3a4b5..a035ee88f5d3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -27,7 +27,7 @@
#######################################################################################################################
# #
-# If you're upgrading from v1.30.4 or earlier: #
+# If you're upgrading from a version older than 1.32.0: #
# #
# Due to the many breaking changes in this release (both upstream and in the packaging), it's recommended to backup #
# any existing ZoneMinder databases and perform a clean installation. Failure to do so may have very weird results. #
@@ -37,8 +37,8 @@
pkgname=zoneminder
-pkgver=1.32.2
-pkgrel=3
+pkgver=1.32.3
+pkgrel=1
pkgdesc='A full-featured, open source, state-of-the-art video surveillance software system'
arch=('x86_64')
url='https://zoneminder.com/'
@@ -76,15 +76,15 @@ source=("https://github.com/ZoneMinder/ZoneMinder/archive/$pkgver.tar.gz"
"zoneminder.service"
"zoneminder-tmpfile.conf"
"fcgiwrap-multiwatch.service")
-sha256sums=('cf72cbd45d91ef0232c123dac5f908993f8941a62b9ae96975c4e6043bd4b9a9'
+sha256sums=('9a7e61c529a6269ff0344403369b160b8c8da48615c4172377c465da0b0074b1'
'55be29e1eccb44d4ad0db8b23c37cec50f5341f8e498583d472ed1f0493876e3'
'dbd231e97b950c698f0f501d6a53c7291c9985e766b09e3afe00cfe69a969f44'
# zoneminder-nginx.conf
- 'b9d5694e12db2d79701769cb93a178e99d1a4c52c1c98ecdc7edaf8ede4b6820'
+ 'be503e5cedf42383122a1f96a6e00e25d473f8c1c536c000db748dbde12c88b0'
# zoneminder-httpd.conf
- '1944e27db3b17edac152209b2b35e914ed9700a2ffe0255b012661197a328178'
+ '9657fd9fdbdb4a96e3c31c9453610200258711f5ae2f6e46d3eeb9676ae857a6'
# zoneminder-php.ini
- '7905ceddbb049de0f9bf4f1eb58779dfe310a65c4d2ec44854d592d4f31b6a72'
+ '479f290d3c92938cd929020ad140d613814b912b4302c2758be6446ebfb8a4ac'
# zoneminder.service
'3e4de227e3154dffa887f2286c339ab3cf456f6d74a400b2786192b7e2b129c0'
# zoneminder-tmpfile.conf
@@ -138,9 +138,9 @@ package() {
install -dm775 -o http -g http $pkgdir/var/lib/$pkgname/{cache,events,images}
# Link ZM_CGIDIR and ZM_CACHEDIR inside ZM_WEBDIR and set correct permissions
- ln -sf /srv/$pkgname/cgi-bin $pkgdir/srv/$pkgname/www
- ln -sf /var/lib/$pkgname/cache $pkgdir/srv/$pkgname/www
- chown -Rh http:http $pkgdir/srv/$pkgname
+ ln -sf /srv/$pkgname/cgi-bin $pkgdir/srv/$pkgname/www
+ ln -sf /var/lib/$pkgname/cache $pkgdir/srv/$pkgname/www
+ chown -Rh http:http $pkgdir/srv/$pkgname
# Link ZM_WEBDIR/api/app/tmp to ZM_TMPDIR
ln -sf /var/tmp/$pkgname $pkgdir/srv/$pkgname/www/api/app/tmp
@@ -169,7 +169,7 @@ package() {
install -Dm644 $srcdir/$pkgname-tmpfile.conf $pkgdir/usr/lib/tmpfiles.d/$pkgname.conf
# Install fcgiwrap-multiwatch service
- install -Dm644 $srcdir/fcgiwrap-multiwatch.service $pkgdir/usr/lib/systemd/system/fcgiwrap-multiwatch.service
+ install -Dm644 $srcdir/fcgiwrap-multiwatch.service $pkgdir/usr/lib/systemd/system/fcgiwrap-multiwatch.service
# Install logrotate conf file
install -Dm644 misc/logrotate.conf $pkgdir/etc/logrotate.d/$pkgname
diff --git a/zoneminder-httpd.conf b/zoneminder-httpd.conf
index 7ef3a7731744..450e003274a0 100644
--- a/zoneminder-httpd.conf
+++ b/zoneminder-httpd.conf
@@ -1,7 +1,7 @@
Listen 8095
-<VirtualHost localhost:8095>
- ServerName localhost:8095
+<VirtualHost *:8095>
+ ServerName *:8095
DocumentRoot /srv/zoneminder/www
# PHP handler
diff --git a/zoneminder-nginx.conf b/zoneminder-nginx.conf
index 2d2782fa3fa0..824146f66dc1 100644
--- a/zoneminder-nginx.conf
+++ b/zoneminder-nginx.conf
@@ -1,6 +1,5 @@
server {
- listen localhost:8095;
- server_name localhost;
+ listen 8095;
root /srv/zoneminder/www;
@@ -41,4 +40,4 @@ server {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
}
}
-}
+}
diff --git a/zoneminder-php.ini b/zoneminder-php.ini
index 6f95fcf14e1f..2aecc0e1a701 100644
--- a/zoneminder-php.ini
+++ b/zoneminder-php.ini
@@ -4,6 +4,7 @@ extension=gd
extension=gettext
extension=pdo_mysql
extension=sockets
+extension=sysvsem
extension=zip
date.timezone = PLACEHOLDER
diff --git a/zoneminder.install b/zoneminder.install
index 0f294577ea0a..d3537908e703 100644
--- a/zoneminder.install
+++ b/zoneminder.install
@@ -1,8 +1,7 @@
post_install() {
echo
- systemctl daemon-reload
-
+ systemctl daemon-reload
### Nginx & Apache ###
@@ -71,7 +70,6 @@ post_install() {
echo
fi
-
### fcgiwrap ###
if [[ "$(pacman -Qs fcgiwrap)" = *"local/fcgiwrap"* ]]
@@ -92,7 +90,6 @@ post_install() {
}
fi
-
### PHP-FPM ###
# Set local timezone in /etc/php/conf.d/zoneminder.ini
@@ -104,7 +101,6 @@ post_install() {
systemctl start php-fpm
fi
-
### MariaDB ###
# If MariaDB is installed
@@ -135,22 +131,21 @@ post_install() {
echo
echo "* Enter the password one more time..."
echo
- mysql -uroot -p -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';"
+ mysql -uroot -p -e "grant select,insert,update,delete,create,drop,alter,index,lock tables,alter routine,create routine,trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';"
echo
else
# If a database root password is not set
mysql -uroot < /usr/share/zoneminder/db/zm_create.sql
- mysql -uroot -e "grant select,insert,update,delete,create,alter,index,lock tables on zm.* to 'zmuser'@localhost identified by 'zmpass';"
+ mysql -uroot -e "grant select,insert,update,delete,create,drop,alter,index,lock tables,alter routine,create routine,trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';"
fi
fi
fi
-
### ZoneMinder ###
systemctl is-active --quiet zoneminder && systemctl stop zoneminder
systemd-tmpfiles --create
- systemctl start zoneminder &&
+ systemctl start --quiet zoneminder &&
{
echo "---------------"
echo
@@ -158,35 +153,65 @@ post_install() {
if [[ "$(systemctl is-active nginx)" = active ]] || [[ "$(systemctl is-active httpd)" = active ]]
then
echo "ZoneMinder is listening at http://localhost:8095"
+ echo
else
echo "WARNING: ZoneMinder is running, but no web server has been configured."
+ echo
fi
echo
}
}
post_upgrade() {
- post_install
-
- echo "---------------"
- echo
- echo "The ZoneMinder updater will now run."
+ # Parse zm.conf and any custom configuration files
+ . /etc/zoneminder/zm.conf
+ for CONF in /etc/zoneminder/conf.d/*.conf; do
+ . $CONF
+ done
+
+ # Check if we're running a local database server
+ if [ "$ZM_DB_HOST" = "localhost" ]; then
+ systemctl daemon-reload
- # Make sure ZoneMinder is *not* running before we attempt to use the updater
- systemctl is-active --quiet zoneminder && systemctl stop zoneminder
-
- # Make sure MariaDB *is* running before we attempt to use the updater
- # NOTE: We probably don't want this in a Multi Server setup because MariaDB will not be running locally,
- # but since it will simply generate a harmless error and the updater will still run, for now I'm leaving it as is
- systemctl is-active --quiet mariadb || systemctl start mariadb
-
- # Run the updater
- /usr/bin/zmupdate.pl
+ # Make sure MariaDB is running before we attempt to use the updater
+ systemctl is-active --quiet mariadb || systemctl start mariadb
+
+ # Make sure ZoneMinder is *not* running before we attempt to use the updater
+ systemctl is-active --quiet zoneminder && systemctl stop zoneminder
+
+ echo
+ echo "---------------"
+
+ # Temporary solution to apply new privileges on preexisting user & database
+ # Check for database root password
+ if [[ "$(mysql -uroot -e "select * from mysql.user;" 2>&1)" = *"Access denied"* ]]
+ then
+ # If a database root password is set
+ echo
+ echo "* Secure MariaDB installation found, please enter the database root password."
+ echo
+ mysql -uroot -p -e "grant select,insert,update,delete,create,drop,alter,index,lock tables,alter routine,create routine,trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';"
+ else
+ # If a database root password is not set
+ mysql -uroot -e "grant select,insert,update,delete,create,drop,alter,index,lock tables,alter routine,create routine,trigger,execute on zm.* to 'zmuser'@localhost identified by 'zmpass';"
+ fi
+
+ # Run the updater
+ /usr/bin/zmupdate.pl --nointeractive
+ /usr/bin/zmupdate.pl --nointeractive --freshen > /dev/null 2>&1
+
+ # Update PTZ control presets
+ /usr/bin/zmcamtool.pl --import > /dev/null 2>&1
- systemctl start zoneminder
+ systemctl start zoneminder
+ else
+ echo
+ echo "---------------"
+ echo
+ echo "Multiserver setup detected, database update skipped."
+ fi
- echo "Update complete."
- echo
+ post_install
}
post_remove() {