Bug 134800

Summary: kernel rpm rebuild fails as user
Product: [Fedora] Fedora Reporter: Phil Schaffner <philip.r.schaffner>
Component: kernelAssignee: Dave Jones <davej>
Status: CLOSED NOTABUG QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 3CC: pfrields, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-05-22 06:18:39 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 Phil Schaffner 2004-10-06 13:39:39 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3)
Gecko/20040930

Description of problem:
Using Mike A. Harris' rpm configuration to build as a user, attempted
rebuild of kernel-2.6.8-1.541 fails on installed but unpackaged debug
files:

[prs@radar0 kernel-2.6.8]$ pwd
/home/prs/rpmbuild/kernel-2.6.8
[prs@radar0 kernel-2.6.8]$ rpmbuild -ba --target=i686-fc3t2-linux
kernel-2.6.spec
...
+ /usr/lib/rpm/brp-strip-comment-note
Processing files: kernel-2.6.8-1.541.prs
Processing files: kernel-smp-2.6.8-1.541.prs
Checking for unpackaged file(s): /usr/lib/rpm/check-files
/home/prs/rpmbuild/tmp/kernel-2.6.8-1.541.prs-root
error: Installed (but unpackaged) file(s) found:
   /usr/lib/debug/boot/System.map-2.6.8-1.541.prs
   /usr/lib/debug/boot/System.map-2.6.8-1.541.prssmp
   /usr/lib/debug/lib/modules/2.6.8-1.541.prs/vmlinux
   /usr/lib/debug/lib/modules/2.6.8-1.541.prssmp/vmlinux


RPM build errors:
    Installed (but unpackaged) file(s) found:
   /usr/lib/debug/boot/System.map-2.6.8-1.541.prs
   /usr/lib/debug/boot/System.map-2.6.8-1.541.prssmp
   /usr/lib/debug/lib/modules/2.6.8-1.541.prs/vmlinux
   /usr/lib/debug/lib/modules/2.6.8-1.541.prssmp/vmlinux



Version-Release number of selected component (if applicable):
kernel-2.6.8-1.541.src.rpm

How reproducible:
Always

Steps to Reproduce:
1. install kernel-2.6.8-1.541.src.rpm
2. attempt to build kernel rpms
3.
    

Actual Results:  Build failed to complete with errors on debug
components and build-username-specific names.

Expected Results:  Build should complete.  Debug files should either
not be packaged, or should be handled properly.

Additional info:

Commenting out the related lines in the spec file, per recent
discussions on fedora-devel-list, allows the build to complete:

[prs@radar0 kernel-2.6.8]$ diff -u kernel-2.6.spec*
--- kernel-2.6.spec     2004-10-05 15:25:01.000000000 -0400
+++ kernel-2.6.spec~    2004-09-01 15:54:00.000000000 -0400
@@ -670,9 +670,9 @@

     # Start installing the results

-#    mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/boot
+    mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/boot
     mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
-#    install -m 644 System.map
$RPM_BUILD_ROOT/usr/lib/debug/boot/System.map-$KernelVer
+    install -m 644 System.map
$RPM_BUILD_ROOT/usr/lib/debug/boot/System.map-$KernelVer
     objdump -t vmlinux | grep ksymtab | cut -f2 | cut -d" " -f2 | cut
-c11- | sort -u  > exported
     echo "_stext" >> exported
     echo "_end" >> exported
@@ -728,7 +728,7 @@
     # save the vmlinux file for kernel debugging into the
kernel-debuginfo rpm
     #
     mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
-#    cp vmlinux $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer
+    cp vmlinux $RPM_BUILD_ROOT/usr/lib/debug/lib/modules/$KernelVer

     # gpg sign the modules
 %if %{signmodules}
@@ -1211,4 +1211,4 @@
   which to use is unpleasant
 * Thu Jul 03 2003 Arjan van de Ven <arjanv>
 - 2.6 start
-
+
\ No newline at end of file
[prs@radar0 kernel-2.6.8]$

Comment 1 Dave Jones 2005-05-22 06:18:39 UTC
From http://www.tuxfan.homeip.net:8080/hack.html  ...

# To prevent rpm from creating debug rpms, add the following line to ~/.rpmmacros:

%debug_package          %{nil}