summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-16uniq: cleanupuniq-versuchErich Eckner
2017-02-16uniq: compiles, but does the wrong thing - for nowErich Eckner
2017-02-16sort: split off even more linesErich Eckner
2017-02-16uniq: start to use commons to sort.cErich Eckner
2017-02-16sort: split off even more source lines useful for uniqErich Eckner
2017-02-16sort: split off even more source lines useful for uniqErich Eckner
2017-02-16sort: split off source lines useful for uniq, tooErich Eckner
2017-02-16maint: xsetmode renamed to xbinary-ioHEADmasterPaul Eggert
* bootstrap.conf, src/base64.c, src/cat.c, src/cksum.c: * src/head.c, src/md5sum.c, src/od.c, src/split.c, src/sum.c: * src/tac.c, src/tail.c, src/tee.c, src/tr.c, src/wc.c: Adjust to renaming of the xsetmode module to xbinary-io, and of the xsetmode function to xset_binary_mode.
2017-02-16build: update gnulib submodule to latestPaul Eggert
2017-02-15maint: use xsetmode, not xfreopenPaul Eggert
This fixes a bug noted by Eric Blake. Code was using xfreopen to change files to binary mode, but this fails for stdout when in append mode. Such code should use xsetmode instead. This affects only the port on platforms like MS-Windows which distiguish text from binary I/O. * bootstrap.conf (gnulib_modules): Remove xfreopen and add xsetmode. Sort. * src/base64.c (main): * src/cat.c (main): * src/cksum.c (cksum): * src/head.c (head_file, main): * src/md5sum.c (digest_file): * src/od.c (open_next_file): * src/split.c (main): * src/sum.c (bsd_sum_file, sysv_sum_file): * src/tac.c (tac_file, main): * src/tail.c (tail_file): * src/tee.c (tee_files): * src/tr.c (main): * src/wc.c (wc_file): Use xsetmode, not xfreopen.
2017-02-15build: update gnulib submodule to latestPaul Eggert
2017-02-12maint: tweaks so syntax tests pass for previous commitPádraig Brady
* src/force-link.h: Don't include headers already included by system.h * src/force-link.c: Likewise. Also include system.h and explicitly mark extern functions as such.
2017-02-11ln: replace destination links more atomicallyPaul Eggert
If the file B already exists, commands like 'ln -f A B' and 'cp -fl A B' no longer remove B before creating the new link. Instead, they arrange for the new link to replace B atomically. This should fix a race condition reported by Mike Crowe (Bug#25680). * NEWS, doc/coreutils.texi (cp invocation, ln invocation): Document this. * bootstrap.conf (gnulib_modules): Add symlinkat. * src/copy.c, src/ln.c: Include force-link.h. * src/copy.c (same_file_ok): It's also OK to remove a destination symlink when creating symbolic links, or when the source and destination are on the same file system and when creating hard links. * src/copy.c (create_hard_link, copy_internal): * src/ln.c (do_link): Rewrite using force_linkat and force_symlinkat, to close a window where the destination temporarily does not exist. * src/cp.c (main): Do not set x.unlink_dest_before_opening merely because we are in link-creation mode. * src/force-link.c, src/force-link.h: New files. * src/local.mk (copy_sources, src_ln_SOURCES): Add them. * tests/cp/same-file.sh: Adjust test case to match fixed behavior.
2017-02-09timeout: fix race possibly terminating wrong processTobias Stoeckmann
The race is unlikely, as timeout(1) needs to receive a signal in the few operations between waitpid() returning and exit(). Also the system needs to have reallocated the just released pid in this time window. Previously we never disabled the signal handler that sent the termination signal to the "child" pid. However once waitpid() has reaped the child, the system is free to allocate that pid, so we must ensure we don't process any further signals. * build-aux/gen-lists-of-programs.sh: Build timeout(1) optionally... * configure.ac: ...predicated on sigsuspend() being available. * src/timeout.c (block_cleanup): A new function to ensure the cleanup() handler is disabled after waitpid has returned. (main): Use sigsuspend() to wait with cleanup() enabled but disabled once it returns, and thus disabled for the waitpid() call. (monitored_pid): Change to the more accurate pid_t. * NEWS: Mention the fix. Fixes http://bugs.gnu.org/25624
2017-02-09doc: note the relationship between realpath and readlinkPádraig Brady
* doc/coreutils.texi (realpath invocation): Mention that realpath is the preferred command for canonicalization. (readlink invocation): Likewise. * man/readlink.x: Likewise.
2017-02-08tail: fix output of redundant headers when resumingJanne Snabb
* src/tail.c (check_fspec): Only enable printing of the file header if we've actually read some data and this is a new file. Also move printing of the file header to... (dump_remainder): ...here, to allow printing only when data read. * tests/tail-2/overlay-headers.sh: A new test for suspension and resumption of tail. * tests/local.mk: Reference the new test. * NEWS: Mention the fix. Fixes http://bugs.gnu.org/23539
2017-02-08tests: fix tail test race causing false failurePádraig Brady
* tests/tail-2/retry.sh: The replacement of the "missing" directory is not atomic, and therefore tail(1) can take a different path, especially if there is a delay between the rmdir(2) and creat(2). This is noticeable for example with `make coverage` because in that case the coverage files written by rmdir(1) on exit, induce a significant delay thus triggering the issue.
2017-02-08tail: fix erroneous status about 'giving up' on filePádraig Brady
* src/tail.c (recheck): Set f->ignore before we use it to show the appropriate error. * tests/tail-2/retry.sh: Ensure the "giving up" message is not presented.
2017-02-08doc: only distribute 5 years of ChangeLogsPádraig Brady
Remove old log files that have corresponding entries in the source code repository. This saves about 2.5MB uncompressed, 0.5M compressed. * Makefile.am (gen-ChangeLog): Adjust to taking all logs since a particular version (8.15 in this case). Also mention in the truncated log where to get older entries. (changelog_etc): Remove the no longer distributed files. * build-aux/git-log-fix: Remove now unused entries. * ChangeLog-200[5-8]: Delete. * doc/ChangeLog-2007: Likewise. * po/ChangeLog-2007: Likewise. * old/*: Likewise.
2017-02-07maint: fix HACKING instructions to run a single testMaxime de Roucy
* HACKING: s/make TEST=/make check TEST=/ The 'check' target was missing there since v8.20-57-geac397e.
2017-01-25build: fix issue with HAVE_FALLOCATE on centos5Pádraig Brady
* src/copy.c (punch_hole): Work around an empty definition of HAVE_FALLOCATE which leads to a build error of: "error: #if with no expression" That was triggered by the inclusion of <linux/fs.h> in commit v8.25-68-g89e1fef with kernel-headers-2.6.18. Reported by Nelson H. F. Beebe
2017-01-25build: Properly expand cu_install_program when cross-compilingManolis Ragkousis
* src/local.mk (cu_install_program): Replace @INSTALL_PROGRAM@ with @INSTALL@ when cross-compiling; missed in commit 477a1e8e. Message-Id: <20170125163329.5690-1-manolis837@gmail.com> Copyright-paperwork-exempt: Yes
2017-01-21dircolors: highlight windows archive formatMike Swanson
* src/dircolors.hin: Match *.{wim,swm,dwn,esd}
2017-01-21maint: mention the recent date time zone bug fixPádraig Brady
* NEWS: Add the bug fix from commit v8.26-27-gb14be50
2017-01-21maint: appease syntax-check failures due to recent updatesAssaf Gordon
* bootstrap: s/time stamp/timestamp/. * old/fileutils/NEWS: Likewise. * src/tail.c: Avoided a long line.
2017-01-20date: fix TZ= regressionPaul Eggert
Problem reported by Paul Wise for Debian, in: https://bugs.debian.org/851934 This is fallout from the fix for GNU Bug#23035. * src/date.c (batch_convert): New args TZ and TZSTRING. All uses changed. (batch_convert, main): Adjust to parse_datetime2 API change. (main): Allocate time zone object. * tests/misc/date-debug.sh: Fix incorrect test case, caught by the fix. * tests/misc/date.pl: Test the fix.
2017-01-20build: update gnulib submodule to latestPaul Eggert
2017-01-15maint: update README-hacking, now that vc-dwim accepts --initJim Meyering
* README-hacking: I've just released vc-dwim-1.8, so we can improve the documentation to reference its --initialize option here.
2017-01-14date: output "-00" for indeterminate time zonePaul Eggert
* NEWS: Document this behavior, which comes with recent Gnulib. * doc/coreutils.texi (Formatting file timestamps, du invocation) (Time conversion specifiers, Setting the time, Options for date): Mention when -00 is output for numeric time zones. Be more careful about Internet RFC numbers, ISO 8601, etc.
2017-01-14date: new option spelling --rfc-emailPaul Eggert
* NEWS: * doc/coreutils.texi (Time conversion specifiers) (Options for date, Examples of date): Document this. * src/date.c (rfc_email_format): Rename from rfc_2822_format. All uses changed. (usage, long_options): Support --rfc-email.
2017-01-14maint: modernize URLsPaul Eggert
A lot of this is converting http: to https:. Also, gmane went away, so remove URLs that no longer work and are not easy to figure out what they were. Some of this stuff is so old that it no longer matters anyway.
2017-01-14build: update gnulib submodule to latestPaul Eggert
2017-01-10doc: move "File timestamps" to a separate chapterBernhard Voelker
The above new section looked a bit odd as the only general documentation in between the utility chapters. * doc/coreutils.texi (File timestamps): Move to a separate chapter.
2017-01-10maint: fix recent syntax check failuresEric Blake
Commit 4f650aad was incomplete; it changed NEWS but not the hash, and introduced a grammar error. * cfg.mk (old_NEWS_hash): Update via 'make update-NEWS-hash'. * doc/coreutils.texi (File timestamps): Fix doubled word.
2017-01-09doc: cover file timestamps betterPaul Eggert
Prompted by a bug report from Scott Deerwester (Bug#25407). * doc/coreutils.texi (File timestamps): New section. Revamp other sections to use this new section, and use more-consistent terminology.
2017-01-09maint: standardize on "timestamp" as per POSIXPaul Eggert
2017-01-09stty: ensure no side effects from invalid optionsPádraig Brady
* src/stty.c (apply_settings): A new function refactored from main() that is used to both check and apply options. (main): Call apply_settings before we open the device, so all validation is done before interacting with a device. * NEWS: Mention the improvement. * tests/misc/stty.sh: Add a test case.
2017-01-05tests: improve 'date --debug' testsAssaf Gordon
Update tests following improvements to gnulib's parse-datetime.y module. See https://lists.gnu.org/archive/html/bug-gnulib/2017-01/msg00002.html * tests/misc/date-debug.sh: Add tests for each of the gnulib changes.
2017-01-05build: update gnulib submodule to latestAssaf Gordon
2017-01-01maint: update all copyright year number rangesPádraig Brady
Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year.
2016-12-28doc: recommend b2sum as well as SHA2Zooko
b2sum is faster, easier to use safely, and more future-proof
2016-12-28tests: avoid false fails on NFS due to EPERMPádraig Brady
* tests/chgrp/basic.sh: On some NFS setups a user is not allowed to set a group on a file even if a member of that group. Therefore skip this test on remote file systems. * tests/chgrp/default-no-deref.sh: Likewise. * tests/chgrp/no-x.sh: Likewise. * tests/chgrp/posix-H.sh: Likewise. * tests/chgrp/recurse.sh: Likewise. * tests/tail-2/inotify-rotate-resources.sh: Change to skipping on remote file systems in the standard way.
2016-12-27doc: Update POSIX part of README (Bug#25259)Paul Eggert
2016-12-26wc: with only --bytes, determine size more efficientlyPádraig Brady
* src/wc.c (wc): Avoid reading the end of the file when the size is not a multiple of PAGE_SIZE, as the special case handling for files in /proc and /sys is only required when st_size is 0 or a multiple of PAGE_SIZE. * tests/misc/wc-proc.sh: Add a test case.
2016-12-20maint: correct the version for the previous bug fixPádraig Brady
While st_size would have been incorrect for subsequent files since v7.1, it was only used since v8.24. * tests/misc/wc-files0.sh: s/7.1/8.24/ * NEWS: Likewise. Reported by Bernhard Voelker
2016-12-19wc: fix wrong byte counts when using --files-from0William R. Fraser
* src/wc.c (main): Reset fstatus[0].failed between files when reusing the fstatus[0] entry in --files-from0 mode. This ensures a stat() is done for each file, avoiding incorrect counts and redundant reading. * NEWS: Mention the bug fix. * tests/misc/wc-files0.sh: Add a test case. Fixes http://bugs.gnu.org/23073
2016-12-18tests: fix typos in previous commitPádraig Brady
* init.cfg (skip_if_mcstransd_is_running_): Fix typos _introduced my me_ in the previous commit.
2016-12-18tests: support non-MLS enabled SELinux systemsNicolas Iooss
When running "make check" on a Linux system running SELinux with a non-MLS policy, tests/mkdir/restorecon.sh test fails with: chcon: invalid context: root:object_r:tmp_t:s0: Invalid argument Indeed in such a configuration, contexts cannot have ":s0" suffix. * init.cfg (get_selinux_type): Refactor this function to here from various tests. Update to work with a non-MLS policy. (mls_enabled_): A new function to detect if MLS is enabled. (skip_if_mcstransd_is_running_): Update to not skip when MLS is not enabled. * tests/mkdir/restorecon.sh: Use a valid non-MLS context when needed. * tests/install/install-Z-selinux.sh: Likewise. * tests/cp/cp-a-selinux.sh: Likewise. * tests/misc/selinux.sh: Likewise. * tests/misc/chcon.sh: Skip if non-MLS as --range used throughout. Fixes http://bugs.gnu.org/22631
2016-12-08factor: retry properly if Pollard rho gives a trivial factorizationTorbjörn Granlund
* src/factor.c (factor_using_pollard_rho): Handle trivial factor g = n. (factor_using_pollard_rho2): Handle trivial factor g1 = n1, g0 = n0. * tests/misc/factor.pl: Add a test case. Fixes http://bugs.gnu.org/25135
2016-12-08factor: fix infinite loop in gcd2_oddNiels Möller
* src/factor.c (gcd2_odd): Fix the case a1 == 0, a0 == 0. * NEWS: Mention the bug fix. Fixes http://bugs.gnu.org/25135