* [PR PATCH] [WIP] spotify: restrict, remove INSTALL script.
@ 2020-07-14 19:36 ericonr
2020-07-14 20:42 ` [PR PATCH] [Updated] " ericonr
` (13 more replies)
0 siblings, 14 replies; 15+ messages in thread
From: ericonr @ 2020-07-14 19:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 638 bytes --]
There is a new pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages spotifyd-options
https://github.com/void-linux/void-packages/pull/23576
[WIP] spotify: restrict, remove INSTALL script.
Following discussion on IRC, this package should be restricted.
TODO:
- Still need to find some way to fetch the license, don't want to vendor it in.
- I need some ideas on how to obtain the symlinks for `libssl` and `libcrypto` shared libraries
- It built fine but I haven't tested it yet
A patch file from https://github.com/void-linux/void-packages/pull/23576.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spotifyd-options-23576.patch --]
[-- Type: text/x-diff, Size: 5412 bytes --]
From c0f06bff8c21fde23b89655aba8e6b6606b116ba Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 14 Jul 2020 16:30:45 -0300
Subject: [PATCH] spotify: restrict, remove INSTALL script.
---
srcpkgs/spotify/INSTALL | 41 --------------------------
srcpkgs/spotify/REMOVE | 11 -------
srcpkgs/spotify/files/spotify | 2 +-
srcpkgs/spotify/template | 54 +++++++++++++++++++++++++++++------
4 files changed, 46 insertions(+), 62 deletions(-)
delete mode 100644 srcpkgs/spotify/INSTALL
delete mode 100644 srcpkgs/spotify/REMOVE
diff --git a/srcpkgs/spotify/INSTALL b/srcpkgs/spotify/INSTALL
deleted file mode 100644
index 1cf70985dcb..00000000000
--- a/srcpkgs/spotify/INSTALL
+++ /dev/null
@@ -1,41 +0,0 @@
-# INSTALL for 'spotify'
-# Fetching proprietary binaries at install-time
-
-_BUILDDIR="/tmp/spotify.build"
-_LIBS=$(ldconfig -vNX -n usr/lib 2>/dev/null)
-
-linklib() {
- _LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
- ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/${1}.so.${2}"
-}
-
-if test "$ACTION" = "post"; then
- . usr/share/spotify/pkgdata
- mkdir -p "$_BUILDDIR"
- (
- set -e
- cd "$_BUILDDIR"
- xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${SVERSION}.deb"
- echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
- sha256sum -c checksum
- ar x "spotify-client_${SVERSION}.deb"
- tar -xf data.tar.gz
- )
- if [ $? -ne 0 ] ; then
- echo "Failed downloading spotify client"
- rm -r "$_BUILDDIR";
- exit 1;
- fi
-
- [ -d "/usr/share/spotify/spotify-client" ] && rm -rf usr/share/spotify/spotify-client
- mv -f "${_BUILDDIR}/usr/share/spotify" usr/share/spotify/spotify-client
- for _s in 16 22 24 32 48 64 128 256 512; do
- mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
- ln -sf "/usr/share/spotify/spotify-client/icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- mkdir -p usr/share/applications
- ln -sf /usr/share/spotify/spotify-client/spotify.desktop usr/share/applications/spotify.desktop
- linklib "libssl" "1.0.0"
- linklib "libcrypto" "1.0.0"
- rm -r "$_BUILDDIR"
-fi
diff --git a/srcpkgs/spotify/REMOVE b/srcpkgs/spotify/REMOVE
deleted file mode 100644
index c109f570ef8..00000000000
--- a/srcpkgs/spotify/REMOVE
+++ /dev/null
@@ -1,11 +0,0 @@
-# REMOVE for 'spotify'
-# Deleting dynamically fetched files
-
-if test "$ACTION" = "post"; then
- rm usr/share/applications/spotify.desktop
- for _s in 16 22 24 32 48 64 128 256 512; do
- rm "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- rm -r usr/share/spotify
-fi
-
diff --git a/srcpkgs/spotify/files/spotify b/srcpkgs/spotify/files/spotify
index 35f912475d1..ab9cc8db10f 100644
--- a/srcpkgs/spotify/files/spotify
+++ b/srcpkgs/spotify/files/spotify
@@ -1,2 +1,2 @@
#!/bin/sh
-LD_LIBRARY_PATH=/usr/share/spotify exec /usr/share/spotify/spotify-client/spotify "$@"
+LD_LIBRARY_PATH=/usr/libexec/spotify exec /usr/libexec/spotify/spotify "$@"
diff --git a/srcpkgs/spotify/template b/srcpkgs/spotify/template
index d9ec603bf6a..ce3038a9a25 100644
--- a/srcpkgs/spotify/template
+++ b/srcpkgs/spotify/template
@@ -1,21 +1,57 @@
# Template file for 'spotify'
pkgname=spotify
version=1.1.26
-revision=1
+revision=2
+_ver="${version}.501.gbe11e53b-15_amd64"
archs="x86_64"
create_wrksrc=yes
build_style=fetch
-depends="binutils gtk+ nss GConf libXScrnSaver libatomic"
+depends="gtk+ nss GConf libXScrnSaver libatomic"
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
-license="Proprietary"
+license="custom:Proprietary"
homepage="https://www.spotify.com"
+distfiles="http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${_ver}.deb"
+checksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
repository=nonfree
-_sversion=".501.gbe11e53b-15_amd64"
-_schecksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
+restricted=yes
+nostrip=yes
+
+do_build() {
+ ar x "spotify-client_${_ver}.deb"
+ bsdtar -xvf data.tar.gz
+}
+
+_linklib() {
+ local LIB
+ LIB="$(find /usr/lib -name "${1}.so*" | sort | tail -1)"
+ ln -sf "/usr/lib/${LIB}" "${DESTDIR}/usr/libexec/spotify/${1}.so.${2}"
+}
+
do_install() {
- vbin ${FILESDIR}/spotify
- vmkdir usr/share/spotify
- echo "export SVERSION=\"${version}${_sversion}\"" >"${DESTDIR}/usr/share/spotify/pkgdata"
- echo "export SCHECKSUM=\"${_schecksum}\"" >>"${DESTDIR}/usr/share/spotify/pkgdata"
+ vbin "${FILESDIR}/spotify"
+
+ vmkdir usr/libexec/spotify
+ vmkdir usr/share/
+ vcopy usr/share/spotify usr/share/
+
+ # move ELFs to /usr/libexec/spotify
+ mv ${DESTDIR}/usr/share/spotify/{libEGL.so,libGLESv2.so,libcef.so,spotify} \
+ "${DESTDIR}/usr/libexec/spotify"
+ mv "${DESTDIR}/usr/share/spotify/swiftshader" "${DESTDIR}/usr/libexec/spotify"
+
+ # install icons
+ for _s in 16 22 24 32 48 64 128 256 512; do
+ vmkdir "usr/share/icons/hicolor/${_s}x${_s}/apps"
+ ln -sf "/usr/share/spotify/icons/spotify-linux-${_s}.png" \
+ "${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
+ done
+
+ vmkdir usr/share/applications
+ ln -sf /usr/share/spotify/spotify.desktop \
+ "${DESTDIR}/usr/share/applications/spotify.desktop"
+
+ # provide dynamic libraries
+ _linklib libssl 1.0.0
+ _linklib libcrypto 1.0.0
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
@ 2020-07-14 20:42 ` ericonr
2020-07-14 20:51 ` ericonr
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-14 20:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
There is an updated pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages spotifyd-options
https://github.com/void-linux/void-packages/pull/23576
[WIP] spotify: restrict, remove INSTALL script.
Following discussion on IRC, this package should be restricted. Once this is merged, spotify should be included in #23575
TODO:
- Still need to find some way to fetch the license, don't want to vendor it in.
- I need some ideas on how to obtain the symlinks for `libssl` and `libcrypto` shared libraries
- It built fine but I haven't tested it yet
A patch file from https://github.com/void-linux/void-packages/pull/23576.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spotifyd-options-23576.patch --]
[-- Type: text/x-diff, Size: 5158 bytes --]
From f581a5c3c35505d8e8a7e9d8cb646acd096a8752 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 14 Jul 2020 16:30:45 -0300
Subject: [PATCH] spotify: restrict, remove INSTALL script.
---
srcpkgs/spotify/INSTALL | 41 ------------------------------
srcpkgs/spotify/REMOVE | 11 --------
srcpkgs/spotify/files/spotify | 2 +-
srcpkgs/spotify/template | 48 ++++++++++++++++++++++++++++-------
4 files changed, 40 insertions(+), 62 deletions(-)
delete mode 100644 srcpkgs/spotify/INSTALL
delete mode 100644 srcpkgs/spotify/REMOVE
diff --git a/srcpkgs/spotify/INSTALL b/srcpkgs/spotify/INSTALL
deleted file mode 100644
index 1cf70985dcb..00000000000
--- a/srcpkgs/spotify/INSTALL
+++ /dev/null
@@ -1,41 +0,0 @@
-# INSTALL for 'spotify'
-# Fetching proprietary binaries at install-time
-
-_BUILDDIR="/tmp/spotify.build"
-_LIBS=$(ldconfig -vNX -n usr/lib 2>/dev/null)
-
-linklib() {
- _LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
- ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/${1}.so.${2}"
-}
-
-if test "$ACTION" = "post"; then
- . usr/share/spotify/pkgdata
- mkdir -p "$_BUILDDIR"
- (
- set -e
- cd "$_BUILDDIR"
- xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${SVERSION}.deb"
- echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
- sha256sum -c checksum
- ar x "spotify-client_${SVERSION}.deb"
- tar -xf data.tar.gz
- )
- if [ $? -ne 0 ] ; then
- echo "Failed downloading spotify client"
- rm -r "$_BUILDDIR";
- exit 1;
- fi
-
- [ -d "/usr/share/spotify/spotify-client" ] && rm -rf usr/share/spotify/spotify-client
- mv -f "${_BUILDDIR}/usr/share/spotify" usr/share/spotify/spotify-client
- for _s in 16 22 24 32 48 64 128 256 512; do
- mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
- ln -sf "/usr/share/spotify/spotify-client/icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- mkdir -p usr/share/applications
- ln -sf /usr/share/spotify/spotify-client/spotify.desktop usr/share/applications/spotify.desktop
- linklib "libssl" "1.0.0"
- linklib "libcrypto" "1.0.0"
- rm -r "$_BUILDDIR"
-fi
diff --git a/srcpkgs/spotify/REMOVE b/srcpkgs/spotify/REMOVE
deleted file mode 100644
index c109f570ef8..00000000000
--- a/srcpkgs/spotify/REMOVE
+++ /dev/null
@@ -1,11 +0,0 @@
-# REMOVE for 'spotify'
-# Deleting dynamically fetched files
-
-if test "$ACTION" = "post"; then
- rm usr/share/applications/spotify.desktop
- for _s in 16 22 24 32 48 64 128 256 512; do
- rm "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- rm -r usr/share/spotify
-fi
-
diff --git a/srcpkgs/spotify/files/spotify b/srcpkgs/spotify/files/spotify
index 35f912475d1..ab9cc8db10f 100644
--- a/srcpkgs/spotify/files/spotify
+++ b/srcpkgs/spotify/files/spotify
@@ -1,2 +1,2 @@
#!/bin/sh
-LD_LIBRARY_PATH=/usr/share/spotify exec /usr/share/spotify/spotify-client/spotify "$@"
+LD_LIBRARY_PATH=/usr/libexec/spotify exec /usr/libexec/spotify/spotify "$@"
diff --git a/srcpkgs/spotify/template b/srcpkgs/spotify/template
index d9ec603bf6a..a0907924239 100644
--- a/srcpkgs/spotify/template
+++ b/srcpkgs/spotify/template
@@ -1,21 +1,51 @@
# Template file for 'spotify'
pkgname=spotify
version=1.1.26
-revision=1
+revision=2
+_ver="${version}.501.gbe11e53b-15_amd64"
archs="x86_64"
create_wrksrc=yes
build_style=fetch
-depends="binutils gtk+ nss GConf libXScrnSaver libatomic"
+depends="gtk+ nss GConf libXScrnSaver libatomic"
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
-license="Proprietary"
+license="custom:Proprietary"
homepage="https://www.spotify.com"
+distfiles="http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${_ver}.deb"
+checksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
repository=nonfree
-_sversion=".501.gbe11e53b-15_amd64"
-_schecksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
+restricted=yes
+nostrip=yes
+
+do_build() {
+ ar x "spotify-client_${_ver}.deb"
+ bsdtar -xvf data.tar.gz
+}
+
+_linklib() {
+ local LIB
+ LIB="$(find /usr/lib -name "${1}.so*" | sort | tail -1)"
+ ln -sf "/usr/lib/${LIB}" "${DESTDIR}/usr/libexec/spotify/${1}.so.${2}"
+}
+
do_install() {
- vbin ${FILESDIR}/spotify
- vmkdir usr/share/spotify
- echo "export SVERSION=\"${version}${_sversion}\"" >"${DESTDIR}/usr/share/spotify/pkgdata"
- echo "export SCHECKSUM=\"${_schecksum}\"" >>"${DESTDIR}/usr/share/spotify/pkgdata"
+ vbin "${FILESDIR}/spotify"
+
+ vmkdir usr/libexec/
+ vcopy usr/share/spotify usr/libexec/
+
+ # install icons
+ for _s in 16 22 24 32 48 64 128 256 512; do
+ vmkdir "usr/share/icons/hicolor/${_s}x${_s}/apps"
+ ln -sf "/usr/libexec/spotify/icons/spotify-linux-${_s}.png" \
+ "${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
+ done
+
+ vmkdir usr/share/applications
+ ln -sf /usr/share/spotify/spotify.desktop \
+ "${DESTDIR}/usr/share/applications/spotify.desktop"
+
+ # provide dynamic libraries
+ _linklib libssl 1.0.0
+ _linklib libcrypto 1.0.0
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
2020-07-14 20:42 ` [PR PATCH] [Updated] " ericonr
@ 2020-07-14 20:51 ` ericonr
2020-07-14 23:58 ` ericonr
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-14 20:51 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
There is an updated pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages spotifyd-options
https://github.com/void-linux/void-packages/pull/23576
[WIP] spotify: restrict, remove INSTALL script.
Following discussion on IRC, this package should be restricted. Once this is merged, spotify should be included in #23575
TODO:
- Still need to find some way to fetch the license, don't want to vendor it in.
- I need some ideas on how to obtain the symlinks for `libssl` and `libcrypto` shared libraries
- It built fine but I haven't tested it yet
A patch file from https://github.com/void-linux/void-packages/pull/23576.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spotifyd-options-23576.patch --]
[-- Type: text/x-diff, Size: 5294 bytes --]
From eac5faa4ee779704e96538e2d3c9361266f9da5e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 14 Jul 2020 16:30:45 -0300
Subject: [PATCH] spotify: restrict, remove INSTALL script.
---
srcpkgs/spotify/INSTALL | 41 ----------------------------
srcpkgs/spotify/REMOVE | 11 --------
srcpkgs/spotify/files/spotify | 2 +-
srcpkgs/spotify/template | 51 +++++++++++++++++++++++++++++------
4 files changed, 44 insertions(+), 61 deletions(-)
delete mode 100644 srcpkgs/spotify/INSTALL
delete mode 100644 srcpkgs/spotify/REMOVE
diff --git a/srcpkgs/spotify/INSTALL b/srcpkgs/spotify/INSTALL
deleted file mode 100644
index 1cf70985dcb..00000000000
--- a/srcpkgs/spotify/INSTALL
+++ /dev/null
@@ -1,41 +0,0 @@
-# INSTALL for 'spotify'
-# Fetching proprietary binaries at install-time
-
-_BUILDDIR="/tmp/spotify.build"
-_LIBS=$(ldconfig -vNX -n usr/lib 2>/dev/null)
-
-linklib() {
- _LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
- ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/${1}.so.${2}"
-}
-
-if test "$ACTION" = "post"; then
- . usr/share/spotify/pkgdata
- mkdir -p "$_BUILDDIR"
- (
- set -e
- cd "$_BUILDDIR"
- xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${SVERSION}.deb"
- echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
- sha256sum -c checksum
- ar x "spotify-client_${SVERSION}.deb"
- tar -xf data.tar.gz
- )
- if [ $? -ne 0 ] ; then
- echo "Failed downloading spotify client"
- rm -r "$_BUILDDIR";
- exit 1;
- fi
-
- [ -d "/usr/share/spotify/spotify-client" ] && rm -rf usr/share/spotify/spotify-client
- mv -f "${_BUILDDIR}/usr/share/spotify" usr/share/spotify/spotify-client
- for _s in 16 22 24 32 48 64 128 256 512; do
- mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
- ln -sf "/usr/share/spotify/spotify-client/icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- mkdir -p usr/share/applications
- ln -sf /usr/share/spotify/spotify-client/spotify.desktop usr/share/applications/spotify.desktop
- linklib "libssl" "1.0.0"
- linklib "libcrypto" "1.0.0"
- rm -r "$_BUILDDIR"
-fi
diff --git a/srcpkgs/spotify/REMOVE b/srcpkgs/spotify/REMOVE
deleted file mode 100644
index c109f570ef8..00000000000
--- a/srcpkgs/spotify/REMOVE
+++ /dev/null
@@ -1,11 +0,0 @@
-# REMOVE for 'spotify'
-# Deleting dynamically fetched files
-
-if test "$ACTION" = "post"; then
- rm usr/share/applications/spotify.desktop
- for _s in 16 22 24 32 48 64 128 256 512; do
- rm "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- rm -r usr/share/spotify
-fi
-
diff --git a/srcpkgs/spotify/files/spotify b/srcpkgs/spotify/files/spotify
index 35f912475d1..ab9cc8db10f 100644
--- a/srcpkgs/spotify/files/spotify
+++ b/srcpkgs/spotify/files/spotify
@@ -1,2 +1,2 @@
#!/bin/sh
-LD_LIBRARY_PATH=/usr/share/spotify exec /usr/share/spotify/spotify-client/spotify "$@"
+LD_LIBRARY_PATH=/usr/libexec/spotify exec /usr/libexec/spotify/spotify "$@"
diff --git a/srcpkgs/spotify/template b/srcpkgs/spotify/template
index d9ec603bf6a..7c5a2d9e64a 100644
--- a/srcpkgs/spotify/template
+++ b/srcpkgs/spotify/template
@@ -1,21 +1,56 @@
# Template file for 'spotify'
pkgname=spotify
version=1.1.26
-revision=1
+revision=2
+_ver="${version}.501.gbe11e53b-15_amd64"
archs="x86_64"
create_wrksrc=yes
build_style=fetch
-depends="binutils gtk+ nss GConf libXScrnSaver libatomic"
+depends="gtk+ nss GConf libXScrnSaver libatomic"
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
-license="Proprietary"
+license="custom:Proprietary"
homepage="https://www.spotify.com"
+distfiles="http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${_ver}.deb"
+checksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
repository=nonfree
-_sversion=".501.gbe11e53b-15_amd64"
-_schecksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
+restricted=yes
+nostrip=yes
+
+do_build() {
+ ar x "spotify-client_${_ver}.deb"
+ bsdtar -xvf data.tar.gz
+}
+
+_linklib() {
+ local LIB
+ LIB="$(find /usr/lib -name "${1}.so*" | sort | tail -1)"
+ ln -sf "${LIB}" "${DESTDIR}/usr/libexec/spotify/${1}.so.${2}"
+}
+
do_install() {
- vbin ${FILESDIR}/spotify
+ vbin "${FILESDIR}/spotify"
+
vmkdir usr/share/spotify
- echo "export SVERSION=\"${version}${_sversion}\"" >"${DESTDIR}/usr/share/spotify/pkgdata"
- echo "export SCHECKSUM=\"${_schecksum}\"" >>"${DESTDIR}/usr/share/spotify/pkgdata"
+ vmkdir usr/share/applications
+ vmkdir usr/libexec/
+ vcopy usr/share/spotify usr/libexec/
+
+ # move icons to /usr/share
+ mv "${DESTDIR}/usr/libexec/spotify/icons" "${DESTDIR}/usr/share/spotify/"
+
+ # install icons
+ for _s in 16 22 24 32 48 64 128 256 512; do
+ vmkdir "usr/share/icons/hicolor/${_s}x${_s}/apps"
+ ln -sf "/usr/share/spotify/icons/spotify-linux-${_s}.png" \
+ "${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
+ done
+
+ vmkdir usr/share/applications
+ mv "${DESTDIR}/usr/libexec/spotify/spotify.desktop" \
+ "${DESTDIR}/usr/share/applications/spotify.desktop"
+
+ # provide dynamic libraries
+ _linklib libssl 1.0.0
+ _linklib libcrypto 1.0.0
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
2020-07-14 20:42 ` [PR PATCH] [Updated] " ericonr
2020-07-14 20:51 ` ericonr
@ 2020-07-14 23:58 ` ericonr
2020-07-15 0:03 ` ericonr
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-14 23:58 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
There is an updated pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages spotifyd-options
https://github.com/void-linux/void-packages/pull/23576
[WIP] spotify: restrict, remove INSTALL script.
Following discussion on IRC, this package should be restricted. Once this is merged, spotify should be included in #23575
TODO:
- Still need to find some way to fetch the license, don't want to vendor it in.
- I need some ideas on how to obtain the symlinks for `libssl` and `libcrypto` shared libraries
- It built fine but I haven't tested it yet
A patch file from https://github.com/void-linux/void-packages/pull/23576.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spotifyd-options-23576.patch --]
[-- Type: text/x-diff, Size: 5585 bytes --]
From 82438895b14e13e70a1c9ae72ae1d9edcd51c9aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 14 Jul 2020 16:30:45 -0300
Subject: [PATCH] spotify: restrict, remove INSTALL script.
Remove dependencies that were detected automatically and libatomic.
---
srcpkgs/spotify/INSTALL | 41 ------------------------
srcpkgs/spotify/REMOVE | 11 -------
srcpkgs/spotify/files/spotify | 2 +-
srcpkgs/spotify/template | 60 ++++++++++++++++++++++++++++++-----
4 files changed, 53 insertions(+), 61 deletions(-)
delete mode 100644 srcpkgs/spotify/INSTALL
delete mode 100644 srcpkgs/spotify/REMOVE
diff --git a/srcpkgs/spotify/INSTALL b/srcpkgs/spotify/INSTALL
deleted file mode 100644
index 1cf70985dcb..00000000000
--- a/srcpkgs/spotify/INSTALL
+++ /dev/null
@@ -1,41 +0,0 @@
-# INSTALL for 'spotify'
-# Fetching proprietary binaries at install-time
-
-_BUILDDIR="/tmp/spotify.build"
-_LIBS=$(ldconfig -vNX -n usr/lib 2>/dev/null)
-
-linklib() {
- _LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
- ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/${1}.so.${2}"
-}
-
-if test "$ACTION" = "post"; then
- . usr/share/spotify/pkgdata
- mkdir -p "$_BUILDDIR"
- (
- set -e
- cd "$_BUILDDIR"
- xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${SVERSION}.deb"
- echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
- sha256sum -c checksum
- ar x "spotify-client_${SVERSION}.deb"
- tar -xf data.tar.gz
- )
- if [ $? -ne 0 ] ; then
- echo "Failed downloading spotify client"
- rm -r "$_BUILDDIR";
- exit 1;
- fi
-
- [ -d "/usr/share/spotify/spotify-client" ] && rm -rf usr/share/spotify/spotify-client
- mv -f "${_BUILDDIR}/usr/share/spotify" usr/share/spotify/spotify-client
- for _s in 16 22 24 32 48 64 128 256 512; do
- mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
- ln -sf "/usr/share/spotify/spotify-client/icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- mkdir -p usr/share/applications
- ln -sf /usr/share/spotify/spotify-client/spotify.desktop usr/share/applications/spotify.desktop
- linklib "libssl" "1.0.0"
- linklib "libcrypto" "1.0.0"
- rm -r "$_BUILDDIR"
-fi
diff --git a/srcpkgs/spotify/REMOVE b/srcpkgs/spotify/REMOVE
deleted file mode 100644
index c109f570ef8..00000000000
--- a/srcpkgs/spotify/REMOVE
+++ /dev/null
@@ -1,11 +0,0 @@
-# REMOVE for 'spotify'
-# Deleting dynamically fetched files
-
-if test "$ACTION" = "post"; then
- rm usr/share/applications/spotify.desktop
- for _s in 16 22 24 32 48 64 128 256 512; do
- rm "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- rm -r usr/share/spotify
-fi
-
diff --git a/srcpkgs/spotify/files/spotify b/srcpkgs/spotify/files/spotify
index 35f912475d1..ab9cc8db10f 100644
--- a/srcpkgs/spotify/files/spotify
+++ b/srcpkgs/spotify/files/spotify
@@ -1,2 +1,2 @@
#!/bin/sh
-LD_LIBRARY_PATH=/usr/share/spotify exec /usr/share/spotify/spotify-client/spotify "$@"
+LD_LIBRARY_PATH=/usr/libexec/spotify exec /usr/libexec/spotify/spotify "$@"
diff --git a/srcpkgs/spotify/template b/srcpkgs/spotify/template
index d9ec603bf6a..c6483042d38 100644
--- a/srcpkgs/spotify/template
+++ b/srcpkgs/spotify/template
@@ -1,21 +1,65 @@
# Template file for 'spotify'
pkgname=spotify
version=1.1.26
-revision=1
+revision=2
+_ver="${version}.501.gbe11e53b-15_amd64"
archs="x86_64"
create_wrksrc=yes
build_style=fetch
-depends="binutils gtk+ nss GConf libXScrnSaver libatomic"
+hostmakedepends="curl"
+depends="GConf"
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
-license="Proprietary"
+license="custom:Proprietary"
homepage="https://www.spotify.com"
+distfiles="http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${_ver}.deb"
+checksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
repository=nonfree
-_sversion=".501.gbe11e53b-15_amd64"
-_schecksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
+restricted=yes
+nostrip=yes
+
+post_extract() {
+ # fetch license at build time because it redirects to the local version,
+ # so we can't verify the checksum
+ curl -L "https://www.spotify.com/legal/end-user-agreement/" -o LICENSE.html
+}
+
+do_build() {
+ ar x "spotify-client_${_ver}.deb"
+ bsdtar -xf data.tar.gz
+}
+
+_linklib() {
+ local LIB
+ LIB="$(find /usr/lib -name "${1}.so*" | sort | tail -1)"
+ ln -sf "${LIB}" "${DESTDIR}/usr/libexec/spotify/${1}.so.${2}"
+}
+
do_install() {
- vbin ${FILESDIR}/spotify
+ vbin "${FILESDIR}/spotify"
+
vmkdir usr/share/spotify
- echo "export SVERSION=\"${version}${_sversion}\"" >"${DESTDIR}/usr/share/spotify/pkgdata"
- echo "export SCHECKSUM=\"${_schecksum}\"" >>"${DESTDIR}/usr/share/spotify/pkgdata"
+ vmkdir usr/share/applications
+ vmkdir usr/libexec/
+ vcopy usr/share/spotify usr/libexec/
+
+ # move icons to /usr/share
+ mv "${DESTDIR}/usr/libexec/spotify/icons" "${DESTDIR}/usr/share/spotify/"
+
+ # install icons
+ for _s in 16 22 24 32 48 64 128 256 512; do
+ vmkdir "usr/share/icons/hicolor/${_s}x${_s}/apps"
+ ln -sf "/usr/share/spotify/icons/spotify-linux-${_s}.png" \
+ "${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
+ done
+
+ vmkdir usr/share/applications
+ mv "${DESTDIR}/usr/libexec/spotify/spotify.desktop" \
+ "${DESTDIR}/usr/share/applications/spotify.desktop"
+
+ # provide dynamic libraries
+ _linklib libssl 1.0.0
+ _linklib libcrypto 1.0.0
+
+ vlicense LICENSE.html
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (2 preceding siblings ...)
2020-07-14 23:58 ` ericonr
@ 2020-07-15 0:03 ` ericonr
2020-07-15 15:05 ` sgn
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-15 0:03 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 271 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/23576#issuecomment-658471082
Comment:
@abenson I removed several dependencies, including `libatomic`. Could you give it a try, please? It seems to be working fine here.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (3 preceding siblings ...)
2020-07-15 0:03 ` ericonr
@ 2020-07-15 15:05 ` sgn
2020-07-15 17:34 ` ericonr
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2020-07-15 15:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 495 bytes --]
New comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/23576#issuecomment-658823314
Comment:
Does this file https://www.spotify.com/us/legal/end-user-agreement/ change continously?
If no, we can fetch it just fine.
If yes, we can use this code in `post_fetch`:
```sh
curl -L https://www.spotify.com/us/legal/end-user-agreement/ |
w3m -dump -I utf-8 -T text/html
```
We could remove some headers and footers and hope the real EULA won't change
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (4 preceding siblings ...)
2020-07-15 15:05 ` sgn
@ 2020-07-15 17:34 ` ericonr
2020-07-15 20:57 ` Chocimier
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-15 17:34 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 226 bytes --]
New comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/23576#issuecomment-658903035
Comment:
How would I hook up a checksum to this? `post_fetch` seems to run after the checksum.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (5 preceding siblings ...)
2020-07-15 17:34 ` ericonr
@ 2020-07-15 20:57 ` Chocimier
2020-07-15 21:26 ` [PR PATCH] [Updated] " ericonr
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: Chocimier @ 2020-07-15 20:57 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 308 bytes --]
New comment by Chocimier on void-packages repository
https://github.com/void-linux/void-packages/pull/23576#issuecomment-659005982
Comment:
> How would I hook up a checksum to this?
Define expected checksum in template and run `sha256sum -c || msg_error` in post extract, similar to oracle-jre/INSTALL.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (6 preceding siblings ...)
2020-07-15 20:57 ` Chocimier
@ 2020-07-15 21:26 ` ericonr
2020-07-15 23:37 ` [PR REVIEW] " sgn
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-15 21:26 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
There is an updated pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages spotifyd-options
https://github.com/void-linux/void-packages/pull/23576
[WIP] spotify: restrict, remove INSTALL script.
Following discussion on IRC, this package should be restricted. Once this is merged, spotify should be included in #23575
TODO:
- Still need to find some way to fetch the license, don't want to vendor it in.
- I need some ideas on how to obtain the symlinks for `libssl` and `libcrypto` shared libraries
- It built fine but I haven't tested it yet
A patch file from https://github.com/void-linux/void-packages/pull/23576.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spotifyd-options-23576.patch --]
[-- Type: text/x-diff, Size: 5692 bytes --]
From 1b95c816c124a51027b5d8f0a475cd3e56d0c266 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 14 Jul 2020 16:30:45 -0300
Subject: [PATCH] spotify: restrict, remove INSTALL script.
Remove dependencies that were detected automatically and libatomic.
---
srcpkgs/spotify/INSTALL | 41 -----------------------
srcpkgs/spotify/REMOVE | 11 -------
srcpkgs/spotify/files/spotify | 2 +-
srcpkgs/spotify/template | 62 ++++++++++++++++++++++++++++++-----
4 files changed, 55 insertions(+), 61 deletions(-)
delete mode 100644 srcpkgs/spotify/INSTALL
delete mode 100644 srcpkgs/spotify/REMOVE
diff --git a/srcpkgs/spotify/INSTALL b/srcpkgs/spotify/INSTALL
deleted file mode 100644
index 1cf70985dcb..00000000000
--- a/srcpkgs/spotify/INSTALL
+++ /dev/null
@@ -1,41 +0,0 @@
-# INSTALL for 'spotify'
-# Fetching proprietary binaries at install-time
-
-_BUILDDIR="/tmp/spotify.build"
-_LIBS=$(ldconfig -vNX -n usr/lib 2>/dev/null)
-
-linklib() {
- _LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
- ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/${1}.so.${2}"
-}
-
-if test "$ACTION" = "post"; then
- . usr/share/spotify/pkgdata
- mkdir -p "$_BUILDDIR"
- (
- set -e
- cd "$_BUILDDIR"
- xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${SVERSION}.deb"
- echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
- sha256sum -c checksum
- ar x "spotify-client_${SVERSION}.deb"
- tar -xf data.tar.gz
- )
- if [ $? -ne 0 ] ; then
- echo "Failed downloading spotify client"
- rm -r "$_BUILDDIR";
- exit 1;
- fi
-
- [ -d "/usr/share/spotify/spotify-client" ] && rm -rf usr/share/spotify/spotify-client
- mv -f "${_BUILDDIR}/usr/share/spotify" usr/share/spotify/spotify-client
- for _s in 16 22 24 32 48 64 128 256 512; do
- mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
- ln -sf "/usr/share/spotify/spotify-client/icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- mkdir -p usr/share/applications
- ln -sf /usr/share/spotify/spotify-client/spotify.desktop usr/share/applications/spotify.desktop
- linklib "libssl" "1.0.0"
- linklib "libcrypto" "1.0.0"
- rm -r "$_BUILDDIR"
-fi
diff --git a/srcpkgs/spotify/REMOVE b/srcpkgs/spotify/REMOVE
deleted file mode 100644
index c109f570ef8..00000000000
--- a/srcpkgs/spotify/REMOVE
+++ /dev/null
@@ -1,11 +0,0 @@
-# REMOVE for 'spotify'
-# Deleting dynamically fetched files
-
-if test "$ACTION" = "post"; then
- rm usr/share/applications/spotify.desktop
- for _s in 16 22 24 32 48 64 128 256 512; do
- rm "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- rm -r usr/share/spotify
-fi
-
diff --git a/srcpkgs/spotify/files/spotify b/srcpkgs/spotify/files/spotify
index 35f912475d1..ab9cc8db10f 100644
--- a/srcpkgs/spotify/files/spotify
+++ b/srcpkgs/spotify/files/spotify
@@ -1,2 +1,2 @@
#!/bin/sh
-LD_LIBRARY_PATH=/usr/share/spotify exec /usr/share/spotify/spotify-client/spotify "$@"
+LD_LIBRARY_PATH=/usr/libexec/spotify exec /usr/libexec/spotify/spotify "$@"
diff --git a/srcpkgs/spotify/template b/srcpkgs/spotify/template
index d9ec603bf6a..963b1d336c6 100644
--- a/srcpkgs/spotify/template
+++ b/srcpkgs/spotify/template
@@ -1,21 +1,67 @@
# Template file for 'spotify'
pkgname=spotify
version=1.1.26
-revision=1
+revision=2
+_ver="${version}.501.gbe11e53b-15_amd64"
+_filename="spotify-client_${_ver}.deb"
archs="x86_64"
create_wrksrc=yes
build_style=fetch
-depends="binutils gtk+ nss GConf libXScrnSaver libatomic"
+hostmakedepends="curl w3m"
+depends="GConf"
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
-license="Proprietary"
+license="custom:Proprietary"
homepage="https://www.spotify.com"
+distfiles="http://repository.spotify.com/pool/non-free/s/spotify-client/${_filename}"
+checksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
+_license_checksum="3949b3442f9e17e6934502884caa1e78fa97c48c4b8b79c2de8eb2c301b69f3f"
repository=nonfree
-_sversion=".501.gbe11e53b-15_amd64"
-_schecksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
+restricted=yes
+nostrip=yes
+
+post_extract() {
+ curl -L https://www.spotify.com/us/legal/end-user-agreement/ | \
+ w3m -dump -I utf-8 -T text/html > LICENSE
+ echo "$_license_checksum LICENSE" | sha256sum -c || { sha256sum LICENSE; return 1; }
+}
+
+do_build() {
+ ar x "${_filename}"
+ bsdtar -xf data.tar.gz
+}
+
+_linklib() {
+ local LIB
+ LIB="$(find /usr/lib -name "${1}.so*" | sort | tail -1)"
+ ln -sf "${LIB}" "${DESTDIR}/usr/libexec/spotify/${1}.so.${2}"
+}
+
do_install() {
- vbin ${FILESDIR}/spotify
+ vbin "${FILESDIR}/spotify"
+
vmkdir usr/share/spotify
- echo "export SVERSION=\"${version}${_sversion}\"" >"${DESTDIR}/usr/share/spotify/pkgdata"
- echo "export SCHECKSUM=\"${_schecksum}\"" >>"${DESTDIR}/usr/share/spotify/pkgdata"
+ vmkdir usr/share/applications
+ vmkdir usr/libexec/
+ vcopy usr/share/spotify usr/libexec/
+
+ # move icons to /usr/share
+ mv "${DESTDIR}/usr/libexec/spotify/icons" "${DESTDIR}/usr/share/spotify/"
+
+ # install icons
+ for _s in 16 22 24 32 48 64 128 256 512; do
+ vmkdir "usr/share/icons/hicolor/${_s}x${_s}/apps"
+ ln -sf "/usr/share/spotify/icons/spotify-linux-${_s}.png" \
+ "${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
+ done
+
+ vmkdir usr/share/applications
+ mv "${DESTDIR}/usr/libexec/spotify/spotify.desktop" \
+ "${DESTDIR}/usr/share/applications/spotify.desktop"
+
+ # provide dynamic libraries
+ _linklib libssl 1.0.0
+ _linklib libcrypto 1.0.0
+
+ vlicense LICENSE
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR REVIEW] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (7 preceding siblings ...)
2020-07-15 21:26 ` [PR PATCH] [Updated] " ericonr
@ 2020-07-15 23:37 ` sgn
2020-07-15 23:37 ` sgn
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2020-07-15 23:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 785 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/23576#discussion_r455421617
Comment:
Previously, I suggest this command with additional comment about filter out header and footer.
I didn't look hard into it. I still think we should take out header and footer because they'll be changed over time, but the EULA will be changed less often.
```sh
curl -L https://www.spotify.com/us/legal/end-user-agreement/ |
w3m -dump -I utf-8 -T text/html |
sed -n '/Spotify Terms and Conditions of Use/,/^USA$/p' >EULA
```
I think this one should EULA, I'm not native English speaker, so ...
Anyway, my personal preference is no `\` at the end.
If the line end with `|`, sh/bash knows that we haven't finished communicate with it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR REVIEW] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (8 preceding siblings ...)
2020-07-15 23:37 ` [PR REVIEW] " sgn
@ 2020-07-15 23:37 ` sgn
2020-07-16 0:05 ` ericonr
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: sgn @ 2020-07-15 23:37 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 269 bytes --]
New review comment by sgn on void-packages repository
https://github.com/void-linux/void-packages/pull/23576#discussion_r455422918
Comment:
This command is fine as is.
But, I prefer to use `xbps-digest` in the same way `common/hooks/do-fetch/00-distfiles.sh` do it.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR REVIEW] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (9 preceding siblings ...)
2020-07-15 23:37 ` sgn
@ 2020-07-16 0:05 ` ericonr
2020-07-16 0:14 ` [PR PATCH] [Updated] " ericonr
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-16 0:05 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 231 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/23576#discussion_r455433789
Comment:
Good idea. Thanks! Didn't know about it not requiring `\` at the end when piping :D
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Updated] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (10 preceding siblings ...)
2020-07-16 0:05 ` ericonr
@ 2020-07-16 0:14 ` ericonr
2020-07-16 0:14 ` [PR REVIEW] " ericonr
2020-07-20 4:18 ` [PR PATCH] [Merged]: " abenson
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-16 0:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 702 bytes --]
There is an updated pull request by ericonr against master on the void-packages repository
https://github.com/ericonr/void-packages spotifyd-options
https://github.com/void-linux/void-packages/pull/23576
[WIP] spotify: restrict, remove INSTALL script.
Following discussion on IRC, this package should be restricted. Once this is merged, spotify should be included in #23575
TODO:
- Still need to find some way to fetch the license, don't want to vendor it in.
- I need some ideas on how to obtain the symlinks for `libssl` and `libcrypto` shared libraries
- It built fine but I haven't tested it yet
A patch file from https://github.com/void-linux/void-packages/pull/23576.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-spotifyd-options-23576.patch --]
[-- Type: text/x-diff, Size: 5792 bytes --]
From 84224b300252851f5a90c1eddb21d321b22c6d7f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=89rico=20Rolim?= <erico.erc@gmail.com>
Date: Tue, 14 Jul 2020 16:30:45 -0300
Subject: [PATCH] spotify: restrict, remove INSTALL script.
Remove dependencies that were detected automatically and libatomic.
---
srcpkgs/spotify/INSTALL | 41 ---------------------
srcpkgs/spotify/REMOVE | 11 ------
srcpkgs/spotify/files/spotify | 2 +-
srcpkgs/spotify/template | 67 ++++++++++++++++++++++++++++++-----
4 files changed, 60 insertions(+), 61 deletions(-)
delete mode 100644 srcpkgs/spotify/INSTALL
delete mode 100644 srcpkgs/spotify/REMOVE
diff --git a/srcpkgs/spotify/INSTALL b/srcpkgs/spotify/INSTALL
deleted file mode 100644
index 1cf70985dcb..00000000000
--- a/srcpkgs/spotify/INSTALL
+++ /dev/null
@@ -1,41 +0,0 @@
-# INSTALL for 'spotify'
-# Fetching proprietary binaries at install-time
-
-_BUILDDIR="/tmp/spotify.build"
-_LIBS=$(ldconfig -vNX -n usr/lib 2>/dev/null)
-
-linklib() {
- _LIB=$(echo "$_LIBS" | grep -m 1 "${1}\.so" | sed 's/\s*\([^ ]*\).*$/\1/')
- ln -sf "/usr/lib/${_LIB}" "/usr/share/spotify/${1}.so.${2}"
-}
-
-if test "$ACTION" = "post"; then
- . usr/share/spotify/pkgdata
- mkdir -p "$_BUILDDIR"
- (
- set -e
- cd "$_BUILDDIR"
- xbps-uhelper fetch "http://repository.spotify.com/pool/non-free/s/spotify-client/spotify-client_${SVERSION}.deb"
- echo "${SCHECKSUM} spotify-client_${SVERSION}.deb" >checksum
- sha256sum -c checksum
- ar x "spotify-client_${SVERSION}.deb"
- tar -xf data.tar.gz
- )
- if [ $? -ne 0 ] ; then
- echo "Failed downloading spotify client"
- rm -r "$_BUILDDIR";
- exit 1;
- fi
-
- [ -d "/usr/share/spotify/spotify-client" ] && rm -rf usr/share/spotify/spotify-client
- mv -f "${_BUILDDIR}/usr/share/spotify" usr/share/spotify/spotify-client
- for _s in 16 22 24 32 48 64 128 256 512; do
- mkdir -p "/usr/share/icons/hicolor/${_s}x${_s}/apps"
- ln -sf "/usr/share/spotify/spotify-client/icons/spotify-linux-${_s}.png" "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- mkdir -p usr/share/applications
- ln -sf /usr/share/spotify/spotify-client/spotify.desktop usr/share/applications/spotify.desktop
- linklib "libssl" "1.0.0"
- linklib "libcrypto" "1.0.0"
- rm -r "$_BUILDDIR"
-fi
diff --git a/srcpkgs/spotify/REMOVE b/srcpkgs/spotify/REMOVE
deleted file mode 100644
index c109f570ef8..00000000000
--- a/srcpkgs/spotify/REMOVE
+++ /dev/null
@@ -1,11 +0,0 @@
-# REMOVE for 'spotify'
-# Deleting dynamically fetched files
-
-if test "$ACTION" = "post"; then
- rm usr/share/applications/spotify.desktop
- for _s in 16 22 24 32 48 64 128 256 512; do
- rm "/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
- done
- rm -r usr/share/spotify
-fi
-
diff --git a/srcpkgs/spotify/files/spotify b/srcpkgs/spotify/files/spotify
index 35f912475d1..ab9cc8db10f 100644
--- a/srcpkgs/spotify/files/spotify
+++ b/srcpkgs/spotify/files/spotify
@@ -1,2 +1,2 @@
#!/bin/sh
-LD_LIBRARY_PATH=/usr/share/spotify exec /usr/share/spotify/spotify-client/spotify "$@"
+LD_LIBRARY_PATH=/usr/libexec/spotify exec /usr/libexec/spotify/spotify "$@"
diff --git a/srcpkgs/spotify/template b/srcpkgs/spotify/template
index d9ec603bf6a..19fa0a45c53 100644
--- a/srcpkgs/spotify/template
+++ b/srcpkgs/spotify/template
@@ -1,21 +1,72 @@
# Template file for 'spotify'
pkgname=spotify
version=1.1.26
-revision=1
+revision=2
+_ver="${version}.501.gbe11e53b-15_amd64"
+_filename="spotify-client_${_ver}.deb"
archs="x86_64"
create_wrksrc=yes
build_style=fetch
-depends="binutils gtk+ nss GConf libXScrnSaver libatomic"
+hostmakedepends="curl w3m"
+depends="GConf"
short_desc="Proprietary music streaming client"
maintainer="Stefan Mühlinghaus <jazzman@alphabreed.com>"
-license="Proprietary"
+license="custom:Proprietary"
homepage="https://www.spotify.com"
+distfiles="http://repository.spotify.com/pool/non-free/s/spotify-client/${_filename}"
+checksum=54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71
+_license_checksum=4a66993926096dd60fb03d7d82bd806f2f4b2d6ab2970aa0462e669f51f076a0
repository=nonfree
-_sversion=".501.gbe11e53b-15_amd64"
-_schecksum="54ba1bd91020913273c469591cedeebfa34aedc250033dde7c8b3fded94a9c71"
+restricted=yes
+nostrip=yes
+
+post_extract() {
+ curl -L https://www.spotify.com/us/legal/end-user-agreement/ |
+ w3m -dump -I utf-8 -T text/html |
+ sed -n '/Spotify Terms and Conditions of Use/,/^USA$/p' > EULA
+
+ filesum="$(xbps-digest EULA)"
+ if [ "$filesum" != "$_license_checksum" ]; then
+ msg_error "SHA256 mismatch for EULA:\n$filesum\n"
+ fi
+}
+
+do_build() {
+ ar x "${_filename}"
+ bsdtar -xf data.tar.gz
+}
+
+_linklib() {
+ local LIB
+ LIB="$(find /usr/lib -name "${1}.so*" | sort | tail -1)"
+ ln -sf "${LIB}" "${DESTDIR}/usr/libexec/spotify/${1}.so.${2}"
+}
+
do_install() {
- vbin ${FILESDIR}/spotify
+ vbin "${FILESDIR}/spotify"
+
vmkdir usr/share/spotify
- echo "export SVERSION=\"${version}${_sversion}\"" >"${DESTDIR}/usr/share/spotify/pkgdata"
- echo "export SCHECKSUM=\"${_schecksum}\"" >>"${DESTDIR}/usr/share/spotify/pkgdata"
+ vmkdir usr/share/applications
+ vmkdir usr/libexec/
+ vcopy usr/share/spotify usr/libexec/
+
+ # move icons to /usr/share
+ mv "${DESTDIR}/usr/libexec/spotify/icons" "${DESTDIR}/usr/share/spotify/"
+
+ # install icons
+ for _s in 16 22 24 32 48 64 128 256 512; do
+ vmkdir "usr/share/icons/hicolor/${_s}x${_s}/apps"
+ ln -sf "/usr/share/spotify/icons/spotify-linux-${_s}.png" \
+ "${DESTDIR}/usr/share/icons/hicolor/${_s}x${_s}/apps/spotify-client.png"
+ done
+
+ vmkdir usr/share/applications
+ mv "${DESTDIR}/usr/libexec/spotify/spotify.desktop" \
+ "${DESTDIR}/usr/share/applications/spotify.desktop"
+
+ # provide dynamic libraries
+ _linklib libssl 1.0.0
+ _linklib libcrypto 1.0.0
+
+ vlicense EULA
}
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR REVIEW] [WIP] spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (11 preceding siblings ...)
2020-07-16 0:14 ` [PR PATCH] [Updated] " ericonr
@ 2020-07-16 0:14 ` ericonr
2020-07-20 4:18 ` [PR PATCH] [Merged]: " abenson
13 siblings, 0 replies; 15+ messages in thread
From: ericonr @ 2020-07-16 0:14 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 169 bytes --]
New review comment by ericonr on void-packages repository
https://github.com/void-linux/void-packages/pull/23576#discussion_r455436444
Comment:
Done, I think. Thanks!
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [PR PATCH] [Merged]: spotify: restrict, remove INSTALL script.
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
` (12 preceding siblings ...)
2020-07-16 0:14 ` [PR REVIEW] " ericonr
@ 2020-07-20 4:18 ` abenson
13 siblings, 0 replies; 15+ messages in thread
From: abenson @ 2020-07-20 4:18 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 531 bytes --]
There's a merged pull request on the void-packages repository
spotify: restrict, remove INSTALL script.
https://github.com/void-linux/void-packages/pull/23576
Description:
Following discussion on IRC, this package should be restricted. Once this is merged, spotify should be included in #23575
TODO:
- Still need to find some way to fetch the license, don't want to vendor it in.
- I need some ideas on how to obtain the symlinks for `libssl` and `libcrypto` shared libraries
- It built fine but I haven't tested it yet
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2020-07-20 4:18 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-14 19:36 [PR PATCH] [WIP] spotify: restrict, remove INSTALL script ericonr
2020-07-14 20:42 ` [PR PATCH] [Updated] " ericonr
2020-07-14 20:51 ` ericonr
2020-07-14 23:58 ` ericonr
2020-07-15 0:03 ` ericonr
2020-07-15 15:05 ` sgn
2020-07-15 17:34 ` ericonr
2020-07-15 20:57 ` Chocimier
2020-07-15 21:26 ` [PR PATCH] [Updated] " ericonr
2020-07-15 23:37 ` [PR REVIEW] " sgn
2020-07-15 23:37 ` sgn
2020-07-16 0:05 ` ericonr
2020-07-16 0:14 ` [PR PATCH] [Updated] " ericonr
2020-07-16 0:14 ` [PR REVIEW] " ericonr
2020-07-20 4:18 ` [PR PATCH] [Merged]: " abenson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).