about summary refs log tree commit diff
path: root/pkgs/os-specific
diff options
context:
space:
mode:
authorAdam Stephens <adam@valkor.net>2024-01-31 09:01:40 -0500
committerAdam Stephens <adam@valkor.net>2024-01-31 09:02:26 -0500
commit184637940b32ed628bcdbe45a8a0b17bec57dedd (patch)
treec5ac9ff65a3065b183e2f577e9c5afbd50c7e621 /pkgs/os-specific
parentfe9057edb75c3755d64ee68bcb7a8ba6d3b42de6 (diff)
lxc: fix aarch64 build failure
Starting with commit 1cf2d7357c61b9c9ca5c92cb0e810571edee948a lxc is
failing on aarch64 only. For whatever reason, the version check done
on docbook2man here is no longer registering as >=0.8.8

https://github.com/lxc/lxc/blob/3efa1c3037bff09d12e36727cd6fea2f97fc0a7c/meson.build#L323

This falls through to this line, which changes the behavior of the
configured sgml header.

https://github.com/lxc/lxc/blob/3efa1c3037bff09d12e36727cd6fea2f97fc0a7c/meson.build#L327

Instead of figuring out /why/ this is the case, I'm just going to skip
the check for lxc since we won't ever ship docbook2x < 0.8.
Diffstat (limited to 'pkgs/os-specific')
-rw-r--r--pkgs/os-specific/linux/lxc/default.nix8
-rw-r--r--pkgs/os-specific/linux/lxc/docbook-hack.patch21
2 files changed, 28 insertions, 1 deletions
diff --git a/pkgs/os-specific/linux/lxc/default.nix b/pkgs/os-specific/linux/lxc/default.nix
index 4caf5b9aa943d..518d79b622a62 100644
--- a/pkgs/os-specific/linux/lxc/default.nix
+++ b/pkgs/os-specific/linux/lxc/default.nix
@@ -45,7 +45,13 @@ stdenv.mkDerivation rec {
     systemd
   ];
 
-  patches = [ ./add-meson-options.patch ];
+  patches = [
+     # make build more nix compatible
+    ./add-meson-options.patch
+
+    # fix docbook2man version detection
+    ./docbook-hack.patch
+  ];
 
   mesonFlags = [
     "-Dinstall-init-files=false"
diff --git a/pkgs/os-specific/linux/lxc/docbook-hack.patch b/pkgs/os-specific/linux/lxc/docbook-hack.patch
new file mode 100644
index 0000000000000..f758014efbaa2
--- /dev/null
+++ b/pkgs/os-specific/linux/lxc/docbook-hack.patch
@@ -0,0 +1,21 @@
+diff --git a/meson.build b/meson.build
+index d1527679e..360824994 100644
+--- a/meson.build
++++ b/meson.build
+@@ -320,15 +320,7 @@ docconf.set('LXC_USERNIC_CONF', lxc_user_network_conf)
+ docconf.set('LXC_USERNIC_DB', lxc_user_network_db)
+ docconf.set('PACKAGE_VERSION', version_data.get('LXC_VERSION'))
+ docconf.set('docdtd', '"-//OASIS//DTD DocBook XML" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"')
+-sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: false, version: '>=0.8')
+-if not sgml2man.found()
+-    sgml2man = find_program('docbook2man', required: false, version: '<0.8')
+-    if sgml2man.found()
+-        docconf.set('docdtd', '"-//Davenport//DTD DocBook V3.0//EN"')
+-    elif want_mans
+-        error('missing required docbook2x or docbook-utils dependency')
+-    endif
+-endif
++sgml2man = find_program('docbook2X2man', 'docbook2x-man', 'db2x_docbook2man', 'docbook2man', 'docbook-to-man', required: false)
+ 
+ ## Threads.
+ threads = dependency('threads')