[Pkg-nagios-changes] [pkg-icingaweb2] 01/05: Split out icingacli and icingaweb2-common as packages

Markus Frosch lazyfrosch at moszumanska.debian.org
Mon Feb 22 11:47:37 UTC 2016


This is an automated email from the git hooks/post-receive script.

lazyfrosch pushed a commit to branch test
in repository pkg-icingaweb2.

commit 672fcae6a067078e31e521bc61d1e3a1bf4591ac
Author: Markus Frosch <markus at lazyfrosch.de>
Date:   Mon Feb 22 11:54:09 2016 +0100

    Split out icingacli and icingaweb2-common as packages
---
 debian/control                                     | 50 ++++++++++++++++++----
 debian/icingacli.install                           |  3 ++
 debian/{icingaweb2.dirs => icingaweb2-common.dirs} |  0
 debian/icingaweb2-common.install                   |  3 ++
 debian/icingaweb2-common.postinst                  | 40 +++++++++++++++++
 debian/icingaweb2-common.postrm                    | 11 +++++
 debian/icingaweb2.install                          |  7 +--
 debian/icingaweb2.postinst                         | 22 +---------
 debian/icingaweb2.postrm                           |  6 ---
 9 files changed, 100 insertions(+), 42 deletions(-)

diff --git a/debian/control b/debian/control
index b67c269..1cacb80 100644
--- a/debian/control
+++ b/debian/control
@@ -15,8 +15,7 @@ Vcs-Git: git://anonscm.debian.org/pkg-nagios/pkg-icingaweb2.git
 Package: icingaweb2
 Architecture: all
 Depends:
- adduser,
- php-icinga (= ${source:Version}),
+ icingaweb2-common (= ${source:Version}),
 # 4.4 in wheezy - TODO: test
  php-htmlpurifier (>= 4.4),
  php-dompdf (>= 0.6.1),
@@ -29,24 +28,37 @@ Recommends:
  php5 (>= 5.3.2),
  php5-cli (>= 5.3.2),
  php5-ldap,
+ icingacli,
  icingaweb2-module-monitoring,
  icingaweb2-module-doc
-Replaces: icingaweb2-module-setup
-Conflicts: icingaweb2-module-setup
 Description: simple and responsive web interface for Icinga
  Icinga Web 2 is a very modular, fast and simple web interface for your Icinga
  monitoring environment.
- n
+ .
  The software will give you a web frontend for your monitoring solution, and
  can run additional modules, extending monitoring data, or even supplying
  something new to the webinterface.
  .
- Backends can be IDO and Livestatus, while supporting Icinga 1 and 2.
+ This package installs the web interface with all needed dependencies.
+
+Package: icingaweb2-common
+Architecture: all
+Depends:
+ adduser,
+ php-icinga (= ${source:Version}),
+ ${misc:Depends}
+Replaces: icingaweb2-module-setup, icingaweb2 (<< 2.1.2-2~)
+Conflicts: icingaweb2-module-setup
+Breaks: icingaweb2 (<< 2.1.2-2~)
+Description: simple and responsive web interface for Icinga - common files
+ Icinga Web 2 is a very modular, fast and simple web interface for your Icinga
+ monitoring environment.
  .
- `icingacli` is a command line utility, allowing the admin to configure Icinga
- Web 2 and provides the possibility to query Icinga data from your shell.
+ The software will give you a web frontend for your monitoring solution, and
+ can run additional modules, extending monitoring data, or even supplying
+ something new to the webinterface.
  .
- This package installs the web interface with all needed dependencies.
+ This package contains common files for the web interface, and the CLI tool.
 
 Package: icingaweb2-module-monitoring
 Architecture: all
@@ -84,3 +96,23 @@ Description: PHP library to communicate with and use Icinga
  The main dependency here is the Zend Framework.
  .
  This library is mainly used by Icinga Web 2 to get its data.
+
+Package: icingacli
+Architecture: all
+Depends:
+ adduser,
+ php-icinga (= ${source:Version}),
+ ${misc:Depends}
+Recommends:
+ php5-cli (>= 5.3.2)
+Suggests:
+ icingaweb2-module-monitoring
+Replaces: icingaweb2 (<< 2.1.2-2~)
+Breaks: icingaweb2 (<< 2.1.2-2~)
+Description: simple CLI tool for Icingaweb2 and its modules
+ Icinga Web 2 is a very modular, fast and simple web interface for your Icinga
+ monitoring environment.
+ .
+ `icingacli` is a command line utility, allowing the admin to configure Icinga
+ Web 2 and provides the possibility to query Icinga data from your shell.
+ All modules of Icingaweb2 can add additional commands to the icingacli.
diff --git a/debian/icingacli.install b/debian/icingacli.install
new file mode 100644
index 0000000..089df67
--- /dev/null
+++ b/debian/icingacli.install
@@ -0,0 +1,3 @@
+packages/files/bin/icingacli     usr/bin
+
+application/clicommands          usr/share/icingaweb2/application
diff --git a/debian/icingaweb2.dirs b/debian/icingaweb2-common.dirs
similarity index 100%
rename from debian/icingaweb2.dirs
rename to debian/icingaweb2-common.dirs
diff --git a/debian/icingaweb2-common.install b/debian/icingaweb2-common.install
new file mode 100644
index 0000000..d9d227c
--- /dev/null
+++ b/debian/icingaweb2-common.install
@@ -0,0 +1,3 @@
+application/locale               usr/share/icingaweb2/application
+
+modules/setup                    usr/share/icingaweb2/modules
diff --git a/debian/icingaweb2-common.postinst b/debian/icingaweb2-common.postinst
new file mode 100644
index 0000000..683d31a
--- /dev/null
+++ b/debian/icingaweb2-common.postinst
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+set -e
+
+setperm() {
+    user="$1"
+    group="$2"
+    mode="$3"
+    file="$4"
+    shift 4
+    # only do something when no setting exists
+    if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then
+      chown "$user":"$group" "$file"
+      chmod "$mode" "$file"
+    fi
+}
+
+case "$1" in
+    configure)
+        if ! getent group icingaweb2 > /dev/null ; then
+            echo 'Adding system-group for icingaweb2' 1>&2
+            addgroup --system icingaweb2 >/dev/null
+        fi
+
+        # secure configuration directory and allow config access
+        setperm root icingaweb2 2770 /etc/icingaweb2
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+#DEBHELPER#
+
+exit 0
diff --git a/debian/icingaweb2-common.postrm b/debian/icingaweb2-common.postrm
new file mode 100644
index 0000000..4981fe4
--- /dev/null
+++ b/debian/icingaweb2-common.postrm
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+set -e
+
+# cleanup on purge
+if [ "$1" = "purge" ]; then
+    rm -rf /etc/icingaweb2
+    rm -rf /var/log/icingaweb2
+fi
+
+#DEBHELPER#
diff --git a/debian/icingaweb2.install b/debian/icingaweb2.install
index 783cb87..bf7e7be 100644
--- a/debian/icingaweb2.install
+++ b/debian/icingaweb2.install
@@ -1,10 +1,6 @@
-packages/files/bin/icingacli     usr/bin
-
 public doc                       usr/share/icingaweb2
 
-application/clicommands          usr/share/icingaweb2/application
 application/controllers          usr/share/icingaweb2/application
-application/locale               usr/share/icingaweb2/application
 # TODO: embedded font here
 application/fonts                usr/share/icingaweb2/application
 application/forms                usr/share/icingaweb2/application
@@ -22,5 +18,4 @@ library/vendor/JShrink/*.php     usr/share/icingaweb2/library/vendor/JShrink
 library/vendor/Parsedown/*.php   usr/share/icingaweb2/library/vendor/Parsedown
 library/vendor/lessphp/*.php     usr/share/icingaweb2/library/vendor/lessphp
 
-modules/setup  usr/share/icingaweb2/modules
-modules/iframe usr/share/icingaweb2/modules
+modules/iframe                   usr/share/icingaweb2/modules
diff --git a/debian/icingaweb2.postinst b/debian/icingaweb2.postinst
index fb85bee..ceac4be 100644
--- a/debian/icingaweb2.postinst
+++ b/debian/icingaweb2.postinst
@@ -2,31 +2,11 @@
 
 set -e
 
-setperm() {
-    user="$1"
-    group="$2"
-    mode="$3"
-    file="$4"
-    shift 4
-    # only do something when no setting exists
-    if ! dpkg-statoverride --list "$file" >/dev/null 2>&1; then
-      chown "$user":"$group" "$file"
-      chmod "$mode" "$file"
-    fi
-}
-
 case "$1" in
     configure)
-        if ! getent group icingaweb2 > /dev/null ; then
-            echo 'Adding system-group for icingaweb2' 1>&2
-            addgroup --system icingaweb2 >/dev/null
-        fi
-
-        # secure configuration directory and allow config access
-        setperm root icingaweb2 2770 /etc/icingaweb2
-
         COMMON_STATE=$(dpkg-query -f '${Status}' -W 'apache2.2-common' 2>/dev/null | awk '{print $3}' || true)
 
+        # allow www-data to write icingaweb2 config
         if ! getent group icingaweb2 | grep -q www-data; then
             adduser www-data icingaweb2
         fi
diff --git a/debian/icingaweb2.postrm b/debian/icingaweb2.postrm
index d0b576e..6ced15e 100644
--- a/debian/icingaweb2.postrm
+++ b/debian/icingaweb2.postrm
@@ -16,10 +16,4 @@ if [ -L /etc/apache2/conf.d/icingaweb2.conf ]; then
     [ -x $(which invoke-rc.d) ] && invoke-rc.d apache2 reload || true
 fi
 
-# cleanup on purge
-if [ "$1" = "purge" ]; then
-    rm -rf /etc/icingaweb2
-    rm -rf /var/log/icingaweb2
-fi
-
 #DEBHELPER#

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-nagios/pkg-icingaweb2.git



More information about the Pkg-nagios-changes mailing list