diff --git a/pkgs/tools/system/lxc/default.nix b/pkgs/tools/system/lxc/default.nix
index a4e44160a523..26180b843687 100644
--- a/pkgs/tools/system/lxc/default.nix
+++ b/pkgs/tools/system/lxc/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl, libcap, perl }:
+{ stdenv, fetchurl, libcap, perl, docbook2x, docbook_xml_dtd_45 }:
let
name = "lxc-0.7.5";
@@ -11,9 +11,15 @@ stdenv.mkDerivation{
sha256 = "019ec63f250c874bf7625b1f1bf555b1a6e3a947937a4fca73100abddf829b1c";
};
- buildInputs = [ libcap perl ];
+ buildInputs = [ libcap perl docbook2x ];
- patchPhase = "sed -i -e 's|/sbin/ldconfig|:|' src/lxc/Makefile.in";
+ patches = [
+ ./dont-run-ldconfig.patch
+ ./fix-documentation-build.patch
+ ./fix-sgml-documentation.patch
+ ];
+
+ preConfigure = "export XML_CATALOG_FILES=${docbook_xml_dtd_45}/xml/dtd/docbook/catalog.xml";
configureFlags = "--localstatedir=/var";
@@ -24,9 +30,19 @@ stdenv.mkDerivation{
'';
meta = {
- homepage = http://lxc.sourceforge.net;
- description = "lxc Linux Containers userland tools";
+ homepage = "http://lxc.sourceforge.net";
+ description = "lightweight virtual system mechanism";
license = stdenv.lib.licenses.lgpl21Plus;
+
+ longDescription = ''
+ LXC is the userspace control package for Linux Containers, a
+ lightweight virtual system mechanism sometimes described as
+ "chroot on steroids". LXC builds up from chroot to implement
+ complete virtual systems, adding resource management and isolation
+ mechanisms to Linux’s existing process management infrastructure.
+ '';
+
+
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.simons ];
};
diff --git a/pkgs/tools/system/lxc/dont-run-ldconfig.patch b/pkgs/tools/system/lxc/dont-run-ldconfig.patch
new file mode 100644
index 000000000000..e72ac0250f51
--- /dev/null
+++ b/pkgs/tools/system/lxc/dont-run-ldconfig.patch
@@ -0,0 +1,24 @@
+diff -ubr lxc-0.7.5-orig/src/lxc/Makefile.am lxc-0.7.5/src/lxc/Makefile.am
+--- lxc-0.7.5-orig/src/lxc/Makefile.am 2011-07-25 00:27:10.000000000 +0200
++++ lxc-0.7.5/src/lxc/Makefile.am 2011-09-26 09:58:03.479916848 +0200
+@@ -115,7 +115,7 @@
+
+ install-exec-local: install-soPROGRAMS
+ mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
+- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
++ : /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
+ cd $(DESTDIR)$(libdir); \
+ ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
+
+diff -ubr lxc-0.7.5-orig/src/lxc/Makefile.in lxc-0.7.5/src/lxc/Makefile.in
+--- lxc-0.7.5-orig/src/lxc/Makefile.in 2011-08-11 19:02:19.000000000 +0200
++++ lxc-0.7.5/src/lxc/Makefile.in 2011-09-26 09:58:18.812685181 +0200
+@@ -1322,7 +1322,7 @@
+
+ install-exec-local: install-soPROGRAMS
+ mv $(DESTDIR)$(libdir)/liblxc.so $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
+- /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
++ : /sbin/ldconfig -l $(DESTDIR)$(libdir)/liblxc.so.$(VERSION)
+ cd $(DESTDIR)$(libdir); \
+ ln -sf liblxc.so.$(firstword $(subst ., ,$(VERSION))) liblxc.so
+
diff --git a/pkgs/tools/system/lxc/fix-documentation-build.patch b/pkgs/tools/system/lxc/fix-documentation-build.patch
new file mode 100644
index 000000000000..0189b35a33e9
--- /dev/null
+++ b/pkgs/tools/system/lxc/fix-documentation-build.patch
@@ -0,0 +1,40 @@
+diff -ubr '--exclude=*sgml*' lxc-0.7.5-orig/doc/Makefile.am lxc-0.7.5/doc/Makefile.am
+--- lxc-0.7.5-orig/doc/Makefile.am 2011-02-14 09:14:07.000000000 +0100
++++ lxc-0.7.5/doc/Makefile.am 2011-09-26 09:53:02.192817940 +0200
+@@ -30,13 +30,13 @@
+
+
+ %.1 : %.sgml
+- docbook2man -w all $<
++ docbook2man $<
+
+ %.5 : %.sgml
+- docbook2man -w all $<
++ docbook2man $<
+
+ %.7 : %.sgml
+- docbook2man -w all $<
++ docbook2man $<
+
+ lxc-%.sgml : common_options.sgml see_also.sgml
+
+diff -ubr '--exclude=*sgml*' lxc-0.7.5-orig/doc/Makefile.in lxc-0.7.5/doc/Makefile.in
+--- lxc-0.7.5-orig/doc/Makefile.in 2011-08-11 19:02:18.000000000 +0200
++++ lxc-0.7.5/doc/Makefile.in 2011-09-26 09:53:13.835401448 +0200
+@@ -786,13 +786,13 @@
+
+
+ @ENABLE_DOCBOOK_TRUE@%.1 : %.sgml
+-@ENABLE_DOCBOOK_TRUE@ docbook2man -w all $<
++@ENABLE_DOCBOOK_TRUE@ docbook2man $<
+
+ @ENABLE_DOCBOOK_TRUE@%.5 : %.sgml
+-@ENABLE_DOCBOOK_TRUE@ docbook2man -w all $<
++@ENABLE_DOCBOOK_TRUE@ docbook2man $<
+
+ @ENABLE_DOCBOOK_TRUE@%.7 : %.sgml
+-@ENABLE_DOCBOOK_TRUE@ docbook2man -w all $<
++@ENABLE_DOCBOOK_TRUE@ docbook2man $<
+
+ @ENABLE_DOCBOOK_TRUE@lxc-%.sgml : common_options.sgml see_also.sgml
+
diff --git a/pkgs/tools/system/lxc/fix-sgml-documentation.patch b/pkgs/tools/system/lxc/fix-sgml-documentation.patch
new file mode 100644
index 000000000000..4d2cce0dd62e
--- /dev/null
+++ b/pkgs/tools/system/lxc/fix-sgml-documentation.patch
@@ -0,0 +1,252 @@
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-cgroup.sgml.in lxc-0.7.5/doc/lxc-cgroup.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-cgroup.sgml.in 2010-06-07 10:51:51.000000000 +0200
++++ lxc-0.7.5/doc/lxc-cgroup.sgml.in 2011-09-26 10:05:01.753873426 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-checkpoint.sgml.in lxc-0.7.5/doc/lxc-checkpoint.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-checkpoint.sgml.in 2011-02-17 10:07:44.000000000 +0100
++++ lxc-0.7.5/doc/lxc-checkpoint.sgml.in 2011-09-26 10:05:01.753873426 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc.conf.sgml.in lxc-0.7.5/doc/lxc.conf.sgml.in
+--- lxc-0.7.5-orig/doc/lxc.conf.sgml.in 2011-08-09 16:51:01.000000000 +0200
++++ lxc-0.7.5/doc/lxc.conf.sgml.in 2011-09-26 10:05:01.754873476 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+ ]>
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-console.sgml.in lxc-0.7.5/doc/lxc-console.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-console.sgml.in 2010-06-07 10:51:51.000000000 +0200
++++ lxc-0.7.5/doc/lxc-console.sgml.in 2011-09-26 10:05:01.754873476 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-create.sgml.in lxc-0.7.5/doc/lxc-create.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-create.sgml.in 2011-07-25 00:27:10.000000000 +0200
++++ lxc-0.7.5/doc/lxc-create.sgml.in 2011-09-26 10:05:01.755873526 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-destroy.sgml.in lxc-0.7.5/doc/lxc-destroy.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-destroy.sgml.in 2010-10-08 11:54:53.000000000 +0200
++++ lxc-0.7.5/doc/lxc-destroy.sgml.in 2011-09-26 10:05:01.755873526 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-execute.sgml.in lxc-0.7.5/doc/lxc-execute.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-execute.sgml.in 2011-07-25 00:27:10.000000000 +0200
++++ lxc-0.7.5/doc/lxc-execute.sgml.in 2011-09-26 10:05:01.755873526 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-freeze.sgml.in lxc-0.7.5/doc/lxc-freeze.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-freeze.sgml.in 2010-06-07 10:51:51.000000000 +0200
++++ lxc-0.7.5/doc/lxc-freeze.sgml.in 2011-09-26 10:05:01.755873526 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-kill.sgml.in lxc-0.7.5/doc/lxc-kill.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-kill.sgml.in 2010-10-08 11:54:53.000000000 +0200
++++ lxc-0.7.5/doc/lxc-kill.sgml.in 2011-09-26 10:05:01.756873576 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-ls.sgml.in lxc-0.7.5/doc/lxc-ls.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-ls.sgml.in 2010-06-07 10:51:51.000000000 +0200
++++ lxc-0.7.5/doc/lxc-ls.sgml.in 2011-09-26 10:05:01.756873576 +0200
+@@ -24,7 +24,7 @@
+
+ -->
+
+-
+ ]>
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-monitor.sgml.in lxc-0.7.5/doc/lxc-monitor.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-monitor.sgml.in 2010-06-07 10:51:51.000000000 +0200
++++ lxc-0.7.5/doc/lxc-monitor.sgml.in 2011-09-26 10:05:01.756873576 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-ps.sgml.in lxc-0.7.5/doc/lxc-ps.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-ps.sgml.in 2011-08-11 17:54:57.000000000 +0200
++++ lxc-0.7.5/doc/lxc-ps.sgml.in 2011-09-26 10:05:01.756873576 +0200
+@@ -24,7 +24,7 @@
+
+ -->
+
+-
+ ]>
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-restart.sgml.in lxc-0.7.5/doc/lxc-restart.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-restart.sgml.in 2011-02-17 10:07:44.000000000 +0100
++++ lxc-0.7.5/doc/lxc-restart.sgml.in 2011-09-26 10:05:01.757873626 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc.sgml.in lxc-0.7.5/doc/lxc.sgml.in
+--- lxc-0.7.5-orig/doc/lxc.sgml.in 2010-10-26 18:07:35.000000000 +0200
++++ lxc-0.7.5/doc/lxc.sgml.in 2011-09-26 10:05:01.758873676 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+ ]>
+@@ -280,7 +280,7 @@
+
+
+
+-
++
+
+
+
+@@ -570,7 +570,7 @@
+ to the background.
+
+
+-
++
+
+
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-start.sgml.in lxc-0.7.5/doc/lxc-start.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-start.sgml.in 2011-02-01 15:12:40.000000000 +0100
++++ lxc-0.7.5/doc/lxc-start.sgml.in 2011-09-26 10:05:01.758873676 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-stop.sgml.in lxc-0.7.5/doc/lxc-stop.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-stop.sgml.in 2010-06-07 10:51:51.000000000 +0200
++++ lxc-0.7.5/doc/lxc-stop.sgml.in 2011-09-26 10:05:01.758873676 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-unfreeze.sgml.in lxc-0.7.5/doc/lxc-unfreeze.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-unfreeze.sgml.in 2010-06-07 10:51:51.000000000 +0200
++++ lxc-0.7.5/doc/lxc-unfreeze.sgml.in 2011-09-26 10:05:01.759873726 +0200
+@@ -23,7 +23,7 @@
+
+ -->
+
+-
+
+diff -ubr '--exclude=Makefile*' lxc-0.7.5-orig/doc/lxc-wait.sgml.in lxc-0.7.5/doc/lxc-wait.sgml.in
+--- lxc-0.7.5-orig/doc/lxc-wait.sgml.in 2010-06-07 10:51:51.000000000 +0200
++++ lxc-0.7.5/doc/lxc-wait.sgml.in 2011-09-26 10:05:01.759873726 +0200
+@@ -24,7 +24,7 @@
+
+ -->
+
+-
+