This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
faq [2010-10-05 13:38] arekm there is only one! |
faq [2012-10-31 10:55] glen avoid smart fromatting for double slashes |
||
---|---|---|---|
Line 48: | Line 48: | ||
==== How to check from which .spec file was package X built? ==== | ==== How to check from which .spec file was package X built? ==== | ||
- | First of all, one should check whether there exists a spec file named just like the package. If not, the name of the spec file can be found in the output of one of these commands: | ||
- | |||
- | |||
- | |||
- | <file>rpm -q --changelog package package2 | grep '$Log' | ||
- | # for already installed packages | ||
- | |||
- | rpm -q --changelog -p package.rpm package2.rpm | grep '$Log' | ||
- | # for packages available as files | ||
- | </file> | ||
- | One can also use a more sophisticated command (just like before, adding a "''-p''" switch after the "''--changelog''" command and giving full file names allows one to query packages from disk): | ||
- | |||
- | <file>rpm -q --changelog package package2 | awk '/^\$Log:/ {spec=$2;gsub(",v$","",spec);print spec}' | ||
- | </file> | ||
+ | ''rpm -qi package'' command will show various information about the package, including the source RPM name. You can check the | ||
+ | source RPM name also with ''%%rpm -q --queryformat '%{sourcerpm}\n' package%%''. The base name of the source RPM (with version and the '.src.rpm' suffix stipped) is also the name for the GIT repository and the spec file. | ||
==== How to check which package contains a particular file? ==== | ==== How to check which package contains a particular file? ==== |