bug#31184: tail -f on Network FS not refreshing as soon as the file is changed.

2018-04-17 Thread Jewsco Pius Jacquez
Yes, it didn't work either.

The closest is this one(below), but still the update is every second only.
# tail --follow=name --max-unchanged-stats=1 --sleep-interval=1  
/media/samba/test.file


Thanks,
Jewsco

-Original Message-
From: Erik Auerswald [mailto:auers...@unix-ag.uni-kl.de] 
Sent: Tuesday, April 17, 2018 11:06 AM
To: Jewsco Pius Jacquez 
Cc: Pádraig Brady ; 31...@debbugs.gnu.org
Subject: Re: bug#31184: tail -f on Network FS not refreshing as soon as the 
file is changed.

Hi Jewsco,

did you already try the -F option instead of -f?

Thanks,
Erik

On Tue, Apr 17, 2018 at 03:46:27PM +, Jewsco Pius Jacquez wrote:
> Padraig, thanks for your response,
> 
> The ---disable-inotify didn't refresh either.
> 
> [root@cmilsbtest03 ~]# stat -f -c '%t %T'  /media/samba/test.file
> ff534d42 cifs
> [root@cmilsbtest03 ~]# df -h /media/samba/test.file
> FilesystemSize  Used Avail Use% Mounted on
> //10.124.61.52/finance
>14G   13G  1.6G  89% /media/samba
> [root@cmilsbtest03 ~]# grep /media/samba /proc/mounts 
> //10.124.61.52/finance/ /media/samba cifs 
> rw,relatime,sec=ntlm,cache=loose,unc=\134\13410.124.61.52\134finance,u
> sername=,uid=0,noforceuid,gid=0,noforcegid,addr=10.124.61.52,unix,posi
> xpaths,serverino,acl,rsize=1048576,wsize=65536,echo_interval=60,actime
> o=1 0 0
> [root@cmilsbtest03 ~]#
> 
> 
> Thanks,
> Jewsco
> 
> 
> -Original Message-
> From: Pádraig Brady [mailto:p...@draigbrady.com]
> Sent: Tuesday, April 17, 2018 2:29 AM
> To: Jewsco Pius Jacquez ; 
> 31...@debbugs.gnu.org
> Subject: Re: bug#31184: tail -f on Network FS not refreshing as soon as the 
> file is changed.
> 
> On 16/04/18 10:11, Jewsco Pius Jacquez wrote:
> > Hello,
> > 
> > We have a legacy application that is using tail -f command in the 
> > application and is running in Redhat 9 under a shared Samba filesystem.
> > 
> > We want to migrate the application to RHEL7 and we noticed that the tail -f 
> > command here is not refreshing as soon as the file get changed. In Redhat 
> > 9, it is working fine, every write on the file got reflected straight 
> > away(no waiting interval).
> > 
> > Is there a way that we can make the tail -f working as it was in Redhat 9? 
> > For this reason, we are not able to migrate our Legacy application.
> 
> To get around the issue, the undocumented ---disable-inotify option 
> may help (note the three dashes)
> 
> If that does help then there is an issue with the misdetection of a known 
> file system as local, when it should be treated as remote.
> Can you show the file system type for the file you're trying to tail, using:
> 
>   stat -f -c '%t %T' /path/to/your/file
> 
> cheers,
> Pádraig
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
> 
> you may review at https://www.amdocs.com/about/email-disclaimer 
> 
> 
> 
> 
> 
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 







Re: df from coreutils 8.29 displays on PPC Mac OS X 10.5.8, Leopard, German umlauts incorrectly

2018-04-17 Thread Peter Dyballa


> Am 17.4.2018 um 09:10 schrieb Pádraig Brady :
> 
> 
> RE df, I think this is the same as https://bugs.gnu.org/25630
> where I postulated there may be some issue with
> mbstowcs() and decomposed characters on OSX

Yes, this seems to be the case.

—
Greetings

  Pete

Atheism is a non prophet organisation.




bug#31184: tail -f on Network FS not refreshing as soon as the file is changed.

2018-04-17 Thread Erik Auerswald
Hi Jewsco,

did you already try the -F option instead of -f?

Thanks,
Erik

On Tue, Apr 17, 2018 at 03:46:27PM +, Jewsco Pius Jacquez wrote:
> Padraig, thanks for your response,
> 
> The ---disable-inotify didn't refresh either.
> 
> [root@cmilsbtest03 ~]# stat -f -c '%t %T'  /media/samba/test.file
> ff534d42 cifs
> [root@cmilsbtest03 ~]# df -h /media/samba/test.file
> FilesystemSize  Used Avail Use% Mounted on
> //10.124.61.52/finance
>14G   13G  1.6G  89% /media/samba
> [root@cmilsbtest03 ~]# grep /media/samba /proc/mounts
> //10.124.61.52/finance/ /media/samba cifs 
> rw,relatime,sec=ntlm,cache=loose,unc=\134\13410.124.61.52\134finance,username=,uid=0,noforceuid,gid=0,noforcegid,addr=10.124.61.52,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=1
>  0 0
> [root@cmilsbtest03 ~]#
> 
> 
> Thanks,
> Jewsco
> 
> 
> -Original Message-
> From: Pádraig Brady [mailto:p...@draigbrady.com] 
> Sent: Tuesday, April 17, 2018 2:29 AM
> To: Jewsco Pius Jacquez ; 31...@debbugs.gnu.org
> Subject: Re: bug#31184: tail -f on Network FS not refreshing as soon as the 
> file is changed.
> 
> On 16/04/18 10:11, Jewsco Pius Jacquez wrote:
> > Hello,
> > 
> > We have a legacy application that is using tail -f command in the 
> > application and is running in Redhat 9 under a shared Samba filesystem.
> > 
> > We want to migrate the application to RHEL7 and we noticed that the tail -f 
> > command here is not refreshing as soon as the file get changed. In Redhat 
> > 9, it is working fine, every write on the file got reflected straight 
> > away(no waiting interval).
> > 
> > Is there a way that we can make the tail -f working as it was in Redhat 9? 
> > For this reason, we are not able to migrate our Legacy application.
> 
> To get around the issue, the undocumented ---disable-inotify option may help 
> (note the three dashes)
> 
> If that does help then there is an issue with the misdetection of a known 
> file system as local, when it should be treated as remote.
> Can you show the file system type for the file you're trying to tail, using:
> 
>   stat -f -c '%t %T' /path/to/your/file
> 
> cheers,
> Pádraig
> This message and the information contained herein is proprietary and 
> confidential and subject to the Amdocs policy statement,
> 
> you may review at https://www.amdocs.com/about/email-disclaimer 
> 
> 
> 
> 
> 





bug#31184: tail -f on Network FS not refreshing as soon as the file is changed.

2018-04-17 Thread Jewsco Pius Jacquez
Padraig, thanks for your response,

The ---disable-inotify didn't refresh either.

[root@cmilsbtest03 ~]# stat -f -c '%t %T'  /media/samba/test.file
ff534d42 cifs
[root@cmilsbtest03 ~]# df -h /media/samba/test.file
FilesystemSize  Used Avail Use% Mounted on
//10.124.61.52/finance
   14G   13G  1.6G  89% /media/samba
[root@cmilsbtest03 ~]# grep /media/samba /proc/mounts
//10.124.61.52/finance/ /media/samba cifs 
rw,relatime,sec=ntlm,cache=loose,unc=\134\13410.124.61.52\134finance,username=,uid=0,noforceuid,gid=0,noforcegid,addr=10.124.61.52,unix,posixpaths,serverino,acl,rsize=1048576,wsize=65536,echo_interval=60,actimeo=1
 0 0
[root@cmilsbtest03 ~]#


Thanks,
Jewsco


-Original Message-
From: Pádraig Brady [mailto:p...@draigbrady.com] 
Sent: Tuesday, April 17, 2018 2:29 AM
To: Jewsco Pius Jacquez ; 31...@debbugs.gnu.org
Subject: Re: bug#31184: tail -f on Network FS not refreshing as soon as the 
file is changed.

On 16/04/18 10:11, Jewsco Pius Jacquez wrote:
> Hello,
> 
> We have a legacy application that is using tail -f command in the application 
> and is running in Redhat 9 under a shared Samba filesystem.
> 
> We want to migrate the application to RHEL7 and we noticed that the tail -f 
> command here is not refreshing as soon as the file get changed. In Redhat 9, 
> it is working fine, every write on the file got reflected straight away(no 
> waiting interval).
> 
> Is there a way that we can make the tail -f working as it was in Redhat 9? 
> For this reason, we are not able to migrate our Legacy application.

To get around the issue, the undocumented ---disable-inotify option may help 
(note the three dashes)

If that does help then there is an issue with the misdetection of a known file 
system as local, when it should be treated as remote.
Can you show the file system type for the file you're trying to tail, using:

  stat -f -c '%t %T' /path/to/your/file

cheers,
Pádraig
This message and the information contained herein is proprietary and 
confidential and subject to the Amdocs policy statement,

you may review at https://www.amdocs.com/about/email-disclaimer 







Re: chroot add option to mount /dev /proc /sys for you?

2018-04-17 Thread Marc Weber
Hi Bernhard Voelker,

Thinking about it again you might be right.

So the question would turn into would it make sense to create a new tool
which (optionally cleans up) like this:

  with-mounts sys,proc,dev -- chroot ...

There might be many use cases.

I think there is interest. But I'm unsure where would be the place to
put such script. I hit this problem multiple times.

Marc Weber



Re: chroot add option to mount /dev /proc /sys for you?

2018-04-17 Thread Assaf Gordon

Hello Marc,

On 17/04/18 12:23 AM, Bernhard Voelker wrote:

On 04/15/2018 12:46 AM, Marc Weber wrote:

chrooting has always been a mess for me because in order for software to
work you need to bind mount /dev /proc /sys usually.
Then when something crashes your you quit chroot -> a mess again.


This was already discussed at:

   https://lists.gnu.org/r/coreutils/2017-09/msg00013.html


In addition to the suggestion from the above thread (use a script),
since you are already using linux-specific commands you might want
to consider using unshare(1) from util-linux which will create a 
separate mount-namespace.


Example, if you have the chroot directories:

   /tmp/chroot/bin
   /tmp/chroot/proc
   /tmp/chroot/sys
   /tmp/chroot/dev

And have the minimal shell static binary:

   /tmp/chroot/bin/sh


You could do the following:

   sudo unshare --mount \
sh -c "mount -t proc none /tmp/chroot/proc ; \
   mount -t sysfs none /tmp/chroot/sys ; \
   mount -o bind /dev /tmp/chroot/dev ; \
   exec chroot /tmp/chroot /bin/sh"

First, these mounts will not appear on your main system.
Second, these mounts will disappear once /bin/sh terminates.

---

For an even more advanced/complicated sandboxing solutions, programs 
like BubbleWrap ( https://github.com/projectatomic/bubblewrap ) take 
full advantage of linux namespaces (~containers) and allow you to easily 
specify many types of mounts and isolations.


Hope this helps,
 - Assaf





bug#31183: ls --block-size and -l

2018-04-17 Thread Pádraig Brady
tag 31183 notabug
close 31183
stop

On 16/04/18 09:19, Hugo Connery wrote:
> Hi,
> 
> ls --block-size=M foo
> 
> foo
> 
> Doesn't --block-size imply -l (so that I can see the file size) ?

--block-size is more of a config option, than one that should imply a mode.
In addition it's applicable to the -s output mode, so changing things
would break that usage.

cheers,
Pádraig






bug#31184: tail -f on Network FS not refreshing as soon as the file is changed.

2018-04-17 Thread Pádraig Brady
On 16/04/18 10:11, Jewsco Pius Jacquez wrote:
> Hello,
> 
> We have a legacy application that is using tail -f command in the application 
> and is running in Redhat 9 under a shared Samba filesystem.
> 
> We want to migrate the application to RHEL7 and we noticed that the tail -f 
> command here is not refreshing as soon as the file get changed. In Redhat 9, 
> it is working fine, every write on the file got reflected straight away(no 
> waiting interval).
> 
> Is there a way that we can make the tail -f working as it was in Redhat 9? 
> For this reason, we are not able to migrate our Legacy application.

To get around the issue, the undocumented ---disable-inotify option may help
(note the three dashes)

If that does help then there is an issue with the misdetection
of a known file system as local, when it should be treated as remote.
Can you show the file system type for the file you're trying to tail, using:

  stat -f -c '%t %T' /path/to/your/file

cheers,
Pádraig





Re: df from coreutils 8.29 displays on PPC Mac OS X 10.5.8, Leopard, German umlauts incorrectly

2018-04-17 Thread Pádraig Brady
On 11/04/18 09:15, Peter Dyballa wrote:
> Hello!
> 
> The coreutils package is managed by the MacPorts package manager. It  
> installs in /opt/local and probably used the Apple enhanced GCC 4.2.4.  
> In an environment with
> 
>   LC_CTYPE=de_DE.UTF-8
>   LANG=de_DE.UTF-8
> 
> gdf displays:
> 
>   pete 309 /\ gdf -Th -t hfs -t smbfs
>   DateisystemTyp  Grö??e Benutzt Verf. Verw% Eingehängt auf
>   /dev/disk0s5   hfs 63G 58G  4,9G   93% /
>   /dev/disk0s3   hfs 18G6,4G   12G   36% /Volumes/BSD-Linux
>   /dev/disk0s9   hfs 17G 14G  3,8G   78% /Volumes/Halde
>   /dev/disk0s7   hfs 52G 46G  5,3G   90% /Volumes/Tiger
> 
> You can see the word "Grö??e" displayed in the header. od (that from  
> Mac OS X works correctly, later more) dumps in a shell buffer in GNU  
> Emacs:
> 
>   pete 311 /\ gdf -Th -t hfs -t smbfs | head -1 | od -t a
>   000D   a   t   e   i   s   y   s   t   e   m  sp  sp  sp   
> sp   T
>   020y   p  sp  sp   G   r   \303   \266   \303   ?   e  sp
> B   e   n   u
>   040t   z   t  sp   V   e   r   f   .  sp   V   e   r   w   %   
> sp
>   060E   i   n   g   e   h   \303   \244   n   g   t  sp   a
> u   f  nl
>   100
>   pete 312 /\ which gdf
>   /opt/local/bin/gdf
>   pete 313 /\ gdf --version
>   df (GNU coreutils) 8.29
>   Copyright © 2017 Free Software Foundation, Inc.
>   License GPLv3+: GNU GPL version 3 or later 
>   >.
>   This is free software: you are free to change and redistribute it.
>   There is NO WARRANTY, to the extent permitted by law.
>   
>   Geschrieben von Torbjorn Granlund, David MacKenzie und Paul Eggert.
> 
> You can see gdf does not produce the proper codes. "ö" is in UTF-8 'C3  
> 86' and ß is 'C3 9F'. In octal notation they are "\303 \206" resp.  
> "\303 \237". ä is correctly output as 'C3 A5' or "\303 \244".
> 
> 
> And the second bug is with god:
> 
>   pete 315 /\ gdf -Th -t hfs -t smbfs | head -1 | god -t a
>   000   D   a   t   e   i   s   y   s   t   e   m  sp  sp  sp  sp   T
>   020   y   p  sp  sp   G   r   C   6   C   ?   e  sp   B   e   n   u
>   040   t   z   t  sp   V   e   r   f   .  sp   V   e   r   w   %  sp
>   060   E   i   n   g   e   h   C   $   n   g   t  sp   a   u   f  nl
>   100
>   pete 319 /\ god --version
>   od (GNU coreutils) 8.29
>   Copyright © 2017 Free Software Foundation, Inc.
>   License GPLv3+: GNU GPL version 3 or later 
>   >.
>   This is free software: you are free to change and redistribute it.
>   There is NO WARRANTY, to the extent permitted by law.
>   
>   Geschrieben von Jim Meyering.
> 
> It converts inappropriate input simply into some nonsense instead of  
> preserving the original faulty input for the educated reader. It  
> would, OTOH, be an advantage if god would output faulty input in ASCII  
> text output mode as text, i.e. \   .
> 
> And yes, both utilities produce the exactly same errors on a Mac with  
> recent macOS High Sierra, Version 10.13.4,

RE df, I think this is the same as https://bugs.gnu.org/25630
where I postulated there may be some issue with
mbstowcs() and decomposed characters on OSX




Re: chroot add option to mount /dev /proc /sys for you?

2018-04-17 Thread Bernhard Voelker
On 04/15/2018 12:46 AM, Marc Weber wrote:
> chrooting has always been a mess for me because in order for software to
> work you need to bind mount /dev /proc /sys usually.
> Then when something crashes your you quit chroot -> a mess again.
> 
> So why not add a chroot --bind-mount-defaults options which keeps track of
> how many chroots are running and makes the last exiting process clean up?
> 
> Then chrooting would be easier going.
> 
> Would thus option make sense ?

This was already discussed at:

  https://lists.gnu.org/r/coreutils/2017-09/msg00013.html

This is too system-specific to be added to chroot(1) which is
merely a wrapper around the chroot system call.

Have a nice day,
Berny