Age | Commit message (Collapse) | Author |
|
* src/local.mk (AM_CFLAGS): Don't use $(WARN_CFLAGS) here.
* cfg.mk (src_CFLAGS, lib_CFLAGS, gnulib-tests_CFLAGS): Define here
instead.
(AM_CFLAGS): Augment using the above.
* configure.ac: Note that the configure-time option,
--enable-gcc-warnings now functions only when using GNU make.
Well, currently it does still work in gnulib-tests, but that should
soon be fixed.
Improved-by: Stefano Lattarini
|
|
* build-aux/gen-lists-of-programs.sh: Improve comments.
|
|
But do retain full dependencies when building from a git clone.
We do this by converting the full dependency (of the .1 file on
the binary we run with --help) into a dependency on the .c file.
* Makefile.am (do-not-require-help2man): New rule.
(dist-hook): depend on it.
|
|
* man/local.mk (man/dir.1): Depend on src/dir, not src/ls.
|
|
Convert the few remaining coreutils-specific files in lib/ to
gnulib-style modules under gl/, removing their corresponding .m4
files, since the information recorded in those files is better
stored in module-description file in gl/modules/.
* bootstrap.conf (gnulib_modules): Add new modules:
fd-reopen, buffer-lcm, xfts, strnumcmp.
* gl/lib/buffer-lcm.c: Renamed from the file in lib/.
* gl/lib/buffer-lcm.h: Likewise.
* gl/lib/fd-reopen.c: Likewise.
* gl/lib/fd-reopen.h: Likewise.
* gl/lib/strintcmp.c: Likewise.
* gl/lib/strnumcmp-in.h: Likewise.
* gl/lib/strnumcmp.c: Likewise.
* gl/lib/strnumcmp.h: Likewise.
* gl/lib/xfts.c: Likewise.
* gl/lib/xfts.h: Likewise.
* gl/modules/buffer-lcm: New module-description file.
* gl/modules/fd-reopen: Likewise.
* gl/modules/strnumcmp: Likewise.
* gl/modules/xfts: Likewise.
* m4/fd-reopen.m4: Remove, no longer needed.
* m4/strnumcmp.m4: Likewise.
* m4/xfts.m4: Likewise.
* m4/prereq.m4: Do not AC_REQUIRE the m4 functions from
our just-removed m4/*.m4 files.
|
|
We can get the same effect using the modules file.
* gl/m4/root-dev-ino.m4: Remove file.
* gl/modules/root-dev-ino (Depends-on): Add lstat.
(Files): Remove m4/root-dev-ino.m4.
(Makefile.am) [lib_SOURCES]: Add root-dev-ino.c and root-dev-ino.h.
(configure.ac): Remove reference to gl_ROOT_DEV_INO.
|
|
* build-aux/git-log-fix: Add an entry to correct the Author:
of v8.19-111-g51a4b04. It should be Ondrej Oprala, not me.
|
|
* NEWS (Bug fixes): Mention it.
* tests/misc/factor.pl: Add five of Torbjörn's tests.
|
|
The multiple-precision factoring code (with HAVE_GMP) was copied from
a now-obsolete version of GMP that did not pass proper arguments to
the mpz_probab_prime_p function. It makes that code perform no more
than 3 Miller-Rabin tests only, which is not sufficient.
A Miller-Rabin test will detect composites with at least a probability
of 3/4. For a uniform random composite, the probability will actually
be much higher.
Or put another way, of the N-3 possible Miller-Rabin tests for checking
the composite N, there is no number N for which more than (N-3)/4 of the
tests will fail to detect the number as a composite. For most numbers N
the number of "false witnesses" will be much, much lower.
Problem numbers are of the form N=pq, p,q prime and (p-1)/(q-1) = s,
where s is a small integer. (There are other problem forms too,
involving 3 or more prime factors.) When s = 2, we get the 3/4 factor.
It is easy to find numbers of that form that cause coreutils' factor to
fail:
465658903
2242724851
6635692801
17709149503
17754345703
20889169003
42743470771
54890944111
72047131003
85862644003
98275842811
114654168091
117225546301
...
There are 9008992 composites of the form with s=2 below 2^64. With 3
Miller-Rabin tests, one would expect about 9008992/64 = 140766 to be
invalidly recognized as primes in that range.
* src/factor.c (MR_REPS): Define to 25.
(factor_using_pollard_rho): Use MR_REPS, not 3.
(print_factors_multi): Likewise.
* THANKS.in: Remove my name, now that it will be automatically
included in the generated THANKS file.
|
|
* init.cfg (setuidgid_has_perm_): New function.
(require_root_): Use it.
Improved-by: Bernhard Voelker
* NEWS (Build-related): Mention the improvement.
|
|
Anyone developing on coreutils can be assumed to have a new enough
environment, such that enabling gcc warnings by default will be
useful. Tarballs still default to no warnings, and the defaults
can still be overridden with --disable-gcc-warnings.
* configure.ac (gl_gcc_warnings): Set default based on environment.
Suggested by Bernhard Voelker.
|
|
* src/nproc.c (main): Error if any non option parameters.
* NEWS: Mention the change in behavior.
|
|
* src/stat.c (human_fstype): Add a case: vzfs, 0x565A4653 (local).
Reported by Jens Rosenboom in http://bugs.gnu.org/12356
* NEWS (Improvement): Mention it.
|
|
* src/remove.c (excise): Tighten the test for when we defer to an
old errno value: instead of relying solely on an FTS_DNR (unreadable
directory) failure, also test current and replacement errno values.
This change would also have solved the problem addressed by commit
v8.19-106-g57dd067. For more info, see http://bugs.gnu.org/12339#113
|
|
These commands would evoke an invalid diagnostic:
$ mkdir d && ln -s d s && env rm -r s/
rm: cannot remove 's': Too many levels of symbolic links
remove.c was stripping trailing slashes from "s/" before passing
the name to "rm". But a trailing slash may change the semantics,
and thus should not be stripped.
* src/remove.c (rm_fts): Do not strip trailing slashes.
* tests/rm/v-slash.sh: Adapt to new expected output.
* gnulib: Update to latest, for an improved fts.c that merely
normalizes trailing slashes.
Reported by Paul Eggert in discussion of http://bugs.gnu.org/12339
|
|
* tests/local.mk ($(TEST_LOGS)): Depend on $(PROGRAMS), so that
tests are rerun when any program is rebuilt. Technically, we could
specify precisely which few programs are dependents of each test,
but that can come later, if deemed worth the trouble and maintenance
burden. Also, there is the issue of the primary program(s) being
tested (i.e., those itemized via print_ver_) versus those that are
tested incidentally: for example, nearly every test exercises "rm"
when its clean-up code removes files.
|
|
* cfg.mk (exclude_file_name_regexp--sc_file_system): Exempt
'init.cfg', not 'tests/init.cfg'.
|
|
* tests/init.cfg (stty_reversible_init_): Quote '$abs_top_srcdir'
properly.
(fiemap_capable_): Quote '$abs_srcdir' properly.
(require_dirent_d_type_): Likewise.
|
|
* cfg.mk: Don't work by trying to parse the (now gone) file
'tests/Makefile.am'; rather, use the contents of the make variable,
$(all_root_tests), introduced few commits ago.
Fix a few unrelated cosmetic issues while at it.
|
|
* cfg.mk (exclude_file_name_regexp--sc_prohibit_test_backticks): Exempt
'tests/local.mk' rather than 'tests/Makefile.am'.
|
|
Because it requires the presence of the '.git' directory, that is,
can be run only for maintainers working from checked-out sources.
* tests/local.mk (vc_exe_in_TESTS): Rename and move ...
* cfg.mk (sc_tests_list_consistency): ... here, with minor adjustments.
|
|
* src/local.mk (built_programs.list, all_programs.list): These.
|
|
* tests/local.mk (TEST_SUITE_LOGS): Define to 'tests/test-suite.log'.
|
|
* Makefile.am (SUBDIRS): Remove 'tests'.
(include): The '$(top_srcdir)/tests/local.mk' file.
(check-root): Remove this convenience target, it's no longer needed
now that the "real" check-root target once in 'tests/Makefile' will
land in the top-level makefile.
* configure.ac (AC_CONFIG_FILES): Remove 'tests/Makefile'.
* tests/Makefile.am: Rename ...
* tests/local.mk: ... like this, with a lot of adjustments.
* tests/init.cfg: Move ...
* init.cfg: ... here. This is necessary, for a limitation of the
gnulib-provided 'tests/init.sh', which unconditionally look for
'init.cfg' in the $(srcdir) directory.
* tests/*/*.sh: Adjust: expect init.sh to be in '$srcdir/tests',
not in '$srcdir', and extend $PATH with './src', not with '../src'.
* tests/Coreutils.pm: Adjust similarly.
* tests/pr/pr-tests.pl ($pfx): Likewise.
|
|
This is just a preparatory refactoring in view of future changes.
* configure.ac (AC_SUBST): New 'built_programs'.
* tests/Makefile.am (AM_TESTS_ENVIRONMENT): Simply define the exported
variable 'built_programs' to the expansion of the '$(built_programs)'
AC_SUBST'd make variable.
(.built-programs): Remove this now-unneeded convenience target.
(CLEANFILES, check_DATA): Delete, no longer needed.
|
|
* cfg.mk (sc_no_exec_perl_coreutils): This. Our new testsuite
layout (perl tests having '.pl' suffix, shell tests having '.sh'
suffix) makes it basically impossible to run into the issue this
check guarded against.
|
|
* cfg.mk: Here.
|
|
* tests/Makefile.am (root-hint): Here. The interested user can see
the reasons why some tests are skipped by looking at the messages
they display on the console; here's an excerpt:
...
PASS: misc/id-groups.sh
id-setgid.sh: skipped test: must be run as root
SKIP: misc/id-setgid.sh
PASS: misc/md5sum.pl
...
PASS: df/total-verify.sh
2g.sh: skipped test: very expensive: disabled by default
SKIP: du/2g.sh
...
Clear enough, and more specific and precise that a generic "some tests
might need to be run as root" message. And if that user is interested
in making those tests run anyway, he'll just take a look to the README
files to look for info. So there's no reason to pollute the stdout
with another "hint" that is subsumed by those messages, and that might
go unnoticed anyway.
Moreover, and possibly more importantly, that hint wasn't being
displayed anyway, even before this change! That's because the
'root-hint' target was listed as prerequisite for the 'check-recursive'
target, which however was not a dependency of the 'check' target in
'tests/Makefile.am', because that file contains no $(SUBDIRS)
definition.
|
|
* tests/Makefile.am (vc_exe_in_TESTS): Adjust to look, in the 'tests/'
subdirectory, for files that have one of the extensions listed in
$(TEST_EXTENSIONS), rather than for executable files.
|
|
* tests/Makefile.am (vc_exe_in_TESTS): It is easy to adjust this
recipe to also work in VPATH setups, also thanks to modifications
done by previous changes.
|
|
* tests/Makefile.am (vc_exe_in_TESTS): No need to depend on Makefile:
this target is .PHONY, so it is always run anyway.
|
|
* tests/Makefile.am (TESTS): Rename ...
(all_tests): ... like this, so that we'll still be able to know the
complete list of our tests even if the user overrides TESTS from the
command line (which he's allowed to do by the test harness API).
(root_tests): Rename ...
(all_root_tests): ... like this, for similar reasons.
(TESTS, root_tests): Redefine their defaults to to $(all_tests) and
$(all_root_tests) respectively.
(vc_exe_in_TESTS): It can now safely use $(all_tests) to get the
complete list of test cases according to the Makefile, instead of
having to resort to "parsing" of Makefile.am.
(EXTRA_DIST): Use $(all_tests), not $(TESTS).
(v_, w_): Delete, no longer needed.
|
|
* tests/Makefile.am (check-local): Here, by making this depend
on 'vc_exe_in_TESTS' ...
(check): ... rather than making this depend on them. While the old
usage worked, it relied on an implementation detail rather than on
documented behavior.
* src/local.mk (check-local): Similarly, make this depend on
'check-README' and 'check-duplicate-no-install' ...
(check): ... rather than on this.
|
|
* scripts/autotools-install: Honor $MAKE. This might be useful
on systems where the make implementation available in $PATH
by default is limited (Solaris) or broken (HP-UX).
|
|
* scripts/autotools-install: Here.
|
|
* src/touch.c (usage): Indent --time=... to line up with all of the
other long options.
|
|
It would still pass, but would print many diagnostics like this:
Can't open src/Makefile.am: No such file or directory.
* cfg.mk (local-checks-to-skip): Temporarily disable a test.
This test will need to be adapted to work with a non-recursive
build set-up, in which there is no Makefile.am alongside each program.
Reported by Bernhard Voelker.
|
|
* configure.ac: Disable a new gcc warning, -Wsuggest-attribute=format,
since it triggers on copy.c (which I'm not inclined to adjust) and
factor.c's use of vfprintf which would appear to require a change
to stdio.h.
|
|
* dist-check.mk (built_programs): There's no need to issue recursive
make calls in 'src/' to define this (in fact, that works no longer
now that 'src/Makefile.am' is gone). Simply define this to the sorted
contents of $(bin_PROGRAMS), with the 'src/' prefix and the $(EXEEXT)
suffix (if any) removed. Reported by Jim Meyering.
|
|
* man/local.mk: With commit v8.19-84-g08cf455, man page creation
would fail when using a build directory name containing e.g.,
spaces.
|
|
* man/local.mk: Creating a prog.1 man page requires running
src/prog --help.
List the exceptions, e.g., install.1 depends on src/ginstall
and arch.1 depends on src/uname.
|
|
* cfg.mk (check-programs-vs-x): The new variable,
$(all-progs-but-lbracket) contains libstdbuf.so, and it does
not have a corresponding .x file, so exempt it.
|
|
* man/local.mk (distclean-local): Remove $(ALL_MANS) when doing
a VPATH build. If it's not done, generated manpages can be left
around in the build directory after a "make distclean", causing
failures in "make distcheck".
|
|
* man/local.mk (.x.1): Use '$(MKDIR_P)' rather than bare 'mkdir'
where appropriate. Reported by Jim Meyering.
|
|
* src/local.mk (AM_CPPFLAGS): Add 'src' to the directories that
are searched for #include'd files.
|
|
* configure.ac: No need to use 'gl_ADD_PROG' and an indirection
variable '$optional_pkglib_progs' to declare the 'libstdbuf.so'
"libexec" program; the decision to whether compile that program
is not up to the user, but it only and simply depends on whether
the 'stdbuf' "bin" program is to be built or not.
|
|
* man/local.mk (mandpep): Rename ...
(mandeps): ... like this. Make $(ALL_MANS) depend on its
content. List 'src/system.h' in here, instead of making
$(ALL_MANS) depend on it explicitly.
(man/*.1): No need to list $(mandep) among the dependencies
any longer.
|
|
* man/local.mk: All of the manpages should depend on 'src/system.h',
and all of them should be cleaned by "make maintainer-clean", that
is, added to MAINTAINERCLEANFILES. Make it be so.
Some minor cosmetic tweakings and reorderings while at it.
|
|
* configure.ac: Adjust and improve few comments.
(MAN): Rename ...
(man1_MANS): ... to this.
Ensure it isn't initialized in all Makefiles (which would lead
to spurious errors), by calling AM_SUBST_NOTMAKE on it.
Also call AM_SUBST_NOTMAKE on 'EXTRA_MANS', for consistency.
* man/local.mk (man1_MANS): Simply define to '@man1_MANS@'.
|
|
And list $(man1_MANS) directly in $(EXTRA_DIST) instead.
This is similar to what is done for $(EXTRA_MANS), thus
improving consistency and readability.
* man/local.mk (dist_man1_MANS): Rename ...
(man1_MANS): ... like this.
(EXTRA_DIST): Add its contents.
* cfg.mk (check-x-vs-1): Fix a botched comment.
|