Skip to content

Commit

Permalink
Migrate openHAB APT repository to Artifactory (#1504)
Browse files Browse the repository at this point in the history
* replace bintray repo with artifactory

* ask to fix repo interactively

* add check for old repo before asking

Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi authored May 3, 2021
1 parent 00182f7 commit e60cccf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
17 changes: 15 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,22 @@
Hit tab to unselect buttons and scroll through the text using UP/DOWN or PGUP/PGDN.
All announcements are stored in `/opt/openhabian/docs/NEWSLOG.md` for you to lookup.

## Bintray shutdown ## May 3, 2021
Bintray, our hoster for the stable openHAB software distribution, has shutdown their
support for Open Source projects like ours effective May, 1st so you need to replace
any bintray repositories. We have moved to Artifactory.
openhabian-config will ask you on start about replacing the openhab stable repo.
Check /etc/apt/sources.list.d/* afterwards just in case.
Also check if you still use dynamically downloaded addons (remote=true in
/etc/openhab/services/addons.cfg or see the corresponding UI setting under
System Services "Add-On Management").


## Future of master branch ## January 20, 2021
We will no longer make regular updates to the master branch as we migrate away from supporting openHAB2.
As such in the coming months we will make bug fixes directly to the 'stable' branch for openHA2.
We will no longer make regular updates to the master branch as we migrate away from
supporting openHAB2.
As such in the coming months we will make bug fixes directly to the 'stable' branch
for openHA2.
With that said, please migrate off of the 'master' branch as it will be deleted soon.
You can change branches at any time use menu option 01.

Expand Down
16 changes: 16 additions & 0 deletions functions/openhab.bash
Original file line number Diff line number Diff line change
Expand Up @@ -299,3 +299,19 @@ dashboard_add_tile() {

if echo -e "\\norg.openhab.core.ui.tiles:${application}-link-name=${tileDesc}\\norg.openhab.core.ui.tiles:${application}-link-url=${tileURL}\\norg.openhab.core.ui.tiles:${application}-link-imageurl=${tileImg}" >> "$dashboardConfig"; then echo "OK"; else echo "FAILED"; return 1; fi
}

## Replace outdated bintray repo
##
## fix_openhab_repo
##
fix_openhab_repo() {
local warningText="Due to bintray shutdown of services, there is an immediate need to change the openhab stable repository configuration.\\nBintray repo in /etc/apt/sourceslist.d/openhab.list needs to be replaced by Artifactory.\\n\\nDo you want this to be replaced now?"

if ! grep -qs 'https://dl.bintray.com/openhab/apt-repo2' /etc/apt/sources.list.d/openhab.list; then return; fi

echo -n "$(timestamp) [openHABian] Offering to replace outdated bintray repository with artifactory repo... "
if ! (whiptail --title "Repository replacement" --yes-button "Replace" --no-button "Skip" --yesno "$warningText" 10 80); then echo "SKIPPED"; return 0; fi
cond_redirect rm -f /etc/apt/sources.list.d/openhab2.list
sed -ie 's#https://dl.bintray.com/openhab/apt-repo2#https://openhab.jfrog.io/artifactory/openhab-linuxpkg#g' /etc/apt/sources.list.d/openhab.list
}

1 change: 1 addition & 0 deletions openhabian-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ else
load_create_config
openhabian_console_check
openhabian_update_check
fix_openhab_repo
while show_main_menu; do
true
done
Expand Down

0 comments on commit e60cccf

Please sign in to comment.