Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- .gitattributes +11 -35
- .github/ISSUE_TEMPLATE.txt +85 -0
- .github/PULL_REQUEST_TEMPLATE.txt +105 -0
- .gitignore +223 -0
- .gitmodules +3 -0
- .mailmap +45 -0
- .prev-version +1 -0
- .vg-suppressions +100 -0
- .x-update-copyright +6 -0
- AUTHORS +115 -0
- COPYING +674 -0
- HACKING +626 -0
- Makefile.am +214 -0
- NEWS +0 -0
- README +141 -0
- README-hacking +118 -0
- README-install +111 -0
- README-package-renamed-to-coreutils +13 -0
- README-prereq +41 -0
- README-release +145 -0
- README-valgrind +58 -0
- THANKS.in +681 -0
- THANKStt.in +4 -0
- TODO +155 -0
- bootstrap +1630 -0
- bootstrap.conf +460 -0
- build-aux/gen-lists-of-programs.sh +196 -0
- build-aux/gen-single-binary.sh +119 -0
- build-aux/git-log-fix +3 -0
- cfg.mk +1002 -0
- configure.ac +905 -0
- default.profraw +0 -0
- dist-check.mk +133 -0
- doc/.dirstamp +0 -0
- doc/.gitignore +26 -0
- doc/constants.texi +2 -0
- doc/coreutils.info +0 -0
- doc/coreutils.texi +0 -0
- doc/fdl.texi +505 -0
- doc/local.mk +133 -0
- doc/perm.texi +641 -0
- doc/sort-version.texi +909 -0
- doc/stamp-vti +4 -0
- doc/version.texi +4 -0
- gl/lib/buffer-lcm.c +59 -0
- gl/lib/buffer-lcm.h +2 -0
- gl/lib/cl-strtod.c +76 -0
- gl/lib/cl-strtod.h +4 -0
- gl/lib/cl-strtold.c +2 -0
- gl/lib/dtimespec-bound.c +3 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,11 @@
|
|
| 1 |
-
*.
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
*.texi* diff=texinfo
|
| 2 |
+
|
| 3 |
+
# Put something like the following e.g., in your ~/.gitconfig file
|
| 4 |
+
# # Include proper "function name" string in diffs of texinfo.
|
| 5 |
+
# # Derived from the regexp in emacs' lisp/add-log.el.
|
| 6 |
+
# [diff "texinfo"]
|
| 7 |
+
# funcname = "^@node[ \t][ \t]*\\([^,][^,]*\\)"
|
| 8 |
+
|
| 9 |
+
gl/lib/*.diff -whitespace
|
| 10 |
+
src/b2sum filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
src/cat.bc filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.github/ISSUE_TEMPLATE.txt
ADDED
|
@@ -0,0 +1,85 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Please **do not** send pull-requests or open new issues on Github.
|
| 2 |
+
|
| 3 |
+
Github is a downstream mirror and is not frequently monitored,
|
| 4 |
+
all development is coordinated upstream on GNU resources.
|
| 5 |
+
|
| 6 |
+
* Send general questions or suggestions to: coreutils@gnu.org .
|
| 7 |
+
* Send bugs reports to: bug-coreutils@gnu.org .
|
| 8 |
+
|
| 9 |
+
## Bug reports
|
| 10 |
+
|
| 11 |
+
Before reporting a new bug, please check the following resources:
|
| 12 |
+
|
| 13 |
+
* Coreutils FAQ: https://www.gnu.org/software/coreutils/faq/coreutils-faq.html
|
| 14 |
+
|
| 15 |
+
* Coreutils Gotchas: https://www.pixelbeat.org/docs/coreutils-gotchas.html
|
| 16 |
+
contains a list of some quirks and unexpected behavior (which are often
|
| 17 |
+
mistaken for bugs).
|
| 18 |
+
|
| 19 |
+
* Online Manual:
|
| 20 |
+
https://www.gnu.org/software/coreutils/manual/html_node/index.html
|
| 21 |
+
|
| 22 |
+
* Search the archives for previous questions and answers:
|
| 23 |
+
|
| 24 |
+
* Coreutils Mailing list (General usage and advice):
|
| 25 |
+
https://lists.gnu.org/archive/html/coreutils/
|
| 26 |
+
|
| 27 |
+
* Bug reports Mailing List:
|
| 28 |
+
https://lists.gnu.org/archive/html/bug-coreutils/
|
| 29 |
+
|
| 30 |
+
* Open Bugs:
|
| 31 |
+
https://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=coreutils
|
| 32 |
+
|
| 33 |
+
* Translation related issues:
|
| 34 |
+
https://translationproject.org/domain/coreutils.html
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
## Effective bug reports
|
| 38 |
+
|
| 39 |
+
* Include a descriptive subject line (e.g. the program with which
|
| 40 |
+
you experience a problem, and what the problem is).
|
| 41 |
+
* Include the version of the program (e.g. the output of `PROG --version`).
|
| 42 |
+
* Include the operating system and the type of hardware you are using
|
| 43 |
+
(e.g. the output of `uname -a`).
|
| 44 |
+
* Include the exact command and parameters you have used.
|
| 45 |
+
* Clearly explain what is the output you expected to get, and what is
|
| 46 |
+
the actual result you encountered.
|
| 47 |
+
* Include as much information as possible to reproduce the problem.
|
| 48 |
+
If the problem happens on a very large input file, try to provide
|
| 49 |
+
a minimal example (a subset of the input file) that still causes the problem.
|
| 50 |
+
*Do not* include attachments over 40kB.
|
| 51 |
+
* List policy is reply-to-all, and non-subscribers may post.
|
| 52 |
+
* There may be a moderation delay for a first-time post, whether or not
|
| 53 |
+
you subscribe.
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
## Mailing List Etiquette
|
| 57 |
+
|
| 58 |
+
When sending messages to coreutils@gnu.org or bug-coreutils@gnu.org :
|
| 59 |
+
|
| 60 |
+
* Send messages as plain text.
|
| 61 |
+
* Do not send messages encoded as HTML nor encoded as base64 MIME nor
|
| 62 |
+
included as multiple formats.
|
| 63 |
+
* Avoid sending large messages, such as log files, system call trace
|
| 64 |
+
output, and other content resulting in messages over about 40 kB.
|
| 65 |
+
* Avoid sending screenshots (e.g. PNG files). When reporting errors
|
| 66 |
+
you encounter on the terminal, copy and paste the text to your message.
|
| 67 |
+
|
| 68 |
+
|
| 69 |
+
|
| 70 |
+
<!--
|
| 71 |
+
Copyright (C) 2017-2025 Free Software Foundation, Inc.
|
| 72 |
+
|
| 73 |
+
This program is free software: you can redistribute it and/or modify
|
| 74 |
+
it under the terms of the GNU General Public License as published by
|
| 75 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 76 |
+
(at your option) any later version.
|
| 77 |
+
|
| 78 |
+
This program is distributed in the hope that it will be useful,
|
| 79 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 80 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 81 |
+
GNU General Public License for more details.
|
| 82 |
+
|
| 83 |
+
You should have received a copy of the GNU General Public License
|
| 84 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 85 |
+
-->
|
.github/PULL_REQUEST_TEMPLATE.txt
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Please *do not* send pull-requests or open new issues on Github.
|
| 2 |
+
See "hacking resources" below for recommended alternatives.
|
| 3 |
+
|
| 4 |
+
Github is a downstream mirror and is not frequently monitored,
|
| 5 |
+
all development is coordinated upstream on GNU resources.
|
| 6 |
+
|
| 7 |
+
* Send general questions or suggestions to: coreutils@gnu.org .
|
| 8 |
+
* Send bugs reports to: <bug-coreutils@gnu.org>
|
| 9 |
+
|
| 10 |
+
Before sending the bug, please consult the FAQ and Mailing list
|
| 11 |
+
archives (see below). Often these perceived bugs are simply due to
|
| 12 |
+
wrong program usage.
|
| 13 |
+
|
| 14 |
+
Please remember that development of Coreutils is a volunteer effort,
|
| 15 |
+
and you can also contribute to its development. For information about
|
| 16 |
+
contributing to the GNU Project, please read
|
| 17 |
+
[How to help GNU](https://www.gnu.org/help/].
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
## Getting Help
|
| 21 |
+
|
| 22 |
+
* Coreutils FAQ: https://www.gnu.org/software/coreutils/faq/coreutils-faq.html
|
| 23 |
+
|
| 24 |
+
* Coreutils Gotchas: https://www.pixelbeat.org/docs/coreutils-gotchas.html
|
| 25 |
+
contains a list of some quirks and unexpected behavior (which are often
|
| 26 |
+
mistaken for bugs).
|
| 27 |
+
|
| 28 |
+
* Online Manual:
|
| 29 |
+
https://www.gnu.org/software/coreutils/manual/html_node/index.html
|
| 30 |
+
|
| 31 |
+
* Search the archives for previous questions and answers:
|
| 32 |
+
|
| 33 |
+
* Coreutils Mailing list (General usage and advice):
|
| 34 |
+
https://lists.gnu.org/archive/html/coreutils/
|
| 35 |
+
|
| 36 |
+
* Bug reports Mailing List:
|
| 37 |
+
https://lists.gnu.org/archive/html/bug-coreutils/
|
| 38 |
+
|
| 39 |
+
* Open Bugs: https://debbugs.gnu.org/cgi/pkgreport.cgi?which=pkg&data=coreutils
|
| 40 |
+
|
| 41 |
+
* Translation related issues:
|
| 42 |
+
https://translationproject.org/domain/coreutils.html
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
## Mailing List Etiquette
|
| 46 |
+
|
| 47 |
+
When sending messages to coreutils@gnu.org or bug-coreutils@gnu.org :
|
| 48 |
+
|
| 49 |
+
* Send messages as plain text.
|
| 50 |
+
* Do not send messages encoded as HTML nor encoded as base64 MIME nor
|
| 51 |
+
included as multiple formats.
|
| 52 |
+
* Include a descriptive subject line.
|
| 53 |
+
* Avoid sending large messages, such as log files, system call trace
|
| 54 |
+
output, and other content resulting in messages over about 40 kB.
|
| 55 |
+
* Avoid sending screenshots (e.g. PNG files). When reporting errors
|
| 56 |
+
you encounter on the terminal, copy and paste the text to your message.
|
| 57 |
+
* List policy is reply-to-all, and non-subscribers may post.
|
| 58 |
+
* There may be a moderation delay for a first-time post, whether or not
|
| 59 |
+
you subscribe.
|
| 60 |
+
|
| 61 |
+
|
| 62 |
+
## Hacking resources
|
| 63 |
+
|
| 64 |
+
files contain information about hacking and contributing to GNU coreutils:
|
| 65 |
+
https://git.savannah.gnu.org/cgit/coreutils.git/tree/HACKING
|
| 66 |
+
https://git.savannah.gnu.org/cgit/coreutils.git/tree/README-hacking
|
| 67 |
+
Please read them first.
|
| 68 |
+
|
| 69 |
+
Before suggesting a new feature, read the list of rejected features requests:
|
| 70 |
+
https://www.gnu.org/software/coreutils/rejected_requests.html
|
| 71 |
+
|
| 72 |
+
Send a patch as an email attachment. Patches can be generated with
|
| 73 |
+
`git format-patch` (the HACKING links above provide examples of generating
|
| 74 |
+
a patch).
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
## Copyright Assignment
|
| 78 |
+
|
| 79 |
+
If your change is significant (i.e., if it adds more than ~10 lines),
|
| 80 |
+
then you'll have to have a copyright assignment on file with the FSF.
|
| 81 |
+
To learn more see https://www.gnu.org/licenses/why-assign.html .
|
| 82 |
+
|
| 83 |
+
The HACKING file (above) contains more details about how to initial
|
| 84 |
+
the copyright assignment process. Coreutils maintainers can also help
|
| 85 |
+
in this matter.
|
| 86 |
+
|
| 87 |
+
|
| 88 |
+
|
| 89 |
+
|
| 90 |
+
<!--
|
| 91 |
+
Copyright (C) 2017-2025 Free Software Foundation, Inc.
|
| 92 |
+
|
| 93 |
+
This program is free software: you can redistribute it and/or modify
|
| 94 |
+
it under the terms of the GNU General Public License as published by
|
| 95 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 96 |
+
(at your option) any later version.
|
| 97 |
+
|
| 98 |
+
This program is distributed in the hope that it will be useful,
|
| 99 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 100 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 101 |
+
GNU General Public License for more details.
|
| 102 |
+
|
| 103 |
+
You should have received a copy of the GNU General Public License
|
| 104 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 105 |
+
-->
|
.gitignore
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.I[12]
|
| 2 |
+
*.[EIOXao]
|
| 3 |
+
*.bak
|
| 4 |
+
*.gcda
|
| 5 |
+
*.gcno
|
| 6 |
+
*~
|
| 7 |
+
._bootmp
|
| 8 |
+
.deps
|
| 9 |
+
.gdb-history
|
| 10 |
+
.kludge-stamp
|
| 11 |
+
.version
|
| 12 |
+
/*.patch
|
| 13 |
+
/.Tpo
|
| 14 |
+
/.am*
|
| 15 |
+
/.re-list
|
| 16 |
+
/.sc-start-*
|
| 17 |
+
/ABOUT-NLS
|
| 18 |
+
/ChangeLog
|
| 19 |
+
/GNUmakefile
|
| 20 |
+
/INSTALL
|
| 21 |
+
/THANKS-to-translators
|
| 22 |
+
/aclocal.m4
|
| 23 |
+
/autom4te.cache
|
| 24 |
+
/build-aux/.gitignore
|
| 25 |
+
/build-aux/ar-lib
|
| 26 |
+
/build-aux/compile
|
| 27 |
+
/build-aux/config.guess
|
| 28 |
+
/build-aux/config.rpath
|
| 29 |
+
/build-aux/config.sub
|
| 30 |
+
/build-aux/depcomp
|
| 31 |
+
/build-aux/install-sh
|
| 32 |
+
/build-aux/mdate-sh
|
| 33 |
+
/build-aux/missing
|
| 34 |
+
/build-aux/snippet/
|
| 35 |
+
/build-aux/test-driver
|
| 36 |
+
/build-aux/texinfo.tex
|
| 37 |
+
/build-aux/ylwrap
|
| 38 |
+
/confdefs*
|
| 39 |
+
/config.cache
|
| 40 |
+
/config.log
|
| 41 |
+
/config.status
|
| 42 |
+
/configure
|
| 43 |
+
/conftest*
|
| 44 |
+
/coreutils-*.tar.gz
|
| 45 |
+
/coreutils-*.tar.gz.sig
|
| 46 |
+
/coreutils-*.tar.xz
|
| 47 |
+
/coreutils-*.tar.xz.sig
|
| 48 |
+
/doc/coverage
|
| 49 |
+
/doc/manual
|
| 50 |
+
/gnulib-tests
|
| 51 |
+
/lib/.dirstamp
|
| 52 |
+
/lib/.gitignore
|
| 53 |
+
/lib/alloca.h
|
| 54 |
+
/lib/arg-nonnull.h
|
| 55 |
+
/lib/arpa/inet.h
|
| 56 |
+
/lib/assert.h
|
| 57 |
+
/lib/byteswap.h
|
| 58 |
+
/lib/c++defs.h
|
| 59 |
+
/lib/charset.alias
|
| 60 |
+
/lib/config.h
|
| 61 |
+
/lib/config.hin
|
| 62 |
+
/lib/configmake.h
|
| 63 |
+
/lib/crc-sliceby8.h
|
| 64 |
+
/lib/ctype.h
|
| 65 |
+
/lib/dirent.h
|
| 66 |
+
/lib/endian.h
|
| 67 |
+
/lib/errno.h
|
| 68 |
+
/lib/error.h
|
| 69 |
+
/lib/fcntl.h
|
| 70 |
+
/lib/float.h
|
| 71 |
+
/lib/fnmatch.h
|
| 72 |
+
/lib/fts_.h
|
| 73 |
+
/lib/getopt-cdefs.h
|
| 74 |
+
/lib/getopt.h
|
| 75 |
+
/lib/glthread
|
| 76 |
+
/lib/gmp.h
|
| 77 |
+
/lib/iconv.h
|
| 78 |
+
/lib/iconv_open-aix.h
|
| 79 |
+
/lib/iconv_open-hpux.h
|
| 80 |
+
/lib/iconv_open-irix.h
|
| 81 |
+
/lib/iconv_open-osf.h
|
| 82 |
+
/lib/iconv_open-solaris.h
|
| 83 |
+
/lib/iconv_open-zos.h
|
| 84 |
+
/lib/inttypes.h
|
| 85 |
+
/lib/langinfo.h
|
| 86 |
+
/lib/limits.h
|
| 87 |
+
/lib/link-warning.h
|
| 88 |
+
/lib/locale.h
|
| 89 |
+
/lib/malloc/
|
| 90 |
+
/lib/math.h
|
| 91 |
+
/lib/netdb.h
|
| 92 |
+
/lib/netinet/in.h
|
| 93 |
+
/lib/obstack.h
|
| 94 |
+
/lib/parse-datetime-gen.h
|
| 95 |
+
/lib/parse-datetime.c
|
| 96 |
+
/lib/poll.h
|
| 97 |
+
/lib/printf.c
|
| 98 |
+
/lib/pthread.h
|
| 99 |
+
/lib/ref-add.sed
|
| 100 |
+
/lib/ref-del.sed
|
| 101 |
+
/lib/sched.h
|
| 102 |
+
/lib/se-context.h
|
| 103 |
+
/lib/se-label.h
|
| 104 |
+
/lib/se-selinux.h
|
| 105 |
+
/lib/selinux
|
| 106 |
+
/lib/signal.h
|
| 107 |
+
/lib/spawn.h
|
| 108 |
+
/lib/stamp-h1
|
| 109 |
+
/lib/stdarg.h
|
| 110 |
+
/lib/stdbool.h
|
| 111 |
+
/lib/stdbit.h
|
| 112 |
+
/lib/stdcountof.h
|
| 113 |
+
/lib/stdckdint.h
|
| 114 |
+
/lib/stddef.h
|
| 115 |
+
/lib/stdint.h
|
| 116 |
+
/lib/stdio.h
|
| 117 |
+
/lib/stdlib.h
|
| 118 |
+
/lib/string.h
|
| 119 |
+
/lib/strings.h
|
| 120 |
+
/lib/sys/
|
| 121 |
+
/lib/termios.h
|
| 122 |
+
/lib/time.h
|
| 123 |
+
/lib/uchar.h
|
| 124 |
+
/lib/unicase.h
|
| 125 |
+
/lib/unicase/
|
| 126 |
+
/lib/unictype
|
| 127 |
+
/lib/unictype.h
|
| 128 |
+
/lib/uninorm.h
|
| 129 |
+
/lib/unistd.h
|
| 130 |
+
/lib/unistr
|
| 131 |
+
/lib/unistr.h
|
| 132 |
+
/lib/unitypes.h
|
| 133 |
+
/lib/uniwidth
|
| 134 |
+
/lib/uniwidth.h
|
| 135 |
+
/lib/utime.h
|
| 136 |
+
/lib/warn-on-use.h
|
| 137 |
+
/lib/wchar.h
|
| 138 |
+
/lib/wctype.h
|
| 139 |
+
/m4/.cvsignore
|
| 140 |
+
/m4/.gitignore
|
| 141 |
+
/m4/codeset.m4
|
| 142 |
+
/m4/cu-progs.m4
|
| 143 |
+
/m4/fcntl-o.m4
|
| 144 |
+
/m4/gettext.m4
|
| 145 |
+
/m4/glibc2.m4
|
| 146 |
+
/m4/glibc21.m4
|
| 147 |
+
/m4/gnulib-cache.m4
|
| 148 |
+
/m4/iconv.m4
|
| 149 |
+
/m4/intdiv0.m4
|
| 150 |
+
/m4/intl.m4
|
| 151 |
+
/m4/intldir.m4
|
| 152 |
+
/m4/intlmacosx.m4
|
| 153 |
+
/m4/intmax.m4
|
| 154 |
+
/m4/inttypes-pri.m4
|
| 155 |
+
/m4/inttypes_h.m4
|
| 156 |
+
/m4/lcmessage.m4
|
| 157 |
+
/m4/lib-ld.m4
|
| 158 |
+
/m4/lib-link.m4
|
| 159 |
+
/m4/lib-prefix.m4
|
| 160 |
+
/m4/lock.m4
|
| 161 |
+
/m4/nls.m4
|
| 162 |
+
/m4/po.m4
|
| 163 |
+
/m4/printf-posix.m4
|
| 164 |
+
/m4/progtest.m4
|
| 165 |
+
/m4/size_max.m4
|
| 166 |
+
/m4/stdint_h.m4
|
| 167 |
+
/m4/threadlib.m4
|
| 168 |
+
/m4/uintmax_t.m4
|
| 169 |
+
/m4/visibility.m4
|
| 170 |
+
/m4/wchar_t.m4
|
| 171 |
+
/m4/wint_t.m4
|
| 172 |
+
/m4/xsize.m4
|
| 173 |
+
/maint.mk
|
| 174 |
+
/man/*.1
|
| 175 |
+
/po/*.gmo
|
| 176 |
+
/po/*.po
|
| 177 |
+
/po/.gitignore
|
| 178 |
+
/po/.reference
|
| 179 |
+
/po/LINGUAS
|
| 180 |
+
/po/Makefile.in
|
| 181 |
+
/po/Makefile.in.in
|
| 182 |
+
/po/Makevars
|
| 183 |
+
/po/Makevars.template
|
| 184 |
+
/po/POTFILES
|
| 185 |
+
/po/Rules-quot
|
| 186 |
+
/po/boldquot.sed
|
| 187 |
+
/po/checksums
|
| 188 |
+
/po/coreutils.pot
|
| 189 |
+
/po/en@boldquot.header
|
| 190 |
+
/po/en@quot.header
|
| 191 |
+
/po/insert-header.sin
|
| 192 |
+
/po/quot.sed
|
| 193 |
+
/po/remove-potcdate.sed
|
| 194 |
+
/po/remove-potcdate.sin
|
| 195 |
+
/po/stamp-po
|
| 196 |
+
/src/coreutils.h
|
| 197 |
+
/src/coreutils_shebangs
|
| 198 |
+
/src/coreutils_symlinks
|
| 199 |
+
/src/crctab.c
|
| 200 |
+
/src/cu-progs.mk
|
| 201 |
+
/src/fs-def
|
| 202 |
+
/src/fs-kernel-magic
|
| 203 |
+
/src/fs-latest-magic.h
|
| 204 |
+
/src/fs-magic
|
| 205 |
+
/src/primes.h
|
| 206 |
+
/src/single-binary.mk
|
| 207 |
+
/src/version.c
|
| 208 |
+
/src/version.h
|
| 209 |
+
/stamp-h1
|
| 210 |
+
/tests/*/*.log
|
| 211 |
+
/tests/*/*.trs
|
| 212 |
+
/tests/.built-programs
|
| 213 |
+
/tests/factor/t[0-9][0-9].sh
|
| 214 |
+
/tests/init.sh
|
| 215 |
+
/tests/t?
|
| 216 |
+
/tests/test-suite.log
|
| 217 |
+
/tight-scope.mk
|
| 218 |
+
ID
|
| 219 |
+
Makefile
|
| 220 |
+
Makefile.in
|
| 221 |
+
TAGS
|
| 222 |
+
THANKS
|
| 223 |
+
THANKS-to-translators
|
.gitmodules
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[submodule "gnulib"]
|
| 2 |
+
path = gnulib
|
| 3 |
+
url = https://git.savannah.gnu.org/git/gnulib.git
|
.mailmap
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Map git author names and email addresses to canonical/preferred form.
|
| 2 |
+
<jim@meyering.net> <meyering@meta.com>
|
| 3 |
+
<jim@meyering.net> <meyering@fb.com>
|
| 4 |
+
<jim@meyering.net> <meyering@iou.iou>
|
| 5 |
+
<jim@meyering.net> <meyering@redhat.com>
|
| 6 |
+
<jim@meyering.net> <meyering@rho.meyering.net>
|
| 7 |
+
<jim@meyering.net> <meyering@vm.meyering.net.localdomain>
|
| 8 |
+
Paul Eggert <eggert@cs.ucla.edu> <eggert@penguin.cs.ucla.edu>
|
| 9 |
+
Paul Eggert <eggert@cs.ucla.edu> <eggert@CS.UCLA.EDU>
|
| 10 |
+
<eggert@cs.ucla.edu> <eggert@twinsun.com>
|
| 11 |
+
|
| 12 |
+
# Evan's two changes listed my email address.
|
| 13 |
+
Evan Hunt <ethanol@armory.com> Evan Hunt <jim@meyering.net>
|
| 14 |
+
|
| 15 |
+
<P@draigBrady.com> <P@draigBrady.com (trivial change)>
|
| 16 |
+
Pádraig Brady <P@draigBrady.com>
|
| 17 |
+
<chen.guo.0625@gmail.com> <chenguo4@yahoo.com>
|
| 18 |
+
<chen.guo.0625@gmail.com> <chenguo4@ucla.edu>
|
| 19 |
+
<schwab@linux-m68k.org> <schwab@suse.de>
|
| 20 |
+
<aurel32@debian.org> <aurelien@aurel32.net>
|
| 21 |
+
<bob@proulx.com> <rwp@fc.hp.com>
|
| 22 |
+
<bkorb@gnu.org> <bkorb@veritas.com>
|
| 23 |
+
<bruno@clisp.org> <haible@clisp.cons.org>
|
| 24 |
+
<eblake@redhat.com> <ebb9@byu.net>
|
| 25 |
+
<jrv@debian.org> <jrvz@comcast.net>
|
| 26 |
+
<dave.anglin@nrc.ca> <dave@hiauly1.hia.nrc.ca>
|
| 27 |
+
<psfales@alcatel-lucent.com> <psfales@lucent.com>
|
| 28 |
+
<karl@gnu.org> <karl@freefriends.org>
|
| 29 |
+
<stephane.raimbault@gmail.com> <stephane.raimbault@makina-corpus.com>
|
| 30 |
+
<jarkko.sakkinen@iki.fi> <jarkko.sakkinen@linux.intel.com>
|
| 31 |
+
<tobias@stoeckmann.org> <tobias@bugol.de>
|
| 32 |
+
<cjwatson@debian.org> <cjwatson@ubuntu.com>
|
| 33 |
+
|
| 34 |
+
# Prefer spelled-out middle name and its address.
|
| 35 |
+
Arne Henrik Juul <arnej@imf.unit.no> Arne H. Juul <arnej@solan.unit.no>
|
| 36 |
+
|
| 37 |
+
# Had email as name.
|
| 38 |
+
Dan Jacobson <jidanni@jidanni.org> jidanni@jidanni.org <jidanni@jidanni.org>
|
| 39 |
+
|
| 40 |
+
# Consolidate names of same email address.
|
| 41 |
+
Jeff Liu <jeff.liu@oracle.com> jeff.liu <jeff.liu@oracle.com>
|
| 42 |
+
Jeff Liu <jeff.liu@oracle.com> Jie Liu <jeff.liu@oracle.com>
|
| 43 |
+
|
| 44 |
+
# Convert to latin1 for a better 'THANKS' sort order.
|
| 45 |
+
Aleksej Shilin <rootlexx@mail.ru> Алексей Шилин <rootlexx@mail.ru>
|
.prev-version
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
9.8
|
.vg-suppressions
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Suppress valgrind diagnostics we don't care about.
|
| 2 |
+
|
| 3 |
+
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
|
| 4 |
+
|
| 5 |
+
# This program is free software: you can redistribute it and/or modify
|
| 6 |
+
# it under the terms of the GNU General Public License as published by
|
| 7 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 8 |
+
# (at your option) any later version.
|
| 9 |
+
|
| 10 |
+
# This program is distributed in the hope that it will be useful,
|
| 11 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
+
# GNU General Public License for more details.
|
| 14 |
+
|
| 15 |
+
# You should have received a copy of the GNU General Public License
|
| 16 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 17 |
+
|
| 18 |
+
{
|
| 19 |
+
libc_dl_open
|
| 20 |
+
Memcheck:Cond
|
| 21 |
+
fun:_dl_relocate_object
|
| 22 |
+
obj:/lib/libc-2.3.2.so
|
| 23 |
+
fun:_dl_catch_error
|
| 24 |
+
fun:_dl_open
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
{
|
| 28 |
+
libc_dl_catch_error__map_object
|
| 29 |
+
Memcheck:Addr1
|
| 30 |
+
obj:/lib/ld-2.3.2.so
|
| 31 |
+
fun:_dl_map_object
|
| 32 |
+
obj:/lib/libc-2.3.2.so
|
| 33 |
+
fun:_dl_catch_error
|
| 34 |
+
}
|
| 35 |
+
{
|
| 36 |
+
libc_dl_catch_error__map_versions
|
| 37 |
+
Memcheck:Addr1
|
| 38 |
+
obj:/lib/ld-2.3.2.so
|
| 39 |
+
fun:_dl_check_map_versions
|
| 40 |
+
obj:/lib/libc-2.3.2.so
|
| 41 |
+
fun:_dl_catch_error
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
{
|
| 45 |
+
jm_libc_sigaction
|
| 46 |
+
Memcheck:Param
|
| 47 |
+
sigaction(act)
|
| 48 |
+
fun:__libc_sigaction
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
{
|
| 52 |
+
libc_expand_dynamic_string_token
|
| 53 |
+
Memcheck:Cond
|
| 54 |
+
fun:strlen
|
| 55 |
+
fun:expand_dynamic_string_token
|
| 56 |
+
obj:*
|
| 57 |
+
obj:*
|
| 58 |
+
obj:*
|
| 59 |
+
obj:*
|
| 60 |
+
obj:*
|
| 61 |
+
}
|
| 62 |
+
{
|
| 63 |
+
libc__dl_new_object
|
| 64 |
+
Memcheck:Cond
|
| 65 |
+
fun:strlen
|
| 66 |
+
fun:_dl_new_object
|
| 67 |
+
obj:*
|
| 68 |
+
obj:*
|
| 69 |
+
obj:*
|
| 70 |
+
obj:*
|
| 71 |
+
}
|
| 72 |
+
{
|
| 73 |
+
libc_fillin_rpath
|
| 74 |
+
Memcheck:Cond
|
| 75 |
+
fun:strlen
|
| 76 |
+
fun:fillin_rpath
|
| 77 |
+
}
|
| 78 |
+
{
|
| 79 |
+
libc-getpwuid-leak
|
| 80 |
+
Memcheck:Leak
|
| 81 |
+
fun:malloc
|
| 82 |
+
fun:nss_parse_service_list
|
| 83 |
+
fun:__nss_database_lookup
|
| 84 |
+
obj:*
|
| 85 |
+
obj:*
|
| 86 |
+
fun:getpwuid_r@@GLIBC_2.2.5
|
| 87 |
+
fun:getpwuid
|
| 88 |
+
fun:getuser
|
| 89 |
+
fun:format_user_width
|
| 90 |
+
fun:gobble_file
|
| 91 |
+
fun:main
|
| 92 |
+
}
|
| 93 |
+
{
|
| 94 |
+
utimensat-NULL
|
| 95 |
+
Memcheck:Param
|
| 96 |
+
utimensat(filename)
|
| 97 |
+
fun:futimens
|
| 98 |
+
fun:gl_futimens
|
| 99 |
+
fun:main
|
| 100 |
+
}
|
.x-update-copyright
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
^COPYING$
|
| 2 |
+
^bootstrap$
|
| 3 |
+
^doc/fdl\.texi$
|
| 4 |
+
^man/help2man$
|
| 5 |
+
^src/longlong\.h$
|
| 6 |
+
^tests/init\.sh$
|
AUTHORS
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Here are the names of the programs in this package,
|
| 2 |
+
each followed by the name(s) of its author(s).
|
| 3 |
+
|
| 4 |
+
arch: David MacKenzie, Karel Zak
|
| 5 |
+
b2sum: Pádraig Brady, Samuel Neves
|
| 6 |
+
base32: Simon Josefsson
|
| 7 |
+
base64: Simon Josefsson
|
| 8 |
+
basename: David MacKenzie
|
| 9 |
+
basenc: Simon Josefsson, Assaf Gordon
|
| 10 |
+
cat: Torbjörn Granlund, Richard M. Stallman
|
| 11 |
+
chcon: Russell Coker, Jim Meyering
|
| 12 |
+
chgrp: David MacKenzie, Jim Meyering
|
| 13 |
+
chmod: David MacKenzie, Jim Meyering
|
| 14 |
+
chown: David MacKenzie, Jim Meyering
|
| 15 |
+
chroot: Roland McGrath
|
| 16 |
+
cksum: Pádraig Brady, Q. Frank Xia
|
| 17 |
+
comm: Richard M. Stallman, David MacKenzie
|
| 18 |
+
coreutils: Alex Deymo
|
| 19 |
+
cp: Torbjörn Granlund, David MacKenzie, Jim Meyering
|
| 20 |
+
csplit: Stuart Kemp, David MacKenzie
|
| 21 |
+
cut: David M. Ihnat, David MacKenzie, Jim Meyering
|
| 22 |
+
date: David MacKenzie
|
| 23 |
+
dd: Paul Rubin, David MacKenzie, Stuart Kemp
|
| 24 |
+
df: Torbjörn Granlund, David MacKenzie, Paul Eggert
|
| 25 |
+
dir: Richard M. Stallman, David MacKenzie
|
| 26 |
+
dircolors: H. Peter Anvin
|
| 27 |
+
dirname: David MacKenzie, Jim Meyering
|
| 28 |
+
du: Torbjörn Granlund, David MacKenzie, Paul Eggert, Jim Meyering
|
| 29 |
+
echo: Brian Fox, Chet Ramey
|
| 30 |
+
env: Richard Mlynarik, David MacKenzie, Assaf Gordon
|
| 31 |
+
expand: David MacKenzie
|
| 32 |
+
expr: Mike Parker, James Youngman, Paul Eggert
|
| 33 |
+
factor: Paul Rubin, Torbjörn Granlund, Niels Möller
|
| 34 |
+
false: Jim Meyering
|
| 35 |
+
fmt: Ross Paterson
|
| 36 |
+
fold: David MacKenzie
|
| 37 |
+
ginstall: David MacKenzie
|
| 38 |
+
groups: David MacKenzie, James Youngman
|
| 39 |
+
head: David MacKenzie, Jim Meyering
|
| 40 |
+
hostid: Jim Meyering
|
| 41 |
+
hostname: Jim Meyering
|
| 42 |
+
id: Arnold Robbins, David MacKenzie
|
| 43 |
+
join: Mike Haertel
|
| 44 |
+
kill: Paul Eggert
|
| 45 |
+
link: Michael Stone
|
| 46 |
+
ln: Mike Parker, David MacKenzie
|
| 47 |
+
logname: David MacKenzie
|
| 48 |
+
ls: Richard M. Stallman, David MacKenzie
|
| 49 |
+
md5sum: Ulrich Drepper, Scott Miller, David Madore
|
| 50 |
+
mkdir: David MacKenzie
|
| 51 |
+
mkfifo: David MacKenzie
|
| 52 |
+
mknod: David MacKenzie
|
| 53 |
+
mktemp: Jim Meyering, Eric Blake
|
| 54 |
+
mv: Mike Parker, David MacKenzie, Jim Meyering
|
| 55 |
+
nice: David MacKenzie
|
| 56 |
+
nl: Scott Bartram, David MacKenzie
|
| 57 |
+
nohup: Jim Meyering
|
| 58 |
+
nproc: Giuseppe Scrivano
|
| 59 |
+
numfmt: Assaf Gordon
|
| 60 |
+
od: Jim Meyering
|
| 61 |
+
paste: David M. Ihnat, David MacKenzie
|
| 62 |
+
pathchk: Paul Eggert, David MacKenzie, Jim Meyering
|
| 63 |
+
pinky: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi
|
| 64 |
+
pr: Pete TerMaat, Roland Huebner
|
| 65 |
+
printenv: David MacKenzie, Richard Mlynarik
|
| 66 |
+
printf: David MacKenzie
|
| 67 |
+
ptx: François Pinard
|
| 68 |
+
pwd: Jim Meyering
|
| 69 |
+
readlink: Dmitry V. Levin
|
| 70 |
+
realpath: Pádraig Brady
|
| 71 |
+
rm: Paul Rubin, David MacKenzie, Richard M. Stallman, Jim Meyering
|
| 72 |
+
rmdir: David MacKenzie
|
| 73 |
+
runcon: Russell Coker
|
| 74 |
+
seq: Ulrich Drepper
|
| 75 |
+
sha1sum: Ulrich Drepper, Scott Miller, David Madore
|
| 76 |
+
sha224sum: Ulrich Drepper, Scott Miller, David Madore
|
| 77 |
+
sha256sum: Ulrich Drepper, Scott Miller, David Madore
|
| 78 |
+
sha384sum: Ulrich Drepper, Scott Miller, David Madore
|
| 79 |
+
sha512sum: Ulrich Drepper, Scott Miller, David Madore
|
| 80 |
+
shred: Colin Plumb
|
| 81 |
+
shuf: Paul Eggert
|
| 82 |
+
sleep: Jim Meyering, Paul Eggert
|
| 83 |
+
sort: Mike Haertel, Paul Eggert
|
| 84 |
+
split: Torbjörn Granlund, Richard M. Stallman
|
| 85 |
+
stat: Michael Meskes
|
| 86 |
+
stdbuf: Pádraig Brady
|
| 87 |
+
stty: David MacKenzie
|
| 88 |
+
sum: Kayvan Aghaiepour, David MacKenzie
|
| 89 |
+
sync: Jim Meyering, Giuseppe Scrivano
|
| 90 |
+
tac: Jay Lepreau, David MacKenzie
|
| 91 |
+
tail: Paul Rubin, David MacKenzie, Ian Lance Taylor, Jim Meyering
|
| 92 |
+
tee: Mike Parker, Richard M. Stallman, David MacKenzie
|
| 93 |
+
test: Kevin Braunsdorf, Matthew Bradburn
|
| 94 |
+
timeout: Pádraig Brady
|
| 95 |
+
touch: Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, Randy Smith
|
| 96 |
+
tr: Jim Meyering
|
| 97 |
+
true: Jim Meyering
|
| 98 |
+
truncate: Pádraig Brady
|
| 99 |
+
tsort: Mark Kettenis
|
| 100 |
+
tty: David MacKenzie
|
| 101 |
+
uname: David MacKenzie
|
| 102 |
+
unexpand: David MacKenzie
|
| 103 |
+
uniq: Richard M. Stallman, David MacKenzie
|
| 104 |
+
unlink: Michael Stone
|
| 105 |
+
uptime: Joseph Arceneaux, David MacKenzie, Kaveh Ghazi
|
| 106 |
+
users: Joseph Arceneaux, David MacKenzie
|
| 107 |
+
vdir: Richard M. Stallman, David MacKenzie
|
| 108 |
+
wc: Paul Rubin, David MacKenzie
|
| 109 |
+
who: Joseph Arceneaux, David MacKenzie, Michael St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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
GNU GENERAL PUBLIC LICENSE
|
| 2 |
+
Version 3, 29 June 2007
|
| 3 |
+
|
| 4 |
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
| 5 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 6 |
+
of this license document, but changing it is not allowed.
|
| 7 |
+
|
| 8 |
+
Preamble
|
| 9 |
+
|
| 10 |
+
The GNU General Public License is a free, copyleft license for
|
| 11 |
+
software and other kinds of works.
|
| 12 |
+
|
| 13 |
+
The licenses for most software and other practical works are designed
|
| 14 |
+
to take away your freedom to share and change the works. By contrast,
|
| 15 |
+
the GNU General Public License is intended to guarantee your freedom to
|
| 16 |
+
share and change all versions of a program--to make sure it remains free
|
| 17 |
+
software for all its users. We, the Free Software Foundation, use the
|
| 18 |
+
GNU General Public License for most of our software; it applies also to
|
| 19 |
+
any other work released this way by its authors. You can apply it to
|
| 20 |
+
your programs, too.
|
| 21 |
+
|
| 22 |
+
When we speak of free software, we are referring to freedom, not
|
| 23 |
+
price. Our General Public Licenses are designed to make sure that you
|
| 24 |
+
have the freedom to distribute copies of free software (and charge for
|
| 25 |
+
them if you wish), that you receive source code or can get it if you
|
| 26 |
+
want it, that you can change the software or use pieces of it in new
|
| 27 |
+
free programs, and that you know you can do these things.
|
| 28 |
+
|
| 29 |
+
To protect your rights, we need to prevent others from denying you
|
| 30 |
+
these rights or asking you to surrender the rights. Therefore, you have
|
| 31 |
+
certain responsibilities if you distribute copies of the software, or if
|
| 32 |
+
you modify it: responsibilities to respect the freedom of others.
|
| 33 |
+
|
| 34 |
+
For example, if you distribute copies of such a program, whether
|
| 35 |
+
gratis or for a fee, you must pass on to the recipients the same
|
| 36 |
+
freedoms that you received. You must make sure that they, too, receive
|
| 37 |
+
or can get the source code. And you must show them these terms so they
|
| 38 |
+
know their rights.
|
| 39 |
+
|
| 40 |
+
Developers that use the GNU GPL protect your rights with two steps:
|
| 41 |
+
(1) assert copyright on the software, and (2) offer you this License
|
| 42 |
+
giving you legal permission to copy, distribute and/or modify it.
|
| 43 |
+
|
| 44 |
+
For the developers' and authors' protection, the GPL clearly explains
|
| 45 |
+
that there is no warranty for this free software. For both users' and
|
| 46 |
+
authors' sake, the GPL requires that modified versions be marked as
|
| 47 |
+
changed, so that their problems will not be attributed erroneously to
|
| 48 |
+
authors of previous versions.
|
| 49 |
+
|
| 50 |
+
Some devices are designed to deny users access to install or run
|
| 51 |
+
modified versions of the software inside them, although the manufacturer
|
| 52 |
+
can do so. This is fundamentally incompatible with the aim of
|
| 53 |
+
protecting users' freedom to change the software. The systematic
|
| 54 |
+
pattern of such abuse occurs in the area of products for individuals to
|
| 55 |
+
use, which is precisely where it is most unacceptable. Therefore, we
|
| 56 |
+
have designed this version of the GPL to prohibit the practice for those
|
| 57 |
+
products. If such problems arise substantially in other domains, we
|
| 58 |
+
stand ready to extend this provision to those domains in future versions
|
| 59 |
+
of the GPL, as needed to protect the freedom of users.
|
| 60 |
+
|
| 61 |
+
Finally, every program is threatened constantly by software patents.
|
| 62 |
+
States should not allow patents to restrict development and use of
|
| 63 |
+
software on general-purpose computers, but in those that do, we wish to
|
| 64 |
+
avoid the special danger that patents applied to a free program could
|
| 65 |
+
make it effectively proprietary. To prevent this, the GPL assures that
|
| 66 |
+
patents cannot be used to render the program non-free.
|
| 67 |
+
|
| 68 |
+
The precise terms and conditions for copying, distribution and
|
| 69 |
+
modification follow.
|
| 70 |
+
|
| 71 |
+
TERMS AND CONDITIONS
|
| 72 |
+
|
| 73 |
+
0. Definitions.
|
| 74 |
+
|
| 75 |
+
"This License" refers to version 3 of the GNU General Public License.
|
| 76 |
+
|
| 77 |
+
"Copyright" also means copyright-like laws that apply to other kinds of
|
| 78 |
+
works, such as semiconductor masks.
|
| 79 |
+
|
| 80 |
+
"The Program" refers to any copyrightable work licensed under this
|
| 81 |
+
License. Each licensee is addressed as "you". "Licensees" and
|
| 82 |
+
"recipients" may be individuals or organizations.
|
| 83 |
+
|
| 84 |
+
To "modify" a work means to copy from or adapt all or part of the work
|
| 85 |
+
in a fashion requiring copyright permission, other than the making of an
|
| 86 |
+
exact copy. The resulting work is called a "modified version" of the
|
| 87 |
+
earlier work or a work "based on" the earlier work.
|
| 88 |
+
|
| 89 |
+
A "covered work" means either the unmodified Program or a work based
|
| 90 |
+
on the Program.
|
| 91 |
+
|
| 92 |
+
To "propagate" a work means to do anything with it that, without
|
| 93 |
+
permission, would make you directly or secondarily liable for
|
| 94 |
+
infringement under applicable copyright law, except executing it on a
|
| 95 |
+
computer or modifying a private copy. Propagation includes copying,
|
| 96 |
+
distribution (with or without modification), making available to the
|
| 97 |
+
public, and in some countries other activities as well.
|
| 98 |
+
|
| 99 |
+
To "convey" a work means any kind of propagation that enables other
|
| 100 |
+
parties to make or receive copies. Mere interaction with a user through
|
| 101 |
+
a computer network, with no transfer of a copy, is not conveying.
|
| 102 |
+
|
| 103 |
+
An interactive user interface displays "Appropriate Legal Notices"
|
| 104 |
+
to the extent that it includes a convenient and prominently visible
|
| 105 |
+
feature that (1) displays an appropriate copyright notice, and (2)
|
| 106 |
+
tells the user that there is no warranty for the work (except to the
|
| 107 |
+
extent that warranties are provided), that licensees may convey the
|
| 108 |
+
work under this License, and how to view a copy of this License. If
|
| 109 |
+
the interface presents a list of user commands or options, such as a
|
| 110 |
+
menu, a prominent item in the list meets this criterion.
|
| 111 |
+
|
| 112 |
+
1. Source Code.
|
| 113 |
+
|
| 114 |
+
The "source code" for a work means the preferred form of the work
|
| 115 |
+
for making modifications to it. "Object code" means any non-source
|
| 116 |
+
form of a work.
|
| 117 |
+
|
| 118 |
+
A "Standard Interface" means an interface that either is an official
|
| 119 |
+
standard defined by a recognized standards body, or, in the case of
|
| 120 |
+
interfaces specified for a particular programming language, one that
|
| 121 |
+
is widely used among developers working in that language.
|
| 122 |
+
|
| 123 |
+
The "System Libraries" of an executable work include anything, other
|
| 124 |
+
than the work as a whole, that (a) is included in the normal form of
|
| 125 |
+
packaging a Major Component, but which is not part of that Major
|
| 126 |
+
Component, and (b) serves only to enable use of the work with that
|
| 127 |
+
Major Component, or to implement a Standard Interface for which an
|
| 128 |
+
implementation is available to the public in source code form. A
|
| 129 |
+
"Major Component", in this context, means a major essential component
|
| 130 |
+
(kernel, window system, and so on) of the specific operating system
|
| 131 |
+
(if any) on which the executable work runs, or a compiler used to
|
| 132 |
+
produce the work, or an object code interpreter used to run it.
|
| 133 |
+
|
| 134 |
+
The "Corresponding Source" for a work in object code form means all
|
| 135 |
+
the source code needed to generate, install, and (for an executable
|
| 136 |
+
work) run the object code and to modify the work, including scripts to
|
| 137 |
+
control those activities. However, it does not include the work's
|
| 138 |
+
System Libraries, or general-purpose tools or generally available free
|
| 139 |
+
programs which are used unmodified in performing those activities but
|
| 140 |
+
which are not part of the work. For example, Corresponding Source
|
| 141 |
+
includes interface definition files associated with source files for
|
| 142 |
+
the work, and the source code for shared libraries and dynamically
|
| 143 |
+
linked subprograms that the work is specifically designed to require,
|
| 144 |
+
such as by intimate data communication or control flow between those
|
| 145 |
+
subprograms and other parts of the work.
|
| 146 |
+
|
| 147 |
+
The Corresponding Source need not include anything that users
|
| 148 |
+
can regenerate automatically from other parts of the Corresponding
|
| 149 |
+
Source.
|
| 150 |
+
|
| 151 |
+
The Corresponding Source for a work in source code form is that
|
| 152 |
+
same work.
|
| 153 |
+
|
| 154 |
+
2. Basic Permissions.
|
| 155 |
+
|
| 156 |
+
All rights granted under this License are granted for the term of
|
| 157 |
+
copyright on the Program, and are irrevocable provided the stated
|
| 158 |
+
conditions are met. This License explicitly affirms your unlimited
|
| 159 |
+
permission to run the unmodified Program. The output from running a
|
| 160 |
+
covered work is covered by this License only if the output, given its
|
| 161 |
+
content, constitutes a covered work. This License acknowledges your
|
| 162 |
+
rights of fair use or other equivalent, as provided by copyright law.
|
| 163 |
+
|
| 164 |
+
You may make, run and propagate covered works that you do not
|
| 165 |
+
convey, without conditions so long as your license otherwise remains
|
| 166 |
+
in force. You may convey covered works to others for the sole purpose
|
| 167 |
+
of having them make modifications exclusively for you, or provide you
|
| 168 |
+
with facilities for running those works, provided that you comply with
|
| 169 |
+
the terms of this License in conveying all material for which you do
|
| 170 |
+
not control copyright. Those thus making or running the covered works
|
| 171 |
+
for you must do so exclusively on your behalf, under your direction
|
| 172 |
+
and control, on terms that prohibit them from making any copies of
|
| 173 |
+
your copyrighted material outside their relationship with you.
|
| 174 |
+
|
| 175 |
+
Conveying under any other circumstances is permitted solely under
|
| 176 |
+
the conditions stated below. Sublicensing is not allowed; section 10
|
| 177 |
+
makes it unnecessary.
|
| 178 |
+
|
| 179 |
+
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
| 180 |
+
|
| 181 |
+
No covered work shall be deemed part of an effective technological
|
| 182 |
+
measure under any applicable law fulfilling obligations under article
|
| 183 |
+
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
| 184 |
+
similar laws prohibiting or restricting circumvention of such
|
| 185 |
+
measures.
|
| 186 |
+
|
| 187 |
+
When you convey a covered work, you waive any legal power to forbid
|
| 188 |
+
circumvention of technological measures to the extent such circumvention
|
| 189 |
+
is effected by exercising rights under this License with respect to
|
| 190 |
+
the covered work, and you disclaim any intention to limit operation or
|
| 191 |
+
modification of the work as a means of enforcing, against the work's
|
| 192 |
+
users, your or third parties' legal rights to forbid circumvention of
|
| 193 |
+
technological measures.
|
| 194 |
+
|
| 195 |
+
4. Conveying Verbatim Copies.
|
| 196 |
+
|
| 197 |
+
You may convey verbatim copies of the Program's source code as you
|
| 198 |
+
receive it, in any medium, provided that you conspicuously and
|
| 199 |
+
appropriately publish on each copy an appropriate copyright notice;
|
| 200 |
+
keep intact all notices stating that this License and any
|
| 201 |
+
non-permissive terms added in accord with section 7 apply to the code;
|
| 202 |
+
keep intact all notices of the absence of any warranty; and give all
|
| 203 |
+
recipients a copy of this License along with the Program.
|
| 204 |
+
|
| 205 |
+
You may charge any price or no price for each copy that you convey,
|
| 206 |
+
and you may offer support or warranty protection for a fee.
|
| 207 |
+
|
| 208 |
+
5. Conveying Modified Source Versions.
|
| 209 |
+
|
| 210 |
+
You may convey a work based on the Program, or the modifications to
|
| 211 |
+
produce it from the Program, in the form of source code under the
|
| 212 |
+
terms of section 4, provided that you also meet all of these conditions:
|
| 213 |
+
|
| 214 |
+
a) The work must carry prominent notices stating that you modified
|
| 215 |
+
it, and giving a relevant date.
|
| 216 |
+
|
| 217 |
+
b) The work must carry prominent notices stating that it is
|
| 218 |
+
released under this License and any conditions added under section
|
| 219 |
+
7. This requirement modifies the requirement in section 4 to
|
| 220 |
+
"keep intact all notices".
|
| 221 |
+
|
| 222 |
+
c) You must license the entire work, as a whole, under this
|
| 223 |
+
License to anyone who comes into possession of a copy. This
|
| 224 |
+
License will therefore apply, along with any applicable section 7
|
| 225 |
+
additional terms, to the whole of the work, and all its parts,
|
| 226 |
+
regardless of how they are packaged. This License gives no
|
| 227 |
+
permission to license the work in any other way, but it does not
|
| 228 |
+
invalidate such permission if you have separately received it.
|
| 229 |
+
|
| 230 |
+
d) If the work has interactive user interfaces, each must display
|
| 231 |
+
Appropriate Legal Notices; however, if the Program has interactive
|
| 232 |
+
interfaces that do not display Appropriate Legal Notices, your
|
| 233 |
+
work need not make them do so.
|
| 234 |
+
|
| 235 |
+
A compilation of a covered work with other separate and independent
|
| 236 |
+
works, which are not by their nature extensions of the covered work,
|
| 237 |
+
and which are not combined with it such as to form a larger program,
|
| 238 |
+
in or on a volume of a storage or distribution medium, is called an
|
| 239 |
+
"aggregate" if the compilation and its resulting copyright are not
|
| 240 |
+
used to limit the access or legal rights of the compilation's users
|
| 241 |
+
beyond what the individual works permit. Inclusion of a covered work
|
| 242 |
+
in an aggregate does not cause this License to apply to the other
|
| 243 |
+
parts of the aggregate.
|
| 244 |
+
|
| 245 |
+
6. Conveying Non-Source Forms.
|
| 246 |
+
|
| 247 |
+
You may convey a covered work in object code form under the terms
|
| 248 |
+
of sections 4 and 5, provided that you also convey the
|
| 249 |
+
machine-readable Corresponding Source under the terms of this License,
|
| 250 |
+
in one of these ways:
|
| 251 |
+
|
| 252 |
+
a) Convey the object code in, or embodied in, a physical product
|
| 253 |
+
(including a physical distribution medium), accompanied by the
|
| 254 |
+
Corresponding Source fixed on a durable physical medium
|
| 255 |
+
customarily used for software interchange.
|
| 256 |
+
|
| 257 |
+
b) Convey the object code in, or embodied in, a physical product
|
| 258 |
+
(including a physical distribution medium), accompanied by a
|
| 259 |
+
written offer, valid for at least three years and valid for as
|
| 260 |
+
long as you offer spare parts or customer support for that product
|
| 261 |
+
model, to give anyone who possesses the object code either (1) a
|
| 262 |
+
copy of the Corresponding Source for all the software in the
|
| 263 |
+
product that is covered by this License, on a durable physical
|
| 264 |
+
medium customarily used for software interchange, for a price no
|
| 265 |
+
more than your reasonable cost of physically performing this
|
| 266 |
+
conveying of source, or (2) access to copy the
|
| 267 |
+
Corresponding Source from a network server at no charge.
|
| 268 |
+
|
| 269 |
+
c) Convey individual copies of the object code with a copy of the
|
| 270 |
+
written offer to provide the Corresponding Source. This
|
| 271 |
+
alternative is allowed only occasionally and noncommercially, and
|
| 272 |
+
only if you received the object code with such an offer, in accord
|
| 273 |
+
with subsection 6b.
|
| 274 |
+
|
| 275 |
+
d) Convey the object code by offering access from a designated
|
| 276 |
+
place (gratis or for a charge), and offer equivalent access to the
|
| 277 |
+
Corresponding Source in the same way through the same place at no
|
| 278 |
+
further charge. You need not require recipients to copy the
|
| 279 |
+
Corresponding Source along with the object code. If the place to
|
| 280 |
+
copy the object code is a network server, the Corresponding Source
|
| 281 |
+
may be on a different server (operated by you or a third party)
|
| 282 |
+
that supports equivalent copying facilities, provided you maintain
|
| 283 |
+
clear directions next to the object code saying where to find the
|
| 284 |
+
Corresponding Source. Regardless of what server hosts the
|
| 285 |
+
Corresponding Source, you remain obligated to ensure that it is
|
| 286 |
+
available for as long as needed to satisfy these requirements.
|
| 287 |
+
|
| 288 |
+
e) Convey the object code using peer-to-peer transmission, provided
|
| 289 |
+
you inform other peers where the object code and Corresponding
|
| 290 |
+
Source of the work are being offered to the general public at no
|
| 291 |
+
charge under subsection 6d.
|
| 292 |
+
|
| 293 |
+
A separable portion of the object code, whose source code is excluded
|
| 294 |
+
from the Corresponding Source as a System Library, need not be
|
| 295 |
+
included in conveying the object code work.
|
| 296 |
+
|
| 297 |
+
A "User Product" is either (1) a "consumer product", which means any
|
| 298 |
+
tangible personal property which is normally used for personal, family,
|
| 299 |
+
or household purposes, or (2) anything designed or sold for incorporation
|
| 300 |
+
into a dwelling. In determining whether a product is a consumer product,
|
| 301 |
+
doubtful cases shall be resolved in favor of coverage. For a particular
|
| 302 |
+
product received by a particular user, "normally used" refers to a
|
| 303 |
+
typical or common use of that class of product, regardless of the status
|
| 304 |
+
of the particular user or of the way in which the particular user
|
| 305 |
+
actually uses, or expects or is expected to use, the product. A product
|
| 306 |
+
is a consumer product regardless of whether the product has substantial
|
| 307 |
+
commercial, industrial or non-consumer uses, unless such uses represent
|
| 308 |
+
the only significant mode of use of the product.
|
| 309 |
+
|
| 310 |
+
"Installation Information" for a User Product means any methods,
|
| 311 |
+
procedures, authorization keys, or other information required to install
|
| 312 |
+
and execute modified versions of a covered work in that User Product from
|
| 313 |
+
a modified version of its Corresponding Source. The information must
|
| 314 |
+
suffice to ensure that the continued functioning of the modified object
|
| 315 |
+
code is in no case prevented or interfered with solely because
|
| 316 |
+
modification has been made.
|
| 317 |
+
|
| 318 |
+
If you convey an object code work under this section in, or with, or
|
| 319 |
+
specifically for use in, a User Product, and the conveying occurs as
|
| 320 |
+
part of a transaction in which the right of possession and use of the
|
| 321 |
+
User Product is transferred to the recipient in perpetuity or for a
|
| 322 |
+
fixed term (regardless of how the transaction is characterized), the
|
| 323 |
+
Corresponding Source conveyed under this section must be accompanied
|
| 324 |
+
by the Installation Information. But this requirement does not apply
|
| 325 |
+
if neither you nor any third party retains the ability to install
|
| 326 |
+
modified object code on the User Product (for example, the work has
|
| 327 |
+
been installed in ROM).
|
| 328 |
+
|
| 329 |
+
The requirement to provide Installation Information does not include a
|
| 330 |
+
requirement to continue to provide support service, warranty, or updates
|
| 331 |
+
for a work that has been modified or installed by the recipient, or for
|
| 332 |
+
the User Product in which it has been modified or installed. Access to a
|
| 333 |
+
network may be denied when the modification itself materially and
|
| 334 |
+
adversely affects the operation of the network or violates the rules and
|
| 335 |
+
protocols for communication across the network.
|
| 336 |
+
|
| 337 |
+
Corresponding Source conveyed, and Installation Information provided,
|
| 338 |
+
in accord with this section must be in a format that is publicly
|
| 339 |
+
documented (and with an implementation available to the public in
|
| 340 |
+
source code form), and must require no special password or key for
|
| 341 |
+
unpacking, reading or copying.
|
| 342 |
+
|
| 343 |
+
7. Additional Terms.
|
| 344 |
+
|
| 345 |
+
"Additional permissions" are terms that supplement the terms of this
|
| 346 |
+
License by making exceptions from one or more of its conditions.
|
| 347 |
+
Additional permissions that are applicable to the entire Program shall
|
| 348 |
+
be treated as though they were included in this License, to the extent
|
| 349 |
+
that they are valid under applicable law. If additional permissions
|
| 350 |
+
apply only to part of the Program, that part may be used separately
|
| 351 |
+
under those permissions, but the entire Program remains governed by
|
| 352 |
+
this License without regard to the additional permissions.
|
| 353 |
+
|
| 354 |
+
When you convey a copy of a covered work, you may at your option
|
| 355 |
+
remove any additional permissions from that copy, or from any part of
|
| 356 |
+
it. (Additional permissions may be written to require their own
|
| 357 |
+
removal in certain cases when you modify the work.) You may place
|
| 358 |
+
additional permissions on material, added by you to a covered work,
|
| 359 |
+
for which you have or can give appropriate copyright permission.
|
| 360 |
+
|
| 361 |
+
Notwithstanding any other provision of this License, for material you
|
| 362 |
+
add to a covered work, you may (if authorized by the copyright holders of
|
| 363 |
+
that material) supplement the terms of this License with terms:
|
| 364 |
+
|
| 365 |
+
a) Disclaiming warranty or limiting liability differently from the
|
| 366 |
+
terms of sections 15 and 16 of this License; or
|
| 367 |
+
|
| 368 |
+
b) Requiring preservation of specified reasonable legal notices or
|
| 369 |
+
author attributions in that material or in the Appropriate Legal
|
| 370 |
+
Notices displayed by works containing it; or
|
| 371 |
+
|
| 372 |
+
c) Prohibiting misrepresentation of the origin of that material, or
|
| 373 |
+
requiring that modified versions of such material be marked in
|
| 374 |
+
reasonable ways as different from the original version; or
|
| 375 |
+
|
| 376 |
+
d) Limiting the use for publicity purposes of names of licensors or
|
| 377 |
+
authors of the material; or
|
| 378 |
+
|
| 379 |
+
e) Declining to grant rights under trademark law for use of some
|
| 380 |
+
trade names, trademarks, or service marks; or
|
| 381 |
+
|
| 382 |
+
f) Requiring indemnification of licensors and authors of that
|
| 383 |
+
material by anyone who conveys the material (or modified versions of
|
| 384 |
+
it) with contractual assumptions of liability to the recipient, for
|
| 385 |
+
any liability that these contractual assumptions directly impose on
|
| 386 |
+
those licensors and authors.
|
| 387 |
+
|
| 388 |
+
All other non-permissive additional terms are considered "further
|
| 389 |
+
restrictions" within the meaning of section 10. If the Program as you
|
| 390 |
+
received it, or any part of it, contains a notice stating that it is
|
| 391 |
+
governed by this License along with a term that is a further
|
| 392 |
+
restriction, you may remove that term. If a license document contains
|
| 393 |
+
a further restriction but permits relicensing or conveying under this
|
| 394 |
+
License, you may add to a covered work material governed by the terms
|
| 395 |
+
of that license document, provided that the further restriction does
|
| 396 |
+
not survive such relicensing or conveying.
|
| 397 |
+
|
| 398 |
+
If you add terms to a covered work in accord with this section, you
|
| 399 |
+
must place, in the relevant source files, a statement of the
|
| 400 |
+
additional terms that apply to those files, or a notice indicating
|
| 401 |
+
where to find the applicable terms.
|
| 402 |
+
|
| 403 |
+
Additional terms, permissive or non-permissive, may be stated in the
|
| 404 |
+
form of a separately written license, or stated as exceptions;
|
| 405 |
+
the above requirements apply either way.
|
| 406 |
+
|
| 407 |
+
8. Termination.
|
| 408 |
+
|
| 409 |
+
You may not propagate or modify a covered work except as expressly
|
| 410 |
+
provided under this License. Any attempt otherwise to propagate or
|
| 411 |
+
modify it is void, and will automatically terminate your rights under
|
| 412 |
+
this License (including any patent licenses granted under the third
|
| 413 |
+
paragraph of section 11).
|
| 414 |
+
|
| 415 |
+
However, if you cease all violation of this License, then your
|
| 416 |
+
license from a particular copyright holder is reinstated (a)
|
| 417 |
+
provisionally, unless and until the copyright holder explicitly and
|
| 418 |
+
finally terminates your license, and (b) permanently, if the copyright
|
| 419 |
+
holder fails to notify you of the violation by some reasonable means
|
| 420 |
+
prior to 60 days after the cessation.
|
| 421 |
+
|
| 422 |
+
Moreover, your license from a particular copyright holder is
|
| 423 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 424 |
+
violation by some reasonable means, this is the first time you have
|
| 425 |
+
received notice of violation of this License (for any work) from that
|
| 426 |
+
copyright holder, and you cure the violation prior to 30 days after
|
| 427 |
+
your receipt of the notice.
|
| 428 |
+
|
| 429 |
+
Termination of your rights under this section does not terminate the
|
| 430 |
+
licenses of parties who have received copies or rights from you under
|
| 431 |
+
this License. If your rights have been terminated and not permanently
|
| 432 |
+
reinstated, you do not qualify to receive new licenses for the same
|
| 433 |
+
material under section 10.
|
| 434 |
+
|
| 435 |
+
9. Acceptance Not Required for Having Copies.
|
| 436 |
+
|
| 437 |
+
You are not required to accept this License in order to receive or
|
| 438 |
+
run a copy of the Program. Ancillary propagation of a covered work
|
| 439 |
+
occurring solely as a consequence of using peer-to-peer transmission
|
| 440 |
+
to receive a copy likewise does not require acceptance. However,
|
| 441 |
+
nothing other than this License grants you permission to propagate or
|
| 442 |
+
modify any covered work. These actions infringe copyright if you do
|
| 443 |
+
not accept this License. Therefore, by modifying or propagating a
|
| 444 |
+
covered work, you indicate your acceptance of this License to do so.
|
| 445 |
+
|
| 446 |
+
10. Automatic Licensing of Downstream Recipients.
|
| 447 |
+
|
| 448 |
+
Each time you convey a covered work, the recipient automatically
|
| 449 |
+
receives a license from the original licensors, to run, modify and
|
| 450 |
+
propagate that work, subject to this License. You are not responsible
|
| 451 |
+
for enforcing compliance by third parties with this License.
|
| 452 |
+
|
| 453 |
+
An "entity transaction" is a transaction transferring control of an
|
| 454 |
+
organization, or substantially all assets of one, or subdividing an
|
| 455 |
+
organization, or merging organizations. If propagation of a covered
|
| 456 |
+
work results from an entity transaction, each party to that
|
| 457 |
+
transaction who receives a copy of the work also receives whatever
|
| 458 |
+
licenses to the work the party's predecessor in interest had or could
|
| 459 |
+
give under the previous paragraph, plus a right to possession of the
|
| 460 |
+
Corresponding Source of the work from the predecessor in interest, if
|
| 461 |
+
the predecessor has it or can get it with reasonable efforts.
|
| 462 |
+
|
| 463 |
+
You may not impose any further restrictions on the exercise of the
|
| 464 |
+
rights granted or affirmed under this License. For example, you may
|
| 465 |
+
not impose a license fee, royalty, or other charge for exercise of
|
| 466 |
+
rights granted under this License, and you may not initiate litigation
|
| 467 |
+
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
| 468 |
+
any patent claim is infringed by making, using, selling, offering for
|
| 469 |
+
sale, or importing the Program or any portion of it.
|
| 470 |
+
|
| 471 |
+
11. Patents.
|
| 472 |
+
|
| 473 |
+
A "contributor" is a copyright holder who authorizes use under this
|
| 474 |
+
License of the Program or a work on which the Program is based. The
|
| 475 |
+
work thus licensed is called the contributor's "contributor version".
|
| 476 |
+
|
| 477 |
+
A contributor's "essential patent claims" are all patent claims
|
| 478 |
+
owned or controlled by the contributor, whether already acquired or
|
| 479 |
+
hereafter acquired, that would be infringed by some manner, permitted
|
| 480 |
+
by this License, of making, using, or selling its contributor version,
|
| 481 |
+
but do not include claims that would be infringed only as a
|
| 482 |
+
consequence of further modification of the contributor version. For
|
| 483 |
+
purposes of this definition, "control" includes the right to grant
|
| 484 |
+
patent sublicenses in a manner consistent with the requirements of
|
| 485 |
+
this License.
|
| 486 |
+
|
| 487 |
+
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
| 488 |
+
patent license under the contributor's essential patent claims, to
|
| 489 |
+
make, use, sell, offer for sale, import and otherwise run, modify and
|
| 490 |
+
propagate the contents of its contributor version.
|
| 491 |
+
|
| 492 |
+
In the following three paragraphs, a "patent license" is any express
|
| 493 |
+
agreement or commitment, however denominated, not to enforce a patent
|
| 494 |
+
(such as an express permission to practice a patent or covenant not to
|
| 495 |
+
sue for patent infringement). To "grant" such a patent license to a
|
| 496 |
+
party means to make such an agreement or commitment not to enforce a
|
| 497 |
+
patent against the party.
|
| 498 |
+
|
| 499 |
+
If you convey a covered work, knowingly relying on a patent license,
|
| 500 |
+
and the Corresponding Source of the work is not available for anyone
|
| 501 |
+
to copy, free of charge and under the terms of this License, through a
|
| 502 |
+
publicly available network server or other readily accessible means,
|
| 503 |
+
then you must either (1) cause the Corresponding Source to be so
|
| 504 |
+
available, or (2) arrange to deprive yourself of the benefit of the
|
| 505 |
+
patent license for this particular work, or (3) arrange, in a manner
|
| 506 |
+
consistent with the requirements of this License, to extend the patent
|
| 507 |
+
license to downstream recipients. "Knowingly relying" means you have
|
| 508 |
+
actual knowledge that, but for the patent license, your conveying the
|
| 509 |
+
covered work in a country, or your recipient's use of the covered work
|
| 510 |
+
in a country, would infringe one or more identifiable patents in that
|
| 511 |
+
country that you have reason to believe are valid.
|
| 512 |
+
|
| 513 |
+
If, pursuant to or in connection with a single transaction or
|
| 514 |
+
arrangement, you convey, or propagate by procuring conveyance of, a
|
| 515 |
+
covered work, and grant a patent license to some of the parties
|
| 516 |
+
receiving the covered work authorizing them to use, propagate, modify
|
| 517 |
+
or convey a specific copy of the covered work, then the patent license
|
| 518 |
+
you grant is automatically extended to all recipients of the covered
|
| 519 |
+
work and works based on it.
|
| 520 |
+
|
| 521 |
+
A patent license is "discriminatory" if it does not include within
|
| 522 |
+
the scope of its coverage, prohibits the exercise of, or is
|
| 523 |
+
conditioned on the non-exercise of one or more of the rights that are
|
| 524 |
+
specifically granted under this License. You may not convey a covered
|
| 525 |
+
work if you are a party to an arrangement with a third party that is
|
| 526 |
+
in the business of distributing software, under which you make payment
|
| 527 |
+
to the third party based on the extent of your activity of conveying
|
| 528 |
+
the work, and under which the third party grants, to any of the
|
| 529 |
+
parties who would receive the covered work from you, a discriminatory
|
| 530 |
+
patent license (a) in connection with copies of the covered work
|
| 531 |
+
conveyed by you (or copies made from those copies), or (b) primarily
|
| 532 |
+
for and in connection with specific products or compilations that
|
| 533 |
+
contain the covered work, unless you entered into that arrangement,
|
| 534 |
+
or that patent license was granted, prior to 28 March 2007.
|
| 535 |
+
|
| 536 |
+
Nothing in this License shall be construed as excluding or limiting
|
| 537 |
+
any implied license or other defenses to infringement that may
|
| 538 |
+
otherwise be available to you under applicable patent law.
|
| 539 |
+
|
| 540 |
+
12. No Surrender of Others' Freedom.
|
| 541 |
+
|
| 542 |
+
If conditions are imposed on you (whether by court order, agreement or
|
| 543 |
+
otherwise) that contradict the conditions of this License, they do not
|
| 544 |
+
excuse you from the conditions of this License. If you cannot convey a
|
| 545 |
+
covered work so as to satisfy simultaneously your obligations under this
|
| 546 |
+
License and any other pertinent obligations, then as a consequence you may
|
| 547 |
+
not convey it at all. For example, if you agree to terms that obligate you
|
| 548 |
+
to collect a royalty for further conveying from those to whom you convey
|
| 549 |
+
the Program, the only way you could satisfy both those terms and this
|
| 550 |
+
License would be to refrain entirely from conveying the Program.
|
| 551 |
+
|
| 552 |
+
13. Use with the GNU Affero General Public License.
|
| 553 |
+
|
| 554 |
+
Notwithstanding any other provision of this License, you have
|
| 555 |
+
permission to link or combine any covered work with a work licensed
|
| 556 |
+
under version 3 of the GNU Affero General Public License into a single
|
| 557 |
+
combined work, and to convey the resulting work. The terms of this
|
| 558 |
+
License will continue to apply to the part which is the covered work,
|
| 559 |
+
but the special requirements of the GNU Affero General Public License,
|
| 560 |
+
section 13, concerning interaction through a network will apply to the
|
| 561 |
+
combination as such.
|
| 562 |
+
|
| 563 |
+
14. Revised Versions of this License.
|
| 564 |
+
|
| 565 |
+
The Free Software Foundation may publish revised and/or new versions of
|
| 566 |
+
the GNU General Public License from time to time. Such new versions will
|
| 567 |
+
be similar in spirit to the present version, but may differ in detail to
|
| 568 |
+
address new problems or concerns.
|
| 569 |
+
|
| 570 |
+
Each version is given a distinguishing version number. If the
|
| 571 |
+
Program specifies that a certain numbered version of the GNU General
|
| 572 |
+
Public License "or any later version" applies to it, you have the
|
| 573 |
+
option of following the terms and conditions either of that numbered
|
| 574 |
+
version or of any later version published by the Free Software
|
| 575 |
+
Foundation. If the Program does not specify a version number of the
|
| 576 |
+
GNU General Public License, you may choose any version ever published
|
| 577 |
+
by the Free Software Foundation.
|
| 578 |
+
|
| 579 |
+
If the Program specifies that a proxy can decide which future
|
| 580 |
+
versions of the GNU General Public License can be used, that proxy's
|
| 581 |
+
public statement of acceptance of a version permanently authorizes you
|
| 582 |
+
to choose that version for the Program.
|
| 583 |
+
|
| 584 |
+
Later license versions may give you additional or different
|
| 585 |
+
permissions. However, no additional obligations are imposed on any
|
| 586 |
+
author or copyright holder as a result of your choosing to follow a
|
| 587 |
+
later version.
|
| 588 |
+
|
| 589 |
+
15. Disclaimer of Warranty.
|
| 590 |
+
|
| 591 |
+
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
| 592 |
+
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
| 593 |
+
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
| 594 |
+
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
| 595 |
+
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
| 596 |
+
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
| 597 |
+
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
| 598 |
+
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
| 599 |
+
|
| 600 |
+
16. Limitation of Liability.
|
| 601 |
+
|
| 602 |
+
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
| 603 |
+
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
| 604 |
+
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
| 605 |
+
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
| 606 |
+
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
| 607 |
+
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
| 608 |
+
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
| 609 |
+
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
| 610 |
+
SUCH DAMAGES.
|
| 611 |
+
|
| 612 |
+
17. Interpretation of Sections 15 and 16.
|
| 613 |
+
|
| 614 |
+
If the disclaimer of warranty and limitation of liability provided
|
| 615 |
+
above cannot be given local legal effect according to their terms,
|
| 616 |
+
reviewing courts shall apply local law that most closely approximates
|
| 617 |
+
an absolute waiver of all civil liability in connection with the
|
| 618 |
+
Program, unless a warranty or assumption of liability accompanies a
|
| 619 |
+
copy of the Program in return for a fee.
|
| 620 |
+
|
| 621 |
+
END OF TERMS AND CONDITIONS
|
| 622 |
+
|
| 623 |
+
How to Apply These Terms to Your New Programs
|
| 624 |
+
|
| 625 |
+
If you develop a new program, and you want it to be of the greatest
|
| 626 |
+
possible use to the public, the best way to achieve this is to make it
|
| 627 |
+
free software which everyone can redistribute and change under these terms.
|
| 628 |
+
|
| 629 |
+
To do so, attach the following notices to the program. It is safest
|
| 630 |
+
to attach them to the start of each source file to most effectively
|
| 631 |
+
state the exclusion of warranty; and each file should have at least
|
| 632 |
+
the "copyright" line and a pointer to where the full notice is found.
|
| 633 |
+
|
| 634 |
+
<one line to give the program's name and a brief idea of what it does.>
|
| 635 |
+
Copyright (C) <year> <name of author>
|
| 636 |
+
|
| 637 |
+
This program is free software: you can redistribute it and/or modify
|
| 638 |
+
it under the terms of the GNU General Public License as published by
|
| 639 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 640 |
+
(at your option) any later version.
|
| 641 |
+
|
| 642 |
+
This program is distributed in the hope that it will be useful,
|
| 643 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 644 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 645 |
+
GNU General Public License for more details.
|
| 646 |
+
|
| 647 |
+
You should have received a copy of the GNU General Public License
|
| 648 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 649 |
+
|
| 650 |
+
Also add information on how to contact you by electronic and paper mail.
|
| 651 |
+
|
| 652 |
+
If the program does terminal interaction, make it output a short
|
| 653 |
+
notice like this when it starts in an interactive mode:
|
| 654 |
+
|
| 655 |
+
<program> Copyright (C) <year> <name of author>
|
| 656 |
+
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
| 657 |
+
This is free software, and you are welcome to redistribute it
|
| 658 |
+
under certain conditions; type `show c' for details.
|
| 659 |
+
|
| 660 |
+
The hypothetical commands `show w' and `show c' should show the appropriate
|
| 661 |
+
parts of the General Public License. Of course, your program's commands
|
| 662 |
+
might be different; for a GUI interface, you would use an "about box".
|
| 663 |
+
|
| 664 |
+
You should also get your employer (if you work as a programmer) or school,
|
| 665 |
+
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
| 666 |
+
For more information on this, and how to apply and follow the GNU GPL, see
|
| 667 |
+
<https://www.gnu.org/licenses/>.
|
| 668 |
+
|
| 669 |
+
The GNU General Public License does not permit incorporating your program
|
| 670 |
+
into proprietary programs. If your program is a subroutine library, you
|
| 671 |
+
may consider it more useful to permit linking proprietary applications with
|
| 672 |
+
the library. If this is what you want to do, use the GNU Lesser General
|
| 673 |
+
Public License instead of this License. But first, please read
|
| 674 |
+
<https://www.gnu.org/licen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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Coreutils Contribution Guidelines
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
Prerequisites
|
| 5 |
+
=============
|
| 6 |
+
You will need the "git" version control tools. On Fedora-based
|
| 7 |
+
systems, do "yum install git". On Debian-based ones install the
|
| 8 |
+
"git-core" package. Then run "git --version". If that says it's
|
| 9 |
+
older than version 1.6.4, then you'd do well to get a newer version.
|
| 10 |
+
At worst, just download the latest stable release from
|
| 11 |
+
https://git-scm.com/ and build from source.
|
| 12 |
+
|
| 13 |
+
For details on building the programs in this package, see the file,
|
| 14 |
+
README-hacking.
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
Use the latest upstream sources
|
| 18 |
+
===============================
|
| 19 |
+
Base any changes you make on the latest upstream sources. You can get
|
| 20 |
+
a copy of the latest with this command:
|
| 21 |
+
|
| 22 |
+
git clone https://git.savannah.gnu.org/git/coreutils.git
|
| 23 |
+
cd coreutils
|
| 24 |
+
|
| 25 |
+
That downloads the entire repository, including revision control history
|
| 26 |
+
dating back to 1991. The repository (the part you download, and which
|
| 27 |
+
resides in coreutils/.git) currently weighs in at about 30MB. So you
|
| 28 |
+
don't want to download it more often than necessary. Once downloaded,
|
| 29 |
+
you can get incremental updates by running one of these commands from
|
| 30 |
+
inside your new coreutils/ directory:
|
| 31 |
+
|
| 32 |
+
If you have made *no* changes:
|
| 33 |
+
git pull
|
| 34 |
+
|
| 35 |
+
If you *have* made changes and mistakenly committed them to "master",
|
| 36 |
+
do the following to put your changes on a private branch, "br", and
|
| 37 |
+
to restore master to its unmodified (relative-to-upstream) state:
|
| 38 |
+
git checkout -b br
|
| 39 |
+
git checkout master
|
| 40 |
+
git reset --hard origin
|
| 41 |
+
|
| 42 |
+
Then "git pull" should work.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
*Before* you commit changes
|
| 46 |
+
===========================
|
| 47 |
+
|
| 48 |
+
In this project, we much prefer patches that automatically record
|
| 49 |
+
authorship. That is important not just to give credit where due, but
|
| 50 |
+
also from a legal standpoint (see below). To create author-annotated
|
| 51 |
+
patches with git, you must first tell git who you are. That information
|
| 52 |
+
is best recorded in your ~/.gitconfig file. Edit that file, creating
|
| 53 |
+
it if needed, and put your name and email address in place of these
|
| 54 |
+
example values:
|
| 55 |
+
|
| 56 |
+
[user]
|
| 57 |
+
name = Joe X. User
|
| 58 |
+
email = joe.user@example.com
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
Your first commit: the quick and dirty way
|
| 62 |
+
==========================================
|
| 63 |
+
First of all, realize that to "commit" a change in git is a purely
|
| 64 |
+
local operation. It affects only the local repository (the .git/ dir)
|
| 65 |
+
in your current coreutils/ hierarchy.
|
| 66 |
+
|
| 67 |
+
To try this out, modify a file or two. If you create a new file, you'll
|
| 68 |
+
need to tell git about it with "git add new-file.c". Commit all changes
|
| 69 |
+
with "git commit -a". That prompts you for a log message, which should
|
| 70 |
+
include a one-line summary, a blank line, and ChangeLog-style entries
|
| 71 |
+
for all affected files. More on that below.
|
| 72 |
+
|
| 73 |
+
Once your change is committed, you can create a proper patch that includes
|
| 74 |
+
a log message and authorship information as well as any permissions
|
| 75 |
+
changes. Use this command to save that single, most-recent change set:
|
| 76 |
+
|
| 77 |
+
git format-patch --stdout -1 > DIFF
|
| 78 |
+
|
| 79 |
+
The trouble with this approach is that you've just checked in a change
|
| 80 |
+
(remember, it's only local) on the "master" branch, and that's where new
|
| 81 |
+
changes would normally appear when you pull the latest from "upstream".
|
| 82 |
+
When you "pull" from a remote repository to get the latest, your local
|
| 83 |
+
changes on "master" may well induce conflicts. For this reason, you
|
| 84 |
+
may want to keep "master" free of any local changes, so that you can
|
| 85 |
+
use it to track unadulterated upstream sources.
|
| 86 |
+
|
| 87 |
+
However, if your cloned directory is for a one-shot patch submission and
|
| 88 |
+
you're going to remove it right afterwards, then this approach is fine.
|
| 89 |
+
Otherwise, for a more sustainable (and more generally useful, IMHO)
|
| 90 |
+
process, read on about "topic" branches.
|
| 91 |
+
|
| 92 |
+
|
| 93 |
+
Make your changes on a private "topic" branch
|
| 94 |
+
=============================================
|
| 95 |
+
So you checked out coreutils like this:
|
| 96 |
+
|
| 97 |
+
git clone https://git.savannah.gnu.org/git/coreutils.git
|
| 98 |
+
|
| 99 |
+
Now, cd into the coreutils/ directory and run:
|
| 100 |
+
|
| 101 |
+
git checkout -b my-topic
|
| 102 |
+
|
| 103 |
+
That creates the my-topic branch and puts you on it.
|
| 104 |
+
To see which branch you're on, type "git branch".
|
| 105 |
+
Right after the clone, you were on "master" (aka the trunk).
|
| 106 |
+
To get back to the trunk, do this:
|
| 107 |
+
|
| 108 |
+
git checkout master
|
| 109 |
+
|
| 110 |
+
Note 1:
|
| 111 |
+
Be careful to run "git pull" only when on the "master" branch,
|
| 112 |
+
not when on a branch. With newer versions of git, you can't cause
|
| 113 |
+
trouble if you forget, so this is a good reason to ensure you're
|
| 114 |
+
using 1.5.3.1 or newer.
|
| 115 |
+
|
| 116 |
+
Note 2:
|
| 117 |
+
It's best not to try to switch from one branch to another if
|
| 118 |
+
you have pending (uncommitted) changes. Sometimes it works,
|
| 119 |
+
sometimes the checkout will fail, telling you that your local
|
| 120 |
+
modifications conflict with changes required to switch branches.
|
| 121 |
+
However, in any case, you will *not* lose your uncommitted changes.
|
| 122 |
+
Run "git stash" to temporarily hide uncommitted changes in your
|
| 123 |
+
local directory, restoring a clean working directory.
|
| 124 |
+
|
| 125 |
+
Anyhow, get back onto your just-created branch:
|
| 126 |
+
|
| 127 |
+
git checkout my-topic
|
| 128 |
+
|
| 129 |
+
Now, modify some file and commit it:
|
| 130 |
+
|
| 131 |
+
git commit some-file.c
|
| 132 |
+
|
| 133 |
+
Personally, no matter what package I'm working on, I find it useful to
|
| 134 |
+
put the ChangeLog entries *only* in the commit log, initially, unless
|
| 135 |
+
I plan to commit/push right away. Otherwise, I tend to get unnecessary
|
| 136 |
+
merge conflicts with each rebase (see below). In coreutils, I've gone
|
| 137 |
+
a step further, and no longer maintain an explicit ChangeLog file in
|
| 138 |
+
version control. Instead, in a git working directory, you can view
|
| 139 |
+
ChangeLog information via "git log". However, each distribution tarball
|
| 140 |
+
does include a ChangeLog file that is automatically generated from the
|
| 141 |
+
git logs.
|
| 142 |
+
|
| 143 |
+
So, you've committed a change. But it's only in your local repository,
|
| 144 |
+
and only on your "my-topic" branch. Let's say you wait a day, and
|
| 145 |
+
then see that someone else changed something and pushed it to the
|
| 146 |
+
public repository. Now, you want to update your trunk and "rebase"
|
| 147 |
+
your changes on the branch so that they are once again relative to the
|
| 148 |
+
tip of the trunk. Currently, your branch is attached to the trunk at
|
| 149 |
+
the next-to-last change set.
|
| 150 |
+
|
| 151 |
+
First: update the trunk from the public repo:
|
| 152 |
+
[you've first made sure that "git diff" produces no output]
|
| 153 |
+
|
| 154 |
+
git checkout master
|
| 155 |
+
git pull
|
| 156 |
+
|
| 157 |
+
Now, return to your branch, and "rebase" relative to trunk (master):
|
| 158 |
+
|
| 159 |
+
git checkout my-topic
|
| 160 |
+
git rebase master
|
| 161 |
+
|
| 162 |
+
If there are no conflicts, this requires no more work from you.
|
| 163 |
+
However, let's say there was one in ChangeLog, since you didn't
|
| 164 |
+
follow my advice and modified it anyway.
|
| 165 |
+
git rebase will tell you there was a conflict and in which
|
| 166 |
+
file, and instruct you to resolve it and then resume with
|
| 167 |
+
"git rebase --continue" once that's done.
|
| 168 |
+
|
| 169 |
+
So you resolve as usual, by editing ChangeLog (which has the
|
| 170 |
+
usual conflict markers), then type "git rebase --continue".
|
| 171 |
+
That will fail, with a diagnostic telling you to mark
|
| 172 |
+
the file as "conflict resolved" by doing this:
|
| 173 |
+
|
| 174 |
+
git add ChangeLog
|
| 175 |
+
|
| 176 |
+
Then, finally, you can proceed (possibly onto more conflict resolution,
|
| 177 |
+
if there are conflicts in other files):
|
| 178 |
+
|
| 179 |
+
git rebase --continue
|
| 180 |
+
|
| 181 |
+
Once it finishes, your changes on the branch are now relative to
|
| 182 |
+
the tip of the trunk.
|
| 183 |
+
|
| 184 |
+
Now use git format-patch, as above.
|
| 185 |
+
|
| 186 |
+
|
| 187 |
+
Amending the most recent change on your private branch
|
| 188 |
+
======================================================
|
| 189 |
+
Let's say you've just committed a change on your private
|
| 190 |
+
branch, and then realize that something about it is not right.
|
| 191 |
+
It's easy to adjust:
|
| 192 |
+
|
| 193 |
+
edit your files # this can include running "git add NEW" or "git rm BAD"
|
| 194 |
+
git commit --amend -a
|
| 195 |
+
git format-patch --stdout -1 > your-branch.diff
|
| 196 |
+
|
| 197 |
+
That replaces the most recent change-set with the revised one.
|
| 198 |
+
|
| 199 |
+
|
| 200 |
+
|
| 201 |
+
Coreutils-specific:
|
| 202 |
+
|
| 203 |
+
No more ChangeLog files
|
| 204 |
+
=======================
|
| 205 |
+
Do not modify any of the ChangeLog files in coreutils. Starting in
|
| 206 |
+
2008, the policy changed. Before, we would insert the exact same text
|
| 207 |
+
(or worse, sometimes slightly differing) into both the ChangeLog file
|
| 208 |
+
and the commit log. Now we put that information only in the commit log,
|
| 209 |
+
and generate the top-level ChangeLog file from logs at "make dist" time.
|
| 210 |
+
As such, there are strict requirements on the form of the commit log
|
| 211 |
+
messages.
|
| 212 |
+
|
| 213 |
+
|
| 214 |
+
Commit log requirements
|
| 215 |
+
=======================
|
| 216 |
+
Your commit log should always start with a one-line summary, the second
|
| 217 |
+
line should be blank, and the remaining lines are usually ChangeLog-style
|
| 218 |
+
entries for all affected files. However, it's fine -- even recommended --
|
| 219 |
+
to write a few lines of prose describing the change, when the summary
|
| 220 |
+
and ChangeLog entries don't give enough of the big picture. Omit the
|
| 221 |
+
leading TABs that you're used to seeing in a "real" ChangeLog file, but
|
| 222 |
+
keep the maximum line length at 72 or smaller, so that the generated
|
| 223 |
+
ChangeLog lines, each with its leading TAB, will not exceed 80 columns.
|
| 224 |
+
As for the ChangeLog-style content, please follow these guidelines:
|
| 225 |
+
|
| 226 |
+
https://www.gnu.org/prep/standards/standards.html#Change-Logs
|
| 227 |
+
|
| 228 |
+
Try to make the summary line fit one of the following forms:
|
| 229 |
+
|
| 230 |
+
program_name: change-description
|
| 231 |
+
prog1, prog2: change-description
|
| 232 |
+
doc: change-description
|
| 233 |
+
tests: change-description
|
| 234 |
+
build: change-description
|
| 235 |
+
maint: change-description
|
| 236 |
+
|
| 237 |
+
If your commit fixes a bug, try to find the commit that introduced that
|
| 238 |
+
bug. If you do that, add a note in your new commit log saying something
|
| 239 |
+
like "Introduced by commit v8.12-103-g54cbe6e." and add something like
|
| 240 |
+
[bug introduced in coreutils-8.13] in the corresponding NEWS blurb.
|
| 241 |
+
Assuming you found the bug in commit 54cbe6e6, "git describe 54cbe6e6"
|
| 242 |
+
will print the longer tag-relative string that you'll need.
|
| 243 |
+
Note that we used to use an 8-byte SHA1 prefix like "54cbe6e6", because
|
| 244 |
+
that was automatically rendered as a clickable link by "gitk", but with
|
| 245 |
+
git-1.7.10, the more descriptive version-containing "git describe" format
|
| 246 |
+
that we now require is also highlighted.
|
| 247 |
+
|
| 248 |
+
|
| 249 |
+
Curly braces: use judiciously
|
| 250 |
+
=============================
|
| 251 |
+
Omit the curly braces around an "if", "while", "for" etc. body only when
|
| 252 |
+
that body occupies a single line. In every other case we require the braces.
|
| 253 |
+
This ensures that it is trivially easy to identify a single-*statement* loop:
|
| 254 |
+
each has only one *line* in its body.
|
| 255 |
+
|
| 256 |
+
Omitting braces with a single-line body is fine:
|
| 257 |
+
|
| 258 |
+
while (expr)
|
| 259 |
+
single_line_stmt ();
|
| 260 |
+
|
| 261 |
+
However, the moment your loop/if/else body extends onto a second line,
|
| 262 |
+
for whatever reason (even if it's just an added comment), then you should
|
| 263 |
+
add braces. Otherwise, it would be too easy to insert a statement just
|
| 264 |
+
before that comment (without adding braces), thinking it is already a
|
| 265 |
+
multi-statement loop:
|
| 266 |
+
|
| 267 |
+
while (true)
|
| 268 |
+
/* comment... */ // BAD: multi-line body without braces
|
| 269 |
+
single_line_stmt ();
|
| 270 |
+
|
| 271 |
+
Do this instead:
|
| 272 |
+
|
| 273 |
+
while (true)
|
| 274 |
+
{ /* Always put braces around a multi-line body. */
|
| 275 |
+
/* explanation... */
|
| 276 |
+
single_line_stmt ();
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
There is one exception: when the second body line is not at the same
|
| 280 |
+
indentation level as the first body line.
|
| 281 |
+
|
| 282 |
+
if (expr)
|
| 283 |
+
error (0, 0, _("a diagnostic that would make this line"
|
| 284 |
+
" extend past the 80-column limit"));
|
| 285 |
+
|
| 286 |
+
It is safe to omit the braces in the code above, since the
|
| 287 |
+
further-indented second body line makes it obvious that this is still
|
| 288 |
+
a single-statement body.
|
| 289 |
+
|
| 290 |
+
To reiterate, don't do this:
|
| 291 |
+
|
| 292 |
+
if (expr)
|
| 293 |
+
while (expr_2) // BAD: multi-line body without braces
|
| 294 |
+
{
|
| 295 |
+
...
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
Do this, instead:
|
| 299 |
+
|
| 300 |
+
if (expr)
|
| 301 |
+
{
|
| 302 |
+
while (expr_2)
|
| 303 |
+
{
|
| 304 |
+
...
|
| 305 |
+
}
|
| 306 |
+
}
|
| 307 |
+
|
| 308 |
+
However, there is one exception in the other direction, when even a
|
| 309 |
+
one-line block should have braces. That occurs when that one-line,
|
| 310 |
+
brace-less block is an "else" block, and the corresponding "then" block
|
| 311 |
+
*does* use braces. In that case, either put braces around the "else"
|
| 312 |
+
block, or negate the "if"-condition and swap the bodies, putting the
|
| 313 |
+
one-line block first and making the longer, multi-line block be the
|
| 314 |
+
"else" block.
|
| 315 |
+
|
| 316 |
+
if (expr)
|
| 317 |
+
{
|
| 318 |
+
...
|
| 319 |
+
...
|
| 320 |
+
}
|
| 321 |
+
else
|
| 322 |
+
x = y; // BAD: braceless "else" with braced "then"
|
| 323 |
+
|
| 324 |
+
This is preferred, especially when the multi-line body is more than a
|
| 325 |
+
few lines long, because it is easier to read and grasp the semantics of
|
| 326 |
+
an if-then-else block when the simpler block occurs first, rather than
|
| 327 |
+
after the more involved block:
|
| 328 |
+
|
| 329 |
+
if (!expr)
|
| 330 |
+
x = y; /* more readable */
|
| 331 |
+
else
|
| 332 |
+
{
|
| 333 |
+
...
|
| 334 |
+
...
|
| 335 |
+
}
|
| 336 |
+
|
| 337 |
+
If you'd rather not negate the condition, then add braces:
|
| 338 |
+
|
| 339 |
+
if (expr)
|
| 340 |
+
{
|
| 341 |
+
...
|
| 342 |
+
...
|
| 343 |
+
}
|
| 344 |
+
else
|
| 345 |
+
{
|
| 346 |
+
x = y;
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
|
| 350 |
+
Use SPACE-only indentation in all[*] files
|
| 351 |
+
==========================================
|
| 352 |
+
We use space-only indentation in nearly all files.
|
| 353 |
+
If you use Emacs and your coreutils working directory name matches,
|
| 354 |
+
this code enables the right mode:
|
| 355 |
+
|
| 356 |
+
;; In coreutils, indent with spaces everywhere (not TABs).
|
| 357 |
+
;; Exceptions: Makefile and ChangeLog modes.
|
| 358 |
+
(add-hook 'find-file-hook '(lambda ()
|
| 359 |
+
(if (and buffer-file-name
|
| 360 |
+
(string-match "/coreutils\\>" (buffer-file-name))
|
| 361 |
+
(not (string-equal mode-name "Change Log"))
|
| 362 |
+
(not (string-equal mode-name "Makefile")))
|
| 363 |
+
(setq indent-tabs-mode nil))))
|
| 364 |
+
|
| 365 |
+
If you use vim (7+ compiled with autocommands), and coreutils working
|
| 366 |
+
directory name also matches, add the following in ~/.vimrc:
|
| 367 |
+
|
| 368 |
+
" Set GNU style indentation, spaces instead of TABs
|
| 369 |
+
function! CoreutilsIndent()
|
| 370 |
+
" Check if 'coreutils' is part of the current working directory
|
| 371 |
+
if match(getcwd(), "coreutils") > 0
|
| 372 |
+
" The next 3 lines below set the GNU indentation
|
| 373 |
+
setlocal cinoptions=>4,n-2,{2,^-2,:2,=2,g0,h2,p5,t0,+2,(0,u0,w1,m1
|
| 374 |
+
setlocal shiftwidth=2
|
| 375 |
+
setlocal tabstop=8
|
| 376 |
+
" Coreutils specific, expand TABs with spaces
|
| 377 |
+
setlocal expandtab
|
| 378 |
+
endif
|
| 379 |
+
endfunction
|
| 380 |
+
|
| 381 |
+
autocmd BufEnter *.c,*.h call CoreutilsIndent()
|
| 382 |
+
|
| 383 |
+
[*] Makefile and ChangeLog files are exempt, of course.
|
| 384 |
+
|
| 385 |
+
|
| 386 |
+
Send patches to the address listed in --help output
|
| 387 |
+
===================================================
|
| 388 |
+
Please follow the guidelines in the "Sending your patches." section of
|
| 389 |
+
git's own SubmittingPatches:
|
| 390 |
+
|
| 391 |
+
https://github.com/git/git/blob/master/Documentation/SubmittingPatches
|
| 392 |
+
|
| 393 |
+
|
| 394 |
+
Add documentation
|
| 395 |
+
=================
|
| 396 |
+
If you add a feature or change some user-visible aspect of a program,
|
| 397 |
+
document it. If you add an option, document it both in --help output
|
| 398 |
+
(i.e., in the usage function that generates the --help output) and in
|
| 399 |
+
doc/*.texi. The man pages are generated from --help output, so
|
| 400 |
+
you shouldn't need to change anything under man/. User-visible changes
|
| 401 |
+
are usually documented in NEWS, too.
|
| 402 |
+
|
| 403 |
+
When writing prose (documentation, comments, log entries), use an
|
| 404 |
+
active voice, not a passive one. I.e., say "print the frobnozzle",
|
| 405 |
+
not "the frobnozzle will be printed".
|
| 406 |
+
|
| 407 |
+
Please add comments per the GNU Coding Standard:
|
| 408 |
+
https://www.gnu.org/prep/standards/html_node/Comments.html
|
| 409 |
+
|
| 410 |
+
|
| 411 |
+
Minor syntactic preferences
|
| 412 |
+
===========================
|
| 413 |
+
[I hesitate to write this one down, because it appears to be an
|
| 414 |
+
acquired taste, at least for native-English speakers. It seems odd
|
| 415 |
+
(if not truly backwards) to nearly anyone who doesn't have a strong
|
| 416 |
+
mathematics background and perhaps a streak of something odd in their
|
| 417 |
+
character ;-) ]
|
| 418 |
+
In writing arithmetic comparisons, use "<" and "<=" rather than
|
| 419 |
+
">" and ">=". For some justification, read this:
|
| 420 |
+
http://www.gelato.unsw.edu.au/archives/git/0505/4507.html
|
| 421 |
+
|
| 422 |
+
const placement:
|
| 423 |
+
Write "Type const *var", not "const Type *var".
|
| 424 |
+
FIXME: dig up justification
|
| 425 |
+
|
| 426 |
+
|
| 427 |
+
Be nice to translators
|
| 428 |
+
======================
|
| 429 |
+
Don't change translatable strings if you can avoid it.
|
| 430 |
+
If you must rearrange individual lines (e.g., in multi-line --help
|
| 431 |
+
strings), extract and create new strings, rather than extracting
|
| 432 |
+
and moving into existing blocks. This avoids making unnecessary
|
| 433 |
+
work for translators.
|
| 434 |
+
|
| 435 |
+
|
| 436 |
+
Add tests
|
| 437 |
+
==========
|
| 438 |
+
Nearly every significant change must be accompanied by a test suite
|
| 439 |
+
addition that exercises it. If you fix a bug, add at least one test that
|
| 440 |
+
fails without the patch, but that succeeds once your patch is applied.
|
| 441 |
+
If you add a feature, add tests to exercise as much of the new code
|
| 442 |
+
as possible. If you add a new test file (as opposed to adding a test to
|
| 443 |
+
an existing test file) add the new test file to 'tests/local.mk'.
|
| 444 |
+
Note to run tests/misc/new-test in isolation you can do:
|
| 445 |
+
|
| 446 |
+
make check TESTS=tests/misc/new-test SUBDIRS=. VERBOSE=yes
|
| 447 |
+
|
| 448 |
+
Variables that are significant for tests with their default values are:
|
| 449 |
+
|
| 450 |
+
VERBOSE=yes
|
| 451 |
+
RUN_EXPENSIVE_TESTS=no
|
| 452 |
+
RUN_VERY_EXPENSIVE_TESTS=no
|
| 453 |
+
SHELL=/bin/sh
|
| 454 |
+
NON_ROOT_USERNAME=nobody
|
| 455 |
+
NON_ROOT_GID=$(id -g $NON_ROOT_USERNAME)
|
| 456 |
+
COREUTILS_GROUPS=$(id -G)
|
| 457 |
+
|
| 458 |
+
There are hundreds of tests in the tests/ directories. You can use
|
| 459 |
+
tests/sample-test as a template, or one of the various Perl-based ones
|
| 460 |
+
in tests/misc.
|
| 461 |
+
|
| 462 |
+
If writing tests is not your thing, don't worry too much about it,
|
| 463 |
+
but do provide scenarios, input/output pairs, or whatever, along with
|
| 464 |
+
examples of running the tool to demonstrate the new or changed feature,
|
| 465 |
+
and someone else will massage that into a test (writing portable tests
|
| 466 |
+
can be a challenge).
|
| 467 |
+
|
| 468 |
+
|
| 469 |
+
Copyright assignment
|
| 470 |
+
====================
|
| 471 |
+
If your change is significant (i.e., if it adds more than ~10 lines),
|
| 472 |
+
then you'll have to have a copyright assignment on file with the FSF.
|
| 473 |
+
Since that involves first an email exchange between you and the FSF,
|
| 474 |
+
and then the exchange (FSF to you, then back) of an actual sheet of paper
|
| 475 |
+
with your signature on it, and finally, some administrative processing
|
| 476 |
+
in Boston, the process can take a few weeks.
|
| 477 |
+
|
| 478 |
+
The forms to choose from are in gnulib's doc/Copyright/ directory.
|
| 479 |
+
If you want to assign a single change, you should use the file,
|
| 480 |
+
doc/Copyright/request-assign.changes:
|
| 481 |
+
|
| 482 |
+
https://www.gnu.org/software/gnulib/Copyright/request-assign.changes
|
| 483 |
+
|
| 484 |
+
If you would like to assign past and future contributions to a project,
|
| 485 |
+
you'd use doc/Copyright/request-assign.future:
|
| 486 |
+
|
| 487 |
+
https://www.gnu.org/software/gnulib/Copyright/request-assign.future
|
| 488 |
+
|
| 489 |
+
You may make assignments for up to four projects at a time.
|
| 490 |
+
|
| 491 |
+
In case you're wondering why we bother with all of this, read this:
|
| 492 |
+
|
| 493 |
+
https://www.gnu.org/licenses/why-assign.html
|
| 494 |
+
|
| 495 |
+
|
| 496 |
+
Run "make syntax-check", or even "make distcheck"
|
| 497 |
+
================================================
|
| 498 |
+
Making either of those targets runs many integrity and
|
| 499 |
+
project-specific policy-conformance tests. For example, the former
|
| 500 |
+
ensures that you add no trailing blanks and no uses of certain deprecated
|
| 501 |
+
functions. The latter performs all "syntax-check" tests, and also
|
| 502 |
+
ensures that the build completes with no warnings when using a certain
|
| 503 |
+
set of gcc -W... options. Don't even bother running "make distcheck"
|
| 504 |
+
unless you have a reasonably up to date installation including recent
|
| 505 |
+
versions of gcc and the linux kernel, and modern GNU tools.
|
| 506 |
+
|
| 507 |
+
|
| 508 |
+
Ensure that your changes are indented properly.
|
| 509 |
+
===============================================
|
| 510 |
+
Format the code the way GNU indent does.
|
| 511 |
+
Filtering most source files through "indent --no-tabs" should
|
| 512 |
+
induce no change in indentation. Try not to add any more.
|
| 513 |
+
|
| 514 |
+
|
| 515 |
+
Avoid trailing white space
|
| 516 |
+
==========================
|
| 517 |
+
You may notice that the only trailing blanks in coreutils'
|
| 518 |
+
version-controlled files are in a single directory: tests/pr,
|
| 519 |
+
which contains expected output from various invocations of pr.
|
| 520 |
+
|
| 521 |
+
Do not add any more trailing blanks anywhere. While "make syntax-check"
|
| 522 |
+
will alert you if you slip up, it's better to nip any problem in the
|
| 523 |
+
bud, as you're typing. A good way to help you adapt to this rule is
|
| 524 |
+
to configure your editor to highlight any offending characters in the
|
| 525 |
+
files you edit. If you use Emacs, customize its font-lock mode
|
| 526 |
+
or use its WhiteSpace mode:
|
| 527 |
+
|
| 528 |
+
https://www.emacswiki.org/emacs/WhiteSpace
|
| 529 |
+
|
| 530 |
+
If you use vim, add this to ~/.vimrc:
|
| 531 |
+
|
| 532 |
+
let c_space_errors=1
|
| 533 |
+
highlight RedundantSpaces ctermbg=red guibg=red
|
| 534 |
+
match RedundantSpaces /\s\+$\| \+\ze\t/
|
| 535 |
+
|
| 536 |
+
|
| 537 |
+
Git can help too, by stopping you from committing any change that would
|
| 538 |
+
add trailing blanks. The example pre-commit hook contains code to check
|
| 539 |
+
for trailing whitespace and spaces before tabs; enable it by moving it
|
| 540 |
+
to the right place and making sure it is executable:
|
| 541 |
+
|
| 542 |
+
mv .git/hooks/pre-commit.sample .git/hooks/pre-commit
|
| 543 |
+
|
| 544 |
+
With a repository created by git-1.5.6 or older, use this command:
|
| 545 |
+
|
| 546 |
+
chmod +x .git/hooks/pre-commit
|
| 547 |
+
|
| 548 |
+
To manually check for whitespace errors before committing, you can use
|
| 549 |
+
|
| 550 |
+
git diff --check
|
| 551 |
+
|
| 552 |
+
Git also has some settings to enable suitable internal whitespace checks.
|
| 553 |
+
See the manpage for git-apply for details.
|
| 554 |
+
|
| 555 |
+
|
| 556 |
+
-------------------------------------------
|
| 557 |
+
|
| 558 |
+
Miscellaneous useful git commands
|
| 559 |
+
=================================
|
| 560 |
+
|
| 561 |
+
* gitk: give a graphical view of the revision graph of the current branch
|
| 562 |
+
* gitk --all: same, but display all branches
|
| 563 |
+
* git log: to get most of the same info in text form
|
| 564 |
+
* git log -p: same as above, but with diffs
|
| 565 |
+
* git log -p SOME_FILE: same as above, but limit to SOME_FILE
|
| 566 |
+
* git log -p -2 SOME_FILE: same as above, but print only two deltas
|
| 567 |
+
* git log -p -1: print the most recently committed change set
|
| 568 |
+
* git format-patch --stdout -1 > FILE: output the most recently committed
|
| 569 |
+
change set, in a format suitable to be submitted and/or applied via
|
| 570 |
+
"git am FILE".
|
| 571 |
+
* git reset --soft HEAD^: Commit the delta required to restore
|
| 572 |
+
state to the revision just before HEAD (i.e., next-to-last).
|
| 573 |
+
* git rebase -i master: run this from on a branch, and it gives
|
| 574 |
+
you an interface with which you can reorder and modify arbitrary
|
| 575 |
+
change sets on that branch.
|
| 576 |
+
|
| 577 |
+
* if you "misplace" a change set, i.e., via git reset --hard ..., so that
|
| 578 |
+
it's no longer reachable by any branch, you can use "git fsck" to find
|
| 579 |
+
its SHA1 and then tag it or cherry-pick it onto an existing branch.
|
| 580 |
+
For example, run this:
|
| 581 |
+
git fsck --lost-found HEAD && cd .git/lost-found/commit \
|
| 582 |
+
&& for i in *; do git show $i|grep SOME_IDENTIFYING_STRING \
|
| 583 |
+
&& echo $i; done
|
| 584 |
+
The "git fsck ..." command creates the .git/lost-found/... hierarchy
|
| 585 |
+
listing all unreachable objects. Then the for loop
|
| 586 |
+
print SHA1s for commits that match via log or patch.
|
| 587 |
+
For example, say that found 556fbb57216b119155cdda824c98dc579b8121c8,
|
| 588 |
+
you could run "git show 556fbb57216b119" to examine the change set,
|
| 589 |
+
or "git checkout -b found 556fbb5721" to give it a branch name.
|
| 590 |
+
Finally, you might run "git checkout master && git cherry-pick 556fbb5721"
|
| 591 |
+
to put that change on the tip of "master".
|
| 592 |
+
|
| 593 |
+
-------------------------------------------
|
| 594 |
+
|
| 595 |
+
Finding things to do
|
| 596 |
+
====================
|
| 597 |
+
If you don't know where to start, check out the TODO file for projects
|
| 598 |
+
that look like they're at your skill-/interest-level. Another good
|
| 599 |
+
option is always to improve tests. You never know what you might
|
| 600 |
+
uncover when you improve test coverage, and even if you don't find
|
| 601 |
+
any bugs your contribution is sure to be appreciated.
|
| 602 |
+
|
| 603 |
+
A good way to quickly assess current test coverage, for standard
|
| 604 |
+
and root only tests, is to follow these steps (requires lcov to be installed):
|
| 605 |
+
|
| 606 |
+
# Do a standard run as the current user
|
| 607 |
+
make -j$(nproc) coverage
|
| 608 |
+
|
| 609 |
+
# Add the root only tests
|
| 610 |
+
sudo make -j$(nproc) build-coverage NON_ROOT_USERNAME=$USER SUBDIRS=.
|
| 611 |
+
|
| 612 |
+
# Generate the report with the combined results
|
| 613 |
+
make gen-coverage
|
| 614 |
+
|
| 615 |
+
# view the HTML report:
|
| 616 |
+
xdg-open doc/coverage/index.html
|
| 617 |
+
|
| 618 |
+
========================================================================
|
| 619 |
+
Copyright (C) 2009-2025 Free Software Foundation, Inc.
|
| 620 |
+
|
| 621 |
+
Permission is granted to copy, distribute and/or modify this document
|
| 622 |
+
under the terms of the GNU Free Documentation License, Version 1.3 or
|
| 623 |
+
any later version published by the Free Software Foundation; with no
|
| 624 |
+
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
| 625 |
+
Texts. A copy of the license is included in the "GNU Free
|
| 626 |
+
Documentation License" file as part of this distribution.
|
Makefile.am
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Make coreutils. -*-Makefile-*-
|
| 2 |
+
|
| 3 |
+
# Copyright (C) 1990-2025 Free Software Foundation, Inc.
|
| 4 |
+
|
| 5 |
+
# This program is free software: you can redistribute it and/or modify
|
| 6 |
+
# it under the terms of the GNU General Public License as published by
|
| 7 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 8 |
+
# (at your option) any later version.
|
| 9 |
+
|
| 10 |
+
# This program is distributed in the hope that it will be useful,
|
| 11 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
+
# GNU General Public License for more details.
|
| 14 |
+
|
| 15 |
+
# You should have received a copy of the GNU General Public License
|
| 16 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 17 |
+
|
| 18 |
+
ALL_RECURSIVE_TARGETS =
|
| 19 |
+
|
| 20 |
+
SUBDIRS = po . gnulib-tests
|
| 21 |
+
|
| 22 |
+
EXTRA_DIST = \
|
| 23 |
+
.mailmap \
|
| 24 |
+
.prev-version \
|
| 25 |
+
.version \
|
| 26 |
+
.vg-suppressions \
|
| 27 |
+
README-install \
|
| 28 |
+
THANKS.in \
|
| 29 |
+
THANKS-to-translators \
|
| 30 |
+
THANKStt.in \
|
| 31 |
+
bootstrap \
|
| 32 |
+
bootstrap.conf \
|
| 33 |
+
build-aux/gen-lists-of-programs.sh \
|
| 34 |
+
build-aux/gen-single-binary.sh \
|
| 35 |
+
cfg.mk \
|
| 36 |
+
dist-check.mk \
|
| 37 |
+
maint.mk \
|
| 38 |
+
tests/GNUmakefile \
|
| 39 |
+
thanks-gen
|
| 40 |
+
|
| 41 |
+
gen_progs_lists = $(top_srcdir)/build-aux/gen-lists-of-programs.sh
|
| 42 |
+
gen_single_binary = $(top_srcdir)/build-aux/gen-single-binary.sh
|
| 43 |
+
|
| 44 |
+
# Keep these in sync with bootstrap.conf:bootstrap_post_import_hook().
|
| 45 |
+
# Use '$(top_srcdir)/m4' and '$(srcdir)/src' for the benefit of non-GNU
|
| 46 |
+
# makes: it is with those directories that 'cu-progs.m4' and 'cu-progs.mk'
|
| 47 |
+
# appear in our dependencies.
|
| 48 |
+
$(top_srcdir)/m4/cu-progs.m4: $(gen_progs_lists)
|
| 49 |
+
$(AM_V_GEN)rm -f $@ $@-t \
|
| 50 |
+
&& $(SHELL) $(gen_progs_lists) --autoconf >$@-t \
|
| 51 |
+
&& chmod a-w $@-t && mv -f $@-t $@
|
| 52 |
+
$(srcdir)/src/cu-progs.mk: $(gen_progs_lists)
|
| 53 |
+
$(AM_V_GEN)rm -f $@ $@-t \
|
| 54 |
+
&& $(SHELL) $(gen_progs_lists) --automake >$@-t \
|
| 55 |
+
&& chmod a-w $@-t && mv -f $@-t $@
|
| 56 |
+
$(srcdir)/src/single-binary.mk: $(gen_single_binary) $(srcdir)/src/local.mk
|
| 57 |
+
$(AM_V_GEN)rm -f $@ $@-t \
|
| 58 |
+
&& $(SHELL) $(gen_single_binary) $(srcdir)/src/local.mk >$@-t \
|
| 59 |
+
&& chmod a-w $@-t && mv -f $@-t $@
|
| 60 |
+
|
| 61 |
+
ACLOCAL_AMFLAGS = -I m4
|
| 62 |
+
|
| 63 |
+
# Shortcut targets to make it easier to run (very) expensive tests.
|
| 64 |
+
check-expensive:
|
| 65 |
+
$(MAKE) check RUN_EXPENSIVE_TESTS=yes
|
| 66 |
+
check-very-expensive:
|
| 67 |
+
$(MAKE) check-expensive RUN_VERY_EXPENSIVE_TESTS=yes
|
| 68 |
+
|
| 69 |
+
# Just prior to distribution, ...
|
| 70 |
+
# transform the automake-generated rule that runs 'rm -f rm'.
|
| 71 |
+
# On some systems, that command would fail with a diagnostic like
|
| 72 |
+
# "rm: cannot unlink 'rm': Text file busy" when '.' appears so early
|
| 73 |
+
# in the shell's search path that running 'rm' would run the 'rm'
|
| 74 |
+
# executable in the current directory.
|
| 75 |
+
# Similarly, adjust the clean-binPROGRAMS rule.
|
| 76 |
+
rm_subst = \
|
| 77 |
+
s!(rm -f (rm\b|\$$\(bin_PROGRAMS\)$$))!$$1 > /dev/null 2>&1 || /bin/$$1!
|
| 78 |
+
|
| 79 |
+
BUILT_SOURCES = .version
|
| 80 |
+
.version:
|
| 81 |
+
$(AM_V_GEN)echo $(VERSION) > $@-t && mv $@-t $@
|
| 82 |
+
|
| 83 |
+
# Have no read-only files in the tarball to allow easy removal.
|
| 84 |
+
# Have .tarball-version based versions only in tarball builds.
|
| 85 |
+
# The perl substitution is to change some key uses of "rm" to "/bin/rm".
|
| 86 |
+
# See the rm_subst comment for details.
|
| 87 |
+
# The touch avoids a subtle, spurious "make distcheck" failure.
|
| 88 |
+
dist-hook: gen-ChangeLog
|
| 89 |
+
$(AM_V_GEN)chmod -R +rw $(distdir)
|
| 90 |
+
$(AM_V_GEN)echo $(VERSION) > $(distdir)/.tarball-version
|
| 91 |
+
$(AM_V_at)perl -pi -e '$(rm_subst)' $(distdir)/Makefile.in
|
| 92 |
+
$(AM_V_at)touch $(distdir)/doc/constants.texi \
|
| 93 |
+
$(distdir)/doc/coreutils.info
|
| 94 |
+
|
| 95 |
+
# Keep about 5 years of changelogs
|
| 96 |
+
gen_start_ver = 8.32
|
| 97 |
+
.PHONY: gen-ChangeLog
|
| 98 |
+
gen-ChangeLog:
|
| 99 |
+
$(AM_V_GEN)if test -d .git; then \
|
| 100 |
+
log_fix="$(srcdir)/build-aux/git-log-fix"; \
|
| 101 |
+
test -e "$$log_fix" \
|
| 102 |
+
&& amend_git_log="--amend=$$log_fix" \
|
| 103 |
+
|| amend_git_log=; \
|
| 104 |
+
$(top_srcdir)/build-aux/gitlog-to-changelog $$amend_git_log \
|
| 105 |
+
-- v$(gen_start_ver)~.. > $(distdir)/cl-t && \
|
| 106 |
+
{ printf '\n\nSee the source repo for older entries\n' \
|
| 107 |
+
>> $(distdir)/cl-t && \
|
| 108 |
+
rm -f $(distdir)/ChangeLog && \
|
| 109 |
+
mv $(distdir)/cl-t $(distdir)/ChangeLog; } \
|
| 110 |
+
fi
|
| 111 |
+
|
| 112 |
+
ALL_RECURSIVE_TARGETS += distcheck-hook
|
| 113 |
+
distcheck-hook: check-ls-dircolors
|
| 114 |
+
$(MAKE) my-distcheck
|
| 115 |
+
$(MAKE) taint-distcheck
|
| 116 |
+
|
| 117 |
+
DISTCLEANFILES = VERSION
|
| 118 |
+
MAINTAINERCLEANFILES = THANKS-to-translators
|
| 119 |
+
THANKS-to-translators: po/LINGUAS THANKStt.in
|
| 120 |
+
$(AM_V_GEN)( \
|
| 121 |
+
cat $(srcdir)/THANKStt.in; \
|
| 122 |
+
for lang in `cat $(srcdir)/po/LINGUAS`; do \
|
| 123 |
+
echo https://translationproject.org/team/$$lang.html; \
|
| 124 |
+
done; \
|
| 125 |
+
) > $@-tmp && mv $@-tmp $@
|
| 126 |
+
|
| 127 |
+
# Ensure that the sets of two-letter codes in ls.c and dircolors.c
|
| 128 |
+
# remain in sync.
|
| 129 |
+
.PHONY: check-ls-dircolors
|
| 130 |
+
check-ls-dircolors:
|
| 131 |
+
$(AM_V_GEN)dc=$$(sed -n '/static.*ls_codes\[/,/};'/p \
|
| 132 |
+
$(srcdir)/src/dircolors.c \
|
| 133 |
+
|sed -n '/^ *"/p'|tr , '\n'|sed 's/^ *//' \
|
| 134 |
+
|sed -n 's/^"\(..\)"/\1/p'|sort -u); \
|
| 135 |
+
ls=$$(sed -n '/static.*indicator_name\[/,/};'/\p \
|
| 136 |
+
$(srcdir)/src/ls.c \
|
| 137 |
+
|sed -n '/^ *{/ { s/{.\([a-z]\).,.\([a-z]\).}/"\1\2"/g; p; }' \
|
| 138 |
+
|tr , '\n'|sed 's/^ *//' \
|
| 139 |
+
|sed -n 's/^"\(..\)"/\1/p'|sort -u); \
|
| 140 |
+
test "$$dc" = "$$ls"
|
| 141 |
+
|
| 142 |
+
# Sort in traditional ASCII order, regardless of the current locale;
|
| 143 |
+
# otherwise we may get into trouble with distinct strings that the
|
| 144 |
+
# current locale considers to be equal.
|
| 145 |
+
ASSORT = LC_ALL=C sort
|
| 146 |
+
|
| 147 |
+
# FIXME: avoid dependency to build our own 'sort' for 'make dist' ...
|
| 148 |
+
# when common platforms have a functional case-folding implementation:
|
| 149 |
+
# $ test 'abácad' = "$(printf '%s\n' 'ab' 'ác' 'ad' \
|
| 150 |
+
# | LC_ALL=en_US.UTF-8 sort -f \
|
| 151 |
+
# | tr -d '\n')" && echo GOOD || echo BAD
|
| 152 |
+
# Note we don't enable case folding (-f) in the sort below, due to bugs
|
| 153 |
+
# in the I18N patch used in many distros (as of 2015). Also using our
|
| 154 |
+
# own src/sort here would induce awkward dependencies for `make dist`.
|
| 155 |
+
THANKS: THANKS.in Makefile.am .mailmap thanks-gen .version
|
| 156 |
+
$(AM_V_GEN)rm -f $@-t $@; \
|
| 157 |
+
{ \
|
| 158 |
+
perl -ne '/^\#\#/ and exit; print' $(srcdir)/THANKS.in; echo; \
|
| 159 |
+
{ perl -ne '/^$$/.../^$$/ and !/^$$/ and s/ +/\0/ and print' \
|
| 160 |
+
$(srcdir)/THANKS.in; \
|
| 161 |
+
git log --pretty=format:'%aN%x00%aE' \
|
| 162 |
+
| $(ASSORT) -u; \
|
| 163 |
+
} | $(srcdir)/thanks-gen \
|
| 164 |
+
| LC_ALL=en_US.UTF-8 sort -k1,1; \
|
| 165 |
+
echo; \
|
| 166 |
+
printf ';; %s\n' 'Local Variables:' 'coding: utf-8' End:; \
|
| 167 |
+
} > $@-t && chmod a-w $@-t && mv $@-t $@
|
| 168 |
+
|
| 169 |
+
# Some of our git hook scripts are supposed to be identical to git's samples.
|
| 170 |
+
# See if they are still in sync.
|
| 171 |
+
.PHONY: check-git-hook-script-sync
|
| 172 |
+
check-git-hook-script-sync:
|
| 173 |
+
@fail=0; \
|
| 174 |
+
t=$$(mktemp -d) \
|
| 175 |
+
&& cd $$t && git init -q && cd .git/hooks \
|
| 176 |
+
&& for i in pre-commit pre-applypatch applypatch-msg; do \
|
| 177 |
+
diff $(abs_top_srcdir)/scripts/git-hooks/$$i $$i.sample \
|
| 178 |
+
|| fail=1; \
|
| 179 |
+
done; \
|
| 180 |
+
rm -rf $$t; \
|
| 181 |
+
test $$fail = 0
|
| 182 |
+
|
| 183 |
+
# If we are building a single-binary, create symlinks or shebangs for
|
| 184 |
+
# the selected tools when installing.
|
| 185 |
+
install-exec-hook:
|
| 186 |
+
$(AM_V_at)ctrans=$$(printf coreutils | sed -e "$(transform)"); \
|
| 187 |
+
for p in x $(single_binary_progs); do \
|
| 188 |
+
test $$p = x && continue; \
|
| 189 |
+
ptrans=$$(printf '%s' "$$p" | sed -e "$(transform)"); \
|
| 190 |
+
rm -f $(DESTDIR)$(bindir)/$$ptrans$(EXEEXT) || exit $$?; \
|
| 191 |
+
if test "x$(single_binary_install_type)" = xshebangs; then \
|
| 192 |
+
printf '#!%s --coreutils-prog-shebang=%s\n' \
|
| 193 |
+
$(bindir)/$$ctrans$(EXEEXT) $$p \
|
| 194 |
+
>$(DESTDIR)$(bindir)/$$ptrans$(EXEEXT) || exit $$?; \
|
| 195 |
+
chmod a+x,a-w $(DESTDIR)$(bindir)/$$ptrans$(EXEEXT) || exit $$?;\
|
| 196 |
+
else \
|
| 197 |
+
$(LN_S) -s $$ctrans$(EXEEXT) \
|
| 198 |
+
$(DESTDIR)$(bindir)/$$ptrans$(EXEEXT) || exit $$?; \
|
| 199 |
+
fi \
|
| 200 |
+
done
|
| 201 |
+
|
| 202 |
+
noinst_LIBRARIES =
|
| 203 |
+
MOSTLYCLEANFILES =
|
| 204 |
+
CLEANFILES =
|
| 205 |
+
MOSTLYCLEANDIRS =
|
| 206 |
+
|
| 207 |
+
AM_CPPFLAGS = -Ilib -I$(top_srcdir)/lib -Isrc -I$(top_srcdir)/src
|
| 208 |
+
|
| 209 |
+
include $(top_srcdir)/gl/local.mk
|
| 210 |
+
include $(top_srcdir)/lib/local.mk
|
| 211 |
+
include $(top_srcdir)/src/local.mk
|
| 212 |
+
include $(top_srcdir)/doc/local.mk
|
| 213 |
+
include $(top_srcdir)/man/local.mk
|
| 214 |
+
include $(top_srcdir)/tests/local.mk
|
NEWS
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
README
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
These are the GNU core utilities. This package is the union of
|
| 2 |
+
the GNU fileutils, sh-utils, and textutils packages.
|
| 3 |
+
|
| 4 |
+
Most of these programs have significant advantages over their Unix
|
| 5 |
+
counterparts, such as greater speed, additional options, and fewer
|
| 6 |
+
arbitrary limits.
|
| 7 |
+
|
| 8 |
+
The programs that can be built with this package are:
|
| 9 |
+
|
| 10 |
+
[ arch b2sum base32 base64 basename basenc cat chcon chgrp chmod chown
|
| 11 |
+
chroot cksum comm coreutils cp csplit cut date dd df dir dircolors dirname
|
| 12 |
+
du echo env expand expr factor false fmt fold groups head hostid hostname
|
| 13 |
+
id install join kill link ln logname ls md5sum mkdir mkfifo mknod mktemp
|
| 14 |
+
mv nice nl nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx
|
| 15 |
+
pwd readlink realpath rm rmdir runcon seq sha1sum sha224sum sha256sum
|
| 16 |
+
sha384sum sha512sum shred shuf sleep sort split stat stdbuf stty sum sync
|
| 17 |
+
tac tail tee test timeout touch tr true truncate tsort tty uname unexpand
|
| 18 |
+
uniq unlink uptime users vdir wc who whoami yes
|
| 19 |
+
|
| 20 |
+
See the file NEWS for a list of major changes in the current release.
|
| 21 |
+
|
| 22 |
+
If you obtained this file as part of a "git clone", then see the
|
| 23 |
+
README-hacking file. If this file came to you as part of a tar archive,
|
| 24 |
+
then see the file INSTALL for general compilation and installation
|
| 25 |
+
instructions, or README-install for system and coreutils specific instructions.
|
| 26 |
+
|
| 27 |
+
Like the rest of the GNU system, these programs mostly conform to
|
| 28 |
+
POSIX, with BSD and other extensions. For closer conformance, or
|
| 29 |
+
conformance to a particular POSIX version, set the POSIXLY_CORRECT
|
| 30 |
+
and the _POSIX2_VERSION environment variables, as described in
|
| 31 |
+
the documentation under "Standards conformance".
|
| 32 |
+
|
| 33 |
+
The ls, dir, and vdir commands are all separate executables instead of
|
| 34 |
+
one program that checks argv[0] because people often rename these
|
| 35 |
+
programs to things like gls, gnuls, l, etc. Renaming a program
|
| 36 |
+
file shouldn't affect how it operates, so that people can get the
|
| 37 |
+
behavior they want with whatever name they want.
|
| 38 |
+
|
| 39 |
+
Special thanks to Paul Eggert, Brian Matthews, Bruce Evans, Karl Berry,
|
| 40 |
+
Kaveh Ghazi, and François Pinard for help with debugging and porting
|
| 41 |
+
these programs. Many thanks to all of the people who have taken the
|
| 42 |
+
time to submit problem reports and fixes. All contributed changes are
|
| 43 |
+
attributed in the commit logs.
|
| 44 |
+
|
| 45 |
+
And thanks to the following people who have provided accounts for
|
| 46 |
+
portability testing on many different types of systems: Bob Proulx,
|
| 47 |
+
Christian Robert, François Pinard, Greg McGary, Harlan Stenn,
|
| 48 |
+
Joel N. Weber, Mark D. Roth, Matt Schalit, Nelson H. F. Beebe,
|
| 49 |
+
Réjean Payette, Sam Tardieu.
|
| 50 |
+
|
| 51 |
+
Thanks to Michael Stone for inflicting test releases of this package
|
| 52 |
+
on Debian's unstable distribution, and to all the kind folks who used
|
| 53 |
+
that distribution and found and reported bugs.
|
| 54 |
+
|
| 55 |
+
Note that each man page is now automatically generated from a template
|
| 56 |
+
and from the corresponding --help usage message. Patches to the template
|
| 57 |
+
files (man/*.x) are welcome. However, the authoritative documentation
|
| 58 |
+
is in texinfo form in the doc directory.
|
| 59 |
+
|
| 60 |
+
|
| 61 |
+
***************
|
| 62 |
+
Feature requests:
|
| 63 |
+
---------------
|
| 64 |
+
|
| 65 |
+
If you would like to add a new feature, please try to get some sort of
|
| 66 |
+
consensus that it is a worthwhile change. One way to do that is to send
|
| 67 |
+
mail to coreutils@gnu.org including as much description and justification
|
| 68 |
+
as you can. Based on the feedback that generates, you may be able to
|
| 69 |
+
convince us that it's worth adding. Please also consult the list of
|
| 70 |
+
previously discussed but ultimately rejected feature requests at:
|
| 71 |
+
https://www.gnu.org/software/coreutils/rejected_requests.html
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
***************
|
| 75 |
+
Reporting bugs:
|
| 76 |
+
---------------
|
| 77 |
+
|
| 78 |
+
Send bug reports, questions, comments, etc. to bug-coreutils@gnu.org.
|
| 79 |
+
To suggest a patch, see the files README-hacking and HACKING for tips.
|
| 80 |
+
|
| 81 |
+
All of these programs except 'test' recognize the '--version' option.
|
| 82 |
+
When reporting bugs, please include in the subject line both the package
|
| 83 |
+
name/version and the name of the program for which you found a problem.
|
| 84 |
+
|
| 85 |
+
If you have a problem with 'sort', try running 'sort --debug', as it
|
| 86 |
+
can often help find and fix problems without having to wait for an
|
| 87 |
+
answer to a bug report. If the debug output does not suffice to fix
|
| 88 |
+
the problem on your own, please compress and attach it to the rest of
|
| 89 |
+
your bug report.
|
| 90 |
+
|
| 91 |
+
IMPORTANT: if you take the time to report a test failure,
|
| 92 |
+
please be sure to include the output of running 'make check'
|
| 93 |
+
in verbose mode for each failing test. For example,
|
| 94 |
+
if the test that fails is tests/df/df-P.sh, then you would
|
| 95 |
+
run this command:
|
| 96 |
+
|
| 97 |
+
make check TESTS=tests/df/df-P.sh VERBOSE=yes SUBDIRS=. >> log 2>&1
|
| 98 |
+
|
| 99 |
+
For some tests, particularly perl tests, you can get even more detail by adding
|
| 100 |
+
DEBUG=yes. Then include the contents of the file 'log' in your bug report.
|
| 101 |
+
|
| 102 |
+
|
| 103 |
+
***************************************
|
| 104 |
+
|
| 105 |
+
There are many tests, but nowhere near as many as we need.
|
| 106 |
+
Additions and corrections are very welcome.
|
| 107 |
+
|
| 108 |
+
If you see a problem that you've already reported, feel free to re-report
|
| 109 |
+
it -- it won't bother us to get a reminder. Besides, the more messages we
|
| 110 |
+
get regarding a particular problem the sooner it'll be fixed -- usually.
|
| 111 |
+
If you sent a complete patch and, after a couple weeks you haven't
|
| 112 |
+
received any acknowledgement, please ping us. A complete patch includes
|
| 113 |
+
a well-written ChangeLog entry, unified (diff -u format) diffs relative
|
| 114 |
+
to the most recent test release (or, better, relative to the latest
|
| 115 |
+
sources in the public repository), an explanation for why the patch is
|
| 116 |
+
necessary or useful, and if at all possible, enough information to
|
| 117 |
+
reproduce whatever problem prompted it. Plus, you'll earn lots of
|
| 118 |
+
karma if you include a test case to exercise any bug(s) you fix.
|
| 119 |
+
Here are instructions for checking out the latest development sources:
|
| 120 |
+
|
| 121 |
+
https://savannah.gnu.org/git/?group=coreutils
|
| 122 |
+
|
| 123 |
+
For general documentation on the coding and usage standards
|
| 124 |
+
this distribution follows, see the GNU Coding Standards at:
|
| 125 |
+
https://www.gnu.org/prep/standards/
|
| 126 |
+
|
| 127 |
+
For any copyright year range specified as YYYY-ZZZZ in this package
|
| 128 |
+
note that the range specifies every single year in that closed interval.
|
| 129 |
+
|
| 130 |
+
Please see the file COPYING for copying conditions.
|
| 131 |
+
|
| 132 |
+
========================================================================
|
| 133 |
+
|
| 134 |
+
Copyright (C) 1998-2025 Free Software Foundation, Inc.
|
| 135 |
+
|
| 136 |
+
Permission is granted to copy, distribute and/or modify this document
|
| 137 |
+
under the terms of the GNU Free Documentation License, Version 1.3 or
|
| 138 |
+
any later version published by the Free Software Foundation; with no
|
| 139 |
+
Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
| 140 |
+
Texts. A copy of the license is included in the "GNU Free
|
| 141 |
+
Documentation License" file as part of this distribution.
|
README-hacking
ADDED
|
@@ -0,0 +1,118 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Building from a Git repository -*- outline -*-
|
| 2 |
+
|
| 3 |
+
These notes intend to help people working on the checked-out sources.
|
| 4 |
+
These requirements do not apply when building from a distribution tarball.
|
| 5 |
+
If this package has a file HACKING, please also read that file for
|
| 6 |
+
more detailed contribution guidelines.
|
| 7 |
+
|
| 8 |
+
* Requirements
|
| 9 |
+
|
| 10 |
+
We've opted to keep only the highest-level sources in the Git repository.
|
| 11 |
+
This eases our maintenance burden (fewer merges etc.), but imposes more
|
| 12 |
+
requirements on anyone wishing to build from the just-checked-out sources.
|
| 13 |
+
(The requirements to build from a release are much less and are just
|
| 14 |
+
the requirements of the standard './configure && make' procedure.)
|
| 15 |
+
Specific development tools and versions will be checked for and listed by
|
| 16 |
+
the bootstrap script. See README-prereq for specific notes on obtaining
|
| 17 |
+
these prerequisite tools.
|
| 18 |
+
|
| 19 |
+
Valgrind <https://valgrind.org/> is also highly recommended, if
|
| 20 |
+
Valgrind supports your architecture. See also README-valgrind
|
| 21 |
+
(if present).
|
| 22 |
+
|
| 23 |
+
While building from a just-cloned source tree may require installing a
|
| 24 |
+
few prerequisites, later, a plain 'git pull && make' typically suffices.
|
| 25 |
+
|
| 26 |
+
* First Git checkout
|
| 27 |
+
|
| 28 |
+
You can get a copy of the source repository like this:
|
| 29 |
+
|
| 30 |
+
$ git clone https://git.savannah.gnu.org/git/<packagename>
|
| 31 |
+
$ cd <packagename>
|
| 32 |
+
|
| 33 |
+
where '<packagename>' stands for 'coreutils' or whatever other package
|
| 34 |
+
you are building.
|
| 35 |
+
|
| 36 |
+
To use the most-recent Gnulib (as opposed to the Gnulib version that
|
| 37 |
+
the package last synchronized to), do this next:
|
| 38 |
+
|
| 39 |
+
$ git submodule foreach git pull origin master
|
| 40 |
+
$ git commit -m 'build: update gnulib submodule to latest' gnulib
|
| 41 |
+
|
| 42 |
+
As an optional step, if you already have a copy of the Gnulib Git
|
| 43 |
+
repository, then you can use it as a reference to reduce download
|
| 44 |
+
time and file system space requirements:
|
| 45 |
+
|
| 46 |
+
$ export GNULIB_REFDIR=/path/to/gnulib
|
| 47 |
+
|
| 48 |
+
The next steps are to get and check other files needed to build,
|
| 49 |
+
and complete the build:
|
| 50 |
+
|
| 51 |
+
$ make -f cfg.mk
|
| 52 |
+
|
| 53 |
+
For reference the above command runs the following steps,
|
| 54 |
+
which can be done individually if required to give more control:
|
| 55 |
+
|
| 56 |
+
$ ./bootstrap
|
| 57 |
+
$ ./configure --quiet #[--disable-gcc-warnings] [*]
|
| 58 |
+
$ make #[check]
|
| 59 |
+
|
| 60 |
+
At this point, there should be no difference between your local copy,
|
| 61 |
+
and the Git master copy:
|
| 62 |
+
|
| 63 |
+
$ git diff
|
| 64 |
+
|
| 65 |
+
should output no difference.
|
| 66 |
+
|
| 67 |
+
Enjoy!
|
| 68 |
+
|
| 69 |
+
[*] By default GCC warnings are enabled when building from Git.
|
| 70 |
+
If you get warnings with recent GCC and Glibc with default
|
| 71 |
+
configure-time options, please report the warnings to the bug
|
| 72 |
+
reporting address of this package instead of to bug-gnulib,
|
| 73 |
+
even if the problem seems to originate in a Gnulib-provided file.
|
| 74 |
+
If you get warnings with other configurations, you can run
|
| 75 |
+
'./configure --disable-gcc-warnings' or 'make WERROR_CFLAGS='
|
| 76 |
+
to build quietly or verbosely, respectively.
|
| 77 |
+
-----
|
| 78 |
+
|
| 79 |
+
* Submitting patches
|
| 80 |
+
|
| 81 |
+
If you develop a fix or a new feature, please send it to the
|
| 82 |
+
appropriate bug-reporting address as reported by the --help option of
|
| 83 |
+
each program. One way to do this is to use vc-dwim
|
| 84 |
+
<https://www.gnu.org/software/vc-dwim/>), as follows.
|
| 85 |
+
|
| 86 |
+
Run the command "vc-dwim --initialize" from the top-level directory
|
| 87 |
+
of this package's git-cloned hierarchy.
|
| 88 |
+
|
| 89 |
+
Edit the (empty) ChangeLog file that this command creates, creating a
|
| 90 |
+
properly-formatted entry according to the GNU coding standards
|
| 91 |
+
<https://www.gnu.org/prep/standards/html_node/Change-Logs.html>.
|
| 92 |
+
|
| 93 |
+
Make your changes.
|
| 94 |
+
|
| 95 |
+
Run the command "vc-dwim" and make sure its output (the diff of all
|
| 96 |
+
your changes) looks good.
|
| 97 |
+
|
| 98 |
+
Run "vc-dwim --commit".
|
| 99 |
+
|
| 100 |
+
Run the command "git format-patch --stdout -1", and email its output
|
| 101 |
+
in, using the output's subject line.
|
| 102 |
+
|
| 103 |
+
-----
|
| 104 |
+
|
| 105 |
+
Copyright (C) 2002-2025 Free Software Foundation, Inc.
|
| 106 |
+
|
| 107 |
+
This program is free software: you can redistribute it and/or modify
|
| 108 |
+
it under the terms of the GNU General Public License as published by
|
| 109 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 110 |
+
(at your option) any later version.
|
| 111 |
+
|
| 112 |
+
This program is distributed in the hope that it will be useful,
|
| 113 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 114 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 115 |
+
GNU General Public License for more details.
|
| 116 |
+
|
| 117 |
+
You should have received a copy of the GNU General Public License
|
| 118 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
README-install
ADDED
|
@@ -0,0 +1,111 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Please see the file INSTALL for generic build and installation instructions.
|
| 2 |
+
This file details coreutils and system specific build instructions.
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
*********************
|
| 6 |
+
Pre-C99 build failure
|
| 7 |
+
---------------------
|
| 8 |
+
|
| 9 |
+
In 2009 we added this requirement:
|
| 10 |
+
To build the coreutils from source, you must have a C99-conforming
|
| 11 |
+
compiler, due to the use of declarations after non-declaration statements
|
| 12 |
+
in several files in src/. There is code in configure to find and, if
|
| 13 |
+
possible, enable an appropriate compiler. However, if configure doesn't
|
| 14 |
+
find a C99 compiler, it continues nonetheless, and your build will fail.
|
| 15 |
+
There used to be a "c99-to-c89.diff" patch you could apply to convert
|
| 16 |
+
to code that even an old pre-c99 compiler can handle, but it was too
|
| 17 |
+
tedious to maintain, so has been removed.
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
***********************
|
| 21 |
+
HPUX 11.x build failure
|
| 22 |
+
-----------------------
|
| 23 |
+
|
| 24 |
+
A known problem exists when compiling on HPUX on both hppa and ia64
|
| 25 |
+
in 64-bit mode (i.e., +DD64) on HP-UX 11.0, 11.11, and 11.23. This
|
| 26 |
+
is not due to a bug in the package but instead due to a bug in the
|
| 27 |
+
system header file which breaks things in 64-bit mode. The default
|
| 28 |
+
compilation mode is 32-bit and the software compiles fine using the
|
| 29 |
+
default mode. To build this software in 64-bit mode you will need
|
| 30 |
+
to fix the system /usr/include/inttypes.h header file. After
|
| 31 |
+
correcting that file the software also compiles fine in 64-bit mode.
|
| 32 |
+
Here is one possible patch to correct the problem:
|
| 33 |
+
|
| 34 |
+
--- /usr/include/inttypes.h.orig Thu May 30 01:00:00 1996
|
| 35 |
+
+++ /usr/include/inttypes.h Sun Mar 23 00:20:36 2003
|
| 36 |
+
@@ -489 +489 @@
|
| 37 |
+
-#ifndef __STDC_32_MODE__
|
| 38 |
+
+#ifndef __LP64__
|
| 39 |
+
|
| 40 |
+
|
| 41 |
+
************************
|
| 42 |
+
OSF/1 4.0d and AIX build failures
|
| 43 |
+
------------------------
|
| 44 |
+
|
| 45 |
+
If you use /usr/bin/make on these systems, the build will fail due
|
| 46 |
+
to the presence of the "[" target. OSF/1 make(1) appears to
|
| 47 |
+
treat "[" as some syntax relating to locks, while AIX make(1)
|
| 48 |
+
appears to skip the "[" target. To work around these issues
|
| 49 |
+
the best solution is to use GNU make. Otherwise, simply remove
|
| 50 |
+
all mention of "[$(EXEEXT)" from src/Makefile.
|
| 51 |
+
|
| 52 |
+
|
| 53 |
+
************************
|
| 54 |
+
32 bit time_t build failures
|
| 55 |
+
------------------------
|
| 56 |
+
|
| 57 |
+
Although 32-bit builds fail if that forces time_t to be 32 bits, this
|
| 58 |
+
can be fixed by using 64-bit builds. For example, on AIX where GCC
|
| 59 |
+
defaults to 32 bits, one can use "./configure CC='gcc -maix64' AR='ar
|
| 60 |
+
-X64'"; similarly, on Solaris one can configure with CC='gcc -m64'.
|
| 61 |
+
If all else fails one can configure with --disable-year2038;
|
| 62 |
+
however, this will mishandle timestamps after 2038, and please file
|
| 63 |
+
bug reports for any such situations.
|
| 64 |
+
|
| 65 |
+
|
| 66 |
+
*************************************************
|
| 67 |
+
"make check" failure on IRIX 6.5 and Solaris <= 9
|
| 68 |
+
-------------------------------------------------
|
| 69 |
+
|
| 70 |
+
Using the vendor make program to run "make check" fails on these two systems.
|
| 71 |
+
If you want to run all of the tests there, use GNU make.
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
|
| 75 |
+
**********************
|
| 76 |
+
Running tests as root:
|
| 77 |
+
----------------------
|
| 78 |
+
|
| 79 |
+
If you run the tests as root, note that a few of them create files
|
| 80 |
+
and/or run programs as a non-root user, 'nobody' by default.
|
| 81 |
+
If you want to use some other non-root username, specify it via
|
| 82 |
+
the NON_ROOT_USERNAME environment variable. Depending on the
|
| 83 |
+
permissions with which the working directories have been created,
|
| 84 |
+
using 'nobody' may fail, because that user won't have the required
|
| 85 |
+
read and write access to the build and test directories.
|
| 86 |
+
I find that it is best to unpack and build as a non-privileged
|
| 87 |
+
user, and then to run the following command as that user in order
|
| 88 |
+
to run the privilege-requiring tests:
|
| 89 |
+
|
| 90 |
+
sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k check-root
|
| 91 |
+
|
| 92 |
+
If you can run the tests as root, please do so and report any
|
| 93 |
+
problems. We get much less test coverage in that mode, and it's
|
| 94 |
+
arguably more important that these tools work well when run by
|
| 95 |
+
root than when run by less privileged users.
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
|
| 99 |
+
**********************
|
| 100 |
+
autotools considerations:
|
| 101 |
+
----------------------
|
| 102 |
+
|
| 103 |
+
WARNING: Now that we use the ./bootstrap script, you should not run
|
| 104 |
+
autoreconf manually. Doing that will overwrite essential source files
|
| 105 |
+
with older versions, which may make the package unbuildable or introduce
|
| 106 |
+
subtle bugs.
|
| 107 |
+
|
| 108 |
+
WARNING: If you modify files like configure.in, m4/*.m4, aclocal.m4,
|
| 109 |
+
or any Makefile.am, then don't be surprised if what gets regenerated no
|
| 110 |
+
longer works. To make things work, you'll have to be using appropriate
|
| 111 |
+
versions of the tools listed in bootstrap.conf's buildreq string.
|
README-package-renamed-to-coreutils
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
On 2002-09-01, the GNU fileutils, textutils, and sh-utils
|
| 2 |
+
packages were merged into one, called the GNU coreutils.
|
| 3 |
+
See https://www.gnu.org/software/coreutils/coreutils.html for a description.
|
| 4 |
+
Here's the FAQ list:
|
| 5 |
+
|
| 6 |
+
https://www.gnu.org/software/coreutils/faq/
|
| 7 |
+
|
| 8 |
+
For information on the mailing lists associated with the
|
| 9 |
+
coreutils package, including archive locations, see these:
|
| 10 |
+
|
| 11 |
+
https://lists.gnu.org/mailman/listinfo/coreutils-announce
|
| 12 |
+
https://lists.gnu.org/mailman/listinfo/bug-coreutils
|
| 13 |
+
https://lists.gnu.org/mailman/listinfo/coreutils
|
README-prereq
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
This gives some notes on obtaining the tools required for development.
|
| 2 |
+
These tools can be used by the 'bootstrap' and 'configure' scripts,
|
| 3 |
+
as well as by 'make'. They include:
|
| 4 |
+
|
| 5 |
+
- Autoconf <https://www.gnu.org/software/autoconf/>
|
| 6 |
+
- Automake <https://www.gnu.org/software/automake/>
|
| 7 |
+
- Bison <https://www.gnu.org/software/bison/>
|
| 8 |
+
- Gettext <https://www.gnu.org/software/gettext/>
|
| 9 |
+
- Git <https://git-scm.com/>
|
| 10 |
+
- Gperf <https://www.gnu.org/software/gperf/>
|
| 11 |
+
- Gzip <https://www.gnu.org/software/gzip/>
|
| 12 |
+
- Help2man <https://www.gnu.org/software/help2man/>
|
| 13 |
+
- M4 <https://www.gnu.org/software/m4/>
|
| 14 |
+
- Make <https://www.gnu.org/software/make/>
|
| 15 |
+
- Perl <https://www.cpan.org/>
|
| 16 |
+
- Tar <https://www.gnu.org/software/tar/>
|
| 17 |
+
- Texinfo <https://www.gnu.org/software/texinfo/>
|
| 18 |
+
- Wget <https://www.gnu.org/software/wget/>
|
| 19 |
+
- XZ Utils <https://tukaani.org/xz/>
|
| 20 |
+
|
| 21 |
+
It is generally better to use official packages for your system.
|
| 22 |
+
If a package is not officially available you can build it from source
|
| 23 |
+
and install it into a directory that you can then use to build this
|
| 24 |
+
package. If some packages are available but are too old, install the
|
| 25 |
+
too-old versions first as they may be needed to build newer versions.
|
| 26 |
+
|
| 27 |
+
Here is an example of how to build a program from source. This
|
| 28 |
+
example is for Autoconf; a similar approach should work for the other
|
| 29 |
+
developer prerequisites. This example assumes Autoconf 2.71; it
|
| 30 |
+
should be OK to use a later version of Autoconf, if available.
|
| 31 |
+
|
| 32 |
+
prefix=$HOME/prefix # (or wherever else you choose)
|
| 33 |
+
export PATH=$prefix/bin:$PATH
|
| 34 |
+
wget https://ftp.gnu.org/pub/gnu/autoconf/autoconf-2.71.tar.gz
|
| 35 |
+
gzip -d <autoconf-2.71.tar.gz | tar xf -
|
| 36 |
+
cd autoconf-2.71
|
| 37 |
+
./configure --prefix=$prefix
|
| 38 |
+
make install
|
| 39 |
+
|
| 40 |
+
Once the prerequisites are installed, you can build this package as
|
| 41 |
+
described in README-hacking.
|
README-release
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Here are most of the steps we (maintainers) follow when making a release.
|
| 2 |
+
|
| 3 |
+
* start from a clean, up-to-date git directory.
|
| 4 |
+
|
| 5 |
+
git checkout master; git pull
|
| 6 |
+
|
| 7 |
+
* Run ./configure && make maintainer-clean
|
| 8 |
+
|
| 9 |
+
* Ensure that the desired versions of autoconf, automake, bison, etc.
|
| 10 |
+
are in your PATH. See the buildreq list in bootstrap.conf for
|
| 11 |
+
the complete list.
|
| 12 |
+
|
| 13 |
+
* Ensure that you're on "master" with no uncommitted diffs.
|
| 14 |
+
This should produce no output: git checkout master; git diff
|
| 15 |
+
|
| 16 |
+
* Ensure that you've pushed all changes that belong in the release
|
| 17 |
+
and that the NixOS/Hydra autobuilder is reporting all is well:
|
| 18 |
+
|
| 19 |
+
https://hydra.nixos.org/jobset/gnu/coreutils-master
|
| 20 |
+
|
| 21 |
+
* Run bootstrap one last time. This downloads any new translations:
|
| 22 |
+
|
| 23 |
+
./bootstrap
|
| 24 |
+
|
| 25 |
+
FIXME: enable excluded programs like arch? to get their manual pages?
|
| 26 |
+
|
| 27 |
+
* Check for new file system types by running the following command on
|
| 28 |
+
a system with the most recent kernel possible (e.g., Fedora rawhide):
|
| 29 |
+
|
| 30 |
+
make src/fs-magic-compare
|
| 31 |
+
|
| 32 |
+
Or download the latest header first like:
|
| 33 |
+
|
| 34 |
+
kgit='https://git.kernel.org/cgit/linux/kernel/git'
|
| 35 |
+
wget -q $kgit/torvalds/linux.git/plain/include/uapi/linux/magic.h \
|
| 36 |
+
-O src/fs-latest-magic.h
|
| 37 |
+
|
| 38 |
+
If it finds a new file system magic number, add it to src/stat.c.
|
| 39 |
+
If it is a remote file system tag it as such.
|
| 40 |
+
|
| 41 |
+
Note there may be some new file systems magic values not defined
|
| 42 |
+
in that linux/magic.h file, which can be seen at:
|
| 43 |
+
|
| 44 |
+
https://www.livegrep.com/search/linux\
|
| 45 |
+
?q=%23define+.*_SUPER_MAGIC+-file%3Amagic\.h
|
| 46 |
+
|
| 47 |
+
|
| 48 |
+
* Pre-release testing:
|
| 49 |
+
|
| 50 |
+
Run the following on at least one SELinux-enabled (enforcing) and
|
| 51 |
+
one non-SELinux system:
|
| 52 |
+
|
| 53 |
+
n=$(( ($(nproc) + 1) / 2 ))
|
| 54 |
+
sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER \
|
| 55 |
+
make -k -j$(nproc) check-root SUBDIRS=. \
|
| 56 |
+
&& make distcheck \
|
| 57 |
+
&& make -j$n check RUN_VERY_EXPENSIVE_TESTS=yes RUN_EXPENSIVE_TESTS=yes
|
| 58 |
+
|
| 59 |
+
If testing on systems with a non standard default shell, spurious failures
|
| 60 |
+
may occur. Often there are other shells available, and you can select
|
| 61 |
+
those by using for example, SHELL=bash in the commands above.
|
| 62 |
+
|
| 63 |
+
Note that the use of -j$n tells make to use approximately half of the
|
| 64 |
+
available processing units. If you use -jN, for larger N, some of the
|
| 65 |
+
expensive tests are likely to interfere with concurrent performance-measuring
|
| 66 |
+
or timing-sensitive tests, resulting in spurious failures.
|
| 67 |
+
|
| 68 |
+
If "make distcheck" doesn't run "make syntax-check" for you, then run
|
| 69 |
+
it manually:
|
| 70 |
+
|
| 71 |
+
make syntax-check
|
| 72 |
+
|
| 73 |
+
* To set the date, version number, and release type [stable/alpha/beta] on
|
| 74 |
+
line 3 of NEWS, commit that, and tag the release; run:
|
| 75 |
+
|
| 76 |
+
build-aux/do-release-commit-and-tag X.Y stable
|
| 77 |
+
|
| 78 |
+
* Run the following to create release tarballs. Your choice selects the
|
| 79 |
+
corresponding upload-to destination in the emitted gnupload command.
|
| 80 |
+
The different destinations are specified in cfg.mk. See the definitions
|
| 81 |
+
of gnu_ftp_host-{alpha,beta,stable}.
|
| 82 |
+
|
| 83 |
+
# "TYPE" must be stable, beta or alpha
|
| 84 |
+
make TYPE
|
| 85 |
+
|
| 86 |
+
* Test the tarball. copy it to a few odd-ball systems and ensure that
|
| 87 |
+
it builds and passes all tests.
|
| 88 |
+
|
| 89 |
+
* While that's happening, write the release announcement that you will
|
| 90 |
+
soon post. Start with the template, $HOME/announce-coreutils-X.Y
|
| 91 |
+
that was just created by that "make" command.
|
| 92 |
+
|
| 93 |
+
For generating counts use:
|
| 94 |
+
oldrel=$(cat .prev-version)
|
| 95 |
+
printf "There have been %d commits by %d people %s\n" \
|
| 96 |
+
$(($(git log --oneline v$oldrel.. | wc -l) - 3)) \
|
| 97 |
+
$(git shortlog v$oldrel.. | grep "^[^ ]" | wc -l) \
|
| 98 |
+
"in the [X] weeks since $oldrel"
|
| 99 |
+
|
| 100 |
+
git shortlog v$oldrel.. | sed -n 's/:$//p' |
|
| 101 |
+
sed 's/^/ /' | column -c 70 | expand
|
| 102 |
+
|
| 103 |
+
Once all the builds and tests have passed,
|
| 104 |
+
|
| 105 |
+
* Run the gnupload command that was suggested by your "make stable" run above.
|
| 106 |
+
|
| 107 |
+
* Wait a few minutes (maybe up to 30?) and then use the release URLs to
|
| 108 |
+
download all tarball/signature pairs and use gpg --verify to ensure
|
| 109 |
+
that they're all valid.
|
| 110 |
+
|
| 111 |
+
* Push the NEWS-updating changes and the new tag:
|
| 112 |
+
|
| 113 |
+
v=$(cat .prev-version)
|
| 114 |
+
git push origin master tag v$v
|
| 115 |
+
|
| 116 |
+
* Announce it on Savannah first, so you can include the preferable
|
| 117 |
+
savannah.org announcement link in the email message.
|
| 118 |
+
|
| 119 |
+
From here:
|
| 120 |
+
https://savannah.gnu.org/projects/coreutils/
|
| 121 |
+
click on the "submit news", then write something like the following:
|
| 122 |
+
(If there is no such button, then enable "News" for the project via
|
| 123 |
+
the Main -> "Select Features" menu item, or via this link:
|
| 124 |
+
https://savannah.gnu.org/project/admin/editgroupfeatures.php?group=coreutils)
|
| 125 |
+
|
| 126 |
+
Subject: coreutils-X.Y released [stable]
|
| 127 |
+
+verbatim+
|
| 128 |
+
...paste the announcement here...
|
| 129 |
+
-verbatim-
|
| 130 |
+
|
| 131 |
+
Then go here to approve it:
|
| 132 |
+
https://savannah.gnu.org/news/approve.php?group=coreutils
|
| 133 |
+
|
| 134 |
+
* Send the announcement email message (signed with the release key)
|
| 135 |
+
|
| 136 |
+
* Approve the announcement here:
|
| 137 |
+
https://lists.gnu.org/mailman/admindb/coreutils-announce
|
| 138 |
+
|
| 139 |
+
* After each non-alpha release, update the on-line manual accessible via
|
| 140 |
+
|
| 141 |
+
https://www.gnu.org/software/coreutils/manual/
|
| 142 |
+
|
| 143 |
+
by running this:
|
| 144 |
+
|
| 145 |
+
build-aux/gnu-web-doc-update --mirror
|
README-valgrind
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#! /bin/bash
|
| 2 |
+
# Convert this package for use with valgrind.
|
| 3 |
+
|
| 4 |
+
# Copyright (C) 2002-2025 Free Software Foundation, Inc.
|
| 5 |
+
|
| 6 |
+
# This program is free software: you can redistribute it and/or modify
|
| 7 |
+
# it under the terms of the GNU General Public License as published by
|
| 8 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 9 |
+
# (at your option) any later version.
|
| 10 |
+
|
| 11 |
+
# This program is distributed in the hope that it will be useful,
|
| 12 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
# GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
# You should have received a copy of the GNU General Public License
|
| 17 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 18 |
+
|
| 19 |
+
|
| 20 |
+
# Step 1:
|
| 21 |
+
# Run this file to create src/vg:
|
| 22 |
+
coreutils=$(echo 'spy:;@echo $(all_programs) $(noinst_PROGRAMS)' |
|
| 23 |
+
(make -f Makefile -f - spy | sed 's,src/,,g'| tr -s '\n ' ' '))
|
| 24 |
+
mkdir -p src/vg
|
| 25 |
+
pwd=`pwd`
|
| 26 |
+
srcdir=$pwd/src
|
| 27 |
+
_path='export PATH='$srcdir':${PATH#*:}'
|
| 28 |
+
pre='#!/bin/sh\n'"$_path"'\n'
|
| 29 |
+
n=15 # stack trace depth
|
| 30 |
+
log_fd=3 # One can redirect this to file like 3>vg.log
|
| 31 |
+
test -e /tmp/cu-vg && suppressions='--suppressions=/tmp/cu-vg'
|
| 32 |
+
vg="exec /usr/bin/valgrind $suppressions --log-fd=$log_fd \
|
| 33 |
+
--leak-check=yes --track-fds=yes --leak-check=full --num-callers=$n"
|
| 34 |
+
cat <<EOF > src/vg/gen
|
| 35 |
+
for i in $coreutils; do
|
| 36 |
+
printf "$pre$vg -- \$i"' "\$@"\n' > \$i
|
| 37 |
+
chmod a+x \$i
|
| 38 |
+
done
|
| 39 |
+
EOF
|
| 40 |
+
cd src/vg
|
| 41 |
+
. ./gen
|
| 42 |
+
|
| 43 |
+
|
| 44 |
+
# Step 2
|
| 45 |
+
# Convert make file to point to src/vg wrappers
|
| 46 |
+
# sed -i 's,src\(\$(PATH_SEPARATOR)\),src/vg\1,' tests/local.mk
|
| 47 |
+
# To restore:
|
| 48 |
+
# sed -i 's,src/vg,src,' tests/local.mk
|
| 49 |
+
|
| 50 |
+
# Step 2.5 Usually not needed
|
| 51 |
+
# Create this symlink for suppressions (this is no longer necessary,
|
| 52 |
+
# with Linux kernel 2.6.9 and valgrind-2.2.0):
|
| 53 |
+
# ln -s $PWD/.vg-suppressions /tmp/cu-vg
|
| 54 |
+
|
| 55 |
+
|
| 56 |
+
# Step 3:
|
| 57 |
+
# Run (probably a subset of tests due to speed) with fd 3 redirected:
|
| 58 |
+
# make TESTS=... SUBDIRS=. check 3>vg.log
|
THANKS.in
ADDED
|
@@ -0,0 +1,681 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
These people have contributed to the GNU coreutils (formerly, the fileutils,
|
| 2 |
+
textutils, and/or sh-utils packages). Some have reported problems, others
|
| 3 |
+
have contributed improvements to the documentation, actual code, and even
|
| 4 |
+
complete programs. Those contributions are described in the version control
|
| 5 |
+
logs and ChangeLog files. If your name has been left out, if you'd rather
|
| 6 |
+
not be listed, or if you'd prefer a different address be used, please send a
|
| 7 |
+
note to the GNU coreutils mailing list <coreutils@gnu.org>.
|
| 8 |
+
##
|
| 9 |
+
## There is no need to list here any name that appears as an Author in
|
| 10 |
+
## "git log" output. Those are automatically added when this template
|
| 11 |
+
## is used to generate the THANKS file. Note that numerous people listed
|
| 12 |
+
## here would have been listed as commit authors if we had been using git
|
| 13 |
+
## for version control when they contributed.
|
| 14 |
+
##
|
| 15 |
+
## Let's keep the list in this order ... which sc_THANKS_in_sorted ensures:
|
| 16 |
+
## $ LC_ALL=en_US.UTF-8 src/sort -f -k1,1
|
| 17 |
+
|
| 18 |
+
??? kytek@cybercomm.net
|
| 19 |
+
A Costa agcosta@gis.net
|
| 20 |
+
Aaron Davies aaron.davies@gmail.com
|
| 21 |
+
Aaron Hawley ashawley@uvm.edu
|
| 22 |
+
Achim Blumensath blume@corona.oche.de
|
| 23 |
+
Adam Jimerson vendion@charter.net
|
| 24 |
+
Adam Klein aklein@debian.org
|
| 25 |
+
Adam Sampson ats@offog.org
|
| 26 |
+
Adrian Bunk bunk@stusta.de
|
| 27 |
+
AIDA Shinra shinra@j10n.org
|
| 28 |
+
Alain Magloire alain@qnx.com
|
| 29 |
+
Alan Iwi iwi@atm.ox.ac.uk
|
| 30 |
+
Alan Jenkins alan-jenkins@tuffmail.co.uk
|
| 31 |
+
Albert Chin-A-Young china@thewrittenword.com
|
| 32 |
+
Albert Hopkins ahopkins@dynacare.com
|
| 33 |
+
Alberto Accomazzi alberto@cfa0.harvard.edu
|
| 34 |
+
aldomel aldomel@ix.netcom.com
|
| 35 |
+
Alen Muzinic zveki@fly.cc.fer.hr
|
| 36 |
+
Alexander Nguyen vinh@seas.ucla.edu
|
| 37 |
+
Alexander V. Lukyanov lav@netis.ru
|
| 38 |
+
Alexandre Duret-Lutz duret_g@epita.fr
|
| 39 |
+
Alexey Solovyov alekso@math.uu.se
|
| 40 |
+
Alexey Vyskubov alexey@pippuri.mawhrin.net
|
| 41 |
+
Alfred M. Szmidt ams@kemisten.nu
|
| 42 |
+
Allen Hewes allen@decisiv.net
|
| 43 |
+
Ambrose Feinstein ambrose@google.com
|
| 44 |
+
Amr Ali amr.ali.cc@gmail.com
|
| 45 |
+
Anders Kaseorg andersk@mit.edu
|
| 46 |
+
Andi Kleen freitag@alancoxonachip.com
|
| 47 |
+
Andre Novaes Cunha Andre.Cunha@br.global-one.net
|
| 48 |
+
Andreas Frische andreasfrische@gmail.com
|
| 49 |
+
Andreas Jaeger jaeger@gnu.org
|
| 50 |
+
Andreas Luik luik@isa.de
|
| 51 |
+
Andreas Stolcke stolcke@ICSI.Berkeley.EDU
|
| 52 |
+
Andrei Gaponenko andr@triumf.ca
|
| 53 |
+
Andres Soolo andres@soolo.matti.ee
|
| 54 |
+
Andrew Burgess aab@cichlid.com
|
| 55 |
+
Andrew Dalke dalke@bioreason.com
|
| 56 |
+
Andrew Fabbro andrew@fabbro.org
|
| 57 |
+
Andrew Pham andpha@us.ibm.com
|
| 58 |
+
Andrew Tridgell tridge@samba.org
|
| 59 |
+
Andrey Borzenkov arvidjaar@mail.ru
|
| 60 |
+
Andries Brouwer Andries.Brouwer@cwi.nl
|
| 61 |
+
Andy Longton alongton@metamark.com
|
| 62 |
+
Anoop Sharma sendtoanoop@gmail.com
|
| 63 |
+
Anthony Thyssen anthony@griffith.edu.au
|
| 64 |
+
Antonio Rendas ajrendas@yahoo.com
|
| 65 |
+
Ariel Faigon ariel@cthulhu.engr.sgi.com
|
| 66 |
+
Arjan Opmeer arjan.opmeer@gmail.com
|
| 67 |
+
Arkadiusz Miśkiewicz arekm@maven.pl
|
| 68 |
+
Arne Henrik Juul arnej@imf.unit.no
|
| 69 |
+
Arnold Robbins arnold@skeeve.com
|
| 70 |
+
Arthur Pool pool@commerce.uq.edu.au
|
| 71 |
+
Arun Sharma arun.sharma@intel.com
|
| 72 |
+
Arvind Autar Autar022@planet.nl
|
| 73 |
+
Augey Mikus mikus@dqc.org
|
| 74 |
+
Austin Donnelly Austin.Donnelly@cl.cam.ac.uk
|
| 75 |
+
Axel Dörfler axeld@pinc-software.de
|
| 76 |
+
Axel Kittenberger Anshil@gmx.net
|
| 77 |
+
Barry Kelly http://blog.barrkel.com/
|
| 78 |
+
Bauke Jan Douma bjdouma@xs4all.nl
|
| 79 |
+
Ben Elliston bje@air.net.au
|
| 80 |
+
Ben Harris bjh21@netbsd.org
|
| 81 |
+
Bengt Martensson bengt@mathematik.uni-Bremen.de
|
| 82 |
+
Benjamin Cutler cutlerbc@simla.colostate.edu
|
| 83 |
+
Bernard Giroud bernard.giroud@creditlyonnais.ch
|
| 84 |
+
Bernd Eckenfels ecki@debian.org
|
| 85 |
+
Bernd Leibing bernd.leibing@rz.uni-ulm.de
|
| 86 |
+
Bernd Melchers melchers@cis.fu-berlin.de
|
| 87 |
+
Bernhard Baehr bernhard.baehr@gmx.de
|
| 88 |
+
Bernhard Gabler bernhard@uni-koblenz.de
|
| 89 |
+
Bernhard Rosenkraenzer bero@redhat.de
|
| 90 |
+
Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be
|
| 91 |
+
Bert Wesarg bert.wesarg@googlemail.com
|
| 92 |
+
Bill Brelsford wb@k2di.net
|
| 93 |
+
Bill Peters peters@gaffel.as.arizona.edu
|
| 94 |
+
Bjorn Helgaas helgaas@rsn.hp.com
|
| 95 |
+
Bob McCracken kerouac@ravenet.com
|
| 96 |
+
Branden Robinson branden@necrotic.deadbeast.net
|
| 97 |
+
Brendan O'Dea bod@compusol.com.au
|
| 98 |
+
Brian Foster bfoster@redhat.com
|
| 99 |
+
Brian Kimball bfk@footbag.org
|
| 100 |
+
Brian M. Carlson sandals@crustytoothpaste.ath.cx
|
| 101 |
+
Brian Silverman bsilverman@conceptxdesign.com
|
| 102 |
+
Brian Youmans 3diff@gnu.org
|
| 103 |
+
Britton Leo Kerin fsblk@aurora.uaf.edu
|
| 104 |
+
Bruce Robertson brucer@theodolite.dyndns.org
|
| 105 |
+
Brynnen Owen owen@illinois.edu
|
| 106 |
+
Carl Johnson carlj@cjlinux.home.org
|
| 107 |
+
Carl Lowenstein cdl@mpl.UCSD.EDU
|
| 108 |
+
Carl Roth roth@urs.us
|
| 109 |
+
Carlos Canau Carlos.Canau@relay.puug.pt
|
| 110 |
+
Charles Karney karney@pppl.gov
|
| 111 |
+
Charles Randall crandall@matchlogic.com
|
| 112 |
+
Chas. Owens chas.owens@gmail.com
|
| 113 |
+
Chip Salzenberg chip@valinux.com
|
| 114 |
+
Choi Jongu zoopi01@gmail.com
|
| 115 |
+
Chris Clayton chris2553@googlemail.com
|
| 116 |
+
Chris Faylor cgf@cygnus.com
|
| 117 |
+
Chris J. Bednar cjb@AdvancedDataSolutions.com
|
| 118 |
+
Chris Jones cjns1989@gmail.com
|
| 119 |
+
Chris Lesniewski ctl@mit.edu
|
| 120 |
+
Chris Sylvain csylvain@umm.edu
|
| 121 |
+
Chris Yeo cyeo@biking.org
|
| 122 |
+
Christi Alice Scarborough christi@chiark.greenend.org.uk
|
| 123 |
+
Christian Brauner christian.brauner@canonical.com
|
| 124 |
+
Christian Harkort christian.harkort@web.de
|
| 125 |
+
Christian Jullien eligis@orange.fr
|
| 126 |
+
Christian Krackowizer ckrackowiz@std.schuler-ag.com
|
| 127 |
+
Christian Rose menthos@menthos.com
|
| 128 |
+
Christian von Roques roques@pond.sub.org
|
| 129 |
+
Christophe LYON christophe.lyon@st.com
|
| 130 |
+
Chuck Hedrick hedrick@klinzhai.rutgers.edu
|
| 131 |
+
Chusslove Illich caslav.ilic@gmx.net
|
| 132 |
+
Clark Morgan cmorgan@aracnet.com
|
| 133 |
+
Clement Wang clem.wang@overture.com
|
| 134 |
+
Colin Plumb colin@nyx.net
|
| 135 |
+
Collin Rogowski collin@rogowski.de
|
| 136 |
+
Cray-Cyber Project https://www.cray-cyber.org
|
| 137 |
+
Cristian Cadar cristic@stanford.edu
|
| 138 |
+
Cyril Bouthors cyril@bouthors.org
|
| 139 |
+
Dale Scheetz dwarf@polaris.net
|
| 140 |
+
Dameon G. Rogers dgr03@uark.edu
|
| 141 |
+
Dan Hagerty hag@gnu.ai.it.edu
|
| 142 |
+
Dan Pascu dan@services.iiruc.ro
|
| 143 |
+
Daniel Bergstrom noa@melody.se
|
| 144 |
+
Daniel Carpenter dansebpub@gmail.com
|
| 145 |
+
Daniel Mach dmach@redhat.com
|
| 146 |
+
Daniel P. Berrangé berrange@redhat.com
|
| 147 |
+
Daniel Stavrovski d@stavrovski.net
|
| 148 |
+
Daniel Tschinder daniel.tschinder@project-a.com
|
| 149 |
+
Dániel Varga danielv@axelero.hu
|
| 150 |
+
Danny Levinson danny.levinson@overture.com
|
| 151 |
+
Darrel Francis d.francis@cheerful.com
|
| 152 |
+
Darren Salt ds@youmustbejoking.demon.co.uk
|
| 153 |
+
Dave Beckett dajobe@dajobe.org
|
| 154 |
+
David Alan Gilbert gilbertd@treblig.org
|
| 155 |
+
David Diggles david.diggles@dnrm.qld.gov.au
|
| 156 |
+
David Dyck dcd@tc.fluke.COM
|
| 157 |
+
David Eisner cradle@umd.edu
|
| 158 |
+
David Flynn dav@chess.plus.com
|
| 159 |
+
David Gast dgast@csulb.edu
|
| 160 |
+
David Godfrey dave@delta.demon.co.uk
|
| 161 |
+
David Luyer david_luyer@pacific.net.au
|
| 162 |
+
David Madore david.madore@ens.fr
|
| 163 |
+
David Malone dwmalone@cnri.dit.ie
|
| 164 |
+
David Matei matei@cs.toronto.edu
|
| 165 |
+
David Pinto carandraug+dev@gmail.com
|
| 166 |
+
Davide Canova kc.canova@gmail.com
|
| 167 |
+
Dawson Engler engler@stanford.edu
|
| 168 |
+
Dean Gaudet dean-savannah@arctic.org
|
| 169 |
+
Deepak Goel deego@gnufans.org
|
| 170 |
+
Denis Excoffier gcc@Denis-Excoffier.org
|
| 171 |
+
Denis McKeon dmckeon@swcp.com
|
| 172 |
+
Dennis Clarke dclarke@blastwave.org
|
| 173 |
+
Dennis Henriksen opus@flamingo.osrl.dk
|
| 174 |
+
Dennis Smit ds@nerds-incorporated.org
|
| 175 |
+
Derek Clegg dclegg@next.com
|
| 176 |
+
Dick Streefland dick_streefland@tasking.com
|
| 177 |
+
Dirk Lattermann dlatt@t-online.de
|
| 178 |
+
Dirk-Jan Faber djfaber@snow.nl
|
| 179 |
+
Dmitry Rutsky rutsky@school.ioffe.rssi.ru
|
| 180 |
+
Don Parsons dparsons@synapse.kent.edu
|
| 181 |
+
Donni Erpel donald@appc11.gsi.de
|
| 182 |
+
Doug Coleman coleman@iarc1.ece.utexas.edu
|
| 183 |
+
Doug McLaren dougmc@comco.com
|
| 184 |
+
Dragos Harabor dharabor@us.oracle.com
|
| 185 |
+
Duncan Roe duncanr@optimation.com.au
|
| 186 |
+
Edward Schwartz edmcman@cmu.edu
|
| 187 |
+
Edzer Pebesma Edzer.Pebesma@rivm.nl
|
| 188 |
+
Egmont Koblinger egmont@uhulinux.hu
|
| 189 |
+
Eirik Fuller eirik@hackrat.com
|
| 190 |
+
Eivind eivindt@multinet.no
|
| 191 |
+
Elbert Pol elbert.pol@gmail.com
|
| 192 |
+
Eldon Stegall eldon@eldondev.com
|
| 193 |
+
Eli Zaretskii eliz@is.elta.co.il
|
| 194 |
+
Emanuel Landeholm emanuel.landeholm@gmail.com
|
| 195 |
+
Emile LeBlanc leblanc@math.toronto.edu
|
| 196 |
+
Emmanuel Lacour elacour@home-dn.net
|
| 197 |
+
Eric Backus ericb@lsid.hp.com
|
| 198 |
+
Eric Bergen eric.bergen@gmail.com
|
| 199 |
+
Eric G. Miller egm2@jps.net
|
| 200 |
+
Eric Pemente pemente@northpark.edu
|
| 201 |
+
Eric S. Raymond esr@snark.thyrsus.com
|
| 202 |
+
Erik Bennett bennett@cvo.oneworld.com
|
| 203 |
+
Erik Bernstein erik@fscking.org
|
| 204 |
+
Erik Corry erik@kroete2.freinet.de
|
| 205 |
+
Felix Lee flee@teleport.com
|
| 206 |
+
Felix Rauch Valenti frauch@cse.unsw.edu.au
|
| 207 |
+
Ferdinand fw@scenic.mine.nu
|
| 208 |
+
Fletcher Mattox fletcher@cs.utexas.edu
|
| 209 |
+
Florent Bayle florent@sarcelle.net
|
| 210 |
+
Florian Schlichting fschlich@cis.fu-berlin.de
|
| 211 |
+
Florin Iucha fiucha@hsys.mic.ro
|
| 212 |
+
Francesco Montorsi fr_m@hotmail.com
|
| 213 |
+
François Pinard pinard@iro.umontreal.ca
|
| 214 |
+
François Rigault rigault.francois@gmail.com
|
| 215 |
+
Frank Adler fadler@allesklar.de
|
| 216 |
+
Frank Busse f.busse@imperial.ac.uk
|
| 217 |
+
Frank T Lofaro ftlofaro@snooks.Egr.UNLV.EDU
|
| 218 |
+
Fred Fish fnf@ninemoons.com
|
| 219 |
+
Frédéric L. W. Meunier 0@pervalidus.net
|
| 220 |
+
Frederik Eaton frederik@caltech.edu
|
| 221 |
+
Gabor Z. Papp gzp@gzp.org.hu
|
| 222 |
+
Gaël Quéri gqueri@mail.dotcom.fr
|
| 223 |
+
Galen Hazelwood galenh@micron.net
|
| 224 |
+
Gary Anderson ganderson@clark.net
|
| 225 |
+
Gary Johnson garyjohn@spk.agilent.com
|
| 226 |
+
Gary V. Vaughan gary@gnu.org
|
| 227 |
+
Gaute Hvoslef Kvalnes gaute@verdsveven.com
|
| 228 |
+
Geoff Collyer geoff at collyer.net
|
| 229 |
+
Geoff Kuenning geoff@cs.hmc.edu
|
| 230 |
+
Geoff Odhner geoff@franklin.com
|
| 231 |
+
Geoff Whale geoffw@cse.unsw.EDU.AU
|
| 232 |
+
Gerald Pfeifer gerald@pfeifer.com
|
| 233 |
+
Gerhard Poul gpoul@gnu.org
|
| 234 |
+
Germano Leichsenring germano@jedi.cs.kobe-u.ac.jp
|
| 235 |
+
Glen Lenker glen.lenker@gmail.com
|
| 236 |
+
Glenn Golden gdg@zplane.com
|
| 237 |
+
GOTO Masanori gotom@debian.or.jp
|
| 238 |
+
Greg Louis glouis@dynamicro.on.ca
|
| 239 |
+
Greg McGary gkm@gnu.org
|
| 240 |
+
Greg Metcalfe metcalfegreg@qwest.net
|
| 241 |
+
Greg Schafer gschafer@zip.com.au
|
| 242 |
+
Greg Troxel gdt@bbn.com
|
| 243 |
+
Gregory Leblanc gleblanc@cu-portland.edu
|
| 244 |
+
Guido Leenders guido.leenders@invantive.com
|
| 245 |
+
Guntram Blohm Extern.Guntram.Blohm@AUDI.DE
|
| 246 |
+
Guochun Shi gshi@ncsa.uiuc.edu
|
| 247 |
+
H. J. Lu hjl@valinux.com
|
| 248 |
+
Hans Ginzel hans@matfyz.cz
|
| 249 |
+
Hans Lermen lermen@fgan.de
|
| 250 |
+
Hans Verkuil hans@wyst.hobby.nl
|
| 251 |
+
Harald Dunkel harald.dunkel@t-online.de
|
| 252 |
+
Harry Liu rliu@lek.ugcs.caltech.edu
|
| 253 |
+
Harti Brandt brandt@fokus.fraunhofer.de
|
| 254 |
+
Harvey Eneman Harvey.Eneman@oracle.com
|
| 255 |
+
Heiko Marr h.marr@webmasters.de
|
| 256 |
+
Helen Faulkner helen_ml_faulkner@yahoo.co.uk
|
| 257 |
+
Herbert Xu herbert@gondor.apana.org.au
|
| 258 |
+
Holger Berger hberger@ess.nec.de
|
| 259 |
+
Hon-Yin Kok hkok@yoda.unl.edu
|
| 260 |
+
Hugh Daniel hugh@xanadu.com
|
| 261 |
+
Iain Calder ic56@rogers.com
|
| 262 |
+
Ian Bruce ian.bruce@myrealbox.com
|
| 263 |
+
Ian Jackson ijackson@chiark.greenend.org.uk
|
| 264 |
+
Ian Kent ikent@redhat.com
|
| 265 |
+
Ian Lance Taylor ian@cygnus.com
|
| 266 |
+
Ian Turner vectro@pipeline.com
|
| 267 |
+
Iida Yosiaki iida@gnu.org
|
| 268 |
+
Illia Bobyr ibobyr@google.com
|
| 269 |
+
Ilya N. Golubev gin@mo.msk.ru
|
| 270 |
+
Ingo Saitz ingo@debian.org
|
| 271 |
+
Ivan Labath labath3@st.fmph.uniba.sk
|
| 272 |
+
Ivo Timmermans ivo@debian.org
|
| 273 |
+
Jack Howarth howarth.mailing.lists@gmail.com
|
| 274 |
+
Jacky Fong jacky.fong@utoronto.ca
|
| 275 |
+
James Antill jmanti%essex.ac.uk@seralph21.essex.ac.uk
|
| 276 |
+
James Hunt jamesodhunt@hotmail.com
|
| 277 |
+
James james@albion.glarp.com
|
| 278 |
+
James Lemley James.Lemley@acxiom.com
|
| 279 |
+
James Ralston ralston@pobox.com
|
| 280 |
+
James Sneeringer jvs@ocslink.com
|
| 281 |
+
James Tanis jtt@soscorp.com
|
| 282 |
+
Jamie Lokier jamie@imbolc.ucc.ie
|
| 283 |
+
Jamie McClelland jm@mayfirst.org
|
| 284 |
+
Jan Engelhardt jengelh@medozas.de
|
| 285 |
+
Jan Fedak J.Fedak@sh.cvut.cz
|
| 286 |
+
Jan Moringen jan.moringen@uni-bielefeld.de
|
| 287 |
+
Janos Farkas chexum@shadow.banki.hu
|
| 288 |
+
Jan-Pawel Wrozstinski jpwroz@gmail.com
|
| 289 |
+
Jari Aalto jari.aalto@cante.net
|
| 290 |
+
Jarkko Hietaniemi jhi@epsilon.hut.fi
|
| 291 |
+
Jarod Wilson jwilson@redhat.com
|
| 292 |
+
Jason Smith jasonmsmith@google.com
|
| 293 |
+
Jean Charles Delepine delepine@u-picardie.fr
|
| 294 |
+
Jean-Pierre Tosoni jpt.7196@gmail.com
|
| 295 |
+
Jeff Moore jbm@mordor.com
|
| 296 |
+
Jeff Sheinberg jeff@bsrd.net
|
| 297 |
+
Jens Elkner elkner@imsgroup.de
|
| 298 |
+
Jens Schmidt jms@jsds.hamburg.com
|
| 299 |
+
Jeph Cowan jeph@ucar.edu
|
| 300 |
+
Jeremy Maitin-Shepard jbms@cmu.edu
|
| 301 |
+
Jérémy Magrin jeremy.magrin@epitech.eu
|
| 302 |
+
Jerome Abela abela@hsc.fr
|
| 303 |
+
Jérôme Zago bug-coreutils-ml@agt-the-walker.net
|
| 304 |
+
Jesse Kornblum kornblum@usna.edu
|
| 305 |
+
Jesse Thilo jgt2@eecs.lehigh.edu
|
| 306 |
+
Jie Xu xuj@iag.net
|
| 307 |
+
Jim Blandy jimb@cyclic.com
|
| 308 |
+
Jim Dennis jimd@starshine.org
|
| 309 |
+
Jirka Hladky jhladky@redhat.com
|
| 310 |
+
Joakim Rosqvist dvljrt@cs.umu.se
|
| 311 |
+
Jochen Hein jochen@jochen.org
|
| 312 |
+
Joe Orton joe@manyfish.co.uk
|
| 313 |
+
Joerg Sonnenberger joerg@britannica.bec.de
|
| 314 |
+
Joey Hess joeyh@debian.org
|
| 315 |
+
Johan Boule bohan@bohan.dyndns.org
|
| 316 |
+
Johan Danielsson joda@pdc.kth.se
|
| 317 |
+
Johannes Altmanninger aclopte@gmail.com
|
| 318 |
+
Johannes Schauer Marin Rodrigues josch@debian.org
|
| 319 |
+
John Bley jbb6@acpub.duke.edu
|
| 320 |
+
John Gatewood Ham zappaman@alphabox.compsci.buu.ac.th
|
| 321 |
+
John Gotts jgotts@umich.edu
|
| 322 |
+
John Kendall kendall@capps.com
|
| 323 |
+
John Kodis kodis@acm.org
|
| 324 |
+
John Murphy jam@philabs.research.philips.com
|
| 325 |
+
John Roll john@panic.harvard.edu
|
| 326 |
+
John Salmon johns@mullet.anu.edu.au
|
| 327 |
+
John Stanley johnstops@verizon.net
|
| 328 |
+
John Summerfield summer@OS2.ami.com.au
|
| 329 |
+
Jon Peatfield J.S.Peatfield@damtp.cam.ac.uk
|
| 330 |
+
Joost van Baal joostvb@xs4all.nl
|
| 331 |
+
Jordi Pujol jordipujolp@gmail.com
|
| 332 |
+
Jorge Stolfi stolfi@ic.unicamp.br
|
| 333 |
+
Joseph D. Wagner joe@josephdwagner.info
|
| 334 |
+
Joseph S. Myers jsm28@cam.ac.uk
|
| 335 |
+
Josh Triplett josh@freedesktop.org
|
| 336 |
+
Joshua Hudson joshudson@gmail.com
|
| 337 |
+
Josselin Mouette joss@debian.org
|
| 338 |
+
Juan F. Codagnone juam@arnet.com.ar
|
| 339 |
+
Juan M. Guerrero st001906@hrz1.hrz.tu-darmstadt.de
|
| 340 |
+
Julian Bradfield jcb@inf.ed.ac.uk
|
| 341 |
+
Julian Büning julian.buening@rwth-aachen.de
|
| 342 |
+
Jungshik Shin jshin@pantheon.yale.edu
|
| 343 |
+
Juraj Marko jmarko@redhat.com
|
| 344 |
+
Jürgen Fluk louis@dachau.marco.de
|
| 345 |
+
Jurriaan thunder7@xs4all.nl
|
| 346 |
+
Justin Pryzby justinpryzby@users.sourceforge.net
|
| 347 |
+
jvogel jvogel@linkny.com
|
| 348 |
+
Kai Henningsen kai@debian.org
|
| 349 |
+
Kai-Uwe Rommel rommel@informatik.tu-muenchen.de
|
| 350 |
+
Kalle Olavi Niemitalo kon@iki.fi
|
| 351 |
+
Kamal Paul Nigam Kamal_Paul_Nigam@gs35.sp.cs.cmu.edu
|
| 352 |
+
Karl Eichwalder keichwa@gmx.net
|
| 353 |
+
Karl-Michael Schneider schneide@phil.uni-passau.de
|
| 354 |
+
Karsten Thygesen karthy@kom.auc.dk
|
| 355 |
+
Kaveh R. Ghazi ghazi@caip.rutgers.edu
|
| 356 |
+
Keith M. Briggs keith.briggs@bt.com
|
| 357 |
+
Keith Owens kaos@audio.apana.org.au
|
| 358 |
+
Keith Thompson Keith.S.Thompson@gmail.com
|
| 359 |
+
Ken Irving ken.irving@alaska.edu
|
| 360 |
+
Ken Pizzini kenp@halcyon.com
|
| 361 |
+
Kevin Mudrick kmudrick@healthmarketscience.com
|
| 362 |
+
Kirk Kelsey kirk.kelsey@0x4b.net
|
| 363 |
+
Kjetil Torgrim Homme kjetilho@ifi.uio.no
|
| 364 |
+
Konrad Wróblewski coni@o2.pl
|
| 365 |
+
Kristin E Thomas kristint@us.ibm.com
|
| 366 |
+
Kristoffer Rose kris@diku.dk
|
| 367 |
+
Ladislav Hagara ladislav.hagara@unob.cz
|
| 368 |
+
Larry McVoy lm@sgi.com
|
| 369 |
+
Lars Hecking lhecking@nmrc.ucc.ie
|
| 370 |
+
Leah Q eequor@earthlink.net
|
| 371 |
+
Lehti Rami rammer@cs.tut.fi
|
| 372 |
+
Leonard N. Zubkoff lnz@dandelion.com
|
| 373 |
+
Leonardo Milano lmilano@udel.edu
|
| 374 |
+
Lluís Batlle viriketo@gmail.com
|
| 375 |
+
Lorne Baker lbaker@nitro.avint.net
|
| 376 |
+
Luke Hassell lukehassell@yahoo.com
|
| 377 |
+
Luke Kendall lukekendall@optushome.com.au
|
| 378 |
+
M. P. Suzuki mpsuzuki@hiroshima-u.ac.jp
|
| 379 |
+
Maciej Kwapulinski pikpok@univ.gda.pl
|
| 380 |
+
Manas Garg manas@cygsoft.com
|
| 381 |
+
Manfred Hollstein manfred@s-direktnet.de
|
| 382 |
+
Marc Boucher marc@mbsi.ca
|
| 383 |
+
Marc Haber mh+debian-bugs@zugschlus.de
|
| 384 |
+
Marc Lehman schmorp@schmorp.de
|
| 385 |
+
Marc Mengel mengel@fnal.gov
|
| 386 |
+
Marc Olzheim marcolz@stack.nl
|
| 387 |
+
Marcel Böhme https://www.comp.nus.edu.sg/~mboehme
|
| 388 |
+
Marco Franzen Marco.Franzen@Thyron.com
|
| 389 |
+
Marcus Brinkmann https://www.marcus-brinkmann.de
|
| 390 |
+
Marcus Daniels marcus@ee.pdx.edu
|
| 391 |
+
Mark A. Thomas thommark@access.digex.net
|
| 392 |
+
Mark Conty Mark_Conty@cargill.com
|
| 393 |
+
Mark D. Roth roth@uiuc.edu
|
| 394 |
+
Mark Funkenhauser mfunkenhauser@rogers.com
|
| 395 |
+
Mark Harris mark@monitor.designacc.com
|
| 396 |
+
Mark Hewitt mhewitt@armature.com
|
| 397 |
+
Mark Hounschell markh@compro.net
|
| 398 |
+
Mark Hubbart discord@mac.com
|
| 399 |
+
Mark Kettenis kettenis@phys.uva.nl
|
| 400 |
+
Mark Korenberg socketpair@gmail.com
|
| 401 |
+
Mark Melahn mmelahn@gmail.com
|
| 402 |
+
Mark Nudelman marknu@flash.net
|
| 403 |
+
Mark W. Eichin eichin@cygnus.com
|
| 404 |
+
Markus Demleitner msdemlei@auriga.ari.uni-heidelberg.de
|
| 405 |
+
Martin Buck martin.buck@ascom.ch
|
| 406 |
+
Martin Gallant martyg@goodbit.net
|
| 407 |
+
Martin Hippe martin.hippe@schlund.de
|
| 408 |
+
Martin Jacobs martin.jacobs@arcor.de
|
| 409 |
+
Martin martin@dresden.nacamar.de
|
| 410 |
+
Martin Michlmayr tbm@cyrius.com
|
| 411 |
+
Martin Mitchell martin@debian.org
|
| 412 |
+
Martin P.J. Zinser zinser@decus.de
|
| 413 |
+
Marty Leisner leisner@sdsp.mc.xerox.com
|
| 414 |
+
Masami Takikawa takikawm@CS.ORST.EDU
|
| 415 |
+
Mate Wierdl mw@moni.msci.memphis.edu
|
| 416 |
+
Matej Vela mvela@public.srce.hr
|
| 417 |
+
Matheus Afonso Martins Moreira matheus.a.m.moreira@gmail.com
|
| 418 |
+
Mathias Brodala info@noctus.net
|
| 419 |
+
Matias A. Fonzo selk@dragora.org
|
| 420 |
+
Matt Kraai kraai@ftbfs.org
|
| 421 |
+
Matt McCutchen matt@mattmccutchen.net
|
| 422 |
+
Matt Perry matt@primefactor.com
|
| 423 |
+
Matt Pham mattvpham@gmail.com
|
| 424 |
+
Matt Schalit mschalit@pacbell.net
|
| 425 |
+
Matt Swift swift@alum.mit.edu
|
| 426 |
+
Matthew Arnison maffew@cat.org.au
|
| 427 |
+
Matthew Braun matthew@ans.net
|
| 428 |
+
Matthew Clarke Matthew_Clarke@mindlink.bc.ca
|
| 429 |
+
Matthew M. Boedicker matthewm@boedicker.org
|
| 430 |
+
Matthew Pfeiffer spferical@gmail.com
|
| 431 |
+
Matthew S. Levine mslevine@theory.lcs.mit.edu
|
| 432 |
+
Matthew Smith matts@bluesguitar.org
|
| 433 |
+
Matthew Swift swift@alum.mit.edu
|
| 434 |
+
Matthias Urlichs smurf@noris.de
|
| 435 |
+
Matti Aarnio matti.aarnio@zmailer.org
|
| 436 |
+
Mattias Wadenstein maswan@acc.umu.se
|
| 437 |
+
Max Chang maxchang@ucla.edu
|
| 438 |
+
Meelis Roos mroos@tartu.cyber.ee
|
| 439 |
+
Michael Bacarella mbac@netgraft.com
|
| 440 |
+
Michael Deutschmann michael@talamasca.ocis.net
|
| 441 |
+
Michael Elizabeth Chastain mec.gnu@mindspring.com
|
| 442 |
+
Michael Gaughen mgaughen@polyserve.com
|
| 443 |
+
Michael Hasselberg mikelh@zonta.ping.de
|
| 444 |
+
Michael Hohn hohn@math.utah.edu
|
| 445 |
+
Michael J. Croghan mcroghan@usatoday.com
|
| 446 |
+
Michael J. Daniel michael.j.daniel@comcast.net
|
| 447 |
+
Michael McFarland sidlon@yahoo.com
|
| 448 |
+
Michael McLagan mmclagan@invlogic.com
|
| 449 |
+
Michael michael@aplatform.com
|
| 450 |
+
Michael ??? michael@roka.net
|
| 451 |
+
Michael Mol mikemol@gmail.com
|
| 452 |
+
Michael Piefel piefel@informatik.hu-berlin.de
|
| 453 |
+
Michael Price mprice@atl.lmco.com
|
| 454 |
+
Michael Steffens michael.steffens@s.netic.de
|
| 455 |
+
Michael Stummvoll michael@stummi.org
|
| 456 |
+
Michael Stutz stutz@dsl.org
|
| 457 |
+
Michael van Elst mlelstv@dev.de.cw.net
|
| 458 |
+
Michael Veksler mveksler@techunix.technion.ac.il
|
| 459 |
+
Michail Litvak mci@owl.openwall.com
|
| 460 |
+
Michal Politowski mpol@charybda.icm.edu.pl
|
| 461 |
+
Michal Svec msvec@suse.cz
|
| 462 |
+
Michal Trunecka mtruneck@redhat.com
|
| 463 |
+
Michel Robitaille robitail@IRO.UMontreal.CA
|
| 464 |
+
Michiel Bacchiani bacchian@raven.bu.edu
|
| 465 |
+
Mike Castle dalgoda@ix.netcom.com
|
| 466 |
+
Mike Coleman mkc@mathdogs.com
|
| 467 |
+
Mike Jetzer mjetzer@mke.catalystwms.com
|
| 468 |
+
Mikko Tuumanen m@sorvankyla.yok.utu.fi
|
| 469 |
+
Mikulas Patocka mikulas@artax.karlin.mff.cuni.cz
|
| 470 |
+
Miles Bader miles@gnu.ai.mit.edu
|
| 471 |
+
Minh Tran-Le tranle@intellicorp.com
|
| 472 |
+
Morten Welinder terra@diku.dk
|
| 473 |
+
Nao Nishijima nao.nishijima.xt@hitachi.com
|
| 474 |
+
Neal H Walfield neal@cs.uml.edu
|
| 475 |
+
Neil F. Brown neilb@suse.de
|
| 476 |
+
Nelson H. F. Beebe beebe@math.utah.edu
|
| 477 |
+
Nick Estes debian@nickstoys.com
|
| 478 |
+
Nick Graham nick.d.graham@gmail.com
|
| 479 |
+
Nick Lawes nlawes@silverplatter.com
|
| 480 |
+
Nickolai Zeldovich nickolai@cs.stanford.edu
|
| 481 |
+
Nicolas François nicolas.francois@centraliens.net
|
| 482 |
+
Niklas Edmundsson nikke@acc.umu.se
|
| 483 |
+
Nikola Milutinovic Nikola.Milutinovic@ev.co.yu
|
| 484 |
+
Nikolaus Rath Nikolaus@rath.org
|
| 485 |
+
Nikos Mavrogiannopoulos nmav@redhat.com
|
| 486 |
+
Nima Nikzad nnikzad@ucla.edu
|
| 487 |
+
Noah Friedman friedman@splode.com
|
| 488 |
+
Noel Cragg noel@red-bean.com
|
| 489 |
+
Norbert Kiesel nkiesel@tbdnetworks.com
|
| 490 |
+
Norihiro Kamae norihiro@nagater.net
|
| 491 |
+
Olatunji Oluwabukunmi Ruwase tjruwase@stanford.edu
|
| 492 |
+
Olav Morkrid olav@funcom.com
|
| 493 |
+
Ole Laursen olau@hardworking.dk
|
| 494 |
+
Oliver Kiddle okiddle@yahoo.co.uk
|
| 495 |
+
Olivier Fourdan ofourdan@redhat.com
|
| 496 |
+
Ørn E. Hansen oehansen@daimi.aau.dk
|
| 497 |
+
Oskar Liljeblad osk@hem.passagen.se
|
| 498 |
+
Otavio Salvador otavio@ossystems.com.br
|
| 499 |
+
Patrick Mauritz oxygene@studentenbude.ath.cx
|
| 500 |
+
Paul D. Smith psmith@gnu.org
|
| 501 |
+
Paul Ghaleb paul.ghaleb@st.com
|
| 502 |
+
Paul Jarc prj@po.cwru.edu
|
| 503 |
+
Paul Marinescu paul.marinescu@imperial.ac.uk
|
| 504 |
+
Paul Nevai nevai@ops.mps.ohio-state.edu
|
| 505 |
+
Paul Sauer paul@alexa.com
|
| 506 |
+
Paul Slootman paul@debian.org
|
| 507 |
+
Paul Townsend aab@purdue.edu
|
| 508 |
+
Paul Worrall paul@basilisk.uklinux.net
|
| 509 |
+
Pawel Prokop pablo@wizard.ae.krakow.pl
|
| 510 |
+
Peng Yu pengyu.ut@gmail.com
|
| 511 |
+
Per Cederqvist ceder@lysator.liu.se
|
| 512 |
+
Per Kristian Hove perhov@math.ntnu.no
|
| 513 |
+
Per Starbäck starback@stp.lingfil.uu.se
|
| 514 |
+
Peter Breitenlohner peb@mppmu.mpg.de
|
| 515 |
+
Peter Dyballa peter_dyballa@web.de
|
| 516 |
+
Peter Eriksson peter@ifm.liu.se
|
| 517 |
+
Peter Evans peter@ixp.jp
|
| 518 |
+
Peter Horst peter@ointment.org
|
| 519 |
+
Peter Moulder reiter@netspace.net.au
|
| 520 |
+
Peter Samuelson psamuels@sampo.creighton.edu
|
| 521 |
+
Peter Seebach seebs@taniemarie.solon.com
|
| 522 |
+
Petr Pisar petr.pisar@atlas.cz
|
| 523 |
+
Petr Uzel petr.uzel@suse.cz
|
| 524 |
+
Petter Reinholdtsen pere@hungry.com
|
| 525 |
+
Phelippe Neveu pneveu@pcigeomatics.com
|
| 526 |
+
Phil Richards phil.richards@vf.vodafone.co.uk
|
| 527 |
+
Philipp Gortan gortan@gmail.com
|
| 528 |
+
Philippe De Muyter phdm@macqel.be
|
| 529 |
+
Philippe Schnoebelen Philippe.Schnoebelen@imag.fr
|
| 530 |
+
Phillip Jones mouse@datastacks.com
|
| 531 |
+
Piergiorgio Sartor sartor@sony.de
|
| 532 |
+
Pieter Bowman bowman@math.utah.edu
|
| 533 |
+
Piotr Gackiewicz gacek@intertele.pl
|
| 534 |
+
Piotr Kwapulinski kwap@univ.gda.pl
|
| 535 |
+
Prashant TR tr@eth.net
|
| 536 |
+
Priit Jõerüüt jemm4jemm@yahoo.com
|
| 537 |
+
Primoz PETERLIN primozz.peterlin@gmail.com
|
| 538 |
+
Raimonds Miltins raimonds@pro-9.com
|
| 539 |
+
Rainer Orth ro@TechFak.Uni-Bielefeld.DE
|
| 540 |
+
Ralf W. Stephan stephan@tmt.de
|
| 541 |
+
Ralph Loader loader@maths.ox.ac.uk
|
| 542 |
+
Raul Miller moth@magenta.com
|
| 543 |
+
Raúl Núñez de Arenas Coronado raul@pleyades.net
|
| 544 |
+
Rich Burridge rich.burridge@oracle.com
|
| 545 |
+
Richard A Downing richard.downing@bcs.org.uk
|
| 546 |
+
Richard Braakman dark@xs4all.nl
|
| 547 |
+
Richard Dawe rich@phekda.freeserve.co.uk
|
| 548 |
+
Richard J. Rauenzahn rrauenza@hairball.cup.hp.com
|
| 549 |
+
Richard Neill rn214@hermes.cam.ac.uk
|
| 550 |
+
Richard Sharman rsharman@magmacom.com
|
| 551 |
+
Rick Sladkey jrs@world.std.com
|
| 552 |
+
Rick Stanley rstanley@rsiny.com
|
| 553 |
+
Rik Faith faith@cs.unc.edu
|
| 554 |
+
Risto Kankkunen kankkune@lingsoft.fi
|
| 555 |
+
Rob Wortman wyrm@haell.com
|
| 556 |
+
Robert H. de Vries robert@and.nl
|
| 557 |
+
Robert Lindgren robert@orcafat.com
|
| 558 |
+
Robert Millan zeratul2@wanadoo.es
|
| 559 |
+
Robert Schwebel r.schwebel@pengutronix.de
|
| 560 |
+
Robin H. Johnson robbat2@gentoo.org
|
| 561 |
+
Rogier Wolff R.E.Wolff@BitWizard.nl
|
| 562 |
+
Roland Huebner ro-huebner@gmx.de
|
| 563 |
+
Roland Turner raz.tah.bet@raz.cx
|
| 564 |
+
Ronald F. Guilmette rfg@netcom.com
|
| 565 |
+
Ross Alexander r.alexander@auckland.ac.nz
|
| 566 |
+
Ross Paterson rap@doc.ic.ac.uk
|
| 567 |
+
Ross Ridge rridge@calum.csclub.uwaterloo.ca
|
| 568 |
+
Rudolf Kastl rkastl@redhat.com
|
| 569 |
+
Sahil Amoli sahilamoli@gmail.com
|
| 570 |
+
Sami Farin sfarin@ratol.fi
|
| 571 |
+
Samuel Neves sneves@dei.uc.pt
|
| 572 |
+
Samuel Thibault samuel.thibault@ens-lyon.org
|
| 573 |
+
Samuli Karkkainen Samuli.Karkkainen@hut.fi
|
| 574 |
+
Sander van Malssen svm@kozmix.ow.nl
|
| 575 |
+
Santiago Vila Doncel sanvila@unex.es
|
| 576 |
+
Savochkin Andrey Vladimirovich saw@msu.ru
|
| 577 |
+
Scott Harrison scott.gnu.2009@scottrix.co.uk
|
| 578 |
+
Scott Lurndal slurn@griffin.engr.sgi.com
|
| 579 |
+
Sébastien Maret smaret@umich.edu
|
| 580 |
+
Sergei Steshenko sergstesh@yahoo.com
|
| 581 |
+
Sergey Vlasov vsu@altlinux.org
|
| 582 |
+
Shing-Shong Shei shei@cs.indiana.edu
|
| 583 |
+
Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de
|
| 584 |
+
Solar Designer solar@owl.openwall.com
|
| 585 |
+
Stanislav Ievlev inger@altlinux.ru
|
| 586 |
+
Stavros Passas stabat@ics.forth.gr
|
| 587 |
+
Stefan Vargyas stvar@yahoo.com
|
| 588 |
+
Stéphane Chazelas Stephane_CHAZELAS@yahoo.fr
|
| 589 |
+
Stephen Depooter sbdep@myrealbox.com
|
| 590 |
+
Stephen Eglen eglen@pcg.wustl.edu
|
| 591 |
+
Stephen Gildea gildea@stop.mail-abuse.org
|
| 592 |
+
Stephen Shirley kormat@gmail.com
|
| 593 |
+
Stephen Smoogen smooge@mindspring.com
|
| 594 |
+
Steve McConnel steve@acadcomp.sil.org
|
| 595 |
+
Steve McIntyre steve@einval.com
|
| 596 |
+
Steve Ward planet36@gmail.com
|
| 597 |
+
Steven Drake sbd@users.sourceforge.net
|
| 598 |
+
Steven G. Johnson stevenj@alum.mit.edu
|
| 599 |
+
Steven Mocking ufo@quicknet.nl
|
| 600 |
+
Steven Parkes smparkes@smparkes.net
|
| 601 |
+
Steven P Watson steven@magelico.net
|
| 602 |
+
Steven Schveighoffer schveiguy@yahoo.com
|
| 603 |
+
Stuart Citrin ctrn3e8@gmail.com
|
| 604 |
+
Stuart Kemp skemp@peter.bmc.com
|
| 605 |
+
Stuart Shelton stuart@shelton.me
|
| 606 |
+
Sven Breuner sven.breuner@itwm.fraunhofer.de
|
| 607 |
+
Szakacsits Szabolcs szaka@sienet.hu
|
| 608 |
+
Tadayoshi Funaba tadf@kt.rim.or.jp
|
| 609 |
+
TAKAI Kousuke takai@vlsi.kuee.kyoto-u.ac.jp
|
| 610 |
+
The Wanderer inverseparadox@comcast.net
|
| 611 |
+
Theodore Ts'o tytso@rsts-11.mit.edu
|
| 612 |
+
Thomas Bushnell thomas@gnu.ai.mit.edu
|
| 613 |
+
Thomas Goerlich thomas@schnappmatik.de
|
| 614 |
+
Thomas Hood jdthood@yahoo.co.uk
|
| 615 |
+
Thomas Luzat thomas@luzat.com
|
| 616 |
+
Thomas M.Ott thmo-13@gmx.de
|
| 617 |
+
Thomas Quinot thomas@Cuivre.FR.EU.ORG
|
| 618 |
+
Thomas Schwinge tschwinge@gnu.org
|
| 619 |
+
Thomas Wolff mined@towo.net
|
| 620 |
+
Tim J. Robbins tjr@FreeBSD.org
|
| 621 |
+
Tim Mooney mooney@dogbert.cc.ndsu.NoDak.edu
|
| 622 |
+
Tim Ryan Tim_Ryan@bnz.co.nz
|
| 623 |
+
Tim Smithers mouse@dmouse.com.au
|
| 624 |
+
Tim Underwood timunderwood@gmail.com
|
| 625 |
+
Tim Waugh twaugh@redhat
|
| 626 |
+
Toby Peterson toby@opendarwin.org
|
| 627 |
+
Todd A. Jacobs tjacobs@codegnome.org
|
| 628 |
+
Tom Fitzhenry tom@tom-fitzhenry.me.uk
|
| 629 |
+
Tom Haynes thomas@netapp.com
|
| 630 |
+
Tom Quinn trq@dionysos.thphys.ox.ac.uk
|
| 631 |
+
Tomas Pospisek tpo@sourcepole.ch
|
| 632 |
+
Tommi Kyntola tkyntola@cc.hut.fi
|
| 633 |
+
Ton Hospel thospel@mail.dma.be
|
| 634 |
+
Ton Nijkes ton@murphy.nl
|
| 635 |
+
Tony Kocurko akocurko@mun.ca
|
| 636 |
+
Tony Leneis tony@plaza.ds.adp.com
|
| 637 |
+
Tony Robinson ajr@eng.cam.ac.uk
|
| 638 |
+
Toomas Soome Toomas.Soome@Elion.ee
|
| 639 |
+
Toralf Förster toralf.foerster@gmx.de
|
| 640 |
+
Torbjörn Lindgren tl@funcom.no
|
| 641 |
+
Torsten Landschoff torsten@pclab.ifg.uni-kiel.de
|
| 642 |
+
Travis Gummels tgummels@redhat.com
|
| 643 |
+
Tristan Miller psychonaut@nothingisreal.com
|
| 644 |
+
Tzvi Rotshtein tzvi.ro@gmail.com
|
| 645 |
+
Ulrich Drepper drepper@gnu.org
|
| 646 |
+
Ulrich Hermisson ulrich_hermisson@hotmail.com
|
| 647 |
+
Urs Thuermann urs@isnogud.escape.de
|
| 648 |
+
Uwe H. Steinfeld usteinfeld@gmx.net
|
| 649 |
+
Vesselin Atanasov vesselin@bgnet.bg
|
| 650 |
+
Vin Shelton acs@alumni.princeton.edu
|
| 651 |
+
Vineet Chadha chadha@acis.ufl.edu
|
| 652 |
+
Vitali Lovich vlovich@gmail.com
|
| 653 |
+
Vitaly A. Ostanin vyt@altlinux.org
|
| 654 |
+
Vito Caputo vcaputo@pengaru.com
|
| 655 |
+
Vlada Macek tuttle@bbs.fsik.cvut.cz
|
| 656 |
+
Volker Borchert bt@teknon.de
|
| 657 |
+
Volker Paul vpaul@dohle.com
|
| 658 |
+
Wartan Hachaturow wart@tepkom.ru
|
| 659 |
+
Wayne Stewart wstewa@atl.com
|
| 660 |
+
Wenjun Zheng zwj@yahoo.com
|
| 661 |
+
Werner Almesberger Werner.Almesberger@epfl.ch
|
| 662 |
+
Wichert Akkerman wichert@cistron.nl
|
| 663 |
+
Will Edgington wedgingt@acm.org
|
| 664 |
+
William Bader william@nscs.fast.net
|
| 665 |
+
William Dowling will@franklin.com
|
| 666 |
+
William Lewis wiml@omnigroup.com
|
| 667 |
+
wiregauze wiregauze@yahoo.com
|
| 668 |
+
Wis Macomson wis.macomson@intel.com
|
| 669 |
+
Wojciech Purczynski cliph@isec.pl
|
| 670 |
+
Wolfram Kleff kleff@cs.uni-bonn.de
|
| 671 |
+
Won-kyu Park wkpark@chem.skku.ac.kr
|
| 672 |
+
Xu Zhongxing xu_zhong_xing@163.com
|
| 673 |
+
Yang Ren ryang@redhat.com
|
| 674 |
+
Yanko Kaneti yaneti@declera.com
|
| 675 |
+
Yann Dirson dirson@debian.org
|
| 676 |
+
Youngjun Song mastojun@gmail.com
|
| 677 |
+
Yutaka Amanai yasai-itame1942@jade.plala.or.jp
|
| 678 |
+
|
| 679 |
+
;; Local Variables:
|
| 680 |
+
;; coding: utf-8
|
| 681 |
+
;; End:
|
THANKStt.in
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
The following teams have translated the many diagnostics of this
|
| 2 |
+
package into many different languages. Thank you!
|
| 3 |
+
|
| 4 |
+
---
|
TODO
ADDED
|
@@ -0,0 +1,155 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
If you're interested in helping, here are some tasks that we've considered
|
| 2 |
+
over the years. Beware: some are quite old and no longer valid. To avoid
|
| 3 |
+
wasting your time by duplicating work or by working on a task that is no
|
| 4 |
+
longer pertinent, please search the mailing list and post your intent
|
| 5 |
+
before embarking on a big project.
|
| 6 |
+
|
| 7 |
+
==================================================
|
| 8 |
+
Modify chmod so that it does not change an inode's st_ctime
|
| 9 |
+
when the selected operation would have no other effect.
|
| 10 |
+
First suggested by Hans Ecke <https://hans.ecke.ws> in
|
| 11 |
+
https://lists.gnu.org/r/bug-coreutils/2004-09/msg00145.html
|
| 12 |
+
Discussed more recently on <https://bugs.debian.org/497514>.
|
| 13 |
+
|
| 14 |
+
Suggestion from Paul Eggert:
|
| 15 |
+
More generally, there's not that much use for imaxtostr nowadays,
|
| 16 |
+
since the inttypes module and newer versions of gettext allow things
|
| 17 |
+
like _("truncating %s at %jd bytes") to work portably.
|
| 18 |
+
I suspect that (if someone cares to take the time) we can remove
|
| 19 |
+
all instances of imaxtostr and umaxtostr in coreutils and gnulib.
|
| 20 |
+
|
| 21 |
+
cp --recursive: use fts and *at functions to perform directory traversals
|
| 22 |
+
in source and destination hierarchy rather than forming full file names.
|
| 23 |
+
The latter (current) approach fails unnecessarily when the names
|
| 24 |
+
become very long, and requires space and time that is quadratic in the
|
| 25 |
+
depth of the hierarchy. [Bo Borgerson is working on this]
|
| 26 |
+
|
| 27 |
+
printf:
|
| 28 |
+
Now that gnulib supports *printf("%a"), import one of the
|
| 29 |
+
*printf-posix modules so that printf(1) will support %a even on
|
| 30 |
+
platforms where the native *printf(3) is deficient.
|
| 31 |
+
Suggestion from Eric Blake.
|
| 32 |
+
|
| 33 |
+
consider adding some implementation of the "col" utility
|
| 34 |
+
Suggested by Karl Berry.
|
| 35 |
+
|
| 36 |
+
doc/coreutils.texi:
|
| 37 |
+
Address this comment: FIXME: mv's behavior in this case is system-dependent
|
| 38 |
+
Better still: fix the code so it's *not* system-dependent.
|
| 39 |
+
|
| 40 |
+
ls: add --format=FORMAT option that controls how each line is printed.
|
| 41 |
+
|
| 42 |
+
copy.c: Address the FIXME-maybe comment in copy_internal.
|
| 43 |
+
And once that's done, add an exclusion so that 'cp --link'
|
| 44 |
+
no longer incurs the overhead of saving src. dev/ino and dest. filename
|
| 45 |
+
in the hash table.
|
| 46 |
+
|
| 47 |
+
Write an autoconf test to work around build failure in HPUX's 64-bit mode.
|
| 48 |
+
See notes in README-install -- and remove them once there's a work-around.
|
| 49 |
+
|
| 50 |
+
Integrate use of sendfile, suggested here:
|
| 51 |
+
https://lists.gnu.org/r/bug-fileutils/2003-03/msg00030.html
|
| 52 |
+
I don't plan to do that, since a few tests demonstrate no significant benefit.
|
| 53 |
+
|
| 54 |
+
printf: consider adapting builtins/printf.def from bash
|
| 55 |
+
|
| 56 |
+
tail: don't use xlseek; it *exits*.
|
| 57 |
+
Instead, maybe use a macro and return nonzero.
|
| 58 |
+
|
| 59 |
+
tr: support nontrivial equivalence classes, e.g. [=e=] with LC_COLLATE=fr_FR
|
| 60 |
+
|
| 61 |
+
lib/strftime.c: Since %N is the only format that we need but that
|
| 62 |
+
glibc's strftime doesn't support, consider using a wrapper that
|
| 63 |
+
would expand /%(-_)?\d*N/ to the desired string and then pass the
|
| 64 |
+
resulting string to glibc's strftime.
|
| 65 |
+
|
| 66 |
+
sort: Investigate better sorting algorithms; see Knuth vol. 3.
|
| 67 |
+
|
| 68 |
+
We tried list merge sort, but it was about 50% slower than the
|
| 69 |
+
recursive algorithm currently used by sortlines, and it used more
|
| 70 |
+
comparisons. We're not sure why this was, as the theory suggests it
|
| 71 |
+
should do fewer comparisons, so perhaps this should be revisited.
|
| 72 |
+
List merge sort was implemented in the style of Knuth algorithm
|
| 73 |
+
5.2.4L, with the optimization suggested by exercise 5.2.4-22. The
|
| 74 |
+
test case was 140,213,394 bytes, 426,4424 lines, text taken from the
|
| 75 |
+
GCC 3.3 distribution, sort.c compiled with GCC 2.95.4 and running on
|
| 76 |
+
Debian 3.0r1 GNU/Linux, 2.4GHz Pentium 4, single pass with no
|
| 77 |
+
temporary files and plenty of RAM.
|
| 78 |
+
|
| 79 |
+
Since comparisons seem to be the bottleneck, perhaps the best
|
| 80 |
+
algorithm to try next should be merge insertion. See Knuth section
|
| 81 |
+
5.3.1, who credits Lester Ford, Jr. and Selmer Johnson, American
|
| 82 |
+
Mathematical Monthly 66 (1959), 387-389.
|
| 83 |
+
|
| 84 |
+
shred: Update shred as described here to conform to DoD 5220 rules:
|
| 85 |
+
https://lists.gnu.org/r/bug-coreutils/2007-05/msg00075.html
|
| 86 |
+
|
| 87 |
+
Remove suspicious uses of alloca (ones that may allocate more than
|
| 88 |
+
about 4k)
|
| 89 |
+
|
| 90 |
+
Improve test coverage.
|
| 91 |
+
See HACKING for instructions on generating an html test coverage report.
|
| 92 |
+
Find a program that has poor coverage and improve.
|
| 93 |
+
|
| 94 |
+
Changes expected to go in, someday.
|
| 95 |
+
======================================
|
| 96 |
+
|
| 97 |
+
dd patch from Olivier Delhomme
|
| 98 |
+
|
| 99 |
+
test/mv/*: clean up $other_partition_tmpdir in all cases
|
| 100 |
+
|
| 101 |
+
ls: when both -l and --dereference-command-line-symlink-to-dir are
|
| 102 |
+
specified, consider whether to let the latter select whether to
|
| 103 |
+
dereference command line symlinks to directories. Since -l has
|
| 104 |
+
an implicit --NO-dereference-command-line-symlink-to-dir meaning.
|
| 105 |
+
Pointed out by Karl Berry.
|
| 106 |
+
|
| 107 |
+
Pending copyright papers:
|
| 108 |
+
------------------------
|
| 109 |
+
getpwnam from Bruce Korb
|
| 110 |
+
|
| 111 |
+
pb (progress bar) from Miika Pekkarinen
|
| 112 |
+
|
| 113 |
+
------------------------------
|
| 114 |
+
|
| 115 |
+
Remove long-deprecated options. Search case-insensitive for
|
| 116 |
+
'deprecated' and 'remove in '. Automate this.
|
| 117 |
+
|
| 118 |
+
Add a distcheck-time test to ensure that every distributed
|
| 119 |
+
file is either read-only(indicating generated) or is
|
| 120 |
+
version-controlled and up to date.
|
| 121 |
+
|
| 122 |
+
remove all uses of the 'register' keyword: Done. add a maint.mk rule
|
| 123 |
+
for this, too.
|
| 124 |
+
|
| 125 |
+
remove or adjust chown's --changes option, since it
|
| 126 |
+
can't always do what it currently says it does.
|
| 127 |
+
|
| 128 |
+
Support arbitrary-precision arithmetic in those tools for which it
|
| 129 |
+
makes sense. Factor and expr already support this via libgmp.
|
| 130 |
+
The "test" program is covered via its string-based comparison of
|
| 131 |
+
integers. To be converted: seq.
|
| 132 |
+
|
| 133 |
+
Adapt tools like wc, tr, fmt, etc. (most of the textutils) to be
|
| 134 |
+
multibyte aware. The problem is that I want to avoid duplicating
|
| 135 |
+
significant blocks of logic, yet I also want to incur only minimal
|
| 136 |
+
(preferably 'no') cost when operating in single-byte mode.
|
| 137 |
+
|
| 138 |
+
pr's use of nstrftime can make it malloc a very large (up to SIZE_MAX) buffer
|
| 139 |
+
|
| 140 |
+
-----
|
| 141 |
+
|
| 142 |
+
Copyright (C) 2002-2025 Free Software Foundation, Inc.
|
| 143 |
+
|
| 144 |
+
This program is free software: you can redistribute it and/or modify
|
| 145 |
+
it under the terms of the GNU General Public License as published by
|
| 146 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 147 |
+
(at your option) any later version.
|
| 148 |
+
|
| 149 |
+
This program is distributed in the hope that it will be useful,
|
| 150 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 151 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 152 |
+
GNU General Public License for more details.
|
| 153 |
+
|
| 154 |
+
You should have received a copy of the GNU General Public License
|
| 155 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
bootstrap
ADDED
|
@@ -0,0 +1,1630 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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+
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
|
| 9 |
+
#
|
| 10 |
+
# This program is free software: you can redistribute it and/or modify
|
| 11 |
+
# it under the terms of the GNU General Public License as published by
|
| 12 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 13 |
+
# (at your option) any later version.
|
| 14 |
+
#
|
| 15 |
+
# This program is distributed in the hope that it will be useful,
|
| 16 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 17 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 18 |
+
# GNU General Public License for more details.
|
| 19 |
+
#
|
| 20 |
+
# You should have received a copy of the GNU General Public License
|
| 21 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 22 |
+
|
| 23 |
+
# Originally written by Paul Eggert. The canonical version of this
|
| 24 |
+
# script is maintained as top/bootstrap in gnulib. However, to be
|
| 25 |
+
# useful to your package, you should place a copy of it under version
|
| 26 |
+
# control in the top-level directory of your package. The intent is
|
| 27 |
+
# that all customization can be done with a bootstrap.conf file also
|
| 28 |
+
# maintained in your version control; gnulib comes with a template
|
| 29 |
+
# build-aux/bootstrap.conf to get you started.
|
| 30 |
+
|
| 31 |
+
# Please report bugs or propose patches to bug-gnulib@gnu.org.
|
| 32 |
+
|
| 33 |
+
me="$0"
|
| 34 |
+
medir=`dirname "$me"`
|
| 35 |
+
|
| 36 |
+
# Read the function library and the configuration.
|
| 37 |
+
|
| 38 |
+
# A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
|
| 39 |
+
|
| 40 |
+
scriptlibversion=2025-09-07.23; # UTC
|
| 41 |
+
|
| 42 |
+
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
|
| 43 |
+
#
|
| 44 |
+
# This program is free software: you can redistribute it and/or modify
|
| 45 |
+
# it under the terms of the GNU General Public License as published by
|
| 46 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 47 |
+
# (at your option) any later version.
|
| 48 |
+
#
|
| 49 |
+
# This program is distributed in the hope that it will be useful,
|
| 50 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 51 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 52 |
+
# GNU General Public License for more details.
|
| 53 |
+
#
|
| 54 |
+
# You should have received a copy of the GNU General Public License
|
| 55 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 56 |
+
|
| 57 |
+
# Originally written by Paul Eggert. The canonical version of this
|
| 58 |
+
# script is maintained as top/bootstrap-funclib.sh in gnulib. However,
|
| 59 |
+
# to be useful to your package, you should place a copy of it under
|
| 60 |
+
# version control in the top-level directory of your package. The
|
| 61 |
+
# intent is that all customization can be done with a bootstrap.conf
|
| 62 |
+
# file also maintained in your version control; gnulib comes with a
|
| 63 |
+
# template build-aux/bootstrap.conf to get you started.
|
| 64 |
+
|
| 65 |
+
nl='
|
| 66 |
+
'
|
| 67 |
+
|
| 68 |
+
# Ensure file names are sorted consistently across platforms.
|
| 69 |
+
LC_ALL=C
|
| 70 |
+
export LC_ALL
|
| 71 |
+
|
| 72 |
+
# Honor $PERL, but work even if there is none.
|
| 73 |
+
PERL="${PERL-perl}"
|
| 74 |
+
|
| 75 |
+
default_gnulib_url=https://https.git.savannah.gnu.org/git/gnulib.git
|
| 76 |
+
|
| 77 |
+
# Copyright year, for the --version output.
|
| 78 |
+
copyright_year=`echo "$scriptlibversion" | sed -e 's/[^0-9].*//'`
|
| 79 |
+
copyright="Copyright (C) ${copyright_year} Free Software Foundation, Inc.
|
| 80 |
+
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
|
| 81 |
+
This is free software: you are free to change and redistribute it.
|
| 82 |
+
There is NO WARRANTY, to the extent permitted by law."
|
| 83 |
+
|
| 84 |
+
# warnf_ FORMAT-STRING ARG1...
|
| 85 |
+
warnf_ ()
|
| 86 |
+
{
|
| 87 |
+
warnf_format_=$1
|
| 88 |
+
shift
|
| 89 |
+
nl='
|
| 90 |
+
'
|
| 91 |
+
case $* in
|
| 92 |
+
*$nl*) me_=$(printf "$me"|tr "$nl|" '??')
|
| 93 |
+
printf "$warnf_format_" "$@" | sed "s|^|$me_: |" ;;
|
| 94 |
+
*) printf "$me: $warnf_format_" "$@" ;;
|
| 95 |
+
esac >&2
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
# warn_ WORD1...
|
| 99 |
+
warn_ ()
|
| 100 |
+
{
|
| 101 |
+
# If IFS does not start with ' ', set it and emit the warning in a subshell.
|
| 102 |
+
case $IFS in
|
| 103 |
+
' '*) warnf_ '%s\n' "$*";;
|
| 104 |
+
*) (IFS=' '; warn_ "$@");;
|
| 105 |
+
esac
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
# die WORD1...
|
| 109 |
+
die() { warn_ "$@"; exit 1; }
|
| 110 |
+
|
| 111 |
+
# ------------------------------ Configuration. ------------------------------
|
| 112 |
+
|
| 113 |
+
# Directory that contains package-specific gnulib modules and/or overrides.
|
| 114 |
+
local_gl_dir=gl
|
| 115 |
+
|
| 116 |
+
# Name of the Makefile.am
|
| 117 |
+
# XXX Not used.
|
| 118 |
+
gnulib_mk=gnulib.mk
|
| 119 |
+
|
| 120 |
+
# List of gnulib modules needed.
|
| 121 |
+
gnulib_modules=
|
| 122 |
+
|
| 123 |
+
# Any gnulib files needed that are not in modules.
|
| 124 |
+
gnulib_files=
|
| 125 |
+
|
| 126 |
+
# A function to be called for each unrecognized option. Returns 0 if
|
| 127 |
+
# the option in $1 has been processed by the function. Returns 1 if
|
| 128 |
+
# the option has not been processed by the function. Override it via
|
| 129 |
+
# your own definition in bootstrap.conf
|
| 130 |
+
bootstrap_option_hook() { return 1; }
|
| 131 |
+
|
| 132 |
+
# A function to be called in order to print the --help information
|
| 133 |
+
# corresponding to user-defined command-line options.
|
| 134 |
+
bootstrap_print_option_usage_hook() { :; }
|
| 135 |
+
|
| 136 |
+
# A function to be called at the end of autopull.sh.
|
| 137 |
+
# Override it via your own definition in bootstrap.conf.
|
| 138 |
+
bootstrap_post_pull_hook() { :; }
|
| 139 |
+
|
| 140 |
+
# A function to be called right after gnulib-tool is run.
|
| 141 |
+
# Override it via your own definition in bootstrap.conf.
|
| 142 |
+
bootstrap_post_import_hook() { :; }
|
| 143 |
+
|
| 144 |
+
# A function to be called after everything else in this script.
|
| 145 |
+
# Override it via your own definition in bootstrap.conf.
|
| 146 |
+
bootstrap_epilogue() { :; }
|
| 147 |
+
|
| 148 |
+
# The command to download all .po files for a specified domain into a
|
| 149 |
+
# specified directory. Fill in the first %s with the destination
|
| 150 |
+
# directory and the second with the domain name.
|
| 151 |
+
po_download_command_format=\
|
| 152 |
+
"wget --mirror --level=1 -nd -nv -A.po -P '%s' \
|
| 153 |
+
https://translationproject.org/latest/%s/"
|
| 154 |
+
|
| 155 |
+
# When extracting the package name from an AC_INIT invocation,
|
| 156 |
+
# prefer a non-empty tarname (4th argument of AC_INIT if given), else
|
| 157 |
+
# fall back to the package name (1st argument with munging).
|
| 158 |
+
extract_package_name='
|
| 159 |
+
/^AC_INIT(\[*/{
|
| 160 |
+
s///
|
| 161 |
+
/^[^,]*,[^,]*,[^,]*,[ []*\([^][ ,)]\)/{
|
| 162 |
+
s//\1/
|
| 163 |
+
s/[],)].*//
|
| 164 |
+
p
|
| 165 |
+
q
|
| 166 |
+
}
|
| 167 |
+
s/[],)].*//
|
| 168 |
+
p
|
| 169 |
+
}
|
| 170 |
+
'
|
| 171 |
+
normalize_package_name='
|
| 172 |
+
s/^GNU //
|
| 173 |
+
y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/
|
| 174 |
+
s/[^abcdefghijklmnopqrstuvwxyz0123456789_]/-/g
|
| 175 |
+
'
|
| 176 |
+
package=$(${AUTOCONF:-autoconf} --trace 'AC_INIT:$4' configure.ac 2>/dev/null)
|
| 177 |
+
if test -z "$package"; then
|
| 178 |
+
package=$(sed -n "$extract_package_name" configure.ac) \
|
| 179 |
+
|| die 'cannot find package name in configure.ac'
|
| 180 |
+
fi
|
| 181 |
+
package=$(echo "$package" | sed "$normalize_package_name")
|
| 182 |
+
gnulib_name=lib$package
|
| 183 |
+
|
| 184 |
+
build_aux=build-aux
|
| 185 |
+
source_base=lib
|
| 186 |
+
m4_base=m4
|
| 187 |
+
doc_base=doc
|
| 188 |
+
tests_base=tests
|
| 189 |
+
gnulib_extra_files="
|
| 190 |
+
build-aux/install-sh
|
| 191 |
+
build-aux/mdate-sh
|
| 192 |
+
build-aux/texinfo.tex
|
| 193 |
+
build-aux/depcomp
|
| 194 |
+
build-aux/config.guess
|
| 195 |
+
build-aux/config.sub
|
| 196 |
+
doc/INSTALL
|
| 197 |
+
"
|
| 198 |
+
|
| 199 |
+
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
| 200 |
+
gnulib_tool_option_extras=
|
| 201 |
+
|
| 202 |
+
# Other locale categories that need message catalogs.
|
| 203 |
+
EXTRA_LOCALE_CATEGORIES=
|
| 204 |
+
|
| 205 |
+
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
| 206 |
+
XGETTEXT_OPTIONS='\\\
|
| 207 |
+
--flag=_:1:pass-c-format\\\
|
| 208 |
+
--flag=N_:1:pass-c-format\\\
|
| 209 |
+
--flag=error:3:c-format --flag=error_at_line:5:c-format\\\
|
| 210 |
+
'
|
| 211 |
+
|
| 212 |
+
# Package bug report address and copyright holder for gettext files
|
| 213 |
+
COPYRIGHT_HOLDER='Free Software Foundation, Inc.'
|
| 214 |
+
MSGID_BUGS_ADDRESS=bug-$package@gnu.org
|
| 215 |
+
|
| 216 |
+
# Files we don't want to import.
|
| 217 |
+
# XXX Not used.
|
| 218 |
+
excluded_files=
|
| 219 |
+
|
| 220 |
+
# File that should exist in the top directory of a checked out hierarchy,
|
| 221 |
+
# but not in a distribution tarball.
|
| 222 |
+
checkout_only_file=README-hacking
|
| 223 |
+
|
| 224 |
+
# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want
|
| 225 |
+
# those files to be generated in directories like lib/, m4/, and po/.
|
| 226 |
+
# Or set it to 'auto' to make this script select which to use based
|
| 227 |
+
# on which version control system (if any) is used in the source directory.
|
| 228 |
+
vc_ignore=auto
|
| 229 |
+
|
| 230 |
+
# Set this to true in bootstrap.conf to enable --bootstrap-sync by
|
| 231 |
+
# default.
|
| 232 |
+
bootstrap_sync=false
|
| 233 |
+
|
| 234 |
+
# Override the default configuration, if necessary.
|
| 235 |
+
# Make sure that bootstrap.conf is sourced from the current directory
|
| 236 |
+
# if we were invoked as "sh bootstrap".
|
| 237 |
+
conffile=`dirname "$me"`/bootstrap.conf
|
| 238 |
+
test -r "$conffile" && . "$conffile"
|
| 239 |
+
|
| 240 |
+
# ------------------------- Build-time prerequisites -------------------------
|
| 241 |
+
|
| 242 |
+
check_exists() {
|
| 243 |
+
if test "$1" = "--verbose"; then
|
| 244 |
+
($2 --version </dev/null) >/dev/null 2>&1
|
| 245 |
+
if test $? -ge 126; then
|
| 246 |
+
# If not found, run with diagnostics as one may be
|
| 247 |
+
# presented with env variables to set to find the right version
|
| 248 |
+
($2 --version </dev/null)
|
| 249 |
+
fi
|
| 250 |
+
else
|
| 251 |
+
($1 --version </dev/null) >/dev/null 2>&1
|
| 252 |
+
fi
|
| 253 |
+
|
| 254 |
+
test $? -lt 126
|
| 255 |
+
}
|
| 256 |
+
|
| 257 |
+
# Note this deviates from the version comparison in automake
|
| 258 |
+
# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a
|
| 259 |
+
# but this should suffice as we won't be specifying old
|
| 260 |
+
# version formats or redundant trailing .0 in bootstrap.conf.
|
| 261 |
+
# If we did want full compatibility then we should probably
|
| 262 |
+
# use m4_version_compare from autoconf.
|
| 263 |
+
sort_ver() { # sort -V is not generally available
|
| 264 |
+
ver1="$1"
|
| 265 |
+
ver2="$2"
|
| 266 |
+
|
| 267 |
+
# split on '.' and compare each component
|
| 268 |
+
i=1
|
| 269 |
+
while : ; do
|
| 270 |
+
p1=$(echo "$ver1" | cut -d. -f$i)
|
| 271 |
+
p2=$(echo "$ver2" | cut -d. -f$i)
|
| 272 |
+
if [ ! "$p1" ]; then
|
| 273 |
+
echo "$1 $2"
|
| 274 |
+
break
|
| 275 |
+
elif [ ! "$p2" ]; then
|
| 276 |
+
echo "$2 $1"
|
| 277 |
+
break
|
| 278 |
+
elif [ ! "$p1" = "$p2" ]; then
|
| 279 |
+
if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
|
| 280 |
+
echo "$2 $1"
|
| 281 |
+
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
|
| 282 |
+
echo "$1 $2"
|
| 283 |
+
else # numeric, then lexicographic comparison
|
| 284 |
+
lp=$(printf "%s\n%s\n" "$p1" "$p2" | LANG=C sort -n | tail -n1)
|
| 285 |
+
if [ "$lp" = "$p2" ]; then
|
| 286 |
+
echo "$1 $2"
|
| 287 |
+
else
|
| 288 |
+
echo "$2 $1"
|
| 289 |
+
fi
|
| 290 |
+
fi
|
| 291 |
+
break
|
| 292 |
+
fi
|
| 293 |
+
i=$(($i+1))
|
| 294 |
+
done
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
get_version_sed='
|
| 298 |
+
# Move version to start of line.
|
| 299 |
+
s/.*[v ]\([0-9]\)/\1/
|
| 300 |
+
|
| 301 |
+
# Skip lines that do not start with version.
|
| 302 |
+
/^[0-9]/!d
|
| 303 |
+
|
| 304 |
+
# Remove characters after the version.
|
| 305 |
+
s/[^.a-z0-9-].*//
|
| 306 |
+
|
| 307 |
+
# The first component must be digits only.
|
| 308 |
+
s/^\([0-9]*\)[a-z-].*/\1/
|
| 309 |
+
|
| 310 |
+
#the following essentially does s/5.005/5.5/
|
| 311 |
+
s/\.0*\([1-9]\)/.\1/g
|
| 312 |
+
p
|
| 313 |
+
q'
|
| 314 |
+
|
| 315 |
+
get_version() {
|
| 316 |
+
app=$1
|
| 317 |
+
|
| 318 |
+
$app --version >/dev/null 2>&1 || { $app --version; return 1; }
|
| 319 |
+
|
| 320 |
+
$app --version 2>&1 | sed -n "$get_version_sed"
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
check_versions() {
|
| 324 |
+
ret=0
|
| 325 |
+
|
| 326 |
+
while read app req_ver; do
|
| 327 |
+
# We only need libtoolize from the libtool package.
|
| 328 |
+
if test "$app" = libtool; then
|
| 329 |
+
app=libtoolize
|
| 330 |
+
fi
|
| 331 |
+
# Exempt git if git is not needed.
|
| 332 |
+
if test "$app" = git; then
|
| 333 |
+
$check_git || continue
|
| 334 |
+
fi
|
| 335 |
+
# Honor $APP variables ($TAR, $AUTOCONF, etc.)
|
| 336 |
+
appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_')
|
| 337 |
+
test "$appvar" = TAR && appvar=AMTAR
|
| 338 |
+
case $appvar in
|
| 339 |
+
GZIP) ;; # Do not use $GZIP: it contains gzip options.
|
| 340 |
+
PERL::*) ;; # Keep perl modules as-is
|
| 341 |
+
*) eval "app=\${$appvar-$app}" ;;
|
| 342 |
+
esac
|
| 343 |
+
|
| 344 |
+
# Handle the still-experimental Automake-NG programs specially.
|
| 345 |
+
# They remain named as the mainstream Automake programs ("automake",
|
| 346 |
+
# and "aclocal") to avoid gratuitous incompatibilities with
|
| 347 |
+
# preexisting usages (by, say, autoreconf, or custom autogen.sh
|
| 348 |
+
# scripts), but correctly identify themselves (as being part of
|
| 349 |
+
# "GNU automake-ng") when asked their version.
|
| 350 |
+
case $app in
|
| 351 |
+
automake-ng|aclocal-ng)
|
| 352 |
+
app=${app%-ng}
|
| 353 |
+
($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || {
|
| 354 |
+
warn_ "Error: '$app' not found or not from Automake-NG"
|
| 355 |
+
ret=1
|
| 356 |
+
continue
|
| 357 |
+
} ;;
|
| 358 |
+
# Another check is for perl modules. These can be written as
|
| 359 |
+
# e.g. perl::XML::XPath in case of XML::XPath module, etc.
|
| 360 |
+
perl::*)
|
| 361 |
+
# Extract module name
|
| 362 |
+
app="${app#perl::}"
|
| 363 |
+
if ! $PERL -m"$app" -e 'exit 0' >/dev/null 2>&1; then
|
| 364 |
+
warn_ "Error: perl module '$app' not found"
|
| 365 |
+
ret=1
|
| 366 |
+
fi
|
| 367 |
+
continue
|
| 368 |
+
;;
|
| 369 |
+
esac
|
| 370 |
+
if [ "$req_ver" = "-" ]; then
|
| 371 |
+
# Merely require app to exist; not all prereq apps are well-behaved
|
| 372 |
+
# so we have to rely on $? rather than get_version.
|
| 373 |
+
if ! check_exists --verbose $app; then
|
| 374 |
+
warn_ "Error: '$app' not found"
|
| 375 |
+
ret=1
|
| 376 |
+
fi
|
| 377 |
+
else
|
| 378 |
+
# Require app to produce a new enough version string.
|
| 379 |
+
inst_ver=$(get_version $app)
|
| 380 |
+
if [ ! "$inst_ver" ]; then
|
| 381 |
+
warn_ "Error: '$app' not found"
|
| 382 |
+
ret=1
|
| 383 |
+
else
|
| 384 |
+
latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2)
|
| 385 |
+
if [ ! "$latest_ver" = "$inst_ver" ]; then
|
| 386 |
+
warnf_ '%s\n' \
|
| 387 |
+
"Error: '$app' version == $inst_ver is too old" \
|
| 388 |
+
" '$app' version >= $req_ver is required"
|
| 389 |
+
ret=1
|
| 390 |
+
fi
|
| 391 |
+
fi
|
| 392 |
+
fi
|
| 393 |
+
done
|
| 394 |
+
|
| 395 |
+
return $ret
|
| 396 |
+
}
|
| 397 |
+
|
| 398 |
+
print_versions() {
|
| 399 |
+
echo "Program Min_version"
|
| 400 |
+
echo "----------------------"
|
| 401 |
+
printf %s "$buildreq"
|
| 402 |
+
echo "----------------------"
|
| 403 |
+
# can't depend on column -t
|
| 404 |
+
}
|
| 405 |
+
|
| 406 |
+
# check_build_prerequisites check_git
|
| 407 |
+
check_build_prerequisites()
|
| 408 |
+
{
|
| 409 |
+
check_git="$1"
|
| 410 |
+
|
| 411 |
+
# gnulib-tool requires at least automake and autoconf.
|
| 412 |
+
# If either is not listed, add it (with minimum version) as a prerequisite.
|
| 413 |
+
case $buildreq in
|
| 414 |
+
*automake*) ;;
|
| 415 |
+
*) buildreq="automake 1.9
|
| 416 |
+
$buildreq" ;;
|
| 417 |
+
esac
|
| 418 |
+
case $buildreq in
|
| 419 |
+
*autoconf*) ;;
|
| 420 |
+
*) buildreq="autoconf 2.59
|
| 421 |
+
$buildreq" ;;
|
| 422 |
+
esac
|
| 423 |
+
|
| 424 |
+
# When we can deduce that gnulib-tool will require patch,
|
| 425 |
+
# and when patch is not already listed as a prerequisite, add it, too.
|
| 426 |
+
if test -d "$local_gl_dir" \
|
| 427 |
+
&& ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then
|
| 428 |
+
case $buildreq in
|
| 429 |
+
*patch*) ;;
|
| 430 |
+
*) buildreq="patch -
|
| 431 |
+
$buildreq" ;;
|
| 432 |
+
esac
|
| 433 |
+
fi
|
| 434 |
+
|
| 435 |
+
if ! printf '%s' "$buildreq" | check_versions; then
|
| 436 |
+
echo >&2
|
| 437 |
+
if test -f README-prereq; then
|
| 438 |
+
die "See README-prereq for how to get the prerequisite programs"
|
| 439 |
+
else
|
| 440 |
+
die "Please install the prerequisite programs"
|
| 441 |
+
fi
|
| 442 |
+
fi
|
| 443 |
+
|
| 444 |
+
# Warn the user if autom4te appears to be broken; this causes known
|
| 445 |
+
# issues with at least gettext 0.18.3.
|
| 446 |
+
probe=$(echo 'm4_quote([hi])' | autom4te -l M4sugar -t 'm4_quote:$%' -)
|
| 447 |
+
if test "x$probe" != xhi; then
|
| 448 |
+
warn_ "WARNING: your autom4te wrapper eats stdin;"
|
| 449 |
+
warn_ "if bootstrap fails, consider upgrading your autotools"
|
| 450 |
+
fi
|
| 451 |
+
}
|
| 452 |
+
|
| 453 |
+
# find_tool ENVVAR NAMES...
|
| 454 |
+
# -------------------------
|
| 455 |
+
# Search for a required program. Use the value of ENVVAR, if set,
|
| 456 |
+
# otherwise find the first of the NAMES that can be run.
|
| 457 |
+
# If found, set ENVVAR to the program name, die otherwise.
|
| 458 |
+
#
|
| 459 |
+
# FIXME: code duplication, see also gnu-web-doc-update.
|
| 460 |
+
find_tool ()
|
| 461 |
+
{
|
| 462 |
+
find_tool_envvar=$1
|
| 463 |
+
shift
|
| 464 |
+
find_tool_names=$@
|
| 465 |
+
eval "find_tool_res=\$$find_tool_envvar"
|
| 466 |
+
if test x"$find_tool_res" = x; then
|
| 467 |
+
for i; do
|
| 468 |
+
if check_exists $i; then
|
| 469 |
+
find_tool_res=$i
|
| 470 |
+
break
|
| 471 |
+
fi
|
| 472 |
+
done
|
| 473 |
+
fi
|
| 474 |
+
if test x"$find_tool_res" = x; then
|
| 475 |
+
warn_ "one of these is required: $find_tool_names;"
|
| 476 |
+
die "alternatively set $find_tool_envvar to a compatible tool"
|
| 477 |
+
fi
|
| 478 |
+
eval "$find_tool_envvar=\$find_tool_res"
|
| 479 |
+
eval "export $find_tool_envvar"
|
| 480 |
+
}
|
| 481 |
+
|
| 482 |
+
# --------------------- Preparing GNULIB_SRCDIR for use. ---------------------
|
| 483 |
+
# This is part of autopull.sh, but bootstrap needs it too, for self-upgrading.
|
| 484 |
+
|
| 485 |
+
# cleanup_gnulib fails, removing the directory $gnulib_path first.
|
| 486 |
+
cleanup_gnulib() {
|
| 487 |
+
status=$?
|
| 488 |
+
rm -fr "$gnulib_path"
|
| 489 |
+
exit $status
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
git_modules_config () {
|
| 493 |
+
test -f .gitmodules && git config --file .gitmodules "$@"
|
| 494 |
+
}
|
| 495 |
+
|
| 496 |
+
prepare_GNULIB_SRCDIR ()
|
| 497 |
+
{
|
| 498 |
+
if test -n "$GNULIB_SRCDIR"; then
|
| 499 |
+
# Use GNULIB_SRCDIR directly.
|
| 500 |
+
# We already checked that $GNULIB_SRCDIR references a directory.
|
| 501 |
+
# Verify that it contains a gnulib checkout.
|
| 502 |
+
test -f "$GNULIB_SRCDIR/gnulib-tool" \
|
| 503 |
+
|| die "Error: --gnulib-srcdir or \$GNULIB_SRCDIR is specified," \
|
| 504 |
+
"but does not contain gnulib-tool"
|
| 505 |
+
if test -n "$GNULIB_REVISION" && $use_git; then
|
| 506 |
+
# The 'git checkout "$GNULIB_REVISION"' command succeeds if the
|
| 507 |
+
# GNULIB_REVISION is a commit hash that exists locally, or if it is
|
| 508 |
+
# branch name that can be fetched from origin. It fails, however,
|
| 509 |
+
# if the GNULIB_REVISION is a commit hash that only exists in
|
| 510 |
+
# origin. In this case, we need a 'git fetch' and then retry
|
| 511 |
+
# 'git checkout "$GNULIB_REVISION"'.
|
| 512 |
+
git -C "$GNULIB_SRCDIR" checkout "$GNULIB_REVISION" 2>/dev/null \
|
| 513 |
+
|| { git -C "$GNULIB_SRCDIR" fetch origin \
|
| 514 |
+
&& git -C "$GNULIB_SRCDIR" checkout "$GNULIB_REVISION"; } \
|
| 515 |
+
|| exit $?
|
| 516 |
+
fi
|
| 517 |
+
else
|
| 518 |
+
if ! $use_git; then
|
| 519 |
+
die "Error: --no-git is specified," \
|
| 520 |
+
"but neither --gnulib-srcdir nor \$GNULIB_SRCDIR is specified"
|
| 521 |
+
fi
|
| 522 |
+
if git submodule -h | grep -- --reference > /dev/null; then
|
| 523 |
+
:
|
| 524 |
+
else
|
| 525 |
+
die "git version is too old, git >= 1.6.4 is required"
|
| 526 |
+
fi
|
| 527 |
+
gnulib_path=$(git_modules_config submodule.gnulib.path)
|
| 528 |
+
if test -n "$gnulib_path"; then
|
| 529 |
+
# A submodule 'gnulib' is configured.
|
| 530 |
+
# Get gnulib files. Populate $gnulib_path, updating the submodule.
|
| 531 |
+
if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then
|
| 532 |
+
# Use GNULIB_REFDIR as a reference.
|
| 533 |
+
echo "$0: getting gnulib files..."
|
| 534 |
+
git submodule update --init --reference "$GNULIB_REFDIR" "$gnulib_path"\
|
| 535 |
+
|| exit $?
|
| 536 |
+
else
|
| 537 |
+
# GNULIB_REFDIR is not set or not usable. Ignore it.
|
| 538 |
+
if git_modules_config submodule.gnulib.url >/dev/null; then
|
| 539 |
+
echo "$0: getting gnulib files..."
|
| 540 |
+
git submodule init -- "$gnulib_path" || exit $?
|
| 541 |
+
git submodule update -- "$gnulib_path" || exit $?
|
| 542 |
+
else
|
| 543 |
+
die "Error: submodule 'gnulib' has no configured url"
|
| 544 |
+
fi
|
| 545 |
+
fi
|
| 546 |
+
else
|
| 547 |
+
gnulib_path='gnulib'
|
| 548 |
+
if test ! -d "$gnulib_path"; then
|
| 549 |
+
# The subdirectory 'gnulib' does not yet exist. Clone into it.
|
| 550 |
+
echo "$0: getting gnulib files..."
|
| 551 |
+
trap cleanup_gnulib HUP INT PIPE TERM
|
| 552 |
+
gnulib_url=${GNULIB_URL:-$default_gnulib_url}
|
| 553 |
+
if test -n "$GNULIB_REFDIR" && test -d "$GNULIB_REFDIR"/.git; then
|
| 554 |
+
# Use GNULIB_REFDIR as a reference.
|
| 555 |
+
git clone "$GNULIB_REFDIR" "$gnulib_path" \
|
| 556 |
+
&& git -C "$gnulib_path" remote set-url origin "$gnulib_url" \
|
| 557 |
+
&& if test -z "$GNULIB_REVISION"; then
|
| 558 |
+
git -C "$gnulib_path" pull origin \
|
| 559 |
+
&& {
|
| 560 |
+
# We want the default branch of "$gnulib_url" (since that's
|
| 561 |
+
# the behaviour if GNULIB_REFDIR is not specified), not the
|
| 562 |
+
# current branch of "$GNULIB_REFDIR".
|
| 563 |
+
default_branch=`LC_ALL=C git -C "$gnulib_path" \
|
| 564 |
+
remote show origin \
|
| 565 |
+
| sed -n -e 's/^ *HEAD branch: //p'`
|
| 566 |
+
test -n "$default_branch" || default_branch='master'
|
| 567 |
+
git -C "$gnulib_path" checkout "$default_branch"
|
| 568 |
+
}
|
| 569 |
+
else
|
| 570 |
+
# The 'git checkout "$GNULIB_REVISION"' command succeeds if the
|
| 571 |
+
# GNULIB_REVISION is a commit hash that exists locally, or if it
|
| 572 |
+
# is a branch name that can be fetched from origin. It fails,
|
| 573 |
+
# however, if the GNULIB_REVISION is a commit hash that only
|
| 574 |
+
# exists in origin. In this case, we need a 'git fetch' and then
|
| 575 |
+
# retry 'git checkout "$GNULIB_REVISION"'.
|
| 576 |
+
git -C "$gnulib_path" checkout "$GNULIB_REVISION" 2>/dev/null \
|
| 577 |
+
|| { git -C "$gnulib_path" fetch origin \
|
| 578 |
+
&& git -C "$gnulib_path" checkout "$GNULIB_REVISION"; }
|
| 579 |
+
fi \
|
| 580 |
+
|| cleanup_gnulib
|
| 581 |
+
else
|
| 582 |
+
# GNULIB_REFDIR is not set or not usable. Ignore it.
|
| 583 |
+
shallow='--depth 2'
|
| 584 |
+
if test -z "$GNULIB_REVISION"; then
|
| 585 |
+
git clone $shallow "$gnulib_url" "$gnulib_path" \
|
| 586 |
+
|| cleanup_gnulib
|
| 587 |
+
else
|
| 588 |
+
# Only want a shallow checkout of $GNULIB_REVISION, but git does not
|
| 589 |
+
# support cloning by commit hash. So attempt a shallow fetch by
|
| 590 |
+
# commit hash to minimize the amount of data downloaded and changes
|
| 591 |
+
# needed to be processed, which can drastically reduce download and
|
| 592 |
+
# processing time for checkout. If the fetch by commit fails, a
|
| 593 |
+
# shallow fetch cannot be performed because we do not know what the
|
| 594 |
+
# depth of the commit is without fetching all commits. So fall back
|
| 595 |
+
# to fetching all commits.
|
| 596 |
+
# $GNULIB_REVISION can be a commit id, a tag name, or a branch name.
|
| 597 |
+
mkdir -p "$gnulib_path"
|
| 598 |
+
# Use a -c option to silence an annoying message
|
| 599 |
+
# "hint: Using 'master' as the name for the initial branch."
|
| 600 |
+
# (cf. <https://stackoverflow.com/questions/65524512/>).
|
| 601 |
+
git -C "$gnulib_path" -c init.defaultBranch=master init
|
| 602 |
+
git -C "$gnulib_path" remote add origin "$gnulib_url"
|
| 603 |
+
if git -C "$gnulib_path" fetch $shallow origin "$GNULIB_REVISION"
|
| 604 |
+
then
|
| 605 |
+
# "git fetch" of the specific commit succeeded.
|
| 606 |
+
git -C "$gnulib_path" reset --hard FETCH_HEAD \
|
| 607 |
+
|| cleanup_gnulib
|
| 608 |
+
# "git fetch" does not fetch tags (at least in git version 2.43).
|
| 609 |
+
# If $GNULIB_REVISION is a tag (not a commit id or branch name),
|
| 610 |
+
# add the tag explicitly.
|
| 611 |
+
revision=`git -C "$gnulib_path" log -1 --pretty=format:%H`
|
| 612 |
+
branch=`LC_ALL=C git -C "$gnulib_path" remote show origin \
|
| 613 |
+
| sed -n -e 's/^ \([^ ]*\) * tracked$/\1/p'`
|
| 614 |
+
test "$revision" = "$GNULIB_REVISION" \
|
| 615 |
+
|| test "$branch" = "$GNULIB_REVISION" \
|
| 616 |
+
|| git -C "$gnulib_path" tag "$GNULIB_REVISION"
|
| 617 |
+
else
|
| 618 |
+
# Fetch the entire repository.
|
| 619 |
+
git -C "$gnulib_path" fetch origin \
|
| 620 |
+
|| cleanup_gnulib
|
| 621 |
+
git -C "$gnulib_path" checkout "$GNULIB_REVISION" \
|
| 622 |
+
|| cleanup_gnulib
|
| 623 |
+
fi
|
| 624 |
+
fi
|
| 625 |
+
fi
|
| 626 |
+
trap - HUP INT PIPE TERM
|
| 627 |
+
else
|
| 628 |
+
# The subdirectory 'gnulib' already exists.
|
| 629 |
+
if test -n "$GNULIB_REVISION"; then
|
| 630 |
+
if test -d "$gnulib_path/.git"; then
|
| 631 |
+
# The 'git checkout "$GNULIB_REVISION"' command succeeds if the
|
| 632 |
+
# GNULIB_REVISION is a commit hash that exists locally, or if it
|
| 633 |
+
# is a branch name that can be fetched from origin. It fails,
|
| 634 |
+
# however, if the GNULIB_REVISION is a commit hash that only
|
| 635 |
+
# exists in origin. In this case, we need a 'git fetch' and then
|
| 636 |
+
# retry 'git checkout "$GNULIB_REVISION"'.
|
| 637 |
+
git -C "$gnulib_path" checkout "$GNULIB_REVISION" 2>/dev/null \
|
| 638 |
+
|| { git -C "$gnulib_path" fetch origin \
|
| 639 |
+
&& git -C "$gnulib_path" checkout "$GNULIB_REVISION"; } \
|
| 640 |
+
|| exit $?
|
| 641 |
+
else
|
| 642 |
+
die "Error: GNULIB_REVISION is specified in bootstrap.conf," \
|
| 643 |
+
"but '$gnulib_path' contains no git history"
|
| 644 |
+
fi
|
| 645 |
+
fi
|
| 646 |
+
fi
|
| 647 |
+
fi
|
| 648 |
+
# Verify that $gnulib_path contains a gnulib checkout.
|
| 649 |
+
test -f "$gnulib_path/gnulib-tool" \
|
| 650 |
+
|| die "Error: '$gnulib_path' is supposed to contain a gnulib checkout," \
|
| 651 |
+
"but does not contain gnulib-tool"
|
| 652 |
+
GNULIB_SRCDIR=$gnulib_path
|
| 653 |
+
fi
|
| 654 |
+
# $GNULIB_SRCDIR now points to the version of gnulib to use, and
|
| 655 |
+
# we no longer need to use git or $gnulib_path below here.
|
| 656 |
+
}
|
| 657 |
+
|
| 658 |
+
# -------- Upgrading bootstrap to the version found in GNULIB_SRCDIR. --------
|
| 659 |
+
|
| 660 |
+
upgrade_bootstrap ()
|
| 661 |
+
{
|
| 662 |
+
if test -f "$medir"/bootstrap-funclib.sh; then
|
| 663 |
+
update_lib=true
|
| 664 |
+
{ cmp -s "$medir"/bootstrap "$GNULIB_SRCDIR/top/bootstrap" \
|
| 665 |
+
&& cmp -s "$medir"/bootstrap-funclib.sh \
|
| 666 |
+
"$GNULIB_SRCDIR/top/bootstrap-funclib.sh" \
|
| 667 |
+
&& cmp -s "$medir"/autopull.sh "$GNULIB_SRCDIR/top/autopull.sh" \
|
| 668 |
+
&& cmp -s "$medir"/autogen.sh "$GNULIB_SRCDIR/top/autogen.sh"; \
|
| 669 |
+
}
|
| 670 |
+
else
|
| 671 |
+
update_lib=false
|
| 672 |
+
cmp -s "$medir"/bootstrap "$GNULIB_SRCDIR/build-aux/bootstrap"
|
| 673 |
+
fi || {
|
| 674 |
+
if $update_lib; then
|
| 675 |
+
echo "$0: updating bootstrap & companions and restarting..."
|
| 676 |
+
else
|
| 677 |
+
echo "$0: updating bootstrap and restarting..."
|
| 678 |
+
fi
|
| 679 |
+
case $(sh -c 'echo "$1"' -- a) in
|
| 680 |
+
a) ignored=--;;
|
| 681 |
+
*) ignored=ignored;;
|
| 682 |
+
esac
|
| 683 |
+
u=$update_lib
|
| 684 |
+
exec sh -c \
|
| 685 |
+
'{ if '$u' && test -f "$1"; then cp "$1" "$3"; else cp "$2" "$3"; fi; } &&
|
| 686 |
+
{ if '$u' && test -f "$4"; then cp "$4" "$5"; else rm -f "$5"; fi; } &&
|
| 687 |
+
{ if '$u' && test -f "$6"; then cp "$6" "$7"; else rm -f "$7"; fi; } &&
|
| 688 |
+
{ if '$u' && test -f "$8"; then cp "$8" "$9"; else rm -f "$9"; fi; } &&
|
| 689 |
+
shift && shift && shift && shift && shift &&
|
| 690 |
+
shift && shift && shift && shift &&
|
| 691 |
+
exec "${CONFIG_SHELL-/bin/sh}" "$@"' \
|
| 692 |
+
$ignored \
|
| 693 |
+
"$GNULIB_SRCDIR/top/bootstrap" "$GNULIB_SRCDIR/build-aux/bootstrap" \
|
| 694 |
+
"$medir/bootstrap" \
|
| 695 |
+
"$GNULIB_SRCDIR/top/bootstrap-funclib.sh" "$medir/bootstrap-funclib.sh" \
|
| 696 |
+
"$GNULIB_SRCDIR/top/autopull.sh" "$medir/autopull.sh" \
|
| 697 |
+
"$GNULIB_SRCDIR/top/autogen.sh" "$medir/autogen.sh" \
|
| 698 |
+
"$0" "$@" --no-bootstrap-sync
|
| 699 |
+
}
|
| 700 |
+
}
|
| 701 |
+
|
| 702 |
+
# ----------------------------------------------------------------------------
|
| 703 |
+
|
| 704 |
+
if test x"$gnulib_modules$gnulib_files$gnulib_extra_files" = x; then
|
| 705 |
+
use_gnulib=false
|
| 706 |
+
else
|
| 707 |
+
use_gnulib=true
|
| 708 |
+
fi
|
| 709 |
+
|
| 710 |
+
# -------- Fetch auxiliary files from the network. --------------------------
|
| 711 |
+
|
| 712 |
+
autopull_usage() {
|
| 713 |
+
cat <<EOF
|
| 714 |
+
Usage: $me [OPTION]...
|
| 715 |
+
Bootstrap this package from the checked-out sources, phase 1:
|
| 716 |
+
Pull files from the network.
|
| 717 |
+
|
| 718 |
+
Optional environment variables:
|
| 719 |
+
GNULIB_SRCDIR Specifies the local directory where gnulib
|
| 720 |
+
sources reside. Use this if you already
|
| 721 |
+
have gnulib sources on your machine, and
|
| 722 |
+
you want to use these sources.
|
| 723 |
+
GNULIB_REFDIR Specifies the local directory where a gnulib
|
| 724 |
+
repository (with a .git subdirectory) resides.
|
| 725 |
+
Use this if you already have gnulib sources
|
| 726 |
+
and history on your machine, and do not want
|
| 727 |
+
to waste your bandwidth downloading them again.
|
| 728 |
+
GNULIB_URL URL of the gnulib repository. The default is
|
| 729 |
+
$default_gnulib_url,
|
| 730 |
+
which is Gnulib's upstream repository.
|
| 731 |
+
|
| 732 |
+
Options:
|
| 733 |
+
|
| 734 |
+
--bootstrap-sync If this bootstrap script is not identical to
|
| 735 |
+
the version in the local gnulib sources,
|
| 736 |
+
update this script, and then restart it with
|
| 737 |
+
/bin/sh or the shell \$CONFIG_SHELL.
|
| 738 |
+
--no-bootstrap-sync Do not check whether bootstrap is out of sync.
|
| 739 |
+
|
| 740 |
+
--force Attempt to bootstrap even if the sources seem
|
| 741 |
+
not to have been checked out.
|
| 742 |
+
--no-git Do not use git to update gnulib. Requires that
|
| 743 |
+
\$GNULIB_SRCDIR points to a gnulib repository
|
| 744 |
+
with the correct revision.
|
| 745 |
+
--skip-po Do not download *.po files.
|
| 746 |
+
EOF
|
| 747 |
+
bootstrap_print_option_usage_hook
|
| 748 |
+
cat <<EOF
|
| 749 |
+
If the file bootstrap.conf exists in the same directory as this script, its
|
| 750 |
+
contents are read as shell variables to configure the bootstrap.
|
| 751 |
+
|
| 752 |
+
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
| 753 |
+
are honored.
|
| 754 |
+
|
| 755 |
+
Gnulib sources can be fetched in various ways:
|
| 756 |
+
|
| 757 |
+
* If the environment variable GNULIB_SRCDIR is set, then sources are
|
| 758 |
+
fetched from that local directory. If it is a git repository and the
|
| 759 |
+
configuration variable GNULIB_REVISION is set in bootstrap.conf, then
|
| 760 |
+
that revision is checked out.
|
| 761 |
+
|
| 762 |
+
* Otherwise, if this package is in a git repository with a 'gnulib'
|
| 763 |
+
submodule configured, then that submodule is initialized and updated
|
| 764 |
+
and sources are fetched from there. If the environment variable
|
| 765 |
+
GNULIB_REFDIR is set and is a git repository, then it is used as a
|
| 766 |
+
reference.
|
| 767 |
+
|
| 768 |
+
* Otherwise, if the 'gnulib' directory does not exist, Gnulib sources
|
| 769 |
+
are cloned into that directory using git from \$GNULIB_URL, defaulting
|
| 770 |
+
to $default_gnulib_url; if GNULIB_REFDIR is set and is a git repository
|
| 771 |
+
its contents may be used to accelerate the process.
|
| 772 |
+
If the configuration variable GNULIB_REVISION is set in bootstrap.conf,
|
| 773 |
+
then that revision is checked out.
|
| 774 |
+
|
| 775 |
+
* Otherwise, the existing Gnulib sources in the 'gnulib' directory are
|
| 776 |
+
used. If it is a git repository and the configuration variable
|
| 777 |
+
GNULIB_REVISION is set in bootstrap.conf, then that revision is
|
| 778 |
+
checked out.
|
| 779 |
+
|
| 780 |
+
If you maintain a package and want to pin a particular revision of the
|
| 781 |
+
Gnulib sources that has been tested with your package, then there are
|
| 782 |
+
two possible approaches: either configure a 'gnulib' submodule with the
|
| 783 |
+
appropriate revision, or set GNULIB_REVISION (and if necessary
|
| 784 |
+
GNULIB_URL) in bootstrap.conf.
|
| 785 |
+
|
| 786 |
+
Running without arguments will suffice in most cases.
|
| 787 |
+
EOF
|
| 788 |
+
}
|
| 789 |
+
|
| 790 |
+
# Fetch auxiliary files that are omitted from the version control
|
| 791 |
+
# repository of this package.
|
| 792 |
+
autopull()
|
| 793 |
+
{
|
| 794 |
+
# Ensure that CDPATH is not set. Otherwise, the output from cd
|
| 795 |
+
# would cause trouble in at least one use below.
|
| 796 |
+
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
| 797 |
+
|
| 798 |
+
# Parse options.
|
| 799 |
+
|
| 800 |
+
# Use git to update gnulib sources
|
| 801 |
+
use_git=true
|
| 802 |
+
|
| 803 |
+
for option
|
| 804 |
+
do
|
| 805 |
+
case $option in
|
| 806 |
+
--help)
|
| 807 |
+
autopull_usage
|
| 808 |
+
return;;
|
| 809 |
+
--version)
|
| 810 |
+
set -e
|
| 811 |
+
echo "autopull.sh $scriptlibversion"
|
| 812 |
+
echo "$copyright"
|
| 813 |
+
return 0
|
| 814 |
+
;;
|
| 815 |
+
--skip-po)
|
| 816 |
+
SKIP_PO=t;;
|
| 817 |
+
--force)
|
| 818 |
+
checkout_only_file=;;
|
| 819 |
+
--bootstrap-sync)
|
| 820 |
+
bootstrap_sync=true;;
|
| 821 |
+
--no-bootstrap-sync)
|
| 822 |
+
bootstrap_sync=false;;
|
| 823 |
+
--no-git)
|
| 824 |
+
use_git=false;;
|
| 825 |
+
*)
|
| 826 |
+
bootstrap_option_hook $option || die "$option: unknown option";;
|
| 827 |
+
esac
|
| 828 |
+
done
|
| 829 |
+
|
| 830 |
+
$use_git || test -n "$GNULIB_SRCDIR" \
|
| 831 |
+
|| die "Error: --no-git requires \$GNULIB_SRCDIR environment variable" \
|
| 832 |
+
"or --gnulib-srcdir option"
|
| 833 |
+
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
| 834 |
+
|| die "Error: \$GNULIB_SRCDIR environment variable" \
|
| 835 |
+
"or --gnulib-srcdir option is specified," \
|
| 836 |
+
"but does not denote a directory"
|
| 837 |
+
|
| 838 |
+
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
| 839 |
+
die "Running this script from a non-checked-out distribution is risky."
|
| 840 |
+
fi
|
| 841 |
+
|
| 842 |
+
check_build_prerequisites $use_git
|
| 843 |
+
|
| 844 |
+
if $use_gnulib || $bootstrap_sync; then
|
| 845 |
+
prepare_GNULIB_SRCDIR
|
| 846 |
+
if $bootstrap_sync; then
|
| 847 |
+
upgrade_bootstrap "$@"
|
| 848 |
+
fi
|
| 849 |
+
fi
|
| 850 |
+
|
| 851 |
+
# Find sha1sum, named gsha1sum on MacPorts, shasum on Mac OS X 10.6.
|
| 852 |
+
# Also find the compatible sha1 utility on the BSDs
|
| 853 |
+
if test x"$SKIP_PO" = x; then
|
| 854 |
+
find_tool SHA1SUM sha1sum gsha1sum shasum sha1
|
| 855 |
+
fi
|
| 856 |
+
|
| 857 |
+
# See if we can use gnulib's git-merge-changelog merge driver.
|
| 858 |
+
if $use_git && test -d .git && check_exists git; then
|
| 859 |
+
if git config merge.merge-changelog.driver >/dev/null ; then
|
| 860 |
+
:
|
| 861 |
+
elif check_exists git-merge-changelog; then
|
| 862 |
+
echo "$0: initializing git-merge-changelog driver"
|
| 863 |
+
git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver'
|
| 864 |
+
git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B'
|
| 865 |
+
else
|
| 866 |
+
echo "$0: consider installing git-merge-changelog from gnulib"
|
| 867 |
+
fi
|
| 868 |
+
fi
|
| 869 |
+
|
| 870 |
+
case $SKIP_PO in
|
| 871 |
+
'')
|
| 872 |
+
if test -d po; then
|
| 873 |
+
update_po_files po $package || return
|
| 874 |
+
fi
|
| 875 |
+
|
| 876 |
+
if test -d runtime-po; then
|
| 877 |
+
update_po_files runtime-po $package-runtime || return
|
| 878 |
+
fi;;
|
| 879 |
+
esac
|
| 880 |
+
|
| 881 |
+
# ---------------------------------------------------------------------------
|
| 882 |
+
|
| 883 |
+
bootstrap_post_pull_hook \
|
| 884 |
+
|| die "bootstrap_post_pull_hook failed"
|
| 885 |
+
|
| 886 |
+
# Don't proceed if there are uninitialized submodules. In particular,
|
| 887 |
+
# autogen.sh will remove dangling links, which might be links into
|
| 888 |
+
# uninitialized submodules.
|
| 889 |
+
# But it's OK if the 'gnulib' submodule is uninitialized, as long as
|
| 890 |
+
# GNULIB_SRCDIR is set.
|
| 891 |
+
if $use_git; then
|
| 892 |
+
# Uninitialized submodules are listed with an initial dash.
|
| 893 |
+
uninitialized=`git submodule | grep '^-' | awk '{ print $2 }'`
|
| 894 |
+
if test -n "$GNULIB_SRCDIR"; then
|
| 895 |
+
uninitialized=`echo "$uninitialized" | grep -v '^gnulib$'`
|
| 896 |
+
fi
|
| 897 |
+
if test -n "$uninitialized"; then
|
| 898 |
+
uninit_comma=`echo "$uninitialized" | tr '\n' ',' | sed -e 's|,$|.|'`
|
| 899 |
+
die "Some git submodules are not initialized: "$uninit_comma \
|
| 900 |
+
"Either use option '--no-git'," \
|
| 901 |
+
"or run 'git submodule update --init' and bootstrap again."
|
| 902 |
+
fi
|
| 903 |
+
fi
|
| 904 |
+
|
| 905 |
+
if test -f "$medir"/autogen.sh; then
|
| 906 |
+
echo "$0: done. Now you can run '$medir/autogen.sh'."
|
| 907 |
+
fi
|
| 908 |
+
}
|
| 909 |
+
|
| 910 |
+
# ----------------------------- Get translations. -----------------------------
|
| 911 |
+
|
| 912 |
+
download_po_files() {
|
| 913 |
+
subdir=$1
|
| 914 |
+
domain=$2
|
| 915 |
+
echo "$me: getting translations into $subdir for $domain..."
|
| 916 |
+
cmd=$(printf "$po_download_command_format" "$subdir" "$domain")
|
| 917 |
+
eval "$cmd"
|
| 918 |
+
}
|
| 919 |
+
|
| 920 |
+
# Mirror .po files to $po_dir/.reference and copy only the new
|
| 921 |
+
# or modified ones into $po_dir. Also update $po_dir/LINGUAS.
|
| 922 |
+
# Note po files that exist locally only are left in $po_dir but will
|
| 923 |
+
# not be included in LINGUAS and hence will not be distributed.
|
| 924 |
+
update_po_files() {
|
| 925 |
+
# Directory containing primary .po files.
|
| 926 |
+
# Overwrite them only when we're sure a .po file is new.
|
| 927 |
+
po_dir=$1
|
| 928 |
+
domain=$2
|
| 929 |
+
|
| 930 |
+
# Mirror *.po files into this dir.
|
| 931 |
+
# Usually contains *.s1 checksum files.
|
| 932 |
+
ref_po_dir="$po_dir/.reference"
|
| 933 |
+
|
| 934 |
+
test -d $ref_po_dir || mkdir $ref_po_dir || return
|
| 935 |
+
download_po_files $ref_po_dir $domain \
|
| 936 |
+
&& ls "$ref_po_dir"/*.po 2>/dev/null |
|
| 937 |
+
sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return
|
| 938 |
+
|
| 939 |
+
for po in x $(ls $ref_po_dir | sed -n 's/\.po$//p'); do
|
| 940 |
+
case $po in x) continue;; esac
|
| 941 |
+
new_po="$ref_po_dir/$po.po"
|
| 942 |
+
cksum_file="$ref_po_dir/$po.s1"
|
| 943 |
+
if ! test -f "$cksum_file" ||
|
| 944 |
+
! test -f "$po_dir/$po.po" ||
|
| 945 |
+
! $SHA1SUM -c "$cksum_file" < "$new_po" > /dev/null 2>&1; then
|
| 946 |
+
echo "$me: updated $po_dir/$po.po..."
|
| 947 |
+
cp "$new_po" "$po_dir/$po.po" \
|
| 948 |
+
&& $SHA1SUM < "$new_po" > "$cksum_file" || return
|
| 949 |
+
fi
|
| 950 |
+
done
|
| 951 |
+
}
|
| 952 |
+
|
| 953 |
+
# -------- Generate files automatically from existing sources. --------------
|
| 954 |
+
|
| 955 |
+
autogen_usage() {
|
| 956 |
+
cat <<EOF
|
| 957 |
+
Usage: $me [OPTION]...
|
| 958 |
+
Bootstrap this package from the checked-out sources, phase 2:
|
| 959 |
+
Generate files from local files (no network access).
|
| 960 |
+
|
| 961 |
+
Optional environment variables:
|
| 962 |
+
GNULIB_SRCDIR Specifies the local directory where gnulib
|
| 963 |
+
sources reside. Use this if you already
|
| 964 |
+
have gnulib sources on your machine, and
|
| 965 |
+
you want to use these sources.
|
| 966 |
+
|
| 967 |
+
Options:
|
| 968 |
+
--copy Copy files instead of creating symbolic links.
|
| 969 |
+
--force Attempt to bootstrap even if the sources seem
|
| 970 |
+
not to have been checked out.
|
| 971 |
+
EOF
|
| 972 |
+
bootstrap_print_option_usage_hook
|
| 973 |
+
cat <<EOF
|
| 974 |
+
If the file bootstrap.conf exists in the same directory as this script, its
|
| 975 |
+
contents are read as shell variables to configure the bootstrap.
|
| 976 |
+
|
| 977 |
+
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
| 978 |
+
are honored.
|
| 979 |
+
|
| 980 |
+
Gnulib sources are assumed to be present:
|
| 981 |
+
* in \$GNULIB_SRCDIR, if that environment variable is set,
|
| 982 |
+
* otherwise, in the 'gnulib' submodule, if such a submodule is configured,
|
| 983 |
+
* otherwise, in the 'gnulib' subdirectory.
|
| 984 |
+
|
| 985 |
+
Running without arguments will suffice in most cases.
|
| 986 |
+
EOF
|
| 987 |
+
}
|
| 988 |
+
|
| 989 |
+
|
| 990 |
+
version_controlled_file() {
|
| 991 |
+
parent=$1
|
| 992 |
+
file=$2
|
| 993 |
+
if test -d .git; then
|
| 994 |
+
git rm -n "$file" > /dev/null 2>&1
|
| 995 |
+
elif test -d .svn; then
|
| 996 |
+
svn log -r HEAD "$file" > /dev/null 2>&1
|
| 997 |
+
elif test -d CVS; then
|
| 998 |
+
grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null |
|
| 999 |
+
grep '^/[^/]*/[0-9]' > /dev/null
|
| 1000 |
+
else
|
| 1001 |
+
warn_ "no version control for $file?"
|
| 1002 |
+
false
|
| 1003 |
+
fi
|
| 1004 |
+
}
|
| 1005 |
+
|
| 1006 |
+
# Strip blank and comment lines to leave significant entries.
|
| 1007 |
+
gitignore_entries() {
|
| 1008 |
+
sed '/^#/d; /^$/d' "$@"
|
| 1009 |
+
}
|
| 1010 |
+
|
| 1011 |
+
# If $STR is not already on a line by itself in $FILE, insert it at the start.
|
| 1012 |
+
# Entries are inserted at the start of the ignore list to ensure existing
|
| 1013 |
+
# entries starting with ! are not overridden. Such entries support
|
| 1014 |
+
# whitelisting exceptions after a more generic blacklist pattern.
|
| 1015 |
+
insert_if_absent() {
|
| 1016 |
+
file=$1
|
| 1017 |
+
str=$2
|
| 1018 |
+
test -f $file || touch $file
|
| 1019 |
+
test -r $file || die "Error: failed to read ignore file: $file"
|
| 1020 |
+
duplicate_entries=$(gitignore_entries $file | sort | uniq -d)
|
| 1021 |
+
if [ "$duplicate_entries" ] ; then
|
| 1022 |
+
die "Error: Duplicate entries in $file: " $duplicate_entries
|
| 1023 |
+
fi
|
| 1024 |
+
linesold=$(gitignore_entries $file | wc -l)
|
| 1025 |
+
linesnew=$( { echo "$str"; cat $file; } | gitignore_entries | sort -u | wc -l)
|
| 1026 |
+
if [ $linesold != $linesnew ] ; then
|
| 1027 |
+
{ echo "$str" | cat - $file > $file.bak && mv $file.bak $file; } \
|
| 1028 |
+
|| die "insert_if_absent $file $str: failed"
|
| 1029 |
+
fi
|
| 1030 |
+
}
|
| 1031 |
+
|
| 1032 |
+
# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with
|
| 1033 |
+
# insert_if_absent.
|
| 1034 |
+
insert_vc_ignore() {
|
| 1035 |
+
vc_ignore_file="$1"
|
| 1036 |
+
pattern="$2"
|
| 1037 |
+
case $vc_ignore_file in
|
| 1038 |
+
*.gitignore)
|
| 1039 |
+
# A .gitignore entry that does not start with '/' applies
|
| 1040 |
+
# recursively to subdirectories, so prepend '/' to every
|
| 1041 |
+
# .gitignore entry.
|
| 1042 |
+
pattern=$(echo "$pattern" | sed s,^,/,);;
|
| 1043 |
+
esac
|
| 1044 |
+
insert_if_absent "$vc_ignore_file" "$pattern"
|
| 1045 |
+
}
|
| 1046 |
+
|
| 1047 |
+
symlink_to_dir()
|
| 1048 |
+
{
|
| 1049 |
+
src=$1/$2
|
| 1050 |
+
dst=${3-$2}
|
| 1051 |
+
|
| 1052 |
+
test -f "$src" && {
|
| 1053 |
+
|
| 1054 |
+
# If the destination directory doesn't exist, create it.
|
| 1055 |
+
# This is required at least for "lib/uniwidth/cjk.h".
|
| 1056 |
+
dst_dir=$(dirname "$dst")
|
| 1057 |
+
if ! test -d "$dst_dir"; then
|
| 1058 |
+
mkdir -p "$dst_dir"
|
| 1059 |
+
|
| 1060 |
+
# If we've just created a directory like lib/uniwidth,
|
| 1061 |
+
# tell version control system(s) it's ignorable.
|
| 1062 |
+
# FIXME: for now, this does only one level
|
| 1063 |
+
parent=$(dirname "$dst_dir")
|
| 1064 |
+
for dot_ig in x $vc_ignore; do
|
| 1065 |
+
test $dot_ig = x && continue
|
| 1066 |
+
ig=$parent/$dot_ig
|
| 1067 |
+
insert_vc_ignore $ig "${dst_dir##*/}/"
|
| 1068 |
+
done
|
| 1069 |
+
fi
|
| 1070 |
+
|
| 1071 |
+
if $copy; then
|
| 1072 |
+
{
|
| 1073 |
+
test ! -h "$dst" || {
|
| 1074 |
+
echo "$me: rm -f $dst" &&
|
| 1075 |
+
rm -f "$dst"
|
| 1076 |
+
}
|
| 1077 |
+
} &&
|
| 1078 |
+
test -f "$dst" &&
|
| 1079 |
+
cmp -s "$src" "$dst" || {
|
| 1080 |
+
echo "$me: cp -fp $src $dst" &&
|
| 1081 |
+
cp -fp "$src" "$dst"
|
| 1082 |
+
}
|
| 1083 |
+
else
|
| 1084 |
+
# Leave any existing symlink alone, if it already points to the source,
|
| 1085 |
+
# so that broken build tools that care about symlink times
|
| 1086 |
+
# aren't confused into doing unnecessary builds. Conversely, if the
|
| 1087 |
+
# existing symlink's timestamp is older than the source, make it afresh,
|
| 1088 |
+
# so that broken tools aren't confused into skipping needed builds. See
|
| 1089 |
+
# <https://lists.gnu.org/r/bug-gnulib/2011-05/msg00326.html>.
|
| 1090 |
+
test -h "$dst" &&
|
| 1091 |
+
src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 &&
|
| 1092 |
+
dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 &&
|
| 1093 |
+
test "$src_i" = "$dst_i" &&
|
| 1094 |
+
both_ls=$(ls -dt "$src" "$dst") &&
|
| 1095 |
+
test "X$both_ls" = "X$dst$nl$src" || {
|
| 1096 |
+
dot_dots=
|
| 1097 |
+
case $src in
|
| 1098 |
+
/*) ;;
|
| 1099 |
+
*)
|
| 1100 |
+
case /$dst/ in
|
| 1101 |
+
*//* | */../* | */./* | /*/*/*/*/*/)
|
| 1102 |
+
die "invalid symlink calculation: $src -> $dst";;
|
| 1103 |
+
/*/*/*/*/) dot_dots=../../../;;
|
| 1104 |
+
/*/*/*/) dot_dots=../../;;
|
| 1105 |
+
/*/*/) dot_dots=../;;
|
| 1106 |
+
esac;;
|
| 1107 |
+
esac
|
| 1108 |
+
|
| 1109 |
+
echo "$me: ln -fs $dot_dots$src $dst" &&
|
| 1110 |
+
ln -fs "$dot_dots$src" "$dst"
|
| 1111 |
+
}
|
| 1112 |
+
fi
|
| 1113 |
+
}
|
| 1114 |
+
}
|
| 1115 |
+
|
| 1116 |
+
# Regenerate all autogeneratable files that are omitted from the
|
| 1117 |
+
# version control repository. In particular, regenerate all
|
| 1118 |
+
# aclocal.m4, config.h.in, Makefile.in, configure files with new
|
| 1119 |
+
# versions of autoconf or automake.
|
| 1120 |
+
autogen()
|
| 1121 |
+
{
|
| 1122 |
+
# Ensure that CDPATH is not set. Otherwise, the output from cd
|
| 1123 |
+
# would cause trouble in at least one use below.
|
| 1124 |
+
(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
|
| 1125 |
+
|
| 1126 |
+
# Environment variables that may be set by the user.
|
| 1127 |
+
: "${AUTOPOINT=autopoint}"
|
| 1128 |
+
: "${AUTORECONF=autoreconf}"
|
| 1129 |
+
|
| 1130 |
+
if test "$vc_ignore" = auto; then
|
| 1131 |
+
vc_ignore=
|
| 1132 |
+
test -d .git && vc_ignore=.gitignore
|
| 1133 |
+
test -d CVS && vc_ignore="$vc_ignore .cvsignore"
|
| 1134 |
+
fi
|
| 1135 |
+
|
| 1136 |
+
|
| 1137 |
+
# Parse options.
|
| 1138 |
+
|
| 1139 |
+
# Whether to use copies instead of symlinks.
|
| 1140 |
+
copy=false
|
| 1141 |
+
|
| 1142 |
+
for option
|
| 1143 |
+
do
|
| 1144 |
+
case $option in
|
| 1145 |
+
--help)
|
| 1146 |
+
autogen_usage
|
| 1147 |
+
return;;
|
| 1148 |
+
--version)
|
| 1149 |
+
set -e
|
| 1150 |
+
echo "autogen.sh $scriptlibversion"
|
| 1151 |
+
echo "$copyright"
|
| 1152 |
+
return 0
|
| 1153 |
+
;;
|
| 1154 |
+
--force)
|
| 1155 |
+
checkout_only_file=;;
|
| 1156 |
+
--copy)
|
| 1157 |
+
copy=true;;
|
| 1158 |
+
*)
|
| 1159 |
+
bootstrap_option_hook $option || die "$option: unknown option";;
|
| 1160 |
+
esac
|
| 1161 |
+
done
|
| 1162 |
+
|
| 1163 |
+
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
| 1164 |
+
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir" \
|
| 1165 |
+
"option is specified, but does not denote a directory"
|
| 1166 |
+
|
| 1167 |
+
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
| 1168 |
+
die "Running this script from a non-checked-out distribution is risky."
|
| 1169 |
+
fi
|
| 1170 |
+
|
| 1171 |
+
if $use_gnulib; then
|
| 1172 |
+
if test -z "$GNULIB_SRCDIR"; then
|
| 1173 |
+
gnulib_path=$(test -f .gitmodules &&
|
| 1174 |
+
git config --file .gitmodules submodule.gnulib.path)
|
| 1175 |
+
test -z "$gnulib_path" && gnulib_path=gnulib
|
| 1176 |
+
GNULIB_SRCDIR=$gnulib_path
|
| 1177 |
+
fi
|
| 1178 |
+
fi
|
| 1179 |
+
|
| 1180 |
+
# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac.
|
| 1181 |
+
found_aux_dir=no
|
| 1182 |
+
grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'])' configure.ac \
|
| 1183 |
+
>/dev/null && found_aux_dir=yes
|
| 1184 |
+
grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \
|
| 1185 |
+
>/dev/null && found_aux_dir=yes
|
| 1186 |
+
test $found_aux_dir = yes \
|
| 1187 |
+
|| die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it"
|
| 1188 |
+
|
| 1189 |
+
# If $build_aux doesn't exist, create it now, otherwise some bits
|
| 1190 |
+
# below will malfunction. If creating it, also mark it as ignored.
|
| 1191 |
+
if test ! -d $build_aux; then
|
| 1192 |
+
mkdir $build_aux
|
| 1193 |
+
for dot_ig in x $vc_ignore; do
|
| 1194 |
+
test $dot_ig = x && continue
|
| 1195 |
+
insert_vc_ignore $dot_ig $build_aux/
|
| 1196 |
+
done
|
| 1197 |
+
fi
|
| 1198 |
+
|
| 1199 |
+
check_build_prerequisites false
|
| 1200 |
+
|
| 1201 |
+
use_libtool=0
|
| 1202 |
+
# We'd like to use grep -E, to see if any of LT_INIT,
|
| 1203 |
+
# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac,
|
| 1204 |
+
# but that's not portable enough (e.g., for Solaris).
|
| 1205 |
+
grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \
|
| 1206 |
+
&& use_libtool=1
|
| 1207 |
+
grep '^[ ]*LT_INIT' configure.ac >/dev/null \
|
| 1208 |
+
&& use_libtool=1
|
| 1209 |
+
if test $use_libtool = 1; then
|
| 1210 |
+
find_tool LIBTOOLIZE glibtoolize libtoolize
|
| 1211 |
+
fi
|
| 1212 |
+
|
| 1213 |
+
if $use_gnulib; then
|
| 1214 |
+
gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
|
| 1215 |
+
<$gnulib_tool || return
|
| 1216 |
+
fi
|
| 1217 |
+
|
| 1218 |
+
# NOTE: we have to be careful to run both autopoint and libtoolize
|
| 1219 |
+
# before gnulib-tool, since gnulib-tool is likely to provide newer
|
| 1220 |
+
# versions of files "installed" by these two programs.
|
| 1221 |
+
# Then, *after* gnulib-tool (see below), we have to be careful to
|
| 1222 |
+
# run autoreconf in such a way that it does not run either of these
|
| 1223 |
+
# two just-pre-run programs.
|
| 1224 |
+
|
| 1225 |
+
# Import from gettext.
|
| 1226 |
+
with_gettext=yes
|
| 1227 |
+
grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
|
| 1228 |
+
with_gettext=no
|
| 1229 |
+
|
| 1230 |
+
if test $with_gettext = yes || test $use_libtool = 1; then
|
| 1231 |
+
|
| 1232 |
+
tempbase=.bootstrap$$
|
| 1233 |
+
trap "rm -f $tempbase.0 $tempbase.1" HUP INT PIPE TERM
|
| 1234 |
+
|
| 1235 |
+
> $tempbase.0 > $tempbase.1 &&
|
| 1236 |
+
find . ! -type d -print | sort > $tempbase.0 || return
|
| 1237 |
+
|
| 1238 |
+
if test $with_gettext = yes; then
|
| 1239 |
+
# Released autopoint has the tendency to install macros that have been
|
| 1240 |
+
# obsoleted in current gnulib, so run this before gnulib-tool.
|
| 1241 |
+
echo "$0: $AUTOPOINT --force"
|
| 1242 |
+
$AUTOPOINT --force || return
|
| 1243 |
+
fi
|
| 1244 |
+
|
| 1245 |
+
# Autoreconf runs aclocal before libtoolize, which causes spurious
|
| 1246 |
+
# warnings if the initial aclocal is confused by the libtoolized
|
| 1247 |
+
# (or worse out-of-date) macro directory.
|
| 1248 |
+
# libtoolize 1.9b added the --install option; but we support back
|
| 1249 |
+
# to libtoolize 1.5.22, where the install action was default.
|
| 1250 |
+
if test $use_libtool = 1; then
|
| 1251 |
+
install=
|
| 1252 |
+
case $($LIBTOOLIZE --help) in
|
| 1253 |
+
*--install*) install=--install ;;
|
| 1254 |
+
esac
|
| 1255 |
+
echo "running: $LIBTOOLIZE $install --copy"
|
| 1256 |
+
$LIBTOOLIZE $install --copy
|
| 1257 |
+
fi
|
| 1258 |
+
|
| 1259 |
+
find . ! -type d -print | sort >$tempbase.1
|
| 1260 |
+
old_IFS=$IFS
|
| 1261 |
+
IFS=$nl
|
| 1262 |
+
for file in $(comm -13 $tempbase.0 $tempbase.1); do
|
| 1263 |
+
IFS=$old_IFS
|
| 1264 |
+
parent=${file%/*}
|
| 1265 |
+
version_controlled_file "$parent" "$file" || {
|
| 1266 |
+
for dot_ig in x $vc_ignore; do
|
| 1267 |
+
test $dot_ig = x && continue
|
| 1268 |
+
ig=$parent/$dot_ig
|
| 1269 |
+
insert_vc_ignore "$ig" "${file##*/}"
|
| 1270 |
+
done
|
| 1271 |
+
}
|
| 1272 |
+
done
|
| 1273 |
+
IFS=$old_IFS
|
| 1274 |
+
|
| 1275 |
+
rm -f $tempbase.0 $tempbase.1
|
| 1276 |
+
trap - HUP INT PIPE TERM
|
| 1277 |
+
fi
|
| 1278 |
+
|
| 1279 |
+
# Import from gnulib.
|
| 1280 |
+
|
| 1281 |
+
if $use_gnulib; then
|
| 1282 |
+
gnulib_tool_options="\
|
| 1283 |
+
--no-changelog\
|
| 1284 |
+
--aux-dir=$build_aux\
|
| 1285 |
+
--doc-base=$doc_base\
|
| 1286 |
+
--lib=$gnulib_name\
|
| 1287 |
+
--m4-base=$m4_base/\
|
| 1288 |
+
--source-base=$source_base/\
|
| 1289 |
+
--tests-base=$tests_base\
|
| 1290 |
+
--local-dir=$local_gl_dir\
|
| 1291 |
+
$gnulib_tool_option_extras\
|
| 1292 |
+
"
|
| 1293 |
+
if test $use_libtool = 1; then
|
| 1294 |
+
case "$gnulib_tool_options " in
|
| 1295 |
+
*' --libtool '*) ;;
|
| 1296 |
+
*) gnulib_tool_options="$gnulib_tool_options --libtool" ;;
|
| 1297 |
+
esac
|
| 1298 |
+
fi
|
| 1299 |
+
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
| 1300 |
+
$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
|
| 1301 |
+
|| die "gnulib-tool failed"
|
| 1302 |
+
|
| 1303 |
+
if test $with_gettext = yes && test ! -f $m4_base/gettext.m4; then
|
| 1304 |
+
# The gnulib-tool invocation has removed $m4_base/gettext.m4, that the
|
| 1305 |
+
# AUTOPOINT invocation had installed. This can occur when the gnulib
|
| 1306 |
+
# module 'gettext' was previously present but is now not present any more.
|
| 1307 |
+
# Repeat the AUTOPOINT invocation and the gnulib-tool invocation.
|
| 1308 |
+
|
| 1309 |
+
echo "$0: $AUTOPOINT --force"
|
| 1310 |
+
$AUTOPOINT --force || return
|
| 1311 |
+
|
| 1312 |
+
echo "$0: $gnulib_tool $gnulib_tool_options --import ..."
|
| 1313 |
+
$gnulib_tool $gnulib_tool_options --import $gnulib_modules \
|
| 1314 |
+
|| die "gnulib-tool failed"
|
| 1315 |
+
fi
|
| 1316 |
+
|
| 1317 |
+
for file in $gnulib_files; do
|
| 1318 |
+
symlink_to_dir "$GNULIB_SRCDIR" $file \
|
| 1319 |
+
|| die "failed to symlink $file"
|
| 1320 |
+
done
|
| 1321 |
+
fi
|
| 1322 |
+
|
| 1323 |
+
bootstrap_post_import_hook \
|
| 1324 |
+
|| die "bootstrap_post_import_hook failed"
|
| 1325 |
+
|
| 1326 |
+
# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some
|
| 1327 |
+
# gnulib-populated directories. Such .m4 files would cause aclocal to fail.
|
| 1328 |
+
# The following requires GNU find 4.2.3 or newer. Considering the usual
|
| 1329 |
+
# portability constraints of this script, that may seem a very demanding
|
| 1330 |
+
# requirement, but it should be ok. Ignore any failure, which is fine,
|
| 1331 |
+
# since this is only a convenience to help developers avoid the relatively
|
| 1332 |
+
# unusual case in which a symlinked-to .m4 file is git-removed from gnulib
|
| 1333 |
+
# between successive runs of this script.
|
| 1334 |
+
find "$m4_base" "$source_base" \
|
| 1335 |
+
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
| 1336 |
+
-type l -xtype l -delete > /dev/null 2>&1
|
| 1337 |
+
|
| 1338 |
+
# Invoke autoreconf with --force --install to ensure upgrades of tools
|
| 1339 |
+
# such as ylwrap.
|
| 1340 |
+
AUTORECONFFLAGS="--verbose --install --force $ACLOCAL_FLAGS"
|
| 1341 |
+
AUTORECONFFLAGS="$AUTORECONFFLAGS --no-recursive"
|
| 1342 |
+
|
| 1343 |
+
# Tell autoreconf not to invoke autopoint or libtoolize; they were run above.
|
| 1344 |
+
echo "running: AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS"
|
| 1345 |
+
AUTOPOINT=true LIBTOOLIZE=true $AUTORECONF $AUTORECONFFLAGS \
|
| 1346 |
+
|| die "autoreconf failed"
|
| 1347 |
+
|
| 1348 |
+
# Get some extra files from gnulib, overriding existing files.
|
| 1349 |
+
for file in $gnulib_extra_files; do
|
| 1350 |
+
case $file in
|
| 1351 |
+
*/INSTALL) dst=INSTALL;;
|
| 1352 |
+
build-aux/*) dst=$build_aux/${file#build-aux/};;
|
| 1353 |
+
*) dst=$file;;
|
| 1354 |
+
esac
|
| 1355 |
+
symlink_to_dir "$GNULIB_SRCDIR" $file $dst \
|
| 1356 |
+
|| die "failed to symlink $file"
|
| 1357 |
+
done
|
| 1358 |
+
|
| 1359 |
+
if test $with_gettext = yes; then
|
| 1360 |
+
# Create gettext configuration.
|
| 1361 |
+
echo "$0: Creating po/Makevars from po/Makevars.template ..."
|
| 1362 |
+
rm -f po/Makevars
|
| 1363 |
+
sed '
|
| 1364 |
+
/^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/
|
| 1365 |
+
/^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/
|
| 1366 |
+
/^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'|
|
| 1367 |
+
/^XGETTEXT_OPTIONS *=/{
|
| 1368 |
+
s/$/ \\/
|
| 1369 |
+
a\
|
| 1370 |
+
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
| 1371 |
+
}
|
| 1372 |
+
' po/Makevars.template >po/Makevars \
|
| 1373 |
+
|| die 'cannot generate po/Makevars'
|
| 1374 |
+
|
| 1375 |
+
# If the 'gettext' module is in use, grab the latest Makefile.in.in.
|
| 1376 |
+
# If only the 'gettext-h' module is in use, assume autopoint already
|
| 1377 |
+
# put the correct version of this file into place.
|
| 1378 |
+
case $gnulib_modules in
|
| 1379 |
+
*gettext-h*) ;;
|
| 1380 |
+
*gettext*)
|
| 1381 |
+
cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \
|
| 1382 |
+
|| die "cannot create po/Makefile.in.in"
|
| 1383 |
+
;;
|
| 1384 |
+
esac
|
| 1385 |
+
|
| 1386 |
+
if test -d runtime-po; then
|
| 1387 |
+
# Similarly for runtime-po/Makevars, but not quite the same.
|
| 1388 |
+
rm -f runtime-po/Makevars
|
| 1389 |
+
sed '
|
| 1390 |
+
/^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/
|
| 1391 |
+
/^subdir *=.*/s/=.*/= runtime-po/
|
| 1392 |
+
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
| 1393 |
+
/^XGETTEXT_OPTIONS *=/{
|
| 1394 |
+
s/$/ \\/
|
| 1395 |
+
a\
|
| 1396 |
+
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
| 1397 |
+
}
|
| 1398 |
+
' po/Makevars.template >runtime-po/Makevars \
|
| 1399 |
+
|| die 'cannot generate runtime-po/Makevars'
|
| 1400 |
+
|
| 1401 |
+
# Copy identical files from po to runtime-po.
|
| 1402 |
+
cp -p po/Makefile.in.in po/*-quot po/*.header po/*.sed po/*.sin runtime-po
|
| 1403 |
+
fi
|
| 1404 |
+
fi
|
| 1405 |
+
|
| 1406 |
+
bootstrap_epilogue
|
| 1407 |
+
|
| 1408 |
+
echo "$0: done. Now you can run './configure'."
|
| 1409 |
+
}
|
| 1410 |
+
|
| 1411 |
+
# ----------------------------------------------------------------------------
|
| 1412 |
+
|
| 1413 |
+
# Local Variables:
|
| 1414 |
+
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
| 1415 |
+
# time-stamp-start: "scriptlibversion="
|
| 1416 |
+
# time-stamp-format: "%Y-%02m-%02d.%02H"
|
| 1417 |
+
# time-stamp-time-zone: "UTC0"
|
| 1418 |
+
# time-stamp-end: "; # UTC"
|
| 1419 |
+
# End:
|
| 1420 |
+
|
| 1421 |
+
usage() {
|
| 1422 |
+
cat <<EOF
|
| 1423 |
+
Usage: $me [OPTION]...
|
| 1424 |
+
Bootstrap this package from the checked-out sources.
|
| 1425 |
+
|
| 1426 |
+
Optional environment variables:
|
| 1427 |
+
GNULIB_SRCDIR Specifies the local directory where gnulib
|
| 1428 |
+
sources reside. Use this if you already
|
| 1429 |
+
have gnulib sources on your machine, and
|
| 1430 |
+
you want to use these sources.
|
| 1431 |
+
GNULIB_REFDIR Specifies the local directory where a gnulib
|
| 1432 |
+
repository (with a .git subdirectory) resides.
|
| 1433 |
+
Use this if you already have gnulib sources
|
| 1434 |
+
and history on your machine, and do not want
|
| 1435 |
+
to waste your bandwidth downloading them again.
|
| 1436 |
+
Only used for phase 1 (--pull).
|
| 1437 |
+
GNULIB_URL URL of the gnulib repository. The default is
|
| 1438 |
+
$default_gnulib_url,
|
| 1439 |
+
which is Gnulib's upstream repository.
|
| 1440 |
+
Only used for phase 1 (--pull).
|
| 1441 |
+
|
| 1442 |
+
Options:
|
| 1443 |
+
|
| 1444 |
+
--pull Do phase 1: Pull files from the network.
|
| 1445 |
+
--gen Do phase 2: Generate files from local files
|
| 1446 |
+
(no network access).
|
| 1447 |
+
(The default is to do both phases.)
|
| 1448 |
+
|
| 1449 |
+
--gnulib-srcdir=DIRNAME Specifies the local directory where gnulib
|
| 1450 |
+
sources reside. Use this if you already
|
| 1451 |
+
have gnulib sources on your machine, and
|
| 1452 |
+
you want to use these sources. Defaults
|
| 1453 |
+
to \$GNULIB_SRCDIR.
|
| 1454 |
+
--gnulib-refdir=DIRNAME Specifies the local directory where a gnulib
|
| 1455 |
+
repository (with a .git subdirectory) resides.
|
| 1456 |
+
Use this if you already have gnulib sources
|
| 1457 |
+
and history on your machine, and do not want
|
| 1458 |
+
to waste your bandwidth downloading them again.
|
| 1459 |
+
Defaults to \$GNULIB_REFDIR.
|
| 1460 |
+
Only used for phase 1 (--pull).
|
| 1461 |
+
|
| 1462 |
+
--bootstrap-sync If this bootstrap script is not identical to
|
| 1463 |
+
the version in the local gnulib sources,
|
| 1464 |
+
update this script, and then restart it with
|
| 1465 |
+
/bin/sh or the shell \$CONFIG_SHELL.
|
| 1466 |
+
--no-bootstrap-sync Do not check whether bootstrap is out of sync.
|
| 1467 |
+
|
| 1468 |
+
--copy Copy files instead of creating symbolic links.
|
| 1469 |
+
Only used for phase 2 (--gen).
|
| 1470 |
+
--force Attempt to bootstrap even if the sources seem
|
| 1471 |
+
not to have been checked out.
|
| 1472 |
+
--no-git Do not use git to update gnulib. Requires that
|
| 1473 |
+
\$GNULIB_SRCDIR or the --gnulib-srcdir option
|
| 1474 |
+
points to a gnulib repository with the correct
|
| 1475 |
+
revision.
|
| 1476 |
+
Only used for phase 1 (--pull).
|
| 1477 |
+
--skip-po Do not download *.po files.
|
| 1478 |
+
Only used for phase 1 (--pull).
|
| 1479 |
+
EOF
|
| 1480 |
+
bootstrap_print_option_usage_hook
|
| 1481 |
+
cat <<EOF
|
| 1482 |
+
If the file bootstrap.conf exists in the same directory as this script, its
|
| 1483 |
+
contents are read as shell variables to configure the bootstrap.
|
| 1484 |
+
|
| 1485 |
+
For build prerequisites, environment variables like \$AUTOCONF and \$AMTAR
|
| 1486 |
+
are honored.
|
| 1487 |
+
|
| 1488 |
+
Gnulib sources can be fetched in various ways:
|
| 1489 |
+
|
| 1490 |
+
* If GNULIB_SRCDIR is set (either as an environment variable or via the
|
| 1491 |
+
--gnulib-srcdir option), then sources are fetched from that local
|
| 1492 |
+
directory. If it is a git repository and the configuration variable
|
| 1493 |
+
GNULIB_REVISION is set in bootstrap.conf, then that revision is
|
| 1494 |
+
checked out.
|
| 1495 |
+
|
| 1496 |
+
* Otherwise, if this package is in a git repository with a 'gnulib'
|
| 1497 |
+
submodule configured, then that submodule is initialized and updated
|
| 1498 |
+
and sources are fetched from there. If GNULIB_REFDIR is set (either
|
| 1499 |
+
as an environment variable or via the --gnulib-refdir option) and is
|
| 1500 |
+
a git repository, then it is used as a reference.
|
| 1501 |
+
|
| 1502 |
+
* Otherwise, if the 'gnulib' directory does not exist, Gnulib sources
|
| 1503 |
+
are cloned into that directory using git from \$GNULIB_URL, defaulting
|
| 1504 |
+
to $default_gnulib_url; if GNULIB_REFDIR is set and is a git repository
|
| 1505 |
+
its contents may be used to accelerate the process.
|
| 1506 |
+
If the configuration variable GNULIB_REVISION is set in bootstrap.conf,
|
| 1507 |
+
then that revision is checked out.
|
| 1508 |
+
|
| 1509 |
+
* Otherwise, the existing Gnulib sources in the 'gnulib' directory are
|
| 1510 |
+
used. If it is a git repository and the configuration variable
|
| 1511 |
+
GNULIB_REVISION is set in bootstrap.conf, then that revision is
|
| 1512 |
+
checked out.
|
| 1513 |
+
|
| 1514 |
+
If you maintain a package and want to pin a particular revision of the
|
| 1515 |
+
Gnulib sources that has been tested with your package, then there are
|
| 1516 |
+
two possible approaches: either configure a 'gnulib' submodule with the
|
| 1517 |
+
appropriate revision, or set GNULIB_REVISION (and if necessary
|
| 1518 |
+
GNULIB_URL) in bootstrap.conf.
|
| 1519 |
+
|
| 1520 |
+
Running without arguments will suffice in most cases.
|
| 1521 |
+
EOF
|
| 1522 |
+
}
|
| 1523 |
+
|
| 1524 |
+
# Parse options.
|
| 1525 |
+
|
| 1526 |
+
# Whether to pull and generate.
|
| 1527 |
+
pull=false
|
| 1528 |
+
gen=false
|
| 1529 |
+
|
| 1530 |
+
# Whether to use copies instead of symlinks.
|
| 1531 |
+
copy=false
|
| 1532 |
+
|
| 1533 |
+
# Use git to update gnulib sources
|
| 1534 |
+
use_git=true
|
| 1535 |
+
|
| 1536 |
+
for option
|
| 1537 |
+
do
|
| 1538 |
+
case $option in
|
| 1539 |
+
--help)
|
| 1540 |
+
usage
|
| 1541 |
+
exit;;
|
| 1542 |
+
--version)
|
| 1543 |
+
set -e
|
| 1544 |
+
echo "bootstrap $scriptversion lib $scriptlibversion"
|
| 1545 |
+
echo "$copyright"
|
| 1546 |
+
exit 0
|
| 1547 |
+
;;
|
| 1548 |
+
--pull)
|
| 1549 |
+
pull=true;;
|
| 1550 |
+
--gen)
|
| 1551 |
+
gen=true;;
|
| 1552 |
+
--gnulib-srcdir=*)
|
| 1553 |
+
GNULIB_SRCDIR=${option#--gnulib-srcdir=};;
|
| 1554 |
+
--gnulib-refdir=*)
|
| 1555 |
+
GNULIB_REFDIR=${option#--gnulib-refdir=};;
|
| 1556 |
+
--skip-po)
|
| 1557 |
+
SKIP_PO=t;;
|
| 1558 |
+
--force)
|
| 1559 |
+
checkout_only_file=;;
|
| 1560 |
+
--copy)
|
| 1561 |
+
copy=true;;
|
| 1562 |
+
--bootstrap-sync)
|
| 1563 |
+
bootstrap_sync=true;;
|
| 1564 |
+
--no-bootstrap-sync)
|
| 1565 |
+
bootstrap_sync=false;;
|
| 1566 |
+
--no-git)
|
| 1567 |
+
use_git=false;;
|
| 1568 |
+
*)
|
| 1569 |
+
bootstrap_option_hook $option || die "$option: unknown option";;
|
| 1570 |
+
esac
|
| 1571 |
+
done
|
| 1572 |
+
|
| 1573 |
+
# Default is to do both.
|
| 1574 |
+
$pull || $gen || pull=true gen=true
|
| 1575 |
+
|
| 1576 |
+
$use_git || test -n "$GNULIB_SRCDIR" \
|
| 1577 |
+
|| die "Error: --no-git requires \$GNULIB_SRCDIR environment variable" \
|
| 1578 |
+
"or --gnulib-srcdir option"
|
| 1579 |
+
test -z "$GNULIB_SRCDIR" || test -d "$GNULIB_SRCDIR" \
|
| 1580 |
+
|| die "Error: \$GNULIB_SRCDIR environment variable or --gnulib-srcdir" \
|
| 1581 |
+
"option is specified, but does not denote a directory"
|
| 1582 |
+
|
| 1583 |
+
if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then
|
| 1584 |
+
die "Bootstrapping from a non-checked-out distribution is risky."
|
| 1585 |
+
fi
|
| 1586 |
+
|
| 1587 |
+
check_build_prerequisites $use_git
|
| 1588 |
+
|
| 1589 |
+
if $bootstrap_sync; then
|
| 1590 |
+
prepare_GNULIB_SRCDIR
|
| 1591 |
+
upgrade_bootstrap "$@"
|
| 1592 |
+
# Since we have now upgraded if needed, no need to try it a second time below.
|
| 1593 |
+
bootstrap_sync=false
|
| 1594 |
+
fi
|
| 1595 |
+
|
| 1596 |
+
echo "$0: Bootstrapping from checked-out $package sources..."
|
| 1597 |
+
|
| 1598 |
+
# Pass GNULIB_SRCDIR and GNULIB_REFDIR to any subsidiary commands that care.
|
| 1599 |
+
export GNULIB_SRCDIR
|
| 1600 |
+
export GNULIB_REFDIR
|
| 1601 |
+
|
| 1602 |
+
if $pull && { $use_git || test -z "$SKIP_PO"; }; then
|
| 1603 |
+
autopull \
|
| 1604 |
+
`if $bootstrap_sync; then
|
| 1605 |
+
echo ' --bootstrap-sync'
|
| 1606 |
+
else
|
| 1607 |
+
echo ' --no-bootstrap-sync'
|
| 1608 |
+
fi` \
|
| 1609 |
+
`if test -z "$checkout_only_file"; then echo ' --force'; fi` \
|
| 1610 |
+
`if ! $use_git; then echo ' --no-git'; fi` \
|
| 1611 |
+
`if test -n "$SKIP_PO"; then echo ' --skip-po'; fi` \
|
| 1612 |
+
|| die "could not fetch auxiliary files"
|
| 1613 |
+
fi
|
| 1614 |
+
|
| 1615 |
+
if $gen; then
|
| 1616 |
+
autogen \
|
| 1617 |
+
`if $copy; then echo ' --copy'; fi` \
|
| 1618 |
+
`if test -z "$checkout_only_file"; then echo ' --force'; fi` \
|
| 1619 |
+
|| die "could not generate auxiliary files"
|
| 1620 |
+
fi
|
| 1621 |
+
|
| 1622 |
+
# ----------------------------------------------------------------------------
|
| 1623 |
+
|
| 1624 |
+
# Local Variables:
|
| 1625 |
+
# eval: (add-hook 'before-save-hook 'time-stamp nil t)
|
| 1626 |
+
# time-stamp-start: "scriptversion="
|
| 1627 |
+
# time-stamp-format: "%Y-%02m-%02d.%02H"
|
| 1628 |
+
# time-stamp-time-zone: "UTC0"
|
| 1629 |
+
# time-stamp-end: "; # UTC"
|
| 1630 |
+
# End:
|
bootstrap.conf
ADDED
|
@@ -0,0 +1,460 @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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Bootstrap configuration. -*- sh -*-
|
| 2 |
+
|
| 3 |
+
# Copyright (C) 2006-2025 Free Software Foundation, Inc.
|
| 4 |
+
|
| 5 |
+
# This program is free software: you can redistribute it and/or modify
|
| 6 |
+
# it under the terms of the GNU General Public License as published by
|
| 7 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 8 |
+
# (at your option) any later version.
|
| 9 |
+
|
| 10 |
+
# This program is distributed in the hope that it will be useful,
|
| 11 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
+
# GNU General Public License for more details.
|
| 14 |
+
|
| 15 |
+
# You should have received a copy of the GNU General Public License
|
| 16 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
# We don't need these modules.
|
| 20 |
+
avoided_gnulib_modules='
|
| 21 |
+
--avoid=canonicalize-lgpl
|
| 22 |
+
--avoid=dummy
|
| 23 |
+
--avoid=mbuiter
|
| 24 |
+
--avoid=mbuiterf
|
| 25 |
+
'
|
| 26 |
+
|
| 27 |
+
# gnulib modules used by this package.
|
| 28 |
+
gnulib_modules="
|
| 29 |
+
$avoided_gnulib_modules
|
| 30 |
+
acl
|
| 31 |
+
acl-permissions
|
| 32 |
+
alignalloc
|
| 33 |
+
alignasof
|
| 34 |
+
alloca
|
| 35 |
+
announce-gen
|
| 36 |
+
areadlink-with-size
|
| 37 |
+
areadlinkat-with-size
|
| 38 |
+
argmatch
|
| 39 |
+
argv-iter
|
| 40 |
+
assert
|
| 41 |
+
assert-h
|
| 42 |
+
assure
|
| 43 |
+
attribute
|
| 44 |
+
autobuild
|
| 45 |
+
backup-rename
|
| 46 |
+
backupfile
|
| 47 |
+
base32
|
| 48 |
+
base64
|
| 49 |
+
bool
|
| 50 |
+
btoc32
|
| 51 |
+
buffer-lcm
|
| 52 |
+
c-strcase
|
| 53 |
+
c32iscntrl
|
| 54 |
+
c32isspace
|
| 55 |
+
c32width
|
| 56 |
+
canon-host
|
| 57 |
+
canonicalize
|
| 58 |
+
chmodat
|
| 59 |
+
chown
|
| 60 |
+
chownat
|
| 61 |
+
cl-strtod
|
| 62 |
+
cl-strtold
|
| 63 |
+
closein
|
| 64 |
+
closeout
|
| 65 |
+
config-h
|
| 66 |
+
configmake
|
| 67 |
+
copy-file-range
|
| 68 |
+
cpu-supports
|
| 69 |
+
crc-x86_64
|
| 70 |
+
crypto/md5
|
| 71 |
+
crypto/sha1
|
| 72 |
+
crypto/sha3
|
| 73 |
+
crypto/sha256
|
| 74 |
+
crypto/sha512
|
| 75 |
+
crypto/sm3
|
| 76 |
+
cycle-check
|
| 77 |
+
d-ino
|
| 78 |
+
d-type
|
| 79 |
+
di-set
|
| 80 |
+
dirfd
|
| 81 |
+
dirname
|
| 82 |
+
do-release-commit-and-tag
|
| 83 |
+
dtimespec-bound
|
| 84 |
+
dtoastr
|
| 85 |
+
dup2
|
| 86 |
+
endian
|
| 87 |
+
environ
|
| 88 |
+
error
|
| 89 |
+
euidaccess
|
| 90 |
+
exclude
|
| 91 |
+
exitfail
|
| 92 |
+
explicit_bzero
|
| 93 |
+
faccessat
|
| 94 |
+
fadvise
|
| 95 |
+
fchdir
|
| 96 |
+
fchmodat
|
| 97 |
+
fclose
|
| 98 |
+
fcntl
|
| 99 |
+
fcntl-safer
|
| 100 |
+
fd-reopen
|
| 101 |
+
fdatasync
|
| 102 |
+
fdopen
|
| 103 |
+
fdutimensat
|
| 104 |
+
file-has-acl
|
| 105 |
+
file-type
|
| 106 |
+
fileblocks
|
| 107 |
+
filemode
|
| 108 |
+
filenamecat
|
| 109 |
+
filevercmp
|
| 110 |
+
flexmember
|
| 111 |
+
fnmatch-gnu
|
| 112 |
+
fopen-safer
|
| 113 |
+
fprintftime
|
| 114 |
+
fpurge
|
| 115 |
+
free-posix
|
| 116 |
+
freopen
|
| 117 |
+
freopen-safer
|
| 118 |
+
fseeko
|
| 119 |
+
fstatat
|
| 120 |
+
fsusage
|
| 121 |
+
fsync
|
| 122 |
+
ftoastr
|
| 123 |
+
ftruncate
|
| 124 |
+
fts
|
| 125 |
+
full-read
|
| 126 |
+
full-write
|
| 127 |
+
gethrxtime
|
| 128 |
+
getline
|
| 129 |
+
getloadavg
|
| 130 |
+
getlogin
|
| 131 |
+
getndelim2
|
| 132 |
+
getopt-gnu
|
| 133 |
+
getpagesize
|
| 134 |
+
gettext-h
|
| 135 |
+
gettime
|
| 136 |
+
gettime-res
|
| 137 |
+
git-version-gen
|
| 138 |
+
gitlog-to-changelog
|
| 139 |
+
gnu-web-doc-update
|
| 140 |
+
gnumakefile
|
| 141 |
+
gnupload
|
| 142 |
+
hard-locale
|
| 143 |
+
hash
|
| 144 |
+
hashcode-file-inode
|
| 145 |
+
heap
|
| 146 |
+
host-os
|
| 147 |
+
human
|
| 148 |
+
idcache
|
| 149 |
+
idx
|
| 150 |
+
ignore-value
|
| 151 |
+
inttostr
|
| 152 |
+
inttypes-h
|
| 153 |
+
isapipe
|
| 154 |
+
isatty
|
| 155 |
+
isblank
|
| 156 |
+
issymlink
|
| 157 |
+
issymlinkat
|
| 158 |
+
largefile
|
| 159 |
+
lchmod
|
| 160 |
+
ldtoastr
|
| 161 |
+
lib-ignore
|
| 162 |
+
libgmp
|
| 163 |
+
linebuffer
|
| 164 |
+
link
|
| 165 |
+
link-follow
|
| 166 |
+
linkat
|
| 167 |
+
long-options
|
| 168 |
+
lstat
|
| 169 |
+
maintainer-makefile
|
| 170 |
+
malloc-gnu
|
| 171 |
+
manywarnings
|
| 172 |
+
mbbuf
|
| 173 |
+
mbrlen
|
| 174 |
+
mbrtoc32
|
| 175 |
+
mbrtowc
|
| 176 |
+
mbs_endswith
|
| 177 |
+
mbschr
|
| 178 |
+
mbslen
|
| 179 |
+
mbsstr
|
| 180 |
+
mbswidth
|
| 181 |
+
mbszero
|
| 182 |
+
mcel-prefer
|
| 183 |
+
memcasecmp
|
| 184 |
+
memchr
|
| 185 |
+
memcmp2
|
| 186 |
+
mempcpy
|
| 187 |
+
memrchr
|
| 188 |
+
minmax
|
| 189 |
+
mkancesdirs
|
| 190 |
+
mkdir
|
| 191 |
+
mkdir-p
|
| 192 |
+
mkdirat
|
| 193 |
+
mkfifo
|
| 194 |
+
mkfifoat
|
| 195 |
+
mknod
|
| 196 |
+
mkostemp
|
| 197 |
+
mkstemp
|
| 198 |
+
mktime
|
| 199 |
+
modechange
|
| 200 |
+
mountlist
|
| 201 |
+
mpsort
|
| 202 |
+
nproc
|
| 203 |
+
nstrftime
|
| 204 |
+
nullptr
|
| 205 |
+
obstack
|
| 206 |
+
open
|
| 207 |
+
openat-safer
|
| 208 |
+
parse-datetime
|
| 209 |
+
parse-datetime2
|
| 210 |
+
pathmax
|
| 211 |
+
perl
|
| 212 |
+
physmem
|
| 213 |
+
pipe-posix
|
| 214 |
+
pipe2
|
| 215 |
+
posix-shell
|
| 216 |
+
posix_spawn
|
| 217 |
+
posix_spawnattr_destroy
|
| 218 |
+
posix_spawnattr_init
|
| 219 |
+
posix_spawnattr_setflags
|
| 220 |
+
posix_spawnattr_setsigdefault
|
| 221 |
+
posix_spawn_file_actions_addclose
|
| 222 |
+
posix_spawn_file_actions_adddup2
|
| 223 |
+
posix_spawn_file_actions_destroy
|
| 224 |
+
posix_spawn_file_actions_init
|
| 225 |
+
posix_spawnp
|
| 226 |
+
posixtm
|
| 227 |
+
posixver
|
| 228 |
+
priv-set
|
| 229 |
+
progname
|
| 230 |
+
propername-lite
|
| 231 |
+
pthread-cond
|
| 232 |
+
pthread-mutex
|
| 233 |
+
pthread-thread
|
| 234 |
+
pthread_sigmask
|
| 235 |
+
putenv-gnu
|
| 236 |
+
quote
|
| 237 |
+
quotearg
|
| 238 |
+
randint
|
| 239 |
+
randperm
|
| 240 |
+
rawmemchr
|
| 241 |
+
read-file
|
| 242 |
+
readtokens
|
| 243 |
+
readtokens0
|
| 244 |
+
readutmp
|
| 245 |
+
regex
|
| 246 |
+
remove
|
| 247 |
+
renameat
|
| 248 |
+
renameatu
|
| 249 |
+
rmdir
|
| 250 |
+
root-dev-ino
|
| 251 |
+
safe-read
|
| 252 |
+
same
|
| 253 |
+
save-cwd
|
| 254 |
+
savedir
|
| 255 |
+
savewd
|
| 256 |
+
select
|
| 257 |
+
selinux-at
|
| 258 |
+
setenv
|
| 259 |
+
settime
|
| 260 |
+
sig2str
|
| 261 |
+
sigaction
|
| 262 |
+
skipchars
|
| 263 |
+
smack
|
| 264 |
+
ssize_t
|
| 265 |
+
stat-macros
|
| 266 |
+
stat-size
|
| 267 |
+
stat-time
|
| 268 |
+
stdc_leading_zeros
|
| 269 |
+
stdc_trailing_zeros
|
| 270 |
+
stdckdint-h
|
| 271 |
+
stdcountof-h
|
| 272 |
+
stddef-h
|
| 273 |
+
stdlib-safer
|
| 274 |
+
stpcpy
|
| 275 |
+
str_endswith
|
| 276 |
+
strdup-posix
|
| 277 |
+
stringeq
|
| 278 |
+
strnlen
|
| 279 |
+
strnumcmp
|
| 280 |
+
strsignal
|
| 281 |
+
strtoimax
|
| 282 |
+
strtoumax
|
| 283 |
+
symlinkat
|
| 284 |
+
sys_ioctl-h
|
| 285 |
+
sys_resource-h
|
| 286 |
+
sys_stat-h
|
| 287 |
+
sys_types-h
|
| 288 |
+
sys_wait-h
|
| 289 |
+
targetdir
|
| 290 |
+
tempname
|
| 291 |
+
termios-h
|
| 292 |
+
time_rz
|
| 293 |
+
timer-time
|
| 294 |
+
timespec
|
| 295 |
+
tmpdir
|
| 296 |
+
uname
|
| 297 |
+
unicodeio
|
| 298 |
+
unistd-safer
|
| 299 |
+
unlink-busy
|
| 300 |
+
unlinkat
|
| 301 |
+
unlinkdir
|
| 302 |
+
unlocked-io
|
| 303 |
+
unsetenv
|
| 304 |
+
update-copyright
|
| 305 |
+
useless-if-before-free
|
| 306 |
+
userspec
|
| 307 |
+
utimecmp
|
| 308 |
+
utimens
|
| 309 |
+
utimensat
|
| 310 |
+
vasprintf-posix
|
| 311 |
+
vc-list-files
|
| 312 |
+
verify
|
| 313 |
+
verror
|
| 314 |
+
version-etc-fsf
|
| 315 |
+
winsz-ioctl
|
| 316 |
+
winsz-termios
|
| 317 |
+
write-any-file
|
| 318 |
+
xalignalloc
|
| 319 |
+
xalloc
|
| 320 |
+
xbinary-io
|
| 321 |
+
xdectoint
|
| 322 |
+
xfts
|
| 323 |
+
xgetcwd
|
| 324 |
+
xgetgroups
|
| 325 |
+
xgethostname
|
| 326 |
+
xmemcoll
|
| 327 |
+
xnanosleep
|
| 328 |
+
xprintf
|
| 329 |
+
xprintf-posix
|
| 330 |
+
xreadlink
|
| 331 |
+
xsetenv
|
| 332 |
+
xstrtod
|
| 333 |
+
xstrtoimax
|
| 334 |
+
xstrtol
|
| 335 |
+
xstrtol-error
|
| 336 |
+
xstrtold
|
| 337 |
+
xstrtoumax
|
| 338 |
+
xvasprintf
|
| 339 |
+
year2038-recommended
|
| 340 |
+
yesno
|
| 341 |
+
"
|
| 342 |
+
|
| 343 |
+
# Other locale categories that need message catalogs.
|
| 344 |
+
EXTRA_LOCALE_CATEGORIES=LC_TIME
|
| 345 |
+
|
| 346 |
+
# Additional xgettext options to use. Use "\\\newline" to break lines.
|
| 347 |
+
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
| 348 |
+
--flag=asnprintf:3:c-format\\\
|
| 349 |
+
--flag=asprintf:2:c-format\\\
|
| 350 |
+
--flag=error:3:c-format\\\
|
| 351 |
+
--flag=error_at_line:5:c-format\\\
|
| 352 |
+
--flag=vasnprintf:3:c-format\\\
|
| 353 |
+
--flag=vasprintf:2:c-format\\\
|
| 354 |
+
--flag=verror:3:c-format\\\
|
| 355 |
+
--flag=verror_at_line:5:c-format\\\
|
| 356 |
+
--flag=wrapf:1:c-format\\\
|
| 357 |
+
--flag=xasprintf:1:c-format\\\
|
| 358 |
+
--flag=xfprintf:2:c-format\\\
|
| 359 |
+
--flag=xprintf:1:c-format\\\
|
| 360 |
+
--from-code=UTF-8\\\
|
| 361 |
+
'
|
| 362 |
+
|
| 363 |
+
# Append these, since we use the propername-lite module.
|
| 364 |
+
see_manual='"This is a proper name. See the gettext manual, section Names."'
|
| 365 |
+
see_manual=\'"$see_manual"\'
|
| 366 |
+
XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\
|
| 367 |
+
--keyword=proper_name:1,'"$see_manual"'\\\
|
| 368 |
+
--keyword=proper_name_lite:1,'"$see_manual"'\\\
|
| 369 |
+
'
|
| 370 |
+
|
| 371 |
+
gnulib_tool_option_extras="--tests-base=gnulib-tests --with-tests --symlink\
|
| 372 |
+
--makefile-name=gnulib.mk --automake-subdir
|
| 373 |
+
"
|
| 374 |
+
|
| 375 |
+
# Build prerequisites
|
| 376 |
+
buildreq="\
|
| 377 |
+
autoconf 2.64
|
| 378 |
+
automake 1.11.2
|
| 379 |
+
autopoint 0.19.2
|
| 380 |
+
bison -
|
| 381 |
+
gettext 0.19.2
|
| 382 |
+
git 1.5.5
|
| 383 |
+
gperf -
|
| 384 |
+
gzip -
|
| 385 |
+
m4 -
|
| 386 |
+
makeinfo 6.1
|
| 387 |
+
texi2pdf 6.1
|
| 388 |
+
patch -
|
| 389 |
+
perl 5.5
|
| 390 |
+
tar -
|
| 391 |
+
wget -
|
| 392 |
+
xz -
|
| 393 |
+
"
|
| 394 |
+
|
| 395 |
+
bootstrap_post_import_hook ()
|
| 396 |
+
{
|
| 397 |
+
# Automake requires that ChangeLog exist.
|
| 398 |
+
touch ChangeLog || return 1
|
| 399 |
+
# List of coreutils programs. See heading comments in the invoked
|
| 400 |
+
# script for more info. Keep this in sync with the rules in
|
| 401 |
+
(m4f=m4/cu-progs.m4 mkf=src/cu-progs.mk tmp=cu-progs.tmp \
|
| 402 |
+
&& rm -f $m4f $mkf $tmp-1 $tmp-2 \
|
| 403 |
+
&& build-aux/gen-lists-of-programs.sh --autoconf >$tmp-1 \
|
| 404 |
+
&& build-aux/gen-lists-of-programs.sh --automake >$tmp-2 \
|
| 405 |
+
&& chmod a-w $tmp-1 $tmp-2 \
|
| 406 |
+
&& mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf)
|
| 407 |
+
|
| 408 |
+
# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" appears
|
| 409 |
+
# in configure.ac, remove a file unnecessarily imported by autopoint.
|
| 410 |
+
if grep '^[ ]*AM_GNU_GETTEXT(\[*external]*[,)]' \
|
| 411 |
+
configure.ac >/dev/null 2>&1; then
|
| 412 |
+
rm -f m4/longlong.m4
|
| 413 |
+
fi
|
| 414 |
+
|
| 415 |
+
# Regenerate src/single-binary.mk
|
| 416 |
+
(mkf=src/single-binary.mk tmp=single-binary.tmp \
|
| 417 |
+
&& rm -f $mkf $tmp \
|
| 418 |
+
&& build-aux/gen-single-binary.sh src/local.mk >$tmp \
|
| 419 |
+
&& chmod a-w $tmp \
|
| 420 |
+
&& mv -f $tmp $mkf)
|
| 421 |
+
|
| 422 |
+
# Copy tests/init.sh from Gnulib.
|
| 423 |
+
$gnulib_tool --copy-file tests/init.sh
|
| 424 |
+
}
|
| 425 |
+
|
| 426 |
+
|
| 427 |
+
bootstrap_epilogue()
|
| 428 |
+
{
|
| 429 |
+
# Since this is a "GNU" package, replace this line
|
| 430 |
+
# if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null \
|
| 431 |
+
# | grep -v 'libtool:' >/dev/null; then
|
| 432 |
+
# with this:
|
| 433 |
+
# if true; then
|
| 434 |
+
# Why? That pipeline searches all files in $(top_srcdir), and if you
|
| 435 |
+
# happen to have large files (or apparently large sparse files), the
|
| 436 |
+
# first grep may well run out of memory.
|
| 437 |
+
perl -pi -e 's/if LC_ALL=C grep .GNU .PACKAGE.*; then/if true; then/' \
|
| 438 |
+
po/Makefile.in.in
|
| 439 |
+
|
| 440 |
+
# Add dummy 'install-html' target, required for packages using
|
| 441 |
+
# non-recursive makefiles with older gettext.
|
| 442 |
+
# See https://bugs.gnu.org/25690
|
| 443 |
+
if ! grep -w 'install-html' po/Makefile.in.in ; then
|
| 444 |
+
printf 'install-%s:;\n' dvi ps pdf html >> po/Makefile.in.in
|
| 445 |
+
fi
|
| 446 |
+
|
| 447 |
+
# Install our git hooks, as long as "cp" accepts the --backup option,
|
| 448 |
+
# so that we can back up any existing files.
|
| 449 |
+
case $(cp --help) in *--backup*) backup=1;; *) backup=0;; esac
|
| 450 |
+
if test $backup = 1; then
|
| 451 |
+
hooks=$(cd scripts/git-hooks && git ls-files)
|
| 452 |
+
for f in $hooks; do
|
| 453 |
+
# If it is identical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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
# Generate lists of all coreutils programs, to be fed both to Autoconf
|
| 3 |
+
# and Automake, and with further distinctions about how and when these
|
| 4 |
+
# programs should be built. This is useful to avoid duplicating these
|
| 5 |
+
# list definitions among several files ('configure.ac' and
|
| 6 |
+
# 'src/local.mk' at least); such duplication had proved a source of
|
| 7 |
+
# inconsistencies and bugs in the past.
|
| 8 |
+
|
| 9 |
+
set -u
|
| 10 |
+
set -e
|
| 11 |
+
|
| 12 |
+
# These are the names of programs that are neither built nor installed
|
| 13 |
+
# by default. This list is *not* intended for programs like 'who',
|
| 14 |
+
# 'nice', 'chroot', etc., that are built only when certain requisite
|
| 15 |
+
# system features are detected.
|
| 16 |
+
# If you would like to install programs from this list anyway, say A and B,
|
| 17 |
+
# use "--enable-install-program=A,B" when invoking configure.
|
| 18 |
+
disabled_by_default_progs='
|
| 19 |
+
arch
|
| 20 |
+
coreutils
|
| 21 |
+
hostname
|
| 22 |
+
'
|
| 23 |
+
|
| 24 |
+
# Programs that can be built only when certain requisite system
|
| 25 |
+
# features are detected at configure time.
|
| 26 |
+
build_if_possible_progs='
|
| 27 |
+
chcon
|
| 28 |
+
chroot
|
| 29 |
+
df
|
| 30 |
+
hostid
|
| 31 |
+
libstdbuf.so
|
| 32 |
+
nice
|
| 33 |
+
pinky
|
| 34 |
+
runcon
|
| 35 |
+
stdbuf
|
| 36 |
+
stty
|
| 37 |
+
timeout
|
| 38 |
+
users
|
| 39 |
+
who
|
| 40 |
+
'
|
| 41 |
+
|
| 42 |
+
# All the other programs, to be built by default, and that should
|
| 43 |
+
# be buildable without problems on any target system.
|
| 44 |
+
normal_progs='
|
| 45 |
+
[
|
| 46 |
+
b2sum
|
| 47 |
+
base64
|
| 48 |
+
base32
|
| 49 |
+
basenc
|
| 50 |
+
basename
|
| 51 |
+
cat
|
| 52 |
+
chgrp
|
| 53 |
+
chmod
|
| 54 |
+
chown
|
| 55 |
+
cksum
|
| 56 |
+
comm
|
| 57 |
+
cp
|
| 58 |
+
csplit
|
| 59 |
+
cut
|
| 60 |
+
date
|
| 61 |
+
dd
|
| 62 |
+
dir
|
| 63 |
+
dircolors
|
| 64 |
+
dirname
|
| 65 |
+
du
|
| 66 |
+
echo
|
| 67 |
+
env
|
| 68 |
+
expand
|
| 69 |
+
expr
|
| 70 |
+
factor
|
| 71 |
+
false
|
| 72 |
+
fmt
|
| 73 |
+
fold
|
| 74 |
+
ginstall
|
| 75 |
+
groups
|
| 76 |
+
head
|
| 77 |
+
id
|
| 78 |
+
join
|
| 79 |
+
kill
|
| 80 |
+
link
|
| 81 |
+
ln
|
| 82 |
+
logname
|
| 83 |
+
ls
|
| 84 |
+
md5sum
|
| 85 |
+
mkdir
|
| 86 |
+
mkfifo
|
| 87 |
+
mknod
|
| 88 |
+
mktemp
|
| 89 |
+
mv
|
| 90 |
+
nl
|
| 91 |
+
nproc
|
| 92 |
+
nohup
|
| 93 |
+
numfmt
|
| 94 |
+
od
|
| 95 |
+
paste
|
| 96 |
+
pathchk
|
| 97 |
+
pr
|
| 98 |
+
printenv
|
| 99 |
+
printf
|
| 100 |
+
ptx
|
| 101 |
+
pwd
|
| 102 |
+
readlink
|
| 103 |
+
realpath
|
| 104 |
+
rm
|
| 105 |
+
rmdir
|
| 106 |
+
seq
|
| 107 |
+
sha1sum
|
| 108 |
+
sha224sum
|
| 109 |
+
sha256sum
|
| 110 |
+
sha384sum
|
| 111 |
+
sha512sum
|
| 112 |
+
shred
|
| 113 |
+
shuf
|
| 114 |
+
sleep
|
| 115 |
+
sort
|
| 116 |
+
split
|
| 117 |
+
stat
|
| 118 |
+
sum
|
| 119 |
+
sync
|
| 120 |
+
tac
|
| 121 |
+
tail
|
| 122 |
+
tee
|
| 123 |
+
test
|
| 124 |
+
touch
|
| 125 |
+
tr
|
| 126 |
+
true
|
| 127 |
+
truncate
|
| 128 |
+
tsort
|
| 129 |
+
tty
|
| 130 |
+
uname
|
| 131 |
+
unexpand
|
| 132 |
+
uniq
|
| 133 |
+
unlink
|
| 134 |
+
uptime
|
| 135 |
+
vdir
|
| 136 |
+
wc
|
| 137 |
+
whoami
|
| 138 |
+
yes
|
| 139 |
+
'
|
| 140 |
+
|
| 141 |
+
me=`echo "$0" | sed 's,.*/,,'`
|
| 142 |
+
msg="Automatically generated by $me. DO NOT EDIT BY HAND!"
|
| 143 |
+
|
| 144 |
+
case $#,$1 in
|
| 145 |
+
1,--autoconf|1,--for-autoconf)
|
| 146 |
+
echo "dnl $msg"
|
| 147 |
+
for p in $normal_progs; do
|
| 148 |
+
test x"$p" = x"[" && p='@<:@'
|
| 149 |
+
echo "gl_ADD_PROG([optional_bin_progs], [$p])"
|
| 150 |
+
done
|
| 151 |
+
# Extra 'echo' to normalize whitespace.
|
| 152 |
+
echo "no_install_progs_default='`echo $disabled_by_default_progs`'"
|
| 153 |
+
sed 's/^ *//' <<END
|
| 154 |
+
# Given the name of a variable containing a space-separated
|
| 155 |
+
# list of install-by-default programs and the actual list of
|
| 156 |
+
# do-not-install-by-default programs, modify the former variable
|
| 157 |
+
# to reflect any "do-install" and "don't-install" requests.
|
| 158 |
+
# That is, add any program specified via --enable-install-program,
|
| 159 |
+
# and remove any program specified via --enable-no-install-program.
|
| 160 |
+
# Note how the second argument below is a literal, with ","
|
| 161 |
+
# separators. That is required due to the way the macro works,
|
| 162 |
+
# and since the corresponding ./configure option argument is
|
| 163 |
+
# comma-separated on input.
|
| 164 |
+
gl_INCLUDE_EXCLUDE_PROG([optional_bin_progs], [`\
|
| 165 |
+
echo $disabled_by_default_progs \
|
| 166 |
+
| sed 's/ /,/g'`])
|
| 167 |
+
END
|
| 168 |
+
;;
|
| 169 |
+
1,--automake|1,--for-automake)
|
| 170 |
+
echo "## $msg"
|
| 171 |
+
progsdir=src
|
| 172 |
+
echo no_install__progs =
|
| 173 |
+
for p in $disabled_by_default_progs; do
|
| 174 |
+
echo no_install__progs += $progsdir/$p
|
| 175 |
+
done
|
| 176 |
+
echo build_if_possible__progs =
|
| 177 |
+
for p in $build_if_possible_progs; do
|
| 178 |
+
echo build_if_possible__progs += $progsdir/$p
|
| 179 |
+
done
|
| 180 |
+
echo default__progs =
|
| 181 |
+
for p in $normal_progs; do
|
| 182 |
+
echo default__progs += $progsdir/$p
|
| 183 |
+
done
|
| 184 |
+
;;
|
| 185 |
+
1,--list-progs)
|
| 186 |
+
for p in $disabled_by_default_progs $build_if_possible_progs \
|
| 187 |
+
$normal_progs; do
|
| 188 |
+
echo $p
|
| 189 |
+
done
|
| 190 |
+
;;
|
| 191 |
+
*)
|
| 192 |
+
echo "$0: invalid usage" >&2; exit 2
|
| 193 |
+
;;
|
| 194 |
+
esac
|
| 195 |
+
|
| 196 |
+
exit 0
|
build-aux/gen-single-binary.sh
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#!/bin/sh
|
| 2 |
+
|
| 3 |
+
# Generate the list of rules for the single-binary option based on all the other
|
| 4 |
+
# binaries found in src/local.mk.
|
| 5 |
+
#
|
| 6 |
+
# We need to duplicate the specific rules to build each program into a new
|
| 7 |
+
# static library target. We can't reuse the existing target since we need to
|
| 8 |
+
# create a .a file instead of linking the program. We can't do this at
|
| 9 |
+
# ./configure since the file names need to be available when automake runs
|
| 10 |
+
# to let it generate all the required rules in Makefile.in. The configure
|
| 11 |
+
# step will select which ones will be used to build, but they need to be
|
| 12 |
+
# generated beforehand.
|
| 13 |
+
#
|
| 14 |
+
# Instead of maintaining a duplicated list of rules, we generate the
|
| 15 |
+
# single-binary required rules based on the normal configuration found on
|
| 16 |
+
# src/local.mk with this script.
|
| 17 |
+
|
| 18 |
+
if test "x$1" = "x"; then
|
| 19 |
+
echo "Usage: $0 path/to/src/local.mk" >&2
|
| 20 |
+
exit 1
|
| 21 |
+
fi
|
| 22 |
+
|
| 23 |
+
set -e
|
| 24 |
+
|
| 25 |
+
LOCAL_MK=$1
|
| 26 |
+
GEN_LISTS_OF_PROGRAMS="`dirname "$0"`/gen-lists-of-programs.sh"
|
| 27 |
+
|
| 28 |
+
ALL_PROGRAMS=$($GEN_LISTS_OF_PROGRAMS --list-progs \
|
| 29 |
+
| grep -v -F -e coreutils -e libstdbuf.so \
|
| 30 |
+
| tr '[' '_')
|
| 31 |
+
|
| 32 |
+
# Compute default SOURCES. automake will assume the source file for the
|
| 33 |
+
# src_${cmd} target to be src/${cmd}.c, but we will add rules to generate
|
| 34 |
+
# the lib src_libsinglebin_${cmd}_a which won't match the autogenerated source
|
| 35 |
+
# file. This loop will initialize the default source file and will be reset
|
| 36 |
+
# later if needed.
|
| 37 |
+
for cmd in $ALL_PROGRAMS; do
|
| 38 |
+
eval "src_${cmd}_SOURCES=src/${cmd}.c"
|
| 39 |
+
done
|
| 40 |
+
|
| 41 |
+
# Load actual values from src/local.mk. This will read all the variables from
|
| 42 |
+
# the local.mk matching the src_${cmd}_... case.
|
| 43 |
+
while read l; do
|
| 44 |
+
if echo "$l" | grep -E '^src_[_[:alnum:]]+ +\+?=' > /dev/null; then
|
| 45 |
+
var=$(echo $l | cut -f 1 -d ' ')
|
| 46 |
+
value=$(echo $l | cut -f 2- -d =)
|
| 47 |
+
if [ "$value" != " \$(LDADD)" ]; then
|
| 48 |
+
oldvalue=""
|
| 49 |
+
if echo $l | grep -F '+=' >/dev/null; then
|
| 50 |
+
eval "oldvalue=\${$var}"
|
| 51 |
+
fi
|
| 52 |
+
value=$(echo "$value" | sed "s/'/'\"'\"'/g")
|
| 53 |
+
eval "$var='$oldvalue "$value"'"
|
| 54 |
+
fi
|
| 55 |
+
fi
|
| 56 |
+
done < $LOCAL_MK
|
| 57 |
+
|
| 58 |
+
me=`echo "$0" | sed 's,.*/,,'`
|
| 59 |
+
echo "## Automatically generated by $me. DO NOT EDIT BY HAND!"
|
| 60 |
+
|
| 61 |
+
# Override the sources for some tools, to use smaller variants
|
| 62 |
+
override_single() {
|
| 63 |
+
from="$1"; to="$2";
|
| 64 |
+
|
| 65 |
+
eval "src_${from}_SOURCES='src/coreutils-${from}.c'"
|
| 66 |
+
eval "src_from_LDADD=\$src_${from}_LDADD"
|
| 67 |
+
eval "src_${from}_LDADD='$src_from_LDADD src/libsinglebin_${to}.a'"
|
| 68 |
+
eval "src_libsinglebin_${from}_a_DEPENDENCIES='src/libsinglebin_${to}.a'"
|
| 69 |
+
echo "src_libsinglebin_${from}_a_DEPENDENCIES = src/libsinglebin_${to}.a"
|
| 70 |
+
}
|
| 71 |
+
override_single dir ls
|
| 72 |
+
override_single vdir ls
|
| 73 |
+
override_single arch uname
|
| 74 |
+
override_single chgrp chown
|
| 75 |
+
|
| 76 |
+
for cmd in $ALL_PROGRAMS; do
|
| 77 |
+
echo "# Command $cmd"
|
| 78 |
+
echo noinst_LIBRARIES += src/libsinglebin_${cmd}.a
|
| 79 |
+
base="src_libsinglebin_${cmd}_a"
|
| 80 |
+
# SOURCES
|
| 81 |
+
var=src_${cmd}_SOURCES
|
| 82 |
+
eval "value=\$$var"
|
| 83 |
+
echo "${base}_SOURCES = $value"
|
| 84 |
+
|
| 85 |
+
# LDADD
|
| 86 |
+
var=src_${cmd}_LDADD
|
| 87 |
+
eval "value=\$$var"
|
| 88 |
+
if [ "x$value" != "x" ]; then
|
| 89 |
+
echo "${base}_ldadd = $value"
|
| 90 |
+
fi
|
| 91 |
+
|
| 92 |
+
# DEPENDENCIES
|
| 93 |
+
var=src_libsinglebin_${cmd}_a_DEPENDENCIES
|
| 94 |
+
eval "value=\$$var"
|
| 95 |
+
if [ "x$value" = "x" ]; then
|
| 96 |
+
echo "$var = \$(src_${cmd}_DEPENDENCIES)"
|
| 97 |
+
fi
|
| 98 |
+
|
| 99 |
+
# CFLAGS
|
| 100 |
+
# Hack any other program defining a main() replacing its main by
|
| 101 |
+
# single_binary_main_$PROGRAM_NAME.
|
| 102 |
+
echo "${base}_CFLAGS = \"-Dmain=single_binary_main_${cmd} (int, char **);" \
|
| 103 |
+
" int single_binary_main_${cmd}\" " \
|
| 104 |
+
"-Dusage=_usage_${cmd} \$(src_coreutils_CFLAGS)"
|
| 105 |
+
var=src_${cmd}_CFLAGS
|
| 106 |
+
eval "value=\$$var"
|
| 107 |
+
if [ "x$value" != "x" ]; then
|
| 108 |
+
echo "${base}_CFLAGS += $value"
|
| 109 |
+
fi
|
| 110 |
+
|
| 111 |
+
# CPPFLAGS
|
| 112 |
+
var=src_${cmd}_CPPFLAGS
|
| 113 |
+
eval "value=\$$var"
|
| 114 |
+
if [ "x$value" != "x" ]; then
|
| 115 |
+
echo "${base}_CPPFLAGS = $value"
|
| 116 |
+
fi
|
| 117 |
+
done
|
| 118 |
+
|
| 119 |
+
exit 0
|
build-aux/git-log-fix
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# This file is expected to be used via gitlog-to-changelog's --amend=FILE
|
| 2 |
+
# option. It specifies what changes to make to each given SHA1's commit
|
| 3 |
+
# log and metadata, using Perl-eval'able expressions.
|
cfg.mk
ADDED
|
@@ -0,0 +1,1002 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Customize maint.mk -*- makefile -*-
|
| 2 |
+
# Copyright (C) 2003-2025 Free Software Foundation, Inc.
|
| 3 |
+
|
| 4 |
+
# This program is free software: you can redistribute it and/or modify
|
| 5 |
+
# it under the terms of the GNU General Public License as published by
|
| 6 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 7 |
+
# (at your option) any later version.
|
| 8 |
+
|
| 9 |
+
# This program is distributed in the hope that it will be useful,
|
| 10 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 11 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 12 |
+
# GNU General Public License for more details.
|
| 13 |
+
|
| 14 |
+
# You should have received a copy of the GNU General Public License
|
| 15 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 16 |
+
|
| 17 |
+
# Used in maint.mk's web-manual rule
|
| 18 |
+
manual_title = Core GNU utilities
|
| 19 |
+
|
| 20 |
+
# Use the direct link. This is guaranteed to work immediately, while
|
| 21 |
+
# it can take a while for the faster mirror links to become usable.
|
| 22 |
+
url_dir_list = https://ftp.gnu.org/gnu/$(PACKAGE)
|
| 23 |
+
|
| 24 |
+
# Exclude bundled external projects from syntax checks
|
| 25 |
+
VC_LIST_ALWAYS_EXCLUDE_REGEX = src/(blake2/.*|longlong.h)$$
|
| 26 |
+
|
| 27 |
+
# Tests not to run as part of "make distcheck".
|
| 28 |
+
local-checks-to-skip = \
|
| 29 |
+
sc_indent
|
| 30 |
+
|
| 31 |
+
# Tools used to bootstrap this package, used for "announcement".
|
| 32 |
+
bootstrap-tools = autoconf,automake,gnulib,bison
|
| 33 |
+
|
| 34 |
+
# Now that we have better tests, make this the default.
|
| 35 |
+
export VERBOSE = yes
|
| 36 |
+
|
| 37 |
+
# Comparing tarball sizes compressed using different xz presets, we see that
|
| 38 |
+
# an -8e-compressed tarball is only 9KiB larger than the -9e-compressed one.
|
| 39 |
+
# Using -8e is preferred, since that lets the decompression process use half
|
| 40 |
+
# the memory (32MiB rather than 64MiB).
|
| 41 |
+
# $ for i in {7,8,9}{e,}; do \
|
| 42 |
+
# (n=$(xz -$i < coreutils-8.15*.tar|wc -c);echo $n $i) & done |sort -nr
|
| 43 |
+
# 5129388 7
|
| 44 |
+
# 5036524 7e
|
| 45 |
+
# 5017476 8
|
| 46 |
+
# 5010604 9
|
| 47 |
+
# 4923016 8e
|
| 48 |
+
# 4914152 9e
|
| 49 |
+
export XZ_OPT = -8e
|
| 50 |
+
|
| 51 |
+
old_NEWS_hash = 6651d3c6c61d6b5d0f95b969e5c0c2af
|
| 52 |
+
|
| 53 |
+
# Add an exemption for sc_makefile_at_at_check.
|
| 54 |
+
_makefile_at_at_check_exceptions = \
|
| 55 |
+
' && !/MAKEINFO/ && !/^cu_install_prog/ && !/dynamic-dep/'
|
| 56 |
+
|
| 57 |
+
# Our help-version script is in a slightly different location.
|
| 58 |
+
_hv_file ?= $(srcdir)/tests/misc/help-version
|
| 59 |
+
|
| 60 |
+
world:
|
| 61 |
+
./bootstrap && \
|
| 62 |
+
./configure --quiet && \
|
| 63 |
+
$(MAKE) $(AM_MAKEFLAGS) -j $$(nproc 2>/dev/null || echo 1)
|
| 64 |
+
|
| 65 |
+
# Ensure that the list of O_ symbols used to compute O_FULLBLOCK is complete.
|
| 66 |
+
dd = $(srcdir)/src/dd.c
|
| 67 |
+
sc_dd_O_FLAGS:
|
| 68 |
+
@rm -f $@.1 $@.2
|
| 69 |
+
@{ echo O_FULLBLOCK; echo O_NOCACHE; \
|
| 70 |
+
perl -nle '/^ +\| (O_\w*)$$/ and print $$1' $(dd); } | sort > $@.1
|
| 71 |
+
@{ echo O_NOFOLLOW; echo O_EXCL; \
|
| 72 |
+
perl -nle '/{"[a-z]+",\s*(O_\w+)},/ and print $$1' \
|
| 73 |
+
$(dd); } | sort > $@.2
|
| 74 |
+
@diff -u $@.1 $@.2; diff=$$?; \
|
| 75 |
+
rm -f $@.1 $@.2; \
|
| 76 |
+
test "$$diff" = 0 \
|
| 77 |
+
|| { echo '$(ME): $(dd) has inconsistent O_ flag lists'>&2; \
|
| 78 |
+
exit 1; }
|
| 79 |
+
|
| 80 |
+
# Ensure that dd's definition of LONGEST_SYMBOL stays in sync
|
| 81 |
+
# with the strings from the two affected variables.
|
| 82 |
+
dd_c = $(srcdir)/src/dd.c
|
| 83 |
+
sc_dd_max_sym_length:
|
| 84 |
+
ifneq ($(wildcard $(dd_c)),)
|
| 85 |
+
@len=$$( (sed -n '/conversions\[] =$$/,/^};/p' $(dd_c);\
|
| 86 |
+
sed -n '/flags\[] =$$/,/^};/p' $(dd_c) ) \
|
| 87 |
+
|sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p'| wc -L);\
|
| 88 |
+
max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
|
| 89 |
+
|tr -d '"' | wc -L); \
|
| 90 |
+
if test "$$len" = "$$max"; then :; else \
|
| 91 |
+
echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
|
| 92 |
+
exit 1; \
|
| 93 |
+
fi
|
| 94 |
+
endif
|
| 95 |
+
|
| 96 |
+
# Many m4 macros names once began with 'jm_'.
|
| 97 |
+
# On 2004-04-13, they were all changed to start with gl_ instead.
|
| 98 |
+
# Make sure that none are inadvertently reintroduced.
|
| 99 |
+
sc_prohibit_jm_in_m4:
|
| 100 |
+
@grep -nE 'jm_[A-Z]' \
|
| 101 |
+
$$($(VC_LIST) m4 |grep '\.m4$$'; echo /dev/null) && \
|
| 102 |
+
{ echo '$(ME): do not use jm_ in m4 macro names' \
|
| 103 |
+
1>&2; exit 1; } || :
|
| 104 |
+
|
| 105 |
+
# Ensure that each root-requiring test is run via the "check-root" rule.
|
| 106 |
+
sc_root_tests:
|
| 107 |
+
@t1=sc-root.expected; t2=sc-root.actual; \
|
| 108 |
+
grep -nl '^ *require_root_$$' `$(VC_LIST) tests` | \
|
| 109 |
+
sed 's|.*/tests/|tests/|' | sort > $$t1; \
|
| 110 |
+
for t in $(all_root_tests); do echo $$t; done | sort > $$t2; \
|
| 111 |
+
st=0; diff -u $$t1 $$t2 || st=1; \
|
| 112 |
+
rm -f $$t1 $$t2; \
|
| 113 |
+
exit $$st
|
| 114 |
+
|
| 115 |
+
# Ensure that all version-controlled test cases are listed in $(all_tests).
|
| 116 |
+
sc_tests_list_consistency:
|
| 117 |
+
@bs="\\"; \
|
| 118 |
+
test_extensions_rx=`echo $(TEST_EXTENSIONS) \
|
| 119 |
+
| sed -e "s/ /|/g" -e "s/$$bs./$$bs$$bs./g"`; \
|
| 120 |
+
{ \
|
| 121 |
+
for t in $(all_tests); do echo $$t; done; \
|
| 122 |
+
cd $(top_srcdir); \
|
| 123 |
+
$(SHELL) build-aux/vc-list-files tests \
|
| 124 |
+
| grep -Ev '^tests/(factor/(run|create-test)|init)\.sh$$' \
|
| 125 |
+
| grep -E "($$test_extensions_rx)$$"; \
|
| 126 |
+
} | sort | uniq -u | grep . && exit 1; :
|
| 127 |
+
|
| 128 |
+
# Ensure that all version-controlled test scripts are executable.
|
| 129 |
+
sc_tests_executable:
|
| 130 |
+
@set -o noglob 2>/dev/null || set -f; \
|
| 131 |
+
cd $(srcdir); \
|
| 132 |
+
find_ext="-name '' "`printf -- "-o -name *%s " $(TEST_EXTENSIONS)`;\
|
| 133 |
+
find $(srcdir)/tests/ \( $$find_ext \) \! -perm -u+x -print \
|
| 134 |
+
| { sed "s|^$(srcdir)/||"; git ls-files $(srcdir)/tests/; } \
|
| 135 |
+
| sort | uniq -d \
|
| 136 |
+
| sed -e "s/^/$(ME): Please make test executable: /" | grep . \
|
| 137 |
+
&& exit 1; :
|
| 138 |
+
|
| 139 |
+
# Ensure all gnulib patches apply cleanly
|
| 140 |
+
sc_ensure_gl_diffs_apply_cleanly:
|
| 141 |
+
@find $(srcdir)/gl/ -name '*.diff' | while read p; do \
|
| 142 |
+
patch --fuzz=0 -f -s -d $(srcdir)/gnulib/ -p1 --dry-run < "$$p" >&2 \
|
| 143 |
+
|| { echo "$$p" >&2; echo 'To refresh all gl patches run:' \
|
| 144 |
+
'make refresh-gnulib-patches' >&2; exit 1; } \
|
| 145 |
+
done
|
| 146 |
+
|
| 147 |
+
# Avoid :>file which doesn't propagate errors
|
| 148 |
+
# Also :>file was seen to trigger EXIT trap on cygwin
|
| 149 |
+
sc_prohibit_colon_redirection:
|
| 150 |
+
@cd $(srcdir)/tests && GIT_PAGER= git grep -En ': *>[^>]' \
|
| 151 |
+
&& { echo '$(ME): '":> will hide errors or may trigger EXIT" >&2; \
|
| 152 |
+
exit 1; } \
|
| 153 |
+
|| :
|
| 154 |
+
|
| 155 |
+
# Ensure emit_mandatory_arg_note() is called if required
|
| 156 |
+
sc_ensure_emit_mandatory_arg_note:
|
| 157 |
+
@cd $(srcdir)/src && GIT_PAGER= git \
|
| 158 |
+
grep -l -- '^ *-[^-].*--.*[^[]=' *.c \
|
| 159 |
+
| xargs grep -L emit_mandatory_arg_note | grep . \
|
| 160 |
+
&& { echo '$(ME): '"emit_mandatory_arg_note() missing" 1>&2; \
|
| 161 |
+
exit 1; } || :
|
| 162 |
+
|
| 163 |
+
# Create a list of regular expressions matching the names
|
| 164 |
+
# of files included from system.h. Exclude a couple.
|
| 165 |
+
.re-list:
|
| 166 |
+
@sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
|
| 167 |
+
| grep -Ev 'sys/(param|file)\.h' \
|
| 168 |
+
| sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
|
| 169 |
+
> $@-t
|
| 170 |
+
@mv $@-t $@
|
| 171 |
+
|
| 172 |
+
define gl_trap_
|
| 173 |
+
Exit () { set +e; (exit $$1); exit $$1; }; \
|
| 174 |
+
for sig in 1 2 3 13 15; do \
|
| 175 |
+
eval "trap 'Exit $$(expr $$sig + 128)' $$sig"; \
|
| 176 |
+
done
|
| 177 |
+
endef
|
| 178 |
+
|
| 179 |
+
# Files in src/ should not include directly any of
|
| 180 |
+
# the headers already included via system.h.
|
| 181 |
+
sc_system_h_headers: .re-list
|
| 182 |
+
@if test -f $(srcdir)/src/system.h; then \
|
| 183 |
+
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0; \
|
| 184 |
+
$(gl_trap_); \
|
| 185 |
+
grep -nE -f .re-list \
|
| 186 |
+
$$($(VC_LIST_EXCEPT) | grep -E '^($(srcdir)/)?src/') \
|
| 187 |
+
&& { echo '$(ME): the above are already included via system.h'\
|
| 188 |
+
1>&2; exit 1; } || :; \
|
| 189 |
+
fi
|
| 190 |
+
|
| 191 |
+
# Files in src/ should not use '%s' notation in format strings,
|
| 192 |
+
# i.e., single quotes around %s (or similar) should be avoided.
|
| 193 |
+
sc_prohibit_quotes_notation:
|
| 194 |
+
@cd $(srcdir)/src && GIT_PAGER= git grep -n "\".*[\`']%s'.*\"" *.c \
|
| 195 |
+
&& { echo '$(ME): '"Use quote() to avoid quoted '%s' notation" 1>&2; \
|
| 196 |
+
exit 1; } \
|
| 197 |
+
|| :
|
| 198 |
+
|
| 199 |
+
error_fns = (error|diagnose)
|
| 200 |
+
|
| 201 |
+
# Files in src/ should quote all strings in error() output, so that
|
| 202 |
+
# unexpected input chars like \r etc. don't corrupt the error.
|
| 203 |
+
# In edge cases this can be avoided by putting the format string
|
| 204 |
+
# on a separate line to the arguments, or the arguments in parenthesis.
|
| 205 |
+
sc_error_quotes:
|
| 206 |
+
@cd $(srcdir)/src \
|
| 207 |
+
&& GIT_PAGER= git grep -E -n '$(error_fns) *\(.*%s.*, [^(]*\);$$' \
|
| 208 |
+
*.c | grep -v ', q' \
|
| 209 |
+
&& { echo '$(ME): '"Use quote() for error string arguments" 1>&2; \
|
| 210 |
+
exit 1; } \
|
| 211 |
+
|| :
|
| 212 |
+
|
| 213 |
+
# Files in src/ should quote all file names in error() output
|
| 214 |
+
# using quotef(), to provide quoting only when necessary,
|
| 215 |
+
# but also provide better support for copy and paste when used.
|
| 216 |
+
sc_error_shell_quotes:
|
| 217 |
+
@cd $(srcdir)/src && \
|
| 218 |
+
{ GIT_PAGER= git grep -E \
|
| 219 |
+
'$(error_fns) \(.*%s[:"], .*(name|file)[^"]*\);$$' *.c; \
|
| 220 |
+
GIT_PAGER= git grep -E \
|
| 221 |
+
' quote[ _].*file' *.c; } \
|
| 222 |
+
| grep -Ev '(quotef|q[^ ]*name)' \
|
| 223 |
+
&& { echo '$(ME): '"Use quotef() for colon delimited names" 1>&2; \
|
| 224 |
+
exit 1; } \
|
| 225 |
+
|| :
|
| 226 |
+
|
| 227 |
+
# Files in src/ should quote all file names in error() output
|
| 228 |
+
# using quoteaf() when the name is separated with spaces,
|
| 229 |
+
# to distinguish the file name at issue and
|
| 230 |
+
# to provide better support for copy and paste.
|
| 231 |
+
sc_error_shell_always_quotes:
|
| 232 |
+
@cd $(srcdir)/src && GIT_PAGER= git grep -E \
|
| 233 |
+
'$(error_fns) \(.*[^:] %s[ "].*, .*(name|file)[^"]*\);$$' \
|
| 234 |
+
*.c | grep -Ev '(quoteaf|q[^ ]*name)' \
|
| 235 |
+
&& { echo '$(ME): '"Use quoteaf() for space delimited names" 1>&2; \
|
| 236 |
+
exit 1; } \
|
| 237 |
+
|| :
|
| 238 |
+
@cd $(srcdir)/src && GIT_PAGER= git grep -E -A1 \
|
| 239 |
+
'$(error_fns) \([^%]*[^:] %s[ "]' *.c | grep 'quotef' \
|
| 240 |
+
&& { echo '$(ME): '"Use quoteaf() for space delimited names" 1>&2; \
|
| 241 |
+
exit 1; } \
|
| 242 |
+
|| :
|
| 243 |
+
|
| 244 |
+
# Avoid unstyled quoting to internal slots and thus destined for diagnostics
|
| 245 |
+
# as that can leak unescaped control characters to the output, when using
|
| 246 |
+
# the default "literal" quoting style.
|
| 247 |
+
# Instead use quotef(), or quoteaf() or in edge cases quotearg_n_style_colon().
|
| 248 |
+
# A more general PCRE would be @prohibit='quotearg_.*(?!(style|buffer))'
|
| 249 |
+
sc_prohibit-quotearg:
|
| 250 |
+
@prohibit='quotearg(_n)?(|_colon|_char|_mem) ' \
|
| 251 |
+
in_vc_files='\.c$$' \
|
| 252 |
+
halt='Unstyled diagnostic quoting detected' \
|
| 253 |
+
$(_sc_search_regexp)
|
| 254 |
+
|
| 255 |
+
sc_prohibit-skip:
|
| 256 |
+
@prohibit='\|\| skip ' \
|
| 257 |
+
halt='Use skip_ not skip' \
|
| 258 |
+
$(_sc_search_regexp)
|
| 259 |
+
|
| 260 |
+
sc_sun_os_names:
|
| 261 |
+
@grep -nEi \
|
| 262 |
+
'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
|
| 263 |
+
$$($(VC_LIST_EXCEPT)) && \
|
| 264 |
+
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
|
| 265 |
+
exit 1; } || :
|
| 266 |
+
|
| 267 |
+
# Ensure that the list of programs and author names is accurate.
|
| 268 |
+
# We need a UTF8 locale. If a lack of locale support or a missing
|
| 269 |
+
# translation inhibits printing of UTF-8 names, just skip this test.
|
| 270 |
+
au_dotdot = authors-dotdot
|
| 271 |
+
au_actual = authors-actual
|
| 272 |
+
sc_check-AUTHORS: $(all_programs)
|
| 273 |
+
@locale=en_US.UTF-8; \
|
| 274 |
+
LC_ALL=$$locale ./src/factor --version \
|
| 275 |
+
| grep ' Torbjorn ' > /dev/null \
|
| 276 |
+
&& { echo "$@: skipping this check"; exit 0; }; \
|
| 277 |
+
rm -f $(au_actual) $(au_dotdot); \
|
| 278 |
+
for i in `ls $(all_programs) \
|
| 279 |
+
| sed -e 's,^src/,,' -e 's,$(EXEEXT)$$,,' \
|
| 280 |
+
| sed /libstdbuf/d \
|
| 281 |
+
| $(ASSORT) -u`; do \
|
| 282 |
+
test "$$i" = '[' && continue; \
|
| 283 |
+
exe=$$i; \
|
| 284 |
+
if test "$$i" = install; then \
|
| 285 |
+
exe=ginstall; \
|
| 286 |
+
elif test "$$i" = test; then \
|
| 287 |
+
exe='['; \
|
| 288 |
+
fi; \
|
| 289 |
+
LC_ALL=$$locale ./src/$$exe --version \
|
| 290 |
+
| perl -0 -p -e 's/,\n/, /gm' \
|
| 291 |
+
| sed -n -e '/Written by /{ s//'"$$i"': /;' \
|
| 292 |
+
-e 's/,* and /, /; s/\.$$//; p; }'; \
|
| 293 |
+
done > $(au_actual) && \
|
| 294 |
+
sed -n '/^[^ ][^ ]*:/p' $(srcdir)/AUTHORS > $(au_dotdot) \
|
| 295 |
+
&& diff $(au_actual) $(au_dotdot) \
|
| 296 |
+
&& rm -f $(au_actual) $(au_dotdot)
|
| 297 |
+
|
| 298 |
+
# Ensure the alternative __attribute (keyword) form isn't used as
|
| 299 |
+
# that form is not elided where required. Also ensure that we don't
|
| 300 |
+
# directly use attributes already defined by gnulib.
|
| 301 |
+
# TODO: move the check for _GL... attributes to gnulib.
|
| 302 |
+
sc_prohibit-gl-attributes:
|
| 303 |
+
@prohibit='__attribute |__(unused|pure|const)__' \
|
| 304 |
+
in_vc_files='\.[ch]$$' \
|
| 305 |
+
halt='Use _GL... attribute macros' \
|
| 306 |
+
$(_sc_search_regexp)
|
| 307 |
+
|
| 308 |
+
# Ensure that <attributes.h> macros are used in .c files.
|
| 309 |
+
sc_prohibit-_gl-attributes:
|
| 310 |
+
@prohibit='_GL_ATTRIBUTE' \
|
| 311 |
+
in_vc_files='\.c$$' \
|
| 312 |
+
halt='Use ATTRIBUTE_... instead of _GL_ATTRIBUTE_...' \
|
| 313 |
+
$(_sc_search_regexp)
|
| 314 |
+
|
| 315 |
+
# Prefer the STRUCT_UTMP typedef over struct gl_utmp.
|
| 316 |
+
sc_prohibit-struct-gl_utmp:
|
| 317 |
+
@prohibit='struct gl_utmp' \
|
| 318 |
+
in_vc_files='\.[ch]$$' \
|
| 319 |
+
halt='Use STRUCT_UTMP, not struct gl_utmp' \
|
| 320 |
+
$(_sc_search_regexp)
|
| 321 |
+
|
| 322 |
+
# Prefer the const declaration form, with const following the type
|
| 323 |
+
sc_prohibit-const-char:
|
| 324 |
+
@prohibit='const char \*' \
|
| 325 |
+
in_vc_files='\.[ch]$$' \
|
| 326 |
+
halt='Use char const *, not const char *' \
|
| 327 |
+
$(_sc_search_regexp)
|
| 328 |
+
|
| 329 |
+
# Look for lines longer than 80 characters, except omit:
|
| 330 |
+
# - urls
|
| 331 |
+
# - the fdl.texi file copied from gnulib,
|
| 332 |
+
# - the help2man script copied from upstream,
|
| 333 |
+
# - tests involving long checksum lines, and
|
| 334 |
+
# - the 'pr' test cases.
|
| 335 |
+
FILTER_LONG_LINES = \
|
| 336 |
+
\|^[^:]*NEWS:.*https\{,1\}://| d; \
|
| 337 |
+
\|^[^:]*doc/fdl.texi:| d; \
|
| 338 |
+
\|^[^:]*man/help2man:| d; \
|
| 339 |
+
\|^[^:]*tests/cksum/sha[0-9]*sum.*\.pl[-:]| d; \
|
| 340 |
+
\|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };
|
| 341 |
+
sc_long_lines:
|
| 342 |
+
@wc -L /dev/null >/dev/null 2>/dev/null \
|
| 343 |
+
|| { echo "$@: skipping: wc -L not supported"; exit 0; }; \
|
| 344 |
+
sed -r 1q /dev/null 2>/dev/null \
|
| 345 |
+
|| { echo "$@: skipping: sed -r not supported"; exit 0; }; \
|
| 346 |
+
files=$$($(VC_LIST_EXCEPT) | xargs wc -L | sed -rn '/ total$$/d;\
|
| 347 |
+
s/^ *(8[1-9]|9[0-9]|[0-9]{3,}) //p'); \
|
| 348 |
+
halt='line(s) with more than 80 characters; reindent'; \
|
| 349 |
+
for file in $$files; do \
|
| 350 |
+
expand $$file | grep -nE '^.{80}.' | \
|
| 351 |
+
sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)'; \
|
| 352 |
+
done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
|
| 353 |
+
|
| 354 |
+
sc_standard_outputs: $(ALL_MANS)
|
| 355 |
+
@grep -E 'std(in|out|err)' man/*.1 doc/*.texi \
|
| 356 |
+
&& { echo 1>&2 '$@: use "standard ....." in user docs'; exit 1; } || :
|
| 357 |
+
@grep -E '[Ss]tandard (in|out|err)([^op]|$$)' man/*.1 doc/*.texi \
|
| 358 |
+
&& { echo 1>&2 '$@: use "standard ..put" in user docs'; exit 1; } || :
|
| 359 |
+
@grep -E '_\("[^"]*std(in|out|err)' src/*.c \
|
| 360 |
+
&& { echo 1>&2 '$@: use "standard ..put" in messages'; exit 1; } || :
|
| 361 |
+
|
| 362 |
+
# Option descriptions should not start with a capital letter.
|
| 363 |
+
# One could grep source directly as follows:
|
| 364 |
+
# grep -E " {2,6}-.*[^.] [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
|
| 365 |
+
# but that would miss descriptions not on the same line as the -option.
|
| 366 |
+
sc_option_desc_uppercase: $(ALL_MANS)
|
| 367 |
+
@grep '^\\fB\\-' -A1 man/*.1 | LC_ALL=C grep '\.1.[A-Z][a-z]' \
|
| 368 |
+
&& { echo 1>&2 '$@: found initial capitals in --help'; exit 1; } || :
|
| 369 |
+
|
| 370 |
+
# '--' should not be treated as '–' (U+2013 EN DASH) in long option names.
|
| 371 |
+
sc_texi_long_option_escaped: doc/coreutils.info
|
| 372 |
+
@grep ' –[^ ]' '$<' \
|
| 373 |
+
&& { echo 1>&2 '$@: found unquoted --long-option'; exit 1; } || :
|
| 374 |
+
|
| 375 |
+
# Ensure all man/*.[1x] files are present.
|
| 376 |
+
sc_man_file_correlation: check-x-vs-1 check-programs-vs-x
|
| 377 |
+
|
| 378 |
+
# Ensure that for each .x file in the 'man/' subdirectory, there is a
|
| 379 |
+
# corresponding .1 file in the definition of $(EXTRA_MANS).
|
| 380 |
+
# But since that expansion usually lacks programs like arch and hostname,
|
| 381 |
+
# add them here manually.
|
| 382 |
+
.PHONY: check-x-vs-1
|
| 383 |
+
check-x-vs-1:
|
| 384 |
+
@PATH=./src$(PATH_SEPARATOR)$$PATH; export PATH; \
|
| 385 |
+
t=$@-t; \
|
| 386 |
+
(cd $(srcdir)/man && ls -1 *.x) \
|
| 387 |
+
| sed 's/\.x$$//' | $(ASSORT) > $$t; \
|
| 388 |
+
(echo $(patsubst man/%,%,$(ALL_MANS)) \
|
| 389 |
+
| tr -s ' ' '\n' | sed 's/\.1$$//') \
|
| 390 |
+
| $(ASSORT) -u | diff - $$t || { rm $$t; exit 1; }; \
|
| 391 |
+
rm $$t
|
| 392 |
+
|
| 393 |
+
# Ensure that non-trivial .x files in the 'man/' subdirectory,
|
| 394 |
+
# i.e., files exceeding a line count of 20 or a byte count of 1000,
|
| 395 |
+
# contain a Copyright notice.
|
| 396 |
+
.PHONY: sc_man_check_x_copyright
|
| 397 |
+
sc_man_check_x_copyright:
|
| 398 |
+
@status=0; \
|
| 399 |
+
cd $(srcdir) && wc -cl man/*.x | head -n-1 \
|
| 400 |
+
| awk '$$1 >= 20 || $$2 >= 1000 {print $$3}' \
|
| 401 |
+
| xargs grep -L 'Copyright .* Free Software Foundation' \
|
| 402 |
+
| grep . \
|
| 403 |
+
&& { echo 1>&2 '$@: exceeding file size/line count limit' \
|
| 404 |
+
'- please add a copyright note'; status=1; }; \
|
| 405 |
+
exit $$status
|
| 406 |
+
|
| 407 |
+
# Writing a portable rule to generate a manpage like '[.1' would be
|
| 408 |
+
# a nightmare, so filter that out.
|
| 409 |
+
all-progs-but-lbracket = $(filter-out [,$(patsubst src/%,%,$(all_programs)))
|
| 410 |
+
|
| 411 |
+
# Ensure that for each coreutils program there is a corresponding
|
| 412 |
+
# '.x' file in the 'man/' subdirectory.
|
| 413 |
+
.PHONY: check-programs-vs-x
|
| 414 |
+
check-programs-vs-x:
|
| 415 |
+
@status=0; \
|
| 416 |
+
for p in dummy $(all-progs-but-lbracket); do \
|
| 417 |
+
case $$p in *.so) continue;; esac; \
|
| 418 |
+
test $$p = dummy && continue; \
|
| 419 |
+
test $$p = ginstall && p=install || : ; \
|
| 420 |
+
test -f $(srcdir)/man/$$p.x \
|
| 421 |
+
|| { echo missing $$p.x 1>&2; status=1; }; \
|
| 422 |
+
done; \
|
| 423 |
+
exit $$status
|
| 424 |
+
|
| 425 |
+
# Ensure we can check out on case insensitive file systems
|
| 426 |
+
sc_case_insensitive_file_names: src/uniq
|
| 427 |
+
@git -C $(srcdir) ls-files | sort -f | src/uniq -Di | grep . && \
|
| 428 |
+
{ echo "$(ME): the above file(s) conflict on case insensitive" \
|
| 429 |
+
" file systems" 1>&2; exit 1; } || :
|
| 430 |
+
|
| 431 |
+
# Ensure that the end of each release's section is marked by two empty lines.
|
| 432 |
+
sc_NEWS_two_empty_lines:
|
| 433 |
+
@sed -n 4,/Noteworthy/p $(srcdir)/NEWS \
|
| 434 |
+
| perl -n0e '/(^|\n)\n\n\* Noteworthy/ or exit 1' \
|
| 435 |
+
|| { echo '$(ME): use two empty lines to separate NEWS sections' \
|
| 436 |
+
1>&2; exit 1; } || :
|
| 437 |
+
|
| 438 |
+
# With split lines, don't leave an operator at end of line.
|
| 439 |
+
# Instead, put it on the following line, where it is more apparent.
|
| 440 |
+
# Don't bother checking for "*" at end of line, since it provokes
|
| 441 |
+
# far too many false positives, matching constructs like "TYPE *".
|
| 442 |
+
# Similarly, omit "=" (initializers).
|
| 443 |
+
binop_re_ ?= [-/+^!<>]|[-/+*^!<>=]=|&&?|\|\|?|<<=?|>>=?
|
| 444 |
+
sc_prohibit_operator_at_end_of_line:
|
| 445 |
+
@prohibit='. ($(binop_re_))$$' \
|
| 446 |
+
in_vc_files='\.[chly]$$' \
|
| 447 |
+
halt='found operator at end of line' \
|
| 448 |
+
$(_sc_search_regexp)
|
| 449 |
+
|
| 450 |
+
# Partial substitutes for GNU extensions \< and \> in regexps.
|
| 451 |
+
begword = (^|[^_[:alnum:]])
|
| 452 |
+
endword = ($$|[^_[:alnum:]])
|
| 453 |
+
|
| 454 |
+
# Don't use address of "stat" or "lstat" functions
|
| 455 |
+
sc_prohibit_stat_macro_address:
|
| 456 |
+
@prohibit='$(begword)l?stat '':|&l?stat$(endword)' \
|
| 457 |
+
halt='stat() and lstat() may be function-like macros' \
|
| 458 |
+
$(_sc_search_regexp)
|
| 459 |
+
|
| 460 |
+
# Ensure that date's --help output stays in sync with the info
|
| 461 |
+
# documentation for GNU strftime. The only exception is %N and %q,
|
| 462 |
+
# which date accepts but GNU strftime does not.
|
| 463 |
+
#
|
| 464 |
+
# "info foo" fails with error, but not "info foo >/dev/null".
|
| 465 |
+
extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
|
| 466 |
+
sc_strftime_check:
|
| 467 |
+
@if test -f $(srcdir)/src/date.c; then \
|
| 468 |
+
if info libc date calendar format 2>/dev/null | \
|
| 469 |
+
grep "^ *['\`]%.'$$" >$@-tmp; then \
|
| 470 |
+
{ echo N; echo q; $(extract_char) $@-tmp; }| sort \
|
| 471 |
+
>$@-info; \
|
| 472 |
+
grep '^ %. ' $(srcdir)/src/date.c | sort \
|
| 473 |
+
| $(extract_char) > $@-src; \
|
| 474 |
+
diff -u $@-src $@-info || exit 1; \
|
| 475 |
+
else \
|
| 476 |
+
echo '$(ME): skipping $@: libc info not installed' 1>&2; \
|
| 477 |
+
fi; \
|
| 478 |
+
rm -f $@-info $@-src $@-tmp; \
|
| 479 |
+
fi
|
| 480 |
+
|
| 481 |
+
# Indent only with spaces.
|
| 482 |
+
sc_prohibit_tab_based_indentation:
|
| 483 |
+
@prohibit='^ * ' \
|
| 484 |
+
halt='TAB in indentation; use only spaces' \
|
| 485 |
+
$(_sc_search_regexp)
|
| 486 |
+
|
| 487 |
+
# Enforce lowercase 'e' in "I.e.".
|
| 488 |
+
sc_prohibit_uppercase_id_est:
|
| 489 |
+
@prohibit='I\.E\.' \
|
| 490 |
+
halt='Uppercase "Id Est" abbreviation; use "I.e.," instead' \
|
| 491 |
+
$(_sc_search_regexp)
|
| 492 |
+
|
| 493 |
+
# Enforce double-space before "I.e." at the beginning of a sentence.
|
| 494 |
+
sc_ensure_dblspace_after_dot_before_id_est:
|
| 495 |
+
@prohibit='\. I\.e\.' \
|
| 496 |
+
halt='Single space after dot before "i.e."; use ". i.e." instead' \
|
| 497 |
+
$(_sc_search_regexp)
|
| 498 |
+
|
| 499 |
+
# Enforce comma after "i.e." (at least before a blank or at EOL).
|
| 500 |
+
sc_ensure_comma_after_id_est:
|
| 501 |
+
@prohibit='[Ii]\.e\.( |$$)' \
|
| 502 |
+
halt='Missing comma after "i.e."; use "i.e.," instead' \
|
| 503 |
+
$(_sc_search_regexp)
|
| 504 |
+
|
| 505 |
+
# The SEE ALSO section of a man page should not be terminated with
|
| 506 |
+
# a period. Check the first line after each "SEE ALSO" line in man/*.x:
|
| 507 |
+
sc_prohibit_man_see_also_period:
|
| 508 |
+
@grep -nB1 '\.$$' $$($(VC_LIST_EXCEPT) | grep 'man/.*\.x$$') \
|
| 509 |
+
| grep -A1 -e '-\[SEE ALSO]' | grep '\.$$' && \
|
| 510 |
+
{ echo '$(ME): do not end "SEE ALSO" section with a period' \
|
| 511 |
+
1>&2; exit 1; } || :
|
| 512 |
+
|
| 513 |
+
sc_prohibit_exit_write_error:
|
| 514 |
+
@prohibit='error.*EXIT_FAILURE.*write error' \
|
| 515 |
+
in_vc_files='\.c$$' \
|
| 516 |
+
halt='Use write_error() instead' \
|
| 517 |
+
$(_sc_search_regexp)
|
| 518 |
+
|
| 519 |
+
sc_prohibit_NULL:
|
| 520 |
+
@prohibit='$(begword)NULL$(endword)' \
|
| 521 |
+
in_vc_files='\.[ch]$$' \
|
| 522 |
+
halt='use nullptr instead' \
|
| 523 |
+
$(_sc_search_regexp)
|
| 524 |
+
|
| 525 |
+
sc_prohibit_bare_set:
|
| 526 |
+
@prohibit='^ *set [`$$]' \
|
| 527 |
+
in_vc_files='\.sh$$' \
|
| 528 |
+
halt='use set -- $$args instead of set $$args' \
|
| 529 |
+
$(_sc_search_regexp)
|
| 530 |
+
|
| 531 |
+
# Don't use "indent-tabs-mode: nil" anymore. No longer needed.
|
| 532 |
+
sc_prohibit_emacs__indent_tabs_mode__setting:
|
| 533 |
+
@prohibit='^( *[*#] *)?indent-tabs-mode:' \
|
| 534 |
+
halt='use of emacs indent-tabs-mode: setting' \
|
| 535 |
+
$(_sc_search_regexp)
|
| 536 |
+
|
| 537 |
+
# Ensure that tests don't include a redundant fail=0.
|
| 538 |
+
sc_prohibit_fail_0:
|
| 539 |
+
@prohibit='$(begword)fail=0$(endword)' \
|
| 540 |
+
halt='fail=0 initialization' \
|
| 541 |
+
$(_sc_search_regexp)
|
| 542 |
+
|
| 543 |
+
# Ensure that tests don't use `cmd ... && fail=1` as that hides crashes.
|
| 544 |
+
# The "exclude" expression allows common idioms like `test ... && fail=1`
|
| 545 |
+
# and the 2>... portion allows commands that redirect stderr and so probably
|
| 546 |
+
# independently check its contents and thus detect any crash messages.
|
| 547 |
+
sc_prohibit_and_fail_1:
|
| 548 |
+
@prohibit='&& fail=1' \
|
| 549 |
+
exclude='(returns_|stat|kill|test |EGREP|grep|compare|2> *[^/])' \
|
| 550 |
+
halt='&& fail=1 detected. Please use: returns_ 1 ... || fail=1' \
|
| 551 |
+
in_vc_files='^tests/' \
|
| 552 |
+
$(_sc_search_regexp)
|
| 553 |
+
|
| 554 |
+
# Ensure that tests don't use `cmd ... || fail` as that's a noop.
|
| 555 |
+
sc_prohibit_or_fail:
|
| 556 |
+
@prohibit='\|\| fail$$' \
|
| 557 |
+
exclude=':#' \
|
| 558 |
+
halt='|| fail detected. Please use: || fail=1' \
|
| 559 |
+
in_vc_files='^tests/' \
|
| 560 |
+
$(_sc_search_regexp)
|
| 561 |
+
|
| 562 |
+
# Ensure that env vars are not passed through returns_ as
|
| 563 |
+
# that was seen to fail on FreeBSD /bin/sh at least
|
| 564 |
+
sc_prohibit_env_returns:
|
| 565 |
+
@prohibit='=[^ ]* returns_ ' \
|
| 566 |
+
exclude='_ returns_ ' \
|
| 567 |
+
halt='Passing env vars to returns_ is non portable' \
|
| 568 |
+
in_vc_files='^tests/' \
|
| 569 |
+
$(_sc_search_regexp)
|
| 570 |
+
|
| 571 |
+
# The mode part of a setfacl -m option argument must be three bytes long.
|
| 572 |
+
# I.e., an argument of user:bin:rw or user:bin:r will make Solaris 10's
|
| 573 |
+
# setfacl reject it with: "Unrecognized character found in mode field".
|
| 574 |
+
# Use hyphens to give it a length of 3: "...:rw-" or "...:r--".
|
| 575 |
+
sc_prohibit_short_facl_mode_spec:
|
| 576 |
+
@prohibit='$(begword)setfacl .*-m.*:.*:[rwx-]{1,2} ' \
|
| 577 |
+
halt='setfacl mode string length < 3; extend with hyphen(s)' \
|
| 578 |
+
$(_sc_search_regexp)
|
| 579 |
+
|
| 580 |
+
# Ensure that "stdio--.h" is used where appropriate.
|
| 581 |
+
sc_require_stdio_safer:
|
| 582 |
+
@if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then \
|
| 583 |
+
files=$$(grep -El '$(begword)freopen ?\(' $$($(VC_LIST_EXCEPT)\
|
| 584 |
+
| grep '\.[ch]$$')); \
|
| 585 |
+
test -n "$$files" && grep -LE 'include "stdio--.h"' $$files \
|
| 586 |
+
| grep . && \
|
| 587 |
+
{ echo '$(ME): the above files should use "stdio--.h"' \
|
| 588 |
+
1>&2; exit 1; } || :; \
|
| 589 |
+
else :; \
|
| 590 |
+
fi
|
| 591 |
+
|
| 592 |
+
# Ensure that "stdlib--.h" is used where appropriate.
|
| 593 |
+
sc_require_stdlib_safer:
|
| 594 |
+
@if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then \
|
| 595 |
+
files=$$(grep -El '$(begword)mkstemp ?\(' $$($(VC_LIST_EXCEPT)\
|
| 596 |
+
| grep '\.[ch]$$')); \
|
| 597 |
+
test -n "$$files" && grep -LE 'include "stdlib--.h"' $$files \
|
| 598 |
+
| grep . && \
|
| 599 |
+
{ echo '$(ME): the above files should use "stdlib--.h"' \
|
| 600 |
+
1>&2; exit 1; } || :; \
|
| 601 |
+
else :; \
|
| 602 |
+
fi
|
| 603 |
+
|
| 604 |
+
sc_prohibit_perl_hash_quotes:
|
| 605 |
+
@prohibit="\{'[A-Z_]+' *[=}]" \
|
| 606 |
+
halt="in Perl code, write \$$hash{KEY}, not \$$hash{'K''EY'}" \
|
| 607 |
+
$(_sc_search_regexp)
|
| 608 |
+
|
| 609 |
+
# Prefer xnanosleep over other less-precise sleep methods
|
| 610 |
+
sc_prohibit_sleep:
|
| 611 |
+
@prohibit='$(begword)(nano|u)?sleep \(' \
|
| 612 |
+
halt='prefer xnanosleep over other sleep interfaces' \
|
| 613 |
+
$(_sc_search_regexp)
|
| 614 |
+
|
| 615 |
+
# Use print_ver_ (from init.cfg), not open-coded $VERBOSE check.
|
| 616 |
+
sc_prohibit_verbose_version:
|
| 617 |
+
@prohibit='test "\$$VERBOSE" = yes && .* --version' \
|
| 618 |
+
halt='use the print_ver_ function instead...' \
|
| 619 |
+
$(_sc_search_regexp)
|
| 620 |
+
|
| 621 |
+
# Enforce print_ver_ tracking of dependencies
|
| 622 |
+
# Each coreutils specific program a test requires
|
| 623 |
+
# should be tagged by calling through env(1).
|
| 624 |
+
sc_env_test_dependencies:
|
| 625 |
+
@cd $(top_srcdir) && GIT_PAGER= git grep -E \
|
| 626 |
+
"env ($$(build-aux/gen-lists-of-programs.sh --list-progs | \
|
| 627 |
+
grep -vF '[' |paste -d'|' -s))" tests | \
|
| 628 |
+
sed "s/\([^:]\):.*env \([^)' ]*\).*/\1 \2/" | uniq | \
|
| 629 |
+
while read test prog; do \
|
| 630 |
+
printf '%s' $$test | grep '\.pl$$' >/dev/null && continue; \
|
| 631 |
+
grep "print_ver_.* $$prog" $$test >/dev/null \
|
| 632 |
+
|| echo $$test should call: print_ver_ $$prog; \
|
| 633 |
+
done | grep . && exit 1 || :
|
| 634 |
+
|
| 635 |
+
# Use framework_failure_, not the old name without the trailing underscore.
|
| 636 |
+
sc_prohibit_framework_failure:
|
| 637 |
+
@prohibit='$(begword)framework_''failure$(endword)' \
|
| 638 |
+
halt='use framework_failure_ instead' \
|
| 639 |
+
$(_sc_search_regexp)
|
| 640 |
+
|
| 641 |
+
# Prohibit the use of `...` in tests/. Use $(...) instead.
|
| 642 |
+
sc_prohibit_test_backticks:
|
| 643 |
+
@prohibit='`' in_vc_files='^tests/' \
|
| 644 |
+
halt='use $$(...), not `...` in tests/' \
|
| 645 |
+
$(_sc_search_regexp)
|
| 646 |
+
|
| 647 |
+
# Ensure that compare is used to check empty files
|
| 648 |
+
# so that the unexpected contents are displayed
|
| 649 |
+
sc_prohibit_test_empty:
|
| 650 |
+
@prohibit='test -s.*&&' in_vc_files='^tests/' \
|
| 651 |
+
halt='use `compare /dev/null ...`, not `test -s ...` in tests/' \
|
| 652 |
+
$(_sc_search_regexp)
|
| 653 |
+
|
| 654 |
+
# Programs like sort, ls, expr use PROG_FAILURE in place of EXIT_FAILURE.
|
| 655 |
+
# Others, use the EXIT_CANCELED, EXIT_ENOENT, etc. macros defined in system.h.
|
| 656 |
+
# In those programs, ensure that EXIT_FAILURE is not used by mistake.
|
| 657 |
+
sc_some_programs_must_avoid_exit_failure:
|
| 658 |
+
@cd $(srcdir) \
|
| 659 |
+
&& grep -nw EXIT_FAILURE \
|
| 660 |
+
$$(git grep -El '[^T]_FAILURE|EXIT_CANCELED' src/) \
|
| 661 |
+
| grep -v '^src/system\.h:' \
|
| 662 |
+
| grep -vE '= EXIT_FAILURE|return .* \?' | grep . \
|
| 663 |
+
&& { echo '$(ME): do not use EXIT_FAILURE in the above' \
|
| 664 |
+
1>&2; exit 1; } || :
|
| 665 |
+
|
| 666 |
+
# Ensure that tests call the get_min_ulimit_v_ function if using ulimit -v
|
| 667 |
+
sc_prohibit_test_ulimit_without_require_:
|
| 668 |
+
@(git -C $(srcdir) grep -l get_min_ulimit_v_ tests; \
|
| 669 |
+
git -C $(srcdir) grep -l 'ulimit -v' tests) \
|
| 670 |
+
| sort | uniq -u | grep . && { echo "$(ME): the above test(s)"\
|
| 671 |
+
" should match get_min_ulimit_v_ with ulimit -v" 1>&2; exit 1; } || :
|
| 672 |
+
|
| 673 |
+
# Ensure that tests call the cleanup_ function if using background processes
|
| 674 |
+
sc_prohibit_test_background_without_cleanup_:
|
| 675 |
+
@(git -C $(srcdir) grep -El '( &$$|&[^&]*=\$$!)' tests; \
|
| 676 |
+
git -C $(srcdir) grep -l 'cleanup_()' tests | sed p) \
|
| 677 |
+
| sort | uniq -u | grep . && { echo "$(ME): the above test(s)"\
|
| 678 |
+
" should use cleanup_ for background processes" 1>&2; exit 1; } || :
|
| 679 |
+
|
| 680 |
+
# Ensure that tests call the print_ver_ function for programs which are
|
| 681 |
+
# actually used in that test.
|
| 682 |
+
sc_prohibit_test_calls_print_ver_with_irrelevant_argument:
|
| 683 |
+
@git -C $(srcdir) grep -w print_ver_ tests \
|
| 684 |
+
| sed 's#:print_ver_##' \
|
| 685 |
+
| { fail=0; \
|
| 686 |
+
while read file name; do \
|
| 687 |
+
for i in $$name; do \
|
| 688 |
+
case "$$i" in install) i=ginstall;; esac; \
|
| 689 |
+
grep -w "$$i" $$file|grep -vw print_ver_|grep . >/dev/null \
|
| 690 |
+
|| { fail=1; \
|
| 691 |
+
echo "*** Test: $$file, offending: $$i." 1>&2; };\
|
| 692 |
+
done; \
|
| 693 |
+
done; \
|
| 694 |
+
test $$fail = 0 || exit 1; \
|
| 695 |
+
} || { echo "$(ME): the above test(s) call print_ver_ for" \
|
| 696 |
+
"program(s) they don't use" 1>&2; exit 1; }
|
| 697 |
+
|
| 698 |
+
# Exempt the contents of any usage function from the following.
|
| 699 |
+
_continued_string_col_1 = \
|
| 700 |
+
s/^usage .*?\n}//ms;/\\\n\w/ and print ("$$ARGV\n"),$$e=1;END{$$e||=0;exit $$e}
|
| 701 |
+
# Ding any source file that has a continued string with an alphabetic in the
|
| 702 |
+
# first column of the following line. We prohibit them because they usually
|
| 703 |
+
# trigger false positives in tools that try to map an arbitrary line number
|
| 704 |
+
# to the enclosing function name. Of course, very many strings do precisely
|
| 705 |
+
# this, *when they are part of the usage function*. That is why we exempt
|
| 706 |
+
# the contents of any function named "usage".
|
| 707 |
+
sc_prohibit_continued_string_alpha_in_column_1:
|
| 708 |
+
@perl -0777 -ne '$(_continued_string_col_1)' \
|
| 709 |
+
$$($(VC_LIST_EXCEPT) | grep '\.[ch]$$') \
|
| 710 |
+
|| { echo '$(ME): continued string with word in first column' \
|
| 711 |
+
1>&2; exit 1; } || :
|
| 712 |
+
# Use this to list offending lines:
|
| 713 |
+
# git ls-files |grep '\.[ch]$' | xargs \
|
| 714 |
+
# perl -n -0777 -e 's/^usage.*?\n}//ms;/\\\n\w/ and print "$ARGV\n"' \
|
| 715 |
+
# | xargs grep -A1 '\\$'|grep '\.[ch][:-][_a-zA-Z]'
|
| 716 |
+
|
| 717 |
+
|
| 718 |
+
###########################################################
|
| 719 |
+
_p0 = \([^"'/]\|"\([^\"]\|[\].\)*"\|'\([^\']\|[\].\)*'
|
| 720 |
+
_pre = $(_p0)\|[/][^"'/*]\|[/]"\([^\"]\|[\].\)*"\|[/]'\([^\']\|[\].\)*'\)*
|
| 721 |
+
_pre_anchored = ^\($(_pre)\)
|
| 722 |
+
_comment_and_close = [^*]\|[*][^/*]\)*[*][*]*/
|
| 723 |
+
# help font-lock mode: '
|
| 724 |
+
|
| 725 |
+
# A sed expression that removes ANSI C and ISO C99 comments.
|
| 726 |
+
# Derived from the one in GNU gettext's 'moopp' preprocessor.
|
| 727 |
+
_sed_remove_comments = \
|
| 728 |
+
/[/][/*]/{ \
|
| 729 |
+
ta; \
|
| 730 |
+
:a; \
|
| 731 |
+
s,$(_pre_anchored)//.*,\1,; \
|
| 732 |
+
te; \
|
| 733 |
+
s,$(_pre_anchored)/[*]\($(_comment_and_close),\1 ,; \
|
| 734 |
+
ta; \
|
| 735 |
+
/^$(_pre)[/][*]/{ \
|
| 736 |
+
s,$(_pre_anchored)/[*].*,\1 ,; \
|
| 737 |
+
tu; \
|
| 738 |
+
:u; \
|
| 739 |
+
n; \
|
| 740 |
+
s,^\($(_comment_and_close),,; \
|
| 741 |
+
tv; \
|
| 742 |
+
s,^.*$$,,; \
|
| 743 |
+
bu; \
|
| 744 |
+
:v; \
|
| 745 |
+
}; \
|
| 746 |
+
:e; \
|
| 747 |
+
}
|
| 748 |
+
# Quote all single quotes.
|
| 749 |
+
_sed_rm_comments_q = $(subst ','\'',$(_sed_remove_comments))
|
| 750 |
+
# help font-lock mode: '
|
| 751 |
+
|
| 752 |
+
_space_before_paren_exempt =? \\n\\$$
|
| 753 |
+
_space_before_paren_exempt = \
|
| 754 |
+
(^ *\#|\\n\\$$|%s\(to %s|(date|group|character)\(s\))
|
| 755 |
+
# Ensure that there is a space before each open parenthesis in C code.
|
| 756 |
+
sc_space_before_open_paren:
|
| 757 |
+
@if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then \
|
| 758 |
+
fail=0; \
|
| 759 |
+
for c in $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); do \
|
| 760 |
+
sed '$(_sed_rm_comments_q)' $$c 2>/dev/null \
|
| 761 |
+
| grep -i '[[:alnum:]](' \
|
| 762 |
+
| grep -vE '$(_space_before_paren_exempt)' \
|
| 763 |
+
| grep . && { fail=1; echo "*** $$c"; }; \
|
| 764 |
+
done; \
|
| 765 |
+
test $$fail = 1 && \
|
| 766 |
+
{ echo '$(ME): the above files lack a space-before-open-paren' \
|
| 767 |
+
1>&2; exit 1; } || :; \
|
| 768 |
+
else :; \
|
| 769 |
+
fi
|
| 770 |
+
|
| 771 |
+
# Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
|
| 772 |
+
# Use STREQ_LEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
|
| 773 |
+
sc_prohibit_strncmp:
|
| 774 |
+
@prohibit='^[^#].*str''ncmp *\(' \
|
| 775 |
+
halt='use STREQ_LEN or STRPREFIX instead of str''ncmp' \
|
| 776 |
+
$(_sc_search_regexp)
|
| 777 |
+
|
| 778 |
+
# Enforce recommended preprocessor indentation style.
|
| 779 |
+
sc_preprocessor_indentation:
|
| 780 |
+
@if cppi --version >/dev/null 2>&1; then \
|
| 781 |
+
$(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c \
|
| 782 |
+
|| { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
|
| 783 |
+
exit 1; }; \
|
| 784 |
+
else \
|
| 785 |
+
echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
|
| 786 |
+
fi
|
| 787 |
+
|
| 788 |
+
# THANKS.in is a list of name/email pairs for people who are mentioned in
|
| 789 |
+
# commit logs (and generated ChangeLog), but who are not also listed as an
|
| 790 |
+
# author of a commit. Name/email pairs of commit authors are automatically
|
| 791 |
+
# extracted from the repository. As a very minor factorization, when
|
| 792 |
+
# someone who was initially listed only in THANKS.in later authors a commit,
|
| 793 |
+
# this rule detects that their pair may now be removed from THANKS.in.
|
| 794 |
+
sc_THANKS_in_duplicates:
|
| 795 |
+
@{ git -C $(srcdir) log --pretty=format:%aN | sort -u; \
|
| 796 |
+
cut -b-36 $(srcdir)/THANKS.in \
|
| 797 |
+
| sed '/^$$/,/^$$/!d;/^$$/d;s/ *$$//'; } \
|
| 798 |
+
| sort | uniq -d | grep . \
|
| 799 |
+
&& { echo '$(ME): remove the above names from THANKS.in' \
|
| 800 |
+
1>&2; exit 1; } || :
|
| 801 |
+
|
| 802 |
+
# Ensure the contributor list stays sorted. However, if the system's
|
| 803 |
+
# en_US.UTF-8 locale data is erroneous, give a diagnostic and skip
|
| 804 |
+
# this test. This affects OS X, up to at least 10.11.6.
|
| 805 |
+
# Use our sort as other implementations may result in a different order.
|
| 806 |
+
sc_THANKS_in_sorted:
|
| 807 |
+
@printf 'a\n.b\n'|LC_ALL=en_US.UTF-8 src/sort -c 2> /dev/null \
|
| 808 |
+
&& { \
|
| 809 |
+
sed '/^$$/,/^$$/!d;/^$$/d' $(srcdir)/THANKS.in > $@.1 && \
|
| 810 |
+
LC_ALL=en_US.UTF-8 src/sort -f -k1,1 $@.1 > $@.2 && \
|
| 811 |
+
diff -u $@.1 $@.2; diff=$$?; \
|
| 812 |
+
rm -f $@.1 $@.2; \
|
| 813 |
+
test "$$diff" = 0 \
|
| 814 |
+
|| { echo '$(ME): THANKS.in is unsorted' 1>&2; exit 1; }; \
|
| 815 |
+
} \
|
| 816 |
+
|| { echo '$(ME): this system has erroneous locale data;' \
|
| 817 |
+
'skipping $@' 1>&2; }
|
| 818 |
+
|
| 819 |
+
# Look for developer diagnostics that are marked for translation.
|
| 820 |
+
# This won't find any for which devmsg's format string is on a separate line.
|
| 821 |
+
sc_marked_devdiagnostics:
|
| 822 |
+
@prohibit='$(begword)devmsg *\(.*_\(' \
|
| 823 |
+
halt='found marked developer diagnostic(s)' \
|
| 824 |
+
$(_sc_search_regexp)
|
| 825 |
+
|
| 826 |
+
# Ensure we keep hex constants as 4 or 8 bytes for consistency
|
| 827 |
+
# and so that make src/fs-magic-compare works consistently
|
| 828 |
+
sc_fs-magic-compare:
|
| 829 |
+
@sed -n 's|.*/\* \(0x[0-9A-Fa-f]\{1,\}\) .*\*/|\1|p' \
|
| 830 |
+
$(srcdir)/src/stat.c | grep -Ev '^0x([0-9A-F]{4}){1,2}$$' \
|
| 831 |
+
&& { echo '$(ME): Constants in src/stat.c should be 4 or 8' \
|
| 832 |
+
'upper-case chars' 1>&2; exit 1; } || :
|
| 833 |
+
|
| 834 |
+
# Ensure gnulib generated files are ignored
|
| 835 |
+
# TODO: Perhaps augment gnulib-tool to do this in lib/.gitignore?
|
| 836 |
+
sc_gitignore_missing:
|
| 837 |
+
@{ sed -n '/^\/lib\/.*\.h$$/{p;p}' $(srcdir)/.gitignore; \
|
| 838 |
+
find lib -name '*.in*' ! -name '*~' ! -name 'sys_*' | \
|
| 839 |
+
sed 's|^|/|; s|_\(.*in\.h\)|/\1|; s/\.in//' | \
|
| 840 |
+
sed 's|/fts\.h$$|/fts_.h|'; } | \
|
| 841 |
+
sort | uniq -u | grep . && { echo '$(ME): Add above' \
|
| 842 |
+
'entries to .gitignore' >&2; exit 1; } || :
|
| 843 |
+
|
| 844 |
+
# Flag redundant entries in .gitignore
|
| 845 |
+
# Disabled for now as too aggressive flagging
|
| 846 |
+
# entries like /lib/arg-nonnull.h
|
| 847 |
+
#sc_gitignore_redundant:
|
| 848 |
+
# @{ grep ^/lib $(srcdir)/.gitignore; \
|
| 849 |
+
# sed 's|^|/lib|' $(srcdir)/lib/.gitignore; } | \
|
| 850 |
+
# sort | uniq -d | grep . && { echo '$(ME): Remove above' \
|
| 851 |
+
# 'entries from .gitignore' >&2; exit 1; } || :
|
| 852 |
+
|
| 853 |
+
# Ensure gl/ files are distributed
|
| 854 |
+
sc_gldist_missing:
|
| 855 |
+
@cd $(srcdir); \
|
| 856 |
+
grep '^gl/' gl/local.mk > $@.a; \
|
| 857 |
+
find gl '(' -name Makefile.am ')' -prune -o -type f \
|
| 858 |
+
'!' '(' -name '*.orig' -or -name '*~' -or \
|
| 859 |
+
-name 'ChangeLog.*' ')' -printf '%p\n' | \
|
| 860 |
+
LC_ALL=C sort | tr '\012' @ | sed 's/@$$/%/;s/@/ \\@/g' | \
|
| 861 |
+
tr @% '\012\012' > $@.e; \
|
| 862 |
+
diff -u $@.a $@.e; diff=$$?; \
|
| 863 |
+
rm -f $@.a $@.e; \
|
| 864 |
+
test "$$diff" = 0 \
|
| 865 |
+
|| { echo '$(ME): Inconsistent EXTRA_DIST in gl/local.mk'>&2; \
|
| 866 |
+
exit 1; }
|
| 867 |
+
|
| 868 |
+
sc_prohibit-form-feed:
|
| 869 |
+
@prohibit=$$'\f' \
|
| 870 |
+
in_vc_files='\.[chly]$$' \
|
| 871 |
+
halt='Form Feed (^L) detected' \
|
| 872 |
+
$(_sc_search_regexp)
|
| 873 |
+
|
| 874 |
+
# debbugs.gnu.org/cgi/bugreport.cgi?bug=... -> bugs.gnu.org/...
|
| 875 |
+
# bugzilla.redhat.com/show_bug.cgi?id=... -> bugzilla.redhat.com/...
|
| 876 |
+
# sourceware.org/bugzilla/show_bug.cgi?id=... -> sourceware.org/PR...
|
| 877 |
+
# gcc.gnu.org/bugzilla/show_bug.cgi?id=... -> gcc.gnu.org/PR...
|
| 878 |
+
sc_prohibit-long-form-bug-urls:
|
| 879 |
+
@prohibit='http.*(bugreport|show_bug)\.cgi' \
|
| 880 |
+
halt='use short form bug url' \
|
| 881 |
+
$(_sc_search_regexp)
|
| 882 |
+
|
| 883 |
+
# Override the default Cc: used in generating an announcement.
|
| 884 |
+
announcement_Cc_ = $(translation_project_), \
|
| 885 |
+
coreutils@gnu.org, coreutils-announce@gnu.org
|
| 886 |
+
|
| 887 |
+
-include $(srcdir)/dist-check.mk
|
| 888 |
+
|
| 889 |
+
update-copyright-env = \
|
| 890 |
+
UPDATE_COPYRIGHT_FORCE=1 \
|
| 891 |
+
UPDATE_COPYRIGHT_USE_INTERVALS=2 \
|
| 892 |
+
UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
|
| 893 |
+
|
| 894 |
+
# List syntax-check exemptions.
|
| 895 |
+
exclude_file_name_regexp--sc_space_tab = \
|
| 896 |
+
^(tests/pr/|tests/misc/nl\.sh$$|gl/.*\.diff$$|man/help2man$$)
|
| 897 |
+
exclude_file_name_regexp--sc_bindtextdomain = \
|
| 898 |
+
^(gl/.*|lib/euidaccess-stat|src/make-prime-list|src/cksum)\.c$$
|
| 899 |
+
exclude_file_name_regexp--sc_trailing_blank = \
|
| 900 |
+
^(tests/pr/|gl/.*\.diff$$|man/help2man)
|
| 901 |
+
_x_system_h := (system|copy|chown-core|find-mount-point)\.h
|
| 902 |
+
_x_system_c := (libstdbuf|make-prime-list)\.c
|
| 903 |
+
exclude_file_name_regexp--sc_system_h_headers = \
|
| 904 |
+
^src/($(_x_system_h)|$(_x_system_c))$$
|
| 905 |
+
|
| 906 |
+
_src := (false|lbracket|chown-(chgrp|chown)
|
| 907 |
+
_src := $(_src)|ls-(dir|ls|vdir)|make-prime-list|tac-pipe|uname-(arch|uname))
|
| 908 |
+
_gl_src = (xdecto.max|cl-strtold)
|
| 909 |
+
exclude_file_name_regexp--sc_require_config_h_first = \
|
| 910 |
+
(^lib/buffer-lcm\.c|gl/lib/$(_gl_src)\.c|src/$(_src)\.c)$$
|
| 911 |
+
exclude_file_name_regexp--sc_require_config_h = \
|
| 912 |
+
$(exclude_file_name_regexp--sc_require_config_h_first)
|
| 913 |
+
|
| 914 |
+
exclude_file_name_regexp--sc_po_check = ^(gl/|man/help2man)
|
| 915 |
+
exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
|
| 916 |
+
^src/(seq|remove)\.c$$
|
| 917 |
+
exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/pr/
|
| 918 |
+
exclude_file_name_regexp--sc_program_name = \
|
| 919 |
+
^(gl/.*|lib/euidaccess-stat|src/make-prime-list)\.c$$
|
| 920 |
+
exclude_file_name_regexp--sc_file_system = \
|
| 921 |
+
NEWS|^(init\.cfg|src/df\.c|tests/df/df-P\.sh|tests/df/df-output\.sh)$$
|
| 922 |
+
exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
|
| 923 |
+
^m4/stat-prog\.m4$$
|
| 924 |
+
exclude_file_name_regexp--sc_prohibit_fail_0 = \
|
| 925 |
+
(^.*/git-hooks/commit-msg|^tests/init\.sh|Makefile\.am|\.mk|.*\.texi)$$
|
| 926 |
+
exclude_file_name_regexp--sc_prohibit_test_minus_ao = doc/.*\.texi$$
|
| 927 |
+
exclude_file_name_regexp--sc_prohibit_atoi_atof = ^lib/euidaccess-stat\.c$$
|
| 928 |
+
|
| 929 |
+
# longlong.h is maintained elsewhere.
|
| 930 |
+
_ll = ^src/longlong\.h$$
|
| 931 |
+
exclude_file_name_regexp--sc_useless_cpp_parens = $(_ll)
|
| 932 |
+
exclude_file_name_regexp--sc_space_before_open_paren = $(_ll)
|
| 933 |
+
|
| 934 |
+
tbi_1 = ^tests/pr/|(\.mk|^man/help2man)$$
|
| 935 |
+
tbi_2 = ^scripts/git-hooks/(pre-commit|pre-applypatch|applypatch-msg)$$
|
| 936 |
+
tbi_3 = (GNU)?[Mm]akefile(\.am)?$$|$(_ll)
|
| 937 |
+
exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
|
| 938 |
+
$(tbi_1)|$(tbi_2)|$(tbi_3)
|
| 939 |
+
|
| 940 |
+
exclude_file_name_regexp--sc_preprocessor_indentation = \
|
| 941 |
+
^(gl/lib/(rand-isaac|mbbuf)\.[ch]|gl/tests/test-rand-isaac\.c)$$|$(_ll)
|
| 942 |
+
exclude_file_name_regexp--sc_prohibit_stat_st_blocks = \
|
| 943 |
+
^(src/system\.h|tests/du/2g\.sh)$$
|
| 944 |
+
|
| 945 |
+
exclude_file_name_regexp--sc_prohibit_continued_string_alpha_in_column_1 = \
|
| 946 |
+
^src/(system\.h|od\.c|printf\.c|getlimits\.c)$$
|
| 947 |
+
|
| 948 |
+
_cksum = ^tests/cksum/cksum-base64\.pl$$
|
| 949 |
+
exclude_file_name_regexp--sc_prohibit_test_backticks = \
|
| 950 |
+
^tests/(local\.mk|(init|misc/stdbuf|factor/create-test)\.sh)$$|$(_cksum)
|
| 951 |
+
|
| 952 |
+
# Exempt test.c, since it's nominally shared, and relatively static.
|
| 953 |
+
exclude_file_name_regexp--sc_prohibit_operator_at_end_of_line = \
|
| 954 |
+
^src/(ptx|test|head)\.c$$
|
| 955 |
+
|
| 956 |
+
exclude_file_name_regexp--sc_error_message_uppercase = ^src/factor\.c$$
|
| 957 |
+
exclude_file_name_regexp--sc_prohibit_atoi_atof = ^src/make-prime-list\.c$$
|
| 958 |
+
|
| 959 |
+
# Exception here as we don't want __attribute elided on non GCC for stdbuf
|
| 960 |
+
# and we don't want to depend on gnulib for make-prime-list
|
| 961 |
+
exclude_file_name_regexp--sc_prohibit-gl-attributes = \
|
| 962 |
+
^src/(make-prime-list|libstdbuf)\.c$$
|
| 963 |
+
|
| 964 |
+
exclude_file_name_regexp--sc_prohibit_uppercase_id_est = \.diff$$
|
| 965 |
+
exclude_file_name_regexp--sc_ensure_dblspace_after_dot_before_id_est = \.diff$$
|
| 966 |
+
exclude_file_name_regexp--sc_ensure_comma_after_id_est = \.diff|$(_ll)$$
|
| 967 |
+
exclude_file_name_regexp--sc_long_lines = \.diff$$|$(_ll)|$(_cksum)|bootstrap
|
| 968 |
+
|
| 969 |
+
# `grep . -q` is not exactly equivalent to `grep . >/dev/null`
|
| 970 |
+
# and this difference is significant in the NEWS description
|
| 971 |
+
exclude_file_name_regexp--sc_unportable_grep_q = NEWS
|
| 972 |
+
|
| 973 |
+
# Augment AM_CFLAGS to include our per-directory options:
|
| 974 |
+
AM_CFLAGS += $($(@D)_CFLAGS)
|
| 975 |
+
|
| 976 |
+
src_CFLAGS = $(WARN_CFLAGS)
|
| 977 |
+
lib_CFLAGS = $(GNULIB_WARN_CFLAGS)
|
| 978 |
+
gnulib-tests_CFLAGS = $(GNULIB_TEST_WARN_CFLAGS)
|
| 979 |
+
|
| 980 |
+
# Configuration to make the tight-scope syntax-check rule work with
|
| 981 |
+
# non-recursive make.
|
| 982 |
+
# Note _gl_TS_headers use _single line_ extern function declarations,
|
| 983 |
+
# while *_SOURCES use the _two line_ form.
|
| 984 |
+
export _gl_TS_headers = $(noinst_HEADERS)
|
| 985 |
+
# Add exceptions for --enable-single-binary renamed functions.
|
| 986 |
+
_gl_TS_unmarked_extern_functions = main usage
|
| 987 |
+
_gl_TS_unmarked_extern_functions += single_binary_main_.* _usage_.*
|
| 988 |
+
# Headers to search for single line extern _data_ declarations.
|
| 989 |
+
_gl_TS_other_headers = $(srcdir)/src/*.h src/*.h
|
| 990 |
+
# Avoid tight_scope rule stating these should be static
|
| 991 |
+
# as there is no way to achieve that with the way these are defined.
|
| 992 |
+
_gl_TS_unmarked_extern_vars = ptr_MD5_.*
|
| 993 |
+
# Other tight_scope settings
|
| 994 |
+
_gl_TS_dir = .
|
| 995 |
+
_gl_TS_obj_files = src/*.$(OBJEXT)
|
| 996 |
+
# Settings for running codespell.
|
| 997 |
+
csiwl_1 = debbugs,clen,te,bu,shs,linke,fo,souch,inout,outin
|
| 998 |
+
csiwl_2 = kno,ois,afile,whats,hda,indx,ot,nam,ist
|
| 999 |
+
codespell_ignore_words_list = $(csiwl_1),$(csiwl_2)
|
| 1000 |
+
exclude_file_name_regexp--sc_codespell = \
|
| 1001 |
+
^(THANKS\.in|tests/pr/.*(F|tn?|l(o|m|i)|bl))$$
|
| 1002 |
+
exclude_file_name_regexp--sc_GPL_version = ^(gl/lib/mbbuf\.[hc])$$
|
configure.ac
ADDED
|
@@ -0,0 +1,905 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
| 6 |
+
# This program is free software: you can redistribute it and/or modify
|
| 7 |
+
# it under the terms of the GNU General Public License as published by
|
| 8 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 9 |
+
# (at your option) any later version.
|
| 10 |
+
|
| 11 |
+
# This program is distributed in the hope that it will be useful,
|
| 12 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
# GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
# You should have received a copy of the GNU General Public License
|
| 17 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 18 |
+
|
| 19 |
+
dnl Written by Jim Meyering.
|
| 20 |
+
|
| 21 |
+
AC_PREREQ([2.69])
|
| 22 |
+
|
| 23 |
+
# Make inter-release version strings look like, e.g., v6.9-219-g58ddd, which
|
| 24 |
+
# indicates that it is built from the 219th delta (in _some_ repository)
|
| 25 |
+
# following the v6.9 tag, and that 58ddd is a prefix of the commit SHA1.
|
| 26 |
+
# The explicit URL can be removed when autoconf > 2.69 is released.
|
| 27 |
+
AC_INIT([GNU coreutils],
|
| 28 |
+
m4_esyscmd([build-aux/git-version-gen .tarball-version]),
|
| 29 |
+
[bug-coreutils@gnu.org],
|
| 30 |
+
[coreutils],
|
| 31 |
+
[https://www.gnu.org/software/coreutils/])
|
| 32 |
+
|
| 33 |
+
AC_CONFIG_SRCDIR([src/ls.c])
|
| 34 |
+
|
| 35 |
+
AC_CONFIG_AUX_DIR([build-aux])
|
| 36 |
+
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
| 37 |
+
|
| 38 |
+
AM_INIT_AUTOMAKE([1.11.2 dist-xz color-tests parallel-tests subdir-objects])
|
| 39 |
+
AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
|
| 40 |
+
|
| 41 |
+
dnl POSIXCHECK is worthwhile for maintainers, but adds several seconds
|
| 42 |
+
dnl (more than 10% execution time) to ./configure, with no benefit for
|
| 43 |
+
dnl most users. Using it to look for bugs requires:
|
| 44 |
+
dnl GNULIB_POSIXCHECK=1 autoreconf -f
|
| 45 |
+
dnl ./configure
|
| 46 |
+
dnl make
|
| 47 |
+
dnl make -C src clean
|
| 48 |
+
dnl make CFLAGS=-DGNULIB_POSIXCHECK=1
|
| 49 |
+
dnl FIXME: Once we figure out how to avoid false positives, we should
|
| 50 |
+
dnl have 'make my-distcheck' in dist-check.mk exercise this.
|
| 51 |
+
m4_syscmd([test "${GNULIB_POSIXCHECK+set}" = set])
|
| 52 |
+
m4_if(m4_sysval, [0], [], [dnl
|
| 53 |
+
gl_ASSERT_NO_GNULIB_POSIXCHECK])
|
| 54 |
+
|
| 55 |
+
AC_PROG_CC
|
| 56 |
+
AM_PROG_CC_C_O
|
| 57 |
+
AC_PROG_CPP
|
| 58 |
+
AC_PROG_RANLIB
|
| 59 |
+
AC_PROG_EGREP
|
| 60 |
+
AC_PROG_LN_S
|
| 61 |
+
gl_EARLY
|
| 62 |
+
gl_SET_CRYPTO_CHECK_DEFAULT([auto-gpl-compat])
|
| 63 |
+
gl_INIT
|
| 64 |
+
coreutils_MACROS
|
| 65 |
+
|
| 66 |
+
# These are safe, since 'sort', coreutils's only multithreaded app,
|
| 67 |
+
# does not use the relevant modules.
|
| 68 |
+
AC_DEFINE([GNULIB_EXCLUDE_SINGLE_THREAD], [1],
|
| 69 |
+
[Define to 1 if apps call 'exclude' functions from a single thread.])
|
| 70 |
+
AC_DEFINE([GNULIB_REGEX_SINGLE_THREAD], [1],
|
| 71 |
+
[Define to 1 if apps call 'regex' functions from a single thread.])
|
| 72 |
+
# Although 'sort' is multithreaded and can use these functions,
|
| 73 |
+
# it uses them only from the main thread.
|
| 74 |
+
AC_DEFINE([GNULIB_MBRTOWC_SINGLE_THREAD], [1],
|
| 75 |
+
[Define to 1 if apps call mbrtowc, mbrtoc32, and 'regex' functions
|
| 76 |
+
from a single thread.])
|
| 77 |
+
# This is safe, since all apps set locale early.
|
| 78 |
+
AC_DEFINE([GNULIB_WCHAR_SINGLE_LOCALE], [1],
|
| 79 |
+
[Define to 1 if apps don't set the locale after calling
|
| 80 |
+
locale-sensitive functions like mbrtowc and wcwidth.])
|
| 81 |
+
|
| 82 |
+
AC_DEFINE([GNULIB_MBRTOC32_REGULAR], [1],
|
| 83 |
+
[Do not worry about rare encodings like CP864, EBCDIC, Johab, and Shift JIS
|
| 84 |
+
that glibc does not support.])
|
| 85 |
+
|
| 86 |
+
# The test suite needs to know if we have a working perl.
|
| 87 |
+
AM_CONDITIONAL([HAVE_PERL], [test "$gl_cv_prog_perl" != no])
|
| 88 |
+
|
| 89 |
+
# gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
|
| 90 |
+
# ------------------------------------------------
|
| 91 |
+
# If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
|
| 92 |
+
# Otherwise, run RUN-IF-NOT-FOUND.
|
| 93 |
+
AC_DEFUN([gl_GCC_VERSION_IFELSE],
|
| 94 |
+
[AC_PREPROC_IFELSE(
|
| 95 |
+
[AC_LANG_PROGRAM(
|
| 96 |
+
[[
|
| 97 |
+
#if ($1) < __GNUC__ || (($1) == __GNUC__ && ($2) <= __GNUC_MINOR__)
|
| 98 |
+
/* ok */
|
| 99 |
+
#else
|
| 100 |
+
# error "your version of gcc is older than $1.$2"
|
| 101 |
+
#endif
|
| 102 |
+
]]),
|
| 103 |
+
], [$3], [$4])
|
| 104 |
+
]
|
| 105 |
+
)
|
| 106 |
+
|
| 107 |
+
AC_ARG_ENABLE([single-binary],
|
| 108 |
+
[AS_HELP_STRING([--enable-single-binary=[shebangs|symlinks]],
|
| 109 |
+
[Compile all the tools in a single binary, reducing the overall size.
|
| 110 |
+
When compiled this way, shebangs (default when enabled) or symlinks are
|
| 111 |
+
installed for each tool that points to the single binary.])],
|
| 112 |
+
[gl_single_binary=no ;
|
| 113 |
+
case $enableval in
|
| 114 |
+
yes) gl_single_binary=shebangs ;;
|
| 115 |
+
no|shebangs|symlinks) gl_single_binary=$enableval ;;
|
| 116 |
+
*) AC_MSG_ERROR([bad value $enableval for single-binary option.
|
| 117 |
+
Options are: symlinks, shebangs, no.]) ;;
|
| 118 |
+
esac],
|
| 119 |
+
[gl_single_binary=no]
|
| 120 |
+
)
|
| 121 |
+
AC_ARG_ENABLE([single-binary-exceptions],
|
| 122 |
+
[AS_HELP_STRING([--enable-single-binary-exceptions=PROG_LIST],
|
| 123 |
+
[When used with --enable-single-binary, exclude the PROG_LIST from
|
| 124 |
+
it, so these programs are compiled as separated files
|
| 125 |
+
(comma-separated, default none))])],
|
| 126 |
+
[gl_single_binary_exceptions=$enableval],
|
| 127 |
+
[gl_single_binary_exceptions=]
|
| 128 |
+
)
|
| 129 |
+
if test "$gl_single_binary" = 'symlinks'; then
|
| 130 |
+
if ! test "`echo ls | sed \"$program_transform_name\"`" = 'ls'; then
|
| 131 |
+
AC_MSG_ERROR([program name transformations are not currently supported
|
| 132 |
+
with --enable-single-binary=symlinks.])
|
| 133 |
+
fi
|
| 134 |
+
fi
|
| 135 |
+
AM_CONDITIONAL([SINGLE_BINARY], [test "$gl_single_binary" != no])
|
| 136 |
+
|
| 137 |
+
AC_ARG_ENABLE([bold-man-page-references],
|
| 138 |
+
[AS_HELP_STRING([--disable-bold-man-page-references],
|
| 139 |
+
[When generating man pages, do not apply bold style around any
|
| 140 |
+
references like name(1) etc.])],
|
| 141 |
+
[gl_bold_manpages=yes ;
|
| 142 |
+
case $enableval in
|
| 143 |
+
no|yes) gl_bold_manpages=$enableval ;;
|
| 144 |
+
*) AC_MSG_ERROR([bad value $enableval for bold-man-page-references.
|
| 145 |
+
Options are: yes, no.]) ;;
|
| 146 |
+
esac],
|
| 147 |
+
[gl_bold_manpages=yes]
|
| 148 |
+
)
|
| 149 |
+
AM_CONDITIONAL([BOLD_MAN_REFS], [test "$gl_bold_manpages" != no])
|
| 150 |
+
|
| 151 |
+
AC_ARG_ENABLE([gcc-warnings],
|
| 152 |
+
[AS_HELP_STRING([--enable-gcc-warnings@<:@=TYPE@:>@],
|
| 153 |
+
[control generation of GCC warnings. The TYPE 'no' disables
|
| 154 |
+
warnings (default for non-developer builds); 'yes' generates
|
| 155 |
+
cheap warnings if available (default for developer builds);
|
| 156 |
+
'expensive' in addition generates expensive-to-compute warnings
|
| 157 |
+
if available.])],
|
| 158 |
+
[case $enableval in
|
| 159 |
+
no|yes|expensive) ;;
|
| 160 |
+
*) AC_MSG_ERROR([bad value $enableval for gcc-warnings option]) ;;
|
| 161 |
+
esac
|
| 162 |
+
gl_gcc_warnings=$enableval],
|
| 163 |
+
[
|
| 164 |
+
# GCC provides fine-grained control over diagnostics which
|
| 165 |
+
# is used in gnulib for example to suppress warnings from
|
| 166 |
+
# certain sections of code. So if this is available and
|
| 167 |
+
# we're running from a git repo, then auto enable the warnings.
|
| 168 |
+
gl_gcc_warnings=no
|
| 169 |
+
gl_GCC_VERSION_IFELSE([4], [6],
|
| 170 |
+
[test -d "$srcdir"/.git \
|
| 171 |
+
&& ! test -f "$srcdir"/.tarball-version \
|
| 172 |
+
&& gl_gcc_warnings=yes])]
|
| 173 |
+
)
|
| 174 |
+
|
| 175 |
+
# clang is unduly picky about some things, even by default.
|
| 176 |
+
if test "$gl_cv_compiler_clang" = yes; then
|
| 177 |
+
gl_WARN_ADD([-Wno-format-extra-args])
|
| 178 |
+
gl_WARN_ADD([-Wno-implicit-const-int-float-conversion])
|
| 179 |
+
gl_WARN_ADD([-Wno-tautological-constant-out-of-range-compare])
|
| 180 |
+
fi
|
| 181 |
+
|
| 182 |
+
if test $gl_gcc_warnings != no; then
|
| 183 |
+
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
|
| 184 |
+
AC_SUBST([WERROR_CFLAGS])
|
| 185 |
+
|
| 186 |
+
ew=
|
| 187 |
+
AS_IF([test $gl_gcc_warnings != expensive],
|
| 188 |
+
[# -fanalyzer and related options slow GCC considerably.
|
| 189 |
+
ew="$ew -fanalyzer -Wno-analyzer-malloc-leak"])
|
| 190 |
+
|
| 191 |
+
# This, $nw, is the list of warnings we disable.
|
| 192 |
+
nw=$ew
|
| 193 |
+
nw="$nw -Wstack-protector" # not worth working around for pre GCC 15
|
| 194 |
+
nw="$nw -Wformat-overflow=2" # False alarms due to GCC bug 110333
|
| 195 |
+
nw="$nw -Wformat-truncation=2" # False alarm in ls.c, probably related
|
| 196 |
+
nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
|
| 197 |
+
|
| 198 |
+
# Suppress noreturn warnings with single binaries; otherwise
|
| 199 |
+
# GCC complains about the renamed 'main' not being declared noreturn
|
| 200 |
+
# because 'main_exit' calls 'exit' when linting.
|
| 201 |
+
if test "$gl_single_binary" != no; then
|
| 202 |
+
nw="$nw -Wsuggest-attribute=noreturn"
|
| 203 |
+
fi
|
| 204 |
+
|
| 205 |
+
# Using -Wstrict-overflow is a pain, but the alternative is worse.
|
| 206 |
+
# For an example, see the code that provoked this report:
|
| 207 |
+
# https://gcc.gnu.org/PR33498
|
| 208 |
+
# Code like that still infloops with gcc-4.6.0 and -O2. Scary indeed.
|
| 209 |
+
|
| 210 |
+
gl_MANYWARN_ALL_GCC([ws])
|
| 211 |
+
AS_VAR_APPEND([ws], [' -Wswitch-enum'])
|
| 212 |
+
AS_VAR_APPEND([ws], [' -Wtrailing-whitespace'])
|
| 213 |
+
gl_MANYWARN_COMPLEMENT([ws], [$ws], [$nw])
|
| 214 |
+
for w in $ws; do
|
| 215 |
+
gl_WARN_ADD([$w])
|
| 216 |
+
done
|
| 217 |
+
gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
|
| 218 |
+
gl_WARN_ADD([-Wno-format-nonliteral])
|
| 219 |
+
|
| 220 |
+
AC_SUBST([WARN_CFLAGS])
|
| 221 |
+
|
| 222 |
+
AC_DEFINE([lint], [1], [Define to 1 if the compiler is checking for lint.])
|
| 223 |
+
AH_VERBATIM([FORTIFY_SOURCE],
|
| 224 |
+
[/* Enable compile-time and run-time bounds-checking, and some warnings,
|
| 225 |
+
without upsetting glibc 2.15+. */
|
| 226 |
+
#if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
|
| 227 |
+
# define _FORTIFY_SOURCE 2
|
| 228 |
+
#endif
|
| 229 |
+
])
|
| 230 |
+
AC_DEFINE([GNULIB_PORTCHECK], [1], [enable some gnulib portability checks])
|
| 231 |
+
|
| 232 |
+
# We use a slightly smaller set of warning options for lib/.
|
| 233 |
+
# Remove the following and save the result in GNULIB_WARN_CFLAGS.
|
| 234 |
+
nw=$ew
|
| 235 |
+
nw="$nw -Wduplicated-branches" # Too many false alarms
|
| 236 |
+
nw="$nw -Wformat-truncation=2"
|
| 237 |
+
nw="$nw -Wunused-macros"
|
| 238 |
+
|
| 239 |
+
gl_MANYWARN_COMPLEMENT([GNULIB_WARN_CFLAGS], [$WARN_CFLAGS], [$nw])
|
| 240 |
+
AC_SUBST([GNULIB_WARN_CFLAGS])
|
| 241 |
+
|
| 242 |
+
# For gnulib-tests, the set is slightly smaller still.
|
| 243 |
+
nw=
|
| 244 |
+
# It's not worth being this picky about test programs.
|
| 245 |
+
nw="$nw -Wmissing-variable-declarations"
|
| 246 |
+
nw="$nw -Wsuggest-attribute=cold"
|
| 247 |
+
nw="$nw -Wsuggest-attribute=const"
|
| 248 |
+
nw="$nw -Wsuggest-attribute=format"
|
| 249 |
+
nw="$nw -Wsuggest-attribute=pure"
|
| 250 |
+
gl_MANYWARN_COMPLEMENT([GNULIB_TEST_WARN_CFLAGS],
|
| 251 |
+
[$GNULIB_WARN_CFLAGS], [$nw])
|
| 252 |
+
AC_SUBST([GNULIB_TEST_WARN_CFLAGS])
|
| 253 |
+
fi
|
| 254 |
+
|
| 255 |
+
AC_FUNC_FORK
|
| 256 |
+
|
| 257 |
+
optional_bin_progs=
|
| 258 |
+
AC_CHECK_FUNCS([chroot],
|
| 259 |
+
gl_ADD_PROG([optional_bin_progs], [chroot]))
|
| 260 |
+
AC_CHECK_FUNCS([gethostid],
|
| 261 |
+
gl_ADD_PROG([optional_bin_progs], [hostid]))
|
| 262 |
+
AC_CHECK_FUNCS([sigsuspend],
|
| 263 |
+
gl_ADD_PROG([optional_bin_progs], [timeout]))
|
| 264 |
+
|
| 265 |
+
gl_WINSIZE_IN_PTEM
|
| 266 |
+
|
| 267 |
+
AC_MSG_CHECKING([whether localtime caches TZ])
|
| 268 |
+
AC_CACHE_VAL([utils_cv_localtime_cache],
|
| 269 |
+
[if test x$ac_cv_func_tzset = xyes; then
|
| 270 |
+
AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <time.h>
|
| 271 |
+
#if STDC_HEADERS
|
| 272 |
+
# include <stdlib.h>
|
| 273 |
+
#endif
|
| 274 |
+
extern char **environ;
|
| 275 |
+
void unset_TZ (void)
|
| 276 |
+
{
|
| 277 |
+
char **from, **to;
|
| 278 |
+
for (to = from = environ; (*to = *from); from++)
|
| 279 |
+
if (! (to[0][0] == 'T' && to[0][1] == 'Z' && to[0][2] == '='))
|
| 280 |
+
to++;
|
| 281 |
+
}
|
| 282 |
+
int
|
| 283 |
+
main ()
|
| 284 |
+
{
|
| 285 |
+
time_t now = time ((time_t *) 0);
|
| 286 |
+
int hour_GMT0, hour_unset;
|
| 287 |
+
if (putenv ("TZ=GMT0") != 0)
|
| 288 |
+
return 1;
|
| 289 |
+
hour_GMT0 = localtime (&now)->tm_hour;
|
| 290 |
+
unset_TZ ();
|
| 291 |
+
hour_unset = localtime (&now)->tm_hour;
|
| 292 |
+
if (putenv ("TZ=PST8") != 0)
|
| 293 |
+
return 1;
|
| 294 |
+
if (localtime (&now)->tm_hour == hour_GMT0)
|
| 295 |
+
return 1;
|
| 296 |
+
unset_TZ ();
|
| 297 |
+
if (localtime (&now)->tm_hour != hour_unset)
|
| 298 |
+
return 1;
|
| 299 |
+
return 0;
|
| 300 |
+
}]])],
|
| 301 |
+
[utils_cv_localtime_cache=no],
|
| 302 |
+
[utils_cv_localtime_cache=yes],
|
| 303 |
+
[# If we have tzset, assume the worst when cross-compiling.
|
| 304 |
+
utils_cv_localtime_cache=yes])
|
| 305 |
+
else
|
| 306 |
+
# If we lack tzset, report that localtime does not cache TZ,
|
| 307 |
+
# since we can't invalidate the cache if we don't have tzset.
|
| 308 |
+
utils_cv_localtime_cache=no
|
| 309 |
+
fi])dnl
|
| 310 |
+
AC_MSG_RESULT([$utils_cv_localtime_cache])
|
| 311 |
+
if test $utils_cv_localtime_cache = yes; then
|
| 312 |
+
AC_DEFINE([LOCALTIME_CACHE], [1], [FIXME])
|
| 313 |
+
fi
|
| 314 |
+
|
| 315 |
+
# Find the library for dynamic loading of shared libraries.
|
| 316 |
+
AC_SEARCH_LIBS([dlopen], [dl])
|
| 317 |
+
AS_CASE([$ac_cv_search_dlopen],
|
| 318 |
+
[no | 'none required'],
|
| 319 |
+
[LIB_DL=],
|
| 320 |
+
[*],
|
| 321 |
+
[LIB_DL="$ac_cv_search_dlopen"])
|
| 322 |
+
AC_SUBST([LIB_DL])
|
| 323 |
+
|
| 324 |
+
# Should 'sort' link libcrypto dynamically?
|
| 325 |
+
AS_CASE([$LIB_CRYPTO],
|
| 326 |
+
[-lcrypto],
|
| 327 |
+
[# Check for dlopen and libcrypto dynamic linking in one program,
|
| 328 |
+
# as there's little point to checking them separately.
|
| 329 |
+
AC_CACHE_CHECK([for dlopen and whether libcrypto is linked dynamically],
|
| 330 |
+
[utils_cv_libcrypto_soname],
|
| 331 |
+
[utils_cv_libcrypto_soname=no
|
| 332 |
+
saved_LIBS=$LIBS
|
| 333 |
+
LIBS="$LIBS $LIB_DL $LIB_CRYPTO"
|
| 334 |
+
AC_LINK_IFELSE(
|
| 335 |
+
[AC_LANG_PROGRAM(
|
| 336 |
+
[[#include <dlfcn.h>
|
| 337 |
+
#include <openssl/sha.h>
|
| 338 |
+
/* Use SHA512 rather than MD5 here to avoid deprecation warnings.
|
| 339 |
+
So need to check HAVE_OPENSSL_MD5.. with DLOPEN_LIBCRYPTO. */
|
| 340 |
+
]],
|
| 341 |
+
[[return !(dlopen ("libcrypto.so", RTLD_LAZY | RTLD_GLOBAL)
|
| 342 |
+
&& SHA512 (0, 0, 0));]])],
|
| 343 |
+
[# readelf works with cross-builds; ldd works on more platforms.
|
| 344 |
+
LIBCRYPTO_SONAME="`(readelf -d conftest$EXEEXT || ldd conftest$EXEEXT
|
| 345 |
+
) 2>/dev/null |
|
| 346 |
+
sed -n 's/.*\(libcrypto\.so\.[[.0-9]]*\).*/\1/p'`"
|
| 347 |
+
AS_CASE([$LIBCRYPTO_SONAME],
|
| 348 |
+
[*libcrypto*],
|
| 349 |
+
[utils_cv_libcrypto_soname=$LIBCRYPTO_SONAME])])
|
| 350 |
+
LIBS=$saved_LIBS])
|
| 351 |
+
AS_CASE([$utils_cv_libcrypto_soname],
|
| 352 |
+
[*libcrypto*],
|
| 353 |
+
[AC_DEFINE([DLOPEN_LIBCRYPTO], [1],
|
| 354 |
+
[Define to 1 if dlopen exists and libcrypto is
|
| 355 |
+
linked dynamically.])
|
| 356 |
+
AC_DEFINE_UNQUOTED([LIBCRYPTO_SONAME], ["$utils_cv_libcrypto_soname"],
|
| 357 |
+
[versioned libcrypto])
|
| 358 |
+
])])
|
| 359 |
+
|
| 360 |
+
# macOS >= 10.12
|
| 361 |
+
AC_CHECK_FUNCS([fclonefileat])
|
| 362 |
+
|
| 363 |
+
# Assume that if getattrat exists, it's compatible with Solaris 11.
|
| 364 |
+
AC_CHECK_FUNCS([getattrat])
|
| 365 |
+
if test $ac_cv_func_getattrat = yes; then
|
| 366 |
+
LIB_NVPAIR=-lnvpair
|
| 367 |
+
AC_SUBST([LIB_NVPAIR])
|
| 368 |
+
fi
|
| 369 |
+
|
| 370 |
+
# glibc >= 2.28 and linux kernel >= 4.11, Android API level 30.
|
| 371 |
+
gl_CHECK_FUNCS_ANDROID([statx], [[#include <sys/stat.h>]])
|
| 372 |
+
|
| 373 |
+
# SCO-ODT-3.0 is reported to need -los to link programs using initgroups
|
| 374 |
+
AC_CHECK_FUNCS([initgroups])
|
| 375 |
+
if test $ac_cv_func_initgroups = no; then
|
| 376 |
+
AC_CHECK_LIB([os], [initgroups])
|
| 377 |
+
fi
|
| 378 |
+
|
| 379 |
+
AC_CHECK_FUNCS([syslog])
|
| 380 |
+
if test $ac_cv_func_syslog = no; then
|
| 381 |
+
# syslog is not in the default libraries. See if it's in some other.
|
| 382 |
+
for lib in bsd socket inet; do
|
| 383 |
+
AC_CHECK_LIB([$lib], [syslog], [AC_DEFINE([HAVE_SYSLOG], [1], [FIXME])
|
| 384 |
+
LIBS="$LIBS -l$lib"; break])
|
| 385 |
+
done
|
| 386 |
+
fi
|
| 387 |
+
|
| 388 |
+
AC_CACHE_CHECK([for 3-argument setpriority function],
|
| 389 |
+
[utils_cv_func_setpriority],
|
| 390 |
+
[AC_LINK_IFELSE(
|
| 391 |
+
[AC_LANG_PROGRAM(
|
| 392 |
+
[[#include <sys/time.h>
|
| 393 |
+
#include <sys/resource.h>
|
| 394 |
+
]],
|
| 395 |
+
[[setpriority (0, 0, 0);]])],
|
| 396 |
+
[utils_cv_func_setpriority=yes],
|
| 397 |
+
[utils_cv_func_setpriority=no])])
|
| 398 |
+
if test $utils_cv_func_setpriority = no; then
|
| 399 |
+
AC_CHECK_FUNCS([nice])
|
| 400 |
+
fi
|
| 401 |
+
case $utils_cv_func_setpriority,$ac_cv_func_nice in
|
| 402 |
+
*yes*)
|
| 403 |
+
gl_ADD_PROG([optional_bin_progs], [nice])
|
| 404 |
+
esac
|
| 405 |
+
|
| 406 |
+
if test "$cross_compiling" = yes || test -c /dev/stdin <.; then
|
| 407 |
+
AC_DEFINE([DEV_FD_MIGHT_BE_CHR], [1],
|
| 408 |
+
[Define to 1 if /dev/std{in,out,err} and /dev/fd/N, if they exist, might be
|
| 409 |
+
character-special devices whose minor device number is the file
|
| 410 |
+
descriptor number, such as on Solaris. Leave undefined if they are
|
| 411 |
+
definitely the actual files. This determination should be done after any
|
| 412 |
+
symbolic links are followed.])
|
| 413 |
+
fi
|
| 414 |
+
|
| 415 |
+
AC_DEFUN([coreutils_DUMMY_1],
|
| 416 |
+
[
|
| 417 |
+
AC_REQUIRE([gl_READUTMP])
|
| 418 |
+
if test $ac_cv_header_utmp_h = yes || test $ac_cv_header_utmpx_h = yes; then
|
| 419 |
+
gl_ADD_PROG([optional_bin_progs], [who])
|
| 420 |
+
gl_ADD_PROG([optional_bin_progs], [users])
|
| 421 |
+
gl_ADD_PROG([optional_bin_progs], [pinky])
|
| 422 |
+
fi
|
| 423 |
+
])
|
| 424 |
+
coreutils_DUMMY_1
|
| 425 |
+
|
| 426 |
+
AC_SYS_POSIX_TERMIOS()
|
| 427 |
+
gl_HEADER_TIOCGWINSZ_NEEDS_SYS_IOCTL
|
| 428 |
+
|
| 429 |
+
if test $ac_cv_sys_posix_termios = yes; then
|
| 430 |
+
gl_ADD_PROG([optional_bin_progs], [stty])
|
| 431 |
+
|
| 432 |
+
AC_MSG_CHECKING([whether termios.h needs _XOPEN_SOURCE])
|
| 433 |
+
AC_CACHE_VAL([su_cv_sys_termios_needs_xopen_source],
|
| 434 |
+
[AC_EGREP_CPP([yes], [#include <termios.h>
|
| 435 |
+
#ifdef IUCLC
|
| 436 |
+
yes
|
| 437 |
+
#endif], su_cv_sys_termios_needs_xopen_source=no,
|
| 438 |
+
AC_EGREP_CPP([yes], [#define _XOPEN_SOURCE
|
| 439 |
+
#include <termios.h>
|
| 440 |
+
#ifdef IUCLC
|
| 441 |
+
yes
|
| 442 |
+
#endif], su_cv_sys_termios_needs_xopen_source=yes,
|
| 443 |
+
su_cv_sys_termios_needs_xopen_source=no))])
|
| 444 |
+
AC_MSG_RESULT([$su_cv_sys_termios_needs_xopen_source])
|
| 445 |
+
test $su_cv_sys_termios_needs_xopen_source = yes &&
|
| 446 |
+
AC_DEFINE([TERMIOS_NEEDS_XOPEN_SOURCE], [1], [FIXME])
|
| 447 |
+
|
| 448 |
+
AC_MSG_CHECKING([c_line in struct termios])
|
| 449 |
+
AC_CACHE_VAL([su_cv_sys_c_line_in_termios],
|
| 450 |
+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if TERMIOS_NEEDS_XOPEN_SOURCE
|
| 451 |
+
#define _XOPEN_SOURCE
|
| 452 |
+
#endif
|
| 453 |
+
#include <sys/types.h>
|
| 454 |
+
#include <termios.h>
|
| 455 |
+
struct termios t;
|
| 456 |
+
int s = sizeof t.c_line;]])],
|
| 457 |
+
[su_cv_sys_c_line_in_termios=yes],
|
| 458 |
+
[su_cv_sys_c_line_in_termios=no])])
|
| 459 |
+
AC_MSG_RESULT([$su_cv_sys_c_line_in_termios])
|
| 460 |
+
test $su_cv_sys_c_line_in_termios = yes \
|
| 461 |
+
&& AC_DEFINE([HAVE_C_LINE], [1], [FIXME])
|
| 462 |
+
fi
|
| 463 |
+
|
| 464 |
+
# FIXME: note that this macro appears above, too.
|
| 465 |
+
# I'm leaving it here for now. This whole thing needs to be modernized...
|
| 466 |
+
gl_WINSIZE_IN_PTEM
|
| 467 |
+
|
| 468 |
+
gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H
|
| 469 |
+
|
| 470 |
+
if test $gl_cv_sys_tiocgwinsz_needs_termios_h = no && \
|
| 471 |
+
test $gl_cv_sys_tiocgwinsz_needs_sys_ioctl_h = no; then
|
| 472 |
+
AC_MSG_CHECKING([TIOCGWINSZ in sys/pty.h])
|
| 473 |
+
AC_CACHE_VAL([su_cv_sys_tiocgwinsz_in_sys_pty_h],
|
| 474 |
+
[AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
|
| 475 |
+
#ifdef WINSIZE_IN_PTEM
|
| 476 |
+
# include <sys/stream.h>
|
| 477 |
+
# include <sys/ptem.h>
|
| 478 |
+
#endif
|
| 479 |
+
#include <sys/ioctl.h>
|
| 480 |
+
#include <sys/tty.h>
|
| 481 |
+
#include <sys/pty.h>]], [[int x = TIOCGWINSZ;]])],
|
| 482 |
+
[su_cv_sys_tiocgwinsz_in_sys_pty_h=yes],
|
| 483 |
+
[su_cv_sys_tiocgwinsz_in_sys_pty_h=no])])
|
| 484 |
+
AC_MSG_RESULT([$su_cv_sys_tiocgwinsz_in_sys_pty_h])
|
| 485 |
+
|
| 486 |
+
test $su_cv_sys_tiocgwinsz_in_sys_pty_h = yes \
|
| 487 |
+
&& AC_DEFINE([GWINSZ_IN_SYS_PTY], [1],
|
| 488 |
+
[Define if your system defines TIOCGWINSZ in sys/pty.h.])
|
| 489 |
+
fi
|
| 490 |
+
|
| 491 |
+
# Build df only if there's a point to it.
|
| 492 |
+
if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then
|
| 493 |
+
gl_ADD_PROG([optional_bin_progs], [df])
|
| 494 |
+
fi
|
| 495 |
+
|
| 496 |
+
# Build stdbuf only if supported
|
| 497 |
+
ac_save_CFLAGS=$CFLAGS
|
| 498 |
+
ac_save_LDFLAGS=$LDFLAGS
|
| 499 |
+
cu_save_c_werror_flag=$ac_c_werror_flag
|
| 500 |
+
AC_LANG_WERROR
|
| 501 |
+
# Detect warnings about ignored "constructor" attributes.
|
| 502 |
+
gl_WARN_ADD([-Werror], [CFLAGS])
|
| 503 |
+
gl_WARN_ADD([-errwarn], [CFLAGS])
|
| 504 |
+
# Put this message here, after gl_WARN_ADD's chatter.
|
| 505 |
+
AC_MSG_CHECKING([whether this system supports stdbuf])
|
| 506 |
+
CFLAGS="-fPIC $CFLAGS"
|
| 507 |
+
LDFLAGS="-shared $LDFLAGS"
|
| 508 |
+
AC_CACHE_VAL([utils_cv_stdbuf_supported],[
|
| 509 |
+
utils_cv_stdbuf_supported=no
|
| 510 |
+
# Note we only LINK here rather than RUN to support cross compilation
|
| 511 |
+
AC_LINK_IFELSE(
|
| 512 |
+
[AC_LANG_PROGRAM([[
|
| 513 |
+
static int stdbuf = 0;
|
| 514 |
+
|
| 515 |
+
void __attribute__ ((constructor))
|
| 516 |
+
stdbuf_init (void)
|
| 517 |
+
{
|
| 518 |
+
stdbuf = 1;
|
| 519 |
+
}]],[[
|
| 520 |
+
if (stdbuf != 1)
|
| 521 |
+
return 1;]])
|
| 522 |
+
],
|
| 523 |
+
[utils_cv_stdbuf_supported=yes])])
|
| 524 |
+
AC_MSG_RESULT([$utils_cv_stdbuf_supported])
|
| 525 |
+
if test "$utils_cv_stdbuf_supported" = "yes" && test -z "$EXEEXT"; then
|
| 526 |
+
gl_ADD_PROG([optional_bin_progs], [stdbuf])
|
| 527 |
+
fi
|
| 528 |
+
CFLAGS=$ac_save_CFLAGS
|
| 529 |
+
LDFLAGS=$ac_save_LDFLAGS
|
| 530 |
+
ac_c_werror_flag=$cu_save_c_werror_flag
|
| 531 |
+
|
| 532 |
+
# Don't build chcon and runcon if only have gnulib stubs
|
| 533 |
+
# Honor --without-selinux to force disable
|
| 534 |
+
# and --with-selinux to force enable.
|
| 535 |
+
if test "$with_selinux" != no &&
|
| 536 |
+
{ test "$with_selinux" = yes ||
|
| 537 |
+
test "$ac_cv_header_selinux_selinux_h" = yes; }; then
|
| 538 |
+
gl_ADD_PROG([optional_bin_progs], [chcon])
|
| 539 |
+
gl_ADD_PROG([optional_bin_progs], [runcon])
|
| 540 |
+
fi
|
| 541 |
+
|
| 542 |
+
# Test compiler support for half precision floating point types (for od)
|
| 543 |
+
AC_MSG_CHECKING([IEEE 16 bit floating point])
|
| 544 |
+
AC_CACHE_VAL([utils_cv_ieee_16_bit_supported],[
|
| 545 |
+
AC_RUN_IFELSE(
|
| 546 |
+
[AC_LANG_SOURCE([[
|
| 547 |
+
int
|
| 548 |
+
main (void)
|
| 549 |
+
{
|
| 550 |
+
volatile _Float16 hf = 1;
|
| 551 |
+
float f = hf; /* Ensure compiler can promote to float. */
|
| 552 |
+
return !(f == 1.0f);
|
| 553 |
+
}
|
| 554 |
+
]])
|
| 555 |
+
],[
|
| 556 |
+
utils_cv_ieee_16_bit_supported=yes
|
| 557 |
+
],[
|
| 558 |
+
utils_cv_ieee_16_bit_supported=no
|
| 559 |
+
],[
|
| 560 |
+
utils_cv_ieee_16_bit_supported=no
|
| 561 |
+
])])
|
| 562 |
+
AC_MSG_RESULT([$utils_cv_ieee_16_bit_supported])
|
| 563 |
+
if test $utils_cv_ieee_16_bit_supported = yes; then
|
| 564 |
+
AC_DEFINE([FLOAT16_SUPPORTED], [1], [IEEE 16 bit float supported])
|
| 565 |
+
fi
|
| 566 |
+
|
| 567 |
+
AC_MSG_CHECKING([Brain 16 bit floating point])
|
| 568 |
+
AC_CACHE_VAL([utils_cv_brain_16_bit_supported],[
|
| 569 |
+
AC_RUN_IFELSE(
|
| 570 |
+
[AC_LANG_SOURCE([[
|
| 571 |
+
int
|
| 572 |
+
main (void)
|
| 573 |
+
{
|
| 574 |
+
volatile __bf16 hf = 1;
|
| 575 |
+
float f = hf; /* Ensure compiler can promote to float. */
|
| 576 |
+
return !(f == 1.0f);
|
| 577 |
+
}
|
| 578 |
+
]])
|
| 579 |
+
],[
|
| 580 |
+
utils_cv_brain_16_bit_supported=yes
|
| 581 |
+
],[
|
| 582 |
+
utils_cv_brain_16_bit_supported=no
|
| 583 |
+
],[
|
| 584 |
+
utils_cv_brain_16_bit_supported=no
|
| 585 |
+
])])
|
| 586 |
+
AC_MSG_RESULT([$utils_cv_brain_16_bit_supported])
|
| 587 |
+
if test $utils_cv_brain_16_bit_supported = yes; then
|
| 588 |
+
AC_DEFINE([BF16_SUPPORTED], [1], [Brain 16 bit float supported])
|
| 589 |
+
fi
|
| 590 |
+
|
| 591 |
+
ac_save_CFLAGS=$CFLAGS
|
| 592 |
+
CFLAGS="-march=armv8-a+crypto $CFLAGS"
|
| 593 |
+
AC_MSG_CHECKING([if vmull intrinsic exists])
|
| 594 |
+
AC_CACHE_VAL([utils_cv_vmull_intrinsic_exists],[
|
| 595 |
+
AC_LINK_IFELSE(
|
| 596 |
+
[AC_LANG_SOURCE([[
|
| 597 |
+
#include <stdio.h>
|
| 598 |
+
#include <sys/auxv.h>
|
| 599 |
+
#include <asm/hwcap.h>
|
| 600 |
+
#include <arm_neon.h>
|
| 601 |
+
|
| 602 |
+
int
|
| 603 |
+
main (void)
|
| 604 |
+
{
|
| 605 |
+
uint64x2_t a;
|
| 606 |
+
poly64_t shift64 = vget_lane_p64(vcreate_p64(0xB8BC6765), 0);
|
| 607 |
+
a = vreinterpretq_u64_p128(vmull_p64(shift64, vreinterpretq_p128_u64(a)));
|
| 608 |
+
return (getauxval(AT_HWCAP) & HWCAP_PMULL) > 0;
|
| 609 |
+
}
|
| 610 |
+
]])
|
| 611 |
+
],[
|
| 612 |
+
utils_cv_vmull_intrinsic_exists=yes
|
| 613 |
+
],[
|
| 614 |
+
utils_cv_vmull_intrinsic_exists=no
|
| 615 |
+
])])
|
| 616 |
+
AC_MSG_RESULT([$utils_cv_vmull_intrinsic_exists])
|
| 617 |
+
if test $utils_cv_vmull_intrinsic_exists = yes; then
|
| 618 |
+
AC_DEFINE([USE_VMULL_CRC32], [1],
|
| 619 |
+
[CRC32 calculation by vmull hardware instruction enabled])
|
| 620 |
+
fi
|
| 621 |
+
AM_CONDITIONAL([USE_VMULL_CRC32],
|
| 622 |
+
[test $utils_cv_vmull_intrinsic_exists = yes])
|
| 623 |
+
CFLAGS=$ac_save_CFLAGS
|
| 624 |
+
|
| 625 |
+
ac_save_CFLAGS=$CFLAGS
|
| 626 |
+
CFLAGS="-mavx -mpclmul $CFLAGS"
|
| 627 |
+
AC_MSG_CHECKING([if pclmul intrinsic exists])
|
| 628 |
+
AC_CACHE_VAL([utils_cv_pclmul_intrinsic_exists],[
|
| 629 |
+
AC_LINK_IFELSE(
|
| 630 |
+
[AC_LANG_SOURCE([[
|
| 631 |
+
#include <x86intrin.h>
|
| 632 |
+
|
| 633 |
+
int
|
| 634 |
+
main (void)
|
| 635 |
+
{
|
| 636 |
+
__m128i a, b;
|
| 637 |
+
a = _mm_clmulepi64_si128 (a, b, 0x00);
|
| 638 |
+
a = _mm_shuffle_epi8 (a, b);
|
| 639 |
+
return __builtin_cpu_supports ("pclmul");
|
| 640 |
+
}
|
| 641 |
+
]])
|
| 642 |
+
],[
|
| 643 |
+
utils_cv_pclmul_intrinsic_exists=yes
|
| 644 |
+
],[
|
| 645 |
+
utils_cv_pclmul_intrinsic_exists=no
|
| 646 |
+
])])
|
| 647 |
+
AC_MSG_RESULT([$utils_cv_pclmul_intrinsic_exists])
|
| 648 |
+
if test $utils_cv_pclmul_intrinsic_exists = yes; then
|
| 649 |
+
AC_DEFINE([USE_PCLMUL_CRC32], [1],
|
| 650 |
+
[CRC32 calculation by pclmul hardware instruction enabled])
|
| 651 |
+
fi
|
| 652 |
+
AM_CONDITIONAL([USE_PCLMUL_CRC32],
|
| 653 |
+
[test $utils_cv_pclmul_intrinsic_exists = yes])
|
| 654 |
+
CFLAGS=$ac_save_CFLAGS
|
| 655 |
+
|
| 656 |
+
ac_save_CFLAGS=$CFLAGS
|
| 657 |
+
CFLAGS=" -mavx2 -mvpclmulqdq $CFLAGS"
|
| 658 |
+
AC_MSG_CHECKING([if avx2 pclmul intrinsic exists])
|
| 659 |
+
AC_CACHE_VAL([utils_cv_avx2_pclmul_intrinsic_exists],[
|
| 660 |
+
AC_LINK_IFELSE(
|
| 661 |
+
[AC_LANG_SOURCE([[
|
| 662 |
+
#include <x86intrin.h>
|
| 663 |
+
|
| 664 |
+
int
|
| 665 |
+
main (void)
|
| 666 |
+
{
|
| 667 |
+
__m256i a, b;
|
| 668 |
+
a = _mm256_clmulepi64_epi128 (a, b, 0x00);
|
| 669 |
+
a = _mm256_shuffle_epi8 (a, b);
|
| 670 |
+
return __builtin_cpu_supports ("avx2") &&
|
| 671 |
+
__builtin_cpu_supports ("vpclmulqdq");
|
| 672 |
+
}
|
| 673 |
+
]])
|
| 674 |
+
],[
|
| 675 |
+
utils_cv_avx2_pclmul_intrinsic_exists=yes
|
| 676 |
+
],[
|
| 677 |
+
utils_cv_avx2_pclmul_intrinsic_exists=no
|
| 678 |
+
])])
|
| 679 |
+
AC_MSG_RESULT([$utils_cv_avx2_pclmul_intrinsic_exists])
|
| 680 |
+
if test $utils_cv_avx2_pclmul_intrinsic_exists = yes; then
|
| 681 |
+
AC_DEFINE([USE_AVX2_CRC32], [1],
|
| 682 |
+
[CRC32 calculation by avx2 hardware instructions enabled])
|
| 683 |
+
fi
|
| 684 |
+
AM_CONDITIONAL([USE_AVX2_CRC32],
|
| 685 |
+
[test $utils_cv_avx2_pclmul_intrinsic_exists = yes])
|
| 686 |
+
CFLAGS=$ac_save_CFLAGS
|
| 687 |
+
|
| 688 |
+
ac_save_CFLAGS=$CFLAGS
|
| 689 |
+
CFLAGS=" -mavx512bw -mavx512f -mvpclmulqdq $CFLAGS"
|
| 690 |
+
AC_MSG_CHECKING([if avx512 pclmul intrinsic exists])
|
| 691 |
+
AC_CACHE_VAL([utils_cv_avx512_pclmul_intrinsic_exists],[
|
| 692 |
+
AC_LINK_IFELSE(
|
| 693 |
+
[AC_LANG_SOURCE([[
|
| 694 |
+
#include <x86intrin.h>
|
| 695 |
+
|
| 696 |
+
int
|
| 697 |
+
main (void)
|
| 698 |
+
{
|
| 699 |
+
__m512i a, b;
|
| 700 |
+
a = _mm512_set_epi8 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
| 701 |
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
| 702 |
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
| 703 |
+
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
| 704 |
+
a = _mm512_clmulepi64_epi128 (a, b, 0x00);
|
| 705 |
+
a = _mm512_shuffle_epi8 (a, b);
|
| 706 |
+
return (__builtin_cpu_supports ("avx512bw")
|
| 707 |
+
&& __builtin_cpu_supports ("avx512f")
|
| 708 |
+
&& __builtin_cpu_supports ("vpclmulqdq"));
|
| 709 |
+
}
|
| 710 |
+
]])
|
| 711 |
+
],[
|
| 712 |
+
utils_cv_avx512_pclmul_intrinsic_exists=yes
|
| 713 |
+
],[
|
| 714 |
+
utils_cv_avx512_pclmul_intrinsic_exists=no
|
| 715 |
+
])])
|
| 716 |
+
AC_MSG_RESULT([$utils_cv_avx512_pclmul_intrinsic_exists])
|
| 717 |
+
if test $utils_cv_avx512_pclmul_intrinsic_exists = yes; then
|
| 718 |
+
AC_DEFINE([USE_AVX512_CRC32], [1],
|
| 719 |
+
[CRC32 calculation by avx512 hardware instructions enabled])
|
| 720 |
+
fi
|
| 721 |
+
AM_CONDITIONAL([USE_AVX512_CRC32],
|
| 722 |
+
[test $utils_cv_avx512_pclmul_intrinsic_exists = yes])
|
| 723 |
+
CFLAGS=$ac_save_CFLAGS
|
| 724 |
+
|
| 725 |
+
CFLAGS="-mavx2 $CFLAGS"
|
| 726 |
+
AC_MSG_CHECKING([for avx2 intrinsics])
|
| 727 |
+
AC_CACHE_VAL([utils_cv_avx2_intrinsic_exists],[
|
| 728 |
+
AC_LINK_IFELSE(
|
| 729 |
+
[AC_LANG_SOURCE([[
|
| 730 |
+
#include <x86intrin.h>
|
| 731 |
+
|
| 732 |
+
int
|
| 733 |
+
main (void)
|
| 734 |
+
{
|
| 735 |
+
__m256i matches = _mm256_setzero_si256 ();
|
| 736 |
+
int mask = _mm256_movemask_epi8 (matches);
|
| 737 |
+
int lines = __builtin_popcount (mask);
|
| 738 |
+
return __builtin_cpu_supports ("avx2");
|
| 739 |
+
}
|
| 740 |
+
]])
|
| 741 |
+
],[
|
| 742 |
+
utils_cv_avx2_intrinsic_exists=yes
|
| 743 |
+
],[
|
| 744 |
+
utils_cv_avx2_intrinsic_exists=no
|
| 745 |
+
])])
|
| 746 |
+
AC_MSG_RESULT([$utils_cv_avx2_intrinsic_exists])
|
| 747 |
+
if test $utils_cv_avx2_intrinsic_exists = yes; then
|
| 748 |
+
AC_DEFINE([USE_AVX2_WC_LINECOUNT], [1], [Counting lines with AVX2 enabled])
|
| 749 |
+
fi
|
| 750 |
+
AM_CONDITIONAL([USE_AVX2_WC_LINECOUNT],
|
| 751 |
+
[test $utils_cv_avx2_intrinsic_exists = yes])
|
| 752 |
+
|
| 753 |
+
CFLAGS=$ac_save_CFLAGS
|
| 754 |
+
|
| 755 |
+
CFLAGS="-mavx512bw -mavx512f $CFLAGS"
|
| 756 |
+
AC_MSG_CHECKING([for avx512 intrinsics])
|
| 757 |
+
AC_CACHE_VAL([utils_cv_avx512_intrinsic_exists],[
|
| 758 |
+
AC_LINK_IFELSE(
|
| 759 |
+
[AC_LANG_SOURCE([[
|
| 760 |
+
#include <x86intrin.h>
|
| 761 |
+
|
| 762 |
+
int
|
| 763 |
+
main (void)
|
| 764 |
+
{
|
| 765 |
+
__m512i matches = _mm512_setzero_si512 ();
|
| 766 |
+
long long mask = _mm512_movepi8_mask (matches);
|
| 767 |
+
int lines = __builtin_popcountll (mask);
|
| 768 |
+
return (__builtin_cpu_supports ("avx512bw")
|
| 769 |
+
&& __builtin_cpu_supports ("avx512f"));
|
| 770 |
+
}
|
| 771 |
+
]])
|
| 772 |
+
],[
|
| 773 |
+
utils_cv_avx512_intrinsic_exists=yes
|
| 774 |
+
],[
|
| 775 |
+
utils_cv_avx512_intrinsic_exists=no
|
| 776 |
+
])])
|
| 777 |
+
AC_MSG_RESULT([$utils_cv_avx512_intrinsic_exists])
|
| 778 |
+
if test $utils_cv_avx512_intrinsic_exists = yes; then
|
| 779 |
+
AC_DEFINE([USE_AVX512_WC_LINECOUNT], [1],
|
| 780 |
+
[Counting lines with AVX512 enabled])
|
| 781 |
+
fi
|
| 782 |
+
AM_CONDITIONAL([USE_AVX512_WC_LINECOUNT],
|
| 783 |
+
[test $utils_cv_avx512_intrinsic_exists = yes])
|
| 784 |
+
|
| 785 |
+
CFLAGS=$ac_save_CFLAGS
|
| 786 |
+
############################################################################
|
| 787 |
+
|
| 788 |
+
dnl Autogenerated by the 'gen-lists-of-programs.sh' auxiliary script.
|
| 789 |
+
dnl Issue proper calls to the macros gl_INCLUDE_EXCLUDE_PROG and
|
| 790 |
+
dnl gl_ADD_PROG (updating $optional_bin_progs), and generate the list
|
| 791 |
+
dnl of coreutils programs to be built only upon explicit user request,
|
| 792 |
+
dnl saving that list in the $no_install_progs_default shell variable.
|
| 793 |
+
m4_include([m4/cu-progs.m4])
|
| 794 |
+
|
| 795 |
+
# Now that we know which programs will actually be built, determine
|
| 796 |
+
# which optional helper progs should be compiled.
|
| 797 |
+
# Note it adding to pkglibexec_PROGRAMS, $(transform) in src/local.mk
|
| 798 |
+
# may need to be updated accordingly.
|
| 799 |
+
case " $optional_bin_progs " in
|
| 800 |
+
*' stdbuf '*) pkglibexec_PROGRAMS='src/libstdbuf.so';;
|
| 801 |
+
*) pkglibexec_PROGRAMS='';;
|
| 802 |
+
esac
|
| 803 |
+
|
| 804 |
+
man1_MANS=`
|
| 805 |
+
for p in $optional_bin_progs; do
|
| 806 |
+
# Change "ginstall.1" to "install.1".
|
| 807 |
+
test $p = ginstall && p=install
|
| 808 |
+
# Ignore the "[" program, since writing a portable make rule to
|
| 809 |
+
# generate its manpage is not practical.
|
| 810 |
+
dnl Use the autoconf-provided quadrigraph to represent "[",
|
| 811 |
+
dnl otherwise we will incur in dreadful quoting issues.
|
| 812 |
+
test x$p = x'@<:@' && continue
|
| 813 |
+
echo "man/$p.1"
|
| 814 |
+
done`
|
| 815 |
+
|
| 816 |
+
# Not installed by "make install", but must be built when creating
|
| 817 |
+
# a distribution tarball.
|
| 818 |
+
EXTRA_MANS=`for p in $no_install_progs_default $gl_no_install_prog; do
|
| 819 |
+
echo man/$p.1
|
| 820 |
+
done`
|
| 821 |
+
|
| 822 |
+
# Replace all the programs by the single binary and symlinks if specified.
|
| 823 |
+
single_binary_progs=
|
| 824 |
+
single_binary_libs=
|
| 825 |
+
single_binary_deps=
|
| 826 |
+
single_binary_install_type=
|
| 827 |
+
if test "$gl_single_binary" != no; then
|
| 828 |
+
man1_MANS="$man1_MANS man/coreutils.1"
|
| 829 |
+
# Convert the list to a space separated list
|
| 830 |
+
gl_single_binary_exceptions=`echo $gl_single_binary_exceptions | tr ',' ' '`
|
| 831 |
+
|
| 832 |
+
single_binary_progs=`echo $optional_bin_progs`
|
| 833 |
+
optional_bin_progs="coreutils"
|
| 834 |
+
for prog in $gl_single_binary_exceptions; do
|
| 835 |
+
# Fail if requested to exclude a program than was not part of coreutils.
|
| 836 |
+
case " $single_binary_progs " in
|
| 837 |
+
*" $prog "*)
|
| 838 |
+
gl_REMOVE_PROG([single_binary_progs], [$prog]) ;
|
| 839 |
+
gl_ADD_PROG([optional_bin_progs], [$prog]) ;;
|
| 840 |
+
*) AC_MSG_ERROR(['$prog' is not being compiled.]) ;;
|
| 841 |
+
esac
|
| 842 |
+
done
|
| 843 |
+
|
| 844 |
+
# single_binary_libs holds the list of libs required by the selected
|
| 845 |
+
# programs, such as for example -lrt.
|
| 846 |
+
single_binary_libs=`
|
| 847 |
+
for p in $single_binary_progs; do
|
| 848 |
+
# Convert '[' to '_'
|
| 849 |
+
test x"$p" = x'@<:@' && p='_'
|
| 850 |
+
printf '$(src_libsinglebin_%s_a_ldadd) ' "$p"
|
| 851 |
+
done`
|
| 852 |
+
# single_binary_deps holds the list of libsinglebin_*.a files that have the
|
| 853 |
+
# compiled code of each selected program in a "library" format.
|
| 854 |
+
single_binary_deps=`
|
| 855 |
+
for p in $single_binary_progs; do
|
| 856 |
+
# Convert '[' to '_'
|
| 857 |
+
test x"$p" = x'@<:@' && p='_'
|
| 858 |
+
printf 'src/libsinglebin_%s.a ' "$p"
|
| 859 |
+
done`
|
| 860 |
+
single_binary_install_type="$gl_single_binary"
|
| 861 |
+
fi
|
| 862 |
+
AC_SUBST([single_binary_progs], [$single_binary_progs])
|
| 863 |
+
AC_SUBST([single_binary_libs], [$single_binary_libs])
|
| 864 |
+
AC_SUBST([single_binary_deps], [$single_binary_deps])
|
| 865 |
+
AC_SUBST([single_binary_install_type], [$single_binary_install_type])
|
| 866 |
+
|
| 867 |
+
|
| 868 |
+
# The programs built and installed by "make && make install".
|
| 869 |
+
# Since this is AC_SUBST'd, Automake won't be able to perform rewrite
|
| 870 |
+
# with $(EXEEXT) appending on it, so we have to do it ourselves -- in
|
| 871 |
+
# this case, only for $(bin_PROGRAMS).
|
| 872 |
+
bin_PROGRAMS=`
|
| 873 |
+
for p in $optional_bin_progs; do echo src/"$p"'$(EXEEXT)'; done`
|
| 874 |
+
|
| 875 |
+
# Normalize whitespace.
|
| 876 |
+
man1_MANS=`echo $man1_MANS`
|
| 877 |
+
EXTRA_MANS=`echo $EXTRA_MANS`
|
| 878 |
+
bin_PROGRAMS=`echo $bin_PROGRAMS`
|
| 879 |
+
pkglibexec_PROGS=`echo $pkglibexec_PROGRAMS`
|
| 880 |
+
|
| 881 |
+
AC_SUBST([bin_PROGRAMS]) AM_SUBST_NOTMAKE([bin_PROGRAMS])
|
| 882 |
+
AC_SUBST([pkglibexec_PROGRAMS]) AM_SUBST_NOTMAKE([pkglibexec_PROGRAMS])
|
| 883 |
+
AC_SUBST([man1_MANS]) AM_SUBST_NOTMAKE([man1_MANS])
|
| 884 |
+
AC_SUBST([EXTRA_MANS]) AM_SUBST_NOTMAKE([EXTRA_MANS])
|
| 885 |
+
|
| 886 |
+
AC_SUBST([built_programs], [$optional_bin_progs])
|
| 887 |
+
|
| 888 |
+
AM_CONDITIONAL([CROSS_COMPILING], [test "$cross_compiling" = yes])
|
| 889 |
+
|
| 890 |
+
############################################################################
|
| 891 |
+
|
| 892 |
+
# As long as "grep 'PRI[diouxX]' po/*.pot" reports matches in
|
| 893 |
+
# translatable strings, we must use need-formatstring-macros here.
|
| 894 |
+
AM_GNU_GETTEXT([external], [need-formatstring-macros])
|
| 895 |
+
AM_GNU_GETTEXT_VERSION([0.19.2])
|
| 896 |
+
|
| 897 |
+
# For a test of uniq: it uses the $LOCALE_FR envvar.
|
| 898 |
+
gt_LOCALE_FR
|
| 899 |
+
|
| 900 |
+
AC_CONFIG_FILES(
|
| 901 |
+
Makefile
|
| 902 |
+
po/Makefile.in
|
| 903 |
+
gnulib-tests/Makefile
|
| 904 |
+
)
|
| 905 |
+
AC_OUTPUT
|
default.profraw
ADDED
|
Binary file (384 Bytes). View file
|
|
|
dist-check.mk
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Most of this is probably too coreutils-centric to be useful to other packages.
|
| 2 |
+
|
| 3 |
+
bin=bin-$$$$
|
| 4 |
+
|
| 5 |
+
write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
|
| 6 |
+
|
| 7 |
+
tmpdir = $(abs_top_builddir)/tests/torture
|
| 8 |
+
|
| 9 |
+
t=$(tmpdir)/$(PACKAGE)/test
|
| 10 |
+
pfx=$(t)/i
|
| 11 |
+
|
| 12 |
+
built_programs := $(sort $(patsubst src/%$(EXEEXT),%,$(bin_PROGRAMS)))
|
| 13 |
+
|
| 14 |
+
# More than once, tainted build and source directory names would
|
| 15 |
+
# have caused at least one "make check" test to apply "chmod 700"
|
| 16 |
+
# to all directories under $HOME. Make sure it doesn't happen again.
|
| 17 |
+
tp = $(tmpdir)/taint
|
| 18 |
+
t_prefix = $(tp)/a
|
| 19 |
+
t_taint = '$(t_prefix) b'
|
| 20 |
+
fake_home = $(tp)/home
|
| 21 |
+
|
| 22 |
+
# When extracting from a distribution tarball, extract using the fastest
|
| 23 |
+
# method possible. With dist-xz, that means using the *.xz file.
|
| 24 |
+
ifneq ('', $(filter *.xz, $(DIST_ARCHIVES)))
|
| 25 |
+
tar_decompress_opt_ = J
|
| 26 |
+
suffix_ = xz
|
| 27 |
+
else
|
| 28 |
+
ifneq ('', $(filter *.gz, $(DIST_ARCHIVES)))
|
| 29 |
+
tar_decompress_opt_ = z
|
| 30 |
+
suffix_ = gz
|
| 31 |
+
else
|
| 32 |
+
tar_decompress_opt_ = j
|
| 33 |
+
suffix_ = bz2
|
| 34 |
+
endif
|
| 35 |
+
endif
|
| 36 |
+
amtar_extract_ = $(AMTAR) -$(tar_decompress_opt_)xf
|
| 37 |
+
preferred_tarball_ = $(distdir).tar.$(suffix_)
|
| 38 |
+
|
| 39 |
+
# Ensure that tests run from tainted build and src dir names work,
|
| 40 |
+
# and don't affect anything in $HOME. Create witness files in $HOME,
|
| 41 |
+
# record their attributes, and build/test. Then ensure that the
|
| 42 |
+
# witnesses were not affected.
|
| 43 |
+
# Skip this test when using libtool, since libtool-generated scripts
|
| 44 |
+
# cannot deal with a space-tainted srcdir.
|
| 45 |
+
ALL_RECURSIVE_TARGETS += taint-distcheck
|
| 46 |
+
taint-distcheck: $(DIST_ARCHIVES)
|
| 47 |
+
grep '^[ ]*LT_INIT' configure.ac >/dev/null && exit 0 || :
|
| 48 |
+
test -d $(t_taint) && chmod -R 700 $(t_taint) || :
|
| 49 |
+
-rm -rf $(t_taint) $(fake_home)
|
| 50 |
+
mkdir -p $(t_prefix) $(t_taint) $(fake_home)
|
| 51 |
+
$(amtar_extract_) $(preferred_tarball_) -C $(t_taint)
|
| 52 |
+
mkfifo $(fake_home)/fifo
|
| 53 |
+
touch $(fake_home)/f
|
| 54 |
+
mkdir -p $(fake_home)/d/e
|
| 55 |
+
ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-before
|
| 56 |
+
HOME=$(fake_home); export HOME; \
|
| 57 |
+
cd $(t_taint)/$(distdir) \
|
| 58 |
+
&& ./configure \
|
| 59 |
+
&& $(MAKE) \
|
| 60 |
+
&& $(MAKE) check \
|
| 61 |
+
&& ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-after \
|
| 62 |
+
&& diff $(tp)/.ls-before $(tp)/.ls-after \
|
| 63 |
+
&& test -d $(t_prefix)
|
| 64 |
+
rm -rf $(tp)
|
| 65 |
+
|
| 66 |
+
# Verify that a twisted use of --program-transform-name=PROGRAM works.
|
| 67 |
+
define install-transform-check
|
| 68 |
+
echo running install-transform-check \
|
| 69 |
+
&& rm -rf $(pfx) \
|
| 70 |
+
&& $(MAKE) program_transform_name='s/.*/zyx/' \
|
| 71 |
+
prefix=$(pfx) install \
|
| 72 |
+
&& test "$$(echo $(pfx)/bin/*)" = "$(pfx)/bin/zyx" \
|
| 73 |
+
&& test "$$(find $(pfx)/share/man -type f|sed 's,.*/,,;s,\..*,,')" = "zyx"
|
| 74 |
+
endef
|
| 75 |
+
|
| 76 |
+
# Install, then verify that all binaries and man pages are in place.
|
| 77 |
+
# Note that neither the binary, ginstall, nor the [.1 man page is installed.
|
| 78 |
+
define my-instcheck
|
| 79 |
+
echo running my-instcheck; \
|
| 80 |
+
$(MAKE) prefix=$(pfx) install \
|
| 81 |
+
&& test ! -f $(pfx)/bin/ginstall \
|
| 82 |
+
&& { fail=0; \
|
| 83 |
+
for i in $(built_programs); do \
|
| 84 |
+
test "$$i" = ginstall && i=install; \
|
| 85 |
+
for j in "$(pfx)/bin/$$i" \
|
| 86 |
+
"$(pfx)/share/man/man1/$$i.1"; do \
|
| 87 |
+
case $$j in *'[.1') continue;; esac; \
|
| 88 |
+
test -f "$$j" && : \
|
| 89 |
+
|| { echo "$$j not installed"; fail=1; }; \
|
| 90 |
+
done; \
|
| 91 |
+
done; \
|
| 92 |
+
test $$fail = 1 && exit 1 || :; \
|
| 93 |
+
}
|
| 94 |
+
endef
|
| 95 |
+
|
| 96 |
+
# Use this to make sure we don't run these programs when building
|
| 97 |
+
# from a virgin compressed tarball file, below.
|
| 98 |
+
null_AM_MAKEFLAGS ?= \
|
| 99 |
+
ACLOCAL=false \
|
| 100 |
+
AUTOCONF=false \
|
| 101 |
+
AUTOMAKE=false \
|
| 102 |
+
AUTOHEADER=false \
|
| 103 |
+
GPERF=false \
|
| 104 |
+
MAKEINFO=false
|
| 105 |
+
|
| 106 |
+
ALL_RECURSIVE_TARGETS += my-distcheck
|
| 107 |
+
my-distcheck: $(DIST_ARCHIVES) $(local-check)
|
| 108 |
+
$(MAKE) syntax-check
|
| 109 |
+
$(MAKE) check
|
| 110 |
+
-rm -rf $(t)
|
| 111 |
+
mkdir -p $(t)
|
| 112 |
+
$(amtar_extract_) $(preferred_tarball_) -C $(t)
|
| 113 |
+
(set -e; cd $(t)/$(distdir); \
|
| 114 |
+
./configure --quiet --enable-gcc-warnings --disable-nls; \
|
| 115 |
+
$(MAKE) AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)'; \
|
| 116 |
+
$(MAKE) dvi; \
|
| 117 |
+
$(install-transform-check); \
|
| 118 |
+
$(my-instcheck); \
|
| 119 |
+
$(MAKE) distclean \
|
| 120 |
+
)
|
| 121 |
+
(cd $(t) && mv $(distdir) $(distdir).old \
|
| 122 |
+
&& $(amtar_extract_) - ) < $(preferred_tarball_)
|
| 123 |
+
# With post-v1.15 automake, "distclean" would fail to remove .deps
|
| 124 |
+
# directories, leading to a spurious failure of the following recursive diff.
|
| 125 |
+
# FIXME: remove this, once automake is fixed.
|
| 126 |
+
find $(t)/$(distdir).old $(t)/$(distdir) -name .deps | xargs -r rmdir
|
| 127 |
+
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
| 128 |
+
-rm -rf $(t)
|
| 129 |
+
rmdir $(tmpdir)/$(PACKAGE) $(tmpdir)
|
| 130 |
+
@echo "========================"; \
|
| 131 |
+
echo "ready for distribution:"; \
|
| 132 |
+
for i in $(DIST_ARCHIVES); do echo " $$i"; done; \
|
| 133 |
+
echo "========================"
|
doc/.dirstamp
ADDED
|
File without changes
|
doc/.gitignore
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/.dirstamp
|
| 2 |
+
/constants.texi
|
| 3 |
+
/coreutils.aux
|
| 4 |
+
/coreutils.cp
|
| 5 |
+
/coreutils.cps
|
| 6 |
+
/coreutils.dvi
|
| 7 |
+
/coreutils.fl
|
| 8 |
+
/coreutils.fn
|
| 9 |
+
/coreutils.html
|
| 10 |
+
/coreutils.info
|
| 11 |
+
/coreutils.ky
|
| 12 |
+
/coreutils.log
|
| 13 |
+
/coreutils.op
|
| 14 |
+
/coreutils.pdf
|
| 15 |
+
/coreutils.pg
|
| 16 |
+
/coreutils.ps
|
| 17 |
+
/coreutils.t2d/
|
| 18 |
+
/coreutils.t2p/
|
| 19 |
+
/coreutils.toc
|
| 20 |
+
/coreutils.tp
|
| 21 |
+
/coreutils.vr
|
| 22 |
+
/gendocs_template
|
| 23 |
+
/gendocs_template_min
|
| 24 |
+
/parse-datetime.texi
|
| 25 |
+
/stamp-vti
|
| 26 |
+
/version.texi
|
doc/constants.texi
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@set DEFAULT_MAX_N_UNCHANGED_STATS_BETWEEN_OPENS 5
|
| 2 |
+
@set SHRED_DEFAULT_PASSES 3
|
doc/coreutils.info
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
doc/coreutils.texi
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
doc/fdl.texi
ADDED
|
@@ -0,0 +1,505 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@c The GNU Free Documentation License.
|
| 2 |
+
@center Version 1.3, 3 November 2008
|
| 3 |
+
|
| 4 |
+
@c This file is intended to be included within another document,
|
| 5 |
+
@c hence no sectioning command or @node.
|
| 6 |
+
|
| 7 |
+
@display
|
| 8 |
+
Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
|
| 9 |
+
@uref{https://fsf.org/}
|
| 10 |
+
|
| 11 |
+
Everyone is permitted to copy and distribute verbatim copies
|
| 12 |
+
of this license document, but changing it is not allowed.
|
| 13 |
+
@end display
|
| 14 |
+
|
| 15 |
+
@enumerate 0
|
| 16 |
+
@item
|
| 17 |
+
PREAMBLE
|
| 18 |
+
|
| 19 |
+
The purpose of this License is to make a manual, textbook, or other
|
| 20 |
+
functional and useful document @dfn{free} in the sense of freedom: to
|
| 21 |
+
assure everyone the effective freedom to copy and redistribute it,
|
| 22 |
+
with or without modifying it, either commercially or noncommercially.
|
| 23 |
+
Secondarily, this License preserves for the author and publisher a way
|
| 24 |
+
to get credit for their work, while not being considered responsible
|
| 25 |
+
for modifications made by others.
|
| 26 |
+
|
| 27 |
+
This License is a kind of ``copyleft'', which means that derivative
|
| 28 |
+
works of the document must themselves be free in the same sense. It
|
| 29 |
+
complements the GNU General Public License, which is a copyleft
|
| 30 |
+
license designed for free software.
|
| 31 |
+
|
| 32 |
+
We have designed this License in order to use it for manuals for free
|
| 33 |
+
software, because free software needs free documentation: a free
|
| 34 |
+
program should come with manuals providing the same freedoms that the
|
| 35 |
+
software does. But this License is not limited to software manuals;
|
| 36 |
+
it can be used for any textual work, regardless of subject matter or
|
| 37 |
+
whether it is published as a printed book. We recommend this License
|
| 38 |
+
principally for works whose purpose is instruction or reference.
|
| 39 |
+
|
| 40 |
+
@item
|
| 41 |
+
APPLICABILITY AND DEFINITIONS
|
| 42 |
+
|
| 43 |
+
This License applies to any manual or other work, in any medium, that
|
| 44 |
+
contains a notice placed by the copyright holder saying it can be
|
| 45 |
+
distributed under the terms of this License. Such a notice grants a
|
| 46 |
+
world-wide, royalty-free license, unlimited in duration, to use that
|
| 47 |
+
work under the conditions stated herein. The ``Document'', below,
|
| 48 |
+
refers to any such manual or work. Any member of the public is a
|
| 49 |
+
licensee, and is addressed as ``you''. You accept the license if you
|
| 50 |
+
copy, modify or distribute the work in a way requiring permission
|
| 51 |
+
under copyright law.
|
| 52 |
+
|
| 53 |
+
A ``Modified Version'' of the Document means any work containing the
|
| 54 |
+
Document or a portion of it, either copied verbatim, or with
|
| 55 |
+
modifications and/or translated into another language.
|
| 56 |
+
|
| 57 |
+
A ``Secondary Section'' is a named appendix or a front-matter section
|
| 58 |
+
of the Document that deals exclusively with the relationship of the
|
| 59 |
+
publishers or authors of the Document to the Document's overall
|
| 60 |
+
subject (or to related matters) and contains nothing that could fall
|
| 61 |
+
directly within that overall subject. (Thus, if the Document is in
|
| 62 |
+
part a textbook of mathematics, a Secondary Section may not explain
|
| 63 |
+
any mathematics.) The relationship could be a matter of historical
|
| 64 |
+
connection with the subject or with related matters, or of legal,
|
| 65 |
+
commercial, philosophical, ethical or political position regarding
|
| 66 |
+
them.
|
| 67 |
+
|
| 68 |
+
The ``Invariant Sections'' are certain Secondary Sections whose titles
|
| 69 |
+
are designated, as being those of Invariant Sections, in the notice
|
| 70 |
+
that says that the Document is released under this License. If a
|
| 71 |
+
section does not fit the above definition of Secondary then it is not
|
| 72 |
+
allowed to be designated as Invariant. The Document may contain zero
|
| 73 |
+
Invariant Sections. If the Document does not identify any Invariant
|
| 74 |
+
Sections then there are none.
|
| 75 |
+
|
| 76 |
+
The ``Cover Texts'' are certain short passages of text that are listed,
|
| 77 |
+
as Front-Cover Texts or Back-Cover Texts, in the notice that says that
|
| 78 |
+
the Document is released under this License. A Front-Cover Text may
|
| 79 |
+
be at most 5 words, and a Back-Cover Text may be at most 25 words.
|
| 80 |
+
|
| 81 |
+
A ``Transparent'' copy of the Document means a machine-readable copy,
|
| 82 |
+
represented in a format whose specification is available to the
|
| 83 |
+
general public, that is suitable for revising the document
|
| 84 |
+
straightforwardly with generic text editors or (for images composed of
|
| 85 |
+
pixels) generic paint programs or (for drawings) some widely available
|
| 86 |
+
drawing editor, and that is suitable for input to text formatters or
|
| 87 |
+
for automatic translation to a variety of formats suitable for input
|
| 88 |
+
to text formatters. A copy made in an otherwise Transparent file
|
| 89 |
+
format whose markup, or absence of markup, has been arranged to thwart
|
| 90 |
+
or discourage subsequent modification by readers is not Transparent.
|
| 91 |
+
An image format is not Transparent if used for any substantial amount
|
| 92 |
+
of text. A copy that is not ``Transparent'' is called ``Opaque''.
|
| 93 |
+
|
| 94 |
+
Examples of suitable formats for Transparent copies include plain
|
| 95 |
+
ASCII without markup, Texinfo input format, La@TeX{} input
|
| 96 |
+
format, SGML or XML using a publicly available
|
| 97 |
+
DTD, and standard-conforming simple HTML,
|
| 98 |
+
PostScript or PDF designed for human modification. Examples
|
| 99 |
+
of transparent image formats include PNG, XCF and
|
| 100 |
+
JPG@. Opaque formats include proprietary formats that can be
|
| 101 |
+
read and edited only by proprietary word processors, SGML or
|
| 102 |
+
XML for which the DTD and/or processing tools are
|
| 103 |
+
not generally available, and the machine-generated HTML,
|
| 104 |
+
PostScript or PDF produced by some word processors for
|
| 105 |
+
output purposes only.
|
| 106 |
+
|
| 107 |
+
The ``Title Page'' means, for a printed book, the title page itself,
|
| 108 |
+
plus such following pages as are needed to hold, legibly, the material
|
| 109 |
+
this License requires to appear in the title page. For works in
|
| 110 |
+
formats which do not have any title page as such, ``Title Page'' means
|
| 111 |
+
the text near the most prominent appearance of the work's title,
|
| 112 |
+
preceding the beginning of the body of the text.
|
| 113 |
+
|
| 114 |
+
The ``publisher'' means any person or entity that distributes copies
|
| 115 |
+
of the Document to the public.
|
| 116 |
+
|
| 117 |
+
A section ``Entitled XYZ'' means a named subunit of the Document whose
|
| 118 |
+
title either is precisely XYZ or contains XYZ in parentheses following
|
| 119 |
+
text that translates XYZ in another language. (Here XYZ stands for a
|
| 120 |
+
specific section name mentioned below, such as ``Acknowledgements'',
|
| 121 |
+
``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
|
| 122 |
+
of such a section when you modify the Document means that it remains a
|
| 123 |
+
section ``Entitled XYZ'' according to this definition.
|
| 124 |
+
|
| 125 |
+
The Document may include Warranty Disclaimers next to the notice which
|
| 126 |
+
states that this License applies to the Document. These Warranty
|
| 127 |
+
Disclaimers are considered to be included by reference in this
|
| 128 |
+
License, but only as regards disclaiming warranties: any other
|
| 129 |
+
implication that these Warranty Disclaimers may have is void and has
|
| 130 |
+
no effect on the meaning of this License.
|
| 131 |
+
|
| 132 |
+
@item
|
| 133 |
+
VERBATIM COPYING
|
| 134 |
+
|
| 135 |
+
You may copy and distribute the Document in any medium, either
|
| 136 |
+
commercially or noncommercially, provided that this License, the
|
| 137 |
+
copyright notices, and the license notice saying this License applies
|
| 138 |
+
to the Document are reproduced in all copies, and that you add no other
|
| 139 |
+
conditions whatsoever to those of this License. You may not use
|
| 140 |
+
technical measures to obstruct or control the reading or further
|
| 141 |
+
copying of the copies you make or distribute. However, you may accept
|
| 142 |
+
compensation in exchange for copies. If you distribute a large enough
|
| 143 |
+
number of copies you must also follow the conditions in section 3.
|
| 144 |
+
|
| 145 |
+
You may also lend copies, under the same conditions stated above, and
|
| 146 |
+
you may publicly display copies.
|
| 147 |
+
|
| 148 |
+
@item
|
| 149 |
+
COPYING IN QUANTITY
|
| 150 |
+
|
| 151 |
+
If you publish printed copies (or copies in media that commonly have
|
| 152 |
+
printed covers) of the Document, numbering more than 100, and the
|
| 153 |
+
Document's license notice requires Cover Texts, you must enclose the
|
| 154 |
+
copies in covers that carry, clearly and legibly, all these Cover
|
| 155 |
+
Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
|
| 156 |
+
the back cover. Both covers must also clearly and legibly identify
|
| 157 |
+
you as the publisher of these copies. The front cover must present
|
| 158 |
+
the full title with all words of the title equally prominent and
|
| 159 |
+
visible. You may add other material on the covers in addition.
|
| 160 |
+
Copying with changes limited to the covers, as long as they preserve
|
| 161 |
+
the title of the Document and satisfy these conditions, can be treated
|
| 162 |
+
as verbatim copying in other respects.
|
| 163 |
+
|
| 164 |
+
If the required texts for either cover are too voluminous to fit
|
| 165 |
+
legibly, you should put the first ones listed (as many as fit
|
| 166 |
+
reasonably) on the actual cover, and continue the rest onto adjacent
|
| 167 |
+
pages.
|
| 168 |
+
|
| 169 |
+
If you publish or distribute Opaque copies of the Document numbering
|
| 170 |
+
more than 100, you must either include a machine-readable Transparent
|
| 171 |
+
copy along with each Opaque copy, or state in or with each Opaque copy
|
| 172 |
+
a computer-network location from which the general network-using
|
| 173 |
+
public has access to download using public-standard network protocols
|
| 174 |
+
a complete Transparent copy of the Document, free of added material.
|
| 175 |
+
If you use the latter option, you must take reasonably prudent steps,
|
| 176 |
+
when you begin distribution of Opaque copies in quantity, to ensure
|
| 177 |
+
that this Transparent copy will remain thus accessible at the stated
|
| 178 |
+
location until at least one year after the last time you distribute an
|
| 179 |
+
Opaque copy (directly or through your agents or retailers) of that
|
| 180 |
+
edition to the public.
|
| 181 |
+
|
| 182 |
+
It is requested, but not required, that you contact the authors of the
|
| 183 |
+
Document well before redistributing any large number of copies, to give
|
| 184 |
+
them a chance to provide you with an updated version of the Document.
|
| 185 |
+
|
| 186 |
+
@item
|
| 187 |
+
MODIFICATIONS
|
| 188 |
+
|
| 189 |
+
You may copy and distribute a Modified Version of the Document under
|
| 190 |
+
the conditions of sections 2 and 3 above, provided that you release
|
| 191 |
+
the Modified Version under precisely this License, with the Modified
|
| 192 |
+
Version filling the role of the Document, thus licensing distribution
|
| 193 |
+
and modification of the Modified Version to whoever possesses a copy
|
| 194 |
+
of it. In addition, you must do these things in the Modified Version:
|
| 195 |
+
|
| 196 |
+
@enumerate A
|
| 197 |
+
@item
|
| 198 |
+
Use in the Title Page (and on the covers, if any) a title distinct
|
| 199 |
+
from that of the Document, and from those of previous versions
|
| 200 |
+
(which should, if there were any, be listed in the History section
|
| 201 |
+
of the Document). You may use the same title as a previous version
|
| 202 |
+
if the original publisher of that version gives permission.
|
| 203 |
+
|
| 204 |
+
@item
|
| 205 |
+
List on the Title Page, as authors, one or more persons or entities
|
| 206 |
+
responsible for authorship of the modifications in the Modified
|
| 207 |
+
Version, together with at least five of the principal authors of the
|
| 208 |
+
Document (all of its principal authors, if it has fewer than five),
|
| 209 |
+
unless they release you from this requirement.
|
| 210 |
+
|
| 211 |
+
@item
|
| 212 |
+
State on the Title page the name of the publisher of the
|
| 213 |
+
Modified Version, as the publisher.
|
| 214 |
+
|
| 215 |
+
@item
|
| 216 |
+
Preserve all the copyright notices of the Document.
|
| 217 |
+
|
| 218 |
+
@item
|
| 219 |
+
Add an appropriate copyright notice for your modifications
|
| 220 |
+
adjacent to the other copyright notices.
|
| 221 |
+
|
| 222 |
+
@item
|
| 223 |
+
Include, immediately after the copyright notices, a license notice
|
| 224 |
+
giving the public permission to use the Modified Version under the
|
| 225 |
+
terms of this License, in the form shown in the Addendum below.
|
| 226 |
+
|
| 227 |
+
@item
|
| 228 |
+
Preserve in that license notice the full lists of Invariant Sections
|
| 229 |
+
and required Cover Texts given in the Document's license notice.
|
| 230 |
+
|
| 231 |
+
@item
|
| 232 |
+
Include an unaltered copy of this License.
|
| 233 |
+
|
| 234 |
+
@item
|
| 235 |
+
Preserve the section Entitled ``History'', Preserve its Title, and add
|
| 236 |
+
to it an item stating at least the title, year, new authors, and
|
| 237 |
+
publisher of the Modified Version as given on the Title Page. If
|
| 238 |
+
there is no section Entitled ``History'' in the Document, create one
|
| 239 |
+
stating the title, year, authors, and publisher of the Document as
|
| 240 |
+
given on its Title Page, then add an item describing the Modified
|
| 241 |
+
Version as stated in the previous sentence.
|
| 242 |
+
|
| 243 |
+
@item
|
| 244 |
+
Preserve the network location, if any, given in the Document for
|
| 245 |
+
public access to a Transparent copy of the Document, and likewise
|
| 246 |
+
the network locations given in the Document for previous versions
|
| 247 |
+
it was based on. These may be placed in the ``History'' section.
|
| 248 |
+
You may omit a network location for a work that was published at
|
| 249 |
+
least four years before the Document itself, or if the original
|
| 250 |
+
publisher of the version it refers to gives permission.
|
| 251 |
+
|
| 252 |
+
@item
|
| 253 |
+
For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
|
| 254 |
+
the Title of the section, and preserve in the section all the
|
| 255 |
+
substance and tone of each of the contributor acknowledgements and/or
|
| 256 |
+
dedications given therein.
|
| 257 |
+
|
| 258 |
+
@item
|
| 259 |
+
Preserve all the Invariant Sections of the Document,
|
| 260 |
+
unaltered in their text and in their titles. Section numbers
|
| 261 |
+
or the equivalent are not considered part of the section titles.
|
| 262 |
+
|
| 263 |
+
@item
|
| 264 |
+
Delete any section Entitled ``Endorsements''. Such a section
|
| 265 |
+
may not be included in the Modified Version.
|
| 266 |
+
|
| 267 |
+
@item
|
| 268 |
+
Do not retitle any existing section to be Entitled ``Endorsements'' or
|
| 269 |
+
to conflict in title with any Invariant Section.
|
| 270 |
+
|
| 271 |
+
@item
|
| 272 |
+
Preserve any Warranty Disclaimers.
|
| 273 |
+
@end enumerate
|
| 274 |
+
|
| 275 |
+
If the Modified Version includes new front-matter sections or
|
| 276 |
+
appendices that qualify as Secondary Sections and contain no material
|
| 277 |
+
copied from the Document, you may at your option designate some or all
|
| 278 |
+
of these sections as invariant. To do this, add their titles to the
|
| 279 |
+
list of Invariant Sections in the Modified Version's license notice.
|
| 280 |
+
These titles must be distinct from any other section titles.
|
| 281 |
+
|
| 282 |
+
You may add a section Entitled ``Endorsements'', provided it contains
|
| 283 |
+
nothing but endorsements of your Modified Version by various
|
| 284 |
+
parties---for example, statements of peer review or that the text has
|
| 285 |
+
been approved by an organization as the authoritative definition of a
|
| 286 |
+
standard.
|
| 287 |
+
|
| 288 |
+
You may add a passage of up to five words as a Front-Cover Text, and a
|
| 289 |
+
passage of up to 25 words as a Back-Cover Text, to the end of the list
|
| 290 |
+
of Cover Texts in the Modified Version. Only one passage of
|
| 291 |
+
Front-Cover Text and one of Back-Cover Text may be added by (or
|
| 292 |
+
through arrangements made by) any one entity. If the Document already
|
| 293 |
+
includes a cover text for the same cover, previously added by you or
|
| 294 |
+
by arrangement made by the same entity you are acting on behalf of,
|
| 295 |
+
you may not add another; but you may replace the old one, on explicit
|
| 296 |
+
permission from the previous publisher that added the old one.
|
| 297 |
+
|
| 298 |
+
The author(s) and publisher(s) of the Document do not by this License
|
| 299 |
+
give permission to use their names for publicity for or to assert or
|
| 300 |
+
imply endorsement of any Modified Version.
|
| 301 |
+
|
| 302 |
+
@item
|
| 303 |
+
COMBINING DOCUMENTS
|
| 304 |
+
|
| 305 |
+
You may combine the Document with other documents released under this
|
| 306 |
+
License, under the terms defined in section 4 above for modified
|
| 307 |
+
versions, provided that you include in the combination all of the
|
| 308 |
+
Invariant Sections of all of the original documents, unmodified, and
|
| 309 |
+
list them all as Invariant Sections of your combined work in its
|
| 310 |
+
license notice, and that you preserve all their Warranty Disclaimers.
|
| 311 |
+
|
| 312 |
+
The combined work need only contain one copy of this License, and
|
| 313 |
+
multiple identical Invariant Sections may be replaced with a single
|
| 314 |
+
copy. If there are multiple Invariant Sections with the same name but
|
| 315 |
+
different contents, make the title of each such section unique by
|
| 316 |
+
adding at the end of it, in parentheses, the name of the original
|
| 317 |
+
author or publisher of that section if known, or else a unique number.
|
| 318 |
+
Make the same adjustment to the section titles in the list of
|
| 319 |
+
Invariant Sections in the license notice of the combined work.
|
| 320 |
+
|
| 321 |
+
In the combination, you must combine any sections Entitled ``History''
|
| 322 |
+
in the various original documents, forming one section Entitled
|
| 323 |
+
``History''; likewise combine any sections Entitled ``Acknowledgements'',
|
| 324 |
+
and any sections Entitled ``Dedications''. You must delete all
|
| 325 |
+
sections Entitled ``Endorsements.''
|
| 326 |
+
|
| 327 |
+
@item
|
| 328 |
+
COLLECTIONS OF DOCUMENTS
|
| 329 |
+
|
| 330 |
+
You may make a collection consisting of the Document and other documents
|
| 331 |
+
released under this License, and replace the individual copies of this
|
| 332 |
+
License in the various documents with a single copy that is included in
|
| 333 |
+
the collection, provided that you follow the rules of this License for
|
| 334 |
+
verbatim copying of each of the documents in all other respects.
|
| 335 |
+
|
| 336 |
+
You may extract a single document from such a collection, and distribute
|
| 337 |
+
it individually under this License, provided you insert a copy of this
|
| 338 |
+
License into the extracted document, and follow this License in all
|
| 339 |
+
other respects regarding verbatim copying of that document.
|
| 340 |
+
|
| 341 |
+
@item
|
| 342 |
+
AGGREGATION WITH INDEPENDENT WORKS
|
| 343 |
+
|
| 344 |
+
A compilation of the Document or its derivatives with other separate
|
| 345 |
+
and independent documents or works, in or on a volume of a storage or
|
| 346 |
+
distribution medium, is called an ``aggregate'' if the copyright
|
| 347 |
+
resulting from the compilation is not used to limit the legal rights
|
| 348 |
+
of the compilation's users beyond what the individual works permit.
|
| 349 |
+
When the Document is included in an aggregate, this License does not
|
| 350 |
+
apply to the other works in the aggregate which are not themselves
|
| 351 |
+
derivative works of the Document.
|
| 352 |
+
|
| 353 |
+
If the Cover Text requirement of section 3 is applicable to these
|
| 354 |
+
copies of the Document, then if the Document is less than one half of
|
| 355 |
+
the entire aggregate, the Document's Cover Texts may be placed on
|
| 356 |
+
covers that bracket the Document within the aggregate, or the
|
| 357 |
+
electronic equivalent of covers if the Document is in electronic form.
|
| 358 |
+
Otherwise they must appear on printed covers that bracket the whole
|
| 359 |
+
aggregate.
|
| 360 |
+
|
| 361 |
+
@item
|
| 362 |
+
TRANSLATION
|
| 363 |
+
|
| 364 |
+
Translation is considered a kind of modification, so you may
|
| 365 |
+
distribute translations of the Document under the terms of section 4.
|
| 366 |
+
Replacing Invariant Sections with translations requires special
|
| 367 |
+
permission from their copyright holders, but you may include
|
| 368 |
+
translations of some or all Invariant Sections in addition to the
|
| 369 |
+
original versions of these Invariant Sections. You may include a
|
| 370 |
+
translation of this License, and all the license notices in the
|
| 371 |
+
Document, and any Warranty Disclaimers, provided that you also include
|
| 372 |
+
the original English version of this License and the original versions
|
| 373 |
+
of those notices and disclaimers. In case of a disagreement between
|
| 374 |
+
the translation and the original version of this License or a notice
|
| 375 |
+
or disclaimer, the original version will prevail.
|
| 376 |
+
|
| 377 |
+
If a section in the Document is Entitled ``Acknowledgements'',
|
| 378 |
+
``Dedications'', or ``History'', the requirement (section 4) to Preserve
|
| 379 |
+
its Title (section 1) will typically require changing the actual
|
| 380 |
+
title.
|
| 381 |
+
|
| 382 |
+
@item
|
| 383 |
+
TERMINATION
|
| 384 |
+
|
| 385 |
+
You may not copy, modify, sublicense, or distribute the Document
|
| 386 |
+
except as expressly provided under this License. Any attempt
|
| 387 |
+
otherwise to copy, modify, sublicense, or distribute it is void, and
|
| 388 |
+
will automatically terminate your rights under this License.
|
| 389 |
+
|
| 390 |
+
However, if you cease all violation of this License, then your license
|
| 391 |
+
from a particular copyright holder is reinstated (a) provisionally,
|
| 392 |
+
unless and until the copyright holder explicitly and finally
|
| 393 |
+
terminates your license, and (b) permanently, if the copyright holder
|
| 394 |
+
fails to notify you of the violation by some reasonable means prior to
|
| 395 |
+
60 days after the cessation.
|
| 396 |
+
|
| 397 |
+
Moreover, your license from a particular copyright holder is
|
| 398 |
+
reinstated permanently if the copyright holder notifies you of the
|
| 399 |
+
violation by some reasonable means, this is the first time you have
|
| 400 |
+
received notice of violation of this License (for any work) from that
|
| 401 |
+
copyright holder, and you cure the violation prior to 30 days after
|
| 402 |
+
your receipt of the notice.
|
| 403 |
+
|
| 404 |
+
Termination of your rights under this section does not terminate the
|
| 405 |
+
licenses of parties who have received copies or rights from you under
|
| 406 |
+
this License. If your rights have been terminated and not permanently
|
| 407 |
+
reinstated, receipt of a copy of some or all of the same material does
|
| 408 |
+
not give you any rights to use it.
|
| 409 |
+
|
| 410 |
+
@item
|
| 411 |
+
FUTURE REVISIONS OF THIS LICENSE
|
| 412 |
+
|
| 413 |
+
The Free Software Foundation may publish new, revised versions
|
| 414 |
+
of the GNU Free Documentation License from time to time. Such new
|
| 415 |
+
versions will be similar in spirit to the present version, but may
|
| 416 |
+
differ in detail to address new problems or concerns. See
|
| 417 |
+
@uref{https://www.gnu.org/licenses/}.
|
| 418 |
+
|
| 419 |
+
Each version of the License is given a distinguishing version number.
|
| 420 |
+
If the Document specifies that a particular numbered version of this
|
| 421 |
+
License ``or any later version'' applies to it, you have the option of
|
| 422 |
+
following the terms and conditions either of that specified version or
|
| 423 |
+
of any later version that has been published (not as a draft) by the
|
| 424 |
+
Free Software Foundation. If the Document does not specify a version
|
| 425 |
+
number of this License, you may choose any version ever published (not
|
| 426 |
+
as a draft) by the Free Software Foundation. If the Document
|
| 427 |
+
specifies that a proxy can decide which future versions of this
|
| 428 |
+
License can be used, that proxy's public statement of acceptance of a
|
| 429 |
+
version permanently authorizes you to choose that version for the
|
| 430 |
+
Document.
|
| 431 |
+
|
| 432 |
+
@item
|
| 433 |
+
RELICENSING
|
| 434 |
+
|
| 435 |
+
``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
|
| 436 |
+
World Wide Web server that publishes copyrightable works and also
|
| 437 |
+
provides prominent facilities for anybody to edit those works. A
|
| 438 |
+
public wiki that anybody can edit is an example of such a server. A
|
| 439 |
+
``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
|
| 440 |
+
site means any set of copyrightable works thus published on the MMC
|
| 441 |
+
site.
|
| 442 |
+
|
| 443 |
+
``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
|
| 444 |
+
license published by Creative Commons Corporation, a not-for-profit
|
| 445 |
+
corporation with a principal place of business in San Francisco,
|
| 446 |
+
California, as well as future copyleft versions of that license
|
| 447 |
+
published by that same organization.
|
| 448 |
+
|
| 449 |
+
``Incorporate'' means to publish or republish a Document, in whole or
|
| 450 |
+
in part, as part of another Document.
|
| 451 |
+
|
| 452 |
+
An MMC is ``eligible for relicensing'' if it is licensed under this
|
| 453 |
+
License, and if all works that were first published under this License
|
| 454 |
+
somewhere other than this MMC, and subsequently incorporated in whole
|
| 455 |
+
or in part into the MMC, (1) had no cover texts or invariant sections,
|
| 456 |
+
and (2) were thus incorporated prior to November 1, 2008.
|
| 457 |
+
|
| 458 |
+
The operator of an MMC Site may republish an MMC contained in the site
|
| 459 |
+
under CC-BY-SA on the same site at any time before August 1, 2009,
|
| 460 |
+
provided the MMC is eligible for relicensing.
|
| 461 |
+
|
| 462 |
+
@end enumerate
|
| 463 |
+
|
| 464 |
+
@page
|
| 465 |
+
@heading ADDENDUM: How to use this License for your documents
|
| 466 |
+
|
| 467 |
+
To use this License in a document you have written, include a copy of
|
| 468 |
+
the License in the document and put the following copyright and
|
| 469 |
+
license notices just after the title page:
|
| 470 |
+
|
| 471 |
+
@smallexample
|
| 472 |
+
@group
|
| 473 |
+
Copyright (C) @var{year} @var{your name}.
|
| 474 |
+
Permission is granted to copy, distribute and/or modify this document
|
| 475 |
+
under the terms of the GNU Free Documentation License, Version 1.3
|
| 476 |
+
or any later version published by the Free Software Foundation;
|
| 477 |
+
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
| 478 |
+
Texts. A copy of the license is included in the section entitled ``GNU
|
| 479 |
+
Free Documentation License''.
|
| 480 |
+
@end group
|
| 481 |
+
@end smallexample
|
| 482 |
+
|
| 483 |
+
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
|
| 484 |
+
replace the ``with@dots{}Texts.''@: line with this:
|
| 485 |
+
|
| 486 |
+
@smallexample
|
| 487 |
+
@group
|
| 488 |
+
with the Invariant Sections being @var{list their titles}, with
|
| 489 |
+
the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
|
| 490 |
+
being @var{list}.
|
| 491 |
+
@end group
|
| 492 |
+
@end smallexample
|
| 493 |
+
|
| 494 |
+
If you have Invariant Sections without Cover Texts, or some other
|
| 495 |
+
combination of the three, merge those two alternatives to suit the
|
| 496 |
+
situation.
|
| 497 |
+
|
| 498 |
+
If your document contains nontrivial examples of program code, we
|
| 499 |
+
recommend releasing these examples in parallel under your choice of
|
| 500 |
+
free software license, such as the GNU General Public License,
|
| 501 |
+
to permit their use in free software.
|
| 502 |
+
|
| 503 |
+
@c Local Variables:
|
| 504 |
+
@c ispell-local-pdict: "ispell-dict"
|
| 505 |
+
@c End:
|
doc/local.mk
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Make coreutils documentation. -*-Makefile-*-
|
| 2 |
+
# This is included by the top-level Makefile.am.
|
| 3 |
+
|
| 4 |
+
# Copyright (C) 1995-2025 Free Software Foundation, Inc.
|
| 5 |
+
|
| 6 |
+
# This program is free software: you can redistribute it and/or modify
|
| 7 |
+
# it under the terms of the GNU General Public License as published by
|
| 8 |
+
# the Free Software Foundation, either version 3 of the License, or
|
| 9 |
+
# (at your option) any later version.
|
| 10 |
+
|
| 11 |
+
# This program is distributed in the hope that it will be useful,
|
| 12 |
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 13 |
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 14 |
+
# GNU General Public License for more details.
|
| 15 |
+
|
| 16 |
+
# You should have received a copy of the GNU General Public License
|
| 17 |
+
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
| 18 |
+
|
| 19 |
+
info_TEXINFOS = doc/coreutils.texi
|
| 20 |
+
|
| 21 |
+
doc_coreutils_TEXINFOS = \
|
| 22 |
+
doc/perm.texi \
|
| 23 |
+
doc/parse-datetime.texi \
|
| 24 |
+
doc/constants.texi \
|
| 25 |
+
doc/fdl.texi \
|
| 26 |
+
doc/sort-version.texi
|
| 27 |
+
|
| 28 |
+
# The customization variable CHECK_NORMAL_MENU_STRUCTURE is necessary with
|
| 29 |
+
# makeinfo versions ≥ 6.8.
|
| 30 |
+
MAKEINFO = @MAKEINFO@ -c CHECK_NORMAL_MENU_STRUCTURE=1
|
| 31 |
+
|
| 32 |
+
# The following is necessary if the package name is 8 characters or longer.
|
| 33 |
+
# If the info documentation would be split into 10 or more separate files,
|
| 34 |
+
# then this is necessary even if the package name is 7 characters long.
|
| 35 |
+
#
|
| 36 |
+
# Tell makeinfo to put everything in a single info file: <package>.info.
|
| 37 |
+
# Otherwise, it would also generate files with names like <package>.info-[123],
|
| 38 |
+
# and those names all map to one 14-byte name (<package>.info-) on some crufty
|
| 39 |
+
# old systems.
|
| 40 |
+
AM_MAKEINFOFLAGS = --no-split
|
| 41 |
+
|
| 42 |
+
doc/constants.texi: $(top_srcdir)/src/tail.c $(top_srcdir)/src/shred.c
|
| 43 |
+
$(AM_V_GEN)LC_ALL=C; export LC_ALL; \
|
| 44 |
+
$(MKDIR_P) doc && \
|
| 45 |
+
{ sed -n -e \
|
| 46 |
+
's/.*\(DEFAULT_MAX[_A-Z]*\)[ =]* \([0-9]*\).*/@set \1 \2/p' \
|
| 47 |
+
$(top_srcdir)/src/tail.c && \
|
| 48 |
+
sed -n -e \
|
| 49 |
+
's/.*\(DEFAULT_PASSES\)[ =]* \([0-9]*\).*/@set SHRED_\1 \2/p'\
|
| 50 |
+
$(top_srcdir)/src/shred.c; } > $@-t \
|
| 51 |
+
&& { cmp $@-t $@ >/dev/null 2>&1 || mv $@-t $@; rm -f $@-t; }
|
| 52 |
+
|
| 53 |
+
MAINTAINERCLEANFILES += doc/constants.texi
|
| 54 |
+
|
| 55 |
+
# Extended regular expressions to match word starts and ends.
|
| 56 |
+
_W = (^|[^A-Za-z0-9_])
|
| 57 |
+
W_ = ([^A-Za-z0-9_]|$$)
|
| 58 |
+
|
| 59 |
+
syntax_checks = \
|
| 60 |
+
sc-avoid-builtin \
|
| 61 |
+
sc-avoid-io \
|
| 62 |
+
sc-avoid-non-zero \
|
| 63 |
+
sc-avoid-path \
|
| 64 |
+
sc-avoid-timezone \
|
| 65 |
+
sc-avoid-zeroes \
|
| 66 |
+
sc-exponent-grouping \
|
| 67 |
+
sc-lower-case-var
|
| 68 |
+
|
| 69 |
+
texi_files = $(srcdir)/doc/*.texi
|
| 70 |
+
|
| 71 |
+
.PHONY: $(syntax_checks) check-texinfo
|
| 72 |
+
|
| 73 |
+
# List words/regexps here that should not appear in the texinfo documentation.
|
| 74 |
+
check-texinfo: $(syntax_checks)
|
| 75 |
+
$(AM_V_GEN)fail=0; \
|
| 76 |
+
grep '@url{' $(texi_files) && fail=1; \
|
| 77 |
+
grep '\$$@"' $(texi_files) && fail=1; \
|
| 78 |
+
grep -n '[^[:punct:]]@footnote' $(texi_files) && fail=1; \
|
| 79 |
+
grep -n filename $(texi_files) \
|
| 80 |
+
| $(EGREP) -v 'setfilename|[{]filename[}]' \
|
| 81 |
+
&& fail=1; \
|
| 82 |
+
exit $$fail
|
| 83 |
+
|
| 84 |
+
sc-avoid-builtin:
|
| 85 |
+
$(AM_V_GEN)$(EGREP) -i '$(_W)builtins?$(W_)' $(texi_files) \
|
| 86 |
+
&& exit 1 || :
|
| 87 |
+
|
| 88 |
+
sc-avoid-path:
|
| 89 |
+
$(AM_V_GEN)fail=0; \
|
| 90 |
+
$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(texi_files) \
|
| 91 |
+
| $(EGREP) -v \
|
| 92 |
+
'PATH=|path search|search path|@vindex PATH$$|@env[{]PATH[}]' \
|
| 93 |
+
&& fail=1; \
|
| 94 |
+
exit $$fail
|
| 95 |
+
|
| 96 |
+
# Use "time zone", not "timezone".
|
| 97 |
+
sc-avoid-timezone:
|
| 98 |
+
$(AM_V_GEN)$(EGREP) timezone $(texi_files) && exit 1 || :
|
| 99 |
+
|
| 100 |
+
# Check for insufficient exponent grouping, e.g.,
|
| 101 |
+
# @math{2^64} should be @math{2^{64}}.
|
| 102 |
+
sc-exponent-grouping:
|
| 103 |
+
$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(texi_files) && exit 1 || :
|
| 104 |
+
|
| 105 |
+
# Say I/O, not IO.
|
| 106 |
+
sc-avoid-io:
|
| 107 |
+
$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(texi_files) && exit 1 || :
|
| 108 |
+
|
| 109 |
+
# I prefer nonzero over non-zero.
|
| 110 |
+
sc-avoid-non-zero:
|
| 111 |
+
$(AM_V_GEN)$(EGREP) non-zero $(texi_files) && exit 1 || :
|
| 112 |
+
|
| 113 |
+
# Use "zeros", not "zeroes" (nothing wrong with "zeroes"; just be consistent).
|
| 114 |
+
sc-avoid-zeroes:
|
| 115 |
+
$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(texi_files) \
|
| 116 |
+
&& exit 1 || :
|
| 117 |
+
|
| 118 |
+
# The quantity inside @var{...} should not contain upper case letters.
|
| 119 |
+
# The leading backslash exemption is to permit in-macro uses like
|
| 120 |
+
# @var{\varName\} where the upper case letter is part of a parameter name.
|
| 121 |
+
find_upper_case_var = \
|
| 122 |
+
'/\@var\{/ or next; \
|
| 123 |
+
while (/\@var\{(.+?)}/g) \
|
| 124 |
+
{ \
|
| 125 |
+
$$v = $$1; \
|
| 126 |
+
$$v =~ /[A-Z]/ && $$v !~ /^\\/ and (print "$$ARGV:$$.:$$_"), $$m = 1 \
|
| 127 |
+
} \
|
| 128 |
+
END {$$m and (warn "$@: do not use upper case in \@var{...}\n"), exit 1}'
|
| 129 |
+
sc-lower-case-var:
|
| 130 |
+
$(AM_V_GEN)$(PERL) -e 1 || { echo $@: skipping test; exit 0; }; \
|
| 131 |
+
$(PERL) -lne $(find_upper_case_var) $(texi_files)
|
| 132 |
+
|
| 133 |
+
check-local: check-texinfo
|
doc/perm.texi
ADDED
|
@@ -0,0 +1,641 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@c File mode bits
|
| 2 |
+
|
| 3 |
+
@c Copyright (C) 1994--2025 Free Software Foundation, Inc.
|
| 4 |
+
|
| 5 |
+
@c Permission is granted to copy, distribute and/or modify this document
|
| 6 |
+
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
| 7 |
+
@c any later version published by the Free Software Foundation; with no
|
| 8 |
+
@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
|
| 9 |
+
@c Texts. A copy of the license is included in the ``GNU Free
|
| 10 |
+
@c Documentation License'' file as part of this distribution.
|
| 11 |
+
|
| 12 |
+
Each file has a set of @dfn{file mode bits} that control the kinds of
|
| 13 |
+
access that users have to that file. They can be represented either in
|
| 14 |
+
symbolic form or as an octal number.
|
| 15 |
+
|
| 16 |
+
@menu
|
| 17 |
+
* Mode Structure:: Structure of file mode bits.
|
| 18 |
+
* Symbolic Modes:: Mnemonic representation of file mode bits.
|
| 19 |
+
* Numeric Modes:: File mode bits as octal numbers.
|
| 20 |
+
* Operator Numeric Modes:: ANDing, ORing, and setting modes octally.
|
| 21 |
+
* Directory Setuid and Setgid:: Set-user-ID and set-group-ID on directories.
|
| 22 |
+
@end menu
|
| 23 |
+
|
| 24 |
+
@node Mode Structure
|
| 25 |
+
@section Structure of File Mode Bits
|
| 26 |
+
|
| 27 |
+
The file mode bits have two parts: the @dfn{file permission bits},
|
| 28 |
+
which control ordinary access to the file, and @dfn{special mode
|
| 29 |
+
bits}, which affect only some files.
|
| 30 |
+
|
| 31 |
+
There are three kinds of permissions that a user can have for a file:
|
| 32 |
+
|
| 33 |
+
@enumerate
|
| 34 |
+
@item
|
| 35 |
+
@cindex read permission
|
| 36 |
+
permission to read the file. For directories, this means permission to
|
| 37 |
+
list the contents of the directory.
|
| 38 |
+
@item
|
| 39 |
+
@cindex write permission
|
| 40 |
+
permission to write to (change) the file. For directories, this means
|
| 41 |
+
permission to create and remove files in the directory.
|
| 42 |
+
@item
|
| 43 |
+
@cindex execute/search permission
|
| 44 |
+
permission to execute the file (run it as a program). For directories,
|
| 45 |
+
this means permission to access files in the directory.
|
| 46 |
+
@end enumerate
|
| 47 |
+
|
| 48 |
+
There are three categories of users who may have different permissions
|
| 49 |
+
to perform any of the above operations on a file:
|
| 50 |
+
|
| 51 |
+
@enumerate
|
| 52 |
+
@item
|
| 53 |
+
the file's owner;
|
| 54 |
+
@item
|
| 55 |
+
other users who are in the file's group;
|
| 56 |
+
@item
|
| 57 |
+
everyone else.
|
| 58 |
+
@end enumerate
|
| 59 |
+
|
| 60 |
+
@cindex owner, default
|
| 61 |
+
@cindex group owner, default
|
| 62 |
+
Files are given an owner and group when they are created. Usually the
|
| 63 |
+
owner is the current user and the group is the group of the directory
|
| 64 |
+
the file is in, but this varies with the operating system, the
|
| 65 |
+
file system the file is created on, and the way the file is created. You
|
| 66 |
+
can change the owner and group of a file by using the @command{chown} and
|
| 67 |
+
@command{chgrp} commands.
|
| 68 |
+
|
| 69 |
+
In addition to the three sets of three permissions listed above, the
|
| 70 |
+
file mode bits have three special components, which affect only
|
| 71 |
+
executable files (programs) and, on most systems, directories:
|
| 72 |
+
|
| 73 |
+
@table @asis
|
| 74 |
+
@item The @dfn{set-user-ID bit} (@dfn{setuid bit}).
|
| 75 |
+
@cindex set-user-ID
|
| 76 |
+
@cindex setuid
|
| 77 |
+
On execution, set the process's effective user ID to that of the file.
|
| 78 |
+
For directories on a few systems, give files created in the directory
|
| 79 |
+
the same owner as the directory, no matter who creates them, and set
|
| 80 |
+
the set-user-ID bit of newly-created subdirectories.
|
| 81 |
+
|
| 82 |
+
@item The @dfn{set-group-ID bit} (@dfn{setgid bit}).
|
| 83 |
+
@cindex set-group-ID
|
| 84 |
+
@cindex setgid
|
| 85 |
+
On execution, set the process's effective group ID to that of the file.
|
| 86 |
+
For directories on most systems, give files created in the directory
|
| 87 |
+
the same group as the directory, no matter what group the user who
|
| 88 |
+
creates them is in, and set the set-group-ID bit of newly-created
|
| 89 |
+
subdirectories.
|
| 90 |
+
|
| 91 |
+
@item The @dfn{restricted deletion flag} or @dfn{sticky bit}.
|
| 92 |
+
@cindex sticky
|
| 93 |
+
@cindex swap space, saving text image in
|
| 94 |
+
@cindex text image, saving in swap space
|
| 95 |
+
@cindex restricted deletion flag
|
| 96 |
+
Prevent unprivileged users from removing or renaming a file in a directory
|
| 97 |
+
unless they own the file or the directory; this is commonly
|
| 98 |
+
found on world-writable directories like @file{/tmp}.
|
| 99 |
+
For regular files on some older systems, save the program's text image on the
|
| 100 |
+
swap device so it will load more quickly when run, so that the image
|
| 101 |
+
is ``sticky''.
|
| 102 |
+
@end table
|
| 103 |
+
|
| 104 |
+
In addition to the file mode bits listed above, there may be file attributes
|
| 105 |
+
specific to the file system, e.g., access control lists (ACLs), whether a
|
| 106 |
+
file is compressed, whether a file can be modified (immutability), and whether
|
| 107 |
+
a file can be dumped. These are usually set using programs
|
| 108 |
+
specific to the file system. For example:
|
| 109 |
+
@c should probably say a lot more about ACLs... someday
|
| 110 |
+
|
| 111 |
+
@table @asis
|
| 112 |
+
@item ext2
|
| 113 |
+
On GNU and GNU/Linux the file attributes specific to
|
| 114 |
+
the ext2 file system are set using @command{chattr}.
|
| 115 |
+
|
| 116 |
+
@item FFS
|
| 117 |
+
On FreeBSD the file flags specific to the FFS
|
| 118 |
+
file system are set using @command{chflags}.
|
| 119 |
+
@end table
|
| 120 |
+
|
| 121 |
+
Even if a file's mode bits allow an operation on that file,
|
| 122 |
+
that operation may still fail, because:
|
| 123 |
+
|
| 124 |
+
@itemize
|
| 125 |
+
@item
|
| 126 |
+
the file-system-specific attributes or flags do not permit it; or
|
| 127 |
+
|
| 128 |
+
@item
|
| 129 |
+
the file system is mounted as read-only.
|
| 130 |
+
@end itemize
|
| 131 |
+
|
| 132 |
+
For example, if the immutable attribute is set on a file,
|
| 133 |
+
it cannot be modified, regardless of the fact that you
|
| 134 |
+
may have just run @code{chmod a+w FILE}.
|
| 135 |
+
|
| 136 |
+
@node Symbolic Modes
|
| 137 |
+
@section Symbolic Modes
|
| 138 |
+
|
| 139 |
+
@cindex symbolic modes
|
| 140 |
+
@dfn{Symbolic modes} represent changes to files' mode bits as
|
| 141 |
+
operations on single-character symbols. They allow you to modify either
|
| 142 |
+
all or selected parts of files' mode bits, optionally based on
|
| 143 |
+
their previous values, and perhaps on the current @code{umask} as well
|
| 144 |
+
(@pxref{Umask and Protection}).
|
| 145 |
+
|
| 146 |
+
The format of symbolic modes is:
|
| 147 |
+
|
| 148 |
+
@example
|
| 149 |
+
@r{[}ugoa@dots{}@r{][}-+=@r{]}@var{perms}@dots{}@r{[},@dots{}@r{]}
|
| 150 |
+
@end example
|
| 151 |
+
|
| 152 |
+
@noindent
|
| 153 |
+
where @var{perms} is either zero or more letters from the set
|
| 154 |
+
@samp{rwxXst}, or a single letter from the set @samp{ugo}.
|
| 155 |
+
|
| 156 |
+
The following sections describe the operators and other details of
|
| 157 |
+
symbolic modes.
|
| 158 |
+
|
| 159 |
+
@menu
|
| 160 |
+
* Setting Permissions:: Basic operations on permissions.
|
| 161 |
+
* Copying Permissions:: Copying existing permissions.
|
| 162 |
+
* Changing Special Mode Bits:: Special mode bits.
|
| 163 |
+
* Conditional Executability:: Conditionally affecting executability.
|
| 164 |
+
* Multiple Changes:: Making multiple changes.
|
| 165 |
+
* Umask and Protection:: The effect of the umask.
|
| 166 |
+
@end menu
|
| 167 |
+
|
| 168 |
+
@node Setting Permissions
|
| 169 |
+
@subsection Setting Permissions
|
| 170 |
+
|
| 171 |
+
The basic symbolic operations on a file's permissions are adding,
|
| 172 |
+
removing, and setting the permission that certain users have to read,
|
| 173 |
+
write, and execute or search the file. These operations have the following
|
| 174 |
+
format:
|
| 175 |
+
|
| 176 |
+
@example
|
| 177 |
+
@var{users} @var{operation} @var{permissions}
|
| 178 |
+
@end example
|
| 179 |
+
|
| 180 |
+
@noindent
|
| 181 |
+
The spaces between the three parts above are shown for readability only;
|
| 182 |
+
symbolic modes cannot contain spaces.
|
| 183 |
+
|
| 184 |
+
The @var{users} part tells which users' access to the file is changed.
|
| 185 |
+
It consists of one or more of the following letters (or it can be empty;
|
| 186 |
+
@pxref{Umask and Protection}, for a description of what happens then). When
|
| 187 |
+
more than one of these letters is given, the order that they are in does
|
| 188 |
+
not matter.
|
| 189 |
+
|
| 190 |
+
@table @code
|
| 191 |
+
@item u
|
| 192 |
+
@cindex owner of file, permissions for
|
| 193 |
+
the user who owns the file;
|
| 194 |
+
@item g
|
| 195 |
+
@cindex group, permissions for
|
| 196 |
+
other users who are in the file's group;
|
| 197 |
+
@item o
|
| 198 |
+
@cindex other permissions
|
| 199 |
+
all other users;
|
| 200 |
+
@item a
|
| 201 |
+
all users; the same as @samp{ugo}.
|
| 202 |
+
@end table
|
| 203 |
+
|
| 204 |
+
The @var{operation} part tells how to change the affected users' access
|
| 205 |
+
to the file, and is one of the following symbols:
|
| 206 |
+
|
| 207 |
+
@table @code
|
| 208 |
+
@item +
|
| 209 |
+
@cindex adding permissions
|
| 210 |
+
to add the @var{permissions} to whatever permissions the @var{users}
|
| 211 |
+
already have for the file;
|
| 212 |
+
@item -
|
| 213 |
+
@cindex removing permissions
|
| 214 |
+
@cindex subtracting permissions
|
| 215 |
+
to remove the @var{permissions} from whatever permissions the
|
| 216 |
+
@var{users} already have for the file;
|
| 217 |
+
@item =
|
| 218 |
+
@cindex setting permissions
|
| 219 |
+
to make the @var{permissions} the only permissions that the @var{users}
|
| 220 |
+
have for the file.
|
| 221 |
+
@end table
|
| 222 |
+
|
| 223 |
+
The @var{permissions} part tells what kind of access to the file should
|
| 224 |
+
be changed; it is normally zero or more of the following letters. As with the
|
| 225 |
+
@var{users} part, the order does not matter when more than one letter is
|
| 226 |
+
given. Omitting the @var{permissions} part is useful only with the
|
| 227 |
+
@samp{=} operation, where it gives the specified @var{users} no access
|
| 228 |
+
at all to the file.
|
| 229 |
+
|
| 230 |
+
@table @code
|
| 231 |
+
@item r
|
| 232 |
+
@cindex read permission, symbolic
|
| 233 |
+
the permission the @var{users} have to read the file;
|
| 234 |
+
@item w
|
| 235 |
+
@cindex write permission, symbolic
|
| 236 |
+
the permission the @var{users} have to write to the file;
|
| 237 |
+
@item x
|
| 238 |
+
@cindex execute/search permission, symbolic
|
| 239 |
+
the permission the @var{users} have to execute the file,
|
| 240 |
+
or search it if it is a directory.
|
| 241 |
+
@end table
|
| 242 |
+
|
| 243 |
+
For example, to give everyone permission to read and write a regular file,
|
| 244 |
+
but not to execute it, use:
|
| 245 |
+
|
| 246 |
+
@example
|
| 247 |
+
a=rw
|
| 248 |
+
@end example
|
| 249 |
+
|
| 250 |
+
To remove write permission for all users other than the file's
|
| 251 |
+
owner, use:
|
| 252 |
+
|
| 253 |
+
@example
|
| 254 |
+
go-w
|
| 255 |
+
@end example
|
| 256 |
+
|
| 257 |
+
@noindent
|
| 258 |
+
The above command does not affect the access that the owner of
|
| 259 |
+
the file has to it, nor does it affect whether other users can
|
| 260 |
+
read or execute the file.
|
| 261 |
+
|
| 262 |
+
To give everyone except a file's owner no permission to do anything with
|
| 263 |
+
that file, use the mode below. Other users could still remove the file,
|
| 264 |
+
if they have write permission on the directory it is in.
|
| 265 |
+
|
| 266 |
+
@example
|
| 267 |
+
go=
|
| 268 |
+
@end example
|
| 269 |
+
|
| 270 |
+
@noindent
|
| 271 |
+
Another way to specify the same thing is:
|
| 272 |
+
|
| 273 |
+
@example
|
| 274 |
+
og-rwx
|
| 275 |
+
@end example
|
| 276 |
+
|
| 277 |
+
@node Copying Permissions
|
| 278 |
+
@subsection Copying Existing Permissions
|
| 279 |
+
|
| 280 |
+
@cindex copying existing permissions
|
| 281 |
+
@cindex permissions, copying existing
|
| 282 |
+
You can base a file's permissions on its existing permissions. To do
|
| 283 |
+
this, instead of using a series of @samp{r}, @samp{w}, or @samp{x}
|
| 284 |
+
letters after the
|
| 285 |
+
operator, you use the letter @samp{u}, @samp{g}, or @samp{o}. For
|
| 286 |
+
example, the mode
|
| 287 |
+
|
| 288 |
+
@example
|
| 289 |
+
o+g
|
| 290 |
+
@end example
|
| 291 |
+
|
| 292 |
+
@noindent
|
| 293 |
+
adds the permissions for users who are in a file's group to the
|
| 294 |
+
permissions that other users have for the file. Thus, if the file
|
| 295 |
+
started out as mode 664 (@samp{rw-rw-r--}), the above mode would change
|
| 296 |
+
it to mode 666 (@samp{rw-rw-rw-}). If the file had started out as mode
|
| 297 |
+
741 (@samp{rwxr----x}), the above mode would change it to mode 745
|
| 298 |
+
(@samp{rwxr--r-x}). The @samp{-} and @samp{=} operations work
|
| 299 |
+
analogously.
|
| 300 |
+
|
| 301 |
+
@node Changing Special Mode Bits
|
| 302 |
+
@subsection Changing Special Mode Bits
|
| 303 |
+
|
| 304 |
+
@cindex changing special mode bits
|
| 305 |
+
In addition to changing a file's read, write, and execute/search permissions,
|
| 306 |
+
you can change its special mode bits. @xref{Mode Structure}, for a
|
| 307 |
+
summary of these special mode bits.
|
| 308 |
+
|
| 309 |
+
To change the file mode bits to set the user ID on execution, use
|
| 310 |
+
@samp{u} in the @var{users} part of the symbolic mode and
|
| 311 |
+
@samp{s} in the @var{permissions} part.
|
| 312 |
+
|
| 313 |
+
To change the file mode bits to set the group ID on execution, use
|
| 314 |
+
@samp{g} in the @var{users} part of the symbolic mode and
|
| 315 |
+
@samp{s} in the @var{permissions} part.
|
| 316 |
+
|
| 317 |
+
To set both user and group ID on execution, omit the @var{users} part
|
| 318 |
+
of the symbolic mode (or use @samp{a}) and use @samp{s} in the
|
| 319 |
+
@var{permissions} part.
|
| 320 |
+
|
| 321 |
+
To change the file mode bits to set the restricted deletion flag or sticky bit,
|
| 322 |
+
omit the @var{users} part of the symbolic mode (or use @samp{a}) and use
|
| 323 |
+
@samp{t} in the @var{permissions} part.
|
| 324 |
+
|
| 325 |
+
For example, to set the set-user-ID mode bit of a program,
|
| 326 |
+
you can use the mode:
|
| 327 |
+
|
| 328 |
+
@example
|
| 329 |
+
u+s
|
| 330 |
+
@end example
|
| 331 |
+
|
| 332 |
+
To remove both set-user-ID and set-group-ID mode bits from
|
| 333 |
+
it, you can use the mode:
|
| 334 |
+
|
| 335 |
+
@example
|
| 336 |
+
a-s
|
| 337 |
+
@end example
|
| 338 |
+
|
| 339 |
+
To set the restricted deletion flag or sticky bit, you can use
|
| 340 |
+
the mode:
|
| 341 |
+
|
| 342 |
+
@example
|
| 343 |
+
+t
|
| 344 |
+
@end example
|
| 345 |
+
|
| 346 |
+
The combination @samp{o+s} has no effect. On GNU systems
|
| 347 |
+
the combinations @samp{u+t} and @samp{g+t} have no effect, and
|
| 348 |
+
@samp{o+t} acts like plain @samp{+t}.
|
| 349 |
+
|
| 350 |
+
The @samp{=} operator is not very useful with special mode bits.
|
| 351 |
+
For example, the mode:
|
| 352 |
+
|
| 353 |
+
@example
|
| 354 |
+
o=t
|
| 355 |
+
@end example
|
| 356 |
+
|
| 357 |
+
@noindent
|
| 358 |
+
does set the restricted deletion flag or sticky bit, but it also
|
| 359 |
+
removes all read, write, and execute/search permissions that users not in the
|
| 360 |
+
file's group might have had for it.
|
| 361 |
+
|
| 362 |
+
@xref{Directory Setuid and Setgid}, for additional rules concerning
|
| 363 |
+
set-user-ID and set-group-ID bits and directories.
|
| 364 |
+
|
| 365 |
+
@node Conditional Executability
|
| 366 |
+
@subsection Conditional Executability
|
| 367 |
+
|
| 368 |
+
@cindex conditional executability
|
| 369 |
+
There is one more special type of symbolic permission: if you use
|
| 370 |
+
@samp{X} instead of @samp{x}, execute/search permission is affected only if the
|
| 371 |
+
file is a directory or already had execute permission.
|
| 372 |
+
|
| 373 |
+
For example, this mode:
|
| 374 |
+
|
| 375 |
+
@example
|
| 376 |
+
a+X
|
| 377 |
+
@end example
|
| 378 |
+
|
| 379 |
+
@noindent
|
| 380 |
+
gives all users permission to search directories, or to execute files if
|
| 381 |
+
anyone could execute them before.
|
| 382 |
+
|
| 383 |
+
@node Multiple Changes
|
| 384 |
+
@subsection Making Multiple Changes
|
| 385 |
+
|
| 386 |
+
@cindex multiple changes to permissions
|
| 387 |
+
The format of symbolic modes is actually more complex than described
|
| 388 |
+
above (@pxref{Setting Permissions}). It provides two ways to make
|
| 389 |
+
multiple changes to files' mode bits.
|
| 390 |
+
|
| 391 |
+
The first way is to specify multiple @var{operation} and
|
| 392 |
+
@var{permissions} parts after a @var{users} part in the symbolic mode.
|
| 393 |
+
|
| 394 |
+
For example, the mode:
|
| 395 |
+
|
| 396 |
+
@example
|
| 397 |
+
og+rX-w
|
| 398 |
+
@end example
|
| 399 |
+
|
| 400 |
+
@noindent
|
| 401 |
+
gives users other than the owner of the file read permission and, if
|
| 402 |
+
it is a directory or if someone already had execute permission
|
| 403 |
+
to it, gives them execute/search permission; and it also denies them write
|
| 404 |
+
permission to the file. It does not affect the permission that the
|
| 405 |
+
owner of the file has for it. The above mode is equivalent to
|
| 406 |
+
the two modes:
|
| 407 |
+
|
| 408 |
+
@example
|
| 409 |
+
og+rX
|
| 410 |
+
og-w
|
| 411 |
+
@end example
|
| 412 |
+
|
| 413 |
+
The second way to make multiple changes is to specify more than one
|
| 414 |
+
simple symbolic mode, separated by commas. For example, the mode:
|
| 415 |
+
|
| 416 |
+
@example
|
| 417 |
+
a+r,go-w
|
| 418 |
+
@end example
|
| 419 |
+
|
| 420 |
+
@noindent
|
| 421 |
+
gives everyone permission to read the file and removes write
|
| 422 |
+
permission on it for all users except its owner. Another example:
|
| 423 |
+
|
| 424 |
+
@example
|
| 425 |
+
u=rwx,g=rx,o=
|
| 426 |
+
@end example
|
| 427 |
+
|
| 428 |
+
@noindent
|
| 429 |
+
sets all of the permission bits for the file explicitly. (It
|
| 430 |
+
gives users who are not in the file's group no permission at all for
|
| 431 |
+
it.)
|
| 432 |
+
|
| 433 |
+
The two methods can be combined. The mode:
|
| 434 |
+
|
| 435 |
+
@example
|
| 436 |
+
a+r,g+x-w
|
| 437 |
+
@end example
|
| 438 |
+
|
| 439 |
+
@noindent
|
| 440 |
+
gives all users permission to read the file, and gives users who are in
|
| 441 |
+
the file's group permission to execute/search it as well, but not permission
|
| 442 |
+
to write to it. The above mode could be written in several different
|
| 443 |
+
ways; another is:
|
| 444 |
+
|
| 445 |
+
@example
|
| 446 |
+
u+r,g+rx,o+r,g-w
|
| 447 |
+
@end example
|
| 448 |
+
|
| 449 |
+
@node Umask and Protection
|
| 450 |
+
@subsection The Umask and Protection
|
| 451 |
+
|
| 452 |
+
@cindex umask and modes
|
| 453 |
+
@cindex modes and umask
|
| 454 |
+
If the @var{users} part of a symbolic mode is omitted, it defaults to
|
| 455 |
+
@samp{a} (affect all users), except that any permissions that are
|
| 456 |
+
@emph{set} in the system variable @code{umask} are @emph{not affected}.
|
| 457 |
+
The value of @code{umask} can be set using the
|
| 458 |
+
@code{umask} command. Its default value varies from system to system.
|
| 459 |
+
|
| 460 |
+
@cindex giving away permissions
|
| 461 |
+
Omitting the @var{users} part of a symbolic mode is generally not useful
|
| 462 |
+
with operations other than @samp{+}. It is useful with @samp{+} because
|
| 463 |
+
it allows you to use @code{umask} as an easily customizable protection
|
| 464 |
+
against giving away more permission to files than you intended to.
|
| 465 |
+
|
| 466 |
+
As an example, if @code{umask} has the value 2, which removes write
|
| 467 |
+
permission for users who are not in the file's group, then the mode:
|
| 468 |
+
|
| 469 |
+
@example
|
| 470 |
+
+w
|
| 471 |
+
@end example
|
| 472 |
+
|
| 473 |
+
@noindent
|
| 474 |
+
adds permission to write to the file to its owner and to other users who
|
| 475 |
+
are in the file's group, but @emph{not} to other users. In contrast,
|
| 476 |
+
the mode:
|
| 477 |
+
|
| 478 |
+
@example
|
| 479 |
+
a+w
|
| 480 |
+
@end example
|
| 481 |
+
|
| 482 |
+
@noindent
|
| 483 |
+
ignores @code{umask}, and @emph{does} give write permission for
|
| 484 |
+
the file to all users.
|
| 485 |
+
|
| 486 |
+
@node Numeric Modes
|
| 487 |
+
@section Numeric Modes
|
| 488 |
+
|
| 489 |
+
@cindex numeric modes
|
| 490 |
+
@cindex file mode bits, numeric
|
| 491 |
+
@cindex octal numbers for file modes
|
| 492 |
+
As an
|
| 493 |
+
alternative to giving a symbolic mode, you can give an octal (base 8)
|
| 494 |
+
number that represents the mode.
|
| 495 |
+
|
| 496 |
+
The permissions granted to the user,
|
| 497 |
+
to other users in the file's group,
|
| 498 |
+
and to other users not in the file's group each require three
|
| 499 |
+
bits: one bit for read, one for write, and one for execute/search permission.
|
| 500 |
+
These three bits are represented as one octal digit;
|
| 501 |
+
for example, if all three are present, the resulting 111 (in binary)
|
| 502 |
+
is represented as the digit 7 (in octal). The three special
|
| 503 |
+
mode bits also require one bit each, and they are as a group
|
| 504 |
+
represented as another octal digit. Here is how the bits are arranged,
|
| 505 |
+
starting with the highest valued bit:
|
| 506 |
+
|
| 507 |
+
@example
|
| 508 |
+
Value in Corresponding
|
| 509 |
+
Mode Mode Bit
|
| 510 |
+
|
| 511 |
+
Special mode bits:
|
| 512 |
+
4000 Set user ID
|
| 513 |
+
2000 Set group ID
|
| 514 |
+
1000 Restricted deletion flag or sticky bit
|
| 515 |
+
|
| 516 |
+
The file's owner:
|
| 517 |
+
400 Read
|
| 518 |
+
200 Write
|
| 519 |
+
100 Execute/search
|
| 520 |
+
|
| 521 |
+
Other users in the file's group:
|
| 522 |
+
40 Read
|
| 523 |
+
20 Write
|
| 524 |
+
10 Execute/search
|
| 525 |
+
|
| 526 |
+
Other users not in the file's group:
|
| 527 |
+
4 Read
|
| 528 |
+
2 Write
|
| 529 |
+
1 Execute/search
|
| 530 |
+
@end example
|
| 531 |
+
|
| 532 |
+
For example, numeric mode @samp{4751} corresponds to symbolic mode
|
| 533 |
+
@samp{u=srwx,g=rx,o=x}, and numeric mode @samp{664} corresponds to symbolic mode
|
| 534 |
+
@samp{ug=rw,o=r}. Numeric mode @samp{0} corresponds to symbolic mode
|
| 535 |
+
@samp{a=}.
|
| 536 |
+
|
| 537 |
+
A numeric mode is usually shorter than the corresponding symbolic
|
| 538 |
+
mode, but it is limited in that normally it cannot take into account the
|
| 539 |
+
previous file mode bits; it can only set them absolutely.
|
| 540 |
+
The set-user-ID and set-group-ID bits of directories are an exception
|
| 541 |
+
to this general limitation. @xref{Directory Setuid and Setgid}.
|
| 542 |
+
Also, operator numeric modes can take previous file mode bits into
|
| 543 |
+
account. @xref{Operator Numeric Modes}.
|
| 544 |
+
|
| 545 |
+
Numeric modes are always interpreted in octal; you do not have to add a
|
| 546 |
+
leading @samp{0}, as you do in C@. Mode @samp{0055} is the same as
|
| 547 |
+
mode @samp{55}. However, modes of five digits or more, such as
|
| 548 |
+
@samp{00055}, are sometimes special (@pxref{Directory Setuid and Setgid}).
|
| 549 |
+
|
| 550 |
+
@node Operator Numeric Modes
|
| 551 |
+
@section Operator Numeric Modes
|
| 552 |
+
|
| 553 |
+
An operator numeric mode is a numeric mode that is prefixed by a
|
| 554 |
+
@samp{-}, @samp{+}, or @samp{=} operator, which has the same
|
| 555 |
+
interpretation as in symbolic modes. For example, @samp{+440} enables
|
| 556 |
+
read permission for the file's owner and group, @samp{-1} disables
|
| 557 |
+
execute permission for other users, and @samp{=600} clears all
|
| 558 |
+
permissions except for enabling read-write permissions for the file's
|
| 559 |
+
owner. Operator numeric modes can be combined with symbolic modes by
|
| 560 |
+
separating them with a comma; for example, @samp{=0,u+r} clears all
|
| 561 |
+
permissions except for enabling read permission for the file's owner.
|
| 562 |
+
|
| 563 |
+
The commands @samp{chmod =755 @var{dir}} and @samp{chmod 755
|
| 564 |
+
@var{dir}} differ in that the former clears the directory @var{dir}'s
|
| 565 |
+
setuid and setgid bits, whereas the latter preserves them.
|
| 566 |
+
@xref{Directory Setuid and Setgid}.
|
| 567 |
+
|
| 568 |
+
Operator numeric modes are a GNU extension.
|
| 569 |
+
|
| 570 |
+
@node Directory Setuid and Setgid
|
| 571 |
+
@section Directories and the Set-User-ID and Set-Group-ID Bits
|
| 572 |
+
|
| 573 |
+
On most systems, if a directory's set-group-ID bit is set, newly
|
| 574 |
+
created subfiles inherit the same group as the directory, and newly
|
| 575 |
+
created subdirectories inherit the set-group-ID bit of the parent
|
| 576 |
+
directory. On a few systems, a directory's set-user-ID bit has a
|
| 577 |
+
similar effect on the ownership of new subfiles and the set-user-ID
|
| 578 |
+
bits of new subdirectories. These mechanisms let users share files
|
| 579 |
+
more easily, by lessening the need to use @command{chmod} or
|
| 580 |
+
@command{chown} to share new files.
|
| 581 |
+
|
| 582 |
+
These convenience mechanisms rely on the set-user-ID and set-group-ID
|
| 583 |
+
bits of directories. If commands like @command{chmod} and
|
| 584 |
+
@command{mkdir} routinely cleared these bits on directories, the
|
| 585 |
+
mechanisms would be less convenient and it would be harder to share
|
| 586 |
+
files. Therefore, a command like @command{chmod} does not affect the
|
| 587 |
+
set-user-ID or set-group-ID bits of a directory unless the user
|
| 588 |
+
specifically mentions them in a symbolic mode, or uses an operator
|
| 589 |
+
numeric mode such as @samp{=755}, or sets them in a numeric mode, or
|
| 590 |
+
clears them in a numeric mode that has five or more octal digits.
|
| 591 |
+
For example, on systems that support
|
| 592 |
+
set-group-ID inheritance:
|
| 593 |
+
|
| 594 |
+
@example
|
| 595 |
+
# These commands leave the set-user-ID and
|
| 596 |
+
# set-group-ID bits of the subdirectories alone,
|
| 597 |
+
# so that they retain their default values.
|
| 598 |
+
mkdir A B C
|
| 599 |
+
chmod 755 A
|
| 600 |
+
chmod 0755 B
|
| 601 |
+
chmod u=rwx,go=rx C
|
| 602 |
+
mkdir -m 755 D
|
| 603 |
+
mkdir -m 0755 E
|
| 604 |
+
mkdir -m u=rwx,go=rx F
|
| 605 |
+
@end example
|
| 606 |
+
|
| 607 |
+
If you want to try to set these bits, you must mention them
|
| 608 |
+
explicitly in the symbolic or numeric modes, e.g.:
|
| 609 |
+
|
| 610 |
+
@example
|
| 611 |
+
# These commands try to set the set-user-ID
|
| 612 |
+
# and set-group-ID bits of the subdirectories.
|
| 613 |
+
mkdir G
|
| 614 |
+
chmod 6755 G
|
| 615 |
+
chmod +6000 G
|
| 616 |
+
chmod u=rwx,go=rx,a+s G
|
| 617 |
+
mkdir -m 6755 H
|
| 618 |
+
mkdir -m +6000 I
|
| 619 |
+
mkdir -m u=rwx,go=rx,a+s J
|
| 620 |
+
@end example
|
| 621 |
+
|
| 622 |
+
If you want to try to clear these bits, you must mention them
|
| 623 |
+
explicitly in a symbolic mode, or use an operator numeric mode, or
|
| 624 |
+
specify a numeric mode with five or more octal digits, e.g.:
|
| 625 |
+
|
| 626 |
+
@example
|
| 627 |
+
# These commands try to clear the set-user-ID
|
| 628 |
+
# and set-group-ID bits of the directory D.
|
| 629 |
+
chmod a-s D
|
| 630 |
+
chmod -6000 D
|
| 631 |
+
chmod =755 D
|
| 632 |
+
chmod 00755 D
|
| 633 |
+
@end example
|
| 634 |
+
|
| 635 |
+
This behavior is a GNU extension. Portable scripts should
|
| 636 |
+
not rely on requests to set or clear these bits on directories, as
|
| 637 |
+
POSIX allows implementations to ignore these requests.
|
| 638 |
+
The GNU behavior with numeric modes of four or fewer digits
|
| 639 |
+
is intended for scripts portable to systems that preserve these bits;
|
| 640 |
+
the behavior with numeric modes of five or more digits is for scripts
|
| 641 |
+
portable to systems that do not preserve the bits.
|
doc/sort-version.texi
ADDED
|
@@ -0,0 +1,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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@c GNU Version-sort ordering documentation
|
| 2 |
+
|
| 3 |
+
@c Copyright (C) 2019--2025 Free Software Foundation, Inc.
|
| 4 |
+
|
| 5 |
+
@c Permission is granted to copy, distribute and/or modify this document
|
| 6 |
+
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
| 7 |
+
@c any later version published by the Free Software Foundation; with no
|
| 8 |
+
@c Invariant Sections, no Front-Cover Texts, and no Back-Cover
|
| 9 |
+
@c Texts. A copy of the license is included in the ``GNU Free
|
| 10 |
+
@c Documentation License'' file as part of this distribution.
|
| 11 |
+
|
| 12 |
+
@c Written by Assaf Gordon
|
| 13 |
+
|
| 14 |
+
@node Version sort ordering
|
| 15 |
+
@chapter Version sort ordering
|
| 16 |
+
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
@node Version sort overview
|
| 20 |
+
@section Version sort overview
|
| 21 |
+
|
| 22 |
+
@dfn{Version sort} puts items such as file names and lines of
|
| 23 |
+
text in an order that feels natural to people, when the text
|
| 24 |
+
contains a mixture of letters and digits.
|
| 25 |
+
|
| 26 |
+
Lexicographic sorting usually does not produce the order that one expects
|
| 27 |
+
because comparisons are made on a character-by-character basis.
|
| 28 |
+
|
| 29 |
+
Compare the sorting of the following items:
|
| 30 |
+
|
| 31 |
+
@example
|
| 32 |
+
Lexicographic sort: Version Sort:
|
| 33 |
+
|
| 34 |
+
a1 a1
|
| 35 |
+
a120 a2
|
| 36 |
+
a13 a13
|
| 37 |
+
a2 a120
|
| 38 |
+
@end example
|
| 39 |
+
|
| 40 |
+
Version sort functionality in GNU Coreutils is available in the @samp{ls -v},
|
| 41 |
+
@samp{ls --sort=version}, @samp{sort -V}, and
|
| 42 |
+
@samp{sort --version-sort} commands.
|
| 43 |
+
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
@node Using version sort in GNU Coreutils
|
| 47 |
+
@subsection Using version sort in GNU Coreutils
|
| 48 |
+
|
| 49 |
+
Two GNU Coreutils programs use version sort: @command{ls} and @command{sort}.
|
| 50 |
+
|
| 51 |
+
To list files in version sort order, use @command{ls}
|
| 52 |
+
with the @option{-v} or @option{--sort=version} option:
|
| 53 |
+
|
| 54 |
+
@example
|
| 55 |
+
default sort: version sort:
|
| 56 |
+
|
| 57 |
+
$ ls -1 $ ls -1 -v
|
| 58 |
+
a1 a1
|
| 59 |
+
a100 a1.4
|
| 60 |
+
a1.13 a1.13
|
| 61 |
+
a1.4 a1.40
|
| 62 |
+
a1.40 a2
|
| 63 |
+
a2 a100
|
| 64 |
+
@end example
|
| 65 |
+
|
| 66 |
+
To sort text files in version sort order, use @command{sort} with
|
| 67 |
+
the @option{-V} or @option{--version-sort} option:
|
| 68 |
+
|
| 69 |
+
@example
|
| 70 |
+
$ cat input
|
| 71 |
+
b3
|
| 72 |
+
b11
|
| 73 |
+
b1
|
| 74 |
+
b20
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
lexicographic order: version sort order:
|
| 78 |
+
|
| 79 |
+
$ sort input $ sort -V input
|
| 80 |
+
b1 b1
|
| 81 |
+
b11 b3
|
| 82 |
+
b20 b11
|
| 83 |
+
b3 b20
|
| 84 |
+
@end example
|
| 85 |
+
|
| 86 |
+
To sort a specific field in a file, use @option{-k/--key} with
|
| 87 |
+
@samp{V} type sorting, which is often combined with @samp{b} to
|
| 88 |
+
ignore leading blanks in the field:
|
| 89 |
+
|
| 90 |
+
@example
|
| 91 |
+
$ cat input2
|
| 92 |
+
100 b3 apples
|
| 93 |
+
2000 b11 oranges
|
| 94 |
+
3000 b1 potatoes
|
| 95 |
+
4000 b20 bananas
|
| 96 |
+
$ sort -k 2bV,2 input2
|
| 97 |
+
3000 b1 potatoes
|
| 98 |
+
100 b3 apples
|
| 99 |
+
2000 b11 oranges
|
| 100 |
+
4000 b20 bananas
|
| 101 |
+
@end example
|
| 102 |
+
|
| 103 |
+
@node Version sort and natural sort
|
| 104 |
+
@subsection Version sort and natural sort
|
| 105 |
+
|
| 106 |
+
In GNU Coreutils, the name @dfn{version sort} was chosen because it is based
|
| 107 |
+
on Debian GNU/Linux's algorithm of sorting packages' versions.
|
| 108 |
+
|
| 109 |
+
Its goal is to answer questions like
|
| 110 |
+
``Which package is newer, @file{firefox-60.7.2} or @file{firefox-60.12.3}?''
|
| 111 |
+
|
| 112 |
+
In Coreutils this algorithm was slightly modified to work on more
|
| 113 |
+
general input such as textual strings and file names
|
| 114 |
+
(see @ref{Differences from Debian version sort}).
|
| 115 |
+
|
| 116 |
+
In other contexts, such as other programs and other programming
|
| 117 |
+
languages, a similar sorting functionality is called
|
| 118 |
+
@uref{https://en.wikipedia.org/wiki/Natural_sort_order,natural sort}.
|
| 119 |
+
|
| 120 |
+
|
| 121 |
+
@node Variations in version sort order
|
| 122 |
+
@subsection Variations in version sort order
|
| 123 |
+
|
| 124 |
+
Currently there is no standard for version sort.
|
| 125 |
+
|
| 126 |
+
That is: there is no one correct way or universally agreed-upon way to
|
| 127 |
+
order items. Each program and each programming language can decide its
|
| 128 |
+
own ordering algorithm and call it ``version sort'', ``natural sort'',
|
| 129 |
+
or other names.
|
| 130 |
+
|
| 131 |
+
See @ref{Other version/natural sort implementations} for many examples of
|
| 132 |
+
differing sorting possibilities, each with its own rules and variations.
|
| 133 |
+
|
| 134 |
+
If you find a bug in the Coreutils implementation of version-sort, please
|
| 135 |
+
report it. @xref{Reporting version sort bugs}.
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
@node Version sort implementation
|
| 139 |
+
@section Version sort implementation
|
| 140 |
+
|
| 141 |
+
GNU Coreutils version sort is based on the ``upstream version''
|
| 142 |
+
part of
|
| 143 |
+
@uref{https://www.debian.org/doc/debian-policy/ch-controlfields.html#version,
|
| 144 |
+
Debian's versioning scheme}.
|
| 145 |
+
|
| 146 |
+
This section describes the GNU Coreutils sort ordering rules.
|
| 147 |
+
|
| 148 |
+
The next section (@ref{Differences from Debian version
|
| 149 |
+
sort}) describes some differences between GNU Coreutils
|
| 150 |
+
and Debian version sort.
|
| 151 |
+
|
| 152 |
+
|
| 153 |
+
@node Version-sort ordering rules
|
| 154 |
+
@subsection Version-sort ordering rules
|
| 155 |
+
|
| 156 |
+
The version sort ordering rules are:
|
| 157 |
+
|
| 158 |
+
@enumerate
|
| 159 |
+
@item
|
| 160 |
+
The strings are compared from left to right.
|
| 161 |
+
|
| 162 |
+
@item
|
| 163 |
+
First the initial part of each string consisting entirely of non-digit
|
| 164 |
+
bytes is determined.
|
| 165 |
+
|
| 166 |
+
@enumerate A
|
| 167 |
+
@item
|
| 168 |
+
These two parts (either of which may be empty) are compared lexically.
|
| 169 |
+
If a difference is found it is returned.
|
| 170 |
+
|
| 171 |
+
@item
|
| 172 |
+
The lexical comparison is a lexicographic comparison of byte strings,
|
| 173 |
+
except that:
|
| 174 |
+
|
| 175 |
+
@enumerate a
|
| 176 |
+
@item
|
| 177 |
+
ASCII letters sort before other bytes.
|
| 178 |
+
@item
|
| 179 |
+
A tilde sorts before anything, even an empty string.
|
| 180 |
+
@end enumerate
|
| 181 |
+
@end enumerate
|
| 182 |
+
|
| 183 |
+
@item
|
| 184 |
+
Then the initial part of the remainder of each string that contains
|
| 185 |
+
all the leading digits is determined. The numerical values represented by
|
| 186 |
+
these two parts are compared, and any difference found is returned as
|
| 187 |
+
the result of the comparison.
|
| 188 |
+
|
| 189 |
+
@enumerate A
|
| 190 |
+
@item
|
| 191 |
+
For these purposes an empty string (which can only occur at the end of
|
| 192 |
+
one or both version strings being compared) counts as zero.
|
| 193 |
+
|
| 194 |
+
@item
|
| 195 |
+
Because the numerical value is used, non-identical strings can compare
|
| 196 |
+
equal. For example, @samp{123} compares equal to @samp{00123}, and
|
| 197 |
+
the empty string compares equal to @samp{0}.
|
| 198 |
+
@end enumerate
|
| 199 |
+
|
| 200 |
+
@item
|
| 201 |
+
These two steps (comparing and removing initial non-digit strings and
|
| 202 |
+
initial digit strings) are repeated until a difference is found or
|
| 203 |
+
both strings are exhausted.
|
| 204 |
+
@end enumerate
|
| 205 |
+
|
| 206 |
+
Consider the version-sort comparison of two file names:
|
| 207 |
+
@file{foo07.7z} and @file{foo7a.7z}. The two strings will be broken
|
| 208 |
+
down to the following parts, and the parts compared respectively from
|
| 209 |
+
each string:
|
| 210 |
+
|
| 211 |
+
@example
|
| 212 |
+
foo @r{vs} foo @r{(rule 2, non-digits)}
|
| 213 |
+
07 @r{vs} 7 @r{(rule 3, digits)}
|
| 214 |
+
. @r{vs} a. @r{(rule 2)}
|
| 215 |
+
7 @r{vs} 7 @r{(rule 3)}
|
| 216 |
+
z @r{vs} z @r{(rule 2)}
|
| 217 |
+
@end example
|
| 218 |
+
|
| 219 |
+
Comparison flow based on above algorithm:
|
| 220 |
+
|
| 221 |
+
@enumerate
|
| 222 |
+
@item
|
| 223 |
+
The first parts (@samp{foo}) are identical.
|
| 224 |
+
|
| 225 |
+
@item
|
| 226 |
+
The second parts (@samp{07} and @samp{7}) are compared numerically,
|
| 227 |
+
and compare equal.
|
| 228 |
+
|
| 229 |
+
@item
|
| 230 |
+
The third parts (@samp{.} vs @samp{a.}) are compared
|
| 231 |
+
lexically by ASCII value (rule 2.B).
|
| 232 |
+
|
| 233 |
+
@item
|
| 234 |
+
The first byte of the first string (@samp{.}) is compared
|
| 235 |
+
to the first byte of the second string (@samp{a}).
|
| 236 |
+
|
| 237 |
+
@item
|
| 238 |
+
Rule 2.B.a says letters sorts before non-letters.
|
| 239 |
+
Hence, @samp{a} comes before @samp{.}.
|
| 240 |
+
|
| 241 |
+
@item
|
| 242 |
+
The returned result is that @file{foo7a.7z} comes before @file{foo07.7z}.
|
| 243 |
+
@end enumerate
|
| 244 |
+
|
| 245 |
+
Result when using sort:
|
| 246 |
+
|
| 247 |
+
@example
|
| 248 |
+
$ cat input3
|
| 249 |
+
foo07.7z
|
| 250 |
+
foo7a.7z
|
| 251 |
+
$ sort -V input3
|
| 252 |
+
foo7a.7z
|
| 253 |
+
foo07.7z
|
| 254 |
+
@end example
|
| 255 |
+
|
| 256 |
+
See @ref{Differences from Debian version sort} for
|
| 257 |
+
additional rules that extend the Debian algorithm in Coreutils.
|
| 258 |
+
|
| 259 |
+
|
| 260 |
+
@node Version sort is not the same as numeric sort
|
| 261 |
+
@subsection Version sort is not the same as numeric sort
|
| 262 |
+
|
| 263 |
+
Consider the following text file:
|
| 264 |
+
|
| 265 |
+
@example
|
| 266 |
+
$ cat input4
|
| 267 |
+
8.10
|
| 268 |
+
8.5
|
| 269 |
+
8.1
|
| 270 |
+
8.01
|
| 271 |
+
8.010
|
| 272 |
+
8.100
|
| 273 |
+
8.49
|
| 274 |
+
|
| 275 |
+
Numerical Sort: Version Sort:
|
| 276 |
+
|
| 277 |
+
$ sort -n input4 $ sort -V input4
|
| 278 |
+
8.01 8.01
|
| 279 |
+
8.010 8.1
|
| 280 |
+
8.1 8.5
|
| 281 |
+
8.10 8.010
|
| 282 |
+
8.100 8.10
|
| 283 |
+
8.49 8.49
|
| 284 |
+
8.5 8.100
|
| 285 |
+
@end example
|
| 286 |
+
|
| 287 |
+
Numeric sort (@samp{sort -n}) treats the entire string as a single numeric
|
| 288 |
+
value, and compares it to other values. For example, @samp{8.1}, @samp{8.10} and
|
| 289 |
+
@samp{8.100} are numerically equivalent, and are ordered together. Similarly,
|
| 290 |
+
@samp{8.49} is numerically less than @samp{8.5}, and appears before first.
|
| 291 |
+
|
| 292 |
+
Version sort (@samp{sort -V}) first breaks down the string into digit and
|
| 293 |
+
non-digit parts, and only then compares each part (see annotated
|
| 294 |
+
example in @ref{Version-sort ordering rules}).
|
| 295 |
+
|
| 296 |
+
Comparing the string @samp{8.1} to @samp{8.01}, first the
|
| 297 |
+
@samp{8}s are compared (and are identical), then the
|
| 298 |
+
dots (@samp{.}) are compared and are identical, and lastly the
|
| 299 |
+
remaining digits are compared numerically (@samp{1} and @samp{01}) --
|
| 300 |
+
which are numerically equal. Hence, @samp{8.01} and @samp{8.1}
|
| 301 |
+
are grouped together.
|
| 302 |
+
|
| 303 |
+
Similarly, comparing @samp{8.5} to @samp{8.49} -- the @samp{8}
|
| 304 |
+
and @samp{.} parts are identical, then the numeric values @samp{5} and
|
| 305 |
+
@samp{49} are compared. The resulting @samp{5} appears before @samp{49}.
|
| 306 |
+
|
| 307 |
+
This sorting order (where @samp{8.5} comes before @samp{8.49}) is common when
|
| 308 |
+
assigning versions to computer programs (while perhaps not intuitive
|
| 309 |
+
or ``natural'' for people).
|
| 310 |
+
|
| 311 |
+
@node Version sort punctuation
|
| 312 |
+
@subsection Version sort punctuation
|
| 313 |
+
|
| 314 |
+
Punctuation is sorted by ASCII order (rule 2.B).
|
| 315 |
+
|
| 316 |
+
@example
|
| 317 |
+
$ touch 1.0.5_src.tar.gz 1.0_src.tar.gz
|
| 318 |
+
$ ls -v -1
|
| 319 |
+
1.0.5_src.tar.gz
|
| 320 |
+
1.0_src.tar.gz
|
| 321 |
+
@end example
|
| 322 |
+
|
| 323 |
+
Why is @file{1.0.5_src.tar.gz} listed before @file{1.0_src.tar.gz}?
|
| 324 |
+
|
| 325 |
+
Based on the version-sort ordering rules, the strings are broken down
|
| 326 |
+
into the following parts:
|
| 327 |
+
|
| 328 |
+
@example
|
| 329 |
+
1 @r{vs} 1 @r{(rule 3, all digits)}
|
| 330 |
+
. @r{vs} . @r{(rule 2, all non-digits)}
|
| 331 |
+
0 @r{vs} 0 @r{(rule 3)}
|
| 332 |
+
. @r{vs} _src.tar.gz @r{(rule 2)}
|
| 333 |
+
5 @r{vs} empty string @r{(no more bytes in the file name)}
|
| 334 |
+
_src.tar.gz @r{vs} empty string
|
| 335 |
+
@end example
|
| 336 |
+
|
| 337 |
+
The fourth parts (@samp{.} and @samp{_src.tar.gz}) are compared
|
| 338 |
+
lexically by ASCII order. The @samp{.} (ASCII value 46) is
|
| 339 |
+
less than @samp{_} (ASCII value 95) -- and should be listed before it.
|
| 340 |
+
|
| 341 |
+
Hence, @file{1.0.5_src.tar.gz} is listed first.
|
| 342 |
+
|
| 343 |
+
If a different byte appears instead of the underscore (for
|
| 344 |
+
example, percent sign @samp{%} ASCII value 37, which is less
|
| 345 |
+
than dot's ASCII value of 46), that file will be listed first:
|
| 346 |
+
|
| 347 |
+
@example
|
| 348 |
+
$ touch 1.0.5_src.tar.gz 1.0%zzzzz.gz
|
| 349 |
+
1.0%zzzzz.gz
|
| 350 |
+
1.0.5_src.tar.gz
|
| 351 |
+
@end example
|
| 352 |
+
|
| 353 |
+
The same reasoning applies to the following example, as @samp{.} with
|
| 354 |
+
ASCII value 46 is less than @samp{/} with ASCII value 47:
|
| 355 |
+
|
| 356 |
+
@example
|
| 357 |
+
$ cat input5
|
| 358 |
+
3.0/
|
| 359 |
+
3.0.5
|
| 360 |
+
$ sort -V input5
|
| 361 |
+
3.0.5
|
| 362 |
+
3.0/
|
| 363 |
+
@end example
|
| 364 |
+
|
| 365 |
+
|
| 366 |
+
@node Punctuation vs letters
|
| 367 |
+
@subsection Punctuation vs letters
|
| 368 |
+
|
| 369 |
+
Rule 2.B.a says letters sort before non-letters
|
| 370 |
+
(after breaking down a string to digit and non-digit parts).
|
| 371 |
+
|
| 372 |
+
@example
|
| 373 |
+
$ cat input6
|
| 374 |
+
a%
|
| 375 |
+
az
|
| 376 |
+
$ sort -V input6
|
| 377 |
+
az
|
| 378 |
+
a%
|
| 379 |
+
@end example
|
| 380 |
+
|
| 381 |
+
The input strings consist entirely of non-digits, and based on the
|
| 382 |
+
above algorithm have only one part, all non-digits
|
| 383 |
+
(@samp{a%} vs @samp{az}).
|
| 384 |
+
|
| 385 |
+
Each part is then compared lexically,
|
| 386 |
+
byte-by-byte; @samp{a} compares identically in both
|
| 387 |
+
strings.
|
| 388 |
+
|
| 389 |
+
Rule 2.B.a says a letter like @samp{z} sorts before
|
| 390 |
+
a non-letter like @samp{%} -- hence @samp{az} appears first (despite
|
| 391 |
+
@samp{z} having ASCII value of 122, much larger than @samp{%}
|
| 392 |
+
with ASCII value 37).
|
| 393 |
+
|
| 394 |
+
@node The tilde @samp{~}
|
| 395 |
+
@subsection The tilde @samp{~}
|
| 396 |
+
|
| 397 |
+
Rule 2.B.b says the tilde @samp{~} (ASCII 126) sorts
|
| 398 |
+
before other bytes, and before an empty string.
|
| 399 |
+
|
| 400 |
+
@example
|
| 401 |
+
$ cat input7
|
| 402 |
+
1
|
| 403 |
+
1%
|
| 404 |
+
1.2
|
| 405 |
+
1~
|
| 406 |
+
~
|
| 407 |
+
$ sort -V input7
|
| 408 |
+
~
|
| 409 |
+
1~
|
| 410 |
+
1
|
| 411 |
+
1%
|
| 412 |
+
1.2
|
| 413 |
+
@end example
|
| 414 |
+
|
| 415 |
+
The sorting algorithm starts by breaking down the string into
|
| 416 |
+
non-digit (rule 2) and digit parts (rule 3).
|
| 417 |
+
|
| 418 |
+
In the above input file, only the last line in the input file starts
|
| 419 |
+
with a non-digit (@samp{~}). This is the first part. All other lines
|
| 420 |
+
in the input file start with a digit -- their first non-digit part is
|
| 421 |
+
empty.
|
| 422 |
+
|
| 423 |
+
Based on rule 2.B.b, tilde @samp{~} sorts before other bytes
|
| 424 |
+
and before the empty string -- hence it comes before all other strings,
|
| 425 |
+
and is listed first in the sorted output.
|
| 426 |
+
|
| 427 |
+
The remaining lines (@samp{1}, @samp{1%}, @samp{1.2}, @samp{1~})
|
| 428 |
+
follow similar logic: The digit part is extracted (1 for all strings)
|
| 429 |
+
and compares equal. The following extracted parts for the remaining
|
| 430 |
+
input lines are: empty part, @samp{%}, @samp{.}, @samp{~}.
|
| 431 |
+
|
| 432 |
+
Tilde sorts before all others, hence the line @samp{1~} appears next.
|
| 433 |
+
|
| 434 |
+
The remaining lines (@samp{1}, @samp{1%}, @samp{1.2}) are sorted based
|
| 435 |
+
on previously explained rules.
|
| 436 |
+
|
| 437 |
+
@node Version sort ignores locale
|
| 438 |
+
@subsection Version sort ignores locale
|
| 439 |
+
|
| 440 |
+
In version sort, Unicode characters are compared byte-by-byte according
|
| 441 |
+
to their binary representation, ignoring their Unicode value or the
|
| 442 |
+
current locale.
|
| 443 |
+
|
| 444 |
+
Most commonly, Unicode characters are encoded as UTF-8 bytes; for
|
| 445 |
+
example, GREEK SMALL LETTER ALPHA (U+03B1, @samp{α}) is encoded as the
|
| 446 |
+
UTF-8 sequence @samp{0xCE 0xB1}). The encoding is compared
|
| 447 |
+
byte-by-byte, e.g., first @samp{0xCE} (decimal value 206) then
|
| 448 |
+
@samp{0xB1} (decimal value 177).
|
| 449 |
+
|
| 450 |
+
@example
|
| 451 |
+
$ touch aa az "a%" "aα"
|
| 452 |
+
$ ls -1 -v
|
| 453 |
+
aa
|
| 454 |
+
az
|
| 455 |
+
a%
|
| 456 |
+
aα
|
| 457 |
+
@end example
|
| 458 |
+
|
| 459 |
+
Ignoring the first letter (@samp{a}) which is identical in all
|
| 460 |
+
strings, the compared values are:
|
| 461 |
+
|
| 462 |
+
@samp{a} and @samp{z} are letters, and sort before
|
| 463 |
+
all other non-digits.
|
| 464 |
+
|
| 465 |
+
Then, percent sign @samp{%} (ASCII value 37) is compared to the
|
| 466 |
+
first byte of the UTF-8 sequence of @samp{α}, which is 0xCE or 206). The
|
| 467 |
+
value 37 is smaller, hence @samp{a%} is listed before @samp{aα}.
|
| 468 |
+
|
| 469 |
+
@node Differences from Debian version sort
|
| 470 |
+
@section Differences from Debian version sort
|
| 471 |
+
|
| 472 |
+
GNU Coreutils version sort differs slightly from the
|
| 473 |
+
official Debian algorithm, in order to accommodate more general usage
|
| 474 |
+
and file name listing.
|
| 475 |
+
|
| 476 |
+
|
| 477 |
+
@node Hyphen-minus and colon
|
| 478 |
+
@subsection Hyphen-minus @samp{-} and colon @samp{:}
|
| 479 |
+
|
| 480 |
+
In Debian's version string syntax the version consists of three parts:
|
| 481 |
+
@example
|
| 482 |
+
[epoch:]upstream_version[-debian_revision]
|
| 483 |
+
@end example
|
| 484 |
+
The @samp{epoch} and @samp{debian_revision} parts are optional.
|
| 485 |
+
|
| 486 |
+
Example of such version strings:
|
| 487 |
+
|
| 488 |
+
@example
|
| 489 |
+
60.7.2esr-1~deb9u1
|
| 490 |
+
52.9.0esr-1~deb9u1
|
| 491 |
+
1:2.3.4-1+b2
|
| 492 |
+
327-2
|
| 493 |
+
1:1.0.13-3
|
| 494 |
+
2:1.19.2-1+deb9u5
|
| 495 |
+
@end example
|
| 496 |
+
|
| 497 |
+
If the @samp{debian_revision part} is not present,
|
| 498 |
+
hyphens @samp{-} are not allowed.
|
| 499 |
+
If epoch is not present, colons @samp{:} are not allowed.
|
| 500 |
+
|
| 501 |
+
If these parts are present, hyphen and/or colons can appear only once
|
| 502 |
+
in valid Debian version strings.
|
| 503 |
+
|
| 504 |
+
In GNU Coreutils, such restrictions are not reasonable (a file name can
|
| 505 |
+
have many hyphens, a line of text can have many colons).
|
| 506 |
+
|
| 507 |
+
As a result, in GNU Coreutils hyphens and colons are treated exactly
|
| 508 |
+
like all other punctuation, i.e., they are sorted after
|
| 509 |
+
letters. @xref{Version sort punctuation}.
|
| 510 |
+
|
| 511 |
+
In Debian, these characters are treated differently than in Coreutils:
|
| 512 |
+
a version string with hyphen will sort before similar strings without
|
| 513 |
+
hyphens.
|
| 514 |
+
|
| 515 |
+
Compare:
|
| 516 |
+
|
| 517 |
+
@example
|
| 518 |
+
$ touch 1ab-cd 1abb
|
| 519 |
+
$ ls -v -1
|
| 520 |
+
1abb
|
| 521 |
+
1ab-cd
|
| 522 |
+
$ if dpkg --compare-versions 1abb lt 1ab-cd
|
| 523 |
+
> then echo sorted
|
| 524 |
+
> else echo out of order
|
| 525 |
+
> fi
|
| 526 |
+
out of order
|
| 527 |
+
@end example
|
| 528 |
+
|
| 529 |
+
For further details, see @ref{Comparing two strings using Debian's
|
| 530 |
+
algorithm} and @uref{https://bugs.gnu.org/35939,GNU Bug 35939}.
|
| 531 |
+
|
| 532 |
+
@node Special priority in GNU Coreutils version sort
|
| 533 |
+
@subsection Special priority in GNU Coreutils version sort
|
| 534 |
+
|
| 535 |
+
In GNU Coreutils version sort, the following items have
|
| 536 |
+
special priority and sort before all other strings (listed in order):
|
| 537 |
+
|
| 538 |
+
@enumerate
|
| 539 |
+
@item The empty string
|
| 540 |
+
|
| 541 |
+
@item The string @samp{.} (a single dot, ASCII 46)
|
| 542 |
+
|
| 543 |
+
@item The string @samp{..} (two dots)
|
| 544 |
+
|
| 545 |
+
@item Strings starting with dot (@samp{.}) sort before
|
| 546 |
+
strings starting with any other byte.
|
| 547 |
+
@end enumerate
|
| 548 |
+
|
| 549 |
+
Example:
|
| 550 |
+
|
| 551 |
+
@example
|
| 552 |
+
$ printf '%s\n' a "" b "." c ".." ".d20" ".d3" | sort -V
|
| 553 |
+
.
|
| 554 |
+
..
|
| 555 |
+
.d3
|
| 556 |
+
.d20
|
| 557 |
+
a
|
| 558 |
+
b
|
| 559 |
+
c
|
| 560 |
+
@end example
|
| 561 |
+
|
| 562 |
+
These priorities make perfect sense for @samp{ls -v}: The special
|
| 563 |
+
files dot @samp{.} and dot-dot @samp{..} will be listed
|
| 564 |
+
first, followed by any hidden files (files starting with a dot),
|
| 565 |
+
followed by non-hidden files.
|
| 566 |
+
|
| 567 |
+
For @samp{sort -V} these priorities might seem arbitrary. However,
|
| 568 |
+
because the sorting code is shared between the @command{ls} and @command{sort}
|
| 569 |
+
program, the ordering rules are the same.
|
| 570 |
+
|
| 571 |
+
@node Special handling of file extensions
|
| 572 |
+
@subsection Special handling of file extensions
|
| 573 |
+
|
| 574 |
+
GNU Coreutils version sort implements specialized handling
|
| 575 |
+
of strings that look like file names with extensions.
|
| 576 |
+
This enables slightly more natural ordering of file
|
| 577 |
+
names.
|
| 578 |
+
|
| 579 |
+
The following additional rules apply when comparing two strings where
|
| 580 |
+
both begin with non-@samp{.}. They also apply when comparing two
|
| 581 |
+
strings where both begin with @samp{.} but neither is @samp{.} or @samp{..}.
|
| 582 |
+
|
| 583 |
+
@enumerate
|
| 584 |
+
@item
|
| 585 |
+
A suffix (i.e., a file extension) is defined as: a dot, followed by an
|
| 586 |
+
ASCII letter or tilde, followed by zero or more ASCII letters, digits,
|
| 587 |
+
or tildes; all repeated zero or more times, and ending at string end.
|
| 588 |
+
This is equivalent to matching the extended regular expression
|
| 589 |
+
@code{(\.[A-Za-z~][A-Za-z0-9~]*)*$} in the C locale.
|
| 590 |
+
The longest such match is used, except that a suffix is not
|
| 591 |
+
allowed to match an entire nonempty string.
|
| 592 |
+
|
| 593 |
+
@item
|
| 594 |
+
The suffixes are temporarily removed, and the strings are compared
|
| 595 |
+
without them, using version sort (see @ref{Version-sort ordering
|
| 596 |
+
rules}) without special priority (see @ref{Special priority in GNU
|
| 597 |
+
Coreutils version sort}).
|
| 598 |
+
|
| 599 |
+
@item
|
| 600 |
+
If the suffix-less strings do not compare equal, this comparison
|
| 601 |
+
result is used and the suffixes are effectively ignored.
|
| 602 |
+
|
| 603 |
+
@item
|
| 604 |
+
If the suffix-less strings compare equal, the suffixes are restored
|
| 605 |
+
and the entire strings are compared using version sort.
|
| 606 |
+
@end enumerate
|
| 607 |
+
|
| 608 |
+
Examples for rule 1:
|
| 609 |
+
|
| 610 |
+
@itemize
|
| 611 |
+
@item
|
| 612 |
+
@samp{hello-8.txt}: the suffix is @samp{.txt}
|
| 613 |
+
|
| 614 |
+
@item
|
| 615 |
+
@samp{hello-8.2.txt}: the suffix is @samp{.txt}
|
| 616 |
+
(@samp{.2} is not included because the dot is not followed by a letter)
|
| 617 |
+
|
| 618 |
+
@item
|
| 619 |
+
@samp{hello-8.0.12.tar.gz}: the suffix is @samp{.tar.gz} (@samp{.0.12}
|
| 620 |
+
is not included)
|
| 621 |
+
|
| 622 |
+
@item
|
| 623 |
+
@samp{hello-8.2}: no suffix (suffix is an empty string)
|
| 624 |
+
|
| 625 |
+
@item
|
| 626 |
+
@samp{hello.foobar65}: the suffix is @samp{.foobar65}
|
| 627 |
+
|
| 628 |
+
@item
|
| 629 |
+
@samp{gcc-c++-10.8.12-0.7rc2.fc9.tar.bz2}: the suffix is
|
| 630 |
+
@samp{.fc9.tar.bz2} (@samp{.7rc2} is not included as it begins with a digit)
|
| 631 |
+
|
| 632 |
+
@item
|
| 633 |
+
@samp{.autom4te.cfg}: the suffix is the entire string.
|
| 634 |
+
@end itemize
|
| 635 |
+
|
| 636 |
+
Examples for rule 2:
|
| 637 |
+
|
| 638 |
+
@itemize
|
| 639 |
+
@item
|
| 640 |
+
Comparing @samp{hello-8.txt} to @samp{hello-8.2.12.txt}, the
|
| 641 |
+
@samp{.txt} suffix is temporarily removed from both strings.
|
| 642 |
+
|
| 643 |
+
@item
|
| 644 |
+
Comparing @samp{foo-10.3.tar.gz} to @samp{foo-10.tar.xz}, the suffixes
|
| 645 |
+
@samp{.tar.gz} and @samp{.tar.xz} are temporarily removed from the
|
| 646 |
+
strings.
|
| 647 |
+
@end itemize
|
| 648 |
+
|
| 649 |
+
Example for rule 3:
|
| 650 |
+
|
| 651 |
+
@itemize
|
| 652 |
+
@item
|
| 653 |
+
Comparing @samp{hello.foobar65} to @samp{hello.foobar4}, the suffixes
|
| 654 |
+
(@samp{.foobar65} and @samp{.foobar4}) are temporarily removed. The
|
| 655 |
+
remaining strings are identical (@samp{hello}). The suffixes are then
|
| 656 |
+
restored, and the entire strings are compared (@samp{hello.foobar4} comes
|
| 657 |
+
first).
|
| 658 |
+
@end itemize
|
| 659 |
+
|
| 660 |
+
Examples for rule 4:
|
| 661 |
+
|
| 662 |
+
@itemize
|
| 663 |
+
@item
|
| 664 |
+
When comparing the strings @samp{hello-8.2.txt} and @samp{hello-8.10.txt}, the
|
| 665 |
+
suffixes (@samp{.txt}) are temporarily removed. The remaining strings
|
| 666 |
+
(@samp{hello-8.2} and @samp{hello-8.10}) are compared as previously described
|
| 667 |
+
(@samp{hello-8.2} comes first).
|
| 668 |
+
@slanted{(In this case the suffix removal algorithm
|
| 669 |
+
does not have a noticeable effect on the resulting order.)}
|
| 670 |
+
@end itemize
|
| 671 |
+
|
| 672 |
+
@b{How does the suffix-removal algorithm effect ordering results?}
|
| 673 |
+
|
| 674 |
+
Consider the comparison of hello-8.txt and hello-8.2.txt.
|
| 675 |
+
|
| 676 |
+
Without the suffix-removal algorithm, the strings will be broken down
|
| 677 |
+
to the following parts:
|
| 678 |
+
|
| 679 |
+
@example
|
| 680 |
+
hello- @r{vs} hello- @r{(rule 2, all non-digits)}
|
| 681 |
+
8 @r{vs} 8 @r{(rule 3, all digits)}
|
| 682 |
+
.txt @r{vs} . @r{(rule 2)}
|
| 683 |
+
empty @r{vs} 2
|
| 684 |
+
empty @r{vs} .txt
|
| 685 |
+
@end example
|
| 686 |
+
|
| 687 |
+
The comparison of the third parts (@samp{.} vs
|
| 688 |
+
@samp{.txt}) will determine that the shorter string comes first --
|
| 689 |
+
resulting in @file{hello-8.2.txt} appearing first.
|
| 690 |
+
|
| 691 |
+
Indeed this is the order in which Debian's @command{dpkg} compares the strings.
|
| 692 |
+
|
| 693 |
+
A more natural result is that @file{hello-8.txt} should come before
|
| 694 |
+
@file{hello-8.2.txt}, and this is where the suffix-removal comes into play:
|
| 695 |
+
|
| 696 |
+
The suffixes (@samp{.txt}) are removed, and the remaining strings are
|
| 697 |
+
broken down into the following parts:
|
| 698 |
+
|
| 699 |
+
@example
|
| 700 |
+
hello- @r{vs} hello- @r{(rule 2, all non-digits)}
|
| 701 |
+
8 @r{vs} 8 @r{(rule 3, all digits)}
|
| 702 |
+
empty @r{vs} . @r{(rule 2)}
|
| 703 |
+
empty @r{vs} 2
|
| 704 |
+
@end example
|
| 705 |
+
|
| 706 |
+
As empty strings sort before non-empty strings, the result is @samp{hello-8}
|
| 707 |
+
being first.
|
| 708 |
+
|
| 709 |
+
A real-world example would be listing files such as:
|
| 710 |
+
@file{gcc_10.fc9.tar.gz}
|
| 711 |
+
and @file{gcc_10.8.12.7rc2.fc9.tar.bz2}: Debian's algorithm would list
|
| 712 |
+
@file{gcc_10.8.12.7rc2.fc9.tar.bz2} first, while @samp{ls -v} will list
|
| 713 |
+
@file{gcc_10.fc9.tar.gz} first.
|
| 714 |
+
|
| 715 |
+
These priorities make sense for @samp{ls -v}:
|
| 716 |
+
Versioned files will be listed in a more natural order.
|
| 717 |
+
|
| 718 |
+
For @samp{sort -V} these priorities might seem arbitrary. However,
|
| 719 |
+
because the sorting code is shared between the @command{ls} and @command{sort}
|
| 720 |
+
program, the ordering rules are the same.
|
| 721 |
+
|
| 722 |
+
|
| 723 |
+
@node Comparing two strings using Debian's algorithm
|
| 724 |
+
@subsection Comparing two strings using Debian's algorithm
|
| 725 |
+
|
| 726 |
+
The Debian program @command{dpkg} (available on all Debian and Ubuntu
|
| 727 |
+
installations) can compare two strings using the @option{--compare-versions}
|
| 728 |
+
option.
|
| 729 |
+
|
| 730 |
+
To use it, create a helper shell function (simply copy & paste the
|
| 731 |
+
following snippet to your shell command-prompt):
|
| 732 |
+
|
| 733 |
+
@example
|
| 734 |
+
compver() @{
|
| 735 |
+
if dpkg --compare-versions "$1" lt "$2"
|
| 736 |
+
then printf '%s\n' "$1" "$2"
|
| 737 |
+
else printf '%s\n' "$2" "$1"
|
| 738 |
+
fi
|
| 739 |
+
@}
|
| 740 |
+
@end example
|
| 741 |
+
|
| 742 |
+
Then compare two strings by calling @command{compver}:
|
| 743 |
+
|
| 744 |
+
@example
|
| 745 |
+
$ compver 8.49 8.5
|
| 746 |
+
8.5
|
| 747 |
+
8.49
|
| 748 |
+
@end example
|
| 749 |
+
|
| 750 |
+
Note that @command{dpkg} will warn if the strings have invalid syntax:
|
| 751 |
+
|
| 752 |
+
@example
|
| 753 |
+
$ compver "foo07.7z" "foo7a.7z"
|
| 754 |
+
dpkg: warning: version 'foo07.7z' has bad syntax:
|
| 755 |
+
version number does not start with digit
|
| 756 |
+
dpkg: warning: version 'foo7a.7z' has bad syntax:
|
| 757 |
+
version number does not start with digit
|
| 758 |
+
foo7a.7z
|
| 759 |
+
foo07.7z
|
| 760 |
+
$ compver "3.0/" "3.0.5"
|
| 761 |
+
dpkg: warning: version '3.0/' has bad syntax:
|
| 762 |
+
invalid character in version number
|
| 763 |
+
3.0.5
|
| 764 |
+
3.0/
|
| 765 |
+
@end example
|
| 766 |
+
|
| 767 |
+
To illustrate the different handling of hyphens between Debian and
|
| 768 |
+
Coreutils algorithms (see
|
| 769 |
+
@ref{Hyphen-minus and colon}):
|
| 770 |
+
|
| 771 |
+
@example
|
| 772 |
+
$ compver abb ab-cd 2>/dev/null $ printf 'abb\nab-cd\n' | sort -V
|
| 773 |
+
ab-cd abb
|
| 774 |
+
abb ab-cd
|
| 775 |
+
@end example
|
| 776 |
+
|
| 777 |
+
To illustrate the different handling of file extension: (see @ref{Special
|
| 778 |
+
handling of file extensions}):
|
| 779 |
+
|
| 780 |
+
@example
|
| 781 |
+
$ compver hello-8.txt hello-8.2.txt 2>/dev/null
|
| 782 |
+
hello-8.2.txt
|
| 783 |
+
hello-8.txt
|
| 784 |
+
$ printf '%s\n' hello-8.txt hello-8.2.txt | sort -V
|
| 785 |
+
hello-8.txt
|
| 786 |
+
hello-8.2.txt
|
| 787 |
+
@end example
|
| 788 |
+
|
| 789 |
+
|
| 790 |
+
@node Advanced version sort topics
|
| 791 |
+
@section Advanced Topics
|
| 792 |
+
|
| 793 |
+
|
| 794 |
+
@node Reporting version sort bugs
|
| 795 |
+
@subsection Reporting version sort bugs
|
| 796 |
+
|
| 797 |
+
If you suspect a bug in GNU Coreutils version sort (i.e., in the
|
| 798 |
+
output of @samp{ls -v} or @samp{sort -V}), please first check the following:
|
| 799 |
+
|
| 800 |
+
@enumerate
|
| 801 |
+
@item
|
| 802 |
+
Is the result consistent with Debian's own ordering (using @command{dpkg}, see
|
| 803 |
+
@ref{Comparing two strings using Debian's algorithm})? If it is, then this
|
| 804 |
+
is not a bug -- please do not report it.
|
| 805 |
+
|
| 806 |
+
@item
|
| 807 |
+
If the result differs from Debian's, is it explained by one of the
|
| 808 |
+
sections in @ref{Differences from Debian version sort}? If it is,
|
| 809 |
+
then this is not a bug -- please do not report it.
|
| 810 |
+
|
| 811 |
+
@item
|
| 812 |
+
If you have a question about specific ordering which is not explained
|
| 813 |
+
here, please write to @email{coreutils@@gnu.org}, and provide a
|
| 814 |
+
concise example that will help us diagnose the issue.
|
| 815 |
+
|
| 816 |
+
@item
|
| 817 |
+
If you still suspect a bug which is not explained by the above, please
|
| 818 |
+
write to @email{bug-coreutils@@gnu.org} with a concrete example of the
|
| 819 |
+
suspected incorrect output, with details on why you think it is
|
| 820 |
+
incorrect.
|
| 821 |
+
|
| 822 |
+
@end enumerate
|
| 823 |
+
|
| 824 |
+
@node Other version/natural sort implementations
|
| 825 |
+
@subsection Other version/natural sort implementations
|
| 826 |
+
|
| 827 |
+
As previously mentioned, there are multiple variations on
|
| 828 |
+
version/natural sort, each with its own rules. Some examples are:
|
| 829 |
+
|
| 830 |
+
@itemize
|
| 831 |
+
|
| 832 |
+
@item
|
| 833 |
+
Natural Sorting variants in
|
| 834 |
+
@uref{https://rosettacode.org/wiki/Natural_sorting,Rosetta Code}.
|
| 835 |
+
|
| 836 |
+
@item
|
| 837 |
+
Python's @uref{https://pypi.org/project/natsort/,natsort package}
|
| 838 |
+
(includes detailed description of their sorting rules:
|
| 839 |
+
@uref{https://natsort.readthedocs.io/en/master/howitworks.html,
|
| 840 |
+
natsort -- how it works}).
|
| 841 |
+
|
| 842 |
+
@item
|
| 843 |
+
Ruby's @uref{https://github.com/github/version_sorter,version_sorter}.
|
| 844 |
+
|
| 845 |
+
@item
|
| 846 |
+
Perl has multiple packages for natural and version sorts
|
| 847 |
+
(each likely with its own rules and nuances):
|
| 848 |
+
@uref{https://metacpan.org/pod/Sort::Naturally,Sort::Naturally},
|
| 849 |
+
@uref{https://metacpan.org/pod/Sort::Versions,Sort::Versions},
|
| 850 |
+
@uref{https://metacpan.org/pod/CPAN::Version,CPAN::Version}.
|
| 851 |
+
|
| 852 |
+
@item
|
| 853 |
+
PHP has a built-in function
|
| 854 |
+
@uref{https://www.php.net/manual/en/function.natsort.php,natsort}.
|
| 855 |
+
|
| 856 |
+
@item
|
| 857 |
+
NodeJS's @uref{https://www.npmjs.com/package/natural-sort,natural-sort package}.
|
| 858 |
+
|
| 859 |
+
@item
|
| 860 |
+
In zsh, the
|
| 861 |
+
@uref{https://zsh.sourceforge.net/Doc/Release/Expansion.html#Glob-Qualifiers,
|
| 862 |
+
glob modifier} @samp{*(n)} will expand to files in natural sort order.
|
| 863 |
+
|
| 864 |
+
@item
|
| 865 |
+
When writing C programs, the GNU libc library (@samp{glibc})
|
| 866 |
+
provides the
|
| 867 |
+
@uref{https://man7.org/linux/man-pages/man3/strverscmp.3.html,
|
| 868 |
+
strverscmp(3)} function to compare two strings, and
|
| 869 |
+
@uref{https://man7.org/linux/man-pages/man3/versionsort.3.html,versionsort(3)}
|
| 870 |
+
function to compare two directory entries (despite the names, they are
|
| 871 |
+
not identical to GNU Coreutils version sort ordering).
|
| 872 |
+
|
| 873 |
+
@item
|
| 874 |
+
Using Debian's sorting algorithm in:
|
| 875 |
+
|
| 876 |
+
@itemize
|
| 877 |
+
@item
|
| 878 |
+
python: @uref{https://stackoverflow.com/a/4957741,
|
| 879 |
+
Stack Overflow Example #4957741}.
|
| 880 |
+
|
| 881 |
+
@item
|
| 882 |
+
NodeJS: @uref{https://www.npmjs.com/package/deb-version-compare,
|
| 883 |
+
deb-version-compare}.
|
| 884 |
+
@end itemize
|
| 885 |
+
|
| 886 |
+
@end itemize
|
| 887 |
+
|
| 888 |
+
|
| 889 |
+
@node Related source code
|
| 890 |
+
@subsection Related source code
|
| 891 |
+
|
| 892 |
+
@itemize
|
| 893 |
+
|
| 894 |
+
@item
|
| 895 |
+
Debian's code which splits a version string into
|
| 896 |
+
@code{epoch/upstream_version/debian_revision} parts:
|
| 897 |
+
@uref{https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/lib/dpkg/parsehelp.c#n191,
|
| 898 |
+
parsehelp.c:parseversion()}.
|
| 899 |
+
|
| 900 |
+
@item
|
| 901 |
+
Debian's code which performs the @code{upstream_version} comparison:
|
| 902 |
+
@uref{https://git.dpkg.org/cgit/dpkg/dpkg.git/tree/lib/dpkg/version.c#n140,
|
| 903 |
+
version.c}.
|
| 904 |
+
|
| 905 |
+
@item
|
| 906 |
+
Gnulib code (used by GNU Coreutils) which performs the version comparison:
|
| 907 |
+
@uref{https://git.savannah.gnu.org/cgit/gnulib.git/tree/lib/filevercmp.c,
|
| 908 |
+
filevercmp.c}.
|
| 909 |
+
@end itemize
|
doc/stamp-vti
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@set UPDATED 27 October 2025
|
| 2 |
+
@set UPDATED-MONTH October 2025
|
| 3 |
+
@set EDITION UNKNOWN
|
| 4 |
+
@set VERSION UNKNOWN
|
doc/version.texi
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@set UPDATED 27 October 2025
|
| 2 |
+
@set UPDATED-MONTH October 2025
|
| 3 |
+
@set EDITION UNKNOWN
|
| 4 |
+
@set VERSION UNKNOWN
|
gl/lib/buffer-lcm.c
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* buffer-lcm.c - compute a good buffer size for dealing with two files
|
| 2 |
+
|
| 3 |
+
Copyright (C) 2002-2025 Free Software Foundation, Inc.
|
| 4 |
+
|
| 5 |
+
This program is free software: you can redistribute it and/or modify
|
| 6 |
+
it under the terms of the GNU General Public License as published by
|
| 7 |
+
the Free Software Foundation, either version 3 of the License, or
|
| 8 |
+
(at your option) any later version.
|
| 9 |
+
|
| 10 |
+
This program is distributed in the hope that it will be useful,
|
| 11 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
+
GNU General Public License for more details.
|
| 14 |
+
|
| 15 |
+
You should have received a copy of the GNU General Public License
|
| 16 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
| 17 |
+
|
| 18 |
+
/* Written by Paul Eggert. */
|
| 19 |
+
|
| 20 |
+
#include <config.h>
|
| 21 |
+
#include "buffer-lcm.h"
|
| 22 |
+
|
| 23 |
+
/* Return a buffer size suitable for doing I/O with files whose block
|
| 24 |
+
sizes are A and B. However, never return a value greater than
|
| 25 |
+
LCM_MAX. */
|
| 26 |
+
|
| 27 |
+
size_t
|
| 28 |
+
buffer_lcm (size_t a, size_t b, size_t lcm_max)
|
| 29 |
+
{
|
| 30 |
+
size_t size;
|
| 31 |
+
|
| 32 |
+
/* Use reasonable values if buffer sizes are zero. */
|
| 33 |
+
if (!a)
|
| 34 |
+
size = b ? b : 8 * 1024;
|
| 35 |
+
else
|
| 36 |
+
{
|
| 37 |
+
if (b)
|
| 38 |
+
{
|
| 39 |
+
/* Return lcm (A, B) if it is in range; otherwise, fall back
|
| 40 |
+
on A. */
|
| 41 |
+
|
| 42 |
+
size_t lcm, m, n, q, r;
|
| 43 |
+
|
| 44 |
+
/* N = gcd (A, B). */
|
| 45 |
+
for (m = a, n = b; (r = m % n) != 0; m = n, n = r)
|
| 46 |
+
continue;
|
| 47 |
+
|
| 48 |
+
/* LCM = lcm (A, B), if in range. */
|
| 49 |
+
q = a / n;
|
| 50 |
+
lcm = q * b;
|
| 51 |
+
if (lcm <= lcm_max && lcm / b == q)
|
| 52 |
+
return lcm;
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
size = a;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
return size <= lcm_max ? size : lcm_max;
|
| 59 |
+
}
|
gl/lib/buffer-lcm.h
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <stddef.h>
|
| 2 |
+
size_t buffer_lcm (size_t, size_t, size_t) _GL_ATTRIBUTE_CONST;
|
gl/lib/cl-strtod.c
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/* Convert string to double in the current locale, falling back on the C locale.
|
| 2 |
+
|
| 3 |
+
Copyright 2019-2025 Free Software Foundation, Inc.
|
| 4 |
+
|
| 5 |
+
This program is free software: you can redistribute it and/or modify
|
| 6 |
+
it under the terms of the GNU General Public License as published by
|
| 7 |
+
the Free Software Foundation; either version 3 of the License, or
|
| 8 |
+
(at your option) any later version.
|
| 9 |
+
|
| 10 |
+
This program is distributed in the hope that it will be useful,
|
| 11 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 12 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
| 13 |
+
GNU General Public License for more details.
|
| 14 |
+
|
| 15 |
+
You should have received a copy of the GNU General Public License
|
| 16 |
+
along with this program. If not, see <https://www.gnu.org/licenses/>. */
|
| 17 |
+
|
| 18 |
+
/* Written by Paul Eggert. */
|
| 19 |
+
|
| 20 |
+
#include <config.h>
|
| 21 |
+
|
| 22 |
+
#include "cl-strtod.h"
|
| 23 |
+
|
| 24 |
+
#include <c-strtod.h>
|
| 25 |
+
|
| 26 |
+
#include <errno.h>
|
| 27 |
+
#include <stdlib.h>
|
| 28 |
+
|
| 29 |
+
#if LONG
|
| 30 |
+
# define CL_STRTOD cl_strtold
|
| 31 |
+
# define DOUBLE long double
|
| 32 |
+
# define C_STRTOD c_strtold
|
| 33 |
+
# define STRTOD strtold
|
| 34 |
+
#else
|
| 35 |
+
# define CL_STRTOD cl_strtod
|
| 36 |
+
# define DOUBLE double
|
| 37 |
+
# define C_STRTOD c_strtod
|
| 38 |
+
# define STRTOD strtod
|
| 39 |
+
#endif
|
| 40 |
+
|
| 41 |
+
/* This function acts like strtod or strtold, except that it falls
|
| 42 |
+
back on the C locale if the initial prefix is not parsable in
|
| 43 |
+
the current locale. If the prefix is parsable in both locales,
|
| 44 |
+
it uses the longer parse, breaking ties in favor of the current locale.
|
| 45 |
+
|
| 46 |
+
Parse the initial prefix of NPTR as a floating-point number in the
|
| 47 |
+
current locale or in the C locale (preferring the locale that
|
| 48 |
+
yields the longer parse, or the current locale if there is a tie).
|
| 49 |
+
If ENDPTR is non-null, set *ENDPTR to the first unused byte, or to
|
| 50 |
+
NPTR if the prefix cannot be parsed.
|
| 51 |
+
|
| 52 |
+
If successful, return a number without changing errno.
|
| 53 |
+
If the prefix cannot be parsed, return 0 and possibly set errno to EINVAL.
|
| 54 |
+
If the number overflows, return an extreme value and set errno to ERANGE.
|
| 55 |
+
If the number underflows, return a value close to 0 and set errno to ERANGE.
|
| 56 |
+
If there is some other error, return 0 and set errno. */
|
| 57 |
+
|
| 58 |
+
DOUBLE
|
| 59 |
+
CL_STRTOD (char const *nptr, char **restrict endptr)
|
| 60 |
+
{
|
| 61 |
+
char *end;
|
| 62 |
+
DOUBLE d = STRTOD (nptr, &end);
|
| 63 |
+
if (*end)
|
| 64 |
+
{
|
| 65 |
+
int strtod_errno = errno;
|
| 66 |
+
char *c_end;
|
| 67 |
+
DOUBLE c = C_STRTOD (nptr, &c_end);
|
| 68 |
+
if (end < c_end)
|
| 69 |
+
d = c, end = c_end;
|
| 70 |
+
else
|
| 71 |
+
errno = strtod_errno;
|
| 72 |
+
}
|
| 73 |
+
if (endptr)
|
| 74 |
+
*endptr = end;
|
| 75 |
+
return d;
|
| 76 |
+
}
|
gl/lib/cl-strtod.h
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
double cl_strtod (char const *, char **restrict)
|
| 2 |
+
_GL_ATTRIBUTE_NONNULL ((1));
|
| 3 |
+
long double cl_strtold (char const *, char **restrict)
|
| 4 |
+
_GL_ATTRIBUTE_NONNULL ((1));
|
gl/lib/cl-strtold.c
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#define LONG 1
|
| 2 |
+
#include "cl-strtod.c"
|
gl/lib/dtimespec-bound.c
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include <config.h>
|
| 2 |
+
#define DTIMESPEC_BOUND_INLINE _GL_EXTERN_INLINE
|
| 3 |
+
#include "dtimespec-bound.h"
|