You are not logged in.
Hi there!
I've been robbed last month. My good old 13-year-old Toshiba is gone... I bought a slightly less old machine, and I'm installing SliTaz back.
I've found some bugs and will propose patches for most. I thought it would be better not to post a separate thread for each bug, but I will not bundle all the patches in one single thread either, for clarity.
In this thread I post patches to some get-* scripts.
First: get-java6-jre. It doesn't work at all because the download link is broken. Moreover Java is now at version 8, and I don't see the point of downloading an old version if you can use a more recent one (but tell me if I'm wrong): this assumes the last Java is compatible with old processors, which I haven't checked.
[c]--- get-java6-jre 2015-03-14 22:42:56.785821472 +0100
+++ get-java-jre 2015-03-19 18:15:09.061933956 +0100
@@ -5,16 +5,17 @@
#
# Author : Eric Joseph-Alexandre <erjo@slitaz.org>
-PACKAGE="java6-jre"
+PACKAGE="java-jre"
WEB_SITE="http://www.java.com/"
SHORT_DESC="SUN Java Runtime."
DEPENDS="xorg-libXtst"
-TARBALL="jre.bin"
-TEMP_DIR="/tmp/$PACKAGE.$$"
+TARBALL="jre.tar.gz"
+# This also creates TEMP_DIR
+TEMP_DIR=$(mktemp -d /tmp/$PACKAGE.XXXXXX)
ROOT="$1"
-URL="$(wget -O - ${WEB_SITE}en/download/manual_v6.jsp | \
- sed '/self-extracting/!d;s/.*href="\([^"]*\).*/\1/;q')"
+URL="$(wget -O - ${WEB_SITE}en/download/linux_manual.jsp?locale=en | \
+ sed '/"Download Java software for Linux"/!d;s/.*href="\([^"]*\).*/\1/;q')"
# Check if we are root starting anything
if test $(id -u) != 0 ; then
@@ -31,13 +32,11 @@
-# Create TEMP_DIR
CUR_DIR=$(pwd)
-test -d $TEMP_DIR || mkdir $TEMP_DIR
cd $TEMP_DIR
# Download the file
-test -f $TARBALL || wget $URL -O $TARBALL
+wget "$URL" -O $TARBALL
if [ ! -f $TARBALL ]; then
cd $CUR_DIR
rm -rf $TEMP_DIR
@@ -45,12 +44,9 @@
exit 1
fi
-# Do not trust 'df' free space
-sed -i 's/exit 3$//' $TARBALL
-
-# Run the install file user may agree to SUN EULA
-chmod +x $TARBALL
-sh ${TARBALL}
+tar -xzf $TARBALL
+## extracted pkg can be removed: Save RAM
+rm -rf $TARBALL
# Make the package
@@ -59,10 +55,7 @@
# use mv instead of 'cp -a' to save RAM
mv jre${VERSION} $PACKAGE-$VERSION/fs/usr/lib/java
-# extracted pkg can be removed: Save RAM
-rm -rf $TARBALL
-
-#delete unecessary files
+#delete unnecessary files
rm -rf $PACKAGE-$VERSION/fs/usr/lib/java/jre${VERSION}/man
# Create receipt
@@ -85,6 +78,7 @@
cd /usr/bin
ln -s /usr/lib/java/jre\$VERSION/bin/java
+ ln -s /usr/lib/java/jre\$VERSION/bin/jcontrol
status
}
@@ -92,6 +86,7 @@
{
rm -f /usr/lib/mozilla/plugins/libnpjp2.so
rm -f /usr/bin/java
+ rm -f /usr/bin/jcontrol
}
EOT[/c]
Note how I changed the name from "java6" to only "java".
I also attach the diff as a file for convenience.
edit: looks like the forum doesn't like my file, I get a "denied mime" box.
Offline
Now for get-LibreOffice. The problem here is that "busybox ls" gives an error and no output if the file you want to list is a broken link!
So I replaced "ls" with "echo". It's not ideal still, because if the pattern doesn't match echo will return it as-is.
[c]--- get-LibreOffice.old 2015-03-19 18:18:13.397362041 +0100
+++ get-LibreOffice.new 2015-03-19 18:20:51.219420413 +0100
@@ -168,7 +168,7 @@
mv usr/bin $PACKAGE-$VERSION/fs/usr
# relocalized libexec directory
-bin=$(ls $PACKAGE-$VERSION/fs/usr/bin/libreoffice???)
+bin=$(echo $PACKAGE-$VERSION/fs/usr/bin/libreoffice???)
if [ -L $bin ]; then
target=$(readlink $bin)
rm -f $bin[/c]
Offline
Last for this thread, get-teamviewer. The problem is a "find" call that finds several results (namely a directory and a file) when we need only one (the file).
[c]--- get-teamviewer.old 2015-03-13 22:27:53.831003143 +0100
+++ get-teamviewer.new 2015-03-13 22:28:50.715232835 +0100
@@ -53,7 +53,8 @@
sed "s|EXEC|/usr/bin/$PACKAGE|g;s!ICON!/$(find opt | grep $PACKAGE.png)!g" \
< $(find opt | grep -E '(desktop.template|\.desktop$)') \
> usr/share/applications/$PACKAGE.desktop
-sed -i 's/readlink -e/readlink $0 || echo /' $(find opt | grep /$PACKAGE$)
+sed -i 's/readlink -e/readlink $0 || echo /' \
+ $(find opt -type f | grep /$PACKAGE$)
cd ../..
cat > $PACKAGE-$VERSION/receipt <<EOT[/c]
Offline
Hi,
I saw in Hg > get-scripts that Pascal added a "javajre", but no get-javajre package appear in the repository. Does it need to be somehow "pushed" into wok?
Offline
@llev:
Short answer : try 'tazpkg get-install javajre'
Long answer:
get-scripts repo will replace get-<name> packages.
You can see them with tazpanel in 'extra' category.
This kind of script rely on unstable websites with changing download links in the time.
get-<name> packages should be updated frequently in every SliTaz version even the locked ones (1.0 - 3.0).
get-scripts are lighter: common parts are in tazpkg.
They are safer: tazpkg automagicaly detects the depends.
Every new SliTaz version will point to http://mirror.slitaz.org/packages/get/
After an update, every (newer) SliTaz version is up to date without tazpkg recharge.
Offline
Get-scripts are pushed to the get repo on mirror which is mirror/slitaz/packages/get folder.
http://download.tuxfamily.org/slitaz/packages/get/
Tazpkg uses download_get_script function to download get-script from packages/get folder on mirror.
http://hg.slitaz.org/tazpkg/rev/67303cb00c9f
The get-scripts are listed for download in tazpanel/packages -> extra categorie
http://hg.slitaz.org/tazpkg/rev/c82b727d2012
tazpkg recharge pulls the extra.list with contents of get repo.
I see no way to list or search the extra list from tazpkg.
It appears the user would have to know the exact name of the script to fetch it unless there is a tazpkg of the exact name.
Thanks Pascal!
tazpkg searchs extra.list
http://hg.slitaz.org/tazpkg/rev/37df6365cf41
Offline
Great!
Another question: is it intentional not to have shortcuts for all tazpkg options? Like search-pkgname (this one I use a lot and needs much typing!).
Offline
Press your up key in Sakura to retrieve your ash history. Less typing that way.
Offline
You mean bash's ^R surely? Using "tazpkg search-pkgname" a lot doesn't mean I use it in sequences, so pressing "up" dozens of times isn't very practical either.
But I'm sure you knew the "much typing" part was a joke, right?
Offline
Add an abbreviation -sp for search-pkgname like -gi for get-install or -cc for clean-cache or -sm setup-mirror
search-pkgname|-sp)
# Search for a package name
if [ -z "$2" ]; then
newline
_ 'Please specify a pattern or file name to search for.'
echo "$(_ 'Example:') 'tazpkg search-pkgname libnss'"
newline
exit 0
fi
title 'Search result for package "%s"' $2
Offline
Thanks mojo. I wondered whether there was an established rationale regarding short options.
Offline
Short answer : try 'tazpkg get-install javajre'
get-scripts are lighter: common parts are in tazpkg.
They are safer: tazpkg automagicaly detects the depends.
root@slitaz:/home/tux# java -version
Error occurred during initialization of VM
java/lang/NoClassDefFoundError: java/lang/Object
root@slitaz:/home/tux# tazpkg info javajre
TazPKG information
==============================================================================
Package : javajre
Version : 1.8.0_40
Category : non-free
Short desc : Java Platform Standard Edition Runtime Environment
Maintainer : nobody@slitaz.org
Depends : zlib xorg-libXxf86vm xorg-libXtst xorg-libXrender xorg-libXrandr xorg-libXinerama xorg-libXi xorg-libXfixes xorg-libXext xorg-libXdmcp xorg-libXdamage xorg-libXcursor xorg-libXcomposite xorg-libXau xorg-libX11 qcad pixman pcre pango nvidia-173xx libxslt libxml2 libxcb libpng libgio libffi harfbuzz gtk+ glib-dev glib gdk-pixbuf fontconfig ffmpeg-compat cairo-gl bzlib atk alsa-lib
Web site : http://java.com/en/download/linux_manual.jsp?locale=en
==============================================================================
root@slitaz:/home/tux# uname -a
Linux slitaz 3.2.53-slitaz #4 SMP Wed Mar 25 11:33:01 CET 2015 i686 GNU/Linux
Offline
I confirm this bug. When I installed it by hand from the Oracle tarball, it worked:
[c]$ java -version
java version "1.8.0_40"
Java(TM) SE Runtime Environment (build 1.8.0_40-b26)
Java HotSpot(TM) Client VM (build 25.40-b25, mixed mode)[/c]
(Installed by the script I posted on top of this thread, stupidly adapted from the old get-java6-jre script.)
Maybe a dev could try and make a new get script for installing Java from the tarball?
Also, the current get script pulls a lot of dependencies: qcad, which itself pulls many libQt*, nvidia-173xx, mesa-wayland (which pulls wayland). Do we really need all this stuff?
Offline
Also, the current get script pulls a lot of dependencies: qcad,
which itself pulls many libQt*, nvidia-173xx, mesa-wayland
(which pulls wayland). Do we really need all this stuff?
tux@slitaz:~$ tazpkg info qcad
TazPKG information
=========================================================
Package : qcad
Version : 3.7.5
Category : network
Short desc : The Open Source CAD System For Everyone.
Maintainer : pankso@slitaz.org
License : GPL3
Depends : libQtWebkit libQtGui libQtDesigner libQtXml libQtDeclarative libQtCore libQtScript libQtNetwork libQtClucene libQtOpenGL libQtDBus libQtScriptTools libQtHelp libQtSvg libQtSql libQtTest libQtMultimedia
Web site : http://www.qcad.org
Size : 23M/134.7M
=========================================================
[attachment=37952,1916]
Offline
alanyih, what do you mean?
Offline
Depends : qcad ??
Please check get-scripts and tazpkg.
1.
# TazPanel Install "FoxitReader"
[..]
TazPkg: Install
Installing: FoxitReader
Tracking dependencies for package "FoxitReader"
Missing package "qcad"
2.
# tazpkg -gi flash-plugin
[..]
Package "flash-plugin-11.2.202.457" compressed successfully.
Size: 4.9M
Tracking dependencies for package "flash-plugin"
==============================================================================
Missing package "seamonkey"
Missing package "qcad"
==============================================================================
2 missing packages to install.
3.
# tazpkg -gi javajre
[..]
Package "javajre-1.8.0_45" compressed successfully.
Size: 32.2M
WARNING! Dependency loop between "javajre" and "qcad".
Tracking dependencies for package "javajre"
======================================================================
Missing package "nvidia-173xx"
Missing package "glib-dev"
Missing package "ffmpeg-compat"
Missing package "cairo-gl"
======================================================================
4 missing packages to install.
4.
tux@slitaz:~$ ldd /usr/bin/FoxitReader | grep libqcad*
tux@slitaz:~$ ldd /usr/bin/FoxitReader
/usr/bin/FoxitReader:
linux-gate.so.1 => (0xffffe000)
libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xf7357000)
libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xf72b8000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0xf7297000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0xf7285000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0xf7266000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0xf725a000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0xf70ed000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0xf6ff0000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0xf6fac000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xf6f33000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xf6f01000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0xf6ebf000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0xf6ebc000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0xf6dc9000)
libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0xf6dc6000)
libcups.so.2 => /usr/lib/libcups.so.2 (0xf6d67000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xf6ca1000)
libm.so.6 => /lib/libm.so.6 (0xf6c74000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0xf6c5c000)
libc.so.6 => /lib/libc.so.6 (0xf6ae6000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0xf6ae0000)
libX11.so.6 => /usr/lib/libX11.so.6 (0xf69c4000)
libpthread.so.0 => /lib/libpthread.so.0 (0xf69a9000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0xf69a6000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0xf699d000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0xf6993000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0xf6990000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0xf698d000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0xf6985000)
libXext.so.6 => /usr/lib/libXext.so.6 (0xf6975000)
libffi.so.6 => /usr/lib/libffi.so.6 (0xf696e000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0xf6934000)
librt.so.1 => /lib/librt.so.1 (0xf692b000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0xf68e6000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0xf68d5000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0xf67b9000)
libdl.so.2 => /lib/libdl.so.2 (0xf67b4000)
libz.so.1 => /usr/lib/libz.so.1 (0xf67a1000)
libresolv.so.2 => /lib/libresolv.so.2 (0xf6788000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0xf6766000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0xf66dd000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0xf66da000)
libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0xf66d8000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0xf66cf000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0xf66af000)
libXau.so.6 => /usr/lib/libXau.so.6 (0xf66ab000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xf66a6000)
libEGL.so.1 => /usr/lib/libEGL.so.1 (0xf6689000)
libGL.so.1 => /usr/lib/libGL.so.1 (0xf6630000)
libcrypt.so.1 => /lib/libcrypt.so.1 (0xf65fd000)
/lib/ld-linux.so.2 => /lib/ld-2.14.1.so (0xf775d000)
libxcb-dri2.so.0 => /usr/lib/libxcb-dri2.so.0 (0xf65f8000)
libxcb-xfixes.so.0 => /usr/lib/libxcb-xfixes.so.0 (0xf65f1000)
libxcb-shape.so.0 => /usr/lib/libxcb-shape.so.0 (0xf65ed000)
libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0xf65e4000)
libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0xf65d7000)
libgbm.so.1 => /usr/lib/libgbm.so.1 (0xf65d2000)
libglapi.so.0 => /usr/lib/libglapi.so.0 (0xf65b4000)
libudev.so.0 => /lib/libudev.so.0 (0xf65a6000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0xf659b000)
libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0xf6584000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0xf657f000)
tux@slitaz:~$
Offline
WARNING! Dependency loop between "javajre" and "qcad".
So maybe there is a packaging mistake: qcad depends on java, foxit, flash, not the other way round?
Offline
root@slitaz:/home/tux# java -version
Error occurred during initialization of VM
jastrongva/lang/NoClassDefFoundError: java/lang/Object
root@slitaz:/home/tux# tazpkg info javajre
TazPKG information
==============================================================================
Package : javajre
Version : 1.8.0_40
Category : non-free
Short desc : Java Platform Standard Edition Runtime Environment
Maintainer : nobody@slitaz.org
Depends : zlib xorg-libXxf86vm xorg-libXtst xorg-libXrender xorg-libXrandr xorg-libXinerama xorg-libXi xorg-libXfixes xorg-libXext xorg-libXdmcp xorg-libXdamage xorg-libXcursor xorg-libXcomposite xorg-libXau xorg-libX11 qcad pixman pcre pango nvidia-173xx libxslt libxml2 libxcb libpng libgio libffi harfbuzz gtk+ glib-dev glib gdk-pixbuf fontconfig ffmpeg-compat cairo-gl bzlib atk alsa-lib
Web site : http://java.com/en/download/linux_manual.jsp?locale=en
http://forum.slitaz.org/topic/patches-to-get-java6-jre-get-libreoffice-get-teamviewer#post-37554
1.
tux@slitaz:~$ java -version
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) Server VM (build 25.45-b02, mixed mode)
2.
tux@slitaz:~$ tazpkg info javajre
TazPKG information
=================================================================
Package : javajre
Version : 1.8.0_45
Category : non-free
Short desc : Java Platform Standard Edition Runtime Environment
Maintainer : nobody@slitaz.org
Depends : bash
Web site : http://java.com/en/download/linux_manual.jsp?locale=en
Size : 44.5M/163.7M
=================================================================
3.
tux@slitaz:~$ ldd /usr/lib/java/jre1.8.0_45/bin/java
/usr/lib/java/jre1.8.0_45/bin/java:
linux-gate.so.1 => (0xffffe000)
libpthread.so.0 => /lib/libpthread.so.0 (0xf778d000)
libjli.so => /usr/lib/java/jre1.8.0_45/bin/../lib/i386/jli/libjli.so (0xf7778000)
libdl.so.2 => /lib/libdl.so.2 (0xf7773000)
libc.so.6 => /lib/libc.so.6 (0xf75fd000)
/lib/ld-linux.so.2 => /lib/ld-2.14.1.so (0xf77aa000)
4.
tux@slitaz:~$ jcontrol &
[attachment=38045,1924]
Offline
Package : javajre
Version : 1.8.0_45
Depends : bash
So, problem solved?
(alanyih, I've got trouble understanding the meaning of your posts, maybe you could add a sentence or two to prevent me from guessing it wrong?)
Offline
Depends : bash
tux@slitaz:~$ head -6 /usr/lib/java/jre1.8.0_45/bin/jcontrol
#!/bin/bash
#
# Copyright (c) 2006, 2011, Oracle and/or its affiliates. All rights reserved.
# ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
#
# Shell Script to run the Java Plug-in control panel.
I confirm this bug. When I installed it by hand from the Oracle tarball, it worked:
http://forum.slitaz.org/topic/patches-to-get-java6-jre-get-libreoffice-get-teamviewer#post-37607
You are right! the Oracle tarball work fine.
[attachment=38095,1926]
Offline
[ Generated in 0.017 seconds, 7 queries executed - Memory usage: 1.59 MiB (Peak: 1.77 MiB) ]