From 801dd51f84ec5979c540dc2cca16edd088f72d7c Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Thu, 17 Aug 2023 17:28:34 -0400
Subject: [PATCH] Correct %cargo_registry path

%{_datadir} should not be used like this in specfiles or macros. It
breaks flatpak builds.

Relates: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directory_dependencies
---
 macros.d/macros.cargo | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/macros.d/macros.cargo b/macros.d/macros.cargo
index 147a7ca..3d03e2e 100644
--- a/macros.d/macros.cargo
+++ b/macros.d/macros.cargo
@@ -26,7 +26,7 @@
 
 # cargo_registry: path to the root of the directory-based "local cargo registry"
 #       with replaces the "crates.io" source
-%cargo_registry %{_datadir}/cargo/registry
+%cargo_registry /usr/share/cargo/registry
 
 # crate_instdir: path to the directory where library crates are installed,
 #       with version_no_tilde being the upstream version of the crate
-- 
2.41.0

