bug#62385: POSIX behavior of readlink, realpath

2025-08-03 Thread Dmitry V. Levin
Hi, On Sat, Aug 02, 2025 at 09:33:15PM -0700, Collin Funk wrote: > Hi Eric, > > You said: > > > Among other things, I can see the following changes that coreutils > > will need to make to become compliant, or else we need to push back on > > the POSIX folks if we have strong reasons to complain

bug#28929: Bug report for tail

2017-10-26 Thread Dmitry V. Levin
merge 28929 28970 29022 tag 28929 notabug thanks On Sat, Oct 21, 2017 at 02:47:03PM -0400, Mohammad Edghaim wrote: [...] > "unrecognized file system type 0x794c7630 for 'xyz.log'. please report this > to bug-coreutils@gnu.org. reverting to polling" [...] On Tue, Oct 24, 2017 at 09:33:56AM -0700, B

bug#28082: bash: /bin/rm: Argument list too long

2017-08-15 Thread Dmitry V. Levin
On Tue, Aug 15, 2017 at 08:19:13AM +0100, Jonny Grant wrote: > On 15/08/17 00:50, Paul Eggert wrote: > > Jonny Grant wrote: > >> do you know which kernel API has this limitation? > > > > All kernels have a limitation there to some extent, except perhaps the > > Hurd. Sorry, I don't know what the

bug#7759: split(1) regression in v8.7-25-gbe10739

2010-12-29 Thread Dmitry V. Levin
Hi, I've got a bug report from Sergey Vlasov about split(1) regression in coreutils v8.8: https://bugzilla.altlinux.org/24841 In short, the default suffix length is not 2 as it shall be according to POSIX. Looks like the regression is due to commit v8.7-25-gbe10739. For more details and the test

bug#5995: [PATCH] Fix exit status of signal handlers in shell scripts

2010-04-22 Thread Dmitry V. Levin
pping all to one, > which would inevitably produce misleading results some of the time. Something like this? From 5c36d056cbd46c43cb0bb54175fcc06b1b6069be Mon Sep 17 00:00:00 2001 From: Dmitry V. Levin Date: Sat, 30 Jan 2010 16:02:36 + Subject: [PATCH] Fix exit status of signal handlers in s

bug#5995: [PATCH] Fix exit status of signal handlers in shell scripts

2010-04-21 Thread Dmitry V. Levin
On Sat, Jan 30, 2010 at 11:52:31PM +0300, Dmitry V. Levin wrote: > On Sat, Jan 30, 2010 at 12:28:50PM -0700, Eric Blake wrote: > > According to Dmitry V. Levin on 1/30/2010 12:18 PM: > > > The value of `$?' on entrance to signal handlers in shell scripts > > > c

Re: [PATCH] Fix exit status of signal handlers in shell scripts

2010-01-30 Thread Dmitry V. Levin
On Sat, Jan 30, 2010 at 12:28:50PM -0700, Eric Blake wrote: > According to Dmitry V. Levin on 1/30/2010 12:18 PM: > > The value of `$?' on entrance to signal handlers in shell scripts > > cannot be relied upon, so set the exit code explicitly to > > 128 + SIGTERM ==

[PATCH] Fix exit status of signal handlers in shell scripts

2010-01-30 Thread Dmitry V. Levin
The value of `$?' on entrance to signal handlers in shell scripts cannot be relied upon, so set the exit code explicitly to 128 + SIGTERM == 143. * src/Makefile.am (sc_tight_scope): Use `exit 143' in signal handler. * cfg.mk (sc_always_defined_macros, sc_system_h_headers): Likewise. * tests/test-li

Re: I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc and /sys mounted

2010-01-10 Thread Dmitry V. Levin
On Sun, Jan 10, 2010 at 11:32:50AM +0100, Bruno Haible wrote: [...] > I like this workaround, but would prefer to have it in the nproc module > in gnulib. coreutils/src/nproc.c is purely the command-line program. > > Here's a proposed patch. It looks good, thank you. -- ldv pgpoquZHdhgdv.pgp

I: coreutils tests/misc/nproc-avail fails on GNU/Linux without /proc and /sys mounted

2010-01-09 Thread Dmitry V. Levin
Hi, The recently introduced nproc utility outputs wrong result when run in --all mode inside a /proc-less /sys-less GNU/Linux chroot on a system with several CPUs. In this environment, "nproc --all" always outputs 1 while plain "nproc" outputs correct number of available CPUs. The underlying num_

Re: [Bug 552320] Handling AT_FDCWD as EBADF in glibc's utimens() causes tar failures

2010-01-07 Thread Dmitry V. Levin
On Wed, Jan 06, 2010 at 06:20:51AM -0700, Eric Blake wrote: > According to Jim Meyering on 1/5/2010 2:07 PM: > >> --- Comment #5 from Ondrej Vasik 2010-01-05 14:29:13 > >> EDT --- > >> Ah - even the latest gnulib doesn't handle this new recent change - so > >> touch > >> from coreutils might be

[PATCH] tests: do not fail on read-only root file system

2009-11-22 Thread Dmitry V. Levin
* tests/touch/not-owner: Handle the case when the root file system is mounted read-only. Reported by Solar Designer. --- tests/touch/not-owner |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/tests/touch/not-owner b/tests/touch/not-owner index 3dd8a80..9cfa026 100755 --

Re: readlink(1) behavior

2009-09-19 Thread Dmitry V. Levin
On Fri, Sep 18, 2009 at 02:27:32PM +0200, Jim Meyering wrote: > Eric Blake wrote: > > According to Jim Meyering on 9/18/2009 4:47 AM: > >> Assuming ln -s /nowhere dangling-symlink, > >> New behavior: > >> > >> $ ./readlink -fv dangling-symlink/ > >> /nowhere > >> > >> Previous: > >> > >>

Re: readlink(1) behavior

2009-09-18 Thread Dmitry V. Levin
On Thu, Sep 10, 2009 at 07:29:35PM +0200, Jim Meyering wrote: > Eric Blake wrote: > > I think there are some infelicities in the canonicalization options of > > readlink. > > > > readlink -fv file/=> correctly reports ENOTDIR > > readlink -fv missing => lists /path/to/missing > > readlink -fv

Re: [PATCH] Implement join --check-order and --nocheck-order.

2008-03-22 Thread Dmitry V. Levin
On Tue, Feb 19, 2008 at 03:44:00PM +0100, Jim Meyering wrote: > James Youngman <[EMAIL PROTECTED]> wrote: > > This is a consolidated patch including all the previous changes, > > implementing order checking in join by default. "make distcheck" > > works (if I move distcheck-hook from Makefile.am t

Re: new coreutils snapshot available

2008-03-19 Thread Dmitry V. Levin
On Wed, Mar 19, 2008 at 11:41:14PM +0100, Jim Meyering wrote: > "Dmitry V. Levin" <[EMAIL PROTECTED]> wrote: > > On Fri, Mar 07, 2008 at 03:27:19PM +0100, Jim Meyering wrote: > >> There have been over 50 change-sets since the last one, so... > > >

Re: new coreutils snapshot available

2008-03-19 Thread Dmitry V. Levin
On Fri, Mar 07, 2008 at 03:27:19PM +0100, Jim Meyering wrote: > There have been over 50 change-sets since the last one, so... Something odd happened with generated man/Makefile.in file, it is no longer going to build and install manpages because all corresponding code is absent in the new version:

Re: Possible bug in readlink, canonicalize fails.

2007-09-21 Thread Dmitry V. Levin
Hi, On Fri, Sep 21, 2007 at 12:42:36AM -0700, mpb wrote: > I believe the following script demonstrates that readlink cannot > always canonicalize paths. It may be possible to create a simpler > demonstration of the bug, but I could not trivially do so. [...] > path=/tmp/c0/b3/b4/a5/a6 [...] > rea

Re: FYI: new inter-release version strings, e.g., 6.9-219-g58ddd,

2007-08-30 Thread Dmitry V. Levin
On Thu, Aug 30, 2007 at 05:50:31PM +0200, Jim Meyering wrote: > For example, now when I run "make dist", rather than getting the always > identically-named coreutils-6.9+.tar.gz, I get tarballs with more > meaningful names: > > coreutils-6.9.220.gdd469.tar.gz > coreutils-6.9.223.g624d1.tar

Re: bug

2007-05-29 Thread Dmitry V. Levin
On Tue, May 29, 2007 at 06:07:22PM +0400, NTFS wrote: > При консольном входе в систему, после входа набрать команды: > reset > sleep --help > то справка будет не в той кодировке The issue you are talking about is related to linux virtual console driver rather than coreutils. Workaround is $ print

Re: dd skip= misbehavior

2006-03-27 Thread Dmitry V. Levin
On Mon, Mar 27, 2006 at 05:33:48AM +0400, Solar Designer wrote: [...] > POSIX.1-2001 does not appear to explicitly specify the behavior of > skip= with partial reads. It defines skip= as follows: > > skip=n > Skip n input blocks (using the specified input block size) >

Re: stat: possible feature retraction: speak now or hold your peace

2005-11-25 Thread Dmitry V. Levin
On Fri, Nov 25, 2005 at 02:40:55PM +0100, Andreas Schwab wrote: > On Fri, Nov 25, 2005 at 04:29:29PM +0300, Dmitry V. Levin wrote: > > > At least one script I found uses stat in the > > following form: > > sizes=($(find somepath -print0 |xargs -r0 stat --format='%s &#

Re: stat: possible feature retraction: speak now or hold your peace

2005-11-25 Thread Dmitry V. Levin
On Fri, Nov 25, 2005 at 10:18:25AM +0100, Jim Meyering wrote: > [FYI, I posted a similar message just before making the incompatible > change, but no one objected. ] > > Due to complaints that the new (5.93) stat has broken some Debian scripts, > I'm thinking of making the following changes in co

Re: ls: Typo in russian translation

2005-11-08 Thread Dmitry V. Levin
On Mon, Nov 07, 2005 at 09:42:23PM -0700, Eric Blake wrote: > According to php-coder on 10/16/2005 7:24 AM: > > > > po/ru.po contains typo in translation. In attach patch which fixed > > this. > > I never saw a response to this email. I've responded to reporter in ALT's bugzilla and forw

Re: tweaking default `ls -l` output to use locale before posix

2005-11-07 Thread Dmitry V. Levin
On Tue, Sep 27, 2005 at 01:43:59PM -0700, Paul Eggert wrote: > Andreas Schwab <[EMAIL PROTECTED]> writes: > > > Emacs can use --dired now, so this should not be an issue. > > OK, thanks. I just now checked, and if I understand it aright this > started happening with Emacs 21.3 (released March 20

Re: ls: sort options in --help described twice

2005-11-07 Thread Dmitry V. Levin
On Mon, Oct 17, 2005 at 07:06:54PM +0200, Jim Meyering wrote: > Thanks to both of you. > > I'm inclined to apply this after the stable release. > I wish it'd shown up a couple weeks ago. > If I were to change it now, it'd invalidate the corresponding > translations. Of course, if a few translator

Re: [Bug-tar] Error "Cannot allocate memory" incorrectly reported in some cases.

2005-10-28 Thread Dmitry V. Levin
On Fri, Oct 28, 2005 at 04:07:53PM -0700, Paul Eggert wrote: > I installed this patch instead, both in gnulib and coreutils. [...] > @@ -70,7 +70,6 @@ char * > savedir (const char *dir) > { >DIR *dirp; > - struct dirent *dp; >char *name_space; >size_t allocated = NAME_SIZE_DEFAULT; >

Re: md5sum

2005-10-27 Thread Dmitry V. Levin
On Wed, Oct 26, 2005 at 04:27:44PM +0400, Dmitry V. Levin wrote: > On Sun, Oct 23, 2005 at 11:07:59AM +0200, Jim Meyering wrote: > > ** Binary input and output are now implemented more consistently. > > These changes affect only platforms like MS-DOS that distinguish > >

Re: coreutils-5.92 released [stable]

2005-10-26 Thread Dmitry V. Levin
On Sun, Oct 23, 2005 at 11:07:59AM +0200, Jim Meyering wrote: > ** Binary input and output are now implemented more consistently. > These changes affect only platforms like MS-DOS that distinguish > between binary and text files. Unfortunately, these changes affect GNU/Linux, too. [...] > m

I: [PATCH] coreutils-5.92 make_dir_parents regression

2005-10-24 Thread Dmitry V. Levin
Hi, "mkdir -p" and "install -d" now fail when creating final component of the file name when it already exists. Proposed patch with testcase is attached. -- ldv 2005-10-24 Dmitry V. Levin <[EMAIL PROTECTED]> * lib/mkdir-p.c (make_dir_parents): Whe

Q: common code in expand.c and unexpand.c

2005-10-23 Thread Dmitry V. Levin
Hi, src/expand.c and src/unexpand.c apparently have some common code. In particular, parse_tab_stops(), validate_tab_stops() and next_file() are either already or should be identical. Is this code duplication necessary? What about moving common code to separate file? -- ldv pgp5HAznUW2ag.pg

Re: nohup definition should be changed

2005-05-26 Thread Dmitry V. Levin
Hi, On Thu, May 12, 2005 at 01:57:45AM -0700, Paul Eggert wrote: > [EMAIL PROTECTED] POSIXLY_CORRECT > +If standard input is a terminal, it is closed so that terminal > +sessions do not mistakenly consider the terminal to be used by the > +command. However, this step is skipped if @env{POSIXLY_CO

Re: [bug-gnulib] problem with getdate

2005-04-14 Thread Dmitry V. Levin
Hi, On Tue, Apr 12, 2005 at 12:24:35AM -0700, Paul Eggert wrote: > Derek Price <[EMAIL PROTECTED]> writes: > > > If I pass these times in as "EDT" (Eastern Daylight Time), then they > > work. Ian mentioned doing something similar with "BST" (British > > Summer Time) in a separate email. Is this

I: tee doesn't handle dash properly

2005-04-04 Thread Dmitry V. Levin
Hi, According to NEWS file, "tee -" now writes to standard output instead of to a file named "-". However, tee closes stdout more than once if file is named "-": $ env -i tee - ftp://ftp.altlinux.org/pub/people/ldv/coreutils/coreutils-5.3.1-alt-tee.patch -- ldv pgpw5D5maALtO.pgp Description:

Re: chown security problem

2005-02-17 Thread Dmitry V. Levin
Hi, On Thu, Feb 17, 2005 at 10:58:28AM +0300, Kirill Korotaev wrote: > I recently found that chown tries to keep SUID bit the same as it was > for previous user. I think it is totally wrong and unsecure! This is no longer true. According to coreutils ChangeLog, 2003-07-12 Jim Meyering <[EMAI

Re: cat in locale ru_RU.utf8 or this is the bash issue?

2005-01-11 Thread Dmitry V. Levin
On Tue, Jan 11, 2005 at 11:00:15PM +0100, Andreas Schwab wrote: > Peter Volkov Alexandrovich <[EMAIL PROTECTED]> writes: > > > I should get the same string again. But if I misstyped and then edited my > > words in russian language with backspace then next line differs from the > > previous. So i

Re: cat in locale ru_RU.utf8 or this is the bash issue?

2005-01-11 Thread Dmitry V. Levin
Hi, On Tue, Jan 11, 2005 at 11:29:40PM +0300, Peter Volkov Alexandrovich wrote: > I've changed my locale to ru_RU.utf8 and now I have some problem is with cat > utilty. When I do: > $ cat > words in russian > > I should get the same string again. But if I misstyped and then edited my > words in

Re: A new utility: trv

2005-01-05 Thread Dmitry V. Levin
Hi, On Wed, Jan 05, 2005 at 09:55:15PM +, James Youngman wrote: > On Wed, Jan 05, 2005 at 09:17:40PM +0100, Giuliano Colla wrote: [...] > The -execdir action was introduced by *BSD as a secure alternative to > the insecure-by-design -exec action that Unixes have had for years > (and which POSI

Re: I: coreutils-20041123: src/touch.c regression

2005-01-03 Thread Dmitry V. Levin
Hi, On Mon, Jan 03, 2005 at 12:53:58AM -0800, Paul Eggert wrote: > > Your change (at 2004-11-23) to src/touch.c introduces regression: > > On GNU/Linux without futimes syscall and without /proc mounted, futimes() > > function from glibc returns ENOENT, futimens() from gnulib also returns > > ENOEN

Re: [PATCH][RFC] New 'true' program

2004-11-20 Thread Dmitry V. Levin
On Sat, Nov 20, 2004 at 01:02:37PM +, Philip Rowlands wrote: > On Fri, 19 Nov 2004, Paul Eggert wrote: > > >If small size is all you want, I can do a lot better than that: > > > >$ ls -l true > >-rwxr-xr-x 1 eggert eggert 10 2004-11-19 22:18 true > >$ ./true; echo $? > >0 > > Can't beat

Re: Normalizing pathnames

2004-10-07 Thread Dmitry V. Levin
Hi, On Thu, Oct 07, 2004 at 12:03:48PM +0100, [EMAIL PROTECTED] wrote: > Suresh Krishnan wrote: > > Thanks for the quick response. readlink -f does almost everything I > >want. The only thing it does not do is to verify whether the path is > >valid. I can add this on very easily in my script. >

Re: Normalizing pathnames

2004-09-28 Thread Dmitry V. Levin
Hi, On Mon, Sep 27, 2004 at 07:59:11PM -0400, Suresh Krishnan wrote: > Thanks for the quick response. readlink -f does almost everything I > want. The only thing it does not do is to verify whether the path is valid. > I can add this on very easily in my script. Try "readlink -e" then. --

Re: weird echo behaviour...

2004-09-17 Thread Dmitry V. Levin
Hi, On Thu, Sep 16, 2004 at 05:21:54PM +0200, Alfred M. Szmidt wrote: > Could someone explain the following behaviour for me? Because I sure > do not understand it. > > [EMAIL PROTECTED]:/tmp/foo$ touch 1 2 3 4 5 > [EMAIL PROTECTED]:/tmp/foo$ foo=`ls` > [EMAIL PROTECTED]:/tmp/foo$ /bin/echo $foo

I: AUTHORS file is out of date

2004-09-12 Thread Dmitry V. Levin
Kenzie, Paul Eggert, Jim Meyering false: no one head: David MacKenzie head: David MacKenzie, Jim Meyering nohup: Jim Meyering ptx: _(F. Pinard) ptx: Franois Pinard readlink: Dmitry V. Levin setuidgid: Jim Meyering test: FIXME: ksb, mjb test: Kevin Braunsdor

Re: userspec fixes for coreutils (e.g., "chown 010 file")

2004-08-13 Thread Dmitry V. Levin
if (! (xstrtoul (u, NULL, 10, &tmp_long, "") == LONGINT_OK > + && tmp_long <= MAXUID)) > + return _(E_invalid_user); > + *uid = tmp_long; > } > } >else This change introduces regression: $ chown "

Re: 'install --target-directory' is documented but not implemented

2004-08-12 Thread Dmitry V. Levin
Hi, On Wed, Aug 11, 2004 at 01:21:18AM +0400, Dmitry V. Levin wrote: > On Sat, Jun 26, 2004 at 12:06:19AM -0700, Paul Eggert wrote: [...] > Proposed fix is attached. This fix is not complete, there is one more regression: $ install -d newdir{1,2,3} install: target `newdir3

Re: 'install --target-directory' is documented but not implemented

2004-08-11 Thread Dmitry V. Levin
destination file operand after %s"), > +quote (file[0])); >usage (EXIT_FAILURE); > } > This change also introduces regression: $ install -d newdir install: missing destination file operand after `newdir' Proposed fix is attached. Looks like our r

Re: int->bool etc. cleanup for coreutils cp, mv, install, rm

2004-08-11 Thread Dmitry V. Levin
onst char *from, con >if (utimens (to, timespec)) > { >error (0, errno, _("cannot set time stamps for %s"), quote (to)); > - return 1; > + return true; > } > - return 0; > + return false; > } > I had to apply atta

Re: "readlink -f foo" fails if the target of foo does not exist

2004-04-04 Thread Dmitry V. Levin
On Mon, Mar 29, 2004 at 01:33:32AM +0400, Dmitry V. Levin wrote: > On Sun, Mar 28, 2004 at 10:22:47AM +0100, J.D. Hood wrote: > > Dmitry V. Levin wrote: > [...] > > > You suggest to change "readlink -f" behaviour to more compatible way, > > > i.e. "rea

Re: "readlink -f foo" fails if the target of foo does not exist

2004-03-28 Thread Dmitry V. Levin
On Sun, Mar 28, 2004 at 10:22:47AM +0100, J.D. Hood wrote: > Dmitry V. Levin wrote: [...] > > You suggest to change "readlink -f" behaviour to more compatible way, > > i.e. "readlink -f /path/to/foo" will also succeed when "/path/to" > > exists

Re: "readlink -f foo" fails if the target of foo does not exist

2004-03-28 Thread Dmitry V. Levin
Hi, On Mon, Mar 22, 2004 at 11:56:12PM +0100, Thomas Hood wrote: > On Mon, 2004-03-22 at 20:48, Dmitry V. Levin wrote: > > I'd suggest to leave current "readlink -f" behaviour unchanged. > > If you need to add new mode for readlink(1), please consider adding >

Re: "readlink -f foo" fails if the target of foo does not exist

2004-03-22 Thread Dmitry V. Levin
On Mon, Mar 22, 2004 at 06:53:22PM +0100, Thomas Hood wrote: > Since I raised this issue in January 2004 there has been a > positive development. Miquel van Smoorenburg has written a new > readlink program. Currently the program is included in the > initscripts package and is solely for the use o