I'm looking for a solution to query an RPM spec file to get the lists of files it installs, preferably without building the package(s). I've tried rpmspec --queryformat '%{filenames}' but it only results in (none)
Example test.spec:
Name: test
Version: 1
Release: 1%{?dist}
Summary: test
License: bsd
URL: http://localhost
Source0: test.tgz
%description
%install
%files
/usr/foo.txt
Test run:
$ rpmspec --builtrpms -q --qf 'name: %{name}\nfiles: %{filenames}\n\n' test.spec
name: test
files: (none)
Expected result:
name: test
files: /usr/foo.txt