How To Install rust-packaging on Fedora 36

In this tutorial we learn how to install rust-packaging in Fedora 36. rust-packaging is RPM macros for building Rust packages

Introduction

In this tutorial we learn how to install rust-packaging on Fedora 36.

What is rust-packaging

The package provides RPM macros for building Rust projects. Note that rust-srpm-macros is a seperate arch-independent package that is also required to build Rust packages.

We can use yum or dnf to install rust-packaging on Fedora 36. In this tutorial we discuss both methods but you only need to choose one of method to install rust-packaging.

Install rust-packaging on Fedora 36 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install rust-packaging using dnf by running the following command:

sudo dnf -y install rust-packaging

Install rust-packaging on Fedora 36 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install rust-packaging using yum by running the following command:

sudo yum -y install rust-packaging

How To Uninstall rust-packaging on Fedora 36

To uninstall only the rust-packaging package we can use the following command:

sudo dnf remove rust-packaging

rust-packaging Package Contents on Fedora 36

/usr/lib/rpm/fileattrs/cargo.attr
/usr/lib/rpm/macros.d/macros.cargo
/usr/lib/rpm/macros.d/macros.rust
/usr/share/licenses/rust-packaging
/usr/share/licenses/rust-packaging/LICENSE

References

Summary

In this tutorial we learn how to install rust-packaging on Fedora 36 using yum and [dnf]((/fedora/36/dnf/).