-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Fetch spotify from snapcraft #44123
Conversation
This should also be picked into stable. |
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)
|
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)
|
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)
|
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
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)
|
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)
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
«reliable»
There was a problem hiding this comment.
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.
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)
|
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)
|
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)
|
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 is1.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 has1.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 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
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)