Update Rust macro usage

The rust-toolset macros in RHEL 10 are now compatible with Fedora's
in terms of handling vendoring and automatic generation of license
information and bundled provides.
This commit is contained in:
Yaakov Selkowitz 2024-02-01 14:48:14 -05:00
parent 28cec7368d
commit c392ae23ab

View File

@ -8,13 +8,9 @@
%global tarball_version %%(echo %{version} | tr '~' '.') %global tarball_version %%(echo %{version} | tr '~' '.')
%if 0%{?bundled_rust_deps}
%global debug_package %{nil}
%endif
Name: gnome-tour Name: gnome-tour
Version: 45.0 Version: 45.0
Release: 3%{?dist} Release: 4%{?dist}
Summary: GNOME Tour and Greeter Summary: GNOME Tour and Greeter
# * gnome-tour source code is GPLv3+ # * gnome-tour source code is GPLv3+
@ -40,106 +36,11 @@ BuildRequires: /usr/bin/appstream-util
BuildRequires: /usr/bin/desktop-file-validate BuildRequires: /usr/bin/desktop-file-validate
%if 0%{?bundled_rust_deps} %if 0%{?bundled_rust_deps}
BuildRequires: cargo BuildRequires: rust-toolset
BuildRequires: rust
%else %else
BuildRequires: rust-packaging BuildRequires: rust-packaging
%endif %endif
%if 0%{?bundled_rust_deps}
# bundled crates list updated for gnome-tour 44
Provides: bundled(crate(aho-corasick/default)) = 0.7.20
Provides: bundled(crate(anyhow/default)) = 1.0.70
Provides: bundled(crate(atty/default)) = 0.2.14
Provides: bundled(crate(autocfg/default)) = 1.1.0
Provides: bundled(crate(bitflags/default)) = 1.3.2
Provides: bundled(crate(block/default)) = 0.1.6
Provides: bundled(crate(cairo-rs/default)) = 0.17.0
Provides: bundled(crate(cairo-sys-rs/default)) = 0.17.0
Provides: bundled(crate(cc/default)) = 1.0.79
Provides: bundled(crate(cfg-expr/default)) = 0.11.0
Provides: bundled(crate(cfg-if/default)) = 1.0.0
Provides: bundled(crate(env_logger/default)) = 0.7.1
Provides: bundled(crate(field-offset/default)) = 0.3.5
Provides: bundled(crate(futures-channel/default)) = 0.3.27
Provides: bundled(crate(futures-core/default)) = 0.3.27
Provides: bundled(crate(futures-executor/default)) = 0.3.27
Provides: bundled(crate(futures-io/default)) = 0.3.27
Provides: bundled(crate(futures-macro/default)) = 0.3.27
Provides: bundled(crate(futures-task/default)) = 0.3.27
Provides: bundled(crate(futures-util/default)) = 0.3.27
Provides: bundled(crate(gdk-pixbuf/default)) = 0.17.0
Provides: bundled(crate(gdk-pixbuf-sys/default)) = 0.17.0
Provides: bundled(crate(gdk4/default)) = 0.6.3
Provides: bundled(crate(gdk4-sys/default)) = 0.6.3
Provides: bundled(crate(gettext-rs/default)) = 0.7.0
Provides: bundled(crate(gettext-sys/default)) = 0.21.3
Provides: bundled(crate(gio/default)) = 0.17.4
Provides: bundled(crate(gio-sys/default)) = 0.17.4
Provides: bundled(crate(glib/default)) = 0.17.5
Provides: bundled(crate(glib-macros/default)) = 0.17.5
Provides: bundled(crate(glib-sys/default)) = 0.17.4
Provides: bundled(crate(gobject-sys/default)) = 0.17.4
Provides: bundled(crate(graphene-rs/default)) = 0.17.1
Provides: bundled(crate(graphene-sys/default)) = 0.17.0
Provides: bundled(crate(gsk4/default)) = 0.6.3
Provides: bundled(crate(gsk4-sys/default)) = 0.6.3
Provides: bundled(crate(gtk4/default)) = 0.6.4
Provides: bundled(crate(gtk4-macros/default)) = 0.6.3
Provides: bundled(crate(gtk4-sys/default)) = 0.6.3
Provides: bundled(crate(hashbrown/default)) = 0.12.3
Provides: bundled(crate(heck/default)) = 0.4.1
Provides: bundled(crate(hermit-abi/default)) = 0.1.19
Provides: bundled(crate(humantime/default)) = 1.3.0
Provides: bundled(crate(indexmap/default)) = 1.9.2
Provides: bundled(crate(lazy_static/default)) = 1.4.0
Provides: bundled(crate(libadwaita/default)) = 0.3.1
Provides: bundled(crate(libadwaita-sys/default)) = 0.3.0
Provides: bundled(crate(libc/default)) = 0.2.140
Provides: bundled(crate(locale_config/default)) = 0.3.0
Provides: bundled(crate(log/default)) = 0.4.17
Provides: bundled(crate(malloc_buf/default)) = 0.0.6
Provides: bundled(crate(memchr/default)) = 2.5.0
Provides: bundled(crate(memoffset/default)) = 0.8.0
Provides: bundled(crate(objc/default)) = 0.2.7
Provides: bundled(crate(objc-foundation/default)) = 0.1.1
Provides: bundled(crate(objc_id/default)) = 0.1.1
Provides: bundled(crate(once_cell/default)) = 1.17.1
Provides: bundled(crate(pango/default)) = 0.17.4
Provides: bundled(crate(pango-sys/default)) = 0.17.0
Provides: bundled(crate(pin-project-lite/default)) = 0.2.9
Provides: bundled(crate(pin-utils/default)) = 0.1.0
Provides: bundled(crate(pkg-config/default)) = 0.3.26
Provides: bundled(crate(pretty_env_logger/default)) = 0.4.0
Provides: bundled(crate(proc-macro-crate/default)) = 1.3.1
Provides: bundled(crate(proc-macro-error/default)) = 1.0.4
Provides: bundled(crate(proc-macro-error-attr/default)) = 1.0.4
Provides: bundled(crate(proc-macro2/default)) = 1.0.52
Provides: bundled(crate(quick-error/default)) = 1.2.3
Provides: bundled(crate(quote/default)) = 1.0.26
Provides: bundled(crate(regex/default)) = 1.7.1
Provides: bundled(crate(regex-syntax/default)) = 0.6.28
Provides: bundled(crate(rustc_version/default)) = 0.4.0
Provides: bundled(crate(semver/default)) = 1.0.17
Provides: bundled(crate(serde/default)) = 1.0.157
Provides: bundled(crate(slab/default)) = 0.4.8
Provides: bundled(crate(smallvec/default)) = 1.10.0
Provides: bundled(crate(syn/default)) = 1.0.109
Provides: bundled(crate(syn/default)) = 2.0.2
Provides: bundled(crate(system-deps/default)) = 6.0.3
Provides: bundled(crate(temp-dir/default)) = 0.1.11
Provides: bundled(crate(termcolor/default)) = 1.2.0
Provides: bundled(crate(thiserror/default)) = 1.0.40
Provides: bundled(crate(thiserror-impl/default)) = 1.0.40
Provides: bundled(crate(toml/default)) = 0.5.11
Provides: bundled(crate(toml_datetime/default)) = 0.6.1
Provides: bundled(crate(toml_edit/default)) = 0.19.7
Provides: bundled(crate(unicode-ident/default)) = 1.0.8
Provides: bundled(crate(version-compare/default)) = 0.1.1
Provides: bundled(crate(version_check/default)) = 0.9.4
Provides: bundled(crate(winnow/default)) = 0.3.6
%endif
%description %description
A guided tour and greeter for GNOME. A guided tour and greeter for GNOME.
@ -152,8 +53,10 @@ A guided tour and greeter for GNOME.
install -p %{SOURCE1} data/resources/assets/welcome.svg install -p %{SOURCE1} data/resources/assets/welcome.svg
%endif %endif
%if ! 0%{?bundled_rust_deps}
sed -i -e '/\(build_by_default\|install\)/s/true/false/' src/meson.build sed -i -e '/\(build_by_default\|install\)/s/true/false/' src/meson.build
%if 0%{?bundled_rust_deps}
%cargo_prep -v vendor
%else
%cargo_prep %cargo_prep
%endif %endif
@ -167,18 +70,17 @@ sed -i -e '/\(build_by_default\|install\)/s/true/false/' src/meson.build
%build %build
%meson %meson
%meson_build %meson_build
%if ! 0%{?bundled_rust_deps}
%cargo_build %cargo_build
%cargo_license_summary
%{cargo_license} > LICENSE.dependencies
%if 0%{?bundled_rust_deps}
%cargo_vendor_manifest
%endif %endif
%install %install
%meson_install %meson_install
%if ! 0%{?bundled_rust_deps}
%cargo_install %cargo_install
%endif
%find_lang gnome-tour %find_lang gnome-tour
@ -190,6 +92,10 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Tour.des
%files -f gnome-tour.lang %files -f gnome-tour.lang
%license LICENSE.md %license LICENSE.md
%license LICENSE.dependencies
%if 0%{?bundled_rust_deps}
%license cargo-vendor.txt
%endif
%doc NEWS README.md %doc NEWS README.md
%{_bindir}/gnome-tour %{_bindir}/gnome-tour
%{_datadir}/gnome-tour/ %{_datadir}/gnome-tour/
@ -200,6 +106,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/org.gnome.Tour.des
%changelog %changelog
* Thu Feb 01 2024 Yaakov Selkowitz <yselkowi@redhat.com> - 45.0-4
- Update Rust macro usage
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 45.0-3 * Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 45.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild