LinuxCommandLibrary

rpmspec

Query and parse RPM spec files

TLDR

List binary packages from a spec file

$ rpmspec --query path/to/rpm.spec
copy
List all queryformat options
$ rpmspec --querytags
copy
Get summary information for packages
$ rpmspec --query --queryformat "%{name}: %{summary}\n" path/to/rpm.spec
copy
Get the source package information
$ rpmspec --query --srpm path/to/rpm.spec
copy
Parse a spec file to stdout
$ rpmspec --parse path/to/rpm.spec
copy

SYNOPSIS

rpmspec [options] specfile

DESCRIPTION

rpmspec queries RPM spec files to extract package information without building packages. It can list packages that would be generated, show package metadata, and parse spec file macros.
This is useful for validating spec files and extracting information during package development.

PARAMETERS

--query

Query the spec file
--querytags
List available query format tags
--queryformat format
Custom output format
--srpm
Query source package information
--parse
Parse and expand spec file

CAVEATS

Some spec file features may require additional macros or definitions to parse correctly.

HISTORY

Part of RPM package manager tools. Provides spec file introspection capabilities.

SEE ALSO

rpm(8), rpmbuild(8)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community