Commit graph

516 commits

Author SHA1 Message Date
Carl George
bf705f2876 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.
2024-06-04 22:24:56 +00:00
1ff3e433a4
conf: fix wrong indentation for Patch files listed as extra-patches 2024-06-04 17:38:28 +02:00
e644640229
Release 26.1.1 2024-05-16 11:30:21 +02:00
0a2810ed0c
templates: fix double-commentization of source and patch file comments 2024-05-16 11:26:52 +02:00
5e9b7b91fa
tox: add workaround for missing official Python 3.13 support in PyO3 2024-05-16 11:26:08 +02:00
f01dae6f60
Release 26.1.0 2024-04-12 15:26:04 +02:00
d4dc720e87
templates: make statically known BuildRequires normal BuildRequires
For example, this allows adding BuildRequires that are required in
the "%prep" scriptlet. Adding them as dynamically generated
BuildRequires via "%generate_buildrequires" previously made these
dependencies unavailable in "%prep".
2024-03-30 19:04:14 +01:00
1f8a8e7f4b
conf: add settings for package URL and package Source
These settings are only valid for non-crate or workspace projects.
For crates published on crates.io, both URL and Source0 have values
that can be derived from the crate name.
2024-03-30 18:50:43 +01:00
558784b035
log: remove color from "info" log level to make it visible in dark mode 2024-03-30 18:22:40 +01:00
0efb1761bb
conf: allow setting debuginfo level for rustc 2024-03-30 18:17:49 +01:00
4f07259c3e
conf: fix undefined variable in validation / exception handling 2024-03-30 17:44:33 +01:00
2466b6abc4
templates: drop unused %crate macro definition from "project" specs 2024-03-22 23:33:36 +01:00
54ccda4190
NEWS: add missing changelog entry 2024-03-14 17:15:11 +01:00
d906ea6d21
conf: allow setting "no-default-features" in rust2rpm.toml
This should only ever be used for application-only packages, since it
has possibly surprising effects for library crates.
2024-03-14 16:19:53 +01:00
b145e4832b
cli/generator: add "legacy" mode to support older RPM versions
Currently, this prevents generating spec files with the "SourceLicense"
tag, which was only implemented in RPM 4.18. This is not supported when
targeting RHEL / EPEL 9, which is on RPM 4.16.
2024-03-11 23:07:59 +01:00
25bf9c165f
news: add some missing changelog entries for 26.0.0 2024-03-09 11:03:41 +01:00
8561830f02
Release 26.0.0 2024-03-08 22:51:16 +01:00
f0e65999a7
templates: fix some conditions for cargo_install_bin support 2024-03-08 22:34:40 +01:00
d1d25eb684
conf: warn when extra sources or patches use conflicting numbers 2024-03-08 16:56:31 +01:00
8b378c5b0e
docs: add package.{extra-patches,cargo-toml-patch-comments} settings 2024-03-08 15:56:24 +01:00
d5fd8f9517
conf/generator: add support for persisting Cargo.toml patch comments 2024-03-08 15:51:32 +01:00
fd2c04784c
conf: allow specifying additional patches just like additional sources 2024-03-06 16:45:27 +01:00
d1ae15ad6e
conf: warn on conflicting settings (all-features + hidden features) 2024-03-05 19:12:54 +01:00
97fd500e75
generator: fix warning for summary-too-long and simplify template
Additionally, the threshold was raised to <= 80 characters to match
the default rpmlint configuration in Fedora.
2024-03-05 18:49:46 +01:00
8e2bd0a029
cli: remove deprecated --all-features flag 2024-02-25 22:02:35 +01:00
c59cbefbaa
cli: remove deprecated --suffix argument 2024-02-25 21:52:17 +01:00
bc1f8490c0
cli: remove deprecated --stdout flag 2024-02-25 21:22:49 +01:00
b9550775b3
generator: fix condition for setting cargo_install_bin for compat packages 2024-02-24 19:00:07 +01:00
2961950b31
conf: validate that "package.extra-sources.{number,file}" are present 2024-02-23 00:46:30 +01:00
0db4651516
conf/generator/templates: add settings for adjusting scriptlets and files
This commit introduces many settings - additional source files,
additional packaged files, specifying additional commands that are
injected into %prep, %build, %install, or %check - both before and
after the respective %cargo_* macros.
2024-02-23 00:18:58 +01:00
b536e5e40e
conf/generator: add setting to automatically rename installed binaries
This can be useful when the default name of an installed binary
conflicts with a binary from another package.
2024-02-22 20:02:00 +01:00
139bac2eca
conf/generator/templates: support cargo-install-{lib,bin} settings
rust-packaging >= 26 now has "official" support for overriding the
installation of library sources / binary targets by setting RPM macros.

This commit adds settings to correspond to the %cargo_install_lib and
%cargo_install_bin macros and plugs them through to the spec generator.

References to the the private %__cargo_is_bin and %__cargo_is_lib macros,
which could previously be used to hack this behaviour, were removed.
2024-02-22 18:53:42 +01:00
1b1532da08
Release 25.1.0 2024-02-21 14:46:54 +01:00
1d3bcebbea
generator: log a warning if the generated RPM Summary is too long 2024-02-21 14:23:44 +01:00
e142f5c6b5
generator: handle invalid version requirements more gracefully 2024-02-21 14:05:20 +01:00
4c36ef4380
conf: add a setting for overriding the name of the "bin" subpackage 2024-02-20 18:14:31 +01:00
712f596844
misc: fix code style issues pointed out my ruff 2024-02-20 17:40:48 +01:00
21a78ae13f
cli: make missing license files a fatal error (with an escape hatch) 2024-02-20 17:29:10 +01:00
07976fe752
Release 25.0.4 2023-12-07 15:09:32 +01:00
55b9834ab5
deps: require cargo2rpm >= 0.1.15 and update test fixtures 2023-12-07 15:05:23 +01:00
16d49a8716
Release 25.0.3 2023-12-01 15:25:28 +01:00
c40f7400f9
deps: require cargo2rpm >= 0.1.14 2023-12-01 15:22:34 +01:00
2fa54a0062
tox: run tests on Python 3.13 as well 2023-12-01 15:22:13 +01:00
228efa58fd
crate: improve determining project name/version from directory name
If the heuristics fail because the project uses a weird naming or
versioning scheme or if the directory name does not match the
"{project}-{version}" pattern. This is mostly the case for "workspace"
proejcts.

In the case the heuristics fail, the version can be overriden on the
command line.
2023-11-29 18:34:08 +01:00
323dbea4b6
crate: error out if project arg looks like a path but is not a path 2023-11-23 19:28:29 +01:00
e879c9f857
Release 25.0.2 2023-11-18 01:07:31 +01:00
e7946fa571
conf: ensure that "hidden" features actually exist during validation 2023-11-17 23:49:26 +01:00
1c970e51fd
tests: update test fixtures for cargo2rpm v0.1.13 2023-11-17 23:27:54 +01:00
475c116af4
Release 25.0.1 2023-10-18 11:35:58 +02:00
5a8bb9eee9
conf: handle invalid syntax in rust2rpm.toml more gracefully 2023-10-18 11:19:27 +02:00