USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

amazon mp3 downloader script

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Shell Scripting and Programming
View previous topic :: View next topic  
Author Message
inactive
Sr. Member


Joined: 29 Aug 2024
Posts: 1207

PostPosted: Sun Apr 26, 2024 4:13 pm    Post subject: amazon mp3 downloader script Reply with quote

I've been having some issues with the following script (that worked through Mandriva 2024.0), getting the amazonmp3 downloader to install to Cooker without dependency errors. There are a couple of other distros that have bugs filed on the amazonmp3 downloader as well, because it won't make correctly for them. I've created all symlinks necessary for the updated libboost, but still get errors on installation, and the downloader itself won't start:
Code:
#! /bin/sh
# hackamazonmp3.sh
# install the Amazon MP3 downloader on Mandriva 2024.1
# by adapting the debian binary package
# clever concept stolen from godane's PKGBUILD on the Arch Linux User Repository (AUR)
# http://aur.archlinux.org/packages.html?ID=15566

mkdir -p ~/tmp/amazonmp3
cd ~/tmp/amazonmp3
# convert the deb file to a tar.gz
# http://www.miketaylor.org.uk/tech/deb/
wget http://www.miketaylor.org.uk/tech/deb/deb2targz
chmod +x deb2targz
# get the debian binary
# http://www.amazon.com/gp/dmusic/help/amd.html
wget http://amazonm-002.vo.llnwd.net/u/d1/clients/amazonmp3_1.0.3~gutsy_i386.deb
# checksum -- make sure it says OK before issuing the installamazon command as root
echo 0a9b986e2e9ba5be7e412e9742688ebb \ amazonmp3_1.0.3~gutsy_i386.deb > deb.md5
md5sum -c 'deb.md5'
./deb2targz amazonmp3_1.0.3~gutsy_i386.deb
# extract the binary
tar -xzf amazonmp3_1.0.3~gutsy_i386.tar.gz
# construct the install script that must be run as root
echo #! /bin/sh > installamazon
echo chown -R root:root usr >> installamazon
echo cp -a usr / >> installamazon
# libboost is not installed by default on 2024.1
echo urpmi libboost >> installamazon
echo cd /usr/lib >> installamazon
echo ln -s libboost_date_time.so.1.34.1 libboost_date_time-gcc41-1_34_1.so.1.34.1 >> installamazon
echo ln -s libboost_iostreams.so.1.34.1 libboost_iostreams-gcc41-1_34_1.so.1.34.1 >> installamazon
echo ln -s libboost_signals.so.1.34.1 libboost_signals-gcc41-1_34_1.so.1.34.1 >> installamazon
echo ln -s libboost_thread-mt.so.1.34.1 libboost_thread-gcc41-mt-1_34_1.so.1.34.1 >> installamazon
echo cd - >> installamazon
echo cd .. >> installamazon
echo rm -rf amazonmp3 >> installamazon
echo \n >> installamazon
chmod +x installamazon
echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
echo +++ Change to the directory $HOME/tmp/amazonmp3
echo +++ Issue the command su, and enter your root password
echo +++ Then issue the command: ./installamazon
echo +++ Note: This last command will end with an error, because it deletes itself.
echo +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
exit 0


The interesting thing (to me anyway), is that alien won't compile the amazonmp3.deb from the amazon site.

What would I have to change in this script to make it work?

Thanks!



_________________
Mandriva 2024.1 PWP
Mandriva Cooker
ArtistX live
Back to top
View user's profile Send private message
inactive
Sr. Member


Joined: 29 Aug 2024
Posts: 1207

PostPosted: Sun Apr 26, 2024 4:20 pm    Post subject: Reply with quote

Here is a list of what fails (so far), even with the symlinks for each to the updated versions:
Code:
[root@localhost xxxxx]# rpm -ivh /home/xxxxx/Download/amazonmp3.rpm
warning: /home/xxxxx/Download/amazonmp3.rpm: Header V3 DSA signature: NOKEY, key ID 70e6adf9
error: Failed dependencies:
   gtkmm24 is needed by amazonmp3-1:1.0.3-1.i386
   libboost_date_time.so.3 is needed by amazonmp3-1:1.0.3-1.i386
   libboost_iostreams.so.3 is needed by amazonmp3-1:1.0.3-1.i386
   libboost_signals.so.3 is needed by amazonmp3-1:1.0.3-1.i386
   libboost_thread-mt.so.3 is needed by amazonmp3-1:1.0.3-1.i386
   libcrypto.so.6 is needed by amazonmp3-1:1.0.3-1.i386
   libssl.so.6 is needed by amazonmp3-1:1.0.3-1.i386



_________________
Mandriva 2024.1 PWP
Mandriva Cooker
ArtistX live
Back to top
View user's profile Send private message
inactive
Sr. Member


Joined: 29 Aug 2024
Posts: 1207

PostPosted: Sun Apr 26, 2024 4:32 pm    Post subject: Reply with quote

It's the same with the script itself as with the .rpm - exact same errors:
Code:
[xxxxx@localhost ~]$ ./amazon_install.sh
--2009-04-26 10:24:52--  http://www.miketaylor.org.uk/tech/deb/deb2targz
Resolving www.miketaylor.org.uk... 130.226.235.216
Connecting to www.miketaylor.org.uk|130.226.235.216|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1947 (1.9K) [text/plain]
Saving to: `deb2targz.1'

100%[======================================>] 1,947       --.-K/s   in 0s     

2009-04-26 10:25:02 (89.7 MB/s) - `deb2targz.1' saved [1947/1947]

--2009-04-26 10:25:02--  http://amazonm-002.vo.llnwd.net/u/d1/clients/amazonmp3_1.0.3~gutsy_i386.deb
Resolving amazonm-002.vo.llnwd.net... 68.142.79.69, 68.142.79.70
Connecting to amazonm-002.vo.llnwd.net|68.142.79.69|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 261312 (255K) [text/plain]
Saving to: `amazonmp3_1.0.3~gutsy_i386.deb.1'

100%[======================================>] 261,312     94.4K/s   in 2.7s   

2009-04-26 10:25:13 (94.4 KB/s) - `amazonmp3_1.0.3~gutsy_i386.deb.1' saved [261312/261312]

amazonmp3_1.0.3~gutsy_i386.deb: OK
deb2targz: converting 'amazonmp3_1.0.3~gutsy_i386.deb' ...
deb2targz: skipping section 'debian-binary'
deb2targz: skipping section 'control.tar.gz'
deb2targz: wrote 'amazonmp3_1.0.3~gutsy_i386.tar.gz'

+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++ Change to the directory /home/xxxxx/tmp/amazonmp3
+++ Issue the command su, and enter your root password
+++ Then issue the command: ./installamazon
+++ Note: This last command will end with an error, because it deletes itself.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

At this point, in /home/xxxxx/tmp/amazonmp3, is this:
Code:
[xxxxx@localhost amazonmp3]$ ls /home/xxxxx/tmp/amazonmp3
amazonmp3_1.0.3~gutsy_i386.deb     deb2targz*   installamazon*
amazonmp3_1.0.3~gutsy_i386.deb.1   deb2targz.1  usr/
amazonmp3_1.0.3~gutsy_i386.tar.gz  deb.md5

Then,,,
Code:
[xxxxx@localhost amazonmp3]$ su
Password:
[root@localhost amazonmp3]# ./installamazon

    ftp://ftp.free.fr//mirrors/ftp.mandriva.com/MandrivaLinux/devel/2009.1/i586/media/main/release/libboost1.37.0-1.37.0-4mdv2009.1.i586.rpm
installing libboost1.37.0-1.37.0-4mdv2009.1.i586.rpm from /var/cache/urpmi/rpms
Preparing...                     #############################################
      1/1: libboost1.37.0        #############################################
/home/xxxxx/tmp/amazonmp3
./installamazon: line 12: n: command not found
chown: cannot access `usr': No such file or directory
cp: cannot stat `usr': No such file or directory
In order to satisfy the 'libboost1.37.0|libboost1.38.0' dependency, one of the following packages is needed:
 1- libboost1.38.0-1.38.0-2mdv2009.1.i586: The shared libraries needed for running programs using Boost (to upgrade)
 2- libboost1.37.0-1.37.0-4mdv2009.1.i586: The shared libraries needed for running programs using Boost (to upgrade)
What is your choice? (1-2) 2
Package libboost1.37.0-1.37.0-4mdv2009.1.i586 is already installed
ln: creating symbolic link `libboost_date_time-gcc41-1_34_1.so.1.34.1': File exists
ln: creating symbolic link `libboost_iostreams-gcc41-1_34_1.so.1.34.1': File exists
ln: creating symbolic link `libboost_signals-gcc41-1_34_1.so.1.34.1': File exists
ln: creating symbolic link `libboost_thread-gcc41-mt-1_34_1.so.1.34.1': File exists
/home/xxxxx/tmp
./installamazon: line 24: n: command not found

And, it's still won't start:
Code:
[xxxxx@localhost amazonmp3]$ cd /usr/bin
[xxxxx@localhost bin]$ amazonmp3
amazonmp3: error while loading shared libraries: libboost_date_time-gcc41-1_34_1.so.1.34.1: cannot open shared object file: No such file or directory



_________________
Mandriva 2024.1 PWP
Mandriva Cooker
ArtistX live
Back to top
View user's profile Send private message
inactive
Sr. Member


Joined: 29 Aug 2024
Posts: 1207

PostPosted: Sun Apr 26, 2024 5:24 pm    Post subject: Reply with quote

The solution was simple, install libbost from Mandriva 2024.1's Main repository, disable it when done. LOL.



_________________
Mandriva 2024.1 PWP
Mandriva Cooker
ArtistX live
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » Shell Scripting and Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse