I've always forgotten how to do this right or how to do it in fact. I've been cooking up a yum etckeeper plugin for well, etckeeper and yum for RHEL based distros (cause I use them in work).
In the process of messing around on the yum branch of etckeeper, I needed to test if my specfile was doing the right thing. So in my etckeeper cloned repo, on the 'yum' branch I was committing and testing by doing the following
git checkout yum
...edit somefiles...
git commit -a -m "some commit message"
git archive --prefix=etckeeper/ yum | gzip > etckeeper_0.32.tar.gz
rpmbuild -ta etckeeper_0.32.tar.gz
mkdir tmp
cd tmp
rpm2cpio /home/jtang/redhat/RPMS/x86_64/etckeeper-0.32-1.el5.x86_64.rpm | cpio -mid
...look at tmp/ to see if it did the right thing...
rm -rf tmp
...edit and commit more stuff...
Once I'm happy I will just do a diff to flatten out my changes to send upstream.
Add a comment