diff --git a/0032-context-automatically-setup-arch-variable.patch b/0032-context-automatically-setup-arch-variable.patch new file mode 100644 index 0000000..36718a7 --- /dev/null +++ b/0032-context-automatically-setup-arch-variable.patch @@ -0,0 +1,39 @@ +From 5f2278ee2a30b94b5d80ab480505bf6b4750dd1a Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ale=C5=A1=20Mat=C4=9Bj?= +Date: Thu, 28 May 2026 14:02:05 +0200 +Subject: [PATCH] [context] automatically setup $arch variable + +--- + libdnf/dnf-repo.cpp | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/libdnf/dnf-repo.cpp b/libdnf/dnf-repo.cpp +index 7b4f83bb..0d92c676 100644 +--- a/libdnf/dnf-repo.cpp ++++ b/libdnf/dnf-repo.cpp +@@ -1212,6 +1212,14 @@ dnf_repo_setup(DnfRepo *repo, GError **error) try + "basearch not set"); + return FALSE; + } ++ auto * arch = dnf_context_get_arch_info(priv->context); ++ if (arch == NULL) { ++ g_set_error_literal(error, ++ DNF_ERROR, ++ DNF_ERROR_INTERNAL_ERROR, ++ "arch not set"); ++ return FALSE; ++ } + release = g_key_file_get_string(priv->keyfile, "general", "version", NULL); + if (release == NULL) { + release = g_strdup(dnf_context_get_release_ver(priv->context)); +@@ -1238,6 +1246,7 @@ dnf_repo_setup(DnfRepo *repo, GError **error) try + priv->urlvars = lr_urlvars_set(priv->urlvars, "releasever_major", release_major); + priv->urlvars = lr_urlvars_set(priv->urlvars, "releasever_minor", release_minor); + priv->urlvars = lr_urlvars_set(priv->urlvars, "basearch", basearch); ++ priv->urlvars = lr_urlvars_set(priv->urlvars, "arch", arch); + /* Call libdnf::dnf_context_load_vars(priv->context); only when values not in cache. + * But what about if variables on disk change during long running programs (PackageKit daemon)? + * if (!libdnf::dnf_context_get_vars_cached(priv->context)) +-- +2.54.0 + diff --git a/libdnf.spec b/libdnf.spec index 66e1394..29ef009 100644 --- a/libdnf.spec +++ b/libdnf.spec @@ -56,7 +56,7 @@ Name: libdnf Version: %{libdnf_major_version}.%{libdnf_minor_version}.%{libdnf_micro_version} -Release: 16%{?dist}.alma.1 +Release: 17%{?dist}.alma.1 Summary: Library providing simplified C and Python API to libsolv License: LGPL-2.1-or-later URL: https://github.com/rpm-software-management/libdnf @@ -92,6 +92,7 @@ Patch28: 0028-Fix-dnf_keyring_add_public_key-to-add-all-keys-from-.patch Patch29: 0029-Fix-dnf_keyring_add_public_key-to-add-keys-from-all-.patch Patch30: 0030-Fix-formatting-error-messages-when-importing-subkeys.patch Patch31: 0031-swig-Add-missing-template-for-std-vector-Transaction.patch +Patch32: 0032-context-automatically-setup-arch-variable.patch # AlmaLinux Patch Patch1001: 0001-Add-link-to-AlmaLinux-bugtracker.patch @@ -341,14 +342,18 @@ popd %endif %changelog -* Wed May 06 2026 Eduard Abdullin - 0.73.1-16.alma.1 +* Tue Jun 16 2026 Eduard Abdullin - 0.73.1-17.alma.1 - Add x86_64_v2 to arch_map - Add link to AlmaLinux bugtracker - Fix tests on x86_64_v2 -* Wed May 06 2026 Yuriy Kohut - 0.73.1-16.alma.1 +* Tue Jun 16 2026 Yuriy Kohut - 0.73.1-17.alma.1 - Extend arch_map list with x86_64_v2 for the x86_64 +* Wed Jun 10 2026 Ales Matej - 0.73.1-17 +- context libdnf (microdnf): automatically set and substitute $arch variable + (RHEL-80370) + * Wed Apr 22 2026 Evan Goode - 0.73.1-16 - swig: Add missing %template for std::vector (RHEL-154736)