Slackware This Forum is for the discussion of Slackware Linux.
|
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
10-01-2009, 06:17 PM
|
#1
|
|
Senior Member
Registered: May 2008
Posts: 2,841
|
Opera10 64bit Java fix for SBO slackbuild.
I was just trying out the slackbuilds.org build for Opera10 and found that it wouldn't run any java on my Slack64 13.0 box.
I used this page to test it. (Sun's example 'Clock' applet)
Anyway, I tracked the issue down and came up with a patch which I'll throw up here in case anyone else is interested.
Code:
# diff -u opera.SlackBuild.orig opera.SlackBuild
--- opera.SlackBuild.orig 2009-10-01 20:10:38.901539774 +0100
+++ opera.SlackBuild 2009-10-01 23:46:03.836031043 +0100
@@ -27,7 +27,7 @@
VERSION=10.00
ARCH=${ARCH:-x86_64}
-BUILD=${BUILD:-2}
+BUILD=${BUILD:-3}
TAG=${TAG:-_SBo}
CWD=$(pwd)
@@ -76,7 +76,13 @@
# recreates the directory and does some unknown havoc. It may very well be
# completely safe and unexploitable and I'm just being Chicken Little here,
# but it's easy enough to fix and I'd rather be safe than sorry. --rworkman
-sed -i "s%$TMP/$TOPDIR%/usr/bin/%g" $PKG/usr/bin/opera
+sed -i "s%$TMP/$TOPDIR\$0%\$PWD/\${0#./}%g" $PKG/usr/bin/opera
+
+# /usr/bin/opera doesn't look in the right places for 64bit java. Fix it.
+if [ "$ARCH" = "x86_64" ]; then
+sed -i -e "/PREFIXES=\"/,/\/opt\"/ s:/usr/lib:/usr/lib64:" \
+ -e "s:i386:amd64:" $PKG/usr/bin/opera
+fi
# Include config files
mv etc $PKG
It also fixes a potential problem with the OPERA_SCRIPT_PATH, that no one was really likely to trigger anyway, but it sort of caught my interest so I fixed that too.
If you don't want to rebuild, then adding
export OPERA_JAVA_DIR="/usr/lib64/java/lib/amd64" to your bash profile will also resolve the issue.
Hope someone finds this useful.
G.
|
|
|
|
10-01-2009, 08:23 PM
|
#2
|
|
Samhain Slackbuild Maintainer
Registered: Sep 2004
Location: Scottsdale, AZ, USA
Distribution: Slackware
Posts: 377
Rep:
|
Let the maintainer know!
You ought to email Robby Workman, as he is the maintainer of this build. I noticed the same thing yesterday and I've been using this Slackbuild since it was submitted, before it was generally available.
When I updated the script, for Opera 10 on Slackware 12.2, I let him know. They normally do not maintain the older versions, only current versions because of their work load. However, I posted the script on the mailing list and on my web site:
http://raescott.net
My point being... I found Robby to be very friendly and open about the whole thing and I'm sure he'd be more than happy to include your fix for this. He had told me that Opera was not his primary browser so I'm sure he was not aware of the problem. Opera *is* my primary browser and I only discovered this yesterday! Applets aren't on very many sites anymore.
My discovery was when I visited http://time.gov
|
|
|
|
10-02-2009, 05:15 AM
|
#3
|
|
Senior Member
Registered: May 2008
Posts: 2,841
Original Poster
|
Yep, I'll drop him a note when I'm happy with it. I still need to check a few other things, like the spellchecking which doesn't seem to be working, so there may be further changes.
|
|
|
|
10-02-2009, 06:38 AM
|
#4
|
|
Senior Member
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,121
|
As luck would have it, I just compiled opera 10 from slackbuilds.org about an hour before I saw this thread. So I added:
export OPERA_JAVA_DIR="/usr/lib64/java/lib/AMD64" to my .bash_profile and it worked like a charm.
Now time.gov works again, thanks.
Hopefully Rob W will add this patch to his slackbuild.
Last edited by tommcd; 10-02-2009 at 07:23 AM.
|
|
|
|
10-10-2009, 07:57 PM
|
#5
|
|
Slackware Contributor
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,894
Rep: 
|
Quote:
Originally Posted by GazL
Code:
@@ -76,7 +76,13 @@
# recreates the directory and does some unknown havoc. It may very well be
# completely safe and unexploitable and I'm just being Chicken Little here,
# but it's easy enough to fix and I'd rather be safe than sorry. --rworkman
-sed -i "s%$TMP/$TOPDIR%/usr/bin/%g" $PKG/usr/bin/opera
+sed -i "s%$TMP/$TOPDIR\$0%\$PWD/\${0#./}%g" $PKG/usr/bin/opera
|
Is this the intended output?
-case $0 in /*) OPERA_SCRIPT_PATH=$0;; *) OPERA_SCRIPT_PATH=/tmp/SBo/opera-10.00-4585.gcc4-qt4.x86_64/$0;; esac
+case $0 in /*) OPERA_SCRIPT_PATH=$0;; *) OPERA_SCRIPT_PATH=$PWD/${0#./};; esac
Last edited by rworkman; 10-10-2009 at 08:00 PM.
|
|
|
|
10-11-2009, 12:07 AM
|
#6
|
|
Member
Registered: Apr 2008
Location: China, Beijing
Distribution: Slackware
Posts: 409
Rep:
|
Doing sed -i -e "s:i386:amd64:" $PKG/usr/bin/opera is enough for opera running java on my box.
Last edited by grissiom; 10-11-2009 at 12:14 AM.
|
|
|
|
10-11-2009, 06:04 AM
|
#7
|
|
Senior Member
Registered: May 2008
Posts: 2,841
Original Poster
|
Quote:
Originally Posted by rworkman
Is this the intended output?
-case $0 in /*) OPERA_SCRIPT_PATH=$0;; *) OPERA_SCRIPT_PATH=/tmp/SBo/opera-10.00-4585.gcc4-qt4.x86_64/$0;; esac
+case $0 in /*) OPERA_SCRIPT_PATH=$0;; *) OPERA_SCRIPT_PATH=$PWD/${0#./};; esac
|
Yep, that's as intended Robby.
Since then I've tracked the original problem back to what Opera actually did wrong. They forgot to escape some backquotes in the part of install.sh that generates the /usr/bin/opera wrapper file. They meant to insert a literal `/bin/pwd` but instead insert the pwd of the build directory.
To follow their intentions, the correct fix to include in the slackbuild should probably be...
Code:
# Fix a bug in install.sh that resulted in the build directory being included in /usr/bin/opera
# (they forgot to escape some back-quotes).
sed -i -e "/OPERA_SCRIPT_PATH=/ s:\`/bin/pwd\`:\\\\\`/bin/pwd\\\\\`:" install.sh
... prior to calling the install.sh from the slackbuild, rather than fixing it after the fact in /usr/bin/opera.
( P.S. figuring out all those escapes was a right pain.  )
I think my first solution is actually cleaner than theirs as theirs results in OPERA_SCRIPT_PATH=/usr/bin/./opera when the wrapper is run with ./opera where as mine strips the ./ off and avoids an unnecessary external call to /bin/pwd. However, for the purpose of the slackbuild, it's probably better to stick as closely to their intentions as possible, so you might prefer to use this second approach.
I still haven't gotten to the bottom of the opera spell checker not working on my system. 
|
|
|
|
10-11-2009, 01:27 PM
|
#8
|
|
Slackware Contributor
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,894
Rep: 
|
Quote:
Originally Posted by GazL
Yep, that's as intended Robby.
Since then I've tracked the original problem back to what Opera actually did wrong. They forgot to escape some backquotes in the part of install.sh that generates the /usr/bin/opera wrapper file. They meant to insert a literal `/bin/pwd` but instead insert the pwd of the build directory.
To follow their intentions, the correct fix to include in the slackbuild should probably be...
Code:
# Fix a bug in install.sh that resulted in the build directory being included in /usr/bin/opera
# (they forgot to escape some back-quotes).
sed -i -e "/OPERA_SCRIPT_PATH=/ s:\`/bin/pwd\`:\\\\\`/bin/pwd\\\\\`:" install.sh
... prior to calling the install.sh from the slackbuild, rather than fixing it after the fact in /usr/bin/opera.
( P.S. figuring out all those escapes was a right pain.  )
I think my first solution is actually cleaner than theirs as theirs results in OPERA_SCRIPT_PATH=/usr/bin/./opera when the wrapper is run with ./opera where as mine strips the ./ off and avoids an unnecessary external call to /bin/pwd. However, for the purpose of the slackbuild, it's probably better to stick as closely to their intentions as possible, so you might prefer to use this second approach.
|
Nope, I like yours better. :-)
Just for the sake of completeness, have you reported this to the opera folks? I'd like to see both of these issues fixed in their next release...
Quote:
I still haven't gotten to the bottom of the opera spell checker not working on my system.
|
No idea on that :/
|
|
|
|
10-11-2009, 06:32 PM
|
#9
|
|
Senior Member
Registered: May 2008
Posts: 2,841
Original Poster
|
I've reported the extract/build-directory getting hard coded bug to Opera via their bug report wizard thingy.
I've not reported the Java path, as to be honest, I didn't feel qualified enough to say whether it's an opera bug or just a side effect of where Slackware installs the JRE.
|
|
|
|
10-13-2009, 08:38 AM
|
#10
|
|
Slackware Contributor
Registered: Oct 2004
Location: Tuscaloosa, Alabama (USA)
Distribution: Slackware
Posts: 1,894
Rep: 
|
Okay, I just pushed this changeset out to our repo.
I suspect that our java installation is correct and thus the Java PATH issue is an upstream problem too, especially since "i386" is hardcoded in the 64bit builds - IOW, that's probably worth at least mentioning to them.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:04 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|