[Pkg-nagios-changes] [SCM] Debian packaging for lconf branch, debian, updated. 97ea0d107fb9baaab71345051f7abbeb1b948687
Christoph Berg
myon at debian.org
Mon Jun 20 13:36:45 UTC 2011
The following commit has been merged in the debian branch:
commit 97ea0d107fb9baaab71345051f7abbeb1b948687
Author: Christoph Berg <myon at debian.org>
Date: Mon Jun 20 15:36:27 2011 +0200
Move to using /etc/lconf and /var/lib/lconf
diff --git a/debian/changelog b/debian/changelog
index 02f0d0f..91f903d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-lconf (1.0+20110217-1) experimental; urgency=low
+lconf (1.0-1) experimental; urgency=low
* Initial release.
+ * Using 1.0 plus git snapshot 55c830d5 from 2011-05-09.
-- Christoph Berg <myon at debian.org> Mon, 14 Mar 2011 14:54:17 +0100
diff --git a/debian/lconf.dirs b/debian/lconf.dirs
index 7da5019..fde49a4 100644
--- a/debian/lconf.dirs
+++ b/debian/lconf.dirs
@@ -1,3 +1,3 @@
etc/ldap/schema
-etc/icinga
-var/lib/icinga/lconf
+etc/lconf
+var/lib/lconf
diff --git a/debian/lconf.postinst b/debian/lconf.postinst
index 97109a2..6cd0e40 100644
--- a/debian/lconf.postinst
+++ b/debian/lconf.postinst
@@ -25,7 +25,7 @@ case "$1" in
# explicitly set permissions on some files that are dependent
# on the uid/gid of the nagios user, which is dynamically created.
- setperm nagios nagios 0755 /var/lib/icinga/lconf
+ setperm nagios nagios 0755 /var/lib/lconf
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
diff --git a/debian/lconf.postrm b/debian/lconf.postrm
index a6c9dc9..ba83c5a 100644
--- a/debian/lconf.postrm
+++ b/debian/lconf.postrm
@@ -6,10 +6,10 @@ case "$1" in
remove)
;;
purge)
- for file in /var/lib/icinga/lconf ; do
+ for file in /var/lib/lconf ; do
dpkg-statoverride --force --remove $file 2>/dev/null || true
done
- rm -rf /var/lib/icinga/lconf
+ rm -rf /var/lib/lconf
;;
esac
diff --git a/debian/patches/install-prefix b/debian/patches/install-prefix
index 2af6c72..82bdf0f 100644
--- a/debian/patches/install-prefix
+++ b/debian/patches/install-prefix
@@ -1,6 +1,6 @@
--- a/install.sh
+++ b/install.sh
-@@ -40,23 +40,34 @@ if [ "$?" != 0 ]; then
+@@ -40,61 +40,72 @@ if [ "$?" != 0 ]; then
ScriptExit "Perl module 'Net::LDAP::Entry' is not installed"
fi
@@ -8,7 +8,7 @@
+# debian: skip wizard
+#WizardAsk
echo ""
-+PREFIX="/etc/icinga" # lconf.pm location
++PREFIX="/etc/lconf" # lconf.pm location
+USER="root" # dpkg-statoverride will take care
+GROUP="root" # dpkg-statoverride will take care
+DIR_SCHEMA="debian/lconf/etc/ldap/schema"
@@ -40,11 +40,34 @@
+#install -d -o $USER -g $GROUP -m 750 $PREFIX
+install -d $PREFIX
+#install -d -o $USER -g $GROUP -m 750 $PREFIX/etc
-+install -d -o $USER -g $GROUP -m 750 debian/lconf/var/lib/icinga/lconf
++install -d -o $USER -g $GROUP -m 750 debian/lconf/var/lib/lconf
ScriptOutput CREATE "LConf Exporter"
cat $DIR_SOURCE/LConfExport.pl.in | sed -e "s/@prefix@/$PREFIX_QUOTED/g" > $DIR_SOURCE/LConfExport.pl.tmp1
-@@ -83,18 +94,18 @@ install -o $USER -g $GROUP -m 750 $DIR_S
+ cat $DIR_SOURCE/LConfExport.pl.tmp1 | sed -e "s/@ldapprefix@/$LDAPPREFIX/g" > $DIR_SOURCE/LConfExport.pl
+ ScriptOutput INSTALL "LConf Exporter"
+-install -o $USER -g $GROUP -m 750 $DIR_SOURCE/LConfExport.pl $PREFIX/
++install -o $USER -g $GROUP -m 750 $DIR_SOURCE/LConfExport.pl $PREFIX/LConfExport
+
+ ScriptOutput CREATE "LConf Importer"
+ cat $DIR_SOURCE/LConfImport.pl.in | sed -e "s/@prefix@/$PREFIX_QUOTED/g" > $DIR_SOURCE/LConfImport.pl.tmp1
+ cat $DIR_SOURCE/LConfImport.pl.tmp1 | sed -e "s/@ldapprefix@/$LDAPPREFIX/g" > $DIR_SOURCE/LConfImport.pl
+ ScriptOutput INSTALL "LConf Importer"
+-install -o $USER -g $GROUP -m 750 $DIR_SOURCE/LConfImport.pl $PREFIX/
++install -o $USER -g $GROUP -m 750 $DIR_SOURCE/LConfImport.pl $PREFIX/LConfImport
+
+ ScriptOutput CREATE "LConf Slave Exporter"
+ cat $DIR_SOURCE/LConfSlaveExport.pl.in | sed -e "s/@prefix@/$PREFIX_QUOTED/g" > $DIR_SOURCE/LConfSlaveExport.pl.tmp1
+ cat $DIR_SOURCE/LConfSlaveExport.pl.tmp1 | sed -e "s/@ldapprefix@/$LDAPPREFIX/g" > $DIR_SOURCE/LConfSlaveExport.pl
+ ScriptOutput INSTALL "LConf Slave Exporter"
+-install -o $USER -g $GROUP -m 750 $DIR_SOURCE/LConfSlaveExport.pl $PREFIX/
++install -o $USER -g $GROUP -m 750 $DIR_SOURCE/LConfSlaveExport.pl $PREFIX/LConfSlaveExport
+
+ ScriptOutput CREATE "LConf Slave Syncer"
+ cat $DIR_SOURCE/LConfSlaveSync.pl.in | sed -e "s/@prefix@/$PREFIX_QUOTED/g" > $DIR_SOURCE/LConfSlaveSync.pl
+ ScriptOutput INSTALL "LConf Slave Syncer"
+-install -o $USER -g $GROUP -m 750 $DIR_SOURCE/LConfSlaveSync.pl $PREFIX/
++install -o $USER -g $GROUP -m 750 $DIR_SOURCE/LConfSlaveSync.pl $PREFIX/LConfSlaveSync
ScriptOutput CREATE "LConf config file"
cat $DIR_SOURCE/config.pm.in | sed -e "s/@domain@/$ROOTDN/g" > $DIR_SOURCE/config.pm.tmp1
@@ -54,7 +77,7 @@
cat $DIR_SOURCE/config.pm.tmp3 | sed -e "s/@ldapprefix@/$LDAPPREFIX/g" > $DIR_SOURCE/config.pm
ScriptOutput INSTALL "LConf config file"
-install -o $USER -g $GROUP -m 700 $DIR_SOURCE/config.pm $PREFIX/etc/
-+install -o $USER -g $GROUP -m 644 $DIR_SOURCE/config.pm debian/lconf/etc/icinga/lconf.pm
++install -o $USER -g $GROUP -m 644 $DIR_SOURCE/config.pm debian/lconf/etc/lconf
ScriptOutput INSTALL "LDAP schema file"
cat $DIR_SOURCE/netways.schema.in | sed -e "s/@ldapprefix@/$LDAPPREFIX/g" > $DIR_SOURCE/netways.schema
@@ -62,13 +85,19 @@
ScriptOutput INSTALL "Default templates"
-install -o $USER -g $GROUP -m 640 $DIR_SOURCE/default-templates.cfg $PREFIX/etc/
-+install -o $USER -g $GROUP -m 640 $DIR_SOURCE/default-templates.cfg debian/lconf/etc/icinga
++install -o $USER -g $GROUP -m 640 $DIR_SOURCE/default-templates.cfg debian/lconf/etc/lconf
ScriptOutput CREATE "LDAP base ldif"
cat $DIR_SOURCE/base.ldif.in | sed -e "s/@domain@/$ROOTDN/g" > $DIR_SOURCE/base.ldif.tmp1
--- a/source/config.pm.in
+++ b/source/config.pm.in
-@@ -8,10 +8,10 @@ $optLDAPDN = 'ou=LConf, at domain@';
+@@ -3,15 +3,16 @@
+ # way to ldap server
+ $optLDAPServer = '127.0.0.1';
+ $optLDAPDN = 'ou=LConf, at domain@';
++# note: ou=NagiosConfig, is always prepended to $optLDAPDN
+
+ # export script's user
$optExportUser = '@user@';
# export script's lock file
@@ -77,16 +106,16 @@
# slave export temp path
-$optTempPath = '@prefix@/var/';
-+$optTempPath = '/var/lib/icinga/lconf/';
++$optTempPath = '/var/lib/lconf/';
# slave export parents remove
# (this will remove the parents parameter in slave configs if set to 1)
-@@ -29,14 +29,14 @@ $optAlterSatelliteChecksOnMaster = 0;
+@@ -29,15 +30,15 @@ $optAlterSatelliteChecksOnMaster = 0;
# revision module
$optRevisionEnabled = '0';
$optRevisionPath = 'https://MySVNServer/playground/lconf';
-$optRevisionTemp = '@prefix@/var/revision';
-+$optRevisionTemp = '/var/lib/icinga/lconf-revision';
++$optRevisionTemp = '/var/lib/lconf/lconf-revision';
# options for slave sync (if used)
$optSlaveSyncHosts = 'host1, host2, host3';
@@ -94,10 +123,12 @@
$optSlaveSyncDirRemote = '/usr/local/icinga/var/perfdata-remote';
$optSlaveSyncDirSpool = '/usr/local/icinga/var/spool/checkresults';
-$optSlaveSyncPidFile = '@prefix@/var/LConfSlaveSync.pid';
+-$optSlaveSyncExtCmd = '/usr/local/icinga/var/rw/icinga.cmd';
+$optSlaveSyncPidFile = '/var/run/icinga/LConfSlaveSync.pid';
- $optSlaveSyncExtCmd = '/usr/local/icinga/var/rw/icinga.cmd';
++$optSlaveSyncExtCmd = '/var/lib/icinga/rw/icinga.cmd';
$optSlaveSyncGet = '60';
$optSlaveSyncPush = '30';
+
--- a/source/LConfExport.pl.in
+++ b/source/LConfExport.pl.in
@@ -119,7 +119,7 @@ GetOptions(
@@ -105,7 +136,7 @@
# import config
use lib '@prefix@';
-use etc::config;
-+use lconf;
++use config;
use vars qw($optLDAPServer $optLDAPDN $optExportUser $optExportLock $optRevisionEnabled $optRevisionPath $optRevisionTemp %itemMap);
@@ -125,7 +156,7 @@
# import config
use lib '@prefix@';
-use etc::config;
-+use lconf;
++use config;
use vars qw($optLDAPServer $optLDAPDN %itemMap);
@@ -136,7 +167,7 @@
# import config
use lib '@prefix@';
-use etc::config;
-+use lconf;
++use config;
use vars qw($optLDAPServer $optLDAPDN $optExportUser $optRemovePraentsOnSatellite $optTempPath $optEnableProcessPerfdataOnSatellite $optAlterSatelliteChecksOnMaster);
@@ -147,7 +178,7 @@
# import config
use lib '@prefix@';
-use etc::config;
-+use lconf;
++use config;
use vars qw($optSlaveSyncHosts $optSlaveSyncDirLocal $optSlaveSyncDirRemote $optSlaveSyncDirSpool $optSlaveSyncPidFile $optSlaveSyncExtCmd $optSlaveSyncGet $optSlaveSyncPush);
# * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * #
--
Debian packaging for lconf
More information about the Pkg-nagios-changes
mailing list