Re: libc6 posix version/breakage
Michael Stone <mstone@debian.org> writes:
> I don't know that there's a full list of *packages* that might be
> affected.
diffutils is also affected. In POSIX 1003.1-2001, command invocations
like "diff -c2" and "diff -c -2" are no longer allowed; you are
supposed to use "diff -C 2" instead. Similarly, "diff -u2" and "diff
-u -2" are no longer supported with GNU diff; you are supposed to use
"diff -U 2" instead.
I don't know of any other packages that are affected directly.
(Of course many packages invoke coreutils and diffutils with the old
syntax and thus will be affected indirectly.)
Here's a script that you can use to look for affected source files.
(Maybe this should be stuck into Debian somewhere?)
#! /bin/sh
LC_ALL=C
export LC_ALL
IFS='
'
# Calculate an ERE from a list of commands and
# single-letter options for those commands.
for command_options in \
'expand i' \
'head qv' \
'fold bsw' \
'diff BDHNPTabdeilnpqrstwy' \
'nice ' \
'split n' \
'tail fqv' \
'uniq cdDiu' \
'unexpand a'
do
command=$(expr "$command_options" : '\([^[:space:]]*\)')
options=$(expr "$command_options" : '[^[:space:]]*[[:space:]]*\(.*\)')
case $options in
?*) options="[$options]*";;
esac
pattern="$pattern$command\\>.*[[:space:]]-$options[\$0-9]|"
done
pattern=$pattern'(sort|tail|uniq)\>.*[[:space:]]\+[$0-9]|sort\>.*[[:space:]]-o'
case $1 in
--help)
exec echo "$0: usage: $0 [OPTION]... [FILE]...
Grep for instances of possible POSIX-conformance problems in the FILEs.
Options:
-s Check strictly, even for things that aren't likely to be real problems.
The FILEs can be directories, in which case the greps are recursive,
though ChangeLogs, backup files, and version-control histories are bypassed.
The default FILE is '-', which stands for the standard input.";;
-s)
pattern=$pattern'|[ef]grep\>|(\[|test\>).*[[:space:]]-[ao]\>'
shift;;
esac
pattern='\<('$pattern')'
case $# in
0) exec grep -E -n "$pattern";;
*) exec grep -E -n "$pattern" \
$(find "${@-.}" -type f \
! -name '*~' ! -name 'ChangeLog*' ! -name '*,v' \
-print \
| sort);;
esac
Reply to: