<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/src, branch v9.2</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v9.2</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2023-03-19T22:25:50Z</updated>
<entry>
<title>stty: ensure arbitrary data is not displayed</title>
<updated>2023-03-19T22:25:50Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-19T22:22:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=eb745e3b95a79bdad98aaa9c4e753145f995c313'/>
<id>urn:sha1:eb745e3b95a79bdad98aaa9c4e753145f995c313</id>
<content type='text'>
* src/stty.c (main): Use static structures to ensure
they're initialized (to zero), so that random data is
not displayed, or compared resulting in a inaccurate
failure reported to users.  This was seen on musl libc
where some parts of the termios c_cc array were
not initialized by tcgetattr().
Reported by Bruno Haible.
</content>
</entry>
<entry>
<title>doc: uniq: revert previous man page adjustment</title>
<updated>2023-03-18T14:58:20Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-18T14:58:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=11f4d591383f4c89d8bf5970db703cbd0e4a174d'/>
<id>urn:sha1:11f4d591383f4c89d8bf5970db703cbd0e4a174d</id>
<content type='text'>
* src/uniq.c (usage): -D doesn't take an argument
so should be separated in the description.
</content>
</entry>
<entry>
<title>doc: uniq: use more standard description of -D long option</title>
<updated>2023-03-18T11:44:24Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-18T11:35:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=8a759fdc8855a428b472ed4f921b5e327c915494'/>
<id>urn:sha1:8a759fdc8855a428b472ed4f921b5e327c915494</id>
<content type='text'>
* src/uniq.c: Describe -D and --all-repeated together,
as with all other long options.
Fixes https://bugs.gnu.org/62249
</content>
</entry>
<entry>
<title>maint: avoid discarded-qualifiers warnings with SELinux 3.5</title>
<updated>2023-03-16T23:12:18Z</updated>
<author>
<name>Bernhard Voelker</name>
<email>mail@bernhard-voelker.de</email>
</author>
<published>2023-03-16T22:11:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f346fc01445b7192bb129ee12bd505d3ae07d777'/>
<id>urn:sha1:f346fc01445b7192bb129ee12bd505d3ae07d777</id>
<content type='text'>
Since SELinux version 3.5, the return value of context_str(3) is
declared as const; see:
  https://github.com/SELinuxProject/selinux/commit/dd98fa322766
Therefore, GCC complains (here with -Werror):
  src/selinux.c: In function 'defaultcon':
  src/selinux.c:152:16: error: assignment discards 'const' qualifier \
    from pointer target type [-Werror=discarded-qualifiers]
    152 |   if (!(constr = context_str (tcontext)))
        |                ^
  src/selinux.c: In function 'restorecon_private':
  src/selinux.c:252:16: error: assignment discards 'const' qualifier \
    from pointer target type [-Werror=discarded-qualifiers]
    252 |   if (!(constr = context_str (tcontext)))
      |                ^

* src/selinux.c (defaultcon): Define CONSTR as const.
(restorecon_private): Likewise.
</content>
</entry>
<entry>
<title>cksum: fix --raw on 64 bit big endian systems</title>
<updated>2023-03-15T14:05:38Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-15T13:57:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a8e6e627f1a1142ec9cb273cfadc3f9aa2aa412a'/>
<id>urn:sha1:a8e6e627f1a1142ec9cb273cfadc3f9aa2aa412a</id>
<content type='text'>
* src/sum.c (output_bsd): On sparc64 for example,
a crc of 0 was output due to casting an int variable
to uint16_t and thus operating on the wrong end of the variable.
Instead use explicit assignment to the narrower type
to ensure we get the appropriate data.
(output_sysv): Likewise.
Reported by Bruno Haible.
</content>
</entry>
<entry>
<title>build: avoid -Wsometimes-uninitialized on macOS 12</title>
<updated>2023-03-15T13:15:11Z</updated>
<author>
<name>Bruno Haible</name>
<email>bruno@clisp.org</email>
</author>
<published>2023-03-15T13:15:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f1ff021247304698ae71892060330bcb91683d70'/>
<id>urn:sha1:f1ff021247304698ae71892060330bcb91683d70</id>
<content type='text'>
* src/pr.c (integer_overflow): Mark as _Noreturn.
* src/test.c (beyond): Likewise.
</content>
</entry>
<entry>
<title>tee: avoid undefined behavior after fclose()</title>
<updated>2023-03-13T21:26:21Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-13T21:26:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=73d372dcc166afc387b4d130ecc00e5dce1fc89a'/>
<id>urn:sha1:73d372dcc166afc387b4d130ecc00e5dce1fc89a</id>
<content type='text'>
* iopoll.c (fclose_wait): Rename from confusing fclose_nonblock name.
Also adjust to do no operations on the stream after fclose()
as this is undefined. Instead use fflush() to determine EAGAIN status.
(fwrite_wait): Renamed from confusing fwrite_nonblock name.
</content>
</entry>
<entry>
<title>doc: dircolors: better separate the sections in the database</title>
<updated>2023-03-13T16:20:38Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2022-09-05T13:31:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=f26af5983313f1f4cf04143cecee68551ed6502f'/>
<id>urn:sha1:f26af5983313f1f4cf04143cecee68551ed6502f</id>
<content type='text'>
* src/dircolors.hin: Make the separate sections of the self
documenting dircolors database more apparent,
by adding heading comments, and appropriate separation.
</content>
</entry>
<entry>
<title>ls: --color: honor separate sequences for extension cases</title>
<updated>2023-03-13T16:20:38Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2022-09-04T18:59:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=47988fad885e8129f9dc36f0ed4d63375de23603'/>
<id>urn:sha1:47988fad885e8129f9dc36f0ed4d63375de23603</id>
<content type='text'>
Following on from commit v8.29-45-g24053fbd8 which unconditionally
used case insensitive extension matching, support selective
case sensitive matching when there are separate extension cases
defined with different display sequences.

* src/dircolors.hin: Document how file name suffixes are matched.
Note this is displayed with `dircolors --print-database` which
the texi info recommends to use for details.
* src/ls.c (parse_ls_color): Postprocess the list to
mark entries for case sensitive matching,
and also adjust so that unmatchable entries are more quickly ignored.
(get_color_indicator): Use exact matching rather than
case insensitive matching if so marked.
* tests/ls/color-ext.sh: Add test cases.
* NEWS: Mention the change in behavior.
Addresses https://bugs.gnu.org/33123
</content>
</entry>
<entry>
<title>tee: support non blocking outputs</title>
<updated>2023-03-08T18:32:05Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2023-03-05T15:51:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=16000805eb1bcdf25360471b8bbc8ec3f025e035'/>
<id>urn:sha1:16000805eb1bcdf25360471b8bbc8ec3f025e035</id>
<content type='text'>
Non blocking outputs can be seen for example
when piping telnet through tee to a terminal.
In that case telnet sets its input to nonblocking mode,
which results in tee's output being nonblocking,
in which case in may receive an EAGAIN error upon write().
The same issue was seen with mpirun.
The following can be used to reproduce this
locally at a terminal (in most invocations):

  $ { dd iflag=nonblock count=0 status=none;
      dd bs=10K count=10 if=/dev/zero status=none; } |
    tee || echo fail &gt;/dev/tty

* src/iopoll.c (iopoll_internal): A new function refactored from
iopoll(), to also support a mode where we check the output
descriptor is writeable.
(iopoll): Now refactored to just call iopoll_internal().
(fwait_for_nonblocking_write): A new internal function which
uses iopoll_internal() to wait for writeable output
if an EAGAIN or EWOULDBLOCK was received.
(fwrite_nonblock): An fwrite() wrapper which uses
fwait_for_nonblocking_write() to handle EAGAIN.
(fclose_nonblock): Likewise.
src/iopoll.h: Add fclose_nonblock, fwrite_nonblock.
src/tee.c: Call fclose_nonblock() and fwrite_nonblock wrappers,
instead of the standard functions.
* tests/misc/tee.sh: Add a test case.
* NEWS: Mention the improvement.

The idea was suggested by Kamil Dudka in
https://bugzilla.redhat.com/1615467
</content>
</entry>
</feed>
