Age | Commit message (Collapse) | Author |
|
* man/local.mk (.x.1): Move the program name argument down after
the last option argument when calling $(run_help2man).
While the other way would be accepted for the GNU help2man program,
it is not for the 'dummy-man' script (called as a fallback on
systems lacking perl).
The wrong order was introduced in commit v8.21-119-gb3578fc while
adding the --info-page option.
|
|
* man/dummy-man: Fix argument count check, now only permitting
exactly 1 argument, the program name.
Reported by Andreas Schwab <schwab@linux-m68k.org>
|
|
* man/dummy-man: Fix argument count check,
allowing dummy-man to run (on systems without perl).
Fixes http://bugs.gnu.org/18531
|
|
* .gitignore: Remove reference to no longer generated make file.
* configure.ac: Don't bother generating placeholder make file.
* man/local.mk: Hardcode the man page deps list for normal builds
to be compatible with all make implementations and configure options.
Note in SINGLE_BINARY mode, all man pages will be generated on
any change to the coreutils binary, but development will generally
not be done in this mode, so this shouldn't be an issue.
Fixes http://bugs.gnu.org/18055
|
|
* src/dircolors.c (main): Parenthesize !VAR as LHS to "<",
to avoid triggering gcc's new -Wlogical-not-parentheses warning.
|
|
Following on from commit v5.92-729-g130dd06, also avoid
the erroneous directory hardlink warning with -H.
* src/copy.c (copy_internal): Also handle the -H case
for command line arguments.
* tests/cp/duplicate-sources.sh: Augment the test case.
* NEWS: Augment the news entry.
|
|
* src/copy.c (copy_internal): Handle the case where we have the
same destination directory as already encountered, which can only
be due to the corresponding source directory being specified multiple
times.
* tests/cp/duplicate-sources.sh: Add a test for the new multiply
specified directory case, and the existing multiply specified file case.
* tests/local.mk: Reference the new test.
* NEWS: Mention the bug fix.
|
|
* src/system.h (emit_ancillary_info): Take the invariant PROGRAM_NAME
as a parameter, so that consistent references are made to online docs
and texinfo nodes, when a --program-prefix is in place. Note the
man pages don't need this fix as they're generated before the program
prefix is used.
* NEWS: Mention the improvements in references to online documentation.
|
|
* src/system.h (emit_ancillary_info): For commands that don't have
a 1:1 mapping with the texinfo node names, provide a mapping to
the correct node.
* doc/coreutils.texi: Add some extra cross references noticed while
checking this.
Fixes http://bugs.debian.org/762092
|
|
On XFS, when creating the ~2G test file 'big' in a for-loop by
appending 20M each time, the file ends up using ~4G - visible in
'st_blocks'. The unused space would be reclaimed later.
This feature is called "speculative preallocation" which aims at
avoiding fragmentation.
According to the XFS FAQ [1], there are two particular aspects of
XFS speculative preallocation that are triggering this:
1. "Applications that repeatedly trigger preallocation and reclaim
cycles [after file close] can cause fragmentation.
Therefore, this pattern is detected and causes the preallocation
to persist beyond the lifecycle of the file descriptor."
2. "Preallocation sizes grow as files grow larger."
[1] http://xfs.org/index.php/XFS_FAQ
Avoid one of the above by only doing a single close (reclaim cycle).
* tests/du/2g.sh: Similar to the fix for a dd test (see commit
v8.22-65-g7c03fe2), avoid speculative preallocation by creating
the 'big' file in one go instead of appending to it in the loop.
Remove debugging statements as the output with 'set -x' is
sufficient nowadays.
|
|
Problem reported by Vincent Lefevre in: http://bugs.gnu.org/18449
* src/cat.c (main): Allow copying an empty file to itself.
* tests/misc/cat-self.sh: New test.
* tests/local.mk (all_tests): Add it.
|
|
* src/system.h (emit_ancillary_info): Add a direct reference
to the corresponding online info documentation. Corresponding
redirects were put in place on www.gnu.org to allow for concise links.
* help2man: Adjust to add the "online help" link (and subsequent
translation bugs link) to a "REPORTING BUGS" section.
Also add the concise links for further information in --help
to the "SEE ALSO" section, and dispense with the more verbose
default for that.
|
|
old form: coreutils '$cmd invocation'
new form: '(coreutils) $cmd invocation'
The old form erroneously referenced the node for the 'coreutils'
multi-call program. Now that problematic node name was renamed
in commit v8.23-18-g72e470b, but the newer less ambiguous form
also has the advantage of working with the pinfo viewer for example.
Full discussion at http://bugs.gnu.org/18428
* man/local.mk: Adjust man page references to texinfo nodes.
* src/system.h: Adjust --help references to texinfo nodes.
|
|
* cfg.mk (sc_system_h_headers): Don't exclude libstdbuf.c.
* src/libstdbuf.c: Remove headers already included in system.h.
|
|
* src/local.mk (transform): commit v8.23-22-g6f9b018 discarded all
transformations on the libstdbuf.so name. Be more conservative and
only exclude the $(program_transform_name) portion for libstdbuf.
|
|
* src/local.mk (transform): Skip the transformation for libstdbuf
since that should not be subject to name clashes, and we need
to reference the name directly in LD_PRELOAD etc.
* configure.ac: Add a comment on the coupling of pkglibexec_PROGRAMS
to $(transform).
Issue reported at https://trac.macports.org/ticket/44922
Improved by Nick Bowler
|
|
Avoid 2 new syntax-check failures introduced in commit v8.23-19-g8defcee
* cfg.mk (sc_some_programs_must_avoid_exit_failure): s/exit/return/.
* src/whoami.c (main): Reinstate translation marker for diagnostic.
|
|
The C standard says this isn't portable, if you include
standard include files.
* build-aux/gen-single-binary.sh:
* src/coreutils-arch.c (single_binary_main_arch)
(single_binary_main_uname):
* src/coreutils-dir.c (single_binary_main_ls)
(_single_binary_main_dir):
* src/coreutils-vdir.c (single_binary_main_ls)
(_single_binary_main_vdir):
* src/coreutils.c (SINGLE_BINARY_PROGRAM):
Remove leading _ from single_binary prefix.
* src/numfmt.c (round_style): Rename from _round. All uses changed.
(inval_style): Rename from _invalid. All uses changed.
|
|
* build-aux/gen-single-binary.sh: Don't use ATTRIBUTE_NORETURN
for main functions.
* src/base64.c, src/basename.c, src/cat.c, src/chcon.c, src/chgrp.c:
* src/chmod.c, src/chown.c, src/chroot.c, src/cksum.c, src/comm.c:
* src/cp.c, src/csplit.c, src/cut.c, src/date.c, src/dd.c, src/df.c:
* src/dircolors.c, src/dirname.c, src/du.c, src/echo.c, src/env.c:
* src/expand.c, src/expr.c, src/factor.c, src/fmt.c, src/fold.c:
* src/getlimits.c, src/groups.c, src/head.c, src/hostid.c:
* src/hostname.c, src/id.c, src/install.c, src/join.c, src/kill.c:
* src/link.c, src/ln.c, src/logname.c, src/ls.c, src/make-prime-list.c:
* src/md5sum.c, src/mkdir.c, src/mkfifo.c, src/mknod.c, src/mktemp.c:
* src/mv.c, src/nice.c, src/nl.c, src/nohup.c, src/nproc.c:
* src/numfmt.c, src/od.c, src/paste.c, src/pathchk.c, src/pinky.c:
* src/pr.c, src/printenv.c, src/printf.c, src/ptx.c, src/pwd.c:
* src/readlink.c, src/realpath.c, src/rm.c, src/rmdir.c, src/runcon.c:
* src/seq.c, src/shred.c, src/shuf.c, src/sleep.c, src/sort.c:
* src/split.c, src/stat.c, src/stdbuf.c, src/stty.c, src/sum.c:
* src/sync.c, src/tac.c, src/tail.c, src/tee.c, src/timeout.c:
* src/touch.c, src/tr.c, src/true.c, src/truncate.c, src/tsort.c:
* src/tty.c, src/uname.c, src/unexpand.c, src/uniq.c, src/unlink.c:
* src/uptime.c, src/users.c, src/wc.c, src/who.c, src/whoami.c:
In 'main' functions, Prefer 'return status;' to 'exit (status);'.
* src/coreutils-arch.c (_single_binary_main_uname)
(_single_binary_main_arch):
* src/coreutils-dir.c, src/coreutils-vdir.c (_single_binary_main_ls)
(_single_binary_main_dir, _single_binary_main_vdir):
Omit ATTRIBUTE_NORETURN. Return a value.
* src/coreutils.c (SINGLE_BINARY_PROGRAM): Omit ATTRIBUTE_NORETURN.
(launch_program): Now static.
* src/dd.c (finish_up): New function.
(quit, main): Use it.
* src/getlimits.c (main): Return a proper exit status.
* src/test.c (test_main_return): New macro.
(main): Use it.
* src/logname.c, src/nohup.c, src/whoami.c:
Use 'error' to simplify exit status in 'main' function.
* src/yes.c (main): Use 'return' rather than 'error' to exit,
so that GCC doesn't suggest ATTRIBUTE_NORETURN.
|
|
This supports longstanding shell commands like
'info coreutils "touch invocation"'.
Problem reported by Vincent Lefevre via Bob Proulx in:
http://bugs.gnu.org/18428
* doc/coreutils.texi (Multi-call invocation):
Rename from "coreutils invocation".
|
|
* doc/coreutils.texi (coreutils invocation, df invocation)
(stty invocation, whoami invocation, nproc invocation)
(arch invocation, hostname invocation, hostid invocation)
(uptime invocation, chroot invocation, nice invocation)
(stdbuf invocation): Document that the command is installed
optionally.
|
|
* doc/coreutils.texi: Fix normal typos:
s/pseudorandom/pseudo-random/;
s/behaviour/behavior/;
s/linux-based/Linux-based/;
s/nonnegative/non-negative/.
Fix IEC's long name: s/Electronical/Electrotechnical/.
Wrap 'getopt' into the @code{} macro.
Fix a grammatical error (from myself): s/splitted/split/.
|
|
* doc/coreutils.texi (timeout invocation): Fix misspelling.
Reported by Yureruchihirosan via OKANO Takayoshi in:
http://bugs.gnu.org/18394
|
|
* src/extent-scan.c (extent_scan_read): Following on from the flags size
adjustment in commit v8.23-13-g1505b37, verify that the internal
representation of the flags is never truncated which could happen in the
unlikely case on 32 bit if the kernel flags ever expanded to 64 bits
which is theoretically possible given the reserved space.
|
|
C11 doesn't require them, even POSIX doesn't strictly require the
64-bit versions, and it makes the code a bit clearer if they're
used only when needed.
* src/copy.c (write_zeros, extent_copy):
* src/extent-scan.h (struct extent_info.ext_length):
Use off_t, not uint64_t, for a value derived from a file offset.
* src/extent-scan.h (struct extent_info.ext_flags)
Prefer plain unsigned int to uint32_t where either will do.
(struct extent_scan.ei_count):
Use size_t, not uint32_t, for a value bounded by SIZE_MAX.
* src/factor.c (MAGIC64, MAGIC63, MAGIC65):
Remove unnecessary casts to uint64_t.
|
|
* src/ls.c (main): As per the FIXME comment, move the
QUOTING_STYLE handling to a separate function.
|
|
* doc/coreutils.texi (df invocation): Add a sentence that eliding
duplicate entries for the same file system is not limited to bind
mounts, but also happens for remote file systems like NFS.
|
|
v8.23 has a test failure on Fedora rawhide build servers
in tests/df/skip-duplicate.sh. This was due to no '/'
entry being output by df. That was due to an inaccurate
/proc/mounts on the build environment as stat(/mnt/point)
identified all these /proc/mounts entries as having the
same device id:
/ rootfs
/ /dev/md1
/dev devtmpfs
/run tmpfs
/boot /dev/md0
/proc/filesystems /dev/md1
Since the device name on the right changes for a given id,
that causes the entries to be continually replaced, thus
resulting in no '/' entry. I'm guessing this is due to
the mock environment bind mounting unneeded or sensitive
items to a dummy file on the host / (/dev/md1) though
have not looked into those details.
So rather than relying on an accurate /proc/mounts,
the attached patch takes a more conservative replacement
approach and only swaps a new device entry when the
mount point matches. That should handle all practical
cases while also avoiding this situation.
* src/df.c (filter_mount_list): Only replace entries with
different device names when the mount point also matches.
|
|
If the hash structures grow sufficiently large so that
the system is actively swapping, then the deallocation
can take a significant amount of time. Details at:
http://lists.gnu.org/archive/html/coreutils/2014-08/msg00012.html
* src/cp.c (main): Only call hash deallocation routines
when in lint checking mode.
* THANKS.in: Remove as now in the git author list.
|
|
* src/rm.c (usage): s/FILE/[FILE]/.
Fixes http://bugs.gnu.org/18187
|
|
* src/numfmt.c (parse_format_string): s/overridding/overriding/.
Fixes http://bugs.gnu.org/18050
|
|
Reported by Andreas Schwab in: http://bugs.gnu.org/18057
* tests/tail-2/inotify-race.sh (break_src):
Use abs_top_srcdir, not abs_top_builddir.
|
|
Since commit v8.22-94-g99960ee, chroot(1) skips the chroot(2) syscall
for "/" arguments (and synonyms). The problem is that it also skips
the following chdir("/") call in that case. The latter breaks existing
scripts which expect "/" to be the working directory inside the chroot.
While the first part of the change - i.e., skipping chroot("/") - is
okay for consistency with systems where it might succeed for a non-root
user, the second part might be malicious, e.g.
cd /home/user && chroot '/' bin/foo
In the "best" case, chroot(1) could not execute 'bin/foo' with ENOENT,
but in the worst case, chroot(1) would execute '/home/user/bin/foo' in
the case that exists - instead of '/bin/foo'.
Revert that second part of the patch, i.e., perform the chdir("/)
in the common case again - unless the new --skip-chdir option is
specified. Restrict this new option to the case of "/" arguments.
* src/chroot.c (SKIP_CHDIR): Add enum.
(long_opts): Add entry for the new --skip-chdir option.
(usage): Add --skip-chdir option, and while at it, move the other
to options into alphabetical order.
(main): Accept the above new option, allowing it only in the case
when NEWROOT is the old "/".
Move down the chdir() call after the if-clause to ensure it is
run in any case - unless --skip-chdir is specified.
Add a 'newroot' variable for the new root directory as it is used
in a couple of places now.
* tests/misc/chroot-fail.sh: Invert the last tests which check the
working directory of the execvp()ed program when a "/"-like
argument was passed: now expect it to be "/" - unless --skip-chdir
is given.
* doc/coreutils.texi (chroot invocation): Document the new option.
Document that chroot(1) usually calls chdir("/") unless the new
--skip-chdir option is specified. Sort options.
* NEWS (Changes in behavior): Mention the fix.
(New features): Mention the new option.
* init.cfg (nonroot_has_perm_): Add chroot's new --skip-chdir option.
* tests/cp/preserve-gid.sh (t1): Likewise.
* tests/cp/special-bits.sh: Likewise.
* tests/id/setgid.sh: Likewise.
* tests/misc/truncate-owned-by-other.sh: Likewise.
* tests/mv/sticky-to-xpart.sh: Likewise.
* tests/rm/fail-2eperm.sh: Likewise.
* tests/rm/no-give-up.sh: Likewise.
* tests/touch/now-owned-by-other.sh: Likewise.
Reported by Andreas Schwab in http://bugs.gnu.org/18062
|
|
* configure.ac: Don't add stdbuf to the list of programs to build
if EXEEXT is set, as that is not handled in configure.ac for
libstdbuf.so yet (see bin_PRGRAMS handling in configure.ac).
Also the LD_PRELOAD mechanism will need to be adjusted to support
cygwin in any case, so avoid stdbuf completely in this case for now.
Problem reported by Eric Blake.
|
|
* doc/coreutils.texi (Floating point): Document handling of "inf",
"infinity", "NaN", and so on.
|
|
Problem reported by Sebastian Rasmussen in: http://bugs.gnu.org/18054
* gl/lib/randread.c (randread_error): Don't put multiple string
literals inside _(...), as xgettext doesn't support that.
* src/chroot.c (main): In diagnostics, don't bother to distinguish
between setting the number of supplemental group IDs to a zero or
to a nonzero value, as the underlying system call is the same
either way. This also makes the string easier to translate correctly.
|
|
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
|
|
* NEWS: Record release date.
|
|
* build-aux/gen-single-binary.sh: Avoid bash only constructs.
Reported by Assaf Gordon
|
|
* tests/misc/env.sh: Skip if we can't execute the generated shebang,
which would be the case if there are spaces in the directory hierarchy.
This is triggered by `make distcheck`
|
|
This issue was identified by the manifest comparisons
done by `make distcheck`
* src/local.mk (noinst_HEADERS): Remove coreutils.h from this always
distributed list.
(nodist_src_coreutils_SOURCES): Add coreutils.h as its contents
are determined at configure time, so pointless to distribute.
(src_coreutils_SOURCES): Define explicitly so that the corresponding
nodist_ variable is honored.
(DISTCLEANFILES): Add coreutils.h to this rather than CLEANFILES,
as its contents are determined at configure time.
|
|
With libselinux-2.2.1-6.fc20.x86_64, kernel-3.12.6-300.fc20.x86_64
`cp --preserve=context src dst` was seen to succeed when src and
dst where on the same fixed context file system, as lsetfilecon()
returned success in this case when the context wasn't being changed.
* tests/cp/cp-a-selinux.sh: Copy from a different file system to
most likely have a different context that will test context
setting logic correctly.
|
|
* cfg.mk: Avoid warning for @AMDEP_TRUE@ usage in man/local.mk
|
|
This fixes a problem with native Solaris 'make', which does not
grok '-include' lines (a GNU extension to POSIX 'make').
* configure.ac (man/dynamic-deps.mk): Create it, with an old
time stamp, if doing dynamic dependency tracking.
* man/local.mk (DISTCLEANFILES): Put man/dynamic-deps.mk here,
rather than in CLEANFILES.
(man/dynamic-deps.mk): Don't create it read-only, so that we
can easily touch it later.
Include it with '@AMDEP_TRUE@@am__include@', not with '-include',
as '-include' does not work with native Solaris 'make'.
|
|
* src/numfmt.c (simple_strtod_int): Replace isdigit() with c_isdigit()
to avoid locale concerns and -Wchar-subscripts warnings on cygwin.
Remove the now redundant locale guard.
(simple_strtod_human): Cast characters to unsigned so that the promoted
int value passed to isblank() is positive, allowing it to work correctly
for all characters in unibyte locales. Previously character 0xA0,
i.e. non-breaking space, would be misclassified for example.
(process_suffixed_number): Likewise.
(skip_fields): Likewise.
Both issues were triggered by the -Wchar-subscripts warning on GCC 4.8.3
on cygwin, due to the is*() implementations used there, but the issue
is present on all platforms defaulting to signed chars.
* NEWS: Mention the bug fix.
Reported by Eric Blake
|
|
* tests/misc/od-endian.sh: '\n' is not generally supported
in the replacement, so use the more portable "\\$NL".
|
|
* tests/dd/ascii.sh: Quote so that '\\' is passed
to printf rather than a single '\', as that's not portable.
bash, dash, zsh and external solaris printf were seen to support
printf '\%03o' 1 2
while ksh, freebsh shell and external GNU printf need the more portable
printf '\\%03o' 1 2
Note we don't use env here to call the coreutils printf implementation,
as there are many printf calls, so relying on portable shell
implementations will be faster.
|
|
* tests/split/b-chunk.sh: Never show the rm prompt which would
hang the test suite. This was seen when split erroneously
created files with no persmissions, which was triggered by
this compiler bug in clang 3.4:
http://llvm.org/bugs/show_bug.cgi?id=18346
|
|
* src/chroot.c: Explicitly cast int to pointer type.
|
|
* gnulib: Sync recent cleanups and the fix for
missing df entries in the presence of bind mounts:
http://bugs.gnu.org/17833
* NEWS: Detail the df bug fix.
|