diff --git a/coreutils.diff b/coreutils.diff deleted file mode 100644 index da64954..0000000 --- a/coreutils.diff +++ /dev/null @@ -1,22 +0,0 @@ ---- a/debian/rules 2009-09-04 16:11:28.000000000 +0900 -+++ b/debian/rules 2009-09-04 16:12:12.000000000 +0900 -@@ -22,11 +22,16 @@ - - # implement no optimization build option - ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) --CFLAGS = "-g -DSYSLOG_SUCCESS -DSYSLOG_FAILURE -DSYSLOG_NON_ROOT -O0" -+CFLAGS = -g -DSYSLOG_SUCCESS -DSYSLOG_FAILURE -DSYSLOG_NON_ROOT -O0 - else --CFLAGS = "-g -DSYSLOG_SUCCESS -DSYSLOG_FAILURE -DSYSLOG_NON_ROOT -O2" -+CFLAGS = -g -DSYSLOG_SUCCESS -DSYSLOG_FAILURE -DSYSLOG_NON_ROOT -O2 -+endif -+LDFLAGS = -+ -+# Renesas SH(sh4) need -mieee option. -+ifeq ($(DEB_HOST_ARCH_CPU),sh4) -+ CFLAGS += -mieee - endif --LDFLAGS = - - # programs to include/not include - ifeq ($(DEB_HOST_ARCH_OS),hurd) diff --git a/debian/changelog b/debian/changelog index f577c4b..a6d8abc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,16 @@ +coreutils (7.5-6) unstable; urgency=low + + * remove usr/share/info/dir.gz in build rules (Closes: #546016) + * [83] make sure tail -f flushes initial output before waiting + (Closes: #545422) + + -- Michael Stone Fri, 11 Sep 2009 05:59:32 -0400 + coreutils (7.5-5) unstable; urgency=low * update standards version to 3.8.3.0 (no changes) - * fix "function not implemented" in cp -a of symlink on older linux - kernels (Closes: #545306) + * [82] fix "function not implemented" in cp -a of symlink on older + linux kernels (Closes: #545306) -- Michael Stone Thu, 10 Sep 2009 20:07:24 -0400 diff --git a/debian/patches/00list b/debian/patches/00list index c4ad07d..90953ba 100644 --- a/debian/patches/00list +++ b/debian/patches/00list @@ -6,3 +6,4 @@ 80_tail-2_wait_max-unchanged-stats 81_tail-f- 82_symlink_utimensat_enosys +83_tail_flush diff --git a/debian/patches/80_tail-2_wait_max-unchanged-stats.dpatch b/debian/patches/80_tail-2_wait_max-unchanged-stats.dpatch index f1b990d..78889a8 100644 --- a/debian/patches/80_tail-2_wait_max-unchanged-stats.dpatch +++ b/debian/patches/80_tail-2_wait_max-unchanged-stats.dpatch @@ -1,5 +1,5 @@ #! /bin/sh /usr/share/dpatch/dpatch-run -## 80_tail-2_wait.dpatch by Petr Salinger +## 80_tail-2_wait_max-unchanged-stats.dpatch by Petr Salinger ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: fix problem that inode checking isn't done quickly enough diff --git a/debian/patches/82_symlink_utimensat_enosys.dpatch b/debian/patches/82_symlink_utimensat_enosys.dpatch index 0c684ea..0d63a17 100644 --- a/debian/patches/82_symlink_utimensat_enosys.dpatch +++ b/debian/patches/82_symlink_utimensat_enosys.dpatch @@ -2,7 +2,7 @@ ## 82_symlink_utimensat_enosys.dpatch by Michael Stone ## ## All lines beginning with `## DP:' are a description of the patch. -## DP: No description. +## DP: ignore ENOSYS errors when trying to set symlink times @DPATCH@ diff -urNad coreutils-7.5~/src/copy.c coreutils-7.5/src/copy.c diff --git a/debian/patches/83_tail_flush.dpatch b/debian/patches/83_tail_flush.dpatch new file mode 100644 index 0000000..91cc352 --- /dev/null +++ b/debian/patches/83_tail_flush.dpatch @@ -0,0 +1,127 @@ +#! /bin/sh /usr/share/dpatch/dpatch-run +## 83_tail_flush.dpatch by Jim Meyering +## +## All lines beginning with `## DP:' are a description of the patch. +## DP: flush initial output before possibly blocking + +@DPATCH@ +diff -urNad coreutils-7.5~/NEWS coreutils-7.5/NEWS +--- coreutils-7.5~/NEWS 2009-09-11 05:56:07.000000000 -0400 ++++ coreutils-7.5/NEWS 2009-09-11 05:56:16.080040689 -0400 +@@ -45,6 +45,11 @@ + nl --page-increment: deprecated in favor of --line-increment, the new option + maintains the previous semantics and the same short option, -i. + ++ tail -f (inotify-enabled) now flushes any initial output before blocking. ++ Before, this would print nothing and wait: stdbuf -o 4K tail -f /etc/passwd ++ Note that this bug affects tail -f only when its standard output is buffered, ++ which is relatively unusual. ++ + ** New features + + chroot now accepts the options --userspec and --groups. +diff -urNad coreutils-7.5~/src/tail.c coreutils-7.5/src/tail.c +--- coreutils-7.5~/src/tail.c 2009-09-11 05:56:15.796040675 -0400 ++++ coreutils-7.5/src/tail.c 2009-09-11 05:58:13.367648405 -0400 +@@ -1442,7 +1442,6 @@ + if (fflush (stdout) != 0) + error (EXIT_FAILURE, errno, _("write error")); + } +- + } + #endif + +@@ -2027,6 +2026,12 @@ + error (0, errno, _("inotify cannot be used, reverting to polling")); + else + { ++ /* Flush any output from tail_file, now, since ++ tail_forever_inotify flushes only after writing, ++ not before reading. */ ++ if (fflush (stdout) != 0) ++ error (EXIT_FAILURE, errno, _("write error")); ++ + tail_forever_inotify (wd, F, n_files, sleep_interval); + + /* The only way the above returns is upon failure. */ +diff -urNad coreutils-7.5~/src/tail.c.rej coreutils-7.5/src/tail.c.rej +--- coreutils-7.5~/src/tail.c.rej 1969-12-31 19:00:00.000000000 -0500 ++++ coreutils-7.5/src/tail.c.rej 2009-09-11 05:56:16.080040689 -0400 +@@ -0,0 +1,21 @@ ++*************** main (int argc, char **argv) ++*** 2033,2038 **** ++ error (0, errno, _("inotify cannot be used, reverting to polling")); ++ else ++ { ++ tail_forever_inotify (wd, F, n_files, sleep_interval); ++ ++ /* The only way the above returns is upon failure. */ ++--- 2032,2043 ---- ++ error (0, errno, _("inotify cannot be used, reverting to polling")); ++ else ++ { +++ /* Flush any output from tail_file, now, since +++ tail_forever_inotify flushes only after writing, +++ not before reading. */ +++ if (fflush (stdout) != 0) +++ error (EXIT_FAILURE, errno, _("write error")); +++ ++ tail_forever_inotify (wd, F, n_files, sleep_interval); ++ ++ /* The only way the above returns is upon failure. */ +diff -urNad coreutils-7.5~/tests/Makefile.am coreutils-7.5/tests/Makefile.am +--- coreutils-7.5~/tests/Makefile.am 2009-09-11 05:56:07.000000000 -0400 ++++ coreutils-7.5/tests/Makefile.am 2009-09-11 05:56:16.080040689 -0400 +@@ -422,6 +422,7 @@ + rmdir/t-slash \ + tail-2/assert-2 \ + tail-2/big-4gb \ ++ tail-2/flush-initial \ + tail-2/proc-ksyms \ + tail-2/start-middle \ + touch/dangling-symlink \ +diff -urNad coreutils-7.5~/tests/tail-2/flush-initial coreutils-7.5/tests/tail-2/flush-initial +--- coreutils-7.5~/tests/tail-2/flush-initial 1969-12-31 19:00:00.000000000 -0500 ++++ coreutils-7.5/tests/tail-2/flush-initial 2009-09-11 05:56:16.080040689 -0400 +@@ -0,0 +1,41 @@ ++#!/bin/sh ++# inotify-based tail -f didn't flush its initial output before blocking ++ ++# Copyright (C) 2009 Free Software Foundation, Inc. ++ ++# This program is free software: you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation, either version 3 of the License, or ++# (at your option) any later version. ++ ++# This program is distributed in the hope that it will be useful, ++# but WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++# GNU General Public License for more details. ++ ++# You should have received a copy of the GNU General Public License ++# along with this program. If not, see . ++ ++if test "$VERBOSE" = yes; then ++ set -x ++ tail --version ++fi ++ ++. $srcdir/test-lib.sh ++ ++fail=0 ++echo line > in || fail=1 ++stdbuf --output=1K tail -f in > out & ++tail_pid=$! ++ ++# Wait for the backgrounded `tail' to start. ++while :; do ++ env kill -0 $tail_pid && break ++ sleep .1 ++done ++ ++test -s out || fail=1 ++ ++kill $tail_pid ++ ++Exit $fail diff --git a/debian/rules b/debian/rules index ba54f70..d9a3729 100755 --- a/debian/rules +++ b/debian/rules @@ -133,6 +133,9 @@ endif sed s/\"1\"/\"8\"/1 $(d)/usr/share/man/man1/chroot.1 > $(d)/usr/share/man/man8/chroot.8 rm $(d)/usr/share/man/man1/chroot.1 + # some build environments will leave a dangling info dir.gz + rm -f $(d)/usr/share/info/dir.gz + cp AUTHORS \ NEWS README \ THANKS \