[Rust-users] Patched makeRPM.sh
Status: Beta
Brought to you by:
psychogenic
From: Belden L. <bl...@ii...> - 2004-03-02 18:10:20
|
Yesterday I found rust while looking for a gui RPM. After a few botched attempts at creating a new rpm from source (fltk-1.1.4), I managed to get rust to dtrt. I installed rust 0.18 from rpm; the source wouldn't build on my Redhat 9 box. rusthq notes that the 0.18 rpm is for Redhat 7. It installed just fine for me. The first few times that I ran rust it didn't actually make an rpm. The crust.log showed makeRPM.sh carping about a string too long for '[...]' to handle; it's the test to see whether $INCLUDE is '-t'. The next problem was that 'rpm -ba' was always being issued. But the logic is: MAKESOURCERPM=0 ... if [ $MAKESOURCERPM ] then $RPM -ba $SPECFILE else $RPM -bb $SPECFILE fi I changed the test to if [ $MAKESOURCERPM == 1 ] which then correctly issues 'rpm -bb $SPECFILE'. However, makeRPM.sh still failed. It turns out that Redhat 9 ships with rpm version 4.2. Versions 4.2 and higher of rpm have deprecated the -bb (and -ba) flag; 'rpmbuild' should be used instead. So I added some extra logic to check the version of rpm: if it's lower than 4.2, 'rpm -bb' (or 'rpm -ba') gets issued. If it's 4.2 or higher, rpmbuild gets used instead. 2 attachments; a unified diff, and the changed makeRPM.sh Belden |