Bug 75627 - strange commands in %prep section of spec-file
Summary: strange commands in %prep section of spec-file
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kdegraphics
Version: 7.3
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Than Ngo
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-10-10 13:33 UTC by Andrey
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-10-14 14:01:29 UTC
Embargoed:


Attachments (Terms of Use)

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.


Note You need to log in before you can comment on or make changes to this bug.