No description
Find a file
Zbigniew Jędrzejewski-Szmek 970160a316 Use license files installed by crate
Before, we'd use the same pattern for the main package (if present),
and the -devel files:
  %license LICENSE1 LICENSE2
Since the create usually also installs the license files to %create_instdir,
we end up with duplicated files in -devel.

It seems reasonable to reuse the file that is already present in
%create_instdir. Fedora packaging guidelines only say that "%license
must be used for license files", and doesn't say anything about the
location. And in fact, you can't assume any fixed location, because
packages will often use a common license directory, so the only
reliable way to list license files is to look at the %license mark.
And in our particular case, -devel files are not installed on user
systems, so we can assume that users will not manually search for
license files by browsing /usr/share/licenses/<package-name>. We can't
remove the license file from %{create_instdir}, because the crate might
be need it, for example to display the license text internally. Thus,
I think reasonable and not against the guidelines to "reuse" the license
file present under %{create_instdir}.

For the main package though, it seems better to keep the existing
location. Those packages *are* installed on end-user systems, and also
it'd be strange to suddently have one file under /usr/share/cargo/registry/.

So this patch uses absolute paths under %create_instdir for -devel,
and the relative path (effectively under /usr/share/licenses) for the
main package.

It is possible to opt-out of the new behaviour with --relative-license-paths.

Fixes #176.
2022-02-14 14:01:47 +01:00
data Add %crate_instdir convenience macro 2022-02-14 14:01:44 +01:00
rust2rpm Use license files installed by crate 2022-02-14 14:01:47 +01:00
tools fedora-helper: Use f35 as a base for license generation 2021-03-07 21:40:31 +01:00
.gitignore
LICENSE
MANIFEST.in
NEWS Version 20 2021-11-29 22:27:58 +01:00
README.md rust2rpm: allow removing unwanted features 2020-11-13 11:04:27 +01:00
requirements.txt metadata: replace semantic-version with a custom parser 2019-10-28 11:19:46 +01:00
setup.py setup: bump development status to "production" 2021-11-28 12:50:37 +01:00
test.py Support wildcards in 0.x versions 2022-01-09 08:08:17 +01:00
tox.ini Add python 3.10 to tox.ini 2021-10-14 18:41:02 +02:00

rust2rpm

Convert Rust crates to RPM.

.rust2rpm.conf

You can place configuration file which is used as source for additional information for spec generation.

Some simple example would be better than many words ;)

[DEFAULT]
unwanted-features =
  compiler_builtins
  rustc-dep-of-std
buildrequires =
  pkgconfig(foo) >= 1.2.3
lib.requires =
  pkgconfig(foo) >= 1.2.3

[fedora]
bin.requires =
  findutils
buildrequires =
lib.requires =
lib+default.requires =
  pkgconfig(bar) >= 2.0.0