334 lines
13 KiB
Text
334 lines
13 KiB
Text
rust2rpm
|
|
|
|
Version 24.0.0
|
|
==============
|
|
|
|
This release contains large internal changes to support more use cases and
|
|
Rust projects that use new syntax for feature dependencies in their Cargo.toml
|
|
metadata. The functionality for translating between cargo and RPM metadata
|
|
and the RPM macros and dependency generators were moved to separate projects.
|
|
|
|
Additionally, the versioning scheme of rust2rpm has changed to allow for minor
|
|
or bugfix-only releases that do not change spec file rendering and which don't
|
|
require bumping the version number in the "# Generated by rust2rpm XX" header.
|
|
|
|
Added:
|
|
|
|
- Support for building non-crate projects that use cargo workspaces was added.
|
|
- The default Rust compiler flags now support conditionally building Rust code
|
|
with frame pointers (only enabled on Fedora 38+ on x86_64 and aarch64).
|
|
- New syntax for cargo feature dependencies (`dep:foo`) is now supported when
|
|
creating "remove foreign dependencies" patches.
|
|
- Rust crates that exclusively build shared libraries (`cdylib` targets) are now
|
|
(partially) supported by rust2rpm and no longer cause crashes.
|
|
|
|
Changed:
|
|
|
|
- Large parts of the project were refactored, modernized, reorganized into
|
|
smaller files, and updated with type annotations.
|
|
- The deprecated `requests.compat` module is no longer used, as all methods
|
|
used by rust2rpm have been part of the Python standard library for years.
|
|
|
|
Fixed:
|
|
|
|
- Logic for determining the list of feature subpackages was fixed. The
|
|
assumptions in the previous implementation were broken for crates that use
|
|
Rust 1.60+ syntax for feature dependencies.
|
|
- Logic for sorting binaries in %files lists was fixed to not cause crashes if
|
|
there are two or more binaries.
|
|
- Logic in the cfg-expression evaluation was fixed and no longer produces
|
|
architecture-specific patches.
|
|
- Logic for checking for the existence of a dist-git repo for the current
|
|
package was fixed to account for URL formatting issues.
|
|
- Files that are read when trying to detect the "host linux distribution" are
|
|
now closed correctly.
|
|
- Test fixtures were added for the year 2023.
|
|
|
|
Removed:
|
|
|
|
- The cargo-inspector executable was removed. It is no longer used by Rust RPM
|
|
macros.
|
|
- Files for RPM macros and dependency generators were moved into a separate
|
|
project (rust-packaging).
|
|
|
|
Version 23
|
|
==========
|
|
|
|
Added:
|
|
|
|
- New macros for collecting license information for all crates that are
|
|
statically linked into a Rust binary (`%cargo_license` and
|
|
`%cargo_license_summary`).
|
|
- Add support for specifying "testrequires" in rust2rpm.conf. These work similar
|
|
to "buildrequires", but the specified dependencies will be wrapped in an
|
|
`%if %{with check}` conditional in the generated spec file. This can be used
|
|
to specify BuildRequires that are only needed when running a crate's test
|
|
suite, but which are not necessary to build the crate itself.
|
|
|
|
Changed:
|
|
|
|
- The list of binaries in %files is now consistently sorted in generated spec
|
|
files (this only affects crates that build more than one binary, of course).
|
|
- Fall back to the latest pre-release if there are no stable releases (or if
|
|
all previously published stable released have been yanked).
|
|
- Dropped `ExclusiveArch: %{rust_arches}` when generating spec files for Fedora.
|
|
RPM itself will start to depend on Rust components, so Rust will by definition
|
|
need to be available on all architectures that are supported by Fedora.
|
|
- Replaced `i686` with the `%{ix86}` macro in `%{rust_arches}`.
|
|
|
|
Fixed:
|
|
|
|
- Ensure that rust2rpm doesn't auto-generate architecture-dependent patches.
|
|
- Ensure both automatically generated and manually written patches affect spec
|
|
file generation (i.e. feature subpackages).
|
|
- Fix evaluation of cfg-expressions that contain the new "wasm64" target.
|
|
- Only remove target-specific dependencies from feature dependencies if they
|
|
are optional.
|
|
- The logic for replacing the current version of rust2rpm when comparing spec
|
|
output in tests has been fixed for OpenSUSE spec templates.
|
|
|
|
Version 22
|
|
==========
|
|
|
|
This release comes with lots of improvements, bug fixes, and new features, but
|
|
also drops support for Python versions older than 3.10.
|
|
|
|
Added:
|
|
|
|
- Add macros to allow overriding default Rust compiler flags without needing to
|
|
manually invoke sed: %rustflags_opt_level, %rustflags_debuginfo,
|
|
%rustflags_codegen_units (PR#182 / @zbyszek)
|
|
- Add a new rust2rpm.conf setting that mirrors the "--all-features" CLI
|
|
argument of rust2rpm (PR#191 / @decathorpe)
|
|
- Add support for running rust2rpm without an explicit crate name argument, and
|
|
use heuristics (value of the %crate macro in an existing spec file, or the
|
|
name of the current directory) as fallback values (PR#197 / @zbyszek)
|
|
- Add a parser and evaluation logic for "cfg"-expressions and automatically
|
|
generate a Cargo.toml patch that removes "foreign" dependencies
|
|
(PR#183 / @zbyszek)
|
|
- Add CC-PDDC ("Creative Commons Public Domain Dedication and Certification")
|
|
to the list of accepted licenses (PR#203 / @yizhengxie)
|
|
- Added simple logger functionality and print messages to stderr to ensure the
|
|
"--stdout" mode of rust2rpm continues to work (@decathorpe).
|
|
|
|
Changed:
|
|
|
|
- Change the default name of the rust2rpm configuration file to "rust2rpm.conf",
|
|
and migrate existing ".rust2rpm.conf" and "_rust2rpm.conf" files
|
|
(PR#189 / @decathorpe)
|
|
- Dropped unnecessary numbering of patches in spec files generated by rust2rpm
|
|
(PR#196 / @gotmax23)
|
|
- Dropped translation from SPDX license expressions to Fedora / Callaway
|
|
notation when targeting Fedora or EPEL (PR#195 / @zbyszek)
|
|
- Apply consistent formatting for %license and %doc files for binary packages
|
|
and -devel packages (PR#197 / @zbyszek)
|
|
- Skip pre-release versions when running rust2rpm without an explicit version
|
|
argument (PR#197 / @zbyszek)
|
|
- Change the warning messages that are printed after the "existence check" of
|
|
rust2rpm succeeds to take compat packages into account (PR#199 / @decathorpe)
|
|
- Split rust2rpm package into "core" functionality without third-party python
|
|
dependencies, which can be used by cargo-inspector and RPM macros
|
|
(PR#204 / @decathorpe)
|
|
- Ported rust2rpm packaging to declarative configuration with setup.cfg and
|
|
pyproject.toml (PR#207 / @decathorpe)
|
|
- Enforced a consistent code formatting standard with black (@decathorpe).
|
|
|
|
Fixed:
|
|
|
|
- Various fixes for the automatic detection of rpmautospec usage in existing
|
|
spec files and the "--rpmautospec" and "--no-rpmautospec" CLI arguments
|
|
(PR#190, PR#195 / @zbyszek, @andersblomdell)
|
|
- Fix building with Rust 1.62+, which now fails when re-packaging sources from
|
|
crates.io (PR#194 / @decathorpe)
|
|
- Fixed the "existence check" when running rust2rpm by requesting the correct
|
|
URL (PR#199 / @decathorpe)
|
|
- Fixed tox settings for refactored tests and updated list of supported Python
|
|
versions (PR#208 / @decathorpe)
|
|
|
|
|
|
Version 21
|
|
==========
|
|
|
|
- new %crate_instdir convenience macro with the path to the
|
|
installation directory
|
|
- license and documentation files are now installed just once under
|
|
%crate_instdir and are marked with %license and %doc there
|
|
- link flags are now passed using the RUSTFLAGS envvar and include
|
|
package note linker script (when %_package_note_file is defined)
|
|
- CFLAGS/CXXFLAGS are passed to the processes started by cargo
|
|
- rpmautospec can be disabled with --no-rpmautospec
|
|
- minor tweaks to existence checks, documentation file detection, license tags,
|
|
version handling and spec file naming
|
|
|
|
Version 20
|
|
==========
|
|
|
|
- fix autodetection of rpmspec if it was already used in the existing spec file
|
|
- fix parsing of ID_LIKE in os-release files
|
|
- drop unused __cargo_skip_build logic
|
|
- improve handling of the upper bound in dependencies with ~ in version
|
|
- minor improvements to grammar and whitespace in generated output
|
|
|
|
Version 19
|
|
==========
|
|
|
|
- use rpmautospec by default for Fedora
|
|
- check if a package already exists in Fedora (use --no-existence-check to opt-out)
|
|
- replace hyphens by underscores in Version (issue #124)
|
|
- suppress tracebacks for network errors and similar (issue #125)
|
|
- add bundled() provider for vendoring to be used with 'cargo vendor'
|
|
and a new --provides-vendor parameter
|
|
- test with Python 3.10 and mark it as supported
|
|
- licensing: add CDDL-1.1, LGPL-2.0-or-later
|
|
|
|
Version 18
|
|
==========
|
|
|
|
- Add simple %license and %doc file auto-detection
|
|
- Add optional support for rpmautospec (%autorelease, %autochangelog)
|
|
- Use changelog timestamp format with time and timezone only on OpenSUSE
|
|
- Fix parsing of features with "+" in their name
|
|
- Use Fedora 35 for Fedora license helper script
|
|
- licensing: add Python-2.0
|
|
|
|
Version 17
|
|
==========
|
|
|
|
- revert the change to specify all BuildRequires directly, not in
|
|
%generate_buildrequires
|
|
|
|
Version 16
|
|
==========
|
|
|
|
- new 'fedora-helper' tool for Fedora
|
|
- specify all BuildRequires directly, not in %generate_buildrequires
|
|
- introduce new unwanted-features setting in .rust2rpm.conf files to
|
|
prevent subpackages for specific "unwanted" features from being
|
|
generated
|
|
- licensing: add LGPL-3.0-or-later, LGPL-2.1-or-later, EUPL-1.2
|
|
- add riscv64 to %rust_arches
|
|
|
|
Version 14/15
|
|
=============
|
|
|
|
- Use '--no-track' for 'cargo install'
|
|
- Support versions with multiple wildcards (e.g. '1.*.*')
|
|
- Ignore 'Cargo.toml.orig' which causes issues with build of many crates
|
|
|
|
Version 13
|
|
==========
|
|
|
|
- Generate %files entries with '%{version_no_tilde}'
|
|
- Add support for using multiple features at a time in cargo-inspector
|
|
- Implement support for "renamed" dependencies
|
|
|
|
Version 12
|
|
==========
|
|
|
|
- Set proper Version field for pre-release versions of crates
|
|
|
|
Version 11
|
|
==========
|
|
|
|
- When dynamic BuildRequires are turned on, propagate arguments to %cargo_*
|
|
- Few improvements in algorithm of description splitting into a summary
|
|
- Ignore Cargo.lock for installation (publish lockfile feature in Cargo 1.37+)
|
|
- Replace semantic_version dependency by custom parser
|
|
- Add MPL-2.0-or-later and 0BSD into a Fedora SPDX mapping
|
|
- Pass --cap-lints=warn into the RUSTFLAGS to prevent FTBFS after
|
|
dependency and/or compiler updates
|
|
- Enable dynamic BuildRequires by default for Fedora target
|
|
|
|
Version 10
|
|
==========
|
|
|
|
- Translate '-or-later' and '+' license suffixes properly
|
|
- Check /usr/lib/os-release in addition to /etc/os-release
|
|
- Prettify summary and description automatically
|
|
- Use %{expand:…} for %description to avoid escaping of newlines
|
|
- Add '--suffix' option for "compat" packages
|
|
- Implement option to skip building of crates (aka fast/bootstrap build)
|
|
|
|
Version 9
|
|
=========
|
|
|
|
- Always put upstream license in spec
|
|
- Fix version in egg-info
|
|
- Remove accidentally left Cargo.toml.deps
|
|
- Fix packager detection fallback
|
|
|
|
Version 8
|
|
=========
|
|
|
|
- Pass '-Ccodegen-units=1' in RUSTFLAGS
|
|
- Switch to '%{build_rustflags}'
|
|
|
|
Version 7
|
|
=========
|
|
|
|
- Generate %doc statements for readme from Cargo.toml
|
|
- Split features into subpackages ('rust-$crate+$feature-devel')
|
|
- Add support for dependencies with same name
|
|
- Add support for user configuration ('.rust2rpm.conf', '_rust2rpm.conf')
|
|
- Option to not generate default changelog entry ('--no-auto-changelog-entry')
|
|
- Set 'CARGO_HOME' to the local '.cargo' (required by new Rust)
|
|
- Improvements for crates with pre-release versions
|
|
- Fix '%cargo_install' with crates which use whitespace in files
|
|
- Do not put unneeded optional dependencies in BuildRequires ('-Z avoid-dev-deps')
|
|
- Option to use all crate features when generating spec file
|
|
- Use new-style changelog format (with TZ info) on Fedora
|
|
- Option to use dynamic BuildRequires (requires RPM 4.15+)
|
|
- Environment variables to control packager identity
|
|
|
|
Version 6
|
|
=========
|
|
|
|
- Improvements in RPM macros
|
|
- Add support for handling local crates
|
|
- Add option to copy crate into current working directory
|
|
- Filter non-linux dependencies automatically
|
|
- Translate SPDX licenses into Fedora ones (for Fedora and Mageia)
|
|
|
|
Version 5
|
|
=========
|
|
|
|
- Add cargo dependency for runtime (devel subpackages)
|
|
- Use cp instead of install in macros in order to keep original permissions
|
|
- Ignore yanked versions when no version is specified
|
|
- Pass --no-fail-fast for cargo-test
|
|
- Treat optional dependencies as "features" as well
|
|
- Add support for "rlib" crate-type
|
|
- Add support for Mageia and (open)SUSE in template
|
|
|
|
Version 4
|
|
=========
|
|
|
|
- Switch to /usr/share/cargo/registry for storing crates
|
|
- Explicitly set rustdoc in macro so it won't collide with the one used by user
|
|
- Add initial support for pre-release versions
|
|
- Add support for versions with multiple wildcards (like 1.*.*)
|
|
|
|
Version 3
|
|
=========
|
|
|
|
- Use rich dependencies to fulfil requirements
|
|
- Automagically strip [dev-dependencies] when building without tests
|
|
- Add support for wildcard in version
|
|
- Generate initial changelog
|
|
- Use rust-packaging for BuildRequires to break loop
|
|
- Other cleanups and fixes
|
|
|
|
Version 2
|
|
=========
|
|
|
|
- Automatic generation of summary and description
|
|
- Initial patching of metadata
|
|
- Save generated spec/patch as files instead of printing to stdout
|
|
- Support for proc-macro kind of library
|
|
- %cargo_build and %cargo_test now accept any parameters
|
|
- Automatically strip [dev-dependencies] when %check is disabled
|
|
|
|
Version 1
|
|
=========
|
|
|
|
- initial version with setuptools metadata
|