How To Install go-srpm-macros on Fedora 36

In this tutorial we learn how to install go-srpm-macros in Fedora 36. go-srpm-macros is Source-stage rpm automation for Go packages

Introduction

In this tutorial we learn how to install go-srpm-macros on Fedora 36.

What is go-srpm-macros

This package provides SRPM-stage rpm automation to simplify the creation of Go language (golang) packages. It limits itself to the automation subset required to create Go SRPM packages and needs to be included in the default build root. The rest of the automation is provided by the go-rpm-macros package, that go-srpm-macros will pull in for Go packages only.

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

Install go-srpm-macros 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 go-srpm-macros using dnf by running the following command:

sudo dnf -y install go-srpm-macros

Install go-srpm-macros 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 go-srpm-macros using yum by running the following command:

sudo yum -y install go-srpm-macros

How To Uninstall go-srpm-macros on Fedora 36

To uninstall only the go-srpm-macros package we can use the following command:

sudo dnf remove go-srpm-macros

go-srpm-macros Package Contents on Fedora 36

/usr/lib/rpm/lua/fedora/srpm/go.lua
/usr/lib/rpm/macros.d/macros.go-srpm
/usr/share/doc/go-rpm-macros
/usr/share/doc/go-rpm-macros/README.md
/usr/share/licenses/go-rpm-macros
/usr/share/licenses/go-rpm-macros/LICENSE.txt

References

Summary

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