Skip to content

Commit

Permalink
homegear & tailscale use bookworm repos
Browse files Browse the repository at this point in the history
Signed-off-by: Markus Storm <markus.storm@gmx.net>
  • Loading branch information
mstormi committed Mar 11, 2024
1 parent 7dc2015 commit c134e30
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 18 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 }}
5 changes: 3 additions & 2 deletions functions/packages.bash
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ 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
Expand All @@ -219,6 +219,7 @@ 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
# repo https://apt.homegear.eu/raspberry_pi_os/bookworm/homegear/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... "
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 c134e30

Please sign in to comment.