From bf705f2876102ee3a3d3f9640df7d0fcd40a40b9 Mon Sep 17 00:00:00 2001 From: Carl George Date: Jun 04 2024 22:24:56 +0000 Subject: Omit SourceLicense tag when using vendor tarball When using vendored dependencies, the licenses in the sources will typically match the licenses in the binaries. In this scenario the SourceLicense tag can be omitteed since it should match the License tag. --- diff --git a/rust2rpm/templates/project.spec b/rust2rpm/templates/project.spec index 15195cb..cb6e484 100644 --- a/rust2rpm/templates/project.spec +++ b/rust2rpm/templates/project.spec @@ -37,11 +37,13 @@ Group: {{ rpm_group }} {% if crate_license != rpm_license %} # Upstream license specification: {{ crate_license|default("(missing)") }} {% endif %} +{% if not use_vendor_tarball %} {% if rust2rpm_legacy %} # Source License: {{ rpm_license|default("# FIXME") }} {% else %} SourceLicense: {{ rpm_license|default("# FIXME") }} {% endif %} +{% endif %} # FIXME: paste output of %%cargo_license_summary here License: # FIXME # LICENSE.dependencies contains a full license breakdown diff --git a/rust2rpm/templates/workspace.spec b/rust2rpm/templates/workspace.spec index c019900..a626b58 100644 --- a/rust2rpm/templates/workspace.spec +++ b/rust2rpm/templates/workspace.spec @@ -28,11 +28,13 @@ Summary: {{ rpm_summary }} Group: {{ rpm_group }} {% endif %} +{% if not use_vendor_tarball %} {% if rust2rpm_legacy %} # Source License: {{ rpm_license|default("# FIXME") }} {% else %} SourceLicense: {{ rpm_license|default("# FIXME") }} {% endif %} +{% endif %} # FIXME: paste output of %%cargo_license_summary here License: # FIXME # LICENSE.dependencies contains a full license breakdown