Package: diffutils
Version: 1:3.7-3
Severity: minor

Dear Maintainer,

I found a diff strangeness by accident while diffing two chroot trees.
It seems to be always reproductible for me, at least on this example :

root@lud-mn1:~# mkdir a b c; mknod a/null c 1 3; sleep .1; mknod b/null c 1 3; sleep 1; mknod c/null c 1 3

diffing the files 2 by 2 on one side, and diffing the folders 2 by 2 on
other side give different results. I was expecting all following commands
to give a 0 return code and no output :

root@lud-mn1:~# LANG=C diff a/null b/null; echo $?
0
root@lud-mn1:~# LANG=C diff b/null c/null; echo $?
0
root@lud-mn1:~# LANG=C diff -r a b; echo $?
0
root@lud-mn1:~# LANG=C diff -r b c; echo $?
File b/null is a character special file while file c/null is a character special file
1

For completeness, stat output to show that all timestamps are different.
I am on a regular ext4 mountpoint.

root@lud-mn1:~# LANG=C stat ?/null
  File: a/null
  Size: 0             Blocks: 0          IO Block: 4096   character special file
Device: 807h/2055d    Inode: 522435      Links: 1     Device type: 1,3
Access: (0644/crw-r--r--)  Uid: (    0/    root)   Gid: (    0/ root)
Access: 2019-06-02 21:39:41.061736947 +0200
Modify: 2019-06-02 21:39:41.061736947 +0200
Change: 2019-06-02 21:39:41.061736947 +0200
 Birth: -
  File: b/null
  Size: 0             Blocks: 0          IO Block: 4096   character special file
Device: 807h/2055d    Inode: 547588      Links: 1     Device type: 1,3
Access: (0644/crw-r--r--)  Uid: (    0/    root)   Gid: (    0/ root)
Access: 2019-06-02 21:39:41.165737120 +0200
Modify: 2019-06-02 21:39:41.165737120 +0200
Change: 2019-06-02 21:39:41.165737120 +0200
 Birth: -
  File: c/null
  Size: 0             Blocks: 0          IO Block: 4096   character special file
Device: 807h/2055d    Inode: 547590      Links: 1     Device type: 1,3
Access: (0644/crw-r--r--)  Uid: (    0/    root)   Gid: (    0/ root)
Access: 2019-06-02 21:39:42.165738785 +0200
Modify: 2019-06-02 21:39:42.165738785 +0200
Change: 2019-06-02 21:39:42.165738785 +0200
 Birth: -
root@lud-mn1:~# LANG=C df -h .
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda7        16G   14G  1.3G  92% /
root@lud-mn1:~# mount | grep ^/dev/sda7
/dev/sda7 on / type ext4 (rw,noatime,discard,errors=remount-ro)

This clearly do not cause real important troubles to me. But may be
nasty for containers fans.


-- System Information:
Debian Release: 10.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 4.19.0-5-amd64 (SMP w/6 CPU cores)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages diffutils depends on:
ii  libc6  2.28-10

diffutils recommends no packages.

Versions of packages diffutils suggests:
pn  diffutils-doc  <none>
pn  wdiff          <none>

-- no debconf information

Reply via email to