From e60cccfc36664fb22299df124176fdff26b1f4ae Mon Sep 17 00:00:00 2001 From: Markus Storm Date: Mon, 3 May 2021 21:01:25 +0200 Subject: [PATCH] Migrate openHAB APT repository to Artifactory (#1504) * replace bintray repo with artifactory * ask to fix repo interactively * add check for old repo before asking Signed-off-by: Markus Storm --- NEWS.md | 17 +++++++++++++++-- functions/openhab.bash | 16 ++++++++++++++++ openhabian-setup.sh | 1 + 3 files changed, 32 insertions(+), 2 deletions(-) diff --git a/NEWS.md b/NEWS.md index a69ae7ca7..895f7c45a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -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. diff --git a/functions/openhab.bash b/functions/openhab.bash index 3daaa2989..368e9d4f3 100644 --- a/functions/openhab.bash +++ b/functions/openhab.bash @@ -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 +} + diff --git a/openhabian-setup.sh b/openhabian-setup.sh index 6bf4f3e6d..2a99e9543 100755 --- a/openhabian-setup.sh +++ b/openhabian-setup.sh @@ -125,6 +125,7 @@ else load_create_config openhabian_console_check openhabian_update_check + fix_openhab_repo while show_main_menu; do true done