Univention Bugzilla – Attachment 10038 Details for
Bug 49517
run ucr filter on docker-compose file before using the file
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
appcenter.patch
appcenter.patch (text/plain), 2.68 KB, created by
Felix Botner
on 2019-05-21 15:30:32 CEST
(
hide
)
Description:
appcenter.patch
Filename:
MIME Type:
Creator:
Felix Botner
Created:
2019-05-21 15:30:32 CEST
Size:
2.68 KB
patch
obsolete
>diff --git a/management/univention-appcenter/python/appcenter-docker/docker.py b/management/univention-appcenter/python/appcenter-docker/docker.py >index cac2ebb..90f97c8 100644 >--- a/management/univention-appcenter/python/appcenter-docker/docker.py >+++ b/management/univention-appcenter/python/appcenter-docker/docker.py >@@ -389,10 +389,7 @@ class MultiDocker(Docker): > return > > def pull(self): >- mkdir(self.app.get_compose_dir()) >- yml_file = self.app.get_compose_file('docker-compose.yml') >- shutil.copy2(self.app.get_cache_file('compose'), yml_file) >- os.chmod(yml_file, 0600) >+ self._setup_yml(recreate=True) > self.logger.info('Downloading app images') > ret, out = call_process2(['docker-compose', '-p', self.app.id, 'pull'], cwd=self.app.get_compose_dir(), logger=_logger) > if ret != 0: >@@ -422,11 +419,11 @@ class MultiDocker(Docker): > template_file = '%s.template' % yml_file > mkdir(self.app.get_compose_dir()) > shutil.copy2(self.app.get_cache_file('compose'), template_file) >- os.chmod(yml_file, 0600) > with open(template_file) as fd: > template = fd.read() > content = ucr_run_filter(template) > with open(yml_file, 'wb') as fd: >+ os.chmod(yml_file, 0600) > fd.write(content) > content = yaml.load(open(yml_file), yaml.RoundTripLoader, preserve_quotes=True) > container_def = content['services'][self.app.docker_main_service] >diff --git a/management/univention-appcenter/python/appcenter/app.py b/management/univention-appcenter/python/appcenter/app.py >index 3173c07..dffa055 100644 >--- a/management/univention-appcenter/python/appcenter/app.py >+++ b/management/univention-appcenter/python/appcenter/app.py >@@ -50,7 +50,7 @@ from univention.appcenter.log import get_base_logger > from univention.appcenter.packages import get_package_manager, packages_are_installed, reload_package_manager > from univention.appcenter.meta import UniventionMetaClass, UniventionMetaInfo > from univention.appcenter.utils import app_ports, mkdir, get_current_ram_available, get_locale, container_mode, _ >-from univention.appcenter.ucr import ucr_get, ucr_includes, ucr_is_true, ucr_load >+from univention.appcenter.ucr import ucr_get, ucr_includes, ucr_is_true, ucr_load, ucr_run_filter > from univention.appcenter.settings import Setting > from univention.appcenter.ini_parser import read_ini_file > >@@ -986,7 +986,7 @@ class App(object): > # appcenter-docker is not installed > return None > yml_file = self.get_cache_file('compose') >- content = yaml.load(open(yml_file), yaml.RoundTripLoader, preserve_quotes=True) >+ content = yaml.load(ucr_run_filter(open(yml_file).read()), yaml.RoundTripLoader, preserve_quotes=True) > image = content['services'][self.docker_main_service]['image'] > return image > else:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 49517
: 10038