summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReed Meyerson <reed.meyerson@gmail.com>2025-01-07 11:27:00 -0500
committerLudovic Courtès <ludo@gnu.org>2025-03-14 00:38:47 +0100
commitfc52420c9b10851aeeac6b393884ae350ec22be1 (patch)
treef8950e50e4fa6bfd25d7fe9d6ed5afc6896504c9
parent678b3dddfe442e643fe5cff7730d4f9690c3e2c2 (diff)
gnu: ganeti: Fix compilation.
* gnu/packages/patches/ganeti-openssh-test-fix.patch, gnu/packages/patches/ganeti-sphinx-import.patch: New files. * gnu/packages/virtualization.scm (ganeti)[source]: Use them. [arguments]: Adjust ‘adjust-tests’ phase. * gnu/local.mk (dist_patch_DATA): Add patches. Change-Id: I21c4dd5e7210021e8905dc6237bd5148aeed930d Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--gnu/local.mk2
-rw-r--r--gnu/packages/patches/ganeti-openssh-test-fix.patch46
-rw-r--r--gnu/packages/patches/ganeti-sphinx-import.patch12
-rw-r--r--gnu/packages/virtualization.scm12
4 files changed, 70 insertions, 2 deletions
diff --git a/gnu/local.mk b/gnu/local.mk
index 149ef8dff9..d038812690 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1345,12 +1345,14 @@ dist_patch_DATA = \
%D%/packages/patches/ganeti-disable-version-symlinks.patch \
%D%/packages/patches/ganeti-haskell-pythondir.patch \
%D%/packages/patches/ganeti-lens-compat.patch \
+ %D%/packages/patches/ganeti-openssh-test-fix.patch \
%D%/packages/patches/ganeti-pyyaml-compat.patch \
%D%/packages/patches/ganeti-procps-compat.patch \
%D%/packages/patches/ganeti-reorder-arbitrary-definitions.patch \
%D%/packages/patches/ganeti-relax-dependencies.patch \
%D%/packages/patches/ganeti-shepherd-master-failover.patch \
%D%/packages/patches/ganeti-shepherd-support.patch \
+ %D%/packages/patches/ganeti-sphinx-import.patch \
%D%/packages/patches/ganeti-template-haskell-2.17.patch \
%D%/packages/patches/ganeti-template-haskell-2.18.patch \
%D%/packages/patches/gawk-shell.patch \
diff --git a/gnu/packages/patches/ganeti-openssh-test-fix.patch b/gnu/packages/patches/ganeti-openssh-test-fix.patch
new file mode 100644
index 0000000000..ed7a498fab
--- /dev/null
+++ b/gnu/packages/patches/ganeti-openssh-test-fix.patch
@@ -0,0 +1,46 @@
+From 8a06656acf8f6e3dfa907bea77bd57a469a8d3fb Mon Sep 17 00:00:00 2001
+From: codefritzel <pascal-pf@hotmail.de>
+Date: Thu, 11 Jul 2024 23:10:41 +0200
+Subject: replace dsa with rsa in TestUpdateSshRoot
+
+DSA to be deactivated in OpenSSH from 2025. Since version 7.0 dsa is
+marked as deprecated.
+
+The TestUpdateSshRoot uses DSA, which will fail in the future with newer
+OpenSSH versions.
+
+fixes #1752
+
+Signed-off-by: codefritzel <pascal-pf@hotmail.de>
+
+diff --git a/test/py/ganeti.tools.prepare_node_join_unittest.py b/test/py/ganeti.tools.prepare_node_join_unittest.py
+index fe7efdf8c..fe029b8f2 100755
+--- a/test/py/ganeti.tools.prepare_node_join_unittest.py
++++ b/test/py/ganeti.tools.prepare_node_join_unittest.py
+@@ -229,20 +229,20 @@ class TestUpdateSshRoot(unittest.TestCase):
+ def testUpdate(self):
+ data = {
+ constants.SSHS_SSH_ROOT_KEY: [
+- (constants.SSHK_DSA, "privatedsa", "ssh-dss pubdsa"),
++ (constants.SSHK_RSA, "privatersa", "ssh-rsa pubrsa"),
+ ],
+- constants.SSHS_SSH_KEY_TYPE: "dsa",
+- constants.SSHS_SSH_KEY_BITS: 1024,
++ constants.SSHS_SSH_KEY_TYPE: "rsa",
++ constants.SSHS_SSH_KEY_BITS: 2048,
+ }
+
+ prepare_node_join.UpdateSshRoot(data, False,
+ _homedir_fn=self._GetHomeDir)
+ self.assertEqual(os.listdir(self.tmpdir), [".ssh"])
+ self.assertEqual(sorted(os.listdir(self.sshdir)),
+- sorted(["authorized_keys", "id_dsa", "id_dsa.pub"]))
+- self.assertTrue(utils.ReadFile(utils.PathJoin(self.sshdir, "id_dsa"))
++ sorted(["authorized_keys", "id_rsa", "id_rsa.pub"]))
++ self.assertTrue(utils.ReadFile(utils.PathJoin(self.sshdir, "id_rsa"))
+ is not None)
+- pub_key = utils.ReadFile(utils.PathJoin(self.sshdir, "id_dsa.pub"))
++ pub_key = utils.ReadFile(utils.PathJoin(self.sshdir, "id_rsa.pub"))
+ self.assertTrue(pub_key is not None)
+ self.assertEqual(utils.ReadFile(utils.PathJoin(self.sshdir,
+ "authorized_keys")),
diff --git a/gnu/packages/patches/ganeti-sphinx-import.patch b/gnu/packages/patches/ganeti-sphinx-import.patch
new file mode 100644
index 0000000000..8c6e7b5be5
--- /dev/null
+++ b/gnu/packages/patches/ganeti-sphinx-import.patch
@@ -0,0 +1,12 @@
+diff --git a/lib/build/sphinx_ext.py b/lib/build/sphinx_ext.py
+index ca8b8216e..017f52343 100644
+--- a/lib/build/sphinx_ext.py
++++ b/lib/build/sphinx_ext.py
+@@ -45,7 +45,6 @@ import docutils.parsers.rst
+ from docutils.parsers.rst import Directive
+
+ import sphinx.errors
+-import sphinx.util.compat
+ import sphinx.roles
+ import sphinx.addnodes
+
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 87a9aedd3f..eac2be5cee 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -772,10 +772,12 @@ firmware blobs. You can
"ganeti-procps-compat.patch"
"ganeti-disable-version-symlinks.patch"
"ganeti-lens-compat.patch"
+ "ganeti-openssh-test-fix.patch"
"ganeti-template-haskell-2.17.patch"
"ganeti-template-haskell-2.18.patch"
"ganeti-reorder-arbitrary-definitions.patch"
- "ganeti-relax-dependencies.patch"))))
+ "ganeti-relax-dependencies.patch"
+ "ganeti-sphinx-import.patch"))))
(build-system gnu-build-system)
(arguments
`(#:imported-modules (,@%default-gnu-imported-modules
@@ -919,13 +921,19 @@ firmware blobs. You can
(("test/py/ganeti\\.hypervisor\\.hv_kvm_unittest\\.py") "")
(("test/py/ganeti\\.tools\\.ensure_dirs_unittest\\.py") "")
(("test/py/ganeti\\.utils\\.io_unittest-runasroot\\.py") "")
+ ;; Tracked at: https://github.com/ganeti/ganeti/issues/1752
+ (("test/py/ganeti\\.ssh_unittest\\.py") "")
;; Disable the bash_completion test, as it requires the full
;; bash instead of bash-minimal.
(("test/py/bash_completion\\.bash")
"")
;; This test requires networking.
(("test/py/import-export_unittest\\.bash")
- ""))))
+ ""))
+ (substitute* "test/hs/Test/Ganeti/OpCodes.hs"
+ ;; Some serdes failure, tracked at:
+ ;; https://github.com/ganeti/ganeti/issues/1753
+ ((", 'case_py_compat_types") ""))))
(add-after 'build 'build-bash-completions
(lambda _
(setenv "PYTHONPATH" ".")