Skip to content

zicstardust/spotify-rpm-packager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

124 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spotify RPM Packager

A tool that automates the creation of RPM packages for Spotify. It downloads the latest Spotify release from debian repository, applies necessary adjustments for system compatibility, and bundles everything into a clean RPM package ready for installation on RPM-based Linux distributions such as Fedora and RHEL derivatives.

Includes a repository web server for automatic Spotify updates.

This package includes enhancements and fixes compared to the official .DEB:

  • Built-in FFMPEG libraries for playing local files
  • Persistent flags configuration file
  • Persistent environment variables configuration file
  • Scalable desktop icon
  • Defaults flags and environment variables to improve Fedora/RHEL compatibility

GitHub

Help Section

Container info and usage

See more

Container

Tags

Tag Description
latest Default Tag

Registries

Registry Full image name Description
docker.io docker.io/zicstardust/spotify-rpm-packager Docker Hub
ghcr.io ghcr.io/zicstardust/spotify-rpm-packager GitHub

Supported Architectures

Attention: The container supports others architectures, but the generated RPM is only for amd64.

Architecture Available Tag
amd64 latest
arm64 latest
ppc64le latest
s390x latest

Usage

Compose

services:
  spotify-rpm:
    container_name: spotify-rpm-packager
    image: docker.io/zicstardust/spotify-rpm-packager:latest
    restart: unless-stopped
    privileged: True
    environment:
      TZ: America/New_York
    ports:
      - 80:80
    volumes:
      - <path to Repository/RPMs output>:/data
      - <path to GPG key>:/gpg-key #Required to backup generate GPG key

Environment variables

variables Function Default Exemple
TZ Set Timezone
PUID Set UID 1000
PGID Set GID 1000
INTERVAL Set the interval to check for updates and generate the next RPM. 1d 1d - 1 day
10m - 10 minutes
1w - 1 week
65s - 65 seconds
DISABLE_WEB_SERVER Disable web server repository false
KEEP_VERSIONS Number of RPM versions saved. If value is 0, keep all 0
BUILD Set for which distros the RPM will be generated. Separated by , el10 Look at the set BUILD section
GPG_NAME Your GPG key Name Look at the GPG Sign section
GPG_EMAIL Your GPG key E-mail Look at the GPG Sign section
STABLE_BUILDS RPM Spotify Stable builds true
TESTING_BUILDS RPM Spotify Testing builds false
SRPMS_BUILDS SRPMS builds false
BUILTIN_FFMPEG Built-in FFMPEG Libraries true
PORT Repository Web Server Port 80

Set BUILD

Value Function
fc<version> Generate RPM for fedora, exemple fc43 to Fedora 43
fcrawhide Generate RPM for fedora rawhide
el<version> Generate RPM for RHEL like, exemple el10 to RHEL 10 like

GPG Sign

To sign RPMs, it is necessary to set GPG_NAME and GPG_EMAIL environment variables.

The key will be imported from /gpg-key/private.pgp and /gpg-key/public.pgp.

If they do not exist, a new key will be created and exported to the /gpg-key/private.pgp and /gpg-key/public.pgp.

Usage Repository Web Server

See more

Recommended to use a proxy with https.

.repo File Exemple (with GPG)

/etc/yum.repos.d/spotify.repo

[spotify]
name=Spotify Unofficial Repository - Stable - $basearch
baseurl=http://127.0.0.1/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=http://127.0.0.1/gpg

[spotify-testing]
name=Spotify Unofficial Repository - Testing - $basearch
baseurl=http://127.0.0.1/$releasever/$basearch/testing
enabled=0
gpgcheck=1
gpgkey=http://127.0.0.1/gpg

[spotify-source]
name=Spotify Unofficial Repository - Stable - Source
baseurl=http://127.0.0.1/$releasever/source/stable
enabled=0
gpgcheck=1
gpgkey=http://127.0.0.1/gpg


[spotify-testing-source]
name=Spotify Unofficial Repository - Testing - Source
baseurl=http://127.0.0.1/$releasever/source/testing
enabled=0
gpgcheck=1
gpgkey=http://127.0.0.1/gpg

Install from repository:

sudo dnf install spotify-client

Making environment variables persistent

Flag file ~/.config/spotify/spotify.env

Below is an example spotify.env file that defines the environment variables WAYLAND_DISPLAY


~/.config/spotify/spotify.env

# This line will be ignored.
WAYLAND_DISPLAY=

Making flags persistent

Flag file ~/.config/spotify/spotify-flags.conf

Below is an example spotify-flags.conf file that defines the flags --force-device-scale-factor:


~/.config/spotify/spotify-flags.conf

# This line will be ignored.
--force-device-scale-factor=1.5

Common Issues

Dependencies not found in EL 10 (RHEL, Almalinux, Oracle Linux, Rocky Linux, etc)

Details

It is necessary to activate the EPEL repository.

sudo dnf install epel-release

Local files don't play

Details

Enable built-in FFMPEG Libraries on RPM build (BUILTIN_FFMPEG=true)

Or alternative:
sudo dnf install compat-ffmpeg4 ffmpeg-libs --allowerasing

No themed window bar in the GNOME desktop environment on Wayland

Details

To fix this, add the following lines to the Flag file ~/.config/spotify/spotify-flags.conf

--ozone-platform=x11
--disable-features=UseOzonePlatform

Incorrect device scaling factor

Details

Add --force-device-scale-factor to the flags file in ~/.config/spotify/spotify-flags.conf.

Default value is 1.

#exemple scale factor 1.5
--force-device-scale-factor=1.5

License

This project is a packaging script. Spotify is proprietary software owned by Spotify AB.

About

Automates the creation of RPM packages for Spotify with a repository web server for automatic Spotify updates.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors