Update to version 25.0

epel9
Fabio Valentini 1 year ago
parent 240e6fe3e4
commit 4d51f860d1
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -19,3 +19,4 @@
/rust2rpm-v22.tar.gz
/rust2rpm-v23.tar.gz
/rust-packaging-24.tar.gz
/rust-packaging-25.0.tar.gz

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

@ -1,33 +0,0 @@
From 3df6ad1259c1741656affc26512f81631e9148f5 Mon Sep 17 00:00:00 2001
From: Maxwell G <maxwell@gtmx.me>
Date: Mar 09 2023 20:44:10 +0000
Subject: Correct %__rustc and %__rustdoc paths and docs
%{_bindir} should not be used like this in specfiles or macros. It
breaks flatpak builds.
Also, correct docstring copy-paste errors.
Relates: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_file_and_directory_dependencies
---
diff --git a/macros.d/macros.rust b/macros.d/macros.rust
index 1978f85..095cebc 100644
--- a/macros.d/macros.rust
+++ b/macros.d/macros.rust
@@ -1,8 +1,8 @@
-# __cargo_to_rpm: path to the default rustc executable
-%__rustc %{_bindir}/rustc
+# __rustc: path to the default rustc executable
+%__rustc /usr/bin/rustc
-# __cargo_to_rpm: path to the default rustdoc executable
-%__rustdoc %{_bindir}/rustdoc
+# __rustdoc: path to the default rustdoc executable
+%__rustdoc /usr/bin/rustdoc
# rustflags_opt_level: default optimization level
#

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

@ -1,34 +0,0 @@
From 8690145a30cb049b0d2bcc9288b388cb9f8bbda7 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: May 19 2023 17:33:11 +0000
Subject: cargo_license / cargo_license_summary: add "-Z avoid-dev-deps" arg
Without this flag, the "cargo tree" command attempts to resolve
dev-dependencies, even though the "no-dev" edge type is specified,
but dev-dependencies might not be present in the environment if the
package is being built with the check %bcond disabled.
---
diff --git a/macros.d/macros.cargo b/macros.d/macros.cargo
index 3785ea0..672ae06 100644
--- a/macros.d/macros.cargo
+++ b/macros.d/macros.cargo
@@ -183,6 +183,7 @@ fi \
%cargo_license(naf:)\
%{shrink:\
%{__cargo} tree \
+ -Z avoid-dev-deps \
--workspace \
--offline \
--edges no-build,no-dev,no-proc-macro \
@@ -204,6 +205,7 @@ fi \
%cargo_license_summary(naf:)\
%{shrink:\
%{__cargo} tree \
+ -Z avoid-dev-deps \
--workspace \
--offline \
--edges no-build,no-dev,no-proc-macro \

@ -1,26 +0,0 @@
From b9d6410bec50c3dfb9433fa5dc51efda1652299b Mon Sep 17 00:00:00 2001
From: Maxwell G <maxwell@gtmx.me>
Date: Mar 09 2023 21:02:01 +0000
Subject: Correct macro docstring typos
---
diff --git a/macros.d/macros.rust b/macros.d/macros.rust
index 095cebc..9967804 100644
--- a/macros.d/macros.rust
+++ b/macros.d/macros.rust
@@ -29,10 +29,10 @@
# -Copt-level: set optimization level (default: highest optimization level)
# -Cdebuginfo: set debuginfo verbosity (default: full debug information)
# -Ccodegen-units: set number of parallel code generation units (default: 1)
-# Cforce-frame-pointers: force inclusion of frame pointers (default: enabled
+# -Cforce-frame-pointers: force inclusion of frame pointers (default: enabled
# on x86_64 and aarch64 on Fedora 37+)
#
-# Additionally, sime linker flags are set which correspond to the default
+# Additionally, some linker flags are set which correspond to the default
# Fedora compiler flags for hardening and for embedding package versions into
# compiled binaries.
#

@ -1,5 +1,7 @@
%bcond_without check
Name: rust-packaging
Version: 24
Version: 25.0
Release: %autorelease
Summary: RPM macros and generators for building Rust packages
License: MIT
@ -7,15 +9,12 @@ License: MIT
URL: https://pagure.io/fedora-rust/rust-packaging
Source: %{url}/archive/%{version}/rust-packaging-%{version}.tar.gz
# backported upstream patches for minor fixes
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/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
%if %{with check}
BuildRequires: python3-pytest
%endif
%description
%{summary}.
@ -34,9 +33,11 @@ Summary: RPM macros for building projects with cargo
Obsoletes: rust-packaging < 24
Provides: rust-packaging = %{version}-%{release}
Requires: cargo2rpm >= 0.1.8
Requires: cargo
Requires: cargo2rpm >= 0.1.0
Requires: gawk
Requires: grep
Requires: rust-srpm-macros-epel = %{version}-%{release}
@ -60,6 +61,13 @@ install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust
%dnl install -D -p -m 0644 -t %{buildroot}/%{_rpmmacrodir} macros.d/macros.rust-srpm
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo.attr
install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo_vendor.attr
%if %{with check}
%check
export MACRO_DIR=%{buildroot}%{_rpmmacrodir}
pytest -vv
%endif
%files -n rust-srpm-macros-epel
%license LICENSE
@ -70,6 +78,7 @@ install -D -p -m 0644 -t %{buildroot}/%{_fileattrsdir} fileattrs/cargo.attr
%license LICENSE
%{_rpmmacrodir}/macros.cargo
%{_fileattrsdir}/cargo.attr
%{_fileattrsdir}/cargo_vendor.attr
%changelog
%autochangelog

@ -1 +1 @@
SHA512 (rust-packaging-24.tar.gz) = bd40ccc62786c7aa1799755ee3d4801d8df53b54edb625d4fe2f3e7fb932171b871355146f9cb226398aabdba733cf8c9e9a9d7f2f2891f623f5bc9bd703e5de
SHA512 (rust-packaging-25.0.tar.gz) = 173907ddec802baa4f4336c1f75350bd55d971793531cc81492dba8eba758b9768cbce18fa802dbac5d8fda13344e05516909da83f9d30433200f6bbd9ccc938

Loading…
Cancel
Save