From c16601a337becbe09ee06e02fd2856b0a2820e61 Mon Sep 17 00:00:00 2001 From: Miroslav Rezanina Date: Mon, 11 Nov 2024 07:46:19 -0500 Subject: [PATCH] * Mon Nov 11 2024 Miroslav Rezanina - 24.1.4-20 - ci-Remove-python3-jsonschema-dependency.patch [RHEL-65849] - Resolves: RHEL-65849 ([RHEL-10] Drop cloud-init dependency on python-jsonschema) --- ci-Remove-python3-jsonschema-dependency.patch | 54 +++++++++++++++++++ cloud-init.spec | 10 +++- 2 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 ci-Remove-python3-jsonschema-dependency.patch diff --git a/ci-Remove-python3-jsonschema-dependency.patch b/ci-Remove-python3-jsonschema-dependency.patch new file mode 100644 index 0000000..5cc679d --- /dev/null +++ b/ci-Remove-python3-jsonschema-dependency.patch @@ -0,0 +1,54 @@ +From bb5f9a5e4ad5225ce9f380812a9ec04828702e76 Mon Sep 17 00:00:00 2001 +From: Ani Sinha +Date: Tue, 22 Oct 2024 11:49:47 +0530 +Subject: [PATCH] Remove python3-jsonschema dependency + +RH-Author: Ani Sinha +RH-MergeRequest: 115: Remove python3-jsonschema dependency +RH-Jira: RHEL-65849 +RH-Acked-by: Vitaly Kuznetsov +RH-Acked-by: Miroslav Rezanina +RH-Commit: [1/1] b2c16e5e07d12eeb05a6d86ccb5e988220afafa3 (anisinha/cloud-init) + +Cloud-init is the only package in RHEL-10 that still needs it. It is used by the +schema validator. When python3-jsonschema is not present, the schema validator +does not run and fails gracefully with the log message: + +schema.py[DEBUG]: Ignoring schema validation. jsonschema is not present + +There seems to be no other major regressions if we remove the dependency. +Please see RHEL-61183 for test cases and test results. + +Removing the dependency enables us to not support jsonschema package for +the lifetime of RHEL-10 release. + +python3-jsonschema can be replaced with fastjsonschema but the replacement is +not trivial and upstream has not committed to doing the work yet. When +support for fastjsonschema is implemented, we will incorporate the fix either +through backport or a rebase and then the schema validator will hopefully +be enabled again. + +Remove the dependency from the spec file and requirements.txt file. This +change is downstream only for now. + +X-downstream-only: true + +Signed-off-by: Ani Sinha +--- + .distro/cloud-init.spec | 1 - + requirements.txt | 2 +- + 2 files changed, 1 insertion(+), 2 deletions(-) + +diff --git a/requirements.txt b/requirements.txt +index eabd7a22..84211e80 100644 +--- a/requirements.txt ++++ b/requirements.txt +@@ -28,4 +28,4 @@ requests + jsonpatch + + # For validating cloud-config sections per schema definitions +-jsonschema ++# jsonschema +-- +2.39.3 + diff --git a/cloud-init.spec b/cloud-init.spec index e0e2a92..53af333 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -6,7 +6,7 @@ Name: cloud-init Version: 24.1.4 -Release: 19%{?dist} +Release: 20%{?dist} Summary: Cloud instance init scripts License: Apache-2.0 OR GPL-3.0-only URL: https://github.com/canonical/cloud-init @@ -63,6 +63,8 @@ Patch26: ci-Fix-metric-setting-for-ifcfg-network-connections-for.patch Patch27: ci-fix-Render-bridges-correctly-for-v2-on-sysconfig-wit.patch # For RHEL-65019 - NoCloud - network_config bridges incorrectly configured [rhel-10] Patch28: ci-fix-Render-v2-bridges-correctly-on-network-manager-w.patch +# For RHEL-65849 - [RHEL-10] Drop cloud-init dependency on python-jsonschema +Patch29: ci-Remove-python3-jsonschema-dependency.patch BuildArch: noarch @@ -98,7 +100,6 @@ Requires: procps Requires: python3-configobj Requires: python3-jinja2 Requires: python3-jsonpatch -Requires: python3-jsonschema Requires: python3-oauthlib Requires: python3-pyserial Requires: python3-PyYAML @@ -273,6 +274,11 @@ fi %changelog +* Mon Nov 11 2024 Miroslav Rezanina - 24.1.4-20 +- ci-Remove-python3-jsonschema-dependency.patch [RHEL-65849] +- Resolves: RHEL-65849 + ([RHEL-10] Drop cloud-init dependency on python-jsonschema) + * Tue Nov 05 2024 Miroslav Rezanina - 24.1.4-19 - ci-Fix-metric-setting-for-ifcfg-network-connections-for.patch [RHEL-65016] - ci-fix-Render-bridges-correctly-for-v2-on-sysconfig-wit.patch [RHEL-65019]