diff options
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r-- | pkgs/os-specific/linux/hal/default.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix | 25 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel-headers/builder.sh | 9 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel-headers/default.nix | 62 | ||||
-rw-r--r-- | pkgs/os-specific/linux/module-init-tools/default.nix | 21 | ||||
-rw-r--r-- | pkgs/os-specific/linux/module-init-tools/module-dir.patch | 120 | ||||
-rw-r--r-- | pkgs/os-specific/linux/nfs-utils/default.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/pmount/default.nix | 8 | ||||
-rw-r--r-- | pkgs/os-specific/linux/util-linux/default.nix (renamed from pkgs/os-specific/linux/util-linux-ng/default.nix) | 12 |
9 files changed, 156 insertions, 111 deletions
diff --git a/pkgs/os-specific/linux/hal/default.nix b/pkgs/os-specific/linux/hal/default.nix index 718d54f3106..f1757be94cf 100644 --- a/pkgs/os-specific/linux/hal/default.nix +++ b/pkgs/os-specific/linux/hal/default.nix @@ -1,7 +1,7 @@ { stdenv, fetchurl, pkgconfig, python, pciutils, expat , libusb, dbus, dbus_glib, glib, libuuid, perl , perlXMLParser, gettext, zlib, gperf, consolekit, policykit -, libsmbios, dmidecode, udev, utillinuxng, pmutils, usbutils +, libsmbios, dmidecode, udev, utillinux, pmutils, usbutils , eject, upstart }: @@ -51,8 +51,8 @@ stdenv.mkDerivation rec { substituteInPlace $i \ ${changeDmidecode} \ ${if udev != null then "--replace /sbin/udevadm ${udev}/sbin/udevadm" else ""} \ - --replace /bin/mount ${utillinuxng}/bin/mount \ - --replace /bin/umount ${utillinuxng}/bin/umount \ + --replace /bin/mount ${utillinux}/bin/mount \ + --replace /bin/umount ${utillinux}/bin/umount \ --replace /usr/bin/pm-is-supported ${pmutils}/bin/pm-is-supported \ --replace /usr/sbin/pm ${pmutils}/sbin/pm \ --replace /sbin/shutdown ${upstart}/sbin/shutdown diff --git a/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix b/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix deleted file mode 100644 index 5ecdd77fb87..00000000000 --- a/pkgs/os-specific/linux/kernel-headers/2.6.18.5.nix +++ /dev/null @@ -1,25 +0,0 @@ -{stdenv, fetchurl, unifdef}: - -assert stdenv.isLinux; - -stdenv.mkDerivation { - name = "linux-headers-2.6.18.5"; - builder = ./builder.sh; - src = fetchurl { - url = "mirror://kernel/linux/kernel/v2.6/linux-2.6.18.5.tar.bz2"; - sha256 = "24f0e0011cdae42e3dba56107bb6a60c57c46d1d688a9b0300fec53e80fd1e53"; - }; - - patches = [ ./unifdef-getline.patch ]; - - buildInputs = [ unifdef ]; - - 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 []; -} diff --git a/pkgs/os-specific/linux/kernel-headers/builder.sh b/pkgs/os-specific/linux/kernel-headers/builder.sh deleted file mode 100644 index 05392d5fe24..00000000000 --- a/pkgs/os-specific/linux/kernel-headers/builder.sh +++ /dev/null @@ -1,9 +0,0 @@ -source $stdenv/setup - -patchPhase="sed -i '/scsi/d' include/Kbuild" - -buildPhase="make mrproper headers_check"; - -installPhase="make INSTALL_HDR_PATH=$out headers_install" - -genericBuild diff --git a/pkgs/os-specific/linux/kernel-headers/default.nix b/pkgs/os-specific/linux/kernel-headers/default.nix new file mode 100644 index 00000000000..c0f949186c6 --- /dev/null +++ b/pkgs/os-specific/linux/kernel-headers/default.nix @@ -0,0 +1,62 @@ +{ stdenv, fetchurl, perl, cross ? null }: + +assert cross == null -> stdenv.isLinux; + +let + version = "2.6.35.14"; + kernelHeadersBaseConfig = if cross == null then + stdenv.platform.kernelHeadersBaseConfig + else + cross.platform.kernelHeadersBaseConfig; +in + +stdenv.mkDerivation { + name = "linux-headers-${version}"; + + src = fetchurl { + url = "mirror://kernel/linux/kernel/v2.6/longterm/v2.6.35/linux-${version}.tar.bz2"; + sha256 = "1wzml7s9karfbk2yi36g1r8fyaq4d4f16yizc68zgchv0xzj39zl"; + }; + + targetConfig = if (cross != null) then cross.config else null; + + platform = + if cross != null then cross.platform.kernelArch else + 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 + if stdenv.system == "armv5tel-linux" then "arm" else + if stdenv.platform ? kernelArch then stdenv.platform.kernelArch else + abort "don't know what the kernel include directory is called for this platform"; + + buildInputs = [perl]; + + extraIncludeDirs = + if cross != null then + (if cross.arch == "powerpc" then ["ppc"] else []) + else if stdenv.system == "powerpc-linux" then ["ppc"] else []; + + buildPhase = '' + if test -n "$targetConfig"; then + export ARCH=$platform + fi + make ${kernelHeadersBaseConfig} + make mrproper headers_check + ''; + + installPhase = '' + make INSTALL_HDR_PATH=$out headers_install + + # Some builds (e.g. KVM) want a kernel.release. + ensureDir $out/include/config + echo "${version}-default" > $out/include/config/kernel.release + ''; + + # !!! hacky + fixupPhase = '' + ln -s asm $out/include/asm-$platform + if test "$platform" = "i386" -o "$platform" = "x86_64"; then + ln -s asm $out/include/asm-x86 + fi + ''; +} diff --git a/pkgs/os-specific/linux/module-init-tools/default.nix b/pkgs/os-specific/linux/module-init-tools/default.nix index 79e1111d40d..077d08f899d 100644 --- a/pkgs/os-specific/linux/module-init-tools/default.nix +++ b/pkgs/os-specific/linux/module-init-tools/default.nix @@ -1,19 +1,26 @@ { stdenv, fetchurl, docbook2x, docbook_sgml_dtd_41 }: -stdenv.mkDerivation rec { +stdenv.mkDerivation { name = "module-init-tools-3.16"; - src = fetchurl { - url = "mirror://kernel/linux/utils/kernel/module-init-tools/${name}.tar.bz2"; - sha256 = "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"; - }; + src = [ + (fetchurl { + url = mirror://kernel/linux/utils/kernel/module-init-tools/module-init-tools-3.16.tar.bz2; + sha256 = "0jxnz9ahfic79rp93l5wxcbgh4pkv85mwnjlbv1gz3jawv5cvwp1"; + }) - buildInputs = [ docbook2x ]; + # Upstream forgot to include the generated manpages. Thankfully + # the Gentoo people fixed this for us :-) + (fetchurl { + url = mirror://gentoo/distfiles/module-init-tools-3.16-man.tar.bz2; + sha256 = "1j1nzi87kgsh4scl645fhwhjvljxj83cmdasa4n4p5krhasgw358"; + }) + ]; SGML_CATALOG_FILES = "${docbook_sgml_dtd_41}/sgml/dtd/docbook-4.1/docbook.cat"; patches = [ ./module-dir.patch ./docbook2man.patch ]; - + postInstall = "rm $out/sbin/insmod.static"; # don't need it # We don't want bash (and therefore glibc) in the closure of the diff --git a/pkgs/os-specific/linux/module-init-tools/module-dir.patch b/pkgs/os-specific/linux/module-init-tools/module-dir.patch index 90805b00c3c..95c7559604d 100644 --- a/pkgs/os-specific/linux/module-init-tools/module-dir.patch +++ b/pkgs/os-specific/linux/module-init-tools/module-dir.patch @@ -1,36 +1,43 @@ -diff -Naur module-init-tools-3.16-orig/depmod.c module-init-tools-3.16/depmod.c ---- module-init-tools-3.16-orig/depmod.c 2011-06-02 13:55:01.000000000 -0400 -+++ module-init-tools-3.16/depmod.c 2011-10-01 23:30:14.947293695 -0400 -@@ -48,10 +48,6 @@ +commit cf2c95edb7918bc658f6cae93793c1949fc9cb6e +Author: David Guibert <david.guibert@gmail.com> +Date: Fri Aug 5 14:20:12 2011 +0200 + + introduce module-dir + +diff --git a/depmod.c b/depmod.c +index a1d2f8c..9362a35 100644 +--- a/depmod.c ++++ b/depmod.c +@@ -48,9 +48,6 @@ #include "testing.h" -#ifndef MODULE_DIR -#define MODULE_DIR "/lib/modules/" -#endif -- + #ifndef MODULE_BUILTIN_KEY #define MODULE_BUILTIN_KEY "built-in" - #endif -@@ -1514,6 +1510,7 @@ - struct module_overrides **overrides) - { +@@ -1516,6 +1513,7 @@ static int parse_config_file(const char *filename, char *line; -+ char *module_dir; unsigned int linenum = 0; FILE *cfile; ++ char *module_dir; -@@ -1536,6 +1533,9 @@ - continue; - } + cfile = fopen(filename, "r"); + if (!cfile) { +@@ -1525,6 +1523,10 @@ static int parse_config_file(const char *filename, + return 0; + } -+ if((module_dir = getenv("MODULE_DIR")) == NULL) -+ module_dir = "/lib/modules/"; ++ if((module_dir = getenv("MODULE_DIR")) == NULL) { ++ module_dir = "/lib/modules/"; ++ } + - if (streq(cmd, "search")) { - char *search_path; - -@@ -1550,7 +1550,7 @@ + while ((line = getline_wrapped(cfile, &linenum)) != NULL) { + char *ptr = line; + char *cmd, *modname; +@@ -1550,7 +1552,7 @@ static int parse_config_file(const char *filename, continue; } nofail_asprintf(&dirname, "%s%s%s/%s", basedir, @@ -39,7 +46,7 @@ diff -Naur module-init-tools-3.16-orig/depmod.c module-init-tools-3.16/depmod.c len = strlen(dirname); *search = add_search(dirname, len, *search); free(dirname); -@@ -1565,7 +1565,7 @@ +@@ -1565,7 +1567,7 @@ static int parse_config_file(const char *filename, continue; nofail_asprintf(&pathname, "%s%s%s/%s/%s.ko", basedir, @@ -48,27 +55,28 @@ diff -Naur module-init-tools-3.16-orig/depmod.c module-init-tools-3.16/depmod.c *overrides = add_override(pathname, *overrides); free(pathname); -@@ -1737,6 +1737,7 @@ +@@ -1737,6 +1739,7 @@ int main(int argc, char *argv[]) char *basedir = "", *dirname, *version; char *system_map = NULL, *module_symvers = NULL; int i; -+ char *module_dir; ++ char *module_dir; const char *config = NULL; if (native_endianness() == 0) -@@ -1832,7 +1833,10 @@ +@@ -1832,7 +1835,11 @@ int main(int argc, char *argv[]) if (optind == argc) all = 1; - nofail_asprintf(&dirname, "%s%s%s", basedir, MODULE_DIR, version); -+ if((module_dir = getenv("MODULE_DIR")) == NULL) -+ module_dir = "/lib/modules/"; ++ if((module_dir = getenv("MODULE_DIR")) == NULL) { ++ module_dir = "/lib/modules/"; ++ } + + nofail_asprintf(&dirname, "%s%s%s", basedir, module_dir, version); if (maybe_all) { if (!doing_stdout && !depfile_out_of_date(dirname)) -@@ -1850,7 +1854,7 @@ +@@ -1850,7 +1857,7 @@ int main(int argc, char *argv[]) size_t len; nofail_asprintf(&dirname, "%s%s%s/updates", basedir, @@ -77,36 +85,35 @@ diff -Naur module-init-tools-3.16-orig/depmod.c module-init-tools-3.16/depmod.c len = strlen(dirname); search = add_search(dirname, len, search); } -diff -Naur module-init-tools-3.16-orig/modinfo.c module-init-tools-3.16/modinfo.c ---- module-init-tools-3.16-orig/modinfo.c 2011-06-02 13:55:01.000000000 -0400 -+++ module-init-tools-3.16/modinfo.c 2011-10-01 23:32:15.335093548 -0400 -@@ -19,10 +19,6 @@ +diff --git a/modinfo.c b/modinfo.c +index 1dd8469..67b1041 100644 +--- a/modinfo.c ++++ b/modinfo.c +@@ -19,9 +19,6 @@ #include "zlibsupport.h" #include "testing.h" -#ifndef MODULE_DIR -#define MODULE_DIR "/lib/modules" -#endif -- + struct param { - struct param *next; -@@ -192,6 +188,7 @@ - unsigned long size; +@@ -193,6 +190,11 @@ static struct elf_file *grab_module(const char *name, struct utsname buf; char *depname, *p, *moddir; -+ char *module_dir; struct elf_file *module; ++ char *module_dir; ++ ++ if((module_dir = getenv("MODULE_DIR")) == NULL) { ++ module_dir = "/lib/modules/"; ++ } if (strchr(name, '.') || strchr(name, '/')) { -@@ -206,10 +203,14 @@ - uname(&buf); + module = grab_elf_file(name); +@@ -207,9 +209,9 @@ static struct elf_file *grab_module(const char *name, kernel = buf.release; } -+ -+ if((module_dir = getenv("MODULE_DIR")) == NULL) -+ module_dir = "/lib/modules/"; -+ if (strlen(basedir)) - nofail_asprintf(&moddir, "%s/%s/%s", basedir, MODULE_DIR, kernel); + nofail_asprintf(&moddir, "%s/%s/%s", basedir, module_dir, kernel); @@ -116,10 +123,11 @@ diff -Naur module-init-tools-3.16-orig/modinfo.c module-init-tools-3.16/modinfo. /* Search for it in modules.dep. */ nofail_asprintf(&depname, "%s/%s", moddir, "modules.dep"); -diff -Naur module-init-tools-3.16-orig/modprobe.c module-init-tools-3.16/modprobe.c ---- module-init-tools-3.16-orig/modprobe.c 2011-06-02 13:55:01.000000000 -0400 -+++ module-init-tools-3.16/modprobe.c 2011-10-01 23:34:04.111913368 -0400 -@@ -86,10 +86,6 @@ +diff --git a/modprobe.c b/modprobe.c +index 5464f45..d9fbf9d 100644 +--- a/modprobe.c ++++ b/modprobe.c +@@ -86,10 +86,6 @@ typedef enum } modprobe_flags_t; @@ -130,24 +138,24 @@ diff -Naur module-init-tools-3.16-orig/modprobe.c module-init-tools-3.16/modprob /** * print_usage - output the prefered program usage * -@@ -2131,6 +2127,7 @@ - char *cmdline_opts = NULL; - char *dirname; - errfn_t error = fatal; -+ char *module_dir; - int failed = 0; - modprobe_flags_t flags = 0; +@@ -2136,6 +2132,7 @@ int main(int argc, char *argv[]) struct modprobe_conf conf = {}; -@@ -2233,7 +2230,10 @@ + + recursion_depth = 0; ++ char *module_dir = NULL; + + /* Prepend options from environment. */ + argv = merge_args(getenv("MODPROBE_OPTIONS"), argv, &argc); +@@ -2233,7 +2230,11 @@ int main(int argc, char *argv[]) if (argc < optind + 1 && !dump_config && !list_only) print_usage(argv[0]); - nofail_asprintf(&dirname, "%s%s/%s", basedir, MODULE_DIR, buf.release); -+ if((module_dir = getenv("MODULE_DIR")) == NULL) -+ module_dir = "/lib/modules/"; ++ if((module_dir = getenv("MODULE_DIR")) == NULL) { ++ module_dir = "/lib/modules"; ++ } + + nofail_asprintf(&dirname, "%s%s/%s", basedir, module_dir, buf.release); /* Old-style -t xxx wildcard? Only with -l. */ if (list_only) { - diff --git a/pkgs/os-specific/linux/nfs-utils/default.nix b/pkgs/os-specific/linux/nfs-utils/default.nix index cf05d0fbaed..cdadcb05849 100644 --- a/pkgs/os-specific/linux/nfs-utils/default.nix +++ b/pkgs/os-specific/linux/nfs-utils/default.nix @@ -1,4 +1,4 @@ -{ fetchurl, stdenv, tcpWrapper, utillinuxng, libcap }: +{ fetchurl, stdenv, tcpWrapper, utillinux, libcap }: stdenv.mkDerivation rec { name = "nfs-utils-1.2.3"; @@ -9,7 +9,7 @@ stdenv.mkDerivation rec { }; # Needs `libblkid' and `libcomerr' from `e2fsprogs' or `util-linux-ng'. - buildInputs = [ tcpWrapper utillinuxng libcap ]; + buildInputs = [ tcpWrapper utillinux libcap ]; # FIXME: Add the dependencies needed for NFSv4 and TI-RPC. configureFlags = diff --git a/pkgs/os-specific/linux/pmount/default.nix b/pkgs/os-specific/linux/pmount/default.nix index 9366c2cf95f..4d555f59c37 100644 --- a/pkgs/os-specific/linux/pmount/default.nix +++ b/pkgs/os-specific/linux/pmount/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, cryptsetup, dbus, dbus_glib, intltool, ntfs3g, utillinuxng +{ stdenv, fetchurl, cryptsetup, dbus, dbus_glib, intltool, ntfs3g, utillinux , mediaDir ? "/media/" , lockDir ? "/var/lock/pmount" , whiteList ? "/etc/pmount.allow" @@ -15,14 +15,14 @@ stdenv.mkDerivation rec { sha256 = "db38fc290b710e8e9e9d442da2fb627d41e13b3ee80326c15cc2595ba00ea036"; }; - buildInputs = [ intltool utillinuxng ]; + buildInputs = [ intltool utillinux ]; configureFlags = "" + " --with-media-dir=${mediaDir}" + " --with-lock-dir=${lockDir}" + " --with-whitelist=${whiteList}" - + " --with-mount-prog=${utillinuxng}/bin/mount" - + " --with-umount-prog=${utillinuxng}/bin/umount" + + " --with-mount-prog=${utillinux}/bin/mount" + + " --with-umount-prog=${utillinux}/bin/umount" + " --with-mount-ntfs3g=${ntfs3g}/sbin/mount.ntfs-3g"; postConfigure = '' diff --git a/pkgs/os-specific/linux/util-linux-ng/default.nix b/pkgs/os-specific/linux/util-linux/default.nix index 4e62be4ff32..bd6f26dc58b 100644 --- a/pkgs/os-specific/linux/util-linux-ng/default.nix +++ b/pkgs/os-specific/linux/util-linux/default.nix @@ -1,11 +1,13 @@ -{ stdenv, fetchurl, ncurses ? null, perl ? null }: +{ stdenv, fetchurl, zlib, ncurses ? null, perl ? null }: stdenv.mkDerivation rec { - name = "util-linux-ng-2.18"; + name = "util-linux-2.20.1"; src = fetchurl { - url = "mirror://kernel/linux/utils/util-linux-ng/v2.18/${name}.tar.bz2"; - sha256 = "1k1in1ba9kvh0kplri9765wh0yk68qrkk1a55dqsm21qfryc1idq"; + # This used to be mirror://kernel/linux/utils/util-linux, but it + # disappeared in the kernel.org meltdown. + url = "mirror://gentoo/distfiles/${name}.tar.bz2"; + sha256 = "1q5vjcvw4f067c63vj2n3xggvk5prm11571x6vnqiav47vdbqvni"; }; # !!! It would be better to obtain the path to the mount helpers @@ -19,6 +21,6 @@ stdenv.mkDerivation rec { ${if ncurses == null then "--without-ncurses" else ""} ''; - buildInputs = stdenv.lib.optional (ncurses != null) ncurses + buildInputs = [ zlib ] ++ stdenv.lib.optional (ncurses != null) ncurses ++ stdenv.lib.optional (perl != null) perl; } |