[PATCH] gnu: ganeti: Fix build.

  • Done
  • quality assurance status badge
Details
3 participants
  • attila.lendvai
  • Ludovic Courtès
  • Reed Meyerson
Owner
unassigned
Submitted by
attila.lendvai
Severity
normal

Debbugs page

attila.lendvai wrote 8 months ago
(address . guix-patches@gnu.org)(name . Attila Lendvai)(address . attila@lendvai.name)
5d7ae8c0db78c963581ef2fb1cca83c7c5b8466b.1721476128.git.attila@lendvai.name
From: Attila Lendvai <attila@lendvai.name>

* gnu/packages/virtualization.scm (ganeti): Add backported patch
`ganeti-openssh-test-fix.patch`. Disable test `py_compat_types` in
`test/hs/Test/Ganeti/OpCodes.hs`. Disable test
`test/py/ganeti.ssh_unittest.py`.

Change-Id: Id317c3f159374c2568a762c42c821ec2ee879bc6
---
.../patches/ganeti-openssh-test-fix.patch | 46 +++++++++++++++++++
gnu/packages/virtualization.scm | 9 +++-
2 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/ganeti-openssh-test-fix.patch

Toggle diff (89 lines)
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 00000000000..ed7a498fab2
--- /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/virtualization.scm b/gnu/packages/virtualization.scm
index dfd0e19e4b2..100957d4106 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -749,6 +749,7 @@ (define-public ganeti
"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"
@@ -896,13 +897,19 @@ (define-public ganeti
(("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" ".")

base-commit: 9df5289c6687cd5688c275d16417389fbab6d384
--
2.45.1
Attila Lendvai wrote 4 months ago
(address . 72207@debbugs.gnu.org)(address . attila.lendvai@gmail.com)
87h684442h.fsf@lendvai.name
user guix
usertag 72207 + patch-hackers-review-list
thanks
Reed Meyerson wrote 2 months ago
(address . 72207@debbugs.gnu.org)
CANv=NwG3665DOkSH1AgEfzi7rOHtHnz298sRNb8jerQ93pxzSA@mail.gmail.com
Sorry, I think I attached the patch incorrectly. Here are the contents:

From d3feb577f2040daa6b54f0af264dea1d477e530d Mon Sep 17 00:00:00 2001
Message-ID: <
d3feb577f2040daa6b54f0af264dea1d477e530d.1736269185.git.reed.meyerson@gmail.com>

From: Reed Meyerson <reed.meyerson@gmail.com>
Date: Tue, 7 Jan 2025 11:27:00 -0500
Subject: [PATCH 1/1] removing deprecated sphinx.util.compat import

Change-Id: I21c4dd5e7210021e8905dc6237bd5148aeed930d
---
.../patches/ganeti-openssh-test-fix.patch | 46 +++++++++++++++++++
.../patches/ganeti-sphinx-import.patch | 12 +++++
gnu/packages/virtualization.scm | 12 ++++-
3 files changed, 68 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/ganeti-openssh-test-fix.patch
create mode 100644 gnu/packages/patches/ganeti-sphinx-import.patch

Toggle diff (119 lines)
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 9dff421341..4cc46b3939 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -776,10 +776,12 @@ (define-public ganeti
"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
@@ -923,13 +925,19 @@ (define-public ganeti
(("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" ".")

base-commit: 84a68cffe6abf1056df2607e79ef587b63820a6e
--
2.46.0
Attachment: file
Reed Meyerson wrote 2 months ago
(address . 72207@debbugs.gnu.org)
CANv=NwGP1oOW9BrJ1eBrkvJ-X0W+EQnzJ7XUVy7CPjLcbBhObQ@mail.gmail.com
Sorry, I think I attached the patch incorrectly. Here are the contents:

From d3feb577f2040daa6b54f0af264dea1d477e530d Mon Sep 17 00:00:00 2001
Message-ID: <
d3feb577f2040daa6b54f0af264dea1d477e530d.1736269185.git.reed.meyerson@gmail.com>

From: Reed Meyerson <reed.meyerson@gmail.com>
Date: Tue, 7 Jan 2025 11:27:00 -0500
Subject: [PATCH 1/1] removing deprecated sphinx.util.compat import

Change-Id: I21c4dd5e7210021e8905dc6237bd5148aeed930d
---
.../patches/ganeti-openssh-test-fix.patch | 46 +++++++++++++++++++
.../patches/ganeti-sphinx-import.patch | 12 +++++
gnu/packages/virtualization.scm | 12 ++++-
3 files changed, 68 insertions(+), 2 deletions(-)
create mode 100644 gnu/packages/patches/ganeti-openssh-test-fix.patch
create mode 100644 gnu/packages/patches/ganeti-sphinx-import.patch

Toggle diff (119 lines)
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 9dff421341..4cc46b3939 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -776,10 +776,12 @@ (define-public ganeti
"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
@@ -923,13 +925,19 @@ (define-public ganeti
(("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" ".")

base-commit: 84a68cffe6abf1056df2607e79ef587b63820a6e
--
2.46.0

Best,
Reed
Attachment: file
Ludovic Courtès wrote 3 days ago
Re: [bug#72207] [PATCH] gnu: ganeti: Fix build., [PATCH 1/1] removing deprecated sphinx.util.compat import
(name . Reed Meyerson)(address . reed.meyerson@gmail.com)(address . 72207-done@debbugs.gnu.org)
87o6y4wlgc.fsf_-_@gnu.org
Hi Reed,

Reed Meyerson <reed.meyerson@gmail.com> skribis:

Toggle quote (8 lines)
> From d3feb577f2040daa6b54f0af264dea1d477e530d Mon Sep 17 00:00:00 2001
> Message-ID: <d3feb577f2040daa6b54f0af264dea1d477e530d.1736269185.git.reed.meyerson@gmail.com>
> From: Reed Meyerson <reed.meyerson@gmail.com>
> Date: Tue, 7 Jan 2025 11:27:00 -0500
> Subject: [PATCH 1/1] removing deprecated sphinx.util.compat import
>
> Change-Id: I21c4dd5e7210021e8905dc6237bd5148aeed930d

Finally applied, after tweaking the commit message to follow our
conventions.

Thank you and thanks to Attila as well!

Ludo’.
Closed
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 72207@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72207
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help