Replacement of the Apt Snapshot Repository

This thread is since outdated. The openHAB snapshots/unstable builds have once again moved to a less restricted repository. The announcement below is superseded.

To always find the latest installation instructions, please consult the official documentation. The following article will always be up to date:

http://docs.openhab.org/installation/linux.html#package-repository-installation


All,

good news but also a breaking change for the “snapshot apt repository” users:

From now on the openHAB 2 snapshots are available as “unstable” distribution from the official openHAB 2 apt repository at Bintray.

The setup is very similar to the beta release setup, which is described in the official docs: http://docs.openhab.org/installation/linux.html#package-repository-installation.
You just have to use “unstable” instead of “testing” for the distribution name:

  • Add the openHAB 2 repository to your systems apt sources list choosing the unstable distribution (will overwrite your existing openhab2.list)

    echo 'deb http://dl.bintray.com/openhab/apt-repo2 unstable main' | sudo tee /etc/apt/sources.list.d/openhab2.list
    
  • Additionally, you need to add the openHAB 2 Bintray repository key to your package manager (if not yet done)

    wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -
    

We are really happy about this change because we thus can provide “unstable”, “testing” and “stable” (not yet, but soon) releases with one repository.

Now the breaking change: The snapshot apt repository at cloudbees will be shutdown in the next days. As soon as is PR is merged: https://github.com/openhab/openhab-distro/pull/369.
Hence snapshot users should quickly make the transition to the new repository.

The good news: Users of the beta release don’t have to change anything!

Thanks for your patience.
We appreciate your feedback.

Regards,
Theo

PS: Me and @Benjy developed the new debian packaging and moved it to it’s own project https://github.com/openhab/openhab-linuxpkg. Please open issues regarding the debian packages or the apt repository at this projects issue tracker.

4 Likes

Thanks @theo and @Benjy for working on this!
I would like to add another good news about it, that you have missed to mention: Bintray is much faster than Cloudbees regarding the download speed, so the installation should be swifter now. Also, it is much more reliable, since it is really meant to be an apt repository, while the “old” one was merely a public folder of a workspace on Jenkins…

Hmmm - this seems to have broken something. openHAB now won’t start, giving me an error in the logs:

2017-01-07 09:37:15.171 [WARN ] [raf.features.internal.osgi.Activator] - Error starting activator

Dan

Don’t forget to install openHAB from unstable:

sudo apt-get install -t unstable openhab-online

@Udo_Hartmann only if you’ve added both testing (beta) and unstable (snapshot) to your sources list,

@dan12345, which Linux distribution are you using? Is there any other error in /var/log/daemon.log or /var/log/openhab2/openhab.log

ah, I didn’t do that. I decided to move to the beta repository. That works fine, and probably makes more sense for me

I want to make sure I’m doing this switch over right. My initial install of OpenHAB was by apt-get using the snapshot Online version(Bindings are not stored on my computer). So I should issue the following commands to change over to the new repository and update openhab:

echo 'deb http://dl.bintray.com/openhab/apt-repo2 unstable main' | sudo tee /etc/apt/sources.list.d/openhab2.list
wget -qO - 'https://bintray.com/user/downloadSubjectPublicKey?username=openhab' | sudo apt-key add -

Now once I do that do I have to use this command:

sudo apt-get install -t unstable openhab-online

or the normal commands I use to update:

sudo apt-get update
sudo apt-get upgrade

HI @MikeH,
Once you have executed this:

this will suffice

2 Likes

just to be sure. I’m using openHAB2 with openHABian. It should also work this way, I think?

  1. replacing the sources with the “unstable repo2” and signing them
  2. apt-get update && upgrade works now with the new server

right?

I’m on #677 right now, and want to stay on the unstable-branch until official releases.

Yup that should work for you too.
Here a little more info to the syntax that @Udo_Hartmann used: https://wiki.debian.org/AptPreferences
just in case you were wondering…Udo’s solution addressed a more specific use case (those that are on stable or beta releases and want to install the unstable branch anyway).

1 Like

Sounds about right. For everyone else on openHABian: I’ll add the needed changes this evening.

Just for reference: If you see the following error, it’s about time to follow the instructions posted above.

Err https://openhab.ci.cloudbees.com  Packages
  HttpError404
Get:53 https://openhab.ci.cloudbees.com  Packages [369 B]
Err https://openhab.ci.cloudbees.com  Packages
  HttpError404
Fetched 9,105 kB in 21s (429 kB/s)
W: Failed to fetch https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-offline/target/apt-repo/Packages  HttpError404

W: Failed to fetch https://openhab.ci.cloudbees.com/job/openHAB-Distribution/ws/distributions/openhab-online/target/apt-repo/Packages  HttpError404

E: Some index files failed to download. They have been ignored, or old ones used instead.
1 Like

Hi, I always just downloaded and extracted the latest offline snapshot artifact from cloudbees. Where are the artifacts built now? I can only see the betas on Bintray…

Christian

The snapshot artifacts can be found in the same place in cloudbees but openhab-offline is missing as openHAB process of making one single package.

This means that openhab2-online and openhab2-offline will become simply openhab2. For those looking for the offline installation, an additional addons pack can be used. This is still being tested but you can be sure that there will be more details in an announcement soon.

Ah, ok! Thanks for the info!

FTR, I will do another announcement on this later tonight that explains those changes.

2 Likes

Hi,

just performed the following steps and everything works fine with the “new” repos.
Great job, guys!

sudo service openhab2 stop
sudo tar cvfz OH2_config_save_11_01_2017.tgz /etc/openhab2/ /var/lib/openhab2/ /usr/share/openhab2/addons/
sudo apt-get --force-yes remove openhab2-offline
sudo apt-get install openhab2
cd / && tar xvfz OH2_config_save_11_01_2017.tgz

Edited again /usr/share/openhab2/runtime/bin/setenv to add
-Dgnu.io.rxtx.SerialPorts=/dev/ttyAMA0

and then came the moment:
sudo service openhab2 start

awaiting another night of having to correct or restore configurations or returning to a saved image of the SD-card.

BUT: everything works perfect, all devices (things) and rules are up and running, the Android Pad in the corridor shows up the latest HabPanel modifications…

I love this progress!

Best regards,
Jens

2 Likes

Just out of curiosity: Is it anywhere documented to do it that way?
I ask, because this file should not been touched by users - instead the environment variable ${JAVA_OPTS} should be set.

1 Like

In fact it is documented but in a different way
http://docs.openhab.org/installation/linux.html#package-repository-installation

the following setting has to be added/adapted on your system in file /etc/default/openhab2:
EXTRA_JAVA_OPTS="-Dgnu.io.rxtx.SerialPorts=/dev/ttyUSB0:/dev/ttyS0:/dev/ttyAMA0"

and this simply works :wink:

2 Likes

yes, you’re both right. Put the option into /etc/default/openhab2 and changed back setenv to original state.
Yes, that simply works :slight_smile: