From 66ad46cef6fd035f9466ea6556135fcbe4d9c24e Mon Sep 17 00:00:00 2001 From: WolverinDEV Date: Sat, 25 Jan 2020 16:00:21 +0100 Subject: [PATCH] Fixed library generation --- server/repro/env/libs/libDataPipes.so | 1 - server/repro/env/libs/libTeaMusic.so | 1 - server/repro/env/libs/libcrypto.so | 1 - server/repro/env/libs/libjemalloc.so.2 | 1 - server/repro/env/libs/libsqlite3.so.0 | 1 - server/repro/env/libs/libssl.so | 1 - server/repro/generate_libraries.sh | 22 +++++++++++++++++++--- server/repro/package_server.sh | 3 ++- shared | 2 +- 9 files changed, 22 insertions(+), 11 deletions(-) delete mode 120000 server/repro/env/libs/libDataPipes.so delete mode 120000 server/repro/env/libs/libTeaMusic.so delete mode 120000 server/repro/env/libs/libcrypto.so delete mode 120000 server/repro/env/libs/libjemalloc.so.2 delete mode 120000 server/repro/env/libs/libsqlite3.so.0 delete mode 120000 server/repro/env/libs/libssl.so diff --git a/server/repro/env/libs/libDataPipes.so b/server/repro/env/libs/libDataPipes.so deleted file mode 120000 index 298c115..0000000 --- a/server/repro/env/libs/libDataPipes.so +++ /dev/null @@ -1 +0,0 @@ -/home/wolverindev/TeaSpeak/server/libraries/DataPipes/out/linux_amd64/lib/libDataPipes.so \ No newline at end of file diff --git a/server/repro/env/libs/libTeaMusic.so b/server/repro/env/libs/libTeaMusic.so deleted file mode 120000 index 4ab3022..0000000 --- a/server/repro/env/libs/libTeaMusic.so +++ /dev/null @@ -1 +0,0 @@ -/home/wolverindev/TeaSpeak/server/TeaSpeak/MusicBot/libs/libTeaMusic.so \ No newline at end of file diff --git a/server/repro/env/libs/libcrypto.so b/server/repro/env/libs/libcrypto.so deleted file mode 120000 index 492e54c..0000000 --- a/server/repro/env/libs/libcrypto.so +++ /dev/null @@ -1 +0,0 @@ -/home/wolverindev/TeaSpeak/server/libraries/boringssl/out/linux_amd64/crypto/libcrypto.so \ No newline at end of file diff --git a/server/repro/env/libs/libjemalloc.so.2 b/server/repro/env/libs/libjemalloc.so.2 deleted file mode 120000 index c2e9248..0000000 --- a/server/repro/env/libs/libjemalloc.so.2 +++ /dev/null @@ -1 +0,0 @@ -/home/wolverindev/TeaSpeak/server/libraries/jemalloc/out/linux_amd64/lib/libjemalloc.so.2 \ No newline at end of file diff --git a/server/repro/env/libs/libsqlite3.so.0 b/server/repro/env/libs/libsqlite3.so.0 deleted file mode 120000 index 2f47b65..0000000 --- a/server/repro/env/libs/libsqlite3.so.0 +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/x86_64-linux-gnu/libsqlite3.so.0 \ No newline at end of file diff --git a/server/repro/env/libs/libssl.so b/server/repro/env/libs/libssl.so deleted file mode 120000 index 45bf57c..0000000 --- a/server/repro/env/libs/libssl.so +++ /dev/null @@ -1 +0,0 @@ -/home/wolverindev/TeaSpeak/server/libraries/boringssl/out/linux_amd64/ssl/libssl.so \ No newline at end of file diff --git a/server/repro/generate_libraries.sh b/server/repro/generate_libraries.sh index 71736ac..b2096b1 100755 --- a/server/repro/generate_libraries.sh +++ b/server/repro/generate_libraries.sh @@ -9,6 +9,9 @@ # "libTeaMusic.so" # "libnice.so.10" # "libpcre.so.3" (only for web) +# "libgobject-2.0.so.0" (only for web) +# "libglib-2.0.so.0" (only for web) +# "libffi.so.7" [[ -z "${build_os_type}" ]] && { echo "missing build os type"; exit 1; } [[ -z "${build_os_arch}" ]] && { echo "missing build os arch"; exit 1; } @@ -65,17 +68,30 @@ if ldd "../../../environment/TeaSpeakServer" | grep -q "libnice.so.10"; then # Setting up libnice library_path=$(realpath "${library_base}/libnice/${build_os_type}_${build_os_arch}/lib/libnice.so.10") - cp "$library_path" . || { echo "failed to copy libnice.so.10"; exit 1; } + cp "$library_path" libnice.so.10 || { echo "failed to copy libnice.so.10"; exit 1; } + + + glib_libs=$(realpath "${library_base}//glibc/${build_os_type}_${build_os_arch}/lib/"*"/") + cp "$glib_libs/libgobject-2.0.so.0" . || { echo "failed to copy libgobject-2.0.so.0"; exit 1; } + cp "$glib_libs/libgmodule-2.0.so.0" . || { echo "failed to copy libgmodule-2.0.so.0"; exit 1; } + cp "$glib_libs/libglib-2.0.so.0" . || { echo "failed to copy libglib-2.0.so.0"; exit 1; } + cp "$glib_libs/libgio-2.0.so.0" . || { echo "failed to copy libgio-2.0.so.0"; exit 1; } + cp "$glib_libs/libffi.so.7" . || { echo "failed to copy libffi.so.7"; exit 1; } + + # "libgobject-2.0.so.0" (only for web) + # "libglib-2.0.so.0" (only for web) # Setting up libpcre query_system_link "libpcre.so.3" cp "${library_path}" . || { echo "failed to copy libpcre.so.3"; exit 1; } fi -# Fix rpaths +# Doing some prostprocessing +chmod 755 * for file in *.so*; do echo "Editing rpath for $file" + strip -s "$file" patchelf --set-rpath "./libs/:./" "$file" done -echo "All libraries have been linked successfully" \ No newline at end of file +echo "All libraries have been copied successfully" \ No newline at end of file diff --git a/server/repro/package_server.sh b/server/repro/package_server.sh index d502696..69e9407 100755 --- a/server/repro/package_server.sh +++ b/server/repro/package_server.sh @@ -29,7 +29,8 @@ mv TeaSpeakServerTmp TeaSpeakServer strip -s -p -v TeaSpeakServer || { echo "failed to strip symbols!"; exit 1; } patchelf --set-rpath ./libs/ TeaSpeakServer || { echo "failed to set rpath!"; exit 1; } -tar --dereference -czvf "../${BUILD_FILENAME}" * +tar --dereference -cvf - * | gzip -9 "../${BUILD_FILENAME}" || { echo "failed to package server"; exit 1; } + cd .. rm -r finalenv ./make_symbol.sh diff --git a/shared b/shared index a829f70..664b739 160000 --- a/shared +++ b/shared @@ -1 +1 @@ -Subproject commit a829f705d21267f2252d5aa84fb6213460b1ea33 +Subproject commit 664b73910c99558f9ba14dd2f06dabe67b5f2f2a