* [PATCH 0/2] tailf is deprecated
@ 2015-03-13 15:09 Ruediger Meier
2015-03-13 15:09 ` [PATCH 1/2] tailf: deprecated Ruediger Meier
2015-03-13 15:09 ` [PATCH 2/2] tests: disarm tailf test Ruediger Meier
0 siblings, 2 replies; 5+ messages in thread
From: Ruediger Meier @ 2015-03-13 15:09 UTC (permalink / raw)
To: util-linux
From: Ruediger Meier <ruediger.meier@ga-group.nl>
This is pull request 178 on github
https://github.com/karelzak/util-linux/pull/178
Ruediger Meier (2):
tailf: deprecated
tests: disarm tailf test
Documentation/deprecated.txt | 5 +++++
tests/expected/tailf/simple | 1 +
tests/ts/tailf/simple | 4 ++++
text-utils/tailf.1 | 6 ++++++
text-utils/tailf.c | 16 ++++++++++++----
5 files changed, 28 insertions(+), 4 deletions(-)
--
1.8.4.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] tailf: deprecated
2015-03-13 15:09 [PATCH 0/2] tailf is deprecated Ruediger Meier
@ 2015-03-13 15:09 ` Ruediger Meier
2015-03-16 13:32 ` Karel Zak
2015-03-13 15:09 ` [PATCH 2/2] tests: disarm tailf test Ruediger Meier
1 sibling, 1 reply; 5+ messages in thread
From: Ruediger Meier @ 2015-03-13 15:09 UTC (permalink / raw)
To: util-linux
From: Ruediger Meier <ruediger.meier@ga-group.nl>
We want to remove it in 2 years, March 2017.
See discussion "tailf, really needed?"
http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/10967
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
Documentation/deprecated.txt | 5 +++++
tests/expected/tailf/simple | 1 +
text-utils/tailf.1 | 6 ++++++
text-utils/tailf.c | 16 ++++++++++++----
4 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/Documentation/deprecated.txt b/Documentation/deprecated.txt
index fc31ece..11f4d1f 100644
--- a/Documentation/deprecated.txt
+++ b/Documentation/deprecated.txt
@@ -3,6 +3,11 @@ deprecated utils are in maintenance mode and we keep them in source tree for
backward compatibility only.
+what: tailf
+why: "tail -f" is better nowadays, tailf has unfixed bugs
+
+--------------------------
+
what: sfdisk --show-size
why: this does not belong to fdisk, use "blockdev --getsz"
diff --git a/tests/expected/tailf/simple b/tests/expected/tailf/simple
index ddf72de..5edc76b 100644
--- a/tests/expected/tailf/simple
+++ b/tests/expected/tailf/simple
@@ -1,2 +1,3 @@
+tailf: warning: use of 'tailf' is deprecated, use 'tail -f' instead
a b c d e f g h i j k l m n o p q r s t u v w x y z
0 1 2 3 4 5 6 7 8 9
diff --git a/text-utils/tailf.1 b/text-utils/tailf.1
index d59c531..9c6bd6a 100644
--- a/text-utils/tailf.1
+++ b/text-utils/tailf.1
@@ -29,6 +29,12 @@ tailf \- follow the growth of a log file
[option]
.I file
.SH DESCRIPTION
+.B tailf is deprecated.
+It may have unfixed bugs and will be removed in March 2017. Nowadays it's safe
+to use
+.B tail -f
+(coreutils) in contrast to the original documentation below.
+.PP
.B tailf
will print out the last 10 lines of the given \fIfile\fR and then wait
for this \fIfile\fR to grow. It is similar to
diff --git a/text-utils/tailf.c b/text-utils/tailf.c
index 6039049..9c57fad 100644
--- a/text-utils/tailf.c
+++ b/text-utils/tailf.c
@@ -19,13 +19,18 @@
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+/*
+ * This command is deprecated. The utility is in maintenance mode,
+ * meaning we keep them in source tree for backward compatibility
+ * only. Do not waste time making this command better, unless the
+ * fix is about security or other very critical issue.
*
- * less -F and tail -f cause a disk access every five seconds. This
- * program avoids this problem by waiting for the file size to change.
- * Hence, the file is not accessed, and the access time does not need to be
- * flushed back to disk. This is sort of a "stealth" tail.
+ * See Documentation/deprecated.txt for more information.
*/
+
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
@@ -246,6 +251,9 @@ int main(int argc, char **argv)
textdomain(PACKAGE);
atexit(close_stdout);
+ warnx(_("warning: "
+ "use of 'tailf' is deprecated, use 'tail -f' instead"));
+
if (!old_style_option(&argc, argv, &lines))
lines = DEFAULT_LINES;
--
1.8.4.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH 2/2] tests: disarm tailf test
2015-03-13 15:09 [PATCH 0/2] tailf is deprecated Ruediger Meier
2015-03-13 15:09 ` [PATCH 1/2] tailf: deprecated Ruediger Meier
@ 2015-03-13 15:09 ` Ruediger Meier
1 sibling, 0 replies; 5+ messages in thread
From: Ruediger Meier @ 2015-03-13 15:09 UTC (permalink / raw)
To: util-linux
From: Ruediger Meier <ruediger.meier@ga-group.nl>
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
tests/ts/tailf/simple | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/tests/ts/tailf/simple b/tests/ts/tailf/simple
index d0a1c5c..35d10f3 100755
--- a/tests/ts/tailf/simple
+++ b/tests/ts/tailf/simple
@@ -20,6 +20,10 @@ ts_init "$*"
ts_check_test_command "$TS_CMD_TAILF"
+# This test is unsafe for some filesystems and for case non-inotify. We don't
+# fix it since tailf is deprecated. Just keep this test for the test log.
+TS_KNOWN_FAIL="yes"
+
INPUT=$TS_OUTDIR/$TS_TESTNAME.input
rm -f $INPUT
--
1.8.4.5
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] tailf: deprecated
2015-03-13 15:09 ` [PATCH 1/2] tailf: deprecated Ruediger Meier
@ 2015-03-16 13:32 ` Karel Zak
0 siblings, 0 replies; 5+ messages in thread
From: Karel Zak @ 2015-03-16 13:32 UTC (permalink / raw)
To: Ruediger Meier; +Cc: util-linux
On Fri, Mar 13, 2015 at 04:09:36PM +0100, Ruediger Meier wrote:
> Documentation/deprecated.txt | 5 +++++
> tests/expected/tailf/simple | 1 +
> text-utils/tailf.1 | 6 ++++++
> text-utils/tailf.c | 16 ++++++++++++----
> 4 files changed, 24 insertions(+), 4 deletions(-)
Boys you're so bad.. I use tailf! Well, both patches applied :-)
> #include <stdio.h>
> #include <stdlib.h>
> #include <unistd.h>
> @@ -246,6 +251,9 @@ int main(int argc, char **argv)
> textdomain(PACKAGE);
> atexit(close_stdout);
>
> + warnx(_("warning: "
> + "use of 'tailf' is deprecated, use 'tail -f' instead"));
moved to usage() to avoid regression in output.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] tailf: deprecated
@ 2015-03-16 14:14 Ruediger Meier
0 siblings, 0 replies; 5+ messages in thread
From: Ruediger Meier @ 2015-03-16 14:14 UTC (permalink / raw)
To: util-linux
On Monday 16 March 2015 at 14:32, you wrote:
> On Fri, Mar 13, 2015 at 04:09:36PM +0100, Ruediger Meier wrote:
> > Documentation/deprecated.txt | 5 +++++
> > tests/expected/tailf/simple | 1 +
> > text-utils/tailf.1 | 6 ++++++
> > text-utils/tailf.c | 16 ++++++++++++----
> > 4 files changed, 24 insertions(+), 4 deletions(-)
>
> Boys you're so bad.. I use tailf! Well, both patches applied :-)
>
> > #include <stdio.h>
> > #include <stdlib.h>
> > #include <unistd.h>
> > @@ -246,6 +251,9 @@ int main(int argc, char **argv)
> > textdomain(PACKAGE);
> > atexit(close_stdout);
> >
> > + warnx(_("warning: "
> > + "use of 'tailf' is deprecated, use 'tail -f' instead"));
>
> moved to usage() to avoid regression in output.
Ok, then we can also remove it from test output again.
cu,
Rudi
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-03-16 14:14 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-13 15:09 [PATCH 0/2] tailf is deprecated Ruediger Meier
2015-03-13 15:09 ` [PATCH 1/2] tailf: deprecated Ruediger Meier
2015-03-16 13:32 ` Karel Zak
2015-03-13 15:09 ` [PATCH 2/2] tests: disarm tailf test Ruediger Meier
2015-03-16 14:14 [PATCH 1/2] tailf: deprecated Ruediger Meier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.