[Pkg-nagios-changes] [pkg-nagios] r35 - in nagios2/trunk/debian: .
po
Sean Finney
seanius at costa.debian.org
Mon Jan 2 22:48:08 UTC 2006
Author: seanius
Date: 2006-01-02 22:48:07 +0000 (Mon, 02 Jan 2006)
New Revision: 35
Modified:
nagios2/trunk/debian/TODO
nagios2/trunk/debian/nagios2-common.config
nagios2/trunk/debian/nagios2-common.examples
nagios2/trunk/debian/nagios2-common.install
nagios2/trunk/debian/nagios2-common.postinst
nagios2/trunk/debian/nagios2-common.postrm
nagios2/trunk/debian/nagios2-common.templates
nagios2/trunk/debian/po/templates.pot
nagios2/trunk/debian/rules
Log:
debconf/maintscript support for 1.x links
Modified: nagios2/trunk/debian/TODO
===================================================================
--- nagios2/trunk/debian/TODO 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/TODO 2006-01-02 22:48:07 UTC (rev 35)
@@ -2,8 +2,6 @@
- double check init script
- fill in README.Debian
-- daemon starts, web interface configured, but cgi configuration not
- quite right it seems.
- would be nice to manage apache2.conf via ucf, and make
nagios 1.x url support in the file a debconf option.
- good working default config, at least monitoring the freebies (disk,
Modified: nagios2/trunk/debian/nagios2-common.config
===================================================================
--- nagios2/trunk/debian/nagios2-common.config 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/nagios2-common.config 2006-01-02 22:48:07 UTC (rev 35)
@@ -22,6 +22,10 @@
db_get nagios2/httpd
keepgoing="$RET"
+if [ "$keepgoing" ]; then
+ db_input medium nagios2/nagios1-in-apacheconf || true
+fi
+
if [ "$keepgoing" ] && [ ! -f "$htpwfile" ] || [ "$1" = "reconfigure" ]; then
db_input low nagios2/adminusername || true
while [ ! "$passwordsmatch" ]; do
Modified: nagios2/trunk/debian/nagios2-common.examples
===================================================================
--- nagios2/trunk/debian/nagios2-common.examples 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/nagios2-common.examples 2006-01-02 22:48:07 UTC (rev 35)
@@ -5,3 +5,4 @@
sample-config/resource.cfg
sample-config/nagios.cfg
sample-config/cgi.cfg
+debian/apache2.conf
Modified: nagios2/trunk/debian/nagios2-common.install
===================================================================
--- nagios2/trunk/debian/nagios2-common.install 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/nagios2-common.install 2006-01-02 22:48:07 UTC (rev 35)
@@ -4,4 +4,3 @@
sample-config/template-object/README /usr/share/doc/nagios2-common/examples/template-object
sample-config/template-object/*.cfg /usr/share/doc/nagios2-common/examples/template-object
debian/httpd.webapps-common /usr/share/nagios2/debian
-debian/apache2.conf /etc/nagios2
Modified: nagios2/trunk/debian/nagios2-common.postinst
===================================================================
--- nagios2/trunk/debian/nagios2-common.postinst 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/nagios2-common.postinst 2006-01-02 22:48:07 UTC (rev 35)
@@ -23,9 +23,19 @@
admuser="$RET"
db_get nagios2/adminpassword
admpass="$RET"
+ # get whether they want support for 1.x urls:
+ db_get nagios2/nagios1-in-apacheconf
+ nagiosone="$RET"
# ... done with debconf here
db_stop
+ # register apache2.conf via ucf:
+ if [ "$nagiosone" = "true" ]; then
+ ucf /usr/share/doc/nagios2-common/examples/apache2.nagios1.conf $apacheconf
+ else
+ ucf /usr/share/doc/nagios2-common/examples/apache2.conf $apacheconf
+ fi
+
# configure them, if it is desired
if [ "$servers" ]; then
wc_httpd_apache_include $apacheconf nagios2 $servers
Modified: nagios2/trunk/debian/nagios2-common.postrm
===================================================================
--- nagios2/trunk/debian/nagios2-common.postrm 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/nagios2-common.postrm 2006-01-02 22:48:07 UTC (rev 35)
@@ -9,6 +9,8 @@
rm -rf /var/run/nagios /var/log/nagios /var/lib/nagios \
/var/cache/nagios
rm -f /etc/nagios2/htpasswd.users
+ rm -f /etc/nagios2/apache2.conf
+ ucf --purge /etc/nagios2/apache2.conf
;;
esac
Modified: nagios2/trunk/debian/nagios2-common.templates
===================================================================
--- nagios2/trunk/debian/nagios2-common.templates 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/nagios2-common.templates 2006-01-02 22:48:07 UTC (rev 35)
@@ -2,25 +2,29 @@
Type: multiselect
_Choices: apache, apache-ssl, apache2
_Default: apache2
-_Description: Automatically configure apache for Nagios?
- Nagios requires a few things to be set up in your web server configuration
- in order for the front end to function properly.
+_Description: Please select apache servers to configure for nagios2
+ Please select which apache servers should be configured for nagios2.
.
- The Debian packaged version can usually automatically configure apache by
- dropping a symlink into the /etc/APACHE-SERVER/conf.d directory. Select
- which servers to configure from the following list.
+ If you would prefer to perform configuration manually, leave all
+ servers unselected.
Template: nagios2/adminusername
Type: string
_Default: nagiosadmin
_Description: Nagios web administrative username?
Please provide the username to be used for administrative access to the
- nagios web interface.
+ nagios web interface.
+ .
+ This is the username you will use to log in to your nagios installation
+ after configuration is complete.
Template: nagios2/adminpassword
Type: password
_Description: Nagios web administration password?
Please provide the password to be created with the nagios web admin user.
+ .
+ This is the password you will use to log in to your nagios installation
+ after configuration is complete.
Template: nagios2/adminpassword-repeat
Type: password
@@ -29,3 +33,15 @@
Template: nagios2/adminpassword-mismatch
Type: note
_Description: The passwords do not match.
+
+Template: nagios2/nagios1-in-apacheconf
+Type: boolean
+_Default: false
+_Description: Enable support for nagios 1.x links in nagios2?
+ Should the apache configuration for nagios2 provide compatibility
+ with links from nagios 1.x?
+ .
+ If you select this option, the apache configuration used for nagios
+ will include directives to support URLs from nagios 1.x. Warning:
+ you should not choose this option if you still have nagios 1.x on your
+ system, or unpredictable results may occur.
Modified: nagios2/trunk/debian/po/templates.pot
===================================================================
--- nagios2/trunk/debian/po/templates.pot 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/po/templates.pot 2006-01-02 22:48:07 UTC (rev 35)
@@ -8,7 +8,7 @@
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: pkg-nagios-devel at lists.alioth.debian.org\n"
-"POT-Creation-Date: 2005-12-30 20:05+0100\n"
+"POT-Creation-Date: 2006-01-02 23:46+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL at ADDRESS>\n"
"Language-Team: LANGUAGE <LL at li.org>\n"
@@ -17,75 +17,124 @@
"Content-Transfer-Encoding: 8bit\n"
#. Type: multiselect
-#. choices
+#. Choices
#: ../nagios2-common.templates:3
msgid "apache, apache-ssl, apache2"
msgstr ""
#. Type: multiselect
-#. description
+#. Default
#: ../nagios2-common.templates:4
-msgid "Automatically configure apache for Nagios?"
+msgid "apache2"
msgstr ""
#. Type: multiselect
-#. description
-#: ../nagios2-common.templates:4
-msgid ""
-"Nagios requires a few things to be set up in your web server configuration "
-"in order for the front end to function properly."
+#. Description
+#: ../nagios2-common.templates:5
+msgid "Please select apache servers to configure for nagios2"
msgstr ""
#. Type: multiselect
-#. description
-#: ../nagios2-common.templates:4
+#. Description
+#: ../nagios2-common.templates:5
+msgid "Please select which apache servers should be configured for nagios2."
+msgstr ""
+
+#. Type: multiselect
+#. Description
+#: ../nagios2-common.templates:5
msgid ""
-"The Debian packaged version can usually automatically configure apache by "
-"dropping a symlink into the /etc/APACHE-SERVER/conf.d directory. Select "
-"which servers to configure from the following list."
+"If you would prefer to perform configuration manually, leave all servers "
+"unselected."
msgstr ""
#. Type: string
-#. description
-#: ../nagios2-common.templates:15
+#. Default
+#: ../nagios2-common.templates:13
+msgid "nagiosadmin"
+msgstr ""
+
+#. Type: string
+#. Description
+#: ../nagios2-common.templates:14
msgid "Nagios web administrative username?"
msgstr ""
#. Type: string
-#. description
-#: ../nagios2-common.templates:15
+#. Description
+#: ../nagios2-common.templates:14
msgid ""
"Please provide the username to be used for administrative access to the "
"nagios web interface."
msgstr ""
#. Type: string
-#. Default
-#: ../nagios2-common.templates:18
-msgid "nagiosadmin"
+#. Description
+#: ../nagios2-common.templates:14
+msgid ""
+"This is the username you will use to log in to your nagios installation "
+"after configuration is complete."
msgstr ""
#. Type: password
-#. description
-#: ../nagios2-common.templates:22
+#. Description
+#: ../nagios2-common.templates:23
msgid "Nagios web administration password?"
msgstr ""
#. Type: password
-#. description
-#: ../nagios2-common.templates:22
+#. Description
+#: ../nagios2-common.templates:23
msgid ""
"Please provide the password to be created with the nagios web admin user."
msgstr ""
#. Type: password
-#. description
-#: ../nagios2-common.templates:27
+#. Description
+#: ../nagios2-common.templates:23
+msgid ""
+"This is the password you will use to log in to your nagios installation "
+"after configuration is complete."
+msgstr ""
+
+#. Type: password
+#. Description
+#: ../nagios2-common.templates:31
msgid "Please retype the password."
msgstr ""
#. Type: note
-#. description
-#: ../nagios2-common.templates:31
+#. Description
+#: ../nagios2-common.templates:35
msgid "The passwords do not match."
msgstr ""
+
+#. Type: boolean
+#. Default
+#: ../nagios2-common.templates:39
+msgid "false"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../nagios2-common.templates:40
+msgid "Enable support for nagios 1.x links in nagios2?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../nagios2-common.templates:40
+msgid ""
+"Should the apache configuration for nagios2 provide compatibility with links "
+"from nagios 1.x?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../nagios2-common.templates:40
+msgid ""
+"If you select this option, the apache configuration used for nagios will "
+"include directives to support URLs from nagios 1.x. Warning: you should not "
+"choose this option if you still have nagios 1.x on your system, or "
+"unpredictable results may occur."
+msgstr ""
Modified: nagios2/trunk/debian/rules
===================================================================
--- nagios2/trunk/debian/rules 2006-01-02 10:46:53 UTC (rev 34)
+++ nagios2/trunk/debian/rules 2006-01-02 22:48:07 UTC (rev 35)
@@ -6,6 +6,7 @@
# export DH_VERBOSE=1
b := $(shell pwd)/debian
+bnc := $b/nagios2-common
export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
@@ -123,14 +124,25 @@
# zero out INSTALL_OPTS to prevent chowning at build-time
make install DESTDIR=$b/nagios2 INSTALL_OPTS=""
# move some arch-indep stuff to the nagios2-common package
- install -d $b/nagios2-common/usr/share/
- cp -a $b/nagios2/usr/share/nagios2 $b/nagios2-common/usr/share/
+ cp -a $b/nagios2/usr/share/nagios2 ${bnc}/usr/share/
rm -rf $b/nagios2/usr/share/nagios2
# remove empty directory
rmdir --ignore-fail-on-non-empty -p $b/nagios2/var/lib/nagios2/archives
# set up /var/cache/nagios2 for access by www-data
- chgrp www-data $b/nagios2-common/var/cache/nagios2
- chmod g+s $b/nagios2-common/var/cache/nagios2
+ chgrp www-data ${bnc}/var/cache/nagios2
+ chmod g+s ${bnc}/var/cache/nagios2
+ dh_installdocs -i
+ dh_installchangelogs -i
+ dh_install -i
+ dh_installinit --name nagios2 -- defaults 30 18
+ dh_link -i usr/share/nagios2-common/htdocs/docs usr/share/doc/nagios2-common/html
+ dh_installexamples -i
+ # and now set up the "nagios1 version" of the apache2.conf
+ sed -e 's,^#\(ScriptAlias /cgi-bin/nagios /usr/lib/cgi-bin/nagios2\),\1,' \
+ -e 's,^#\(ScriptAlias /nagios/cgi-bin /usr/lib/cgi-bin/nagios2\),\1,' \
+ -e 's,^#\(Alias /nagios /usr/share/nagios2/htdocs\),\1,' \
+ -e 's,^ #\(AuthUserFile /etc/nagios/htpasswd.users\), \1,' \
+ ${bnc}/usr/share/doc/nagios2-common/examples/apache2.conf > ${bnc}/usr/share/doc/nagios2-common/examples/apache2.nagios1.conf
dh_link -a
touch install-stamp
@@ -151,15 +163,8 @@
dh_builddeb -a
binary-indep: install-stamp
- dh_installdocs -i
- dh_installexamples -i
- dh_installchangelogs -i
# XXX some stuff below here is commented out
- dh_install -i
#install -m 755 cgi/grouplist.cgi.in debian/$@/usr/lib/cgi-bin/nagios/grouplist.cgi
- # they install it themselves now?
- dh_installinit --name nagios2 -- defaults 30 18
- dh_link -i usr/share/nagios2-common/htdocs/docs usr/share/doc/nagios2-common/html
dh_compress -i
dh_fixperms -i -Xnagios2/resource.cfg
dh_installdebconf -i
More information about the Pkg-nagios-changes
mailing list