Skip to content

Commit

Permalink
Bookworm homegear tailscale (#1854)
Browse files Browse the repository at this point in the history
* homegear & tailscale use bookworm repos

Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi authored Mar 11, 2024
1 parent 7dc2015 commit 1548413
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 22 deletions.
25 changes: 11 additions & 14 deletions .github/workflows/build-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,30 +62,27 @@ jobs:
sed -i -e "s|ap_password:.*$|ap_password: ${{secrets.HOTSPOTPW}}|g" includes/comitup.conf
cp build-image/template_rpi-imager-openhab.json rpi-imager-openhab.json
sudo -E ./build.bash rpi oldstable
sudo -E ./build.bash rpi64 oldstable
sudo -E ./build.bash rpi latest
sudo -E ./build.bash rpi64 latest
echo "image32=$(ls openhabian-raspios32-oldstable*.img.xz)" >> $GITHUB_OUTPUT
echo "image64=$(ls openhabian-raspios64-oldstable*.img.xz)" >> $GITHUB_OUTPUT
echo "image64latest=$(ls openhabian-raspios64-latest*.img.xz)" >> $GITHUB_OUTPUT
#echo "image32=$(ls openhabian-raspios32*.img.xz)" >> $GITHUB_OUTPUT
#echo "image64=$(ls -1t openhabian-raspios64*.img.xz | tail -1)" >> $GITHUB_OUTPUT
#echo "image64latest=$(ls -1t openhabian-raspios64*.img.xz | head -1)" >> $GITHUB_OUTPUT
echo "image32old=$(ls openhabian-raspios32-oldstable*.img.xz)" >> $GITHUB_OUTPUT
echo "image32=$(ls openhabian-raspios32-latest*.img.xz)" >> $GITHUB_OUTPUT
echo "image64=$(ls openhabian-raspios64-latest*.img.xz)" >> $GITHUB_OUTPUT
echo "json_image=$(ls rpi-imager-openhab.json)" >> $GITHUB_OUTPUT
- name: Archive openHABian 32bit bullseye image
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.image32old }}
path: ${{ steps.build.outputs.image32old }}
- name: Archive openHABian 32bit Debian 12 bookworm image
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.image32 }}
path: ${{ steps.build.outputs.image32 }}
- name: Archive openHABian 64bit bullseye image
- name: Archive openHABian 64bit Debian 12 bookworm image
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.image64 }}
path: ${{ steps.build.outputs.image64 }}
- name: Archive openHABian 64bit bookworm image
uses: actions/upload-artifact@v4
with:
name: ${{ steps.build.outputs.image64latest }}
path: ${{ steps.build.outputs.image64latest }}
- name: Archive openHABian json of image download
uses: actions/upload-artifact@v4
with:
Expand All @@ -102,7 +99,7 @@ jobs:
prerelease: false
draft: true
files: |
${{ steps.build.outputs.image32old }}
${{ steps.build.outputs.image32 }}
${{ steps.build.outputs.image64 }}
${{ steps.build.outputs.image64latest }}
${{ steps.build.outputs.json_image }}
17 changes: 11 additions & 6 deletions functions/packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ homegear_setup() {
local disklistFileAWS="/etc/amanda/openhab-aws/disklist"
local disklistFileDir="/etc/amanda/openhab-dir/disklist"
local introText="This will install Homegear, the Homematic CCU2 emulation software, using the latest stable release available from the official repository."
local keyName="homegear"
local keyName="homegear-archive-keyring"
local myOS
local myRelease
local temp
Expand All @@ -202,11 +202,15 @@ homegear_setup() {
myOS="$(lsb_release -si)"
myRelease="$(lsb_release -sc)"

if [[ "$myRelease" == "n/a" ]] || [[ "$myRelease" == "bookworm" ]]; then
myRelease="${osrelease:-bullseye}"
if [[ "$myRelease" == "n/a" ]]; then
myRelease="${osrelease:-bookworm}"
fi
if [[ "$myOS" == "Raspbian" ]] || is_arm && running_in_docker; then # Workaround for CI not actually reporting as Raspberry Pi OS
myOS="debian" # Workaround for Homegear's Raspios APT repo being broken
#if [[ "$myOS" == "Raspbian" ]] || is_arm && running_in_docker; then # Workaround for CI not actually reporting as Raspberry Pi OS
# shellcheck disable=SC2078,SC2154
if [[ "$myOS" == "debian" ]] && [[ is_arm || running_in_docker ]]; then
# Workaround for CI not actually reporting as Raspberry Pi OS
#myOS="debian" # Workaround for Homegear's Raspios APT repo being broken
myOS="raspberry_pi_os" # Workaround for Homegear's Raspios APT repo being broken
fi

echo -n "$(timestamp) [openHABian] Beginning Homematic CCU2 emulation software Homegear install... "
Expand All @@ -219,7 +223,8 @@ homegear_setup() {
if ! add_keys "https://apt.homegear.eu/Release.key" "$keyName"; then return 1; fi

# need to use testing repo to get v0.8
echo "deb [signed-by=/usr/share/keyrings/${keyName}.gpg] https://apt.homegear.eu/${myOS,,}/${myRelease,,}/homegear/testing/ ${myRelease,,} main" > /etc/apt/sources.list.d/homegear.list
# repo https://apt.homegear.eu/raspberry_pi_os/bookworm/homegear/{testing,stable}/dists/bookworm/
echo "deb [signed-by=/usr/share/keyrings/${keyName}.gpg] https://apt.homegear.eu/${myOS,,}/${myRelease,,}/homegear/testing ${myRelease,,} main" > /etc/apt/sources.list.d/homegear.list

echo -n "$(timestamp) [openHABian] Installing Homegear... "
if ! cond_redirect apt-get update; then echo "FAILED (update apt lists)"; return 1; fi
Expand Down
7 changes: 5 additions & 2 deletions functions/vpn.bash
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,15 @@ install_tailscale() {
if [[ -n "$INTERACTIVE" ]]; then
if (whiptail --title "Tailscale VPN setup" --yes-button "Continue" --no-button "Cancel" --yesno "$installText" 12 80); then echo "OK"; else echo "CANCELED"; return 1; fi
fi

echo "$(timestamp) [openHABian] Installing tailscale VPN... "
# Add tailscale's GPG key
add_keys "https://pkgs.tailscale.com/stable/raspbian/bullseye.gpg" "$keyName"
add_keys "https://pkgs.tailscale.com/stable/raspbian/${myRelease,,}.noarmor.gpg" "$keyName"
# Add the tailscale repository
echo "deb [signed-by=/usr/share/keyrings/${keyName}.gpg] https://pkgs.tailscale.com/stable/raspbian bullseye main" > /etc/apt/sources.list.d/tailscale.list
#echo "deb [signed-by=/usr/share/keyrings/${keyName}.gpg] https://pkgs.tailscale.com/stable/raspbian ${myRelease,,} main" > /etc/apt/sources.list.d/tailscale.list
curl -fsSL https://pkgs.tailscale.com/stable/raspbian/bookworm.tailscale-keyring.list | sudo tee /etc/apt/sources.list.d/tailscale.list
if ! cond_redirect apt-get update; then echo "FAILED (update apt lists)"; return 1; fi

# Install tailscale
if cond_redirect apt-get install --yes -o DPkg::Lock::Timeout="$APTTIMEOUT" tailscale; then echo "OK"; else echo "FAILED (install tailscale)"; return 1; fi
cp "${BASEDIR:-/opt/openhabian}/includes/${sudoersFile}" "${sudoersPath}/"
Expand Down

0 comments on commit 1548413

Please sign in to comment.