summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Fleischer <lfleischer@archlinux.org>2016-10-17 15:01:45 +0200
committerLukas Fleischer <lfleischer@archlinux.org>2016-10-17 15:13:05 +0200
commit85866796a40923708f6b868c32ddc2f2f4417d1d (patch)
tree8a58a593ad121ea6691196eee6af055e7010e069
parent9581069f49fbc305be3a37c2b46db0a24ede0564 (diff)
downloadaur-85866796a40923708f6b868c32ddc2f2f4417d1d.tar.gz
aur-85866796a40923708f6b868c32ddc2f2f4417d1d.tar.xz
Move configuration to /etc/aurweb/config
Since d4fe77a (Reorganize Git interface scripts, 2016-10-08), the key components of the aurweb SSH interface are installed system-wide. Update the default configuration path to point to a central location. Signed-off-by: Lukas Fleischer <lfleischer@archlinux.org>
-rw-r--r--.gitignore1
-rw-r--r--INSTALL4
-rw-r--r--aurweb/config.py3
-rw-r--r--upgrading/4.4.1.txt3
-rw-r--r--web/lib/confparser.inc.php2
5 files changed, 7 insertions, 6 deletions
diff --git a/.gitignore b/.gitignore
index 2cb5bdc3..f0e462de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,3 @@
-conf/config
dummy-data.sql*
po/*.mo
po/*.po~
diff --git a/INSTALL b/INSTALL
index 395915ae..95cac4cf 100644
--- a/INSTALL
+++ b/INSTALL
@@ -30,8 +30,8 @@ Setup on Arch Linux
}
}
-3) Copy conf/config.proto to conf/config and adjust the configuration (pay
- attention to disable_http_login, enable_maintenance and aur_location).
+3) Copy conf/config.proto to /etc/aurweb/config and adjust the configuration
+ (pay attention to disable_http_login, enable_maintenance and aur_location).
4) Create a new MySQL database and a user and import the AUR SQL schema:
diff --git a/aurweb/config.py b/aurweb/config.py
index aac188b1..a52d9422 100644
--- a/aurweb/config.py
+++ b/aurweb/config.py
@@ -12,8 +12,7 @@ def _get_parser():
if 'AUR_CONFIG' in os.environ:
path = os.environ.get('AUR_CONFIG')
else:
- relpath = "/../conf/config"
- path = os.path.dirname(os.path.realpath(__file__)) + relpath
+ path = "/etc/aurweb/config"
_parser.read(path)
return _parser
diff --git a/upgrading/4.4.1.txt b/upgrading/4.4.1.txt
new file mode 100644
index 00000000..b06696e0
--- /dev/null
+++ b/upgrading/4.4.1.txt
@@ -0,0 +1,3 @@
+1. The default configuration file search path now points to /etc/aurweb/config.
+ Make sure you copy your aurweb configuration to the new location before
+ upgrading.
diff --git a/web/lib/confparser.inc.php b/web/lib/confparser.inc.php
index 6368b869..789300e1 100644
--- a/web/lib/confparser.inc.php
+++ b/web/lib/confparser.inc.php
@@ -4,7 +4,7 @@ function config_load() {
global $AUR_CONFIG;
if (!isset($AUR_CONFIG)) {
- $AUR_CONFIG = parse_ini_file("../../conf/config", true, INI_SCANNER_RAW);
+ $AUR_CONFIG = parse_ini_file("/etc/aurweb/config", true, INI_SCANNER_RAW);
}
}