RPM: how to get changelog from package

Often there’s a need to get changelog of RPM package. Here is a way to do that:

[root@playground ~]# rpm -qp --changelog kernel- | head
* Fri Jan 13 2012 Josh Boyer <[email protected]>
- Linux 3.1.9
- CVE-2012-0045 kvm: syscall instruction induced guest panic (rhbz 773392)

* Wed Jan 11 2012 Josh Boyer <[email protected]>
- Patch from Stanislaw Gruszka to fix NULL ptr deref in mac80211 (rhbz 769766)

* Tue Jan 10 2012 Josh Boyer <[email protected]>
- Fix ext3/ext4 corrupted bitmap error path (pointed out by Eric Sandeen)

[root@playground ~]#