From 1ad01979cd9ec295441eb5d9c42e2135cea98a58377d224d05718fbc8e700cbc Mon Sep 17 00:00:00 2001 From: Daniel Garcia Moreno Date: Thu, 23 Oct 2025 11:41:41 +0200 Subject: [PATCH] Convert to libalternatives, bsc#1245883 --- python-cbor2.changes | 12 +++++++++++- python-cbor2.spec | 15 ++++++++++++++- 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/python-cbor2.changes b/python-cbor2.changes index ac162ef..7bffb0c 100644 --- a/python-cbor2.changes +++ b/python-cbor2.changes @@ -1,3 +1,13 @@ +------------------------------------------------------------------- +Tue Aug 12 08:01:01 UTC 2025 - Markéta Machová + +- Make the libalternatives transition conditional + +------------------------------------------------------------------- +Wed Jun 25 11:44:28 UTC 2025 - Markéta Machová + +- Convert to libalternatives + ------------------------------------------------------------------- Tue Oct 22 13:48:00 UTC 2024 - Dirk Müller @@ -16,7 +26,7 @@ Thu Jun 6 10:36:17 UTC 2024 - John Paul Adrian Glaubitz -- Update to 5.6.3 +- Update to 5.6.3 (bsc#1220096, CVE-2024-26134): * Fixed decoding of epoch-based dates being affected by the local time zone in the C extension - from version 5.6.2 diff --git a/python-cbor2.spec b/python-cbor2.spec index 203a2f6..1621430 100644 --- a/python-cbor2.spec +++ b/python-cbor2.spec @@ -1,7 +1,7 @@ # # spec file for package python-cbor2 # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2025 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,11 @@ # +%if 0%{?suse_version} > 1500 +%bcond_without libalternatives +%else +%bcond_with libalternatives +%endif %{?sle15_python_module_pythons} Name: python-cbor2 Version: 5.6.5 @@ -33,8 +38,13 @@ BuildRequires: %{python_module setuptools_scm >= 6.4} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros +%if %{with libalternatives} +BuildRequires: alts +Requires: alts +%else Requires(post): update-alternatives Requires(postun): update-alternatives +%endif %python_subpackages %description @@ -60,6 +70,9 @@ export LANG=en_US.UTF8 export LANG=en_US.UTF8 %pytest_arch +%pre +%python_libalternatives_reset_alternative cbor2 + %post %python_install_alternative cbor2