Package Details: spotify-player 0.20.4-1

Git Clone URL: https://aur.archlinux.org/spotify-player.git (read-only, click to copy)
Package Base: spotify-player
Description: A command driven spotify player.
Upstream URL: https://github.com/aome510/spotify-player
Keywords: rust spotify tui
Licenses: MIT
Submitter: aome510
Maintainer: aome510 (alosarjos)
Last Packager: alosarjos
Votes: 5
Popularity: 0.015625
First Submitted: 2021-08-15 11:14 (UTC)
Last Updated: 2024-12-21 11:00 (UTC)

Required by (0)

Sources (1)

Latest Comments

1 2 Next › Last »

dibbel26 commented on 2024-12-04 11:34 (UTC)

currently global search is broken when used in combination with spotify connect. This issue has been addressed in v0.20.3 which has been released 3days ago.

This patch is working with --no-default-features. Note that if you intent to use --features notify is currently broken.


diff --git a/PKGBUILD b/PKGBUILD
index 5663df3..5a3cf26 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
 # Maintainer: Thang Pham <phamducthang1234 at gmail dot com>

 pkgname=spotify-player
-pkgver=0.20.1
-pkgrel=2
+pkgver=0.20.3
+pkgrel=1
 pkgdesc="A command driven spotify player."
 arch=('x86_64' 'aarch64' 'armv7h')
 url="https://github.com/aome510/spotify-player"
@@ -11,7 +11,7 @@ depends=('alsa-lib' 'openssl' 'dbus')
 makedepends=('cargo')
 options=('!lto')
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/aome510/spotify-player/archive/v${pkgver}.tar.gz")
-sha512sums=('3446466c5da7062b4c5c81faf87a8c5f22eb7cce661f83158c398eb0e798b56d239eb3367b32249682f88b10ec066a963fe36f6199706d0193f4e7cf855d1959')
+sha512sums=('44ab12a9dd3b905e7285ce6eaee36be51f5f20045673b959f90c992feba4fc6a277ce4a4915d7d0fcd49cd244289dd6a7bdd7d3dbc1ae27fed54d8bec6fb8cef')

 prepare() {
   cd "${pkgname}-${pkgver}"

30p87 commented on 2024-11-08 09:25 (UTC)

I was just about to comment on this issue again, but it was fixed a few hours ago, which I noticed as yay updated it right now, so thank you to whoever did that! You helped a lot of people that just want to have a basic package template to get a custom spotify-player with the least trouble possible :3

xiota commented on 2024-11-08 08:21 (UTC) (edited on 2024-11-08 08:26 (UTC) by xiota)

@alosarjos You (and the other maintainer) ignored the problem for six months, even though more than one person complained about it. It wasn't a threat, but the next step if you insisted on leaving the package in an unbuildable state. It is a well known problem with Rust. If you haven't encountered it, you haven't kept makepkg.conf up to date.

alosarjos commented on 2024-11-08 06:53 (UTC)

@xiota, AFAIK LTO issues do not affect this package, since this comes with the default feature set and not the lyrics finder that is what causes the issue. I have disabled LTO but it's not necessary for this package and honestly having people "threatening" with orphan request for something that is not required/affecting here when the package was updated 3 days ago is the last thing I was expecting.

xiota commented on 2024-11-07 21:46 (UTC)

@alosarjos Recommendations by HurricanePootis are non-controversial.

LTO needs to be disabled with Rust packages because the default on Arch is to attempt to build with LTO enabled. Using options=('!lto') is effectively the same as adding -ffat-lto-objects to CFLAGS. The difference is fat-lto-objects allows the linker to disable LTO after wasting time trying to link with it enabled.

This issue was described in comment on 2024-05-29. Six months is more than long enough to fix it. I will follow with an orphan request if this is not fixed "soon".

alosarjos commented on 2024-10-17 18:33 (UTC)

Hi @HurricanePootis

First of all thanks for the feedback, I will try to look better into it and try to update the package this weekend.

With this Rust projects though, I'm not sure if the "normal package" should include a different set of features than the default ones. That's the biggest question I have right now with the provided patch.

But still thanks a lot

HurricanePootis commented on 2024-10-15 22:21 (UTC) (edited on 2024-10-15 22:22 (UTC) by HurricanePootis)

@alosarjos, your package could do with the following changes:

  1. Add preprare() to fetch cargo deps like stated in the Rust Packaging Guidlines
  2. Change build() to follow the guidlines. --locked needs to be used instead of --frozen due to a weird dep issue with aensi.
  3. Add export CFLAGS="$CFLAGS -ffat-lto-objects" to fix LTO compiling
  4. Add a bunch of missing dependencies, like sdl2, gstreamer, libpulse, etc.

I have also created a librespot-auth package to help with authentication.

I am listing a patch here:

diff --git a/PKGBUILD b/PKGBUILD
index 01fdcce..7852536 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -7,15 +7,25 @@ pkgdesc="A command driven spotify player."
 arch=('x86_64' 'aarch64' 'armv7h')
 url="https://github.com/aome510/spotify-player"
 license=('MIT')
-depends=('alsa-lib' 'openssl' 'dbus')
+depends=('alsa-lib' 'openssl' 'dbus' 'gstreamer' 'jack' 'sdl2' 'libpulse' 'glib2' 'portaudio' 'libsixel' 'glibc' 'gcc-libs'
+    'gst-plugins-base-libs')
 makedepends=('cargo')
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/aome510/spotify-player/archive/v${pkgver}.tar.gz")
 sha512sums=('a9b753e7f956874597c6c0e47a5c9366be0d07b7f7d27c424d24e464edeaba4add862c5d82bac0c32932e9525efbe8501422ef574adb5e7400052964f7687d2c')

-build() {
+
+prepare() {
   cd "${pkgname}-${pkgver}"
+  export RUSTUP_TOOLCHAIN=stable
+  cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')"
+}

-  cargo build --locked --release --bin spotify_player --no-default-features
+build() {
+  cd "${pkgname}-${pkgver}"
+  export RUSTUP_TOOLCHAIN=stable
+  export CARGO_TARGET_DIR=target
+  export CFLAGS="$CFLAGS -ffat-lto-objects"
+  cargo build --locked --release --all-features
 }

 package() {

1093i3511 commented on 2024-10-14 19:46 (UTC) (edited on 2024-10-14 19:55 (UTC) by 1093i3511)

spotifys newly introduced OAuth2 client authentication method hasn't been implemented up so far, thus its lacks a basic functionality, for at least 2 months already.

A workaround is to retrieve a valid OAuth2 token via ncspot temporarily. cp ~/.config/ncspot/librespot/credentials.json ~/.config/spotify_player/credentials.json

librespot-auth should work as well to retrieve valid credentials https://github.com/dspearson/librespot-auth

30p87 commented on 2024-05-29 13:17 (UTC)

Linking with lyric_finder enabled fails due to the ring crate + openssl. It boils down to -flto=auto being set, which is standard since 2023. The issue was discussed in the forum and the gitlab, and heftig's verdict is: Package maintainers should disable lto per-package manually, with options=(!lto). spotify-player-full does this for example.

Crazy how nobody thinks of adding this to the rust, makepkg, creating a package or the rust package guidelines wiki article, considering it can waste a day of time easily (especially with rusts long compile times).

Technically this package does not need this change, as its default PKGBUILD does not build lyric-finder, but as it's used by most people as base to build the customized binary with, I think it would make sense to at least warn of it or include this note.

simbalarue commented on 2024-05-27 12:33 (UTC) (edited on 2024-05-27 18:57 (UTC) by simbalarue)

package fails to compile after latest update EDIT: works now