SliTaz SliTaz Forum

You are not logged in.

#1 2013-01-06 08:12:40

ernia
Member
Registered: 2011-05-20
Posts: 299

get-java6-jre fix for changed url and mime type

java.com has changed and makes get-java6-jre ending with an empty package, this patch will fix it:

[c]--- /usr/bin/get-java6-jre
+++ /usr/bin/get-java6-jre-fixed
@@ -7,11 +7,11 @@

PACKAGE="java6-jre"
WEB_SITE="http://www.java.com/"
-TARBALL="jre.tar.gz"
+TARBALL="jre.bin"
TEMP_DIR="/tmp/$PACKAGE.$$"
ROOT="$1"

-URL="$(wget -O - ${WEB_SITE}en/download/manual.jsp | \
+URL="$(wget -O - ${WEB_SITE}en/download/manual_v6.jsp | \
        sed '/self-extracting/!d;s/.*href="\([^"]*\).*/\1/;q')"

# Check if we are root starting anything
@@ -48,8 +48,7 @@

# Run the install file user may agree to SUN EULA
chmod +x  $TARBALL
-tar xvf ${TARBALL}
-
+/bin/sh $TARBALL

# Make the package
VERSION="$(ls jre?.* -d | sed 's/^jre//')"[/c]

Offline

#2 2013-01-06 12:26:41

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: get-java6-jre fix for changed url and mime type

@bellard

hi, you sure work a lot in Slitaz :-)

i've seen http://hg.slitaz.org/wok/rev/2bc0db3c104a

doesn't the changeset miss

[c]-tar xvf ${TARBALL}
+/bin/sh $TARBALL[/c]
?

in my system tar xvf can't extract jre.bin file:

[c]tux@slitaz:~ $ tar xvf jre-6u38-linux-i586.bin
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors[/c]
Forgive me if i abuse of your kindness, did you see last two posts of this:

http://forum.slitaz.org/topic/clamtk-receipt-typo

?

While clamtk builds well in 4.0 it's still broken in rolling.

If you fix get-LibreOffice too

http://forum.slitaz.org/topic/rolling-get-libreoffice-broken-ugly-fix

i would be glad to understand why the error rise up, i could not uderstand it.

last thing, could you advice me a good internet text about shell scripts and regexp?

Thanks a lot for your work.

Offline

#3 2013-01-09 19:48:32

teaborn
Member
Registered: 2012-05-16
Posts: 3

Re: get-java6-jre fix for changed url and mime type

Maybe you have to install gnu tar

tazpkg get-install tar

Offline

#4 2013-01-09 19:56:19

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: get-java6-jre fix for changed url and mime type

[c]root@slitvaio:/home/fabio# tazpkg get-install tar

Connecting to mirror.slitaz.org (94.23.209.91:80)
tar-1.26.tazpkg      100% |********************************|    98k  0:00:00 ETA

Installation of: tar
================================================================================
Copying tar...                                                       [ Done ]
Extracting tar...                                                    [ Done ]
Extracting the pseudo fs...                                          [ Done ]
Installing tar...                                                    [ Done ]
Removing all tmp files...                                            [ Done ]
================================================================================
tar (1.26) is installed.

root@slitvaio:/home/fabio# tar xvf jre-6u38-linux-i586.bin
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors
root@slitvaio:/home/fabio#[/c]

Offline

#5 2013-01-09 23:11:22

mojo
Administrator
Registered: 2011-03-29
Posts: 2,174

Re: get-java6-jre fix for changed url and mime type

jre.bin is a self-extracting linux binary installer.

[c]/bin/sh jre.bin[/c]

[c]./jre.bin[/c]

[c]sh jre.bin[/c]

Should execute the installer.

Makeself is another linux self-extracting archive which is used for installers: filename.run

http://megastep.org/makeself/

Good bash info:

Basic:  http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html

Advanced: http://tldp.org/LDP/abs/html/

Linux Guides,Howtos,Tutorials:

http://www.tldp.org/guides.html

Offline

#6 2013-01-10 06:46:43

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: get-java6-jre fix for changed url and mime type

thanks mojo

Offline

#7 2013-01-21 14:54:12

tkoun
Member
Registered: 2012-12-04
Posts: 21

Re: get-java6-jre fix for changed url and mime type

I guess that with:

-----------

TARBALL="jre.tar.gz"

....

URL="$(wget -O - ${WEB_SITE}en/download/manual.jsp | \

        sed '/Linux"/!d;s/.*href="\([^"]*\).*/\1/;q')"

....

tar xzvf ${TARBALL}

------------

a get-java7-jre package is readily available.

PS: it is also possible to have the version (v6 or v7) as an input parameter if a generic get-java-jre is required

Offline

#8 2013-01-23 18:44:39

ernia
Member
Registered: 2011-05-20
Posts: 299

Re: get-java6-jre fix for changed url and mime type

hi tkoun, your are right.

i don't know anything about java, i tried to fix get-java6-jre because it was a dependendy of get-libreoffice

maybe to make a generic get-java-jre pointing to the last version would make sense

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.55 MiB (Peak: 1.77 MiB) ]