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

rpmbuild error #23

Open
b-kant opened this issue Oct 12, 2013 · 16 comments
Open

rpmbuild error #23

b-kant opened this issue Oct 12, 2013 · 16 comments

Comments

@b-kant
Copy link

b-kant commented Oct 12, 2013

I installed the latest installer package today from Packman (0.9.4.183.g644e24e.428-1.1) but didn't have success installing Spotify.

When running install-spotify, the current deb file (spotify-client_0.9.4.183.g644e24e.428-1_amd64.deb) was downloaded successfully. Then this error occurred:

About to build spotify-client rpm; please be patient ...

error: line 16: Illegal char '-' in: Version:        0.9.4.183.g644e24e.428-1
rpmbuild -ba /usr/src/packages/SPECS/spotify-client.spec failed! Aborting.

At line 16 in spotify-client.spec, the version number was stored as "0.9.4.183.g644e24e.428-1". Judging from other posts here, I sensed that the trailing "-1" shouldn' be here. I deleted these two characters and tried again. The script in fact didn't produce the former error and was running further down the road. So I guess this one should be changed in the production file as well.

But then after some activity the script threw this error:

calling /usr/lib/rpm/brp-suse.d/brp-25-symlink
ERROR: link target doesn't exist (neither in build root nor in installed system):
  /opt/spotify/spotify-client/lib/libcef.so -> /opt/spotify/spotify-client/libcef.so
Add the package providing the target to neededforbuild and Requires
error: Bad exit status from /var/tmp/rpm-tmp.SV8tv0 (%install)

RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.SV8tv0 (%install)
rpmbuild -ba /usr/src/packages/SPECS/spotify-client.spec failed! Aborting.

In the notation of spotify-client.spec, this file libcef.so apparently is expected to be in %{buildroot}%{spotifylibdir}/libcef.so. A symbolic link there is pointing to "../libcef.so" but it can't be found there at the presumed target location. Actually there is a file libcef.so now in what would be "../Data/libcef.so".

At this point I reached the limit of my abilities ... Please help.

@RogerJL
Copy link

RogerJL commented Oct 13, 2013

Modifying the /usr/src/packages/SPECS/spotify-client.spec
by removing the -1 let the rpmbuild complete for me...
[at first attempt I tried to rename the downloaded .deb file aswell - did not work]

Checking script output I see it was different from yours

  • ln -sf ../libcef.so /home/roger/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libcef.so

@thermopyle
Copy link

I had to make two alterations to /usr/src/packages/SPECS/spotify-client.spec; at line 16 I removed "-1" and line 116 I changed into "ln -sf ../Data/libcef.so %{buildroot}%{spotifylibdir}/libcef.so" (added "Data" to the path). Then everything built but it still failed when zypper tried to install the rpm. I then did su and ran zypper manually like this: "zypper in /home/micke/rpmbuild/RPMS/x86_64/spotify-client-0.9.4.183.g644e24e.428-1.x86_64.rpm". This time it installed fine and now I have a working Spotify client again!

/Micke.

@Heart1010
Copy link

Thank thermopyle! With your two changes I'm able to install spotify here too....

@b-kant
Copy link
Author

b-kant commented Oct 28, 2013

Thanks thermopyle, that did work.

@b-kant b-kant closed this as completed Oct 28, 2013
@aspiers
Copy link
Owner

aspiers commented Oct 28, 2013

Thanks a lot for the info guys. I think we should keep this open until it has been modified to work out of the box.

@aspiers aspiers reopened this Oct 28, 2013
@ghost
Copy link

ghost commented Nov 23, 2013

Worked for me in 13.1. Thanks!

@ausrick
Copy link

ausrick commented Dec 31, 2013

#23 (comment) worked for me and allowed complete install on 13.1. Thanks!

@aspiers
Copy link
Owner

aspiers commented Dec 31, 2013

FWIW I am hoping to finish the port to spotify-make quite soon, which will solve this in a completely different and more future-proof way.

@ghost
Copy link

ghost commented Jan 2, 2014

Does this bug occur on other rpm based systems or is it just OpenSUSE? Wouldn't it be easier to submit a fix for the spec file? I guess it is still a common error.

@aspiers
Copy link
Owner

aspiers commented Jan 2, 2014

@exaem This project is only for openSUSE - look at the name ;-)

Several people have submitted "fixes" already (e.g. see #15, #16) but personally I'm not keen in investing time in something which is less future-proof - I'd rather focus on doing it the right way once. spotify-make is well-maintained and cross-platform, so the burden of keeping it up to date can be shared across distros. So this project will just become an RPM-based wrapper around that. For ease of maintenance I'm contemplating removing the script-based install method and only supporting the one which provides the installer in an RPM (although both subsequently dynamically create an RPM with Spotify inside it).

@ghost
Copy link

ghost commented Jan 2, 2014

@aspiers Haha! I'm stupid, I thought RPM builds were cross compatible. That makes sense, however, maybe adding a post to the README or Wiki page would enable users who still come across and use this script to fix the problem they have?

@aspiers
Copy link
Owner

aspiers commented Jan 3, 2014

Many distributions use rpm, but that is very far from meaning that all rpms are compatible on any rpm-based distribution. Some are, but the majority aren't (mostly due to dependencies).

Sorry - I don't understand your suggestion about adding a post to the README or wiki. What problem are you referring to?

@ResearchRobert
Copy link

Thank you and great work Thermopyle. You are chipped from a solid block of teh awesome!

@KINFOO
Copy link

KINFOO commented May 6, 2014

Hi,

I installed the installer with:

sudo zypper in spotify-installer

I know the bug is fixed for short term, but could we port this to the repository?
Because when trying to update i got:

$ install-spotify   
rpm-build is already installed.

Spotify .deb package already exists:

  ~/rpmbuild/SOURCES/spotify-client_0.9.4.183.g644e24e.428-1_amd64.deb

Skipping download.

About to build spotify-client rpm; please be patient ...

Exécution_de(%prep) : /bin/sh -e /var/tmp/rpm-tmp.FUJ33z
+ umask 022
+ cd /home/kevin/rpmbuild/BUILD
+ cd /home/kevin/rpmbuild/BUILD
+ rm -rf spotify-client-0.9.4.183.g644e24e.428
+ /usr/bin/mkdir -p spotify-client-0.9.4.183.g644e24e.428
+ cd spotify-client-0.9.4.183.g644e24e.428
+ /usr/bin/chmod -Rf a+rX,u+w,g-w,o-w .
+ ar -x /home/kevin/rpmbuild/SOURCES/spotify-client_0.9.4.183.g644e24e.428-1_amd64.deb
+ tar -xzf data.tar.gz
+ rm control.tar.gz data.tar.gz debian-binary
+ cat
+ chmod +x /home/kevin/rpmbuild/BUILD/spotify-client-0.9.4.183.g644e24e.428/find-requires.sh
+ exit 0
Exécution_de(%build) : /bin/sh -e /var/tmp/rpm-tmp.1fWhBq
+ umask 022
+ cd /home/kevin/rpmbuild/BUILD
+ /usr/bin/rm -rf /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64
++ dirname /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64
+ /usr/bin/mkdir -p /home/kevin/rpmbuild/BUILDROOT
+ /usr/bin/mkdir /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64
+ cd spotify-client-0.9.4.183.g644e24e.428
+ exit 0
Exécution_de(%install) : /bin/sh -e /var/tmp/rpm-tmp.VWgp9g
+ umask 022
+ cd /home/kevin/rpmbuild/BUILD
+ cd spotify-client-0.9.4.183.g644e24e.428
+ mv opt /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64
+ desktop=/home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/spotify.desktop
+ sed -i 's/^\(MimeType=.*\);?$/\1;/i ;
    s/^Categories=/Categories=AudioVideo;Music;Player;Jukebox;/' /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/spotify.desktop
+ /usr/lib/rpm/suse_update_desktop_file.sh /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/spotify.desktop
WARNING: Category "Audio" is unknown \!
WARNING: it is ignored, until you registered a Category at [email protected] .
+ mkdir -p /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/usr/share/doc/packages/spotify-client
+ mv usr/share/doc/spotify-client/changelog.Debian.gz usr/share/doc/spotify-client/copyright /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/usr/share/doc/packages/spotify-client/
+ cat
+ mkdir -p /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib
+ ln -sf ../libcef.so /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libcef.so
+ mkdir -p /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/usr/bin
+ wrapper=/home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/usr/bin/spotify
+ cat
+ chmod +x /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/usr/bin/spotify
+ mkdir -p /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/usr/lib64
+ ln -sf /lib64/libcrypto.so.1.0.0 /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libcrypto.so.0.9.8
+ ln -sf /lib64/libssl.so.1.0.0 /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libssl.so.0.9.8
+ libs=(libnss3.so.1d libnssutil3.so.1d libsmime3.so.1d libplc4.so.0d libnspr4.so.0d)
+ for lib in '"${libs[@]}"'
+ ln -sf /usr/lib64/libnss3.so /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libnss3.so.1d
+ for lib in '"${libs[@]}"'
+ ln -sf /usr/lib64/libnssutil3.so /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libnssutil3.so.1d
+ for lib in '"${libs[@]}"'
+ ln -sf /usr/lib64/libsmime3.so /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libsmime3.so.1d
+ for lib in '"${libs[@]}"'
+ ln -sf /usr/lib64/libplc4.so /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libplc4.so.0d
+ for lib in '"${libs[@]}"'
+ ln -sf /usr/lib64/libnspr4.so /home/kevin/rpmbuild/BUILDROOT/spotify-client-0.9.4.183.g644e24e.428-1.x86_64/opt/spotify/spotify-client/lib/libnspr4.so.0d
+ export NO_BRP_CHECK_RPATH=true
+ NO_BRP_CHECK_RPATH=true
+ /usr/lib/rpm/brp-compress
+ /usr/lib/rpm/brp-suse
calling /usr/lib/rpm/brp-suse.d/brp-05-permissions
setting / to root:root 0755. (wrong owner/group kevin:users)
setting /opt/ to root:root 0755. (wrong owner/group kevin:users)
setting /usr/ to root:root 0755. (wrong owner/group kevin:users)
calling /usr/lib/rpm/brp-suse.d/brp-15-strip-debug
calling /usr/lib/rpm/brp-suse.d/brp-20-check-la
calling /usr/lib/rpm/brp-suse.d/brp-25-symlink
ERROR: link target doesn't exist (neither in build root nor in installed system):
  /opt/spotify/spotify-client/lib/libcef.so -> /opt/spotify/spotify-client/libcef.so
Add the package providing the target to neededforbuild and Requires
erreur : Mauvais statut de sortie pour /var/tmp/rpm-tmp.VWgp9g (%install)


Erreur de construction de RPM :
Mauvais statut de sortie pour /var/tmp/rpm-tmp.VWgp9g (%install)
rpmbuild -ba /usr/src/packages/SPECS/spotify-client.spec failed! Aborting.

Regards

@GreatAnubis
Copy link

Thanks for the hint with a "/Data" in the path. That worked for me!

Spotify can now be run via /usr/bin/spotify - happy listening!

cheers!

@Frantisek12
Copy link

Adding /Data to the path worked for me too, thanks.
I was also missing libgcrypt11 and libudev on fresh installation of openSUSE 13.2 but now I am listening the Spotify while typing these lines :)

Thanks again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants