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-2.6.41.9-1.fc15.x86_64.rpm | head
* Fri Jan 13 2012 Josh Boyer <jwboyer@redhat.com> 2.6.41.9-1
- Linux 3.1.9
- CVE-2012-0045 kvm: syscall instruction induced guest panic (rhbz 773392)

* Wed Jan 11 2012 Josh Boyer <jwboyer@redhat.com>
- Patch from Stanislaw Gruszka to fix NULL ptr deref in mac80211 (rhbz 769766)

* Tue Jan 10 2012 Josh Boyer <jwboyer@redhat.com>
- Fix ext3/ext4 corrupted bitmap error path (pointed out by Eric Sandeen)

[root@playground ~]#