Skip to content

Commit ac91cd0

Browse files
committed
Merge pull request #443 from titilambert/debian
Clean packaging
2 parents 76cf799 + 747eda5 commit ac91cd0

8 files changed

Lines changed: 118 additions & 19 deletions

File tree

debian.upstream/gbp.conf

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[DEFAULT]
2+
pristine-tar = False
3+
upstream-branch = master
4+
5+
[git-buildpackage]
6+
export-dir = ../build-area/
7+
upstream-tag = adagios-%(version)s

debian.upstream/install

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
debian/adagios/usr/lib/python*/dist-packages/adagios/etc/adagios etc/
22
debian/adagios/usr/lib/python*/dist-packages/adagios/etc/sudoers.d/adagios etc/sudoers.d/
3+
debian/adagios/usr/lib/python*/dist-packages/adagios/apache/adagios.conf etc/apache2/conf-available/adagios.conf
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
Index: adagios/adagios/etc/adagios/adagios.conf
2+
===================================================================
3+
--- adagios.orig/adagios/etc/adagios/adagios.conf
4+
+++ adagios/adagios/etc/adagios/adagios.conf
5+
@@ -1,24 +1,24 @@
6+
# nagios_config - Path to your nagios configuration file
7+
# If set, adagios will use this file to manage your object
8+
# definitions. If set to None, adagios will search most common
9+
-# paths like /etc/nagios/nagios.cfg for it
10+
-#nagios_config = "/etc/nagios/nagios.cfg"
11+
-nagios_config = "/etc/nagios/nagios.cfg"
12+
+# paths like /etc/nagios3/nagios.cfg for it
13+
+#nagios_config = "/etc/nagios3/nagios.cfg"
14+
+nagios_config = "/etc/nagios3/nagios.cfg"
15+
16+
# This should be the URL to your nagios server. If set, then
17+
# Adagios can link you directly from configuration to live object.
18+
# If you don't need this feature. Set nagios_url to '' or None
19+
-#nagios_url = "http://mynagiosserver/nagios"
20+
-nagios_url = "/nagios"
21+
+#nagios_url = "http://mynagiosserver/nagios3"
22+
+nagios_url = "/nagios3"
23+
24+
-# destination_directory - Where adagios will store new objects
25+
+# destination_directory ="/etc/nagios3/adagios/"
26+
# by default. You should make sure that this directory exists
27+
-# and nagios.cfg has a cfg_dir=/etc/nagios/adagios/
28+
-destination_directory = "/etc/nagios/adagios/"
29+
+# and nagios.cfg has a cfg_dir=/etc/nagios3/adagios/
30+
+destination_directory ="/etc/nagios3/adagios/"
31+
32+
# livestatus_path - Path to livestatus socket
33+
livestatus_path = None
34+
-# enable_githandler - If set to true, and your /etc/nagios/ directory
35+
+# enable_githandler - If set to true, and your /etc/nagios3/ directory
36+
# is a git repository. adagios will automatically commit changes when
37+
# they are made.
38+
enable_githandler = True
39+
@@ -34,11 +34,11 @@ auto_reload = False
40+
41+
# nagios_init_script - Path to init script used to start/stop nagios
42+
# Adagios uses this to reload nagios after configuration changes
43+
-nagios_init_script="sudo /etc/init.d/nagios"
44+
+nagios_init_script="sudo /etc/init.d/nagios3"
45+
46+
# nagios_binary - Path to your nagios binary
47+
-# Adagios uses this to run "nagios -v /etc/nagios/nagios.cfg"
48+
-nagios_binary="/usr/sbin/nagios"
49+
+# Adagios uses this to run "nagios -v /etc/nagios3/nagios.cfg"
50+
+nagios_binary="/usr/sbin/nagios3"
51+
52+
53+
# escape_html_tags - Escape html tags in status view
54+
@@ -57,7 +57,7 @@ warn_if_selinux_is_active=True
55+
# This is used for integrated graphs into the status view
56+
# if you do not use pnp or do not need the status view of adagios
57+
# simply change this to any other file that exists
58+
-pnp_filepath="/usr/share/nagios/html/pnp4nagios/index.php"
59+
+pnp_filepath="/usr/share/pnp4nagios/html/index.php"
60+
61+
62+
# contrib_dir - Path to user contributed views
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Index: adagios/adagios/apache/adagios.conf
2+
===================================================================
3+
--- adagios.orig/adagios/apache/adagios.conf
4+
+++ adagios/adagios/apache/adagios.conf
5+
@@ -1,6 +1,6 @@
6+
7+
# Create the wsgi process group
8+
-WSGISocketPrefix run/wsgi
9+
+#WSGISocketPrefix run/wsgi
10+
WSGIDaemonProcess adagios user=nagios group=nagios processes=1 threads=25
11+
WSGIScriptAlias /adagios /usr/lib/python2.7/site-packages/adagios/wsgi.py
12+
13+
@@ -13,7 +13,7 @@ Alias /adagios/media /usr/lib/python2.7/
14+
15+
AuthName "Nagios Access"
16+
AuthType Basic
17+
- AuthUserFile /etc/nagios/passwd
18+
+ AuthUserFile /etc/nagios3/htpasswd.users
19+
Require valid-user
20+
# Redirect /adagios to /adagios/
21+
# So path to css/javascript works
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Index: adagios/adagios/settings.py
2+
===================================================================
3+
--- adagios.orig/adagios/settings.py
4+
+++ adagios/adagios/settings.py
5+
@@ -257,7 +257,7 @@ adagios_configfile = "/etc/adagios/adagi
6+
7+
try:
8+
if not os.path.exists(adagios_configfile):
9+
- alternative_adagios_configfile = "%s/adagios.conf" % djangopath
10+
+ alternative_adagios_configfile = "%s/adagios/adagios.conf" % djangopath
11+
message = "Config file '{adagios_configfile}' not found. Using {alternative_adagios_configfile} instead."
12+
warn(message.format(**locals()))
13+
adagios_configfile = alternative_adagios_configfile

debian.upstream/patches/series

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
fix_settingpy
2+
apache_conf
3+
adagios_conf
4+
sudoers

debian.upstream/patches/sudoers

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Index: adagios/adagios/etc/sudoers.d/adagios
2+
===================================================================
3+
--- adagios.orig/adagios/etc/sudoers.d/adagios
4+
+++ adagios/adagios/etc/sudoers.d/adagios
5+
@@ -1,3 +1,3 @@
6+
Defaults:nagios !requiretty
7+
-nagios ALL = (root) NOPASSWD: /etc/init.d/nagios
8+
+nagios ALL = (root) NOPASSWD: /etc/init.d/nagios3
9+

debian.upstream/rules

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,5 @@
66

77
override_dh_auto_install:
88
python setup.py install --root=debian/adagios --install-layout=deb
9-
10-
# Copy apache config to conf.d and modify some paths
11-
cat debian/adagios/usr/lib/python*/dist-packages/adagios/apache/adagios.conf | \
12-
sed 's|nagios/passwd|nagios3/htpasswd.users|' | \
13-
sed 's|WSGISocketPrefix|#WSGISocketPrefix|' > \
14-
debian/adagios/etc/apache2/conf.d/adagios.conf
15-
16-
# Copy adagios main config file, and adapt paths to debian specific places
17-
18-
sed -i 's|/etc/nagios/|/etc/nagios3/|g' debian/adagios/etc/adagios/adagios.conf
19-
sed -i 's|/etc/init.d/nagios|/etc/init.d/nagios3|g' debian/adagios/etc/adagios/adagios.conf
20-
sed -i 's|nagios"|nagios3"|g' debian/adagios/etc/adagios/adagios.conf
21-
sed -i 's|destination_directory.*|destination_directory="/etc/nagios3/adagios/"|g' debian/adagios/etc/adagios/adagios.conf
22-
sed -i 's|pnp_filepath.*|pnp_filepath="/usr/share/pnp4nagios/html/index.php"|g' debian/adagios/etc/adagios/adagios.conf
23-
24-
# copy sudoers.d file and modify paths
25-
sed -i 's|/etc/init.d/nagios|/etc/init.d/nagios3|' debian/adagios/usr/lib/python2.7/dist-packages/adagios/etc/sudoers.d/adagios
26-
27-
9+
2810
override_dh_auto_build:

0 commit comments

Comments
 (0)