[Nix-dev] AUFS 2.1 for 2.6.37

Shea Levy shea at shealevy.com
Sat Mar 19 17:00:19 CET 2011


Hi all,

Attached is a nixpkgs patch (aufs2.1-2.6.37.patch) to add aufs2.1 and 
aufs2.1-utils to Linux 2.6.37 and a nixos patch 
(aufs2.1-nixos-test.patch) I used to test it. Some notes:

    * My motivation for this patch is that kernels < 2.6.36 contain an
      e1000e that does not support the ethernet card that is part of the
      chipset for the second-generation Core-i Intel CPUs, so in order
      to have a more useful livecd I needed to get aufs working with a
      newer kernel, and 2.6.37 is the latest kernel with an official
      aufs release.
    * All sources are downloaded with fetchgit. This is because the aufs
      upstream doesn't provide release tarballs, they just add a tag to
      their git tree for an official release.
    * The make target for the aufs2.1 headers uses a Makefile in the
      kernel build directory that requires that unifdef be in the
      scripts/ subdirectory of the build directory. The way I've dealt
      with this here is by adding "make $makeFlags -C scripts unifdef"
      to the postBuild in the kernel builder. Since the builder is used
      by all kernel versions, this will require rebuilding every kernel
      and kernel-dependent package if the patch is accepted, so one
      alternative I thought of would be to create a fake kernel build
      directory where everything is symlinked to the real build
      directory except scripts/, which is first copied and then make
      unifdef is run before building aufs2.1. If that more complicated
      solution is preferred, or if anyone has ideas for another one, I
      can do that and submit a new patch.
    * The nixpkgs patch contains my previously-submitted fbcondecor
      patch, for two reasons:
         1. I wanted to create a livecd that is as close as possible to
            current livecds except it uses 2.6.37, so I wanted
            ttyBackgrounds enabled which requires fbcondecor
         2. A patch that contains just the aufs2.1 changes and not the
            fbcondecor patch would cause a conflict in the linux_2_6_37
            definition in all-packages.nix. In particular, if such a
            patch were applied first and then the fbcondecor patch were
            applied, then patch will see fuzz and erroneously update
            linux_2_6_38 to use fbcondecor. I have not tested what would
            happen if the fbcondecor patch were applied first, but I
            suspect a similar problem would occur (linux_2_6_38 would be
            erroneously updated to use aufs2.1).
      As a result, if this patch is accepted the previous fbcondecor
      patch should NOT be applied. If the previous fbcondecor patch is
      applied before this is accepted, I will upload a new patch that
      doesn't have these issues. If a patch that includes aufs2.1 but
      has nothing fbcondecor related is desired, let me know and I'll
      submit it.
    * The patch was tested by building a livecd ISO that uses it, then
      running the ISO from within virtualbox and installing aufs2.1-util
      from within the livecd environment.
    * The livecd was built using installation-cd-minimal.nix, with two
      changes to the Nixos tree:
         1. boot.kernelPackages = pkgs.linuxPackages_2_6_37 was added to
            profiles/minimal.nix
         2. config.boot.kernelPackages.aufs2 was changed to
            config.boot.kernelPackages.aufs2_1 in iso-image.nix
      I would have preferred to keep all changes within
      profiles/minimal.nix, but I couldn't figure out how to override
      iso-image.nix's definition of boot.extraModulePackages. Livecds
      that use an older kernel can't be built with this iso-image.nix,
      since we don't have aufs2.1 for them (just aufs2). If someone can
      point me to how I can override things set in iso-image.nix, I'd
      appreciate it.

Cheers,
Shea Levy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110319/07b622b1/attachment.html 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: aufs2.1-2.6.37.patch
Url: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110319/07b622b1/attachment.pl 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: aufs2.1-nixos-test.patch
Url: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110319/07b622b1/attachment-0001.pl 


More information about the nix-dev mailing list