/etc/autoqa.conf and /etc/repoinfo.conf are now moved to
/etc/autoqa/{autoqa.conf,repoinfo.conf}. I surmise that when an
application contains multiple config files, they should be found in a
single location, because it is expected this way.
---
Makefile | 5 +++--
autoqa | 2 +-
autoqa.spec | 7 ++++---
hooks/post-koji-build/watch-koji-builds.py | 2 +-
hooks/post-repo-update/control.template | 2 +-
hooks/post-tree-compose/control.template | 2 +-
hooks/post-tree-compose/watch-composes.py | 2 +-
lib/python/repoinfo.py | 1 -
8 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
index 23c1160..521cbd1 100644
--- a/Makefile
+++ b/Makefile
@@ -22,8 +22,9 @@ install: build
install autoqa $(PREFIX)/usr/bin/
install -d $(PREFIX)/etc/cron.d
[ -f $(PREFIX)/etc/cron.d/autoqa ] || install -m 0644 autoqa.cron
$(PREFIX)/etc/cron.d/autoqa
- [ -f $(PREFIX)/etc/autoqa.conf ] || install -m 0644 autoqa.conf $(PREFIX)/etc/
- [ -f $(PREFIX)/etc/repoinfo.conf ] || install -m 0644 repoinfo.conf $(PREFIX)/etc/
+ install -d $(PREFIX)/etc/autoqa
+ [ -f $(PREFIX)/etc/autoqa/autoqa.conf ] || install -m 0644 autoqa.conf
$(PREFIX)/etc/autoqa/
+ [ -f $(PREFIX)/etc/autoqa/repoinfo.conf ] || install -m 0644 repoinfo.conf
$(PREFIX)/etc/autoqa/
install -d $(PREFIX)$(HOOK_DIR)
for h in hooks/*; do cp -a $$h $(PREFIX)$(HOOK_DIR); done
install -d $(PREFIX)$(TEST_DIR)
diff --git a/autoqa b/autoqa
index f30fe90..efb94e3 100755
--- a/autoqa
+++ b/autoqa
@@ -30,7 +30,7 @@ import urlgrabber
from ConfigParser import *
from subprocess import call
-cfgfile = '/etc/autoqa.conf'
+cfgfile = '/etc/autoqa/autoqa.conf'
# Hardcoded defaults for the 'general' section
conf = {
'local': 'false',
diff --git a/autoqa.spec b/autoqa.spec
index 0eddad7..e853eb9 100644
--- a/autoqa.spec
+++ b/autoqa.spec
@@ -59,7 +59,7 @@ make build PYTHON=%{__python}
%install
rm -rf $RPM_BUILD_ROOT
make install PREFIX=$RPM_BUILD_ROOT TEST_DIR=%{testdir} HOOK_DIR=%{hookdir}
PYTHON=%{__python}
-install -m 644 autoqa.conf repoinfo.conf $RPM_BUILD_ROOT%{_sysconfdir}
+install -m 644 autoqa.conf repoinfo.conf $RPM_BUILD_ROOT%{_sysconfdir}/autoqa/
# front-ends/israwhidebroken
mv %{buildroot}%{_bindir}/start-israwhidebroken %{buildroot}%{_sbindir}/
mv %{buildroot}%{_bindir}/israwhidebroken.wsgi %{buildroot}%{_sbindir}/
@@ -75,10 +75,11 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,-)
%doc README LICENSE TODO
%config(noreplace) %{_sysconfdir}/cron.d/autoqa
-%config(noreplace) %{_sysconfdir}/autoqa.conf
-%config(noreplace) %{_sysconfdir}/repoinfo.conf
+%config(noreplace) %{_sysconfdir}/autoqa/autoqa.conf
+%config(noreplace) %{_sysconfdir}/autoqa/repoinfo.conf
%config(noreplace) %{testdir}/rats_sanity/irb.cfg
%dir %attr(0775,root,autotest) %{_localstatedir}/cache/autoqa
+%{_sysconfdir}/autoqa
%{_bindir}/autoqa
%{testdir}
%{hookdir}
diff --git a/hooks/post-koji-build/watch-koji-builds.py
b/hooks/post-koji-build/watch-koji-builds.py
index 2dcfc6d..ae12471 100755
--- a/hooks/post-koji-build/watch-koji-builds.py
+++ b/hooks/post-koji-build/watch-koji-builds.py
@@ -28,7 +28,7 @@ except OSError, e:
if e.errno != 17: # already exists
raise
# XXX configparser? /etc/koji.conf, section 'koji', item 'server'
-# alternately: read from e.g. /etc/autoqa.conf
+# alternately: read from e.g. /etc/autoqa/autoqa.conf
kojiserver = 'http://koji.fedoraproject.org/kojihub'
# Set of tags to look for
diff --git a/hooks/post-repo-update/control.template
b/hooks/post-repo-update/control.template
index e337bfa..50ba58d 100644
--- a/hooks/post-repo-update/control.template
+++ b/hooks/post-repo-update/control.template
@@ -14,7 +14,7 @@ TEST_CATEGORY = 'Functional'
#url - url of repo that changed
#parents - space-separated list of urls for 'parent' repos of the given repo
#reponame - name for repo that changed
-#autoqa_conf - contents of /etc/autoqa.conf on the server
+#autoqa_conf - contents of /etc/autoqa/autoqa.conf on the server
job.run_test('testclassname', baseurl=url,
parents=parents,
diff --git a/hooks/post-tree-compose/control.template
b/hooks/post-tree-compose/control.template
index 78b4fb2..e327799 100644
--- a/hooks/post-tree-compose/control.template
+++ b/hooks/post-tree-compose/control.template
@@ -13,7 +13,7 @@ TEST_CATEGORY = 'Functional'
#
#url - url of the new tree
#treename - name for the new tree
-#autoqa_conf - contents of /etc/autoqa.conf on the server
+#autoqa_conf - contents of /etc/autoqa/autoqa.conf on the server
job.run_test('testclassname', baseurl=url,
treename=treename,
diff --git a/hooks/post-tree-compose/watch-composes.py
b/hooks/post-tree-compose/watch-composes.py
index b776033..34db0b2 100755
--- a/hooks/post-tree-compose/watch-composes.py
+++ b/hooks/post-tree-compose/watch-composes.py
@@ -25,7 +25,7 @@ parser.add_option('--dryrun', '--dry-run',
action='store_true',
# Set the default arch to our placeholder, '%a'
repoinfo.setarch('%%a') # two %% because of ConfigParser interpolation
-# Define a list of repos to watch, by name (see /etc/repoinfo.conf)
+# Define a list of repos to watch, by name (see /etc/autoqa/repoinfo.conf)
watchcomposes = ['rawhide']
# Setup a cache path
diff --git a/lib/python/repoinfo.py b/lib/python/repoinfo.py
index 87dbcf0..f5d1044 100644
--- a/lib/python/repoinfo.py
+++ b/lib/python/repoinfo.py
@@ -23,7 +23,6 @@ from ConfigParser import SafeConfigParser
import warnings
configpath = ('/etc/autoqa/repoinfo.conf',
- '/etc/repoinfo.conf',
'repoinfo.conf')
class RepoinfoConfig(object):
--
1.6.6.1