From 7189de829cceb5386a041e01ab89016f577b25a1 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Tue, 16 Dec 2014 12:42:51 +0100 Subject: [PATCH 01/21] Split files in multiple packages (lb, core, ui...) --- distros/debian8/control | 46 ++++- distros/debian8/libzoneminder-perl.install | 2 + distros/debian8/libzoneminder-perl.manpages | 11 ++ distros/debian8/po/POTFILES.in | 4 +- distros/debian8/po/fr.po | 170 +++++++++--------- distros/debian8/zoneminder-core.dirs | 4 + .../{zoneminder.init => zoneminder-core.init} | 0 distros/debian8/zoneminder-core.install | 4 + ...zoneminder.links => zoneminder-core.links} | 1 - distros/debian8/zoneminder-core.postinst | 18 ++ distros/debian8/zoneminder-core.postrm | 37 ++++ ...minder.preinst => zoneminder-core.preinst} | 0 ...minder.service => zoneminder-core.service} | 0 distros/debian8/zoneminder-core.templates | 19 ++ ...minder.tmpfile => zoneminder-core.tmpfile} | 0 ...zoneminder.config => zoneminder-db.config} | 4 - .../{zoneminder.dirs => zoneminder-db.dirs} | 5 - distros/debian8/zoneminder-db.install | 3 + ...minder.postinst => zoneminder-db.postinst} | 40 +---- distros/debian8/zoneminder-db.postrm | 34 ++++ .../{zoneminder.prerm => zoneminder-db.prerm} | 0 ...nder.templates => zoneminder-db.templates} | 28 --- distros/debian8/zoneminder-ui-base.config | 20 +++ ...der.install => zoneminder-ui-base.install} | 13 +- distros/debian8/zoneminder-ui-base.links | 1 + distros/debian8/zoneminder-ui-base.postinst | 48 +++++ distros/debian8/zoneminder-ui-base.postrm | 41 +++++ distros/debian8/zoneminder-ui-base.templates | 7 + distros/debian8/zoneminder-ui-classic.install | 1 + distros/debian8/zoneminder-ui-mobile.install | 1 + distros/debian8/zoneminder-ui-xml.install | 1 + distros/debian8/zoneminder.postrm | 78 -------- 32 files changed, 383 insertions(+), 258 deletions(-) create mode 100644 distros/debian8/libzoneminder-perl.install create mode 100644 distros/debian8/libzoneminder-perl.manpages create mode 100644 distros/debian8/zoneminder-core.dirs rename distros/debian8/{zoneminder.init => zoneminder-core.init} (100%) create mode 100644 distros/debian8/zoneminder-core.install rename distros/debian8/{zoneminder.links => zoneminder-core.links} (74%) create mode 100644 distros/debian8/zoneminder-core.postinst create mode 100644 distros/debian8/zoneminder-core.postrm rename distros/debian8/{zoneminder.preinst => zoneminder-core.preinst} (100%) rename distros/debian8/{zoneminder.service => zoneminder-core.service} (100%) create mode 100644 distros/debian8/zoneminder-core.templates rename distros/debian8/{zoneminder.tmpfile => zoneminder-core.tmpfile} (100%) rename distros/debian8/{zoneminder.config => zoneminder-db.config} (97%) rename distros/debian8/{zoneminder.dirs => zoneminder-db.dirs} (55%) create mode 100644 distros/debian8/zoneminder-db.install rename distros/debian8/{zoneminder.postinst => zoneminder-db.postinst} (77%) create mode 100644 distros/debian8/zoneminder-db.postrm rename distros/debian8/{zoneminder.prerm => zoneminder-db.prerm} (100%) rename distros/debian8/{zoneminder.templates => zoneminder-db.templates} (68%) create mode 100644 distros/debian8/zoneminder-ui-base.config rename distros/debian8/{zoneminder.install => zoneminder-ui-base.install} (51%) create mode 100644 distros/debian8/zoneminder-ui-base.links create mode 100644 distros/debian8/zoneminder-ui-base.postinst create mode 100644 distros/debian8/zoneminder-ui-base.postrm create mode 100644 distros/debian8/zoneminder-ui-base.templates create mode 100644 distros/debian8/zoneminder-ui-classic.install create mode 100644 distros/debian8/zoneminder-ui-mobile.install create mode 100644 distros/debian8/zoneminder-ui-xml.install delete mode 100644 distros/debian8/zoneminder.postrm diff --git a/distros/debian8/control b/distros/debian8/control index 613abe30b..f7bbcc5a2 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -5,10 +5,9 @@ Maintainer: Isaac Connor Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), dh-systemd (>= 1.5), autoconf, automake, quilt, libphp-serialization-perl, libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev|libgcrypt20-dev, libpolkit-gobject-1-dev Standards-Version: 3.9.6 -Package: zoneminder +Package: zoneminder-core Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, debconf, dbconfig-common, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql|php5-mysqlnd, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, mariadb-client|mysql-client, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, netpbm, libavdevice55, libjpeg8|libjpeg9|libjpeg62-turbo, zip, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, libvlccore8, libvlc5, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, liburi-encode-perl, libgcrypt11|libgcrypt20, libpolkit-gobject-1-0, policykit-1 -Recommends: mysql-server|mariadb-server +Depends: libzoneminder-perl (= ${source:Version}), zoneminder-db (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, debconf, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, netpbm, libavdevice55, libjpeg8|libjpeg9|libjpeg62-turbo, zip, libvlccore8, libvlc5, libgcrypt11|libgcrypt20, libpolkit-gobject-1-0, policykit-1 Description: Video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child @@ -21,11 +20,11 @@ Description: Video camera security and surveillance solution and surveillance. It can also be integrated into a home automation system via X.10 or other protocols. -Package: zoneminder-dbg +Package: zoneminder-core-dbg Priority: extra Section: debug Architecture: any -Depends: zoneminder (= ${binary:Version}), ${misc:Depends} +Depends: zoneminder-core (= ${binary:Version}), ${misc:Depends} Description: Debugging symbols for zoneminder. ZoneMinder is a video camera security and surveillance solution. ZoneMinder is intended for use in single or multi-camera video security @@ -38,3 +37,40 @@ Description: Debugging symbols for zoneminder. video security system and for commercial or professional video security and surveillance. It can also be integrated into a home automation system via X.10 or other protocols. + +Package: zoneminder-db +Architecture: all +Depends: ${misc:Depends}, debconf, dbconfig-common, mariadb-client|mysql-client +Recommends: mysql-server|mariadb-server +Description: Database management package for ZoneMinder + ZoneMinder is a video camera security and surveillance solution. + +Package: zoneminder-ui-base +Architecture: all +Depends: zoneminder-core (= ${binary:Version}), ${misc:Depends}, debconf, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql | php5-mysqlnd +Description: Essential files for the web user interface of ZoneMinder + ZoneMinder is a video camera security and surveillance solution. + +Package: zoneminder-ui-classic +Architecture: all +Depends: zoneminder-ui-base (= ${source:Version}), ${misc:Depends} +Description: Classic web user interface for ZoneMinder + ZoneMinder is a video camera security and surveillance solution. + +Package: zoneminder-ui-mobile +Architecture: all +Depends: zoneminder-ui-base (= ${source:Version}), ${misc:Depends} +Description: Mobile web user interface for ZoneMinder + ZoneMinder is a video camera security and surveillance solution. + +Package: zoneminder-ui-xml +Architecture: all +Depends: zoneminder-ui-base (= ${source:Version}), ${misc:Depends} +Description: XML interface for ZoneMinder + ZoneMinder is a video camera security and surveillance solution. + +Package: libzoneminder-perl +Architecture: all +Depends: ${misc:Depends}, ${perl:Depends}, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, liburi-encode-perl +Description: Perl libraries for ZoneMinder + ZoneMinder is a video camera security and surveillance solution. diff --git a/distros/debian8/libzoneminder-perl.install b/distros/debian8/libzoneminder-perl.install new file mode 100644 index 000000000..fb087b142 --- /dev/null +++ b/distros/debian8/libzoneminder-perl.install @@ -0,0 +1,2 @@ +usr/share/perl5/ZoneMinder +usr/share/perl5/ZoneMinder.pm diff --git a/distros/debian8/libzoneminder-perl.manpages b/distros/debian8/libzoneminder-perl.manpages new file mode 100644 index 000000000..3b0f27336 --- /dev/null +++ b/distros/debian8/libzoneminder-perl.manpages @@ -0,0 +1,11 @@ +usr/share/man/man3/ZoneMinder.3pm.gz +usr/share/man/man3/ZoneMinder::Base.3pm.gz +usr/share/man/man3/ZoneMinder::Config.3pm.gz +usr/share/man/man3/ZoneMinder::ConfigAdmin.3pm.gz +usr/share/man/man3/ZoneMinder::ConfigData.3pm.gz +usr/share/man/man3/ZoneMinder::Control::* +usr/share/man/man3/ZoneMinder::Database.3pm.gz +usr/share/man/man3/ZoneMinder::General.3pm.gz +usr/share/man/man3/ZoneMinder::Logger.3pm.gz +usr/share/man/man3/ZoneMinder::Memory.3pm.gz +usr/share/man/man3/ZoneMinder::Trigger::* diff --git a/distros/debian8/po/POTFILES.in b/distros/debian8/po/POTFILES.in index a3d64930e..ba681775e 100644 --- a/distros/debian8/po/POTFILES.in +++ b/distros/debian8/po/POTFILES.in @@ -1 +1,3 @@ -[type: gettext/rfc822deb] zoneminder.templates +[type: gettext/rfc822deb] zoneminder-core.templates +[type: gettext/rfc822deb] zoneminder-db.templates +[type: gettext/rfc822deb] zoneminder-ui-base.templates diff --git a/distros/debian8/po/fr.po b/distros/debian8/po/fr.po index 8b512df1b..ca622bb24 100644 --- a/distros/debian8/po/fr.po +++ b/distros/debian8/po/fr.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: zoneminder\n" "Report-Msgid-Bugs-To: zoneminder@packages.debian.org\n" -"POT-Creation-Date: 2014-12-12 12:28+0100\n" +"POT-Creation-Date: 2014-12-16 12:34+0100\n" "PO-Revision-Date: 2014-12-07 00:40+0100\n" "Last-Translator: Emmanuel Papin \n" "Language-Team: French \n" @@ -16,27 +16,80 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:1001 +msgid "Delete this non empty directory?" +msgstr "Supprimer ce répertoire non vide ?" + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:1001 +msgid "" +"A purge of the ZoneMinder package is performed but the directory '/var/cache/" +"zoneminder' is not empty so it will not be deleted." +msgstr "" +"Une purge du paquet ZoneMinder est en cours mais le répertoire '/var/cache/" +"zoneminder' n'est pas vide et sera donc conservé." + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:1001 +msgid "" +"Please consider that this directory is designed to contain data resulting " +"from event detection. Therefore, \"proof of evidence\" could be lost!\"" +msgstr "" +"Veuillez considérer que ce répertoire est conçu pour contenir des données " +"résultants de la détection d'événements. Par conséquent, des preuves " +"pourraient être perdues !" + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:1001 +msgid "" +"If you are not sure of your decision, please do not delete this directory " +"but perform a manual checkup." +msgstr "" +"Si vous n'êtes pas sûr de votre décision, veuillez conserver ce répertoire " +"et effectuer une vérification manuelle." + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:2001 +msgid "Deletion confirmed?" +msgstr "Supression confirmée ?" + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:2001 +msgid "" +"You have allowed the deletion of directory '/var/cache/zoneminder' although " +"it may contain critical data." +msgstr "" +"Vous avez autorisé la suppression du répertoire '/var/cache/zoneminder' bien " +"qu'il puisse contenir des données critiques." + #. Type: select #. Choices -#: ../zoneminder.templates:1001 +#: ../zoneminder-db.templates:1001 msgid "local" msgstr "local" #. Type: select #. Choices -#: ../zoneminder.templates:1001 +#: ../zoneminder-db.templates:1001 msgid "remote" msgstr "distant" #. Type: select #. Description -#: ../zoneminder.templates:1002 +#: ../zoneminder-db.templates:1002 msgid "Database location:" msgstr "Emplacement de la base de donnée :" #. Type: select #. Description -#: ../zoneminder.templates:1002 +#: ../zoneminder-db.templates:1002 msgid "" "A database server is required to run ZoneMinder. The database can be " "installed either locally or remotely on a machine of your network." @@ -46,7 +99,7 @@ msgstr "" #. Type: select #. Description -#: ../zoneminder.templates:1002 +#: ../zoneminder-db.templates:1002 msgid "" "If you choose a remote location, you will have to select the 'tcp/ip' " "connection method and enter the hostname or ip address of the remote machine " @@ -58,13 +111,13 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:2001 +#: ../zoneminder-db.templates:2001 msgid "No local database server is available:" msgstr "Aucun serveur local de base de données n'est disponible :" #. Type: error #. Description -#: ../zoneminder.templates:2001 +#: ../zoneminder-db.templates:2001 msgid "" "Currently ZoneMinder supports mysql or mariadb database server but none of " "them appears to be installed on this machine." @@ -74,7 +127,7 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:2001 +#: ../zoneminder-db.templates:2001 msgid "" "In order to complete ZoneMinder's installation, after ending of this " "assistant, please install a compatible database server and then restart the " @@ -88,19 +141,19 @@ msgstr "" #. Description #. Type: error #. Description -#: ../zoneminder.templates:2001 ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:2001 ../zoneminder-db.templates:3001 msgid "$ sudo dpkg-reconfigure zoneminder" msgstr "$ sudo dpkg-reconfigure zoneminder" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "Remote database servers are not allowed:" msgstr "Les serveurs de base de données distants ne sont pas autorisés :" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "" "The current configuration of dbconfig-common does not allow installation of " "a database on remote servers." @@ -110,7 +163,7 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "" "In order to reconfigure dbconfig-common, please invoke the following command " "after ending of this assistant:" @@ -120,13 +173,13 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "$ sudo dpkg-reconfigure dbconfig-common" msgstr "$ sudo dpkg-reconfigure dbconfig-common" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "" "Then, to complete ZoneMinder's installation, please restart this assistant " "by invoking:" @@ -134,37 +187,21 @@ msgstr "" "Ensuite, pour compléter l'installation de ZoneMinder, veuillez redémarrer " "cet assistant en invoquant :" -#. Type: multiselect -#. Description -#: ../zoneminder.templates:4001 -msgid "Web server to reconfigure automatically:" -msgstr "Serveur web à reconfigurer automatiquement :" - -#. Type: multiselect -#. Description -#: ../zoneminder.templates:4001 -msgid "" -"Please choose the web server that should be automatically configured for " -"ZoneMinder's web portal access." -msgstr "" -"Veuillez choisir le serveur web à reconfigurer automatiquement pour l'accès " -"au portail web de ZoneMinder." - #. Type: password #. Description -#: ../zoneminder.templates:5001 +#: ../zoneminder-db.templates:4001 msgid "New password for the ZoneMinder 'admin' user:" msgstr "Nouveau mot de passe pour le compte 'admin' de ZoneMinder :" #. Type: password #. Description -#: ../zoneminder.templates:5001 +#: ../zoneminder-db.templates:4001 msgid "Please enter the password of the default administrative user." msgstr "Veuillez entrer le mot de passe du compte administrateur par défaut." #. Type: password #. Description -#: ../zoneminder.templates:5001 +#: ../zoneminder-db.templates:4001 msgid "" "While not mandatory, it is highly recommended that you set a custom password " "for the administrative 'admin' user." @@ -174,79 +211,42 @@ msgstr "" #. Type: password #. Description -#: ../zoneminder.templates:5001 +#: ../zoneminder-db.templates:4001 msgid "If this field is left blank, the password will not be changed." msgstr "Si le champ est laissé vide, le mot de passe ne sera pas changé." #. Type: password #. Description -#: ../zoneminder.templates:6001 +#: ../zoneminder-db.templates:5001 msgid "Repeat password for the ZoneMinder 'admin' user:" msgstr "Répéter le mot de passe pour le compte 'admin' de ZoneMinder :" #. Type: error #. Description -#: ../zoneminder.templates:7001 +#: ../zoneminder-db.templates:6001 msgid "Password input error" msgstr "Erreur de mot de passe" #. Type: error #. Description -#: ../zoneminder.templates:7001 +#: ../zoneminder-db.templates:6001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" "Les deux mots de passe saisis ne sont pas les mêmes. Veuillez essayer à " "nouveau." -#. Type: boolean +#. Type: multiselect #. Description -#: ../zoneminder.templates:8001 -msgid "Delete this non empty directory?" -msgstr "Supprimer ce répertoire non vide ?" +#: ../zoneminder-ui-base.templates:1001 +msgid "Web server to reconfigure automatically:" +msgstr "Serveur web à reconfigurer automatiquement :" -#. Type: boolean +#. Type: multiselect #. Description -#: ../zoneminder.templates:8001 +#: ../zoneminder-ui-base.templates:1001 msgid "" -"A purge of the ZoneMinder package is performed but the directory '/var/cache/" -"zoneminder' is not empty so it will not be deleted." +"Please choose the web server that should be automatically configured for " +"ZoneMinder's web portal access." msgstr "" -"Une purge du paquet ZoneMinder est en cours mais le répertoire '/var/cache/" -"zoneminder' n'est pas vide et sera donc conservé." - -#. Type: boolean -#. Description -#: ../zoneminder.templates:8001 -msgid "" -"Please consider that this directory is designed to contain data resulting " -"from event detection. Therefore, \"proof of evidence\" could be lost!\"" -msgstr "" -"Veuillez considérer que ce répertoire est conçu pour contenir des données " -"résultants de la détection d'événements. Par conséquent, des preuves " -"pourraient être perdues !" - -#. Type: boolean -#. Description -#: ../zoneminder.templates:8001 -msgid "" -"If you are not sure of your decision, please do not delete this directory " -"but perform a manual checkup." -msgstr "" -"Si vous n'êtes pas sûr de votre décision, veuillez conserver ce répertoire " -"et effectuer une vérification manuelle." - -#. Type: boolean -#. Description -#: ../zoneminder.templates:9001 -msgid "Deletion confirmed?" -msgstr "Supression confirmée ?" - -#. Type: boolean -#. Description -#: ../zoneminder.templates:9001 -msgid "" -"You have allowed the deletion of directory '/var/cache/zoneminder' although " -"it may contain critical data." -msgstr "" -"Vous avez autorisé la suppression du répertoire '/var/cache/zoneminder' bien " -"qu'il puisse contenir des données critiques." +"Veuillez choisir le serveur web à reconfigurer automatiquement pour l'accès " +"au portail web de ZoneMinder." diff --git a/distros/debian8/zoneminder-core.dirs b/distros/debian8/zoneminder-core.dirs new file mode 100644 index 000000000..350c32aff --- /dev/null +++ b/distros/debian8/zoneminder-core.dirs @@ -0,0 +1,4 @@ +var/log/zm +var/cache/zoneminder/events +var/cache/zoneminder/images +var/cache/zoneminder/temp diff --git a/distros/debian8/zoneminder.init b/distros/debian8/zoneminder-core.init similarity index 100% rename from distros/debian8/zoneminder.init rename to distros/debian8/zoneminder-core.init diff --git a/distros/debian8/zoneminder-core.install b/distros/debian8/zoneminder-core.install new file mode 100644 index 000000000..de54e5c89 --- /dev/null +++ b/distros/debian8/zoneminder-core.install @@ -0,0 +1,4 @@ +usr/bin +usr/lib/cgi-bin +usr/share/polkit-1/actions +usr/share/polkit-1/rules.d diff --git a/distros/debian8/zoneminder.links b/distros/debian8/zoneminder-core.links similarity index 74% rename from distros/debian8/zoneminder.links rename to distros/debian8/zoneminder-core.links index 9715ee428..5560a100a 100644 --- a/distros/debian8/zoneminder.links +++ b/distros/debian8/zoneminder-core.links @@ -1,4 +1,3 @@ var/cache/zoneminder/events usr/share/zoneminder/events var/cache/zoneminder/images usr/share/zoneminder/images var/cache/zoneminder/temp usr/share/zoneminder/temp -usr/lib/cgi-bin usr/share/zoneminder/cgi-bin diff --git a/distros/debian8/zoneminder-core.postinst b/distros/debian8/zoneminder-core.postinst new file mode 100644 index 000000000..364dbb749 --- /dev/null +++ b/distros/debian8/zoneminder-core.postinst @@ -0,0 +1,18 @@ +#! /bin/sh +# postinst maintainer script for zoneminder-core package + +set -e + +# Do this when the package is installed, upgraded or reconfigured +if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then + + # Set some file permissions + chown $ZM_WEB_USER:$ZM_WEB_GROUP /var/log/zm + if [ -z "$2" ]; then + chown $ZM_WEB_USER:$ZM_WEB_GROUP -R /var/cache/zoneminder + fi +fi + +#DEBHELPER# + +exit 0 diff --git a/distros/debian8/zoneminder-core.postrm b/distros/debian8/zoneminder-core.postrm new file mode 100644 index 000000000..c202fd3bf --- /dev/null +++ b/distros/debian8/zoneminder-core.postrm @@ -0,0 +1,37 @@ +#! /bin/sh +# postrm maintainer script for zoneminder + +set -e + +# Source the debconf stuff +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +if [ "$1" = "purge" ]; then + + # Ask the user if we have to remove the cache directory even if not empty + if [ -d /var/cache/zoneminder ] \ + && [ ! $(find /var/cache/zoneminder -maxdepth 0 -type d -empty 2>/dev/null) ]; then + RET="" + db_input high zoneminder/ask_delete || true + db_go || true + db_get zoneminder/ask_delete + if [ "$RET" = "true" ]; then + RET="" + db_input high zoneminder/ask_delete_again || true + db_go || true + db_get zoneminder/ask_delete_again + if [ "$RET" = "true" ]; then + rm -rf /var/cache/zoneminder + fi + fi + fi +fi + +#DEBHELPER# + +# postrm rm may freeze without that +db_stop + +exit 0 diff --git a/distros/debian8/zoneminder.preinst b/distros/debian8/zoneminder-core.preinst similarity index 100% rename from distros/debian8/zoneminder.preinst rename to distros/debian8/zoneminder-core.preinst diff --git a/distros/debian8/zoneminder.service b/distros/debian8/zoneminder-core.service similarity index 100% rename from distros/debian8/zoneminder.service rename to distros/debian8/zoneminder-core.service diff --git a/distros/debian8/zoneminder-core.templates b/distros/debian8/zoneminder-core.templates new file mode 100644 index 000000000..35fdefd7a --- /dev/null +++ b/distros/debian8/zoneminder-core.templates @@ -0,0 +1,19 @@ +Template: zoneminder/ask_delete +Type: boolean +Default: false +_Description: Delete this non empty directory? + A purge of the ZoneMinder package is performed but the directory + '/var/cache/zoneminder' is not empty so it will not be deleted. + . + Please consider that this directory is designed to contain data resulting from + event detection. Therefore, "proof of evidence" could be lost!" + . + If you are not sure of your decision, please do not delete this directory but + perform a manual checkup. + +Template: zoneminder/ask_delete_again +Type: boolean +Default: false +_Description: Deletion confirmed? + You have allowed the deletion of directory '/var/cache/zoneminder' although + it may contain critical data. diff --git a/distros/debian8/zoneminder.tmpfile b/distros/debian8/zoneminder-core.tmpfile similarity index 100% rename from distros/debian8/zoneminder.tmpfile rename to distros/debian8/zoneminder-core.tmpfile diff --git a/distros/debian8/zoneminder.config b/distros/debian8/zoneminder-db.config similarity index 97% rename from distros/debian8/zoneminder.config rename to distros/debian8/zoneminder-db.config index 88cd62695..f6be6d901 100644 --- a/distros/debian8/zoneminder.config +++ b/distros/debian8/zoneminder-db.config @@ -78,10 +78,6 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then # Ask the user for all database settings dbc_go zoneminder $@ - # Ask the user for the web server(s) to configure - db_input high zoneminder/webserver || true - db_go || true - # Ask the user for the password of the database administrator if the user # has not yet answered to this question. # This situation may occur if the user skipped the database creation step diff --git a/distros/debian8/zoneminder.dirs b/distros/debian8/zoneminder-db.dirs similarity index 55% rename from distros/debian8/zoneminder.dirs rename to distros/debian8/zoneminder-db.dirs index eeb6a6c46..b37463a9e 100644 --- a/distros/debian8/zoneminder.dirs +++ b/distros/debian8/zoneminder-db.dirs @@ -1,8 +1,3 @@ -var/log/zm -var/lib/zm -var/cache/zoneminder/events -var/cache/zoneminder/images -var/cache/zoneminder/temp usr/share/zoneminder/db usr/share/dbconfig-common/data/zoneminder/install usr/share/dbconfig-common/data/zoneminder/upgrade/mysql diff --git a/distros/debian8/zoneminder-db.install b/distros/debian8/zoneminder-db.install new file mode 100644 index 000000000..22d9aeb27 --- /dev/null +++ b/distros/debian8/zoneminder-db.install @@ -0,0 +1,3 @@ +db/zm_create.sql usr/share/zoneminder/db +db/zm_update-*.sql usr/share/zoneminder/db +etc/zm diff --git a/distros/debian8/zoneminder.postinst b/distros/debian8/zoneminder-db.postinst similarity index 77% rename from distros/debian8/zoneminder.postinst rename to distros/debian8/zoneminder-db.postinst index 5969e9693..f6582da26 100644 --- a/distros/debian8/zoneminder.postinst +++ b/distros/debian8/zoneminder-db.postinst @@ -1,5 +1,5 @@ #! /bin/sh -# postinst maintainer script for zoneminder +# postinst maintainer script for zoneminder-db package set -e @@ -12,27 +12,6 @@ if [ -e $CONFIGFILE ]; then . $CONFIGFILE fi -apache_install() { - - mkdir -p /etc/apache2/conf-available - ln -sf ../../zm/apache.conf /etc/apache2/conf-available/zoneminder.conf - - COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - - if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then - . /usr/share/apache2/apache2-maintscript-helper - apache2_invoke enconf zoneminder - elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/zoneminder.conf ] && ln -s ../conf-available/zoneminder.conf /etc/apache2/conf.d/zoneminder.conf - fi - - # Enable CGI script module in apache (not enabled by default on jessie) - a2enmod cgi >/dev/null 2>&1 - - # Reload the web server - deb-systemd-invoke reload apache2.service || true -} - mysql_update() { # Source the dbconfig stuff @@ -140,27 +119,10 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then mv -f ${CONFIGFILE}.postinst.bak $CONFIGFILE - # Set some file permissions - chown $ZM_WEB_USER:$ZM_WEB_GROUP /var/log/zm - chown $ZM_WEB_USER:$ZM_WEB_GROUP /var/lib/zm - if [ -z "$2" ]; then - chown $ZM_WEB_USER:$ZM_WEB_GROUP -R /var/cache/zoneminder - fi # As requested by the Debian Webapps Policy Manual §3.2.1 chown root:$ZM_WEB_GROUP /etc/zm/zm.conf chmod 640 /etc/zm/zm.conf - # Configure the web server - db_get zoneminder/webserver - webservers="$RET" - - for webserver in $webservers; do - webserver=${webserver%,} - # Currently we only support apache2 - if [ "$webserver" = "apache2" ] ; then - apache_install $1 - fi - done fi # Do this every time the package is installed or upgraded diff --git a/distros/debian8/zoneminder-db.postrm b/distros/debian8/zoneminder-db.postrm new file mode 100644 index 000000000..231f01ad7 --- /dev/null +++ b/distros/debian8/zoneminder-db.postrm @@ -0,0 +1,34 @@ +#! /bin/sh +# postrm maintainer script for zoneminder-db package + +set -e + +# Source the debconf stuff +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +# Source the dbconfig stuff +if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then + . /usr/share/dbconfig-common/dpkg/postrm + # Ask the user what do to with dbconfig when removing the package + dbc_go zoneminder $@ +fi + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + # Remove dbconfig stuff added in postinst script + rm -rf /usr/share/dbconfig-common/data/zoneminder + # No need to manually remove the zm database, dbconfig take care of this +fi + +if [ "$1" = "purge" ]; then + # Delete a potential remaining file used in postinst script + rm -f /etc/zm/zm.conf.postinst.bak +fi + +#DEBHELPER# + +# postrm rm may freeze without that +db_stop + +exit 0 diff --git a/distros/debian8/zoneminder.prerm b/distros/debian8/zoneminder-db.prerm similarity index 100% rename from distros/debian8/zoneminder.prerm rename to distros/debian8/zoneminder-db.prerm diff --git a/distros/debian8/zoneminder.templates b/distros/debian8/zoneminder-db.templates similarity index 68% rename from distros/debian8/zoneminder.templates rename to distros/debian8/zoneminder-db.templates index 9b1c21b98..4de4342f6 100644 --- a/distros/debian8/zoneminder.templates +++ b/distros/debian8/zoneminder-db.templates @@ -38,14 +38,6 @@ _Description: Remote database servers are not allowed: . $ sudo dpkg-reconfigure zoneminder -Template: zoneminder/webserver -Type: multiselect -Choices: apache2 -Default: apache2 -_Description: Web server to reconfigure automatically: - Please choose the web server that should be automatically configured for - ZoneMinder's web portal access. - Template: zoneminder/admin_password Type: password _Description: New password for the ZoneMinder 'admin' user: @@ -64,23 +56,3 @@ Template: zoneminder/password_mismatch Type: error _Description: Password input error The two passwords you entered were not the same. Please try again. - -Template: zoneminder/ask_delete -Type: boolean -Default: false -_Description: Delete this non empty directory? - A purge of the ZoneMinder package is performed but the directory - '/var/cache/zoneminder' is not empty so it will not be deleted. - . - Please consider that this directory is designed to contain data resulting from - event detection. Therefore, "proof of evidence" could be lost!" - . - If you are not sure of your decision, please do not delete this directory but - perform a manual checkup. - -Template: zoneminder/ask_delete_again -Type: boolean -Default: false -_Description: Deletion confirmed? - You have allowed the deletion of directory '/var/cache/zoneminder' although - it may contain critical data. diff --git a/distros/debian8/zoneminder-ui-base.config b/distros/debian8/zoneminder-ui-base.config new file mode 100644 index 000000000..2660208a8 --- /dev/null +++ b/distros/debian8/zoneminder-ui-base.config @@ -0,0 +1,20 @@ +#!/bin/sh +# config maintainer script for zoneminder-ui-base package + +set -e + +# Source the debconf stuff +. /usr/share/debconf/confmodule + +# Do this when the package is installed, upgraded or reconfigured +# Most of answers are cached so the questions will not be asked again +if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then + + # Ask the user for the web server(s) to configure + db_input high zoneminder/webserver || true + db_go || true +fi + +#DEBHELPER# + +exit 0 diff --git a/distros/debian8/zoneminder.install b/distros/debian8/zoneminder-ui-base.install similarity index 51% rename from distros/debian8/zoneminder.install rename to distros/debian8/zoneminder-ui-base.install index 86fe0a0a6..f72b569be 100644 --- a/distros/debian8/zoneminder.install +++ b/distros/debian8/zoneminder-ui-base.install @@ -1,22 +1,11 @@ -usr/bin +debian/apache.conf etc/zm usr/lib/cgi-bin -usr/share/man -usr/share/perl5/ZoneMinder -usr/share/perl5/ZoneMinder.pm -usr/share/polkit-1/actions -usr/share/polkit-1/rules.d usr/share/zoneminder/ajax usr/share/zoneminder/css -usr/share/zoneminder/db usr/share/zoneminder/graphics usr/share/zoneminder/includes usr/share/zoneminder/index.php usr/share/zoneminder/js usr/share/zoneminder/lang -usr/share/zoneminder/skins usr/share/zoneminder/tools usr/share/zoneminder/views -etc/zm -db/zm_create.sql usr/share/zoneminder/db -db/zm_update-*.sql usr/share/zoneminder/db -debian/apache.conf etc/zm diff --git a/distros/debian8/zoneminder-ui-base.links b/distros/debian8/zoneminder-ui-base.links new file mode 100644 index 000000000..994377ba1 --- /dev/null +++ b/distros/debian8/zoneminder-ui-base.links @@ -0,0 +1 @@ +usr/lib/cgi-bin usr/share/zoneminder/cgi-bin diff --git a/distros/debian8/zoneminder-ui-base.postinst b/distros/debian8/zoneminder-ui-base.postinst new file mode 100644 index 000000000..a5bce3c98 --- /dev/null +++ b/distros/debian8/zoneminder-ui-base.postinst @@ -0,0 +1,48 @@ +#! /bin/sh +# postinst maintainer script for zoneminder-ui-base package + +set -e + +# Source the debconf stuff +. /usr/share/debconf/confmodule + +apache_install() { + + mkdir -p /etc/apache2/conf-available + ln -sf ../../zm/apache.conf /etc/apache2/conf-available/zoneminder.conf + + COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) + + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke enconf zoneminder + elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then + [ -d /etc/apache2/conf.d/ ] && [ ! -L /etc/apache2/conf.d/zoneminder.conf ] && ln -s ../conf-available/zoneminder.conf /etc/apache2/conf.d/zoneminder.conf + fi + + # Enable CGI script module in apache (not enabled by default on jessie) + a2enmod cgi >/dev/null 2>&1 + + # Reload the web server + deb-systemd-invoke reload apache2.service || true +} + +# Do this when the package is installed, upgraded or reconfigured +if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then + + # Configure the web server + db_get zoneminder/webserver + webservers="$RET" + + for webserver in $webservers; do + webserver=${webserver%,} + # Currently we only support apache2 + if [ "$webserver" = "apache2" ] ; then + apache_install $1 + fi + done +fi + +#DEBHELPER# + +exit 0 diff --git a/distros/debian8/zoneminder-ui-base.postrm b/distros/debian8/zoneminder-ui-base.postrm new file mode 100644 index 000000000..13ee54d4a --- /dev/null +++ b/distros/debian8/zoneminder-ui-base.postrm @@ -0,0 +1,41 @@ +#! /bin/sh +# postrm maintainer script for zoneminder + +set -e + +# Source the debconf stuff +if [ -f /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule +fi + +apache_remove() { + COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) + if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then + . /usr/share/apache2/apache2-maintscript-helper + apache2_invoke disconf zoneminder + elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then + rm -f /etc/apache2/conf.d/zoneminder.conf + fi + rm -f /etc/apache2/conf-available/zoneminder.conf + # Reload the web server + deb-systemd-invoke reload apache2.service || true +} + +if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then + # Deconfigure the web server + db_get zoneminder/webserver + for webserver in $RET; do + webserver=${webserver%,} + # Currently we only support apache2 + if [ "$webserver" = "apache2" ] ; then + apache_remove $1 + fi + done +fi + +#DEBHELPER# + +# postrm rm may freeze without that +db_stop + +exit 0 diff --git a/distros/debian8/zoneminder-ui-base.templates b/distros/debian8/zoneminder-ui-base.templates new file mode 100644 index 000000000..31e70277f --- /dev/null +++ b/distros/debian8/zoneminder-ui-base.templates @@ -0,0 +1,7 @@ +Template: zoneminder/webserver +Type: multiselect +Choices: apache2 +Default: apache2 +_Description: Web server to reconfigure automatically: + Please choose the web server that should be automatically configured for + ZoneMinder's web portal access. diff --git a/distros/debian8/zoneminder-ui-classic.install b/distros/debian8/zoneminder-ui-classic.install new file mode 100644 index 000000000..9532d9dc9 --- /dev/null +++ b/distros/debian8/zoneminder-ui-classic.install @@ -0,0 +1 @@ +usr/share/zoneminder/skins/classic diff --git a/distros/debian8/zoneminder-ui-mobile.install b/distros/debian8/zoneminder-ui-mobile.install new file mode 100644 index 000000000..464bb74eb --- /dev/null +++ b/distros/debian8/zoneminder-ui-mobile.install @@ -0,0 +1 @@ +usr/share/zoneminder/skins/mobile diff --git a/distros/debian8/zoneminder-ui-xml.install b/distros/debian8/zoneminder-ui-xml.install new file mode 100644 index 000000000..6617707f8 --- /dev/null +++ b/distros/debian8/zoneminder-ui-xml.install @@ -0,0 +1 @@ +usr/share/zoneminder/skins/xml diff --git a/distros/debian8/zoneminder.postrm b/distros/debian8/zoneminder.postrm deleted file mode 100644 index d5cd11ebd..000000000 --- a/distros/debian8/zoneminder.postrm +++ /dev/null @@ -1,78 +0,0 @@ -#! /bin/sh -# postrm maintainer script for zoneminder - -set -e - -# Source the debconf stuff -if [ -f /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule -fi - -apache_remove() { - COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true) - if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then - . /usr/share/apache2/apache2-maintscript-helper - apache2_invoke disconf zoneminder - elif [ "$COMMON_STATE" = "installed" ] || [ "$COMMON_STATE" = "unpacked" ] ; then - rm -f /etc/apache2/conf.d/zoneminder.conf - fi - rm -f /etc/apache2/conf-available/zoneminder.conf - # Reload the web server - deb-systemd-invoke reload apache2.service || true -} - -# Source the dbconfig stuff -if [ -f /usr/share/dbconfig-common/dpkg/postrm ]; then - . /usr/share/dbconfig-common/dpkg/postrm - # Ask the user what do to with dbconfig when removing the package - dbc_go zoneminder $@ -fi - -if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then - - # Deconfigure the web server - db_get zoneminder/webserver - for webserver in $RET; do - webserver=${webserver%,} - # Currently we only support apache2 - if [ "$webserver" = "apache2" ] ; then - apache_remove $1 - fi - done - - # Remove dbconfig stuff added in postinst script - rm -rf /usr/share/dbconfig-common/data/zoneminder - - # No need to manually remove the zm database, dbconfig take care of this -fi - -if [ "$1" = "purge" ]; then - - # Delete a potential remaining file used in postinst script - rm -f /etc/zm/zm.conf.postinst.bak - - # Ask the user if we have to remove the cache directory even if not empty - if [ -d /var/cache/zoneminder ] \ - && [ ! $(find /var/cache/zoneminder -maxdepth 0 -type d -empty 2>/dev/null) ]; then - RET="" - db_input high zoneminder/ask_delete || true - db_go || true - db_get zoneminder/ask_delete - if [ "$RET" = "true" ]; then - RET="" - db_input high zoneminder/ask_delete_again || true - db_go || true - db_get zoneminder/ask_delete_again - if [ "$RET" = "true" ]; then - rm -rf /var/cache/zoneminder - fi - fi - fi -fi - -#DEBHELPER# - -# postrm rm may freeze without that -db_stop - -exit 0 From 3b3a4772a42a5b8fe983a3834ec420d0197f180b Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Tue, 16 Dec 2014 20:58:54 +0100 Subject: [PATCH 02/21] Fix installatino of man files and sql files --- distros/debian8/libzoneminder-perl.install | 12 ++++++++++++ distros/debian8/rules | 4 ++-- distros/debian8/zoneminder-db.install | 3 +-- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/distros/debian8/libzoneminder-perl.install b/distros/debian8/libzoneminder-perl.install index fb087b142..f8f8b4325 100644 --- a/distros/debian8/libzoneminder-perl.install +++ b/distros/debian8/libzoneminder-perl.install @@ -1,2 +1,14 @@ usr/share/perl5/ZoneMinder usr/share/perl5/ZoneMinder.pm +debian/tmp/usr/share/man/man3/ZoneMinder.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::Base.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::Config.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::ConfigAdmin.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::ConfigData.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::Control.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::Control::* +debian/tmp/usr/share/man/man3/ZoneMinder::Database.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::General.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::Logger.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::Memory.3pm +debian/tmp/usr/share/man/man3/ZoneMinder::Trigger::* diff --git a/distros/debian8/rules b/distros/debian8/rules index 4e97df736..a0029c44f 100755 --- a/distros/debian8/rules +++ b/distros/debian8/rules @@ -94,8 +94,8 @@ override_dh_fixperms: dh_fixperms # # As requested by the Debian Webapps Policy Manual §3.2.1 - chown root:www-data debian/zoneminder/etc/zm/zm.conf - chmod 640 debian/zoneminder/etc/zm/zm.conf + chown root:www-data debian/zoneminder-db/etc/zm/zm.conf + chmod 640 debian/zoneminder-db/etc/zm/zm.conf override_dh_auto_test: # do not run tests... diff --git a/distros/debian8/zoneminder-db.install b/distros/debian8/zoneminder-db.install index 22d9aeb27..6c3c77dbf 100644 --- a/distros/debian8/zoneminder-db.install +++ b/distros/debian8/zoneminder-db.install @@ -1,3 +1,2 @@ -db/zm_create.sql usr/share/zoneminder/db -db/zm_update-*.sql usr/share/zoneminder/db +usr/share/zoneminder/db etc/zm From 9f6e4dd79403adec2c632a56c9e0790cb3db787b Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Tue, 16 Dec 2014 21:15:11 +0100 Subject: [PATCH 03/21] Set the new dbg package name in the rules file --- distros/debian8/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian8/rules b/distros/debian8/rules index a0029c44f..2108608eb 100755 --- a/distros/debian8/rules +++ b/distros/debian8/rules @@ -105,7 +105,7 @@ override_dh_systemd_start: .PHONY: override_dh_strip override_dh_strip: - dh_strip --dbg-package=zoneminder-dbg + dh_strip --dbg-package=zoneminder-core-dbg # Inspired by https://wiki.debian.org/onlyjob/get-orig-source .PHONY: get-orig-source From 5e41665d880e6599af8ed94c61c910400ce6be71 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Thu, 18 Dec 2014 11:03:54 +0100 Subject: [PATCH 04/21] Fix some lintian errors and warning after package spliting --- distros/debian8/control | 20 ++- distros/debian8/po/templates.pot | 146 +++++++++++----------- distros/debian8/rules | 13 +- distros/debian8/zoneminder-core.config | 11 ++ distros/debian8/zoneminder-core.install | 2 +- distros/debian8/zoneminder-core.postinst | 9 ++ distros/debian8/zoneminder-core.postrm | 2 +- distros/debian8/zoneminder-core.preinst | 2 +- distros/debian8/zoneminder-db.config | 9 +- distros/debian8/zoneminder-db.install | 1 - distros/debian8/zoneminder-db.prerm | 2 +- distros/debian8/zoneminder-ui-base.links | 2 +- distros/debian8/zoneminder-ui-base.postrm | 2 +- 13 files changed, 123 insertions(+), 98 deletions(-) create mode 100644 distros/debian8/zoneminder-core.config diff --git a/distros/debian8/control b/distros/debian8/control index f7bbcc5a2..883680ee6 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -7,7 +7,12 @@ Standards-Version: 3.9.6 Package: zoneminder-core Architecture: any -Depends: libzoneminder-perl (= ${source:Version}), zoneminder-db (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, debconf, libpcre3, ffmpeg | libav-tools, rsyslog | system-log-daemon, netpbm, libavdevice55, libjpeg8|libjpeg9|libjpeg62-turbo, zip, libvlccore8, libvlc5, libgcrypt11|libgcrypt20, libpolkit-gobject-1-0, policykit-1 +Depends: libzoneminder-perl (= ${source:Version}), + zoneminder-db (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, + ${perl:Depends}, debconf, libpcre3, ffmpeg | libav-tools, + rsyslog | system-log-daemon, netpbm, libavdevice55, + libjpeg8 | libjpeg9 | libjpeg62-turbo, zip, libvlccore8, libvlc5, + libgcrypt11 | libgcrypt20, libpolkit-gobject-1-0, policykit-1 Description: Video camera security and surveillance solution ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child @@ -46,30 +51,33 @@ Description: Database management package for ZoneMinder ZoneMinder is a video camera security and surveillance solution. Package: zoneminder-ui-base -Architecture: all -Depends: zoneminder-core (= ${binary:Version}), ${misc:Depends}, debconf, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql | php5-mysqlnd +Architecture: any +Depends: zoneminder-core (= ${binary:Version}), ${shlibs:Depends}, + ${misc:Depends}, debconf, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, + php5, php5-mysql | php5-mysqlnd Description: Essential files for the web user interface of ZoneMinder ZoneMinder is a video camera security and surveillance solution. Package: zoneminder-ui-classic Architecture: all -Depends: zoneminder-ui-base (= ${source:Version}), ${misc:Depends} +Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} Description: Classic web user interface for ZoneMinder ZoneMinder is a video camera security and surveillance solution. Package: zoneminder-ui-mobile Architecture: all -Depends: zoneminder-ui-base (= ${source:Version}), ${misc:Depends} +Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} Description: Mobile web user interface for ZoneMinder ZoneMinder is a video camera security and surveillance solution. Package: zoneminder-ui-xml Architecture: all -Depends: zoneminder-ui-base (= ${source:Version}), ${misc:Depends} +Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} Description: XML interface for ZoneMinder ZoneMinder is a video camera security and surveillance solution. Package: libzoneminder-perl +Section: perl Architecture: all Depends: ${misc:Depends}, ${perl:Depends}, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, liburi-encode-perl Description: Perl libraries for ZoneMinder diff --git a/distros/debian8/po/templates.pot b/distros/debian8/po/templates.pot index 7d10caa4b..8513477f0 100644 --- a/distros/debian8/po/templates.pot +++ b/distros/debian8/po/templates.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: zoneminder\n" "Report-Msgid-Bugs-To: zoneminder@packages.debian.org\n" -"POT-Creation-Date: 2014-12-12 12:28+0100\n" +"POT-Creation-Date: 2014-12-16 12:34+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,27 +17,71 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:1001 +msgid "Delete this non empty directory?" +msgstr "" + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:1001 +msgid "" +"A purge of the ZoneMinder package is performed but the directory '/var/cache/" +"zoneminder' is not empty so it will not be deleted." +msgstr "" + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:1001 +msgid "" +"Please consider that this directory is designed to contain data resulting " +"from event detection. Therefore, \"proof of evidence\" could be lost!\"" +msgstr "" + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:1001 +msgid "" +"If you are not sure of your decision, please do not delete this directory " +"but perform a manual checkup." +msgstr "" + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:2001 +msgid "Deletion confirmed?" +msgstr "" + +#. Type: boolean +#. Description +#: ../zoneminder-core.templates:2001 +msgid "" +"You have allowed the deletion of directory '/var/cache/zoneminder' although " +"it may contain critical data." +msgstr "" + #. Type: select #. Choices -#: ../zoneminder.templates:1001 +#: ../zoneminder-db.templates:1001 msgid "local" msgstr "" #. Type: select #. Choices -#: ../zoneminder.templates:1001 +#: ../zoneminder-db.templates:1001 msgid "remote" msgstr "" #. Type: select #. Description -#: ../zoneminder.templates:1002 +#: ../zoneminder-db.templates:1002 msgid "Database location:" msgstr "" #. Type: select #. Description -#: ../zoneminder.templates:1002 +#: ../zoneminder-db.templates:1002 msgid "" "A database server is required to run ZoneMinder. The database can be " "installed either locally or remotely on a machine of your network." @@ -45,7 +89,7 @@ msgstr "" #. Type: select #. Description -#: ../zoneminder.templates:1002 +#: ../zoneminder-db.templates:1002 msgid "" "If you choose a remote location, you will have to select the 'tcp/ip' " "connection method and enter the hostname or ip address of the remote machine " @@ -54,13 +98,13 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:2001 +#: ../zoneminder-db.templates:2001 msgid "No local database server is available:" msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:2001 +#: ../zoneminder-db.templates:2001 msgid "" "Currently ZoneMinder supports mysql or mariadb database server but none of " "them appears to be installed on this machine." @@ -68,7 +112,7 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:2001 +#: ../zoneminder-db.templates:2001 msgid "" "In order to complete ZoneMinder's installation, after ending of this " "assistant, please install a compatible database server and then restart the " @@ -79,19 +123,19 @@ msgstr "" #. Description #. Type: error #. Description -#: ../zoneminder.templates:2001 ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:2001 ../zoneminder-db.templates:3001 msgid "$ sudo dpkg-reconfigure zoneminder" msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "Remote database servers are not allowed:" msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "" "The current configuration of dbconfig-common does not allow installation of " "a database on remote servers." @@ -99,7 +143,7 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "" "In order to reconfigure dbconfig-common, please invoke the following command " "after ending of this assistant:" @@ -107,47 +151,33 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "$ sudo dpkg-reconfigure dbconfig-common" msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:3001 +#: ../zoneminder-db.templates:3001 msgid "" "Then, to complete ZoneMinder's installation, please restart this assistant " "by invoking:" msgstr "" -#. Type: multiselect -#. Description -#: ../zoneminder.templates:4001 -msgid "Web server to reconfigure automatically:" -msgstr "" - -#. Type: multiselect -#. Description -#: ../zoneminder.templates:4001 -msgid "" -"Please choose the web server that should be automatically configured for " -"ZoneMinder's web portal access." -msgstr "" - #. Type: password #. Description -#: ../zoneminder.templates:5001 +#: ../zoneminder-db.templates:4001 msgid "New password for the ZoneMinder 'admin' user:" msgstr "" #. Type: password #. Description -#: ../zoneminder.templates:5001 +#: ../zoneminder-db.templates:4001 msgid "Please enter the password of the default administrative user." msgstr "" #. Type: password #. Description -#: ../zoneminder.templates:5001 +#: ../zoneminder-db.templates:4001 msgid "" "While not mandatory, it is highly recommended that you set a custom password " "for the administrative 'admin' user." @@ -155,68 +185,38 @@ msgstr "" #. Type: password #. Description -#: ../zoneminder.templates:5001 +#: ../zoneminder-db.templates:4001 msgid "If this field is left blank, the password will not be changed." msgstr "" #. Type: password #. Description -#: ../zoneminder.templates:6001 +#: ../zoneminder-db.templates:5001 msgid "Repeat password for the ZoneMinder 'admin' user:" msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:7001 +#: ../zoneminder-db.templates:6001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../zoneminder.templates:7001 +#: ../zoneminder-db.templates:6001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" -#. Type: boolean +#. Type: multiselect #. Description -#: ../zoneminder.templates:8001 -msgid "Delete this non empty directory?" +#: ../zoneminder-ui-base.templates:1001 +msgid "Web server to reconfigure automatically:" msgstr "" -#. Type: boolean +#. Type: multiselect #. Description -#: ../zoneminder.templates:8001 +#: ../zoneminder-ui-base.templates:1001 msgid "" -"A purge of the ZoneMinder package is performed but the directory '/var/cache/" -"zoneminder' is not empty so it will not be deleted." -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder.templates:8001 -msgid "" -"Please consider that this directory is designed to contain data resulting " -"from event detection. Therefore, \"proof of evidence\" could be lost!\"" -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder.templates:8001 -msgid "" -"If you are not sure of your decision, please do not delete this directory " -"but perform a manual checkup." -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder.templates:9001 -msgid "Deletion confirmed?" -msgstr "" - -#. Type: boolean -#. Description -#: ../zoneminder.templates:9001 -msgid "" -"You have allowed the deletion of directory '/var/cache/zoneminder' although " -"it may contain critical data." +"Please choose the web server that should be automatically configured for " +"ZoneMinder's web portal access." msgstr "" diff --git a/distros/debian8/rules b/distros/debian8/rules index 2108608eb..10df6d451 100755 --- a/distros/debian8/rules +++ b/distros/debian8/rules @@ -79,23 +79,22 @@ override_dh_install: rm -rf debian/zoneminder/usr/share/zoneminder/events rm -rf debian/zoneminder/usr/share/zoneminder/images rm -rf debian/zoneminder/usr/share/zoneminder/temp - dh_link var/cache/zoneminder/events usr/share/zoneminder/events - dh_link var/cache/zoneminder/images usr/share/zoneminder/images - dh_link var/cache/zoneminder/temp usr/share/zoneminder/temp + # The link stuff for these folders has been moved to + # zoneminder-core.links file # # This is a slightly lesser kludge; moving the cgi stuff to # /usr/share/zoneminder/cgi-bin breaks one set of behavior, # having it just in /usr/lib/cgi-bin breaks another bit of # behavior. - # - dh_link usr/lib/cgi-bin usr/share/zoneminder/cgi-bin + # The link stuff for /usr/share/zoneminder/cgi-bin has been moved to + # zoneminder-ui-base.links file override_dh_fixperms: dh_fixperms # # As requested by the Debian Webapps Policy Manual §3.2.1 - chown root:www-data debian/zoneminder-db/etc/zm/zm.conf - chmod 640 debian/zoneminder-db/etc/zm/zm.conf + chown root:www-data debian/zoneminder-core/etc/zm/zm.conf + chmod 640 debian/zoneminder-core/etc/zm/zm.conf override_dh_auto_test: # do not run tests... diff --git a/distros/debian8/zoneminder-core.config b/distros/debian8/zoneminder-core.config new file mode 100644 index 000000000..2a15a599e --- /dev/null +++ b/distros/debian8/zoneminder-core.config @@ -0,0 +1,11 @@ +#!/bin/sh +# config maintainer script for zoneminder-core package + +set -e + +# Source the debconf stuff +. /usr/share/debconf/confmodule + +#DEBHELPER# + +exit 0 diff --git a/distros/debian8/zoneminder-core.install b/distros/debian8/zoneminder-core.install index de54e5c89..afd9ada95 100644 --- a/distros/debian8/zoneminder-core.install +++ b/distros/debian8/zoneminder-core.install @@ -1,4 +1,4 @@ +etc/zm usr/bin -usr/lib/cgi-bin usr/share/polkit-1/actions usr/share/polkit-1/rules.d diff --git a/distros/debian8/zoneminder-core.postinst b/distros/debian8/zoneminder-core.postinst index 364dbb749..37ebe25e9 100644 --- a/distros/debian8/zoneminder-core.postinst +++ b/distros/debian8/zoneminder-core.postinst @@ -3,6 +3,15 @@ set -e +# Source the debconf stuff +. /usr/share/debconf/confmodule + +# Source the config file if exists +CONFIGFILE=/etc/zm/zm.conf +if [ -e $CONFIGFILE ]; then + . $CONFIGFILE +fi + # Do this when the package is installed, upgraded or reconfigured if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then diff --git a/distros/debian8/zoneminder-core.postrm b/distros/debian8/zoneminder-core.postrm index c202fd3bf..d75e75e8b 100644 --- a/distros/debian8/zoneminder-core.postrm +++ b/distros/debian8/zoneminder-core.postrm @@ -1,5 +1,5 @@ #! /bin/sh -# postrm maintainer script for zoneminder +# postrm maintainer script for zoneminder-core package set -e diff --git a/distros/debian8/zoneminder-core.preinst b/distros/debian8/zoneminder-core.preinst index f9c518431..3ed1ef661 100644 --- a/distros/debian8/zoneminder-core.preinst +++ b/distros/debian8/zoneminder-core.preinst @@ -1,5 +1,5 @@ #!/bin/sh -# preinst maintainer script for zoneminder +# preinst maintainer script for zoneminder-core package set -e diff --git a/distros/debian8/zoneminder-db.config b/distros/debian8/zoneminder-db.config index f6be6d901..e03153ce8 100644 --- a/distros/debian8/zoneminder-db.config +++ b/distros/debian8/zoneminder-db.config @@ -13,6 +13,10 @@ dbc_first_version="1.28.0" CONFIGFILE=/etc/zm/zm.conf if [ -e $CONFIGFILE ]; then . $CONFIGFILE + # Re-use data from ZM config file + dbc_dbserver="$ZM_DB_HOST" + dbc_dbname="$ZM_DB_NAME" + dbc_dbuser="$ZM_DB_USER" fi if [ -f /usr/share/dbconfig-common/dpkg/config ]; then @@ -26,11 +30,6 @@ if [ -f /usr/share/dbconfig-common/dpkg/config ]; then # Set authentication method to password dbc_authmethod_user="password" - # Re-use data from ZM config file - dbc_dbserver="$ZM_DB_HOST" - dbc_dbname="$ZM_DB_NAME" - dbc_dbuser="$ZM_DB_USER" - # Source the dbconfig-common stuff . /usr/share/dbconfig-common/dpkg/config fi diff --git a/distros/debian8/zoneminder-db.install b/distros/debian8/zoneminder-db.install index 6c3c77dbf..756c5bbfa 100644 --- a/distros/debian8/zoneminder-db.install +++ b/distros/debian8/zoneminder-db.install @@ -1,2 +1 @@ usr/share/zoneminder/db -etc/zm diff --git a/distros/debian8/zoneminder-db.prerm b/distros/debian8/zoneminder-db.prerm index 0adf963e5..31786116a 100644 --- a/distros/debian8/zoneminder-db.prerm +++ b/distros/debian8/zoneminder-db.prerm @@ -1,5 +1,5 @@ #!/bin/sh -# prerm script for zoneminder +# prerm script for zoneminder-db package set -e diff --git a/distros/debian8/zoneminder-ui-base.links b/distros/debian8/zoneminder-ui-base.links index 994377ba1..b00a147d6 100644 --- a/distros/debian8/zoneminder-ui-base.links +++ b/distros/debian8/zoneminder-ui-base.links @@ -1 +1 @@ -usr/lib/cgi-bin usr/share/zoneminder/cgi-bin +usr/lib/cgi-bin usr/share/zoneminder/cgi-bin diff --git a/distros/debian8/zoneminder-ui-base.postrm b/distros/debian8/zoneminder-ui-base.postrm index 13ee54d4a..441bb5218 100644 --- a/distros/debian8/zoneminder-ui-base.postrm +++ b/distros/debian8/zoneminder-ui-base.postrm @@ -1,5 +1,5 @@ #! /bin/sh -# postrm maintainer script for zoneminder +# postrm maintainer script for zoneminder-ui-base package set -e From 9745a1fb0b873f1b491f85a32474b90f7a123161 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Thu, 18 Dec 2014 15:04:50 +0100 Subject: [PATCH 05/21] Remove useless file libzoneminder-perl.manpages --- distros/debian8/libzoneminder-perl.manpages | 11 ----------- 1 file changed, 11 deletions(-) delete mode 100644 distros/debian8/libzoneminder-perl.manpages diff --git a/distros/debian8/libzoneminder-perl.manpages b/distros/debian8/libzoneminder-perl.manpages deleted file mode 100644 index 3b0f27336..000000000 --- a/distros/debian8/libzoneminder-perl.manpages +++ /dev/null @@ -1,11 +0,0 @@ -usr/share/man/man3/ZoneMinder.3pm.gz -usr/share/man/man3/ZoneMinder::Base.3pm.gz -usr/share/man/man3/ZoneMinder::Config.3pm.gz -usr/share/man/man3/ZoneMinder::ConfigAdmin.3pm.gz -usr/share/man/man3/ZoneMinder::ConfigData.3pm.gz -usr/share/man/man3/ZoneMinder::Control::* -usr/share/man/man3/ZoneMinder::Database.3pm.gz -usr/share/man/man3/ZoneMinder::General.3pm.gz -usr/share/man/man3/ZoneMinder::Logger.3pm.gz -usr/share/man/man3/ZoneMinder::Memory.3pm.gz -usr/share/man/man3/ZoneMinder::Trigger::* From 27ca8f7ee4f96f4621fadb81d6fc5e9adbe42553 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Thu, 18 Dec 2014 20:05:59 +0100 Subject: [PATCH 06/21] Rename database package and update descriptions --- distros/debian8/control | 71 +++++++++++++------ distros/debian8/po/POTFILES.in | 2 +- distros/debian8/po/fr.po | 42 +++++------ distros/debian8/po/templates.pot | 42 +++++------ ...r-db.config => zoneminder-database.config} | 0 ...inder-db.dirs => zoneminder-database.dirs} | 0 ...db.install => zoneminder-database.install} | 0 ....postinst => zoneminder-database.postinst} | 0 ...r-db.postrm => zoneminder-database.postrm} | 0 ...der-db.prerm => zoneminder-database.prerm} | 0 ...emplates => zoneminder-database.templates} | 0 11 files changed, 91 insertions(+), 66 deletions(-) rename distros/debian8/{zoneminder-db.config => zoneminder-database.config} (100%) rename distros/debian8/{zoneminder-db.dirs => zoneminder-database.dirs} (100%) rename distros/debian8/{zoneminder-db.install => zoneminder-database.install} (100%) rename distros/debian8/{zoneminder-db.postinst => zoneminder-database.postinst} (100%) rename distros/debian8/{zoneminder-db.postrm => zoneminder-database.postrm} (100%) rename distros/debian8/{zoneminder-db.prerm => zoneminder-database.prerm} (100%) rename distros/debian8/{zoneminder-db.templates => zoneminder-database.templates} (100%) diff --git a/distros/debian8/control b/distros/debian8/control index 883680ee6..5cbc0ecad 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -5,15 +5,11 @@ Maintainer: Isaac Connor Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), dh-systemd (>= 1.5), autoconf, automake, quilt, libphp-serialization-perl, libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev|libgcrypt20-dev, libpolkit-gobject-1-dev Standards-Version: 3.9.6 -Package: zoneminder-core -Architecture: any -Depends: libzoneminder-perl (= ${source:Version}), - zoneminder-db (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, - ${perl:Depends}, debconf, libpcre3, ffmpeg | libav-tools, - rsyslog | system-log-daemon, netpbm, libavdevice55, - libjpeg8 | libjpeg9 | libjpeg62-turbo, zip, libvlccore8, libvlc5, - libgcrypt11 | libgcrypt20, libpolkit-gobject-1-0, policykit-1 -Description: Video camera security and surveillance solution +Package: zoneminder +Section: metapackages +Architecture: all +Depends: zoneminder-core, zoneminder-ui-classic, ${misc:Depends} +Description: Video camera security and surveillance solution (metapackage) ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child or family member or home monitoring and other care scenarios. It @@ -25,60 +21,89 @@ Description: Video camera security and surveillance solution and surveillance. It can also be integrated into a home automation system via X.10 or other protocols. +Package: zoneminder-core +Section: video +Architecture: any +Depends: libzoneminder-perl (= ${source:Version}), + zoneminder-database (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, + ${perl:Depends}, debconf, ffmpeg | libav-tools, rsyslog | system-log-daemon, + netpbm, zip, policykit-1 +Description: Core binaries and perl scripts for ZoneMinder + ZoneMinder is a video camera security and surveillance solution. + . + This package provides the executable compiled binaries which do the main video + processing work and the perl scripts which perform helper and/or external + interface tasks. + Package: zoneminder-core-dbg Priority: extra Section: debug Architecture: any Depends: zoneminder-core (= ${binary:Version}), ${misc:Depends} -Description: Debugging symbols for zoneminder. +Description: Debugging symbols for ZoneMinder ZoneMinder is a video camera security and surveillance solution. - ZoneMinder is intended for use in single or multi-camera video security - applications, including commercial or home CCTV, theft prevention and child - or family member or home monitoring and other care scenarios. It - supports capture, analysis, recording, and monitoring of video data coming - from one or more video or network cameras attached to a Linux system. - ZoneMinder also support web and semi-automatic control of Pan/Tilt/Zoom - cameras using a variety of protocols. It is suitable for use as a home - video security system and for commercial or professional video security - and surveillance. It can also be integrated into a home automation system - via X.10 or other protocols. + . + This package provides the debugging symbols for the executable compiled + binaries. -Package: zoneminder-db +Package: zoneminder-database +Section: database Architecture: all Depends: ${misc:Depends}, debconf, dbconfig-common, mariadb-client|mysql-client Recommends: mysql-server|mariadb-server Description: Database management package for ZoneMinder ZoneMinder is a video camera security and surveillance solution. + . + This package provides the sql files and maintenance scripts to perform all the + database operations (installation, upgrade or removal) on a local or a remote + server. Package: zoneminder-ui-base +Section: web Architecture: any Depends: zoneminder-core (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends}, debconf, apache2, libapache2-mod-php5 | libapache2-mod-fcgid, php5, php5-mysql | php5-mysqlnd -Description: Essential files for the web user interface of ZoneMinder +Description: Essential files for ZoneMinder's web user interface ZoneMinder is a video camera security and surveillance solution. + . + This package provides the essential web files and maintenance scripts to set up + a basic web environment. Package: zoneminder-ui-classic +Section: web Architecture: all Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} Description: Classic web user interface for ZoneMinder ZoneMinder is a video camera security and surveillance solution. + . + This package provides the classic web user interface. Package: zoneminder-ui-mobile +Section: web Architecture: all Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} Description: Mobile web user interface for ZoneMinder ZoneMinder is a video camera security and surveillance solution. + . + This package provides the web user interface for mobile devices. Package: zoneminder-ui-xml +Section: web Architecture: all Depends: zoneminder-ui-base (>= ${source:Version}), ${misc:Depends} Description: XML interface for ZoneMinder ZoneMinder is a video camera security and surveillance solution. + . + This package provides a XML interface mainly intended for use with the eyeZm + iPhone Application, but can be used with any other custom programs as well. Package: libzoneminder-perl Section: perl Architecture: all -Depends: ${misc:Depends}, ${perl:Depends}, libphp-serialization-perl, libdate-manip-perl, libmime-lite-perl, libmime-tools-perl, libwww-perl, libarchive-tar-perl, libarchive-zip-perl, libdevice-serialport-perl, libmodule-load-perl, libsys-mmap-perl, libjson-any-perl, libnet-sftp-foreign-perl, libio-pty-perl, libexpect-perl, liburi-encode-perl +Depends: ${misc:Depends}, ${perl:Depends} Description: Perl libraries for ZoneMinder ZoneMinder is a video camera security and surveillance solution. + . + This package provides the libraries for the perl scripts, it can be used to + write custom interfaces as well. diff --git a/distros/debian8/po/POTFILES.in b/distros/debian8/po/POTFILES.in index ba681775e..5b155907e 100644 --- a/distros/debian8/po/POTFILES.in +++ b/distros/debian8/po/POTFILES.in @@ -1,3 +1,3 @@ [type: gettext/rfc822deb] zoneminder-core.templates -[type: gettext/rfc822deb] zoneminder-db.templates +[type: gettext/rfc822deb] zoneminder-database.templates [type: gettext/rfc822deb] zoneminder-ui-base.templates diff --git a/distros/debian8/po/fr.po b/distros/debian8/po/fr.po index ca622bb24..85ced7fd2 100644 --- a/distros/debian8/po/fr.po +++ b/distros/debian8/po/fr.po @@ -71,25 +71,25 @@ msgstr "" #. Type: select #. Choices -#: ../zoneminder-db.templates:1001 +#: ../zoneminder-database.templates:1001 msgid "local" msgstr "local" #. Type: select #. Choices -#: ../zoneminder-db.templates:1001 +#: ../zoneminder-database.templates:1001 msgid "remote" msgstr "distant" #. Type: select #. Description -#: ../zoneminder-db.templates:1002 +#: ../zoneminder-database.templates:1002 msgid "Database location:" msgstr "Emplacement de la base de donnée :" #. Type: select #. Description -#: ../zoneminder-db.templates:1002 +#: ../zoneminder-database.templates:1002 msgid "" "A database server is required to run ZoneMinder. The database can be " "installed either locally or remotely on a machine of your network." @@ -99,7 +99,7 @@ msgstr "" #. Type: select #. Description -#: ../zoneminder-db.templates:1002 +#: ../zoneminder-database.templates:1002 msgid "" "If you choose a remote location, you will have to select the 'tcp/ip' " "connection method and enter the hostname or ip address of the remote machine " @@ -111,13 +111,13 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:2001 +#: ../zoneminder-database.templates:2001 msgid "No local database server is available:" msgstr "Aucun serveur local de base de données n'est disponible :" #. Type: error #. Description -#: ../zoneminder-db.templates:2001 +#: ../zoneminder-database.templates:2001 msgid "" "Currently ZoneMinder supports mysql or mariadb database server but none of " "them appears to be installed on this machine." @@ -127,7 +127,7 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:2001 +#: ../zoneminder-database.templates:2001 msgid "" "In order to complete ZoneMinder's installation, after ending of this " "assistant, please install a compatible database server and then restart the " @@ -141,19 +141,19 @@ msgstr "" #. Description #. Type: error #. Description -#: ../zoneminder-db.templates:2001 ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:2001 ../zoneminder-database.templates:3001 msgid "$ sudo dpkg-reconfigure zoneminder" msgstr "$ sudo dpkg-reconfigure zoneminder" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "Remote database servers are not allowed:" msgstr "Les serveurs de base de données distants ne sont pas autorisés :" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "" "The current configuration of dbconfig-common does not allow installation of " "a database on remote servers." @@ -163,7 +163,7 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "" "In order to reconfigure dbconfig-common, please invoke the following command " "after ending of this assistant:" @@ -173,13 +173,13 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "$ sudo dpkg-reconfigure dbconfig-common" msgstr "$ sudo dpkg-reconfigure dbconfig-common" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "" "Then, to complete ZoneMinder's installation, please restart this assistant " "by invoking:" @@ -189,19 +189,19 @@ msgstr "" #. Type: password #. Description -#: ../zoneminder-db.templates:4001 +#: ../zoneminder-database.templates:4001 msgid "New password for the ZoneMinder 'admin' user:" msgstr "Nouveau mot de passe pour le compte 'admin' de ZoneMinder :" #. Type: password #. Description -#: ../zoneminder-db.templates:4001 +#: ../zoneminder-database.templates:4001 msgid "Please enter the password of the default administrative user." msgstr "Veuillez entrer le mot de passe du compte administrateur par défaut." #. Type: password #. Description -#: ../zoneminder-db.templates:4001 +#: ../zoneminder-database.templates:4001 msgid "" "While not mandatory, it is highly recommended that you set a custom password " "for the administrative 'admin' user." @@ -211,25 +211,25 @@ msgstr "" #. Type: password #. Description -#: ../zoneminder-db.templates:4001 +#: ../zoneminder-database.templates:4001 msgid "If this field is left blank, the password will not be changed." msgstr "Si le champ est laissé vide, le mot de passe ne sera pas changé." #. Type: password #. Description -#: ../zoneminder-db.templates:5001 +#: ../zoneminder-database.templates:5001 msgid "Repeat password for the ZoneMinder 'admin' user:" msgstr "Répéter le mot de passe pour le compte 'admin' de ZoneMinder :" #. Type: error #. Description -#: ../zoneminder-db.templates:6001 +#: ../zoneminder-database.templates:6001 msgid "Password input error" msgstr "Erreur de mot de passe" #. Type: error #. Description -#: ../zoneminder-db.templates:6001 +#: ../zoneminder-database.templates:6001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" "Les deux mots de passe saisis ne sont pas les mêmes. Veuillez essayer à " diff --git a/distros/debian8/po/templates.pot b/distros/debian8/po/templates.pot index 8513477f0..941a4094e 100644 --- a/distros/debian8/po/templates.pot +++ b/distros/debian8/po/templates.pot @@ -63,25 +63,25 @@ msgstr "" #. Type: select #. Choices -#: ../zoneminder-db.templates:1001 +#: ../zoneminder-database.templates:1001 msgid "local" msgstr "" #. Type: select #. Choices -#: ../zoneminder-db.templates:1001 +#: ../zoneminder-database.templates:1001 msgid "remote" msgstr "" #. Type: select #. Description -#: ../zoneminder-db.templates:1002 +#: ../zoneminder-database.templates:1002 msgid "Database location:" msgstr "" #. Type: select #. Description -#: ../zoneminder-db.templates:1002 +#: ../zoneminder-database.templates:1002 msgid "" "A database server is required to run ZoneMinder. The database can be " "installed either locally or remotely on a machine of your network." @@ -89,7 +89,7 @@ msgstr "" #. Type: select #. Description -#: ../zoneminder-db.templates:1002 +#: ../zoneminder-database.templates:1002 msgid "" "If you choose a remote location, you will have to select the 'tcp/ip' " "connection method and enter the hostname or ip address of the remote machine " @@ -98,13 +98,13 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:2001 +#: ../zoneminder-database.templates:2001 msgid "No local database server is available:" msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:2001 +#: ../zoneminder-database.templates:2001 msgid "" "Currently ZoneMinder supports mysql or mariadb database server but none of " "them appears to be installed on this machine." @@ -112,7 +112,7 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:2001 +#: ../zoneminder-database.templates:2001 msgid "" "In order to complete ZoneMinder's installation, after ending of this " "assistant, please install a compatible database server and then restart the " @@ -123,19 +123,19 @@ msgstr "" #. Description #. Type: error #. Description -#: ../zoneminder-db.templates:2001 ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:2001 ../zoneminder-database.templates:3001 msgid "$ sudo dpkg-reconfigure zoneminder" msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "Remote database servers are not allowed:" msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "" "The current configuration of dbconfig-common does not allow installation of " "a database on remote servers." @@ -143,7 +143,7 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "" "In order to reconfigure dbconfig-common, please invoke the following command " "after ending of this assistant:" @@ -151,13 +151,13 @@ msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "$ sudo dpkg-reconfigure dbconfig-common" msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:3001 +#: ../zoneminder-database.templates:3001 msgid "" "Then, to complete ZoneMinder's installation, please restart this assistant " "by invoking:" @@ -165,19 +165,19 @@ msgstr "" #. Type: password #. Description -#: ../zoneminder-db.templates:4001 +#: ../zoneminder-database.templates:4001 msgid "New password for the ZoneMinder 'admin' user:" msgstr "" #. Type: password #. Description -#: ../zoneminder-db.templates:4001 +#: ../zoneminder-database.templates:4001 msgid "Please enter the password of the default administrative user." msgstr "" #. Type: password #. Description -#: ../zoneminder-db.templates:4001 +#: ../zoneminder-database.templates:4001 msgid "" "While not mandatory, it is highly recommended that you set a custom password " "for the administrative 'admin' user." @@ -185,25 +185,25 @@ msgstr "" #. Type: password #. Description -#: ../zoneminder-db.templates:4001 +#: ../zoneminder-database.templates:4001 msgid "If this field is left blank, the password will not be changed." msgstr "" #. Type: password #. Description -#: ../zoneminder-db.templates:5001 +#: ../zoneminder-database.templates:5001 msgid "Repeat password for the ZoneMinder 'admin' user:" msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:6001 +#: ../zoneminder-database.templates:6001 msgid "Password input error" msgstr "" #. Type: error #. Description -#: ../zoneminder-db.templates:6001 +#: ../zoneminder-database.templates:6001 msgid "The two passwords you entered were not the same. Please try again." msgstr "" diff --git a/distros/debian8/zoneminder-db.config b/distros/debian8/zoneminder-database.config similarity index 100% rename from distros/debian8/zoneminder-db.config rename to distros/debian8/zoneminder-database.config diff --git a/distros/debian8/zoneminder-db.dirs b/distros/debian8/zoneminder-database.dirs similarity index 100% rename from distros/debian8/zoneminder-db.dirs rename to distros/debian8/zoneminder-database.dirs diff --git a/distros/debian8/zoneminder-db.install b/distros/debian8/zoneminder-database.install similarity index 100% rename from distros/debian8/zoneminder-db.install rename to distros/debian8/zoneminder-database.install diff --git a/distros/debian8/zoneminder-db.postinst b/distros/debian8/zoneminder-database.postinst similarity index 100% rename from distros/debian8/zoneminder-db.postinst rename to distros/debian8/zoneminder-database.postinst diff --git a/distros/debian8/zoneminder-db.postrm b/distros/debian8/zoneminder-database.postrm similarity index 100% rename from distros/debian8/zoneminder-db.postrm rename to distros/debian8/zoneminder-database.postrm diff --git a/distros/debian8/zoneminder-db.prerm b/distros/debian8/zoneminder-database.prerm similarity index 100% rename from distros/debian8/zoneminder-db.prerm rename to distros/debian8/zoneminder-database.prerm diff --git a/distros/debian8/zoneminder-db.templates b/distros/debian8/zoneminder-database.templates similarity index 100% rename from distros/debian8/zoneminder-db.templates rename to distros/debian8/zoneminder-database.templates From ae1bf955e56d9d9dc4ea946dcf3ac5bb1a9e6598 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Fri, 19 Dec 2014 15:49:40 +0100 Subject: [PATCH 07/21] Update zm.conf file in package which provide it --- distros/debian8/zoneminder-core.postinst | 49 +++++++++++++++++-- distros/debian8/zoneminder-database.config | 20 ++++++-- distros/debian8/zoneminder-database.postinst | 51 -------------------- 3 files changed, 60 insertions(+), 60 deletions(-) diff --git a/distros/debian8/zoneminder-core.postinst b/distros/debian8/zoneminder-core.postinst index 37ebe25e9..1f047536b 100644 --- a/distros/debian8/zoneminder-core.postinst +++ b/distros/debian8/zoneminder-core.postinst @@ -6,20 +6,61 @@ set -e # Source the debconf stuff . /usr/share/debconf/confmodule -# Source the config file if exists +# Source the config file CONFIGFILE=/etc/zm/zm.conf -if [ -e $CONFIGFILE ]; then - . $CONFIGFILE -fi +. $CONFIGFILE # Do this when the package is installed, upgraded or reconfigured if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then + # Retrieve data from dbconfig (inputs from user) + . /etc/dbconfig-common/zoneminder.conf + + # ZoneMinder config file handling + # Inspired by: http://manpages.debian.org/cgi-bin/man.cgi?query=debconf-devel&sektion=7 + + # Backup the config file + cp -a -f $CONFIGFILE ${CONFIGFILE}.postinst.bak + + # Redeclare variables if missing in config file + test -z $dbc_dbserver || grep -Eq "^ *ZM_DB_HOST=" $CONFIGFILE \ + || echo "ZM_DB_HOST=" >> ${CONFIGFILE}.postinst.bak + test -z $dbc_dbname || grep -Eq "^ *ZM_DB_NAME=" $CONFIGFILE \ + || echo "ZM_DB_NAME=" >> ${CONFIGFILE}.postinst.bak + test -z $dbc_dbuser || grep -Eq "^ *ZM_DB_USER=" $CONFIGFILE \ + || echo "ZM_DB_USER=" >> ${CONFIGFILE}.postinst.bak + test -z $dbc_dbpass || grep -Eq "^ *ZM_DB_PASS=" $CONFIGFILE \ + || echo "ZM_DB_PASS=" >> ${CONFIGFILE}.postinst.bak + + # Prevent ZM_DB_HOST to be empty if user selected the 'unix socket' method + if test -z $dbc_dbserver; then + dbc_dbserver_override="localhost" + else + dbc_dbserver_override=$dbc_dbserver + fi + + # Update variables in config file + sed -i "s/^ *ZM_DB_HOST=.*/ZM_DB_HOST=$dbc_dbserver_override/" \ + ${CONFIGFILE}.postinst.bak + test -z $dbc_dbname || sed -i "s/^ *ZM_DB_NAME=.*/ZM_DB_NAME=$dbc_dbname/" \ + ${CONFIGFILE}.postinst.bak + test -z $dbc_dbuser || sed -i "s/^ *ZM_DB_USER=.*/ZM_DB_USER=$dbc_dbuser/" \ + ${CONFIGFILE}.postinst.bak + test -z $dbc_dbpass || sed -i "s/^ *ZM_DB_PASS=.*/ZM_DB_PASS=$dbc_dbpass/" \ + ${CONFIGFILE}.postinst.bak + + # Clean-up backup file + mv -f ${CONFIGFILE}.postinst.bak $CONFIGFILE + + # Set some file permissions chown $ZM_WEB_USER:$ZM_WEB_GROUP /var/log/zm if [ -z "$2" ]; then chown $ZM_WEB_USER:$ZM_WEB_GROUP -R /var/cache/zoneminder fi + # As requested by the Debian Webapps Policy Manual §3.2.1 + chown root:${ZM_WEB_GROUP} $CONFIGFILE + chmod 640 $CONFIGFILE fi #DEBHELPER# diff --git a/distros/debian8/zoneminder-database.config b/distros/debian8/zoneminder-database.config index e03153ce8..5c5b0afe5 100644 --- a/distros/debian8/zoneminder-database.config +++ b/distros/debian8/zoneminder-database.config @@ -9,16 +9,26 @@ set -e # Set the first version in which dbconfig-common was introduced in the package dbc_first_version="1.28.0" -# Source the config file if exists CONFIGFILE=/etc/zm/zm.conf if [ -e $CONFIGFILE ]; then + # Source the config file if exists . $CONFIGFILE - # Re-use data from ZM config file - dbc_dbserver="$ZM_DB_HOST" - dbc_dbname="$ZM_DB_NAME" - dbc_dbuser="$ZM_DB_USER" +elif [ -e ${CONFIGFILE}.dpkg-new ]; then + # If no config file, source the config file which is going to be installed + # by the core package + . ${CONFIGFILE}.dpkg-new +else + # If no config file is going to be installed, set some default values + ZM_DB_HOST= + ZM_DB_NAME="zm" + ZM_DB_USER="zmuser" fi +# Set some variables for the dbconfig-common stuff +dbc_dbserver="$ZM_DB_HOST" +dbc_dbname="$ZM_DB_NAME" +dbc_dbuser="$ZM_DB_USER" + if [ -f /usr/share/dbconfig-common/dpkg/config ]; then # Default use dbconfig-common diff --git a/distros/debian8/zoneminder-database.postinst b/distros/debian8/zoneminder-database.postinst index f6582da26..6faf28a58 100644 --- a/distros/debian8/zoneminder-database.postinst +++ b/distros/debian8/zoneminder-database.postinst @@ -6,12 +6,6 @@ set -e # Source the debconf stuff . /usr/share/debconf/confmodule -# Source the config file if exists -CONFIGFILE=/etc/zm/zm.conf -if [ -e $CONFIGFILE ]; then - . $CONFIGFILE -fi - mysql_update() { # Source the dbconfig stuff @@ -78,51 +72,6 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then # Update the default admin account and database version mysql_update - - # Retrieve data from dbconfig (inputs from user) - . /etc/dbconfig-common/zoneminder.conf - - # ZoneMinder config file handling - # Inspired by: http://manpages.debian.org/cgi-bin/man.cgi?query=debconf-devel&sektion=7 - - # Backup the config file - cp -a -f $CONFIGFILE ${CONFIGFILE}.postinst.bak - - # Redeclare variables if missing in config file - test -z $dbc_dbserver || grep -Eq "^ *ZM_DB_HOST=" $CONFIGFILE \ - || echo "ZM_DB_HOST=" >> ${CONFIGFILE}.postinst.bak - test -z $dbc_dbname || grep -Eq "^ *ZM_DB_NAME=" $CONFIGFILE \ - || echo "ZM_DB_NAME=" >> ${CONFIGFILE}.postinst.bak - test -z $dbc_dbuser || grep -Eq "^ *ZM_DB_USER=" $CONFIGFILE \ - || echo "ZM_DB_USER=" >> ${CONFIGFILE}.postinst.bak - test -z $dbc_dbpass || grep -Eq "^ *ZM_DB_PASS=" $CONFIGFILE \ - || echo "ZM_DB_PASS=" >> ${CONFIGFILE}.postinst.bak - - # Prevent ZM_DB_HOST to be empty if user selected the 'unix socket' method - if test -z $dbc_dbserver; then - dbc_dbserver_override="localhost" - else - dbc_dbserver_override=$dbc_dbserver - fi - - # Update variables in config file - sed -i "s/^ *ZM_DB_HOST=.*/ZM_DB_HOST=$dbc_dbserver_override/" \ - ${CONFIGFILE}.postinst.bak - test -z $dbc_dbname || sed -i "s/^ *ZM_DB_NAME=.*/ZM_DB_NAME=$dbc_dbname/" \ - ${CONFIGFILE}.postinst.bak - test -z $dbc_dbuser || sed -i "s/^ *ZM_DB_USER=.*/ZM_DB_USER=$dbc_dbuser/" \ - ${CONFIGFILE}.postinst.bak - test -z $dbc_dbpass || sed -i "s/^ *ZM_DB_PASS=.*/ZM_DB_PASS=$dbc_dbpass/" \ - ${CONFIGFILE}.postinst.bak - - # Clean-up backup file - mv -f ${CONFIGFILE}.postinst.bak $CONFIGFILE - - - # As requested by the Debian Webapps Policy Manual §3.2.1 - chown root:$ZM_WEB_GROUP /etc/zm/zm.conf - chmod 640 /etc/zm/zm.conf - fi # Do this every time the package is installed or upgraded From 5457d5c5e5032f816ba3ab1d233d8970b04c76fd Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Fri, 19 Dec 2014 16:32:36 +0100 Subject: [PATCH 08/21] Move call to zmupdate.pl in core package because it requires zm.conf file and perl libraries --- distros/debian8/zoneminder-core.postinst | 12 ++++++++++++ distros/debian8/zoneminder-database.postinst | 12 ------------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/distros/debian8/zoneminder-core.postinst b/distros/debian8/zoneminder-core.postinst index 1f047536b..f2ba2d7d2 100644 --- a/distros/debian8/zoneminder-core.postinst +++ b/distros/debian8/zoneminder-core.postinst @@ -63,6 +63,18 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then chmod 640 $CONFIGFILE fi +# Do this every time the package is installed or upgraded +# Test for database presence to avoid failure of zmupdate.pl +if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then + + # Ensure zoneminder is stopped + deb-systemd-invoke stop zoneminder.service || exit $? + + # Run the ZoneMinder update tool + zmupdate.pl + +fi + #DEBHELPER# exit 0 diff --git a/distros/debian8/zoneminder-database.postinst b/distros/debian8/zoneminder-database.postinst index 6faf28a58..41d4e5b5b 100644 --- a/distros/debian8/zoneminder-database.postinst +++ b/distros/debian8/zoneminder-database.postinst @@ -74,18 +74,6 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then mysql_update fi -# Do this every time the package is installed or upgraded -# Test for database presence to avoid failure of zmupdate.pl -if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then - - # Ensure zoneminder is stopped - deb-systemd-invoke stop zoneminder.service || exit $? - - # Run the ZoneMinder update tool - zmupdate.pl - -fi - #DEBHELPER# exit 0 From 6cdb046b3485b441e3b5a0ad9483d1e011e9b41d Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sat, 20 Dec 2014 20:12:33 +0100 Subject: [PATCH 09/21] Do not repeat admin password question if already answered --- distros/debian8/zoneminder-database.config | 3 +++ 1 file changed, 3 insertions(+) diff --git a/distros/debian8/zoneminder-database.config b/distros/debian8/zoneminder-database.config index 5c5b0afe5..f6a84d36d 100644 --- a/distros/debian8/zoneminder-database.config +++ b/distros/debian8/zoneminder-database.config @@ -131,6 +131,9 @@ if [ "$1" = "configure" ] || [ "$1" = "reconfigure" ]; then # password update in ZoneMinder database db_set zoneminder/admin_password "" fi + # Set the seen flag to not ask this question again if no password is + # provided + db_fset zoneminder/admin_password seen true fi From 939f126e76091510f38eab0e509c6119e5fdef21 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sat, 20 Dec 2014 20:21:29 +0100 Subject: [PATCH 10/21] Set the right filename for the systemd service and don't call zmupdate interactively --- distros/debian8/zoneminder-core.postinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distros/debian8/zoneminder-core.postinst b/distros/debian8/zoneminder-core.postinst index f2ba2d7d2..56645db5c 100644 --- a/distros/debian8/zoneminder-core.postinst +++ b/distros/debian8/zoneminder-core.postinst @@ -68,10 +68,10 @@ fi if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then # Ensure zoneminder is stopped - deb-systemd-invoke stop zoneminder.service || exit $? + deb-systemd-invoke stop zoneminder-core.service || exit $? # Run the ZoneMinder update tool - zmupdate.pl + zmupdate.pl --nointeractive fi From fb1566c829756cff4a61bc21910fdb08b0183d93 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sat, 20 Dec 2014 20:26:34 +0100 Subject: [PATCH 11/21] Fix package dependencies --- distros/debian8/control | 62 ++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 25 deletions(-) diff --git a/distros/debian8/control b/distros/debian8/control index 5cbc0ecad..f29d22fe4 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -8,7 +8,14 @@ Standards-Version: 3.9.6 Package: zoneminder Section: metapackages Architecture: all -Depends: zoneminder-core, zoneminder-ui-classic, ${misc:Depends} +Depends: ${misc:Depends}, + libzoneminder-perl (>= ${source:Version}), + zoneminder-database (>= ${source:Version}), + zoneminder-core (>= ${binary:Version}), + zoneminder-ui-base (>= ${source:Version}), + zoneminder-ui-classic (>= ${source:Version}), + zoneminder-ui-mobile (>= ${source:Version}), + zoneminder-ui-xml (>= ${source:Version}) Description: Video camera security and surveillance solution (metapackage) ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child @@ -21,13 +28,40 @@ Description: Video camera security and surveillance solution (metapackage) and surveillance. It can also be integrated into a home automation system via X.10 or other protocols. +Package: libzoneminder-perl +Section: perl +Architecture: all +Depends: ${misc:Depends}, ${perl:Depends}, libdbi-perl, + libdevice-serialport-perl, libimage-info-perl, libjson-any-perl, + libsys-mmap-perl, liburi-encode-perl, libwww-perl +Description: Perl libraries for ZoneMinder + ZoneMinder is a video camera security and surveillance solution. + . + This package provides the libraries for the perl scripts, it can be used to + write custom interfaces as well. + +Package: zoneminder-database +Section: database +Architecture: all +Depends: ${misc:Depends}, debconf, dbconfig-common, + mysql-client | mariadb-client +Recommends: mysql-server | mariadb-server +Description: Database management package for ZoneMinder + ZoneMinder is a video camera security and surveillance solution. + . + This package provides the sql files and maintenance scripts to perform all the + database operations (installation, upgrade or removal) on a local or a remote + server. + Package: zoneminder-core Section: video Architecture: any Depends: libzoneminder-perl (= ${source:Version}), zoneminder-database (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, - ${perl:Depends}, debconf, ffmpeg | libav-tools, rsyslog | system-log-daemon, - netpbm, zip, policykit-1 + ${perl:Depends}, libarchive-zip-perl, libdate-manip-perl, libdbi-perl, + libmime-lite-perl, libmime-tools-perl, libnet-sftp-foreign-perl, + libphp-serialization-perl, debconf, ffmpeg | libav-tools, + rsyslog | system-log-daemon, netpbm, zip, policykit-1 Description: Core binaries and perl scripts for ZoneMinder ZoneMinder is a video camera security and surveillance solution. . @@ -46,18 +80,6 @@ Description: Debugging symbols for ZoneMinder This package provides the debugging symbols for the executable compiled binaries. -Package: zoneminder-database -Section: database -Architecture: all -Depends: ${misc:Depends}, debconf, dbconfig-common, mariadb-client|mysql-client -Recommends: mysql-server|mariadb-server -Description: Database management package for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the sql files and maintenance scripts to perform all the - database operations (installation, upgrade or removal) on a local or a remote - server. - Package: zoneminder-ui-base Section: web Architecture: any @@ -97,13 +119,3 @@ Description: XML interface for ZoneMinder . This package provides a XML interface mainly intended for use with the eyeZm iPhone Application, but can be used with any other custom programs as well. - -Package: libzoneminder-perl -Section: perl -Architecture: all -Depends: ${misc:Depends}, ${perl:Depends} -Description: Perl libraries for ZoneMinder - ZoneMinder is a video camera security and surveillance solution. - . - This package provides the libraries for the perl scripts, it can be used to - write custom interfaces as well. From df2473cdf73f02d7f0710e869deb59dbeaf08482 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sat, 20 Dec 2014 21:11:44 +0100 Subject: [PATCH 12/21] Use a wilcard to reference man files --- distros/debian8/libzoneminder-perl.install | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/distros/debian8/libzoneminder-perl.install b/distros/debian8/libzoneminder-perl.install index f8f8b4325..792ffc15e 100644 --- a/distros/debian8/libzoneminder-perl.install +++ b/distros/debian8/libzoneminder-perl.install @@ -1,14 +1,4 @@ usr/share/perl5/ZoneMinder usr/share/perl5/ZoneMinder.pm debian/tmp/usr/share/man/man3/ZoneMinder.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::Base.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::Config.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::ConfigAdmin.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::ConfigData.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::Control.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::Control::* -debian/tmp/usr/share/man/man3/ZoneMinder::Database.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::General.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::Logger.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::Memory.3pm -debian/tmp/usr/share/man/man3/ZoneMinder::Trigger::* +debian/tmp/usr/share/man/man3/ZoneMinder::* From aff6958398b0f44816e43f1c05c7ba178dc728ab Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 21 Dec 2014 01:38:32 +0100 Subject: [PATCH 13/21] Provide a patch to rename the service file in zmsystemctl.pl.in --- distros/debian8/patches/02_service-file-name.diff | 9 +++++++++ distros/debian8/patches/series | 1 + 2 files changed, 10 insertions(+) create mode 100644 distros/debian8/patches/02_service-file-name.diff diff --git a/distros/debian8/patches/02_service-file-name.diff b/distros/debian8/patches/02_service-file-name.diff new file mode 100644 index 000000000..73ee7b710 --- /dev/null +++ b/distros/debian8/patches/02_service-file-name.diff @@ -0,0 +1,9 @@ +--- a/scripts/zmsystemctl.pl.in ++++ b/scripts/zmsystemctl.pl.in +@@ -50,5 +50,5 @@ if ( !$path || $status ) { + } + + Info( "Redirecting command through systemctl\n" ); +-exec("$path $command zoneminder"); ++exec("$path $command zoneminder-core"); + diff --git a/distros/debian8/patches/series b/distros/debian8/patches/series index b479dc507..a7d63eddc 100644 --- a/distros/debian8/patches/series +++ b/distros/debian8/patches/series @@ -1 +1,2 @@ 01_vendor-perl.diff +02_service-file-name.diff From 2aa3f7e2da011a4fcc994032a9de45e715b3cb27 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 21 Dec 2014 01:52:42 +0100 Subject: [PATCH 14/21] Refresh the debian patches --- distros/debian8/01_vendor-perl.diff | 15 +++++++++++++++ distros/debian8/02_service-file-name.diff | 9 +++++++++ 2 files changed, 24 insertions(+) create mode 100644 distros/debian8/01_vendor-perl.diff create mode 100644 distros/debian8/02_service-file-name.diff diff --git a/distros/debian8/01_vendor-perl.diff b/distros/debian8/01_vendor-perl.diff new file mode 100644 index 000000000..e2cb808b5 --- /dev/null +++ b/distros/debian8/01_vendor-perl.diff @@ -0,0 +1,15 @@ +--- a/configure.ac ++++ b/configure.ac +@@ -443,10 +443,10 @@ + PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"` + PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"` + EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path" +- PERL_MM_PARMS="PREFIX=$prefix" ++ PERL_MM_PARMS="\"PREFIX=$prefix INSTALLDIRS=vendor\"" + else + EXTRA_PERL_LIB="# Include from system perl paths only" +- PERL_MM_PARMS= ++ PERL_MM_PARMS="\"INSTALLDIRS=vendor\"" + fi + AC_SUBST(PERL_MM_PARMS) + AC_SUBST(EXTRA_PERL_LIB) diff --git a/distros/debian8/02_service-file-name.diff b/distros/debian8/02_service-file-name.diff new file mode 100644 index 000000000..6473af782 --- /dev/null +++ b/distros/debian8/02_service-file-name.diff @@ -0,0 +1,9 @@ +--- a/scripts/zmsystemctl.pl.in ++++ b/scripts/zmsystemctl.pl.in +@@ -50,5 +50,5 @@ + } + + Info( "Redirecting command through systemctl\n" ); +-exec("$path $command zoneminder"); ++exec("$path $command zoneminder-core"); + From 3bfee679f849cb47bb028896b67ddc6950d4d4ed Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 21 Dec 2014 02:38:17 +0100 Subject: [PATCH 15/21] Move the refreshed patches to the right folder --- distros/debian8/01_vendor-perl.diff | 15 --------------- distros/debian8/02_service-file-name.diff | 9 --------- distros/debian8/patches/01_vendor-perl.diff | 2 +- distros/debian8/patches/02_service-file-name.diff | 2 +- 4 files changed, 2 insertions(+), 26 deletions(-) delete mode 100644 distros/debian8/01_vendor-perl.diff delete mode 100644 distros/debian8/02_service-file-name.diff diff --git a/distros/debian8/01_vendor-perl.diff b/distros/debian8/01_vendor-perl.diff deleted file mode 100644 index e2cb808b5..000000000 --- a/distros/debian8/01_vendor-perl.diff +++ /dev/null @@ -1,15 +0,0 @@ ---- a/configure.ac -+++ b/configure.ac -@@ -443,10 +443,10 @@ - PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"` - PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"` - EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path" -- PERL_MM_PARMS="PREFIX=$prefix" -+ PERL_MM_PARMS="\"PREFIX=$prefix INSTALLDIRS=vendor\"" - else - EXTRA_PERL_LIB="# Include from system perl paths only" -- PERL_MM_PARMS= -+ PERL_MM_PARMS="\"INSTALLDIRS=vendor\"" - fi - AC_SUBST(PERL_MM_PARMS) - AC_SUBST(EXTRA_PERL_LIB) diff --git a/distros/debian8/02_service-file-name.diff b/distros/debian8/02_service-file-name.diff deleted file mode 100644 index 6473af782..000000000 --- a/distros/debian8/02_service-file-name.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- a/scripts/zmsystemctl.pl.in -+++ b/scripts/zmsystemctl.pl.in -@@ -50,5 +50,5 @@ - } - - Info( "Redirecting command through systemctl\n" ); --exec("$path $command zoneminder"); -+exec("$path $command zoneminder-core"); - diff --git a/distros/debian8/patches/01_vendor-perl.diff b/distros/debian8/patches/01_vendor-perl.diff index df4f88d06..e2cb808b5 100644 --- a/distros/debian8/patches/01_vendor-perl.diff +++ b/distros/debian8/patches/01_vendor-perl.diff @@ -1,6 +1,6 @@ --- a/configure.ac +++ b/configure.ac -@@ -437,10 +437,10 @@ +@@ -443,10 +443,10 @@ PERL_SITE_LIB=`perl -V:installsitelib | sed -e "s/.*='\(.*\)';/\1/"` PERL_LIB_PATH=`echo $PERL_SITE_LIB | sed -e "s|^$PERL_SITE_PREFIX||"` EXTRA_PERL_LIB="use lib '$prefix$PERL_LIB_PATH'; # Include custom perl install path" diff --git a/distros/debian8/patches/02_service-file-name.diff b/distros/debian8/patches/02_service-file-name.diff index 73ee7b710..6473af782 100644 --- a/distros/debian8/patches/02_service-file-name.diff +++ b/distros/debian8/patches/02_service-file-name.diff @@ -1,6 +1,6 @@ --- a/scripts/zmsystemctl.pl.in +++ b/scripts/zmsystemctl.pl.in -@@ -50,5 +50,5 @@ if ( !$path || $status ) { +@@ -50,5 +50,5 @@ } Info( "Redirecting command through systemctl\n" ); From d8e682c48bd529e8b4cd8a6bad2533b82c9324fd Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 21 Dec 2014 04:02:41 +0100 Subject: [PATCH 16/21] Update of perl library dependencies --- distros/debian8/control | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/distros/debian8/control b/distros/debian8/control index f29d22fe4..eb697fb97 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -58,10 +58,11 @@ Section: video Architecture: any Depends: libzoneminder-perl (= ${source:Version}), zoneminder-database (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends}, - ${perl:Depends}, libarchive-zip-perl, libdate-manip-perl, libdbi-perl, - libmime-lite-perl, libmime-tools-perl, libnet-sftp-foreign-perl, - libphp-serialization-perl, debconf, ffmpeg | libav-tools, - rsyslog | system-log-daemon, netpbm, zip, policykit-1 + ${perl:Depends}, libarchive-tar-perl, libarchive-zip-perl, libdate-manip-perl, + libdbi-perl, libmodule-load-conditional-perl, libmime-lite-perl, + libmime-tools-perl, libnet-sftp-foreign-perl, libphp-serialization-perl, + debconf, ffmpeg | libav-tools, rsyslog | system-log-daemon, netpbm, zip, + policykit-1 Description: Core binaries and perl scripts for ZoneMinder ZoneMinder is a video camera security and surveillance solution. . From bb2cecee8af16f62dcbd20a91f5612e442947f3c Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 28 Dec 2014 11:04:53 +0100 Subject: [PATCH 17/21] Update of build dependencies --- distros/debian8/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian8/control b/distros/debian8/control index eb697fb97..7c33fc8e6 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -2,7 +2,7 @@ Source: zoneminder Section: net Priority: optional Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), dh-systemd (>= 1.5), autoconf, automake, quilt, libphp-serialization-perl, libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev|libjpeg9-dev|libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, ffmpeg | libav-tools, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev|libgcrypt20-dev, libpolkit-gobject-1-dev +Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), dh-systemd (>= 1.5), autoconf, automake, quilt, libphp-serialization-perl, libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev | libgcrypt20-dev, libpolkit-gobject-1-dev, libdbi-perl, libnet-sftp-foreign-perl, libexpect-perl, libmime-tools-perl Standards-Version: 3.9.6 Package: zoneminder From e1824aad4b7705d1f6733548bc9bd57163173811 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Mon, 12 Jan 2015 20:52:14 +0100 Subject: [PATCH 18/21] Fix a conflict when merging upstream master --- distros/debian8/patches/series | 1 + 1 file changed, 1 insertion(+) diff --git a/distros/debian8/patches/series b/distros/debian8/patches/series index e69de29bb..50378e9c2 100644 --- a/distros/debian8/patches/series +++ b/distros/debian8/patches/series @@ -0,0 +1 @@ +02_service-file-name.diff From f05dc5e2a3f89fe5d20c8befd5067901baeb666c Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Mon, 12 Jan 2015 20:56:14 +0100 Subject: [PATCH 19/21] Rename debian patch --- .../{02_service-file-name.diff => 01_service-file-name.diff} | 0 distros/debian8/patches/series | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename distros/debian8/patches/{02_service-file-name.diff => 01_service-file-name.diff} (100%) diff --git a/distros/debian8/patches/02_service-file-name.diff b/distros/debian8/patches/01_service-file-name.diff similarity index 100% rename from distros/debian8/patches/02_service-file-name.diff rename to distros/debian8/patches/01_service-file-name.diff diff --git a/distros/debian8/patches/series b/distros/debian8/patches/series index 50378e9c2..2e4111e41 100644 --- a/distros/debian8/patches/series +++ b/distros/debian8/patches/series @@ -1 +1 @@ -02_service-file-name.diff +01_service-file-name.diff From 47ef5c999ff05bca54e2699421c05ff63f9188c8 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Mon, 12 Jan 2015 22:22:40 +0100 Subject: [PATCH 20/21] Add dependency to apache2 for zoneminder-core package --- distros/debian8/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian8/control b/distros/debian8/control index 7c33fc8e6..455ec5e90 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -62,7 +62,7 @@ Depends: libzoneminder-perl (= ${source:Version}), libdbi-perl, libmodule-load-conditional-perl, libmime-lite-perl, libmime-tools-perl, libnet-sftp-foreign-perl, libphp-serialization-perl, debconf, ffmpeg | libav-tools, rsyslog | system-log-daemon, netpbm, zip, - policykit-1 + policykit-1, apache2 Description: Core binaries and perl scripts for ZoneMinder ZoneMinder is a video camera security and surveillance solution. . From c6c4e70a36eac140101bf776884299e053e83f53 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Thu, 15 Jan 2015 21:32:01 +0100 Subject: [PATCH 21/21] Switch debian8 folder to native source format --- distros/debian8/README.source | 12 ------------ distros/debian8/changelog | 8 ++++++++ distros/debian8/control | 2 +- .../debian8/patches/01_service-file-name.diff | 9 --------- distros/debian8/patches/series | 1 - distros/debian8/rules | 17 ++++++++++++----- distros/debian8/source/format | 2 +- distros/debian8/source/local-options | 2 -- distros/debian8/watch | 3 --- distros/debian8/zoneminder-core.postinst | 2 +- ...ore.init => zoneminder-core.zoneminder.init} | 0 ...rvice => zoneminder-core.zoneminder.service} | 0 ...pfile => zoneminder-core.zoneminder.tmpfile} | 0 13 files changed, 23 insertions(+), 35 deletions(-) delete mode 100644 distros/debian8/README.source delete mode 100644 distros/debian8/patches/01_service-file-name.diff delete mode 100644 distros/debian8/patches/series delete mode 100644 distros/debian8/watch rename distros/debian8/{zoneminder-core.init => zoneminder-core.zoneminder.init} (100%) rename distros/debian8/{zoneminder-core.service => zoneminder-core.zoneminder.service} (100%) rename distros/debian8/{zoneminder-core.tmpfile => zoneminder-core.zoneminder.tmpfile} (100%) diff --git a/distros/debian8/README.source b/distros/debian8/README.source deleted file mode 100644 index b546508b2..000000000 --- a/distros/debian8/README.source +++ /dev/null @@ -1,12 +0,0 @@ -This package uses quilt to manage all modifications to the upstream source. -Changes are stored in the source package as diffs in debian/patches and applied -during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. - - -This package uses the version 3.0 of the debian source package; An upstream -tarball is required to build it. This tarball can be generated automagically by -downloading the sources from the github repository with the following command: - -fakeroot debian/rules get-orig-source diff --git a/distros/debian8/changelog b/distros/debian8/changelog index 410e17821..0035f1e36 100644 --- a/distros/debian8/changelog +++ b/distros/debian8/changelog @@ -1,3 +1,11 @@ +zoneminder (1.28.0+nmu1) testing; urgency=medium + + * Non-maintainer upload + * Split the debian package into several packages + * Switch to native source format + + -- Emmanuel Papin Thu, 15 Jan 2015 20:00:08 +0100 + zoneminder (1.28.0-0.2) testing; urgency=medium * Non-maintainer upload. diff --git a/distros/debian8/control b/distros/debian8/control index 455ec5e90..efa9ecef2 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -2,7 +2,7 @@ Source: zoneminder Section: net Priority: optional Maintainer: Isaac Connor -Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), dh-systemd (>= 1.5), autoconf, automake, quilt, libphp-serialization-perl, libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev | libgcrypt20-dev, libpolkit-gobject-1-dev, libdbi-perl, libnet-sftp-foreign-perl, libexpect-perl, libmime-tools-perl +Build-Depends: debhelper (>= 9), po-debconf (>= 1.0), dh-systemd (>= 1.5), autoconf, automake, libphp-serialization-perl, libgnutls28-dev, libmysqlclient-dev | libmariadbclient-dev, libdbd-mysql-perl, libdate-manip-perl, libwww-perl, libjpeg8-dev | libjpeg9-dev | libjpeg62-turbo-dev, libpcre3-dev, libavcodec-dev, libavformat-dev (>= 3:0.svn20090204), libswscale-dev (>= 3:0.svn20090204), libavutil-dev, libv4l-dev (>= 0.8.3), libbz2-dev, libtool, libsys-mmap-perl, libnetpbm10-dev, libavdevice-dev, libdevice-serialport-perl, libarchive-zip-perl, libmime-lite-perl, dh-autoreconf, libvlccore-dev, libvlc-dev, libcurl4-gnutls-dev | libcurl4-nss-dev | libcurl4-openssl-dev, libgcrypt11-dev | libgcrypt20-dev, libpolkit-gobject-1-dev, libdbi-perl, libnet-sftp-foreign-perl, libexpect-perl, libmime-tools-perl Standards-Version: 3.9.6 Package: zoneminder diff --git a/distros/debian8/patches/01_service-file-name.diff b/distros/debian8/patches/01_service-file-name.diff deleted file mode 100644 index 6473af782..000000000 --- a/distros/debian8/patches/01_service-file-name.diff +++ /dev/null @@ -1,9 +0,0 @@ ---- a/scripts/zmsystemctl.pl.in -+++ b/scripts/zmsystemctl.pl.in -@@ -50,5 +50,5 @@ - } - - Info( "Redirecting command through systemctl\n" ); --exec("$path $command zoneminder"); -+exec("$path $command zoneminder-core"); - diff --git a/distros/debian8/patches/series b/distros/debian8/patches/series deleted file mode 100644 index 2e4111e41..000000000 --- a/distros/debian8/patches/series +++ /dev/null @@ -1 +0,0 @@ -01_service-file-name.diff diff --git a/distros/debian8/rules b/distros/debian8/rules index 10df6d451..3364d8750 100755 --- a/distros/debian8/rules +++ b/distros/debian8/rules @@ -38,12 +38,12 @@ BRANCH = $(shell git rev-parse --abbrev-ref HEAD) HEAD = $(shell git rev-parse HEAD) PKD = $(abspath $(dir $(MAKEFILE_LIST))) PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source)) -VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};') +VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-|\+nmu\d+.*)};') DTYPE = TARBALL = ../$(PKG)_$(VER)$(DTYPE).orig.tar.xz %: - dh $@ --with quilt,autoreconf,systemd + dh $@ --with autoreconf,systemd override_dh_auto_configure: CFLAGS="$(CFLAGS)" CXXFLAGS="$(CXXFLAGS)" dh_auto_configure -- \ @@ -89,6 +89,16 @@ override_dh_install: # The link stuff for /usr/share/zoneminder/cgi-bin has been moved to # zoneminder-ui-base.links file +override_dh_installinit: + dh_installinit --package=zoneminder-core --name=zoneminder + +override_dh_systemd_start: + dh_systemd_start --package=zoneminder-core --name=zoneminder \ + --restart-after-upgrade + +override_dh_systemd_enable: + dh_systemd_enable --package=zoneminder-core --name=zoneminder + override_dh_fixperms: dh_fixperms # @@ -99,9 +109,6 @@ override_dh_fixperms: override_dh_auto_test: # do not run tests... -override_dh_systemd_start: - dh_systemd_start --restart-after-upgrade - .PHONY: override_dh_strip override_dh_strip: dh_strip --dbg-package=zoneminder-core-dbg diff --git a/distros/debian8/source/format b/distros/debian8/source/format index 163aaf8d8..89ae9db8f 100644 --- a/distros/debian8/source/format +++ b/distros/debian8/source/format @@ -1 +1 @@ -3.0 (quilt) +3.0 (native) diff --git a/distros/debian8/source/local-options b/distros/debian8/source/local-options index 9cdfca9f9..e69de29bb 100644 --- a/distros/debian8/source/local-options +++ b/distros/debian8/source/local-options @@ -1,2 +0,0 @@ -unapply-patches -abort-on-upstream-changes diff --git a/distros/debian8/watch b/distros/debian8/watch deleted file mode 100644 index 5a8a9c4d7..000000000 --- a/distros/debian8/watch +++ /dev/null @@ -1,3 +0,0 @@ -version=3 -http://www.zoneminder.com/downloads.html \ - .*/ZoneMinder-(.*).tar.gz diff --git a/distros/debian8/zoneminder-core.postinst b/distros/debian8/zoneminder-core.postinst index 56645db5c..b1552e73b 100644 --- a/distros/debian8/zoneminder-core.postinst +++ b/distros/debian8/zoneminder-core.postinst @@ -68,7 +68,7 @@ fi if [ "$dbc_install" = "true" ] && [ "$1" = "configure" ]; then # Ensure zoneminder is stopped - deb-systemd-invoke stop zoneminder-core.service || exit $? + deb-systemd-invoke stop zoneminder.service || exit $? # Run the ZoneMinder update tool zmupdate.pl --nointeractive diff --git a/distros/debian8/zoneminder-core.init b/distros/debian8/zoneminder-core.zoneminder.init similarity index 100% rename from distros/debian8/zoneminder-core.init rename to distros/debian8/zoneminder-core.zoneminder.init diff --git a/distros/debian8/zoneminder-core.service b/distros/debian8/zoneminder-core.zoneminder.service similarity index 100% rename from distros/debian8/zoneminder-core.service rename to distros/debian8/zoneminder-core.zoneminder.service diff --git a/distros/debian8/zoneminder-core.tmpfile b/distros/debian8/zoneminder-core.zoneminder.tmpfile similarity index 100% rename from distros/debian8/zoneminder-core.tmpfile rename to distros/debian8/zoneminder-core.zoneminder.tmpfile