Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281358 - net-misc/amazonmp3 and libraries - update for FC9 version of amazonmp3
Summary: net-misc/amazonmp3 and libraries - update for FC9 version of amazonmp3
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High enhancement (vote)
Assignee: Jim Ramsay (lack) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-13 17:33 UTC by Gareth Fitch
Modified: 2010-07-26 20:11 UTC (History)
5 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Modified ebuild for amazonmp3 (from local overlay) (amazonmp3-9999.ebuild,2.38 KB, text/plain)
2009-08-13 17:34 UTC, Gareth Fitch
Details
Modified ebuild for amazonmp3-libcompat (from local overlay) (amazonmp3-libcompat-9999.ebuild,1.20 KB, text/plain)
2009-08-13 17:35 UTC, Gareth Fitch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gareth Fitch 2009-08-13 17:33:14 UTC
This is related to bug 250650, the ebuild from which didn't quite work on my system. Amazonmp3 demanded symlinks to a few more libraries.

I added a dependency on net-misc/amazonmp3-libcompat, since this basically won't work without it.

net-misc/amazonmp3-libcompat I modified so that it simply used the rpm directly from Fedora (OK renamed with amazonmp3- prefix) rather than having to create a package of one's own. Also added dependency for sys-libs/libstdc++-v3 since amazonmp3 seems to require libstdc++.so.6.
Comment 1 Gareth Fitch 2009-08-13 17:34:46 UTC
Created attachment 201158 [details]
Modified ebuild for amazonmp3 (from local overlay)
Comment 2 Gareth Fitch 2009-08-13 17:35:54 UTC
Created attachment 201159 [details]
Modified ebuild for amazonmp3-libcompat (from local overlay)

Modified libcompat ebuild. Sorry, removed amd64 from this as I don't have an instance on which to test it.
Comment 3 Mads 2009-11-30 15:35:24 UTC
Good work. A pity this doesn't work on amd64 yet..

You have to do some changes within amazonmp3-libcompat, but I guess you already know. First I had to download boost-1.34.1-13.fc9.i386.rpm, then I had to run rpm2targz on it, then I had to edit line 13 (SRC_URI) cutting out "amazonmp3-" and make the filename end with .tar.gz instead of .rpm, and then set S="boost-${BOOST_VERSION}.tar.gz" in line 32, and in line 35 change unpack to "unpack ${S}".

the src_install function I edited to look like this to keep out hardcoded paths and sandbox issues:

src_install() {
        local OPTDIR="/opt/${PN}"

        # The amazonmp3 binary, compiled for Fedora 9, needs boost-1.34, so we $
        # set of the libs, ripped right out of their boost-1.34.1-13.fc9.i386.r$
        mkdir -p "${D}${OPTDIR}"
        mv ${WORKDIR}/usr/lib/* "${D}${OPTDIR}"

        echo "LDPATH=\"${OPTDIR}\"" > 99amazonmp3-libcompat
        doenvd 99amazonmp3-libcompat
}

And, should you really make a env.d file for this? Won't the 1.34 libboost become global if you do that? I think it would be better with a wrapper script which changes LDPATH instead of a global LD-variable..
Comment 4 Jochen 2009-12-20 10:38:39 UTC
Nice, can't we get this ebuild in the tree? There is no way to download mp3 albums from amazon right now.

Greetings
Comment 5 Gareth Fitch 2009-12-20 14:43:58 UTC
(In reply to comment #3)
> Good work. A pity this doesn't work on amd64 yet..

I now have an amd64 install so will work on it.
 
> You have to do some changes within amazonmp3-libcompat, but I guess you 
> already know.

Sadly not, as I'm a bit (read: very) new at ebuild creation and haven't yet learned all the pit-falls. 

On my system, calling rpm2targz and extracting that didn't work very well, while rpm_unpack worked directly. I'll try again, though.

I didn't know whether it was fair/a good idea to wget the FC9 package directly from Fedora's servers, especially as it may disappear at some point in the future and as I'd have to hard-code the mirror.

> And, should you really make a env.d file for this? Won't the 1.34 libboost
> become global if you do that? I think it would be better with a wrapper script
> which changes LDPATH instead of a global LD-variable..

Script: good idea. I'll have a go. 

Many thanks for the feedback and advice.

Comment 6 Andrew Udvare 2009-12-21 19:35:48 UTC
Using `readelf -d amazonmp3`, we have these libs to do also for x86-64 (there are currently no emul-linux-x86 packages unfortunately right now).

We are missing the following files for emul-linux-x86:
 0x00000001 (NEEDED)                     Shared library: [libglademm-2.4.so.1]
 0x00000001 (NEEDED)                     Shared library: [libgtkmm-2.4.so.1]  
 0x00000001 (NEEDED)                     Shared library: [libglade-2.0.so.0]  
 0x00000001 (NEEDED)                     Shared library: [libgiomm-2.4.so.1]  
 0x00000001 (NEEDED)                     Shared library: [libgdkmm-2.4.so.1]  
 0x00000001 (NEEDED)                     Shared library: [libatkmm-1.6.so.1]  
 0x00000001 (NEEDED)                     Shared library: [libpangomm-1.4.so.1]
 0x00000001 (NEEDED)                     Shared library: [libcairomm-1.0.so.1]
 0x00000001 (NEEDED)                     Shared library: [libglibmm-2.4.so.1] 
 0x00000001 (NEEDED)                     Shared library: [libsigc-2.0.so.0]     
 0x00000001 (NEEDED)                     Shared library: [libfreebl3.so]           
 0x00000001 (NEEDED)                     Shared library: [libstdc++.so.6]          
 0x00000001 (NEEDED)                     Shared library: 

Notes:
- libstdc++.so.6, we do have libstdc++.so.5 in /usr/lib32 so maybe a symlink is possible provided they are ABI compatible (buggy probably); I would suggest putting libstdc++.so.6 in the new LDPATH set at runtime
- libfreebl3.so (32-bit) is included with seamonkey-bin, maybe this copy is compatible?

So glad to get past the Boost issue.
Comment 7 Jim Ramsay (lack) (RETIRED) gentoo-dev 2009-12-21 19:57:23 UTC
(In reply to comment #6)
> Using `readelf -d amazonmp3`, we have these libs to do also for x86-64 (there
> are currently no emul-linux-x86 packages unfortunately right now).

You are beginning to see why I gave up on amd64 support... It can be done, but it's messy.  If amazon released a static binary, things would be so much nicer ;)

The good news is that some day "soon" the portage gurus will be adding *true* multilib support to amd64 so that we can just ask for a 32-bit version of gtkmm and portage will do the heavy lifting for us without any sort of emul-x86 packages... Once that's in place this support will be a bit more feasible.
Comment 8 Andrew Udvare 2009-12-21 20:50:23 UTC
X86-64 just to add. Untar this to /opt/amazonmp3-libcompat http://www.sendspace.com/file/lelxpe . (Uploaded there because limit here is 2 MB.)

Might be a bit redundant, but I have gone through and got every lib file necessary all from Fedora mirrors. The only problem is that when I run LD_LIBRARY_PATH="/opt/amazonmp3-libcompat:/usr/lib32" amazonmp3 it does not start only because of this error:

version `GLIBCXX_3.4.11' not found

and it has to do with one of the Boost libs. Even if that gets solved, who knwos what's next?

I am moving on from this. I installed Clamz http://code.google.com/p/clamz/ , a command-line alternative that seems to work fine. I am not sure how this will change in the future considering it's free software and Amazon can change their implementation at any time.
Comment 9 Jim Ramsay (lack) (RETIRED) gentoo-dev 2010-07-26 20:11:56 UTC
(In reply to comment #8)
> I am moving on from this. I installed Clamz http://code.google.com/p/clamz/ , a
> command-line alternative that seems to work fine. I am not sure how this will
> change in the future considering it's free software and Amazon can change their
> implementation at any time.

I'm also moving on from this and booting net-misc/amazonmp3 from the tree.  There are now 2 packages available that are open-source and provide the same function as this binary:
  net-misc/clamz
  net-misc/pymazon