Commit Graph

297 Commits

Author SHA1 Message Date
Pádraig Brady
07d59f5a54 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2022-04-15 22:40:41 +01:00
Pádraig Brady
8767d75b9d maint: address syntax-check issues in recent commit
* cfg.mk (sc_die_EXIT_FAILURE): Generalize to match any EXIT_ define,
and also relax to ignore error() usage with ternary operator.
* src/chroot.c (main): Use () to avoid the sc_error_quotes check.
2022-03-07 23:33:25 +00:00
Paul Eggert
2ba6fb653c build: allow readlinkat calls
Problem reported by Bernhard Voelker in:
https://lists.gnu.org/r/coreutils/2022-01/msg00026.html
* cfg.mk (sc_prohibit_readlink): Remove.  It’s OK to call
readlinkat to determine whether a file is a symbolic link.
2022-01-15 12:12:49 -08:00
Pádraig Brady
3067a9293a maint: update all copyright year number ranges
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.
2022-01-02 16:15:55 +00:00
Paul Eggert
d5ae6d8120 doc: colorize -> color
Living so close to Hollywood I know that "colorize"
means adding color to something that was already monochrome,
whereas "color" means to give color to something.
Coreutils apps color text instead of colorizing it.
2021-12-24 09:49:21 -08:00
Pádraig Brady
a0468760ff maint: fix recent syntax-check failures
* cfg.mk (exclude_file_name_regexp--sc_system_h_headers):
Add chown-core.h to the regexp, to better decouple from system.h.
* src/env.c: Remove minmax.h include already included in system.h.
* src/libstdbuf.c: Likewise.
* src/prog-fprintf.h: Remove doubled semicolon.
2021-11-01 13:45:15 +00:00
Pádraig Brady
6f38c4b279 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2021-09-24 13:58:11 +01:00
Pádraig Brady
6a5c561b4f digest: refactor cksum(1) into digest.c
* cfg.mk: Adjust cksum.c to not require config.h
and support a main (for crctab) without calling bindtextdomain().
* po/POTFILES.in: Remove cksum_pclmul.c since it no longer
concerns itself with diagnostics.
* src/cksum.c: Refactor to just providing stream digest,
and digest printing functionality.
* src/cksum.h: Adjust to the new interface.
* src/cksum_pclmul.c: Remove diagnostics, and determine errors
internally.
* src/crctab.c: Separate from cksum.h since that's now included
multiple times.
* src/digest.c: Provide cksum(1) functionality if -DHASH_ALGO_CKSUM
* src/local.mk: Adjust to new crctab.c and HASH_ALGO_CKSUM define.
2021-09-15 15:35:53 +01:00
Pádraig Brady
4af4d61d53 build: update gnulib submodule to latest
* gnulib: Update to latest. This fixes a gnulib test failure in base64,
among other fixes.
* cfg.mk: Disable sc_indent as auto indent is too invasive for now.
2021-09-09 21:35:03 +01:00
Jim Meyering
88562dc9c7 maint: avoid new syntax-check failure
find-mount-point.h rightly includes <stdlib.h> for its use
of _GL_ATTRIBUTE_DEALLOC_FREE, which uses free, yet that new
inclusion provoked a syntax-check failure. Exempt this header
file as we've done for others.
* cfg.mk (exclude_file_name_regexp--sc_system_h_headers):
Add find-mount-point.h to the regexp.
(sc_system_h_headers): Use grep -E, for a more readable regexp.
2021-08-25 08:45:39 -07:00
Pádraig Brady
ef772bf97f maint: use "char const *" rather than "const char *"
* cfg.mk (sc_prohibit-const-char): Add a new syntax-check to
enforce this style.
* *.[ch]: sed -i 's/const char \*/char const */g'
2021-04-11 18:33:45 +01:00
Pádraig Brady
32ff1d1313 maint: update all copyright year number ranges
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.
2021-01-01 16:36:09 +00:00
Paul Eggert
af941bc523 tests: simplify since expr now works on bignums
* cfg.mk (sc_prohibit_expr_unsigned): Remove.
* tests/dd/skip-seek-past-dev.sh (DEV_OFLOW):
* tests/id/setgid.sh (gp1):
* tests/misc/cut-huge-range.sh (CUT_MAX):
* tests/misc/expr.pl:
* tests/misc/sort-discrim.sh:
Assume expr works on bignums.
* tests/misc/cut-huge-range.sh (subtract_one):
Remove; no longer needed.
2020-07-08 08:11:57 -07:00
Bernhard Voelker
aefd434e56 maint: copy FDL from gnulib instead of using it as module
Since the previous gnulib update, bootstrap outputs this warning:

  Notice from module fdl:
    Don't use this module! Instead, copy the referenced license file \
    into your version control repository.

See gnulib commit:
  https://git.sv.gnu.org/cgit/gnulib.git/commit/?id=88fc5afbccc9

* bootstrap.conf (gnulib_modules): Remove 'fdl'.
* doc/fdl.texi: Add file as a copy of 'gnulib/doc/fdl.texi'.
* doc/.gitignore (/fdl.texi): Remove entry.
* cfg.mk (FILTER_LONG_LINES): Add pattern for the 'fdl.texi' file.
2020-05-25 16:31:08 +02:00
Bernhard Voelker
46e0ce5e5d maint: fix syntax-check failure from recent adjustment
* cfg.mk (old_NEWS_hash): Regenerate after commit v8.32-15-g6d0107a37
2020-05-23 03:53:59 +02:00
Pádraig Brady
da589f1d63 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2020-03-05 14:04:42 +00:00
Pádraig Brady
ea1c1b7515 tests: fix incorrect || fail pattern in tests
* tests/ls/stat-free-symlinks.sh: s/|| fail/|| fail=1/.
* tests/misc/tee.sh: Likewise.
* tests/touch/relative.sh: Likewise.
* cfg.mk (sc_prohibit_or_fail): A new syntax-check to avoid this.
2020-02-29 22:45:00 +00:00
Pádraig Brady
aaba82431c maint: update all copyright year number ranges
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.
2020-01-01 14:16:56 +00:00
Pádraig Brady
ec5ab42604 maint: fix syntax-check failure from recent adjustment
* cfg.mk (old_NEWS_hash): Regenerate after commit v8.31-56-gc1e1965.
2019-12-02 16:21:08 +00:00
Bernhard Voelker
a574029110 maint: fix error in syntax-check checking
The previous commit introduced a bug into the following syntax-check,
and thus effectively turned it off:

  $ make sc_prohibit_test_calls_print_ver_with_irrelevant_argument; \
      echo $?
  prohibit_test_calls_print_ver_with_irrelevant_argument
  fatal: cannot change to 'grep': No such file or directory
  0

* cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
Remove changing directory, and pass $(srcdir) as argument to 'git -C'.
2019-08-06 16:11:01 -07:00
Akim Demaille
0e2d4e1425 maint: fix issues in syntax-check
* cfg.mk (sc_prohibit_colon_redirection): Don't expect `|` to denote
the pipe character in git grep.
(sc_tests_executable)
(sc_case_insensitive_file_names)
(sc_some_programs_must_avoid_exit_failure)
(sc_prohibit_test_background_without_cleanup_)
(sc_prohibit_test_calls_print_ver_with_irrelevant_argument)
(sc_prohibit_test_ulimit_without_require_)
(sc_prohibit_test_background_without_cleanup_)
(sc_THANKS_in_duplicates)
*sc_prohibit_test_calls_print_ver_with_irrelevant_argument):
Don't expect builddir to be a descendant of srcdir.
(sc_strftime_check): Don't check file size against 0 when "N\nq\n" was
already put in the file.
* THANKS.in: Remove me.
2019-08-04 11:11:16 -07:00
Pádraig Brady
ab8c604765 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2019-03-10 17:08:36 -07:00
Pádraig Brady
ca80339454 maint: fix new syntax-check failure from recent change
* cfg.mk: Exclude cl-strtold.c wrapper from requiring config.h
2019-01-27 20:42:09 -08:00
Assaf Gordon
8dfcf38af1 maint: update all copyright year number ranges
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.
2019-01-01 16:51:48 -07:00
Pádraig Brady
351ac1256b tests: fix skipping in some tests
* tests/cp/cp-a-selinux.sh: Use 'skip_' rather than the probably
undefined 'skip'.
* tests/du/2g.sh: Likewise.
* tests/install/install-Z-selinux.sh: Likewise.
* tests/misc/chcon.sh: Likewise.
* tests/misc/selinux.sh: Likewise.
* tests/mkdir/restorecon.sh: Likewise.
* cfg.mk (sc_prohibit-skip): A new syntax check to catch the issue.
2018-07-04 17:48:41 -07:00
Pádraig Brady
83322567de maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2018-07-01 18:28:37 -07:00
Pádraig Brady
1755ffb7b6 maint: disable overly agressive sc_gitignore_redundant
* cfg.mk (sc_gitignore_redundant): Disabled for now as too
aggressive flagging entries like /lib/arg-nonnull.h in
a newly checked out repo.
2018-06-27 02:38:59 -07:00
Pádraig Brady
22424dde74 doc: retroactively adjust info about tail and closed output
* NEWS: Expand on the 8.28 description of how tail more
responsively reacts to closed output, and move from "Improvements"
to "Changed behavior".
* cfg.mk (old_NEWS_hash): Regenerate.
Fixes https://bugs.gnu.org/31225
2018-04-20 17:54:14 -07:00
Eric Blake
e6017741e9 doc: retroactively document -e/-u addition in NEWS
Prompted by https://bugs.gnu.org/31045

* NEWS: Update 8.8 blurb to mention other split additions.
* cfg.mk (old_NEWS_hash): Regenerate.
2018-04-05 21:38:51 -07:00
Pádraig Brady
ece7157933 maint: update all copyright year number ranges
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.
2018-01-01 15:57:22 +00:00
Pádraig Brady
1d7db19cba maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2017-12-27 18:26:39 +00:00
Pádraig Brady
a608f1e781 maint: fix new syntax-check failures from HTTPS adjustments
* cfg.mk [old_NEWS_hash]: update with `make update-NEWS-hash`.
[sc_long_lines]: Avoid flagging (long) URLs in NEWS.
* src/sort.c: Tweak to a shorter line.
* src/tail.c: Likewise.
Introduced in v8.28-4-gbe87d61
2017-09-19 22:32:00 -07:00
Paul Eggert
be87d61299 all: prefer HTTPS in URLs 2017-09-19 01:22:54 -07:00
Pádraig Brady
5d9d07bbb1 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2017-09-01 19:25:50 -07:00
Pádraig Brady
a5239412c1 maint: avoid syntax check failure with wrapped returns_
* cfg.mk (sc_prohibit_env_returns): Allow wrapped calls to
return_ of the form: `wrapper_ returns_ ...` which is needed
with the following commit.
2017-03-27 21:23:07 -07:00
Pádraig Brady
6b5d38d850 doc: rearrange a recent bug entry to an improvement in NEWS
* NEWS: The stat,tail change was an improvement, not a bug fix.
* cfg.mk [old_NEWS_hash]: update with `make update-NEWS-hash`.
2017-03-08 22:59:42 -08:00
Pádraig Brady
93509ff8b5 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2017-03-08 21:25:35 -08:00
Pádraig Brady
509152bdd4 doc: add NEWS for an improvement to dd in the last release
* NEWS: Mention the avoidance of the gotcha with specifying
a hex constant like count=0x1000 etc. as that previously
was silently interpreted as 0.
2017-02-22 20:54:17 -08:00
Eric Blake
83bfb98991 maint: fix recent syntax check failures
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-10 14:13:44 -06:00
Pádraig Brady
e7a2580b96 maint: update all copyright year number ranges
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.
2017-01-01 22:38:02 +00:00
Pádraig Brady
fbb337e1c3 maint: post-release administrivia
* NEWS: Add header line for next release.
* .prev-version: Record previous version.
* cfg.mk (old_NEWS_hash): Auto-update.
2016-11-30 18:35:39 +00:00
Bernhard Voelker
fb82445ea0 maint: fix 'syntax-check' targets for VPATH builds
* cfg.mk (sc_gitignore_missing): Add $(srcdir) to .gitignore filename.
(sc_gitignore_redundant): Likewise.
2016-11-23 12:17:03 +01:00
Pádraig Brady
055b08ff78 tests: fix false fails due to passing env vars to returns_
On BSD /bin/sh it was seen that unexported env vars passed to
returns_() would not be propagated to the wrapped command.

* cfg.mk (sc_prohibit_env_returns): Add a syntax check to disallow.
* tests/misc/csplit-io-err.sh: Rearrange to export vars in a subshell.
* tests/rm/rm-readdir-fail.sh: Likewise.
* tests/misc/nohup.sh: Export and unset vars around returns_.
* tests/misc/printenv.sh: Likewise.
Reported by Assaf Gordon
2016-11-22 20:04:25 +00:00
Pádraig Brady
ea94589e9e b2sum: a new checksum utility with md5sum like interface
Note we don't support the --algorithm option of the
b2sum command in the external BLAKE2 project, as that
was deemed too confusing for users.
"BLAKE2b" was chosen as the default algorithm to use,
which is single threaded but performs well on 64 bit.

* src/blake2: CC0 source copied from external project.
* cfg.mk[VC_LIST_ALWAYS_EXCLUDE_REGEX]: Exclude blake2/
from syntax checks, make update-copyright, etc.
* src/local.mk: Reference the sources for b2sum,
and set the compilation flags.
* doc/coreutils.texi (b2sum invocation): Reference the
md5sum invocation node, and add descriptions of -l.
* tests/misc/b2sum.sh: Add new test.
* tests/local.mk: Reference new test.
* AUTHORS: Add new binary.
* README: Likewise.
* build-aux/gen-lists-of-programs.sh: Likewise.
* man/.gitignore: Likewise.
* scripts/git-hooks/commit-msg: Likewise.
* man/b2sum.x: New man page template.
* man/local.mk: Reference new template.
* src/.gitignore: Ignore new binaries.
* src/blake2/.gitignore: Ignore new build atrifacts.
* src/md5sum.c (usage): Describe the new -l option.
* NEWS: Mention the new program.
2016-11-22 20:04:24 +00:00
Pádraig Brady
eba871cd32 all: reduce usage of proper_name_utf8()
This reduces a standard coreutils install size by about 160K.

* src/cat.c: Change to proper_name() which removes about 18K text.
* src/cp.c: Likewise.
* src/df.c: Likewise.
* src/du.c: Likewise.
* src/getlimits.c: Likewise.
* src/realpath.c: Likewise.
* src/split.c: Likewise.
* src/stdbuf.c: Likewise.
* src/timeout.c: Likewise.
* src/truncate.c: Likewise.
* src/local.mk: Remove -llibiconv from the above programs.
* cfg.mk (sc_check-AUTHORS): Adjust to use factor(1).
* AUTHORS: Adjust to use ASCII to satisfy sc_check-AUTHORS.
2016-11-14 00:34:39 +00:00
Bernhard Voelker
40122a96df maint: add 'returns_' to exclude list in sc_prohibit_and_fail_1
The previous commit v8.25-96-g22063c8 lets 'make syntax-check' fail,
because the above check falsely detects a case where 'returns_' is
already in use.

* cfg.mk (sc_prohibit_and_fail_1): Add 'returns_' to exclude list.
2016-11-13 18:16:32 +01:00
Pádraig Brady
30012b290f date: add %q to output the quarter of the year
* doc/coreutils.texi (date invocation): Document %q.
* src/date.c (usage): Likewise.
* tests/misc/date.pl: Add a test case.
* cfg.mk (sc_strftime_check): Adjust to allow %q.
* NEWS: Mention the new feature.
2016-11-07 17:09:15 +00:00
Pádraig Brady
492dcb2eb1 all: use die() rather than error(EXIT_FAILURE)
die() has the advantage of being apparent to the compiler
that it doesn't return, which will avoid warnings in some cases,
and possibly generate better code.
* cfg.mk (sc_die_EXIT_FAILURE): A new syntax check rule to
catch any new uses of error (CONSTANT, ...);
2016-10-16 12:23:55 +01:00
Jim Meyering
dad7ab0b7b build: add die.h; avoid new warnings from GCC 7
* src/die.h (die): New file/function from grep.
Note: we expect this file to migrate to gnulib.
* src/csplit.c: Include die.h.
(check_format_conv_type): Use die in place of error-nonzero;break;
* src/install.c (strip): Likewise.
* src/nl.c (proc_text): Likewise.  This also suppresses a new warning
from GCC 7's -Werror=strict-overflow.
* src/tail.c (parse_options): Likewise.
* src/basename.c (main): Adjust "fall through" comment
so that GCC 7's -Wimplicit-fallthrough honors it.
* src/cp.c (main): Add a "fall through" comment.
* src/ls.c (gobble_file): Likewise.
(get_funky_string): Adjust a "fall through" comment so it is
recognized.
* cfg.mk (exclude_file_name_regexp--sc_system_h_headers): Add die.h
to this list of exempt src/*.h files.
2016-10-15 08:41:42 -07:00
Jim Meyering
5e6911ccd6 maint: skip a check when en_US.UTF-8 collation rules are broken
* cfg.mk (sc_THANKS_in_sorted): This check would fail on systems
for which "." is not ignored.  Add a quick sort-based check for
that error, and skip the check on any broken system.
2016-07-27 09:31:03 -07:00