- Fix bz#2208831, update to 3.10
- Fix bz#2196671, diff -D no longer fails to output #ifndef lines introduced in 3.9
This commit is contained in:
parent
d2e1c85231
commit
2b29d95c6c
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ diffutils-2.8.1.tar.gz
|
||||
/diffutils-3.7.tar.xz
|
||||
/diffutils-3.8.tar.xz
|
||||
/diffutils-3.9.tar.xz
|
||||
/diffutils-3.10.tar.xz
|
||||
|
16
diffutils-3.10.tar.xz.sig
Normal file
16
diffutils-3.10.tar.xz.sig
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEFV0/xQDINEhtHupnf9n8ywAL7u4FAmRp3HUACgkQf9n8ywAL
|
||||
7u5uJA/+MAaQc6ovuxdBJomue6M+KkLLjUhlA5GILfVmV1Jr99P+ke8QlKmr5kOX
|
||||
q9xxGJS+Rkp4coEqtuS+lKnhRoXq2OhYuO439zrm3BKOz9il9gR7yd2hN21zEQ3I
|
||||
kW+TEqjswawOh9wpubCk/C5WozxSLSVu3nUefF3rzVDGwNtG73Z4etDpTQ0OXCYw
|
||||
9Owy3F7Bmnxg0Ae/ETkZ/l95zPOAGUXGNrHYJ5KaxT5AJVbeNAgqlP2SWQmyBX8m
|
||||
Ui6ffjvjn8tr99uAZUoD64FDehQ6xPIS7uknuQ9yUMa6SR4877Axhaekfy0pwR6j
|
||||
lKSZI2PAJqufaVCnlM8ZQzDleHHqbKUD8cvbjW2upPg0Ow6Ppu/VFnFAgtREQnIP
|
||||
Wd6WdRil7WVcglrurPGiykENrRG204ZGIEauZkUgsSB9ONZKgEt13jsu7PAQn+Qf
|
||||
vGQf7/sk3+eRMIhkglPgJVDqV36GlYkxt0MDe2yJ3tsu7ZUzREYSQ8m8EcUdJ3h1
|
||||
xqFqaIpxxNzvyn7WtNeu3Ej1dD+lGTj8osLmGzSnCQ7eaFghtKJuUoTLnd0rcD9N
|
||||
gW60pBb4DBEiPcAwqYmVmVwYKJ/afPf2qjfCDJDDm+nVHHPKeitzVNCnRVvnzJZc
|
||||
55BV6ftNOHLV/H6Q7LDG9bF/WQR0HPu9UatdpYNUyggh45a3jlc=
|
||||
=cXRh
|
||||
-----END PGP SIGNATURE-----
|
@ -1,16 +0,0 @@
|
||||
-----BEGIN PGP SIGNATURE-----
|
||||
|
||||
iQIzBAABCgAdFiEEFV0/xQDINEhtHupnf9n8ywAL7u4FAmPEk3oACgkQf9n8ywAL
|
||||
7u6wfg//YWpTsc+kHsuteg8gEWJWaOj+NI7XD86OPIkfb+VDHsaLiui1A0Wb6R+K
|
||||
SGLuUITr2IPXVqaE98PmrcII7Yd1BPsu8qQSaOs6J4c702rbYQhWQUMAyhevg2QT
|
||||
cvg8ao8GEphzIn5Fod9KQqy91lgEI84fQfNOtphL9de97HEDQTBL5sWoa2rPKWLZ
|
||||
JQFxEOaGybSQe9SQXJjjThAGyg3QY8oP+07KnpEnH3UxZutPTqCYzNg7oZv7eObU
|
||||
LDhx+AcXLbbkjFwdeM2ubdwD600bAJdDjmLotDom9ew7AOZUqB+Ml9tzn+fOnXuB
|
||||
oKMLB8ONMRJ+5rsZPJFRZUgJQZQ6e5AOZMNZwX5vWLBB/68sMVDtuGlaKHwxZWv4
|
||||
oqEWXicffa+ot77jc7Cr/rBEFDTaGayBgPJqLsk0wj1UZCKQOAN0DcL7ThH4qH4c
|
||||
gb0F1asIi/QjA2cGmRauTMj/WfjIBhDMrFC5dgn7uZHvgWM9Bt1jAJXZt0RQ+A16
|
||||
PgSgwnQYaQxZu18M7Mhe/JKSmTzTZpBIyI/95MwQK++YjYF1ROy95ViGJP2gkGDg
|
||||
qt4P5JJ2eyRtdcutVOSDRTUERRdLyIIdnUiIIhPs4aSBoNgktvL5e91/BSVLMPXf
|
||||
3pnUGIWpZjhHv3Xc7Z3HrFxdXYuXtv2OdUjZBrewA6KZjZFh+JE=
|
||||
=GjI7
|
||||
-----END PGP SIGNATURE-----
|
@ -1,20 +0,0 @@
|
||||
diff -up diffutils-3.6/src/cmp.c.cmp-s-empty diffutils-3.6/src/cmp.c
|
||||
--- diffutils-3.6/src/cmp.c.cmp-s-empty 2017-05-18 18:39:59.000000000 +0100
|
||||
+++ diffutils-3.6/src/cmp.c 2017-05-22 10:53:28.477147864 +0100
|
||||
@@ -330,12 +330,15 @@ main (int argc, char **argv)
|
||||
|
||||
/* If only a return code is needed,
|
||||
and if both input descriptors are associated with plain files,
|
||||
+ and if both files are larger than 0 bytes (procfs files are always 0),
|
||||
conclude that the files differ if they have different sizes
|
||||
and if more bytes will be compared than are in the smaller file. */
|
||||
|
||||
if (comparison_type == type_status
|
||||
&& S_ISREG (stat_buf[0].st_mode)
|
||||
- && S_ISREG (stat_buf[1].st_mode))
|
||||
+ && S_ISREG (stat_buf[1].st_mode)
|
||||
+ && stat_buf[0].st_size > 0
|
||||
+ && stat_buf[1].st_size > 0)
|
||||
{
|
||||
off_t s0 = stat_buf[0].st_size - file_position (0);
|
||||
off_t s1 = stat_buf[1].st_size - file_position (1);
|
@ -1,6 +1,6 @@
|
||||
diff -up diffutils-3.9/src/diff.c.i18n diffutils-3.9/src/diff.c
|
||||
--- diffutils-3.9/src/diff.c.i18n 2023-01-02 01:18:33.000000000 +0000
|
||||
+++ diffutils-3.9/src/diff.c 2023-01-16 14:40:53.841265893 +0000
|
||||
diff -up diffutils-3.10/src/diff.c.i18n diffutils-3.10/src/diff.c
|
||||
--- diffutils-3.10/src/diff.c.i18n 2023-05-20 11:17:26.000000000 +0200
|
||||
+++ diffutils-3.10/src/diff.c 2023-06-29 13:24:19.567608253 +0200
|
||||
@@ -76,6 +76,8 @@ static _Noreturn void try_help (char con
|
||||
static void check_stdout (void);
|
||||
static void usage (void);
|
||||
@ -10,7 +10,7 @@ diff -up diffutils-3.9/src/diff.c.i18n diffutils-3.9/src/diff.c
|
||||
/* If comparing directories, compare their common subdirectories
|
||||
recursively. */
|
||||
static bool recursive;
|
||||
@@ -303,6 +305,13 @@ main (int argc, char **argv)
|
||||
@@ -310,6 +312,14 @@ main (int argc, char **argv)
|
||||
presume_output_tty = false;
|
||||
xstdopen ();
|
||||
|
||||
@ -20,16 +20,17 @@ diff -up diffutils-3.9/src/diff.c.i18n diffutils-3.9/src/diff.c
|
||||
+ else
|
||||
+#endif
|
||||
+ lines_differ = lines_differ_singlebyte;
|
||||
+
|
||||
+
|
||||
/* Decode the options. */
|
||||
|
||||
while ((c = getopt_long (argc, argv, shortopts, longopts, NULL)) != -1)
|
||||
diff -up diffutils-3.9/src/diff.h.i18n diffutils-3.9/src/diff.h
|
||||
--- diffutils-3.9/src/diff.h.i18n 2023-01-02 01:18:33.000000000 +0000
|
||||
+++ diffutils-3.9/src/diff.h 2023-01-16 14:41:58.620317020 +0000
|
||||
@@ -23,6 +23,17 @@
|
||||
#include <stdio.h>
|
||||
#include <unlocked-io.h>
|
||||
while ((c = getopt_long (argc, argv, shortopts, longopts, nullptr)) != -1)
|
||||
diff -up diffutils-3.10/src/diff.h.i18n diffutils-3.10/src/diff.h
|
||||
--- diffutils-3.10/src/diff.h.i18n 2023-05-20 11:37:55.000000000 +0200
|
||||
+++ diffutils-3.10/src/diff.h 2023-06-29 13:25:49.451271873 +0200
|
||||
@@ -33,6 +33,17 @@ _GL_INLINE_HEADER_BEGIN
|
||||
# define XTERN extern
|
||||
#endif
|
||||
|
||||
+/* For platforms which support the ISO C ammendment 1 functionality we
|
||||
+ support user-defined character classes. */
|
||||
@ -38,14 +39,14 @@ diff -up diffutils-3.9/src/diff.h.i18n diffutils-3.9/src/diff.h
|
||||
+# include <wchar.h>
|
||||
+# include <wctype.h>
|
||||
+# if defined (HAVE_MBRTOWC)
|
||||
+# define HANDLE_MULTIBYTE 1
|
||||
+# define HANDLE_MULTIBYTE 1
|
||||
+# endif
|
||||
+#endif
|
||||
+
|
||||
/* What kind of changes a hunk contains. */
|
||||
enum changes
|
||||
{
|
||||
@@ -389,7 +400,11 @@ extern void print_sdiff_script (struct c
|
||||
@@ -392,7 +403,11 @@ extern void print_sdiff_script (struct c
|
||||
/* util.c */
|
||||
extern char const change_letter[4];
|
||||
extern char const pr_program[];
|
||||
@ -58,9 +59,9 @@ diff -up diffutils-3.9/src/diff.h.i18n diffutils-3.9/src/diff.h
|
||||
extern lin translate_line_number (struct file_data const *, lin);
|
||||
extern struct change *find_change (struct change *);
|
||||
extern struct change *find_reverse_change (struct change *);
|
||||
diff -up diffutils-3.9/src/io.c.i18n diffutils-3.9/src/io.c
|
||||
--- diffutils-3.9/src/io.c.i18n 2023-01-02 01:18:33.000000000 +0000
|
||||
+++ diffutils-3.9/src/io.c 2023-01-16 14:40:53.841265893 +0000
|
||||
diff -up diffutils-3.10/src/io.c.i18n diffutils-3.10/src/io.c
|
||||
--- diffutils-3.10/src/io.c.i18n 2023-05-20 11:17:26.000000000 +0200
|
||||
+++ diffutils-3.10/src/io.c 2023-06-29 13:20:52.457820950 +0200
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <cmpbuf.h>
|
||||
#include <file-type.h>
|
||||
@ -69,7 +70,7 @@ diff -up diffutils-3.9/src/io.c.i18n diffutils-3.9/src/io.c
|
||||
|
||||
/* Rotate an unsigned value to the left. */
|
||||
#define ROL(v, n) ((v) << (n) | (v) >> (sizeof (v) * CHAR_BIT - (n)))
|
||||
@@ -214,6 +215,28 @@ slurp (struct file_data *current)
|
||||
@@ -223,6 +224,28 @@ slurp (struct file_data *current)
|
||||
|
||||
/* Split the file into lines, simultaneously computing the equivalence
|
||||
class for each line. */
|
||||
@ -98,7 +99,7 @@ diff -up diffutils-3.9/src/io.c.i18n diffutils-3.9/src/io.c
|
||||
|
||||
static void
|
||||
find_and_hash_each_line (struct file_data *current)
|
||||
@@ -240,12 +263,300 @@ find_and_hash_each_line (struct file_dat
|
||||
@@ -249,12 +272,300 @@ find_and_hash_each_line (struct file_dat
|
||||
bool same_length_diff_contents_compare_anyway =
|
||||
diff_length_compare_anyway | ig_case;
|
||||
|
||||
@ -399,7 +400,7 @@ diff -up diffutils-3.9/src/io.c.i18n diffutils-3.9/src/io.c
|
||||
/* Hash this line until we find a newline. */
|
||||
switch (ig_white_space)
|
||||
{
|
||||
@@ -396,7 +707,7 @@ find_and_hash_each_line (struct file_dat
|
||||
@@ -405,7 +716,7 @@ find_and_hash_each_line (struct file_dat
|
||||
else if (!diff_length_compare_anyway)
|
||||
continue;
|
||||
|
||||
@ -408,10 +409,10 @@ diff -up diffutils-3.9/src/io.c.i18n diffutils-3.9/src/io.c
|
||||
break;
|
||||
}
|
||||
|
||||
diff -up diffutils-3.9/src/util.c.i18n diffutils-3.9/src/util.c
|
||||
--- diffutils-3.9/src/util.c.i18n 2023-01-02 01:18:33.000000000 +0000
|
||||
+++ diffutils-3.9/src/util.c 2023-01-16 14:40:53.842265909 +0000
|
||||
@@ -1084,7 +1084,8 @@ finish_output (void)
|
||||
diff -up diffutils-3.10/src/util.c.i18n diffutils-3.10/src/util.c
|
||||
--- diffutils-3.10/src/util.c.i18n 2023-02-19 19:04:39.000000000 +0100
|
||||
+++ diffutils-3.10/src/util.c 2023-06-29 13:20:52.457820950 +0200
|
||||
@@ -1085,7 +1085,8 @@ finish_output (void)
|
||||
Return nonzero if the lines differ. */
|
||||
|
||||
bool
|
||||
@ -421,7 +422,7 @@ diff -up diffutils-3.9/src/util.c.i18n diffutils-3.9/src/util.c
|
||||
{
|
||||
register char const *t1 = s1;
|
||||
register char const *t2 = s2;
|
||||
@@ -1240,6 +1241,354 @@ lines_differ (char const *s1, char const
|
||||
@@ -1241,6 +1242,354 @@ lines_differ (char const *s1, char const
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -1,11 +1,10 @@
|
||||
Summary: GNU collection of diff utilities
|
||||
Name: diffutils
|
||||
Version: 3.9
|
||||
Release: 4%{?dist}
|
||||
Version: 3.10
|
||||
Release: 1%{?dist}
|
||||
URL: https://www.gnu.org/software/diffutils/diffutils.html
|
||||
Source: https://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz
|
||||
Patch1: diffutils-cmp-s-empty.patch
|
||||
Patch2: diffutils-i18n.patch
|
||||
Patch0: diffutils-i18n.patch
|
||||
License: GPL-3.0-or-later
|
||||
Provides: bundled(gnulib)
|
||||
BuildRequires: gcc
|
||||
@ -28,10 +27,8 @@ Install diffutils if you need to compare text files.
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
# For 'cmp -s', compare file sizes only if both non-zero (bug #563618).
|
||||
%patch 1 -p1 -b .cmp-s-empty
|
||||
|
||||
%patch 2 -p1 -b .i18n
|
||||
# Multibyte
|
||||
%patch -P0 -p1 -b .i18n
|
||||
|
||||
# Run autoreconf for aarch64 support (bug #925256).
|
||||
autoreconf
|
||||
@ -59,6 +56,10 @@ make check
|
||||
%{_infodir}/diffutils.info*
|
||||
|
||||
%changelog
|
||||
* Thu Jun 29 2023 Than Ngo <than@redhat.com> - 3.10-1
|
||||
- Fix bz#2208831, update to 3.10
|
||||
- Fix bz#2196671, diff -D no longer fails to output #ifndef lines introduced in 3.9
|
||||
|
||||
* Tue Mar 28 2023 Than Ngo <than@redhat.com> - 3.9-4
|
||||
- Fix deprecated patch rpm marco
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (diffutils-3.9.tar.xz) = d43280cb1cb2615a8867d971467eb9a3fa037fe9a411028068036f733dab42b10d42767093cea4de71e62b2659a3ec73bd7d1a8f251befd49587e32802682d0f
|
||||
SHA512 (diffutils-3.10.tar.xz) = 219d2c815a120690c6589846271e43aee5c96c61a7ee4abbef97dfcdb3d6416652ed494b417de0ab6688c4322540d48be63b5e617beb6d20530b5d55d723ccbb
|
||||
|
Loading…
Reference in New Issue
Block a user