Move config templates from install/conf to install/share

Reviewed-By: Stanislav Laznicka <slaznick@redhat.com>
This commit is contained in:
Timo Aaltonen 2017-03-15 19:28:07 +02:00 committed by Christian Heimes
parent b466172d68
commit 1adb3edea9
12 changed files with 17 additions and 24 deletions

View File

@ -533,7 +533,6 @@ AC_CONFIG_FILES([
init/Makefile
install/Makefile
install/certmonger/Makefile
install/conf/Makefile
install/html/Makefile
install/migration/Makefile
install/share/Makefile

View File

@ -1504,9 +1504,6 @@ fi
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/httpd/conf.d/ipa-pki-proxy.conf
%ghost %attr(0644,root,apache) %config(noreplace) %{_sysconfdir}/ipa/kdcproxy/ipa-kdc-proxy.conf
%dir %attr(0755,root,root) %{_sysconfdir}/ipa/dnssec
%{_usr}/share/ipa/ipa.conf
%{_usr}/share/ipa/ipa-rewrite.conf
%{_usr}/share/ipa/ipa-pki-proxy.conf
%ghost %attr(0644,root,apache) %config(noreplace) %{_usr}/share/ipa/html/ca.crt
%ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/krb.con
%ghost %attr(0644,root,apache) %{_usr}/share/ipa/html/krb5.ini

View File

@ -6,7 +6,6 @@ NULL =
SUBDIRS = \
certmonger \
conf \
html \
migration \
share \

View File

@ -1,13 +0,0 @@
NULL =
appdir = $(IPA_DATA_DIR)
app_DATA = \
ipa.conf \
ipa-kdc-proxy.conf.template \
ipa-pki-proxy.conf \
ipa-rewrite.conf \
$(NULL)
EXTRA_DIST = \
$(app_DATA) \
$(NULL)

View File

@ -90,6 +90,10 @@ dist_app_DATA = \
gssproxy.conf.template \
kdcproxy.wsgi \
ipakrb5.aug \
ipa.conf.template \
ipa-kdc-proxy.conf.template \
ipa-pki-proxy.conf.template \
ipa-rewrite.conf.template \
$(NULL)
kdcproxyconfdir = $(IPA_SYSCONF_DIR)/kdcproxy

View File

@ -232,7 +232,8 @@ class DogtagInstance(service.Service):
def http_proxy(self):
""" Update the http proxy file """
template_filename = (
os.path.join(paths.USR_SHARE_IPA_DIR, "ipa-pki-proxy.conf"))
os.path.join(paths.USR_SHARE_IPA_DIR,
"ipa-pki-proxy.conf.template"))
sub_dict = dict(
DOGTAG_PORT=8009,
CLONE='' if self.clone else '#',

View File

@ -217,7 +217,9 @@ class HTTPInstance(service.Service):
target_fname = paths.HTTPD_IPA_CONF
http_txt = ipautil.template_file(
os.path.join(paths.USR_SHARE_IPA_DIR, "ipa.conf"), self.sub_dict)
os.path.join(paths.USR_SHARE_IPA_DIR,
"ipa.conf.template"),
self.sub_dict)
self.fstore.backup_file(paths.HTTPD_IPA_CONF)
http_fd = open(target_fname, "w")
http_fd.write(http_txt)
@ -226,7 +228,8 @@ class HTTPInstance(service.Service):
target_fname = paths.HTTPD_IPA_REWRITE_CONF
http_txt = ipautil.template_file(
os.path.join(paths.USR_SHARE_IPA_DIR, "ipa-rewrite.conf"),
os.path.join(paths.USR_SHARE_IPA_DIR,
"ipa-rewrite.conf.template"),
self.sub_dict)
self.fstore.backup_file(paths.HTTPD_IPA_REWRITE_CONF)
http_fd = open(target_fname, "w")

View File

@ -1696,14 +1696,17 @@ def upgrade_configuration():
ds_dirname = dsinstance.config_dirname(ds_serverid)
upgrade_file(sub_dict, paths.HTTPD_IPA_CONF,
os.path.join(paths.USR_SHARE_IPA_DIR, "ipa.conf"))
os.path.join(paths.USR_SHARE_IPA_DIR,
"ipa.conf.template"))
upgrade_file(sub_dict, paths.HTTPD_IPA_REWRITE_CONF,
os.path.join(paths.USR_SHARE_IPA_DIR, "ipa-rewrite.conf"))
os.path.join(paths.USR_SHARE_IPA_DIR,
"ipa-rewrite.conf.template"))
if ca.is_configured():
upgrade_file(
sub_dict,
paths.HTTPD_IPA_PKI_PROXY_CONF,
os.path.join(paths.USR_SHARE_IPA_DIR, "ipa-pki-proxy.conf"),
os.path.join(paths.USR_SHARE_IPA_DIR,
"ipa-pki-proxy.conf.template"),
add=True)
else:
if os.path.isfile(paths.HTTPD_IPA_PKI_PROXY_CONF):