Openfire 3.10.0 dependency issue on Debian

Hello,

Openfire 3.9.3 pre-depends on:

sun-java6-jre | default-jre-headless | openjdk-6-jre | openjdk-7-jre | oracle-java7-jre

default-jre-headless depends on** openjdk-7-jre-headless**, which provides “enough” jre for a headless server.

Openfire 3.10.0 pre-depends on:

openjdk-7-jre | oracle-java7-jre

openjdk-7-jre depends on openjdk-7-jre-headless PLUS a cascade of dependencies useless on a headless server.

Was default-jre-headless left out for a reason, or was it forgotten?

Thanks,

Joao S Veiga

I’ve used win5it’s procedure (Re: 3.10 rc on ubuntu with java-common) to add openjdk-7-jre-headless to the Pre-Depends list, generated the .deb and installed (upgraded) over 3.9.3 on a test server (Debian 8 Jessie).

Seems to be working.

If there was no real reason to remove the headless dependency, could someone please put it back?

Thanks,

Joao S Veiga

The change was made here:

https://github.com/igniterealtime/Openfire/commit/9e3ac0d16f7869aeb00e06c12865c8 dc7d1b2d11

Thanks,

It looks like default-jre-headless was removed not to risk that in some systems that depended on openjdk-6-jre-headless, as Openfire 3.10.0 wants java 7.

They should have added openjdk-7-jre-headless though.

Any chance a developer/packager fixes that?

Hey,

sorry, this was my fault and I struggled with that issue by myself. Due this I’ve created a PR to fix this issue.

( Add openjdk headless dependency to avoid installing X libraries by SvenBunge · Pull Request #206 · igniterealtime/Openfi… )

Quickfix: Install Openfire with:

apt-get install openjdk-7-jre-headless

dpkg -i --ignore-depends=openjdk-7-jre openfire_3.10.0_all.deb

To avoid problems upon apt-get upgrade command you should edit the file /var/lib/dpkg/status: Search for Openfire and edit the Pre-Depends section. Replace both entries with openjdk-7-jre-headless.

You asked for the reason:

Openfire requires Java7 and this is good. For example Java 7 offers quite better encryption protocols for the connections.

The default-jre-headless contains only openjre6 and doesn’t work with Openfire 3.10

Thanks!!

Best regards,

Joao S Veiga

After doing this, any time I try to use apt-get install the following message is shown:

apt-get install -m ifmetric

Reading package lists… Done

Building dependency tree

Reading state information… Done

You might want to run ‘apt-get -f install’ to correct these:

The following packages have unmet dependencies:

openfire : PreDepends: openjdk-7-jre but it is not going to be installed or

oracle-java7-jre but it is not installable

E: Unmet dependencies. Try ‘apt-get -f install’ with no packages (or specify a solution).

Hmm please edit the file /var/lib/dpkg/status. Search for Openfire and edit the Pre-Depends section. Replace both entries with openjdk-7-jre-headless. After another invoke of apt-get update it should be fixed.

I’ve provided a better workaround, that actually fixes the .deb. The workarounds above do work, but they make system maintenance a hassle. The following will not make system maintenance a hassle. It should work well, until there’s a newly packaged version. Here’s my suggestion:

# download openfire_3.10.0_all.deb, ie
# wget --content-disposition http://www.igniterealtime.org/downloadServlet?filename=openfire/openfire_3.10.0_all.deb

mkdir tmp
dpkg-deb -R openfire_3.10.0_all.deb tmp
sed -i "s/openjdk-7-jre/openjdk-7-jre-headless/" tmp/DEBIAN/control
dpkg-deb -b tmp openfire_3.10.0_all-fixed.deb
sudo dpkg -i openfire_3.10.0_all-fixed.deb

You’ll also of course need to have the appropriate JRE installed and selected. In my case, the following worked:

sudo apt-get install openjdk-7-jre-headless
sudo apt-get remove openjdk-6-jre-headless #if relevant
sudo update-alternatives --config java

The above was tested successfully on Ubuntu 12.04; I’m sure it works on 14.04 as well. (To be clear, the above was tested on the java/etc end; I’ve had some issues since but I believe they’er just normal upgrade-related issues; the above shouldn’t do anything differently from the other people’s suggestions).

As I noted in my reply, telling dpkg to ignore a dependency is going to create a long-lasting headache for the sysadmin; the linked item will allow the user to reconfigure the .deb file with the correct dependency. Thus it’s a one-time fix, rather than a thing they have to deal with every time they install software, run updates, etc.

–Edit-- it looks like I don’t understand how threading on this forum works; sorry for the seeming double-post.