Compare commits

...
Sign in to create a new pull request.

35 commits

Author SHA1 Message Date
Lukáš Zaoral
f674e5fc9c
fix cut test failure on aarch64 rawhide
Resolves: rhbz#2424302
2026-01-13 16:19:08 +01:00
Lukáš Zaoral
eb04a0fe33
rebase to latest upstream release
Resolves: rhbz#2413803
2025-11-26 14:54:16 +01:00
Lukáš Zaoral
0615d97b81
require gnulib-l10n for translations of gnulib messages
Resolves: rhbz#2393892
2025-09-29 12:14:21 +02:00
Lukáš Zaoral
0095d94d91
tail: fix tailing larger number of lines in regular files
Resolves: rhbz#2398008
2025-09-25 10:23:54 +02:00
Lukáš Zaoral
20976b8be8
rebase to latest upstream release
- remove downstream patch for selinux options deprecated since 2009

Resolves: rhbz#2397467
2025-09-24 10:00:43 +02:00
Fedora Release Engineering
c493f607ab Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild 2025-07-23 18:40:40 +00:00
Lukáš Zaoral
c3c18147bd
stty: add support for arbitrary baud rates
Resolves: rhbz#2375439
2025-06-30 12:36:00 +02:00
Lukáš Zaoral
e454479c5c
sort: fix buffer under-read
Resolves: CVE-2025-5278
2025-05-28 09:40:47 +02:00
Lukáš Zaoral
a0b27bcd5f
cp/mv: do not fail when copying of trivial NFSv4 ACLs fails
Resolves: rhbz#2363149
2025-05-19 09:47:42 +02:00
Lukáš Zaoral
386bf34c2e
sources: update for coreutils 9.7
... which I forgot to commit with the rest of the changes...
2025-04-11 09:17:07 +02:00
Lukáš Zaoral
fdfe50c891
rebase to latest upstream release
Resolves: rhbz#2358624
2025-04-10 10:44:55 +02:00
Lukáš Zaoral
f0604fd61a
fix 'who -m' with guessed tty names
Resolves: rhbz#2343998
2025-02-25 17:02:12 +01:00
Lukáš Zaoral
ec87f84093
rebase to latest upstream version
Resolves: rhbz#2338620
2025-01-20 12:26:44 +01:00
Fedora Release Engineering
c71c8701f4 Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild 2025-01-16 14:32:40 +00:00
Zbigniew Jędrzejewski-Szmek
e847b805f8 Rebuilt for the bin-sbin merge (2nd attempt)
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2025-01-12 14:23:54 +01:00
Florian Weimer
ddff633d0f Switch to upstream version of nproc affinity mask fix (rhbz#2325167) 2024-11-13 11:04:32 +01:00
Florian Weimer
a6d9263e25 Affinity mask handling in nproc for large CPU counts 2024-11-11 11:12:44 +01:00
Lukáš Zaoral
8080f5a15a
fix fold -b with UTF8 locale
Fixes the following incorrect behaviour of fold caused by the i18n patch:
```
$ LC_ALL=en_US.UTF-8 fold -b -w6 <<<  $'1234567890\nabcdefghij\n1234567890\n'
123456
7890
a
bcdefg
hij
12
345678
90
```

Fixes: 97967f71c8 ("coreutils-i18n.patch: synchronize the patch with openSUSE")
Resolves: RHE L-60295
2024-09-27 10:31:35 +02:00
Lukáš Zaoral
968cac099d
show web sessions in who output
Resolves: rhbz#2307847
2024-08-27 12:58:15 +02:00
Lukáš Zaoral
e3b928358b
tests: remove unmaintained STI tests 2024-08-26 13:02:12 +02:00
Lukáš Zaoral
d3137f0cd0
add missing systemd-devel buildrequires
Fixes: bf0817f5a5 (new upstream release 9.4)
2024-08-21 17:32:11 +02:00
Fedora Release Engineering
a09814d13c Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild 2024-07-17 20:00:43 +00:00
Lukáš Zaoral
6cd5ce1d7e
Rebuilt for the bin-sbin merge
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-15 14:16:53 +02:00
Sohum Mendon
e02261a471
Fix fold exit status for nonexistent files
Resolves: rhbz#2296201
2024-07-15 10:39:40 +02:00
Zbigniew Jędrzejewski-Szmek
7c8ffed470 Rebuilt for the bin-sbin merge
https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-09 14:13:28 +02:00
Zbigniew Jędrzejewski-Szmek
ba7b19b5bf Fix build when %_bindir==%_sbindir
- Rebuild for https://fedoraproject.org/wiki/Changes/Unify_bin_and_sbin
2024-07-09 12:52:32 +02:00
Lukáš Zaoral
1421739c0c
do not buildrequire perl(Expect) on ELN 2024-07-04 13:18:36 +02:00
Lukáš Zaoral
56dd448b26
enable LTO on ppc64le 2024-06-04 12:56:50 +02:00
Lukáš Zaoral
a91df5db11
rebase to latest upstream version
- sync i18n patch with SUSE (Kudos to Berny Völker!)
- add some test dependencies to execute additional part of the upstream test-suite

Resolves: rhbz#2272063
2024-04-02 15:13:14 +02:00
Lukáš Zaoral
245be9f408
fix tail on kernels with 64k page size
Resolves: RHEL-22866
2024-01-30 10:05:25 +01:00
Fedora Release Engineering
f6a44b3f1f Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-24 08:06:26 +00:00
Fedora Release Engineering
fd8859df68 Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild 2024-01-19 16:11:56 +00:00
Lukáš Zaoral
bf7dfdb2ce
fix compilation on i686 2024-01-18 16:52:09 +01:00
Lukáš Zaoral
b851cbdafc
fix buffer overflow in split
Resolves: CVE-2024-0684
2024-01-18 15:34:40 +01:00
Lukáš Zaoral
bf0817f5a5
new upstream release 9.4
- enable integration with systemd
- fix the license field

Resolves: rhbz#2235759
2023-09-15 15:52:15 +02:00
16 changed files with 957 additions and 2396 deletions

View file

@ -1,4 +1,4 @@
From c7b13f5e1a7ad012c510a8bdd5a8943ab4b55833 Mon Sep 17 00:00:00 2001
From bca11e30e8a6281a8cbddc9fb196dd86ab09c955 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Fri, 17 Jun 2016 16:58:18 +0200
Subject: [PATCH] downstream changes to default DIR_COLORS
@ -9,7 +9,7 @@ Subject: [PATCH] downstream changes to default DIR_COLORS
2 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/DIR_COLORS b/DIR_COLORS
index b465771..ad42b09 100644
index 540f6cd..b4785b6 100644
--- a/DIR_COLORS
+++ b/DIR_COLORS
@@ -1,3 +1,7 @@
@ -30,17 +30,17 @@ index b465771..ad42b09 100644
# ===================================================================
# Terminal filters
# ===================================================================
@@ -69,7 +76,7 @@ DOOR 01;35 # door
@@ -70,7 +77,7 @@ DOOR 01;35 # door
BLK 40;33;01 # block device driver
CHR 40;33;01 # character device driver
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
-MISSING 00 # ... and the files they point to
+MISSING 01;37;41 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 00 # file with capability (very expensive to lookup)
SETUID 37;41 # regular file that is setuid (u+s)
SETGID 30;43 # regular file that is setgid (g+s)
CAPABILITY 00 # regular file with capability (very expensive to lookup)
diff --git a/DIR_COLORS.lightbgcolor b/DIR_COLORS.lightbgcolor
index eab6258..1627b63 100644
index e3b0ec3..39a0a4c 100644
--- a/DIR_COLORS.lightbgcolor
+++ b/DIR_COLORS.lightbgcolor
@@ -1,3 +1,9 @@
@ -63,7 +63,7 @@ index eab6258..1627b63 100644
# ===================================================================
# Terminal filters
# ===================================================================
@@ -59,17 +68,17 @@ TERM xterm*
@@ -60,17 +69,17 @@ TERM xterm*
#NORMAL 00 # no color code at all
#FILE 00 # regular file: use no color at all
RESET 0 # reset to "normal" color
@ -83,18 +83,18 @@ index eab6258..1627b63 100644
ORPHAN 40;31;01 # symlink to nonexistent file, or non-stat'able file ...
-MISSING 00 # ... and the files they point to
+MISSING 01;37;41 # ... and the files they point to
SETUID 37;41 # file that is setuid (u+s)
SETGID 30;43 # file that is setgid (g+s)
CAPABILITY 00 # file with capability (very expensive to lookup)
@@ -78,7 +87,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
SETUID 37;41 # regular file that is setuid (u+s)
SETGID 30;43 # regular file that is setgid (g+s)
CAPABILITY 00 # regular file with capability (very expensive to lookup)
@@ -79,7 +88,7 @@ OTHER_WRITABLE 34;42 # dir that is other-writable (o+w) and not sticky
STICKY 37;44 # dir with the sticky bit set (+t) and not other-writable
# This is for files with execute permission:
# This is for regular files with execute permission:
-EXEC 01;32
+EXEC 00;32
# ===================================================================
# File extension attributes
--
2.34.1
2.49.0

View file

@ -1,276 +0,0 @@
From eca8f2dd212de534778c874a52ca079659e30140 Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Tue, 18 Apr 2023 17:57:42 +0200
Subject: [PATCH] Revert "strtol, strtoll, strtoul, strtoull: Make ISO C 23
compliant."
This reverts commit 4e38f4a0c65d4d19883b404a84169088b84b60d2.
---
gnulib-tests/test-strtoll.c | 62 ------------------------------------
gnulib-tests/test-strtoull.c | 62 ------------------------------------
lib/strtol.c | 14 ++------
m4/strtoll.m4 | 19 +++--------
m4/strtoull.m4 | 19 +++--------
5 files changed, 11 insertions(+), 165 deletions(-)
diff --git a/gnulib-tests/test-strtoll.c b/gnulib-tests/test-strtoll.c
index 24cb4eb..ecedbe6 100644
--- a/gnulib-tests/test-strtoll.c
+++ b/gnulib-tests/test-strtoll.c
@@ -239,67 +239,5 @@ main (void)
ASSERT (errno == 0);
}
- /* Binary integer syntax. */
- {
- const char input[] = "0b111010";
- char *ptr;
- long long result;
- errno = 0;
- result = strtoll (input, &ptr, 10);
- ASSERT (result == 0LL);
- ASSERT (ptr == input + 1);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b111010";
- char *ptr;
- long long result;
- errno = 0;
- result = strtoll (input, &ptr, 2);
- ASSERT (result == 58LL);
- ASSERT (ptr == input + 8);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b111010";
- char *ptr;
- long long result;
- errno = 0;
- result = strtoll (input, &ptr, 0);
- ASSERT (result == 58LL);
- ASSERT (ptr == input + 8);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b";
- char *ptr;
- long long result;
- errno = 0;
- result = strtoll (input, &ptr, 10);
- ASSERT (result == 0LL);
- ASSERT (ptr == input + 1);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b";
- char *ptr;
- long long result;
- errno = 0;
- result = strtoll (input, &ptr, 2);
- ASSERT (result == 0LL);
- ASSERT (ptr == input + 1);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b";
- char *ptr;
- long long result;
- errno = 0;
- result = strtoll (input, &ptr, 0);
- ASSERT (result == 0LL);
- ASSERT (ptr == input + 1);
- ASSERT (errno == 0);
- }
-
return 0;
}
diff --git a/gnulib-tests/test-strtoull.c b/gnulib-tests/test-strtoull.c
index 7b0027f..dd6ec2a 100644
--- a/gnulib-tests/test-strtoull.c
+++ b/gnulib-tests/test-strtoull.c
@@ -238,67 +238,5 @@ main (void)
ASSERT (errno == 0);
}
- /* Binary integer syntax. */
- {
- const char input[] = "0b111010";
- char *ptr;
- unsigned long long result;
- errno = 0;
- result = strtoull (input, &ptr, 10);
- ASSERT (result == 0ULL);
- ASSERT (ptr == input + 1);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b111010";
- char *ptr;
- unsigned long long result;
- errno = 0;
- result = strtoull (input, &ptr, 2);
- ASSERT (result == 58ULL);
- ASSERT (ptr == input + 8);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b111010";
- char *ptr;
- unsigned long long result;
- errno = 0;
- result = strtoull (input, &ptr, 0);
- ASSERT (result == 58ULL);
- ASSERT (ptr == input + 8);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b";
- char *ptr;
- unsigned long long result;
- errno = 0;
- result = strtoull (input, &ptr, 10);
- ASSERT (result == 0ULL);
- ASSERT (ptr == input + 1);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b";
- char *ptr;
- unsigned long long result;
- errno = 0;
- result = strtoull (input, &ptr, 2);
- ASSERT (result == 0ULL);
- ASSERT (ptr == input + 1);
- ASSERT (errno == 0);
- }
- {
- const char input[] = "0b";
- char *ptr;
- unsigned long long result;
- errno = 0;
- result = strtoull (input, &ptr, 0);
- ASSERT (result == 0ULL);
- ASSERT (ptr == input + 1);
- ASSERT (errno == 0);
- }
-
return 0;
}
diff --git a/lib/strtol.c b/lib/strtol.c
index b93483d..d11269b 100644
--- a/lib/strtol.c
+++ b/lib/strtol.c
@@ -288,11 +288,6 @@ INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
s += 2;
base = 16;
}
- else if ((base == 0 || base == 2) && TOUPPER (s[1]) == L_('B'))
- {
- s += 2;
- base = 2;
- }
else if (base == 0)
base = 8;
}
@@ -383,14 +378,11 @@ INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
noconv:
/* We must handle a special case here: the base is 0 or 16 and the
first two characters are '0' and 'x', but the rest are no
- hexadecimal digits. Likewise when the base is 0 or 2 and the
- first two characters are '0' and 'b', but the rest are no binary
- digits. This is no error case. We return 0 and ENDPTR points to
- the 'x' or 'b'. */
+ hexadecimal digits. This is no error case. We return 0 and
+ ENDPTR points to the 'x'. */
if (endptr != NULL)
{
- if (save - nptr >= 2
- && (TOUPPER (save[-1]) == L_('X') || TOUPPER (save[-1]) == L_('B'))
+ if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
&& save[-2] == L_('0'))
*endptr = (STRING_TYPE *) &save[-1];
else
diff --git a/m4/strtoll.m4 b/m4/strtoll.m4
index ec09609..ede630c 100644
--- a/m4/strtoll.m4
+++ b/m4/strtoll.m4
@@ -1,4 +1,4 @@
-# strtoll.m4 serial 10
+# strtoll.m4 serial 9
dnl Copyright (C) 2002, 2004, 2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -24,26 +24,15 @@ AC_DEFUN([gl_FUNC_STRTOLL],
if (term != input + 1)
result |= 1;
}
- /* This test fails on pre-C23 platforms. */
- {
- const char input[] = "0b1";
- (void) strtoll (input, &term, 2);
- if (term != input + 3)
- result |= 2;
- }
return result;
]])
],
[gl_cv_func_strtoll_works=yes],
[gl_cv_func_strtoll_works=no],
[case "$host_os" in
- # Guess no on native Windows.
- mingw*) gl_cv_func_strtoll_works="guessing no" ;;
- # Guess no on glibc systems.
- *-gnu* | gnu*) gl_cv_func_strtoll_works="guessing no" ;;
- # Guess no on musl systems.
- *-musl* | midipix*) gl_cv_func_strtoll_works="guessing no" ;;
- *) gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_strtoll_works="guessing no" ;;
+ *) gl_cv_func_strtoll_works="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/m4/strtoull.m4 b/m4/strtoull.m4
index 4f895c7..a9b0ddf 100644
--- a/m4/strtoull.m4
+++ b/m4/strtoull.m4
@@ -1,4 +1,4 @@
-# strtoull.m4 serial 10
+# strtoull.m4 serial 9
dnl Copyright (C) 2002, 2004, 2006, 2008-2023 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -24,26 +24,15 @@ AC_DEFUN([gl_FUNC_STRTOULL],
if (term != input + 1)
result |= 1;
}
- /* This test fails on pre-C23 platforms. */
- {
- const char input[] = "0b1";
- (void) strtoull (input, &term, 2);
- if (term != input + 3)
- result |= 2;
- }
return result;
]])
],
[gl_cv_func_strtoull_works=yes],
[gl_cv_func_strtoull_works=no],
[case "$host_os" in
- # Guess no on native Windows.
- mingw*) gl_cv_func_strtoull_works="guessing no" ;;
- # Guess no on glibc systems.
- *-gnu* | gnu*) gl_cv_func_strtoull_works="guessing no" ;;
- # Guess no on musl systems.
- *-musl* | midipix*) gl_cv_func_strtoull_works="guessing no" ;;
- *) gl_cv_func_strtoull_works="$gl_cross_guess_normal" ;;
+ # Guess no on native Windows.
+ mingw*) gl_cv_func_strtoull_works="guessing no" ;;
+ *) gl_cv_func_strtoull_works="$gl_cross_guess_normal" ;;
esac
])
])
--
2.39.2

View file

@ -0,0 +1,28 @@
From 95044cb5eaea83d02f768feb5ab79fcf5e6ad782 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P@draigBrady.com>
Date: Mon, 22 Dec 2025 17:12:48 +0000
Subject: [PATCH] tests: avoid false failure due to ulimit on aarch64
* tests/cut/cut-huge-range.sh: Add an extra 1MiB headroom,
which was seen with aarch64.
Reported at https://bugzilla.redhat.com/2424302
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
Upstream-commit: 95044cb5eaea83d02f768feb5ab79fcf5e6ad782
---
tests/cut/cut-huge-range.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/cut/cut-huge-range.sh b/tests/cut/cut-huge-range.sh
index 4bd1b129d8..98d7e8f0b9 100755
--- a/tests/cut/cut-huge-range.sh
+++ b/tests/cut/cut-huge-range.sh
@@ -22,6 +22,7 @@ getlimits_
vm=$(get_min_ulimit_v_ returns_ 0 cut -b1 /dev/null) \
|| skip_ 'shell lacks ulimit, or ASAN enabled'
+vm=$(($vm+1000)) # https://bugzilla.redhat.com/2424302
# Ensure we can cut up to our sentinel value.
# Don't use expr to subtract one,

View file

@ -0,0 +1,169 @@
From 891761bca1aa78336e5b18c121075b6e4696c5d4 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 23 Nov 2025 00:50:40 -0800
Subject: [PATCH] Port to C23 qualifier-generic fns like strchr
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This ports Gnulib to strict C23 platforms that reject code
like char *q = strchr (P, 'x'); when P is a pointer to const,
because in C23 strchr is a qualifier-generic function so
strchr (P, 'x') returns char const *.
This patch does not attempt to do the following two things,
which might be useful in the future:
1. When compiling on non-C23 platforms, check user code for
portability to platforms that define qualifier-generic functions.
2. Port Gnulib to platforms that have qualifier-generic functions
not listed in the C23 standard, e.g., strchrnul. I dont know
of any such platforms.
* lib/mbschr.c (mbschr):
* lib/memchr2.c (memchr2):
Port to C23, where functions like strchr are qualifier-generic.
* lib/c++defs.h (_GL_FUNCDECL_SYS_NAME): New macro.
* lib/c++defs.h (_GL_FUNCDECL_SYS):
* lib/stdlib.in.h (bsearch):
Use it, to prevent C23 names like strchr from acting like macros.
* lib/string.in.h (memchr, strchr, strpbrk, strrchr):
Do not #undef when GNULIB_POSIXCHECK is defined, as this could
cause conforming C23 code to fail to conform. Its not clear why
_GL_WARN_ON_USE_CXX; perhaps it was needed but isnt any more?
But for now, limit the removal of #undef to these four functions
where #undeffing is clearly undesirable in C23.
* lib/wchar.in.h (wmemchr): Parenthesize function name in decl,
to prevent it from acting like a macro.
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
Upstream-commit: df17f4f37ed3ca373d23ad42eae51122bdb96626
---
lib/c++defs.h | 12 +++++++++++-
lib/mbschr.c | 2 +-
lib/memchr2.c | 2 +-
lib/stdlib.in.h | 6 +++---
lib/string.in.h | 4 ----
lib/wchar.in.h | 2 +-
6 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/lib/c++defs.h b/lib/c++defs.h
index b77979a..7384457 100644
--- a/lib/c++defs.h
+++ b/lib/c++defs.h
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthsized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
diff --git a/lib/mbschr.c b/lib/mbschr.c
index c9e14b5..6582134 100644
--- a/lib/mbschr.c
+++ b/lib/mbschr.c
@@ -65,5 +65,5 @@ mbschr (const char *string, int c)
return NULL;
}
else
- return strchr (string, c);
+ return (char *) strchr (string, c);
}
diff --git a/lib/memchr2.c b/lib/memchr2.c
index 7493823..d7724ae 100644
--- a/lib/memchr2.c
+++ b/lib/memchr2.c
@@ -55,7 +55,7 @@ memchr2 (void const *s, int c1_in, int c2_in, size_t n)
c2 = (unsigned char) c2_in;
if (c1 == c2)
- return memchr (s, c1, n);
+ return (void *) memchr (s, c1, n);
/* Handle the first few bytes by reading one byte at a time.
Do this until VOID_PTR is aligned on a longword boundary. */
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index bef0aaa..fd0e1e0 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -224,9 +224,9 @@ _GL_INLINE_HEADER_BEGIN
/* Declarations for ISO C N3322. */
#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
-_GL_EXTERN_C void *bsearch (const void *__key,
- const void *__base, size_t __nmemb, size_t __size,
- int (*__compare) (const void *, const void *))
+_GL_EXTERN_C void *_GL_FUNCDECL_SYS_NAME (bsearch)
+ (const void *__key, const void *__base, size_t __nmemb, size_t __size,
+ int (*__compare) (const void *, const void *))
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3) _GL_ARG_NONNULL ((5));
_GL_EXTERN_C void qsort (void *__base, size_t __nmemb, size_t __size,
int (*__compare) (const void *, const void *))
diff --git a/lib/string.in.h b/lib/string.in.h
index fdcdd21..8b56acf 100644
--- a/lib/string.in.h
+++ b/lib/string.in.h
@@ -409,7 +409,6 @@ _GL_CXXALIASWARN1 (memchr, void const *,
_GL_CXXALIASWARN (memchr);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef memchr
/* Assume memchr is always declared. */
_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
"use gnulib module memchr for portability" );
@@ -674,7 +673,6 @@ _GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
#if defined GNULIB_POSIXCHECK
/* strchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */
-# undef strchr
/* Assume strchr is always declared. */
_GL_WARN_ON_USE_CXX (strchr,
const char *, char *, (const char *, int),
@@ -981,7 +979,6 @@ _GL_CXXALIASWARN (strpbrk);
Even in this simple case, it does not work with multibyte strings if the
locale encoding is GB18030 and one of the characters to be searched is a
digit. */
-# undef strpbrk
_GL_WARN_ON_USE_CXX (strpbrk,
const char *, char *, (const char *, const char *),
"strpbrk cannot work correctly on character strings "
@@ -1011,7 +1008,6 @@ _GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
#if defined GNULIB_POSIXCHECK
/* strrchr() does not work with multibyte strings if the locale encoding is
GB18030 and the character to be searched is a digit. */
-# undef strrchr
/* Assume strrchr is always declared. */
_GL_WARN_ON_USE_CXX (strrchr,
const char *, char *, (const char *, int),
diff --git a/lib/wchar.in.h b/lib/wchar.in.h
index ab602a2..6be4515 100644
--- a/lib/wchar.in.h
+++ b/lib/wchar.in.h
@@ -301,7 +301,7 @@ _GL_EXTERN_C int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (2, 3);
# ifndef __cplusplus
-_GL_EXTERN_C wchar_t *wmemchr (const wchar_t *__s, wchar_t __wc, size_t __n)
+_GL_EXTERN_C wchar_t *(wmemchr) (const wchar_t *__s, wchar_t __wc, size_t __n)
_GL_ATTRIBUTE_NONNULL_IF_NONZERO (1, 3);
# endif
_GL_EXTERN_C wchar_t *wmemset (wchar_t *__s, wchar_t __wc, size_t __n)
--
2.52.0

View file

@ -1,4 +1,4 @@
From 6e36198f10a2f63b89c89ebb5d5c185b20fb3a63 Mon Sep 17 00:00:00 2001
From 91be1a584108a6a3d96f64382bbf206c4213b3db Mon Sep 17 00:00:00 2001
From: Kamil Dudka <kdudka@redhat.com>
Date: Mon, 29 Mar 2010 17:20:34 +0000
Subject: [PATCH] coreutils-df-direct.patch
@ -11,10 +11,10 @@ Subject: [PATCH] coreutils-df-direct.patch
create mode 100755 tests/df/direct.sh
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 5b9a597..6810c15 100644
index b420606..0ccb368 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -12074,6 +12074,13 @@ some systems (notably Solaris), doing this yields more up to date results,
@@ -12597,6 +12597,13 @@ some systems (notably Solaris), doing this yields more up to date results,
but in general this option makes @command{df} much slower, especially when
there are many or very busy file systems.
@ -29,10 +29,10 @@ index 5b9a597..6810c15 100644
@opindex --total
@cindex grand total of file system size, usage and available space
diff --git a/src/df.c b/src/df.c
index 48025b9..c8efa5b 100644
index 75e638c..ef9f0a7 100644
--- a/src/df.c
+++ b/src/df.c
@@ -125,6 +125,9 @@ static bool print_type;
@@ -121,6 +121,9 @@ static bool print_type;
/* If true, print a grand total at the end. */
static bool print_grand_total;
@ -42,7 +42,7 @@ index 48025b9..c8efa5b 100644
/* Grand total data. */
static struct fs_usage grand_fsu;
@@ -252,13 +255,15 @@ enum
@@ -248,13 +251,15 @@ enum
NO_SYNC_OPTION = CHAR_MAX + 1,
SYNC_OPTION,
TOTAL_OPTION,
@ -53,16 +53,16 @@ index 48025b9..c8efa5b 100644
static struct option const long_options[] =
{
{"all", no_argument, NULL, 'a'},
{"block-size", required_argument, NULL, 'B'},
+ {"direct", no_argument, NULL, DIRECT_OPTION},
{"inodes", no_argument, NULL, 'i'},
{"human-readable", no_argument, NULL, 'h'},
{"si", no_argument, NULL, 'H'},
@@ -583,7 +588,10 @@ get_header (void)
for (col = 0; col < ncolumns; col++)
{"all", no_argument, nullptr, 'a'},
{"block-size", required_argument, nullptr, 'B'},
+ {"direct", no_argument, nullptr, DIRECT_OPTION},
{"inodes", no_argument, nullptr, 'i'},
{"human-readable", no_argument, nullptr, 'h'},
{"si", no_argument, nullptr, 'H'},
@@ -571,7 +576,10 @@ get_header (void)
for (idx_t col = 0; col < ncolumns; col++)
{
char *cell = NULL;
char *cell;
- char const *header = _(columns[col]->caption);
+ char const *header = (columns[col]->field == TARGET_FIELD
+ && direct_statfs)?
@ -71,7 +71,7 @@ index 48025b9..c8efa5b 100644
if (columns[col]->field == SIZE_FIELD
&& (header_mode == DEFAULT_MODE
@@ -1486,6 +1494,17 @@ get_point (char const *point, const struct stat *statp)
@@ -1446,6 +1454,17 @@ get_point (char const *point, const struct stat *statp)
static void
get_entry (char const *name, struct stat const *statp)
{
@ -79,17 +79,17 @@ index 48025b9..c8efa5b 100644
+ {
+ char *resolved = canonicalize_file_name (name);
+ if (resolved)
+ {
+ get_dev (NULL, resolved, name, NULL, NULL, false, false, NULL, false);
+ free (resolved);
+ return;
+ }
+ {
+ get_dev (NULL, resolved, name, NULL, NULL, false, false, NULL, false);
+ free (resolved);
+ return;
+ }
+ }
+
if ((S_ISBLK (statp->st_mode) || S_ISCHR (statp->st_mode))
&& get_device (name))
return;
@@ -1556,6 +1575,7 @@ or all file systems by default.\n\
@@ -1516,6 +1535,7 @@ or all file systems by default.\n\
-B, --block-size=SIZE scale sizes by SIZE before printing them; e.g.,\n\
'-BM' prints sizes in units of 1,048,576 bytes;\n\
see SIZE format below\n\
@ -97,7 +97,7 @@ index 48025b9..c8efa5b 100644
-h, --human-readable print sizes in powers of 1024 (e.g., 1023M)\n\
-H, --si print sizes in powers of 1000 (e.g., 1.1G)\n\
"), stdout);
@@ -1646,6 +1666,9 @@ main (int argc, char **argv)
@@ -1610,6 +1630,9 @@ main (int argc, char **argv)
xstrtol_fatal (e, oi, c, long_options, optarg);
}
break;
@ -107,14 +107,14 @@ index 48025b9..c8efa5b 100644
case 'i':
if (header_mode == OUTPUT_MODE)
{
@@ -1742,6 +1765,13 @@ main (int argc, char **argv)
@@ -1706,6 +1729,13 @@ main (int argc, char **argv)
}
}
+ if (direct_statfs && show_local_fs)
+ {
+ error (0, 0, _("options --direct and --local (-l) are mutually "
+ "exclusive"));
+ "exclusive"));
+ usage (EXIT_FAILURE);
+ }
+
@ -183,5 +183,5 @@ index 0000000..8e4cfb8
+
+Exit $fail
--
2.31.1
2.52.0

File diff suppressed because it is too large Load diff

65
coreutils-python3.patch Normal file
View file

@ -0,0 +1,65 @@
From 8927d505ecb5334f09c48ef98ef1f464f581d0f7 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 2 Apr 2024 14:11:26 +0100
Subject: [PATCH] coreutils-python3.patch
---
init.cfg | 4 ++--
tests/d_type-check | 2 +-
tests/du/move-dir-while-traversing.sh | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/init.cfg b/init.cfg
index ac05f7b..26d9516 100644
--- a/init.cfg
+++ b/init.cfg
@@ -601,10 +601,10 @@ seek_data_capable_()
# Skip the current test if "." lacks d_type support.
require_dirent_d_type_()
{
- python < /dev/null \
+ python3 < /dev/null \
|| skip_ python missing: assuming no d_type support
- python "$abs_srcdir"/tests/d_type-check \
+ python3 "$abs_srcdir"/tests/d_type-check \
|| skip_ requires d_type support
}
diff --git a/tests/d_type-check b/tests/d_type-check
index 1a2f76f..42d3924 100644
--- a/tests/d_type-check
+++ b/tests/d_type-check
@@ -1,4 +1,4 @@
-#!/usr/bin/python
+#!/usr/bin/python3
# Exit 0 if "." and "./tempfile" have useful d_type information, else 1.
# Intended to exit 0 only on Linux/GNU systems.
import os
diff --git a/tests/du/move-dir-while-traversing.sh b/tests/du/move-dir-while-traversing.sh
index adf482b..cf9214a 100755
--- a/tests/du/move-dir-while-traversing.sh
+++ b/tests/du/move-dir-while-traversing.sh
@@ -21,8 +21,8 @@ print_ver_ du
require_trap_signame_
# We use a python-inotify script, so...
-python -m pyinotify -h > /dev/null \
- || skip_ 'python inotify package not installed'
+python3 -m pyinotify -h > /dev/null \
+ || skip_ 'python3 inotify package not installed'
# Move a directory "up" while du is processing its sub-directories.
# While du is processing a hierarchy .../B/C/D/... this script
@@ -33,7 +33,7 @@ python -m pyinotify -h > /dev/null \
# rename syscall before du finishes processing the subtree under D/.
cat <<'EOF' > inotify-watch-for-dir-access.py
-#!/usr/bin/env python
+#!/usr/bin/env python3
import pyinotify as pn
import os,sys
--
2.51.0

View file

@ -1,87 +0,0 @@
From d70ddb3eb845c494280e7365e2b889242e7e1bb9 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Mon, 4 Oct 2021 08:45:53 +0200
Subject: [PATCH] coreutils-selinux.patch
---
src/cp.c | 19 ++++++++++++++++++-
src/install.c | 12 +++++++++++-
2 files changed, 29 insertions(+), 2 deletions(-)
diff --git a/src/cp.c b/src/cp.c
index c97a675..89fb8ec 100644
--- a/src/cp.c
+++ b/src/cp.c
@@ -952,7 +952,7 @@ main (int argc, char **argv)
selinux_enabled = (0 < is_selinux_enabled ());
cp_option_init (&x);
- while ((c = getopt_long (argc, argv, "abdfHilLnprst:uvxPRS:TZ",
+ while ((c = getopt_long (argc, argv, "abcdfHilLnprst:uvxPRS:TZ",
long_opts, NULL))
!= -1)
{
@@ -1000,6 +1000,23 @@ main (int argc, char **argv)
copy_contents = true;
break;
+ case 'c':
+ fprintf (stderr, "%s: warning: option '-c' is deprecated,"
+ " please use '--preserve=context' instead\n", argv[0]);
+ if (x.set_security_context)
+ {
+ fprintf (stderr,
+ "%s: cannot force target context and preserve it\n",
+ argv[0]);
+ exit (1);
+ }
+ else if (selinux_enabled)
+ {
+ x.preserve_security_context = true;
+ x.require_preserve_context = true;
+ }
+ break;
+
case 'd':
x.preserve_links = true;
x.dereference = DEREF_NEVER;
diff --git a/src/install.c b/src/install.c
index c9456fe..2b1bee9 100644
--- a/src/install.c
+++ b/src/install.c
@@ -794,7 +794,7 @@ main (int argc, char **argv)
dir_arg = false;
umask (0);
- while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pt:TvS:Z", long_options,
+ while ((optc = getopt_long (argc, argv, "bcCsDdg:m:o:pPt:TvS:Z", long_options,
NULL)) != -1)
{
switch (optc)
@@ -855,6 +855,9 @@ main (int argc, char **argv)
no_target_directory = true;
break;
+ case 'P':
+ fprintf (stderr, "%s: warning: option '-P' is deprecated,"
+ " please use '--preserve-context' instead\n", argv[0]);
case PRESERVE_CONTEXT_OPTION:
if (! selinux_enabled)
{
@@ -862,6 +865,13 @@ main (int argc, char **argv)
"this kernel is not SELinux-enabled"));
break;
}
+ if (x.set_security_context)
+ {
+ fprintf (stderr,
+ "%s: cannot force target context and preserve it\n",
+ argv[0]);
+ exit (1);
+ }
x.preserve_security_context = true;
use_default_selinux_context = false;
break;
--
2.31.1

View file

@ -1,8 +1,9 @@
Summary: A set of basic GNU tools commonly used in shell scripts
Name: coreutils
Version: 9.3
Version: 9.9
Release: 2%{?dist}
License: GPL-3.0-or-later
# some used parts of gnulib are under various variants of LGPL
License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later
Url: https://www.gnu.org/software/coreutils/
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
@ -13,9 +14,6 @@ Source50: supported_utils
Source105: coreutils-colorls.sh
Source106: coreutils-colorls.csh
# revert a gnulib patch that broke the build
Patch1: coreutils-9.3-gnulib-strtol.patch
# do not make coreutils-single depend on /usr/bin/coreutils
%global __requires_exclude ^%{_bindir}/coreutils$
@ -28,15 +26,23 @@ Patch101: coreutils-8.26-selinuxenable.patch
# downstream changes to default DIR_COLORS
Patch102: coreutils-8.32-DIR_COLORS.patch
# use python3 in tests
Patch103: coreutils-python3.patch
# df --direct
Patch104: coreutils-df-direct.patch
# gnulib C23 support
# https://github.com/coreutils/gnulib/commit/df17f4f37ed3ca373d23ad42eae51122bdb96626
Patch105: coreutils-9.9-gnulib-c23.patch
# fix cut test failure on aarch64 rawhide (rhbz#2424302)
# https://github.com/coreutils/coreutils/commit/95044cb5eaea83d02f768feb5ab79fcf5e6ad782
Patch106: coreutils-9.9-fix-cut-test-aarch64.patch
# (sb) lin18nux/lsb compliance - multibyte functionality patch
Patch800: coreutils-i18n.patch
# downstream SELinux options deprecated since 2009
Patch950: coreutils-selinux.patch
Conflicts: filesystem < 3
# To avoid clobbering installs
@ -57,19 +63,34 @@ BuildRequires: libselinux-utils
BuildRequires: make
BuildRequires: openssl-devel
BuildRequires: strace
BuildRequires: systemd-devel
BuildRequires: texinfo
# For gpg verification of source tarball
BuildRequires: gnupg2
# test-only dependencies
BuildRequires: acl
BuildRequires: gdb
BuildRequires: perl-interpreter
BuildRequires: perl(FileHandle)
BuildRequires: python3
BuildRequires: tzdata
%ifarch %valgrind_arches
BuildRequires: valgrind
%endif
%if 0%{?fedora}
BuildRequires: perl(Expect)
BuildRequires: python3-inotify
%endif
%if 23 < 0%{?fedora} || 7 < 0%{?rhel}
# needed by i18n test-cases
BuildRequires: glibc-langpack-en
BuildRequires: glibc-langpack-fr
BuildRequires: glibc-langpack-ko
BuildRequires: glibc-langpack-sv
%endif
Requires: %{name}-common = %{version}-%{release}
@ -104,6 +125,9 @@ packaged as a single multicall binary.
# https://bugzilla.redhat.com/show_bug.cgi?id=1107973#c7
Obsoletes: %{name} < 8.24-100
# Gnulib translations are maintained seprately since coreutils 9.6 (#2393892)
Requires: gnulib-l10n
# info doc refers to "Specifying the Time Zone" from glibc-doc (#959597)
Suggests: glibc-doc
@ -138,16 +162,15 @@ sed src/dircolors.hin \
find tests -name '*.sh' -perm 0644 -print -exec chmod 0755 '{}' '+'
(echo "<<< done") 2>/dev/null
# FIXME: Force a newer gettext version to workaround `autoreconf -i` errors
# with coreutils 9.6 and bundled gettext 0.19.2 from gettext-common-devel.
sed -i "s/0.19.2/$(rpm -q --queryformat '%%{VERSION}\n' gettext-devel)/" bootstrap.conf configure.ac
autoreconf -fiv
%build
export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fpic"
# disable -flto on ppc64le to make test-float pass (#1789115)
%ifarch ppc64le
CFLAGS="$CFLAGS -fno-lto"
%endif
# Upstream suggests to build with -Dlint for static analyzers:
# https://lists.gnu.org/archive/html/coreutils/2018-06/msg00110.html
# ... and even for production binary RPMs:
@ -176,6 +199,7 @@ for type in separate single; do
--cache-file=../config.cache \
--enable-install-program=arch \
--enable-no-install-program=kill,uptime \
--enable-systemd \
--with-tty-group \
DEFAULT_POSIX2_VERSION=200112 alternative=199209 || :
%make_build all V=1
@ -202,14 +226,20 @@ for type in separate single; do
fi
(cd $type && make DESTDIR=$RPM_BUILD_ROOT/$subdir $install)
%if "%{_sbindir}" != "%{_bindir}"
# chroot was in /usr/sbin :
mkdir -p $RPM_BUILD_ROOT/$subdir/{%{_bindir},%{_sbindir}}
mkdir -p $RPM_BUILD_ROOT/$subdir/%_sbindir
mv $RPM_BUILD_ROOT/$subdir/{%_bindir,%_sbindir}/chroot
%endif
# Move multicall variants to *.single.
# RemovePathPostfixes will strip that later.
if test $type = 'single'; then
for dir in %{_bindir} %{_sbindir} %{_libexecdir}/%{name}; do
for dir in %{_bindir} \
%if "%{_sbindir}" != "%{_bindir}"
%{_sbindir} \
%endif
%{_libexecdir}/%{name}; do
for bin in $RPM_BUILD_ROOT/%{_libexecdir}/%{name}/$dir/*; do
basebin=$(basename $bin)
mv $bin $RPM_BUILD_ROOT/$dir/$basebin.single
@ -237,7 +267,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%files single
%{_bindir}/*.single
%if "%{_sbindir}" != "%{_bindir}"
%{_sbindir}/chroot.single
%endif
%dir %{_libexecdir}/coreutils
%{_libexecdir}/coreutils/*.so.single
# duplicate the license because coreutils-common does not need to be installed
@ -254,6 +286,105 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
%license COPYING
%changelog
* Tue Jan 13 2026 Lukáš Zaoral <lzaoral@redhat.com> - 9.9-2
- fix cut test failure on aarch64 rawhide (rhbz#2424302)
* Wed Nov 26 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.9-1
- rebase to latest upstream release (rhbz#2413803)
* Mon Sep 29 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.8-3
- require gnulib-l10n for translations of gnulib messages (rhbz#2393892)
* Thu Sep 25 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.8-2
- tail: fix tailing larger number of lines in regular files (rhbz#2398008)
* Wed Sep 24 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.8-1
- rebase to latest upstream release (rhbz#2397467)
- remove downstream patch for selinux options deprecated since 2009
* Wed Jul 23 2025 Fedora Release Engineering <releng@fedoraproject.org> - 9.7-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Jun 30 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.7-4
- stty: add support for arbitrary baud rates (rhbz#2375439)
* Wed May 28 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.7-3
- sort: fix buffer under-read (CVE-2025-5278)
* Mon May 19 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.7-2
- cp/mv: do not fail when copying of trivial NFSv4 ACLs fails (rhbz#2363149)
* Wed Apr 09 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.7-1
- rebase to latest upstream release (rhbz#2358624)
* Tue Feb 25 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.6-2
- fix 'who -m' with guessed tty names (rhbz#2343998)
* Mon Jan 20 2025 Lukáš Zaoral <lzaoral@redhat.com> - 9.6-1
- rebase to latest upstream version (rhbz#2338620)
- sync i18n patch with SUSE (Kudos to Berny Völker!)
* Thu Jan 16 2025 Fedora Release Engineering <releng@fedoraproject.org> - 9.5-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Sun Jan 12 2025 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 9.5-12
- Rebuilt for the bin-sbin merge (2nd attempt)
* Wed Nov 13 2024 Florian Weimer <fweimer@redhat.com> - 9.5-11
- Affinity mask handling in nproc for large CPU counts (rhbz#2325167)
* Fri Sep 27 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.5-10
- fix fold -b with UTF8 locale (RHEL-60295)
* Tue Aug 27 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.5-9
- show web sessions in who output (rhbz#2307847)
* Wed Aug 21 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.5-8
- add missing systemd-devel buildrequires
* Wed Jul 17 2024 Fedora Release Engineering <releng@fedoraproject.org> - 9.5-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Jul 15 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.5-6
- Rebuilt for the bin-sbin merge
* Mon Jul 15 2024 Sohum Mendon <sohum.mendon@proton.me> - 9.5-5
- fix incorrect exit status when fold is called with a non-existent file
* Tue Jul 09 2024 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 9.5-4
- Rebuilt for the bin-sbin merge
* Thu Jul 04 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.5-3
- do not buildrequire perl(Expect) on ELN
* Tue Jun 04 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.5-2
- enable LTO on ppc64le
* Tue Apr 02 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.5-1
- rebase to latest upstream version (rhbz#2272063)
- sync i18n patch with SUSE (Kudos to Berny Völker!)
- add some test dependencies to execute additional part of the upstream test-suite
* Mon Jan 29 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.4-6
- fix tail on kernels with 64k page sizes (RHEL-22866)
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 9.4-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Fri Jan 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 9.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Jan 18 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.4-3
- fix compilation on i686
* Thu Jan 18 2024 Lukáš Zaoral <lzaoral@redhat.com> - 9.4-2
- fix buffer overflow in split (CVE-2024-0684)
* Fri Sep 15 2023 Lukáš Zaoral <lzaoral@redhat.com> - 9.4-1
- new upstream release 9.4 (#2235759)
- enable integration with systemd
- fix the license field
* Wed Jul 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 9.3-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild

View file

@ -1,2 +1,2 @@
SHA512 (coreutils-9.3.tar.xz) = 242271f212a6860bdc6c8d7e5c4f85ce66c1b48ef781aca9daa56e0fe7c2b7809ef72b4392120219fe5b687637c83ce89ceef8bb35f6274f43f8f968a6901694
SHA512 (coreutils-9.3.tar.xz.sig) = 522a2072f8ef940228ccdd856a4041c3c16b98e309168ccf2066fe7c1013685ba6cdea8a7317dfa1f4507b37ca016ecedaf54438d4a5007927b0e1a8fd223eb5
SHA512 (coreutils-9.9.tar.xz.sig) = 0a3dfdfa6b4234e2e1d42142269f959bdf3cf8f6605a50270a27eff84dd22588f182121f7dd3eeb04be45f5109d02690215065b3d3b43882874d0e165a1435d0
SHA512 (coreutils-9.9.tar.xz) = e7b0e59f7732d2c098ea4934014f470248bd5c4764210e9200a698010a8e3b95bbb26e543f0cd73ed5a4b8e1f8cda932c73f39954d68175e4deaa47526610c65

View file

@ -1,63 +0,0 @@
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Makefile of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlink s
# Description: Test for readlink cannot handle recursive symlinks
# Author: Jan Scotka <jscotka@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
export TEST=/CoreOS/coreutils/readlink-cannot-handle-recursive-symlinks
export TESTVERSION=1.0
BUILT_FILES=
FILES=$(METADATA) runtest.sh Makefile PURPOSE
.PHONY: all install download clean
run: $(FILES) build
./runtest.sh
build: $(BUILT_FILES)
chmod a+x runtest.sh
clean:
rm -f *~ $(BUILT_FILES)
include /usr/share/rhts/lib/rhts-make.include
$(METADATA): Makefile
@echo "Owner: Jan Scotka <jscotka@redhat.com>" > $(METADATA)
@echo "Name: $(TEST)" >> $(METADATA)
@echo "TestVersion: $(TESTVERSION)" >> $(METADATA)
@echo "Path: $(TEST_DIR)" >> $(METADATA)
@echo "Description: Test for readlink cannot handle recursive symlinks" >> $(METADATA)
@echo "Type: Sanity" >> $(METADATA)
@echo "TestTime: 5m" >> $(METADATA)
@echo "RunFor: coreutils" >> $(METADATA)
@echo "Requires: coreutils" >> $(METADATA)
@echo "Priority: Normal" >> $(METADATA)
@echo "License: GPLv2" >> $(METADATA)
@echo "Confidential: no" >> $(METADATA)
@echo "Destructive: no" >> $(METADATA)
rhts-lint $(METADATA)

View file

@ -1,54 +0,0 @@
PURPOSE of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlinks
Description: Test for readlink cannot handle recursive symlinks
Author: Jan Scotka <jscotka@redhat.com>
Bug summary: readlink cannot handle recursive symlinks
Description:
Description of problem:
The readlink command fails with an error "Too many levels of symbolic links", even if there are only 2 levels.
The readlink command from RHEL 3 and RHEL 4 and from Fedora 11 all work fine.
Among other changes between RHEL 4 and RHEL 5, RHEL 5's coreutils added calls to cycle_check() in lib/canonicalize.c, but in upstream canonicalize.c (now in gnulib instead of coreutils), we see the comment:
/* Detect loops. We cannot use the cycle-check module here,
since it's actually possible to encounter the same symlink
more than once in a given traversal. However, encountering
the same symlink,NAME pair twice does indicate a loop. */
http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/canonicalize.c;h=4f348398fd69ae516396313d18ac294a4ca3dde3;hb=b653eda3ac4864de205419d9f41eec267cb89eeb#l262
The latest canonicalize.c uses seen_triple() instead of cycle_check().
Version-Release number of selected component (if applicable):
coreutils-5.97-19.el5
How reproducible:
every time
Steps to Reproduce:
1. Create a directory with a symlink to itself
mkdir /tmp/dir
cd /tmp/dir
ln -s ../dir dirlink
2. Run readlink using the 'dirlink' symlink recursively
readlink -v -f dirlink
readlink -v -f dirlink/dirlink
readlink -v -f dirlink/dirlink/dirlink
Actual results:
The first readlink command on just dirlink succeeds, but the 2nd and 3rd commands fail with
readlink: dirlink/dirlink: Too many levels of symbolic links
Expected results:
$ readlink -v -f dirlink
/tmp/dir
$ readlink -v -f dirlink/dirlink
/tmp/dir
$ readlink -v -f dirlink/dirlink/dirlink
/tmp/dir
Additional info:

View file

@ -1,60 +0,0 @@
#!/bin/bash
# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# runtest.sh of /CoreOS/coreutils/readlink-cannot-handle-recursive-symlinks
# Description: Test for readlink cannot handle recursive symlinks
# Author: Jan Scotka <jscotka@redhat.com>
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Copyright (c) 2010 Red Hat, Inc. All rights reserved.
#
# This copyrighted material is made available to anyone wishing
# to use, modify, copy, or redistribute it subject to the terms
# and conditions of the GNU General Public License version 2.
#
# This program is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied
# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
# PURPOSE. See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public
# License along with this program; if not, write to the Free
# Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301, USA.
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Include rhts environment
. /usr/bin/rhts-environment.sh
. /usr/lib/beakerlib/beakerlib.sh
PACKAGE="coreutils"
rlJournalStart
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory"
rlRun "pushd $TmpDir"
rlRun "mkdir link" 0 "Creating test directory"
rlRun "cd link" 0 "cd to this dir"
rlRun "ln -s ../link link" 0 "creating symlink to ../link -> link"
rlPhaseEnd
rlPhaseStartTest
rlLog "Test of readlink up to 20 iteration"
export TMPVAR="link"
for foo in `seq 20`
do echo $TMPVAR
rlRun "readlink -v -f $TMPVAR" 0 "readlink of $TMPVAR"
TMPVAR="$TMPVAR/link"
done
rlPhaseEnd
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalPrintText
rlJournalEnd

View file

@ -1,39 +0,0 @@
#!/bin/sh
# Checks that touch ls rm and foo work
# https://www.mankier.com/1/beakerlib#Examples
. /usr/share/beakerlib/beakerlib.sh
# Set the full test name
TEST="/examples/beakerlib/Sanity/phases"
# Package being tested
PACKAGE="coreutils"
rlJournalStart
# Setup phase: Prepare test directory
rlPhaseStartSetup
rlAssertRpm $PACKAGE
rlRun 'TmpDir=$(mktemp -d)' 0 'Creating tmp directory' # no-reboot
rlRun "pushd $TmpDir"
rlPhaseEnd
# Test phase: Testing touch, ls and rm commands
rlPhaseStartTest
rlRun "touch foo" 0 "Creating the foo test file"
rlAssertExists "foo"
rlRun "ls -l foo" 0 "Listing the foo test file"
rlRun "rm foo" 0 "Removing the foo test file"
rlAssertNotExists "foo"
rlRun "ls -l foo" 2 "Listing foo should now report an error"
rlPhaseEnd
# Cleanup phase: Remove test directory
rlPhaseStartCleanup
rlRun "popd"
rlRun "rm -r $TmpDir" 0 "Removing tmp directory"
rlPhaseEnd
rlJournalEnd
# Print the test report
rlJournalPrintText

View file

@ -1,9 +0,0 @@
---
# This first play always runs on the local staging system
- hosts: localhost
tags:
- atomic
- classic
- container
roles:
- { role: standard-test-beakerlib, tests: [ test-basics, readlink-cannot-handle-recursive-symlinks ] }

View file

@ -1,2 +0,0 @@
# Fedora Continuous Integration: https://fedoraproject.org/wiki/CI
- include: test_basics.yml