Hutspot for aarch64?

Well, one could go ‘the hard way’. But that would require making the project subdirs based (or the like) and adding the open ssl locally to the project. Then you could install it to /usr/share/appname/lib … I only have one project like that (with a small c++ library) and that’s manageable. It’s doable, for sure. I just wouldn’t do it :slight_smile:

Just to illustrate:
Excerpt top project:

SUBDIRS += \
    libsynth \
    simplesynth

Excerpt the lib pro file:

CONFIG += staticlib
target.path=/usr/share/harbour-simplesynth/lib

Excerpt the main app pro file:

LIBS += -L$$OUT_PWD/../libsynth/ -lsynthetizer
QMAKE_RPATHDIR += /usr/share/$${TARGET}/lib
SOURCES += src/harbour-simplesynth.cpp \
    src/synthesizer.cpp
# Headers
HEADERS += 	../libsynth/include/libsynth.hpp \
                src/synthesizer.h
INCLUDEPATH += ../libsynth/ \
                src/

But I’m really hoping the author of the package responds.

If support for OpenSSL 1.0 is dropped in 4.3, than this “fix” wouldn’t work anymore, right? So Hutspot basically needs to be rewritten

It’s not a complete rewrite, just those with use of the dh->pub_key access style. So the structs member, you have to use the method. I don’t know how much work it is, but it shouldn’t be more than an hour or two. If I wasn’t debugging other stuff AND had a spotify account (don’t use it) I’d do it.

I tried to rewrite all of the dh->pub_key and dh->priv_key according to the OpenSSL manual. I’m now getting conversion erros, which I’m trying to fix, but this is very difficult for me. Also I don’t now how to replace dh->p=… and dh->g=… since there are no DH_set0_… for these (or I just don’t understand this right).

This is really non-trivial stuff. I’m a bit snowed in at the moment, but I’ll have a look as soon as I can find some time …

1 Like

The issue led to patches https://github.com/sailfish-spotify/hutspot/issues/116

Someone actually did rewrite the priv_key stuff, yeah!

changes came from Scarrough · GitHub

I implemented those and PR: https://github.com/sailfish-spotify/hutspot/pull/118

A build for you to test:
https://build.sailfishos.org/repositories/home:poetaster:hutspot/hutspot

Please let me know if this is working for you. I don’t even have a spotify account, let alone a premiums account!

3 Likes

I built it myself, and after swapping to the new WebView i can log in and control playback on another device. I still have issues navigating the app, but i think that is the way it was. Throwing a PR at @poetaster soon.

1 Like

Thank you very much! I’ve tested the app and it works perfectly fine!
Now we only need someone to re-package librespot for aarch64 (unfortunately I’m not able to do this myself…)

Thanks @poetaster , and I want to confirm that your build of Hutspot also works on the XA2. I’m very grateful for your efforts. After starting librespot from the terminal and starting Hutspot, I could instantly start playing music on my XA2. I’ve missed that functionality for months, great that it’s back!

Thanks! I’ve had enough positive feedback that I’m willing to push it to chum and see if I can support it.

3 Likes

Thank you for your effort, I really apreciate that

If someone would suggest the correct Sailjail permissions?

Something like:

Permissions=UserDirs;RemovableMedia;Audio,Internet

Thanks for the built! Appreciate your effort! It is working flawlessly (X10II, SF 4.4.0.68). In order to log in the setting authorize using browser (my translation) needed to be enabled. Using browser for log in worked without any problems. Spotify Connect devices work well. Now I am waiting for Librespot for 64bit.

You can actually install Librespot for 64-bit, you can either compile it yourself (which is quite easy, I have done it myself) or use the package someone built.

You can find instructions to compile librespot as well as a prebuilt aarch64-RPM in this thread:
Instruction: Cargo install error: "This is the stub cargo. If you see this, scratchbox2 is not working" - #5 by Levone1

Pre-built RPM: Cargo install error: "This is the stub cargo. If you see this, scratchbox2 is not working" - #10 by Levone1

I have Hutspot and Librespot running on my Xperia 10 III and use it everyday on my 2-hour-travel to school, and it works (almost) flawless!

I installed the pre-built rpm you have linked, however when i go into the Hutspot settings it says Librespot not available, that’s starting it from the icon or through terminal.

Do i need to do anything else other than install the rpm, i did read online about starting a librespot service but it say it does not exist? Or has anyone else got another rpm i could try?

Got a Xperia 10 III too, so you know

For some reason, the integration of Librespot in Hutspot doesn’t work anymore, I have also had issues with this, even on the 32-Bit version.

However, there is a simple solution: just start librespot from the Terminal everytime you want to use Hutspot.

I personally have written a small Bash-Script for that, so I don’t have to type the whole comman everytime. I have used this command to start Librespot:

librespot --cache /home/defaultuser/.cache/librespot --username <Your Username here> -b 320 -n Xperia10III --backend pulseaudio

(Sorry for the bad formatting, I am writing this on my phone)
You can of course customise the command to your needs, for that I recommend reading the official Librespot-Docs.

After you have executed the command in the terminal, switch back to Hutspot and you will see your device in the devices-section

Thanks for the command, i did try it with the pre-built rpm of Librespot, however it throws an error below, which I’m guessing is a problem with the --backend pulseaudio:

thread ‘main’ panicked at ‘Invalid backend’, src/main.rs:462:53

Do i need cargo installed on my device to be able to use it, sorry if this is something simple I’m doing wrong haha

This sounds like the person who packaged this did “forget” some options when he built it. You could try without --backend, but I don’t know if this will work. If not, I’m afraid you have to compile it yoursrlf (but don’t worry, it’s not too hard).

Cargo you only need for compiling it yourself, otherwise it has nothing to do with Librespot

Try without --backend and report it back here, if it doesn’t work I can write you instructions on how to build it yourself

Thanks, tried without it, gets further in the process but then errors out again. So probably best if i build it myself if you could help out.

Also if i build it myself, if there does come a point where an updated package is released in chum or similar would that update it in the future?

No, as Librespot is not in Chum. If you build it yourself, you basically download only the source-code which you then compile into an executable (very simple explanation)

Ok then, I will try my best to guide you through the steps. For the compilation process I used ressources from

I have a detailed description at home, but I’m currently at work so I’m trying to explain this to you out of my memory. I hope I don’t forget something, otherwise you will need to wait a few hours…

  • Step 1: Install the tools required to build RUST-programs on your phone: Visit this site on your phone and copy the command into your terminal

  • Step 2: Install git (I don’t remember if it is installed by default): devel-su pkcon install git if it doesn’t find the package, try devel-su pkcon refresh and then try it again

  • Step 3: Clone the official librespot-repository: git clone https://github.com/librespot-org/librespot.git

  • Step 4: Change into the downloaded folder: cd librespot/

  • Step 5: Install gcc as it is required for the build process if I remember correctly: devel-su pkcon install gcc

  • Step 6: Build librespot: cargo build --release --features "alsa-backend pulseaudio-backend"

After that you can execute it with /home/defaultuser/librespot/target/release/librespot --cache /home/defaultuser/.cache/librespot --username <Your Username here> -b 320 -n Xperia10III --backend pulseaudio

If you encounter any problems on the way, just post them here and I will try to help