Red Hat Bugzilla – Bug 75627
strange commands in %prep section of spec-file
Last modified: 2008-05-01 11:38:04 EDT
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0; T312461)
Description of problem:
There are strange commands at the end of %prep-section of the spec-file
# Workaround for legacy auto* tools
[ -x /usr/bin/autoconf-2.5? ] && ln -s /usr/bin/autoconf-2.5? autoconf
[ -x /usr/bin/autoheader-2.5? ] && ln -s /usr/bin/autoheader-2.5? autoheader
[ -x /usr/bin/aclocal-1.5 ] && ln -s /usr/bin/aclocal-1.5 aclocal
[ -x /usr/bin/automake-1.5 ] && ln -s /usr/bin/automake-1.5 automake
# End workaround
test -f Makefile.cvs && make -f Makefile.cvs
Why variable PATH is being exported here ? RPM executes %prep- and %build-
sections separately. PATH doesn't keep its value at the beginning of %build-
All links to necessary versions of autoconf, automake etc. made above will be
inaccessible. Old versions of those tools will be used.
Because of this issue (?) configure generates wrong config.h (it's too short).
The package doesn't build.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Build the SRPM-package as usual
Actual Results: .....
cd . && /bin/sh /users/work/WORK_DIR/BUILD/kdegraphics-3.0.0/admin/missing --
FATAL ERROR: Autoconf version 2.50 or higher is required for this script
main.cpp(40): error: identifier "VERSION" is undefined
VERSION, description, KAboutData::License_GPL,
compilation aborted for kcoloredit.all_cpp.cpp (code 2)
make: *** [kcoloredit.all_cpp.o] Error 2
Expected Results: Here should be no any errors
Such error also present in kontrol-panel-4 package (RH73/i386).
Hmm, it's correct. the variable PATH have to be exported here, because
autoconf,automake,autoheader,aclocal have to be run from the BUILD directory.
I have rebuilt it several times without having this problem.