[RFC PATCH v3] kbuild: fix error when building from src rpm

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry for the confusion with the patch.

The latest version I've changed to an RFC because of some testing issues I've encountered.

The /sbin/installkernel doesn't behave very nicely when INSTALL_PATH is modified on RH6.4.

I haven't tested SLES11SP2 yet.

The trace from installkernel called from "make install"  is:

+ INSTALL_PATH=/home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot
+ make -j8 KBUILD_SRC= install
sh /home/user/rpmbuild/BUILD/kernel-3.10.0_rc1+/arch/x86/boot/install.sh 3.10.0-rc1+ arch/x86/boot/bzImage \
                System.map "/home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot"
+ '[' -x /home/user/bin/installkernel ']'
+ '[' -x /sbin/installkernel ']'
+ exec sh -x /sbin/installkernel 3.10.0-rc1+ arch/x86/boot/bzImage System.map /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot
+ cfgLoader=
+ '[' -z /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot -o /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot == /boot ']'
+ LINK_PATH=/boot
++ echo /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/
++ sed 's|^/boot/||'
+ RELATIVE_PATH=/home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/
+ KERNEL_VERSION=3.10.0-rc1+
+ BOOTIMAGE=arch/x86/boot/bzImage
+ MAPFILE=System.map
++ uname -m
+ ARCH=x86_64
+ '[' x86_64 = ppc64 -o x86_64 = ppc ']'
+ KERNEL_NAME=vmlinuz
+ '[' -z 3.10.0-rc1+ -o -z arch/x86/boot/bzImage -o -z System.map ']'
+ '[' -f /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/vmlinuz-3.10.0-rc1+ ']'
+ '[' '!' -L /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/vmlinuz ']'
+ '[' -e /vmlinuz ']'
+ '[' -f /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/System.map-3.10.0-rc1+ ']'
+ '[' '!' -L /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/System.map ']'
+ '[' -e /System.map ']'
+ ln -sf /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot//home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/System.map-3.10.0-rc1+ /boot/System.map
ln: cannot remove `/boot/System.map': Permission denied
+ cat arch/x86/boot/bzImage
+ cp System.map /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/System.map-3.10.0-rc1+
+ ln -fs /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot//home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/vmlinuz-3.10.0-rc1+ /boot/vmlinuz
ln: cannot remove `/boot/vmlinuz': Permission denied
+ ln -fs /home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot//home/user/rpmbuild/BUILDROOT/kernel-3.10.0_rc1+-1.x86_64/boot/System.map-3.10.0-rc1+ /boot/System.map
ln: cannot remove `/boot/System.map': Permission denied
+ '[' -n '' -a -x /sbin/new-kernel-pkg ']'

Note the attempts to remove and symlink stuff.   I also think there is some inconsistent use of INSTALL_PATH and INSTALLPATH:
if [ ! -L $INSTALL_PATH/$KERNEL_NAME ]; then
    if [ -e $INSTALLPATH/$KERNEL_NAME ]; then
        mv $INSTALL_PATH/$KERNEL_NAME $INSTALL_PATH/$KERNEL_NAME.old
    fi
fi

I'm seeing when spec file tries to do its own install...

I'm open to suggestions for making this part of the spec file portable and the src RPM usable.

Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux