Skip to content

Commit

Permalink
Merge pull request NixOS#302348 from amarshall/fix-diffoscope
Browse files Browse the repository at this point in the history
diffoscope: fix build after disablement of OpenSSH DSA keys
  • Loading branch information
drupol authored Apr 8, 2024
2 parents 9ba8c2b + 6e1c1a9 commit 58486b9
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkgs/tools/misc/diffoscope/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ python3.pkgs.buildPythonApplication rec {

patches = [
./ignore_links.patch
./openssh-no-dsa.patch # https://salsa.debian.org/reproducible-builds/diffoscope/-/merge_requests/139
];

postPatch = ''
Expand Down
29 changes: 29 additions & 0 deletions pkgs/tools/misc/diffoscope/openssh-no-dsa.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
diff --git a/tests/comparators/test_openssh_pub_key.py b/tests/comparators/test_openssh_pub_key.py
index da143097..8d6f3efa 100644
--- a/tests/comparators/test_openssh_pub_key.py
+++ b/tests/comparators/test_openssh_pub_key.py
@@ -29,7 +29,7 @@
from ..utils.tools import skip_unless_tools_exist, skip_unless_tool_is_at_least


-# Generated by: ssh-keygen -t dsa -C "Test1"
+# Generated by: ssh-keygen -t ed25519 -C "Test1"
opensshpubkey1 = load_fixture("test_openssh_pub_key1.pub")
# Generated by: ssh-keygen -t rsa -b 4096 -C "Test2"
opensshpubkey2 = load_fixture("test_openssh_pub_key2.pub")
diff --git a/tests/data/openssh_pub_key_expected_diff b/tests/data/openssh_pub_key_expected_diff
index 0b6ec624..88d1eccf 100644
--- a/tests/data/openssh_pub_key_expected_diff
+++ b/tests/data/openssh_pub_key_expected_diff
@@ -1,3 +1,3 @@
@@ -1 +1 @@
--1024 SHA256:v/O+0ETvi2H5TGRXky1RhQ1/WFwLlPpxch5E2Mrj6FM Test1 (DSA)
+-256 SHA256:ix2OOXDuTWjxGTICJcP7fLWIcwOO+wr4FPJHz8fOhtQ Test1 (ED25519)
+4096 SHA256:9dH1CMkA6DSfPWU7vNwdPKS5/ppN4LMdvHTP60l7aSA Test2 (RSA)
diff --git a/tests/data/test_openssh_pub_key1.pub b/tests/data/test_openssh_pub_key1.pub
index a2674adc..d564f55c 100644
--- a/tests/data/test_openssh_pub_key1.pub
+++ b/tests/data/test_openssh_pub_key1.pub
@@ -1 +1 @@
-ssh-dss AAAAB3NzaC1kc3MAAACBAIa8YajID9g38jwQm8sNBGoGkkwIOv6sQ8k+Bcq8oPXPy1FRXWcra6Kd3iKqApIzLuZUvoYO/f3G2K4lue5yrv72rgwANWmyL4dHVXgcsjwvWwjOl6o4xWTPFspkdNcAAMcZfzG0+w1AOkQxhwMsnK380m3J9a3VOWugUiU4fV1jAAAAFQDzkrIZuJoxlxes564ltb2Vn3hnpQAAAIBHr6uzpiSeSkWLuItB00hHx1RHtBns0zaheNFTTUMGftxtfBU2eBLqObcTlqHJZ3UUY3/YAvD6Ux/uLSgUzEe7JaqvHcgML3K5V4HWIwE0ARRIwzrfU4cAErJObmZZ/OXbXNNRmW2IJgQJI52x4gVuSt0EEuctzASOOvyPA8IekAAAAIA7xe4o0o/ZwUqfWKR9K4QrbPPa6/D4ruFVhMcRJEE/A1LMY1Xo4nVSRU5bxzvMmJPBZvsbR5NEE3CgESqYxp5IPzK8LLyxcf8YxhdHFDYqFL1TbavwaDqtj6/9a/e7+bd8mMYe7zXJUdKWa/Uf+Xm6WRt3HgdLiCEsS2OlpvS2KA== Test1
+ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGo65kxbPUbb4fdujB2AX/XEZQ+23NDDxu3cJvw2E/DF Test1

0 comments on commit 58486b9

Please sign in to comment.