LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-06-2016, 08:03 AM   #1
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 14.2 + Multilib
Posts: 1,483

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Multilib convertpkg-compat32 and java doinst.sh


I was looking at running convertpkg-compat32 on a 32-bit package generated by the standard slackware java.SlackBuild.

Before installing the resulting package, I looked at install/doinst.sh to make sure it was 'safe' to run.

It is not safe to run because it's missing a closing `fi` which will cause the converted doinst.sh to fail.

I didn't install it and looked around for similar reports on LQ.

Here's one from 2012 ...

http://www.linuxquestions.org/questi...urrent-946939/

As Eric said, fixing that particular issue would require a sophisticated parser in convertpkg-compat32 ...

However, if Pat's team were to modify the 'fi' statement ( by adding a comment after the fi ), convertpkg-compat32 would generate a working doinst.sh script.

Here's a patch:

# diff -Naur java.SlackBuild.orig java.SlackBuild
Code:
--- java.SlackBuild.orig        2012-08-02 10:50:43.000000000 -0500
+++ java.SlackBuild     2016-06-06 07:45:09.696483819 -0500
@@ -124,7 +124,7 @@
 cat << EOF >> $PKG/install/doinst.sh
   mkdir -p usr/lib${LIBDIRSUFFIX}/java/bin
   mkdir -p usr/lib${LIBDIRSUFFIX}/mozilla/plugins
-fi
+fi  # [ -L usr/lib${LIBDIRSUFFIX}/java ] # added for convertpkg-compat32
 if [ -L ControlPanel ]; then
   rm -f ControlPanel
 fi
What you end up with is this doinst.sh script ( note the comment after the first `fi`:

# cat /tmp/package-java/install/doinst.sh

Code:
# Clean up a potential upgrade mess caused by changing the
# installation directory to /usr/lib/java/:
if [ -L usr/lib/java ]; then
  rm -rf usr/lib/java
  mkdir -p usr/lib/java/man
  mkdir -p usr/lib/java/lib/i386/server
  mkdir -p usr/lib/java/lib/i386/client
  mkdir -p usr/lib/java/javaws
  mkdir -p usr/lib/java/bin
  mkdir -p usr/lib/mozilla/plugins
fi  # [ -L usr/lib/java ] # added for convertpkg-compat32
if [ -L ControlPanel ]; then
  rm -f ControlPanel
fi
if [ -L ja ]; then
  rm -f ja
fi
if [ -L javaws ]; then
  rm -f javaws
fi
if [ -L libjsig.so ]; then
  rm -f libjsig.so
fi
# End cleanup.

( cd usr/lib ; rm -rf libjvm.so )
( cd usr/lib ; ln -sf ./java/lib/i386/server/libjvm.so libjvm.so )
( cd usr/lib/mozilla/plugins ; rm -rf libnpjp2.so )
( cd usr/lib/mozilla/plugins ; ln -sf /usr/lib/java/lib/i386/libnpjp2.so libnpjp2.so )
( cd usr/lib/java/bin ; rm -rf ControlPanel )
( cd usr/lib/java/bin ; ln -sf jcontrol ControlPanel )
( cd usr/lib/java/man ; rm -rf ja )
( cd usr/lib/java/man ; ln -sf ja_JP.UTF-8 ja )
( cd usr/lib/java/lib/i386/server ; rm -rf libjsig.so )
( cd usr/lib/java/lib/i386/server ; ln -sf ../libjsig.so libjsig.so )
( cd usr/lib/java/lib/i386/client ; rm -rf libjsig.so )
( cd usr/lib/java/lib/i386/client ; ln -sf ../libjsig.so libjsig.so )
( cd usr/lib ; rm -rf jre1.8.0_92 )
( cd usr/lib ; ln -sf java jre1.8.0_92 )
After running the resulting package thru convertpkg-compat32 you get this install/doinst.sh which runs fine in jre-compat32-${VERSION}-x86_64-1compat32.txz:

Code:
# cat install/doinst.sh
# installation directory to /usr/lib/java/:
if [ -L usr/lib/java ]; then
  rm -rf usr/lib/java
  mkdir -p usr/lib/java/man
  mkdir -p usr/lib/java/lib/i386/server
  mkdir -p usr/lib/java/lib/i386/client
  mkdir -p usr/lib/java/javaws
  mkdir -p usr/lib/java/bin
  mkdir -p usr/lib/mozilla/plugins
fi  # [ -L usr/lib/java ] # added for convertpkg-compat32
( cd usr/lib ; rm -rf libjvm.so )
( cd usr/lib ; ln -sf ./java/lib/i386/server/libjvm.so libjvm.so )
( cd usr/lib/mozilla/plugins ; rm -rf libnpjp2.so )
( cd usr/lib/mozilla/plugins ; ln -sf /usr/lib/java/lib/i386/libnpjp2.so libnpjp2.so )
( cd usr/lib/java/bin ; rm -rf ControlPanel )
( cd usr/lib/java/bin ; ln -sf jcontrol ControlPanel )
( cd usr/lib/java/man ; rm -rf ja )
( cd usr/lib/java/man ; ln -sf ja_JP.UTF-8 ja )
( cd usr/lib/java/lib/i386/server ; rm -rf libjsig.so )
( cd usr/lib/java/lib/i386/server ; ln -sf ../libjsig.so libjsig.so )
( cd usr/lib/java/lib/i386/client ; rm -rf libjsig.so )
( cd usr/lib/java/lib/i386/client ; ln -sf ../libjsig.so libjsig.so )
( cd usr/lib ; rm -rf jre1.8.0_92 )
( cd usr/lib ; ln -sf java jre1.8.0_92 )
Anyhow ... a q&d fix to work around the grep command in convertpkg-compat32

-- kjh

Last edited by kjhambrick; 06-06-2016 at 08:05 AM. Reason: typo
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackware 14 multilib - what *compat32 packages should I install m1m Slackware 8 02-06-2013 10:59 AM
[SOLVED] bug in convertpkg-compat32? BroX Slackware 2 07-17-2012 06:13 AM
[SOLVED] MULTILIB - convertpkg-compat32 edit of jdk doinst.sh causes error (Slack 64 current) TracyTiger Slackware 5 05-26-2012 09:30 AM
[SOLVED] compat32-packages for Slackware64 13.1 multilib integrale16 Slackware 4 10-03-2010 01:32 PM
[SOLVED] Slackpkg, running current and multilib, do the compat32 files need to be blacklisted? damgar Slackware 2 04-27-2010 07:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 11:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration