summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Kashkarov <m.kashkarov@partner.samsung.com>2019-08-28 22:45:58 +0300
committerMikhail Kashkarov <m.kashkarov@partner.samsung.com>2019-09-05 13:50:59 +0300
commit7773fcfe77b28e9a0e75e49bb191e7c25a2e38f5 (patch)
treedcb8118351aa84a455a59165dc3237bba88d3f27
parent2bb11d461315bc0375d6aed00bdc7ffe910dbd13 (diff)
downloadqemu-accel-7773fcfe77b28e9a0e75e49bb191e7c25a2e38f5.tar.gz
qemu-accel-7773fcfe77b28e9a0e75e49bb191e7c25a2e38f5.tar.bz2
qemu-accel-7773fcfe77b28e9a0e75e49bb191e7c25a2e38f5.zip
[S] Remove dead block with host information checking
Block with grep command was never executed due to missed whitespace and undefined HOST_ARCH, so parsing .(ro)data content was wasted. Moreover, when this routine is enable - we have warnings for about 30% of total packages count. Just drop it to speed up build. Change-Id: I0706d247ff1eb40324555ed6c1c4400a6ea46511
-rw-r--r--packaging/qemu-accel-aarch64.spec10
-rw-r--r--packaging/qemu-accel-armv7hl.spec10
-rw-r--r--packaging/qemu-accel-armv7l.spec10
-rw-r--r--packaging/qemu-accel.spec.in10
4 files changed, 4 insertions, 36 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec
index 3df2138..621343d 100644
--- a/packaging/qemu-accel-aarch64.spec
+++ b/packaging/qemu-accel-aarch64.spec
@@ -236,17 +236,9 @@ function patch_binary {
[[ -f $outfile ]] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
- objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
- grep ': ' | grep -v 'file format' | grep -v 'Contents of section' | \
- xxd -g4 -r - $outfile.data
- if grep -q "%{HOST_ARCH}"$outfile.data; then
- echo "ERROR file $binary leaks host information into the guest"
- exit 1
- fi
- rm -f $outfile.data
[ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{emul_path}/%{_libdir}" $outfile
-# not all binaries have an .interp section
+ # not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
patchelf --set-interpreter %{emul_path}$rtld $outfile
fi
diff --git a/packaging/qemu-accel-armv7hl.spec b/packaging/qemu-accel-armv7hl.spec
index 7f8e7db..0af6571 100644
--- a/packaging/qemu-accel-armv7hl.spec
+++ b/packaging/qemu-accel-armv7hl.spec
@@ -236,17 +236,9 @@ function patch_binary {
[[ -f $outfile ]] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
- objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
- grep ': ' | grep -v 'file format' | grep -v 'Contents of section' | \
- xxd -g4 -r - $outfile.data
- if grep -q "%{HOST_ARCH}"$outfile.data; then
- echo "ERROR file $binary leaks host information into the guest"
- exit 1
- fi
- rm -f $outfile.data
[ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{emul_path}/%{_libdir}" $outfile
-# not all binaries have an .interp section
+ # not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
patchelf --set-interpreter %{emul_path}$rtld $outfile
fi
diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec
index d40458d..70012d1 100644
--- a/packaging/qemu-accel-armv7l.spec
+++ b/packaging/qemu-accel-armv7l.spec
@@ -236,17 +236,9 @@ function patch_binary {
[[ -f $outfile ]] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
- objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
- grep ': ' | grep -v 'file format' | grep -v 'Contents of section' | \
- xxd -g4 -r - $outfile.data
- if grep -q "%{HOST_ARCH}"$outfile.data; then
- echo "ERROR file $binary leaks host information into the guest"
- exit 1
- fi
- rm -f $outfile.data
[ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{emul_path}/%{_libdir}" $outfile
-# not all binaries have an .interp section
+ # not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
patchelf --set-interpreter %{emul_path}$rtld $outfile
fi
diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in
index ff25752..e5fc9b8 100644
--- a/packaging/qemu-accel.spec.in
+++ b/packaging/qemu-accel.spec.in
@@ -233,17 +233,9 @@ function patch_binary {
[[ -f $outfile ]] && echo "WARNING: File '${outfile}' exists, ignoring" && return
mkdir -p ${outfile%/*}
cp -aL $binary $outfile
- objdump -s -j .rodata -j .data $outfile | sed 's/^ *\([a-z0-9]*\)/\1:/' | \
- grep ': ' | grep -v 'file format' | grep -v 'Contents of section' | \
- xxd -g4 -r - $outfile.data
- if grep -q "%{HOST_ARCH}"$outfile.data; then
- echo "ERROR file $binary leaks host information into the guest"
- exit 1
- fi
- rm -f $outfile.data
[ "$binary" == "$rtld" ] && return
patchelf --set-rpath "%{emul_path}/%{_libdir}" $outfile
-# not all binaries have an .interp section
+ # not all binaries have an .interp section
if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then
patchelf --set-interpreter %{emul_path}$rtld $outfile
fi