Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 831029

Summary: media-sound/spotify-1.1.72-r1 depends on /bin/sh being bash in launch script (/usr/bin/spotify)
Product: Gentoo Linux Reporter: Frederik Pfautsch <bugs>
Component: Current packagesAssignee: Matthew Thode ( prometheanfire ) <prometheanfire>
Status: RESOLVED FIXED    
Severity: normal CC: kfm
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 526268    
Attachments: Patch to add media-sound/spotify-1.1.72-r2

Description Frederik Pfautsch 2022-01-11 19:03:12 UTC
`if command -v spotify-dbus.py &> /dev/null;` in /usr/bin/spotify always returns true for me using dash as /bin/sh although not having gnome-integration-spotify installed. Changing to bash as /bin/sh the script works as intended and launches spotify without tray support.

Reproducible: Always

Actual Results:  
Launching spotify with Gnome systray integration
/usr/bin/spotify: 4: spotify-dbus.py: not found
Comment 1 kfm 2022-01-11 21:05:30 UTC
Created attachment 761938 [details, diff]
Patch to add media-sound/spotify-1.1.72-r2

A patch to add media-sound/spotify-1.1.72-r2, which renders the wrapper script POSIX conforming.
Comment 2 Larry the Git Cow gentoo-dev 2022-01-11 23:11:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=253b5cce58ee7e965d48da56adc81f5df30d45d3

commit 253b5cce58ee7e965d48da56adc81f5df30d45d3
Author:     Kerin Millar <kfm@plushkava.net>
AuthorDate: 2022-01-11 20:54:19 +0000
Commit:     Matthew Thode <prometheanfire@gentoo.org>
CommitDate: 2022-01-11 23:11:50 +0000

    media-sound/spotify: Fix POSIX sh violations in the wrapper script
    
    Adjust the wrapper script template so as to operate correctly in POSIX
    sh(1), in addition to incorporating some minor quality improvements.
    Relocate the template to FILESDIR and use envsubst(1) to substitute the
    SPOTIFY_HOME and LIBDIR variables at the point that the wrapper is
    generated. Doing so makes it simpler to read and maintain.
    
    Closes: https://bugs.gentoo.org/831029
    Signed-off-by: Kerin Millar <kfm@plushkava.net>
    Signed-off-by: Matthew Thode <prometheanfire@gentoo.org>

 media-sound/spotify/files/spotify-wrapper    |  23 ++++++
 media-sound/spotify/spotify-1.1.72-r2.ebuild | 116 +++++++++++++++++++++++++++
 2 files changed, 139 insertions(+)