From a3519feffc57eb167817a2ecae438efdc681f41a Mon Sep 17 00:00:00 2001 From: Jan Dennis Bungart Date: Sun, 22 Sep 2013 10:01:30 +0800 Subject: [PATCH 1/3] Fixing postinst script and changelog needed for successful debian build --- distros/debian/changelog | 6 ++++++ distros/debian/postinst | 44 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/distros/debian/changelog b/distros/debian/changelog index 028fc4de2..30e79d7be 100644 --- a/distros/debian/changelog +++ b/distros/debian/changelog @@ -1,3 +1,9 @@ +zoneminder (1.26.3-1) unstable; urgency=low + + * A 'minor' release focusing on performance improvement and bug fixes. + + -- Isaac Connor Sun, 22 Sep 2013 09:36:42 +0800 + zoneminder (1.25.1-1) unstable; urgency=low * Initial Version. diff --git a/distros/debian/postinst b/distros/debian/postinst index 65f9bf351..c5893a2e9 100644 --- a/distros/debian/postinst +++ b/distros/debian/postinst @@ -4,6 +4,50 @@ set -e VERSION=1.26.3 +if [ "$1" = "configure" ]; then + # + # Get mysql started if it isn't + # + if ! $(/etc/init.d/mysql status >/dev/null 2>&1); then + invoke-rc.d mysql start + fi + if $(/etc/init.d/mysql status >/dev/null 2>&1); then + mysqladmin --defaults-file=/etc/mysql/debian.cnf -f reload + # test if database if already present... + if ! $(echo quit | mysql --defaults-file=/etc/mysql/debian.cnf zm > /dev/null 2> /dev/null) ; then + cat /usr/share/zoneminder/db/zm_create.sql | mysql --defaults-file=/etc/mysql/debian.cnf + echo 'grant lock tables, alter,select,insert,update,delete on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql + fi + + # get old version from upgrade... + OLD_ZM_VERSION=${2%-*} + if [ -z "$OLD_ZM_VERSION" ]; then + # fall back to getting version from database itself, which may not necessarily be accurate? + OLD_ZM_VERSION=$(echo 'select Value from Config where Name = "ZM_DYN_CURR_VERSION";' | mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names zm ) + fi + if [ -n "$OLD_ZM_VERSION" ] && [ "$OLD_ZM_VERSION" != "$VERSION" ] ; then + echo 'grant lock tables, create, alter on zm.* to 'zmuser'@localhost identified by "zmpass";' | mysql --defaults-file=/etc/mysql/debian.cnf mysql + # stop zoneminder before performing database upgrade. + invoke-rc.d zoneminder stop || true + zmupdate.pl --nointeractive --version $OLD_ZM_VERSION + fi + + else + echo 'NOTE: mysql not running, please start mysql and run dpkg-reconfigure zoneminder when it is running.' + fi + chown www-data:www-data /var/log/zm + chown www-data:www-data /var/lib/zm/ + if [ -z "$2" ]; then + chown www-data:www-data -R /var/cache/zoneminder + fi +fi +# Ensure zoneminder is stopped... +if [ -x "/etc/init.d/zoneminder" ]; then + if invoke-rc.d zoneminder status ; then + invoke-rc.d zoneminder stop || exit $? + fi +fi + if [ "$1" = "configure" ]; then if [ -z "$2" ]; then chown www-data:www-data /var/log/zm From 71729309949f796b2353162813e667b17d5a30ad Mon Sep 17 00:00:00 2001 From: Jan Dennis Bungart Date: Sun, 22 Sep 2013 10:21:20 +0800 Subject: [PATCH 2/3] Fixing debian control file (libjpeg-turbo8 -> libjpeg8) --- distros/debian/control | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/debian/control b/distros/debian/control index f6eaa5700..06bc6801e 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -2,12 +2,12 @@ Source: zoneminder Section: net Priority: optional Maintainer: Isaac Connor -Build-Depends: debhelper (>= 5), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg-turbo8, dh-autoreconf +Build-Depends: debhelper (>= 5), autoconf, automake, dpatch, libphp-serialization-perl, libgnutls-dev, libmysqlclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libpcre3, libarchive-zip-perl, libmime-lite-perl, libjpeg8, dh-autoreconf Standards-Version: 3.9.2 Package: zoneminder Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg-turbo8, zip, libnet-sftp-foreign-perl +Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, apache2, libapache2-mod-php5, php5, php5-mysql, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-lite-perl, mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice53, libjpeg8, zip, libnet-sftp-foreign-perl Description: Linux video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child From b428272f42492b060a1aa9646fd529136afb7079 Mon Sep 17 00:00:00 2001 From: Jan Dennis Bungart Date: Sun, 22 Sep 2013 10:34:11 +0800 Subject: [PATCH 3/3] fixing debian docs file (README -> README.md) --- distros/debian/docs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian/docs b/distros/debian/docs index e845566c0..b43bf86b5 100644 --- a/distros/debian/docs +++ b/distros/debian/docs @@ -1 +1 @@ -README +README.md