build: update GCC warnings

* configure.ac: Remove the -Wsuggest-attribute=pure
enablement on GCC >= 4.7, as that was moot since
gnulib was already enabling that warning in its default set.
The false positive was seen with 4.6.2, but confirmed
not present in 4.6.3, so that's sufficiently old to
just leave this enabled unconditionally.

Remove the -Wsuggest-attribute={const,noreturn}
enablement, as gnulib already has those in the default set.

Enable the -Wlogical-op warning for GCC >= 4.8.0
as that is confirmed OK with coreutils at least, due to
fixing: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43772

Remove the -Wno-logical-op override since the main
-Wlogical-op flag is now sufficient to control this warning
as of GCC 4.6.3 at least.
build: update gnulib submodule and tests/init.sh to latest

* gnulib: Update to latest.
* tests/init.sh: Update from gnulib.
install: allow options -D and -t to be used together

* src/install.c (install_file_in_file_parents): Factor out the
creation of any parent directories into ...
(mkancesdirs_safe_wd): ... this new function.
(install_file_in_dir): Add the parameter 'mkdir_and_install', and
call the above new function if it evaluates to true.
(main): During parsing of the -t option, move the check whether
the target_directory exists down  after the option parsing loop,
and do not complain about stat(optarg,...) failing if -D was given.
Pass 'mkdir_and_install' to install_file_in_dir().
* doc/coreutils.texi (install invocation): Remove the (false)
restriction that -D would be ignored together with -t.  Instead,
clarify install's new bahavior.
Fix the node's reference in the top-level @direntry for consistency.
* src/install/basic-1.sh: Add tests for the now-allowed combination
of the -D and -t options.
* NEWS: Mention the improvement.
tests: fix version printing for ginstall in one test

* tests/install/d-slashdot.sh: 'ginstall' is the binary name
in the build directory, not 'install'.
maint: suppress a theoretical buffer overflow warning

* src/numfmt.c (double_to_human): The printf format is built up in
a stack buffer which is big enough to hold any of the possible formats.
However the size parameter passed to snprintf was too big by 1
when GROUP was true.  So decrease the buffer available to snprintf
to avoid this theoretical in practise but valid coverity warning.
tail: fix --follow to use polling mode for VXFS

Veritas File System can run in single instance or clustered mode,
so mark as remote to avoid using inotify for the latter case.

* src/stat.c (human_fstype): Tag VXFS as remote, to use polling
for the clustered variant (VXCFS).
* NEWS: Mention the bug fix.

Reported by Ondřej Vašík in http://bugzilla.redhat.com/1104244
Fixes http://bugs.gnu.org/17770
seq: fix incorrect output with start or end of -0

* src/seq.c (main): Avoid seq_fast() with a start or end of -0.
* tests/misc/seq.pl: Add test cases.
* NEWS: Mention the fix.
Fixes http://bugs.gnu.org/17800
df: use all of the last device details provided

* src/df.c (filter_mount_list): Recent commit v8.22-108-g25a2c94
failed to copy file system type along with the updated device name.
Therefore simply replace the existing mount entry with the
current one with all the latest device details.  Note the name,
even if not shorter in this entry, will be replaced with a shorter
name in a subsequent mount entry.
* tests/df/skip-duplicates.sh: Add a test case.
doc: clarify chgrp restrictions

* doc/coreutils.texi (chown invocation): Mention the system dependent
restrictions on setting groups.
(chgrp invocation): Likewise. Reference the 'chown' superset.
* man/chgrp.x: Cross reference chown(1) which is the superset interface,
and also chown(2) which gives details of the platform restrictions.
Fixes http://bugs.gnu.org/17495
doc: state in ls --help, that -h affects --size format

* src/ls.c (usage): State that --human changes --size format.
Fixes http://bugs.gnu.org/17838
du: ignore directory cycles due to bind mounts

* src/du.c (process_file): Treat cycles due to bind mounts
like cycles due to following symlinks.
* tests/du/bind-mount-dir-cycle.sh: Adjust accordingly.
* NEWS: Mention the change in behavior.
Reported at http://bugzilla.redhat.com/836557
df: output placeholder values for inaccessible mount points

A system provided mount entry may be unavailable due to TOCTOU race,
or if another device has been over-mounted at that position, or due to
access permissions.  In all these cases output "-" placeholder values
rather than either producing an error, or in the over-mount case
outputting values for the wrong device.

* src/df.c (device_list): A new global list now updated by
filter_mount_list().
(filter_mount_list): Adjust to take a parameter as to whether
update the global mount list, or only the mount <-> device ID mapping.
(get_dev): Use the device ID mapping to ensure we're not outputting
stats for the wrong device.  Also output placeholder values when we
can't access a system specified mount point.
(get_all_entries): Set the DEVICE_ONLY param for filter_mount_list().
(devname_for_dev): A new function to search the mount <-> dev mapping.
* test/df/skip-duplicates.sh: Adjust accordingly.
* NEWS: Mention the bug fixes.

Discussed at: http://bugs.gnu.org/16539
df: look for accessible mount points for specified devices

* src/df.c (get_disk): Include whether we can access the mount dir,
in the mount entry selection criteria.  This handles the case where
a device is (bind) mounted multiple times with the shortest mount path
not being accessible, while some of the other mount points are.
Discussed at: http://bugs.gnu.org/16539#63
df: report correct device in presence of eclipsed mounts

* src/df.c (last_device_for_mount): A new function to identify
the last device mounted for a mount point.
(get_disk): Use the above to discard mount entries for a device,
where a later mount entry uses a different device name than
that of the user specified device.
* tests/df/over-mount-device.sh: A new root test.
* tests/local.mk: Reference the new test.
* NEWS: Reword for all these related recent fixes.
Discussed at: http://bugs.gnu.org/16539#69
id: output the effective group for the process

* src/id.c (print_full_info): When no user is specified,
output the effective group for the _process_, rather than
the default group from the system database, which may be different.
* tests/id/setgid.sh: Add a case for `id` as well as `id -G`.
* NEWS: Mention the bug fix.
Fixes http://bugs.gnu.org/7320
Reported at http://bugzilla.redhat.com/1016163
maint: mention when the du cycle warning bug was introduced

* NEWS: Mention bug introduced in v8.1 (with commit v8.0-88-g8ba5d1a).
tests: use predetermined NON_ROOT_GID

* HACKING: GID is more useful in tests than group name, so rename
input param from NON_ROOT_GROUP to NON_ROOT_GID to make it obvious
that only a group ID is now acceptable, thus allowing GID lookups
to be avoided throughout the tests.
* init.cfg (require_root_): Likewise.
* tests/misc/truncate-owned-by-other.sh: Avoid looking up the GID.
* tests/touch/now-owned-by-other.sh: Likewise.
* tests/misc/chroot-credentials.sh: Likewise.  Also fix an instance
of comparison against NON_ROOT_GROUP which would have given a false
failure if a non numeric value was passed in.
* tests/id/setgid.sh: Use previously looked up gid as a more
accurate base for the subsequent adjustment, and move
the uid lookup within chroot, rather than having the overhead
of a separate `id` invocation.
pwd: assume -L mode by default, as per POSIX

* src/pwd.c (main): Adjust default mode to be "logical"
and independent of the POSIXLY_CORRECT env var.
(usage): Mention the default mode of operation.
* doc/coreutils.texi (pwd invocation): Adjust accordingly.
* tests/misc/pwd-option.sh: Likewise.
* NEWS: Mention the change in behavior.
chcon: use security_check_context() for context validation

context_new() and _free() are used for checking validity of a
specified context.  libselinux provides security_check_context
for this purpose so use it.

Note that context_new() can fail for a valid context - e.g. ENOMEM.

* src/chcon.c (main): Use security_check_context().
chcon: avoid redundant context allocations

Since context is verified by security_check_context() it can be used in
change_file_context() without converting to context_t every time.

* src/chcon.c (change_file_context): Use specified_context directly.