View previous topic :: View next topic |
Author |
Message |
mghumphrey n00b
Joined: 19 Feb 2003 Posts: 20
|
Posted: Sat Feb 22, 2003 9:20 am Post subject: How to create an ebuild for a product that comes as .bin |
|
|
I would like to create an ebuild for the new JRockit JVM that is distributed (for free) by BEA. The install from BEA comes as an executale ".bin" file. When you run the .bin, it extracts itself and asks a bunch of questions.
What is the best way to create an ebuild for this? I've reviewed the ebuild for the sun JDK. It seems to extract the files from the self-extracting bin using this:
Quote: |
tail +436 ${DISTDIR}/${At} > install.sfx
chmod +x install.sfx
./install.sfx || die
|
Can someone point me to some instructions on how to deal with these self-extracting files? What tool creates them? What about the license that the BEA file asks you to approve when you install it? |
|
Back to top |
|
|
sibbe n00b
Joined: 31 Jan 2003 Posts: 35 Location: Helsinki, Finland
|
Posted: Sat Feb 22, 2003 10:57 am Post subject: |
|
|
Code: | find /usr/portage/ -type d -iname "*-bin" |
gives some binary distributed software. check out them.
as far as i know, the linux self extracting files begin with a shell script and the binary (tar.gzipped or similar) is after the actual script in that .bin file.
So maybe putting something like this to ebuild-file should do the trick:
Code: |
src_install() {
${DISTDIR}/installer.bin
}
|
If it gives sandbox failures or such, then it's trying to put stuff in wrong places, and you have to modifiy the script part of the .bin
Note that the unpacking is done in src_install(), not in src_unpack() function. Well, i can't test that stuff right now because i don't want to register at bea.com (enough spam already).
Oh, you may want to do , it makes an educated guess of the filetype. Also throws out the first lines of it, but might give some garbage also.
Just my two cents.
edit: okay downloaded jrockit-8.0-j2se1.4.1-linux32.bin and it seems to be a "real" program instead of a shell script kludge. so you have to pipe correct input to the program somehow
edit #2: well i'll be damned, "unzip jrockit-8.0-j2se1.4.1-linux32.bin" extracted the files from it :) so maybe the ebuild should be based on that "feature"
edit #3: and even more, unzip linux32_jrockit80_141_jdk.zip and linux32_jrockit80_141_jrockit.zip after the first unzip operation to ${D}/opt/jrockit-jdk-1.4.1 or similar. It might be reasonable to display "License Agreement.txt" or at least output some information about it ("read and accept or uninstall") _________________ jyrki muukkonen |
|
Back to top |
|
|
mghumphrey n00b
Joined: 19 Feb 2003 Posts: 20
|
Posted: Sat Feb 22, 2003 7:47 pm Post subject: It's using some proprietary mechanism |
|
|
I did some more research on the BEA installer. It does not appear to be a shell script combined with a gzip file. Instead, it appears to be some native (compiled) code (the file has the word "ELF" near the top). After the initial decompression, it runs a Java-based application that does the actual installation of the product. Interestingly, this means the file has TWO JVMs included in it (no wonder it's a 48 meg download).
It appears that there is a "silent" mode of installation, where you tell the installer about an XML file with parameters for the install. I'm figuring I could set this up in the ebuild, install it to a temporary directory and then use the normal ebuild mechanisms to move the files to their actual locations.
Does this seem like a sound approach? What about the license agreement? |
|
Back to top |
|
|
sibbe n00b
Joined: 31 Jan 2003 Posts: 35 Location: Helsinki, Finland
|
Posted: Sat Feb 22, 2003 8:07 pm Post subject: |
|
|
check out my comments at the end of the posting. it is possible to unzip the native binary. then you get bunch of files, including two zip-files. those are the ones containing the final distribution (unpacked by the installer).
and what comes to the license, i've seen ebuilds which just tells that the user should read the license. _________________ jyrki muukkonen |
|
Back to top |
|
|
mghumphrey n00b
Joined: 19 Feb 2003 Posts: 20
|
Posted: Sat Feb 22, 2003 8:35 pm Post subject: You are the man ! |
|
|
I wouldn't have thought to just try unzip in a million years. Thanks! |
|
Back to top |
|
|
|