Alon Bar-Lev has uploaded a new change for review. Change subject: packaging: need engine defaults for utils ......................................................................
packaging: need engine defaults for utils the engine defaults are needed for utils, so we should be able to publish its location via build system. fix breakage of a55d4fd83659. Change-Id: Ic07ccee8888e6e5f6f676b7a1490d855933ebbf4 Signed-off-by: Alon Bar-Lev <[email protected]> --- M Makefile M packaging/services/ovirt-engine-notifier/config.py.in M packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py 3 files changed, 8 insertions(+), 16 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/20/17220/1 diff --git a/Makefile b/Makefile index 92fbe63..182a031 100644 --- a/Makefile +++ b/Makefile @@ -125,6 +125,7 @@ # Rule to generate files from templates: .in: sed \ + -e "s|@ENGINE_DEFAULTS@|$(DATA_DIR)/services/ovirt-engine/ovirt-engine.conf|g" \ -e "s|@ENGINE_VARS@|$(PKG_SYSCONF_DIR)/engine.conf|g" \ -e "s|@ENGINE_SETUP_VARS@|$(SYSCONF_DIR)/ovirt-engine-setup.conf|g" \ -e "s|@ENGINE_NOTIFIER_VARS@|$(PKG_SYSCONF_DIR)/notifier/notifier.conf|g" \ diff --git a/packaging/services/ovirt-engine-notifier/config.py.in b/packaging/services/ovirt-engine-notifier/config.py.in index d59a349..53c6f68 100644 --- a/packaging/services/ovirt-engine-notifier/config.py.in +++ b/packaging/services/ovirt-engine-notifier/config.py.in @@ -14,6 +14,7 @@ DEV_PYTHON_DIR = '@DEV_PYTHON_DIR@' +ENGINE_DEFAULTS = '@ENGINE_DEFAULTS@' ENGINE_VARS = '@ENGINE_VARS@' ENGINE_NOTIFIER_VARS = '@ENGINE_NOTIFIER_VARS@' diff --git a/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py b/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py index 5b2522a..96266ae 100755 --- a/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py +++ b/packaging/services/ovirt-engine-notifier/ovirt-engine-notifier.py @@ -32,17 +32,7 @@ def __init__(self): super(Daemon, self).__init__() - self._engineDefaults = os.path.abspath( - os.path.join( - os.path.join( - os.path.dirname(sys.argv[0]), - '..', - 'ovirt-engine' - ), - 'ovirt-engine-engine.conf', - ) - ) - self._notifierDefaults = os.path.abspath( + self._defaults = os.path.abspath( os.path.join( os.path.dirname(sys.argv[0]), 'ovirt-engine-notifier.conf', @@ -115,19 +105,19 @@ _('This service cannot be executed as root') ) - if not os.path.exists(self._notifierDefaults): + if not os.path.exists(self._defaults): raise RuntimeError( _( "The configuration defaults file '{file}' " "required but missing" ).format( - file=self._notifierDefaults, + file=self._defaults, ) ) self._config = configfile.ConfigFile( ( - self._notifierDefaults, + self._defaults, config.ENGINE_NOTIFIER_VARS, ), ) @@ -180,9 +170,9 @@ 'modules', ), ]), - 'ENGINE_DEFAULTS': self._engineDefaults, + 'ENGINE_DEFAULTS': config.ENGINE_DEFAULTS, 'ENGINE_VARS': config.ENGINE_VARS, - 'ENGINE_NOTIFIER_DEFAULTS': self._notifierDefaults, + 'ENGINE_NOTIFIER_DEFAULTS': self._defaults, 'ENGINE_NOTIFIER_VARS': config.ENGINE_NOTIFIER_VARS, }) -- To view, visit http://gerrit.ovirt.org/17220 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ic07ccee8888e6e5f6f676b7a1490d855933ebbf4 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Alon Bar-Lev <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
