Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: setup: move setup related files out of versionlock ......................................................................
packaging: setup: move setup related files out of versionlock the setup requires files that currently resides under base package. due to legacy, these files are versionlocked, this means that they are not at their latest version when setup runs. the only way to move them to setup package is to rename. 1. iptables.defaults is actually a template so adding .in suffix is required anyway. 2. nfs.sysconfig is not really a template but can be considered as such for future use. 3. ovirt-engine-proxy.conf.v2.in became ugly. Change-Id: Ia2e9938a7c1dba61a8c3d88e670c8b9f7203e6a4 Signed-off-by: Alon Bar-Lev <alo...@redhat.com> --- M Makefile M ovirt-engine.spec.in R packaging/conf/iptables.default.in R packaging/conf/nfs.sysconfig.in R packaging/conf/ovirt-engine-proxy.conf.v2.in M packaging/fedora/setup/basedefs.py M packaging/setup/ovirt_engine_setup/constants.py M packaging/setup/ovirt_engine_setup/util.py M packaging/setup/plugins/ovirt-engine-setup/system/nfs.py 9 files changed, 24 insertions(+), 22 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/76/15776/1 diff --git a/Makefile b/Makefile index a26ee2f..c0db0ad 100644 --- a/Makefile +++ b/Makefile @@ -314,14 +314,14 @@ # Configuration files: install -m 644 packaging/conf/engine-config-install.properties $(DESTDIR)$(DATA_DIR)/conf - install -m 644 packaging/conf/iptables.default $(DESTDIR)$(DATA_DIR)/conf + install -m 644 packaging/conf/iptables.default.in $(DESTDIR)$(DATA_DIR)/conf #FirewallD install -m 644 packaging/firewalld/base/ovirt-nfs.xml.in $(DESTDIR)$(DATA_DIR)/firewalld/base/ovirt-nfs.xml.in install -m 644 packaging/firewalld/base/ovirt-http.xml.in $(DESTDIR)$(DATA_DIR)/firewalld/base/ovirt-http.xml.in install -m 644 packaging/firewalld/base/ovirt-https.xml.in $(DESTDIR)$(DATA_DIR)/firewalld/base/ovirt-https.xml.in - install -m 644 packaging/conf/nfs.sysconfig $(DESTDIR)$(DATA_DIR)/conf - install -m 644 packaging/conf/ovirt-engine-proxy.conf.in $(DESTDIR)$(DATA_DIR)/conf + install -m 644 packaging/conf/nfs.sysconfig.in $(DESTDIR)$(DATA_DIR)/conf + install -m 644 packaging/conf/ovirt-engine-proxy.conf.v2.in $(DESTDIR)$(DATA_DIR)/conf install -m 644 packaging/conf/ovirt-engine-root-redirect.conf.in $(DESTDIR)$(DATA_DIR)/conf # Shared python modules: diff --git a/ovirt-engine.spec.in b/ovirt-engine.spec.in index 8378899..26acf2e 100644 --- a/ovirt-engine.spec.in +++ b/ovirt-engine.spec.in @@ -601,9 +601,6 @@ # versionlock we cannot move these until # 3.4 %{engine_data}/conf/engine-config-install.properties -%{engine_data}/conf/ovirt-engine-proxy.conf.in -%{engine_data}/conf/iptables.default -%{engine_data}/conf/nfs.sysconfig # Documentation: %doc LICENSE @@ -758,6 +755,9 @@ # Configuration files %{engine_data}/conf/ovirt-engine-root-redirect.conf.in %{engine_data}/conf/version +%{engine_data}/conf/ovirt-engine-proxy.conf.v2.in +%{engine_data}/conf/iptables.default.in +%{engine_data}/conf/nfs.sysconfig.in # Plugins directory: %dir %{engine_data}/scripts/plugins diff --git a/packaging/conf/iptables.default b/packaging/conf/iptables.default.in similarity index 100% rename from packaging/conf/iptables.default rename to packaging/conf/iptables.default.in diff --git a/packaging/conf/nfs.sysconfig b/packaging/conf/nfs.sysconfig.in similarity index 100% rename from packaging/conf/nfs.sysconfig rename to packaging/conf/nfs.sysconfig.in diff --git a/packaging/conf/ovirt-engine-proxy.conf.in b/packaging/conf/ovirt-engine-proxy.conf.v2.in similarity index 100% rename from packaging/conf/ovirt-engine-proxy.conf.in rename to packaging/conf/ovirt-engine-proxy.conf.v2.in diff --git a/packaging/fedora/setup/basedefs.py b/packaging/fedora/setup/basedefs.py index edb8e8f..165bab4 100644 --- a/packaging/fedora/setup/basedefs.py +++ b/packaging/fedora/setup/basedefs.py @@ -89,10 +89,10 @@ FILE_ENGINE_EXTENDED_CONF = os.path.join(DIR_CONFIG, FILE_ENGINE_CONFIG_PROPS) FILE_RESOLV_CONF="/etc/resolv.conf" FILE_SLIMMING_PROFILE_CONF="/usr/share/ovirt-engine/conf/slimming.conf" -FILE_IPTABLES_DEFAULT="%s/ovirt-engine/conf/iptables.default" % DIR_USR_SHARE +FILE_IPTABLES_DEFAULT="%s/ovirt-engine/conf/iptables.default.in" % DIR_USR_SHARE FILE_IPTABLES_EXAMPLE="/etc/ovirt-engine/iptables.example" FILE_IPTABLES_BACKUP="%s/ovirt-engine/backups/iptables.backup" % DIR_VAR_LIB -FILE_NFS_SYSCONFIG="%s/ovirt-engine/conf/nfs.sysconfig" % DIR_USR_SHARE +FILE_NFS_SYSCONFIG="%s/ovirt-engine/conf/nfs.sysconfig.in" % DIR_USR_SHARE FILE_NFS_BACKUP="%s/ovirt-engine/backups/nfs.backup" % DIR_VAR_LIB FILE_ETC_EXPORTS="/etc/exports" FILE_TRUSTSTORE="%s/.truststore"%(DIR_OVIRT_PKI) @@ -103,7 +103,7 @@ FILE_SSH_PRIVATE_KEY="%s/keys/engine_id_rsa"%(DIR_OVIRT_PKI) FILE_YUM_VERSION_LOCK="/etc/yum/pluginconf.d/versionlock.list" FILE_PSQL_CONF="/var/lib/pgsql/data/postgresql.conf" -FILE_OVIRT_HTTPD_CONF_TEMPLATE="%s/conf/ovirt-engine-proxy.conf.in" % DIR_ENGINE +FILE_OVIRT_HTTPD_CONF_TEMPLATE="%s/conf/ovirt-engine-proxy.conf.v2.in" % DIR_ENGINE FILE_OVIRT_HTTPD_CONF_ROOT_TEMPLATE="%s/conf/ovirt-engine-root-redirect.conf.in" % DIR_ENGINE FILE_OVIRT_HTTPD_CONF_LEGACY = '/etc/httpd/conf.d/ovirt-engine.conf' FILE_OVIRT_HTTPD_CONF="/etc/httpd/conf.d/z-ovirt-engine-proxy.conf" diff --git a/packaging/setup/ovirt_engine_setup/constants.py b/packaging/setup/ovirt_engine_setup/constants.py index 1009c0e..cb301b5 100644 --- a/packaging/setup/ovirt_engine_setup/constants.py +++ b/packaging/setup/ovirt_engine_setup/constants.py @@ -94,7 +94,7 @@ OVIRT_IPTABLES_DEFAULT = os.path.join( OVIRT_ENGINE_DATADIR, 'conf', - 'iptables.default' + 'iptables.default.in' ) OVIRT_FIREWALLD_CONFIG = os.path.join( @@ -270,7 +270,7 @@ OVIRT_NFS_RHEL_CONFIG = os.path.join( OVIRT_ENGINE_DATADIR, 'conf', - 'nfs.sysconfig' + 'nfs.sysconfig.in' ) NFS_EXPORT_FILE = os.path.join( SYSCONFDIR, @@ -333,7 +333,7 @@ HTTPD_CONF_OVIRT_ENGINE_TEMPLATE = os.path.join( OVIRT_ENGINE_DATADIR, 'conf', - 'ovirt-engine-proxy.conf.in', + 'ovirt-engine-proxy.conf.v2.in', ) HTTPD_CONF_OVIRT_ROOT_TEMPLATE = os.path.join( diff --git a/packaging/setup/ovirt_engine_setup/util.py b/packaging/setup/ovirt_engine_setup/util.py index 5b014e2..cda315a 100644 --- a/packaging/setup/ovirt_engine_setup/util.py +++ b/packaging/setup/ovirt_engine_setup/util.py @@ -153,7 +153,7 @@ @util.export -def processTemplate(template, subst): +def processTemplate(template, subst={}): content = '' with open(template, 'r') as f: content = f.read() diff --git a/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py b/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py index 977611a..ac82b77 100644 --- a/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py +++ b/packaging/setup/plugins/ovirt-engine-setup/system/nfs.py @@ -32,6 +32,7 @@ from otopi import filetransaction from ovirt_engine_setup import constants as osetupcons +from ovirt_engine_setup import util as osetuputil from ovirt_engine_setup import dialog @@ -144,16 +145,17 @@ condition=lambda self: self._enabled, ) def _misc(self): - with open(osetupcons.FileLocations.OVIRT_NFS_RHEL_CONFIG) as f: - self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append( - filetransaction.FileTransaction( - name=osetupcons.FileLocations.NFS_RHEL_CONFIG, - content=f.read(), - modifiedList=self.environment[ - otopicons.CoreEnv.MODIFIED_FILES - ], - ) + self.environment[otopicons.CoreEnv.MAIN_TRANSACTION].append( + filetransaction.FileTransaction( + name=osetupcons.FileLocations.NFS_RHEL_CONFIG, + content=osetuputil.processTemplate( + osetupcons.FileLocations.OVIRT_NFS_RHEL_CONFIG, + ), + modifiedList=self.environment[ + otopicons.CoreEnv.MODIFIED_FILES + ], ) + ) @plugin.event( stage=plugin.Stages.STAGE_CLOSEUP, -- To view, visit http://gerrit.ovirt.org/15776 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ia2e9938a7c1dba61a8c3d88e670c8b9f7203e6a4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches