diff --git a/mbs-PR1729-dont-filter-runtime-deps.patch b/mbs-PR1729-dont-filter-runtime-deps.patch new file mode 100644 index 0000000..ae16681 --- /dev/null +++ b/mbs-PR1729-dont-filter-runtime-deps.patch @@ -0,0 +1,61 @@ +From 85e5b9c738f4b415ec4d6aab2e273bbddb39e4a0 Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Aug 26 2021 19:54:10 +0000 +Subject: [PATCH 1/2] don't filter runtime deps for packagerV3 case + + +Fixes: https://pagure.io/fm-orchestrator/issue/1714 + +--- + +diff --git a/module_build_service/web/submit.py b/module_build_service/web/submit.py +index c6b816f..b9b2dca 100644 +--- a/module_build_service/web/submit.py ++++ b/module_build_service/web/submit.py +@@ -789,20 +789,6 @@ def process_module_context_configuration(stream_or_packager): + if not stream.is_static_context(): + stream.set_static_context() + +- # we get the dependenices of the stream +- deps = stream.get_dependencies() +- # with v3 packager format the output v2 stream will always have +- # only one set of dependecies. We need to remove the platform +- # virtual module from runtime dependencies as it is not desired. +- modules = deps[0].get_runtime_modules() +- module_streams = [(m, deps[0].get_runtime_streams(m)[0]) for m in modules +- if m not in conf.base_module_names] +- deps[0].clear_runtime_dependencies() +- +- for module_stream in module_streams: +- module, stream = module_stream +- deps[0].add_runtime_stream(module, stream) +- + return streams, static_context + else: + xmd = stream_or_packager.get_xmd() + +From 2f324d2ba15fbfe62b565299f3f77edf25b71d0c Mon Sep 17 00:00:00 2001 +From: Mike McLean +Date: Aug 26 2021 21:07:23 +0000 +Subject: [PATCH 2/2] fix unit test + + +--- + +diff --git a/tests/test_web/test_submit.py b/tests/test_web/test_submit.py +index b5e3869..fb7aa57 100644 +--- a/tests/test_web/test_submit.py ++++ b/tests/test_web/test_submit.py +@@ -120,9 +120,9 @@ class TestSubmit: + assert len(builds) == 2 + + expected_deps = {"CTX1": {"buildrequires": {"platform": ["f28"]}, +- "requires": {"nginx": ["1"]}}, ++ "requires": {"nginx": ["1"], "platform": ["f28"]}}, + "CTX2": {"buildrequires": {"platform": ["f29.2.0"]}, +- "requires": {}}} ++ "requires": {"platform": ["f29"]}}} + + for build in builds: + mmd = build.mmd() + diff --git a/module-build-service.spec b/module-build-service.spec index 15a9513..749cbdd 100644 --- a/module-build-service.spec +++ b/module-build-service.spec @@ -1,11 +1,12 @@ Name: module-build-service Version: 3.6.1 -Release: 1%{?dist} +Release: 2%{?dist} Summary: The Module Build Service for Modularity License: MIT URL: https://pagure.io/fm-orchestrator Source0: https://files.pythonhosted.org/packages/source/m/%{name}/%{name}-%{version}.tar.gz +Patch0: mbs-PR1729-dont-filter-runtime-deps.patch BuildArch: noarch ExclusiveArch: %{ix86} x86_64 noarch @@ -64,6 +65,7 @@ for a number of tasks: %prep %setup -q +%patch0 -p1 # Workaround because python2-koji has no egg-info file at the momement sed -i '/koji/d' requirements.txt @@ -95,6 +97,9 @@ sed -i '/koji/d' requirements.txt %changelog +* Thu Sep 02 2021 Brendan Reilly - 3.6.1-2 +- Add patch to stop filtering runtime deps for packagerv3 + * Thu Jun 03 2021 Brendan Reilly - 3.6.1-1 - new version