TurnKey Linux Virtual Appliance Library

Licensing and Sun Java 6

Stephen Weber's picture

I'm working on an Openfire appliance and a Wave Federation Server appliance, and trying out the new TKLPatch tool (so far so good, btw). A problem I've run into that poses a question:

The Openfire server requires Sun Java 6 JRE to run. The Wave Federation Server requires Sun Java 6 SDK. Turnkey Core does not have these installed. Both of these packages involve agreeing to Sun's licenses to install them. In terms of developing a patch, I've run into a roadblock because I haven't found (and doubt dpkg supports) a way to auto-agree to the license to apply the patch.

So if anyone knows how to get Java 6 shoehorned into patch form, or if there's a more appropriate base appliance than Core for this, I'm all ears. Thanks!

Alon Swartz's picture

Preseeding debconf

Looking forward to your openfire and wave appliances! Great to hear you are using TKLPatch, let us know if you need any help or have any feedback.

With regards to your question, Debian packages can be preseeded, so it's possible to accept the license prior to installation:

debconf-set-selections << END
sun-java6-jdk shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-jre shared/accepted-sun-dlj-v1-1 boolean true
sun-java6-bin shared/accepted-sun-dlj-v1-1 boolean true
END

Question about debconf

I'm interested in knowing if there is another way of accepting the liscense agreement prior to an install besides debconf.  Is the package looking for a file somewhere that I can simply touch or must I use debconf.  Just currious.

Thanks

-Eric

Stephen Weber's picture

TKLPatch so far

Thanks for the preseeding information, that's exactly what I need to get past this part.

I've had a lot of trouble getting up to speed with TKLPatch, but every time I've solved a particular roadblock, I've realized the information is indeed in the supplied documentation or in the documentation of the tool I'm using (i.e. sed).

An example was when I was trying to apply both "install Java 6 from the conf file" and "install Openfire from deb package", it installed in the wrong order (Openfire before its prerequesite). Right there in the documentation, it shows the order in which TKLPatch executes: install packages, then do conf file.

The only other thing was when the patch fails, I'm left with chroot's to umount and folders to delete. I finally got around to creating a (really really poor quality) shell script to do cleanup for each iteration I attempt.

It seems very solid, and once I wrap my head around the start-to-finish process, I'm really going to enjoy it. Well done!

Alon Swartz's picture

Thanks for the feedback + tips

With regard to package installation, the original design of TKLPatch included tklpatch-apply-plan, which would install a list of packages before anything else via apt-get, but decided to remove it as it can cause issues and confusion (e.g. installing a package will fail due to the assumption that it is being installed into a running system (e.g., assuming mysql daemon is running)).

Maybe it would be worth looking into again, if the need arises. Another option might be to run apt-get --fix-broken install after installing debs/, which would install any missing dependencies... Needs more thought.

Another option would be to include the openfire deb in the overlay, and install it during conf, that way you have complete control.

With regards to cleanup, you make a good point. I'm open to ideas.

None-the-less, I recommend you shorten the development cycle and try do as much as you can manually using tklpatch-chroot, and update conf as you go. Then, do a cleanup and test the patch, rinse, repeat.

I can't wait to see what you come up with.

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)