Showing posts with label tech. Show all posts
Showing posts with label tech. Show all posts

Friday, December 26, 2008

The Linux Amazon MP3 Downloader

I thought I would write about my experiences with the Amazon MP3 downloader on Linux, and my thoughts on those experiences. Many have written before about it, but perhaps I'll provide a new angle? Perhaps not. Read on.

Last year when Amazon announced their non-DRM mp3 download service I was very excited. I wanted to "vote with my wallet" by purchasing some music, just to show that I really supported the idea. The catch was you had to use the Amazon Download manager in order to buy full albums at the album prices. Sure you could buy all the songs of a given album individually, but you paid a premium. Not surprisingly there wasn't a GNU/Linux version, but amazingly one was in the works! So I decided to wait. When they released the Linux version this past March I never got around to using it. A few weeks ago I finally gave it a whirl.

As others have noted Amazon provides install files for four different systems: Ubuntu 7.10, Debian 4 Etch, Fedora 8, and OpenSUSE 10.3. None of them being a 64-bit variety. OK, I guess I can accept that these are decent choices if you were going to release a closed application on only 4 Linux variants. But they should at least provide a .tar.gz version. I'm running Fedora 9 x86_64, so I figure my best bet will be the Fedora 8 RPM, after all I can run 32-bit apps as long as I have 32-bit libraries it needs.


# rpm -Uvh amazonmp3.rpm
error: Failed dependencies:
libcrypto.so.6 is needed by amazonmp3-1.0.3-1.i386
libssl.so.6 is needed by amazonmp3-1.0.3-1.i386

Hum, those look like some pretty basic libraries, I really don't have them?

# ldconfig -p | grep crypto
libk5crypto.so.3 (libc6,x86-64) => /usr/lib64/libk5crypto.so.3
libk5crypto.so.3 (libc6) => /usr/lib/libk5crypto.so.3
libk5crypto.so (libc6,x86-64) => /usr/lib64/libk5crypto.so
libcrypto.so.7 (libc6,x86-64) => /lib64/libcrypto.so.7
libcrypto.so.7 (libc6) => /lib/libcrypto.so.7

Oh, so I DO have the crypto library, just a newer version of it! Same thing with libssl...too new:

# ldconfig -p | grep libssl
libssl3.so (libc6,x86-64) => /lib64/libssl3.so
libssl3.so (libc6,x86-64) => /usr/lib64/libssl3.so
libssl3.so (libc6) => /lib/libssl3.so
libssl.so.7 (libc6,x86-64) => /lib64/libssl.so.7
libssl.so.7 (libc6) => /lib/libssl.so.7

These library "versions" are supposed to mean that they are not ABI compatible with previous versions, but maybe it doesn't REALLY need the old version. I could just fake it using a symbolic link:

# ln -s /lib/libssl.so.7 /lib/libssl.so.6
# ln -s /lib/libcrypto.so.7 /lib/libcrypto.so.6

But the package still won't install because the RPM database doesn't know anything about these faked out libraries. So I use the rpm2tgz tool to extract the binaries out of the RPM file. And what do you know, the downloader launches successfully! However, trying it out with one of the free downloads that Amazon offers shows that there appears to be a communications issue, probably that drat SSL library. So what are my options?

  1. Figure out which libssl release corresponds to libssl.so.6 and build a parallel version
  2. Install one of the "supported" Linux variants

I decided on the second option, besides I have been meaning to try out VirtualBox (I typically use VMWare for my virtualizing needs). Also I haven't looked at OpenSUSE in forever and would not mind checking it out. So I install and configure VirtualBox (not without it's issues, but that is another story), install and configure OpenSUSE 10.3 inside of VirtualBox, and finally install the Amazon downloader. With this setup I successfully purchased and downloaded Slipknot's newest album "All Hope is Gone." A bit of a heavyweight solution, and it will get irritating fast if I use it often, but it worked.

In the end I was happy with my purchase, and I don't really expect Amazon to do an in-house build for all the Linux variants out there, but that is the point isn't it? Is there really a reason to keep a download manager closed up? I mean the interface is brain-dead simple, it doesn't really provide any special features other than talking with their servers. This simpleness is a good thing, as I likely have other applications I prefer to use for any other operation they would put in their downloader. Make it an open project and devs can make builds that work for their distros giving access to more people without limiting their distro choice.