Bug 48827

Summary: kernel-headers postinstall script broken: BuildASM
Product: [Retired] Red Hat Linux Reporter: Ben Levenson <benl>
Component: kernelAssignee: Arjan van de Ven <arjanv>
Status: CLOSED WONTFIX QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2CC: cra, djuran
Target Milestone: ---   
Target Release: ---   
Hardware: sparc64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2003-10-30 04:09:23 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 Ben Levenson 2001-07-12 00:12:29 UTC
Description of Problem:
kernel-headers-2.2.19-6.2.7
 
The post install script doesn't populate the /usr/include/asm directory.
The header files were copied to the proper directory only after I manually
executed the BuildASM script _without_ passing the /usr/include/asm 
argument to BuildASM. (/usr/src/linux-2.2.19/include/asm-sparc/BuildASM)

# rpm -q --scripts kernel-headers 
postinstall script (through /bin/sh):
cd /usr/src
rm -f linux
ln -snf linux-2.2.19 linux
if [ 0 -eq 0 ] ; then
	cd /usr/include
	rm -f linux
	ln -snf ../src/linux/include/linux linux
	rm -fr asm
	rm -f asm-sparc asm-sparc64
	ln -snf ../src/linux/include/asm-sparc asm-sparc
	ln -snf ../src/linux/include/asm-sparc64 asm-sparc64
	mkdir asm
	/usr/src/linux-2.2.19/include/asm-sparc/BuildASM /usr/include/asm
fi
<snip>

Here is the top of BuildASM. When "/usr/include/asm" is passed into the
script, it will always exit with the "create asm-sparc* symlinks first"
message even though the links were properly created by the %postinstall
script.
 
/usr/src/linux-2.2.19/include/asm-sparc/BuildASM:
#!/bin/sh
INCPATH=${1:-/usr/include}
cd $INCPATH
if [ ! -d asm-sparc -o ! -d asm-sparc64 ] ; then
        echo You must create $INCPATH/asm-sparc* symlinks first.
        exit 1
<snip>

Comment 1 Charles R. Anderson 2001-11-13 18:57:03 UTC
This problem still exists in the latest errata kernel, 2.2.19-6.2.12.
The fix is to change the kernel-headers %post to call the BuildASM script
with /usr/include as the argument instead of /usr/include/asm (or leave the
argument out altogether).

Comment 2 Charles R. Anderson 2002-03-27 23:58:28 UTC
Problem still exists in 2.2.19-6.2.16.  The fix remains the same.


Comment 3 Ben Levenson 2003-10-30 04:09:23 UTC
No longer supported.
Closing as WONTFIX.