diff --git a/autodeps/linux.prov.in b/autodeps/linux.prov.in index cdd2acc..6ceffeb 100755 --- a/autodeps/linux.prov.in +++ b/autodeps/linux.prov.in @@ -63,7 +63,7 @@ while IFS= read -r f; do done >"$tmpdir"/files 3>"$RPM_BUILD_ROOT/.files:$RPM_SUBPACKAGE_NAME" # filter file list through file(1) to append types (dereference symlinks) -if ! file -L -NF$'\t' -f "$tmpdir"/files >"$tmpdir"/files+types; then +if ! file4 -L -NF$'\t' -f "$tmpdir"/files >"$tmpdir"/files+types; then sed -n '/\t *ERROR:/p' "$tmpdir"/files+types >&2 exit 1 fi diff --git a/autodeps/linux.req.in b/autodeps/linux.req.in index 2abdb28..1c5ffee 100755 --- a/autodeps/linux.req.in +++ b/autodeps/linux.req.in @@ -97,7 +97,7 @@ done >"$tmpdir"/files \ 5>"$tmpdir"/symlinks+targets-unsorted # filter file list through file(1) to append types -if ! file -NF$'\t' -f "$tmpdir"/files >>"$tmpdir"/files+types; then +if ! file4 -NF$'\t' -f "$tmpdir"/files >>"$tmpdir"/files+types; then sed -n '/\t *ERROR:/p' "$tmpdir"/files+types >&2 exit 1 fi @@ -107,7 +107,7 @@ sort -t$'\t' -k2 <"$tmpdir"/symlinks+targets-unsorted >"$tmpdir"/symlinks+target JFS=$'\t' @RPMCONFIGDIR@/percolate "$tmpdir"/files+types "$tmpdir"/symlinks+targets # append the remainder if ! cut -f1 < "$tmpdir"/symlinks+targets | - file -NF$'\t' -f- >>"$tmpdir"/files+types + file4 -NF$'\t' -f- >>"$tmpdir"/files+types then sed -n '/\t *ERROR:/p' "$tmpdir"/files+types >&2 exit 1 diff --git a/configure.ac b/configure.ac index 8267460..8ba22e3 100644 --- a/configure.ac +++ b/configure.ac @@ -169,7 +169,7 @@ AC_PATH_PROG(__CHGRP, chgrp, /bin/chgrp, $MYPATH) AC_PATH_PROG(__CHMOD, chmod, /bin/chmod, $MYPATH) AC_PATH_PROG(__CHOWN, chown, /bin/chown, $MYPATH) AC_PATH_PROG(__CP, cp, /bin/cp, $MYPATH) -AC_PATH_PROG(__FILE, file, /usr/bin/file, $MYPATH) +AC_PATH_PROG(__FILE, file4, /usr/bin/file4, $MYPATH) AC_PATH_PROG(__GPG, gpg, /usr/bin/gpg, $MYPATH) AC_PATH_PROG(__GREP, grep, /bin/grep, $MYPATH) AC_PATH_PROG(__SUBST, subst, /usr/bin/subst, $MYPATH) diff --git a/rpm-4_0.spec b/rpm-4_0.spec index 52a81be..a932469 100644 --- a/rpm-4_0.spec +++ b/rpm-4_0.spec @@ -45,7 +45,6 @@ Requires: bzip2 >= 1:1.0.2-alt4 Requires: coreutils Requires: cpio Requires: elfutils >= 0.143-alt1 -Requires: file Requires: gcc Requires: gettext-tools Requires: glibc-devel diff --git a/scripts/brp-compress.in b/scripts/brp-compress.in index 4a6ab4c..55341b2 100755 --- a/scripts/brp-compress.in +++ b/scripts/brp-compress.in @@ -82,14 +82,14 @@ for d in `find "$RPM_BUILD_ROOT$RPM_COMPRESS_TOPDIR" -type d -name man`; do find "$d" -type f \( -name \*.gz -o -name \*.Z \) -print0 |xargs -r0 gunzip find "$d" -type f -name \*.bz2 -print0 |xargs -r0 bunzip2 # First, compress normal files. - for f in `find "$d" -type f -a \! -name whatis -print0 |xargs -r0 file |sed -rn 's/^([^[:space:]]+):[^:]*(troff or preprocessor input|ASCII.*) text.*/\1/p'`; do + for f in `find "$d" -type f -a \! -name whatis -print0 |xargs -r0 file4 |sed -rn 's/^([^[:space:]]+):[^:]*(troff or preprocessor input|ASCII.*) text.*/\1/p'`; do [ -f "$f" ] || continue if ! head -1 "$f" |grep -q '^.so '; then @RPMCONFIGDIR@/compress_files "$f" fi done # Second, convert .so links into symlinks. - for f in `find "$d" -type f -a \! -name whatis -print0 |xargs -r0 file |sed -rn 's/^([^[:space:]]+):[^:]*(troff or preprocessor input|ASCII.*) text.*/\1/p'`; do + for f in `find "$d" -type f -a \! -name whatis -print0 |xargs -r0 file4 |sed -rn 's/^([^[:space:]]+):[^:]*(troff or preprocessor input|ASCII.*) text.*/\1/p'`; do [ -f "$f" ] || continue if head -1 "$f" |grep -q '^.so '; then f_dir="${f%/*}" diff --git a/scripts/brp-debuginfo.in b/scripts/brp-debuginfo.in index da2139e..4885060 100755 --- a/scripts/brp-debuginfo.in +++ b/scripts/brp-debuginfo.in @@ -27,7 +27,7 @@ prune_tests="$(printf %s "$prune_paths" | sort -u | sed -n '/^\// s/.*/ -o -path .&/p')" find . '(' -path './.*' $prune_tests ')' -prune -o -type f -print |sort | -file -NF$'\t' -f - >.tmp/file_full +file4 -NF$'\t' -f - >.tmp/file_full sed -n -e 's/\t.* ELF .* \(executable\|shared object\), .*, stripped.*//p' <.tmp/file_full >.tmp/fstripped if [ -s .tmp/fstripped ]; then diff --git a/scripts/brp-verify_elf.in b/scripts/brp-verify_elf.in index 55869aa..1ce9c2b 100755 --- a/scripts/brp-verify_elf.in +++ b/scripts/brp-verify_elf.in @@ -133,7 +133,7 @@ export RPM_VERIFY_ELF_LDD_RPATH set -o pipefail find .$RPM_VERIFY_ELF_TOPDIR -path ./usr/lib/debug -prune -o -type f -print | -file -NF$'\t' -f - | +file4 -NF$'\t' -f - | while IFS=$'\t' read -r f t; do case " $t" in *' ELF '*' shared object, no machine, '*) continue ;; diff --git a/scripts/fixup-binconfig.in b/scripts/fixup-binconfig.in index 9863d34..19eb798 100755 --- a/scripts/fixup-binconfig.in +++ b/scripts/fixup-binconfig.in @@ -157,7 +157,7 @@ for f in "$@"; do done fi - t="$(file -b "$f")" || continue + t="$(file4 -b "$f")" || continue [ -z "${t##Bourne* shell script text*}" ] || continue diff --git a/scripts/fixup-libraries.in b/scripts/fixup-libraries.in index 9fd9d6c..eb21c78 100755 --- a/scripts/fixup-libraries.in +++ b/scripts/fixup-libraries.in @@ -20,7 +20,7 @@ # for file in "$@"; do - type=`file -b "$file"` || continue + type=`file4 -b "$file"` || continue case " $type" in *' current ar archive') chmod -v u+w,a-x,ug-s "$file" diff --git a/scripts/shell.req.in b/scripts/shell.req.in index d475414..6270574 100755 --- a/scripts/shell.req.in +++ b/scripts/shell.req.in @@ -33,7 +33,7 @@ ShellReq() local f="$1"; shift local t sh sh_num - t=$(file -bL "$f") || Fatal "${t:-$f: file type not available}" + t=$(file4 -bL "$f") || Fatal "${t:-$f: file type not available}" sh_num="$(print_sh_number_from_shebang <"$f")" case " $t" in *"Bourne-Again shell script text"*)