#rpm #cargo #package #release #cargo-subcommand

bin+lib cargo-rpm

Build RPMs from Rust projects using Cargo workflows

9 releases (breaking)

0.8.0 Jul 9, 2020
0.7.0 Nov 30, 2019
0.6.0 Aug 10, 2019
0.5.0 Aug 7, 2019
0.1.1 Apr 20, 2018

#25 in #rpm

Download history 156/week @ 2023-11-30 121/week @ 2023-12-07 192/week @ 2023-12-14 191/week @ 2023-12-21 81/week @ 2023-12-28 154/week @ 2024-01-04 98/week @ 2024-01-11 140/week @ 2024-01-18 184/week @ 2024-01-25 137/week @ 2024-02-01 309/week @ 2024-02-08 216/week @ 2024-02-15 255/week @ 2024-02-22 200/week @ 2024-02-29 263/week @ 2024-03-07 203/week @ 2024-03-14

993 downloads per month

Apache-2.0

69KB
1.5K SLoC

cargo-rpm

Crate Build Status Safety Dance MSRV Apache 2.0 Licensed Gitter Chat

cargo subcommand for building .rpm releases of Rust projects.

Requirements

  • Rust 1.41+

Installation

Install cargo rpm by running: cargo install cargo-rpm.

Configuring a crate

To configure your crate for RPM releases, run cargo rpm init

This will create a .rpm/YOURCRATENAME.spec file which is passed to the rpmbuild command. Though the generated spec should work out of the box, it may need some customization if the resulting RPM has dependencies or files other than target binaries.

For more information on spec files, see: http://ftp.rpm.org/max-rpm/s1-rpm-build-creating-spec-file.html

Building RPMs

Once your crate has been configured, run cargo rpm build to build release targets for your project and package them into an RPM.

If you encounter errors, you may need to see more information about why rpmbuild failed. Run cargo rpm build -v to enable verbose mode.

Finished .rpm files will be placed in target/release/rpmbuild/RPMs/<arch>

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Dependencies

~12–24MB
~343K SLoC