Update openfire using deb method

Hi there!

I’m not sure if i did the update “correct”. Maybe someone could clarify.

I’ve made a backup of the openfire directory, I’ve made a backup of the /etc/openfire directory and I’ve made a backup of my mysqld prior doing anything.

After Backups were taken i did the following.

  1. Download http://www.igniterealtime.org/downloads/download-landing.jsp?file=openfire/openf ire_3.9.1_all.deb

  2. ‘sudo dpkg -i openfire_3.9.1_all.deb’

I got asked what I’d like to to with the config file residing in /etc/openfire, I chose to overwrite with new one.

The next message I got was:

New Version of the configuration file /etc/init.d/openfire gets installed … (freely translated)

invoke-rc.d: initscript openfire, action “start” failed.

dpkg: error proceeding openfire (–install): (freely translated)

childproccess: installed post-installation-Skript returned error1

Trigger for ureadahead are going to be prepared … (freely translated)

ureadahead will be reprofiled on next reboot

Can someone clarify what I missed or did wrong?

Kind regards!

Found the cause for the problem.

The initscript for openfire was looking at the wrong location for my java install. I’ve updated the initscript and now openfire 3.9.1 starts up as expected.

BUT the package manager still thought that the installation was corrupt. So I’ve modified the deb package to reflect the changes I’ve done to /etc/init.d/openfire. (added “/usr/lib/jvm/java-6-oracle”)

rebuild the deb and now installation worked great and packetmanager is happy too

Are you still using Java 6? Newest Openfire/Spark packages drop the Java 6 support from now on and will require Java 7 or higher.

Thanks for pointing this out.

I thought it’s still recommended to use old java version.

I think i was wrong about Java 7 only. It looks like Openfire still works with Java 6 (at least on my test windows box). So only Spark packages are now requiring Java 7.

I’ve added this path into the init script for the next release.

it would be grate to correct etc/init.d/openfire in the package

just as patch - change /etc/init.d/openfire part JAVA_HOMES=

according https://wiki.debian.org/JavaPackage

to $(update-java-alternatives -l)

or

$(LC_ALL=C update-alternatives --display java | grep best | grep -oe /usr.*.java)

LC_ALL=C - for English parsing “best”

package decompiling/correction/assembling - http://blog.frosty-geek.net/2009/12/disassemble-reassembling-binary-deb.html

script etc/init.d/openfire

Would you kindly provide a patch for this? I’d be happy to commit it.

is it possible to attach file here?

I’ve only changed this piece:

Attempt to locate JAVA_HOME

if [ -z $JAVA_HOME ]; then

JAVA_HOMES=

"/usr/lib/jvm/default-java \

/usr/lib/jvm/java-7-sun \

/usr/lib/jvm/java-6-sun \

/usr/lib/jvm/java-1.5.0-sun \

/usr/lib/jvm/java-7-openjdk-amd64 \

/usr/lib/jvm/java-7-openjdk-i386 \

/usr/lib/jvm/java-7-openjdk \

/usr/lib/jvm/java-6-openjdk-amd64 \

/usr/lib/jvm/java-6-openjdk-i386 \

/usr/lib/jvm/java-6-openjdk"

for t in $JAVA_HOMES ; do

if [ -d $t ] ; then

JAVA_HOME=$t

break;

fi

done

JAVA_HOME=$(LC_ALL=C update-alternatives --display java \

| grep best \

| grep -oe /.*/bin/java \

| sed ‘s//jre/.*//g’)

echo "best java alternative in: "$JAVA_HOME

fi

sorry - I’ve attached file

Thanks, that is sufficient. I removed your attached .deb file as its large, I just needed the patch, which is the output from ‘svn diff’ or ‘diff -u’

OF-746

small changes in regexp (red color in my prev post)

OK, sent that in.