Bug 75627

Summary: strange commands in %prep section of spec-file
Product: [Retired] Red Hat Linux Reporter: Andrey <andreypozdeev>
Component: kdegraphicsAssignee: Than Ngo <than>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2002-10-14 14:01:29 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Andrey 2002-10-10 13:33:54 UTC
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 
(kdegraphics.spec):
....
%endif

# 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
export PATH=`pwd`:$PATH
# End workaround

test -f Makefile.cvs && make -f Makefile.cvs

%build
....
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-
section anyway.
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):


How reproducible:
Always

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 --
run autoheader
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[2]: *** [kcoloredit.all_cpp.o] Error 2
.....



Expected Results:  Here should be no any errors

Additional info:

Comment 1 Sysoltsev Slawa 2002-10-14 14:01:23 UTC
Such error also present in kontrol-panel-4 package (RH73/i386).

Comment 2 Ngo Than 2002-12-08 21:24:26 UTC
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.