Description of problem: $ rpmspec -q --srpm firefox-44.0.1-2.fc23.src.rpm error: line 1: Unknown tag: ���� error: query of specfile firefox-44.0.1-2.fc23.src.rpm failed, can't parse Version-Release number of selected component (if applicable): rpm-build-4.13.0-0.rc1.11.fc23.x86_64
This is not a bug. Tool rpmspec is for querying spec files and not for querying binary srpm or rpm files. From man rpmspec: rpmspec {-q|--query} [select-options] [query-options] SPEC_FILE ... Notice that argument has to be a SPEC_FILE The meaning of "--srpm" option is different. It means query srpm which would be created from an given spec file. And --rpms means query rpms which would be created from an given spec file. Option --rpms is used by default. For querying srpms and rpms use rpm tool e. g.: $ rpm -qp firefox-44.0.1-2.fc23.src.rpm firefox-44.0.1-2.fc23.armv7hl
(In reply to Ľuboš Kardoš from comment #1) > This is not a bug. Tool rpmspec is for querying spec files and not for > querying binary srpm or rpm files. From man rpmspec: > > rpmspec {-q|--query} [select-options] [query-options] SPEC_FILE ... > > Notice that argument has to be a SPEC_FILE > > The meaning of "--srpm" option is different. It means query srpm which would > be created from an given spec file. And --rpms means query rpms which would > be created from an given spec file. Option --rpms is used by default. > > For querying srpms and rpms use rpm tool e. g.: > $ rpm -qp firefox-44.0.1-2.fc23.src.rpm > firefox-44.0.1-2.fc23.armv7hl That all needs to go into the man page, not in a bug report. And the man page needs to have usage examples. Further, the help option does not show "SPEC_FILE": $ rpmspec --help Usage: rpmspec [OPTION...] ... That needs to match the man page: "rpmspec {-q|--query} [select-options] [query-options] SPEC_FILE ..." Reopening as a documentation bug.
I modified rpmspec man page upstream: https://github.com/rpm-software-management/rpm/commit/1c5c9fc347f47505c99d6f4abac79069fbe680cf