Merge pull request #324888 from trofi/diffoscope-update

diffoscope: 271 -> 273
This commit is contained in:
Arnout Engelen 2024-07-31 14:27:02 +02:00 committed by GitHub
commit 29d4566505
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 215 additions and 236 deletions

View File

@ -1,78 +1,79 @@
{ lib {
, stdenv lib,
, abootimg stdenv,
, acl abootimg,
, apksigcopier acl,
, apksigner apksigcopier,
, apktool apksigner,
, binutils-unwrapped-all-targets apktool,
, bzip2 binutils-unwrapped-all-targets,
, cbfstool bzip2,
, cdrkit cbfstool,
, colord cdrkit,
, colordiff colord,
, coreutils colordiff,
, cpio coreutils,
, db cpio,
, diffutils db,
, docutils diffutils,
, dtc docutils,
, e2fsprogs dtc,
, enableBloat ? true e2fsprogs,
, enjarify enableBloat ? true,
, fetchurl enjarify,
, file fetchurl,
, findutils file,
, fontforge-fonttools findutils,
, ffmpeg fontforge-fonttools,
, fpc ffmpeg,
, gettext fpc,
, ghc gettext,
, ghostscriptX ghc,
, giflib ghostscriptX,
, gnumeric giflib,
, gnupg gnumeric,
, gnutar gnupg,
, gzip gnutar,
, hdf5 gzip,
, help2man hdf5,
, html2text help2man,
, imagemagick html2text,
, installShellFiles imagemagick,
, jdk installShellFiles,
, libarchive jdk,
, libcaca libarchive,
, libxmlb libcaca,
, llvm libxmlb,
, lz4 llvm,
, lzip lz4,
, mono lzip,
, ocaml mono,
, odt2txt ocaml,
, oggvideotools odt2txt,
, openssh oggvideotools,
, openssl openssh,
, pdftk openssl,
, pgpdump pdftk,
, poppler_utils pgpdump,
, procyon poppler_utils,
, python3 procyon,
, qemu python3,
, R qemu,
, sng R,
, sqlite sng,
, squashfsTools sqlite,
, tcpdump squashfsTools,
, ubootTools tcpdump,
, unzip ubootTools,
, wabt unzip,
, xmlbeans wabt,
, xxd xmlbeans,
, xz xxd,
, zip xz,
, zstd zip,
zstd,
# updater only # updater only
, writeScript writeScript,
}: }:
let let
@ -80,15 +81,19 @@ let
packageOverrides = final: prev: { packageOverrides = final: prev: {
# version 4 or newer would log the followng error but tests currently don't fail because radare2 is disabled # version 4 or newer would log the followng error but tests currently don't fail because radare2 is disabled
# ValueError: argument TNULL is not a TLSH hex string # ValueError: argument TNULL is not a TLSH hex string
tlsh = prev.tlsh.overridePythonAttrs ({ src, ... }: let tlsh = prev.tlsh.overridePythonAttrs (
version = "3.19.1"; { src, ... }:
in { let
inherit version; version = "3.19.1";
src = src.override { in
rev = version; {
hash = "sha256-ZYEjT/yShfA4+zpbGOtaFOx1nSSOWPtMvskPhHv3c9U="; inherit version;
}; src = src.override {
}); rev = version;
hash = "sha256-ZYEjT/yShfA4+zpbGOtaFOx1nSSOWPtMvskPhHv3c9U=";
};
}
);
}; };
}; };
in in
@ -96,11 +101,11 @@ in
# Note: when upgrading this package, please run the list-missing-tools.sh script as described below! # Note: when upgrading this package, please run the list-missing-tools.sh script as described below!
python.pkgs.buildPythonApplication rec { python.pkgs.buildPythonApplication rec {
pname = "diffoscope"; pname = "diffoscope";
version = "271"; version = "273";
src = fetchurl { src = fetchurl {
url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2"; url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2";
hash = "sha256-YwNaYj0daYbs3rN/EcPz5LihJjZ6JZb33FSS6u98Gss="; hash = "sha256-TccR/Vxq6Zf9tEvknLWewPVvJqo8pVSIi1+KxKMASq4=";
}; };
outputs = [ outputs = [
@ -108,10 +113,7 @@ python.pkgs.buildPythonApplication rec {
"man" "man"
]; ];
patches = [ patches = [ ./ignore_links.patch ];
./ignore_links.patch
./openssh-no-dsa.patch # https://salsa.debian.org/reproducible-builds/diffoscope/-/merge_requests/139
];
postPatch = '' postPatch = ''
# Upstream doesn't provide a PKG-INFO file # Upstream doesn't provide a PKG-INFO file
@ -149,106 +151,106 @@ python.pkgs.buildPythonApplication rec {
# #
# We filter automatically all packages for the host platform (some dependencies are not supported on Darwin, aarch64, etc.). # We filter automatically all packages for the host platform (some dependencies are not supported on Darwin, aarch64, etc.).
# Packages which are marked broken for a platform are not automatically filtered to avoid accidentally removing them without noticing it. # Packages which are marked broken for a platform are not automatically filtered to avoid accidentally removing them without noticing it.
pythonPath = lib.filter (lib.meta.availableOn stdenv.hostPlatform) ([ pythonPath = lib.filter (lib.meta.availableOn stdenv.hostPlatform) (
acl
binutils-unwrapped-all-targets
bzip2
cdrkit
colordiff
coreutils
cpio
db
diffutils
dtc
e2fsprogs
file
findutils
fontforge-fonttools
gettext
gnutar
gzip
html2text
libarchive
libxmlb
lz4
lzip
openssl
pgpdump
sng
sqlite
squashfsTools
unzip
xxd
xz
zip
zstd
]
++ (with python.pkgs; [
argcomplete
debian
defusedxml
jsbeautifier
jsondiff
libarchive-c
progressbar33
pypdf
python-magic
pyxattr
rpm
tlsh
])
++ lib.optionals enableBloat (
[ [
abootimg acl
apksigcopier binutils-unwrapped-all-targets
apksigner bzip2
apktool cdrkit
cbfstool colordiff
colord coreutils
enjarify cpio
ffmpeg db
fpc diffutils
ghc dtc
ghostscriptX e2fsprogs
giflib file
gnupg findutils
hdf5 fontforge-fonttools
imagemagick gettext
jdk gnutar
libcaca gzip
llvm html2text
mono libarchive
ocaml libxmlb
odt2txt lz4
openssh lzip
pdftk openssl
poppler_utils pgpdump
procyon sng
qemu sqlite
R squashfsTools
tcpdump unzip
ubootTools xxd
wabt xz
xmlbeans zip
zstd
] ]
++ (with python.pkgs; [ ++ (with python.pkgs; [
androguard argcomplete
binwalk debian
guestfs defusedxml
h5py jsbeautifier
pdfminer-six jsondiff
r2pipe libarchive-c
# docx2txt, nixpkgs packages another project named the same, which does not work progressbar33
pypdf
python-magic
pyxattr
rpm
tlsh
]) ])
# oggvideotools is broken on Darwin, please put it back when it will be fixed? ++ lib.optionals enableBloat (
++ lib.optionals stdenv.isLinux [ oggvideotools ] [
# This doesn't work on aarch64-darwin abootimg
++ lib.optionals (stdenv.hostPlatform.system != "aarch64-darwin") [ gnumeric ] apksigcopier
)); apksigner
apktool
cbfstool
colord
enjarify
ffmpeg
fpc
ghc
ghostscriptX
giflib
gnupg
hdf5
imagemagick
jdk
libcaca
llvm
mono
ocaml
odt2txt
openssh
pdftk
poppler_utils
procyon
qemu
R
tcpdump
ubootTools
wabt
xmlbeans
]
++ (with python.pkgs; [
androguard
binwalk
guestfs
h5py
pdfminer-six
r2pipe
# docx2txt, nixpkgs packages another project named the same, which does not work
])
# oggvideotools is broken on Darwin, please put it back when it will be fixed?
++ lib.optionals stdenv.isLinux [ oggvideotools ]
# This doesn't work on aarch64-darwin
++ lib.optionals (stdenv.hostPlatform.system != "aarch64-darwin") [ gnumeric ]
)
);
nativeCheckInputs = with python.pkgs; [ nativeCheckInputs = with python.pkgs; [ pytestCheckHook ] ++ pythonPath;
pytestCheckHook
] ++ pythonPath;
pytestFlagsArray = [ pytestFlagsArray = [
# Always show more information when tests fail # Always show more information when tests fail
@ -260,30 +262,32 @@ python.pkgs.buildPythonApplication rec {
installManPage doc/diffoscope.1 installManPage doc/diffoscope.1
''; '';
disabledTests = [ disabledTests =
"test_sbin_added_to_path" [
"test_diff_meta" "test_sbin_added_to_path"
"test_diff_meta2" "test_diff_meta"
"test_diff_meta2"
# Fails because it fails to determine llvm version # Fails because it fails to determine llvm version
"test_item3_deflate_llvm_bitcode" "test_item3_deflate_llvm_bitcode"
# Fails ever since an update to imagemagick # Fails ever since an update to imagemagick
"test_has_visuals" "test_has_visuals"
] ++ lib.optionals stdenv.isDarwin [ ]
# Disable flaky tests on Darwin ++ lib.optionals stdenv.isDarwin [
"test_non_unicode_filename" # Disable flaky tests on Darwin
"test_listing" "test_non_unicode_filename"
"test_symlink_root" "test_listing"
"test_symlink_root"
# Appears to be a sandbox related issue # Appears to be a sandbox related issue
"test_trim_stderr_in_command" "test_trim_stderr_in_command"
# Seems to be a bug caused by having different versions of rdata than # Seems to be a bug caused by having different versions of rdata than
# expected. Will file upstream. # expected. Will file upstream.
"test_item_rdb" "test_item_rdb"
# Caused by getting an otool command instead of llvm-objdump. Could be Nix # Caused by getting an otool command instead of llvm-objdump. Could be Nix
# setup, could be upstream bug. Will file upstream. # setup, could be upstream bug. Will file upstream.
"test_libmix_differences" "test_libmix_differences"
]; ];
disabledTestPaths = lib.optionals stdenv.isDarwin [ disabledTestPaths = lib.optionals stdenv.isDarwin [
"tests/comparators/test_git.py" "tests/comparators/test_git.py"
@ -321,7 +325,11 @@ python.pkgs.buildPythonApplication rec {
homepage = "https://diffoscope.org/"; homepage = "https://diffoscope.org/";
changelog = "https://diffoscope.org/news/diffoscope-${version}-released/"; changelog = "https://diffoscope.org/news/diffoscope-${version}-released/";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ dezgeg danielfullmer raitobezarius ]; maintainers = with maintainers; [
dezgeg
danielfullmer
raitobezarius
];
platforms = platforms.unix; platforms = platforms.unix;
mainProgram = "diffoscope"; mainProgram = "diffoscope";
}; };

View File

@ -1,29 +0,0 @@
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