diff options
author | Slava Barinov <v.barinov@samsung.com> | 2017-03-23 11:48:27 +0300 |
---|---|---|
committer | Chan Lee <chan45.lee@samsung.com> | 2017-03-24 15:52:56 +0900 |
commit | 7aee9ce157d785d173ebbc8ef6da3c35aab5001e (patch) | |
tree | d0488f6213b3376e5776caabd9548aae39546540 /packaging | |
parent | 59a2a96e1389089216bcf930858a2cb7c8edfa4d (diff) | |
download | qemu-accel-7aee9ce157d785d173ebbc8ef6da3c35aab5001e.tar.gz qemu-accel-7aee9ce157d785d173ebbc8ef6da3c35aab5001e.tar.bz2 qemu-accel-7aee9ce157d785d173ebbc8ef6da3c35aab5001e.zip |
Stop patching libc.so with patchelf
Libraries shouldn't be patched, only executables should.
Change-Id: I3a232d4b40ae61f8b9aab15dae0f884c63b5c47c
Signed-off-by: Slava Barinov <v.barinov@samsung.com>
Diffstat (limited to 'packaging')
-rw-r--r-- | packaging/qemu-accel-aarch64.spec | 10 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7l.spec | 10 | ||||
-rw-r--r-- | packaging/qemu-accel.spec.in | 10 |
3 files changed, 15 insertions, 15 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index 461ca7a..f5095da 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -165,11 +165,11 @@ function patch_binary { local rtld=$2 # We don't need to accelerate shell scripts local filetype=`file --brief $binary` - [[ x"$filetype" == x"POSIX shell script"* ]] && continue + [[ x"$filetype" == x"POSIX shell script"* ]] && return local outfile=%{buildroot}/%{our_path}/$binary - [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue - [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue + [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && return + [ -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:/' | \ @@ -180,7 +180,7 @@ function patch_binary { exit 1 fi rm -f $outfile.data - [ "$binary" == "$rtld" ] && continue + [ "$binary" == "$rtld" ] && return patchelf --set-rpath "%{our_path}/%{_libdir}" $outfile # not all binaries have an .interp section if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then @@ -203,7 +203,7 @@ mkdir -p %{buildroot}%{our_path}%{_prefix}/lib mkdir -p %{buildroot}%{our_path}/lib for f in $(rpm -ql glibc-32bit) do - patch_binary $f /lib/${cross_ld_symlink} + cp -a $f %{buildroot}/%{our_path}/$f done # Now we have to change the ld.so name to prevent name clashing in armv7l repos diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index dd16df5..5c392e9 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -165,11 +165,11 @@ function patch_binary { local rtld=$2 # We don't need to accelerate shell scripts local filetype=`file --brief $binary` - [[ x"$filetype" == x"POSIX shell script"* ]] && continue + [[ x"$filetype" == x"POSIX shell script"* ]] && return local outfile=%{buildroot}/%{our_path}/$binary - [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue - [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue + [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && return + [ -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:/' | \ @@ -180,7 +180,7 @@ function patch_binary { exit 1 fi rm -f $outfile.data - [ "$binary" == "$rtld" ] && continue + [ "$binary" == "$rtld" ] && return patchelf --set-rpath "%{our_path}/%{_libdir}" $outfile # not all binaries have an .interp section if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then @@ -203,7 +203,7 @@ mkdir -p %{buildroot}%{our_path}%{_prefix}/lib mkdir -p %{buildroot}%{our_path}/lib for f in $(rpm -ql glibc-32bit) do - patch_binary $f /lib/${cross_ld_symlink} + cp -a $f %{buildroot}/%{our_path}/$f done # Now we have to change the ld.so name to prevent name clashing in armv7l repos diff --git a/packaging/qemu-accel.spec.in b/packaging/qemu-accel.spec.in index bb78149..77962c1 100644 --- a/packaging/qemu-accel.spec.in +++ b/packaging/qemu-accel.spec.in @@ -162,11 +162,11 @@ function patch_binary { local rtld=$2 # We don't need to accelerate shell scripts local filetype=`file --brief $binary` - [[ x"$filetype" == x"POSIX shell script"* ]] && continue + [[ x"$filetype" == x"POSIX shell script"* ]] && return local outfile=%{buildroot}/%{our_path}/$binary - [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && continue - [ -f $outfile ] && echo "WARNING: File '${outfile}' exists, ignoring" && continue + [ ! -e $binary ] && echo "WARNING: File '${binary}' not found, ignoring" && return + [ -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:/' | \ @@ -177,7 +177,7 @@ function patch_binary { exit 1 fi rm -f $outfile.data - [ "$binary" == "$rtld" ] && continue + [ "$binary" == "$rtld" ] && return patchelf --set-rpath "%{our_path}/%{_libdir}" $outfile # not all binaries have an .interp section if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then @@ -200,7 +200,7 @@ mkdir -p %{buildroot}%{our_path}%{_prefix}/lib mkdir -p %{buildroot}%{our_path}/lib for f in $(rpm -ql glibc-32bit) do - patch_binary $f /lib/${cross_ld_symlink} + cp -a $f %{buildroot}/%{our_path}/$f done # Now we have to change the ld.so name to prevent name clashing in armv7l repos |