1
2012-10-23 Pádraig Brady <P@draigBrady.com>
4
* NEWS: Record release date.
6
2012-10-23 Jim Meyering <jim@meyering.net>
9
* src/factor.c (is_square): Use active voice in comment, not passive.
10
(factor): Add function-describing comment.
11
(mp_factor): Likewise.
13
2012-10-23 Pádraig Brady <P@draigBrady.com>
15
build: avoid warnings about unused variables and macros
16
src/factor.c (__GMP_DECLSPEC): Move back from longlong.h
17
to treat consistently with other stub macros.
18
(__GMP_GNUC_PREREQ): Reference to avoid -Wunused-macros warning.
19
(__GMP_DECLSPEC): Likewise.
21
(__clz_tab): Likewise.
22
(factor_using_division): Mark a variable as unused.
25
(divexact_21): Likewise.
27
build: avoid compile warnings in factor.c on some systems
28
* src/factor.c (factor_using_pollard_rho2): On some systems
29
(like sparc) we need to promote all addmod2() parameters
30
to uintmax_t to avoid warnings.
32
build: avoid build failure on some sparc systems
33
* src/longlong.h: Restrict some sparc assembly variants
34
to sparc V9. This was seen to be an issue with newer
35
sparc systems with default gcc CPU options.
37
tests: correctly restrict factor test without GMP
38
* tests/misc/factor.pl: Correct the precedence and
39
regular expression in the command to check for GMP.
41
2012-10-21 Jim Meyering <jim@meyering.net>
43
doc: NEWS: the cp bug affects mv and install, too
44
* NEWS (Bug fixes): Note that the copy-induced corruption but affects
45
mv (sometimes) and install, too. Pointed out by Bernhard Voelker.
47
2012-10-19 Benno Schulenberg <bensberg@justemail.net>
49
doc: remove a stray parenthesis from 'cp --force' description
50
* doc/coreutils.texi (cp invocation): Remove Cheshire Cat.
52
2012-10-17 Jim Meyering <jim@meyering.net>
54
build: update gnulib submodule to latest
56
cp: avoid data-corrupting free-memory-read
57
* src/extent-scan.c (extent_scan_read): Reset our last_ei
58
pointer whenever the parent buffer might have just been freed.
59
* tests/cp/fiemap-extent-FMR.sh: New test.
60
* tests/local.mk (all_tests): Add it.
61
* NEWS (Bug fixes): Mention it.
62
Reported by Mike Gerth in http://bugs.gnu.org/12656, and with
63
help from Alan Curry. Bug introduced in commit v8.10-60-g18f5a85.
65
2012-10-13 Nikolas Kallis <nik@nikolaskallis.com> (tiny change)
67
doc: improve HACKING guidelines
68
* HACKING: Add "cd coreutils" after the git clone command.
70
2012-10-09 Pádraig Brady <P@draigBrady.com>
72
factor: fix integer validation and GMP fallback
73
In the recent factor rewrite, the GMP code
74
wasn't actually used; just an error was printed
75
on integer overflow. While fixing that it was noticed
76
that correct input validation wasn't done in all cases
77
when falling back to the GMP code.
79
* src/factor.c (print_factors) Fallback to GMP on overflow.
80
(strto2uintmax): Scan the string for invalid characters,
81
so that case can be detected independently of overflow.
82
Return an error when an empty string is passed.
83
Also allow leading spaces and '+' in input numbers.
84
* tests/misc/factor.pl: Ensure the GMP code is exercised
85
when compiled in. Also add a test to verify leading
86
spaces and '+' are allowed.
88
2012-10-08 Pádraig Brady <P@draigBrady.com>
90
build: support older GMP versions
91
The new factor code introduced usage of mpz_inits() and
92
mpz_clears(), which are only available since GMP >= 5,
93
and will result in a compile error when missing.
95
* m4/gmp.m4 (cu_GMP): Define HAVE_DECL_MPZ_INITS appropriately.
96
* src/factor (mpz_inits): New function, defined where missing.
97
(mpz_clears): Likewise.
99
2012-10-07 Jim Meyering <meyering@redhat.com>
101
maint: avoid warning from gcc's -Wunused-macros
102
On some systems, -Wunused-macros would warn about two macros:
103
src/factor.c:148:0: warning: macro "__clz_tab" is not used
104
src/factor.c:126:0: warning: macro "UHWtype" is not used
105
* src/factor.c: Add a use to placate gcc.
107
2012-10-05 Jim Meyering <meyering@redhat.com>
109
build: avoid link failure when strerror is replaced
110
When building the new make-prime-list program on a system for which
111
strerror is defined to rpl_strerror, we'd get a link failure.
112
The problem is that we're including <config.h> for some definitions,
113
but do not want the rpl_ ones, since this particular program must
114
not be linked against gnulib (aka libcoreutils.a). This did not
115
arise on Fedora 17 or 18, but did on Debian wheezy/sid.
116
* src/make-prime-list.c (strerror): #undef.
117
Build failure introduced by commit v8.19-152-gcf67e4c.
119
2012-10-04 Jim Meyering <meyering@redhat.com>
121
factor: 25% speed-up, on output
122
* src/factor.c (print_factors_single): Use fputs and umaxtostr
123
rather than printf with "%ju". This reduced the time required
124
to compute and print the factors of the first 10^7 integers from
125
over 8 seconds to 5.75s. Run this command:
126
seq $((10**7)) | env time factor > /dev/null
128
2012-10-04 Jim Meyering <meyering@redhat.com>
130
factor: merge with preexisting factor; integrate tests; avoid warnings
131
* src/factor.c: Renamed from factor-ng.c, with the following changes:
132
Adjust copyright header to be consistent with others.
133
Use xmalloc and xrealloc, to avoid segv upon OOM.
134
Switch back to using readtokens to handle input.
135
Diagnose invalid inputs.
136
s/fprintf+exit/error/
137
(print_factors): Add comments.
138
(strto2uintmax): Return strtol_error, not int.
139
(read_item): Remove, no longer used.
140
(main): Use atexit(close_stdout) so that we don't ignore failed write.
141
* cfg.mk: Exempt src/longlong.h from several tests.
142
Exempt run.sh from the test-list-consistency test.
143
Exempt make-prime-list.c from numerous tests, since we won't
144
be making it conform: it must not link with libcoreutils.a.
145
Exempt factor-ng.c from the no-upper-case error message test.
146
* AUTHORS (factor): Add Torbjörn and Niels.
147
* tests/local.mk (factor_tests): Encode the 37 tests.
148
($(factor_tests)): Rule to generate a test script for each test.
149
* tests/factor/run.sh: New script, marked as very expensive.
150
* .gitignore: Ignore new generated files.
151
* src/local.mk (src/primes.h): New rule.
152
(noinst_PROGRAMS): Add make-prime-list.
153
(noinst_HEADERS): Add longlong.h.
154
Remove all wheel-related rules and files.
155
* src/wheel-gen.pl: Remove file.
157
maint: mark set-but-not-used variables with ATTRIBUTE_UNUSED
158
* src/factor-ng.c (redcify, prime_p, isqrt2): Mark them, so we
159
don't have to disable -Wunused-but-set-variable.
161
maint: use __builtin_expect only if __GNUC__
162
* src/factor-ng.c (LIKELY, UNLIKELY) [__GNUC__]: Add #ifdef guard.
164
build: avoid warning about unused macro
165
* src/factor-ng.c (__GMP_DECLSPEC): Don't define here
166
* src/longlong.h (__GMP_DECLSPEC): Define if not already defined.
168
2012-10-04 Niels Möller <nisse@lysator.liu.se>
169
Torbjörn Granlund <tg@gmplib.org>
171
factor: more improvements
172
* src/factor-ng.c: Import some improvements from
173
http://gmplib.org:8000/factoring
175
2012-10-04 Torbjörn Granlund <tg@gmplib.org>
178
factor: new much-improved implementation; not yet integrated
179
* src/factor-ng.c: New file, from nt-factor.
180
* src/longlong.h: New file.
181
* NEWS (Improvements): Mention the upcoming improvements.
183
2012-10-04 Jim Meyering <meyering@redhat.com>
185
maint: make-prime-list: syntax conventions; be robust for large N
186
* src/make-prime-list.c: Insert spaces before parens.
187
(main): Abort if the 8-delta value ever exceeds 255.
189
maint: make-prime-list: do not ignore write failure
190
Even though this is just a helper program that is run solely to create
191
primes.h, it should not ignore a write failure. Normally we would
192
simply call atexit (close_stdout), but we cannot do that from this
193
helper program, since it must be built before the generated header,
194
primes.h. If we were to make the linking of make-prime-list depend
195
on libcoreutils.a, that would add all lib/*.o files to the list
196
of dependents of $(BUILT_HEADERS). Then, since there is currently no
197
provision to ensure that a file like lib/stdio.h (another built header)
198
is built before the first lib/*.o file that also includes <stdio.h>,
199
some lib/*.o files would be built before lib/stdio.h and some after.
200
The former would provoke link failures due to undefined rpl_* functions.
201
* src/make-prime-list.c: Include <errno.h>.
202
(fclose): Undef, so that a definition to rpl_fclose does not
203
cause a link failure.
204
(main): Per the above, in this exceptional case, we check for fclose
205
and ferror failure manually, and don't worry about the ferror-only
206
failure case in which errno may not be relevant.
208
maint: make-prime-list: avoid -Wsuggest-attribute=const warning
209
* src/make-prime-list.c: Include <config.h>.
210
(binvert): Add _GL_ATTRIBUTE_CONST.
212
2012-10-04 Torbjörn Granlund <tg@gmplib.org>
213
Niels Möller <nisse@lysator.liu.se>
215
factor: prepare for the new factor program
216
* src/make-prime-list.c: New file, from nt-factor.
218
2012-10-03 Jim Meyering <meyering@redhat.com>
220
build: remove redundant dependency: $(PROGRAMS): lib/libcoreutils.a
221
* src/local.mk: Remove the above dependency.
222
A soon-to-be-added new program, make-prime-list, must not depend
223
on that, since it is used to create a BUILT_SOURCES file.
224
That dependency is already handled via the ..._LD_ADD variables,
225
and so that redundant dependency has so far been harmless.
227
2012-09-30 Jim Meyering <meyering@redhat.com>
229
du: avoid abort on systems for which ->me_type is not malloc'd
230
On some systems (notably, BSD-based, like at least OpenBSD 4.9),
231
the me_type member does not come from the heap.
232
* src/du.c (fill_mount_table): Free the ->me_type member only
233
when it was malloc'd, i.e., when ->me_type_malloced is nonzero.
234
Bug introduced via commit v8.19-2-gcf7e1b5.
235
Reported as http://bugs.gnu.org/12542.
237
2012-09-29 Jim Meyering <meyering@redhat.com>
239
doc: same correction, but now in texinfo documentation
240
* doc/coreutils.texi (nice invocation): s/nicenesses/niceness values/
242
2012-09-28 Jim Meyering <meyering@redhat.com>
244
doc: correct an old bit of ugliness in nice --help output
245
* src/nice.c (usage): s/Nicenesses/Niceness values/
247
2012-09-28 Pádraig Brady <P@draigBrady.com>
249
doc: disambiguate the niceness explanation in nice --help
250
* src/nice.c (usage): Specify the entity (process) that
251
that relative terms are referring to.
253
Reported-by: David Diggles
255
2012-09-28 Ondrej Oprala <ooprala@redhat.com>
257
cp: fix the --no-preserve=mode option
258
The --no-preserve=mode option did not do what its name implies:
259
it would mistakenly preserve permission mode bits.
260
* NEWS: Mention the fix.
261
* TODO: Remove an entry.
262
* src/copy.c (copy_reg): Add a condition to properly
263
handle the --no-preserve=mode option for files
264
(copy_internal): Add a condition to properly handle the
265
--no-preserve=mode option for directories.
266
* src/copy.h (struct cp_options): Add a new boolean.
267
* src/cp.c (cp_option_init,decode_preserve_arg): Set the
268
new boolean value according to specified options.
269
* src/install.c (struct cp_options): Initialize the new boolean.
270
* src/mv.c (struct cp_options): Initialize the new boolean.
271
* tests/cp/preserve-mode.sh: Add a new test.
272
* tests/cp/link-preserve.sh (-a --no-preserve=mode): Adjust the
273
expected perms: now, --no-preserve=mode overrides the --preserve=mode
274
that is inherent in -a, as it should.
275
* tests/local.mk: Add the new test to the list.
277
2012-09-24 Pádraig Brady <P@draigBrady.com>
279
timeout: handle signals more transparently
280
This was originally attempted in commit v8.12-117-g5a647a0,
281
but reverted before release because of the unreliability
282
of disabling core dumps using setrlimit() on Linux kernels.
283
This new version instead uses prctl() where available to
284
more reliably disable core dumps for the timeout process.
286
* m4/jm-macros.m4: Define HAVE_SETRLIMIT and HAVE_PRCTL.
287
* src/timeout.c (disable_core_dumps): A new function
288
that disables coredumps using prctl or setrlimit if available.
289
(main): If the child exited with a signal and we can
290
disable core dumps, then raise that signal to the timeout
291
process itself, so that callers may also see the signal status.
292
Also print a message indicating when the monitored command
293
dumped core, as that information is lost in the signal
294
propagation through timeout.
296
2012-09-24 Pozsár Balázs <pozsy@uhulinux.hu>
298
dd: new option, status=none to suppress output statistics
299
* src/dd.c (STATUS_NONE): A new bitmask combining all STATUS_
300
options, thus used to suppress all informational output.
301
(struct symbol_value statuses): Expose the "none" option,
302
corresponding to the STATUS_NONE bitmask above.
303
(print_stats): Return early if STATUS_NONE is specified.
304
Also move the call to gethrxtime() down so that it's only
306
(usage): Describe the new options.
307
* doc/coreutils.texi (dd invocation): Likewise.
308
* NEWS: Mention the new feature.
309
* tests/dd/misc.sh: Ensure the new option works.
311
2012-09-23 Jim Meyering <meyering@redhat.com>
313
tail,stat: improve support for vmhgfs
314
Teach tail -f that it must use polling on vmhgfs file systems, and
315
let stat -f --format=%T report the file system type name, "vmhgfs".
316
* src/stat.c (human_fstype): Add a case: vmhgfs, 0xbacbacbc, remote.
317
* NEWS (Improvements): Mention it.
319
Reported by Daniel Tschinder in http://bugs.gnu.org/12461.
321
2012-09-20 Jim Meyering <meyering@redhat.com>
323
build: move non-recursive-gnulib-prefix-hack to gnulib; update
324
I've moved the non-recursive-gnulib-prefix-hack module to
325
gnulib, with two small improvements, so remove it from here
326
and update gnulib to the latest.
327
* gl/build-aux/prefix-gnulib-mk: Remove file.
328
* gl/m4/non-recursive-gnulib-prefix-hack.m4: Remove file.
329
* gl/modules/non-recursive-gnulib-prefix-hack: Remove file.
330
* gnulib: Update to latest.
332
2012-09-19 Jim Meyering <meyering@redhat.com>
334
rm: be even more careful when using a replacement errno value
335
* src/remove.c (excise): The change in commit v8.19-107-gccbd3f3 made
336
the "rm -rf D" (for unreadable dir, D) diagnostic worse on Solaris 10:
337
-rm: cannot remove 'D': Permission denied
338
+rm: cannot remove 'D': File exists
339
That happened because unlinkat would fail with EEXIST there, given
340
an unreadable directory, which made the two tests, tests/rm/unread2
341
and tests/rm/unreadable fail. Accommodate the EEXIST case, too.
343
maint: fix a comment typo
344
* cfg.mk: Fix comment typo: s/recursive/non-recursive/ make
346
2012-09-18 Jim Meyering <meyering@redhat.com>
348
tests: cp/link-heap: avoid new failure on rawhide
349
* tests/cp/link-heap.sh: Increase virtual memory limit by 2000KiB --
350
from 20,000 to 22,000 KiB -- to avoid a new failure on rawhide.
352
maint: make the tight-scope syntax-check rule work again
353
* cfg.mk: Configure a few variable to make the tight-scope rule work.
354
* gnulib: Update submodule to latest.
356
2012-09-18 Benno Schulenberg <bensberg@justemail.net>
358
dd: remove references to the word BLOCKS from help and texi docs
359
The renaming from BLOCKS to N was done in v8.15-38-g140eca1,
360
and documentation for N was added again in v8.17-26-g4f2e9d5
361
without noticing that. Now, finally remove the word BLOCKS
362
from the documentation.
364
* src/dd.c (usage): Remove the word BLOCKS.
365
* doc/coreutils.texi (dd invocation): Likewise.
367
Improved by: Bernhard Voelker <mail@bernhard-voelker.de>
369
2012-09-18 Jim Meyering <meyering@redhat.com>
371
doc: NEWS: mention the conversion to non-recursive make
372
* NEWS (Build-related): Mention the non-recursive make improvement.
373
Improved by: Pádraig Brady
375
2012-09-16 Pádraig Brady <P@draigBrady.com>
377
ls: fix coloring of dangling symlinks in default listing mode
378
When listing a directory containing dangling symlinks,
379
and not outputting a long format listing, and orphaned links
380
are set to no coloring in LS_COLORS, then the symlinks
381
would get no color rather than reverting to the standard
382
symlink color. The issue was introduced in v8.13-19-g84457c4
384
* src/ls.c (print_color_indicator): Use the standard method
385
to check if coloring is specified for orphaned symlinks.
386
The existing method would consider 'or=00' or 'or=0' as significant
387
in LS_COLORS. Even 'or=' was significant as in that case the
388
string='or=' and the length=0. Also apply the same change
389
for missing symlinks for consistency.
390
(gobble_file): Remove the simulation of linkok, which is only
391
tested in print_color_indicator() which now handles this directly
392
by keying on the LS_COLORS values correctly.
393
* tests/misc/ls-misc.pl: Add a test case.
394
* THANKS: Add the reporter.
395
* NEWS: Mention the fix.
396
Reported-by: David Matei
398
2012-09-15 Jim Meyering <meyering@redhat.com>
400
doc: update seq description
401
* doc/coreutils.texi (seq invocation): Update an example and mention
402
that with the new constraints, seq can print arbitrarily large numbers.
404
2012-09-14 Pádraig Brady <P@draigBrady.com>
406
seq: enable the fast integer printing code in more cases
407
* src/seq.c (main): Adjust the initial arbitrary precision
408
seq_fast enablement checks to be more maintainable, and
409
a little more general, by allowing single character
410
separators to use seq_fast.
411
Also check again after the number arguments are processed,
412
to see if we can still use seq_fast, which while not
413
allowing arbitarly large integers, it will handle
414
integers of the form 10E10 etc.
415
(seq_fast): Use a specified separator character,
416
rather than hardcoding '\n'.
418
2012-09-14 Jim Meyering <meyering@redhat.com>
420
build: do not rely on automake's AM_TESTS_ENVIRONMENT
421
* tests/local.mk (TESTS_ENVIRONMENT): Rename from AM_TESTS_ENVIRONMENT,
422
since it is not honored in automake-1.11.3 after all.
423
This reverts commit v8.19-38-g34c9c8f. For now, I'll leave
424
the following commit that made bootstrap.conf require 1.11.2.
425
Prompted by a report of test failure from Pádraig Brady.
427
build: don't prefix the RHS of "GPERF = ..." with "lib/"
428
* gl/build-aux/prefix-gnulib-mk (prefix_assignment): Exempt
429
the RHS of a "GPERF = ..." assignment from lib/ prefixing.
431
2012-09-14 Jim Meyering <meyering@redhat.com>
433
seq: 70x faster for non-negative whole numbers and incr==1
434
Handle non-negative whole numbers robustly and efficiently when
435
the increment is 1 and when no format-changing option is specified.
436
On the correctness front, for very large numbers, seq now works fine:
438
$ b=1000000000000000000000000000
439
$ src/seq ${b}09 ${b}11
440
100000000000000000000000000009
441
100000000000000000000000000010
442
100000000000000000000000000011
444
while the old one would infloop, printing garbage:
446
$ seq ${b}09 ${b}11 | head -2
447
99999999999999999997315645440
448
99999999999999999997315645440
450
The new code is much more efficient, too:
451
Old vs new: 55.81s vs 0.82s
453
$ env time --f=%e seq $((10**8)) > /dev/null
455
$ env time --f=%e src/seq $((10**8)) > /dev/null
458
* seq.c (incr): New function, inspired by the one in cat.c.
459
(cmp, seq_fast): New functions, inspired by code in nt-factor
460
by Torbjörn Granlund and Niels Möller.
461
(trim_leading_zeros): New function, without which cmp would malfunction.
462
(all_digits_p): New function.
463
(main): Hoist the format_str-vs-equal_width check to precede first
464
treatment of operands, and insert code to call seq_fast when possible.
465
* NEWS (Bug fixes): Mention the correctness fix.
466
(Improvements): Mention the speed-up.
467
* tests/misc/seq.pl: Exercise the new code.
469
Improved by: Bernhard Voelker.
470
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/3340
472
2012-09-14 Jim Meyering <meyering@redhat.com>
474
tests: reenable "make -C tests ..." commands
475
The README-documented way to run individual tests was invalidated
476
by the conversion of tests/ to non-recursive make. Add a GNUmakefile
477
shim to reenable that usage.
478
* tests/GNUmakefile: New file, so that "make -C tests ..." works
479
like it did before the conversion of tests/ to non-recursive build.
480
Reported by Bernhard Voelker.
481
* Makefile.am (EXTRA_DIST): Add it.
482
* cfg.mk (sc_prohibit_tab_based_indentation): Also exempt any
483
GNUmakefile from this syntax-check.
485
2012-09-12 Stefano Lattarini <stefano.lattarini@gmail.com>
487
build: fixup: correctly recognize if perl is missing
488
* configure.ac: Here, by adding a missing '*' to the wildcard in
489
a 'case' construct over the contents of $PERL. Introduced in
490
commit v8.19-41-g00f5ba1.
492
2012-09-12 Bernhard Voelker <mail@bernhard-voelker.de>
494
maint: mbsalign.h: fix typo from previous comment edit
495
* gl/lib/mbsalign.h: Fix comment typo.
497
2012-09-11 Jim Meyering <meyering@redhat.com>
499
build: build lib/ using non-recursive make
500
* bootstrap.conf (gnulib_modules): Use the new module.
501
(bootstrap_post_import_hook): Invoke prefix-gnulib-mk.
502
* configure.ac (AC_CONFIG_FILES): Remove lib/Makefile.
503
* lib/Makefile.am: Renamed...
504
* lib/local.mk: ...to this.
505
* src/local.mk (CLEANFILES): Append, don't set.
506
(noinst_LIBRARIES): Likewise.
507
(AM_CPPFLAGS): Don't set this here.
508
* Makefile.am (AM_CPPFLAGS): Define here instead.
509
(noinst_LIBRARIES, CLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES):
510
Initialize here, so we can append to them from each included local.mk
511
(SUBDIRS): Remove "lib".
513
2012-09-11 Jim Meyering <meyering@redhat.com>
515
build: handle @ALLOCA@-vs-non-recursive make problems
516
Here is a good reason to avoid alloca with non-recursive make. These:
518
$ grep @ALLOCA lib/gnulib.mk
519
lib_libcoreutils_a_LIBADD += lib/@ALLOCA@
520
lib_libcoreutils_a_DEPENDENCIES += lib/@ALLOCA@
522
would lead to this, when @ALLOCA@ expands to the empty string,
523
which is essentially "always", now:
525
$ grep ' lib/$' Makefile
526
lib_libcoreutils_a_LIBADD = $(gl_LIBOBJS) lib/
527
lib_libcoreutils_a_DEPENDENCIES = $(gl_LIBOBJS) lib/
529
Tell the prefix-adding script not to add a prefix when the word it's
530
prefixing is "@ALLOCA@". That is fine for most cases, but what about
531
when the expansion of @ALLOCA@ is nonempty?
533
* build-aux/prefix-gnulib-mk (prefix_word): Exclude @ALLOCA@.
534
* gl/m4/non-recursive-gnulib-prefix-hack.m4: Prefix non-empty
535
$ALLOCA with "lib/". FIXME: I'm not sure this is required,
537
Use AC_CONFIG_LIBOBJ_DIR([lib]).
538
Without using AC_CONFIG_LIBOBJ_DIR([lib]), automake (not autoconf)
539
would complain of failure to find aclocal.c, due to the use of
540
AC_LIBSOURCES(alloca.c).
542
2012-09-11 Jim Meyering <meyering@redhat.com>
544
build: new module to convert lib/ to non-recursive make
545
* gl/modules/non-recursive-gnulib-prefix-hack: New module.
546
* gl/m4/non-recursive-gnulib-prefix-hack.m4:
547
(gl_NON_RECURSIVE_GNULIB_PREFIX_HACK): This is the snippet
548
that this module inserts near the end of configure.
549
* gl/build-aux/prefix-gnulib-mk: New script, from bison.
550
Changes from the code in bison:
551
(prefix_assignment): Split a long line.
552
(prefix): Add trailing slashes to avoid a single false match.
553
Prefix imaxtostr.c and the other *tostr.c file names manually.
554
Also, use $prefix in place of hard-coded "lib/".
556
2012-09-11 Bernhard Voelker <mail@bernhard-voelker.de>
558
maint: gen-lists-of-programs.sh: fix typo from previous comment edit
559
* build-aux/gen-lists-of-programs.sh: Fix comment typo.
561
2012-09-11 Pádraig Brady <P@draigBrady.com>
563
maint: add more control flags to mbsalign
564
* gl/lib/mbsalign.h: Add MBA_UNIBYTE_ONLY (to allow
565
faster processing). Also add MBA_NO_LEFT_PAD, MBA_NO_RIGHT_PAD
566
to give greater control of padding, useful with the first
567
or last fields on a line.
568
* gl/lib/mbsalign.c (mbsalign): Implement the new flags.
569
* gl/tests/test-mbsalign.c (main): Test combinations
572
2012-09-10 Jim Meyering <meyering@redhat.com>
574
maint: allow per-directory CFLAGS settings with non-recursive make
575
* src/local.mk (AM_CFLAGS): Don't use $(WARN_CFLAGS) here.
576
* cfg.mk (src_CFLAGS, lib_CFLAGS, gnulib-tests_CFLAGS): Define here
578
(AM_CFLAGS): Augment using the above.
579
* configure.ac: Note that the configure-time option,
580
--enable-gcc-warnings now functions only when using GNU make.
581
Well, currently it does still work in gnulib-tests, but that should
583
Improved-by: Stefano Lattarini
585
maint: gen-lists-of-programs.sh: improve comments
586
* build-aux/gen-lists-of-programs.sh: Improve comments.
588
build: do not require help2man at build-from-tarball time
589
But do retain full dependencies when building from a git clone.
590
We do this by converting the full dependency (of the .1 file on
591
the binary we run with --help) into a dependency on the .c file.
592
* Makefile.am (do-not-require-help2man): New rule.
593
(dist-hook): depend on it.
595
build: fix a minor man-page generation dependency error
596
* man/local.mk (man/dir.1): Depend on src/dir, not src/ls.
598
maint: move the last coreutils-specific files from lib/ to gl/
599
Convert the few remaining coreutils-specific files in lib/ to
600
gnulib-style modules under gl/, removing their corresponding .m4
601
files, since the information recorded in those files is better
602
stored in module-description file in gl/modules/.
603
* bootstrap.conf (gnulib_modules): Add new modules:
604
fd-reopen, buffer-lcm, xfts, strnumcmp.
605
* gl/lib/buffer-lcm.c: Renamed from the file in lib/.
606
* gl/lib/buffer-lcm.h: Likewise.
607
* gl/lib/fd-reopen.c: Likewise.
608
* gl/lib/fd-reopen.h: Likewise.
609
* gl/lib/strintcmp.c: Likewise.
610
* gl/lib/strnumcmp-in.h: Likewise.
611
* gl/lib/strnumcmp.c: Likewise.
612
* gl/lib/strnumcmp.h: Likewise.
613
* gl/lib/xfts.c: Likewise.
614
* gl/lib/xfts.h: Likewise.
615
* gl/modules/buffer-lcm: New module-description file.
616
* gl/modules/fd-reopen: Likewise.
617
* gl/modules/strnumcmp: Likewise.
618
* gl/modules/xfts: Likewise.
619
* m4/fd-reopen.m4: Remove, no longer needed.
620
* m4/strnumcmp.m4: Likewise.
621
* m4/xfts.m4: Likewise.
622
* m4/prereq.m4: Do not AC_REQUIRE the m4 functions from
623
our just-removed m4/*.m4 files.
625
maint: move gl/m4/root-dev-ino.m4 contents into its module definition
626
We can get the same effect using the modules file.
627
* gl/m4/root-dev-ino.m4: Remove file.
628
* gl/modules/root-dev-ino (Depends-on): Add lstat.
629
(Files): Remove m4/root-dev-ino.m4.
630
(Makefile.am) [lib_SOURCES]: Add root-dev-ino.c and root-dev-ino.h.
631
(configure.ac): Remove reference to gl_ROOT_DEV_INO.
633
2012-09-08 Jim Meyering <meyering@redhat.com>
635
maint: adjust ChangeLog to correct Author
636
* build-aux/git-log-fix: Add an entry to correct the Author:
637
of v8.19-111-g51a4b04. It should be Ondrej Oprala, not me.
639
2012-09-07 Jim Meyering <meyering@redhat.com>
641
factor: NEWS and tests
642
* NEWS (Bug fixes): Mention it.
643
* tests/misc/factor.pl: Add five of Torbjörn's tests.
645
2012-09-07 Torbjörn Granlund <tg@gmplib.org>
647
factor: don't ever declare composites to be prime
648
The multiple-precision factoring code (with HAVE_GMP) was copied from
649
a now-obsolete version of GMP that did not pass proper arguments to
650
the mpz_probab_prime_p function. It makes that code perform no more
651
than 3 Miller-Rabin tests only, which is not sufficient.
653
A Miller-Rabin test will detect composites with at least a probability
654
of 3/4. For a uniform random composite, the probability will actually
657
Or put another way, of the N-3 possible Miller-Rabin tests for checking
658
the composite N, there is no number N for which more than (N-3)/4 of the
659
tests will fail to detect the number as a composite. For most numbers N
660
the number of "false witnesses" will be much, much lower.
662
Problem numbers are of the form N=pq, p,q prime and (p-1)/(q-1) = s,
663
where s is a small integer. (There are other problem forms too,
664
involving 3 or more prime factors.) When s = 2, we get the 3/4 factor.
666
It is easy to find numbers of that form that cause coreutils' factor to
684
There are 9008992 composites of the form with s=2 below 2^64. With 3
685
Miller-Rabin tests, one would expect about 9008992/64 = 140766 to be
686
invalidly recognized as primes in that range.
688
* src/factor.c (MR_REPS): Define to 25.
689
(factor_using_pollard_rho): Use MR_REPS, not 3.
690
(print_factors_multi): Likewise.
691
* THANKS.in: Remove my name, now that it will be automatically
692
included in the generated THANKS file.
694
2012-09-07 Ondrej Oprala <ooprala@redhat.com>
696
tests: improve checks for setuidgid-using root-only tests
697
* init.cfg (setuidgid_has_perm_): New function.
698
(require_root_): Use it.
699
Improved-by: Bernhard Voelker
700
* NEWS (Build-related): Mention the improvement.
702
2012-09-06 Eric Blake <eblake@redhat.com>
704
build: default to --enable-gcc-warnings for git tree
705
Anyone developing on coreutils can be assumed to have a new enough
706
environment, such that enabling gcc warnings by default will be
707
useful. Tarballs still default to no warnings, and the defaults
708
can still be overridden with --disable-gcc-warnings.
710
* configure.ac (gl_gcc_warnings): Set default based on environment.
711
Suggested by Bernhard Voelker.
713
2012-09-06 Pádraig Brady <P@draigBrady.com>
715
nproc: disallow non option command line parameters
716
* src/nproc.c (main): Error if any non option parameters.
717
* NEWS: Mention the change in behavior.
719
2012-09-06 Jim Meyering <meyering@redhat.com>
721
tail,stat: add support for VZFS
722
* src/stat.c (human_fstype): Add a case: vzfs, 0x565A4653 (local).
723
Reported by Jens Rosenboom in http://bugs.gnu.org/12356
724
* NEWS (Improvement): Mention it.
726
2012-09-05 Jim Meyering <meyering@redhat.com>
728
rm: be more careful when using a replacement errno value
729
* src/remove.c (excise): Tighten the test for when we defer to an
730
old errno value: instead of relying solely on an FTS_DNR (unreadable
731
directory) failure, also test current and replacement errno values.
732
This change would also have solved the problem addressed by commit
733
v8.19-106-g57dd067. For more info, see http://bugs.gnu.org/12339#113
735
rm: avoid bogus diagnostic for a slash-decorated symlink-to-dir
736
These commands would evoke an invalid diagnostic:
737
$ mkdir d && ln -s d s && env rm -r s/
738
rm: cannot remove 's': Too many levels of symbolic links
739
remove.c was stripping trailing slashes from "s/" before passing
740
the name to "rm". But a trailing slash may change the semantics,
741
and thus should not be stripped.
742
* src/remove.c (rm_fts): Do not strip trailing slashes.
743
* tests/rm/v-slash.sh: Adapt to new expected output.
744
* gnulib: Update to latest, for an improved fts.c that merely
745
normalizes trailing slashes.
746
Reported by Paul Eggert in discussion of http://bugs.gnu.org/12339
748
tests: depend on the programs we're testing
749
* tests/local.mk ($(TEST_LOGS)): Depend on $(PROGRAMS), so that
750
tests are rerun when any program is rebuilt. Technically, we could
751
specify precisely which few programs are dependents of each test,
752
but that can come later, if deemed worth the trouble and maintenance
753
burden. Also, there is the issue of the primary program(s) being
754
tested (i.e., those itemized via print_ver_) versus those that are
755
tested incidentally: for example, nearly every test exercises "rm"
756
when its clean-up code removes files.
758
2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com>
760
maint: fix a spurious syntax-check failure
761
* cfg.mk (exclude_file_name_regexp--sc_file_system): Exempt
762
'init.cfg', not 'tests/init.cfg'.
764
tests: more resilient about tainted absolute srcdir path
765
* tests/init.cfg (stty_reversible_init_): Quote '$abs_top_srcdir'
767
(fiemap_capable_): Quote '$abs_srcdir' properly.
768
(require_dirent_d_type_): Likewise.
770
maint: fix syntax checks 'sc_root_tests'
771
* cfg.mk: Don't work by trying to parse the (now gone) file
772
'tests/Makefile.am'; rather, use the contents of the make variable,
773
$(all_root_tests), introduced few commits ago.
774
Fix a few unrelated cosmetic issues while at it.
776
maint: avoid a spurious syntax-check error
777
* cfg.mk (exclude_file_name_regexp--sc_prohibit_test_backticks): Exempt
778
'tests/local.mk' rather than 'tests/Makefile.am'.
780
2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com>
782
maint: vc_exe_in_TESTS should actually be a syntax check
783
Because it requires the presence of the '.git' directory, that is,
784
can be run only for maintainers working from checked-out sources.
786
* tests/local.mk (vc_exe_in_TESTS): Rename and move ...
787
* cfg.mk (sc_tests_list_consistency): ... here, with minor adjustments.
789
2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com>
791
build: remove two now-useless convenience targets
792
* src/local.mk (built_programs.list, all_programs.list): These.
794
tests: put test-suite.log back in 'tests/'
795
* tests/local.mk (TEST_SUITE_LOGS): Define to 'tests/test-suite.log'.
797
build: don't use recursive make for tests/ subdirectory
798
* Makefile.am (SUBDIRS): Remove 'tests'.
799
(include): The '$(top_srcdir)/tests/local.mk' file.
800
(check-root): Remove this convenience target, it's no longer needed
801
now that the "real" check-root target once in 'tests/Makefile' will
802
land in the top-level makefile.
803
* configure.ac (AC_CONFIG_FILES): Remove 'tests/Makefile'.
804
* tests/Makefile.am: Rename ...
805
* tests/local.mk: ... like this, with a lot of adjustments.
806
* tests/init.cfg: Move ...
807
* init.cfg: ... here. This is necessary, for a limitation of the
808
gnulib-provided 'tests/init.sh', which unconditionally look for
809
'init.cfg' in the $(srcdir) directory.
810
* tests/*/*.sh: Adjust: expect init.sh to be in '$srcdir/tests',
811
not in '$srcdir', and extend $PATH with './src', not with '../src'.
812
* tests/Coreutils.pm: Adjust similarly.
813
* tests/pr/pr-tests.pl ($pfx): Likewise.
815
2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com>
817
maint: list of names of built programs available in the Makefiles
818
This is just a preparatory refactoring in view of future changes.
820
* configure.ac (AC_SUBST): New 'built_programs'.
821
* tests/Makefile.am (AM_TESTS_ENVIRONMENT): Simply define the exported
822
variable 'built_programs' to the expansion of the '$(built_programs)'
823
AC_SUBST'd make variable.
824
(.built-programs): Remove this now-unneeded convenience target.
825
(CLEANFILES, check_DATA): Delete, no longer needed.
827
2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com>
829
maint: remove anachronistic syntax-check
830
* cfg.mk (sc_no_exec_perl_coreutils): This. Our new testsuite
831
layout (perl tests having '.pl' suffix, shell tests having '.sh'
832
suffix) makes it basically impossible to run into the issue this
833
check guarded against.
835
maint: remove duplicated declaration of the 'sc_check-AUTHORS' target
838
2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com>
840
tests: remove the unused 'root-hint' target
841
* tests/Makefile.am (root-hint): Here. The interested user can see
842
the reasons why some tests are skipped by looking at the messages
843
they display on the console; here's an excerpt:
846
PASS: misc/id-groups.sh
847
id-setgid.sh: skipped test: must be run as root
848
SKIP: misc/id-setgid.sh
851
PASS: df/total-verify.sh
852
2g.sh: skipped test: very expensive: disabled by default
856
Clear enough, and more specific and precise that a generic "some tests
857
might need to be run as root" message. And if that user is interested
858
in making those tests run anyway, he'll just take a look to the README
859
files to look for info. So there's no reason to pollute the stdout
860
with another "hint" that is subsumed by those messages, and that might
863
Moreover, and possibly more importantly, that hint wasn't being
864
displayed anyway, even before this change! That's because the
865
'root-hint' target was listed as prerequisite for the 'check-recursive'
866
target, which however was not a dependency of the 'check' target in
867
'tests/Makefile.am', because that file contains no $(SUBDIRS)
870
2012-09-05 Stefano Lattarini <stefano.lattarini@gmail.com>
872
tests: use suffix, not exec-bit, to tell which files are tests
873
* tests/Makefile.am (vc_exe_in_TESTS): Adjust to look, in the 'tests/'
874
subdirectory, for files that have one of the extensions listed in
875
$(TEST_EXTENSIONS), rather than for executable files.
877
maint: make vc_exe_in_TESTS also work in VPATH builds
878
* tests/Makefile.am (vc_exe_in_TESTS): It is easy to adjust this
879
recipe to also work in VPATH setups, also thanks to modifications
880
done by previous changes.
882
maint: remove useless dependency for vc_exe_in_TESTS
883
* tests/Makefile.am (vc_exe_in_TESTS): No need to depend on Makefile:
884
this target is .PHONY, so it is always run anyway.
886
maint: avoid parsing of Makefile.am from vc_exe_in_TESTS
887
* tests/Makefile.am (TESTS): Rename ...
888
(all_tests): ... like this, so that we'll still be able to know the
889
complete list of our tests even if the user overrides TESTS from the
890
command line (which he's allowed to do by the test harness API).
891
(root_tests): Rename ...
892
(all_root_tests): ... like this, for similar reasons.
893
(TESTS, root_tests): Redefine their defaults to to $(all_tests) and
894
$(all_root_tests) respectively.
895
(vc_exe_in_TESTS): It can now safely use $(all_tests) to get the
896
complete list of test cases according to the Makefile, instead of
897
having to resort to "parsing" of Makefile.am.
898
(EXTRA_DIST): Use $(all_tests), not $(TESTS).
899
(v_, w_): Delete, no longer needed.
901
build: use 'check-local' to extend the 'check' target
902
* tests/Makefile.am (check-local): Here, by making this depend
903
on 'vc_exe_in_TESTS' ...
904
(check): ... rather than making this depend on them. While the old
905
usage worked, it relied on an implementation detail rather than on
907
* src/local.mk (check-local): Similarly, make this depend on
908
'check-README' and 'check-duplicate-no-install' ...
909
(check): ... rather than on this.
911
2012-09-02 Stefano Lattarini <stefano.lattarini@gmail.com>
913
scripts: autotools-install: allow user-specified make program
914
* scripts/autotools-install: Honor $MAKE. This might be useful
915
on systems where the make implementation available in $PATH
916
by default is limited (Solaris) or broken (HP-UX).
918
scripts: autotools-install: style and portability fixes
919
* scripts/autotools-install: Here.
921
2012-09-02 Benno Schulenberg <bensberg@justemail.net>
923
touch: line up long option in --help text
924
* src/touch.c (usage): Indent --time=... to line up with all of the
927
2012-09-02 Jim Meyering <meyering@redhat.com>
929
maint: disable sc_proper_name_utf8_requires_ICONV test
930
It would still pass, but would print many diagnostics like this:
931
Can't open src/Makefile.am: No such file or directory.
932
* cfg.mk (local-checks-to-skip): Temporarily disable a test.
933
This test will need to be adapted to work with a non-recursive
934
build set-up, in which there is no Makefile.am alongside each program.
935
Reported by Bernhard Voelker.
937
maint: accommodate upcoming, expanded list of warnings from gnulib
938
* configure.ac: Disable a new gcc warning, -Wsuggest-attribute=format,
939
since it triggers on copy.c (which I'm not inclined to adjust) and
940
factor.c's use of vfprintf which would appear to require a change
943
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
945
maint: fix build_programs definition not to use "make -C src ..."
946
* dist-check.mk (built_programs): There's no need to issue recursive
947
make calls in 'src/' to define this (in fact, that works no longer
948
now that 'src/Makefile.am' is gone). Simply define this to the sorted
949
contents of $(bin_PROGRAMS), with the 'src/' prefix and the $(EXEEXT)
950
suffix (if any) removed. Reported by Jim Meyering.
952
2012-09-01 Jim Meyering <meyering@redhat.com>
954
build: restore handling of space-tainted build directory name
955
* man/local.mk: With commit v8.19-84-g08cf455, man page creation
956
would fail when using a build directory name containing e.g.,
959
build: make each man/prog.1 depend on src/prog, not src/prog.c
960
* man/local.mk: Creating a prog.1 man page requires running
962
List the exceptions, e.g., install.1 depends on src/ginstall
963
and arch.1 depends on src/uname.
965
maint: check-programs-vs-x: avoid a new syntax-check failure
966
* cfg.mk (check-programs-vs-x): The new variable,
967
$(all-progs-but-lbracket) contains libstdbuf.so, and it does
968
not have a corresponding .x file, so exempt it.
970
maint: avoid distcheck failure by properly cleaning $(ALL_MANS)
971
* man/local.mk (distclean-local): Remove $(ALL_MANS) when doing
972
a VPATH build. If it's not done, generated manpages can be left
973
around in the build directory after a "make distclean", causing
974
failures in "make distcheck".
976
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
978
maint: port manpages generation to VPATH builds
979
* man/local.mk (.x.1): Use '$(MKDIR_P)' rather than bare 'mkdir'
980
where appropriate. Reported by Jim Meyering.
982
2012-09-01 Jim Meyering <meyering@redhat.com>
984
build: fix VPATH issues in C compilation
985
* src/local.mk (AM_CPPFLAGS): Add 'src' to the directories that
986
are searched for #include'd files.
988
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
990
maint: simplify declaration of "libexec" programs
991
* configure.ac: No need to use 'gl_ADD_PROG' and an indirection
992
variable '$optional_pkglib_progs' to declare the 'libstdbuf.so'
993
"libexec" program; the decision to whether compile that program
994
is not up to the user, but it only and simply depends on whether
995
the 'stdbuf' "bin" program is to be built or not.
997
build: $(mandeps): new, to factor out man pages dependencies
998
* man/local.mk (mandpep): Rename ...
999
(mandeps): ... like this. Make $(ALL_MANS) depend on its
1000
content. List 'src/system.h' in here, instead of making
1001
$(ALL_MANS) depend on it explicitly.
1002
(man/*.1): No need to list $(mandep) among the dependencies
1005
build: enhance man pages cleaning and dependencies
1006
* man/local.mk: All of the manpages should depend on 'src/system.h',
1007
and all of them should be cleaned by "make maintainer-clean", that
1008
is, added to MAINTAINERCLEANFILES. Make it be so.
1009
Some minor cosmetic tweakings and reorderings while at it.
1011
build: simplify: get rid of yet some more indirection variables
1012
* configure.ac: Adjust and improve few comments.
1014
(man1_MANS): ... to this.
1015
Ensure it isn't initialized in all Makefiles (which would lead
1016
to spurious errors), by calling AM_SUBST_NOTMAKE on it.
1017
Also call AM_SUBST_NOTMAKE on 'EXTRA_MANS', for consistency.
1018
* man/local.mk (man1_MANS): Simply define to '@man1_MANS@'.
1020
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1022
build: rename dist_man1_MANS -> man1_MANS
1023
And list $(man1_MANS) directly in $(EXTRA_DIST) instead.
1024
This is similar to what is done for $(EXTRA_MANS), thus
1025
improving consistency and readability.
1027
* man/local.mk (dist_man1_MANS): Rename ...
1028
(man1_MANS): ... like this.
1029
(EXTRA_DIST): Add its contents.
1030
* cfg.mk (check-x-vs-1): Fix a botched comment.
1032
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1034
build: one less unneeded make variable
1035
* man/local.mk (man_aux): This was used only once, so inline its
1036
expansion at its sole point of use ...
1037
(EXTRA_DIST): ... here.
1039
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1041
build: simplify and make more portable to non-GNU make
1042
The AC_SUBST'd variable '$(NO_INSTALL_PROGS_DEFAULT)' is only used in
1043
makefile expressions expanding the list of manual pages that are not
1044
built by default (but might need to be when a distribution tarball
1045
is created). Such expressions exploited a feature of make variable
1046
expansion -- namely, $(VAR:%=dir/%.x) -- that, while seemingly quite
1047
portable in practice, is not POSIX-conforming, and could break on
1048
lesser vendor make implementations. So kill two birds with one stone,
1049
by getting rid of the $(NO_INSTALL_PROGS_DEFAULT) intermediate variable
1050
and improving makefile portability in the process.
1052
While at it, we also clean up some other minor naming inconsistency
1053
and useless indirection.
1055
* configure.ac (NO_INSTALL_PROGS_DEFAULT): Don't define or AC_SUBST
1056
anymore; instead ...
1057
(EXTRA_MANS): ... define and AC_SUBST these.
1058
* man/local.mk (extra_man_1): Rename ...
1059
(EXTRA_MANS): ... like this, explicitly making clear it's AC_SUBST'd.
1060
(extra_man_x): It's used only once, no need to define it; just inline
1061
its only expansion where needed.
1062
(EXTRA_DIST): Adjust.
1063
(ALL_MANS): New, union of $(EXTRA_MANS) and $(dist_man1_MANS).
1064
* cfg.mk (check-x-vs-1, sc_option_desc_uppercase): Rely on $(ALL_MANS)
1065
rather than on $(NO_INSTALL_PROGS_DEFAULT) and $(dist_man1_MANS).
1067
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1069
build: simplify: get rid of some indirection variables
1070
The code deciding which coreutils programs to build (depending on
1071
defaults, system capabilities, and user requests) is overly complex
1072
and rather confusing. Let's begin simplifying it by removing some
1073
non-strictly-necessary indirection variables.
1075
* configure.ac: Adjust and improve few comments.
1076
(OPTIONAL_BIN_PROGS, OPTIONAL_PKGLIB_PROGS): Rename ...
1077
(bin_PROGRAMS, pkglibexec_PROGRAMS): ... like these, respectively.
1078
Ensure they aren't initialized in all Makefiles (which would lead
1079
to spurious errors), by calling AM_SUBST_NOTMAKE on them.
1080
* src/local.mk: Adjust and improve few comments.
1081
(bin_PROGRAMS, pkglibexec_PROGRAMS): Simply define
1082
to the corresponding '@substitution@'.
1084
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1086
maint: update gitignore entries
1087
* src/.gitignore: Here, adding the '.dirstamp' file generated
1088
by the C compilation rules.
1090
maint: fix one stray reference to src/Makefile.am
1091
* build-aux/gen-lists-of-programs.sh: In heading comments here.
1093
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1095
maint: fix and simplify maintainer checks
1096
Some of them can be simplified after the previous changes, some
1097
of them have been downright broken by them, and need fixing.
1099
* src/local.mk: Adjust some comments.
1100
(EXTRA_DIST): Avoid SPACE-TAB sequences.
1101
(src/dircolors.h, src/fs.h src/fs-is-local.h): Avoid 8-SPACES
1103
(_sc_check-AUTHORS): Move ...
1104
* cfg.mk (sc_check-AUTHORS): ... here (superseding the old rule
1105
with the same name, that was just a recursive invocation to it).
1106
Adjust the paths of the invoked coreutils programs, to account
1107
for the fact that this rule now runs in the top-level build dir,
1108
not in the 'src/' subdir. Other minor cosmetic adjustments.
1109
(ALL_RECURSIVE_TARGETS): Remove 'sc_option_desc_uppercase' and
1110
'sc_man_file_correlation', since they no longer entail any
1111
recursive make invocation.
1112
(sc_option_desc_uppercase): Remove dependency from $(all_programs):
1113
it isn't actually needed.
1114
(check-programs-vs-x): Likewise. Also, fix heading comments to
1115
truly reflect what this check does.
1116
(all-progs-but-lbracket): Strip the 'src/' prefix from each entry
1117
in the list of programs; this avoids a spurious failure in the
1118
'check-programs-vs-x' recipe.
1119
(.PHONY): No need to list targets 'sc_man_file_correlation' and
1120
'sc_option_desc_uppercase': they are automatically declared phony
1121
by 'maint.mk', being recognized as syntax checks.
1123
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1125
maint: remove unused target 'install-root'
1126
It was unneeded and broken since the removal of 'su' from GNU
1127
coreutils, in commit v8.17-16-g928dd73 of 2012-06-06, "su: remove
1128
program (util-linux is now the best source for it)".
1130
* Makefile.am (install-root): Remove.
1131
(ALL_RECURSIVE_TARGETS): Update.
1133
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1135
maint: improve remake rules for maintainers
1136
This is a follow up on today's commit v8.19-60-g4f2e62b".
1138
* Makefile.am ($(top_srcdir)/m4/cu-progs.m4,
1139
$(srcdir)/src/cu-progs.mk): New, generate these files from the
1140
'build-aux/gen-lists-of-programs.sh', the same way it's done
1141
from the bootstrap script.
1142
* bootstrap.conf (bootstrap_post_import_hook): Add comment about
1143
the necessity to keep those new rules synced with the commands
1144
here. Enhance those commands so to that the generated files are
1147
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1149
build: fix generation of manpages for programs not built by default
1150
* src/local.mk (dist-hook): Don't use this to ensure all the
1151
programs, even the ones disabled by default or by the user, are
1152
built (doing so is required to ensure the distributed manpages
1153
are properly built). This would build those programs too late
1154
anyway, causing errors like:
1157
make dist-xz am__post_remove_distdir='@:'
1158
make[1]: Entering directory `~/src/coreutils'
1160
help2man: can't get '--help' info from man/arch.td/arch
1161
make[1]: *** [man/arch.1] Error 127
1162
make[1]: Leaving directory `~/src/coreutils'
1163
make: *** [dist] Error 2
1166
* man/local.mk (extra_man_x, extra_man_1): define these ...
1167
($(extra_man_1)): ... and make this depend on $(all_programs).
1168
(EXTRA_DIST): Adjust.
1169
Adjust some comments as well.
1171
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1173
build: don't use recursive make to build the 'src' subdirectory
1174
* Makefile.am (SUBDIRS): Remove 'src'. Ensure '.' is listed before
1175
'tests' and 'gnulib-tests'.
1176
(dist-hook): Adjust: we must now tweak the top-level Makefile.in
1177
in $(distdir), not the one in the 'src/' subdir (which is gone).
1178
(include): The '$(top_srcdir)/src/local.mk' file.
1179
* build-aux/gen-lists-of-programs.sh: Adjust the generation of the
1180
automake input fragment.
1181
* tests/Makefile.am (.built-programs): Adjust.
1182
* cfg.mk (all_programs): Remove this convenience rule; it's no
1183
longer needed, now that we can rely directly on the contents of
1185
(sc_option_desc_uppercase, check-programs-vs-x:): Adjust lists
1186
of prerequisites accordingly.
1187
(all-progs-but-lbracket): Simplify definition accordingly.
1188
* configure.ac ($OPTIONAL_BIN_PROGS): Adjust definition.
1189
($OPTIONAL_PKGLIB_PROGS): Likewise.
1190
($NO_INSTALL_PROGS_DEFAULT): Tweak definition, for consistency.
1191
(AC_CONFIG_FILES): Remove 'src/Makefile'.
1192
* src/Makefile.am: Rename ...
1193
* src/local.mk: ... like this, with a lot of adjustments. In
1195
(all_programs): ... remove this now-unneeded convenience target.
1197
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1199
build: refactor how lists of coreutils programs are defined
1200
This is in preparation of future changes. Still, this patch
1201
leaves the build system in a better shape; true, with more
1202
indirections, but also with less convoluted and brittle hacks.
1204
Unfortunately, this commit also makes some rebuild rules
1205
incomplete; that will son be fixed by follow-up patches.
1207
* build-aux/gen-lists-of-programs.sh: New, generates autoconf
1208
and automake input fragments that define "lists" of all coreutils
1209
programs, with further distinctions about how and when these
1210
programs should be built (by default; if the system is capable
1211
enough; only if the user asks for them explicitly). This is
1212
useful to avoid duplicating the definitions of these lists among
1213
several files (at least 'configure.ac' 'src/Makefile.am'); such
1214
duplication had proved a source of inconsistencies and bugs in
1215
the past. And the pre-existing way to avoid such duplication,
1216
as implemented in 'configure.ac' before this patch, was overly
1217
complex and brittle.
1218
* Makefile.am (EXTRA_DIST): Distribute the new script.
1219
* bootstrap.conf (bootstrap_post_import_hook): Run the new script
1220
to generate 'm4/cu-progs.m4' and 'src/cu-progs.mk'.
1221
* .gitignore: Ignore those files.
1222
* configure.ac: Include 'm4/cu-progs.m4', and decidedly simplify
1223
most of the program lists definition and processing accordingly.
1224
* src/Makefile.am: Similarly include 'src/cu-progs.mk', containing
1225
definition of variables $(default__progs), $(no_install__progs)
1226
and $(build_if_possible__progs). Accordingly ...
1227
(no_install__progs, build_if_possible__progs): ... remove.
1228
(EXTRA_DIST): Adjust definition.
1231
2012-09-01 Stefano Lattarini <stefano.lattarini@gmail.com>
1233
maint: add our 'bootstrap_post_import_hook' function
1234
This is in preparation of future changes.
1236
* bootstrap.conf (bootstrap_post_import_hook): New, will be executed
1237
by bootstrap after gnulib-tool but before the autotools.
1238
Move creation of dummy ChangeLog into it.
1240
2012-08-31 Eric Blake <eblake@redhat.com>
1242
build: work with new glibc when not optimizing
1243
Starting with glibc 2.15, the system headers refuse to compile
1244
unconditional use of FORTIFY_SOURCE if optimization is disabled
1245
but -Werror is in effect.
1247
* configure.ac (FORTIFY_SOURCE): Make conditional.
1249
2012-08-31 Jim Meyering <meyering@redhat.com>
1251
scripts: fix the Signed-off-by:-prohibiting hook to actually work
1252
* scripts/git-hooks/commit-msg: Fix new test: we're searching a
1253
multi-line buffer, so add the //m modifier.
1255
2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com>
1257
maint: make required gettext version consistent
1258
* bootstrap.conf ($buildreq): Require gettext >= 0.18.1, consistently
1259
with the call to AM_GNU_GETTEXT_VERSION in configure.ac.
1261
2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com>
1263
maint: get rid of obsolete script 'cvsu'
1264
It was useful only back when coreutils used CVS as its version
1267
* build-aux/cvsu: Delete.
1268
* Makefile.am (EXTRA_DIST): Remove it.
1269
* cfg.mk: Remove the two exemptions for this removed file.
1271
2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com>
1273
build: don't use '$<' in non-suffix rules
1274
* src/Makefile.am (fs-def): Here: it's not portable to some non-GNU
1275
make implementations.
1277
maint: more uses of $(ASSORT)
1278
* src/Makefile.am (fs-kernel-magic, fs-magic): Here, instead of
1279
inlining its expansion "LC_ALL=C sort".
1281
maint: remove unused variable in src/Makefile.am
1282
* src/Makefile.am (editpl): This.
1284
2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com>
1286
build: don't use foo_LDADD if there's no foo program
1287
For example, instead of factoring out the extra linker flags needed
1288
by 'cp', 'mv' ind 'install' into a '$(copy_LDADD)' variable, factor
1289
them out in a '$(copy_ldadd)' variable.
1291
Partly a minor cleanup, partly a preparation for future changes.
1293
* src/Makefile.am (copy_LDADD): Rename ...
1294
(copy_ldadd): ... like this.
1295
(remove_LDADD): Rename ...
1296
(remove_ldadd): ... like this.
1297
All uses adjusted. Some comments updated.
1299
2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com>
1301
build: some refactorings in cfg.mk
1302
Partly a minor cleanup, partly a preparation for future changes.
1304
* Makefile.am (all_programs): Rename ...
1305
(all-progs-but-lbracket): ... like this, and re-define it to expand
1306
at make time rather than only at recipe time (i.e., using $(shell ...)
1308
(check-programs-vs-x): Adjust.
1310
2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com>
1312
build: move definition of 'all_programs' in cfg.mk
1313
* Makefile.am: Move definition of target 'all_programs' from here ...
1314
* cfg.mk: ... to here, which is the only file where it is used.
1316
2012-08-31 Jim Meyering <meyering@redhat.com>
1318
build: reenable just-moved/broken syntax-check rule
1319
* cfg.mk (sc_option_desc_uppercase): Now that this rule lives in cfg.mk,
1320
we must search man/*.1, not "*.1".
1321
Reported by Bernhard Voelker.
1323
2012-08-31 Stefano Lattarini <stefano.lattarini@gmail.com>
1325
maint: fixup: don't try to distribute a now-removed file
1326
* tests/Makefile.am (EXTRA_DIST): Drop 'check.mk', which has been
1327
removed (being merged into 'tests/Makefile.am') by recent changes.
1329
2012-08-31 Erik Auerswald <auerswal@unix-ag.uni-kl.de>
1331
doc: escape double quotes in autotools-install --help
1332
* scripts/autotools-install: Fix --help so that we actually print
1333
the double quotes around "make check", in two places.
1335
2012-08-31 Jim Meyering <meyering@redhat.com>
1337
scripts: add autotools-install, for those stuck with outdated tools
1338
* scripts/autotools-install: New script, so you can always build
1339
from git-cloned sources, even when they require bleeding edge
1340
m4, autoconf, automake, etc.
1342
2012-08-31 Bernhard Voelker <mail@bernhard-voelker.de>
1344
build: fix syntax-check rules broken by test-added .sh/pl suffixes
1345
* cfg.mk: We exempt a few test files that would otherwise trigger
1346
false-positive matches in syntax-check rules. The recent change
1347
that added a .sh or .pl suffix to each test script made it so
1348
some of the exclusion regexps would no longer match.
1349
Include the required \.sh suffix in each such regexp, too.
1351
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1353
tests: get rid of the 'shell-or-perl' auxiliary script
1354
It's now easier and faster to simply run the perl ans shell test
1355
scripts directly with the appropriate interpreter and options.
1357
* tests/shell-or-perl: Delete.
1358
* tests/Makefile.am (EXTRA_DIST): Remove it.
1359
(SH_LOG_COMPILER): Re-define to invoke the correct shell.
1360
(PL_LOG_COMPILER): Re-define to invoke the correct perl
1362
(TESTSUITE_PERL_OPTIONS): ... with the correct options.
1363
(XPL_LOG_COMPILER): Use those options instead of inlining
1365
(LOG_COMPILER): Delete, no longer needed.
1367
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1369
tests: add .sh and .pl suffixes to shell and perl tests, respectively
1370
Not only this shrinks the size of the generated Makefile (from > 6300
1371
lines to ~3000), but will allow further simplifications in future
1374
* tests/Makefile.am (TEST_EXTENSIONS): Add '.sh' and '.pl'.
1375
(PL_LOG_COMPILER, SH_LOG_COMPILER): New, still defined simply to
1376
$(LOG_COMPILER) for the time being.
1377
(TESTS, root_tests): Adjust as described.
1378
* All tests: Rename as described.
1380
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1382
tests: detect missing perl at configure runtime
1383
* configure.ac (AM_CONDITIONAL): Set the conditional 'HAVE_PERL' to
1384
true if the configure-time checks (as run by gl_PERL) have been able
1385
to find a working perl.
1386
* tests/no-perl: New script, report a diagnostic about "missing perl"
1387
and exit with status 77.
1388
* tests/Makefile.am (EXTRA_DIST): Distribute it.
1389
(TESTSUITE_PERL): New, define to '$(PERL)' if a perl interpreter has
1390
been found at configure time (i.e., if the 'HAVE_PERL' automake
1391
conditional is true), and to '$(srcdir)/no-perl' otherwise.
1392
(LOG_COMPILER): Use $(TESTSUITE_PERL) instead of $(PERL).
1393
(XPL_LOG_COMPILER): Likewise.
1394
* tests/shell-or-perl: Simplify: no need to actually check whether
1397
tests: avoid use of '-T' in shebang line to enable perl taint mode
1398
* tests/rm/fail-eperm: Rename ...
1399
* tests/rm/fail-eperm.xpl: ... like this
1400
* tests/Makefile.am (TESTS): Adjust.
1401
(TEST_EXTENSIONS): New, list '.xpl'.
1402
(XPL_TEST_LOGS): New, run a perl test in tainted mode.
1403
* tests/shell-or-perl: Simplify this script: we no longer need to
1404
parse the shebang line and adjust the flags in the perl invocation
1407
build: require Automake >= 1.11.2
1408
Now that we use AM_TESTS_ENVIRONMENT, we must require
1410
* configure.ac (AM_INIT_AUTOMAKE): Bump version requirement to 1.11.2.
1411
* bootstrap.conf ($buildreq): Likewise.
1413
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1415
tests: prefer AM_TESTS_ENVIRONMENT over TESTS_ENVIRONMENT
1416
The latter should be reserved for user overrides.
1418
* tests/Makefile.am (TESTS_ENVIRONMENT): Rename ...
1419
(AM_TESTS_ENVIRONMENT): ... like this.
1421
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1423
tests: merge tests/check.mk into tests/Makefile.am
1424
The separation has become unnecessary after all the ancient
1425
'tests/*/Makefile.am' makefiles have been merged into the
1426
"more-top-level" one 'tests/Makefile.am'.
1428
* tests/check.mk: Merge ...
1429
* tests/Makefile.am: ... in here. Some comments tweaking while
1432
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1434
build: enable the 'subdir-objects' Automake option globally
1435
This is not strictly required now (it will be once we make more
1436
parts of the coreutils build system non-recursive), but enabling
1437
it early helps to ensure that we don't unwittingly introduce any
1438
incompatibility or subtle breakage later.
1440
* configure.ac (AM_INIT_AUTOMAKE): Add 'subdir-objects'.
1442
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1444
maint: update gitignore entries
1445
* doc/.gitinore: Here, adding the '.dirstamp' file generated by
1448
2012-08-30 Jim Meyering <meyering@redhat.com>
1450
build: factor out a little more re list of *.texi files
1451
We may well want to switch from checking all *.texi to
1452
checking only version-controlled .texi files, so encapsulate
1453
this concept in one place.
1455
* doc/local.mk (doc_srcdir): Delete. Use this instead:
1456
(texi_files): Define. All usages adjusted.
1458
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1460
maint: adjust syntax check 'sc_option_desc_uppercase'
1461
* cfg.mk (sc_option_desc_uppercase): Here, by grafting the 'man/'
1462
prefix to the manpages obtained from $(NO_INSTALL_PROGS_DEFAULT)
1463
and listed as prerequisites for this rule.
1465
maint: adjust syntax check 'check-x-vs-1'
1466
* cfg.mk (check-x-vs-1): Here, by stripping 'man/' prefix from
1467
$(dist_man1_MANS) entries before comparing them with the list of
1470
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1472
maint: move man-related syntax checks in cfg.mk
1473
This is more natural, now that the top-level Makefile has access to
1474
all the variables and rules once defined only in 'man/Makefile.am'
1476
* man/local.mk (all_programs, sc_option_desc_uppercase,
1477
sc_man_file_correlation check-x-vs-1, check-programs-vs-x): Move
1479
* cfg.mk: ... to here. Adjust some comments in the process.
1481
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1483
build: don't use recursive make to build the 'man' subdirectory
1484
* Makefile.am: Include 'man/local.mk'.
1485
(SUBDIRS): Remove 'man'.
1486
* configure.ac ($MAN): Adjust so that each of its entries has a leading
1488
(AC_CONFIG_FILES): Remove 'man/Makefile'.
1489
* man/Makefile.am: Rename ...
1490
* man/local.mk: ... like this. With further adjustments: each 'foo.1'
1491
target renamed like 'man/foo.1', each '../src/foo.c' dependency as
1492
'src/foo.c', and each '$(srcdir)' usage as '$(srcdir)/man'. Also ...
1493
(mandep): Adjust, removing the leading '../' component.
1494
Several whitespace adjustments while at it.
1495
(ASSORT): Remove, it's already defined in the top-level Makefile.am.
1496
* cfg.mk (sc_option_desc_uppercase, sc_man_file_correlation): Remove
1497
the associated recipes, they are now directly available from the
1498
included 'man/local.mk'. Actually, the other changes in this commit
1499
have made these recipes instable and not completely correct, but that
1500
will be fixed in later changes.
1502
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1504
build: rework some recipes in man/Makefile.am, for future changes
1505
This change is merely required to make future changes easier.
1507
In particular, since we are going to merge the contents of
1508
'man/Makefile.am' into the top-level Makefile, we need to avoid
1509
conflicts with the rules and variables in 'dist-check.mk', and
1510
to prepare for changes in the value of the '$*' variable as used
1511
in the recipe of the '.x -> .1' suffix rule.
1513
* man/Makefile.am (t, mapped_name): Delete, inlining their use ...
1514
(.1.x): ... in the recipe of this suffix rule. Other adjustments
1515
to prepare to changes in the value of the '$*' automatic variable.
1516
While at it, made more resilient about unlikely but possible failure.
1517
Adjust and reorder few comments.
1519
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1521
build: provide convenience target 'all_programs' also at top-level
1522
This will be mostly useful in future changes.
1524
* Makefile.am (all_programs): New, simply work by delegating to
1525
the same-named target in the 'src/' subdirectory.
1526
* cfg.mk (sc_option_desc_uppercase): Take advantage of it.
1527
(sc_man_file_correlation): Likewise.
1529
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1531
build: make a rule less dependent on exact source tree layout
1532
This is mostly a preparatory change in view of future ones.
1534
* man/Makefile.am (.x.1): Use '$(abs_top_builddir)/src' to access
1535
the 'src' directory.
1537
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1539
build: rely on VPATH capabilities in man/Makefile
1540
* man/Makefile.am: In all the 'foo.1' targets, no need to depend
1541
explicitly on '$(srcdir)/foo.x': the '.x.1' suffix rule takes care
1542
of that automatically.
1544
maint: typofix: s/it's/its/
1545
* man/Makefile.am: Here.
1547
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1549
build: rename common_dep -> mandep in man/Makefile
1550
This is mostly a preparatory refactoring in view of future changes.
1552
* man/Makefile.am (common_dep): Rename ...
1553
(mandep): ... like this.
1554
All usages adjusted.
1556
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1558
build: fix a stray usage of uninitialized $(ME)
1559
* man/Makefile.am (sc_option_desc_uppercase): Here.
1561
build: add an explanatory comment
1562
* man/Makefile.am (EXTRA_DIST): Describe portability issues of the
1563
idiom we now use. Reformat the definition a little while at it.
1565
maint: simplify definition of $MAN in configure.ac
1566
* configure.ac: Here, by making less use of 'sed' and 'tr' munging,
1567
and relying on a smarter and simpler shell loop instead.
1569
build: don't define $(SUFFIXES) explicitly
1570
* man/Makefile.am (SUFFIXES): Remove definition: Automake is smart
1571
enough to extract the list of suffixes from the '.x.1' suffix rule
1574
build: don't use recursive make to build the 'doc' subdirectory
1575
* doc/Makefile.am: Rename ...
1576
* doc/local.mk: ... like this. With further adjustments ...
1577
(info_TEXINFOS): Prepend 'doc/' to all '*.texi' files listed in
1579
(coreutils_TEXINFOS): Likewise, and rename ...
1580
(doc_coreutils_TEXINFOS): ... like this.
1581
(constants.texi): Rename ...
1582
(doc/constants.texi): ... like this. Adjust the recipe to avoid
1584
(MAINTAINERCLEANFILES): Adjust, and extend with '+=' rather than
1585
setting it with '='.
1587
(find_upper_case_var): Use '$@', not '$(ME)', in error messages.
1588
* Makefile.am: Include 'doc/local.mk'.
1589
(SUBDIRS): Remove 'doc'.
1590
* configure.ac (AC_CONFIG_FILES): Remove 'doc/Makefile'.
1592
build: use 'check-local' to extend the 'check' target
1593
* doc/Makefile.am (check-local): Here, by making this depend
1594
on 'check-texinfo' ...
1595
(check): ... rather than this. While the old usage worked, it
1596
did so for an implementation detail rather than a documented
1597
behaviour, so relying on that was riskier a "unclean".
1599
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1601
build: prefer '$(top_srcdir)/doc' over '$(srcdir)' in doc Makefile
1602
This is just a preparatory refactoring that will become useful in
1603
a future change (in which the doc/Makefile.am makefile will be merged
1604
with the top-level one).
1606
* doc/Makefile.am (doc_srcdir): New, define to '$(top_srcdir)/doc'.
1607
Use it throughout instead of "bare" '$(srcdir)'.
1609
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1611
build: add extra *.texi files to coreutils_TEXINFOS, not EXTRA_DIST
1612
* doc/Makefile.am (coreutils_TEXINFO): List them here, instead of ...
1613
(EXTRA_DIST): ... listing them here. This ensures the rebuild rules
1614
will be more faithful.
1615
($(DVIS), $(INFO_DEPS)): No need to depend on $(EXTRA_DIST) now.
1617
maint: slightly improve .gitignore
1618
* .gitignore: Ignore '.deps' only when it's a directory.
1619
Ignore '*.trs' only if they are in a subdirectory of the
1622
build: don't abuse Automake internals (with its 'check-am' rule)
1623
* tests/check.mk (check-am): Remove; obtain the same effect by moving
1624
its dependency '.built-programs' ...
1625
(check_DATA): ... to this variable.
1627
2012-08-30 Jim Meyering <meyering@redhat.com>
1629
scripts: git commit message hook: prohibit use of "Signed-off-by:"
1630
* scripts/git-hooks/commit-msg: Reject a commit log message that
1631
contains "Signed-off-by:".
1633
2012-08-30 Stefano Lattarini <stefano.lattarini@gmail.com>
1635
tests: remove useless defn of REPLACE_GETCWD from TESTS_ENVIRONMENT
1636
It's last use had been removed in commit v8.12-3-g3ed91fc of 2011-04-28,
1637
"tests: remove useless test: misc/pwd-unreadable-parent".
1639
* tests/check.mk (TESTS_ENVIRONMENT): Adjust.
1641
2012-08-30 Nick Alcock <nick.alcock@oracle.com>
1643
tests: fix misc/sort-exit-early to skip if root
1644
* tests/misc/sort-exit-early: skip_if_root_ as this test
1645
requires an unwritable input and an unreadable output.
1647
2012-08-29 Jim Meyering <meyering@redhat.com>
1649
tail,stat: improve support for ZFS
1650
This change enables tail -f to use inotify and lets
1651
stat -f --format=%T report the file system type name, "zfs".
1652
* src/stat.c (human_fstype): Add a case: zfs, 0x2fc12fc1.
1653
* NEWS (Improvements): Mention it.
1654
* THANKS.in: Update.
1655
Reported by Raimonds Miltins in http://bugs.gnu.org/12301.
1657
2012-08-26 Jim Meyering <meyering@redhat.com>
1659
build: update gnulib submodule to latest
1661
maint: stop using @acronym{...} in texinfo sources
1662
* doc/coreutils.texi: Remove all uses of @acronym{...},
1663
per recommendation by Karl Berry.
1664
* doc/perm.texi: Likewise.
1665
* cfg.mk (local-checks-to-skip): Remove exemption, enabling
1666
the @acronym{-prohibiting syntax-check rule.
1668
tests: don't require @acronym{...} around POSIX
1669
* doc/Makefile.am (check-texinfo): Remove POSIX-checking part.
1671
2012-08-26 Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
1673
df: allow translators to reorder "1K-blocks" header
1674
* src/df.c (get_header): Mark two "%s-%s" strings for translation
1675
and give translators a hint what each is for.
1677
2012-08-24 Ondrej Oprala <ooprala@redhat.com>
1679
md5sum, sha*sum: add --tag to output a format indicating the algorithm
1680
The format used is the BSD traditional format which looks like:
1681
MD5 (/dev/null) = d41d8cd98f00b204e9800998ecf8427e
1683
* NEWS: Add new feature info.
1684
* doc/coreutils.texi (md5sum invocation): Add detailed information
1685
about the new --tag option.
1686
* src/md5sum.c: Add the new --tag option for BSD-style output.
1687
(bsd_split_3): Add ESCAPED_FILENAME parameter.
1688
(print_filename): New function refactored from main().
1689
(filename_unescape): New function refactored from split_3().
1690
* tests/misc/md5sum-bsd: Add tests for the new feature.
1692
2012-08-23 Rob Day <robertkday@gmail.com>
1694
rm: fix the new --dir (-d) option to work with -i
1695
* src/remove.c (prompt): Hoist the computation of is_empty, since we'll
1696
need it slightly earlier.
1697
Before, this function would arrange to fail with EISDIR when processing
1698
a directory without --recursive (-r). Adjust the condition to exempt
1699
an empty directory when --dir has been specified.
1701
* tests/rm/d-3: New file, to ensure that rm -d -i dir works.
1702
* tests/Makefile.am (TESTS): Add it.
1703
* NEWS (Bug fixes): Mention it.
1704
* THANKS.in: Update.
1705
Reported by Michael Price in http://bugs.gnu.org/12260
1707
2012-08-22 Bernhard Voelker <mail@bernhard-voelker.de>
1709
tests: correct print_ver_ arguments and add a rule to enforce this
1710
We use print_ver_ to run "PROG --version" for each program under
1711
test. Some tests have been derived from others, while the
1712
argument(s) to print_ver_ have not been adapted.
1713
Add a new cfg.mk rule to prohibit this.
1715
* cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
1716
New rule, to prohibit a test script from calling print_env_ for a
1717
program not actually used by that test.
1718
* tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/
1719
* tests/cp/acl: s/\(print_ver_\) mv/\1 cp/
1720
* tests/cp/capability: s/\(print_ver_\) ls/\1 cp/
1721
* tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/
1722
* tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/
1723
* tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/
1725
2012-08-21 Ondrej Oprala <ooprala@redhat.com>
1727
du: handle bind-mounted directory cycles gracefully
1728
Before this change, a directory cycle induced by a bind mount
1729
would be treated as a fatal error, i.e., probable disk corruption.
1730
However, such cycles are relatively common, and can be detected
1731
efficiently, so now du emits a descriptive warning and arranges
1734
* NEWS (Bug fixes): Mention it.
1735
* src/du.c: Include "mountlist.h".
1736
(di_mnt): New global set.
1737
(di_files): Rename global from di_set, now that there are two.
1738
(fill_mount_table): New function.
1739
(hash_ins): Add DI_SET parameter.
1740
(process_file): Look up each dir dev/ino pair in the new set.
1741
(main): Allocate, initialize, and free the new set.
1742
* tests/du/bind-mount-dir-cycle: Add a test for the fix.
1743
* tests/Makefile.am (TESTS): Add it.
1744
* THANKS.in: Update.
1745
This implements the proposal in http://bugs.gnu.org/11844.
1746
Originally reported in http://bugs.debian.org/563254 by Alan Jenkins
1747
and more recently as http://bugzilla.redhat.com/836557
1749
Improved by: Jim Meyering
1751
2012-08-20 Jim Meyering <meyering@redhat.com>
1753
maint: post-release administrivia
1754
* NEWS: Add header line for next release.
1755
* .prev-version: Record previous version.
1756
* cfg.mk (old_NEWS_hash): Auto-update.
1759
* NEWS: Record release date.
1761
2012-08-19 Paul Eggert <eggert@cs.ucla.edu>
1763
tests: port df/no-mtab-status to Solaris
1764
* tests/df/no-mtab-status: Include <mntent.h> in test program, so
1765
that the getmntent hack compilation fails on Solaris, as it
1766
should, since it's not compatible with Solaris. Reported by
1767
Stefano Lattarini in <http://bugs.gnu.org/12225>.
1769
2012-08-19 Jim Meyering <meyering@redhat.com>
1771
tests: avoid split/filter test failure on very low-mem system
1772
* tests/split/filter: Use xz -1 when compressing, to minimize
1773
memory usage. Otherwise, xz could fail due to insufficient
1774
virtual memory on a system with very little free memory.
1776
2012-08-18 Jim Meyering <meyering@redhat.com>
1778
tests: trigger the sort -u free-memory-read bug
1779
* tests/misc/sort-u-FMR: New file.
1780
* tests/Makefile.am (TESTS): Add it.
1781
* tests/misc/sort: Add the test here, too.
1782
* NEWS (Bug fixes): Mention it.
1784
tests: wrap the valgrind-requiring assertion in a function
1785
* tests/init.cfg (require_valgrind_): New function...
1786
* tests/misc/sort-stale-thread-mem: ...extracted from here.
1788
2012-08-18 Paul Eggert <eggert@cs.ucla.edu>
1790
sort: simpler fix for sort -u data-loss bug, and for a FMR bug
1791
This also fixes a free-memory-read (FMR) bug: when fillbuf's realloc
1792
of buf->buf frees the buffer into which saved_line.text points,
1793
the processing of that just-read longer line includes comparison
1794
against the saved line in freed memory.
1795
* src/sort.c (overlap): Remove.
1796
(fillbuf): Do not try to copy saved lines, as that is too risky
1797
in the presence of parallelism, reallocated buffers, etc.
1798
(sort): Invalidate any saved line before sorting a new batch.
1800
2012-08-17 Jim Meyering <meyering@redhat.com>
1802
sort: sort --unique (-u) could cause data loss
1803
sort -u could omit one or more lines of expected output.
1804
This bug arose because sort recorded the most recently printed line via
1805
reference, and if you were unlucky, the storage for that line would be
1806
reused (overwritten) as additional input was read into memory. If you
1807
were doubly unlucky, the new value of the "saved" line would not only
1808
match the very next line, but if that next line were also the first in
1809
a series of identical, not-yet-printed lines, then the corrupted "saved"
1810
line value would result in the omission of all matching lines.
1812
* src/sort.c (saved_line): New static/global, renamed and moved from...
1813
(write_unique): ...here. Old name was "saved", which was too generic
1814
for its new role as file-scoped global.
1815
(fillbuf): With --unique, when we're about to read into a buffer that
1816
overlaps the saved "preceding" line (saved_line), copy the line's .text
1817
member to a realloc'd-as-needed temporary buffer and adjust the line's
1818
key-defining members if they're set.
1819
(overlap): New function.
1820
* tests/misc/sort: New tests.
1821
* NEWS (Bug fixes): Mention it.
1822
* THANKS.in: Update.
1823
Bug introduced via commit v8.5-89-g9face83.
1824
Reported by Rasmus Borup Hansen in
1825
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/23173/focus=24647
1827
2012-08-16 Jim Meyering <meyering@redhat.com>
1829
tests: reverse args in Coreutils.pm-invoked diff, for consistency
1830
* tests/Coreutils.pm (_compare_files): Reverse diff arguments so
1831
that we invoke diff -c $expected $actual, which is consistent with
1832
how init.sh-using tests invoke "compare exp out".
1834
maint: correct a stale comment in sort.c
1835
* src/sort.c (fillbuf): Fix comment typo. x2nrealloc no longer
1836
doubles the size of its input buffer.
1838
maint: fix comment grammar to placate make syntax-check
1839
* src/remove.c (rm_fts): s/can not/cannot/
1841
2012-08-14 Krzysztof Goj <krzysztof.goj@gmail.com>
1843
rm: new option --dir (-d) to remove empty directories
1844
Add new option to rm (-d/--dir), which allows removal of
1845
empty directories, while still safely disallowing removal
1848
This improves compatibility with Mac OS X and BSD systems,
1849
which honor the -d option.
1851
* src/remove.c (rm_fts): Remove empty directories when requested.
1852
* src/remove.h (rm_options) [remove_empty_directories]: New member.
1853
* src/rm.c (long_opts, usage, main): Update usage and option parsing.
1854
(rm_option_init): Initialize the new member.
1855
* src/mv.c (rm_option_init): Initialize the new member.
1856
* tests/rm/d-1: New test case - successfully delete empty dir.
1857
* tests/rm/d-2: New test case - refuse to delete nonempty dir.
1858
* tests/Makefile.am (TESTS): Add them.
1860
2012-08-14 Bernhard Voelker <mail@bernhard-voelker.de>
1862
df: fail when the mount list is required but cannot be read
1863
* src/df.c (main): Add conditions to fail when the mount list cannot
1864
be read: this includes the cases when a file name argument is given
1865
and any of -a, -l, -t or -x is used.
1866
* doc/coreutils.texi: Document the additional error conditions.
1867
* tests/df/no-mtab-status: Add a new test.
1868
* tests/Makefile.am: Reference the new test.
1869
* NEWS: Mention the fix.
1871
2012-08-12 Jim Meyering <meyering@redhat.com>
1873
maint: post-release administrivia
1874
* NEWS: Add header line for next release.
1875
* .prev-version: Record previous version.
1876
* cfg.mk (old_NEWS_hash): Auto-update.
1879
* NEWS: Record release date.
1881
2012-08-08 Pádraig Brady <P@draigBrady.com>
1883
tests: fix validation of local file systems
1884
* tests/init.cfg (require_mount_list_): A new function
1885
to ensure we can read the list of file systems.
1886
(require_local_dir_): Call the above function, as otherwise
1887
the check is invalid.
1888
* tests/df/total-unprocessed: Ensure df can read the
1889
list of mounted file systems so that --local can be honored.
1891
2012-08-06 Jim Meyering <meyering@redhat.com>
1893
build: update gnulib submodule to latest
1895
tests: printf-surprise: avoid unwarranted failure on FreeBSD 9.0
1896
* tests/misc/printf-surprise: A VM size of 10,000KiB was too
1897
little in which to run "env printf ..." on FreeBSD 9.0-p3.
1898
Increase it to 15,000.
1900
2012-08-05 Jim Meyering <meyering@redhat.com>
1902
build: avoid sort link failure on Solaris 10
1903
* src/Makefile.am (sort_LDADD): Sort uses euidaccess, which may require
1904
whatever library configure deemed necessary to resolve the eaccess
1905
function, but no one told sort to link with that library.
1906
(sort_LDADD): Add $(LIB_EACCESS).
1908
2012-08-04 Bernhard Voelker <mail@bernhard-voelker.de>
1910
df: fix exit code and error messages with --total
1911
When the combination of the file system options with given files or
1912
devices does not lead to output, "df --total" would exit successfully
1913
although it should not.
1916
$ df --total --type=xfs / # when / is not an XFS file system
1917
$ df --total --local -t nfs DIR # nfs is remote per se ...
1918
$ df --total -t qwerty /dev/sdb5 # typo in file system type
1920
Furthermore, "df --total" would not print the error message "no file
1921
systems processed" when the file argument does not exist or is otherwise
1925
$ df --total __not_exist__
1927
These 2 bugs are present since --total was added by commit
1930
* src/df.c (get_dev): Do not set file_systems_processed to true when
1931
force_fsu is true, i.e. when the row for the "total" line is processed.
1932
(main): Don't print totals unless we've processed a file system.
1933
Also only print the "no FS processed" message if there was no
1934
preceding diagnostic.
1935
* tests/df/total-unprocessed: Add a new test.
1936
* tests/Makefile.am: Reference the new test.
1937
* NEWS: Mention the fix.
1939
Improved-by: Jim Meyering
1941
2012-08-04 Jim Meyering <meyering@redhat.com>
1943
truncate: don't leak a file descriptor with --ref=PIPE
1944
* src/truncate.c (main): For a user who makes the mistake of
1945
using a non-seekable file as a reference for the desired length,
1946
truncate would open that file, attempt to seek to its end, but
1947
upon seek failure would neglect to close the file descriptor.
1948
Close the file descriptor even when lseek fails.
1949
In addition, ignore failure to close that reference FD, since as
1950
long as the lseek succeeds, a close failure doesn't matter.
1951
Coverity spotted the potential FD leak.
1953
Improved-by: Pádraig Brady.
1955
2012-08-04 Jim Meyering <meyering@redhat.com>
1957
tests: avoid FP ulimit failure with valgrind-wrapped tools
1958
* tests/init.cfg (require_ulimit_): Raise VM limit from 10MiB to
1959
20MiB, to accommodate overhead of a valgrind-wrapped date program.
1960
Also declare this function's local variables "local".
1962
2012-08-04 Jim Meyering <meyering@redhat.com>
1964
split: plug nominal leaks
1965
* src/split.c (lines_rr) [IF_LINT]: Plug a harmless leak.
1966
(main) [IF_LINT]: Free a usually-small (~70KB) buffer
1967
just before exit, mainly to take this off the radar of
1968
leak-detecting tools.
1970
Improved-by: Pádraig Brady.
1972
2012-08-03 Jim Meyering <meyering@redhat.com>
1974
tail: avoid rare error-path FD leak
1975
* src/tail.c (tail_forever): Close FD to avoid leak after a
1978
2012-07-27 Jim Meyering <meyering@redhat.com>
1980
maint: refresh stale local gnulib patch files
1981
We carry local adjustments for a few gnulib modules via the
1982
patches in gl/. Nearly all of those patches had become stale
1983
due to evolution of the originals in gnulib.
1985
To refresh them, first make sure you have no local changes in gl/
1986
or in the gnulib submodule, then run "make refresh-gnulib-patches".
1988
2012-07-25 Jim Meyering <meyering@redhat.com>
1990
tail: avoid misleading diagnostic upon fstat failure
1991
* src/tail.c (check_fspec): Save fstat-induced errno *before*
1992
calling close_fd, not after. Otherwise, the close could well
1993
clobber the global errno, making tail print an invalid diagnostic.
1994
This could happen only with tail -f, and even then, only when
1995
a valid file descriptor were to provoke fstat failure.
1997
2012-07-23 Pádraig Brady <P@draigBrady.com>
1999
tests: add a test for a previously fixed output format bug in join
2000
Add a test and NEWS entry for a bug inadvertently fixed in
2001
a refactoring in commit v8.9-32-gd4db0cb
2003
* tests/misc/join (v2-format): Add a new test.
2004
* THANKS.in: Add the reporter.
2005
* NEWS: Mention the old bug.
2006
* cfg.mk (old_NEWS_hash): Update.
2008
Reported-by: Jean-Pierre Tosoni
2010
2012-07-22 Pádraig Brady <P@draigBrady.com>
2012
doc: mention gethostid(3) in hostid(1)
2013
* man/hostid.x: Add gethostid(3) to SEE ALSO section.
2014
Addresses http://bugs.gnu.org/12023
2016
2012-07-22 Erik Auerswald <auerswal@unix-ag.uni-kl.de>
2018
doc: mention uniq(1) in sort(1) man-page and vice versa
2019
* man/sort.x: Add SEE ALSO section with entry uniq(1).
2020
* man/uniq.x: Add sort(1) to SEE ALSO section.
2022
2012-07-21 Jim Meyering <meyering@redhat.com>
2024
maint: stzncpy: restrict pointer parameters
2025
* src/system.h (stzncpy): Add "restrict" attribute to each pointer
2026
parameter and note in the comment that the buffers must not overlap.
2028
2012-07-20 Joachim Schmitz <jojo@schmitz-digital.de>
2030
maint: rm: remove two more unused static inline functions
2031
* src/remove.c (cache_stat_ok, is_nondir_lstat): Remove unused
2034
2012-07-20 Jim Meyering <meyering@redhat.com>
2036
maint: adjust exemption to track renamed test script
2037
* cfg.mk (exclude_file_name_regexp--sc_file_system): Sync this
2038
exemption regexp to match renamed tests/df/df-P. This avoids
2039
a "make syntax-check" failure.
2041
2012-07-20 Joachim Schmitz <jojo@schmitz-digital.de> (tiny change)
2043
maint: rm: remove unused static-inlined functions
2044
* src/remove.c (cache_statted, is_dir_lstat): Remove unused
2045
static-inlined functions.
2046
* THANKS.in: Remove my name from this list, now that (with this
2047
commit) it is included automatically.
2049
2012-07-18 Andrew D Warshall <warshall@99main.com>
2051
tests: fiemap-perf: avoid a false failure on ext2
2052
* tests/cp/fiemap-perf: Skip the test on ext2 file systems,
2053
as we do for ext3. Also skip the test if we can't create
2054
a 1TiB file, which might not be supported on certain file systems.
2056
2012-07-16 Pádraig Brady <P@draigBrady.com>
2058
maint: move two df tests from tests/misc to tests/df
2059
* test/Makefile.am: Reference the moved tests.
2061
2012-07-16 Pádraig Brady <P@draigBrady.com>
2063
df: don't output control characters in a mount point name
2064
It's awkward to read and problematic for scripts when
2065
control characters like '\n' are output.
2067
Note other fields are already handled with mbsalign,
2068
which converts non printable chars to the replacement char.
2069
A caveat to note with that, is the replacement char takes
2070
a place in the field and so possibly truncates the field
2071
if it was the widest field in the records.
2073
Note a more general replacement function, that
2074
handles all printable, or non white space characters,
2075
would require more sophisticated support for various
2076
encodings, and the complexity vs benefit was not
2077
deemed beneficial enough at present.
2078
Perhaps in future a more general replacement function
2079
could be shared between the various utilities.
2081
Note <space> is unaffected in any field,
2082
which could impact scripts processing the output.
2083
However any of the number fields at least could have
2084
spaces considering `LANG=fr_FR df -B\'1`, so it's
2085
probably best to leave spaces, which also allows
2086
scripts to handle mount points with spaces without change.
2088
* src/df.c (hide_problematic_chars): Replace control chars with '?'.
2089
* tests/df/problematic-chars: Add a new root only test.
2090
* tests/Makefile.am: Reference the new test.
2091
* NEWS: Mention the fix.
2093
2012-07-15 Jim Meyering <meyering@redhat.com>
2095
pinky,who: fix bug in latest change
2096
* src/system.h (stzncpy): New function.
2097
* src/pinky.c (print_entry): Use stzncpy, not stpncpy.
2098
The latter does not NUL-terminate. I assumed that strncpy was
2099
the only function with such a horrible API. Today I learned that
2100
stpncpy also may not NUL-terminate its result.
2101
The bugs were introduced in commit v8.17-48-gf79263d.
2102
* src/who.c (print_user): Likewise.
2103
Thanks to Erik Auerswald for spotting my error.
2105
build: update gnulib submodule to latest
2107
maint: remove unwarranted uses of strncpy
2108
* src/pinky.c (print_entry): Remove unwarranted uses of strncpy.
2109
Instead, use stpcpy and stpncpy.
2110
* src/who.c (print_user): Likewise.
2111
* cfg.mk: Remove strncpy exemptions.
2113
build: shred.c: avoid i686-specific gcc -Wstrict-overflow warning
2114
* src/shred.c: Avoid gcc -Wstrict-overflow warning.
2115
Addresses http://bugs.gnu.org/11927
2117
2012-07-13 Bruno Haible <bruno@clisp.org>
2119
doc: clarify meaning of '-parodd' in stty help
2120
* src/stty.c (usage): Disambiguate explanation of -parodd.
2121
* THANKS.in: Add reporter.
2122
Reported by Michael Stummvoll
2124
2012-07-12 Pádraig Brady <P@draigBrady.com>
2126
doc: mention the improved sort memory allocation
2127
* NEWS: Mention the improvement.
2129
2012-07-12 Stefano Lattarini <stefano.lattarini@gmail.com>
2131
doc: fix errors and warnings with Texinfo 5
2132
Or rather, with the development version 4.13.90, which will eventually
2135
* doc/coreutils.texi: Use '@item' instead of '@itemx' in several places,
2136
as Texinfo 5 refuses to process an '@itemx' that is not preceded by an
2137
'@item'. Ensure that node extended names in menus and sectioning are
2138
consistent, and that ordering and presence of nodes in menus and in the
2139
actual text are consistent as well.
2141
Fixes http://bugs.gnu.org/11828
2143
2012-07-11 Bernhard Voelker <mail@bernhard-voelker.de>
2145
df: warn if soon-to-be-removed --megabyte option is used
2146
* src/df.c (MEGABYTES_OPTION): Add enum and mark it for removal
2148
(long_options): Use MEGABYTES_OPTION for --megabytes option.
2149
(main): Add a case for it and issue a deprecation warning if
2150
the long form is used. Document the short -m option to
2151
exist only for BSD compatibility.
2153
2012-07-11 Paul Eggert <eggert@cs.ucla.edu>
2155
sort: by default, do not exceed 3/4 of physical memory
2156
* src/sort.c (default_sort_size): Do not exceed 3/4 of total memory.
2157
See Jeff Janes's bug report in
2158
<http://lists.gnu.org/archive/html/coreutils/2012-06/msg00018.html>.
2160
2012-07-06 Pádraig Brady <P@draigBrady.com>
2162
tests: sort-merge-fdlimit: reduce the limit by one
2163
* tests/misc/sort-merge-fdlimit: As a consequence of commit
2164
v8.17-34-g59daf05, we can reduce the descriptor limit by one.
2166
2012-07-06 Paul Eggert <eggert@cs.ucla.edu>
2168
doc: document leap seconds better
2169
* doc/coreutils.texi (touch invocation, Time conversion specifiers)
2170
(Options for date, Examples of date): Index "leap seconds" and
2171
improve their documentation a bit.
2174
* doc/coreutils.texi: Use right amount of spacing after punctuation.
2176
2012-07-04 Jim Meyering <meyering@redhat.com>
2178
date: fails to diagnose invalid input
2179
date -d "$(printf '\xb0')" would print 00:00:00 with today's date
2180
rather than diagnosing the invalid input. Now it reports this:
2181
date: invalid date '\260'
2182
* gnulib: Update submodule to latest for fixed parse-datetime.y.
2183
* tests/misc/date [invalid-high-bit-set]: New test.
2184
* NEWS (Bug fixes): Mention it.
2185
* bootstrap, tests/init.sh: Also update to latest.
2186
Reported by Peter Evans in http://bugs.gnu.org/11843
2188
2012-07-03 Jim Meyering <meyering@redhat.com>
2190
maint: add syntax-check rule to help avoid misuse of EXIT_FAILURE
2191
* cfg.mk (sc_some_programs_must_avoid_exit_failure): New rule,
2192
to help us avoid using EXIT_FAILURE in programs like sort, ls, nohup,
2193
timeout, env, etc. that use different exit codes in many cases.
2195
maint: fix minor bugs in helper program, setuidgid
2196
* src/setuidgid.c (main): Fix two error-before-usage calls not to exit.
2197
Exit with status SETUIDGID_FAILURE (not EXIT_FAILURE) consistently.
2199
2012-07-03 Paul Eggert <eggert@cs.ucla.edu>
2201
sort: fix exit-status typo
2202
* src/sort.c (stream_open): EXIT_FAILURE -> SORT_FAILURE.
2203
Suggested by Pádraig Brady in <http://bugs.gnu.org/11816#34>.
2205
sort: simplify -o handling to avoid fdopen, assert
2206
* src/sort.c (outfd): Remove. All uses replaced by STDOUT_FILENO.
2207
(stream_open): When writing, use stdout rather than fdopen.
2208
(move_fd_or_die): Renamed from dup2_or_die, with the added functionality
2209
of closing its first argument. All uses changed.
2210
(avoid_trashing_input): Special case for !outfile no longer needed.
2211
(check_output): Arrange for standard output to go to the file,
2212
rather than storing the fd in outfd.
2214
2012-07-02 Pádraig Brady <P@draigBrady.com>
2216
sort: avoid redundant processing with inaccessible inputs or output
2217
* src/sort.c (check_inputs): A new function to verify all inputs
2218
are accessible before further processing.
2219
(check_output): A new function to open or create a specified
2220
output file, before futher processing.
2221
(stream_open): Adjust to truncating the previously opened
2222
output file rather than opening directly.
2223
(avoid_trashing_input): Optimize to stat the output file
2224
descriptor, rather than the file name.
2225
(main): Call the new functions to check accessibility of
2226
inputs and output, before processing starts.
2227
* tests/misc/sort: Adjust to the changed error message.
2228
* tests/misc/sort-merge-fdlimit: Account for the earlier opened
2229
file descriptor of the specified output file.
2230
* tests/misc/sort-exit-early: A new test to exercise the improvements.
2231
* tests/Makefile.am: Reference the new test.
2232
* NEWS: Mention the improvement.
2234
Suggested-by: Bernhard Voelker
2236
2012-07-02 Pádraig Brady <P@draigBrady.com>
2238
maint: sc_prohibit_fail_0: update a stale comment
2239
* cfg.mk (sc_prohibit_fail_0): Following on from
2240
commit v8.0-79-g71c2f88, update the comment to match.
2242
maint: avoid a -Wunsed-but-set warning on some systems
2243
* src/stty.c (main): Mark speed_was_set as possibly unused,
2244
as is the case when CIBAUD is undefined (on ppc64 GNU/Linux
2246
Reported-by: Stefano Lattarini
2248
2012-06-30 Jim Meyering <meyering@redhat.com>
2250
maint: avoid false-positive syntax-check failure due to fail=0 in .texi
2251
* cfg.mk (exclude_file_name_regexp--sc_prohibit_fail_0): Exempt
2254
stat,tail: recognize new file system type: aufs
2255
* src/stat.c (human_fstype) [__linux__]: Add a 'case' for the new
2256
remote file system type: aufs (0x61756673).
2257
* NEWS (New features): Mention stat -f.
2258
(Bug fixes): Mention it for tail -f.
2259
Reported by Michael Mol in http://bugs.gnu.org/11823
2261
2012-06-30 Jim Meyering <meyering@redhat.com>
2263
doc: improve sample backup script
2264
* doc/coreutils.texi (cp invocation): Make the backup script exit
2265
with an accurate reflection of any failure.
2266
Also, add --preserve=all.
2268
Improved-by: Bernhard Voelker
2270
2012-06-26 Pádraig Brady <P@draigBrady.com>
2272
maint: avoid a static analysis warning in csplit
2273
The Canalyze static code analyzer correctly surmised
2274
that there is a use-after-free bug in free_buffer()
2275
at the line "struct line *n = l->next", if that
2276
function is called multiple times.
2278
This is not a runtime issue since a list of lines
2279
will not be present in the !lines_found case.
2281
* src/csplit.c (free_buffer): Set list head to NULL so
2282
that this function can be called multiple times.
2283
(load_buffer): Remove a redundant call to free_buffer().
2285
Reported-by: Xu Zhongxing
2287
2012-06-22 Bernhard Voelker <mail@bernhard-voelker.de>
2289
doc: document multiplier for dd number options like count=N
2290
* src/dd.c (usage): Add "N" to the description of multipliers.
2291
* doc/coreutils.texi (dd invocation): Likewise.
2293
2012-06-22 Pádraig Brady <P@draigBrady.com>
2295
split: ensure output doesn't overwrite input
2296
* src/split.c (create): Check if output file is the
2297
same inode as the input file.
2298
* tests/split/guard-input: New test case.
2299
* tests/Makefile.am: Reference new test case.
2300
* NEWS: Mention the fix.
2302
Improved-by: Jim Meyering
2303
Reported-by: François Pinard
2305
2012-06-22 Pádraig Brady <P@draigBrady.com>
2307
maint: refactor common mode bits used to create files
2308
* src/system.h (MODE_RW_UGO): The new refactored define (666).
2309
* src/mkfifo.c: Use the new define.
2310
* src/mknod.c: Likewise.
2311
* src/split.c: Likewise.
2312
* src/system.h: Likewise.
2313
* src/touch.c: Likewise.
2314
* src/truncate.c: Likewise.
2316
Suggested-by: Jim Meyering
2318
2012-06-22 Pádraig Brady <P@draigBrady.com>
2320
maint: suppress echoing of sc_THANKS_in_duplicates implementation
2321
* cfg.mk (sc_THANKS_in_duplicates): Suppress the echoing of these
2322
commands run during `make syntax-check`
2324
2012-06-20 Bernhard Voelker <mail@bernhard-voelker.de>
2326
maint: sort: style adjustment to help clarify size determination
2327
* src/sort.c (default_sort_size): Move physmem code "down" to first use.
2329
2012-06-12 Jim Meyering <meyering@redhat.com>
2331
stty: portability: accommodate CIL
2332
* src/stty.c (main): Declare locals "mode" and "new_mode" to be static
2333
to ensure that each is initialized to zero, *including* all padding.
2334
While gcc clears padding of a local automatic initialized to "{ 0, }",
2335
CIL does not, and the C99 standard is not clear on this issue.
2336
Reported by Edward Schwartz. See http://bugs.gnu.org/11675 for details.
2338
2012-06-10 Sami Kerola <kerolasa@iki.fi>
2340
maint: remove su testing artifact
2341
* tests/misc/help-version: Remove expected su exit code.
2343
2012-06-10 Jim Meyering <meyering@redhat.com>
2345
build: update gnulib to latest; correct comment grammar
2346
* tests/misc/help-version: Fix comment grammar:
2347
s/all these/all of these/
2348
* gl/lib/tempname.c.diff: Likewise.
2350
maint: migrate strncpy-prohibiting rule to gnulib
2351
* cfg.mk (sc_prohibit_strncpy): Remove rule.
2354
maint: prohibit use of strncpy
2355
* cfg.mk (sc_prohibit_strncpy): New syntax-check rule.
2356
Exempt pinky.c and who.c, at least for now.
2358
2012-06-06 Jim Meyering <meyering@redhat.com>
2360
su: remove program (util-linux is now the best source for it)
2361
* README: Omit "su" from list of programs.
2362
* src/su.c: Remove file.
2363
* src/Makefile.am: Remove su-related rules and variables.
2364
* tests/misc/su-fail: Remove test.
2365
* tests/Makefile.am (TESTS): Remove misc/su-fail.
2366
* tests/misc/invalid-opt: Remove su-related code.
2367
* src/.gitignore: Remove su.
2368
* man/su.x: Remove file.
2369
* man/Makefile.am (su.1): Remove rule.
2370
* po/POTFILES.in: Remove su.c from the list.
2371
* TODO: Remove ancient entry.
2372
* NEWS (Changes in behavior): Mention it.
2373
* doc/coreutils.texi: Remove su-related description.
2374
* AUTHORS: Remove su.
2375
* m4/lib-check.m4 (cu_LIB_CHECK): Remove file/macro.
2376
* configure.ac: Remove su-related code and sole use of cu_LIB_CHECK.
2377
* scripts/git-hooks/commit-msg: Remove su from this list, too.
2379
maint: detect a new type of duplicate in THANKS.in
2380
* cfg.mk (sc_THANKS_in_duplicates): New rule.
2382
2012-06-05 Jim Meyering <meyering@redhat.com>
2384
maint: mark new diagnostic for translation
2385
* src/head.c (elide_tail_lines_seekable): Mark new diagnostic.
2386
I will look at the results of "make syntax-check", I will look...
2388
2012-06-05 Jim Meyering <meyering@redhat.com>
2390
head: with --lines=-N (-n-N) reset file pointer on seekable input
2391
* src/head.c (elide_tail_lines_seekable): Reset file pointer
2392
after printing up to an end-relative line-counted offset.
2393
Anoop Sharma reported the problem and suggested the fix.
2394
* tests/misc/head-pos: Add coverage via a very similar, existing test.
2395
Also add coverage for a previously untested block of code.
2396
* tests/misc/head-elide-tail ($READ_BUFSIZE): Update to 8192, to
2397
match the value of BUFSIZ I see today on Fedora 17/x86_64 (unrelated
2399
* NEWS (Bug fixes): Mention it.
2401
Improved-by: Pádraig Brady
2403
2012-06-01 Jim Meyering <meyering@redhat.com>
2405
stat,tail: recognize new file system type: panfs
2406
* src/stat.c (human_fstype) [__linux__]: Add a 'case' for the new
2407
remote file system type: panfs (0xAAD7AAEA).
2408
* NEWS (New features): Mention stat -f.
2409
(Bug fixes): Mention it for tail -f.
2410
Reported by Travis Gummels in http://bugzilla.redhat.com/827199
2412
2012-05-31 Jim Meyering <meyering@redhat.com>
2414
maint: fix typos in test comments and old ChangeLog files
2415
Culprits identified and fixed automatically using these commands:
2416
git ls-files|misspellings -f -|perl -nl \
2417
-e '/^(.*?)\[(\d+)\]: (\w+) -> "(.*?)"$/ or next;' \
2418
-e '($file,$n,$l,$r)=($1,$2,$3,$4); $q="'\''"; $r=~s/$q/$q\\$q$q/g;'\
2419
-e 'print "sed -i $q${n}s!$l!$r!$q $file"' | bash
2420
using http://github.com/lyda/misspell-check
2421
* old/fileutils/ChangeLog: Fix typos.
2422
* old/textutils/ChangeLog: Likewise.
2423
* tests/misc/truncate-fail-diag: Likewise.
2425
2012-05-28 Pádraig Brady <P@draigBrady.com>
2427
cksum: line-buffer the printed checksums
2428
This utility was inadvertently omitted from commit v8.0-34-g710fe41
2429
* src/cksum.c (main): Set stdout to line buffered mode, to ensure
2430
parallel running instances don't intersperse their output.
2431
* NEWS: Mention the fix.
2432
* THANKS.in: Add Anoop.
2433
Reported by Anoop Sharma.
2435
2012-05-21 Jim Meyering <meyering@redhat.com>
2437
maint: remove comment that suggested to remove support for mktemp -V
2438
* src/mktemp.c (main): Don't suggest to remove support for -V, an
2439
undocumented alias for --version, since that would introduce a
2440
gratuitous incompatibility with the original mktemp program.
2442
2012-05-21 Mike Frysinger <vapier@gentoo.org>
2444
dircolors: add st/st-256color terminal types
2445
See http://st.suckless.org/
2446
* src/dircolors.hin: Add st and st-256color.
2447
Reported-by: Jeroen Roovers <jer@gentoo.org>, via
2448
Mike Frysinger <vapier@gentoo.org> in http://bugs.gnu.org/11498
2450
2012-05-20 Jim Meyering <meyering@redhat.com>
2452
id,groups: use gidtostr/uidtostr to avoid casts
2453
* src/id.c (gidtostr, uidtostr): Define macros.
2454
(gidtostr_ptr, uidtostr_ptr): Define safer functions.
2455
Use gidtostr and uidtostr to print GID and UID without
2457
* src/group-list.c: Likewise.
2459
2012-05-16 Jim Meyering <meyering@redhat.com>
2461
tests: use $AWK, not awk
2462
* tests/cp/sparse-fiemap: Don't hard-code "awk". Use $AWK.
2463
* tests/init.cfg: Likewise.
2464
* tests/misc/sort-rand: Likewise.
2466
maint: tell xgettext that fputs arg "93% of..." is not a C format string
2467
* src/fmt.c (usage): Add a comment to tell
2468
xgettext that the "% o" in fputs argument string of "...93% of..."
2469
is not a C format string. Reported by Toomas Soome, Göran Uddeborg,
2470
Petr Pisar, Primoz PETERLIN and Chusslove Illich via
2471
http://bugs.gnu.org/11470
2473
maint: add assertions to placate static analysis tools
2474
A static analysis tool (http://labs.oracle.com/projects/parfait/)
2475
produced some false positive diagnostics. Add assertions to help
2476
it understand that the code is correct.
2477
* src/stty.c: Include <assert.h>.
2478
(display_changed): Add an assertion to placate parfait.
2479
(display_all): Likewise.
2480
* src/sort.c: Include <assert.h>.
2481
(main): Add an assertion to placate parfait.
2482
* src/fmt.c: Include <assert.h>.
2483
(get_paragraph): Add an assertion to placate parfait.
2485
2012-05-16 Pádraig Brady <P@draigBrady.com>
2487
stat: report the correct block size for file system usage
2488
struct statfs has the f_frsize member since Linux 2.6,
2489
so use that rather than f_bsize which can be different.
2490
Note the related df change mentioned in NEWS is handled
2491
in gnulib by using statvfs() rather than statfs()
2492
on Linux > 2.6.36 (where statvfs doesn't hang) and the
2493
same method as stat for Linux 2.6 kernels earlier than that.
2494
stat(1) doesn't use statvfs() on GNU/Linux as the f_type
2495
member isn't available there.
2496
Note the change to not use statvfs() on GNU/Linux was introduced
2497
in gnulib commit eda39b8 16-08-2003.
2499
* m4/stat-prog.m4 (cu_PREREQ_STAT_PROG): Check for the f_frsize
2500
member in the statfs structure.
2501
* src/stat.c: Use (struct statfs).f_frsize if available.
2502
* NEWS (Bug fixes): Mention this stat fix, and the related df fix
2503
coming in the next gnulib update.
2504
* THANKS.in: Add Nikolaus.
2506
Reported and Tested by Nikolaus Rath
2508
2012-05-12 Jim Meyering <meyering@redhat.com>
2510
ls: color each symlink-to-relative-name in / properly
2511
In order for ls --color to color each symlink, it must form the name
2512
of each referent and then stat it to see if the link is dangling, to
2513
a directory, to a file, etc. When the symlink is to a relative name,
2514
ls must concatenate the starting directory name and that relative name.
2515
When, in addition, the starting directory was "/" or "/some-name",
2516
the result was ill-formed, and the subsequent stat would usually fail,
2517
making the caller color it as a dangling symlink.
2518
* src/ls.c (make_link_name): Don't botch the case in which
2519
dir_name(NAME) == "/" and LINKNAME is relative.
2520
* tests/ls/root-rel-symlink-color: New file. Test for the above.
2521
* tests/Makefile.am (TESTS): Add it.
2522
* NEWS (Bug fixes): Mention it.
2523
Reported by Mike Frysinger in http://bugs.gnu.org/11453
2524
Bug introduced by commit v8.16-23-gbcb9078.
2526
2012-05-10 Jim Meyering <meyering@redhat.com>
2528
maint: post-release administrivia
2529
* NEWS: Add header line for next release.
2530
* .prev-version: Record previous version.
2531
* cfg.mk (old_NEWS_hash): Auto-update.
2534
* NEWS: Record release date.
2536
tests: misc/tty-eof: increase timeout to avoid unwarranted failure
2537
* tests/misc/tty-eof: Increase timeout from 1s to 10s, to avoid
2538
unwarranted failure under heavy load.
2539
* tests/Makefile.am (TESTS): Move misc/tty-eof "up" to nearer the
2540
beginning of the list (from near the middle) so that it is started
2541
earlier in parallel test runs. Otherwise, it would frequently be
2542
among the last two tests to complete.
2544
stat,tail: recognize new FS types: bdevfs, inodefs, qnx6
2545
* src/stat.c (human_fstype) [__linux__]: Add 'case's for these local
2546
file system types: bdevfs (0x62646576), inodefs (0x42494E4D),
2548
Now that the kernel has a name for S_MAGIC_BINFMTFS, use
2549
theirs in place of our S_MAGIC_BINFMT_MISC.
2550
* NEWS (New features): Mention it.
2552
scripts: encourage use of shorter "bugs.gnu.org" in bug URLs
2553
* scripts/git-hooks/commit-msg: Also ding debbugs.gnu.org URLs.
2555
2012-05-10 Paul Eggert <eggert@cs.ucla.edu>
2557
maint: handle file sizes more reliably
2558
Problem reported by Samuel Thibault in <http://bugs.gnu.org/11424>.
2559
* NEWS: Document this.
2560
* src/dd.c (skip): Handle skipping past EOF on shared or typed
2561
memory objects the same way as with regular files.
2562
(dd_copy): It's OK to truncate shared memory objects.
2563
* src/du.c (duinfo_add): Check for overflow.
2564
(print_only_size): Report overflow.
2565
(process_file): Ignore negative file sizes in the --apparent-size case.
2566
* src/od.c (skip): Fix comment about st_size.
2567
* src/split.c (main):
2568
* src/truncate.c (do_ftruncate, main):
2569
On files where st_size is not portable, fall back on using lseek
2570
with SEEK_END to determine the size. Although strictly speaking
2571
POSIX says the behavior is implementation-defined, in practice
2572
if lseek returns a nonnegative value it's a reasonable one to
2573
use for the file size.
2574
* src/system.h (usable_st_size): Symlinks have reliable st_size too.
2575
* tests/misc/truncate-dir-fail: Don't assume that getting the size
2576
of a dir is not allowed, as it's now allowed on many platforms,
2579
stat: don't report negative file size as huge positive number
2580
* src/stat.c (print_stat): Use out_int, not out_uint for stat.st_size.
2581
* NEWS (Bug fixes): Mention it.
2583
2012-05-08 Jim Meyering <meyering@redhat.com>
2585
split: avoid apparent infloop when splitting /dev/zero w/-n on the Hurd
2586
* src/split.c (main): Use stat.st_size only for regular files.
2587
Samuel Thibault reported in http://bugs.gnu.org/11424 that the
2588
/dev/zero-splitting tests would appear to infloop on GNU/Hurd,
2589
because /dev/zero's st_size is LONG_MAX. It was only a problem
2590
when using the --number (-n) option.
2591
* NEWS (Bug fixes): Mention it.
2592
This bug was introduced with the --number option, via
2593
commit v8.7-25-gbe10739
2595
build: update gnulib submodule to latest; also bootstrap and init.sh
2596
* bootstrap: Update from gnulib.
2597
* tests/init.sh: Likewise.
2599
2012-05-08 Pádraig Brady <P@draigBrady.com>
2601
doc: clarify dd conv=sparse usage with devices
2602
* doc/coreutils.texi (dd invocation): Clarify that NUL blocks
2603
are not copied for devices either, and give examples of where
2606
2012-05-08 Jim Meyering <meyering@redhat.com>
2608
maint: new function: usable_st_size
2610
2012-05-08 Kevin Lyda <kevin@ie.suberic.net>
2612
maint: fix common spelling errors
2613
These were identified using: https://github.com/lyda/misspell-check
2614
executed like: git ls-files | misspellings -f -
2616
* src/cat.c: Correct a spelling error.
2617
* src/comm.c: Likewise.
2618
* src/expr.c: Likewise.
2619
* src/pr.c: Likewise.
2620
* src/tac.c: Likewise.
2621
* src/test.c: Likewise.
2622
* src/ChangeLog-2005: Likewise.
2623
* src/ChangeLog-2007: Likewise.
2624
* src/NEWS: Likewise.
2625
* src/doc/coreutils.texi: Likewise.
2626
* src/lib/ChangeLog-2007: Likewise.
2627
* src/man/help2man: Likewise.
2628
* src/old/fileutils/ChangeLog-1997: Likewise.
2629
* src/old/fileutils/NEWS: Likewise.
2630
* src/old/sh-utils/ChangeLog.0: Likewise.
2631
* src/old/textutils/ChangeLog: Likewise.
2632
* src/tests/misc/comm: Likewise.
2633
* src/tests/misc/uniq: Likewise.
2634
* src/tests/mv/dir2dir: Likewise.
2635
* src/cfg.mk (old_NEWS_hash): update with `make update-NEWS-hash`
2637
2012-05-07 Jim Meyering <meyering@redhat.com>
2639
tests: avoid LD_PRELOAD lookup error for dlsym
2640
* tests/cp/nfs-removal-race: Link with -ldl.
2642
cp: handle a race condition more sensibly
2643
* src/copy.c (copy_reg): In a narrow race (stat sees dest, yet
2644
open-without-O_CREAT fails with ENOENT), retry the open with O_CREAT.
2645
* tests/cp/nfs-removal-race: New file.
2646
* tests/Makefile.am (TESTS): Add it.
2647
* NEWS (Bug fixes): Mention it.
2648
Reported by Philipp Thomas and Neil F. Brown in
2649
http://bugs.gnu.org/11100
2651
doc: NEWS: note when the id/groups bug was introduced
2652
* NEWS (Bug fixes): Note the first affected release.
2653
The id bug was introduced by commit v8.0-112-g719a95a.
2655
2012-05-04 Jim Meyering <meyering@redhat.com>
2657
build: update gnulib submodule to latest
2659
maint: rely on gnulib's new sys_resource module
2660
* bootstrap.conf (gnulib_modules): Add sys_resource.
2661
* src/sort.c: Remove #if HAVE_SYS_RESOURCE_H guard around inclusion
2662
of <sys/resource.h> and move the inclusion "up" into the alphabetized
2663
list of its peers. This also avoids a failure of the
2664
sc_prohibit_always_true_header_tests syntax-check rule.
2665
* m4/jm-macros.m4 (gl_CHECK_ALL_HEADERS): Remove sys/resource.h.
2667
2012-05-02 Pádraig Brady <P@draigBrady.com>
2669
cp,mv,install: provide POSIX_FADV_SEQUENTIAL hint to input
2670
This was inadvertently omitted from v8.5-104-g47076e3,
2671
and gives the same 5% speedup when copying from an SSD.
2673
* src/copy.c (copy_internal): Apply the FADVISE_SEQUENTIAL hint.
2675
2012-05-02 Jim Meyering <meyering@redhat.com>
2677
maint: prohibit an operator at end of line
2678
Many coding standards, including GNU's, advocate that when
2679
splitting a line near a binary operator, one should put the
2680
operator at the beginning of the continued line, rather than
2681
at the end of the preceding one. This is for readability:
2682
such operators are relatively important to readability, and
2683
they are more apparent at the beginning of a line than
2684
at the varying-column end of line,
2685
* cfg.mk (sc_prohibit_operator_at_end_of_line): New rule.
2686
Exempt test.c and head.c.
2688
maint: adjust comments to avoid FP match on binary-operator-at-EOL
2689
* src/ls.c (print_long_format): Reformat comment to avoid "=="
2691
Also, "sortkey" is not a word: s/sortkey/sort key/.
2692
* src/ioblksize.h: Likewise, for "|" from a shell snippet.
2693
* src/runcon.c: Likewise, for "|" in grammar-like usage.
2695
maint: with split lines, don't leave an operator at end of line
2696
* src/copy.c (copy_reg): Split an expression before a binary operator,
2698
* src/cut.c (set_fields): Likewise.
2699
* src/id.c (main): Likewise.
2700
* src/install.c (setdefaultfilecon): Likewise.
2701
* src/join.c (ignore_case): Likewise.
2702
* src/pr.c (cols_ready_to_print, init_parameters, print_page): Likewise.
2703
* src/stty.c (set_window_size): Likewise.
2704
* src/wc.c (SUPPORT_OLD_MBRTOWC): Likewise.
2705
* src/who.c (scan_entries): Likewise.
2706
* src/test.c (binary_operator): Join a split line.
2707
* src/extent-scan.c (extent_scan_read): Move an ">" from end of line
2708
to beginning of the following.
2709
Likewise for two other expressions.
2711
2012-04-30 Pádraig Brady <P@draigBrady.com>
2713
cat,cp,mv,install,split: Set the minimum IO block size used to 64KiB
2714
* NEWS: Mention the change in behavior.
2715
* src/ioblksize.h: Add updated test results and
2716
increase value from 32KiB to 64KiB.
2718
2012-04-27 Jim Meyering <meyering@redhat.com>
2720
id: -Zn/-Zr: avoid an invalid diagnostic
2721
* src/id.c (main): Using -Z with -r or -n would fail with "id: cannot
2722
print only names or real IDs in default format", in spite of that "-Z",
2723
which specifies a non-default format. Now, it succeeds and ignores
2724
the -n or -r option. The error was that the test for default_format
2725
was not updated when I added the new --context (-Z) option in
2726
commit v6.9-33-g5320d0f.
2728
id: don't call getcon unnecessarily
2729
* src/id.c (main): Invocations like "id" and "id -G" would call getcon
2730
to determine the current security context even though that result would
2731
not be used. Similarly, when POSIXLY_CORRECT is set. Rearrange
2732
conditionals and hoist the POSIXLY_CORRECT test so that we call
2733
getcon only when necessary.
2735
maint: id: minor factorization
2736
* src/id.c (main): Factor out uses of "argc - optind".
2737
Move option-consistency checks to precede the potential getcon call.
2739
2012-04-27 Jim Meyering <meyering@redhat.com>
2741
id,groups: with no user name, print only real and/or effective IDs,
2742
... i.e., don't use the getpw* functions.
2744
Before this change, running groups or id with no user name argument
2745
would include a group name or ID from /etc/passwd. Thus, under unusual
2746
circumstances (default group is changed, but has not taken effect for a
2747
given session), those programs could print a name or ID that is neither
2750
To demonstrate, run this:
2752
echo 'for i in 1 2; do id -G; sleep 1.5; done' \
2753
|su -s /bin/sh ftp - &
2754
sleep 1; perl -pi -e 's/^(ftp:x:\d+):(\d+)/$1:9876/' /etc/passwd
2756
Those id -G commands printed the following:
2761
With this change, they print this:
2766
Similarly, running those programs set-GID could make them
2767
print one ID too many.
2769
* src/group-list.c (print_group_list): When username is NULL, pass
2770
egid, not getpwuid(ruid)->pw_gid), to xgetgroups, per the API
2771
requirements of xgetgroups callee, mgetgroups.
2772
When not using the password database, don't call getpwuid.
2773
* NEWS (Bug fixes): Mention it.
2774
* tests/misc/id-setgid: New file.
2775
* tests/Makefile.am (TESTS): Add it.
2776
(root_tests): It's a root-only test, so add it here, too.
2777
Originally reported by Brynnen Owen as http://bugs.gnu.org/7320.
2778
Raised again by Marc Mengel in http://bugzilla.redhat.com/816708.
2780
2012-04-22 Stefano Lattarini <stefano.lattarini@gmail.com>
2782
maint: sync up required autoconf version in bootstrap.conf
2783
* bootstrap.conf ($buildreq): Require autoconf 2.64, not 2.62. This is
2784
consistent with what is required by AC_PREREQ in configure.ac.
2786
2012-04-19 Jim Meyering <meyering@redhat.com>
2788
doc: fix a grammar nit
2789
* doc/coreutils.texi (split invocation): s/are/is/ in "P or Q are".
2791
2012-04-19 Bernhard Voelker <mail@bernhard-voelker.de>
2793
tests: factor out expensive "pairs" code of misc/stty
2794
* tests/Makefile.am (TESTS): Add misc/stty-pairs.
2795
* tests/init.cfg (stty_reversible_init_): New function.
2796
(stty_reversible_query_): New function.
2797
* tests/misc/stty: Factor out expensive "pairs" code into new test.
2798
Use new stty_reversible_* functions instead of evaluating static
2800
* tests/misc/stty-pairs: Add new test. Code added from misc/stty.
2801
Mark this as an expensive test. Skip 'parenb' and 'cread' options,
2802
as these tests are known to fail. Like in misc/stty, also use
2803
the new stty_reversible_* functions.
2805
tests: add iutf8 option to misc/stty
2806
* tests/misc/stty: Add iutf8 to the list of REV_* options.
2807
That option has been implemented in commit v5.2.1-193-g733e79e.
2809
2012-04-19 Jim Meyering <meyering@redhat.com>
2811
maint: tac: use memcpy, not strcpy
2812
* src/tac.c (main): Use memcpy, not strcpy, since we know the length.
2814
maint: ls: use stpncpy/stpcpy, not strncpy/strcpy
2815
* src/ls.c (gobble_file): Move a decl "down".
2816
(make_link_name): Do not hard-code '/'. Use IS_ABSOLUTE_FILE_NAME
2817
and dir_len instead.
2818
Use stpcpy/stpncpy in place of strncpy/strcpy.
2820
maint: modernize/clean-up a small function in ls.c
2821
* src/ls.c (make_link_name): Adjust comment style to refer to VARIABLE
2822
names, not 'variable'.
2823
Move each of two declarations "down" to first use.
2824
Compare pointer to NULL, not to 0.
2825
Don't reuse local, "linkbuf" for a different purpose.
2827
doc: tweak README-hacking
2828
* README-hacking: Don't say "...on your hard drive".
2829
That is unnecessary, and now, borderline anachronistic.
2831
2012-04-17 Jim Meyering <meyering@redhat.com>
2833
doc: use @xref{... only at start of a sentence
2834
* doc/coreutils.texi: Correct many misuses of @xref.
2836
2012-04-16 Jim Meyering <meyering@redhat.com>
2838
maint: replace a use of strcpy in chmod.c with memcpy
2839
* src/chmod.c (main): Use memcpy rather than strcpy,
2840
since we already have the length handy.
2842
2012-04-14 Karl Berry <karl@freefriends.org>
2844
doc: remove a little direntry redundancy
2845
* doc/coreutils.texi (Basics direntry): Remove 3rd "Common options."
2847
2012-04-12 Bruce Korb <bkorb@gnu.org>
2849
fmt: accept new --goal=WIDTH (-g) option
2850
Accept -g for BSD/Plan9 compatibility.
2851
* NEWS (New features): Mention it.
2852
* tests/fmt/goal-option: New test.
2853
* tests/fmt/long-line: Rename from tests/fmt-long-line.
2854
* tests/fmt/base: Rename from tests/misc/fmt.
2855
* doc/coreutils.texi: Document it.
2856
* src/fmt.c (main): Accept the new option
2857
(check_for_goals): new function to implement the operands
2858
Based on BSD's and Plan-9's fmt programs.
2860
2012-04-12 Pádraig Brady <P@draigBrady.com>
2862
cp: change --attributes-only to not truncate existing files
2863
* src/copy.c (copy_reg): Don't truncate an existing file,
2864
to support copying attributes between existing files.
2865
The original use case only considered creating new files,
2866
and it would be a very unusual use case to be relying
2867
on the truncating behavior.
2868
* doc/coreutils.texi (cp invocation): Mention the non
2869
truncating behavior.
2870
* tests/cp/attr-existing: A new test to ensure O_TRUNC skipped.
2871
* tests/Makefile.am: Reference the new test.
2872
* NEWS: Mention the change in behavior.
2874
2012-04-04 Andreas Schwab <schwab@linux-m68k.org>
2876
tests: avoid unnecessary subshells in misc/stty
2877
* tests/misc/stty: Don't waste a subshell to perform this:
2878
eval rev=\$REV_$opt. Fix rev1,rev2 assignments similarly.
2880
2012-04-04 Jim Meyering <meyering@redhat.com>
2882
build: update gnulib submodule to latest
2884
tests: correct reversed args to "compare"
2885
* tests/misc/sort-discrim: Correct reversed args to "compare".
2886
This nit was masked by a bug in maint.mk that effectively disabled
2887
many of the syntax-check rules.
2889
tests: new syntax-check rule to prohibit use of `...` in tests/
2890
* cfg.mk (sc_prohibit_test_backticks): New rule. Exempt 3 files.
2892
tests: remove nearly all remaining backticks
2893
* tests/rm/isatty: Remove now-unneeded "# `" line.
2894
* tests/misc/ls-time: Likewise.
2895
* tests/misc/date-sec: Remove stray "`" in comment.
2896
* tests/du/long-sloop: Likewise.
2897
* tests/mv/part-symlink: Replace multi-line `...` by $(...).
2898
* tests/mv/sticky-to-xpart: Likewise.
2899
* tests/rm/fail-2eperm: Likewise.
2900
* tests/ls/nameless-uid: Likewise.
2901
* tests/cp/perm: Likewise.
2902
* tests/cp/preserve-gid: Likewise.
2903
* tests/cp/same-file: Likewise.
2905
tests: use perl's qx!...! rather than `...`
2906
* tests/misc/expr: As above.
2907
* tests/misc/ls-misc: Likewise.
2908
* tests/misc/pwd-long: Likewise.
2909
* tests/misc/uniq: Likewise.
2911
2012-04-04 Jim Meyering <meyering@redhat.com>
2913
tests: convert nearly all `...` expressions to $(...)
2914
Exempt init.sh because it runs before we're assured to have a
2915
shell that groks $(...). Exempt *.mk because "$" would have to
2916
be doubled, and besides, any `...` expression in a .mk file is
2917
almost certainly evaluated before init.sh is run. Finally, also
2918
exempt the perl-based tests, because perl's `...` cannot be
2919
converted to $(...). Do that by running this command:
2921
git grep -l '`.*`' tests \
2922
| grep -Ev 'init\.sh|\.mk$' | xargs grep -Lw perl \
2923
| xargs perl -pi -e 's/`(.*?)`/\$($1)/g'
2925
One minor fix-up change was required after that, due to how
2927
diff --git a/tests/chmod/equals b/tests/chmod/equals
2928
- expected_perms=$(eval 'echo \$expected_'$dest)
2929
+ expected_perms=$(eval 'echo $expected_'$dest)
2931
Another was to make these required quoting adjustments:
2932
diff --git a/tests/misc/stty b/tests/misc/stty
2934
- rev=$(eval echo "\\\$REV_$opt")
2935
+ rev=$(eval echo "\$REV_$opt")
2937
- rev1=$(eval echo "\\\$REV_$opt1")
2938
- rev2=$(eval echo "\\\$REV_$opt2")
2939
+ rev1=$(eval echo "\$REV_$opt1")
2940
+ rev2=$(eval echo "\$REV_$opt2")
2942
Also, transform two files that were needlessly excluded above:
2943
(both use perl, but are mostly bourne shell)
2945
perl -pi -e 's/`(.*?)`/\$($1)/g' \
2946
tests/du/long-from-unreadable tests/init.cfg
2948
2012-04-03 Jim Meyering <meyering@redhat.com>
2950
tests: convert one `...` expression manually
2951
* tests/ls/stat-vs-dirent: Manually convert `(...)` to $(...),
2952
to avoid automatically producing an invalid result.
2954
tests: fix quoting bug in misc/nohup
2955
* tests/misc/nohup: Fix invalid quoting.
2957
doc: identify/refer to source of each fixed bug in log and in NEWS
2958
* HACKING (Commit log requirements): Describe our policy: when you
2959
fix a bug, put the "git describe" string of the bug-introducing commit
2960
in your commit log and put the "fixed-in-release version number"
2963
tests: avoid spurious misc/expr failure on AIX 6.1
2964
* tests/misc/expr: Avoid spurious failure on AIX 6.1 due to
2965
differing regexp diagnostic. Reported by Michael Felt.
2967
2012-03-28 Paul Eggert <eggert@cs.ucla.edu>
2969
chmod: undo previous change
2970
It's not portable; see <http://bugs.gnu.org/11108#17>.
2971
* src/chmod.c, NEWS: Undo previous change.
2973
chmod: fix symlink race condition
2974
* NEWS: Document this.
2975
* src/chmod.c (process_file): Don't follow symlink if we
2976
think the file is not a symlink.
2978
2012-03-26 Jim Meyering <meyering@redhat.com>
2980
tests: remove temporary skip for sort-stale-thread-mem failure
2981
* tests/misc/sort-stale-thread-mem: Invoke framework_failure_, now,
2982
hoping that valgrind is fixed (or we add exclusions) before the
2985
maint: post-release administrivia
2986
* NEWS: Add header line for next release.
2987
* .prev-version: Record previous version.
2988
* cfg.mk (old_NEWS_hash): Auto-update.
2991
* NEWS: Record release date.
2993
tests: work around F17-valgrind sort-stale-thread-mem failure
2994
* tests/misc/sort-stale-thread-mem: Skip upon known failure.
2996
doc: use $(...), not `...` in documentation and comments
2997
* doc/coreutils.texi (dircolors invocation, Examples of expr):
2998
(shred invocation, seq invocation): Use $(...), not `...`.
2999
* src/mv.c (do_move): Likewise, in a comment.
3001
2012-03-23 Jim Meyering <meyering@redhat.com>
3003
tests: skip ls/stat-free-color on XFS, rather than always failing
3004
* tests/init.cfg (require_dirent_d_type_): Manually skip when
3005
"." is an xfs file system.
3007
tests: skip part of dd/sparse on some file systems
3008
* tests/dd/sparse: The last two parts of this test would fail due to
3009
the underlying file system at least on Solaris 10 with NFS. That file
3010
system would report that a 3MiB file was occupying <= 1KiB of space
3011
for nearly 50 seconds after creation.
3012
Improved-by: Bernhard Voelker
3014
2012-03-22 Pádraig Brady <P@draigBrady.com>
3016
maint: avoid a doc syntax check failure
3017
Prompted by the continuous integration build failure at:
3018
http://hydra.nixos.org/build/2315847
3020
* doc/coreutils.texi (ln invocation): s/path/file name/
3022
2012-03-22 Harald Hoyer <harald@redhat.com>
3024
ln: add the --relative option
3025
With the "--relative --symbolic" options, ln computes the relative
3026
symbolic link for the user.
3028
So, ln works just as cp, but creates relative symbolic links instead
3029
of copying the file.
3031
I miss this feature since the beginning of using ln.
3041
4 directories, 1 file
3043
$ ln -s -v --relative usr/lib/foo/foo usr/bin/foo
3044
‘usr/bin/foo’ -> ‘../lib/foo/foo’
3050
| `-- foo -> ../lib/foo/foo
3055
4 directories, 2 files
3057
$ ln -s -v --relative usr/bin/foo usr/lib/foo/link-to-foo
3058
‘usr/lib/foo/link-to-foo’ -> ‘foo’
3064
| `-- foo -> ../lib/foo/foo
3067
|-- link-to-foo -> foo
3070
4 directories, 3 files
3072
* src/Makefile.am: Reference the relpath module.
3073
* src/ln.c (usage): Mention the new option.
3074
(do_link): Call the relative conversion if specified.
3075
(convert_abs_rel): Perform the relative conversion
3076
using the relpath module.
3077
* tests/ln/relative: Add a new test.
3078
* tests/Makefile.am: Reference the new test.
3079
* doc/coreutils.texi: Document the new feature.
3080
* NEWS: Mention the new feature.
3082
2012-03-22 Pádraig Brady <P@draigBrady.com>
3084
maint: refactor relpath() from `realpath` for use by `ln`
3085
* src/relpath.c: Refactored from realpath.c and adjusted
3086
to support returning the relative path rather than just
3088
* src/relpath.h: Export the relpath function.
3089
* src/Makefile.am: Reference the refactored relpath module.
3090
* po/POTFILES.in: Likewise.
3091
* src/realpath.c: Adjust to the refactored relpath module.
3093
2012-03-22 Pádraig Brady <P@draigBrady.com>
3095
maint: ensure PATH_MAX is set correctly
3096
This reverts part of commit v8.12-103-g54cbe6e.
3098
* src/system.h: Include gnulib's pathmax.h to honor
3099
system specific limits, and then we set PATH_MAX only if needed.
3100
Note pathmax.h no longer uses pathconf ("/", _PC_PATH_MAX).
3101
Note I didn't reinstate the comments about limits.h inclusion
3102
order, because pathmax.h includes limits.h anyway.
3104
2012-03-21 Jim Meyering <meyering@redhat.com>
3106
build: add numerous gnulib modules, mostly for improved portability
3107
* bootstrap.conf (gnulib_modules): Add numerous modules for
3108
improved portability. Reported by Eric Blake in
3109
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2426/focus=2489
3110
* po/POTFILES.in: Add new files.
3112
build: update gnulib submodule to latest
3114
maint: use more modern fseeko, rather than fseek
3115
* src/tac.c (temp_stream): Use fseeko, not fseek, on principle:
3116
use the more modern interface. In general it is better to avoid
3117
fseek due to its ABI-imposed 4GiB limit on the "offset", here its
3118
use was fine because the offset was always 0. Using fseeko also
3119
has the advantage of not triggering a GNULIB_POSIXCHECK warning.
3120
Reported by Eric Blake in
3121
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2426/focus=2489
3123
2012-03-20 Eric Blake <eblake@redhat.com>
3125
build: speed up configure for releases
3126
Since most users won't be building with GNULIB_POSIXCHECK defined in
3127
CFLAGS, and since we can make ./configure 10% (several seconds!) faster
3128
by omitting the framework for a posix check, this patch makes it so
3129
that the framework is omitted by default, while still giving
3130
instructions for maintainers to re-enable it.
3132
It's been a while since we've used GNULIB_POSIXCHECK; see this email:
3133
https://lists.gnu.org/archive/html/coreutils/2012-03/msg00126.html
3134
Some of those failures are because we are intentionally avoiding
3135
specific gnulib modules (that is, we have chosen not to use things
3136
like fprintf-posix), but until we work with gnulib to avoid particular
3137
warnings, wiring up an automatic GNULIB_POSIXCHECK to happen during
3138
'make my-distcheck' is not feasible.
3140
* configure.ac (gl_ASSERT_NO_GNULIB_POSIXCHECK): Conditionally
3141
define, according to whether $GNULIB_POSIXCHECK is in environment.
3143
2012-03-20 Jim Meyering <meyering@redhat.com>
3145
tests: avoid spurious misc/factor failure on OpenBSD 5.1
3146
* tests/misc/factor: Map OpenBSD 5.1's "unknown option" to our
3147
expected "invalid option". Reported by Bruno Haible.
3149
maint: remove now-superfluous coreutils-path-check rule
3150
* dist-check.mk (coreutils-path-check): Now that we set PATH in
3151
TESTS_ENVIRONMENT, it seems like overkill to make "distcheck"
3152
rerun all tests just to check this.
3153
(my-distcheck): Remove sole use.
3155
2012-03-20 Eric Blake <eblake@redhat.com>
3157
doc: clarify current realpath --relative-base behavior
3158
For compatibility with MacOS relpath(1), as seen here:
3160
http://opensource.apple.com/source/bootstrap_cmds/\
3161
bootstrap_cmds-79/relpath.tproj/relpath.c
3163
we implemented 'realpath --relative-base=dir1 --relative-to=dir2 file'
3164
in the same way as 'relpath -d dir1 dir2 file'. This can result
3165
in --relative-base rendering --relative-to as a no-op if dir1 is a
3166
child of dir2. Document this.
3168
* doc/coreutils.texi (realpath invocation): Mention restriction.
3170
2012-03-20 Pádraig Brady <P@draigBrady.com>
3172
tests: avoid spurious dd/sparse failure
3173
* tests/dd/sparse: Allow for greater variation in sparse-block counts.
3174
Reported by Nelson H. F. Beebe and Bruno Haible.
3176
2012-03-17 Pádraig Brady <P@draigBrady.com>
3178
tests: fix sort-discrim to work without GMP
3179
* tests/misc/sort-discrim: The expr limit is intmax_t without GMP.
3181
2012-03-16 Pádraig Brady <P@draigBrady.com>
3183
tests: avoid an ls-time false positive on Solaris 10
3184
* tests/misc/ls-time: Force a ctime update as updating
3185
the atime doesn't update ctime on tmpfs on Solaris 10.
3187
2012-03-15 Eric Blake <eblake@redhat.com>
3189
realpath: optimize --relative-base usage
3190
There is no need to recompute for every path being visited whether
3191
the base is a prefix of the relative location.
3193
* src/realpath.c (relpath): Hoist base check...
3195
Based on a suggestion by Pádraig Brady.
3197
2012-03-15 Eric Blake <eblake@redhat.com>
3199
realpath: let --relative-to default to --relative-base
3200
Most of the time, if someone wants to filter which paths are
3201
relative while leaving all others absolute, they also want to
3202
to the filtering based on the same --relative-to directory.
3203
Make this easier to specify.
3205
* src/realpath.c (main): Convert error to default.
3206
* doc/coreutils.texi (realpath invocation): Document this.
3207
* tests/misc/realpath: Adjust test to match.
3208
* NEWS: Document it.
3210
2012-03-15 Eric Blake <eblake@redhat.com>
3212
tests: cover more realpath scenarios
3213
'realpath --relative-base --relative-to' is identical to
3214
--relative-base=--relative-to, so the test wasn't covering what
3215
it claimed. Expose recent fixes for handling of // on systems
3216
where // is distinct, and for --relative-base=/. Add test that
3217
exposes our design decision that --relative-base that is not a
3218
prefix of --relative-to is a no-op (if we later change behavior,
3219
we will also have to change that part of the test).
3221
* tests/misc/realpath: Fix typo. Add some tests.
3223
2012-03-15 Eric Blake <eblake@redhat.com>
3225
realpath: fix problems with root handling
3226
When --relative-base is /, all other paths should be treated as
3227
relative (except for // where it matters).
3229
Also, on platforms like Cygwin where / and // are distinct, realpath
3230
was incorrectly collapsing // into /. http://debbugs.gnu.org/10472.
3232
* src/realpath.c (path_prefix, path_common_prefix): Treat /
3233
and // as having no common match.
3234
(relpath): Allow for no match even without --relative-base.
3235
* NEWS: Document this.
3237
2012-03-14 Eric Blake <eblake@redhat.com>
3239
test: expose recent gnulib canonicalize bug
3240
https://lists.gnu.org/archive/html/bug-gnulib/2012-02/msg00038.html
3241
detailed a couple of bugs in gnulib's canonicalize that were visible
3242
through coreutils' readlink, but only on systems where // is distinct
3243
from /. This particular test assumes the POSIX fix which requires
3244
canonicalization of a symlink containing just slashes to behave as
3245
if slashes separating the symlink from the rest of the name are
3246
elided (see http://austingroupbugs.net/view.php?id=541), as that is
3247
the only useful (and current) behavior on Cygwin. That is,
3252
must list the contents of /dev, not //dev.
3254
* tests/misc/readlink-root: New test.
3255
* tests/Makefile.am (TESTS): Run it.
3257
2012-03-14 Paul Eggert <eggert@cs.ucla.edu>
3258
Drew Kutilek <dkutilek@ucla.edu>
3259
James Wendt <jwendt@cs.ucla.edu>
3261
tests: new discriminator-based test for sort -n and -h
3262
* tests/Makefile.am (TESTS): Add misc/sort-discrim.
3263
* tests/misc/sort-discrim: New file, which tests a discriminator-based
3264
implementation of 'sort'. Coreutils doesn't use this implementation
3265
yet, but the test is useful anyway.
3267
2012-03-10 Jérémy Compostella <jeremy.compostella@gmail.com>
3269
dirname: support more than one argument
3270
* src/dirname.c (main): Handle new -z option and manage more than one
3272
* doc/coreutils.texi (dirname invocation): Mention it.
3273
* NEWS (New features): Mention it.
3274
* tests/misc/dirname: Add a two arguments test.
3276
split: support an arbitrary number of split files by default
3277
* src/split.c (next_file_name): If `suffix_auto' is true and the first
3278
suffix character is 'z', generate a new file file name adding `z' to
3279
the prefix and increasing the suffix length by one.
3280
(set_suffix_length): Disable auto suffix width in various cases.
3281
* tests/split/suffix-auto-length: Test it.
3282
* doc/coreutils.texi (split invocation): Mention it.
3283
* NEWS (Improvements): Likewise.
3285
2012-03-09 Jérémy Compostella <jeremy.compostella@gmail.com>
3287
doc: add missing documentation for basename -z
3288
doc/coreutils.texi (basename invocation): Add -z option documentation.
3290
2012-03-09 Bernhard Voelker <mail@bernhard-voelker.de>
3292
maint: fix a version number typo in NEWS
3293
* NEWS: s/8.14/8.15/
3295
2012-03-09 Paul Eggert <eggert@cs.ucla.edu>
3297
chmod: add notations +40, 00440, etc.
3298
* NEWS: Document this.
3299
* doc/perm.texi (Operator Numeric Modes): New section.
3300
(Numeric Modes, Directory Setuid and Setgid): Document new behavior.
3301
* src/chmod.c (usage): Document new behavior.
3302
(main): Support new options -0, -1, etc.
3303
* tests/chmod/setgid: Test these new features.
3305
build: update gnulib submodule to latest
3307
2012-03-08 Jim Meyering <meyering@redhat.com>
3309
du: fix -x: don't ignore non-directory arguments
3310
Surprise! "du -x non-DIR" would print nothing.
3311
Note that the problem arises only when processing a non-directory
3312
specified on the command line. Not surprisingly, "du -x" still
3313
works as expected for any directory argument.
3315
When performing its same-file-system check, du may skip an entry
3316
only if it is at fts_level 1 or greater. Command-line arguments
3317
are at fts_level == 0 (FTS_ROOTLEVEL).
3319
* src/du.c (process_file): Don't use the top-level FTS->fts_dev
3320
when testing for --one-file-system (-x). It happens to be valid
3321
for directories, but it is always 0 for a non-directory.
3322
* tests/du/one-file-system: Add tests for this.
3323
* NEWS (Bug fixes): Mention it.
3324
Reported by Daniel Stavrovski in http://bugs.gnu.org/10967.
3325
Introduced by commit v8.14-95-gcfe1040.
3327
2012-03-07 Jim Meyering <meyering@redhat.com>
3329
maint: use an optimal-for-coreutils xz compression setting
3330
* cfg.mk: Set XZ_OPT = -8e (determined empirically).
3331
This sacrifices 8 KiB of compressed tarball size for a 32-MiB
3332
decrease in the memory required during decompression. I.e.,
3333
using -9e would shave off only 8 KiB from the tar.xz file, yet
3334
would force every decompression process to use 32 MiB more memory.
3336
2012-03-07 Jérémy Compostella <jeremy.compostella@gmail.com>
3338
basename: support more than one argument
3339
* src/basename.c (perform_basename): New function refactored from
3340
main() that performs the basename work on a STRING, optionally
3341
removes a trailing SUFFIX and outputs the result.
3342
(main): Handle new options.
3343
* doc/coreutils.texi (basename invocation): Mention new options.
3344
* test/misc/basename: Add new options test cases.
3345
* NEWS (New features): Mention it.
3347
2012-03-06 Pádraig Brady <P@draigBrady.com>
3349
maint: refactor copy to use is_nul()
3350
* src/dd.c: Move is_nul() from here to ...
3351
* src/system.h: ... here
3352
* src/copy.c (sparse_copy): Adjust to use the refactored is_nul()
3354
2012-03-02 Pádraig Brady <P@draigBrady.com>
3356
tests: work around a block alignment issue in dd/sparse
3357
Prompted by the continuous integration build failure at:
3358
http://hydra.nixos.org/build/2188210 (which uses XFS).
3360
* tests/dd/sparse (alloc_equal): Add a block allocation
3361
comparison function that accounts for variations due
3364
2012-02-29 Rodrigo Campos <rodrigo@sdfg.com.ar>
3366
doc: timeout: document the exit status when run with "-s KILL"
3367
* src/timeout.c (usage): Document the exit status for this case,
3368
in --help and thus in the man page. Word so that it covers
3369
both the -s9 and -k options.
3370
* doc/coreutils.texi (timeout invocation): Document the exit
3371
status for this case.
3373
2012-02-29 Bernhard Voelker <mail@bernhard-voelker.de>
3375
tests: compile and link shared object with $CC to make LD_PRELOAD work
3376
* tests/ls/getxattr-speedup: Compile and link in one step with $CC.
3377
If the shared object file is created by ld (binutils), then the
3378
destructor print_call_count() may not run (seen on OpenSuSE 12.1).
3379
See http://lists.opensuse.org/opensuse/2012-02/msg01342.html
3380
Thanks to Cristian Rodríguez.
3382
2012-02-29 Roman Rybalko <devel@romanr.info>
3384
dd: add support for the conv=sparse option
3386
Small seeks are not coalesced to larger ones,
3387
like is done in cache_round() for example.
3389
conv= is used rather then oflag= for FreeBSD compatibility.
3391
* src/dd.c (final_op_was_seek): A new global boolean to flag
3392
whether the final "write" was converted to a seek.
3393
(usage): Describe the new conf=sparse option.
3394
(iwrite): Convert a write of a NUL block to a seek if requested.
3395
(do_copy): Initialize the output buffer to have a sentinel,
3396
to allow for efficient testing for NUL output blocks.
3397
If the last block in the file was converted to a seek,
3398
then convert back to a write so the size is updated.
3399
* NEWS: Mention the new feature.
3400
* tests/dd/sparse: A new test for the feature.
3401
* tests/Makefile.am: Reference the new test.
3403
2012-02-27 Jérémy Compostella <jeremy.compostella@gmail.com>
3405
doc: fix a wrong option reference in split invocation
3406
* doc/coreutils.texi (split invocation): replace `-r' reference with
3409
2012-02-26 Jim Meyering <meyering@redhat.com>
3411
tests: fix help-version on cygwin, where $EXEEXT is nonempty
3412
* tests/misc/help-version: Remove the $EXEEXT suffix from each
3413
program name before comparing with a literal.
3415
2012-02-26 Bernhard Voelker <mail@bernhard-voelker.de>
3417
tests: remove unnecessary use of -lc
3418
* tests/ls/getxattr-speedup: Remove unneeded use of -lc.
3420
2012-02-25 Paul Eggert <eggert@cs.ucla.edu>
3422
sort: default to physmem/8, not physmem/16
3423
* src/sort.c (default_sort_size): Don't divide advice by 2.
3424
Just divide the hard limits by 2. This matches the comments.
3425
Reported by Rogier Wolff in http://bugs.gnu.org/10877
3427
2012-02-24 Jim Meyering <meyering@redhat.com>
3429
doc: clarify a comment in system.h
3430
* src/system.h (STRNCMP_LIT): Clarify comment.
3431
Suggested by Bruno Haible.
3433
2012-02-20 Jérémy Compostella <jeremy.compostella@gmail.com>
3435
split: add the --additional-suffix option
3436
Add the --additional-suffix option, to append an
3437
additional static suffix to output file names.
3439
* src/split.c (next_file_name): Append suffix to output file names.
3440
(main): Handle new --additional-suffix option.
3441
* NEWS (New features): Mention it.
3442
* doc/coreutils.texi (split invocation): Mention it.
3443
* tests/split/additional-suffix: New file. Test --additional-suffix.
3444
* tests/Makefile.am (TESTS): Add it.
3445
Requested by Peng Yu, in bug 6554
3447
2012-02-20 Pádraig Brady <P@draigBrady.com>
3449
ls: adjust errnos indicating device non support for xattrs
3450
* src/ls.c (errno_unsupported): Remove EBUSY, as this caters for
3451
the case where ACLs can't be accessed because the _file_ is locked.
3452
http://lists.gnu.org/archive/html/bug-coreutils/2005-06/msg00191.html
3453
Also ENOENT is not safe to include as you get that if the _file_
3454
is removed between the stat() and subsequent querying of xattrs.
3456
2012-02-19 Jérémy Compostella <jeremy.compostella@gmail.com>
3458
tests: ls/getxattr-speedup: include <sys/types.h> for older headers
3459
Modern <stdio.h> provides ssize_t, but the one from Debian's
3460
libc6-dev 2.11.2-10 apparently does not.
3461
* tests/ls/getxattr-speedup: Also include <sys/types.h>.
3463
2012-02-18 Jérémy Compostella <jeremy.compostella@gmail.com>
3465
doc: fix file names in split --filter=command example
3466
* doc/coreutils.texi (split invocation): Output file names should be
3467
prefixed with `big-' not `big-x'.
3469
2012-02-18 Jim Meyering <meyering@redhat.com>
3471
tests: test for ls speed-up
3472
* tests/ls/getxattr-speedup: New test.
3473
* tests/Makefile.am (TESTS): Add it.
3474
Improved-by: Bernhard Voelker
3476
ls: cache ACL- and CAP-querying syscall failures
3477
Like the optimization to avoid always-failing getfilecon calls,
3478
this change avoids always-failing queries for whether a file has
3479
a nontrivial ACL and for whether a file has certain "capabilities".
3480
When such a query fails for one file (indicating no support), we know it
3481
will always fail that way for the affected device. With this change, we
3482
have thus eliminated nearly all failing-unsupported getxattr syscalls.
3483
* src/ls.c (has_capability) [!HAVE_CAP]: Set errno to ENOTSUP.
3484
(errno_unsupported): Expand the list of E* errno values to match
3485
that of lib/acl-internal.h's ACL_NOT_WELL_SUPPORTED macro.
3486
(file_has_acl_cache, has_capability_cache): New functions.
3487
(gobble_file): Use them in place of non-caching ones.
3488
* NEWS (Improvements): Mention it.
3489
Suggested by Sven Breuner in
3490
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2187
3491
While eliminating most getfilecon calls saved about 33%,
3492
eliminating these other calls can save almost all of the
3493
remaining ~67% cost, on some remote file systems.
3495
ls: optimize for when getfilecon would often fail (~33% perf. gain)
3496
On systems or file systems without SELinux support, all getfilecon
3497
and lgetfilecon calls would fail due to lack of support. We can non-
3498
invasively cache such failure (on most recently accessed device) and
3499
avoid the vast majority of the failing underlying getxattr syscalls.
3500
* src/ls.c (errno_unsupported): New function.
3501
(selinux_challenged_device): New file-scoped global.
3502
(getfilecon_cache, lgetfilecon_cache): New error-caching wrapper
3504
(gobble_file): Use the caching wrappers, for when many *getfilecon
3505
calls would fail with ENOTSUP or EOPNOTSUPP.
3506
Suggested by Sven Breuner in
3507
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/2187
3508
Improved-by: Pádraig Brady.
3510
2012-02-18 Jérémy Compostella <jeremy.compostella@gmail.com>
3512
split: support optional start value for --numeric-suffixes
3513
Allow changing the --numeric-suffixes start number
3514
from the default of 0.
3516
* src/split.c (next_file_name): Initialize the suffix index
3517
and the output filename according to start value.
3518
(main): Check that the suffix length is large enough for the
3519
numerical suffix start value.
3520
* doc/coreutils.texi (split invocation): Mention it.
3521
* NEWS (New features): Mention it.
3522
* tests/split/numeric: New file. Test --numeric-suffixes[=FROM].
3523
* tests/Makefile.am (TESTS): Reference the new test.
3525
2012-02-17 Pádraig Brady <P@draigBrady.com>
3527
doc: fix a typo about seek_bytes in NEWS
3528
* NEWS: s/count_bytes/seek_bytes/2
3530
2012-02-16 Bernhard Voelker <mail@bernhard-voelker.de>
3532
doc: improve 'rm -f' description
3533
* doc/coreutils.texi (rm invocation): Mention that the -f option also
3534
silences the message for missing operands, which is useful in scripts
3535
e.g., for "rm -f $file_list" when $file_list is empty.
3536
* src/rm.c (usage): Likewise.
3537
Reported by Jérémy Magrin in http://bugs.gnu.org/10819
3539
2012-02-13 Pádraig Brady <P@draigBrady.com>
3541
dd: fix issues in the count_bytes and seek_bytes flags change
3542
These edge cases were missed in the previous commit 140eca15c.
3544
* src/dd.c (main): Include the bytes slop when truncating
3545
without further I/O. Don't invalidate the whole file cache
3546
in the case where 0 < count < ibs.
3547
* tests/dd/bytes: Change to using the independent truncate
3548
command to generate the file for comparison. Remove a redundant
3549
test case and replace with one testing the truncation only logic.
3551
2012-02-12 Jérémy Compostella <jeremy.compostella@gmail.com>
3553
dd: add count_bytes, skip_bytes and seek_bytes flags
3554
dd now accepts the count_bytes and skip_bytes input flag and the
3555
seek_bytes output flag, to more easily allow processing portions of a
3558
* src/dd.c (scanargs): Compute skip_records and skip_bytes when
3559
'skip_bytes' iflag is used. Compute max_records and max_bytes when
3560
'count_bytes' iflag is used. Compute seek_records and seek_bytes
3561
when 'seek_bytes' oflag is used.
3562
(skip_via_lseek): Use new 'bytes' parameter and handle potential
3563
'records' equals to zero. Update the bytes parameter when called with
3564
'fdesc' equal to STDOUT_FILENO. Update the header comments.
3565
(dd_copy): Skip accordingly to skip_records AND skip_bytes. Count
3566
accordingly to max_records AND max_bytes. Seek on output accordingly
3567
to seek_records AND seek_bytes.
3568
* NEWS (New features): Mention it.
3569
* doc/coreutils.texi (dd invocation): Detail new flags and behaviors.
3570
* tests/dd/bytes: New file. Tests for these new flags.
3571
* tests/Makefile.am (TESTS): Add it.
3573
2012-02-12 Jim Meyering <meyering@redhat.com>
3575
build: correct @@-,length values in last hunk of regcomp.c.diff
3576
* gl/lib/regcomp.c.diff: Correct invalid hunk lengths (s/1/7/g)
3577
in the last hunk's @@-line.
3579
build: update gnulib, bootstrap, gl/lib/regcomp.c.diff
3580
* gnulib: Update submodule to latest.
3581
* bootstrap: Update from gnulib.
3582
* gl/lib/regcomp.c.diff: Adapt to gnulib changes.
3584
mv: "mv A B" would sometimes succeed, yet A would remain, ...
3585
But only when both A and B were hard links to the same symlink.
3586
* src/copy.c (same_file_ok): Handle another special case: the one
3587
in which we are moving a symlink onto a hard link to itself.
3588
In this case, we must explicitly tell the caller to unlink the
3589
source file. Otherwise, at least the linux-3.x kernel rename
3590
function would do nothing, as mandated by POSIX 2008.
3591
* tests/mv/symlink-onto-hardlink-to-self: New test.
3592
* tests/Makefile.am (TESTS): Add it.
3593
* NEWS (Bug fixes): Mention it.
3594
Reported by Bernhard Voelker in http://bugs.gnu.org/10686
3596
2012-02-06 Jérémy Compostella <jeremy.compostella@gmail.com>
3598
maint: add braces as requested by HACKING coding standard
3599
* src/dd.c (dd_copy): Braces were missing for this do/while statement.
3601
2012-01-31 Pádraig Brady <P@draigBrady.com>
3603
doc: clarify --help output for some optional arguments
3604
* src/pr.c (usage): Fix the -S description to indicate
3605
that the argument is optional for the short option.
3606
* doc/coreutils.texi (pr invocation): Likewise.
3607
* src/od.c (usage): Fix the -S description to indicate
3608
that the argument is required for the short option.
3609
Clarify -w takes an argument and that it is optional.
3611
2012-01-30 Jim Meyering <meyering@redhat.com>
3613
maint: sort: remove the last uses of "'%s'" in diagnostics
3614
* src/sort.c (key_warnings): Use quote (quote_n, since there are two)
3615
rather than literal single quotes ('%s') in diagnostic.
3617
mv: allow moving symlink onto same-inode dest with >= 2 hard links
3618
Normally, mv detects a few subtle cases in which proceeding with a
3619
same-file rename would, with very high probability, cause data loss.
3620
Here, we have found a corner case in which one of these same-inode
3621
tests makes mv refuse to perform a useful operation. Permit that
3623
* src/copy.c (same_file_ok): Detect/exempt this case.
3624
* tests/mv/symlink-onto-hardlink: New test.
3625
* tests/Makefile.am (TESTS): Add it.
3626
* NEWS (Bug fixes): Mention it.
3627
Initially reported by: Matt McCutchen in http://bugs.gnu.org/6960.
3628
Raised again by Anders Kaseorg due to http://bugs.debian.org/654596.
3629
Improved-by: Paul Eggert.
3631
build: update gnulib, for syntax-check vs canonicalize fix
3633
2012-01-27 Jim Meyering <meyering@redhat.com>
3635
maint: use single copyright year range
3636
Run "make update-copyright".
3638
maint: make copyright statements more consistent; update gnulib
3639
* cfg.mk (update-copyright-env): Add UPDATE_COPYRIGHT_FORCE=1
3640
to rejoin some split lines, and UPDATE_COPYRIGHT_USE_INTERVALS=2
3641
to make update-copyright use only one year range.
3642
* gnulib: Update to latest, for newer update-copyright script.
3644
maint: fix copyright in old fileutils ChangeLog
3645
* old/fileutils/ChangeLog-1997: Insert omitted "Free Software" in
3646
the name of the copyright holder. Compress year range.
3648
2012-01-26 Pádraig Brady <P@draigBrady.com>
3650
maint: remove some redundant automake _SOURCES
3651
* src/Makefile.am: Remove auto generated entries.
3653
2012-01-25 Pádraig Brady <P@draigBrady.com>
3655
maint: cleanup an extraneous version output in a test
3656
* test/misc/stdbuf: Fixup the minor copy & paste issue
3657
introduced in commit ff7f0ff8
3659
2012-01-25 Pádraig Brady <P@draigBrady.com>
3661
realpath: avoid the use of printf
3662
This was seen to give an 11% performance improvement.
3664
* src/realpath.c (relpath): Avoid using printf.
3665
(process_path): Likewise.
3667
2012-01-25 Pádraig Brady <P@draigBrady.com>
3669
maint: use the standard require_perl_ function
3670
* tests/cp/sparse-fiemap: Don't use a separate check.
3672
realpath: remove extraneous '/' for --relative-to edge cases
3673
* src/realpath.c (path_common_prefix): Be consistent and
3674
always include a leading '/' in the count returned.
3675
(relpath): Account for the change in path_common_prefix()
3676
and avoid outputting extra '/' chars in relative paths that
3678
* tests/misc/realpath: Add the two reported cases.
3679
Reported by Mike Frysinger
3681
2012-01-23 Jim Meyering <meyering@redhat.com>
3683
build: update gnulib to latest, for test warning fixes
3684
See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/29810
3687
tests: remove crufty test=test_name code from old tests
3688
Before init.sh and similar, we would set test=test_name, and then
3689
construct temporary file names using $test. Now that each
3690
init.sh-using test is in its own directory, that practice is unwelcome.
3691
Remove bad examples.
3692
* tests/rm/f-1: Per above.
3693
* tests/rm/i-1: Likewise.
3694
* tests/rm/interactive-always: Likewise.
3695
* tests/rm/interactive-once: Likewise.
3696
* tests/rm/ir-1: Likewise.
3697
* tests/rm/r-1: Likewise.
3699
2012-01-22 Paul Eggert <eggert@cs.ucla.edu>
3701
maint: quote 'like this' or "like this", not `like this'
3702
* doc/coreutils.texi (Formatting the file names):
3703
coreutils now quotes 'like this'.
3705
* src/timeout.c (usage): Quote 'like this' in diagnostics.
3706
* HACKING, Makefile.am, NEWS, README, README-hacking, TODO, cfg.mk:
3707
* doc/Makefile.am, doc/coreutils.texi, m4/jm-macros.m4:
3708
* man/Makefile.am, man/help2man, src/Makefile.am, src/copy.h:
3709
* src/extract-magic, src/ls.c, src/pinky.c, src/pr.c, src/sort.c:
3710
* src/split.c, src/timeout.c, src/who.c, tests/dd/skip-seek-past-file:
3711
* tests/pr/pr-tests: Quote 'like this' in commentary.
3712
* cfg.mk (old_NEWS_hash): Update due to changed old NEWS.
3714
2012-01-20 Pádraig Brady <P@draigBrady.com>
3716
stat: clarify the description of the %o stat format
3717
* src/stat.c (usage): Indicate this is a transfer size
3718
suggestion, rather than some persistent block size.
3719
* doc/coreutils.texi (stat invocation): Likewise.
3721
2012-01-14 Jim Meyering <meyering@redhat.com>
3723
doc: tweak an @uref so its alt reference text renders in info
3724
* doc/coreutils.texi (Opening the software toolbox): Remove commas
3725
from @uref argument, so the alternate text renders properly in info.
3726
Reported by Reuben Thomas.
3728
2012-01-11 Pádraig Brady <P@draigBrady.com>
3730
maint: fix minor whitespace issues
3731
The previous commit introduced a couple of spacing issues,
3732
luckily one of which caused a test to fail.
3734
* src/stat.c (default_format): Add a space so times are aligned.
3735
* src/tr.c (string2_extentd): Remove an extraneous space.
3737
2012-01-11 Jim Meyering <meyering@redhat.com>
3739
maint: adjust formatting of certain continued strings
3740
Add a rule to ding any source file that has a continued string
3741
with a word in the first column of the following line.
3742
Those tend to trigger malfunction in tools that try to map an
3743
arbitrary line number to an enclosing function name. Of course,
3744
very many strings do precisely this, *when they are part of the
3745
usage function*. So we exempt the body of each usage function.
3746
* src/dircolors.c (main): Separate a long, continued string
3747
into two separately-quoted parts.
3748
* src/od.c (decode_one_format): Likewise.
3749
(decode_one_format, main): Move a space from end of
3750
preceding line to the beginning of the continued line.
3751
* src/tr.c (unquote, string2_extend, validate): Likewise.
3752
* src/seq.c (main): Split in two and use string concatenation.
3753
* src/stat.c (default_format): Use a mix of techniques.
3754
* cfg.mk (sc_prohibit_continued_string_alpha_in_column_1): New rule.
3755
Exempt three files in src: system.h, od.c, printf.c.
3757
2012-01-09 Jim Meyering <meyering@redhat.com>
3759
maint: straggler *.[ch] files: convert more `...' to '...'
3760
The preceding commands ignored .[ch] files in lib/ and gl/.
3761
This is what I should have been doing from the start:
3763
git grep -l '`.*'\' $(g ls-files |grep '\.[ch]$') \
3764
| xargs perl -pi -e 's/`(.+?'\'')/'\''$1/'
3766
2012-01-09 Jim Meyering <meyering@redhat.com>
3768
maint: src/*.[ch]: convert more `...' to '...'
3770
git grep -E -l '`.+'\' src/*.[ch] \
3771
|xargs perl -pi -e 's/`(.+?'\'')/'\''$1/'
3773
maint: src/*.c: change remaining quotes (without embedded spaces)
3775
git grep -E -l '`[^ ]+'\' src/*.c \
3776
|xargs perl -pi -e 's/`([^ ]+'\'')/'\''$1/'
3778
maint: convert `...' to '...' in --help output
3779
All affected lines end with \ or \n\, so run this command
3780
until it produces no new changes (4 times):
3781
git grep -E -l '`[^ ]+'\''.*\\' src \
3782
|xargs perl -pi -e 's/`([^ ]+'\''.*\\)/'\''$1/'
3784
maint: adjust quoting: emit '...', not `...' in diagnostics
3785
* src/csplit.c (parse_repeat_count, extract_regexp): As above.
3786
* src/date.c (main): Likewise.
3787
* src/ls.c (decode_switches): Likewise.
3788
* src/od.c (decode_one_format, main): Likewise.
3789
* src/pathchk.c (no_leading_hyphen): Likewise.
3790
* src/pr.c (main, getoptarg): Likewise.
3791
* src/rm.c (diagnose_leading_hyphen): Likewise.
3792
* src/sort.c (key_warnings, incompatible_options, main): Likewise.
3793
* src/stat.c (print_esc_char): Print '\x', not `\x' in diagnostic.
3794
* src/test.c (main): Likewise.
3795
* src/touch.c (main): Likewise.
3796
* src/tr.c (build_spec_list, validate, append_range): Likewise.
3797
* tests/misc/mktemp: This is an unusual case, since the affected
3798
string contains only the ` of an `...' string. So we change
3799
the long ` to a lone '.
3800
* tests/pr/pr-tests: Manual quote adapting fix-up.
3801
* tests/ln/hard-to-sym: Likewise.
3802
* tests/split/suffix-length: Likewise.
3803
* tests/mv/part-fail: Likewise.
3804
* tests/misc/chcon: Likewise.
3805
* tests/misc/stat-printf: Likewise.
3807
2012-01-09 Jim Meyering <meyering@redhat.com>
3809
tests: more automated quote adjustment
3810
Relax initial regexp to match more instances, but add a
3811
filter to avoid some invalid conversions. Run this:
3813
git grep -l "\`[^']*'" tests | xargs perl -pi -e '$q=q"'\''";' \
3814
-e '$q="$q\\$q$q"; /(= ?\`|\`expr|\`echo|\Q$q\E)/ and next;' \
3815
-e ' s/\`([^'\''"]*?'\'')/'\''$1/g'
3816
The last disjunct in the above (...) filter is to exempt
3817
any line that contains this string: '\''
3818
With quoting like that, converting a ` to ' is likely to cause trouble,
3819
so we'll handle those manually. Here are three examples where
3820
the exemption is required:
3822
*': `link-to-dir/'\'': hard link not allowed for directory'*) ;;
3823
printf 'creating file `%s'\''\n' $f
3824
'mv: inter-device move failed: `%s'\'' to `%s'\'';'\
3826
2012-01-09 Jim Meyering <meyering@redhat.com>
3828
tests: change `...' to '...' on lines not matching /[=\$]/
3829
Exempt lines with '$' or '=', since those are prone to improper
3830
conversion. Run this:
3831
git grep -l "\`[^']*'" tests \
3832
|xargs perl -pi -e '/[=\$]/ and next;s/\`([^'\''"]*?'\'')/'\''$1/g'
3834
tests: adjust \`...' quoting to '...' to adapt to latest gnulib
3836
git grep -l "\\\\\`[^']*'" tests \
3837
|xargs perl -pi -e 's/\\\`(.*?'\'')/'\''$1/g
3839
build: update gnulib submodule to latest (quoting change)
3840
This pulls in changes to the quote and quotearg modules that
3841
render quoted strings in diagnostics. `Old' vs 'new'.
3843
maint: prep for global quoting changes: handle irregular cases manually
3844
* src/chroot.c (usage): Change ``...'' to '...', and describe the
3845
default more accurately (also adding quotes): s,/bin/sh,'/bin/sh -i',
3846
* src/join.c (usage): Change ` ...'' ' to "...''".
3847
* src/fmt.c (isopen): Change `' to '` in list of bytes, so that
3848
a subsequent change can safely perform the `...' to '...' conversion.
3849
* src/truncate.c (main): Tweak quoting in comments to use '...',
3850
not `...`, for consistency with the rest of comments in coreutils.
3852
2012-01-07 Jim Meyering <meyering@redhat.com>
3854
maint: update quoting of "Try `prog --help'" to "Try 'prog --help'"
3855
Automatically adjust both the source (now in only one place)
3856
and all tests that expect the resulting output via this:
3858
git grep -l 'Try.*--help' src/system.h tests \
3859
| xargs perl -pi -e 's/Try \\?`(\S+ --help)/Try '\''$1/'
3861
2012-01-07 Jim Meyering <meyering@redhat.com>
3863
maint: use new emit_try_help in place of equivalent fprintf
3866
's/fprintf \(stderr, _\("Try `%s --help.*\n.*;/emit_try_help ();/m'\
3869
maint: factor out all `Try --help'-emitting statements
3870
* src/system.h (emit_try_help): New function.
3872
2012-01-06 Jim Meyering <meyering@redhat.com>
3874
maint: post-release administrivia
3875
* NEWS: Add header line for next release.
3876
* .prev-version: Record previous version.
3877
* cfg.mk (old_NEWS_hash): Auto-update.
3880
* NEWS: Record release date.
3882
scripts: allow one-line summary to start with "[Vv]ersion \d"
3883
* scripts/git-hooks/commit-msg: Do not reject the commit log
3884
message generated by our automated release-and-tag process.
3885
(bad_first_line): New function, extracted from...
3886
(check_msg): ... here. Use it.
3888
build: update gnulib submodule to latest
3890
tests: adjust quoting in expected output to match new gnulib policy
3891
* tests/misc/xstrtol: Use '...' to match new quoting in most places.
3892
However, leave `9x' to match the sole comparison against output
3893
from the quote function, which still uses `...'.
3894
* tests/misc/sort-merge: Likewise, though here I had to leave
3895
`...'-quoted output to match output from four tests.
3896
* tests/pr/pr-tests: Convert a single `...' to '...'.
3897
* gnulib: Update submodule to latest.
3899
maint: adjust ChangeLog to reflect earlier df request
3900
* build-aux/git-log-fix: Credit early reporter.
3901
* THANKS.in: Add a name.
3903
2012-01-05 Pádraig Brady <P@draigBrady.com>
3905
tests: avoid stty icanon issues on some platforms
3906
* tests/misc/stty: Exclude 'icanon' for the list to check,
3907
as it's problematic on ppc*|sparc* platforms.
3909
tests: avoid ulimit issue on bash 3.2 on OS X
3910
* tests/misc/sort-continue: Perform the glob before
3911
the ulimit, as it was seen to make the glob fail
3912
on bash 3.2 on Mac OS X 10.6.8 at least.
3914
2012-01-05 Pádraig Brady <P@draigBrady.com>
3916
tests: avoid a false positive due to overflow on Linux/HPPA
3917
* tests/misc/timeout-parameters: Verify that the timer doesn't
3918
fire immediately in the problematic range, and avoid overflow
3919
checks in that case.
3920
* man/timeout.x: Mention the possible bug.
3922
Reported by Bruno Haible
3924
2012-01-05 Jim Meyering <meyering@redhat.com>
3926
tests: adjust setfacl usage to accommodate Solaris 10
3927
* cfg.mk (sc_prohibit_short_facl_mode_spec): New rule.
3928
* tests/cp/acl: Extend setfacl mode spec to have length 3.
3929
* tests/ls/slink-acl: Likewise.
3930
* tests/mv/acl: Likewise.
3931
Report and analysis by Bruno Haible.
3933
2012-01-05 Bruno Haible <bruno@clisp.org>
3934
Jim Meyering <meyering@redhat.com>
3936
split: avoid failure due to leftover 'errno' value
3937
* src/split.c (lines_chunk_split): Fix logic bug that led to
3938
unwarranted failure of "split -n l/2 /dev/zero" on NetBSD 5.1.
3939
The same would happen when splitting a growing file, where
3940
open/lseek-end gives one size, but by the time we read, there
3941
is more data available.
3942
(bytes_chunk_extract): Likewise.
3943
* NEWS (Bug fixes): Mention this.
3944
* tests/split/l-chunk: The latter case was not exercised.
3945
Add code to do that.
3946
Bug introduced with the chunk-selecting feature in v8.7-25-gbe10739.
3948
2012-01-05 Jim Meyering <meyering@redhat.com>
3950
doc: README: recommend GNU make to run tests on IRIX 6.5 and Solaris 9
3951
* README: Document vendor "make check" failure on those two systems.
3952
Reported by Bruno Haible.
3954
2012-01-04 Jim Meyering <meyering@redhat.com>
3956
maint: ignore *.trs files, lib/getopt.h and build-aux/test-driver
3957
* .gitignore: Also ignore automake's new .trs files and its
3958
build-aux/test-driver, as well as lib/getopt.h.
3960
2012-01-03 Jim Meyering <meyering@redhat.com>
3963
* NEWS (New programs): Move this small section to the top.
3964
(df): Reword entry, from Pádraig Brady.
3966
2012-01-03 Jim Meyering <meyering@redhat.com>
3968
df: work around long-named /dev/disk/by-uuid/... symlinks
3969
On systems with recent kernel/tools, a symlink from /etc/mtab to
3970
/proc/mounts, and a by-UUID mount (i.e., soon, nearly everyone),
3971
you will see something like the following when running "df -hT":
3972
(this has been truncated to fit in a width-limited ChangeLog file)
3974
Filesystem Type Siz...
3978
/dev/disk/by-uuid/828fc648-9f30-43d8-a0b1-f7096a2edb66 ext4 11G
3984
Contrast that with what we're used to seeing (modulo the
3985
two entries mounted on "/", which is a separate problem):
3987
Filesystem Type Size Used Avail Use% Mounted on
3988
rootfs rootfs 11G 1.9G 8.0G 19% /
3989
udev devtmpfs 3.8G 0 3.8G 0% /dev
3990
tmpfs tmpfs 774M 376K 774M 1% /run
3991
/dev/sda3 ext4 11G 1.9G 8.0G 19% /
3992
tmpfs tmpfs 1.6G 8.0K 1.6G 1% /run/shm
3993
/dev/sda2 ext3 494M 78M 392M 17% /boot
3994
/dev/sda5 ext4 12G 7.6G 3.7G 68% /usr
3995
/dev/sda6 ext4 9.9G 6.6G 2.8G 71% /var
3997
When that long /dev/disk/by-uuid/... name is merely a symlink
3998
to a much shorter (and often more useful) device name like
3999
"/dev/sda3", and when it's part of a listing of all file systems,
4000
I would much prefer to see only the latter. Similarly, when using
4001
an encrypted root file system, you would see a name like
4002
/dev/mapper/luks-828fc648-9f30-43d8-a0b1-f7196a2edb66 pointing
4003
to say, /dev/dm-0, I prefer the shorter name.
4005
I.e., if I explicitly run
4006
"df -hT /dev/disk/by-uuid/828fc648-9f30-43d8-a0b1-f7096a2edb66",
4007
then, it's fine -- and expected -- to print to the long name.
4008
It was explicitly given. However, with no non-option argument,
4009
df should print the shorter name. Note that performing this
4010
translation at a lower level (via a change to gnulib's mountlist.c)
4011
would make it impossible to distinguish those two cases.
4013
* src/df.c: Include "canonicalize.h".
4014
(get_dev): Add a parameter, telling when we're in process-all-
4015
mount-points mode; update all callers. When true, resolve
4016
UUID-suffixed symlinks.
4017
* NEWS (Changes in behavior): Mention it.
4018
Reported by Nao Nishijima in http://bugzilla.redhat.com/766461
4019
and by Dan Jacobson in http://bugs.gnu.org/10363
4021
2012-01-03 Jim Meyering <meyering@redhat.com>
4023
tests: adjust realpath test to avoid "make distcheck" failure
4024
* tests/misc/realpath: Quote lhs of test ... = ..., so that
4025
when $PWD contains a space (like it does via "make distcheck"),
4026
the test does not fail
4028
2012-01-03 Pádraig Brady <P@draigBrady.com>
4030
realpath: a new program to print the resolved path
4031
This program is compatible with other realpath(1)
4032
implementations, and also incorporates relpath like support,
4033
through the --relative options. The relpath support
4034
was suggested by Peng Yu, who also provided an initial
4035
implemenation of that functionality.
4037
* AUTHORS: Add my name.
4038
* NEWS: Mention the new command.
4040
* doc/coreutils.texi (realpath invocation): Add realpath info.
4041
* man/Makefile.am (realpath.1): Add dependency.
4042
* man/realpath.x: New template.
4043
* man/.gitignore: Ignore generated man page.
4044
* po/POTFILES.in: Add src/realpath.c.
4045
* src/.gitignore: Exclude realpath.
4046
* src/Makefile.am (EXTRA_PROGRAMS): Add realpath.
4047
* src/realpath.c: New file.
4048
* scripts/git-hooks/commit-msg: Add realpath to the list of prefixes.
4049
* tests/Makefile.am (TESTS): Add misc/realpath.
4050
* tests/misc/realpath: New file.
4052
2012-01-03 Pádraig Brady <P@draigBrady.com>
4054
build: update gnulib for canonicalize_filename_mode improvements
4055
This is required for the new realpath command.
4057
2012-01-02 Jim Meyering <meyering@redhat.com>
4059
build: tail: avoid type/format mismatch warning from gcc
4060
Without this change, gcc's -Werror=format would complain that
4061
the '%lx' format requires 'long unsigned int', not 'int'.
4062
* src/tail.c (fremote): Use a temporary variable.
4064
2012-01-01 Jim Meyering <meyering@redhat.com>
4066
tests: also print chmod's --version
4067
* tests/rm/many-dir-entries-vs-OOM: This test also exercises chmod.
4069
maint: update all copyright year number ranges
4070
Run "make update-copyright".
4072
tests: change copyright year from 2011 to 2012 in sample-test
4073
This file is special. We don't want to use a range,
4074
but merely the current year number.
4075
* tests/sample-test: s/2011/2012/
4077
2011-12-31 Jim Meyering <meyering@redhat.com>
4079
tests: fix a missing-dependency problem
4080
* tests/check.mk (.built-programs): Depend on src/Makefile.am,
4081
so that when we add a program, this file is updated, and the new
4082
program is tested via misc/help-version. Spotted by Pádraig Brady.
4084
2011-12-30 Jim Meyering <meyering@redhat.com>
4086
build: avoid spurious test.c warning with -Wsuggest-attribute=pure
4087
* src/test.c: Add pragma to suppress gcc-4.6.2's warning that
4088
"advance" might be candidate for attribute 'pure'.
4090
2011-12-28 Jim Meyering <meyering@redhat.com>
4092
tail: avoid theoretically undefined behavior
4093
* src/tail.c (start_lines): Do not form potentially-invalid address.
4094
Use safe_read's return value as a pointer offset only after
4095
ensuring that it is not SAFE_READ_ERROR (size_t)(-1).
4096
Spotted by coverity.
4097
Also, move declaration of "p" to be closer to first use.
4099
tests: also unset _STDBUF_E, _STDBUF_I and _STDBUF_O
4100
* tests/envvar-check (vars): Add these to the list of envvars we
4101
ignore: _STDBUF_E, _STDBUF_I, _STDBUF_O, used by libstdbuf.
4103
2011-12-26 Pádraig Brady <P@draigBrady.com>
4105
doc: homologize ch{con,grp,mod,own} option descriptions
4106
* src/chgrp.c (usage): Group associated options together,
4107
to aid users. Also minimize the differences between
4108
individual messages across these four commands, to
4110
* src/chmod.c: Likewise.
4111
* src/chown.c: Likewise.
4112
* src/chcon.c (usage): Likewise. Document the
4113
--dereference option.
4115
Suggested by Paul Eggert and Jari Aalto
4117
2011-12-26 Jim Meyering <meyering@redhat.com>
4119
stat,tail: recognize new FS type: pipefs
4120
* src/stat.c (human_fstype) [S_MAGIC_PIPEFS]: New case.
4121
* NEWS (Bug fixes): Mention this.
4123
2011-12-24 Jim Meyering <meyering@redhat.com>
4125
doc: stat: clarify that %t and %T expand to the file system type
4126
* src/stat.c (usage): Mention "file system type", not just "type"
4127
for %t and %T. Do not capitalize the first letter of each description.
4129
2011-12-23 Jim Meyering <meyering@redhat.com>
4131
tail: with -f, use polling when a file is on an FS of unknown type
4132
Before, we would use inotify in that case, which would work as long
4133
as updates were taking place locally, but not at all when remote.
4134
Move hard-coded list of known remote FS types into a more
4135
maintainable table in stat.c, alongside the list of FS
4136
names and magic numbers. Generate a new is_local_fs_type function.
4137
* src/Makefile.am (fs-is-local.h): New rule, generated file.
4138
* src/extract-magic: Revamp to parse local/remote keyword after
4139
each magic number in src/stat.c's case statements.
4140
Accept new --local option.
4141
* src/.gitignore: Ignore the generated fs-is-local.h.
4142
* src/tail.c [HAVE_INOTIFY]: Include fs-is-local.h.
4143
(fremote) [HAVE_INOTIFY]: Use the new function in place of
4144
the switch stmt with hard-coded list of FS types.
4145
Emit a warning when processing a file on a file system of unknown type.
4146
* NEWS (Changes in behavior): Mention it.
4147
Suggested by Sven Breuner.
4149
2011-12-22 Jim Meyering <meyering@redhat.com>
4151
doc: update README-release with process to check for new FS magic
4152
* README-release: Run the Makefile rule that checks for new file
4153
system magic numbers.
4155
tail,stat: add support for FhGFS
4156
* src/stat.c (human_fstype): Add a case: fhgfs, 0x19830326.
4157
* src/tail.c (fremote): Add S_MAGIC_FHGFS.
4158
* NEWS (Bug fixes): Update the entry for GPFS to mention FhGFS, too.
4159
Reported by Sven Breuner.
4161
2011-12-20 Jim Meyering <meyering@redhat.com>
4163
doc: improve factor example
4164
* doc/coreutils.texi (factor invocation): Adjust example to use $(...)
4165
consistently, not a mix of `...` and $(...). Separate the computation
4166
of the product and the actual factorization, so the timing of the
4167
latter doesn't include the cost of the former.
4169
2011-12-17 Jim Meyering <meyering@redhat.com>
4171
build: remove now-useless code from bootstrap.conf
4172
* bootstrap.conf (bootstrap_epilogue): Remove now-unnecessary,
4173
snippet that edited gnulib-tests/gnulib.mk. This snippet was
4174
rendered unnecessary by commit v8.14-73-g5bf2c0e.
4176
build: merge in bootstrap changes from gnulib
4177
* bootstrap: Pull in the combination of gnulib's "bootstrap: detect
4178
tools required by gnulib-tool" patch and the related fix.
4180
2011-12-15 Paul Eggert <eggert@cs.ucla.edu>
4182
du: -x should not count files in other file systems
4183
This fixes Bug#10293, which I guess was introduced in commit
4184
95c948b06a dated 2003-10-02.
4185
* NEWS: Document fix.
4186
* src/du.c (process_file): Don't count files in different file
4187
systems if -x is given.
4188
* tests/du/one-file-system: Test for this bug.
4190
2011-12-13 Paul Eggert <eggert@cs.ucla.edu>
4192
doc: document 'touch' and timestamps better
4193
* doc/coreutils.texi (touch invocation): Explain file timestamps
4194
better. Problem reported by Nelson H.F. Beebe (Bug#7999).
4196
2011-12-12 Jim Meyering <meyering@redhat.com>
4198
ls: give a more useful diagnostic for a bogus --time-style arg
4199
* src/ls.c (decode_switches): Replace our use of XARGMATCH
4200
with open-coded version so that we can give a better diagnostic.
4201
* tests/ls/time-style-diag: New file.
4202
* tests/Makefile.am (TESTS): Add it.
4203
Reported by Dan Jacobson in http://bugs.gnu.org/10253
4204
with suggestions from Eric Blake and Paul Eggert.
4206
2011-12-09 Jim Meyering <meyering@redhat.com>
4208
maint: remove a misleading comment from shred.c
4209
* src/shred.c: Remove obsolete TODO comment. The first two and the
4210
last item were done, adding --recursive (-r) is neither necessary
4211
nor appropriate, and I don't want to add --interactive. I don't
4212
see a need for the others. Prompted by comments from Amr Ali.
4214
2011-12-08 Jim Meyering <meyering@redhat.com>
4215
Eric Blake <eblake@redhat.com>
4217
ls: be responsive to interrupts when color-listing large directories
4218
Starting with commit adc30a83, when using --color, ls inhibited
4219
interrupts to avoid corrupting the state of an output terminal.
4220
However, for very large directories, that inhibition rendered ls
4221
uninterruptible for too long, including a potentially long period
4222
even before any output is generated.
4223
* src/ls.c: Two phases of processing are time-consuming enough that
4224
they can provoke this: the readdir loop and the printing loop. The
4225
printing was supposed to be covered by a call to process_signals in
4226
(print_name_with_quoting): ... but that call was mistakenly guarded
4227
by a condition that might be false for many or even all files being
4228
processed. Call process_signals unconditionally.
4229
(print_dir): Also call process_signals in the readdir loop.
4230
* NEWS (Bug fixes): Mention it.
4231
Reported by Arkadiusz Miśkiewicz in http://bugs.gnu.org/10243
4233
2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
4235
ln: clarify usage of -L, -n, -T
4236
* src/ln.c (usage): Use clearer wording to describe the -L, -n,
4237
and -T options (Bug#9896).
4239
maint: don't assume GNU make \# syntax (fix previous)
4240
* src/Makefile.am (fs_normalize_perl_subst, fs-magic, fs-kernel-magic):
4241
Undo previous patch; it missed a \#.
4242
(fs_normalize_perl_subst): Use \043 rather than \#.
4243
\043 is portable to all ASCIIish platforms, whereas \# is portable
4244
only to platforms that are compatible with GNU make (and are
4245
incompatible with POSIX make). Porting this to EBCDIC is left as
4246
an exercise for the reader....
4248
2011-12-05 Jim Meyering <meyering@redhat.com>
4250
maint: sort, stat: remove unused parameters
4251
* src/sort.c (struct thread_args) [is_lo_child]: Remove member.
4252
(sortlines): Remove unused parameter, "is_lo_child". Update callers.
4253
* src/stat.c (out_epoch_sec): Mark unused parameter.
4254
(do_statfs, do_stat): Remove unused parameter, "terse". Update callers.
4256
2011-12-05 Paul Eggert <eggert@cs.ucla.edu>
4258
maint: don't assume GNU make \# syntax
4259
* src/Makefile.am (fs_normalize_perl_subst): Don't make unportable
4260
assumption about \# in the right hand side of a macro definition.
4261
This works with GNU make, but not with POSIX make.
4262
Problem reported by Basavaraj B (Bug#10220).
4263
(fs-magic, fs-kernel-magic): Do the #-substitution here instead.
4265
2011-12-04 Jim Meyering <meyering@redhat.com>
4267
od,test: address warnings from gcc's -Wjump-misses-init
4268
* src/test.c (unary_operator): gcc reported that initializations
4269
in two case statements were skipped. Enclose in braces.
4270
* src/od.c (decode_one_format): Likewise.
4272
maint: remove redundant usage declarations (-Wredundant-decls)
4273
* src/csplit.c (usage): Remove declaration.
4274
* src/ls.c (usage): Likewise.
4275
* src/pr.c (usage): Likewise.
4277
2011-12-03 Jim Meyering <meyering@redhat.com>
4279
maint: add missing ":" after "License" in local gnulib module files
4280
This avoids spurious diagnostics when running our "bootstrap" script.
4281
* gl/modules/heap: Append colon after "License".
4282
* gl/modules/randint: Likewise.
4283
* gl/modules/randperm: Likewise.
4284
* gl/modules/randread: Likewise.
4285
Reported by Stefano Lattarini. Diagnosed by Bruno Haible.
4287
2011-12-01 Eric Blake <eblake@redhat.com>
4289
doc: fix list of GNU extension date formats
4290
I didn't check how long these were documented as GNU extensions,
4291
nor when they were added by POSIX; but since they are all part
4292
of POSIX 2008, we no longer need call them out as extensions.
4294
The next version of POSIX will standardize %s:
4295
http://austingroupbugs.net/view.php?id=169
4296
but as that is not out yet, I didn't change %s.
4298
* doc/coreutils.texi (Time conversion specifiers): %R and %z are
4300
(Date conversion specifiers): Likewise for %F, %g, %G.
4302
2011-12-01 Bernhard Voelker <mail@bernhard-voelker.de>
4304
tests: adjust PATH to generally include /sbin and /usr/sbin
4305
Commit 5eeaca94 added /sbin to the PATH for tests using mkfs. For other
4306
tests, e.g. tests/cp-fiemap-perf using filefrag, we need /usr/sbin also.
4307
Add both directories generally for the tests, "since many of us always
4308
augment our PATH with all of the sbin paths all of the time anyway" (Bob
4309
in http://lists.gnu.org/archive/html/coreutils/2011-11/msg00107.html).
4310
The previous commit is hereby obsolete.
4311
* tests/init.cfg (sanitize_path_): Add /sbin and /usr/sbin to PATH
4312
unless already included. Needed for tests using admin tools like mkfs
4313
and filefrag on systems where the user's environment does not have
4314
these directories in the PATH.
4315
* tests/init.cfg (require_mkfs_PATH_): Remove obsolete function.
4316
* tests/cp/cp-a-selinux: Remove require_mkfs_PATH_ call.
4317
* tests/cp/cp-mv-enotsup-xattr: Likewise.
4318
* tests/cp/sparse-fiemap: Likewise.
4319
* tests/mkdir/writable-under-readonly: Likewise.
4320
* tests/rm/read-only: Likewise.
4322
2011-11-29 Eric Blake <eblake@redhat.com>
4324
build: simplify warnings based on last gnulib update
4325
We no longer need to exclude this warning.
4327
* configure.ac (WARN_CFLAGS): Gnulib dropped
4328
-Wunsuffixed-float-constants, as non-portable.
4330
2011-11-29 Eric Blake <eblake@redhat.com>
4332
build: update gnulib for syntax-check improvement
4333
Commit 5b3e538 proved useful enough to migrate to gnulib after
4334
enhancing it to be more generic, which in turn pointed out that
4335
commit a2c811db missed an offender.
4337
* gnulib: Update to latest.
4338
* cfg.mk (sc_prohibit_reversed_compare_failure): Delete, now that
4340
* tests/ls/dangle: Fix last offender.
4342
2011-11-29 Jim Meyering <meyering@redhat.com>
4344
build: update gnulib to fix build failure with --enable-gcc-warnings
4346
2011-11-28 Jim Meyering <meyering@redhat.com>
4348
build: enable -Wsuggest-attribute=pure|const in lib/,...
4349
but not in gnulib-tests/.
4350
* configure.ac (GNULIB_WARN_CFLAGS): Do not exclude
4351
-Wsuggest-attribute=pure|const, thus enabling these two warning
4352
options in lib/, since gnulib now toes the line.
4353
Continue to disable them in gnulib-tests/, since some programs
4354
there trigger these suggestions and are not worth fixing.
4356
build: update gnulib for const+pure attributes
4358
2011-11-27 Jim Meyering <meyering@redhat.com>
4360
tests: add a syntax check for last week's global change
4361
Last week I made a global change, commit a2c811db, `tests: use
4362
"compare exp out", not "compare out exp"', but forgot to add a
4363
corresponding syntax check rule. Without that, it is far too
4364
easy to add a new test or to merge in an old one that would
4365
be non-conforming. Obviously this is only a heuristic, since
4366
it relies on the expected-output file to have a name that starts
4368
* cfg.mk (sc_prohibit_reversed_compare_failure): Prohibit use of
4369
compare with reversed arguments.
4371
maint: update comment gcc-4.6.2 still botches -Wsuggest-attribute=pure
4372
* configure.ac: Update the comment on which gcc versions still must
4373
not use -Wsuggest-attribute=pure option: still required on post-
4374
Fedora 16 rawhide's 4.6.2 20111027.
4376
2011-11-24 Jim Meyering <meyering@redhat.com>
4378
maint: bootstrap: run autopoint and libtoolize *before* gnulib-tool
4379
* bootstrap (AUTOPOINT, AUTORECONF): Factor out definitions.
4380
Run autopoint and libtoolize *before* gnulib-tool.
4381
After it, run an abbreviated autoreconf, rather than a loop around
4383
* bootstrap.conf (gnulib_tool_option_extras): Add both --symlink
4384
and --makefile-name=gnulib.mk. Remove stray use of $bt.
4385
* lib/Makefile.am: Initialize all of the following so that
4386
generated code in gnulib.mk may use += to append to those variables:
4387
AM_CFLAGS, AM_CPPFLAGS, BUILT_SOURCES, CLEANFILES, EXTRA_DIST,
4388
MAINTAINERCLEANFILES, MOSTLYCLEANDIRS, MOSTLYCLEANFILES, SUFFIXES,
4391
maint: bootstrap: remove some now-unneeded code
4392
This bootstrap script arose back when gnulib-tool was young.
4393
Since then, it has seen improvements that render much of this
4394
script unnecessary. In particular, it can now make symlinks
4395
to the files it uses. Also, I no longer see as much value in
4396
marking files as read-only via comments.
4397
* bootstrap (slirp, bt_mark_as_generated): Remove.
4399
maint: use gnulib's gettext-h, not the gettext module
4400
* bootstrap.conf (gnulib_modules): Use gnulib's gettext-h, not the
4401
gettext module. Not only is gettext-h far smaller (it has far fewer
4402
dependencies than the gnulib module), but it does not suffer from
4403
the problem with the gettext module whereby it adds a -I.../intl
4404
option to compilation flags. That can provoke warnings, since we
4405
don't have such a directory. We used to work around that via a
4406
hack in bootstrap, but that was ugly and inefficient.
4408
maint: append many lib/ and m4/ names to .gitignore
4410
build: update gnulib submodule to latest for fixed stdalign test
4412
2011-11-23 Jim Meyering <meyering@redhat.com>
4414
scripts: commit-msg: tweak 72-column test to avoid a false-positive
4415
* scripts/git-hooks/commit-msg: Don't warn about a line that is
4416
longer than 72 if it is a comment. Git-generated comments would
4417
occasionally trigger this.
4419
build: update gnulib and tests/init.sh
4421
* tests/init.sh: Update from gnulib.
4423
build: --enable-gcc-warnings: disable some new warnings
4424
* configure.ac: Disable some new warning options pulled in via
4425
an update to gnulib's manywarnings module: -Wformat-nonliteral,
4426
-Wunsuffixed-float-constants, -Wdouble-promotion.
4428
2011-11-22 Jim Meyering <meyering@redhat.com>
4430
tests: use "compare exp out", not "compare out exp"
4431
Likewise, when an empty file is expected, use "compare /dev/null out",
4432
not "compare out /dev/null". I.e., specify the expected/desired contents
4433
via the first file name. Prompted by a suggestion from Bruno Haible
4434
in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154
4438
git grep -l -E 'compare [^ ]+ exp' \
4439
|xargs perl -pi -e 's/(compare) (\S+) (exp\S*)/$1 $3 $2/'
4440
git grep -l -E 'compare [^ ]+ /dev/null' \
4441
|xargs perl -pi -e 's/(compare) (\S+) (\/dev\/null)/$1 $3 $2/'
4443
* tests/chgrp/no-x: As above.
4444
* tests/chmod/no-x: Likewise.
4445
* tests/chmod/silent: Likewise.
4446
* tests/chmod/thru-dangling: Likewise.
4447
* tests/chown/basic: Likewise.
4448
* tests/chown/deref: Likewise.
4449
* tests/chown/preserve-root: Likewise.
4450
* tests/cp/abuse: Likewise.
4451
* tests/cp/backup-is-src: Likewise.
4452
* tests/cp/cp-a-selinux: Likewise.
4453
* tests/cp/cp-mv-enotsup-xattr: Likewise.
4454
* tests/cp/fail-perm: Likewise.
4455
* tests/cp/into-self: Likewise.
4456
* tests/cp/proc-zero-len: Likewise.
4457
* tests/cp/src-base-dot: Likewise.
4458
* tests/cp/thru-dangling: Likewise.
4459
* tests/dd/reblock: Likewise.
4460
* tests/dd/unblock-sync: Likewise.
4461
* tests/du/2g: Likewise.
4462
* tests/du/8gb: Likewise.
4463
* tests/du/basic: Likewise.
4464
* tests/du/bigtime: Likewise.
4465
* tests/du/deref-args: Likewise.
4466
* tests/du/exclude: Likewise.
4467
* tests/du/files0-from-dir: Likewise.
4468
* tests/du/hard-link: Likewise.
4469
* tests/du/inacc-dest: Likewise.
4470
* tests/du/inacc-dir: Likewise.
4471
* tests/du/long-sloop: Likewise.
4472
* tests/du/max-depth: Likewise.
4473
* tests/du/move-dir-while-traversing: Likewise.
4474
* tests/du/no-deref: Likewise.
4475
* tests/du/no-x: Likewise.
4476
* tests/du/one-file-system: Likewise.
4477
* tests/du/slash: Likewise.
4478
* tests/du/trailing-slash: Likewise.
4479
* tests/install/strip-program: Likewise.
4480
* tests/ln/hard-backup: Likewise.
4481
* tests/ls/block-size: Likewise.
4482
* tests/ls/color-clear-to-eol: Likewise.
4483
* tests/ls/color-dtype-dir: Likewise.
4484
* tests/ls/color-norm: Likewise.
4485
* tests/ls/dangle: Likewise.
4486
* tests/ls/dired: Likewise.
4487
* tests/ls/file-type: Likewise.
4488
* tests/ls/follow-slink: Likewise.
4489
* tests/ls/infloop: Likewise.
4490
* tests/ls/m-option: Likewise.
4491
* tests/ls/no-arg: Likewise.
4492
* tests/ls/recursive: Likewise.
4493
* tests/ls/rt-1: Likewise.
4494
* tests/ls/stat-dtype: Likewise.
4495
* tests/ls/stat-failed: Likewise.
4496
* tests/ls/stat-free-symlinks: Likewise.
4497
* tests/ls/x-option: Likewise.
4498
* tests/misc/arch: Likewise.
4499
* tests/misc/cat-buf: Likewise.
4500
* tests/misc/cat-proc: Likewise.
4501
* tests/misc/chcon: Likewise.
4502
* tests/misc/csplit: Likewise.
4503
* tests/misc/df-P: Likewise.
4504
* tests/misc/fmt-long-line: Likewise.
4505
* tests/misc/groups-dash: Likewise.
4506
* tests/misc/groups-version: Likewise.
4507
* tests/misc/head-pos: Likewise.
4508
* tests/misc/nl: Likewise.
4509
* tests/misc/od-N: Likewise.
4510
* tests/misc/od-multiple-t: Likewise.
4511
* tests/misc/od-x8: Likewise.
4512
* tests/misc/printf: Likewise.
4513
* tests/misc/printf-hex: Likewise.
4514
* tests/misc/pwd-option: Likewise.
4515
* tests/misc/readlink-fp-loop: Likewise.
4516
* tests/misc/runcon-no-reorder: Likewise.
4517
* tests/misc/seq-long-double: Likewise.
4518
* tests/misc/sort-NaN-infloop: Likewise.
4519
* tests/misc/sort-benchmark-random: Likewise.
4520
* tests/misc/sort-debug-keys: Likewise.
4521
* tests/misc/sort-float: Likewise.
4522
* tests/misc/sort-merge-fdlimit: Likewise.
4523
* tests/misc/sort-unique-segv: Likewise.
4524
* tests/misc/stat-hyphen: Likewise.
4525
* tests/misc/stat-slash: Likewise.
4526
* tests/misc/stdbuf: Likewise.
4527
* tests/misc/sum-sysv: Likewise.
4528
* tests/misc/tac-2-nonseekable: Likewise.
4529
* tests/misc/tac-continue: Likewise.
4530
* tests/misc/tr-case-class: Likewise.
4531
* tests/misc/truncate-fail-diag: Likewise.
4532
* tests/misc/wc-files0: Likewise.
4533
* tests/mkdir/selinux: Likewise.
4534
* tests/mv/backup-dir: Likewise.
4535
* tests/mv/backup-is-src: Likewise.
4536
* tests/mv/diag: Likewise.
4537
* tests/mv/dir2dir: Likewise.
4538
* tests/mv/dup-source: Likewise.
4539
* tests/mv/force: Likewise.
4540
* tests/mv/hard-verbose: Likewise.
4541
* tests/mv/i-link-no: Likewise.
4542
* tests/mv/into-self: Likewise.
4543
* tests/mv/into-self-2: Likewise.
4544
* tests/mv/into-self-3: Likewise.
4545
* tests/mv/mv-special-1: Likewise.
4546
* tests/mv/part-fail: Likewise.
4547
* tests/mv/perm-1: Likewise.
4548
* tests/mv/sticky-to-xpart: Likewise.
4549
* tests/mv/trailing-slash: Likewise.
4550
* tests/rm/rm1: Likewise.
4551
* tests/rm/rm2: Likewise.
4552
* tests/rm/cycle: Likewise.
4553
* tests/rm/dir-no-w: Likewise.
4554
* tests/rm/dir-nonrecur: Likewise.
4555
* tests/rm/fail-2eperm: Likewise.
4556
* tests/rm/fail-eacces: Likewise.
4557
* tests/rm/i-never: Likewise.
4558
* tests/rm/inaccessible: Likewise.
4559
* tests/rm/interactive-always: Likewise.
4560
* tests/rm/interactive-once: Likewise.
4561
* tests/rm/isatty: Likewise.
4562
* tests/rm/one-file-system: Likewise.
4563
* tests/rm/rm3: Likewise.
4564
* tests/rm/rm5: Likewise.
4565
* tests/rm/unread2: Likewise.
4566
* tests/rm/v-slash: Likewise.
4567
* tests/sample-test: Likewise.
4568
* tests/split/b-chunk: Likewise.
4569
* tests/split/fail: Likewise.
4570
* tests/split/l-chunk: Likewise.
4571
* tests/split/lines: Likewise.
4572
* tests/split/r-chunk: Likewise.
4573
* tests/split/suffix-length: Likewise.
4574
* tests/tail-2/big-4gb: Likewise.
4575
* tests/tail-2/follow-name: Likewise.
4576
* tests/tail-2/follow-stdin: Likewise.
4577
* tests/tail-2/pipe-f: Likewise.
4578
* tests/tail-2/pipe-f2: Likewise.
4579
* tests/tail-2/start-middle: Likewise.
4580
* tests/touch/60-seconds: Likewise.
4581
* tests/touch/fail-diag: Likewise.
4582
* tests/touch/not-owner: Likewise.
4583
* tests/touch/relative: Likewise.
4585
2011-11-22 Jim Meyering <meyering@redhat.com>
4587
tests: use compare, not "diff", in a few stray tests
4588
* tests/install/basic-1: Use compare, not diff.
4589
* tests/mkdir/p-v: Likewise.
4590
* tests/mv/part-fail: Likewise.
4591
* tests/rm/rm1: Likewise.
4592
* tests/rm/rm2: Likewise.
4593
* tests/touch/not-owner: Likewise.
4595
2011-11-20 Jim Meyering <meyering@redhat.com>
4597
maint: revert "build: update gnulib submodule to latest"
4598
Don't update to latest from gnulib just yet.
4599
This reverts commit 173f4d9bd628fb771eaeca3d2fef97dcd71fedb8.
4600
In particular, manywarnings is too aggressive.
4602
build: update gnulib submodule to latest
4604
maint: make generated THANKS file read-only
4605
* Makefile.am (THANKS): Make generated file read-only.
4607
doc: clarify ln's --help output
4608
* src/ln.c (usage): Use TARGET, not "source" in description.
4609
Reported by Michael J Daniel in http://bugs.gnu.org/9896.
4611
2011-11-20 Paul Eggert <eggert@cs.ucla.edu>
4613
port to GNU hosts, where getuid and friends can fail
4614
* src/groups.c (main):
4615
* src/install.c (need_copy):
4616
* src/su.c (log_su):
4617
* src/test.c (unary_operator):
4618
* src/whoami.c (main):
4619
Don't assume that getuid and friends always succeed.
4620
This fixes the same problem that we recently fixed with 'id'.
4622
2011-11-20 Jim Meyering <meyering@redhat.com>
4624
maint: avoid gitlog-to-changelog diagnostic about unused entries
4625
* build-aux/git-log-fix: Comment out two unused entries.
4626
Each of those two entries does indicate an error in a commit log,
4627
but precedes the cut-off date, so has an actual VC'd ChangeLog entry.
4628
I.e., gitlog-to-changelog generates ChangeLog entries since 2008-02,
4629
and these two predate that.
4630
* ChangeLog-2008: Make the indicated correction.
4632
2011-11-20 Erik Auerswald <auerswal@unix-ag.uni-kl.de>
4634
ln: fix position of --backup values description
4635
* src/ln.c (usage): A paragraph describing interactions of -s
4636
with -L and -P somehow snuck in between the description of the
4637
--backup option and the values used to control it. Fix this by
4638
moving the value description up.
4640
2011-11-18 Jim Meyering <meyering@redhat.com>
4642
scripts: rewrite git commit-msg hook in Perl
4643
* scripts/git-hooks/commit-msg: Rewrite in perl.
4644
This is still a work in progress in that it hard-codes coreutils-
4645
specific program names and policies that should be easy to selectively
4646
enable or disable without modifying the script.
4648
2011-11-16 Eric Blake <eblake@redhat.com>
4650
sort: clarify wording on -k syntax
4651
* src/sort.c (usage): Use KEYDEF instead of POS, and call out the
4652
specific OPTS that can occur in KEYDEF.
4653
Based on a report by Lars Noodén, http://bugs.gnu.org/10019
4655
2011-11-15 Paul Eggert <eggert@cs.ucla.edu>
4657
id: fix bug when euid != ruid
4658
* src/id.c (main): Report an error if no args are given and getuid
4659
fails, because print_full_info needs ruid. Redo code so that
4660
getuid and friends are invoked only when needed; this makes the
4661
code easier to follow, and is how I found the above bug.
4663
2011-11-15 Ruediger Meier <sweet_f_a@gmx.de>
4665
ls: another reword of generic size note
4666
* src/system.h (emit_size_note): Use "unit" rather than "suffix",
4667
and move multiplication to example instead of in suffix list.
4668
See additional discussion in Bug#9939.
4670
2011-11-15 Eric Blake <eblake@redhat.com>
4673
* src/id.c (main): Replace confusing use of "etc.".
4675
2011-11-15 Paul Eggert <eggert@cs.ucla.edu>
4677
id: handle (uid_t) -1 more portably
4678
* src/id.c (GETID_MAY_FAIL): Remove.
4679
(main): Check for nonzero errno, rather than having a compile-time
4680
GETID_MAY_FAIL guess. Suggested by Roland McGrath in
4681
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10021#47>.
4682
Also, the old code was incorrect if uid_t was narrower than int.
4683
(print_full_info): Remove unnecessary cast to -1.
4685
id: undo previous commit, which was done by mistake
4686
* src/id.c (GETID_MAY_FAIL, main, print_full_info): Undo previous change.
4688
2011-11-15 Paul Eggert <eggert@cs.ucla.edu>
4690
doc: update for ISO/IEC 80000-13
4691
* doc/coreutils.texi (Block size): IEC 60027-2 has been superseded
4692
by ISO/IEC 80000-13, so prefer the newer standard but also mention
4693
the old. The new standard specifies Zi and Yi, so they are no
4694
longer GNU extensions. Fix stale URL to BIPM.
4696
2011-11-14 Paul Eggert <eggert@cs.ucla.edu>
4698
id: handle (uid_t) -1 more portably
4699
* src/id.c (GETID_MAY_FAIL): Remove.
4700
(main): Check for negative return values, not for -1.
4701
The old code was incorrect if uid_t was narrower than int,
4702
regardless of whether we were on a GNU or a POSIX platform.
4703
The new code is simpler and doesn't need GETID_MAY_FAIL.
4704
(print_full_info): Remove unnecessary cast to -1.
4706
2011-11-14 Ludovic Courtès <ludo@gnu.org>
4708
id: fail when getuid, getgid, etc. fail, e.g., on GNU/Hurd
4709
POSIX-conforming getuid, geteuid, etc. functions cannot fail,
4710
but on GNU/Hurd systems and some others, they may.
4711
* src/id.c (main) [__GNU__]: Detect and diagnose any such failure.
4712
* tests/id/gnu-zero-uids: New file.
4713
* tests/Makefile.am (TESTS): Add it to the list.
4714
* tests/init.cfg (require_gnu_): New function.
4716
2011-11-13 Nix <nix@esperi.org.uk>
4718
tests: avoid rare fp failure in du/move-dir-while-traversing
4719
* tests/du/move-dir-while-traversing: Boost the mkdir iteration count
4722
2011-11-13 Jim Meyering <meyering@redhat.com>
4724
maint: adjust git hook to allow "copy: ..." on line 1 of commit message
4725
* scripts/git-hooks/commit-msg: Add "copy" to the list of valid
4726
command-name-like summary line prefixes.
4728
maint: id, groups: use conforming diagnostics
4729
* src/groups.c (main): Don't capitalize the first word of diagnostic.
4730
* src/id.c (main): Likewise.
4731
Reported by Ludovic Courtès.
4733
maint: avoid new syntax-check failure due to indentation with TABs
4734
* cfg.mk (tbi_2): Exempt pre-applypatch, since it too is from git.
4736
2011-11-12 Jim Meyering <meyering@redhat.com>
4738
maint: install customized git hooks to keep commit logs consistent
4739
* bootstrap.conf (buildreq): Copy (with backup) coreutils-supplied
4740
git hooks into .git/hooks, to help keep commit logs normalized.
4742
maint: add rule to ensure that our commit hook copies are up to date
4743
* Makefile.am (check-git-hook-script-sync): New rule -- not used
4744
anywhere, because it depends on having very recent git.
4745
* scripts/git-hooks/pre-applypatch: New file.
4747
maint: sync pre-commit script with git's
4748
* scripts/git-hooks/pre-commit (allownonascii): Remove double quotes
4749
around $(...) construct, to make this file identical to git's
4752
build: update gnulib for fstatat cross-compile improvement
4754
maint: adjust the URL that will appear in the generated announcement
4755
* cfg.mk (url_dir_list): Use this http://ftp.gnu.org/gnu/$(PACKAGE)
4756
for the first link listed in the generated announcement.
4757
announce-gen now provides the faster mirror link automatically.
4759
ls: plug a per-argument leak
4760
Using ls -l on an SELinux-enabled system would leak one SELinux
4761
context string per non-empty-directory command-line argument.
4762
* src/ls.c (free_ent): New function, factored out of...
4763
(clear_files): ...here. Use it.
4764
(extract_dirs_from_files): Call free_ent (f), rather than simply
4765
free (f->name). The latter failed to free the possibly-malloc'd
4766
linkname and scontext members, and thus could leak one of those
4767
strings per command-line argument.
4768
* THANKS.in: Update.
4769
* NEWS (Bug fixes): Mention it.
4770
Reported by Juraj Marko in http://bugzilla.redhat.com/751974.
4772
2011-11-12 Paul Eggert <eggert@cs.ucla.edu>
4774
* tests/misc/sort-continue: Port to Fedora 15.
4775
Redirect with the shell command, not in a separate 'exec'.
4776
Without this patch, Fedora 15 x86-64 /bin/sh (i.e., Bash 4.2.10)
4777
complained about running out of file descriptors in the shell.
4779
* tests/ls/block-size: Make it executable.
4781
* src/system.h (emit_size_note): Reword for clarity.
4782
See discussion in Bug#9939.
4784
ls: -k no longer affects -l's file sizes
4785
This fixes an incompatibility with POSIX 2008 and with BSD.
4786
Problem reported by Abdallah Clark (Bug#9939)
4787
via Alan Curry (Bug#10016).
4788
* NEWS: Document this.
4789
* doc/coreutils.texi (General output formatting): Document the
4790
new -k behavior, and --kibibytes.
4791
* src/ls.c (file_human_output_opts): New static var.
4792
(long_options, usage): Add --kibibytes.
4793
(decode_switches, gobble_file, print_long_format):
4794
Implement the new -k behavior.
4795
* tests/ls/block-size: New file.
4796
* tests/Makefile.am (TESTS): Add it.
4798
2011-11-08 Eric Blake <eblake@redhat.com>
4800
doc: fix typo in sort description
4801
* doc/coreutils.texi (sort invocation): Fix typo.
4803
2011-11-05 Jim Meyering <meyering@redhat.com>
4805
build: update gnulib for more openat changes
4807
2011-11-04 Jim Meyering <meyering@redhat.com>
4809
build: do use fstatat and unlinkat modules, now that they're separate
4810
* bootstrap.conf (gnulib_modules): Add fstatat and unlinkat.
4812
build: update gnulib to pull in openat module separation changes
4815
2011-11-03 Pádraig Brady <P@draigBrady.com>
4817
tests: avoid signal issues in timeout-group
4818
These issues were seen on an OpenSuse 10.3 system
4819
(kernel 2.6.22.5 x86_64, glibc 2.6.1-18, bash updated to 4.2),
4820
and also on a 64 bit SLES system with a 2.6.16 kernel.
4821
Both systems had 2 CPUs.
4823
There were two issues seen. 1. Occasionally the
4824
timeout.cmd shell script would block SIGINT until
4825
the sleep command exited. 2. Much less frequently the
4826
signal handler in the timeout command itself was ignored,
4827
causing SIGALRM to kill the process.
4829
* tests/misc/timeout-group: Detect the above two cases,
4830
and skip rather than fail. Note only issue 2. causes
4831
a failure unless skipped, but we skip for case 1. also,
4832
for diagnostic purposes.
4834
2011-11-03 Pádraig Brady <P@draigBrady.com>
4836
tests: fix a race in timeout-group
4837
This could cause a false failure, or even
4838
an infinite loop in rare circumstances.
4840
* tests/misc/timeout-group: Increase the timeouts
4841
passed to the timeout command, so that they're
4842
effectively not used. Instead the command termination
4843
is triggered by the kill commands when everything
4844
is in the correct state.
4846
Reported by Bernhard Voelker.
4848
2011-11-02 Jim Meyering <meyering@redhat.com>
4850
build: adapt to gnulib's recent openat/fchmodat separation
4851
* gnulib: Update to latest, pulling in the openat/fchmodat separation.
4852
* bootstrap.conf (gnulib_modules): Add fchmodat, now that gnulib
4853
has moved it into its own module.
4855
maint: fix git-log typos when generating ChangeLog
4856
* gnulib: Update to latest, for new gitlog-to-changelog.
4857
* Makefile.am (gen-ChangeLog): Use its new --amend=F option.
4858
* build-aux/git-log-fix: New file, with ChangeLog fixes.
4860
stat: avoid compilation failure with gnulib's new alignof
4861
* src/stat.c: Include <stdalign.h>, not "alignof.h" for alignof use.
4863
scripts: reject references to long-form bug URLs
4864
* scripts/git-hooks/commit-msg: Require the normalized/shortened
4865
form of bugzilla.redhat.com and bugs.gnu.org bug URLs.
4867
2011-11-01 Pádraig Brady <P@draigBrady.com>
4869
doc: date: mention that the hardware clock might not be set
4870
* doc/coreutils.texi (Setting the time): Reorganize slightly
4871
and mention that the hardware clock might need to be explicitly
4872
updated by the user as is the case on Fedora 16 currently.
4873
See http://bugzilla.redhat.com/749516
4875
2011-11-01 Jim Meyering <meyering@redhat.com>
4877
build: adapt to gnulib's recent openat/fchownat separation
4878
* bootstrap.conf (gnulib_modules): Add fchownat, now that gnulib
4879
has moved it into its own module.
4880
* gnulib: Update to latest.
4882
2011-10-30 Jim Meyering <meyering@redhat.com>
4884
build: update gnulib for GNUmakefile fix
4886
maint: avoid new "make syntax-check" failure due to stdalign definition
4887
* gl/modules/randread (Depends-on): Add stdalign.
4888
* gl/lib/randread.c: Include <stdalign.h>, so we can ...
4889
[!_STRING_ARCH_unaligned]: remove definition of stdalign.
4891
tests: update gnulib to latest to avoid FP DST-related test failure
4892
Otherwise, "make check" would fail after e.g., a CEST-to-CST
4893
daylight savings transition.
4894
See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28825
4896
tests: doc: fix stale comment in new rm/many-dir-entries-vs-OOM
4898
2011-10-29 Jim Meyering <meyering@redhat.com>
4900
tests: don't make tail's pipe-f2 test take the full 10 seconds
4901
* tests/tail-2/pipe-f2: Don't always wait 10 seconds.
4902
Before, this test would always wait 10 seconds.
4903
Now, it stops early when it detects that tail -f has written output.
4904
BTW, the race condition that prompted changing the timeout from 1 second
4905
to 10 was that tail -f could be killed by the timeout before producing
4908
2011-10-27 Jim Meyering <meyering@redhat.com>
4910
date: reinstate the --iso-8601 (-I) option
4911
We deprecated and undocumented the --iso-8601 (-I) option mostly
4912
because date could not parse that particular format. Now that
4913
it can, it's time to restore the documentation.
4914
* src/date.c (usage): Document it.
4915
* doc/coreutils.texi (Options for date): Reinstate documentation.
4916
Reported by Hubert Depesz Lubaczewski in http://bugs.gnu.org/7444.
4918
build: avoid bootstrap failure when using patch-2.5.8
4919
* gl/modules/tempname.diff: Regenerate to correct bogus offsets
4920
and adjust for 1-line offset. Eric Blake reported that this
4921
patch failed to apply when using patch-2.5.8.
4922
Note that it applies fine using patch-2.6.1.
4924
2011-10-25 Jim Meyering <meyering@redhat.com>
4926
build: do not remove definition of ENODATA, after all
4927
* src/system.h (ENODATA): Restore definition.
4928
gnulib defines it only on native Windows systems, so removing our
4929
definition would have provoked build failure on systems that use it,
4930
like FreeBSD. Reported by Bruno Haible in
4931
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739/focus=28795
4932
* gnulib: Update to latest, to get new ENODATA-exempting maint.mk rule.
4934
2011-10-24 Eric Blake <eblake@redhat.com>
4936
doc: NEWS: correct "bug introduced in ..." version number
4939
2011-10-24 Jim Meyering <meyering@redhat.com>
4941
rm: update gnulib to get an fts fix for Cygwin+NWFS/NcFsd file systems
4942
* NEWS (Bug fixes): Mention it.
4943
As far as we know, this fix affects only Cygwin with NWFS or NcFsd
4944
file systems. See these:
4945
http://git.sv.gnu.org/cgit/gnulib.git/commit/?id=71f13422f3e634
4946
http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28739
4947
http://cygwin.com/ml/cygwin/2011-10/msg00365.html
4948
* src/system.h (ENODATA): Remove fall-back definition, now that
4949
gnulib provides one. Caught by the sc_prohibit_always-defined_macros
4951
Also remove now-irrelevant "Don't use bcopy..." comment.
4953
2011-10-23 Jim Meyering <meyering@redhat.com>
4955
maint: add git hook scripts
4956
We find it worthwhile to use consistent commit summary prefixes.
4957
To that end, the commit-msg script requires that all commits I make
4958
start with "$P: " (where $P is one of ~100 programs in coreutils)
4959
or one of a few other words, like gnulib tests maint doc build.
4960
It allows more than one word, so e.g., "cat tail head: " would also
4961
be accepted. Pádraig Brady wrote the initial version, with its
4962
72-column and blank-if-present second line checks.
4963
The pre-commit script is the same as the git-supplied sample script,
4964
modulo a bug fix and the "exec 1>&2" redirection.
4965
* scripts/git-hooks/commit-msg: New file.
4966
* scripts/git-hooks/pre-commit: New file.
4967
* scripts/git-hooks/applypatch-msg: New file. Verbatim from .sample.
4968
* cfg.mk: Exempt two of the new scripts from the no-leading-TABs check,
4969
since they're nearly verbatim from git, and we want to stay in sync.
4970
Exempt the commit-msg script from the no-"fail=0" check.
4972
2011-10-21 Martial Bornet <mbornet.pro@gmail.com>
4974
tail: with -f, use nanosleep (not inotify) on a GPFS file system
4975
Because tail's fremote function did not designate GPFS as
4976
a remote file system type, tail -f would mistakenly attempt
4977
to use inotify, which cannot work with a remote file system.
4978
* src/tail.c (fremote): List GPFS as a remote file system type.
4979
* NEWS (Bug fixes): Mention it.
4980
Reported in http://bugs.debian.org/646022.
4982
2011-10-20 Mike Frysinger <vapier@gentoo.org>
4984
build: include man-pages for non-default progs
4985
At the moment, things like man/arch.1 are not included in the tarball.
4986
This makes perl a requirement if you want to build/install the arch
4989
* man/Makefile.am (EXTRA_DIST): Add $(NO_INSTALL_PROGS_DEFAULT:%=%.1).
4991
2011-10-19 Jim Meyering <meyering@redhat.com>
4993
maint: tac: prefer "failed to" diagnostic over "cannot"
4994
* src/tac.c: Change wording in diagnostic: "failed to open" seems
4995
clearer than "cannot open".
4997
tac: do not let failed allocation cause immediate exit
4998
* src/tac.c (temp_stream): Don't exit immediately upon failed heap
4999
allocation, here. That would inhibit processing of any additional
5000
command-line arguments.
5002
tac: use only one temporary file, with multiple nonseekable inputs
5003
* src/tac.c (temp_stream): New function, factored out of...
5004
(copy_to_temp): ...here.
5005
(tac_nonseekable): Don't free or fclose, now that we reuse the file.
5006
Suggested by Ambrose Feinstein.
5007
* THANKS.in: Update.
5009
2011-10-18 Paul Eggert <eggert@cs.ucla.edu>
5011
maint: make tac.c slightly cleaner
5012
* src/tac.c (copy_to_temp): Now that the template string tacXXXXXX
5013
is used in only one place, don't bother using a separate variable.
5014
Also, using three unconditional assignments seems slightly clearer.
5016
2011-10-17 Jim Meyering <meyering@redhat.com>
5018
tac: don't leak a file descriptor for each non-seekable input
5019
* src/tac.c (tac_nonseekable): Call fclose and free tmp_file after
5020
each successful call to copy_to_temp.
5022
tac: don't misbehave with multiple non-seekable inputs
5023
* src/tac.c (copy_to_temp): Do not reuse the template buffer.
5024
Instead, scribble only on a freshly-xstrdup'd copy each time.
5025
Free that buffer both here, upon failure, and ...
5026
(tac_nonseekable): ...free the buffer in caller, upon success.
5027
* tests/misc/tac-2-nonseekable: New file.
5028
* tests/Makefile.am (TESTS): Add it.
5029
* NEWS (Bug fixes): Mention it.
5030
Reported by Ambrose Feinstein in http://debbugs.gnu.org/9762.
5032
maint: tac: remove sole use of sprintf in favor of filenamecat
5033
* src/tac.c: Include filenamecat.h.
5034
(copy_to_temp): Use filenamecat rather than xmalloc and sprintf.
5035
Move some declarations "down" to point of initialization.
5037
2011-10-17 Pádraig Brady <P@draigBrady.com>
5039
maint: speed up make check (vc_exe_in_TESTS)
5040
* tests/check.mk (vc_exe_in_TESTS): The main change is to
5041
not start a sed process for each file under tests/,
5042
which was taking around 2.5s on a 2.1GHz i3-2310M.
5043
Also adjust the rule to no longer use temporary files.
5045
2011-10-12 Jim Meyering <meyering@redhat.com>
5047
maint: post-release administrivia
5048
* NEWS: Add header line for next release.
5049
* .prev-version: Record previous version.
5050
* cfg.mk (old_NEWS_hash): Auto-update.
5053
* NEWS: Record release date.
5055
2011-10-12 Pádraig Brady <P@draigBrady.com>
5057
tests: avoid a false failure on systems without inotify
5058
* tests/tail-2/follow-name: Exclude the inotify warning
5059
from the comparison.
5060
Reported by Bruno Haible.
5062
2011-10-09 Jim Meyering <meyering@redhat.com>
5064
build: update gnulib to latest to fix MacOS X 10.5 test link failure
5066
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1726/focus=1743
5068
rm: do not resort to stat'ing very long names even on deficient systems
5069
This change affects only systems that have neither *at function support
5070
nor the /proc/self/fd support required to emulate those *at functions.
5071
* src/remove.c (write_protected_non_symlink): Call faccessat
5072
unconditionally. Thus we no longer need euidaccess_stat, which was
5073
the sole function used here to operate on a full relative file name.
5074
Remove full_name parameter and update caller.
5075
* lib/euidaccess-stat.h: Remove file.
5076
* lib/euidaccess-stat.c: Likewise.
5077
* m4/euidaccess-stat.m4: Likewise.
5078
* po/POTFILES.in: Remove lib/euidaccess-stat.c.
5079
* m4/prereq.m4 (gl_PREREQ): Don't require gl_EUIDACCESS_STAT.
5080
Prompted by a report from Bruno Haible that the rm/deep-2
5081
test was failing on HP-UX 11.31.
5082
See http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1748
5084
tests: skip rather than failing when perl is not available
5085
* tests/df/total-verify: Use require_perl_, so that this test is
5086
skipped when perl is not available.
5087
* tests/rm/deep-2: Likewise, and fix wording in a comment.
5088
Reported by Bruno Haible.
5090
2011-10-08 Jim Meyering <meyering@redhat.com>
5092
tests: avoid tail-2/F-vs-missing failure on NFS
5093
* tests/tail-2/F-vs-missing: This test would fail about 80% of the
5094
time on linux/powerpc when run in an NFS-mounted directory.
5095
Reported by Bruno Haible in
5096
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1726/focus=1727
5098
tests: avoid ls/slink-acl test failure on Solaris 10
5099
* tests/ls/slink-acl: Use setfacl's "-m user::r" option rather than
5100
less-portable "-m m::r". The latter did not work with Solaris 10's
5101
version of setfacl. Reported by Bruno Haible in
5102
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1726/focus=1737
5104
tests: avoid false-positive failures on linux/sparc64
5105
* tests/init.cfg (require_strace_): Detect a version of strace
5106
that fails on linux/sparc64 for 64-bit executables. Report and
5107
most of the suggested fix from Bruno Haible:
5108
http://thread.gmane.org/gmane.comp.gnu.coreutils.general/1726/focus=1728
5110
2011-10-06 Bernhard Voelker <mail@bernhard-voelker.de>
5112
build: let bootstrap resort to wget for downloading .po files
5113
* bootstrap (download_po_files): Fallback to wget when downloading
5114
the .po files via rsync failed. This is necessary to bootstrap behind
5117
2011-10-05 Jim Meyering <meyering@redhat.com>
5120
* NEWS: Mention when the sort -g infloop bug was introduced and
5121
alphabetize entries. Clarify a sentence in the pwd-improvement entry.
5123
tests: add a test to exercise today's ls-lL-vs-ACL bug
5124
* tests/ls/slink-acl: New file.
5125
* tests/Makefile.am (TESTS): Add it.
5126
* tests/init.cfg (require_setfacl_): New function.
5127
* gnulib: Update to latest, for file-has-acl changes.
5128
* NEWS (Bug fixes): Mention it.
5129
See http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/28538. This
5130
":>k; setfacl -m m::r k; ln -s k s; ls -Log s" should print e.g.,
5131
-rw-r-----+ 1 0 Oct 5 19:22 s
5132
With the ls from coreutils-8.13, it would print this (with "." or
5133
nothing in place of the "+"):
5134
-rw-r-----. 1 0 Oct 5 19:22 s
5136
2011-10-03 Jim Meyering <meyering@redhat.com>
5138
build: don't use automake's obsolete AM_C_PROTOTYPES macro
5139
* m4/jm-macros.m4 (gl_CHECK_ALL_TYPES): Remove use of AM_C_PROTOTYPES,
5140
now that automake rejects it.
5142
2011-10-01 Jim Meyering <meyering@redhat.com>
5144
maint: clean up m4 syntax
5145
* m4/jm-macros.m4 (coreutils_MACROS, gl_CHECK_ALL_HEADERS):
5146
Remove unnecessary backslashes and add quotes around multi-line
5149
2011-10-01 Markus Duft <mduft@gentoo.org>
5151
build: use getgr*_nomembers functions on Interix
5152
Interix provides faster replacements for getgr{gid,nam,ent} where
5153
group member information is not fetched from domain controllers.
5154
This makes 'id' usable on domain controlled interix boxes.
5155
* m4/jm-macros.m4: Check for _nomembers functions.
5156
* src/system.h: Redefine function to _nomembers when available.
5158
build: accommodate missing setgroups on Interix
5159
Add a dummy, non-functional, always-successful replacement setgroups
5160
function, to keep the original code untouched and simple.
5161
* src/chroot.c (setgroups) [! HAVE_SETGROUPS]: Define.
5163
2011-10-01 Jim Meyering <meyering@redhat.com>
5165
build: stop distributing gzip'd releases; xz is enough
5166
* configure.ac (AM_INIT_AUTOMAKE): Add no-dist-gzip.
5167
* NEWS (Build-related): Mention that we're dropping .tar.gz.
5169
build: update gnulib submodule to latest
5171
2011-10-01 Pádraig Brady <P@draigBrady.com>
5173
doc: mention the recent ls -L "argetm" fix in NEWS
5174
* NEWS: Mention the bug fix
5176
2011-10-01 Pádraig Brady <P@draigBrady.com>
5178
ls: fix output of dangling symlinks colored as target
5179
This is related to commit b7f2b51c, 2010-01-01,
5180
"ls: fix color of broken symlinks colored as target"
5181
which didn't handle the --dereference case.
5182
The simplest way to reproduce the resultant
5183
erroneous "argetm" is as follows:
5185
$ ln -s /no-such dangle
5186
$ env LS_COLORS=ln=target ls --dereference --color
5187
ls: cannot access dangle: No such file or directory
5190
This is also an issue with the `tree` utility,
5191
reported here: http://bugs.debian.org/586765
5193
* src/ls.c (print_color_indicator): Move the handling
5194
of 'ln=target' in $LS_COLORS (color_symlink_as_referent == true)
5195
to a higher scope, to handle all cases where type == C_LINK.
5196
* tests/misc/ls-misc: Add a test case for the specific issue,
5197
and 2 further test cases to verify other code paths in this area.
5199
Reported by Jason Glassey.
5201
2011-09-30 Jim Meyering <meyering@redhat.com>
5203
ls: avoid reading beyond end of color indicator
5204
At first this looked like a buffer overrun, since there was no test
5205
to ensure that the buffer length was 6. However, since the LS_COLORS
5206
string is NUL-terminated and since settings within it are separated by
5207
":" there was neither the risk of reading beyond end of buffer nor risk
5208
of a false-positive match.
5209
* src/ls.c (print_color_indicator): Use color_symlink_as_referent
5210
rather than manually comparing against "target" again.
5211
* src/system.h (STRNCMP_LIT): Correct description in comment.
5213
2011-09-28 Jim Meyering <meyering@redhat.com>
5215
tests: update gnulib to latest, to fix test link failure
5217
2011-09-27 Jim Meyering <meyering@redhat.com>
5219
sort: avoid a NaN-induced infloop
5220
These commands would fail to terminate:
5221
yes -- -nan | head -156903 | sort -g > /dev/null
5222
echo nan > F; sort -m -g F F
5223
That can happen with any strtold implementation that includes
5224
uninitialized data in its return value. The problem arises in the
5225
mergefps function when bubble-sorting the two or more lines, each
5226
from one of the input streams being merged: compare(a,b) returns 64,
5227
yet compare(b,a) also returns a positive value. With a broken
5228
comparison function like that, the bubble sort never terminates.
5229
Why do the long-double bit strings corresponding to two identical
5230
"nan" strings not compare equal? Because some parts of the result
5231
are uninitialized and thus depend on the state of the stack.
5232
For more details, see http://bugs.gnu.org/9612.
5233
* src/sort.c (nan_compare): New function.
5234
(general_numcompare): Use it rather than bare memcmp.
5235
Reported by Aaron Denney in http://bugs.debian.org/642557.
5236
* NEWS (Bug fixes): Mention it.
5237
* tests/misc/sort-NaN-infloop: New file.
5238
* tests/Makefile.am (TESTS): Add it.
5240
2011-09-24 Jim Meyering <meyering@redhat.com>
5242
build: update gnulib submodule to latest
5244
maint: avoid new syntax-check failure
5245
Pulling in the latest gnulib triggered a new false-positive
5246
syntax-check failure.
5247
* cfg.mk (exclude_file_name_regexp--sc_prohibit_always-defined_macros):
5248
Exempt remove.c; its definitions of DT_UNKNOWN, DT_DIR and DT_LNK are
5251
2011-09-24 Bernhard Voelker <mail@bernhard-voelker.de>
5253
tests: mention new check-expensive/check-very-expensive in test logs
5254
* tests/init.cfg: (very_expensive_): Mention toplevel make target,
5255
check-very-expensive.
5256
(expensive_): Likewise for check-expensive.
5258
tests: introduce make targets check-expensive and check-very-expensive
5259
* Makefile.am: add shortcuts to run (very) expensive tests.
5260
Use "make check-expensive" to run tests with RUN_EXPENSIVE_TESTS=yes,
5261
use "make check-very-expensive" to run tests with both
5262
RUN_EXPENSIVE_TESTS=yes and RUN_VERY_EXPENSIVE_TESTS=yes.
5263
Non-expensive tests are included in all cases.
5265
2011-09-22 Pádraig Brady <P@draigBrady.com>
5267
timeout: handle implicitly created threads
5268
On some systems like glibc on GNU/kFreeBSD, a thread is
5269
implicitly created when timer_settime() is used.
5270
This breaks our scheme to ignore signals we've
5273
* src/timeout.c (send_sig): Change the scheme used to
5274
ignore signals we've sent ourselves, to a more robust
5275
but perhaps limited scheme of ignoring all signals of
5276
a certain type after we've sent that signal to the job.
5277
* NEWS: Mention the change in behavior.
5279
2011-09-19 Bruno Haible <bruno@clisp.org>
5281
tests: init.sh: support any non-GNU diff
5282
* tests/init.sh (compare): If "diff -c" is supported but "diff -u" is
5283
not, use "diff -c". Useful on AIX 6.1, HP-UX 11.31, OSF/1 5.1,
5286
2011-09-19 Jim Meyering <meyering@redhat.com>
5288
gnulib: update for getcwd fix on systems without openat
5289
This fixes a bug in pwd and all getcwd-using applications (for some
5290
uses: df, readlink, stat) when run from a directory whose absolute name
5291
contains more than PATH_MAX / 3 components. For more details, see
5292
http://git.sv.gnu.org/cgit/gnulib.git/commit/?id=f6fe351fc534ae1
5294
* NEWS (Improvements): Mention it.
5296
2011-09-19 Reuben Thomas <rrt@sc3d.org>
5298
md5sum: clarify what is meant by binary/text flag.
5299
src/md5sum.c: Clarify that we are talking about input mode.
5300
doc/coreutils.texi: Ditto.
5302
2011-09-19 Jim Meyering <meyering@redhat.com>
5304
tests: cp-parents: don't let a failing chmod go unnoticed
5305
* tests/cp/cp-parents: If somehow a chmod set-up command failed,
5306
subsequent tests would fail in a harder-to-diagnose manner.
5308
2011-09-17 Paul Eggert <eggert@cs.ucla.edu>
5310
randread: add FIXME comment for RDRAND
5311
* gl/lib/randread.c: Add a FIXME comment suggesting how to improve
5312
performance by using the RDRAND hardware instruction.
5314
2011-09-16 Pádraig Brady <P@draigBrady.com>
5316
md5sum: handle BSD reversed format checksums
5317
* src/md5sum.c (split_3): Detect and handle BSD reversed
5319
* tests/misc/md5sum-bsd: Add a new test.
5320
* tests/Makefile.am: Reference new test.
5321
* NEWS: Mention the improvement
5322
Suggested by Rimas Kudelis.
5324
2011-09-14 Eric Blake <eblake@redhat.com>
5326
doc: improve description of join's -a option
5327
* src/join.c (usage): Mention that -a adds to the overall output,
5328
rather than replacing the default output.
5330
Reported by Tomas Volka.
5332
2011-09-12 Jim Meyering <meyering@redhat.com>
5334
build: avoid unwarranted failure w/gcc-4.6.1 and --enable-gcc-warnings
5335
* configure.ac (gl_GCC_VERSION_IFELSE): Define new macro.
5336
(WERROR_CFLAGS): With --enable-gcc-warnings, use it to
5337
add -Wsuggest-attribute=pure only with gcc 4.7 or newer.
1
5339
2011-09-08 Jim Meyering <meyering@redhat.com>
5341
doc: fix typo in test script comment
5342
* tests/d_type-check: Fix typo in comment.
5344
maint: post-release administrivia
5345
* NEWS: Add header line for next release.
5346
* .prev-version: Record previous version.
5347
* cfg.mk (old_NEWS_hash): Auto-update.
4
5350
* NEWS: Record release date.