1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-18 03:30:45 +00:00

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