diff --git a/odcs-sni.patch b/odcs-sni.patch new file mode 100644 index 0000000..6dffa68 --- /dev/null +++ b/odcs-sni.patch @@ -0,0 +1,30 @@ +diff --git a/server/odcs/server/celery_tasks.py b/server/odcs/server/celery_tasks.py +index cb0926c..7a94077 100644 +--- a/server/odcs/server/celery_tasks.py ++++ b/server/odcs/server/celery_tasks.py +@@ -73,10 +73,21 @@ if broker_url.startswith("amqps://"): + + ssl_ctx = {} + +- broker_use_ssl = { +- "server_hostname": host, +- "context": {"purpose": ssl.Purpose.SERVER_AUTH}, +- } ++ # Set the server_hostname only if it's configured in the CELERY_CONFIG, ++ # otherwise Celery uses SNI everytime even if we don't need it. ++ if "server_hostname" in conf.celery_config: ++ broker_use_ssl = { ++ "server_hostname": host, ++ "context": {"purpose": ssl.Purpose.SERVER_AUTH}, ++ } ++ else: ++ broker_use_ssl = {} ++ ++ # Allow setting certificates using the CELERY_CONFIG. ++ for key in ["ca_certs", "keyfile", "certfile"]: ++ if key in conf.celery_config: ++ broker_use_ssl[key] = conf.celery_config[key] ++ + conf.celery_config.update({"broker_use_ssl": broker_use_ssl}) + broker_url = broker_url.replace("amqps://", "amqp://") + diff --git a/odcs.spec b/odcs.spec index 273477c..1a131f4 100644 --- a/odcs.spec +++ b/odcs.spec @@ -4,7 +4,7 @@ Name: odcs Version: 0.2.36 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The On Demand Compose Service @@ -18,6 +18,7 @@ Source1: odcs-backend.service Patch0: odcs-pythonldap.patch # Fedora related configuration for ODCS. Patch1: odcs-fedora-conf.patch +Patch2: odcs-sni.patch BuildArch: noarch @@ -76,6 +77,13 @@ Requires: python3-psutil Requires: python3-fedmsg Requires: python3-flufl-lock Requires: python3-celery +Requires: python3-flask +Requires: python3-flask-login +Requires: python3-flask-sqlalchemy +Requires: python3-systemd +Requires: python3-ldap +Requires: python3-defusedxml +Requires: python3-flask-script Requires: python3-odcs-common = %{version}-%{release} @@ -124,6 +132,7 @@ sed -i '/futures/d' server/requirements.txt %patch0 -p1 -b .pyldap %patch1 -p1 +%patch2 -p1 %build %py3_build @@ -209,6 +218,9 @@ nosetests-%{python3_version} -v %changelog +* Tue Oct 22 2019 Jan Kaluza - 0.2.36-2 +- Add missing requires, backport patch to disable SNI when not needed. + * Thu Oct 17 2019 Jan Kaluza - 0.2.36-1 - new version