s/fgrep/grep -F/

This commit is contained in:
Дмитрий Левин 2022-04-26 08:00:00 +00:00
parent cf44c38b35
commit 61e11d51a2
7 changed files with 19 additions and 19 deletions

View File

@ -223,8 +223,8 @@ set_c_cflags="$(sed -n 's/^CFLAGS = //p' lib/Makefile) -W -Wno-missing-prototype
%make_build -C lib set.lo CFLAGS="$set_c_cflags"
%make_build
rpmquery -a --provides |fgrep '= set:' |sort >P
rpmquery -a --requires |fgrep '= set:' |sort >R
rpmquery -a --provides |grep -F '= set:' |sort >P
rpmquery -a --requires |grep -F '= set:' |sort >R
join -o 1.3,2.3 P R |shuf >setcmp-data
%if_with profile

View File

@ -21,7 +21,7 @@ InitPackagedFiles()
{
PackagedFiles "${1:?}" >$tmpdir/PF
sed "s|^|${RPM_BUILD_ROOT-}|" <$tmpdir/PF >$tmpdir/BPF
fgrep -qs -x "$1" $tmpdir/BPF ||
grep -F -qs -x "$1" $tmpdir/BPF ||
Warning "packaged files misconfigured"
# Identify packaged files by inode.
xargs -r --delimiter='\n' <$tmpdir/BPF \
@ -96,7 +96,7 @@ CppReq()
local f="$1"; shift
GlobalPkgInit "$f"
if fgrep -qs -x "$f" $tmpdir/processed; then
if grep -F -qs -x "$f" $tmpdir/processed; then
Verbose "$f: already processed"
return
fi

View File

@ -23,7 +23,7 @@ Debug "RPM_FINDREQ_RPATH=$RPM_FINDREQ_RPATH"
not_yet_list=
HasDebugInfo()
{
if readelf --wide --sections "$1" |LC_ALL=C fgrep -qs '.gnu_debuglink'; then
if readelf --wide --sections "$1" |LC_ALL=C grep -F -qs '.gnu_debuglink'; then
return 0
fi
if [ -z "$not_yet_list" ] || [ -n "${not_yet_list##* $1 *}" ]; then

View File

@ -1,4 +1,4 @@
#!/bin/sh -efu
dirlist=$(set +f; grep -h ^/. @RPMCONFIGDIR@/*-files.req.list |
while read -r d pkg; do echo "${d%/}"; done)
cut -f1 |fgrep "${dirlist:?}" || [ $? = 1 ]
cut -f1 |grep -F "${dirlist:?}" || [ $? = 1 ]

View File

@ -142,7 +142,7 @@ FindByFile()
# install, which is the case if there are packaged files under the
# directory.
local dirfiles
if dirfiles=$(PackagedFiles |fgrep "$xbrep") &&
if dirfiles=$(PackagedFiles |grep -F "$xbrep") &&
dirfiles=$(echo '' $dirfiles '') &&
[ -n "${dirfiles##* $xbrep *}" ] &&
[ -z "${dirfiles##* $xbrep/*}" ]; then

View File

@ -82,10 +82,10 @@ LibReq()
# GNU_IFUNC and GNU_UNIQUE.
readelf --wide --dyn-syms "$f" |awk '+$1&&($4=="IFUNC"||$5=="UNIQUE")' >"$tmpdir"/gnu-syms
if [ -s "$tmpdir"/gnu-syms ]; then
if LC_ALL=C fgrep -qs ' IFUNC ' "$tmpdir"/gnu-syms; then
if LC_ALL=C grep -F -qs ' IFUNC ' "$tmpdir"/gnu-syms; then
echo 'rtld(GNU_IFUNC)'
fi
if LC_ALL=C fgrep -qs ' UNIQUE ' "$tmpdir"/gnu-syms; then
if LC_ALL=C grep -F -qs ' UNIQUE ' "$tmpdir"/gnu-syms; then
echo 'rtld(GNU_UNIQUE)'
fi
fi
@ -182,7 +182,7 @@ NF==2 && ($1==name || basename($1)==name) && $1~"^/" && $2~"^[(]0x" {print $1}
[ -s "$tmpdir"/a/lib2dep ] || return 0
# Deal with symbols.
$elf_ldd --bindings -- "$f" "$rpath" 2>&1 |
LC_ALL=C fgrep "binding file $f [" |
LC_ALL=C grep -F "binding file $f [" |
awk '($4!=$7){print$11"\t"$7}' |
sed -e "s/[\`']//g" >"$tmpdir"/a/sym2lib
[ -s "$tmpdir"/a/sym2lib ] ||
@ -263,7 +263,7 @@ EOF
while IFS=$'\t' read -r lib dep; do
ENABLE_SET_VERSIONS=1
if [ -z "$ENABLE_SET_VERSIONS" ]; then
LC_ALL=C fgrep -qs -x -e "$dep" "$tmpdir"/versioned ||
LC_ALL=C grep -F -qs -x -e "$dep" "$tmpdir"/versioned ||
printf '%s\n' "$dep"
continue
fi
@ -279,25 +279,25 @@ while IFS=$'\t' read -r lib dep; do
# Deal with required symbols.
reqsym=$(printf '%s\n' "$lib" |LC_ALL=C join -t$'\t' -12 -o 1.1 "$tmpdir"/sym2lib -)
if [ -z "$reqsym" ]; then
LC_ALL=C fgrep -qs -x -e "$dep" "$tmpdir"/versioned ||
LC_ALL=C grep -F -qs -x -e "$dep" "$tmpdir"/versioned ||
printf '%s\n' "$dep"
continue
fi
# Handle standard libraries.
if LC_ALL=C fgrep -qs -x -e "$dep" "$tmpdir"/stddep; then
if ! reqsym=$(printf '%s\n' "$reqsym" |LC_ALL=C fgrep -x -f "$tmpdir"/nonstdsym); then
LC_ALL=C fgrep -qs -x -e "$dep" "$tmpdir"/versioned ||
if LC_ALL=C grep -F -qs -x -e "$dep" "$tmpdir"/stddep; then
if ! reqsym=$(printf '%s\n' "$reqsym" |LC_ALL=C grep -F -x -f "$tmpdir"/nonstdsym); then
LC_ALL=C grep -F -qs -x -e "$dep" "$tmpdir"/versioned ||
printf '%s\n' "$dep"
continue
fi
fi
# See if this dep is provided.
if [ -z "${lib##${RPM_BUILD_ROOT:-foo}/*}" ] ||
rpmquery --whatprovides --provides -- "$dep" |LC_ALL=C fgrep -qs -e "$dep = set:"; then
rpmquery --whatprovides --provides -- "$dep" |LC_ALL=C grep -F -qs -e "$dep = set:"; then
: good
else
Warning "$dep is not yet set-versioned"
LC_ALL=C fgrep -qs -x -e "$dep" "$tmpdir"/versioned ||
LC_ALL=C grep -F -qs -x -e "$dep" "$tmpdir"/versioned ||
printf '%s\n' "$dep"
continue
fi

View File

@ -126,7 +126,7 @@ ShellReq()
printf '%s\n' "$out" |
while read -r t r; do
[ "$t" = executable ] || continue
if [ -n "$prov" ] && printf '%s\n' "$prov" |fgrep -qs -x -e "$r"; then
if [ -n "$prov" ] && printf '%s\n' "$prov" |grep -F -qs -x -e "$r"; then
Verbose "$f: $r() is used before its definition"
continue
fi
@ -181,7 +181,7 @@ ShellReqEND()
dir=${dir%/*}
CheckDirProv()
{
fgrep -qs -x -e "$r" "$1/.provides.sh" || return
grep -F -qs -x -e "$r" "$1/.provides.sh" || return
}
if [ -n "${RPM_BUILD_ROOT-}" ] && CheckDirProv "$RPM_BUILD_ROOT$dir"; then
# I think that .provides.sh must provide this thingy.