push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
{ callPackage, ... }@args:
callPackage ./generic.nix (
args
// {
version = "0.3.3";
sha256 = "0g5df00cj4nczrmr4k791l7la0sq2wnf8rn981fsrz1f3d2yix4i";
patches = [ ./drop-comments.patch ]; # we would get into a cycle when using fetchpatch on this one
}
)

View File

@@ -0,0 +1,12 @@
{ callPackage, python3, ... }@args:
callPackage ./generic.nix (
args
// {
version = "0.4.2";
sha256 = "sha256-iHWwll/jPeYriQ9s15O+f6/kGk5VLtv2QfH+1eu/Re0=";
# for gitdiff
extraBuildInputs = [ python3 ];
patches = [ ./Make-grepdiff1-test-case-pcre-aware.patch ];
}
)

View File

@@ -0,0 +1,36 @@
From 1208a632aaeca43f3846116197d645394fbae45d Mon Sep 17 00:00:00 2001
From: Tim Waugh <twaugh@redhat.com>
Date: Wed, 27 Aug 2025 09:36:01 +0100
Subject: [PATCH] Make grepdiff1 test-case pcre-aware
The test case needs a different pattern when configured with/without pcre2.
Fixed: #61
Assisted-by: Cursor
---
tests/grepdiff1/run-test | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/tests/grepdiff1/run-test b/tests/grepdiff1/run-test
index c4311f8..ebb6023 100755
--- a/tests/grepdiff1/run-test
+++ b/tests/grepdiff1/run-test
@@ -20,7 +20,16 @@ cat << EOF > diff
+b
EOF
-${GREPDIFF} '\+a' diff 2>errors >index || exit 1
+# Check if PCRE2 is being used by examining the help output
+if ${GREPDIFF} --help 2>&1 | grep -q "PCRE regexes are used by default"; then
+ # PCRE2 is enabled - need to escape the plus sign
+ PATTERN='\+a'
+else
+ # Standard regex - plus sign doesn't need escaping
+ PATTERN='+a'
+fi
+
+${GREPDIFF} "$PATTERN" diff 2>errors >index || exit 1
[ -s errors ] && exit 1
cat << EOF | cmp - index || exit 1

View File

@@ -0,0 +1,9 @@
{ callPackage, ... }@args:
callPackage ./generic.nix (
args
// {
version = "0.3.4";
sha256 = "0xp8mcfyi5nmb5a2zi5ibmyshxkb1zv1dgmnyn413m7ahgdx8mfg";
}
)

View File

@@ -0,0 +1,84 @@
From 58987954647f51dc42fb13b7759923c6170dd905 Mon Sep 17 00:00:00 2001
From: Tim Waugh <twaugh@redhat.com>
Date: Fri, 9 May 2014 16:23:27 +0100
Subject: Make --clean drop comments after '@@' lines as well (trac #29).
diff --git a/Makefile.am b/Makefile.am
index 99ad2a3..f3c6dbc 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -198,6 +198,7 @@ TESTS = tests/newline1/run-test \
tests/convert1/run-test \
tests/convert2/run-test \
tests/clean1/run-test \
+ tests/clean2/run-test \
tests/stdin/run-test
# These ones don't work yet.
diff --git a/src/filterdiff.c b/src/filterdiff.c
index 383e72b..6ca2316 100644
--- a/src/filterdiff.c
+++ b/src/filterdiff.c
@@ -2,7 +2,7 @@
* filterdiff - extract (or exclude) a diff from a diff file
* lsdiff - show which files are modified by a patch
* grepdiff - show files modified by a patch containing a regexp
- * Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2011 Tim Waugh <twaugh@redhat.com>
+ * Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009, 2011, 2013, 2014 Tim Waugh <twaugh@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -408,7 +408,8 @@ do_unified (FILE *f, char *header[2], int match, char **line,
" Hunk #%lu, %s",
hunknum, bestname);
- fputs (trailing, output_to);
+ fputs (clean_comments ? "\n" : trailing,
+ output_to);
break;
case Before:
// Note the initial line number
diff --git a/tests/clean2/run-test b/tests/clean2/run-test
new file mode 100755
index 0000000..42320df
--- /dev/null
+++ b/tests/clean2/run-test
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# This is a filterdiff(1) testcase.
+# Test: Make sure --clean removes hunk-level comments.
+
+
+. ${top_srcdir-.}/tests/common.sh
+
+cat << EOF > diff
+non-diff line
+--- a/file1
++++ b/file1
+@@ -0,0 +1 @@ this is a hunk-level comment
++a
+EOF
+
+${FILTERDIFF} --clean diff 2>errors >filtered || exit 1
+[ -s errors ] && exit 1
+
+cat << EOF | cmp - filtered || exit 1
+--- a/file1
++++ b/file1
+@@ -0,0 +1 @@
++a
+EOF
+
+${FILTERDIFF} --clean -x file1 diff 2>errors >filtered || exit 1
+[ -s errors ] && exit 1
+cat << EOF | cmp - filtered || exit 1
+--- a/file1
++++ b/file1
+@@ -0,0 +1 @@
++a
+EOF
--
cgit v0.10.1

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchurl,
perl,
makeWrapper,
version,
sha256,
patches ? [ ],
extraBuildInputs ? [ ],
...
}:
stdenv.mkDerivation rec {
pname = "patchutils";
inherit version patches;
src = fetchurl {
url = "http://cyberelk.net/tim/data/patchutils/stable/${pname}-${version}.tar.xz";
inherit sha256;
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ perl ] ++ extraBuildInputs;
hardeningDisable = [ "format" ];
# tests fail when building in parallel
enableParallelBuilding = false;
postInstall = ''
for bin in $out/bin/{splitdiff,rediff,editdiff,dehtmldiff}; do
wrapProgram "$bin" \
--prefix PATH : "$out/bin"
done
'';
doCheck = lib.versionAtLeast version "0.3.4";
preCheck = ''
patchShebangs tests
chmod +x scripts/*
''
+ lib.optionalString (lib.versionOlder version "0.4.2") ''
find tests -type f -name 'run-test' \
-exec sed -i '{}' -e 's|/bin/echo|echo|g' \;
'';
meta = with lib; {
description = "Tools to manipulate patch files";
homepage = "http://cyberelk.net/tim/software/patchutils";
license = licenses.gpl2Plus;
platforms = platforms.all;
maintainers = with maintainers; [ artturin ];
};
}