[Nix-dev] RHEL5 Issues re-visited.

Jeevakan Suresh Jeevakan.Suresh at macquarie.com
Wed Oct 8 00:57:11 CEST 2008


Nix is the only decent package manager I found which is 'distribution
agnostic'. This is a major strength! I got involved with nix because at
my work developers have the choice of a RHEL5 workstations - the catch
is we don't get root. The only way to install new software is via
something like nix.

When using nix as a package manager - the only think that *must* leak
through from the base system is the kernel (and thus the kernel
headers). As you said, this is required for system stability.

I've attached my patch below. RHEL only provides their kernel headers
via an RPM, so I had to tar these up and keep them within the package
repo. This is the only part of my solution which I don't like (any ideas
on how to do this better would be much appreciated). 

Also - what is the process for adding/updating the package repository?
Should the patch just be sent onto the mailing list or to specific
maintainers.

===================================================================
--- os-specific/linux/kernel-headers/install_raw_headers.sh
(revision 0)
+++ os-specific/linux/kernel-headers/install_raw_headers.sh
(revision 0)
@@ -0,0 +1,5 @@
+source $stdenv/setup
+
+buildCommand="mkdir -p $out/include && cp -r * $out/include/"
+
+genericBuild
Index: os-specific/linux/kernel-headers/2.6.18-92.el5PAE-i686.nix
===================================================================
--- os-specific/linux/kernel-headers/2.6.18-92.el5PAE-i686.nix
(revision 0)
+++ os-specific/linux/kernel-headers/2.6.18-92.el5PAE-i686.nix
(revision 0)
@@ -0,0 +1,18 @@
+{stdenv, fetchurl}:
+
+assert stdenv.isLinux;
+
+stdenv.mkDerivation {
+  name = "linux-headers-2.6.18-92el5PAE-i686";
+  builder = ./install_raw_headers.sh;
+  src = ./linux-headers-2.6.18-92el5PAE-i686.tgz;
+
+  platform = 
+    if stdenv.system == "i686-linux" then "i386" else
+    if stdenv.system == "x86_64-linux" then "x86_64" else
+    if stdenv.system == "powerpc-linux" then "powerpc" else
+    abort "don't know what the kernel include directory is called for
this platform";
+
+  extraIncludeDirs =
+    if stdenv.system == "powerpc-linux" then ["ppc"] else [];
+}



-----Original Message-----
From: Pjotr Prins [mailto:pjotr2008 at thebird.nl] 
Sent: Tuesday, October 07, 2008 5:15 PM
To: Jeevakan Suresh
Cc: nix-dev at cs.uu.nl
Subject: Re: [Nix-dev] RHEL5 Issues re-visited.

I think we need to include any major Linux version out in the open.

One of the strengths of Nix is that it runs on any platform. The purists
may not agree, but it is a real selling point - and one of the major
reasons I am involved now (which includes mistakes, heh). Some essential
packages build against kernelHeaders, and so do people developing new
software. One way is to contain all 'common'
kernelHeaders, including RHEL5, in all-packages.nix. But perhap we could
have a all-kernel-headers.nix package to support the flavours. I am very
happy with that config.nix extension, btw. Thanks Eelco.

The appropriate kernel headers are required to prevent subtle stability
problems.

Pj.

On Tue, Oct 07, 2008 at 10:43:02AM +1100, Jeevakan Suresh wrote:
> Hi Guys
>  
> I don't know if you remember, but a few months ago I asked a question 
> on the list about nix and RHEL5. The problem is RHEL 'aggressively' 
> patches their kernel thus making almost any 'standard' version of the 
> kernel headers horribly incompatible with any RHEL kernel.
>  
> I got a couple of suggestions (such as downgrading the kernel headers 
> or my glibc version), but the solution that has been working the best 
> for me is to use kernel headers as provided by Red Hat themselves.
>  
> I've been running nix with these headers for the last 3 months or so 
> without any issues, and I have additions which are down-stream ready. 
> I was wondering what's the process for getting these in? I'm sure this

> would be generally useful for anyone unfortunate enough to be stuck on

> a
> RHEL5 machine :)
> 
> Cheers
> Jeeva.
> 
> NOTICE
> This e-mail and any attachments are confidential and may contain
copyright material of Macquarie Group Limited or third parties. If you
are not the intended recipient of this email you should not read, print,
re-transmit, store or act in reliance on this e-mail or any attachments,
and should destroy all copies of them. Macquarie Group Limited does not
guarantee the integrity of any emails or any attached files. The views
or opinions expressed are the author's own and may not reflect the views
or opinions of Macquarie Group Limited.
> 
> _______________________________________________
> nix-dev mailing list
> nix-dev at cs.uu.nl
> https://mail.cs.uu.nl/mailman/listinfo/nix-dev



More information about the nix-dev mailing list