Michael's musings


This is a blog of
mcr at sandelman.ca

Wed, 08 Apr 2009

building rpms out of git

My friend Michael Soulier writes at: http://www.digitaltorque.ca/2009/04/02/building-rpms-out-of-git/

I find the need to wrap up content into a tar.gz so that I can build it really dumb. It wasn't always like this... with the DEBIAN version the rpm command, I can actually just do:

rpmbuild  -vv --define="_topdir $(RPMTOPDIR)" --define="Version $(VERSION)" -bb pt-vnc-connector.spec

and produce an RPM directly from my source directory... This no longer works with RHEL4/FC8/Centos5 versions of RPM, which I find funny. I was looking at porting the debian RPM package to RPM...

So, I build my RPMs under Debian Etch/Lenny!

Michael also writes:

git clone . /var/tmp/$fullname || exit 1
rm -rf /var/tmp/$fullname/.git*

dest=$HOME/rpms/SOURCES/${fullname}.tar.gz
rm -f $dest
tar -C /var/tmp -zcvf $dest $fullname && rm -rf /var/tmp/$fullname

which I think can be replaced with:

git-archive --format=tar --prefix=$fullname/ . | gzip >$HOME/rpms/SOURCES/${fullname}.tar.gz



posted at: 15:29 | path: /oss | permanent link to this entry


XML


April
Sun Mon Tue Wed Thu Fri Sat
     
8
   
2009
Months
Apr