lxc: fixed build to include the SGML documentation

svn path=/nixpkgs/trunk/; revision=29490
This commit is contained in:
Peter Simons 2011-09-26 08:12:10 +00:00
parent 0b9c88cba1
commit a004ca1a7d
4 changed files with 337 additions and 5 deletions

View file

@ -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 Linuxs existing process management infrastructure.
'';
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.simons ];
};

View file

@ -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

View file

@ -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

View file

@ -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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
]>
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
]>
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
]>
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
]>
@@ -280,7 +280,7 @@
</para>
<programlisting>
-
+<![CDATA[
---------
| STOPPED |<---------------
--------- |
@@ -305,7 +305,7 @@
---------- |
| |
---------------------
-
+]]>
</programlisting>
</refsect2>
@@ -570,7 +570,7 @@
to the background.
<programlisting>
-
+<![CDATA[
# launch lxc-wait in background
lxc-wait -n foo -s STOPPED &
LXC_WAIT_PID=$!
@@ -583,7 +583,7 @@
# is STOPPED
wait $LXC_WAIT_PID
echo "'foo' is finished"
-
+]]>
</programlisting>
</para>
</refsect2>
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
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 @@
-->
-<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
+<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">