Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Systemd service looks for binary in /usr/bin but cargo installs to ~/.cargo/bin. #1286

Open
1 of 6 tasks
benjaminpotter opened this issue May 28, 2024 · 0 comments
Open
1 of 6 tasks
Labels
bug A functionality or parts of a program that do not work as intended

Comments

@benjaminpotter
Copy link

Description

The service file found at contrib/spotifyd.service tries to find the spotifyd binary from /usr/bin but installation instructions cause the binary to install at ~/.cargo/bin. When the user tries to enable the service via systemctl --user enable spotifyd.service --now it fails to start the service.

To Reproduce

  1. Clone the repository.
  2. Follow the installation instructions from the wiki (cargo build --release && cargo install --path . --locked).
  3. Follow the systemd instructions from the wiki (cp contrib/spotifyd.service ~/.config/systemd/user).
  4. Attempt to start the service (systemctl --user enable spotifyd.service --now).

Expected behavior

The service starts and the device is visible as a speaker in other spotify clients on the same network.

Logs
No logs, sorry.

Compilation flags

  • dbus_mpris
  • dbus_keyring
  • alsa_backend
  • portaudio_backend
  • pulseaudio_backend
  • rodio_backend

Versions (please complete the following information):

  • OS: Fedora Linux Asahi Remix 39 (Workstation Edition)
  • Spotifyd: 357e147
  • cargo: cargo 1.77.2 (e52e36006 2024-03-26)

I have not used the Rust toolchain before but I believe, by default, cargo install does not install to /usr/bin. The user can specify the --root argument to change the install path. However, I think the spotifyd.service executable path should reference the default cargo install path.

@benjaminpotter benjaminpotter added the bug A functionality or parts of a program that do not work as intended label May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A functionality or parts of a program that do not work as intended
Projects
None yet
Development

No branches or pull requests

1 participant