mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2025-09-10 07:59:52 +02:00
Compare commits
218 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af1996dde2 | ||
|
|
7f242fadfa | ||
|
|
3db7c2c03c | ||
|
|
a70ac4ef32 | ||
|
|
112bccb26b | ||
|
|
611870a8f3 | ||
|
|
718b2790c0 | ||
|
|
6f6599a006 | ||
|
|
d25101cc30 | ||
|
|
ea57d46482 | ||
|
|
eca6a4a21a | ||
|
|
60d0413fe6 | ||
|
|
dc1618fbd8 | ||
|
|
e4dcb20e83 | ||
|
|
ea5b7124b4 | ||
|
|
f0a1f0df22 | ||
|
|
8574c74325 | ||
|
|
11ccbdab27 | ||
|
|
f43f028652 | ||
|
|
e4caea5775 | ||
|
|
ab274c428d | ||
|
|
e32320de66 | ||
|
|
eb2f9e84b9 | ||
|
|
a1d7469835 | ||
|
|
ff159a605e | ||
|
|
c5c15884df | ||
|
|
5929322ccb | ||
|
|
365fb90eaa | ||
|
|
eae535e1a3 | ||
|
|
1762092901 | ||
|
|
c60f151ebd | ||
|
|
48726556ca | ||
|
|
81ae3611d3 | ||
|
|
c06547cade | ||
|
|
28e3946ef0 | ||
|
|
c9871986eb | ||
|
|
2ac2cace15 | ||
|
|
d3feea0181 | ||
|
|
5ef9069576 | ||
|
|
e40c5f735c | ||
|
|
bc51349ccd | ||
|
|
4533017669 | ||
|
|
095861179c | ||
|
|
1bc5395e92 | ||
|
|
c91c85647c | ||
|
|
9d87a45b2f | ||
|
|
8aeda9b930 | ||
|
|
e81c4d88c2 | ||
|
|
5874a8215d | ||
|
|
493c481684 | ||
|
|
6edc9c972e | ||
|
|
2f4188ebec | ||
|
|
0bf77fc8ec | ||
|
|
394e3ef72a | ||
|
|
9f9e2d81d1 | ||
|
|
571b7e3eee | ||
|
|
954dba24d4 | ||
|
|
4612670f46 | ||
|
|
8f3171bbc4 | ||
|
|
68149832bd | ||
|
|
a9461064b8 | ||
|
|
ad7b37bfd4 | ||
|
|
0d64bc4429 | ||
|
|
0e93175301 | ||
|
|
3639a880aa | ||
|
|
ec34511ccf | ||
|
|
2c20fd053b | ||
|
|
42cd6653b0 | ||
|
|
065ce24361 | ||
|
|
acc01947af | ||
|
|
d9f83f9a60 | ||
|
|
66ac50e723 | ||
|
|
d106277d45 | ||
|
|
962878499c | ||
|
|
3e565eb3a6 | ||
|
|
6d0d1c47b2 | ||
|
|
5718733510 | ||
|
|
f24b825171 | ||
|
|
07c6f21b81 | ||
|
|
b3f293c61b | ||
|
|
e472f8fece | ||
|
|
1c16c9598e | ||
|
|
9c6c621c32 | ||
|
|
2232b4d08f | ||
|
|
ec00727a72 | ||
|
|
f9554bbe25 | ||
|
|
fc66fb4d99 | ||
|
|
0975852c50 | ||
|
|
0c131d4c10 | ||
|
|
25a18dafb8 | ||
|
|
a5a2a406f8 | ||
|
|
ff6fe3d17d | ||
|
|
f51a401bc2 | ||
|
|
c0d8245288 | ||
|
|
ae494d4be8 | ||
|
|
358aca5fb9 | ||
|
|
24c727d3c2 | ||
|
|
ba1c5239bc | ||
|
|
0df338f671 | ||
|
|
502be19e0f | ||
|
|
523c40505c | ||
|
|
f9a950b87f | ||
|
|
5424a74725 | ||
|
|
d8243c25cd | ||
|
|
59400b2884 | ||
|
|
d7397c1e7b | ||
|
|
a65957da77 | ||
|
|
ba6e08c627 | ||
|
|
18db64ba7e | ||
|
|
4dbfbf3fd0 | ||
|
|
0818c52874 | ||
|
|
a5c627f9c6 | ||
|
|
b96cd035ff | ||
|
|
2e62250e98 | ||
|
|
bb7ff3bccd | ||
|
|
df356c22ba | ||
|
|
f9bb168f56 | ||
|
|
c43333419b | ||
|
|
159faba137 | ||
|
|
c45c51fe97 | ||
|
|
39285f6008 | ||
|
|
b7f6e0d516 | ||
|
|
088a7ca9b1 | ||
|
|
564622fbea | ||
|
|
2726826c72 | ||
|
|
9593a3d8e7 | ||
|
|
65ed4ca07b | ||
|
|
9b54961b13 | ||
|
|
50ca12c28d | ||
|
|
242f801adf | ||
|
|
bba5fed6ba | ||
|
|
fc9fdd18b3 | ||
|
|
42e3278f8f | ||
|
|
60e7332dc0 | ||
|
|
034cbb3923 | ||
|
|
4e54ea0480 | ||
|
|
5aa7858385 | ||
|
|
a6c9dd74d8 | ||
|
|
8d00fb26f1 | ||
|
|
1d02be3b9d | ||
|
|
3a9072079c | ||
|
|
975a38a267 | ||
|
|
6249eb0596 | ||
|
|
181615b22a | ||
|
|
59e8a5e2b2 | ||
|
|
40d50b821f | ||
|
|
0ae4336f4f | ||
|
|
120118c7d8 | ||
|
|
875cae47a9 | ||
|
|
269bb7362f | ||
|
|
0e945ebcc5 | ||
|
|
71ebb443d8 | ||
|
|
428db13557 | ||
|
|
0a28715b10 | ||
|
|
74171b693c | ||
|
|
c4dfd3138e | ||
|
|
d76a1c2a2d | ||
|
|
dbd17157d7 | ||
|
|
cb9fd93743 | ||
|
|
8259a73a85 | ||
|
|
e0cf592f48 | ||
|
|
1fa226772c | ||
|
|
941bd48235 | ||
|
|
819ee4272b | ||
|
|
a81441557b | ||
|
|
6debf54e61 | ||
|
|
c86509d86e | ||
|
|
9e7edf0006 | ||
|
|
b726914a4c | ||
|
|
207daac5c1 | ||
|
|
98dbd8cc53 | ||
|
|
52c4018a9c | ||
|
|
0e414d9e4a | ||
|
|
25eb4c6909 | ||
|
|
f41f926aab | ||
|
|
cbc4d9bd13 | ||
|
|
c74fbaefeb | ||
|
|
2ad7da7594 | ||
|
|
4298108f46 | ||
|
|
e453e720b9 | ||
|
|
51a6c63496 | ||
|
|
2977df8e7d | ||
|
|
48430d6a4a | ||
|
|
f08504b43b | ||
|
|
ea6abe343d | ||
|
|
a46c077467 | ||
|
|
4404198c12 | ||
|
|
0523f45f66 | ||
|
|
b571b61970 | ||
|
|
03490e3565 | ||
|
|
854f76ed4f | ||
|
|
6a51c69b05 | ||
|
|
0df3a91b25 | ||
|
|
bf87a2c8ea | ||
|
|
148ddb3232 | ||
|
|
6fb27500ee | ||
|
|
0f1b8c021d | ||
|
|
af5723c71e | ||
|
|
9fdf5845fc | ||
|
|
e22f096d10 | ||
|
|
33e7070464 | ||
|
|
1974dc34b6 | ||
|
|
8e8b025c90 | ||
|
|
7008e33441 | ||
|
|
100d4983e7 | ||
|
|
d75bcea4cf | ||
|
|
eaacc89a45 | ||
|
|
e1e5963a9d | ||
|
|
612b647dd1 | ||
|
|
34f0c3e522 | ||
|
|
a5ba6c8ef8 | ||
|
|
2ade7643de | ||
|
|
4145a1e54c | ||
|
|
1417251e29 | ||
|
|
30071248c9 | ||
|
|
f8268d3bae | ||
|
|
7a21310eb3 | ||
|
|
278ae924be |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -56,6 +56,7 @@ lib/selinux
|
||||
lib/uniwidth
|
||||
m4/.cvsignore
|
||||
m4/.gitignore
|
||||
maint.mk
|
||||
po/*.gmo
|
||||
po/*.po
|
||||
po/.gitignore
|
||||
|
||||
@@ -1 +1 @@
|
||||
7.1
|
||||
7.4
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Suppress valgrind diagnostics we don't care about.
|
||||
|
||||
# Copyright (C) 2003, 2004, 2006-2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2003, 2004, 2006-2009 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
3
.x-sc_system_h_headers
Normal file
3
.x-sc_system_h_headers
Normal file
@@ -0,0 +1,3 @@
|
||||
^src/libstdbuf\.c$
|
||||
^src/system\.h$
|
||||
^src/copy\.h$
|
||||
1
AUTHORS
1
AUTHORS
@@ -76,6 +76,7 @@ sleep: Jim Meyering, Paul Eggert
|
||||
sort: Mike Haertel, Paul Eggert
|
||||
split: Torbjörn Granlund, Richard M. Stallman
|
||||
stat: Michael Meskes
|
||||
stdbuf: Pádraig Brady
|
||||
stty: David MacKenzie
|
||||
su: David MacKenzie
|
||||
sum: Kayvan Aghaiepour, David MacKenzie
|
||||
|
||||
@@ -11609,7 +11609,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -4033,7 +4033,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -4015,7 +4015,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
@@ -372,7 +372,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2008-2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
|
||||
26
HACKING
26
HACKING
@@ -189,7 +189,7 @@ branch, and then realize that something about it is not right.
|
||||
It's easy to adjust:
|
||||
|
||||
edit your files # this can include running "git add NEW" or "git rm BAD"
|
||||
git commit --amend -e -a
|
||||
git commit --amend -a
|
||||
git format-patch --stdout -1 > your-branch.diff
|
||||
|
||||
That replaces the most recent change-set with the revised one.
|
||||
@@ -213,8 +213,15 @@ Commit log requirements
|
||||
=======================
|
||||
Your commit log should always start with a one-line summary, the second
|
||||
line should be blank, and the remaining lines are usually ChangeLog-style
|
||||
entries for all affected files. Omit the leading TABs that you're used
|
||||
to seeing in a "real" ChangeLog file.
|
||||
entries for all affected files. However, it's fine -- even recommended --
|
||||
to write a few lines of prose describing the change, when the summary
|
||||
and ChangeLog entries don't give enough of the big picture. Omit the
|
||||
leading TABs that you're used to seeing in a "real" ChangeLog file, but
|
||||
keep the maximum line length at 72 or smaller, so that the generated
|
||||
ChangeLog lines, each with its leading TAB, will not exceed 80 columns.
|
||||
As for the ChangeLog-style content, please follow these guidelines:
|
||||
|
||||
http://www.gnu.org/software/guile/changelogs/guile-changelogs_3.html
|
||||
|
||||
Try to make the summary line fit one of the following forms:
|
||||
|
||||
@@ -222,6 +229,8 @@ Try to make the summary line fit one of the following forms:
|
||||
prog1, prog2: change-description
|
||||
doc: change-description
|
||||
tests: change-description
|
||||
build: change-description
|
||||
maint: change-description
|
||||
|
||||
|
||||
Use SPACE-only indentation in new files.
|
||||
@@ -261,6 +270,9 @@ When writing prose (documentation, comments, log entries), use an
|
||||
active voice, not a passive one. I.e., say "print the frobnozzle",
|
||||
not "the frobnozzle will be printed".
|
||||
|
||||
Please add comments per the GNU Coding Standard:
|
||||
http://www.gnu.org/prep/standards/html_node/Comments.html
|
||||
|
||||
|
||||
Minor syntactic preferences
|
||||
===========================
|
||||
@@ -404,10 +416,16 @@ See the manpage for git-apply for details.
|
||||
Miscellaneous useful git commands
|
||||
=================================
|
||||
|
||||
* gitk: give a graphical view of the revision graph
|
||||
* gitk: give a graphical view of the revision graph of the current branch
|
||||
* gitk --all: same, but display all branches
|
||||
* git log: to get most of the same info in text form
|
||||
* git log -p: same as above, but with diffs
|
||||
* git log -p SOME_FILE: same as above, but limit to SOME_FILE
|
||||
* git log -p -2 SOME_FILE: same as above, but print only two deltas
|
||||
* git log -p -1: print the most recently committed change set
|
||||
* git format-patch --stdout -1 > FILE: output the most recently committed
|
||||
change set, in a format suitable to be submitted and/or applied via
|
||||
"git am FILE".
|
||||
* git reset --soft HEAD^: Commit the delta required to restore
|
||||
state to the revision just before HEAD (i.e., next-to-last).
|
||||
* git rebase -i master: run this from on a branch, and it gives
|
||||
|
||||
100
Makefile.am
100
Makefile.am
@@ -1,6 +1,6 @@
|
||||
# Make coreutils. -*-Makefile-*-
|
||||
|
||||
# Copyright (C) 1990, 1993-2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1990, 1993-2009 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -15,50 +15,73 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
SUBDIRS = lib src doc man po tests gnulib-tests
|
||||
EXTRA_DIST = cfg.mk maint.mk \
|
||||
.prev-version THANKS-to-translators THANKStt.in \
|
||||
.version \
|
||||
.vg-suppressions \
|
||||
.x-sc_GPL_version \
|
||||
.x-sc_file_system \
|
||||
.x-sc_obsolete_symbols \
|
||||
.x-sc_po_check \
|
||||
.x-sc_program_name \
|
||||
.x-sc_prohibit_atoi_atof \
|
||||
.x-sc_prohibit_stat_st_blocks \
|
||||
.x-sc_prohibit_strcmp \
|
||||
.x-sc_require_config_h \
|
||||
.x-sc_space_tab .x-sc_sun_os_names \
|
||||
.x-sc_trailing_blank \
|
||||
.x-sc_unmarked_diagnostics \
|
||||
.x-sc_useless_cpp_parens \
|
||||
ChangeLog-2005 \
|
||||
ChangeLog-2006 \
|
||||
ChangeLog-2007 \
|
||||
ChangeLog-2008 \
|
||||
bootstrap \
|
||||
bootstrap.conf \
|
||||
build-aux/cvsu \
|
||||
build-aux/git-version-gen \
|
||||
build-aux/vc-list-files \
|
||||
gl/modules/getloadavg.diff \
|
||||
m4/ChangeLog \
|
||||
old/fileutils/ChangeLog \
|
||||
old/fileutils/ChangeLog-1997 \
|
||||
old/fileutils/NEWS \
|
||||
old/sh-utils/ChangeLog \
|
||||
old/sh-utils/ChangeLog.0 \
|
||||
old/sh-utils/NEWS \
|
||||
old/textutils/ChangeLog \
|
||||
old/textutils/NEWS
|
||||
ALL_RECURSIVE_TARGETS =
|
||||
|
||||
SUBDIRS = lib src doc man po tests gnulib-tests
|
||||
|
||||
changelog_etc = \
|
||||
ChangeLog-2005 \
|
||||
ChangeLog-2006 \
|
||||
ChangeLog-2007 \
|
||||
ChangeLog-2008 \
|
||||
build-aux/ChangeLog-2007 \
|
||||
build-aux/update-copyright \
|
||||
doc/ChangeLog-2007 \
|
||||
lib/ChangeLog-2007 \
|
||||
m4/ChangeLog-2007 \
|
||||
old/fileutils/ChangeLog \
|
||||
old/fileutils/ChangeLog-1997 \
|
||||
old/fileutils/NEWS \
|
||||
old/sh-utils/ChangeLog \
|
||||
old/sh-utils/ChangeLog.0 \
|
||||
old/sh-utils/NEWS \
|
||||
old/textutils/ChangeLog \
|
||||
old/textutils/NEWS \
|
||||
po/ChangeLog-2007
|
||||
|
||||
syntax_check_exceptions = \
|
||||
.x-sc_GPL_version \
|
||||
.x-sc_error_message_uppercase \
|
||||
.x-sc_file_system \
|
||||
.x-sc_obsolete_symbols \
|
||||
.x-sc_po_check \
|
||||
.x-sc_program_name \
|
||||
.x-sc_prohibit_atoi_atof \
|
||||
.x-sc_prohibit_stat_st_blocks \
|
||||
.x-sc_prohibit_strcmp \
|
||||
.x-sc_require_config_h \
|
||||
.x-sc_require_config_h_first \
|
||||
.x-sc_space_tab \
|
||||
.x-sc_sun_os_names \
|
||||
.x-sc_system_h_headers \
|
||||
.x-sc_trailing_blank \
|
||||
.x-sc_unmarked_diagnostics \
|
||||
.x-sc_useless_cpp_parens
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(changelog_etc) \
|
||||
$(syntax_check_exceptions) \
|
||||
.prev-version \
|
||||
.version \
|
||||
.vg-suppressions \
|
||||
THANKS-to-translators \
|
||||
THANKStt.in \
|
||||
bootstrap \
|
||||
bootstrap.conf \
|
||||
build-aux/cvsu \
|
||||
cfg.mk \
|
||||
dist-check.mk \
|
||||
gl/modules/getloadavg.diff \
|
||||
maint.mk
|
||||
|
||||
ALL_RECURSIVE_TARGETS += install-root
|
||||
install-root:
|
||||
cd src && $(MAKE) $@
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
|
||||
# Some tests always need root privileges, others need them only sometimes.
|
||||
ALL_RECURSIVE_TARGETS += check-root
|
||||
check-root:
|
||||
cd tests && $(MAKE) $@ SUBDIRS=
|
||||
|
||||
@@ -94,6 +117,7 @@ gen-ChangeLog:
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
||||
ALL_RECURSIVE_TARGETS += distcheck-hook
|
||||
distcheck-hook: check-ls-dircolors
|
||||
$(MAKE) my-distcheck
|
||||
|
||||
|
||||
146
NEWS
146
NEWS
@@ -1,5 +1,145 @@
|
||||
GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
* Noteworthy changes in release 7.5 (2009-08-20) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
dd's oflag=direct option now works even when the size of the input
|
||||
is not a multiple of e.g., 512 bytes.
|
||||
|
||||
dd now handles signals consistently even when they're received
|
||||
before data copying has started.
|
||||
|
||||
install runs faster again with SELinux enabled
|
||||
[introduced in coreutils-7.0]
|
||||
|
||||
ls -1U (with two or more arguments, at least one a nonempty directory)
|
||||
would print entry names *before* the name of the containing directory.
|
||||
Also fixed incorrect output of ls -1RU and ls -1sU.
|
||||
[introduced in coreutils-7.0]
|
||||
|
||||
sort now correctly ignores fields whose ending position is specified
|
||||
before the start position. Previously in numeric mode the remaining
|
||||
part of the line after the start position was used as the sort key.
|
||||
[This bug appears to have been present in "the beginning".]
|
||||
|
||||
truncate -s failed to skip all whitespace in the option argument in
|
||||
some locales.
|
||||
|
||||
** New programs
|
||||
|
||||
stdbuf: A new program to run a command with modified stdio buffering
|
||||
for its standard streams.
|
||||
|
||||
** Changes in behavior
|
||||
|
||||
ls --color: files with multiple hard links are no longer colored differently
|
||||
by default. That can be enabled by changing the LS_COLORS environment
|
||||
variable. You can control that using the MULTIHARDLINK dircolors input
|
||||
variable which corresponds to the 'mh' LS_COLORS item. Note these variables
|
||||
were renamed from 'HARDLINK' and 'hl' which were available since
|
||||
coreutils-7.1 when this feature was introduced.
|
||||
|
||||
** Deprecated options
|
||||
|
||||
nl --page-increment: deprecated in favor of --line-increment, the new option
|
||||
maintains the previous semantics and the same short option, -i.
|
||||
|
||||
** New features
|
||||
|
||||
chroot now accepts the options --userspec and --groups.
|
||||
|
||||
cp accepts a new option, --reflink: create a lightweight copy
|
||||
using copy-on-write (COW). This is currently only supported within
|
||||
a btrfs file system.
|
||||
|
||||
cp now preserves time stamps on symbolic links, when possible
|
||||
|
||||
sort accepts a new option, --human-numeric-sort (-h): sort numbers
|
||||
while honoring human readable suffixes like KiB and MB etc.
|
||||
|
||||
tail --follow now uses inotify when possible, to be more responsive
|
||||
to file changes and more efficient when monitoring many files.
|
||||
|
||||
|
||||
* Noteworthy changes in release 7.4 (2009-05-07) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
date -d 'next mon', when run on a Monday, now prints the date
|
||||
7 days in the future rather than the current day. Same for any other
|
||||
day-of-the-week name, when run on that same day of the week.
|
||||
[This bug appears to have been present in "the beginning". ]
|
||||
|
||||
date -d tuesday, when run on a Tuesday -- using date built from the 7.3
|
||||
release tarball, not from git -- would print the date 7 days in the future.
|
||||
Now, it works properly and prints the current date. That was due to
|
||||
human error (including not-committed changes in a release tarball)
|
||||
and the fact that there is no check to detect when the gnulib/ git
|
||||
submodule is dirty.
|
||||
|
||||
** Build-related
|
||||
|
||||
make check: two tests have been corrected
|
||||
|
||||
** Portability
|
||||
|
||||
There have been some ACL-related portability fixes for *BSD,
|
||||
inherited from gnulib.
|
||||
|
||||
|
||||
* Noteworthy changes in release 7.3 (2009-05-01) [stable]
|
||||
|
||||
** Bug fixes
|
||||
|
||||
cp now diagnoses failure to preserve selinux/xattr attributes when
|
||||
--preserve=context,xattr is specified in combination with -a.
|
||||
Also, cp no longer suppresses attribute-preservation diagnostics
|
||||
when preserving SELinux context was explicitly requested.
|
||||
|
||||
ls now aligns output correctly in the presence of abbreviated month
|
||||
names from the locale database that have differing widths.
|
||||
|
||||
ls -v and sort -V now order names like "#.b#" properly
|
||||
|
||||
mv: do not print diagnostics when failing to preserve xattr's on file
|
||||
systems without xattr support.
|
||||
|
||||
sort -m no longer segfaults when its output file is also an input file.
|
||||
E.g., with this, touch 1; sort -m -o 1 1, sort would segfault.
|
||||
[introduced in coreutils-7.2]
|
||||
|
||||
** Changes in behavior
|
||||
|
||||
shred, sort, shuf: now use an internal pseudorandom generator by default.
|
||||
This is mainly noticable in shred where the 3 random passes it does by
|
||||
default should proceed at the speed of the disk. Previously /dev/urandom
|
||||
was used if available, which is relatively slow on GNU/Linux systems.
|
||||
|
||||
** Improved robustness
|
||||
|
||||
cp would exit successfully after copying less than the full contents
|
||||
of a file larger than ~4000 bytes from a linux-/proc file system to a
|
||||
destination file system with a fundamental block size of 4KiB or greater.
|
||||
Reading into a 4KiB-or-larger buffer, cp's "read" syscall would return
|
||||
a value smaller than 4096, and cp would interpret that as EOF (POSIX
|
||||
allows this). This optimization, now removed, saved 50% of cp's read
|
||||
syscalls when copying small files. Affected linux kernels: at least
|
||||
2.6.9 through 2.6.29.
|
||||
[the optimization was introduced in coreutils-6.0]
|
||||
|
||||
** Portability
|
||||
|
||||
df now pre-mounts automountable directories even with automounters for
|
||||
which stat-like syscalls no longer provoke mounting. Now, df uses open.
|
||||
|
||||
`id -G $USER` now works correctly even on Darwin and NetBSD. Previously it
|
||||
would either truncate the group list to 10, or go into an infinite loop,
|
||||
due to their non-standard getgrouplist implementations.
|
||||
[truncation introduced in coreutils-6.11]
|
||||
[infinite loop introduced in coreutils-7.1]
|
||||
|
||||
|
||||
* Noteworthy changes in release 7.2 (2009-03-31) [stable]
|
||||
|
||||
** New features
|
||||
@@ -37,9 +177,9 @@ GNU coreutils NEWS -*- outline -*-
|
||||
|
||||
** Changes in behavior
|
||||
|
||||
cp,mv,install,cat,split: now read and write a minimum of 32KiB
|
||||
at a time. This was seen to increase throughput. Up to 2 times
|
||||
when reading cached files on linux for example.
|
||||
cat,cp,install,mv,split: these programs now read and write a minimum
|
||||
of 32KiB at a time. This was seen to double throughput when reading
|
||||
cached files on GNU/Linux-based systems.
|
||||
|
||||
cp -a now tries to preserve extended attributes (xattr), but does not
|
||||
diagnose xattr-preservation failure. However, cp --preserve=all still does.
|
||||
|
||||
20
README
20
README
@@ -13,9 +13,9 @@ The programs that can be built with this package are:
|
||||
link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup
|
||||
od paste pathchk pinky pr printenv printf ptx pwd readlink rm rmdir
|
||||
runcon seq sha1sum sha224sum sha256sum sha384sum sha512sum shred shuf
|
||||
sleep sort split stat stty su sum sync tac tail tee test timeout touch tr
|
||||
true truncate tsort tty uname unexpand uniq unlink uptime users vdir wc who
|
||||
whoami yes
|
||||
sleep sort split stat stdbuf stty su sum sync tac tail tee test timeout
|
||||
touch tr true truncate tsort tty uname unexpand uniq unlink uptime users
|
||||
vdir wc who whoami yes
|
||||
|
||||
See the file NEWS for a list of major changes in the current release.
|
||||
|
||||
@@ -41,7 +41,7 @@ Special thanks to Paul Eggert, Brian Matthews, Bruce Evans, Karl Berry,
|
||||
Kaveh Ghazi, and François Pinard for help with debugging and porting
|
||||
these programs. Many thanks to all of the people who have taken the
|
||||
time to submit problem reports and fixes. All contributed changes are
|
||||
attributed in the ChangeLog files.
|
||||
attributed in the commit logs.
|
||||
|
||||
And thanks to the following people who have provided accounts for
|
||||
portability testing on many different types of systems: Bob Proulx,
|
||||
@@ -173,6 +173,10 @@ run this command:
|
||||
For some tests, you can get even more detail by adding DEBUG=yes.
|
||||
Then include the contents of the file `log' in your bug report.
|
||||
|
||||
Send bug reports, questions, comments, etc. to bug-coreutils@gnu.org.
|
||||
If you would like to suggest a patch, see the files README-hacking
|
||||
and HACKING for tips.
|
||||
|
||||
***************************************
|
||||
|
||||
There are many tests, but nowhere near as many as we need.
|
||||
@@ -209,13 +213,7 @@ subtle bugs.
|
||||
WARNING: If you modify files like configure.in, m4/*.m4, aclocal.m4,
|
||||
or any Makefile.am, then don't be surprised if what gets regenerated no
|
||||
longer works. To make things work, you'll have to be using appropriate
|
||||
versions of automake and autoconf. As for what versions are `appropriate',
|
||||
use the versions of
|
||||
|
||||
* autoconf specified via AC_PREREQ in m4/jm-macros.m4
|
||||
* automake specified via AM_INIT_AUTOMAKE in configure.ac
|
||||
|
||||
Usually it's fine to use versions that are newer than those specified.
|
||||
versions of the tools listed in bootstrap.conf's buildreq string.
|
||||
|
||||
All of these programs except `test' recognize the `--version' option.
|
||||
When reporting bugs, please include in the subject line both the package
|
||||
|
||||
@@ -2,42 +2,24 @@
|
||||
|
||||
These notes intend to help people working on the checked-out sources.
|
||||
These requirements do not apply when building from a distribution tarball.
|
||||
See also HACKING for more detailed coreutils contribution guidlines.
|
||||
See also HACKING for more detailed coreutils contribution guidelines.
|
||||
|
||||
* Requirements
|
||||
|
||||
We've opted to keep only the highest-level sources in the GIT repository.
|
||||
This eases our maintenance burden, (fewer merges etc.), but imposes more
|
||||
requirements on anyone wishing to build from the just-checked-out sources.
|
||||
Specific tools and versions will be checked for and listed by the
|
||||
bootstrap script shown below, and will include:
|
||||
|
||||
- Automake <http://www.gnu.org/software/automake/>
|
||||
- Autoconf <http://www.gnu.org/software/autoconf/>
|
||||
- Bison <http://www.gnu.org/software/bison/>
|
||||
- Gettext <http://www.gnu.org/software/gettext/>
|
||||
- Git <http://git.or.cz/>
|
||||
- Gperf <http://www.gnu.org/software/gperf/>
|
||||
- Gzip <http://www.gnu.org/software/gzip/>
|
||||
- Perl <http://www.cpan.org/>
|
||||
- Rsync <http://samba.anu.edu.au/rsync/>
|
||||
- Tar <http://www.gnu.org/software/tar/>
|
||||
|
||||
Only building the initial full source tree will be a bit painful.
|
||||
Later, a plain `git pull && make' should be sufficient.
|
||||
|
||||
- Valgrind
|
||||
Note the requirements to build the released archive are much less and
|
||||
are just the requirements of the standard ./configure && make procedure.
|
||||
Specific development tools and versions will be checked for and listed by
|
||||
the bootstrap script. See README-prereq for specific notes on obtaining
|
||||
these prerequisite tools.
|
||||
|
||||
Valgrind <http://valgrind.org/> is also highly recommended, if
|
||||
Valgrind supports your architecture. See also README-valgrind.
|
||||
|
||||
- XZ utils (successor to LZMA)
|
||||
|
||||
This package's build procedure uses XZ to create a compressed
|
||||
distribution tarball. Using this feature of Automake requires
|
||||
version 1.10a or newer, as well as the xz program itself.
|
||||
Make sure you have the latest version of the XZ Utils from
|
||||
<http://tukaani.org/lzma/download>.
|
||||
While building from a just-cloned source tree may require installing a
|
||||
few prerequisites, later, a plain `git pull && make' should be sufficient.
|
||||
|
||||
* First GIT checkout
|
||||
|
||||
|
||||
@@ -1,32 +1,56 @@
|
||||
Detailed below are concrete examples for
|
||||
getting the prerequisites for particular systems.
|
||||
This gives some notes on obtaining the tools required for development.
|
||||
I.E. the tools checked for by the bootstrap script and include:
|
||||
|
||||
- linux - fedora
|
||||
- Autoconf <http://www.gnu.org/software/autoconf/>
|
||||
- Automake <http://www.gnu.org/software/automake/>
|
||||
- Bison <http://www.gnu.org/software/bison/>
|
||||
- Gettext <http://www.gnu.org/software/gettext/>
|
||||
- Git <http://git.or.cz/>
|
||||
- Gperf <http://www.gnu.org/software/gperf/>
|
||||
- Gzip <http://www.gnu.org/software/gzip/>
|
||||
- Perl <http://www.cpan.org/>
|
||||
- Rsync <http://samba.anu.edu.au/rsync/>
|
||||
- Tar <http://www.gnu.org/software/tar/>
|
||||
- Texinfo <http://www.gnu.org/software/texinfo/>
|
||||
|
||||
This shows the steps for getting the required tools to build coreutils 7.0
|
||||
on a Fedora 8 system. We try to use official packages where possible.
|
||||
The 3 methods described for making these required packages available, should
|
||||
help clarify build requirements on any linux system at least.
|
||||
Note please try to install/build official packages for your system.
|
||||
If these are not available then one can make them available only to
|
||||
the coreutils build using the following instructions. Even if the
|
||||
official packages for your system are too old, please install them
|
||||
as they may be required to build the newer versions.
|
||||
|
||||
1. Make sure offical distro git package is installed
|
||||
# yum install git
|
||||
* autoconf *
|
||||
|
||||
2. The distro autoconf is too old, but there is a newer one available
|
||||
so we rebuild that and make it available to the full system:
|
||||
# yum install emacs #autoconf build requires emacs (20MB)
|
||||
# rpmbuild --rebuild http://download.fedora.redhat.com/pub/fedora/linux/development/source/SRPMS/autoconf-2.63-1.fc10.src.rpm
|
||||
# rpm -Uvh /usr/src/redhat/RPMS/noarch/autoconf-2.63-1.fc8.noarch.rpm
|
||||
Note Autoconf 2.61a-341 or newer is needed to build automake-1.10a in step 3.
|
||||
Apply the same method to install the lzma package.
|
||||
[FIXME: mention xz when it's packaged]
|
||||
# Note Autoconf 2.62 or newer is needed to build automake-1.11
|
||||
git clone --depth=1 git://git.sv.gnu.org/autoconf.git
|
||||
git checkout v2.62
|
||||
autoreconf -vi
|
||||
./configure --prefix=$HOME/coreutils/deps
|
||||
make install
|
||||
|
||||
3. The latest released automake (1.10.1) was not new enough, so we download
|
||||
and build automake-1.10a from its repository and make it available
|
||||
just to coreutils:
|
||||
# yum install help2man #required to build automake fully
|
||||
$ git clone git://git.sv.gnu.org/automake.git
|
||||
$ cd automake && ./configure --prefix=$HOME/coreutils/deps
|
||||
$ make install
|
||||
* automake *
|
||||
|
||||
Now we can build coreutils as described in README-hacking
|
||||
as long as $PATH starts with $HOME/coreutils/deps
|
||||
# Note help2man is required to build automake fully
|
||||
git clone git://git.sv.gnu.org/automake.git
|
||||
cd automake
|
||||
git checkout -b branch-1.11 --track origin/branch-1.11
|
||||
./bootstrap
|
||||
./configure --prefix=$HOME/coreutils/deps
|
||||
make install
|
||||
|
||||
coreutils uses XZ utils (successor to LZMA) to create
|
||||
a compressed distribution tarball. Using this feature of Automake
|
||||
requires version 1.10a or newer, as well as the xz program itself.
|
||||
|
||||
* xz *
|
||||
|
||||
git clone git://ctrl.tukaani.org/xz.git
|
||||
cd xz
|
||||
./autogen.sh
|
||||
./configure --prefix=$HOME/coreutils/deps
|
||||
make install
|
||||
|
||||
Now we can build coreutils as described in README-hacking
|
||||
as long as $PATH starts with $HOME/coreutils/deps/bin, which
|
||||
one can set for the current shell like:
|
||||
$ export PATH=$HOME/coreutils/deps/bin:$PATH
|
||||
|
||||
@@ -23,7 +23,7 @@ FIXME: enable excluded programs like arch? to get their manual pages?
|
||||
On at least one SELinux-enabled (enforcing) and one non-SELinux system,
|
||||
run all tests, both root-only and regular.
|
||||
Run *all* non-root tests, including expensive and very expensive ones i.e.,
|
||||
run this: make check RUN_VERY_EXPENSIVE_TESTS=yes RUN_EXPENSIVE_TESTS=yes
|
||||
run this: make -j1 check RUN_VERY_EXPENSIVE_TESTS=yes RUN_EXPENSIVE_TESTS=yes
|
||||
|
||||
Run the root-only tests:
|
||||
sudo env PATH="$PATH" NON_ROOT_USERNAME=$USER make -k check-root
|
||||
@@ -31,14 +31,16 @@ FIXME: enable excluded programs like arch? to get their manual pages?
|
||||
* Run "make distcheck"
|
||||
|
||||
* Manually set the date, version number, and [stable/alpha/beta] on
|
||||
line 3 of NEWS, then do this:
|
||||
line 3 of NEWS, then do e.g.,:
|
||||
|
||||
v=7.1
|
||||
v=7.3
|
||||
git commit -F <(printf 'version '$v'\n\n* NEWS: Record release date.\n') -a
|
||||
git tag -s -m "coreutils $v" v$v HEAD
|
||||
|
||||
* Run the following to create release tarballs. Your choice selects the
|
||||
corresponding upload-to destination in the emitted gnupload command.
|
||||
The different destinations are specified in cfg.mk. See the definitions
|
||||
of gnu_ftp_host-{alpha,beta,major}.
|
||||
|
||||
# "TYPE" must be major, beta or alpha
|
||||
make TYPE
|
||||
@@ -51,7 +53,7 @@ FIXME: enable excluded programs like arch? to get their manual pages?
|
||||
|
||||
Once all the builds and tests have passed,
|
||||
|
||||
* Run the gnupload command suggested by your "XZ_OPT=-9e make major" run above.
|
||||
* Run the gnupload command that was suggested by your "make major" run above.
|
||||
|
||||
* Wait a few minutes (maybe up to 30?) and then use the release URLs to
|
||||
download all tarball/signature pairs and use gpg --verify to ensure
|
||||
@@ -73,8 +75,9 @@ Once all the builds and tests have passed,
|
||||
https://savannah.gnu.org/projects/coreutils/
|
||||
click on the "submit news", then write something like the following:
|
||||
|
||||
Subject: coreutils-7.2 released [stable]
|
||||
The announcement is here:
|
||||
http://article.gmane.org/gmane.comp.gnu.core-utils.announce/48
|
||||
http://article.gmane.org/gmane.comp.gnu.core-utils.announce/49
|
||||
|
||||
Then go here to approve it:
|
||||
https://savannah.gnu.org/news/approve.php?group=coreutils
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#! /bin/bash
|
||||
# Convert this package for use with valgrind.
|
||||
|
||||
# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
@@ -23,7 +23,7 @@
|
||||
# find tests -name Makefile.am|xargs grep -wl PATH|xargs perl -pi -e 's,src/vg,src,'
|
||||
#
|
||||
# Create this symlink for suppressions (this is no longer necessary,
|
||||
# with linux-2.6.9 and valgrind-2.2.0):
|
||||
# with Linux kernel 2.6.9 and valgrind-2.2.0):
|
||||
# ln -s $PWD/.vg-suppressions /tmp/cu-vg
|
||||
|
||||
# Create src/vg:
|
||||
|
||||
10
THANKS
10
THANKS
@@ -75,6 +75,7 @@ Bernd Melchers melchers@cis.fu-berlin.de
|
||||
Bernhard Baehr bernhard.baehr@gmx.de
|
||||
Bernhard Gabler bernhard@uni-koblenz.de
|
||||
Bernhard Rosenkraenzer bero@redhat.de
|
||||
Bernhard Voelker bernhard.voelker@siemens-enterprise.com
|
||||
Bert Deknuydt Bert.Deknuydt@esat.kuleuven.ac.be
|
||||
Bert Wesarg bert.wesarg@googlemail.com
|
||||
Bill Peters peters@gaffel.as.arizona.edu
|
||||
@@ -112,6 +113,7 @@ Christophe LYON christophe.lyon@st.com
|
||||
Chuck Hedrick hedrick@klinzhai.rutgers.edu
|
||||
Clark Morgan cmorgan@aracnet.com
|
||||
Clement Wang clem.wang@overture.com
|
||||
Cliff Miller cbm@whatexit.org
|
||||
Colin Plumb colin@nyx.net
|
||||
Colin Watson cjw44@riva.ucam.org
|
||||
Collin Rogowski collin@rogowski.de
|
||||
@@ -235,6 +237,7 @@ Hugh Daniel hugh@xanadu.com
|
||||
Ian Bruce ian.bruce@myrealbox.com
|
||||
Iain Calder ic56@rogers.com
|
||||
Ian Jackson ijackson@chiark.greenend.org.uk
|
||||
Ian Kent ikent@redhat.com
|
||||
Ian Lance Taylor ian@cygnus.com
|
||||
Ian Turner vectro@pipeline.com
|
||||
Iida Yosiaki iida@gnu.org
|
||||
@@ -275,6 +278,7 @@ Jim Dennis jimd@starshine.org
|
||||
Joakim Rosqvist dvljrt@cs.umu.se
|
||||
Jochen Hein jochen@jochen.org
|
||||
Joe Orton joe@manyfish.co.uk
|
||||
Joel E. Denny jdenny@clemson.edu
|
||||
Joerg Sonnenberger joerg@britannica.bec.de
|
||||
Joey Hess joeyh@debian.org
|
||||
Johan Boule bohan@bohan.dyndns.org
|
||||
@@ -298,6 +302,7 @@ Joshua Hudson joshudson@gmail.com
|
||||
Josselin Mouette joss@debian.org
|
||||
Juan F. Codagnone juam@arnet.com.ar
|
||||
Juan M. Guerrero st001906@hrz1.hrz.tu-darmstadt.de
|
||||
Julian Bradfield jcb@inf.ed.ac.uk
|
||||
Jungshik Shin jshin@pantheon.yale.edu
|
||||
Jürgen Fluk louis@dachau.marco.de
|
||||
Jurriaan thunder7@xs4all.nl
|
||||
@@ -395,6 +400,7 @@ Michael J. Croghan mcroghan@usatoday.com
|
||||
Michael McFarland sidlon@yahoo.com
|
||||
Michael McLagan mmclagan@invlogic.com
|
||||
Michael Piefel piefel@informatik.hu-berlin.de
|
||||
Michael Speer knomenet@gmail.com
|
||||
Michael Steffens michael.steffens@s.netic.de
|
||||
Michael Stone mstone@debian.org
|
||||
Michael Stutz stutz@dsl.org
|
||||
@@ -435,6 +441,7 @@ Ole Laursen olau@hardworking.dk
|
||||
Oliver Kiddle okiddle@yahoo.co.uk
|
||||
Ørn E. Hansen oehansen@daimi.aau.dk
|
||||
Oskar Liljeblad osk@hem.passagen.se
|
||||
Otavio Salvador otavio@ossystems.com.br
|
||||
Pádraig Brady P@draigBrady.com
|
||||
Patrick Mauritz oxygene@studentenbude.ath.cx
|
||||
Paul D. Smith psmith@gnu.org
|
||||
@@ -509,6 +516,7 @@ Santiago Vila Doncel sanvila@unex.es
|
||||
Savochkin Andrey Vladimirovich saw@msu.ru
|
||||
Scott Lurndal slurn@griffin.engr.sgi.com
|
||||
Sébastien Maret smaret@umich.edu
|
||||
Sergei Steshenko sergstesh@yahoo.com
|
||||
Shing-Shong Shei shei@cs.indiana.edu
|
||||
Soeren Sonnenburg sonnenburg@informatik.hu-berlin.de
|
||||
Solar Designer solar@owl.openwall.com
|
||||
@@ -524,6 +532,8 @@ Steve McIntyre steve@einval.com
|
||||
Steve Ward planet36@gmail.com
|
||||
Steven G. Johnson stevenj@alum.mit.edu
|
||||
Steven Mocking ufo@quicknet.nl
|
||||
Steven Parkes smparkes@smparkes.net
|
||||
Steven Schveighoffer schveiguy@yahoo.com
|
||||
Steven P Watson steven@magelico.net
|
||||
Stuart Kemp skemp@peter.bmc.com
|
||||
Stuart Shelton stuart@shelton.me
|
||||
|
||||
1
TODO
1
TODO
@@ -15,7 +15,6 @@ document the following in coreutils.texi:
|
||||
mktemp
|
||||
[
|
||||
pinky
|
||||
Also document the SELinux changes.
|
||||
|
||||
Suggestion from Paul Eggert:
|
||||
More generally, there's not that much use for imaxtostr nowadays,
|
||||
|
||||
220
bootstrap
220
bootstrap
@@ -106,14 +106,14 @@ tests_base=tests
|
||||
|
||||
# Extra files from gnulib, which override files from other sources.
|
||||
gnulib_extra_files="
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
$build_aux/install-sh
|
||||
$build_aux/missing
|
||||
$build_aux/mdate-sh
|
||||
$build_aux/texinfo.tex
|
||||
$build_aux/depcomp
|
||||
$build_aux/config.guess
|
||||
$build_aux/config.sub
|
||||
doc/INSTALL
|
||||
"
|
||||
|
||||
# Additional gnulib-tool options to use. Use "\newline" to break lines.
|
||||
@@ -231,11 +231,11 @@ fi
|
||||
# version formats or redundant trailing .0 in bootstrap.conf.
|
||||
# If we did want full compatibility then we should probably
|
||||
# use m4_version_compare from autoconf.
|
||||
sort_ver() { #sort -V is not generally available
|
||||
sort_ver() { # sort -V is not generally available
|
||||
ver1="$1"
|
||||
ver2="$2"
|
||||
|
||||
#split on '.' and compare each component
|
||||
# split on '.' and compare each component
|
||||
i=1
|
||||
while : ; do
|
||||
p1=$(echo "$ver1" | cut -d. -f$i)
|
||||
@@ -247,11 +247,11 @@ sort_ver() { #sort -V is not generally available
|
||||
echo "$2 $1"
|
||||
break
|
||||
elif [ ! "$p1" = "$p2" ]; then
|
||||
if [ "$p1" -gt "$p2" ] 2>/dev/null; then #numeric comparision
|
||||
if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$2 $1"
|
||||
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then #numeric comparision
|
||||
elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison
|
||||
echo "$1 $2"
|
||||
else #numeric, then lexographic comparison
|
||||
else # numeric, then lexicographic comparison
|
||||
lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1)
|
||||
if [ "$lp" = "$p2" ]; then
|
||||
echo "$1 $2"
|
||||
@@ -272,10 +272,10 @@ get_version() {
|
||||
|
||||
$app --version 2>&1 |
|
||||
sed -n 's/[^0-9.]*\([0-9]\{1,\}\.[.a-z0-9-]*\).*/\1/p
|
||||
t done
|
||||
d
|
||||
:done
|
||||
q'
|
||||
t done
|
||||
d
|
||||
:done
|
||||
q'
|
||||
}
|
||||
|
||||
check_versions() {
|
||||
@@ -308,12 +308,12 @@ print_versions() {
|
||||
echo "----------------------"
|
||||
printf "$buildreq"
|
||||
echo "----------------------"
|
||||
#can't depend on column -t
|
||||
# can't depend on column -t
|
||||
}
|
||||
|
||||
if ! printf "$buildreq" | check_versions; then
|
||||
test -f README-prereq &&
|
||||
echo "Please see README-prereq for notes on obtaining these prerequisite programs:" >&2
|
||||
echo "See README-prereq for notes on obtaining these prerequisite programs:" >&2
|
||||
echo
|
||||
print_versions
|
||||
exit 1
|
||||
@@ -342,7 +342,7 @@ cleanup_gnulib() {
|
||||
}
|
||||
|
||||
git_modules_config () {
|
||||
GIT_CONFIG=.gitmodules git config "$@"
|
||||
test -f .gitmodules && git config --file .gitmodules "$@"
|
||||
}
|
||||
|
||||
# Get gnulib files.
|
||||
@@ -359,8 +359,8 @@ case ${GNULIB_SRCDIR--} in
|
||||
|
||||
trap cleanup_gnulib 1 2 13 15
|
||||
|
||||
git clone --help|grep depth > /dev/null && depth='--depth 2' || depth=
|
||||
git clone $depth git://git.sv.gnu.org/gnulib ||
|
||||
git clone --help|grep depth > /dev/null && shallow='--depth 2' || shallow=
|
||||
git clone $shallow git://git.sv.gnu.org/gnulib ||
|
||||
cleanup_gnulib
|
||||
|
||||
trap - 1 2 13 15
|
||||
@@ -371,7 +371,7 @@ case ${GNULIB_SRCDIR--} in
|
||||
# Redirect the gnulib submodule to the directory on the command line
|
||||
# if possible.
|
||||
if test -d "$GNULIB_SRCDIR"/.git && \
|
||||
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
git_modules_config submodule.gnulib.url >/dev/null; then
|
||||
git submodule init
|
||||
GNULIB_SRCDIR=`cd $GNULIB_SRCDIR && pwd`
|
||||
git config --replace-all submodule.gnulib.url $GNULIB_SRCDIR
|
||||
@@ -419,10 +419,12 @@ update_po_files() {
|
||||
new_po="$ref_po_dir/$po.po"
|
||||
cksum_file="$ref_po_dir/$po.s1"
|
||||
if ! test -f "$cksum_file" ||
|
||||
! test -f "$po_dir/$po.po" ||
|
||||
! ${SHA1SUM-sha1sum} -c --status "$cksum_file" < "$new_po" > /dev/null; then
|
||||
! test -f "$po_dir/$po.po" ||
|
||||
! ${SHA1SUM-sha1sum} -c --status "$cksum_file" \
|
||||
< "$new_po" > /dev/null; then
|
||||
echo "updated $po_dir/$po.po..."
|
||||
cp "$new_po" "$po_dir/$po.po" && ${SHA1SUM-sha1sum} < "$new_po" > "$cksum_file"
|
||||
cp "$new_po" "$po_dir/$po.po" \
|
||||
&& ${SHA1SUM-sha1sum} < "$new_po" > "$cksum_file"
|
||||
fi
|
||||
done
|
||||
}
|
||||
@@ -456,45 +458,45 @@ symlink_to_dir()
|
||||
# FIXME: for now, this does only one level
|
||||
parent=`dirname "$dst_dir"`
|
||||
for dot_ig in x $vc_ignore; do
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'`
|
||||
test $dot_ig = x && continue
|
||||
ig=$parent/$dot_ig
|
||||
insert_sorted_if_absent $ig `echo "$dst_dir"|sed 's,.*/,,'`
|
||||
done
|
||||
fi
|
||||
|
||||
if $copy; then
|
||||
{
|
||||
test ! -h "$dst" || {
|
||||
echo "$0: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
test ! -h "$dst" || {
|
||||
echo "$0: rm -f $dst" &&
|
||||
rm -f "$dst"
|
||||
}
|
||||
} &&
|
||||
test -f "$dst" &&
|
||||
cmp -s "$src" "$dst" || {
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
echo "$0: cp -fp $src $dst" &&
|
||||
cp -fp "$src" "$dst"
|
||||
}
|
||||
else
|
||||
test -h "$dst" &&
|
||||
src_ls=`ls -diL "$src" 2>/dev/null` && set $src_ls && src_i=$1 &&
|
||||
dst_ls=`ls -diL "$dst" 2>/dev/null` && set $dst_ls && dst_i=$1 &&
|
||||
test "$src_i" = "$dst_i" || {
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
dot_dots=
|
||||
case $src in
|
||||
/*) ;;
|
||||
*)
|
||||
case /$dst/ in
|
||||
*//* | */../* | */./* | /*/*/*/*/*/)
|
||||
echo >&2 "$0: invalid symlink calculation: $src -> $dst"
|
||||
exit 1;;
|
||||
/*/*/*/*/) dot_dots=../../../;;
|
||||
/*/*/*/) dot_dots=../../;;
|
||||
/*/*/) dot_dots=../;;
|
||||
esac;;
|
||||
esac
|
||||
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
echo "$0: ln -fs $dot_dots$src $dst" &&
|
||||
ln -fs "$dot_dots$src" "$dst"
|
||||
}
|
||||
fi
|
||||
}
|
||||
@@ -524,29 +526,29 @@ cp_mark_as_generated()
|
||||
|
||||
if test -z "$c1"; then
|
||||
cmp -s "$cp_src" "$cp_dst" || {
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
echo "$0: cp -f $cp_src $cp_dst" &&
|
||||
rm -f "$cp_dst" &&
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src" > "$cp_dst-t" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
}
|
||||
else
|
||||
# Copy the file first to get proper permissions if it
|
||||
# doesn't already exist. Then overwrite the copy.
|
||||
cp "$cp_src" "$cp_dst-t" &&
|
||||
(
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
echo '#line 1' &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
echo "$c1-*- buffer-read-only: t -*- vi: set ro:$c2" &&
|
||||
echo "${c1}DO NOT EDIT! GENERATED AUTOMATICALLY!$c2" &&
|
||||
echo '#line 1' &&
|
||||
sed "s!$bt_regex/!!g" "$cp_src"
|
||||
) > $cp_dst-t &&
|
||||
if cmp -s "$cp_dst-t" "$cp_dst"; then
|
||||
rm -f "$cp_dst-t"
|
||||
rm -f "$cp_dst-t"
|
||||
else
|
||||
echo "$0: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
echo "$0: cp $cp_src $cp_dst # with edits" &&
|
||||
mv -f "$cp_dst-t" "$cp_dst"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
@@ -558,7 +560,7 @@ version_controlled_file() {
|
||||
found=no
|
||||
if test -d CVS; then
|
||||
grep -F "/$file/" $dir/CVS/Entries 2>/dev/null |
|
||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||
grep '^/[^/]*/[0-9]' > /dev/null && found=yes
|
||||
elif test -d .git; then
|
||||
git rm -n "$dir/$file" > /dev/null 2>&1 && found=yes
|
||||
elif test -d .svn; then
|
||||
@@ -580,35 +582,35 @@ slurp() {
|
||||
esac
|
||||
test -d $1/$dir/$file && continue
|
||||
for excluded_file in $excluded_files; do
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
test "$dir/$file" = "$excluded_file" && continue 2
|
||||
done
|
||||
if test $file = Makefile.am; then
|
||||
copied=$copied${sep}$gnulib_mk; sep=$nl
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
remove_intl='/^[^#].*\/intl/s/^/#/;'"s!$bt_regex/!!g"
|
||||
sed "$remove_intl" $1/$dir/$file | cmp - $dir/$gnulib_mk > /dev/null || {
|
||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||
}
|
||||
echo "$0: Copying $1/$dir/$file to $dir/$gnulib_mk ..." &&
|
||||
rm -f $dir/$gnulib_mk &&
|
||||
sed "$remove_intl" $1/$dir/$file >$dir/$gnulib_mk
|
||||
}
|
||||
elif { test "${2+set}" = set && test -r $2/$dir/$file; } ||
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$0: $dir/$file overrides $1/$dir/$file"
|
||||
version_controlled_file $dir $file; then
|
||||
echo "$0: $dir/$file overrides $1/$dir/$file"
|
||||
else
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
AC_DEFUN([gl_LOCK_EARLY], [])
|
||||
' $1/$dir/$file >$dir/$file
|
||||
else
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi
|
||||
copied=$copied$sep$file; sep=$nl
|
||||
if test $file = gettext.m4; then
|
||||
echo "$0: patching m4/gettext.m4 to remove need for intl/* ..."
|
||||
rm -f $dir/$file
|
||||
sed '
|
||||
/^AC_DEFUN(\[AM_INTL_SUBDIR],/,/^]/c\
|
||||
AC_DEFUN([AM_INTL_SUBDIR], [
|
||||
/^AC_DEFUN(\[gt_INTL_SUBDIR_CORE],/,/^]/c\
|
||||
AC_DEFUN([gt_INTL_SUBDIR_CORE], [])
|
||||
$a\
|
||||
AC_DEFUN([gl_LOCK_EARLY], [])
|
||||
' $1/$dir/$file >$dir/$file
|
||||
else
|
||||
cp_mark_as_generated $1/$dir/$file $dir/$file
|
||||
fi
|
||||
fi || exit
|
||||
done
|
||||
|
||||
@@ -616,18 +618,18 @@ slurp() {
|
||||
test $dot_ig = x && continue
|
||||
ig=$dir/$dot_ig
|
||||
if test -n "$copied"; then
|
||||
insert_sorted_if_absent $ig "$copied"
|
||||
# If an ignored file name ends with .in.h, then also add
|
||||
# the name with just ".h". Many gnulib headers are generated,
|
||||
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
|
||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||
f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||
insert_sorted_if_absent $ig "$f"
|
||||
insert_sorted_if_absent $ig "$copied"
|
||||
# If an ignored file name ends with .in.h, then also add
|
||||
# the name with just ".h". Many gnulib headers are generated,
|
||||
# e.g., stdint.in.h -> stdint.h, dirent.in.h ->..., etc.
|
||||
# Likewise for .gperf -> .h, .y -> .c, and .sin -> .sed
|
||||
f=`echo "$copied"|sed 's/\.in\.h$/.h/;s/\.sin$/.sed/;s/\.y$/.c/;s/\.gperf$/.h/'`
|
||||
insert_sorted_if_absent $ig "$f"
|
||||
|
||||
# For files like sys_stat.in.h and sys_time.in.h, record as
|
||||
# ignorable the directory we might eventually create: sys/.
|
||||
f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
|
||||
insert_sorted_if_absent $ig "$f"
|
||||
# For files like sys_stat.in.h and sys_time.in.h, record as
|
||||
# ignorable the directory we might eventually create: sys/.
|
||||
f=`echo "$copied"|sed 's/sys_.*\.in\.h$/sys/'`
|
||||
insert_sorted_if_absent $ig "$f"
|
||||
fi
|
||||
done
|
||||
done
|
||||
@@ -686,12 +688,6 @@ find "$m4_base" "$source_base" \
|
||||
-depth \( -name '*.m4' -o -name '*.[ch]' \) \
|
||||
-type l -xtype l -delete > /dev/null 2>&1
|
||||
|
||||
# Use automake's --silent-rules option, if possible.
|
||||
automake="${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||
(${AUTOMAKE-automake} --help) 2>&1 \
|
||||
| grep -e '^ *--silent-rules' > /dev/null \
|
||||
&& automake="$automake --silent-rules"
|
||||
|
||||
# Reconfigure, getting other files.
|
||||
|
||||
for command in \
|
||||
@@ -699,7 +695,7 @@ for command in \
|
||||
"${ACLOCAL-aclocal} --force -I m4" \
|
||||
"${AUTOCONF-autoconf} --force" \
|
||||
"${AUTOHEADER-autoheader} --force" \
|
||||
"$automake"
|
||||
"${AUTOMAKE-automake} --add-missing --copy --force-missing"
|
||||
do
|
||||
if test "$command" = libtool; then
|
||||
use_libtool=0
|
||||
@@ -739,7 +735,7 @@ if test $with_gettext = yes; then
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
'"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' po/Makevars.template >po/Makevars
|
||||
|
||||
@@ -751,9 +747,9 @@ if test $with_gettext = yes; then
|
||||
/^subdir *=.*/s/=.*/= runtime-po/
|
||||
/^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/
|
||||
/^XGETTEXT_OPTIONS *=/{
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
s/$/ \\/
|
||||
a\
|
||||
'"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+}
|
||||
}
|
||||
' <po/Makevars.template >runtime-po/Makevars
|
||||
|
||||
@@ -769,3 +765,7 @@ sed 's,\.\./\.\.,..,g' $m > $m-t
|
||||
mv -f $m-t $m
|
||||
|
||||
echo "$0: done. Now you can run './configure'."
|
||||
|
||||
# Local Variables:
|
||||
# indent-tabs-mode: nil
|
||||
# End:
|
||||
|
||||
303
bootstrap.conf
303
bootstrap.conf
@@ -18,103 +18,228 @@
|
||||
|
||||
# We don't need these modules.
|
||||
avoided_gnulib_modules='
|
||||
--avoid=canonicalize-lgpl
|
||||
--avoid=dummy
|
||||
--avoid=lock
|
||||
--avoid=canonicalize-lgpl
|
||||
--avoid=dummy
|
||||
--avoid=lock
|
||||
'
|
||||
|
||||
# These modules are obsolete and can probably be removed soon,
|
||||
# but leave them in for now to minimize changes.
|
||||
obsolete_gnulib_modules='
|
||||
atexit memchr memcmp memcpy memmove memset rename
|
||||
strcspn strtod strtol utime
|
||||
atexit
|
||||
memcmp
|
||||
memcpy
|
||||
memmove
|
||||
memset
|
||||
rename
|
||||
strcspn
|
||||
strtod
|
||||
strtol
|
||||
'
|
||||
|
||||
# gnulib modules used by this package.
|
||||
gnulib_modules="
|
||||
$avoided_gnulib_modules
|
||||
$obsolete_gnulib_modules
|
||||
acl alloca announce-gen argmatch
|
||||
argv-iter
|
||||
assert
|
||||
autobuild
|
||||
backupfile base64
|
||||
c-strcase c-strtod
|
||||
c-strtold calloc canon-host canonicalize chown cloexec
|
||||
config-h configmake
|
||||
closein closeout
|
||||
crypto/md5
|
||||
crypto/sha1
|
||||
crypto/sha256
|
||||
crypto/sha512
|
||||
cycle-check
|
||||
d-ino d-type diacrit dirfd dirname dup2
|
||||
error euidaccess exclude exitfail fchdir fcntl fcntl-safer fdl
|
||||
file-type fileblocks filemode filenamecat filevercmp fnmatch-gnu
|
||||
fopen-safer
|
||||
fprintftime
|
||||
fseeko
|
||||
fsusage ftruncate
|
||||
ftello
|
||||
fts getdate getgroups gethrxtime
|
||||
gendocs
|
||||
getline getloadavg getndelim2 getopt getpagesize getpass-gnu
|
||||
gettext gettime gettimeofday getugroups getusershell
|
||||
git-version-gen
|
||||
gitlog-to-changelog
|
||||
gnu-make gnumakefile gnupload
|
||||
group-member hard-locale hash hash-pjw host-os human idcache
|
||||
ignore-value
|
||||
inttostr inttypes isapipe
|
||||
lchmod lchown lib-ignore linebuffer link-follow
|
||||
long-options lstat malloc
|
||||
manywarnings
|
||||
mbrtowc
|
||||
mbswidth
|
||||
memcasecmp memcmp2 mempcpy
|
||||
memrchr mgetgroups
|
||||
mkancesdirs mkdir mkdir-p mkstemp mktime modechange
|
||||
mountlist mpsort obstack pathmax perl physmem
|
||||
posix-shell
|
||||
posixtm
|
||||
posixver
|
||||
progname
|
||||
propername
|
||||
putenv
|
||||
quote quotearg raise readlink areadlink-with-size
|
||||
randint
|
||||
randperm
|
||||
readtokens
|
||||
readtokens0 readutmp
|
||||
realloc regex rename-dest-slash rmdir rmdir-errno
|
||||
root-dev-ino
|
||||
rpmatch
|
||||
safe-read same
|
||||
save-cwd savedir savewd
|
||||
selinux-at
|
||||
settime sig2str sigaction ssize_t stat-macros
|
||||
stat-time stdbool stdlib-safer stpcpy
|
||||
stpncpy
|
||||
strdup
|
||||
strftime
|
||||
strpbrk strtoimax strtoumax strverscmp sys_stat timespec tzset
|
||||
unicodeio unistd-safer unlink-busy unlinkdir unlocked-io
|
||||
uptime
|
||||
useless-if-before-free
|
||||
userspec utimecmp utimens
|
||||
vasprintf-posix
|
||||
vc-list-files
|
||||
verify version-etc-fsf verror
|
||||
warnings
|
||||
wcwidth winsz-ioctl winsz-termios write-any-file
|
||||
xalloc
|
||||
xfreopen
|
||||
xgetcwd xgethostname
|
||||
xmemcoll xnanosleep
|
||||
xprintf
|
||||
xprintf-posix
|
||||
xstrtod xstrtoimax
|
||||
xstrtol xstrtold xstrtoumax yesno
|
||||
$avoided_gnulib_modules
|
||||
$obsolete_gnulib_modules
|
||||
acl
|
||||
alloca
|
||||
announce-gen
|
||||
areadlink-with-size
|
||||
argmatch
|
||||
argv-iter
|
||||
assert
|
||||
autobuild
|
||||
backupfile
|
||||
base64
|
||||
c-strcase
|
||||
c-strtod
|
||||
c-strtold
|
||||
calloc
|
||||
canon-host
|
||||
canonicalize
|
||||
chown
|
||||
cloexec
|
||||
closein
|
||||
closeout
|
||||
config-h
|
||||
configmake
|
||||
crypto/md5
|
||||
crypto/sha1
|
||||
crypto/sha256
|
||||
crypto/sha512
|
||||
cycle-check
|
||||
d-ino
|
||||
d-type
|
||||
diacrit
|
||||
dirfd
|
||||
dirname
|
||||
dup2
|
||||
error
|
||||
euidaccess
|
||||
exclude
|
||||
exitfail
|
||||
fchdir
|
||||
fcntl
|
||||
fcntl-safer
|
||||
fdl
|
||||
file-type
|
||||
fileblocks
|
||||
filemode
|
||||
filenamecat
|
||||
filevercmp
|
||||
fnmatch-gnu
|
||||
fopen-safer
|
||||
fprintftime
|
||||
fseeko
|
||||
fsusage
|
||||
ftello
|
||||
ftruncate
|
||||
fts
|
||||
gendocs
|
||||
getdate
|
||||
getgroups
|
||||
gethrxtime
|
||||
getline
|
||||
getloadavg
|
||||
getndelim2
|
||||
getopt-gnu
|
||||
getpagesize
|
||||
getpass-gnu
|
||||
gettext
|
||||
gettime
|
||||
gettimeofday
|
||||
getugroups
|
||||
getusershell
|
||||
git-version-gen
|
||||
gitlog-to-changelog
|
||||
gnu-make
|
||||
gnumakefile
|
||||
gnupload
|
||||
group-member
|
||||
hard-locale
|
||||
hash
|
||||
hash-pjw
|
||||
host-os
|
||||
human
|
||||
idcache
|
||||
ignore-value
|
||||
inttostr
|
||||
inttypes
|
||||
isapipe
|
||||
lchmod
|
||||
lchown
|
||||
lib-ignore
|
||||
linebuffer
|
||||
link-follow
|
||||
long-options
|
||||
lstat
|
||||
maintainer-makefile
|
||||
malloc
|
||||
manywarnings
|
||||
mbrtowc
|
||||
mbsalign
|
||||
mbswidth
|
||||
memcasecmp
|
||||
memchr
|
||||
memcmp2
|
||||
mempcpy
|
||||
memrchr
|
||||
mgetgroups
|
||||
mkancesdirs
|
||||
mkdir
|
||||
mkdir-p
|
||||
mkstemp
|
||||
mktime
|
||||
modechange
|
||||
mountlist
|
||||
mpsort
|
||||
obstack
|
||||
pathmax
|
||||
perl
|
||||
physmem
|
||||
posix-shell
|
||||
posixtm
|
||||
posixver
|
||||
priv-set
|
||||
progname
|
||||
propername
|
||||
putenv
|
||||
quote
|
||||
quotearg
|
||||
raise
|
||||
randint
|
||||
randperm
|
||||
readlink
|
||||
readtokens
|
||||
readtokens0
|
||||
readutmp
|
||||
realloc
|
||||
regex
|
||||
rename-dest-slash
|
||||
rmdir
|
||||
rmdir-errno
|
||||
root-dev-ino
|
||||
rpmatch
|
||||
safe-read
|
||||
same
|
||||
save-cwd
|
||||
savedir
|
||||
savewd
|
||||
selinux-at
|
||||
settime
|
||||
sig2str
|
||||
sigaction
|
||||
ssize_t
|
||||
stat-macros
|
||||
stat-time
|
||||
stdbool
|
||||
stdlib-safer
|
||||
stpcpy
|
||||
stpncpy
|
||||
strdup
|
||||
strftime
|
||||
strpbrk
|
||||
strtoimax
|
||||
strtoumax
|
||||
strverscmp
|
||||
sys_stat
|
||||
timespec
|
||||
tzset
|
||||
unicodeio
|
||||
unistd-safer
|
||||
unlink-busy
|
||||
unlinkdir
|
||||
unlocked-io
|
||||
update-copyright
|
||||
uptime
|
||||
useless-if-before-free
|
||||
userspec
|
||||
utimecmp
|
||||
utimens
|
||||
vasprintf-posix
|
||||
vc-list-files
|
||||
verify
|
||||
verror
|
||||
version-etc-fsf
|
||||
warnings
|
||||
wcwidth
|
||||
winsz-ioctl
|
||||
winsz-termios
|
||||
write-any-file
|
||||
xalloc
|
||||
xfreopen
|
||||
xgetcwd
|
||||
xgethostname
|
||||
xmemcoll
|
||||
xnanosleep
|
||||
xprintf
|
||||
xprintf-posix
|
||||
xstrtod
|
||||
xstrtoimax
|
||||
xstrtol
|
||||
xstrtold
|
||||
xstrtoumax
|
||||
yesno
|
||||
"
|
||||
|
||||
# Other locale categories that need message catalogs.
|
||||
@@ -177,7 +302,7 @@ gnulib_tool_option_extras="--tests-base=$bt/gnulib-tests --with-tests"
|
||||
# Build prerequisites
|
||||
buildreq="\
|
||||
autoconf 2.61
|
||||
automake 1.10a
|
||||
automake 1.11
|
||||
autopoint -
|
||||
bison -
|
||||
gettext -
|
||||
|
||||
@@ -234,8 +234,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 2002-2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
@@ -1,283 +0,0 @@
|
||||
## Vaucanson, a generic library for finite state machines.
|
||||
## Copyright (C) 2006, 2007 The Vaucanson Group.
|
||||
##
|
||||
## This program is free software; you can redistribute it and/or
|
||||
## modify it under the terms of the GNU General Public License
|
||||
## as published by the Free Software Foundation; either version 2
|
||||
## of the License, or (at your option) any later version.
|
||||
##
|
||||
## The complete GNU General Public Licence Notice can be found as the
|
||||
## `COPYING' file in the root directory.
|
||||
|
||||
## Override the definition from Automake to generate a log file with
|
||||
## failed tests. It also supports parallel make checks.
|
||||
##
|
||||
## This file provides special support for "unit tests", that is to
|
||||
## say, tests that (once run) no longer need to be re-compiled and
|
||||
## re-run at each "make check", unless their sources changed. To
|
||||
## enable unit-test supports, define LAZY_TEST_SUITE. In such a
|
||||
## setting, that heavily relies on correct dependencies, its users may
|
||||
## prefer to define EXTRA_PROGRAMS instead of check_PROGRAMS, because
|
||||
## it allows intertwined compilation and execution of the tests.
|
||||
## Sometimes this helps catching errors earlier (you don't have to
|
||||
## wait for all the tests to be compiled).
|
||||
##
|
||||
## Define TEST_SUITE_LOG to be the name of the global log to create.
|
||||
## Define TEST_LOGS to the set of logs to include in it. One possibility
|
||||
## is $(TESTS:.test=.log).
|
||||
##
|
||||
## In addition to the magic "exit 77 means SKIP" feature (which was
|
||||
## imported from automake), there is a magic "exit 177 means FAIL" feature
|
||||
## which is useful if you need to issue a hard error no matter whether the
|
||||
## test is XFAIL or not.
|
||||
|
||||
# Use a POSIX-compatible shell if available, as this file uses
|
||||
# features of the POSIX shell that are not supported by some standard
|
||||
# shell implementations (e.g., Solaris 10 /bin/sh).
|
||||
SHELL = $(PREFERABLY_POSIX_SHELL)
|
||||
|
||||
# Set this to `false' to disable hard errors.
|
||||
ENABLE_HARD_ERRORS = :
|
||||
|
||||
## We use GNU Make extensions (%-rules) inside GNU_MAKE checks,
|
||||
## and we override check-TESTS.
|
||||
AUTOMAKE_OPTIONS += -Wno-portability -Wno-override
|
||||
|
||||
# Restructured Text title and section.
|
||||
am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
|
||||
am__rst_section = sed 'p;s/./=/g;p;g'
|
||||
|
||||
# Put stdin (possibly several lines separated by ". ") in a box.
|
||||
am__text_box = $(AWK) '{gsub ("\\. ", "\n"); print $$0; }' | \
|
||||
$(AWK) ' \
|
||||
max < length($$0) { \
|
||||
final= final (final ? "\n" : "") " " $$0; \
|
||||
max = length($$0); \
|
||||
} \
|
||||
END { \
|
||||
for (i = 0; i < max + 2 ; ++i) \
|
||||
line = line "="; \
|
||||
print line; \
|
||||
print final; \
|
||||
print line; \
|
||||
}'
|
||||
|
||||
# If stdout is a tty and TERM is smart then use colors. If test -t or
|
||||
# tput are not supported then this fails; a conservative approach. Of
|
||||
# course do not redirect stdout here, just stderr...
|
||||
am__tty_colors = \
|
||||
red=; \
|
||||
grn=; \
|
||||
lgn=; \
|
||||
blu=; \
|
||||
std=; \
|
||||
test "X$$TERM" != Xdumb && \
|
||||
test -t 1 2>/dev/null && \
|
||||
tput bold 1 >/dev/null 2>&1 && \
|
||||
tput setaf 1 >/dev/null 2>&1 && \
|
||||
tput sgr0 >/dev/null 2>&1 && \
|
||||
{ \
|
||||
red=$$(tput setaf 1); \
|
||||
grn=$$(tput setaf 2); \
|
||||
lgn=$$(tput bold)$$(tput setaf 2); \
|
||||
blu=$$(tput setaf 4); \
|
||||
std=$$(tput sgr0); \
|
||||
}
|
||||
|
||||
# Solaris 10 'make', and several other traditional 'make' implementations,
|
||||
# pass "-e" to $(SHELL). This contradicts POSIX. Work around the problem
|
||||
# by disabling -e (using the XSI extension "set +e") if it's set.
|
||||
SH_E_WORKAROUND = case $$- in *e*) set +e;; esac
|
||||
|
||||
# Emulate dirname with sed.
|
||||
_d_no_slash = s,^[^/]*$$,.,
|
||||
_d_strip_trailing = s,\([^/]\)//*$$,\1,
|
||||
_d_abs_trivial = s,^//*[^/]*$$,/,
|
||||
_d_rm_basename = s,\([^/]\)//*[^/]*$$,\1,
|
||||
_dirname = \
|
||||
sed '$(_d_no_slash);$(_d_strip_trailing);$(_d_abs_trivial);$(_d_rm_basename)'
|
||||
|
||||
# To be inserted before the command running the test. Creates the
|
||||
# directory for the log if needed. Stores in $dir the directory
|
||||
# containing $src, and passes TESTS_ENVIRONMENT.
|
||||
# Save and restore TERM around use of TESTS_ENVIRONMENT,
|
||||
# in case that unsets it.
|
||||
am__check_pre = \
|
||||
$(SH_E_WORKAROUND); \
|
||||
tst=`echo "$$src" | sed 's|^.*/||'`; \
|
||||
rm -f $@-t; \
|
||||
trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \
|
||||
1 2 13 15; \
|
||||
$(mkdir_p) "$$(echo '$@'|$(_dirname))" || exit; \
|
||||
if test -f "./$$src"; then dir=./; \
|
||||
elif test -f "$$src"; then dir=; \
|
||||
else dir="$(srcdir)/"; fi; \
|
||||
__SAVED_TERM=$$TERM; \
|
||||
$(TESTS_ENVIRONMENT)
|
||||
|
||||
# To be appended to the command running the test. Handles the stdout
|
||||
# and stderr redirection, and catch the exit status.
|
||||
am__check_post = \
|
||||
>$@-t 2>&1; \
|
||||
estatus=$$?; \
|
||||
if test $$estatus -eq 177; then \
|
||||
$(ENABLE_HARD_ERRORS) || estatus=1; \
|
||||
fi; \
|
||||
TERM=$$__SAVED_TERM; export TERM; \
|
||||
$(am__tty_colors); \
|
||||
xfailed=PASS; \
|
||||
for xfail in : $(XFAIL_TESTS); do \
|
||||
case $$src in \
|
||||
$$xfail | */$$xfail) xfailed=XFAIL; break; \
|
||||
esac; \
|
||||
done; \
|
||||
case $$estatus:$$xfailed in \
|
||||
0:XFAIL) col=$$red; res=XPASS;; \
|
||||
0:*) col=$$grn; res=PASS ;; \
|
||||
77:*) col=$$blu; res=SKIP ;; \
|
||||
177:*) col=$$red; res=FAIL ;; \
|
||||
*:XFAIL) col=$$lgn; res=XFAIL;; \
|
||||
*:*) col=$$red; res=FAIL ;; \
|
||||
esac; \
|
||||
echo "$${col}$$res$${std}: $@"; \
|
||||
echo "$$res: $@ (exit: $$estatus)" | \
|
||||
$(am__rst_section) >$@; \
|
||||
cat $@-t >>$@; \
|
||||
rm $@-t
|
||||
|
||||
SUFFIXES += .html .log
|
||||
|
||||
# From a test (with no extension) to a log file.
|
||||
if GNU_MAKE
|
||||
%.log: %
|
||||
@src='$<'; $(am__check_pre) "$$dir$$src" $(am__check_post)
|
||||
else
|
||||
# With POSIX 'make', inference rules cannot have FOO.log depend on FOO.
|
||||
# Work around the problem by calculating the dependency dynamically, and
|
||||
# then invoking a submake with the calculated dependency.
|
||||
CHECK-FORCE:
|
||||
DEPENDENCY = CHECK-FORCE
|
||||
$(TEST_LOGS): $(DEPENDENCY)
|
||||
@if test '$(DEPENDENCY)' = CHECK-FORCE; then \
|
||||
dst=$@; src=$${dst%.log}; \
|
||||
test -x "$$src" || src='$(srcdir)'/$$src; \
|
||||
exec $(MAKE) $(AM_MAKEFLAGS) DEPENDENCY="$$src" $@; \
|
||||
else \
|
||||
src='$(DEPENDENCY)'; \
|
||||
$(am__check_pre) "$$dir$$src" $(am__check_post); \
|
||||
fi
|
||||
endif
|
||||
|
||||
#TEST_LOGS = $(TESTS:.test=.log)
|
||||
TEST_SUITE_LOG = test-suite.log
|
||||
|
||||
$(TEST_SUITE_LOG): $(TEST_LOGS)
|
||||
@$(SH_E_WORKAROUND); \
|
||||
results=$$(for f in $(TEST_LOGS); do sed 1q $$f; done); \
|
||||
all=$$(echo "$$results" | wc -l | sed -e 's/^[ \t]*//'); \
|
||||
fail=$$(echo "$$results" | grep -c '^FAIL'); \
|
||||
pass=$$(echo "$$results" | grep -c '^PASS'); \
|
||||
skip=$$(echo "$$results" | grep -c '^SKIP'); \
|
||||
xfail=$$(echo "$$results" | grep -c '^XFAIL'); \
|
||||
xpass=$$(echo "$$results" | grep -c '^XPASS'); \
|
||||
failures=$$(expr $$fail + $$xpass); \
|
||||
case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \
|
||||
fail=0:xpass=0:xfail=0) \
|
||||
msg="All $$all tests passed. "; \
|
||||
exit=true;; \
|
||||
fail=0:xpass=0:xfail=*) \
|
||||
msg="All $$all tests behaved as expected"; \
|
||||
msg="$$msg ($$xfail expected failures). "; \
|
||||
exit=true;; \
|
||||
fail=*:xpass=0:xfail=*) \
|
||||
msg="$$fail of $$all tests failed. "; \
|
||||
exit=false;; \
|
||||
fail=*:xpass=*:xfail=*) \
|
||||
msg="$$failures of $$all tests did not behave as expected"; \
|
||||
msg="$$msg ($$xpass unexpected passes). "; \
|
||||
exit=false;; \
|
||||
*) \
|
||||
echo >&2 "incorrect case"; exit 4;; \
|
||||
esac; \
|
||||
if test "$$skip" -ne 0; then \
|
||||
msg="$$msg($$skip tests were not run). "; \
|
||||
fi; \
|
||||
if test "$$failures" -ne 0; then \
|
||||
{ \
|
||||
echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
|
||||
$(am__rst_title); \
|
||||
echo "$$msg"; \
|
||||
echo; \
|
||||
echo ".. contents:: :depth: 2"; \
|
||||
echo; \
|
||||
for f in $(TEST_LOGS); \
|
||||
do \
|
||||
case $$(sed 1q $$f) in \
|
||||
SKIP:*|PASS:*|XFAIL:*);; \
|
||||
*) echo; cat $$f;; \
|
||||
esac; \
|
||||
done; \
|
||||
} >$(TEST_SUITE_LOG).tmp; \
|
||||
mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
|
||||
msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \
|
||||
if test -n "$(PACKAGE_BUGREPORT)"; then \
|
||||
msg="$${msg}Please report it to $(PACKAGE_BUGREPORT). "; \
|
||||
fi; \
|
||||
fi; \
|
||||
$(am__tty_colors); \
|
||||
if $$exit; then echo $$grn; else echo $$red; fi; \
|
||||
echo "$$msg" | $(am__text_box); \
|
||||
echo $$std; \
|
||||
test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
|
||||
$$exit
|
||||
|
||||
# if test x"$$VERBOSE" != x && ! $exit; then
|
||||
|
||||
# Run all the tests.
|
||||
check-TESTS:
|
||||
@if test -z '$(LAZY_TEST_SUITE)'; then \
|
||||
rm -f $(TEST_SUITE_LOG) $(TEST_LOGS); \
|
||||
fi
|
||||
@$(MAKE) $(TEST_SUITE_LOG)
|
||||
|
||||
|
||||
## -------------- ##
|
||||
## Produce HTML. ##
|
||||
## -------------- ##
|
||||
|
||||
TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
|
||||
|
||||
.log.html:
|
||||
@for r2h in $(RST2HTML) $$RST2HTML rst2html rst2html.py; \
|
||||
do \
|
||||
if ($$r2h --version) >/dev/null 2>&1; then \
|
||||
R2H=$$r2h; \
|
||||
fi; \
|
||||
done; \
|
||||
if test -z "$$R2H"; then \
|
||||
echo >&2 "cannot find rst2html, cannot create $@"; \
|
||||
exit 2; \
|
||||
fi; \
|
||||
$$R2H $< >$@.tmp
|
||||
@mv $@.tmp $@
|
||||
|
||||
# Be sure to run check-TESTS first, and then to convert the result.
|
||||
# Beware of concurrent executions. And expect check-TESTS to fail.
|
||||
check-html:
|
||||
@if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then :; else \
|
||||
rv=$$?; \
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML); \
|
||||
exit $$rv; \
|
||||
fi
|
||||
|
||||
.PHONY: check-html
|
||||
|
||||
|
||||
## ------- ##
|
||||
## Clean. ##
|
||||
## ------- ##
|
||||
|
||||
check-clean:
|
||||
rm -f $(CHECK_CLEANFILES) $(TEST_SUITE_LOG) $(TEST_SUITE_HTML) $(TEST_LOGS)
|
||||
.PHONY: check-clean
|
||||
clean-local: check-clean
|
||||
38
cfg.mk
38
cfg.mk
@@ -31,21 +31,15 @@ url_dir_list = \
|
||||
gpg_key_ID = B9AB9A16
|
||||
|
||||
# Tests not to run as part of "make distcheck".
|
||||
# Exclude changelog-check here so that there's less churn in ChangeLog
|
||||
# files -- otherwise, you'd need to have the upcoming version number
|
||||
# at the top of the file for each `make distcheck' run.
|
||||
local-checks-to-skip = changelog-check strftime-check
|
||||
local-checks-to-skip = strftime-check
|
||||
|
||||
local-checks-to-skip += patch-check
|
||||
# Tools used to bootstrap this package, used for "announcement".
|
||||
bootstrap-tools = autoconf,automake,gnulib,bison
|
||||
|
||||
# The local directory containing the checked-out copy of gnulib used in this
|
||||
# release. Used solely to get gnulib's SHA1 for the "announcement" target.
|
||||
gnulib_dir = /gnulib
|
||||
|
||||
# Now that we have better (check.mk) tests, make this the default.
|
||||
# Now that we have better tests, make this the default.
|
||||
export VERBOSE = yes
|
||||
|
||||
old_NEWS_hash = fa6cba1740b3f385520c1b54d90859ca
|
||||
old_NEWS_hash = 8ed224902e335a80ec8340cd0d594d7f
|
||||
|
||||
# Ensure that the list of O_ symbols used to compute O_FULLBLOCK is complete.
|
||||
dd = $(srcdir)/src/dd.c
|
||||
@@ -105,6 +99,18 @@ sc_root_tests:
|
||||
exit 1; } || :; \
|
||||
fi
|
||||
|
||||
# Ensure that the syntax_check_exceptions file list in Makefile.am
|
||||
# stays in sync with corresponding files in the repository.
|
||||
sce = syntax_check_exceptions
|
||||
sc_x_sc_dist_check:
|
||||
@test "$$( ($(VC_LIST) | sed -n '/^.x-sc_/p'; \
|
||||
sed -n '/^$(sce) =[ ]*\\$$/,/[^\]$$/p' \
|
||||
$(srcdir)/Makefile.am \
|
||||
| sed 's/^ *//;/^$(sce) =/d' \
|
||||
| tr -s '\012\\' ' ' | fmt -1 \
|
||||
) | sort | uniq -u)" \
|
||||
&& { echo 'Makefile.am: $(sce) mismatch' >&2; exit 1; } || :;
|
||||
|
||||
headers_with_interesting_macro_defs = \
|
||||
exit.h \
|
||||
fcntl_.h \
|
||||
@@ -154,8 +160,7 @@ sc_system_h_headers: .re-list
|
||||
@if test -f $(srcdir)/src/system.h; then \
|
||||
trap 'rc=$$?; rm -f .re-list; exit $$rc' 0 1 2 3 15; \
|
||||
grep -nE -f .re-list \
|
||||
$$($(VC_LIST) src | \
|
||||
grep -Ev '((copy|system)\.h|parse-gram\.c)$$') \
|
||||
$$($(VC_LIST_EXCEPT) | grep '^src/') \
|
||||
&& { echo '$(ME): the above are already included via system.h'\
|
||||
1>&2; exit 1; } || :; \
|
||||
fi
|
||||
@@ -167,9 +172,14 @@ sc_sun_os_names:
|
||||
{ echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
ALL_RECURSIVE_TARGETS += sc_tight_scope
|
||||
sc_tight_scope:
|
||||
@$(MAKE) -C src $@
|
||||
|
||||
ALL_RECURSIVE_TARGETS += sc_check-AUTHORS
|
||||
sc_check-AUTHORS:
|
||||
@$(MAKE) -C src $@
|
||||
|
||||
# Perl-based tests used to exec perl from a #!/bin/sh script.
|
||||
# Now they all start with #!/usr/bin/perl and the portability
|
||||
# infrastructure is in tests/Makefile.am. Make sure no old-style
|
||||
@@ -195,3 +205,5 @@ sc_strftime_check:
|
||||
diff -u $@-src $@-info || exit 1; \
|
||||
rm -f $@-src $@-info; \
|
||||
fi
|
||||
|
||||
include $(srcdir)/dist-check.mk
|
||||
|
||||
31
configure.ac
31
configure.ac
@@ -32,7 +32,8 @@ AC_CONFIG_SRCDIR([src/ls.c])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_HEADERS([lib/config.h:lib/config.hin])
|
||||
|
||||
AM_INIT_AUTOMAKE([1.10a dist-xz])
|
||||
AM_INIT_AUTOMAKE([1.11 dist-xz color-tests parallel-tests])
|
||||
AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
|
||||
|
||||
AC_PROG_CC_STDC
|
||||
AM_PROG_CC_C_O
|
||||
@@ -59,9 +60,11 @@ if test "$gl_gcc_warnings" = yes; then
|
||||
gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
|
||||
AC_SUBST([WERROR_CFLAGS])
|
||||
|
||||
# Add many warnings, except some...
|
||||
nw=
|
||||
# This, $nw, is the list of warnings we disable.
|
||||
nw="$nw -Wdeclaration-after-statement" # too useful to forbid
|
||||
nw="$nw -Waggregate-return" # anachronistic
|
||||
nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
|
||||
nw="$nw -Wc++-compat" # We don't care about C++ compilers
|
||||
nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
|
||||
nw="$nw -Wtraditional" # Warns on #elif which we use often
|
||||
@@ -79,6 +82,7 @@ if test "$gl_gcc_warnings" = yes; then
|
||||
nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
|
||||
nw="$nw -Wswitch-enum" # Too many warnings for now
|
||||
nw="$nw -Wswitch-default" # Too many warnings for now
|
||||
nw="$nw -Wstack-protector" # not worth working around
|
||||
# things I might fix soon:
|
||||
nw="$nw -Wfloat-equal" # sort.c, seq.c
|
||||
nw="$nw -Wmissing-format-attribute" # copy.c
|
||||
@@ -96,6 +100,14 @@ if test "$gl_gcc_warnings" = yes; then
|
||||
gl_WARN_ADD([-Wno-sign-compare]) # Too many warnings for now
|
||||
gl_WARN_ADD([-Wno-pointer-sign]) # Too many warnings for now
|
||||
gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
|
||||
|
||||
# Offenders in pre-fts remove.c; FIXME: remove upon remove.c rewrite
|
||||
gl_WARN_ADD([-Wno-jump-misses-init])
|
||||
|
||||
# In spite of excluding -Wlogical-op above, it is enabled, as of
|
||||
# gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
|
||||
gl_WARN_ADD([-Wno-logical-op])
|
||||
|
||||
gl_WARN_ADD([-fdiagnostics-show-option])
|
||||
|
||||
AC_SUBST([WARN_CFLAGS])
|
||||
@@ -313,6 +325,19 @@ if test $gl_cv_list_mounted_fs = yes && test $gl_cv_fs_space = yes; then
|
||||
gl_ADD_PROG([optional_bin_progs], [df])
|
||||
fi
|
||||
|
||||
# Limit stdbuf to ELF systems with GCC
|
||||
optional_pkglib_progs=
|
||||
AC_MSG_CHECKING([whether this is an ELF system])
|
||||
AC_EGREP_CPP([yes], [#if __ELF__
|
||||
yes
|
||||
#endif], [elf_sys=yes], [elf_sys=no])
|
||||
AC_MSG_RESULT([$elf_sys])
|
||||
if test "$elf_sys" = "yes" && \
|
||||
test "$GCC" = "yes"; then
|
||||
gl_ADD_PROG([optional_bin_progs], [stdbuf])
|
||||
gl_ADD_PROG([optional_pkglib_progs], [libstdbuf.so])
|
||||
fi
|
||||
|
||||
############################################################################
|
||||
mk="$srcdir/src/Makefile.am"
|
||||
# Extract all literal names from the definition of $(EXTRA_PROGRAMS)
|
||||
@@ -385,6 +410,8 @@ MAN=`echo "$MAN"|sed 's/\@<:@\.1//'`
|
||||
|
||||
OPTIONAL_BIN_PROGS=`echo "$optional_bin_progs "|sed 's/ /\$(EXEEXT) /g;s/ $//'`
|
||||
AC_SUBST([OPTIONAL_BIN_PROGS])
|
||||
OPTIONAL_PKGLIB_PROGS=`echo "$optional_pkglib_progs " | sed 's/ $//'`
|
||||
AC_SUBST([OPTIONAL_PKGLIB_PROGS])
|
||||
NO_INSTALL_PROGS_DEFAULT=$no_install_progs_default
|
||||
AC_SUBST([NO_INSTALL_PROGS_DEFAULT])
|
||||
|
||||
|
||||
133
dist-check.mk
Normal file
133
dist-check.mk
Normal file
@@ -0,0 +1,133 @@
|
||||
# Most of this is probably too coreutils-centric to be useful to other packages.
|
||||
|
||||
bin=bin-$$$$
|
||||
|
||||
write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
|
||||
|
||||
TMPDIR ?= /tmp
|
||||
t=$(TMPDIR)/$(PACKAGE)/test
|
||||
pfx=$(t)/i
|
||||
|
||||
# More than once, tainted build and source directory names would
|
||||
# have caused at least one "make check" test to apply "chmod 700"
|
||||
# to all directories under $HOME. Make sure it doesn't happen again.
|
||||
tp := $(shell echo "$(TMPDIR)/$(PACKAGE)-$$$$")
|
||||
t_prefix = $(tp)/a
|
||||
t_taint = '$(t_prefix) b'
|
||||
fake_home = $(tp)/home
|
||||
|
||||
# Ensure that tests run from tainted build and src dir names work,
|
||||
# and don't affect anything in $HOME. Create witness files in $HOME,
|
||||
# record their attributes, and build/test. Then ensure that the
|
||||
# witnesses were not affected.
|
||||
ALL_RECURSIVE_TARGETS += taint-distcheck
|
||||
taint-distcheck: $(DIST_ARCHIVES)
|
||||
test -d $(t_taint) && chmod -R 700 $(t_taint) || :
|
||||
-rm -rf $(t_taint) $(fake_home)
|
||||
mkdir -p $(t_prefix) $(t_taint) $(fake_home)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t_taint) -zxf $(distdir).tar.gz
|
||||
mkfifo $(fake_home)/fifo
|
||||
touch $(fake_home)/f
|
||||
mkdir -p $(fake_home)/d/e
|
||||
ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-before
|
||||
cd $(t_taint)/$(distdir) \
|
||||
&& ./configure \
|
||||
&& $(MAKE) \
|
||||
&& HOME=$(fake_home) $(MAKE) check \
|
||||
&& ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-after \
|
||||
&& diff $(tp)/.ls-before $(tp)/.ls-after \
|
||||
&& test -d $(t_prefix)
|
||||
rm -rf $(tp)
|
||||
|
||||
# Verify that a twisted use of --program-transform-name=PROGRAM works.
|
||||
define install-transform-check
|
||||
echo running install-transform-check \
|
||||
&& rm -rf $(pfx) \
|
||||
&& $(MAKE) program_transform_name='s/.*/zyx/' \
|
||||
prefix=$(pfx) install \
|
||||
&& test "$$(echo $(pfx)/bin/*)" = "$(pfx)/bin/zyx" \
|
||||
&& test "$$(find $(pfx)/share/man -type f|sed 's,.*/,,;s,\..*,,')" = "zyx"
|
||||
endef
|
||||
|
||||
# Install, then verify that all binaries and man pages are in place.
|
||||
# Note that neither the binary, ginstall, nor the ].1 man page is installed.
|
||||
define my-instcheck
|
||||
$(MAKE) prefix=$(pfx) install \
|
||||
&& test ! -f $(pfx)/bin/ginstall \
|
||||
&& { fail=0; \
|
||||
for i in $(built_programs); do \
|
||||
test "$$i" = ginstall && i=install; \
|
||||
for j in "$(pfx)/bin/$$i" \
|
||||
"$(pfx)/share/man/man1/$$i.1"; do \
|
||||
case $$j in *'[.1') continue;; esac; \
|
||||
test -f "$$j" && : \
|
||||
|| { echo "$$j not installed"; fail=1; }; \
|
||||
done; \
|
||||
done; \
|
||||
test $$fail = 1 && exit 1 || :; \
|
||||
}
|
||||
endef
|
||||
|
||||
define coreutils-path-check
|
||||
{ \
|
||||
if test -f $(srcdir)/src/true.c; then \
|
||||
fail=1; \
|
||||
mkdir $(bin) \
|
||||
&& ($(write_loser)) > $(bin)/loser \
|
||||
&& chmod a+x $(bin)/loser \
|
||||
&& for i in $(built_programs); do \
|
||||
case $$i in \
|
||||
rm|expr|basename|echo|sort|ls|tr);; \
|
||||
cat|dirname|mv|wc);; \
|
||||
*) ln $(bin)/loser $(bin)/$$i;; \
|
||||
esac; \
|
||||
done \
|
||||
&& ln -sf ../src/true $(bin)/false \
|
||||
&& PATH=`pwd`/$(bin)$(PATH_SEPARATOR)$$PATH \
|
||||
$(MAKE) -C tests check \
|
||||
&& { test -d gnulib-tests \
|
||||
&& $(MAKE) -C gnulib-tests check \
|
||||
|| :; } \
|
||||
&& rm -rf $(bin) \
|
||||
&& fail=0; \
|
||||
else \
|
||||
fail=0; \
|
||||
fi; \
|
||||
test $$fail = 1 && exit 1 || :; \
|
||||
}
|
||||
endef
|
||||
|
||||
# Use -Wformat -Werror to detect format-string/arg-list mismatches.
|
||||
# Also, check for shadowing problems with -Wshadow, and for pointer
|
||||
# arithmetic problems with -Wpointer-arith.
|
||||
# These CFLAGS are pretty strict. If you build this target, you probably
|
||||
# have to have a recent version of gcc and glibc headers.
|
||||
# The hard-linking for-loop below ensures that there is a bin/ directory
|
||||
# full of all of the programs under test (except the ones that are required
|
||||
# for basic Makefile rules), all symlinked to the just-built "false" program.
|
||||
# This is to ensure that if ever a test neglects to make PATH include
|
||||
# the build srcdir, these always-failing programs will run.
|
||||
# Otherwise, it is too easy to test the wrong programs.
|
||||
# Note that "false" itself is a symlink to true, so it too will malfunction.
|
||||
ALL_RECURSIVE_TARGETS += my-distcheck
|
||||
my-distcheck: $(DIST_ARCHIVES) $(local-check)
|
||||
$(MAKE) syntax-check
|
||||
$(MAKE) check
|
||||
-rm -rf $(t)
|
||||
mkdir -p $(t)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --enable-gcc-warnings --disable-nls \
|
||||
&& $(MAKE) AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(install-transform-check) \
|
||||
&& $(my-instcheck) \
|
||||
&& $(coreutils-path-check) \
|
||||
&& $(MAKE) distclean
|
||||
(cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
-rm -rf $(t)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
@@ -2002,8 +2002,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software
|
||||
Foundation, Inc.
|
||||
Copyright (C) 2001-2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
@@ -60,45 +60,45 @@ syntax_checks = \
|
||||
|
||||
# List words/regexps here that should not appear in the texinfo documentation.
|
||||
check-texinfo: $(syntax_checks)
|
||||
@fail=0; \
|
||||
grep '@url{' $(srcdir)/*.texi && fail=1; \
|
||||
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
|
||||
grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
|
||||
grep -n filename $(srcdir)/*.texi \
|
||||
| $(EGREP) -v 'setfilename|[{]filename[}]' \
|
||||
&& fail=1; \
|
||||
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
|
||||
$(AM_V_GEN)fail=0; \
|
||||
grep '@url{' $(srcdir)/*.texi && fail=1; \
|
||||
grep '\$$@"' $(srcdir)/*.texi && fail=1; \
|
||||
grep -n '[^[:punct:]]@footnote' $(srcdir)/*.texi && fail=1; \
|
||||
grep -n filename $(srcdir)/*.texi \
|
||||
| $(EGREP) -v 'setfilename|[{]filename[}]' \
|
||||
&& fail=1; \
|
||||
$(PERL) -e 1 2> /dev/null && { $(PERL) -ne \
|
||||
'/\bPOSIX\b/ && !/\@acronym{POSIX}/ && !/^\* / || /{posix}/ and print,exit 1' \
|
||||
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
|
||||
$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
|
||||
$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
|
||||
$(srcdir)/*.texi 2> /dev/null || fail=1; }; \
|
||||
$(EGREP) -i '$(_W)builtins?$(W_)' $(srcdir)/*.texi && fail=1; \
|
||||
$(EGREP) -i '$(_W)path(name)?s?$(W_)' $(srcdir)/*.texi \
|
||||
| $(EGREP) -v 'search path|@vindex PATH$$|@env[{]PATH[}]' && fail=1; \
|
||||
exit $$fail
|
||||
|
||||
# Use `time zone', not `timezone'.
|
||||
sc-avoid-timezone:
|
||||
@$(EGREP) timezone $(srcdir)/*.texi && exit 1 || :
|
||||
$(AM_V_GEN)$(EGREP) timezone $(srcdir)/*.texi && exit 1 || :
|
||||
|
||||
# Check for insufficient exponent grouping, e.g.,
|
||||
# @math{2^64} should be @math{2^{64}}.
|
||||
sc-exponent-grouping:
|
||||
@$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi && exit 1 || :
|
||||
$(AM_V_GEN)$(EGREP) '\{.*\^[0-9][0-9]' $(srcdir)/*.texi && exit 1 || :
|
||||
|
||||
# E.g., use @sc{nul}, not NUL.
|
||||
sc-use-small-caps-NUL:
|
||||
@$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||
$(AM_V_GEN)$(EGREP) '$(_W)NUL$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||
|
||||
# Say I/O, not IO.
|
||||
sc-avoid-io:
|
||||
@$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||
$(AM_V_GEN)$(EGREP) '$(_W)IO$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||
|
||||
# I prefer nonzero over non-zero.
|
||||
sc-avoid-non-zero:
|
||||
@$(EGREP) non-zero $(srcdir)/*.texi && exit 1 || :
|
||||
$(AM_V_GEN)$(EGREP) non-zero $(srcdir)/*.texi && exit 1 || :
|
||||
|
||||
# Use `zeros', not `zeroes' (nothing wrong with `zeroes'. just be consistent).
|
||||
sc-avoid-zeroes:
|
||||
@$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||
$(AM_V_GEN)$(EGREP) -i '$(_W)zeroes$(W_)' $(srcdir)/*.texi && exit 1 || :
|
||||
|
||||
# ME = $(subdir)/$(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
ME = doc/Makefile
|
||||
@@ -115,7 +115,7 @@ find_upper_case_var = \
|
||||
} \
|
||||
END {$$m and (warn "$(ME): do not use upper case in \@var{...}\n"), exit 1}'
|
||||
sc-lower-case-var:
|
||||
@$(PERL) -e 1 2> /dev/null && \
|
||||
$(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi
|
||||
$(AM_V_GEN)$(PERL) -e 1 \
|
||||
&& $(PERL) -lne $(find_upper_case_var) $(srcdir)/*.texi
|
||||
|
||||
check: check-texinfo
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
perl -pi -e \
|
||||
's/\@code\{('"$(echo cp dd df dir dircolors du install ln ls mkdir mkfifo mknod mv shred touch vdir|tr ' ' '|')"')\}/\@command{$1}/' coreutils.texi
|
||||
|
||||
perl -pi -e \
|
||||
's/\@code\{('"$(echo cp dd df dir dircolors du install ln ls mkdir mkfifo mknod mv shred touch vdir|tr ' ' '|')"')\}/\@command{$1}/' coreutils.texi
|
||||
|
||||
regex=$((textutils; shellutils) | tr -s ' ' '|')
|
||||
perl -pi -e 's/\@code\{('"$regex"')\}/\@command{$1}/' coreutils.texi
|
||||
@@ -105,6 +105,7 @@
|
||||
* sort: (coreutils)sort invocation. Sort text files.
|
||||
* split: (coreutils)split invocation. Split into fixed-size pieces.
|
||||
* stat: (coreutils)stat invocation. Report file(system) status.
|
||||
* stdbuf: (coreutils)stdbuf invocation. Modify stdio buffering.
|
||||
* stty: (coreutils)stty invocation. Print/change terminal settings.
|
||||
* su: (coreutils)su invocation. Modify user and group ID.
|
||||
* sum: (coreutils)sum invocation. Print traditional checksum.
|
||||
@@ -197,7 +198,7 @@ Free Documentation License''.
|
||||
* User information:: id logname whoami groups users who
|
||||
* System context:: date uname hostname hostid uptime
|
||||
* SELinux context:: chcon runcon
|
||||
* Modified command invocation:: chroot env nice nohup su timeout
|
||||
* Modified command invocation:: chroot env nice nohup stdbuf su timeout
|
||||
* Process control:: kill
|
||||
* Delaying:: sleep
|
||||
* Numeric operations:: factor seq
|
||||
@@ -321,7 +322,7 @@ Special file types
|
||||
* mkdir invocation:: Make directories
|
||||
* mkfifo invocation:: Make FIFOs (named pipes)
|
||||
* mknod invocation:: Make block or character special files
|
||||
* readlink invocation:: Print the referent of a symbolic link
|
||||
* readlink invocation:: Print value of a symlink or canonical file name
|
||||
* rmdir invocation:: Remove empty directories
|
||||
* unlink invocation:: Remove files via unlink syscall
|
||||
|
||||
@@ -425,6 +426,7 @@ System context
|
||||
* Examples of date:: Examples.
|
||||
|
||||
SELinux context
|
||||
|
||||
* chcon invocation:: Change SELinux context of file
|
||||
* runcon invocation:: Run a command in specified SELinux context
|
||||
|
||||
@@ -434,6 +436,7 @@ Modified command invocation
|
||||
* env invocation:: Run a command in a modified environment
|
||||
* nice invocation:: Run a command with modified niceness
|
||||
* nohup invocation:: Run a command immune to hangups
|
||||
* stdbuf invocation:: Run a command with modified I/O buffering
|
||||
* su invocation:: Run a command with substitute user and group ID
|
||||
* timeout invocation:: Run a command with a time limit
|
||||
|
||||
@@ -1139,12 +1142,19 @@ sometimes need random data to do their work. For example, @samp{sort
|
||||
-R} must choose a hash function at random, and it needs random data to
|
||||
make this selection.
|
||||
|
||||
Normally these commands use the device file @file{/dev/urandom} as the
|
||||
By default these commands use an internal pseudorandom generator
|
||||
initialized by a small amount of entropy, but can be directed to use
|
||||
an external source with the @option{--random-source=@var{file}} option.
|
||||
An error is reported if @var{file} does not contain enough bytes.
|
||||
|
||||
For example, the device file @file{/dev/urandom} could be used as the
|
||||
source of random data. Typically, this device gathers environmental
|
||||
noise from device drivers and other sources into an entropy pool, and
|
||||
uses the pool to generate random bits. If the pool is short of data,
|
||||
the device reuses the internal pool to produce more bits, using a
|
||||
cryptographically secure pseudorandom number generator.
|
||||
cryptographically secure pseudorandom number generator. But be aware
|
||||
that this device is not designed for bulk random data generation
|
||||
and is relatively slow.
|
||||
|
||||
@file{/dev/urandom} suffices for most practical uses, but applications
|
||||
requiring high-value or long-term protection of private data may
|
||||
@@ -1152,21 +1162,10 @@ require an alternate data source like @file{/dev/random} or
|
||||
@file{/dev/arandom}. The set of available sources depends on your
|
||||
operating system.
|
||||
|
||||
To use such a source, specify the @option{--random-source=@var{file}}
|
||||
option, e.g., @samp{shuf --random-source=/dev/random}. The contents
|
||||
of @var{file} should be as random as possible. An error is reported
|
||||
if @var{file} does not contain enough bytes to randomize the input
|
||||
adequately.
|
||||
|
||||
To reproduce the results of an earlier invocation of a command, you
|
||||
can save some random data into a file and then use that file as the
|
||||
random source in earlier and later invocations of the command.
|
||||
|
||||
Some old-fashioned or stripped-down operating systems lack support for
|
||||
@command{/dev/urandom}. On these systems commands like @command{shuf}
|
||||
by default fall back on an internal pseudorandom generator initialized
|
||||
by a small amount of entropy.
|
||||
|
||||
@node Target directory
|
||||
@section Target directory
|
||||
|
||||
@@ -1689,9 +1688,9 @@ Analogous to @option{--body-numbering}.
|
||||
Analogous to @option{--body-numbering}.
|
||||
|
||||
@item -i @var{number}
|
||||
@itemx --page-increment=@var{number}
|
||||
@itemx --line-increment=@var{number}
|
||||
@opindex -i
|
||||
@opindex --page-increment
|
||||
@opindex --line-increment
|
||||
Increment line numbers by @var{number} (default 1).
|
||||
|
||||
@item -l @var{number}
|
||||
@@ -2008,7 +2007,7 @@ address.
|
||||
@exitstatus
|
||||
|
||||
@node base64 invocation
|
||||
@section @command{base64}: Transform data into printable data.
|
||||
@section @command{base64}: Transform data into printable data
|
||||
|
||||
@pindex base64
|
||||
@cindex base64 encoding
|
||||
@@ -2657,22 +2656,22 @@ The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -c @var{n}
|
||||
@itemx --bytes=@var{n}
|
||||
@item -c @var{k}
|
||||
@itemx --bytes=@var{k}
|
||||
@opindex -c
|
||||
@opindex --bytes
|
||||
Print the first @var{n} bytes, instead of initial lines.
|
||||
However, if @var{n} starts with a @samp{-},
|
||||
print all but the last @var{n} bytes of each file.
|
||||
@multiplierSuffixes{n}
|
||||
Print the first @var{k} bytes, instead of initial lines.
|
||||
However, if @var{k} starts with a @samp{-},
|
||||
print all but the last @var{k} bytes of each file.
|
||||
@multiplierSuffixes{k}
|
||||
|
||||
@itemx -n @var{n}
|
||||
@itemx --lines=@var{n}
|
||||
@itemx -n @var{k}
|
||||
@itemx --lines=@var{k}
|
||||
@opindex -n
|
||||
@opindex --lines
|
||||
Output the first @var{n} lines.
|
||||
However, if @var{n} starts with a @samp{-},
|
||||
print all but the last @var{n} lines of each file.
|
||||
Output the first @var{k} lines.
|
||||
However, if @var{k} starts with a @samp{-},
|
||||
print all but the last @var{k} lines of each file.
|
||||
Size multiplier suffixes are the same as with the @option{-c} option.
|
||||
|
||||
@item -q
|
||||
@@ -2742,14 +2741,14 @@ The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -c @var{n}
|
||||
@itemx --bytes=@var{n}
|
||||
@item -c @var{k}
|
||||
@itemx --bytes=@var{k}
|
||||
@opindex -c
|
||||
@opindex --bytes
|
||||
Output the last @var{n} bytes, instead of final lines.
|
||||
However, if @var{n} starts with a @samp{+}, start printing with the
|
||||
@var{n}th byte from the start of each file, instead of from the end.
|
||||
@multiplierSuffixes{n}
|
||||
Output the last @var{k} bytes, instead of final lines.
|
||||
However, if @var{k} starts with a @samp{+}, start printing with the
|
||||
@var{k}th byte from the start of each file, instead of from the end.
|
||||
@multiplierSuffixes{k}
|
||||
|
||||
@item -f
|
||||
@itemx --follow[=@var{how}]
|
||||
@@ -2854,13 +2853,13 @@ number of seconds between when tail prints the last pre-rotation lines
|
||||
and when it prints the lines that have accumulated in the new log file.
|
||||
This option is meaningful only when following by name.
|
||||
|
||||
@itemx -n @var{n}
|
||||
@itemx --lines=@var{n}
|
||||
@itemx -n @var{k}
|
||||
@itemx --lines=@var{k}
|
||||
@opindex -n
|
||||
@opindex --lines
|
||||
Output the last @var{n} lines.
|
||||
However, if @var{n} starts with a @samp{+}, start printing with the
|
||||
@var{n}th line from the start of each file, instead of from the end.
|
||||
Output the last @var{k} lines.
|
||||
However, if @var{k} starts with a @samp{+}, start printing with the
|
||||
@var{k}th line from the start of each file, instead of from the end.
|
||||
Size multiplier suffixes are the same as with the @option{-c} option.
|
||||
|
||||
@item -q
|
||||
@@ -3725,7 +3724,9 @@ so portable shell scripts should specify global options first.
|
||||
@vindex LC_CTYPE
|
||||
Ignore leading blanks when finding sort keys in each line.
|
||||
By default a blank is a space or a tab, but the @env{LC_CTYPE} locale
|
||||
can change this.
|
||||
can change this. Note blanks may be ignored by your locale's collating
|
||||
rules, but without this option they will be significant for character
|
||||
positions specified in keys with the @option{-k} option.
|
||||
|
||||
@item -d
|
||||
@itemx --dictionary-order
|
||||
@@ -3789,6 +3790,21 @@ Use this option only if there is no alternative; it is much slower than
|
||||
@option{--numeric-sort} (@option{-n}) and it can lose information when
|
||||
converting to floating point.
|
||||
|
||||
@item -h
|
||||
@itemx --human-numeric-sort
|
||||
@itemx --sort=human-numeric
|
||||
@opindex -h
|
||||
@opindex --human-numeric-sort
|
||||
@opindex --sort
|
||||
@cindex human numeric sort
|
||||
@vindex LC_NUMERIC
|
||||
Sort numerically, as per the @option{--numeric-sort} option below, and in
|
||||
addition handle IEC or SI suffixes like MiB, MB etc (@ref{Block size}).
|
||||
Note a mixture of IEC and SI suffixes is not supported and will
|
||||
be flagged as an error. Also the numbers must be abbreviated uniformly.
|
||||
I.E. values with different precisions like 6000K and 5M will be sorted
|
||||
incorrectly.
|
||||
|
||||
@item -i
|
||||
@itemx --ignore-nonprinting
|
||||
@opindex -i
|
||||
@@ -3920,7 +3936,7 @@ according to different rules; see below for details. Keys can span
|
||||
multiple fields.
|
||||
|
||||
Example: To sort on the second field, use @option{--key=2,2}
|
||||
(@option{-k 2,2}). See below for more examples.
|
||||
(@option{-k 2,2}). See below for more notes on keys and more examples.
|
||||
|
||||
@item --batch-size=@var{nmerge}
|
||||
@opindex --batch-size
|
||||
@@ -4089,15 +4105,15 @@ affect the meaning of character positions in field specifications in
|
||||
obscure cases. The only fix is to add an explicit @option{-b}.
|
||||
|
||||
A position in a sort field specified with @option{-k} may have any
|
||||
of the option letters @samp{Mbdfinr} appended to it, in which case the
|
||||
global ordering options are not used for that particular field. The
|
||||
of the option letters @samp{MbdfghinRrV} appended to it, in which case no
|
||||
global ordering options are inherited by that particular field. The
|
||||
@option{-b} option may be independently attached to either or both of
|
||||
the start and end positions of a field specification, and if it is
|
||||
inherited from the global options it will be attached to both.
|
||||
If input lines can contain leading or adjacent blanks and @option{-t}
|
||||
is not used, then @option{-k} is typically combined with @option{-b},
|
||||
@option{-g}, @option{-M}, or @option{-n}; otherwise the varying
|
||||
numbers of leading blanks in fields can cause confusing results.
|
||||
is not used, then @option{-k} is typically combined with @option{-b} or
|
||||
an option that implicitly ignores leading blanks (@samp{MghnV}) as otherwise
|
||||
the varying numbers of leading blanks in fields can cause confusing results.
|
||||
|
||||
If the start position in a sort field specifier falls after the end of
|
||||
the line or after the end field, the field is empty. If the @option{-b}
|
||||
@@ -4242,6 +4258,17 @@ by the sort operation.
|
||||
@c printf 'c\n\nb\n\na\n'|perl -0pe 's/\n\n/\n\0/g'|sort -z|perl -0pe 's/\0/\n/g'
|
||||
@c @end example
|
||||
|
||||
@item
|
||||
Use the common @acronym{DSU, Decorate Sort Undecorate} idiom to
|
||||
sort lines according to their length.
|
||||
|
||||
@example
|
||||
awk '@{print length, $0@}' /etc/passwd | sort -n | cut -f2- -d' '
|
||||
@end example
|
||||
|
||||
In general this technique can be used to sort data that the @command{sort}
|
||||
command does not support, or is inefficient at, sorting directly.
|
||||
|
||||
@item
|
||||
Shuffle a list of directories, but preserve the order of files within
|
||||
each directory. For instance, one could use this to generate a music
|
||||
@@ -4410,8 +4437,8 @@ duplicate lines, perhaps you want to use @code{sort -u}.
|
||||
@xref{sort invocation}.
|
||||
|
||||
@vindex LC_COLLATE
|
||||
Comparisons use the character collating sequence specified by the
|
||||
@env{LC_COLLATE} locale category.
|
||||
Comparisons honor the rules specified by the @env{LC_COLLATE}
|
||||
locale category.
|
||||
|
||||
If no @var{output} file is specified, @command{uniq} writes to standard
|
||||
output.
|
||||
@@ -4569,7 +4596,7 @@ Columns are separated by a single TAB character.
|
||||
@opindex -2
|
||||
@opindex -3
|
||||
The options @option{-1}, @option{-2}, and @option{-3} suppress printing of
|
||||
the corresponding columns. Also see @ref{Common options}.
|
||||
the corresponding columns (and separators). Also see @ref{Common options}.
|
||||
|
||||
Unlike some other comparison utilities, @command{comm} has an exit
|
||||
status that does not depend on the result of the comparison.
|
||||
@@ -6540,6 +6567,16 @@ it also affects the HP-UX @command{ls} program.
|
||||
|
||||
@optSi
|
||||
|
||||
@item -Z
|
||||
@itemx --context
|
||||
@opindex -Z
|
||||
@opindex --context
|
||||
@cindex SELinux
|
||||
@cindex security context
|
||||
Display the SELinux security context or @samp{?} if none is found.
|
||||
When used with the @option{-l} option, print the security context
|
||||
to the left of the size column.
|
||||
|
||||
@end table
|
||||
|
||||
|
||||
@@ -7367,6 +7404,9 @@ Make hard links instead of copies of non-directories.
|
||||
@opindex -L
|
||||
@opindex --dereference
|
||||
Follow symbolic links when copying from them.
|
||||
With this option, @command{cp} cannot create a symbolic link.
|
||||
For example, a symlink (to regular file) in the source tree will be copied to
|
||||
a regular file in the destination tree.
|
||||
|
||||
@item -n
|
||||
@itemx --no-clobber
|
||||
@@ -7414,8 +7454,27 @@ not yet take advantage of that.
|
||||
@itemx links
|
||||
Preserve in the destination files
|
||||
any links between corresponding source files.
|
||||
@c Give examples illustrating how hard links are preserved.
|
||||
@c Also, show how soft links map to hard links with -L and -H.
|
||||
Note that with @option{-L} or @option{-H}, this option can convert
|
||||
symbolic links to hard links. For example,
|
||||
@example
|
||||
$ mkdir c; : > a; ln -s a b; cp -aH a b c; ls -i1 c
|
||||
74161745 a
|
||||
74161745 b
|
||||
@end example
|
||||
@noindent
|
||||
Note the inputs: @file{b} is a symlink to regular file @file{a},
|
||||
yet the files in destination directory, @file{c/}, are hard-linked.
|
||||
Since @option{-a} implies @option{--preserve=links}, and since @option{-H}
|
||||
tells @command{cp} to dereference command line arguments, it sees two files
|
||||
with the same inode number, and preserves the perceived hard link.
|
||||
|
||||
Here is a similar example that exercises @command{cp}'s @option{-L} option:
|
||||
@smallexample
|
||||
$ mkdir b c; (cd b; : > a; ln -s a b); cp -aL b c; ls -i1 c/b
|
||||
74163295 a
|
||||
74163295 b
|
||||
@end smallexample
|
||||
|
||||
@itemx context
|
||||
Preserve SELinux security context of the file. @command{cp} will fail
|
||||
if the preserving of SELinux security context is not succesful.
|
||||
@@ -7484,6 +7543,15 @@ Also, it is not portable to use @option{-R} to copy symbolic links
|
||||
unless you also specify @option{-P}, as @acronym{POSIX} allows
|
||||
implementations that dereference symbolic links by default.
|
||||
|
||||
@item --reflink
|
||||
@opindex --reflink
|
||||
Perform a lightweight, copy-on-write (COW) copy.
|
||||
Copying with this option can succeed only on some relatively new file systems.
|
||||
Once it has succeeded, beware that the source and destination files
|
||||
share the same disk data blocks as long as they remain unmodified.
|
||||
Thus, if a disk I/O error affects data blocks of one of the files,
|
||||
the other suffers the exact same fate.
|
||||
|
||||
@item --remove-destination
|
||||
@opindex --remove-destination
|
||||
Remove each existing destination file before attempting to open it
|
||||
@@ -7802,6 +7870,10 @@ same time.
|
||||
@opindex direct
|
||||
@cindex direct I/O
|
||||
Use direct I/O for data, avoiding the buffer cache.
|
||||
Note that the kernel may impose restrictions on read or write buffer sizes.
|
||||
For example, with an ext4 destination file system and a linux-based kernel,
|
||||
using @samp{oflag=direct} will cause writes to fail with @code{EINVAL} if the
|
||||
output buffer size is not a multiple of 512.
|
||||
|
||||
@item directory
|
||||
@opindex directory
|
||||
@@ -8045,6 +8117,15 @@ ownership of installed files or directories to @var{owner}. The default
|
||||
is @code{root}. @var{owner} may be either a user name or a numeric user
|
||||
ID.
|
||||
|
||||
@item --preserve-context
|
||||
@opindex --preserve-context
|
||||
@cindex SELinux
|
||||
@cindex security context
|
||||
Preserve the SELinux security context of files and directories.
|
||||
Failure to preserve the context in all of the files or directories
|
||||
will result in an exit status of 1. If SELinux is disabled then
|
||||
print a warning and ignore the option.
|
||||
|
||||
@item -p
|
||||
@itemx --preserve-timestamps
|
||||
@opindex -p
|
||||
@@ -8083,6 +8164,16 @@ Program used to strip binaries.
|
||||
@opindex --verbose
|
||||
Print the name of each file before copying it.
|
||||
|
||||
@item -Z @var{context}
|
||||
@itemx --context=@var{context}
|
||||
@opindex -Z
|
||||
@opindex --context
|
||||
@cindex SELinux
|
||||
@cindex security context
|
||||
Set the default SELinux security context to be used for any
|
||||
created files and directories. If SELinux is disabled then
|
||||
print a warning and ignore the option.
|
||||
|
||||
@end table
|
||||
|
||||
@exitstatus
|
||||
@@ -8617,7 +8708,7 @@ Besides directories, other special file types include named pipes
|
||||
* mkdir invocation:: Make directories.
|
||||
* mkfifo invocation:: Make FIFOs (named pipes).
|
||||
* mknod invocation:: Make block or character special files.
|
||||
* readlink invocation:: Print the referent of a symbolic link.
|
||||
* readlink invocation:: Print value of a symlink or canonical file name.
|
||||
* rmdir invocation:: Remove empty directories.
|
||||
* unlink invocation:: Remove files via the unlink syscall
|
||||
@end menu
|
||||
@@ -8917,6 +9008,15 @@ newly-created parent directories are inherited.
|
||||
@opindex --verbose
|
||||
Print a message for each created directory. This is most useful with
|
||||
@option{--parents}.
|
||||
|
||||
@item -Z @var{context}
|
||||
@itemx --context=@var{context}
|
||||
@opindex -Z
|
||||
@opindex --context
|
||||
@cindex SELinux
|
||||
@cindex security context
|
||||
Set the default SELinux security context to be used for created directories.
|
||||
|
||||
@end table
|
||||
|
||||
@exitstatus
|
||||
@@ -8956,6 +9056,14 @@ Set the mode of created FIFOs to @var{mode}, which is symbolic as in
|
||||
for the point of departure. @var{mode} should specify only file
|
||||
permission bits. @xref{File permissions}.
|
||||
|
||||
@item -Z @var{context}
|
||||
@itemx --context=@var{context}
|
||||
@opindex -Z
|
||||
@opindex --context
|
||||
@cindex SELinux
|
||||
@cindex security context
|
||||
Set the default SELinux security context to be used for created FIFOs.
|
||||
|
||||
@end table
|
||||
|
||||
@exitstatus
|
||||
@@ -9031,16 +9139,28 @@ Set the mode of created files to @var{mode}, which is symbolic as in
|
||||
@var{mode} should specify only file permission bits.
|
||||
@xref{File permissions}.
|
||||
|
||||
@item -Z @var{context}
|
||||
@itemx --context=@var{context}
|
||||
@opindex -Z
|
||||
@opindex --context
|
||||
@cindex SELinux
|
||||
@cindex security context
|
||||
Set the default SELinux security context to be used for created files.
|
||||
|
||||
@end table
|
||||
|
||||
@exitstatus
|
||||
|
||||
|
||||
@node readlink invocation
|
||||
@section @command{readlink}: Print the referent of a symbolic link
|
||||
@section @command{readlink}: Print value of a symlink or canonical file name
|
||||
|
||||
@pindex readlink
|
||||
@cindex displaying value of a symbolic link
|
||||
@cindex canonical file name
|
||||
@cindex canonicalize a file name
|
||||
@pindex realpath
|
||||
@findex realpath
|
||||
|
||||
@command{readlink} may work in one of two supported modes:
|
||||
|
||||
@@ -9120,6 +9240,9 @@ Report error messages.
|
||||
|
||||
The @command{readlink} utility first appeared in OpenBSD 2.1.
|
||||
|
||||
There is a @command{realpath} command on some systems
|
||||
which operates like @command{readlink} in canonicalize mode.
|
||||
|
||||
@exitstatus
|
||||
|
||||
|
||||
@@ -12737,6 +12860,16 @@ Print the real, instead of effective, user or group ID. Requires
|
||||
@opindex --user
|
||||
Print only the user ID.
|
||||
|
||||
@item -Z
|
||||
@itemx --context
|
||||
@opindex -Z
|
||||
@opindex --context
|
||||
@cindex SELinux
|
||||
@cindex security context
|
||||
Print only the security context of the current user.
|
||||
If SELinux is disabled then print a warning and
|
||||
set the exit status to 1.
|
||||
|
||||
@end table
|
||||
|
||||
@exitstatus
|
||||
@@ -13006,186 +13139,14 @@ This section describes commands that print or change system-wide
|
||||
information.
|
||||
|
||||
@menu
|
||||
* arch invocation:: Print machine hardware name.
|
||||
* date invocation:: Print or set system date and time.
|
||||
* arch invocation:: Print machine hardware name.
|
||||
* uname invocation:: Print system information.
|
||||
* hostname invocation:: Print or set system name.
|
||||
* hostid invocation:: Print numeric host identifier.
|
||||
* uptime invocation:: Print system uptime and load
|
||||
* uptime invocation:: Print system uptime and load.
|
||||
@end menu
|
||||
|
||||
@node SELinux context
|
||||
@chapter SELinux context
|
||||
|
||||
@cindex SELinux context
|
||||
@cindex SELinux, context
|
||||
@cindex commands for SELinux context
|
||||
|
||||
This section describes commands for operations with SELinux
|
||||
contexts.
|
||||
|
||||
@menu
|
||||
* chcon invocation:: Change SELinux context of file
|
||||
* runcon invocation:: Run a command in specified SELinux context
|
||||
@end menu
|
||||
|
||||
@node chcon invocation
|
||||
@section @command{chcon}: Change SELinux context of file.
|
||||
|
||||
@pindex chcon
|
||||
@cindex changing security context
|
||||
@cindex change SELinux context
|
||||
|
||||
@command{chcon} changes the SELinux security context of the selected files.
|
||||
Synopses:
|
||||
|
||||
@smallexample
|
||||
chcon [@var{option}]@dots{} @var{context} @var{file}@dots{}
|
||||
chcon [@var{option}]@dots{} [-u @var{user}] [-r @var{role}] [-l @var{range}] [-t @var{type}] @var{file}@dots{}
|
||||
chcon [@var{option}]@dots{} --reference=@var{rfile} @var{file}@dots{}
|
||||
@end smallexample
|
||||
|
||||
Change the SELinux security context of each @var{file} to @var{context}.
|
||||
With @option{--reference}, change the security context of each @var{file}
|
||||
to that of @var{rfile}.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -h
|
||||
@itemx --no-dereference
|
||||
@opindex -h
|
||||
@opindex --no-dereference
|
||||
@cindex no dereference
|
||||
Affect symbolic links instead of any referenced file.
|
||||
|
||||
@item --reference=@var{rfile}
|
||||
@opindex --reference
|
||||
@cindex reference file
|
||||
Use @var{rfile}'s security context rather than specifying a @var{context} value.
|
||||
|
||||
@item -R
|
||||
@itemx --recursive
|
||||
@opindex -R
|
||||
@opindex --recursive
|
||||
Operate on files and directories recursively.
|
||||
|
||||
@choptH
|
||||
@xref{Traversing symlinks}.
|
||||
|
||||
@choptL
|
||||
@xref{Traversing symlinks}.
|
||||
|
||||
@choptP
|
||||
@xref{Traversing symlinks}.
|
||||
|
||||
@item -v
|
||||
@itemx --verbose
|
||||
@opindex -v
|
||||
@opindex --verbose
|
||||
@cindex diagnostic
|
||||
Output a diagnostic for every file processed.
|
||||
|
||||
@item -u @var{user}
|
||||
@itemx --user=@var{user}
|
||||
@opindex -u
|
||||
@opindex --user
|
||||
Set user @var{user} in the target security context.
|
||||
|
||||
@item -r @var{role}
|
||||
@itemx --role=@var{role}
|
||||
@opindex -r
|
||||
@opindex --role
|
||||
Set role @var{role} in the target security context.
|
||||
|
||||
@item -t @var{type}
|
||||
@itemx --type=@var{type}
|
||||
@opindex -t
|
||||
@opindex --type
|
||||
Set type @var{type} in the target security context.
|
||||
|
||||
@item -l @var{range}
|
||||
@itemx --range=@var{range}
|
||||
@opindex -l
|
||||
@opindex --range
|
||||
Set range @var{range} in the target security context.
|
||||
|
||||
@end table
|
||||
|
||||
@exitstatus
|
||||
|
||||
@node runcon invocation
|
||||
@section @command{runcon}: Run a command in specified SELinux context
|
||||
|
||||
@pindex runcon
|
||||
@cindex run with security context
|
||||
|
||||
|
||||
@command{runcon} runs file in specified SELinux security context.
|
||||
|
||||
Synopses:
|
||||
@smallexample
|
||||
runcon @var{context} @var{command} [@var{args}]
|
||||
runcon [ -c ] [-u @var{user}] [-r @var{role}] [-t @var{type}] [-l @var{range}] @var{command} [@var{args}]
|
||||
@end smallexample
|
||||
|
||||
Run @var{command} with completely-specified @var{context}, or with
|
||||
current or transitioned security context modified by one or more of @var{level},
|
||||
@var{role}, @var{type} and @var{user}.
|
||||
|
||||
If none of @option{-c}, @option{-t}, @option{-u}, @option{-r}, or @option{-l}
|
||||
is specified, the first argument is used as the complete context.
|
||||
Any additional arguments after @var{command}
|
||||
are interpreted as arguments to the command.
|
||||
|
||||
With neither @var{context} nor @var{command}, print the current security context.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -c
|
||||
@itemx --compute
|
||||
@opindex -c
|
||||
@opindex --compute
|
||||
Compute process transition context before modifying.
|
||||
|
||||
@item -u @var{user}
|
||||
@itemx --user=@var{user}
|
||||
@opindex -u
|
||||
@opindex --user
|
||||
Set user @var{user} in the target security context.
|
||||
|
||||
@item -r @var{role}
|
||||
@itemx --role=@var{role}
|
||||
@opindex -r
|
||||
@opindex --role
|
||||
Set role @var{role} in the target security context.
|
||||
|
||||
@item -t @var{type}
|
||||
@itemx --type=@var{type}
|
||||
@opindex -t
|
||||
@opindex --type
|
||||
Set type @var{type} in the target security context.
|
||||
|
||||
@item -l @var{range}
|
||||
@itemx --range=@var{range}
|
||||
@opindex -l
|
||||
@opindex --range
|
||||
Set range @var{range} in the target security context.
|
||||
|
||||
@end table
|
||||
|
||||
@cindex exit status of @command{runcon}
|
||||
Exit status:
|
||||
|
||||
@display
|
||||
126 if @var{command} is found but cannot be invoked
|
||||
127 if @command{runcon} itself fails or if @var{command} cannot be found
|
||||
the exit status of @var{command} otherwise
|
||||
@end display
|
||||
|
||||
@node date invocation
|
||||
@section @command{date}: Print or set system date and time
|
||||
|
||||
@@ -13993,7 +13954,7 @@ options}.
|
||||
|
||||
|
||||
@node hostid invocation
|
||||
@section @command{hostid}: Print numeric host identifier.
|
||||
@section @command{hostid}: Print numeric host identifier
|
||||
|
||||
@pindex hostid
|
||||
@cindex printing the host identifier
|
||||
@@ -14047,6 +14008,178 @@ also include processes in the uninterruptible sleep state (that is,
|
||||
those processes which are waiting for disk I/O). The Linux kernel
|
||||
includes uninterruptible processes.
|
||||
|
||||
@node SELinux context
|
||||
@chapter SELinux context
|
||||
|
||||
@cindex SELinux context
|
||||
@cindex SELinux, context
|
||||
@cindex commands for SELinux context
|
||||
|
||||
This section describes commands for operations with SELinux
|
||||
contexts.
|
||||
|
||||
@menu
|
||||
* chcon invocation:: Change SELinux context of file
|
||||
* runcon invocation:: Run a command in specified SELinux context
|
||||
@end menu
|
||||
|
||||
@node chcon invocation
|
||||
@section @command{chcon}: Change SELinux context of file
|
||||
|
||||
@pindex chcon
|
||||
@cindex changing security context
|
||||
@cindex change SELinux context
|
||||
|
||||
@command{chcon} changes the SELinux security context of the selected files.
|
||||
Synopses:
|
||||
|
||||
@smallexample
|
||||
chcon [@var{option}]@dots{} @var{context} @var{file}@dots{}
|
||||
chcon [@var{option}]@dots{} [-u @var{user}] [-r @var{role}] [-l @var{range}] [-t @var{type}] @var{file}@dots{}
|
||||
chcon [@var{option}]@dots{} --reference=@var{rfile} @var{file}@dots{}
|
||||
@end smallexample
|
||||
|
||||
Change the SELinux security context of each @var{file} to @var{context}.
|
||||
With @option{--reference}, change the security context of each @var{file}
|
||||
to that of @var{rfile}.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -h
|
||||
@itemx --no-dereference
|
||||
@opindex -h
|
||||
@opindex --no-dereference
|
||||
@cindex no dereference
|
||||
Affect symbolic links instead of any referenced file.
|
||||
|
||||
@item --reference=@var{rfile}
|
||||
@opindex --reference
|
||||
@cindex reference file
|
||||
Use @var{rfile}'s security context rather than specifying a @var{context} value.
|
||||
|
||||
@item -R
|
||||
@itemx --recursive
|
||||
@opindex -R
|
||||
@opindex --recursive
|
||||
Operate on files and directories recursively.
|
||||
|
||||
@choptH
|
||||
@xref{Traversing symlinks}.
|
||||
|
||||
@choptL
|
||||
@xref{Traversing symlinks}.
|
||||
|
||||
@choptP
|
||||
@xref{Traversing symlinks}.
|
||||
|
||||
@item -v
|
||||
@itemx --verbose
|
||||
@opindex -v
|
||||
@opindex --verbose
|
||||
@cindex diagnostic
|
||||
Output a diagnostic for every file processed.
|
||||
|
||||
@item -u @var{user}
|
||||
@itemx --user=@var{user}
|
||||
@opindex -u
|
||||
@opindex --user
|
||||
Set user @var{user} in the target security context.
|
||||
|
||||
@item -r @var{role}
|
||||
@itemx --role=@var{role}
|
||||
@opindex -r
|
||||
@opindex --role
|
||||
Set role @var{role} in the target security context.
|
||||
|
||||
@item -t @var{type}
|
||||
@itemx --type=@var{type}
|
||||
@opindex -t
|
||||
@opindex --type
|
||||
Set type @var{type} in the target security context.
|
||||
|
||||
@item -l @var{range}
|
||||
@itemx --range=@var{range}
|
||||
@opindex -l
|
||||
@opindex --range
|
||||
Set range @var{range} in the target security context.
|
||||
|
||||
@end table
|
||||
|
||||
@exitstatus
|
||||
|
||||
@node runcon invocation
|
||||
@section @command{runcon}: Run a command in specified SELinux context
|
||||
|
||||
@pindex runcon
|
||||
@cindex run with security context
|
||||
|
||||
|
||||
@command{runcon} runs file in specified SELinux security context.
|
||||
|
||||
Synopses:
|
||||
@smallexample
|
||||
runcon @var{context} @var{command} [@var{args}]
|
||||
runcon [ -c ] [-u @var{user}] [-r @var{role}] [-t @var{type}] [-l @var{range}] @var{command} [@var{args}]
|
||||
@end smallexample
|
||||
|
||||
Run @var{command} with completely-specified @var{context}, or with
|
||||
current or transitioned security context modified by one or more of @var{level},
|
||||
@var{role}, @var{type} and @var{user}.
|
||||
|
||||
If none of @option{-c}, @option{-t}, @option{-u}, @option{-r}, or @option{-l}
|
||||
is specified, the first argument is used as the complete context.
|
||||
Any additional arguments after @var{command}
|
||||
are interpreted as arguments to the command.
|
||||
|
||||
With neither @var{context} nor @var{command}, print the current security context.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -c
|
||||
@itemx --compute
|
||||
@opindex -c
|
||||
@opindex --compute
|
||||
Compute process transition context before modifying.
|
||||
|
||||
@item -u @var{user}
|
||||
@itemx --user=@var{user}
|
||||
@opindex -u
|
||||
@opindex --user
|
||||
Set user @var{user} in the target security context.
|
||||
|
||||
@item -r @var{role}
|
||||
@itemx --role=@var{role}
|
||||
@opindex -r
|
||||
@opindex --role
|
||||
Set role @var{role} in the target security context.
|
||||
|
||||
@item -t @var{type}
|
||||
@itemx --type=@var{type}
|
||||
@opindex -t
|
||||
@opindex --type
|
||||
Set type @var{type} in the target security context.
|
||||
|
||||
@item -l @var{range}
|
||||
@itemx --range=@var{range}
|
||||
@opindex -l
|
||||
@opindex --range
|
||||
Set range @var{range} in the target security context.
|
||||
|
||||
@end table
|
||||
|
||||
@cindex exit status of @command{runcon}
|
||||
Exit status:
|
||||
|
||||
@display
|
||||
126 if @var{command} is found but cannot be invoked
|
||||
127 if @command{runcon} itself fails or if @var{command} cannot be found
|
||||
the exit status of @var{command} otherwise
|
||||
@end display
|
||||
|
||||
@node Modified command invocation
|
||||
@chapter Modified command invocation
|
||||
|
||||
@@ -14063,6 +14196,7 @@ user, etc.
|
||||
* env invocation:: Modify environment variables.
|
||||
* nice invocation:: Modify niceness.
|
||||
* nohup invocation:: Immunize to hangups.
|
||||
* stdbuf invocation:: Modify buffering of standard streams.
|
||||
* su invocation:: Modify user and group ID.
|
||||
* timeout invocation:: Run with time limit.
|
||||
@end menu
|
||||
@@ -14084,7 +14218,7 @@ underlying function is non-privileged due to lack of support in MS-Windows.}
|
||||
Synopses:
|
||||
|
||||
@example
|
||||
chroot @var{newroot} [@var{command} [@var{args}]@dots{}]
|
||||
chroot @var{option} @var{newroot} [@var{command} [@var{args}]@dots{}]
|
||||
chroot @var{option}
|
||||
@end example
|
||||
|
||||
@@ -14097,8 +14231,25 @@ variable or @command{/bin/sh} if not set, invoked with the @option{-i} option.
|
||||
@var{command} must not be a special built-in utility
|
||||
(@pxref{Special built-in utilities}).
|
||||
|
||||
The only options are @option{--help} and @option{--version}. @xref{Common
|
||||
options}. Options must precede operands.
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
Options must precede operands.
|
||||
|
||||
@table @samp
|
||||
|
||||
@itemx --userspec=@var{user}[:@var{group}]
|
||||
@opindex --userspec
|
||||
By default, @var{command} is run with the same credentials
|
||||
as the invoking process.
|
||||
Use this option to run it as a different @var{user} and/or with a
|
||||
different primary @var{group}.
|
||||
|
||||
@itemx --groups=@var{groups}
|
||||
@opindex --groups
|
||||
Use this option to specify the supplementary @var{groups} to be
|
||||
used by the new process.
|
||||
The items in the list (names or numeric IDs) must be separated by commas.
|
||||
|
||||
@end table
|
||||
|
||||
Here are a few tips to help avoid common problems in using chroot.
|
||||
To start with a simple example, make @var{command} refer to a statically
|
||||
@@ -14409,6 +14560,85 @@ the exit status of @var{command} otherwise
|
||||
@end display
|
||||
|
||||
|
||||
@node stdbuf invocation
|
||||
@section @command{stdbuf}: Run a command with modified I/O stream buffering
|
||||
|
||||
@pindex stdbuf
|
||||
@cindex standard streams, buffering
|
||||
@cindex line buffered
|
||||
|
||||
@command{stdbuf} allows one to modify the buffering operations of the
|
||||
three standard I/O streams associated with a program. Synopsis:
|
||||
|
||||
@example
|
||||
stdbuf @var{option}@dots{} @var{command}
|
||||
@end example
|
||||
|
||||
Any additional @var{arg}s are passed as additional arguments to the
|
||||
@var{command}.
|
||||
|
||||
The program accepts the following options. Also see @ref{Common options}.
|
||||
|
||||
@table @samp
|
||||
|
||||
@item -i @var{mode}
|
||||
@itemx --input=@var{mode}
|
||||
@opindex -i
|
||||
@opindex --input
|
||||
Adjust the standard input stream buffering.
|
||||
|
||||
@item -o @var{mode}
|
||||
@itemx --output=@var{mode}
|
||||
@opindex -o
|
||||
@opindex --output
|
||||
Adjust the standard output stream buffering.
|
||||
|
||||
@item -e @var{mode}
|
||||
@itemx --error=@var{mode}
|
||||
@opindex -e
|
||||
@opindex --error
|
||||
Adjust the standard error stream buffering.
|
||||
|
||||
@end table
|
||||
|
||||
The @var{mode} can be specified as follows:
|
||||
|
||||
@table @samp
|
||||
|
||||
@item L
|
||||
Set the stream to line buffered mode.
|
||||
In this mode data is coalesced until a newline is output or
|
||||
input is read from any stream attached to a terminal device.
|
||||
This option is invalid with standard input.
|
||||
|
||||
@item 0
|
||||
Disable buffering of the selected stream.
|
||||
In this mode data is output immediately and only the
|
||||
amount of data requested is read from input.
|
||||
|
||||
@item @var{size}
|
||||
Specify the size of the buffer to use in fully buffered mode.
|
||||
@multiplierSuffixesNoBlocks{size}
|
||||
|
||||
@end table
|
||||
|
||||
NOTE: If @var{command} adjusts the buffering of its standard streams
|
||||
(@command{tee} does for e.g.) then that will override corresponding settings
|
||||
changed by @command{stdbuf}. Also some filters (like @command{dd} and
|
||||
@command{cat} etc.) don't use streams for I/O, and are thus unaffected
|
||||
by @command{stdbuf} settings.
|
||||
|
||||
@cindex exit status of @command{stdbuf}
|
||||
Exit status:
|
||||
|
||||
@display
|
||||
125 if @command{stdbuf} itself fails
|
||||
126 if @var{command} is found but cannot be invoked
|
||||
127 if @var{command} cannot be found
|
||||
the exit status of @var{command} otherwise
|
||||
@end display
|
||||
|
||||
|
||||
@node su invocation
|
||||
@section @command{su}: Run a command with substitute user and group ID
|
||||
|
||||
@@ -15421,7 +15651,7 @@ that your spelling is incorrect. So, we need a dictionary.
|
||||
The conventional location for a dictionary is @file{/usr/dict/words}.
|
||||
On my GNU/Linux system,@footnote{Redhat Linux 6.1, for the November 2000
|
||||
revision of this article.}
|
||||
this is a is a sorted, 45,402 word dictionary.
|
||||
this is a sorted, 45,402 word dictionary.
|
||||
|
||||
Now, how to compare our file with the dictionary? As before, we generate
|
||||
a sorted list of words, one per line:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@c File mode bits
|
||||
|
||||
@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006, 2008
|
||||
@c Free Software Foundation, Inc.
|
||||
@c Copyright (C) 1994, 1996, 1999-2001, 2003-2006,
|
||||
@c 2008-2009 Free Software Foundation, Inc.
|
||||
|
||||
@c Permission is granted to copy, distribute and/or modify this document
|
||||
@c under the terms of the GNU Free Documentation License, Version 1.3 or
|
||||
|
||||
@@ -1,117 +0,0 @@
|
||||
/* Iterate over arguments from argv or --files0-from=FILE
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
#include "argv-iter.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
struct argv_iterator
|
||||
{
|
||||
/* Test FP to determine whether in read-mode or argv-mode. */
|
||||
/* file-mode: fp records position */
|
||||
FILE *fp;
|
||||
size_t item_idx;
|
||||
char *tok;
|
||||
size_t buf_len;
|
||||
|
||||
/* argv-mode: record just argv and current pointer */
|
||||
char **arg_list;
|
||||
char **p;
|
||||
};
|
||||
|
||||
struct argv_iterator *
|
||||
argv_iter_init_argv (char **argv)
|
||||
{
|
||||
struct argv_iterator *ai = malloc (sizeof *ai);
|
||||
if (!ai)
|
||||
return NULL;
|
||||
ai->fp = NULL;
|
||||
ai->arg_list = argv;
|
||||
ai->p = argv;
|
||||
return ai;
|
||||
}
|
||||
|
||||
/* Initialize to read from the stream, FP.
|
||||
The input is expected to contain a list of NUL-delimited tokens. */
|
||||
struct argv_iterator *
|
||||
argv_iter_init_stream (FILE *fp)
|
||||
{
|
||||
struct argv_iterator *ai = malloc (sizeof *ai);
|
||||
if (!ai)
|
||||
return NULL;
|
||||
ai->fp = fp;
|
||||
ai->tok = NULL;
|
||||
ai->buf_len = 0;
|
||||
|
||||
ai->item_idx = 0;
|
||||
ai->arg_list = NULL;
|
||||
return ai;
|
||||
}
|
||||
|
||||
char *
|
||||
argv_iter (struct argv_iterator *ai, enum argv_iter_err *err)
|
||||
{
|
||||
if (ai->fp)
|
||||
{
|
||||
ssize_t len = getdelim (&ai->tok, &ai->buf_len, '\0', ai->fp);
|
||||
if (len < 0)
|
||||
{
|
||||
*err = feof (ai->fp) ? AI_ERR_EOF : AI_ERR_READ;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
*err = AI_ERR_OK;
|
||||
ai->item_idx++;
|
||||
return ai->tok;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (*(ai->p) == NULL)
|
||||
{
|
||||
*err = AI_ERR_EOF;
|
||||
return NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
*err = AI_ERR_OK;
|
||||
return *(ai->p++);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
size_t
|
||||
argv_iter_n_args (struct argv_iterator const *ai)
|
||||
{
|
||||
return ai->fp ? ai->item_idx : ai->p - ai->arg_list;
|
||||
}
|
||||
|
||||
void
|
||||
argv_iter_free (struct argv_iterator *ai)
|
||||
{
|
||||
if (ai->fp)
|
||||
free (ai->tok);
|
||||
free (ai);
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*/
|
||||
@@ -1,47 +0,0 @@
|
||||
/* Iterate over arguments from argv or --files0-from=FILE
|
||||
Copyright (C) 2008-2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
struct argv_iterator;
|
||||
enum argv_iter_err;
|
||||
|
||||
#undef _ATTRIBUTE_NONNULL_
|
||||
#if __GNUC__ == 3 && __GNUC_MINOR__ >= 3 || 3 < __GNUC__
|
||||
# define _ATTRIBUTE_NONNULL_(m) __attribute__ ((__nonnull__ (m)))
|
||||
#else
|
||||
# define _ATTRIBUTE_NONNULL_(m)
|
||||
#endif
|
||||
|
||||
enum argv_iter_err
|
||||
{
|
||||
AI_ERR_OK = 1,
|
||||
AI_ERR_EOF,
|
||||
AI_ERR_MEM,
|
||||
AI_ERR_READ
|
||||
};
|
||||
|
||||
struct argv_iterator *argv_iter_init_argv (char **argv)
|
||||
_ATTRIBUTE_NONNULL_ (1);
|
||||
struct argv_iterator *argv_iter_init_stream (FILE *fp)
|
||||
_ATTRIBUTE_NONNULL_ (1);
|
||||
char *argv_iter (struct argv_iterator *, enum argv_iter_err *)
|
||||
_ATTRIBUTE_NONNULL_ (1) _ATTRIBUTE_NONNULL_ (2);
|
||||
size_t argv_iter_n_args (struct argv_iterator const *)
|
||||
_ATTRIBUTE_NONNULL_ (1);
|
||||
void argv_iter_free (struct argv_iterator *)
|
||||
_ATTRIBUTE_NONNULL_ (1);
|
||||
236
gl/lib/mbsalign.c
Normal file
236
gl/lib/mbsalign.c
Normal file
@@ -0,0 +1,236 @@
|
||||
/* Align/Truncate a string in a given screen width
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Pádraig Brady. */
|
||||
|
||||
#include <config.h>
|
||||
#include "mbsalign.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <limits.h>
|
||||
#include <wchar.h>
|
||||
#include <wctype.h>
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/* Replace non printable chars.
|
||||
Return 1 if replacement made, 0 otherwise. */
|
||||
|
||||
static bool
|
||||
wc_ensure_printable (wchar_t *wchars)
|
||||
{
|
||||
bool replaced = false;
|
||||
wchar_t *wc = wchars;
|
||||
while (*wc)
|
||||
{
|
||||
if (!iswprint ((wint_t) *wc))
|
||||
{
|
||||
*wc = 0xFFFD; /* L'\uFFFD' (replacement char) */
|
||||
replaced = true;
|
||||
}
|
||||
wc++;
|
||||
}
|
||||
return replaced;
|
||||
}
|
||||
|
||||
/* Truncate wchar string to width cells.
|
||||
* Returns number of cells used. */
|
||||
|
||||
static size_t
|
||||
wc_truncate (wchar_t *wc, size_t width)
|
||||
{
|
||||
size_t cells = 0;
|
||||
int next_cells = 0;
|
||||
|
||||
while (*wc)
|
||||
{
|
||||
next_cells = wcwidth (*wc);
|
||||
if (next_cells == -1) /* non printable */
|
||||
{
|
||||
*wc = 0xFFFD; /* L'\uFFFD' (replacement char) */
|
||||
next_cells = 1;
|
||||
}
|
||||
if (cells + next_cells > width)
|
||||
break;
|
||||
cells += next_cells;
|
||||
wc++;
|
||||
}
|
||||
*wc = L'\0';
|
||||
return cells;
|
||||
}
|
||||
|
||||
/* FIXME: move this function to gnulib as it's missing on:
|
||||
OpenBSD 3.8, IRIX 5.3, Solaris 2.5.1, mingw, BeOS */
|
||||
|
||||
static int
|
||||
rpl_wcswidth (const wchar_t *s, size_t n)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
while (n-- > 0 && *s != L'\0')
|
||||
{
|
||||
int nwidth = wcwidth (*s++);
|
||||
if (nwidth == -1) /* non printable */
|
||||
return -1;
|
||||
if (ret > (INT_MAX - nwidth)) /* overflow */
|
||||
return -1;
|
||||
ret += nwidth;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* Write N_SPACES space characters to DEST while ensuring
|
||||
nothing is written beyond DEST_END. A terminating NUL
|
||||
is always added to DEST.
|
||||
A pointer to the terminating NUL is returned. */
|
||||
|
||||
static char*
|
||||
mbs_align_pad (char *dest, const char* dest_end, size_t n_spaces)
|
||||
{
|
||||
/* FIXME: Should we pad with "figure space" (\u2007)
|
||||
if non ascii data present? */
|
||||
while (n_spaces-- && (dest < dest_end))
|
||||
*dest++ = ' ';
|
||||
*dest = '\0';
|
||||
return dest;
|
||||
}
|
||||
|
||||
/* Align a string, SRC, in a field of *WIDTH columns, handling multi-byte
|
||||
characters; write the result into the DEST_SIZE-byte buffer, DEST.
|
||||
ALIGNMENT specifies whether to left- or right-justify or to center.
|
||||
If SRC requires more than *WIDTH columns, truncate it to fit.
|
||||
When centering, the number of trailing spaces may be one less than the
|
||||
number of leading spaces. The FLAGS parameter is unused at present.
|
||||
Return the length in bytes required for the final result, not counting
|
||||
the trailing NUL. A return value of DEST_SIZE or larger means there
|
||||
wasn't enough space. DEST will be NUL terminated in any case.
|
||||
Return (size_t) -1 upon error (invalid multi-byte sequence in SRC,
|
||||
or malloc failure).
|
||||
Update *WIDTH to indicate how many columns were used before padding. */
|
||||
|
||||
size_t
|
||||
mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
size_t *width, mbs_align_t align, int flags)
|
||||
{
|
||||
size_t ret = -1;
|
||||
size_t src_size = strlen (src) + 1;
|
||||
char *newstr = NULL;
|
||||
wchar_t *str_wc = NULL;
|
||||
const char *str_to_print = src;
|
||||
size_t n_cols = src_size - 1;
|
||||
size_t n_used_bytes = n_cols; /* Not including NUL */
|
||||
size_t n_spaces = 0;
|
||||
bool conversion = false;
|
||||
bool wc_enabled = false;
|
||||
|
||||
/* In multi-byte locales convert to wide characters
|
||||
to allow easy truncation. Also determine number
|
||||
of screen columns used. */
|
||||
if (MB_CUR_MAX > 1)
|
||||
{
|
||||
size_t src_chars = mbstowcs (NULL, src, 0);
|
||||
if (src_chars == (size_t) -1)
|
||||
goto mbsalign_cleanup;
|
||||
src_chars += 1; /* make space for NUL */
|
||||
str_wc = malloc (src_chars * sizeof (wchar_t));
|
||||
if (str_wc == NULL)
|
||||
goto mbsalign_cleanup;
|
||||
if (mbstowcs (str_wc, src, src_chars) > 0)
|
||||
{
|
||||
str_wc[src_chars - 1] = L'\0';
|
||||
wc_enabled = true;
|
||||
conversion = wc_ensure_printable (str_wc);
|
||||
n_cols = rpl_wcswidth (str_wc, src_chars);
|
||||
}
|
||||
}
|
||||
|
||||
/* If we transformed or need to truncate the source string
|
||||
then create a modified copy of it. */
|
||||
if (conversion || (n_cols > *width))
|
||||
{
|
||||
newstr = malloc (src_size);
|
||||
if (newstr == NULL)
|
||||
goto mbsalign_cleanup;
|
||||
str_to_print = newstr;
|
||||
if (wc_enabled)
|
||||
{
|
||||
n_cols = wc_truncate (str_wc, *width);
|
||||
n_used_bytes = wcstombs (newstr, str_wc, src_size);
|
||||
}
|
||||
else
|
||||
{
|
||||
n_cols = *width;
|
||||
n_used_bytes = n_cols;
|
||||
memcpy (newstr, src, n_cols);
|
||||
newstr[n_cols] = '\0';
|
||||
}
|
||||
}
|
||||
|
||||
if (*width > n_cols)
|
||||
n_spaces = *width - n_cols;
|
||||
|
||||
/* indicate to caller how many cells needed (not including padding). */
|
||||
*width = n_cols;
|
||||
|
||||
/* indicate to caller how many bytes needed (not including NUL). */
|
||||
ret = n_used_bytes + (n_spaces * 1);
|
||||
|
||||
/* Write as much NUL terminated output to DEST as possible. */
|
||||
if (dest_size != 0)
|
||||
{
|
||||
char *dest_end = dest + dest_size - 1;
|
||||
size_t start_spaces = n_spaces / 2 + n_spaces % 2;
|
||||
size_t end_spaces = n_spaces / 2;
|
||||
|
||||
switch (align)
|
||||
{
|
||||
case MBS_ALIGN_CENTER:
|
||||
start_spaces = n_spaces / 2 + n_spaces % 2;
|
||||
end_spaces = n_spaces / 2;
|
||||
break;
|
||||
case MBS_ALIGN_LEFT:
|
||||
start_spaces = 0;
|
||||
end_spaces = n_spaces;
|
||||
break;
|
||||
case MBS_ALIGN_RIGHT:
|
||||
start_spaces = n_spaces;
|
||||
end_spaces = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
dest = mbs_align_pad (dest, dest_end, start_spaces);
|
||||
dest = mempcpy(dest, str_to_print, MIN (n_used_bytes, dest_end - dest));
|
||||
dest = mbs_align_pad (dest, dest_end, end_spaces);
|
||||
}
|
||||
|
||||
mbsalign_cleanup:
|
||||
|
||||
free (str_wc);
|
||||
free (newstr);
|
||||
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
* Local variables:
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*/
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Prototypes for openat-style fd-relative SELinux functions
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
/* Align/Truncate a string in a given screen width
|
||||
Copyright (C) 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -14,10 +14,10 @@
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
#include <selinux/selinux.h>
|
||||
#include <selinux/context.h>
|
||||
#include <stddef.h>
|
||||
|
||||
int getfileconat (int fd, char const *file, security_context_t *con);
|
||||
int lgetfileconat (int fd, char const *file, security_context_t *con);
|
||||
int setfileconat (int fd, char const *file, security_context_t con);
|
||||
int lsetfileconat (int fd, char const *file, security_context_t con);
|
||||
typedef enum { MBS_ALIGN_LEFT, MBS_ALIGN_RIGHT, MBS_ALIGN_CENTER } mbs_align_t;
|
||||
|
||||
size_t
|
||||
mbsalign (const char *src, char *dest, size_t dest_size,
|
||||
size_t *width, mbs_align_t align, int flags);
|
||||
@@ -81,10 +81,16 @@ mgetgroups (char const *username, gid_t gid, GETGROUPS_T **groups)
|
||||
while (1)
|
||||
{
|
||||
GETGROUPS_T *h;
|
||||
int last_n_groups = max_n_groups;
|
||||
|
||||
/* getgrouplist updates max_n_groups to num required. */
|
||||
ng = getgrouplist (username, gid, g, &max_n_groups);
|
||||
|
||||
/* Some systems (like Darwin) have a bug where they
|
||||
never increase max_n_groups. */
|
||||
if (ng < 0 && last_n_groups == max_n_groups)
|
||||
max_n_groups *= 2;
|
||||
|
||||
if ((h = realloc_groupbuf (g, max_n_groups)) == NULL)
|
||||
{
|
||||
int saved_errno = errno;
|
||||
@@ -97,7 +103,9 @@ mgetgroups (char const *username, gid_t gid, GETGROUPS_T **groups)
|
||||
if (0 <= ng)
|
||||
{
|
||||
*groups = g;
|
||||
return ng;
|
||||
/* On success some systems just return 0 from getgrouplist,
|
||||
so return max_n_groups rather than ng. */
|
||||
return max_n_groups;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* Get a list of all group IDs associated with a specified user ID.
|
||||
Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Bob Jenkins's cryptographic random number generator, ISAAC.
|
||||
|
||||
Copyright (C) 1999-2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2006, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 1999 Colin Plumb.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Bob Jenkins's cryptographic random number generator, ISAAC.
|
||||
|
||||
Copyright (C) 1999-2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 1999-2005, 2009 Free Software Foundation, Inc.
|
||||
Copyright (C) 1997, 1998, 1999 Colin Plumb.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate random integers.
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@@ -50,10 +50,6 @@ main (int argc, char **argv)
|
||||
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef MAX
|
||||
# define MAX(a,b) ((a) < (b) ? (b) : (a))
|
||||
#endif
|
||||
|
||||
/* A source of random data for generating random integers. */
|
||||
struct randint_source
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate random integers.
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate random permutations.
|
||||
|
||||
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -39,6 +39,16 @@
|
||||
#include "unlocked-io.h"
|
||||
#include "xalloc.h"
|
||||
|
||||
#ifndef __attribute__
|
||||
# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
|
||||
# define __attribute__(x) /* empty */
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef ATTRIBUTE_NORETURN
|
||||
# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
# define MIN(a, b) ((a) < (b) ? (a) : (b))
|
||||
#endif
|
||||
@@ -50,10 +60,6 @@
|
||||
# define ALIGNED_POINTER(ptr, type) ((size_t) (ptr) % alignof (type) == 0)
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_RANDOM_FILE
|
||||
# define DEFAULT_RANDOM_FILE "/dev/urandom"
|
||||
#endif
|
||||
|
||||
/* The maximum buffer size used for reads of random data. Using the
|
||||
value 2 * ISAAC_BYTES makes this the largest power of two that
|
||||
would not otherwise cause struct randread_source to grow. */
|
||||
@@ -62,10 +68,8 @@
|
||||
/* A source of random data for generating random buffers. */
|
||||
struct randread_source
|
||||
{
|
||||
/* Stream to read random bytes from. If null, the behavior is
|
||||
undefined; the current implementation uses ISAAC in this case,
|
||||
but this is for old-fashioned implementations that lack
|
||||
/dev/urandom and callers should not rely on this. */
|
||||
/* Stream to read random bytes from. If null, the current
|
||||
implementation uses an internal PRNG (ISAAC). */
|
||||
FILE *source;
|
||||
|
||||
/* Function to call, and its argument, if there is an input error or
|
||||
@@ -106,7 +110,7 @@ struct randread_source
|
||||
|
||||
/* The default error handler. */
|
||||
|
||||
static void
|
||||
static void ATTRIBUTE_NORETURN
|
||||
randread_error (void const *file_name)
|
||||
{
|
||||
if (file_name)
|
||||
@@ -147,18 +151,14 @@ randread_new (char const *name, size_t bytes_bound)
|
||||
return simple_new (NULL, NULL);
|
||||
else
|
||||
{
|
||||
char const *file_name = (name ? name : DEFAULT_RANDOM_FILE);
|
||||
FILE *source = fopen_safer (file_name, "rb");
|
||||
FILE *source = NULL;
|
||||
struct randread_source *s;
|
||||
|
||||
if (! source)
|
||||
{
|
||||
if (name)
|
||||
return NULL;
|
||||
file_name = NULL;
|
||||
}
|
||||
if (name)
|
||||
if (! (source = fopen_safer (name, "rb")))
|
||||
return NULL;
|
||||
|
||||
s = simple_new (source, file_name);
|
||||
s = simple_new (source, name);
|
||||
|
||||
if (source)
|
||||
setvbuf (source, s->buf.c, _IOFBF, MIN (sizeof s->buf.c, bytes_bound));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Generate buffers of random data.
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* root-dev-ino.c -- get the device and inode numbers for `/'.
|
||||
Copyright (C) 2003, 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Root device and inode number checking.
|
||||
|
||||
Copyright (C) 2003, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,88 +0,0 @@
|
||||
/* openat-style fd-relative functions for SE Linux
|
||||
Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* written by Jim Meyering */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "selinux-at.h"
|
||||
#include "openat.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#include "dirname.h" /* solely for definition of IS_ABSOLUTE_FILE_NAME */
|
||||
#include "save-cwd.h"
|
||||
|
||||
#include "openat-priv.h"
|
||||
|
||||
#define AT_FUNC_NAME getfileconat
|
||||
#define AT_FUNC_F1 getfilecon
|
||||
#define AT_FUNC_F2 getfilecon
|
||||
#define AT_FUNC_USE_F1_COND 1
|
||||
#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con
|
||||
#define AT_FUNC_POST_FILE_ARGS , con
|
||||
#include "at-func.c"
|
||||
#undef AT_FUNC_NAME
|
||||
#undef AT_FUNC_F1
|
||||
#undef AT_FUNC_F2
|
||||
#undef AT_FUNC_USE_F1_COND
|
||||
#undef AT_FUNC_POST_FILE_PARAM_DECLS
|
||||
#undef AT_FUNC_POST_FILE_ARGS
|
||||
|
||||
#define AT_FUNC_NAME lgetfileconat
|
||||
#define AT_FUNC_F1 lgetfilecon
|
||||
#define AT_FUNC_F2 lgetfilecon
|
||||
#define AT_FUNC_USE_F1_COND 1
|
||||
#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t *con
|
||||
#define AT_FUNC_POST_FILE_ARGS , con
|
||||
#include "at-func.c"
|
||||
#undef AT_FUNC_NAME
|
||||
#undef AT_FUNC_F1
|
||||
#undef AT_FUNC_F2
|
||||
#undef AT_FUNC_USE_F1_COND
|
||||
#undef AT_FUNC_POST_FILE_PARAM_DECLS
|
||||
#undef AT_FUNC_POST_FILE_ARGS
|
||||
|
||||
#define AT_FUNC_NAME setfileconat
|
||||
#define AT_FUNC_F1 setfilecon
|
||||
#define AT_FUNC_F2 setfilecon
|
||||
#define AT_FUNC_USE_F1_COND 1
|
||||
#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con
|
||||
#define AT_FUNC_POST_FILE_ARGS , con
|
||||
#include "at-func.c"
|
||||
#undef AT_FUNC_NAME
|
||||
#undef AT_FUNC_F1
|
||||
#undef AT_FUNC_F2
|
||||
#undef AT_FUNC_USE_F1_COND
|
||||
#undef AT_FUNC_POST_FILE_PARAM_DECLS
|
||||
#undef AT_FUNC_POST_FILE_ARGS
|
||||
|
||||
#define AT_FUNC_NAME lsetfileconat
|
||||
#define AT_FUNC_F1 lsetfilecon
|
||||
#define AT_FUNC_F2 lsetfilecon
|
||||
#define AT_FUNC_USE_F1_COND 1
|
||||
#define AT_FUNC_POST_FILE_PARAM_DECLS , security_context_t con
|
||||
#define AT_FUNC_POST_FILE_ARGS , con
|
||||
#include "at-func.c"
|
||||
#undef AT_FUNC_NAME
|
||||
#undef AT_FUNC_F1
|
||||
#undef AT_FUNC_F2
|
||||
#undef AT_FUNC_USE_F1_COND
|
||||
#undef AT_FUNC_POST_FILE_PARAM_DECLS
|
||||
#undef AT_FUNC_POST_FILE_ARGS
|
||||
@@ -1,7 +1,7 @@
|
||||
/* tempname.c - generate the name of a temporary file.
|
||||
|
||||
Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
2000, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation,
|
||||
2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software Foundation,
|
||||
Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Create a temporary file or directory.
|
||||
|
||||
Copyright (C) 2006, 2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/* a wrapper for frepoen
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2008-2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#serial 3
|
||||
dnl Copyright (C) 2007-2008 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2007-2009 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#serial 3
|
||||
dnl Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
Description:
|
||||
iterate through argv or a --files0-from=-specified file
|
||||
|
||||
Files:
|
||||
lib/argv-iter.c
|
||||
lib/argv-iter.h
|
||||
|
||||
Depends-on:
|
||||
getdelim
|
||||
stdbool
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
lib_SOURCES += argv-iter.c argv-iter.h
|
||||
|
||||
Include:
|
||||
"argv-iter.h"
|
||||
|
||||
License
|
||||
GPL
|
||||
|
||||
Maintainer:
|
||||
Jim Meyering
|
||||
@@ -1,10 +0,0 @@
|
||||
Files:
|
||||
tests/test-argv-iter.c
|
||||
|
||||
Depends-on:
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
TESTS += test-argv-iter
|
||||
check_PROGRAMS += test-argv-iter
|
||||
26
gl/modules/mbsalign
Normal file
26
gl/modules/mbsalign
Normal file
@@ -0,0 +1,26 @@
|
||||
Description:
|
||||
Align/Truncate a string in a given screen width.
|
||||
|
||||
Files:
|
||||
lib/mbsalign.c
|
||||
lib/mbsalign.h
|
||||
|
||||
Depends-on:
|
||||
wchar
|
||||
wctype
|
||||
wcwidth
|
||||
mempcpy
|
||||
|
||||
configure.ac:
|
||||
|
||||
Makefile.am:
|
||||
lib_SOURCES += mbsalign.c mbsalign.h
|
||||
|
||||
Include:
|
||||
"mbsalign.h"
|
||||
|
||||
License:
|
||||
LGPL
|
||||
|
||||
Maintainer:
|
||||
Pádraig Brady
|
||||
@@ -1,33 +0,0 @@
|
||||
Description:
|
||||
openat-style fd-relative functions for SE Linux
|
||||
|
||||
Files:
|
||||
lib/selinux-at.c
|
||||
lib/selinux-at.h
|
||||
|
||||
Depends-on:
|
||||
selinux-h
|
||||
|
||||
configure.ac:
|
||||
# FIXME: put this in an .m4 file?
|
||||
# For runcon.
|
||||
AC_CHECK_HEADERS([selinux/flask.h])
|
||||
AC_LIBOBJ([selinux-at])
|
||||
gl_save_LIBS=$LIBS
|
||||
LIB_SELINUX=
|
||||
AC_SEARCH_LIBS([setfilecon], [selinux],
|
||||
[test "$ac_cv_search_setfilecon" = "none required" ||
|
||||
LIB_SELINUX=$ac_cv_search_setfilecon])
|
||||
AC_SUBST(LIB_SELINUX)
|
||||
LIBS=$gl_save_LIBS
|
||||
|
||||
Makefile.am:
|
||||
|
||||
Include:
|
||||
selinux-at.h
|
||||
|
||||
License:
|
||||
LGPL
|
||||
|
||||
Maintainer:
|
||||
Jim Meyering
|
||||
@@ -1,120 +0,0 @@
|
||||
/* Test argv iterator
|
||||
Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#define ARRAY_CARDINALITY(Array) (sizeof (Array) / sizeof *(Array))
|
||||
#define STREQ(s1, s2) ((strcmp (s1, s2) == 0))
|
||||
#define ASSERT(expr) \
|
||||
do \
|
||||
{ \
|
||||
if (!(expr)) \
|
||||
{ \
|
||||
fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
|
||||
fflush (stderr); \
|
||||
abort (); \
|
||||
} \
|
||||
} \
|
||||
while (0)
|
||||
|
||||
#include "argv-iter.h"
|
||||
|
||||
static FILE *
|
||||
write_nul_delimited_argv (char **argv)
|
||||
{
|
||||
FILE *fp = tmpfile ();
|
||||
ASSERT (fp);
|
||||
while (*argv)
|
||||
{
|
||||
size_t len = strlen (*argv) + 1;
|
||||
ASSERT (fwrite (*argv, len, 1, fp) == 1);
|
||||
argv++;
|
||||
}
|
||||
ASSERT (fflush (fp) == 0);
|
||||
rewind (fp);
|
||||
return fp;
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
/* set_program_name (argv[0]); placate overzealous "syntax-check" test. */
|
||||
static char *av[][4] = {
|
||||
{NULL},
|
||||
{"1", NULL},
|
||||
{"1", "2", NULL},
|
||||
{"1", "2", "3", NULL}
|
||||
};
|
||||
|
||||
int use_stream;
|
||||
for (use_stream = 0; use_stream < 2; use_stream++)
|
||||
{
|
||||
size_t i;
|
||||
for (i = 0; i < ARRAY_CARDINALITY (av); i++)
|
||||
{
|
||||
FILE *fp;
|
||||
struct argv_iterator *ai;
|
||||
size_t n_found = 0;
|
||||
if (use_stream)
|
||||
{
|
||||
/* Generate an identical list to be read via FP. */
|
||||
ASSERT ((fp = write_nul_delimited_argv (av[i])) != NULL);
|
||||
ai = argv_iter_init_stream (fp);
|
||||
}
|
||||
else
|
||||
{
|
||||
fp = NULL;
|
||||
ai = argv_iter_init_argv (av[i]);
|
||||
}
|
||||
ASSERT (ai);
|
||||
|
||||
while (1)
|
||||
{
|
||||
enum argv_iter_err ai_err;
|
||||
char *s = argv_iter (ai, &ai_err);
|
||||
ASSERT ((i == n_found) == (ai_err == AI_ERR_EOF));
|
||||
ASSERT ((s == NULL) ^ (ai_err == AI_ERR_OK));
|
||||
ASSERT (ai_err == AI_ERR_OK || ai_err == AI_ERR_EOF);
|
||||
if (ai_err == AI_ERR_OK)
|
||||
++n_found;
|
||||
if (ai_err == AI_ERR_EOF)
|
||||
break;
|
||||
/* In stream mode, the strings are equal, but
|
||||
in argv mode the actual pointers are equal. */
|
||||
ASSERT (use_stream
|
||||
? STREQ (s, av[i][n_found - 1])
|
||||
: s == av[i][n_found - 1]);
|
||||
}
|
||||
ASSERT (argv_iter_n_args (ai) == i);
|
||||
argv_iter_free (ai);
|
||||
if (fp)
|
||||
ASSERT (fclose (fp) == 0);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Local variables:
|
||||
* indent-tabs-mode: nil
|
||||
* End:
|
||||
*/
|
||||
2
gnulib
2
gnulib
Submodule gnulib updated: 5a1286a9f8...3ef64012bf
@@ -1,6 +1 @@
|
||||
include gnulib.mk
|
||||
|
||||
TEST_LOGS = $(TESTS:=.log)
|
||||
|
||||
# Parallel replacement of Automake's check-TESTS target.
|
||||
include $(top_srcdir)/build-aux/check.mk
|
||||
|
||||
@@ -8746,8 +8746,7 @@
|
||||
|
||||
-----
|
||||
|
||||
Copyright (C) 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free
|
||||
Software Foundation, Inc.
|
||||
Copyright (C) 2000-2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
40
lib/TODO
40
lib/TODO
@@ -1,40 +0,0 @@
|
||||
Things to do to hash.c:
|
||||
|
||||
Always use curly braces around statements in if/else/while/do/etc.
|
||||
that span more than a line -- even around multiline simple statements
|
||||
or single-line simple statements preceded by a comment line.
|
||||
|
||||
Never have lines longer than 80 chars.
|
||||
|
||||
Remove ^L characters. We don't want/need such crutches.
|
||||
Get a good (smart) pagination filter. I have one (a perl script)
|
||||
that usually does a decent job for me -- I called it something
|
||||
like stdc-print and think I sent you an early verison.
|
||||
|
||||
I don't like the name `cursor'. I much prefer short names
|
||||
like `p' for index variables. I doubt I'll change all of them,
|
||||
but thought you should know why some will probably end up changing.
|
||||
|
||||
#define USE_OBSTACK somewhere
|
||||
|
||||
Fix this comment. Depending on system and application...
|
||||
Mention fragmentation.
|
||||
+#if USE_OBSTACK
|
||||
+ /* Whenever obstacks are used, it is possible to allocate all overflowed
|
||||
+ entries into a single stack, so they all can be freed in a single
|
||||
+ operation. It is not clear if the speedup is worth the trouble. */
|
||||
+ struct obstack entry_stack;
|
||||
+#endif
|
||||
|
||||
|
||||
assert (bucket_limit - bucket == n_buckets) ?
|
||||
|
||||
remove.c: s/done/successful or ok
|
||||
|
||||
|
||||
-----
|
||||
Copyright (C) 1998 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
and this notice are preserved.
|
||||
@@ -1,6 +1,6 @@
|
||||
/* buffer-lcm.c - compute a good buffer size for dealing with two files
|
||||
|
||||
Copyright (C) 2002, 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2002, 2005, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
This function is probably useful only for choosing whether to issue
|
||||
a prompt in an implementation of POSIX-specified rm.
|
||||
|
||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Invoke open, but return either a desired file descriptor or -1.
|
||||
|
||||
Copyright (C) 2005, 2006, 2008 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2008-2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Invoke open, but return either a desired file descriptor or -1.
|
||||
|
||||
Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* fdopendir implementation derived from glibc.
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Locale-specific memory transformation
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,74 +0,0 @@
|
||||
/* stdopen.c - ensure that the three standard file descriptors are in use
|
||||
|
||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
/* Written by Paul Eggert and Jim Meyering. */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
#include "stdopen.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
|
||||
/* Try to ensure that all of the standard file numbers (0, 1, 2)
|
||||
are in use. Without this, each application would have to guard
|
||||
every call to open, dup, fopen, etc. with tests to ensure they
|
||||
don't use one of the special file numbers when opening a file.
|
||||
Return false if at least one of the file descriptors is initially
|
||||
closed and an attempt to reopen it fails. Otherwise, return true. */
|
||||
bool
|
||||
stdopen (void)
|
||||
{
|
||||
int fd;
|
||||
bool ok = true;
|
||||
|
||||
for (fd = 0; fd <= 2; fd++)
|
||||
{
|
||||
if (fcntl (fd, F_GETFD) < 0)
|
||||
{
|
||||
if (errno != EBADF)
|
||||
ok = false;
|
||||
else
|
||||
{
|
||||
static const int contrary_mode[]
|
||||
= { O_WRONLY, O_RDONLY, O_RDONLY };
|
||||
int mode = contrary_mode[fd];
|
||||
int new_fd;
|
||||
/* Open /dev/null with the contrary mode so that the typical
|
||||
read (stdin) or write (stdout, stderr) operation will fail.
|
||||
With descriptor 0, we can do even better on systems that
|
||||
have /dev/full, by opening that write-only instead of
|
||||
/dev/null. The only drawback is that a write-provoked
|
||||
failure comes with a misleading errno value, ENOSPC. */
|
||||
if (mode == O_RDONLY
|
||||
|| (new_fd = open ("/dev/full", mode) != fd))
|
||||
new_fd = open ("/dev/null", mode);
|
||||
if (new_fd != fd)
|
||||
{
|
||||
if (0 <= new_fd)
|
||||
close (new_fd);
|
||||
ok = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return ok;
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
#ifndef STDOPEN_H
|
||||
# define STDOPEN_H 1
|
||||
|
||||
# include <stdbool.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
bool stdopen (void);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Compare integer strings.
|
||||
|
||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/* Compare numeric strings. This is an internal include file.
|
||||
|
||||
Copyright (C) 1988, 1991, 1992, 1993, 1995, 1996, 1998, 1999, 2000,
|
||||
2003, 2004, 2005, 2006 Free Software Foundation, Inc.
|
||||
2003, 2004, 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Compare numeric strings.
|
||||
|
||||
Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Exercise chdir-long's sample main program.
|
||||
|
||||
# Copyright (C) 2005, 2006 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* xfts.c -- a wrapper for fts_open
|
||||
|
||||
Copyright (C) 2003, 2005-2007 Free Software Foundation, Inc.
|
||||
Copyright (C) 2003, 2005-2007, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* Locale-specific memory transformation
|
||||
|
||||
Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -5005,7 +5005,7 @@
|
||||
-----
|
||||
|
||||
Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
|
||||
2005, 2006 Free Software Foundation, Inc.
|
||||
2005, 2006, 2009 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file, with or without
|
||||
modification, are permitted provided the copyright notice
|
||||
@@ -1,7 +1,7 @@
|
||||
# boottime.m4 serial 4
|
||||
# Determine whether this system has infrastructure for obtaining the boot time.
|
||||
|
||||
# Copyright (C) 1996, 2000, 2002-2004, 2006, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 1996, 2000, 2002-2004, 2006, 2008-2009 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#serial 24
|
||||
# Check declarations for this package.
|
||||
|
||||
dnl Copyright (C) 1997-2001, 2003-2006, 2008
|
||||
dnl Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 1997-2001, 2003-2006, 2008-2009 Free Software
|
||||
dnl Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# serial 1
|
||||
dnl Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Invoke open, but return either a desired file descriptor or -1.
|
||||
|
||||
dnl Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# Tests for GNU GMP (or any compatible replacement).
|
||||
|
||||
dnl Copyright (C) 2008 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2008-2009 Free Software Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#serial 2
|
||||
dnl Copyright (C) 2007 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2007, 2009 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -47,11 +47,30 @@ AC_DEFUN([coreutils_MACROS],
|
||||
AC_CHECK_FUNCS_ONCE([directio])
|
||||
|
||||
# Used by install.c.
|
||||
AC_CHECK_FUNCS_ONCE([matchpathcon_init_prefix])
|
||||
coreutils_saved_libs=$LIBS
|
||||
LIBS="$LIBS $LIB_SELINUX"
|
||||
AC_CHECK_FUNCS([matchpathcon_init_prefix], [],
|
||||
[
|
||||
case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
|
||||
no:*) # SELinux disabled
|
||||
;;
|
||||
*:no) # SELinux disabled
|
||||
;;
|
||||
*)
|
||||
AC_MSG_WARN([SELinux enabled, but matchpathcon_init_prefix not found])
|
||||
AC_MSG_WARN([The install utility may run slowly])
|
||||
esac
|
||||
])
|
||||
LIBS=$coreutils_saved_libs
|
||||
|
||||
# Used by sort.c.
|
||||
AC_CHECK_FUNCS_ONCE([nl_langinfo])
|
||||
|
||||
# Used by tail.c.
|
||||
AC_CHECK_FUNCS([inotify_init],
|
||||
[AC_DEFINE([HAVE_INOTIFY], [1],
|
||||
[Define to 1 if you have usable inotify support.])])
|
||||
|
||||
AC_CHECK_FUNCS_ONCE( \
|
||||
endgrent \
|
||||
endpwent \
|
||||
@@ -70,6 +89,9 @@ AC_DEFUN([coreutils_MACROS],
|
||||
tcgetpgrp \
|
||||
)
|
||||
|
||||
# for cp.c
|
||||
AC_CHECK_FUNCS_ONCE([utimensat])
|
||||
|
||||
dnl This can't use AC_REQUIRE; I'm not quite sure why.
|
||||
cu_PREREQ_STAT_PROG
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
dnl Misc lib-related macros for coreutils.
|
||||
|
||||
# Copyright (C) 1993-1997, 2000-2001, 2003-2006, 2008
|
||||
# Copyright (C) 1993-1997, 2000-2001, 2003-2006, 2008-2009
|
||||
# Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
dnl Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2006, 2009 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# stat-prog.m4 serial 6
|
||||
# Record the prerequisites of src/stat.c from the coreutils package.
|
||||
|
||||
# Copyright (C) 2002-2004, 2006, 2008 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2002-2004, 2006, 2008-2009 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
#serial 1
|
||||
dnl Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
AC_DEFUN([gl_STDOPEN],
|
||||
[
|
||||
AC_LIBSOURCES([stdopen.c, stdopen.h])
|
||||
AC_LIBOBJ([stdopen])
|
||||
|
||||
dnl Prerequisites.
|
||||
])
|
||||
@@ -1,6 +1,6 @@
|
||||
# Compare numeric strings.
|
||||
|
||||
dnl Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#serial 1
|
||||
dnl Copyright (C) 2005 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2005, 2009 Free Software Foundation, Inc.
|
||||
dnl This file is free software; the Free Software Foundation
|
||||
dnl gives unlimited permission to copy and/or distribute it,
|
||||
dnl with or without modifications, as long as this notice is preserved.
|
||||
|
||||
881
maint.mk
881
maint.mk
@@ -1,881 +0,0 @@
|
||||
# -*-Makefile-*-
|
||||
# This Makefile fragment tries to be general-purpose enough to be
|
||||
# used by at least coreutils, idutils, CPPI, Bison, and Autoconf.
|
||||
|
||||
## Copyright (C) 2001-2009 Free Software Foundation, Inc.
|
||||
##
|
||||
## This program is free software: you can redistribute it and/or modify
|
||||
## it under the terms of the GNU General Public License as published by
|
||||
## the Free Software Foundation, either version 3 of the License, or
|
||||
## (at your option) any later version.
|
||||
##
|
||||
## This program is distributed in the hope that it will be useful,
|
||||
## but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
## GNU General Public License for more details.
|
||||
##
|
||||
## You should have received a copy of the GNU General Public License
|
||||
## along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# This is reported not to work with make-3.79.1
|
||||
# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
|
||||
ME := maint.mk
|
||||
|
||||
# Do not save the original name or timestamp in the .tar.gz file.
|
||||
# Use --rsyncable if available.
|
||||
gzip_rsyncable := \
|
||||
$(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
|
||||
GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
|
||||
|
||||
GIT = git
|
||||
VC = $(GIT)
|
||||
VC-tag = git tag -s -m '$(VERSION)'
|
||||
|
||||
VC_LIST = $(srcdir)/build-aux/vc-list-files
|
||||
|
||||
VC_LIST_EXCEPT = \
|
||||
$(VC_LIST) | if test -f .x-$@; then grep -vEf .x-$@; else grep -v ChangeLog; fi
|
||||
|
||||
ifeq ($(origin prev_version_file), undefined)
|
||||
prev_version_file = $(srcdir)/.prev-version
|
||||
endif
|
||||
|
||||
PREV_VERSION := $(shell cat $(prev_version_file))
|
||||
VERSION_REGEXP = $(subst .,\.,$(VERSION))
|
||||
PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
|
||||
|
||||
ifeq ($(VC),$(GIT))
|
||||
this-vc-tag = v$(VERSION)
|
||||
this-vc-tag-regexp = v$(VERSION_REGEXP)
|
||||
else
|
||||
tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
|
||||
tag-this-version = $(subst .,_,$(VERSION))
|
||||
this-vc-tag = $(tag-package)-$(tag-this-version)
|
||||
this-vc-tag-regexp = $(this-vc-tag)
|
||||
endif
|
||||
my_distdir = $(PACKAGE)-$(VERSION)
|
||||
|
||||
# Old releases are stored here.
|
||||
release_archive_dir ?= ../release
|
||||
|
||||
# Prevent programs like 'sort' from considering distinct strings to be equal.
|
||||
# Doing it here saves us from having to set LC_ALL elsewhere in this file.
|
||||
export LC_ALL = C
|
||||
|
||||
## --------------- ##
|
||||
## Sanity checks. ##
|
||||
## --------------- ##
|
||||
|
||||
# Collect the names of rules starting with `sc_'.
|
||||
syntax-check-rules := $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
|
||||
$(srcdir)/$(ME) $(srcdir)/cfg.mk)
|
||||
.PHONY: $(syntax-check-rules)
|
||||
|
||||
local-checks-available = \
|
||||
patch-check $(syntax-check-rules) \
|
||||
makefile-check check-AUTHORS
|
||||
.PHONY: $(local-checks-available)
|
||||
|
||||
# Arrange to print the name of each syntax-checking rule just before running it.
|
||||
$(syntax-check-rules): %: %.m
|
||||
$(patsubst %, %.m, $(syntax-check-rules)):
|
||||
@echo $(patsubst sc_%.m, %, $@)
|
||||
|
||||
local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
|
||||
|
||||
syntax-check: $(local-check)
|
||||
# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
|
||||
# $$(find -type f -name '*.[chly]') && \
|
||||
# { echo '$(ME): found conditional include' 1>&2; \
|
||||
# exit 1; } || :
|
||||
|
||||
# grep -nE '^# *include <(string|stdlib)\.h>' \
|
||||
# $(srcdir)/{lib,src}/*.[chy] && \
|
||||
# { echo '$(ME): FIXME' 1>&2; \
|
||||
# exit 1; } || :
|
||||
# FIXME: don't allow `#include .strings\.h' anywhere
|
||||
|
||||
# By default, _prohibit_regexp does not ignore case.
|
||||
export ignore_case =
|
||||
_ignore_case = $$(test -n "$$ignore_case" && echo -i || :)
|
||||
|
||||
# There are many rules below that prohibit constructs in this package.
|
||||
# If the offending construct can be matched with a grep-E-style regexp,
|
||||
# use this macro. The shell variables "re" and "msg" must be defined.
|
||||
define _prohibit_regexp
|
||||
dummy=; : so we do not need a semicolon before each use \
|
||||
test "x$$re" != x || { echo '$(ME): re not defined' 1>&2; exit 1; }; \
|
||||
test "x$$msg" != x || { echo '$(ME): msg not defined' 1>&2; exit 1; };\
|
||||
grep $(_ignore_case) -nE "$$re" $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): '"$$msg" 1>&2; exit 1; } || :
|
||||
endef
|
||||
|
||||
sc_avoid_if_before_free:
|
||||
@$(srcdir)/build-aux/useless-if-before-free \
|
||||
$(useless_free_options) \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found useless "if" before "free" above' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_cast_of_argument_to_free:
|
||||
@re='\<free *\( *\(' msg='don'\''t cast free argument' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
sc_cast_of_x_alloc_return_value:
|
||||
@re='\*\) *x(m|c|re)alloc\>' \
|
||||
msg='don'\''t cast x*alloc return value' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
sc_cast_of_alloca_return_value:
|
||||
@re='\*\) *alloca\>' msg='don'\''t cast alloca return value' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
sc_space_tab:
|
||||
@re='[ ] ' msg='found SPACE-TAB sequence; remove the SPACE' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# Don't use *scanf or the old ato* functions in `real' code.
|
||||
# They provide no error checking mechanism.
|
||||
# Instead, use strto* functions.
|
||||
sc_prohibit_atoi_atof:
|
||||
@re='\<([fs]?scanf|ato([filq]|ll)) *\(' \
|
||||
msg='do not use *scan''f, ato''f, ato''i, ato''l, ato''ll or ato''q' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# Use STREQ rather than comparing strcmp == 0, or != 0.
|
||||
sc_prohibit_strcmp:
|
||||
@grep -nE '! *str''cmp *\(|\<str''cmp *\([^)]+\) *==' \
|
||||
$$($(VC_LIST_EXCEPT)) \
|
||||
| grep -vE ':# *define STREQ\(' && \
|
||||
{ echo '$(ME): use STREQ in place of the above uses of str''cmp' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Using EXIT_SUCCESS as the first argument to error is misleading,
|
||||
# since when that parameter is 0, error does not exit. Use `0' instead.
|
||||
sc_error_exit_success:
|
||||
@grep -nE 'error \(EXIT_SUCCESS,' \
|
||||
$$($(VC_LIST_EXCEPT) | grep -E '\.[chly]$$') && \
|
||||
{ echo '$(ME): found error (EXIT_SUCCESS' 1>&2; exit 1; } || :
|
||||
|
||||
# `FATAL:' should be fully upper-cased in error messages
|
||||
# `WARNING:' should be fully upper-cased, or fully lower-cased
|
||||
sc_error_message_warn_fatal:
|
||||
@grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -E '"Warning|"Fatal|"fatal' && \
|
||||
{ echo '$(ME): use FATAL, WARNING or warning' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Error messages should not start with a capital letter
|
||||
sc_error_message_uppercase:
|
||||
@grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -E '"[A-Z]' \
|
||||
| grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \
|
||||
{ echo '$(ME): found capitalized error message' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Error messages should not end with a period
|
||||
sc_error_message_period:
|
||||
@grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -E '[^."]\."' && \
|
||||
{ echo '$(ME): found error message ending in period' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_file_system:
|
||||
@re=file''system ignore_case=1 \
|
||||
msg='found use of "file''system"; spell it "file system"' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# Don't use cpp tests of this symbol. All code assumes config.h is included.
|
||||
sc_prohibit_have_config_h:
|
||||
@grep -n '^# *if.*HAVE''_CONFIG_H' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found use of HAVE''_CONFIG_H; remove' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Nearly all .c files must include <config.h>.
|
||||
sc_require_config_h:
|
||||
@if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
grep -L '^# *include <config\.h>' \
|
||||
$$($(VC_LIST_EXCEPT) | grep '\.c$$') \
|
||||
| grep . && \
|
||||
{ echo '$(ME): the above files do not include <config.h>' \
|
||||
1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
|
||||
# You must include <config.h> before including any other header file.
|
||||
sc_require_config_h_first:
|
||||
@if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
fail=0; \
|
||||
for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \
|
||||
grep '^# *include\>' $$i | sed 1q \
|
||||
| grep '^# *include <config\.h>' > /dev/null \
|
||||
|| { echo $$i; fail=1; }; \
|
||||
done; \
|
||||
test $$fail = 1 && \
|
||||
{ echo '$(ME): the above files include some other header' \
|
||||
'before <config.h>' 1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
|
||||
sc_prohibit_HAVE_MBRTOWC:
|
||||
@re='\bHAVE_MBRTOWC\b' msg="do not use $$re; it is always defined" \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# To use this "command" macro, you must first define two shell variables:
|
||||
# h: the header, enclosed in <> or ""
|
||||
# re: a regular expression that matches IFF something provided by $h is used.
|
||||
define _header_without_use
|
||||
h_esc=`echo "$$h"|sed 's/\./\\./'`; \
|
||||
if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
files=$$(grep -l '^# *include '"$$h_esc" \
|
||||
$$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \
|
||||
grep -LE "$$re" $$files | grep . && \
|
||||
{ echo "$(ME): the above files include $$h but don't use it" \
|
||||
1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
endef
|
||||
|
||||
# Prohibit the inclusion of assert.h without an actual use of assert.
|
||||
sc_prohibit_assert_without_use:
|
||||
@h='<assert.h>' re='\<assert *\(' $(_header_without_use)
|
||||
|
||||
# Prohibit the inclusion of getopt.h without an actual use.
|
||||
sc_prohibit_getopt_without_use:
|
||||
@h='<getopt.h>' re='\<getopt(_long)? *\(' $(_header_without_use)
|
||||
|
||||
# Don't include quotearg.h unless you use one of its functions.
|
||||
sc_prohibit_quotearg_without_use:
|
||||
@h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_header_without_use)
|
||||
|
||||
# Don't include quote.h unless you use one of its functions.
|
||||
sc_prohibit_quote_without_use:
|
||||
@h='"quote.h"' re='\<quote(_n)? *\(' $(_header_without_use)
|
||||
|
||||
# Don't include this header unless you use one of its functions.
|
||||
sc_prohibit_long_options_without_use:
|
||||
@h='"long-options.h"' re='\<parse_long_options *\(' \
|
||||
$(_header_without_use)
|
||||
|
||||
# Don't include this header unless you use one of its functions.
|
||||
sc_prohibit_inttostr_without_use:
|
||||
@h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \
|
||||
$(_header_without_use)
|
||||
|
||||
# Don't include this header unless you use one of its functions.
|
||||
sc_prohibit_error_without_use:
|
||||
@h='"error.h"' \
|
||||
re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\
|
||||
$(_header_without_use)
|
||||
|
||||
sc_prohibit_safe_read_without_use:
|
||||
@h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
|
||||
$(_header_without_use)
|
||||
|
||||
sc_prohibit_argmatch_without_use:
|
||||
@h='"argmatch.h"' \
|
||||
re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid) *\()' \
|
||||
$(_header_without_use)
|
||||
|
||||
sc_prohibit_root_dev_ino_without_use:
|
||||
@h='"root-dev-ino.h"' \
|
||||
re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
|
||||
$(_header_without_use)
|
||||
|
||||
# Prohibit the inclusion of c-ctype.h without an actual use.
|
||||
ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
|
||||
|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
|
||||
sc_prohibit_c_ctype_without_use:
|
||||
@h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' $(_header_without_use)
|
||||
|
||||
_empty =
|
||||
_sp = $(_empty) $(_empty)
|
||||
# The following list was generated by running:
|
||||
# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
|
||||
# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
|
||||
_sig_functions = \
|
||||
bsd_signal kill killpg pthread_kill pthread_sigmask raise sigaction \
|
||||
sigaddset sigaltstack sigdelset sigemptyset sigfillset sighold sigignore \
|
||||
siginterrupt sigismember signal sigpause sigpending sigprocmask sigqueue \
|
||||
sigrelse sigset sigsuspend sigtimedwait sigwait sigwaitinfo
|
||||
_sig_function_re = $(subst $(_sp),|,$(strip $(_sig_functions)))
|
||||
# The following were extracted from "man signal.h" manually.
|
||||
_sig_types_and_consts = \
|
||||
MINSIGSTKSZ SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK \
|
||||
SA_RESETHAND SA_RESTART SA_SIGINFO SIGEV_NONE SIGEV_SIGNAL \
|
||||
SIGEV_THREAD SIGSTKSZ SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SS_DISABLE \
|
||||
SS_ONSTACK mcontext_t pid_t sig_atomic_t sigevent siginfo_t sigset_t \
|
||||
sigstack sigval stack_t ucontext_t
|
||||
# generated via this:
|
||||
# perl -lne '/^#ifdef (SIG\w+)/ and print $1' lib/sig2str.c|sort -u|fmt -70
|
||||
_sig_names = \
|
||||
SIGABRT SIGALRM SIGALRM1 SIGBUS SIGCANCEL SIGCHLD SIGCLD SIGCONT \
|
||||
SIGDANGER SIGDIL SIGEMT SIGFPE SIGFREEZE SIGGRANT SIGHUP SIGILL \
|
||||
SIGINFO SIGINT SIGIO SIGIOT SIGKAP SIGKILL SIGKILLTHR SIGLOST SIGLWP \
|
||||
SIGMIGRATE SIGMSG SIGPHONE SIGPIPE SIGPOLL SIGPRE SIGPROF SIGPWR \
|
||||
SIGQUIT SIGRETRACT SIGSAK SIGSEGV SIGSOUND SIGSTKFLT SIGSTOP SIGSYS \
|
||||
SIGTERM SIGTHAW SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGURG SIGUSR1 \
|
||||
SIGUSR2 SIGVIRT SIGVTALRM SIGWAITING SIGWINCH SIGWIND SIGWINDOW \
|
||||
SIGXCPU SIGXFSZ
|
||||
_sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) $(_sig_types_and_consts)))
|
||||
|
||||
# Prohibit the inclusion of signal.h without an actual use.
|
||||
sc_prohibit_signal_without_use:
|
||||
@h='<signal.h>' \
|
||||
re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>' \
|
||||
$(_header_without_use)
|
||||
|
||||
sc_obsolete_symbols:
|
||||
@re='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
|
||||
msg='do not use HAVE''_FCNTL_H or O'_NDELAY \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
|
||||
|
||||
# Each nonempty line must start with a year number, or a TAB.
|
||||
sc_changelog:
|
||||
@grep -n '^[^12 ]' $$(find . -maxdepth 2 -name ChangeLog) && \
|
||||
{ echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Ensure that each .c file containing a "main" function also
|
||||
# calls set_program_name.
|
||||
sc_program_name:
|
||||
@if $(VC_LIST_EXCEPT) | grep '\.c$$' > /dev/null; then \
|
||||
files=$$(grep -l '^main *(' $$($(VC_LIST_EXCEPT) | grep '\.c$$')); \
|
||||
grep -LE 'set_program_name *\(m?argv\[0\]\);' $$files \
|
||||
| grep . && \
|
||||
{ echo '$(ME): the above files do not call set_program_name' \
|
||||
1>&2; exit 1; } || :; \
|
||||
else :; \
|
||||
fi
|
||||
|
||||
# Require that the final line of each test-lib.sh-using test be this one:
|
||||
# Exit $fail
|
||||
# Note: this test requires GNU grep's --label= option.
|
||||
sc_require_test_exit_idiom:
|
||||
@if test -f $(srcdir)/tests/test-lib.sh; then \
|
||||
die=0; \
|
||||
for i in $$(grep -l -F /../test-lib.sh $$($(VC_LIST) tests)); do \
|
||||
tail -n1 $$i | grep '^Exit \$$fail$$' > /dev/null \
|
||||
&& : || { die=1; echo $$i; } \
|
||||
done; \
|
||||
test $$die = 1 && \
|
||||
{ echo 1>&2 '$(ME): the final line in each of the above is not:'; \
|
||||
echo 1>&2 'Exit $$fail'; \
|
||||
exit 1; } || :; \
|
||||
fi
|
||||
|
||||
sc_the_the:
|
||||
@re='\<the ''the\>' \
|
||||
ignore_case=1 msg='found use of "the ''the";' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
sc_trailing_blank:
|
||||
@re='[ ]$$' \
|
||||
msg='found trailing blank(s)' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# Match lines like the following, but where there is only one space
|
||||
# between the options and the description:
|
||||
# -D, --all-repeated[=delimit-method] print all duplicate lines\n
|
||||
longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
|
||||
sc_two_space_separator_in_usage:
|
||||
@grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
|
||||
$$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo "$(ME): help2man requires at least two spaces between"; \
|
||||
echo "$(ME): an option and its description"; \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Look for diagnostics that aren't marked for translation.
|
||||
# This won't find any for which error's format string is on a separate line.
|
||||
sc_unmarked_diagnostics:
|
||||
@grep -nE \
|
||||
'\<error \([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -v '_''(' && \
|
||||
{ echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
# Avoid useless parentheses like those in this example:
|
||||
# #if defined (SYMBOL) || defined (SYM2)
|
||||
sc_useless_cpp_parens:
|
||||
@grep -n '^# *if .*defined *(' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): found useless parentheses in cpp directive' \
|
||||
1>&2; exit 1; } || :
|
||||
|
||||
# Require the latest GPL.
|
||||
sc_GPL_version:
|
||||
@re='either ''version [^3]' msg='GPL vN, N!=3' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
cvs_keywords = \
|
||||
Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State
|
||||
|
||||
sc_prohibit_cvs_keyword:
|
||||
@re='\$$($(cvs_keywords))\$$' \
|
||||
msg='do not use CVS keyword expansion' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# Make sure we don't use st_blocks. Use ST_NBLOCKS instead.
|
||||
# This is a bit of a kludge, since it prevents use of the string
|
||||
# even in comments, but for now it does the job with no false positives.
|
||||
sc_prohibit_stat_st_blocks:
|
||||
@re='[.>]st_blocks' msg='do not use st_blocks; use ST_NBLOCKS' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# Make sure we don't define any S_IS* macros in src/*.c files.
|
||||
# They're already defined via gnulib's sys/stat.h replacement.
|
||||
sc_prohibit_S_IS_definition:
|
||||
@re='^ *# *define *S_IS' \
|
||||
msg='do not define S_IS* macros; include <sys/stat.h>' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
# Each program that uses proper_name_utf8 must link with
|
||||
# one of the ICONV libraries.
|
||||
sc_proper_name_utf8_requires_ICONV:
|
||||
@progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\
|
||||
if test "x$$progs" != x; then \
|
||||
fail=0; \
|
||||
for p in $$progs; do \
|
||||
dir=$$(dirname "$$p"); \
|
||||
base=$$(basename "$$p" .c); \
|
||||
grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
|
||||
|| { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
|
||||
done; \
|
||||
test $$fail = 1 && \
|
||||
{ echo 1>&2 '$(ME): the above do not link with any ICONV library'; \
|
||||
exit 1; } || :; \
|
||||
fi
|
||||
|
||||
# Warn about "c0nst struct Foo const foo[]",
|
||||
# but not about "char const *const foo" or "#define const const".
|
||||
sc_redundant_const:
|
||||
@re='\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \
|
||||
msg='redundant "const" in declarations' \
|
||||
$(_prohibit_regexp)
|
||||
|
||||
sc_const_long_option:
|
||||
@grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \
|
||||
| grep -Ev 'const struct option|struct option const' && { \
|
||||
echo 1>&2 '$(ME): add "const" to the above declarations'; \
|
||||
exit 1; } || :
|
||||
|
||||
NEWS_hash = \
|
||||
$$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
|
||||
$(srcdir)/NEWS \
|
||||
| grep -v '^Copyright .*Free Software' \
|
||||
| md5sum - \
|
||||
| sed 's/ .*//')
|
||||
|
||||
# Ensure that we don't accidentally insert an entry into an old NEWS block.
|
||||
sc_immutable_NEWS:
|
||||
@if test -f $(srcdir)/NEWS; then \
|
||||
test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \
|
||||
{ echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
|
||||
fi
|
||||
|
||||
# Update the hash stored above. Do this after each release and
|
||||
# for any corrections to old entries.
|
||||
update-NEWS-hash: NEWS
|
||||
perl -pi -e 's/^(old_NEWS_hash = ).*/$${1}'"$(NEWS_hash)/" \
|
||||
$(srcdir)/cfg.mk
|
||||
|
||||
epoch_date = 1970-01-01 00:00:00.000000000 +0000
|
||||
# Ensure that the c99-to-c89 patch applies cleanly.
|
||||
patch-check:
|
||||
rm -rf src-c89 $@.1 $@.2
|
||||
cp -a $(srcdir)/src src-c89
|
||||
if test "x$(srcdir)" != x.; then \
|
||||
cp -a src/* src-c89; \
|
||||
dotfiles=`ls src/.[!.]* 2>/dev/null`; \
|
||||
test -z "$$dotfiles" || cp -a src/.[!.]* src-c89; \
|
||||
fi
|
||||
(cd src-c89; patch -p1 -V never --fuzz=0) < $(srcdir)/src/c99-to-c89.diff \
|
||||
> $@.1 2>&1
|
||||
if test "$(REGEN_PATCH)" = yes; then \
|
||||
diff -upr $(srcdir)/src src-c89 | sed 's,$(srcdir)/src-c89/,src/,' \
|
||||
| grep -vE '^(Only in|File )' \
|
||||
| perl -pe 's/^((?:\+\+\+|---) \S+\t).*/$${1}$(epoch_date)/;' \
|
||||
-e 's/^ $$//' \
|
||||
> new-diff || : ; fi
|
||||
grep -v '^patching file ' $@.1 > $@.2 || :
|
||||
msg=ok; test -s $@.2 && msg='fuzzy patch' || : ; \
|
||||
rm -f src-c89/*.o || msg='rm failed'; \
|
||||
$(MAKE) -C src-c89 CFLAGS='-Wdeclaration-after-statement -Werror' \
|
||||
|| msg='compile failure with extra options'; \
|
||||
test "$$msg" = ok && rm -rf src-c89 $@.1 $@.2 || echo "$$msg" 1>&2; \
|
||||
test "$$msg" = ok
|
||||
|
||||
check-AUTHORS:
|
||||
$(MAKE) -C src $@
|
||||
|
||||
# Ensure that we use only the standard $(VAR) notation,
|
||||
# not @...@ in Makefile.am, now that we can rely on automake
|
||||
# to emit a definition for each substituted variable.
|
||||
# We use perl rather than "grep -nE ..." to exempt a single
|
||||
# use of an @...@-delimited variable name in src/Makefile.am.
|
||||
makefile-check:
|
||||
@perl -ne '/\@[A-Z_0-9]+\@/ && !/^cu_install_program =/' \
|
||||
-e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
|
||||
$$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \
|
||||
&& { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
|
||||
|
||||
news-date-check: NEWS
|
||||
today=`date +%Y-%m-%d`; \
|
||||
if head NEWS | grep '^\*.* $(VERSION_REGEXP) ('$$today')' \
|
||||
>/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "version or today's date is not in NEWS" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
changelog-check:
|
||||
if head ChangeLog | grep 'Version $(VERSION_REGEXP)\.$$' \
|
||||
>/dev/null; then \
|
||||
:; \
|
||||
else \
|
||||
echo "$(VERSION) not in ChangeLog" 1>&2; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
sc_makefile_TAB_only_indentation:
|
||||
@grep -nE '^ [ ]{8}' \
|
||||
$$($(VC_LIST_EXCEPT) | grep -E 'akefile|\.mk$$') \
|
||||
&& { echo '$(ME): found TAB-8-space indentation' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
sc_m4_quote_check:
|
||||
@grep -nE '(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]' \
|
||||
$$($(VC_LIST_EXCEPT) | grep -E '(^configure\.ac|\.m4)$$') \
|
||||
&& { echo '$(ME): quote the first arg to AC_DEF*' 1>&2; \
|
||||
exit 1; } || :
|
||||
|
||||
fix_po_file_diag = \
|
||||
'you have changed the set of files with translatable diagnostics;\n\
|
||||
apply the above patch\n'
|
||||
|
||||
# Verify that all source files using _() are listed in po/POTFILES.in.
|
||||
po_file = po/POTFILES.in
|
||||
sc_po_check:
|
||||
@if test -f $(po_file); then \
|
||||
grep -E -v '^(#|$$)' $(po_file) \
|
||||
| grep -v '^src/false\.c$$' | sort > $@-1; \
|
||||
files=; \
|
||||
for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \
|
||||
case $$file in \
|
||||
*.?|*.??) ;; \
|
||||
*) continue;; \
|
||||
esac; \
|
||||
case $$file in \
|
||||
*.[ch]) \
|
||||
base=`expr " $$file" : ' \(.*\)\..'`; \
|
||||
{ test -f $$base.l || test -f $$base.y; } && continue;; \
|
||||
esac; \
|
||||
files="$$files $$file"; \
|
||||
done; \
|
||||
grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
|
||||
| sort -u > $@-2; \
|
||||
diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \
|
||||
|| { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
|
||||
rm -f $@-1 $@-2; \
|
||||
fi
|
||||
|
||||
# Sometimes it is useful to change the PATH environment variable
|
||||
# in Makefiles. When doing so, it's better not to use the Unix-centric
|
||||
# path separator of `:', but rather the automake-provided `$(PATH_SEPARATOR)'.
|
||||
msg = '$(ME): Do not use `:'\'' above; use $$(PATH_SEPARATOR) instead'
|
||||
sc_makefile_path_separator_check:
|
||||
@grep -nE 'PATH[=].*:' \
|
||||
$$($(VC_LIST_EXCEPT) | grep -E 'akefile|\.mk$$') \
|
||||
&& { echo $(msg) 1>&2; exit 1; } || :
|
||||
|
||||
# Check that `make alpha' will not fail at the end of the process.
|
||||
writable-files:
|
||||
if test -d $(release_archive_dir); then :; else \
|
||||
for file in $(distdir).tar.gz \
|
||||
$(release_archive_dir)/$(distdir).tar.gz; do \
|
||||
test -e $$file || continue; \
|
||||
test -w $$file \
|
||||
|| { echo ERROR: $$file is not writable; fail=1; }; \
|
||||
done; \
|
||||
test "$$fail" && exit 1 || : ; \
|
||||
fi
|
||||
|
||||
v_etc_file = lib/version-etc.c
|
||||
sample-test = tests/sample-test
|
||||
texi = doc/$(PACKAGE).texi
|
||||
# Make sure that the copyright date in $(v_etc_file) is up to date.
|
||||
# Do the same for the $(sample-test) and the main doc/.texi file.
|
||||
sc_copyright_check:
|
||||
@if test -f $(v_etc_file); then \
|
||||
grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \
|
||||
>/dev/null \
|
||||
|| { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
|
||||
exit 1; }; \
|
||||
fi
|
||||
@if test -f $(sample-test); then \
|
||||
grep '# Copyright (C) '$$(date +%Y)' Free' $(sample-test) \
|
||||
>/dev/null \
|
||||
|| { echo 'out of date copyright in $(sample-test); update it' 1>&2; \
|
||||
exit 1; }; \
|
||||
fi
|
||||
@if test -f $(texi); then \
|
||||
grep 'Copyright @copyright{} .*'$$(date +%Y)' Free' $(texi) \
|
||||
>/dev/null \
|
||||
|| { echo 'out of date copyright in $(texi); update it' 1>&2; \
|
||||
exit 1; }; \
|
||||
fi
|
||||
|
||||
vc-diff-check:
|
||||
$(VC) diff > vc-diffs || :
|
||||
if test -s vc-diffs; then \
|
||||
cat vc-diffs; \
|
||||
echo "Some files are locally modified:" 1>&2; \
|
||||
exit 1; \
|
||||
else \
|
||||
rm vc-diffs; \
|
||||
fi
|
||||
|
||||
cvs-check: vc-diff-check
|
||||
|
||||
maintainer-distcheck:
|
||||
$(MAKE) distcheck
|
||||
$(MAKE) taint-distcheck
|
||||
$(MAKE) my-distcheck
|
||||
|
||||
|
||||
# Don't make a distribution if checks fail.
|
||||
# Also, make sure the NEWS file is up-to-date.
|
||||
vc-dist: $(local-check) cvs-check maintainer-distcheck
|
||||
XZ_OPT=-9ev $(MAKE) dist
|
||||
|
||||
# Use this to make sure we don't run these programs when building
|
||||
# from a virgin tgz file, below.
|
||||
null_AM_MAKEFLAGS = \
|
||||
ACLOCAL=false \
|
||||
AUTOCONF=false \
|
||||
AUTOMAKE=false \
|
||||
AUTOHEADER=false \
|
||||
MAKEINFO=false
|
||||
|
||||
built_programs = $$(cd src && MAKEFLAGS= $(MAKE) -s built_programs.list)
|
||||
|
||||
warn_cflags = -Dlint -O -Werror -Wall -Wformat -Wshadow -Wpointer-arith
|
||||
bin=bin-$$$$
|
||||
|
||||
write_loser = printf '\#!%s\necho $$0: bad path 1>&2; exit 1\n' '$(SHELL)'
|
||||
|
||||
TMPDIR ?= /tmp
|
||||
t=$(TMPDIR)/$(PACKAGE)/test
|
||||
pfx=$(t)/i
|
||||
|
||||
# More than once, tainted build and source directory names would
|
||||
# have caused at least one "make check" test to apply "chmod 700"
|
||||
# to all directories under $HOME. Make sure it doesn't happen again.
|
||||
tp := $(shell echo "$(TMPDIR)/$(PACKAGE)-$$$$")
|
||||
t_prefix = $(tp)/a
|
||||
t_taint = '$(t_prefix) b'
|
||||
fake_home = $(tp)/home
|
||||
|
||||
# Ensure that tests run from tainted build and src dir names work,
|
||||
# and don't affect anything in $HOME. Create witness files in $HOME,
|
||||
# record their attributes, and build/test. Then ensure that the
|
||||
# witnesses were not affected.
|
||||
taint-distcheck: $(DIST_ARCHIVES)
|
||||
test -d $(t_taint) && chmod -R 700 $(t_taint) || :
|
||||
-rm -rf $(t_taint) $(fake_home)
|
||||
mkdir -p $(t_prefix) $(t_taint) $(fake_home)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t_taint) -zxf $(distdir).tar.gz
|
||||
mkfifo $(fake_home)/fifo
|
||||
touch $(fake_home)/f
|
||||
mkdir -p $(fake_home)/d/e
|
||||
ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-before
|
||||
cd $(t_taint)/$(distdir) \
|
||||
&& ./configure \
|
||||
&& $(MAKE) \
|
||||
&& HOME=$(fake_home) $(MAKE) check \
|
||||
&& ls -lR $(fake_home) $(t_prefix) > $(tp)/.ls-after \
|
||||
&& diff $(tp)/.ls-before $(tp)/.ls-after \
|
||||
&& test -d $(t_prefix)
|
||||
rm -rf $(tp)
|
||||
|
||||
# Verify that a twisted use of --program-transform-name=PROGRAM works.
|
||||
define install-transform-check
|
||||
echo running install-transform-check \
|
||||
&& rm -rf $(pfx) \
|
||||
&& $(MAKE) program_transform_name='s/.*/zyx/' \
|
||||
prefix=$(pfx) install \
|
||||
&& test "$$(echo $(pfx)/bin/*)" = "$(pfx)/bin/zyx" \
|
||||
&& test "$$(find $(pfx)/share/man -type f|sed 's,.*/,,;s,\..*,,')" = "zyx"
|
||||
endef
|
||||
|
||||
# Install, then verify that all binaries and man pages are in place.
|
||||
# Note that neither the binary, ginstall, nor the ].1 man page is installed.
|
||||
define my-instcheck
|
||||
$(MAKE) prefix=$(pfx) install \
|
||||
&& test ! -f $(pfx)/bin/ginstall \
|
||||
&& { fail=0; \
|
||||
for i in $(built_programs); do \
|
||||
test "$$i" = ginstall && i=install; \
|
||||
for j in "$(pfx)/bin/$$i" \
|
||||
"$(pfx)/share/man/man1/$$i.1"; do \
|
||||
case $$j in *'[.1') continue;; esac; \
|
||||
test -f "$$j" && : \
|
||||
|| { echo "$$j not installed"; fail=1; }; \
|
||||
done; \
|
||||
done; \
|
||||
test $$fail = 1 && exit 1 || :; \
|
||||
}
|
||||
endef
|
||||
|
||||
define coreutils-path-check
|
||||
{ \
|
||||
if test -f $(srcdir)/src/true.c; then \
|
||||
fail=1; \
|
||||
mkdir $(bin) \
|
||||
&& ($(write_loser)) > $(bin)/loser \
|
||||
&& chmod a+x $(bin)/loser \
|
||||
&& for i in $(built_programs); do \
|
||||
case $$i in \
|
||||
rm|expr|basename|echo|sort|ls|tr);; \
|
||||
cat|dirname|mv|wc);; \
|
||||
*) ln $(bin)/loser $(bin)/$$i;; \
|
||||
esac; \
|
||||
done \
|
||||
&& ln -sf ../src/true $(bin)/false \
|
||||
&& PATH=`pwd`/$(bin)$(PATH_SEPARATOR)$$PATH \
|
||||
$(MAKE) -C tests check \
|
||||
&& { test -d gnulib-tests \
|
||||
&& $(MAKE) -C gnulib-tests check \
|
||||
|| :; } \
|
||||
&& rm -rf $(bin) \
|
||||
&& fail=0; \
|
||||
else \
|
||||
fail=0; \
|
||||
fi; \
|
||||
test $$fail = 1 && exit 1 || :; \
|
||||
}
|
||||
endef
|
||||
|
||||
# Use -Wformat -Werror to detect format-string/arg-list mismatches.
|
||||
# Also, check for shadowing problems with -Wshadow, and for pointer
|
||||
# arithmetic problems with -Wpointer-arith.
|
||||
# These CFLAGS are pretty strict. If you build this target, you probably
|
||||
# have to have a recent version of gcc and glibc headers.
|
||||
# The hard-linking for-loop below ensures that there is a bin/ directory
|
||||
# full of all of the programs under test (except the ones that are required
|
||||
# for basic Makefile rules), all symlinked to the just-built "false" program.
|
||||
# This is to ensure that if ever a test neglects to make PATH include
|
||||
# the build srcdir, these always-failing programs will run.
|
||||
# Otherwise, it is too easy to test the wrong programs.
|
||||
# Note that "false" itself is a symlink to true, so it too will malfunction.
|
||||
my-distcheck: $(DIST_ARCHIVES) $(local-check)
|
||||
$(MAKE) syntax-check
|
||||
$(MAKE) check
|
||||
-rm -rf $(t)
|
||||
mkdir -p $(t)
|
||||
GZIP=$(GZIP_ENV) $(AMTAR) -C $(t) -zxf $(distdir).tar.gz
|
||||
cd $(t)/$(distdir) \
|
||||
&& ./configure --disable-nls \
|
||||
&& $(MAKE) CFLAGS='$(warn_cflags)' \
|
||||
AM_MAKEFLAGS='$(null_AM_MAKEFLAGS)' \
|
||||
&& $(MAKE) dvi \
|
||||
&& $(install-transform-check) \
|
||||
&& $(my-instcheck) \
|
||||
&& $(coreutils-path-check) \
|
||||
&& $(MAKE) distclean
|
||||
(cd $(t) && mv $(distdir) $(distdir).old \
|
||||
&& $(AMTAR) -zxf - ) < $(distdir).tar.gz
|
||||
diff -ur $(t)/$(distdir).old $(t)/$(distdir)
|
||||
-rm -rf $(t)
|
||||
@echo "========================"; \
|
||||
echo "$(distdir).tar.gz is ready for distribution"; \
|
||||
echo "========================"
|
||||
|
||||
WGET = wget
|
||||
WGETFLAGS = -C off
|
||||
|
||||
rel-check:
|
||||
tarz=/tmp/rel-check-tarz-$$$$; \
|
||||
md5_tmp=/tmp/rel-check-md5-$$$$; \
|
||||
set -e; \
|
||||
trap 'status=$$?; rm -f $$tarz $$md5_tmp; exit $$status' 0 1 2 3 15; \
|
||||
$(WGET) $(WGETFLAGS) -q --output-document=$$tarz $(url); \
|
||||
echo "$(md5) -" > $$md5_tmp; \
|
||||
md5sum -c $$md5_tmp < $$tarz
|
||||
|
||||
rel-files = $(DIST_ARCHIVES)
|
||||
|
||||
gnulib-version = $$(cd $(gnulib_dir) && git describe)
|
||||
|
||||
announcement: NEWS ChangeLog $(rel-files)
|
||||
@./build-aux/announce-gen \
|
||||
--release-type=$(RELEASE_TYPE) \
|
||||
--package=$(PACKAGE) \
|
||||
--prev=$(PREV_VERSION) \
|
||||
--curr=$(VERSION) \
|
||||
--gpg-key-id=$(gpg_key_ID) \
|
||||
--news=NEWS \
|
||||
--bootstrap-tools=autoconf,automake,bison,gnulib \
|
||||
--gnulib-version=$(gnulib-version) \
|
||||
--no-print-checksums \
|
||||
$(addprefix --url-dir=, $(url_dir_list))
|
||||
|
||||
## ---------------- ##
|
||||
## Updating files. ##
|
||||
## ---------------- ##
|
||||
|
||||
ftp-gnu = ftp://ftp.gnu.org/gnu
|
||||
www-gnu = http://www.gnu.org
|
||||
|
||||
# Use mv, if you don't have/want move-if-change.
|
||||
move_if_change ?= move-if-change
|
||||
|
||||
emit_upload_commands:
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
@echo "$(srcdir)/build-aux/gnupload $(GNUPLOADFLAGS) \\"
|
||||
@echo " --to $(gnu_rel_host):$(PACKAGE) \\"
|
||||
@echo " $(rel-files)"
|
||||
@echo '# send the /tmp/announcement e-mail'
|
||||
@echo =====================================
|
||||
@echo =====================================
|
||||
|
||||
noteworthy = * Noteworthy changes in release ?.? (????-??-??) [?]
|
||||
define emit-commit-log
|
||||
printf '%s\n' 'post-release administrivia' '' \
|
||||
'* NEWS: Add header line for next release.' \
|
||||
'* .prev-version: Record previous version.' \
|
||||
'* cfg.mk (old_NEWS_hash): Auto-update.'
|
||||
endef
|
||||
|
||||
.PHONY: alpha beta major
|
||||
alpha beta major: $(local-check) writable-files
|
||||
test $@ = major \
|
||||
&& { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
|
||||
|| { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
|
||||
|| :
|
||||
$(MAKE) vc-dist
|
||||
$(MAKE) news-date-check
|
||||
$(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
|
||||
if test -d $(release_archive_dir); then \
|
||||
ln $(rel-files) $(release_archive_dir); \
|
||||
chmod a-w $(rel-files); \
|
||||
fi
|
||||
$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
|
||||
echo $(VERSION) > $(prev_version_file)
|
||||
$(MAKE) update-NEWS-hash
|
||||
perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
|
||||
$(emit-commit-log) > .ci-msg
|
||||
$(VC) commit -F .ci-msg -a
|
||||
|
||||
.PHONY: web-manual
|
||||
web-manual:
|
||||
@test -z "$(manual_title)" \
|
||||
&& { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
|
||||
@cd '$(srcdir)/doc'; \
|
||||
$(SHELL) ../build-aux/gendocs.sh -o '$(abs_builddir)/doc/manual' \
|
||||
--email $(PACKAGE_BUGREPORT) $(PACKAGE) \
|
||||
"$(PACKAGE_NAME) - $(manual_title)"
|
||||
@echo " *** Upload the doc/manual directory to web-cvs."
|
||||
1
man/.gitignore
vendored
1
man/.gitignore
vendored
@@ -72,6 +72,7 @@ sleep.1
|
||||
sort.1
|
||||
split.1
|
||||
stat.1
|
||||
stdbuf.1
|
||||
stty.1
|
||||
su.1
|
||||
sum.1
|
||||
|
||||
@@ -105,6 +105,7 @@ sleep.1: $(common_dep) $(srcdir)/sleep.x ../src/sleep.c
|
||||
sort.1: $(common_dep) $(srcdir)/sort.x ../src/sort.c
|
||||
split.1: $(common_dep) $(srcdir)/split.x ../src/split.c
|
||||
stat.1: $(common_dep) $(srcdir)/stat.x ../src/stat.c
|
||||
stdbuf.1: $(common_dep) $(srcdir)/stdbuf.x ../src/stdbuf.c
|
||||
stty.1: $(common_dep) $(srcdir)/stty.x ../src/stty.c
|
||||
su.1: $(common_dep) $(srcdir)/su.x ../src/su.c
|
||||
sum.1: $(common_dep) $(srcdir)/sum.x ../src/sum.c
|
||||
@@ -148,14 +149,14 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
|
||||
# That is necessary to avoid failures for programs that are also shell built-in
|
||||
# functions like echo, false, printf, pwd.
|
||||
.x.1:
|
||||
@case '$(PERL)' in \
|
||||
$(AM_V_GEN)case '$(PERL)' in \
|
||||
*"/missing "*) \
|
||||
echo 'WARNING: cannot update man page $@ since perl is missing' \
|
||||
'or inadequate' 1>&2 \
|
||||
'or inadequate' 1>&2 \
|
||||
;; \
|
||||
*) \
|
||||
rm -f $@ \
|
||||
&& { echo "Updating man page $@"; \
|
||||
rm -f $@ $@-t \
|
||||
&& { \
|
||||
rm -rf $t; \
|
||||
mkdir $t; \
|
||||
(cd $t && $(LN_S) ../../src/$(mapped_name) $*); \
|
||||
@@ -164,8 +165,11 @@ mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
|
||||
--include=$(srcdir)/$*.x \
|
||||
--output=$t/$@ $t/$*; \
|
||||
} \
|
||||
&& sed 's|$*\.td/||g' $t/$@ > $@ \
|
||||
&& rm -rf $t ;; \
|
||||
&& sed 's|$*\.td/||g' $t/$@ > $@-t \
|
||||
&& rm -rf $t \
|
||||
&& chmod -w $@-t \
|
||||
&& mv $@-t $@ \
|
||||
;; \
|
||||
esac
|
||||
|
||||
distcheck-hook: check-x-vs-1 check-programs-vs-x
|
||||
@@ -181,8 +185,8 @@ ASSORT = LC_ALL=C sort
|
||||
# add them here manually.
|
||||
.PHONY: check-x-vs-1
|
||||
check-x-vs-1:
|
||||
PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
|
||||
t=ls-files.$$$$; \
|
||||
$(AM_V_GEN)PATH=../src$(PATH_SEPARATOR)$$PATH; export PATH; \
|
||||
t=$@-t; \
|
||||
(cd $(srcdir) && ls -1 *.x) | sed 's/\.x$$//' | $(ASSORT) > $$t;\
|
||||
(echo $(dist_man1_MANS) $(NO_INSTALL_PROGS_DEFAULT) \
|
||||
| tr -s ' ' '\n' | sed 's/\.1$$//') \
|
||||
@@ -195,7 +199,7 @@ all_programs = \
|
||||
|
||||
.PHONY: check-programs-vs-x
|
||||
check-programs-vs-x:
|
||||
status=0; \
|
||||
$(AM_V_GEN)status=0; \
|
||||
for p in dummy `$(all_programs)`; do \
|
||||
test $$p = dummy && continue; \
|
||||
test $$p = ginstall && p=install || : ; \
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2006, 2007 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2006, 2007, 2009 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2006 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2006, 2009 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
comm \- compare two sorted files line by line
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[SEE ALSO]
|
||||
join(1), uniq(1)
|
||||
|
||||
2
man/df.x
2
man/df.x
@@ -1,4 +1,4 @@
|
||||
'\" Copyright (C) 1998, 1999, 2004 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998, 1999, 2004, 2009 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
2
man/du.x
2
man/du.x
@@ -1,4 +1,4 @@
|
||||
'\" Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
'\" Copyright (C) 1998, 1999, 2000, 2002, 2009 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
@@ -2,3 +2,5 @@
|
||||
join \- join lines of two files on a common field
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[SEE ALSO]
|
||||
comm(1), uniq(1)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
[NAME]
|
||||
readlink \- display value of a symbolic link
|
||||
readlink \- print value of a symbolic link or canonical file name
|
||||
[DESCRIPTION]
|
||||
.\" Add any additional description here
|
||||
[SEE ALSO]
|
||||
|
||||
4
man/rm.x
4
man/rm.x
@@ -1,5 +1,5 @@
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006 Free Software
|
||||
'\" Foundation, Inc.
|
||||
'\" Copyright (C) 1998, 1999, 2001, 2003, 2004,
|
||||
'\" 2006, 2009 Free Software Foundation, Inc.
|
||||
'\"
|
||||
'\" This is free software. You may redistribute copies of it under the terms
|
||||
'\" of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user