diff options
author | Yury Usishchev <y.usishchev@samsung.com> | 2015-12-09 12:24:03 +0300 |
---|---|---|
committer | Dongkyun, Son <dongkyun.s@samsung.com> | 2016-01-09 18:03:16 +0900 |
commit | acae6f1f8560a106c71f7269e4e351e93107e6fb (patch) | |
tree | 3969eb7756882545c70d79633986f75247ef6a97 | |
parent | 68f6cbfb59adc039b79916b768ddf6de54f2ace6 (diff) | |
download | qemu-accel-acae6f1f8560a106c71f7269e4e351e93107e6fb.tar.gz qemu-accel-acae6f1f8560a106c71f7269e4e351e93107e6fb.tar.bz2 qemu-accel-acae6f1f8560a106c71f7269e4e351e93107e6fb.zip |
remove unnecessary spam and add dump of accelerated binaries and packages
-rw-r--r-- | packaging/qemu-accel-aarch64.spec | 19 | ||||
-rw-r--r-- | packaging/qemu-accel-armv7l.spec | 19 | ||||
-rw-r--r-- | packaging/qemu-accel.spec | 19 |
3 files changed, 48 insertions, 9 deletions
diff --git a/packaging/qemu-accel-aarch64.spec b/packaging/qemu-accel-aarch64.spec index 81f064d..dab378e 100644 --- a/packaging/qemu-accel-aarch64.spec +++ b/packaging/qemu-accel-aarch64.spec @@ -79,6 +79,7 @@ This package is used in qemu-accel to accelerate python. %build %install +set +x gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'` # just like it is determided in python.spec python_version=`python --version |& sed -ne '1s/.* //p' | head -c 3` @@ -121,6 +122,17 @@ do binaries="$binaries $executable `ldd $executable | sed -n 's,.*=> \(/[^ ]*\) .*,\1,p'`" done +## dump list of binaries and list of packages +echo "### binaries to accelerate ###" +echo $binaries | sed -e 's/[^ ]*\///g;s/[^ ]*.so[^ ]* \?//g' +echo "### packages that are used ###" +for bin in $binaries +do + rpm -qf $bin +done | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u +echo "" + + for binary in $binaries do outfile=%{buildroot}/%{our_path}/$binary @@ -136,10 +148,10 @@ do fi rm -f $outfile.data [ "$binary" == "$LD" ] && continue - patchelf --debug --set-rpath "%{our_path}/%{libdir}" $outfile + patchelf --set-rpath "%{our_path}/%{libdir}" $outfile # not all binaries have an .interp section - if patchelf --print-interpreter $outfile; then - patchelf --debug --set-interpreter %{our_path}$LD $outfile + if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then + patchelf --set-interpreter %{our_path}$LD $outfile fi done @@ -247,6 +259,7 @@ ln -sf %{our_path}%{_bindir}/g++ %{buildroot}%{our_path}/home/abuild/rpmbuild/BU # support /lib/cpp ln -sf %{our_path}%{_bindir}/cpp %{buildroot}%{our_path}/usr/lib/cpp +set -x # update baselibs.conf, overwrite LTO plugin sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}%{_libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf diff --git a/packaging/qemu-accel-armv7l.spec b/packaging/qemu-accel-armv7l.spec index 964dca5..df640a7 100644 --- a/packaging/qemu-accel-armv7l.spec +++ b/packaging/qemu-accel-armv7l.spec @@ -79,6 +79,7 @@ This package is used in qemu-accel to accelerate python. %build %install +set +x gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'` # just like it is determided in python.spec python_version=`python --version |& sed -ne '1s/.* //p' | head -c 3` @@ -121,6 +122,17 @@ do binaries="$binaries $executable `ldd $executable | sed -n 's,.*=> \(/[^ ]*\) .*,\1,p'`" done +## dump list of binaries and list of packages +echo "### binaries to accelerate ###" +echo $binaries | sed -e 's/[^ ]*\///g;s/[^ ]*.so[^ ]* \?//g' +echo "### packages that are used ###" +for bin in $binaries +do + rpm -qf $bin +done | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u +echo "" + + for binary in $binaries do outfile=%{buildroot}/%{our_path}/$binary @@ -136,10 +148,10 @@ do fi rm -f $outfile.data [ "$binary" == "$LD" ] && continue - patchelf --debug --set-rpath "%{our_path}/%{libdir}" $outfile + patchelf --set-rpath "%{our_path}/%{libdir}" $outfile # not all binaries have an .interp section - if patchelf --print-interpreter $outfile; then - patchelf --debug --set-interpreter %{our_path}$LD $outfile + if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then + patchelf --set-interpreter %{our_path}$LD $outfile fi done @@ -247,6 +259,7 @@ ln -sf %{our_path}%{_bindir}/g++ %{buildroot}%{our_path}/home/abuild/rpmbuild/BU # support /lib/cpp ln -sf %{our_path}%{_bindir}/cpp %{buildroot}%{our_path}/usr/lib/cpp +set -x # update baselibs.conf, overwrite LTO plugin sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}%{_libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf diff --git a/packaging/qemu-accel.spec b/packaging/qemu-accel.spec index a169fca..cd81789 100644 --- a/packaging/qemu-accel.spec +++ b/packaging/qemu-accel.spec @@ -76,6 +76,7 @@ This package is used in qemu-accel to accelerate python. %build %install +set +x gcc_version=`gcc --version | sed -ne '1s/[^0-9]*\(\([0-9]\.\?\)*\).*/\1/p'` # just like it is determided in python.spec python_version=`python --version |& sed -ne '1s/.* //p' | head -c 3` @@ -118,6 +119,17 @@ do binaries="$binaries $executable `ldd $executable | sed -n 's,.*=> \(/[^ ]*\) .*,\1,p'`" done +## dump list of binaries and list of packages +echo "### binaries to accelerate ###" +echo $binaries | sed -e 's/[^ ]*\///g;s/[^ ]*.so[^ ]* \?//g' +echo "### packages that are used ###" +for bin in $binaries +do + rpm -qf $bin +done | grep -v "not owned" | sed -e "s/-[0-9].*//g" | sort -u +echo "" + + for binary in $binaries do outfile=%{buildroot}/%{our_path}/$binary @@ -133,10 +145,10 @@ do fi rm -f $outfile.data [ "$binary" == "$LD" ] && continue - patchelf --debug --set-rpath "%{our_path}/%{libdir}" $outfile + patchelf --set-rpath "%{our_path}/%{libdir}" $outfile # not all binaries have an .interp section - if patchelf --print-interpreter $outfile; then - patchelf --debug --set-interpreter %{our_path}$LD $outfile + if patchelf --print-interpreter $outfile 1>/dev/null 2>/dev/null; then + patchelf --set-interpreter %{our_path}$LD $outfile fi done @@ -244,6 +256,7 @@ ln -sf %{our_path}%{_bindir}/g++ %{buildroot}%{our_path}/home/abuild/rpmbuild/BU # support /lib/cpp ln -sf %{our_path}%{_bindir}/cpp %{buildroot}%{our_path}/usr/lib/cpp +set -x # update baselibs.conf, overwrite LTO plugin sed -i -e "s,#PLUGIN_POSTIN#,ln -sf %{our_path}%{_libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf sed -i -e "s,#PLUGIN_POSTUN#,ln -sf liblto_plugin.so.0 %{libdir}/gcc/%{target_arch}/${gcc_version}/liblto_plugin.so," %{_sourcedir}/baselibs.conf |