I'm building up a new server on Centos 6.2 to replace an older RedHat 5.6 (Tikanga) box. And I needed to install analog logfile analyzer as part of the build. My 1st hurdle was finding the Analog website :) The site that I'm used to - www.analog.cx - doesn't seem to exist any longer. However, the sourceforge site is working just fine.
On the download page, there are 2 links to pre-compiled RedHat Linux binaries. I went to site 1 and downloaded the 6.0.4 SRPM, since I needed the i686 version for my build.
I tried to recompile the rpm from source:
# rpmbuild --rebuild analog-6.0.4-1.src.rpm
Installing analog-6.0.4-1.src.rpm
error: File /root/rpmbuild/SOURCES/analog-%{PACKAGE_VERSION}.tar.bz2: No such file or directory
I used rpmlint to look for errors in the spec file that was created:
# rpmlint rpmbuild/SPECS/analog.spec
rpmbuild/SPECS/analog.spec:8 W: non-standard-group Utilities
rpmbuild/SPECS/analog.spec:10 W: hardcoded-path-in-buildroot-tag /tmp/anlg-root
rpmbuild/SPECS/analog.spec:17 W: setup-not-quiet
rpmbuild/SPECS/analog.spec:66 W: macro-in-%changelog %defattr
rpmbuild/SPECS/analog.spec:74 W: macro-in-%changelog %config
rpmbuild/SPECS/analog.spec: W: invalid-url Source0: http://www.analog.cx/analog-%{PACKAGE_VERSION}.tar.gz2 <urlopen error [Errorno -2] Name or service not known>
0 packages and 1 specfiles checked; 0 errors, 6 warnings.
I edited the analog.spec file and made the following changes.
- replaced all instances of 'PACKAGE_VERSION' with 'version'
- line 8 - changed group to Applications/Internet (this works on CentOS 6.2 - ymmv)
- line 10 - change BuildRoot value to %{_tmppath}/%{name}-%{version}
- line 17 - added "-q" flag to setup
- line 64 - changed "%changelog" to "%%changelog" to resolve the 2 macro warnings
- changed the URL
Then, I was able to build and, more importantly, install the rpm.
# rpmbuild -ba rpmbuild/SPECS/analog.spec
# rpm -ihv rpmbuild/RPMS/i686/analog-6.0.4-1.i686.rpm


Comments