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

Fetch spotify from snapcraft #44123

Merged
merged 1 commit into from Aug 4, 2018
Merged

Fetch spotify from snapcraft #44123

merged 1 commit into from Aug 4, 2018

Conversation

timokau
Copy link
Member

@timokau timokau commented Jul 26, 2018

Motivation for this change

Spotify is currently fetched from a debian repository hosted on their own server. The big problem with that is that they only keep a couple of versions around. That leads to failures when trying to build older versions. Unfortunately we are not allowed to keep old versions and re-distribute them.

In december 2017, spotify released a "snap" package on snapcraft. That has the significant advantage that the server is not controlled by spotify and snapcraft does not automatically delete old versions and does not even allow spotify to remove them. The oldest version currently available on snapcraft is 1.0.59.395, while the oldest version available on the debian repository is 1.0.72.117.

Disadvantages of this approach
  • the snap contains all the dependencies at is ~160mb, while the debian package is ~90 mb. The installed versions have the same size.

  • the upgrade process is a bit more complex, since the snap url's are based on the snap_id (which doesn't change) and the revision. The revision takes the place of the version and is a simple increasing integer. It does not indicate weather or not the version is stable or what spotify version it responds to. Because of that I included update instructions and even a fully automated update script.

  • currently the versions on snapcraft and the debian repo don't quite match up. Snapcraft has 1.0.80.474, while the repository has 1.0.80.480. Both of these were released on the same day however and are probably pretty much identical. Who knows what that last version number signifies. Since the snap version is at least as "official" as the debian version, I assume that version is just as up-to-date.

Advantages of this approach
  • the spotify package doesn't break anymore

The advantages far outweight the disadvantages in my opinion. I've already been bitten by this at least twice. I wasn't able to rebuild my configuration anymore and had to remove spotify from my system packages.

Maintainers @edolstra @ftrvxmtrx @sheenobu @laMudri

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@timokau
Copy link
Member Author

timokau commented Jul 26, 2018

This should also be picked into stable.

@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: spotify

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: spotify

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: spotify

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@timokau timokau mentioned this pull request Jul 29, 2018
3 tasks
grep 'version: ' meta/snap.yaml
echo "While the nix package specifies: ${version}."
echo "You probably chose the wrong revision or forgot to update the nix version."
#exit 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this commented out?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For debugging. Thanks for catching that, I fixed it.

@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: spotify

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: spotify

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@timokau
Copy link
Member Author

timokau commented Aug 4, 2018

Lacking any objections, can somebody merge this?

unsquashfs "$src" '/usr/share/spotify' '/usr/bin/spotify' '/meta/snap.yaml'
cd squashfs-root
if ! grep -q 'grade: stable' meta/snap.yaml; then
# Unfortunately this check is not relibale: At the moment (2018-07-26) the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

«reliable»

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed, thanks.

The purpose of this update (or downgrade?) is to switch the spotify
source to one more reliable. The current source only contains the last
few releases, while the new source retains all old releases.
@GrahamcOfBorg
Copy link

No attempt on x86_64-darwin (full log)

The following builds were skipped because they don't evaluate on x86_64-darwin: spotify

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on x86_64-linux (full log)

The following builds were skipped because they don't evaluate on x86_64-linux: spotify

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@GrahamcOfBorg
Copy link

No attempt on aarch64-linux (full log)

The following builds were skipped because they don't evaluate on aarch64-linux: spotify

Partial log (click to expand)


a) For `nixos-rebuild` you can set
  { nixpkgs.config.allowUnfree = true; }
in configuration.nix to override this.

b) For `nix-env`, `nix-build`, `nix-shell` or any other Nix command you can add
  { allowUnfree = true; }
to ~/.config/nixpkgs/config.nix.


@7c6f434c 7c6f434c merged commit d4893a7 into NixOS:master Aug 4, 2018
@timokau timokau deleted the spotify-snap branch August 4, 2018 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants