summaryrefslogtreecommitdiff
path: root/build-aux/gen-lists-of-programs.sh
AgeCommit message (Collapse)Author
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
2016-11-22b2sum: a new checksum utility with md5sum like interfacePádraig Brady
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.
2015-09-03base32: A new program similar to base64Pádraig Brady
Suggested in https://bugzilla.redhat.com/1250113 * AUTHORS: Add base32. * THANKS.in: Add suggester. * README: Reference the new program. * NEWS: Mention the new program. * src/.gitignore: Ignore the new binary. * bootstrap.conf: Reference the gnulib base32 module. * build-aux/gen-lists-of-programs.sh: Add base32. * man/base32.x: A new template. * man/.gitignore: Ignore the new man page. * man/local.mk: Reference the new man page. * doc/coreutils.texi (base32 invocation): Document the new command. * src/local.mk: Adjust to build base32 based on base64.c. * src/base64.c: Parameterize to use the correct headers, functions and buffer sizes, depending on which binary is being built. * tests/misc/base64.pl: Adjust to test both base32 and base64. * tests/misc/tty-eof.pl: Add base32 as a program that accepts input on stdin without any options specified. * scripts/git-hooks/commit-msg: Add base32 to the template.
2014-07-13build: support building all tools in a single binaryAlex Deymo
Add the --enable-single-binary option to the configure file. When enabled, this option builds a single binary file containing the selected tools. Which tool gets executed depends on the value of argv[0] which can be set implicitly through symlinks to the single program. This setup reduces significantly the size of a complete coreutils install, since code from lib/libcoreutils.a is not duplicated in every one of the more than 100 binaries. Runtime overhead is increased due to more dynamic libraries being loaded, and extra initialization being performed for all utils. Also initially a larger binary is loaded from storage, though this is usually alleviated due to caching and lazy mmaping of unused blocks, and in fact the single binary should have better caching characteristics. Comparing the size of the individual versus single binary on x86_64: $ cd src $ size coreutils $ size -t $(../build-aux/gen-lists-of-programs.sh --list-progs | grep -Ev '(coreutils|libstdbuf)') | tail -n1 text data bss dec hex filename 1097416 5388 88432 1191236 122d44 src/coreutils 4901010 124964 163768 5189742 4f306e (TOTALS) Storage requirements are reduced similarly: $ cd src $ du -h coreutils $ du -ch $(../build-aux/gen-lists-of-programs.sh --list-progs | grep -Ev '(coreutils|libstdbuf)') | tail -n1 1.2M coreutils 5.3M total When installing, the makefile will create either symlinks or shebangs based on the --enable-single-binary setting, for each configured tool. In this way, all the tools are still callable individually, but they are all implemented by the same "coreutils" binary installed on the same directory. * .gitignore: Add new generated files. * Makefile.am: New rules to generate build-aux/gen-single-binary.sh and install symlinks. * NEWS: Mention the new feature. * README: Add "coreutils" to the list of utils. * bootstrap.conf: Regenerate src/single-binary.mk * build-aux/gen-lists-of-programs.sh: New --list-progs option. * build-aux/gen-single-binary.sh: Regenerate * configure.ac: New --enable-single-binary option and other variables. Disallow --enable-single-binary=symlinks with --program-prefix et. al. * man/coreutils.x: Manpage hook. * man/local.mk: Add manpage hook and fix dependencies. * src/coreutils.c: Multicall implementation. * src/local.mk: New rules for the single binary option. * tests/local.mk: Add $single_binary_progs to support require_built_() from init.cfg * tests/misc/env.sh: Avoid the use of symlink to echo. * tests/misc/help-version.sh: Add exception for coreutils. * tests/install/basic-1.sh: Really avoid using ginstall strip functionality if there is an issue with the independent strip command. * src/kill.c: Changes to call exit() in main. * src/readlink.c: Likewise. * src/shuf.c: Likewise. * src/timeout.c: Likewise. * src/truncate.c: Likewise.
2013-02-04numfmt: a new command to format numbersAssaf Gordon
* AUTHORS: Add my name. * NEWS: Mention the new program. * README: Reference the new program. * src/numfmt.c: New file. * src/.gitignore: Ignore the new binary. * build-aux/gen-lists-of-programs.sh: Update. * scripts/git-hooks/commit-msg: Allow numfmt: commit prefix. * po/POTFILES.in: Add new c file. * tests/misc/numfmt.pl: A new test file giving >93% coverage. * tests/local.mk: Reference the new test. * man/.gitignore: Ignore the new man page. * man/local.mk: Reference the new man page. * man/numfmt.x: A new template. * doc/coreutils.texi: Document the new command.
2012-09-11maint: gen-lists-of-programs.sh: fix typo from previous comment editBernhard Voelker
* build-aux/gen-lists-of-programs.sh: Fix comment typo.
2012-09-10maint: gen-lists-of-programs.sh: improve commentsJim Meyering
* build-aux/gen-lists-of-programs.sh: Improve comments.
2012-09-01maint: fix one stray reference to src/Makefile.amStefano Lattarini
* build-aux/gen-lists-of-programs.sh: In heading comments here.
2012-09-01build: don't use recursive make to build the 'src' subdirectoryStefano Lattarini
* Makefile.am (SUBDIRS): Remove 'src'. Ensure '.' is listed before 'tests' and 'gnulib-tests'. (dist-hook): Adjust: we must now tweak the top-level Makefile.in in $(distdir), not the one in the 'src/' subdir (which is gone). (include): The '$(top_srcdir)/src/local.mk' file. * build-aux/gen-lists-of-programs.sh: Adjust the generation of the automake input fragment. * tests/Makefile.am (.built-programs): Adjust. * cfg.mk (all_programs): Remove this convenience rule; it's no longer needed, now that we can rely directly on the contents of $(all_programs). (sc_option_desc_uppercase, check-programs-vs-x:): Adjust lists of prerequisites accordingly. (all-progs-but-lbracket): Simplify definition accordingly. * configure.ac ($OPTIONAL_BIN_PROGS): Adjust definition. ($OPTIONAL_PKGLIB_PROGS): Likewise. ($NO_INSTALL_PROGS_DEFAULT): Tweak definition, for consistency. (AC_CONFIG_FILES): Remove 'src/Makefile'. * src/Makefile.am: Rename ... * src/local.mk: ... like this, with a lot of adjustments. In addition ... (all_programs): ... remove this now-unneeded convenience target.
2012-09-01build: refactor how lists of coreutils programs are definedStefano Lattarini
This is in preparation of future changes. Still, this patch leaves the build system in a better shape; true, with more indirections, but also with less convoluted and brittle hacks. Unfortunately, this commit also makes some rebuild rules incomplete; that will son be fixed by follow-up patches. * build-aux/gen-lists-of-programs.sh: New, generates autoconf and automake input fragments that define "lists" of all coreutils programs, with further distinctions about how and when these programs should be built (by default; if the system is capable enough; only if the user asks for them explicitly). This is useful to avoid duplicating the definitions of these lists among several files (at least 'configure.ac' 'src/Makefile.am'); such duplication had proved a source of inconsistencies and bugs in the past. And the pre-existing way to avoid such duplication, as implemented in 'configure.ac' before this patch, was overly complex and brittle. * Makefile.am (EXTRA_DIST): Distribute the new script. * bootstrap.conf (bootstrap_post_import_hook): Run the new script to generate 'm4/cu-progs.m4' and 'src/cu-progs.mk'. * .gitignore: Ignore those files. * configure.ac: Include 'm4/cu-progs.m4', and decidedly simplify most of the program lists definition and processing accordingly. * src/Makefile.am: Similarly include 'src/cu-progs.mk', containing definition of variables $(default__progs), $(no_install__progs) and $(build_if_possible__progs). Accordingly ... (no_install__progs, build_if_possible__progs): ... remove. (EXTRA_DIST): Adjust definition. Adjust a comment.