import rust-packaging-24-6.el9

i9ce changed/i9/rust-packaging-24-6.el9
Arkady L. Shane 1 year ago
parent 96028689d2
commit 2c52b1f1cb
Signed by: tigro
GPG Key ID: 9C7900103E1C4F8B

@ -0,0 +1,49 @@
From 0ff9bb855cf6be46f26801d00dd8c057a11eecd9 Mon Sep 17 00:00:00 2001
From: Yaakov Selkowitz <yselkowi@redhat.com>
Date: Thu, 17 Aug 2023 13:33:17 -0400
Subject: [PATCH] Correct %__cargo and %__cargo_to_rpm paths
%{_bindir} 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
---
fileattrs/cargo.attr | 4 ++--
macros.d/macros.cargo | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fileattrs/cargo.attr b/fileattrs/cargo.attr
index b97383d..0dabe9b 100644
--- a/fileattrs/cargo.attr
+++ b/fileattrs/cargo.attr
@@ -1,3 +1,3 @@
-%__cargo_provides %{_bindir}/cargo2rpm provides --subpackage --feature=%{name}
-%__cargo_requires %{_bindir}/cargo2rpm requires --subpackage --feature=%{name}
+%__cargo_provides /usr/bin/cargo2rpm provides --subpackage --feature=%{name}
+%__cargo_requires /usr/bin/cargo2rpm requires --subpackage --feature=%{name}
%__cargo_path ^%{cargo_registry}/[^/]+/Cargo\\.toml$
diff --git a/macros.d/macros.cargo b/macros.d/macros.cargo
index 672ae06..147a7ca 100644
--- a/macros.d/macros.cargo
+++ b/macros.d/macros.cargo
@@ -6,7 +6,7 @@
# features that have not been stabilized yet, i.e. the
# "-Z avoid-dev-deps" flag which is passed to cargo by the cargo_build,
# cargo_install, and cargo_test macros.
-%__cargo %{_bindir}/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' %{_bindir}/cargo
+%__cargo /usr/bin/env CARGO_HOME=.cargo RUSTC_BOOTSTRAP=1 RUSTFLAGS='%{build_rustflags}' /usr/bin/cargo
# __cargo_common_opts: common command line flags for cargo
#
@@ -22,7 +22,7 @@
%__cargo_common_opts %{?_smp_mflags} -Z avoid-dev-deps
# __cargo_to_rpm: path to the default cargo2rpm executable
-%__cargo_to_rpm %{_bindir}/cargo2rpm
+%__cargo_to_rpm /usr/bin/cargo2rpm
# cargo_registry: path to the root of the directory-based "local cargo registry"
# with replaces the "crates.io" source
--
2.41.0

@ -0,0 +1,29 @@
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

@ -2,7 +2,7 @@
## (rpmautospec version 0.3.5) ## (rpmautospec version 0.3.5)
## RPMAUTOSPEC: autorelease, autochangelog ## RPMAUTOSPEC: autorelease, autochangelog
%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: %define autorelease(e:s:pb:n) %{?-p:0.}%{lua:
release_number = 4; release_number = 6;
base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}"));
print(release_number + base_release_number - 1); print(release_number + base_release_number - 1);
}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}}
@ -21,6 +21,8 @@ Source: %{url}/archive/%{version}/rust-packaging-%{version}.tar.gz
Patch: https://pagure.io/fedora-rust/rust-packaging/c/3df6ad1.patch Patch: https://pagure.io/fedora-rust/rust-packaging/c/3df6ad1.patch
Patch: https://pagure.io/fedora-rust/rust-packaging/c/b9d6410.patch Patch: https://pagure.io/fedora-rust/rust-packaging/c/b9d6410.patch
Patch: https://pagure.io/fedora-rust/rust-packaging/c/8690145.patch Patch: https://pagure.io/fedora-rust/rust-packaging/c/8690145.patch
Patch: https://pagure.io/fedora-rust/rust-packaging/c/0ff9bb8.patch
Patch: https://pagure.io/fedora-rust/rust-packaging/c/801dd51.patch
BuildArch: noarch BuildArch: noarch
@ -80,9 +82,15 @@ install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo.attr
%{_fileattrsdir}/cargo.attr %{_fileattrsdir}/cargo.attr
%changelog %changelog
* Tue Jul 25 2023 Arkady L. Shane <ashejn@msvsphere.ru> - 24-4 * Wed Oct 04 2023 Arkady L. Shane <tigro@msvsphere-os.ru> - 24-6
- Rebuilt for MSVSphere 9.2 - Rebuilt for MSVSphere 9.2
* Thu Aug 17 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 24-6
- Correct cargo_registry path
* Thu Aug 17 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 24-5
- Correct cargo and cargo2rpm paths
* Sun May 21 2023 Fabio Valentini <decathorpe@gmail.com> - 24-4 * Sun May 21 2023 Fabio Valentini <decathorpe@gmail.com> - 24-4
- Include upstream patches with minor bug fixes and improvements - Include upstream patches with minor bug fixes and improvements

Loading…
Cancel
Save