On Fri, Dec 23, 2005 at 04:34:15PM +0100, Blaisorblade wrote:
> IMHO you need to have two RPMs:
> a) one to install on the guest - it should normally provide modules only. 
> Btw, 
> you'd like to have modules also in .tgz format (for installation on non-RPM 
> guest distros). It can be installed on the host, too.
> 
> b) one to install on the host - containing only the guest kernel.
> 
> Which should not at all go in /boot - SuSE RPMs are really wrong in this. The 
> only reason they work so, likely, is to reuse transparently mkinitrd.

I agree.  The only thing that I would add is that one can use "alien" to
massage the guest RPM into whatever format is necessary.

Last year I added support for UML to Arjan's FC3 kernel-2.6.spec, and I built
a kernel-uml-runtime (for the host, currently only contains /usr/bin/linux-*)
and a kernel-uml package for the guest:

   %package uml
   Summary: Linux kernel as normal program
   Group: System Environment/Kernel
   Provides: kernel-uml = %{version}
   Requires: kernel-utils >= 2.4-8.11
   Prereq: %{kernel_prereq}
   # We can't let RPM do the dependencies automatic because it'll then pick up
   # a correct but undesirable perl dependency from the module headers which
   # isn't required for the kernel proper to function
   AutoReqProv: no

   %description uml
   This package contains the Linux kernel and modules for User-Mode Linux.
   UML provides a sandbox in which experimentation can be done without
   harm to the real system, and can also be used for isolation of network
   services.  It should be installed inside the UML guest; the
   corresponding kernel-uml-runtime package should be installed on the host.

   %package uml-runtime
   Summary: The runtime binary of the user-mode port of the Linux kernel
   Group: System Environment/Kernel

   %description uml-runtime
   This package provides a Linux kernel compiled as normal program.  It
   should be installed on the host system; the corresponding kernel-uml
   package should be installed inside the UML guest.

   %if %{buildUML}
   %files uml
   %defattr(-,root,root)
   /%{image_install_path}/vmlinuz-%{KVERREL}uml
   /boot/System.map-%{KVERREL}uml
   /boot/config-%{KVERREL}uml
   %dir /lib/modules/%{KVERREL}uml
   /lib/modules/%{KVERREL}uml/kernel
   %verify(not mtime) /lib/modules/%{KVERREL}uml/build

   %files uml-runtime
   %defattr(-,root,root)
   %{_bindir}/linux-%{KVERREL}

%endif

I have yet to port this forward to the FC5 kernel spec files.

Regards,

    Bill Rugolsky


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
User-mode-linux-user mailing list
User-mode-linux-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-user

Reply via email to