From d0eeca32d13622f4745f72e8c4da3966329e1c01 Mon Sep 17 00:00:00 2001 From: Veloman Yunkan Date: Fri, 25 Oct 2024 16:03:57 +0400 Subject: [PATCH] Revert "libssl is embedded in the kiwix-desktop appimage" This reverts commit dee57f131c2407b3efeada54ae3aa506b47a89a0. --- scripts/create_kiwix-desktop_appImage.sh | 69 +----------------------- 1 file changed, 2 insertions(+), 67 deletions(-) diff --git a/scripts/create_kiwix-desktop_appImage.sh b/scripts/create_kiwix-desktop_appImage.sh index 15d4fc3d..f1d9e4ef 100755 --- a/scripts/create_kiwix-desktop_appImage.sh +++ b/scripts/create_kiwix-desktop_appImage.sh @@ -25,41 +25,6 @@ rm -f $APPDIR/usr/lib/libmagic.so* cp -a /usr/$SYSTEMLIBDIR/nss $APPDIR/usr/lib # Copy libthai.so (see kiwix-desktop issue#1016) cp -a /usr/$SYSTEMLIBDIR/libthai.so* $APPDIR/usr/lib - -# Copy ssl libs so that the appimage runs on newer systems -# that use a backward incompatible version of openssl -cp /usr/$SYSTEMLIBDIR/lib{crypto,ssl}.so.1.1 $APPDIR/usr/lib - -patch_rodata() -{ - local elffile=$1 - local sedscript=$2 - local rodatafile=$elffile.rodata - objcopy --dump-section .rodata="$rodatafile" "$elffile" - sed -i "$sedscript" "$rodatafile" - objcopy --update-section .rodata="$rodatafile" "$elffile" - rm $rodatafile -} - -# copy and patch a couple of libs depending on ssl functionalty before -# linuxdeployqt copies and modifies them whereupon the patch_rodata procedure -# stops working on them correctly -cp -rL /usr/$SYSTEMLIBDIR/{libgnutls.so.30,libQt5Network.so.5} $APPDIR/usr/lib - -# patch libQt5Network.so so that if it fails to load certificates from -# system paths the last path that it tries points to the certificate bundle -# included with the appimage - -# !!! crt_bundle_new_path must have the same length as crt_bundle_old_path -crt_bundle_old_path=/usr/local/share/certs/ca-root-nss.crt -crt_bundle_new_path=/tmp/cert_bundle_provided_by_kiwix.crt -# !!! crt_bundle_new_path must have the same length as crt_bundle_old_path - -libQtNetworkPatchingSedScript="s|$crt_bundle_old_path|$crt_bundle_new_path|" - -patch_rodata $APPDIR/usr/lib/libQt5Network.so.5 "$libQtNetworkPatchingSedScript" - - cp $ICONFILE $APPDIR/usr/share/icons/hicolor/48x48/apps/kiwix-desktop.svg mkdir -p $APPDIR/usr/share/applications cp $DESKTOPFILE $APPDIR/usr/share/applications/kiwix-desktop.desktop @@ -78,35 +43,5 @@ chmod u+x linuxdeployqt ./linuxdeployqt $APPDIR/usr/bin/kiwix-desktop -bundle-non-qt-libs -extra-plugins=imageformats,iconengines # Fix the RPATH of QtWebEngineProcess [TODO] Fill a issue ? patchelf --set-rpath '$ORIGIN/../lib' $APPDIR/usr/libexec/QtWebEngineProcess - -cp $DESKTOPFILE $APPDIR/kiwix-desktop.desktop -cp $ICONFILE $APPDIR/ -cp $ICONFILE $APPDIR/.DirIcon - -rm "$APPDIR"/AppRun - -cat > "$APPDIR"/AppRun <<'END' -#!/usr/bin/env bash - -mydir=$(dirname "$0") -mydir=$(cd "$mydir" && pwd) - -crt_path=??? # this is set by postprocessing via sed - -if [ ! -e "$crt_path" ] -then - ln -s "$mydir"/etc/ssl/certs/ca-certificates.crt "$crt_path" - trap "rm '$crt_path'" EXIT -fi - -"$mydir"/usr/bin/kiwix-desktop "$@" -END - -sed -i "s#^crt_path=.*#crt_path=$crt_bundle_new_path#" "$APPDIR"/AppRun - -chmod 0755 "$APPDIR"/AppRun - -wget --continue https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage -chmod u+x appimagetool-x86_64.AppImage - -./appimagetool-x86_64.AppImage AppDir Kiwix-"$VERSION"-x86_64.AppImage +# Build the image. +./linuxdeployqt $APPDIR/usr/share/applications/kiwix-desktop.desktop -bundle-non-qt-libs -extra-plugins=imageformats,iconengines -appimage