From d1680f2adc5c126cc6f261f52679df71c23a6ca3 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 13:57:34 +0100 Subject: [PATCH 01/11] Update toxcore version to 0.2.2 --- src/freedombone-app-tox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index f35d4cac..bff4aa67 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -35,7 +35,7 @@ TOX_PORT=33445 # upstream is https://github.com/TokTok/c-toxcore TOXCORE_REPO="https://github.com/bashrc/toxcore" -TOXCORE_COMMIT='987ad5eac173442d6ad2d5cd80c2da763a815a9a' +TOXCORE_COMMIT='7d399cedcfd20f0d91a8caf386ae3c63f4dcf285' TOXID_REPO="https://github.com/bashrc/toxid" TOX_BOOTSTRAP_ID_FILE=/var/lib/tox-bootstrapd/pubkey.txt From 47b848e0f18ad3f1ad903e1d0938f3eb02b8831e Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 14:27:41 +0100 Subject: [PATCH 02/11] Bump toxic commit --- src/freedombone-app-tox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index bff4aa67..7138cd82 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -47,7 +47,7 @@ TOX_NODES= # '144.76.60.215,2a01:4f8:191:64d6::1,33445,04119E835DF3E78BACF0F84235B300546AF8B936F035185E2A8E9E0A67C8924F,sonOfRa,DE' #) TOXIC_REPO="https://github.com/Tox/toxic" -TOXIC_COMMIT='5cc83a7cb584886d90d7da15e8398215fed0d315' +TOXIC_COMMIT='68ce17a57fd05599968a299e5dc516e183ebcf75' TOXIC_FILE=/usr/local/bin/toxic QTOX_REPO="https://github.com/bashrc/qTox" From af4755f2daabb21c7eb9743164651ecc9989dc16 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 15:20:32 +0100 Subject: [PATCH 03/11] Start seconds counter at start of function --- src/freedombone-app-tox | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index 7138cd82..e421a8f2 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -426,6 +426,7 @@ function install_tox_client { } function mesh_tox_node { + SECONDS=0 # obtain commits from the main file TOXCORE_COMMIT_MAIN=$(grep "TOXCORE_COMMIT=" "/usr/share/${PROJECT_NAME}/apps/${PROJECT_NAME}-app-tox" | head -n 1 | awk -F "'" '{print $2}') if [ ${#TOXCORE_COMMIT_MAIN} -gt 10 ]; then @@ -533,7 +534,6 @@ EOF systemctl enable tox-bootstrapd.service fi - SECONDS=0 if [ ! -f "$rootdir/usr/local/bin/tox-bootstrapd" ]; then duration=$SECONDS echo $"Toxcore compile failed at $((duration / 60)) minutes and $((duration % 60)) seconds elapsed." From 61f30f803657a1833c00be299ba08a9103e84d84 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 17:23:00 +0100 Subject: [PATCH 04/11] Toxic needs libpng --- src/freedombone-app-tox | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index e421a8f2..4cdd7767 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -525,7 +525,7 @@ EOF fi # shellcheck disable=SC2086 - cp $rootdir/usr/local/lib/libtoxcore* "$rootdir/usr/lib/" + cp -l $rootdir/usr/local/lib/libtoxcore* "$rootdir/usr/lib/" cp "${rootdir}${INSTALL_DIR}/toxcore/other/bootstrap_daemon/tox-bootstrapd.service" "$rootdir/etc/systemd/system/" sed -i 's|ExecStart=.*|ExecStart=/usr/local/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf|g' "$rootdir/etc/systemd/system/tox-bootstrapd.service" if [ "${rootdir}" ]; then @@ -690,11 +690,11 @@ function mesh_tox_client { if [ "${rootdir}" ]; then chroot "${rootdir}" apt-get -yq install libncursesw5-dev libconfig-dev libqrencode-dev chroot "${rootdir}" apt-get -yq install libcurl4-openssl-dev libvpx-dev libopenal-dev - chroot "${rootdir}" apt-get -yq install libqrencode-dev + chroot "${rootdir}" apt-get -yq install libqrencode-dev libpng-dev else apt-get -yq install libncursesw5-dev libconfig-dev libqrencode-dev apt-get -yq install libcurl4-openssl-dev libvpx-dev libopenal-dev - apt-get -yq install libqrencode-dev + apt-get -yq install libqrencode-dev libpng-dev fi TEMP_SCRIPT_NAME=fbtmp728353.sh From bba4d5511802bf751f25818945ead260b9518a1c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 19:03:49 +0100 Subject: [PATCH 05/11] Second ncurses library for toxic --- src/freedombone-app-tox | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index 4cdd7767..b2e3bd63 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -510,7 +510,8 @@ function mesh_tox_node { chroot "${rootdir}" /bin/bash -x < Date: Fri, 20 Apr 2018 19:17:48 +0100 Subject: [PATCH 06/11] libalut needed by toxic --- src/freedombone-app-tox | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index b2e3bd63..6355fb74 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -692,11 +692,11 @@ function mesh_tox_client { if [ "${rootdir}" ]; then chroot "${rootdir}" apt-get -yq install libncursesw5-dev libconfig-dev libqrencode-dev chroot "${rootdir}" apt-get -yq install libcurl4-openssl-dev libvpx-dev libopenal-dev - chroot "${rootdir}" apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev + chroot "${rootdir}" apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev libalut-dev else apt-get -yq install libncursesw5-dev libconfig-dev libqrencode-dev apt-get -yq install libcurl4-openssl-dev libvpx-dev libopenal-dev - apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev + apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev libalut-dev fi TEMP_SCRIPT_NAME=fbtmp728353.sh From a086e8768b12cec749535c70e1d98c31e7f42d90 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 19:23:50 +0100 Subject: [PATCH 07/11] Enable or disable toxic desktop notify --- src/freedombone-app-tox | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index 6355fb74..3b829c38 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -693,10 +693,13 @@ function mesh_tox_client { chroot "${rootdir}" apt-get -yq install libncursesw5-dev libconfig-dev libqrencode-dev chroot "${rootdir}" apt-get -yq install libcurl4-openssl-dev libvpx-dev libopenal-dev chroot "${rootdir}" apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev libalut-dev + chroot "${rootdir}" apt-get -yq install libnotify-dev + toxic_disable_notify=0 else apt-get -yq install libncursesw5-dev libconfig-dev libqrencode-dev apt-get -yq install libcurl4-openssl-dev libvpx-dev libopenal-dev apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev libalut-dev + toxic_disable_notify=1 fi TEMP_SCRIPT_NAME=fbtmp728353.sh @@ -713,6 +716,7 @@ function mesh_tox_client { echo 'fi'; echo "cd $INSTALL_DIR/toxic"; echo "git checkout $TOXIC_COMMIT -b $TOXIC_COMMIT"; + echo "export DISABLE_DESKTOP_NOTIFY=$toxic_disable_notify"; echo 'make'; echo 'if [ ! "$?" = "0" ]; then'; echo ' exit 1'; From c237bfb8c536078dd60dc70671379f0ada5368d2 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 19:24:43 +0100 Subject: [PATCH 08/11] condition --- src/freedombone-app-tox | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index 3b829c38..f8cf7ca2 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -717,8 +717,7 @@ function mesh_tox_client { echo "cd $INSTALL_DIR/toxic"; echo "git checkout $TOXIC_COMMIT -b $TOXIC_COMMIT"; echo "export DISABLE_DESKTOP_NOTIFY=$toxic_disable_notify"; - echo 'make'; - echo 'if [ ! "$?" = "0" ]; then'; + echo 'if ! make; then'; echo ' exit 1'; echo 'fi'; echo 'make install'; From 15d71bafb992d7ef30b5331f2b38c98550ea7712 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 19:40:41 +0100 Subject: [PATCH 09/11] Extra toxic compile options --- src/freedombone-app-tox | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index f8cf7ca2..18e2de00 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -693,12 +693,12 @@ function mesh_tox_client { chroot "${rootdir}" apt-get -yq install libncursesw5-dev libconfig-dev libqrencode-dev chroot "${rootdir}" apt-get -yq install libcurl4-openssl-dev libvpx-dev libopenal-dev chroot "${rootdir}" apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev libalut-dev - chroot "${rootdir}" apt-get -yq install libnotify-dev + chroot "${rootdir}" apt-get -yq install libnotify-dev python3-dev toxic_disable_notify=0 else apt-get -yq install libncursesw5-dev libconfig-dev libqrencode-dev apt-get -yq install libcurl4-openssl-dev libvpx-dev libopenal-dev - apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev libalut-dev + apt-get -yq install libqrencode-dev libpng-dev libncurses5-dev libalut-dev python3-dev toxic_disable_notify=1 fi @@ -717,6 +717,9 @@ function mesh_tox_client { echo "cd $INSTALL_DIR/toxic"; echo "git checkout $TOXIC_COMMIT -b $TOXIC_COMMIT"; echo "export DISABLE_DESKTOP_NOTIFY=$toxic_disable_notify"; + echo "export DISABLE_AV=$toxic_disable_notify"; + echo "export DISABLE_X11=$toxic_disable_notify"; + echo "export DISABLE_SOUND_NOTIFY=$toxic_disable_notify"; echo 'if ! make; then'; echo ' exit 1'; echo 'fi'; From 1308cf69ac26a7626ff5a3fa5ef6026df73f126c Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Fri, 20 Apr 2018 20:41:41 +0100 Subject: [PATCH 10/11] Fix toxcore installation --- src/freedombone-app-tox | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index 18e2de00..c8c1791a 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -479,13 +479,13 @@ function mesh_tox_node { chroot "${rootdir}" apt-get -yq install automake checkinstall check git yasm chroot "${rootdir}" apt-get -yq install libsodium18 libsodium-dev libcap2-bin chroot "${rootdir}" apt-get -yq install libconfig9 libconfig-dev autoconf - chroot "${rootdir}" apt-get -yq install libopus-dev libvpx-dev + chroot "${rootdir}" apt-get -yq install libopus-dev libvpx-dev cmake else apt-get -yq install build-essential libtool autotools-dev apt-get -yq install automake checkinstall check git yasm apt-get -yq install libsodium18 libsodium-dev libcap2-bin apt-get -yq install libconfig9 libconfig-dev autoconf - apt-get -yq install libopus-dev libvpx-dev + apt-get -yq install libopus-dev libvpx-dev cmake fi if [ ! -d "${rootdir}${INSTALL_DIR}" ]; then @@ -509,18 +509,20 @@ function mesh_tox_node { if [ "${rootdir}" ]; then chroot "${rootdir}" /bin/bash -x < Date: Fri, 20 Apr 2018 20:44:57 +0100 Subject: [PATCH 11/11] tox upgrades --- src/freedombone-app-tox | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/freedombone-app-tox b/src/freedombone-app-tox index c8c1791a..1f7adfa1 100755 --- a/src/freedombone-app-tox +++ b/src/freedombone-app-tox @@ -184,8 +184,12 @@ function upgrade_tox { if [[ $(commit_has_changed "$INSTALL_DIR/toxcore" "toxcore commit" "$TOXCORE_COMMIT") == "1" ]]; then cd "$INSTALL_DIR/toxcore" || exit 53683563 sed -i 's|ExecStart=.*|ExecStart=/usr/local/bin/tox-bootstrapd --config /etc/tox-bootstrapd.conf|g' "$rootdir/etc/systemd/system/tox-bootstrapd.service" - autoreconf -i - ./configure --enable-daemon + ./autogen.sh + if [ ! -d "$INSTALL_DIR/toxcore/_build" ]; then + mkdir "$INSTALL_DIR/toxcore/_build" + fi + cd "$INSTALL_DIR/toxcore/_build" || return + cmake .. make make install systemctl daemon-reload