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

Re: rpm build/pa issues

On Thu, 2006-09-28 at 09:36 -0500, Ted X Toth wrote:
> Paul W. Frields wrote:
> > On Thu, 2006-09-21 at 07:41 -0500, Ted X Toth wrote:
> >   
> >> Paul W. Frields wrote:
> >>     
> >>> On Wed, 2006-09-20 at 18:25 -0500, Jay Cliburn wrote:
> >>>   
> >>>       
> >>>> Xavier Toth wrote:
> >>>>     
> >>>>         
> >>>>> I downloaded the rawhide kernel sources and tried to make a i686 rpm.
> >>>>> Following the instructions on
> >>>>> http://fedora.redhat.com/docs/release-notes/fc6test2/  I ran 'rpmbuild
> >>>>> -bp --target i686 kernel-2.6.spec' then copied
> >>>>> configs/kernel-2.6.17-i686.config to .config and edited the Makefile
> >>>>> changing EXTRAVERSION = -prep to EXTRAVERSION = -1.2647.fc6. I then
> >>>>> did a 'make oldconfig' (unclear why this is necessary since the copied
> >>>>> a prebuilt config file already) and then 'make rpm'. The result of the
> >>>>> make is rpmbuild/RPMS/i386/kernel- and
> >>>>> there are several issues with this:
> >>>>> 1) a i386 rpm was produced not a i686 rpm
> >>>>> 2) the EXTRAVERSION losses its '-' and so is run up against the kernel
> >>>>> version in the file name ''
> >>>>>
> >>>>> Are the instruction correct? Are these bugs in the build system?
> >>>>>
> >>>>> Ted
> >>>>>
> >>>>>       
> >>>>>           
> >>>> Despite what anyone on this list tells you to the contrary, the dash _will_ be 
> >>>> removed when you run "make rpm".
> >>>> See ~/rpmbuild/BUILD/kernel-<vers>/linux-<vers>/scripts/package/Makefile at line 30.
> >>>>
> >>>> Also see this thread. 
> >>>> https://www.redhat.com/archives/fedora-devel-list/2006-August/msg00272.html
> >>>>
> >>>> So yes, the Release Notes are incorrect.  You need to use a period, not a dash, 
> >>>> in the EXTRAVERSION field if you intend to "make rpm".
> >>>>         
> >>> The Release Notes don't address specifically building a new kernel RPM.
> >>> The typical Fedora-specific way for building the kernel AIUI would be to
> >>> use rpmbuild and the specfile, as for other RPMs.  Doing so makes
> >>> EXTRAVERSION work as expected, and (when using --target=i686) generates
> >>> the expected .i686.rpm kernel(s).  I'll add a sentence or two to the
> >>> Release Notes that discusses this.
> >>>   
> >>>       
> >> Could you include them here now also, please?
> >>     
> >
> > Rather than using "make srpm" from within the BUILD/kernel*/linux*
> > folder, you can include your custom config file(s) in the SOURCES/
> > folder, edit the specfile as needed, and do "rpmbuild -ba --target=i686
> > SPECS/kernel-2.6.spec" to build your custom kernel.
> >
> >   
> I appreciate your help but please understand I'm not a kernel developer 
> but rather an application developer who needs, at times, to use the 
> latest kernel. With that in mind which "custom config files(s)" are you 
> referring to that I'd need to move to SOURCES? What edits if any need to 
> be made in SPECS/kernel-2.6.spec if all I'm trying to do is create a 
> binary rpm for the specified architecture?

The config file is the file which controls how the kernel will be built
-- which drivers will be compiled in, made as modules, or left out
completely, and any options for them.  You'll find the stock config
files that we use for Fedora in the SOURCES folder
("kernel-<ver>-*.config").  If you need to build a custom kernel and
want to manage it with an RPM, which is a preferred method, just replace
the config file in question with the one you've changed for your
purposes.  Then you can simply build the binary RPMs using the specfile
in the same way as any RPM.

You can generate a config file from absolute scratch, if you don't want
to start with the stock ones, by doing:

$ rpmbuild --target=$(uname -m) ~/rpmbuild/SPECS/kernel-2.6.spec
$ cd ~/rpmbuild/BUILD/kernel*/linux*
$ make config              # or make menuconfig, et al.

If all of this is confusing, you may want to revisit your reasoning
behind using the newest kernel for your application, rather than using
the normal kernel-devel to build your package against.

Paul W. Frields, RHCE                          http://paul.frields.org/
  gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233  5906 ACDB C937 BD11 3717
       Fedora Project Board: http://fedoraproject.org/wiki/Board
    Fedora Docs Project:  http://fedoraproject.org/wiki/DocsProject

Attachment: signature.asc
Description: This is a digitally signed message part

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