├── .dockerignore ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug-report.yml │ ├── config.yml │ ├── feature-request.yml │ ├── support-request.yml │ └── wiki-change-request.yml ├── dependabot.yml ├── labeler.yml ├── release-drafter.yml ├── release.yml └── workflows │ ├── Stage-4_post_release_validation.yml │ ├── beta-stage-1_auto_merge_dependabot_updates.yml │ ├── beta-stage-2_build_beta_release_and_store.yml │ ├── pr-labeler.yml │ ├── purge.yml │ ├── release_trigger_logger.yml │ ├── stage-1_create_a_release_and_store.yml │ ├── stage-2_pre-release_validation.yml │ ├── stage-3_5_purge_cloudflare_cache.yml │ ├── stage-3_promote_release_to_apt.yml │ ├── stage-5_update_version_on_npm.yml │ └── stale.yml ├── .gitignore ├── .npmignore ├── BUILD.md ├── LICENSE ├── README.md ├── README.npm.md ├── beta ├── package-lock.json └── package.json ├── build.sh ├── build ├── Dockerfile └── qemu │ ├── qemu-aarch64-static │ ├── qemu-arm-static │ ├── qemu-i386-static │ └── qemu-x86_64-static ├── deb ├── debian │ ├── changelog │ ├── compat │ ├── control │ ├── homebridge.install │ ├── homebridge.service │ ├── postinst │ ├── postrm │ ├── preinst │ ├── rules │ └── source │ │ └── format ├── etc │ └── hb-service │ │ └── homebridge │ │ └── prestart.d │ │ └── 10-fix-permissions ├── opt │ └── homebridge │ │ ├── bashrc │ │ ├── bashrc-hb-shell │ │ ├── hb-service-shim │ │ ├── hb-shell │ │ ├── source.sh │ │ └── start.sh ├── usr │ └── share │ │ └── polkit-1 │ │ └── rules.d │ │ └── homebridge.rules └── var │ └── lib │ ├── homebridge │ └── .npmrc │ └── polkit-1 │ └── localauthority │ └── 10-vendor.d │ └── homebridge.pkla ├── package-lock.json ├── package.json ├── purge-cf-cache.sh ├── purge.sh └── repo ├── KEY.gpg └── cf-cache-purge-urls.json /.dockerignore: -------------------------------------------------------------------------------- 1 | *.tar.gz 2 | *.tar.xz 3 | *.deb 4 | *.buildinfo 5 | *.changes 6 | *.dsc 7 | .pnpm-debug.log 8 | staging/ -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file 2 | 3 | * @NorthernMan54 @bwp91 @donavanbecker 4 | 5 | # Only a collaborator can review / approve changes to this list 6 | 7 | /.github/CODEOWNERS @homebridge/collaborators -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug-report.yml: -------------------------------------------------------------------------------- 1 | name: Bug Report 2 | description: Create a report to help us improve 3 | labels: ["bug"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for taking the time to fill out this bug report! 9 | 10 | Before we start, be sure you are aware of the following points: 11 | 12 | * If your issue is specific to a certain plugin, create the issue on that plugin's GitHub project page instead. 13 | * Avoid duplicating any existing issues which already track or resolve your problem, search the existing issues first. 14 | * Aim to find a descriptive and precise title for your bug report. 15 | - type: dropdown 16 | id: raspberry-pi-model 17 | attributes: 18 | label: Raspberry Pi Model 19 | options: 20 | - Raspberry Pi 1 B 21 | - Raspberry Pi 2 22 | - Raspberry Pi 3 23 | - Raspberry Pi Zero W 24 | - Raspberry Pi Zero WH 25 | - Raspberry Pi Zero 2 W 26 | - Raspberry Pi 3 A+ 27 | - Raspberry Pi 3 B+ 28 | - Raspberry Pi 4 B 29 | - Other (specify in description) 30 | description: | 31 | Please select which Raspberry Pi model you are using. 32 | validations: 33 | required: true 34 | - type: textarea 35 | id: describe-the-bug 36 | attributes: 37 | label: Describe The Bug 38 | description: | 39 | Pleased provide a clear and concise description of what the bug is. Be sure to include: 40 | 41 | * What is happening? 42 | * What you expect to happen? 43 | * Clear steps explaining how to reproduce the problem. 44 | placeholder: | 45 | Tip: You can attach images or files by clicking this area to highlight it and then dragging files in. 46 | validations: 47 | required: true 48 | - type: textarea 49 | id: logs 50 | attributes: 51 | label: Logs 52 | render: text 53 | description: | 54 | Please provide the relevant logs showing the error that occurred. 55 | 56 | * Keep this short. Do not paste in hundereds of lines repeating the same error. 57 | * Show the logs from the service being restarted until the error occurs. 58 | validations: 59 | required: false -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Homebridge Discord 4 | url: https://discord.gg/kqNCe2D 5 | about: A place to discuss and collaborate with other Homebridge users and developers. 6 | - name: Homebridge Reddit 7 | url: https://www.reddit.com/r/homebridge/ 8 | about: A place to discuss Homebridge, get help with it, ask questions about it, post plugins, and more. 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature-request.yml: -------------------------------------------------------------------------------- 1 | name: Feature Request 2 | description: Suggest an idea for this project 3 | labels: ["enhancement"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for taking the time to contribute to this project! 9 | - type: textarea 10 | id: feature-description 11 | attributes: 12 | label: Feature Description 13 | description: | 14 | Please provide an overview of the what feature you'd like to see. 15 | 16 | * What is happening? 17 | * What you expect to happen? 18 | * What problems would this new feature solve? 19 | placeholder: | 20 | Tip: You can attach images or files by clicking this area to highlight it and then dragging files in. 21 | validations: 22 | required: true 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/support-request.yml: -------------------------------------------------------------------------------- 1 | name: Support Request 2 | description: Need help? 3 | labels: ["question"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Please read the following before you start filling out this form: 9 | 10 | * If your issue is specific to a certain plugin, create the issue on that plugin's GitHub project page instead. 11 | * If your issue is for Homebridge, create the issue on the Homebridge GitHub project page instead. 12 | * Support via GitHub issues is limited. You may find it more benefitial ask questions on the [Homebridge Discord](https://discord.gg/kqNCe2D) or [Reddit](https://www.reddit.com/r/homebridge/) communities instead. 13 | * We do not provide support for extra packages, such as PiHole or Deconz, beyond the basic installation scripts. 14 | * Search through existing issues (resolved or open) which might provide a solution to your problem already. 15 | * Aim to find a descriptive and precise title for your support request. 16 | - type: dropdown 17 | id: raspberry-pi-model 18 | attributes: 19 | label: Raspberry Pi Model 20 | options: 21 | - Raspberry Pi 1 B 22 | - Raspberry Pi 2 23 | - Raspberry Pi 3 24 | - Raspberry Pi Zero W 25 | - Raspberry Pi Zero WH 26 | - Raspberry Pi Zero 2 W 27 | - Raspberry Pi 3 A+ 28 | - Raspberry Pi 3 B+ 29 | - Raspberry Pi 4 B 30 | - Other (specify in description) 31 | description: | 32 | Please select which Raspberry Pi model you are using. 33 | validations: 34 | required: true 35 | - type: textarea 36 | id: current-situation 37 | attributes: 38 | label: Current Situation 39 | description: | 40 | Please provide an overview of the current situation and illustrate potential problems or shortcomings. 41 | 42 | * What is happening? 43 | * What you expect to happen? 44 | * Clear steps explaining how to reproduce the problem. 45 | placeholder: | 46 | Tip: You can attach images or files by clicking this area to highlight it and then dragging files in. 47 | validations: 48 | required: true 49 | - type: textarea 50 | id: logs 51 | attributes: 52 | label: Logs 53 | render: text 54 | description: | 55 | Please provide the relevant logs showing the error that occurred. 56 | 57 | * Keep this short. Do not paste in hundereds of lines repeating the same error. 58 | * Show the logs from the service being restarted until the error occurs. 59 | validations: 60 | required: false -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/wiki-change-request.yml: -------------------------------------------------------------------------------- 1 | name: Wiki Change Request 2 | description: want change? 3 | labels: ["wiki change request"] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Please read the following before you start filling out this form: 9 | 10 | * This form is for requesting changes to the Homebridge Organization wiki pages only. 11 | - type: textarea 12 | id: proposed-change 13 | attributes: 14 | label: Proposed Change 15 | description: | 16 | Please describe the change you would like to see made to the wiki page. 17 | 18 | If you are requesting a new page, please describe the page you would like to see created. 19 | 20 | placeholder: | 21 | Tip: You can attach images or files by clicking this area to highlight it and then dragging files in. 22 | validations: 23 | required: true 24 | - type: input 25 | id: wiki-page 26 | attributes: 27 | label: Wiki Page Link 28 | description: | 29 | Please provide a link to the wiki page you would like to see changed. 30 | 31 | If you are requesting a new page, please provide details of where you would like to see this page linked from. 32 | validations: 33 | required: true 34 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | # To get started with Dependabot version updates, you'll need to specify which 2 | # package ecosystems to update and where the package manifests are located. 3 | # Please see the documentation for all configuration options: 4 | # https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file 5 | 6 | version: 2 7 | updates: 8 | # Root package.json updates 9 | - package-ecosystem: npm 10 | directory: "/" 11 | schedule: 12 | interval: daily 13 | time: "10:00" 14 | open-pull-requests-limit: 10 15 | versioning-strategy: increase 16 | 17 | # Beta /beta/package.json updates 18 | - package-ecosystem: npm 19 | directory: "/beta" 20 | schedule: 21 | interval: daily 22 | time: "10:00" 23 | open-pull-requests-limit: 5 24 | versioning-strategy: increase 25 | commit-message: 26 | prefix: "BETA" -------------------------------------------------------------------------------- /.github/labeler.yml: -------------------------------------------------------------------------------- 1 | # Add 'beta' label to any PR where the base branch name starts with `beta` or has a `beta` section in the name 2 | beta: 3 | - base-branch: ['^beta', 'beta', 'beta*'] 4 | 5 | # Add 'beta' label to any PR where the base branch name starts with `beta` or has a `beta` section in the name 6 | alpha: 7 | - base-branch: ['^alpha', 'alpha', 'alpha*'] 8 | 9 | # Add 'latest' label to any PR where the base branch name starts with `latest` or has a `latest` section in the name 10 | latest: 11 | - base-branch: ['^latest', 'latest', 'latest*'] -------------------------------------------------------------------------------- /.github/release-drafter.yml: -------------------------------------------------------------------------------- 1 | name-template: 'v$RESOLVED_VERSION' 2 | tag-template: 'v$RESOLVED_VERSION' 3 | 4 | categories: 5 | - title: 'Breaking Changes' 6 | labels: 7 | - 'breaking change' 8 | - title: 'Featured Changes' 9 | labels: 10 | - 'feature' 11 | - 'enhancement' 12 | - title: 'Bug Fixes' 13 | labels: 14 | - 'fix' 15 | - 'bugfix' 16 | - 'bug' 17 | - title: 'Other Changes' 18 | labels: 19 | - 'documentation' 20 | 21 | autolabeler: 22 | - label: 'fix' 23 | branch: 24 | - '/fix\/.+/' 25 | title: 26 | - '/fix/i' 27 | - label: 'feature' 28 | branch: 29 | - '/feature\/.+/' 30 | 31 | version-resolver: 32 | major: 33 | labels: 34 | - 'major' 35 | minor: 36 | labels: 37 | - 'minor' 38 | patch: 39 | labels: 40 | - 'patch' 41 | default: patch 42 | 43 | change-template: '- $TITLE @$AUTHOR [#$NUMBER]' 44 | template: | 45 | Homebridge Apt Package Manifest 46 | 47 | | Package | Version | 48 | |:-------:|:-------:| 49 | |NodeJS| v*.*.* | 50 | |Homebridge-Config-UI-X| *.*.* | 51 | |Homebridge| *.*.* | 52 | 53 | ## Other Changes 54 | $CHANGES 55 | 56 | prerelease: true -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | # The GitHub release configuration file: https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#configuring-automatically-generated-release-notes 2 | 3 | changelog: 4 | categories: 5 | - title: Homebridge Apt Package Manifest 6 | labels: 7 | - "*" 8 | -------------------------------------------------------------------------------- /.github/workflows/Stage-4_post_release_validation.yml: -------------------------------------------------------------------------------- 1 | name: Stage 4 - Post Release Validation 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | release_channel: 7 | description: "APT release channel to validate" 8 | required: true 9 | default: "stable" 10 | type: choice 11 | options: 12 | - stable 13 | - beta 14 | 15 | workflow_run: 16 | workflows: 17 | - "Stage 3 - Promote Release Package to APT Stores" 18 | - "Beta Stage 2 - Build and Release Beta Package" 19 | types: 20 | - completed 21 | 22 | jobs: 23 | determine-channel: 24 | name: Determine Release Channel 25 | runs-on: ubuntu-latest 26 | if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} 27 | outputs: 28 | channel: ${{ steps.set.outputs.release_channel }} 29 | steps: 30 | - id: set 31 | run: | 32 | if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then 33 | echo "release_channel=${{ github.event.inputs.release_channel }}" >> $GITHUB_OUTPUT 34 | elif [[ "${{ github.event.workflow_run.name }}" == "Beta Stage 2 - Build and Release Beta Package" ]]; then 35 | echo "release_channel=beta" >> $GITHUB_OUTPUT 36 | else 37 | echo "release_channel=stable" >> $GITHUB_OUTPUT 38 | fi 39 | 40 | validate: 41 | name: Validate APT Install 42 | runs-on: ubuntu-latest 43 | needs: determine-channel 44 | steps: 45 | - name: Install Homebridge from APT 46 | run: | 47 | curl -sSfL https://repo.homebridge.io/KEY.gpg | sudo gpg --dearmor -o /usr/share/keyrings/homebridge.gpg 48 | echo "deb [signed-by=/usr/share/keyrings/homebridge.gpg] https://repo.homebridge.io ${{ needs.determine-channel.outputs.channel }} main" | \ 49 | sudo tee /etc/apt/sources.list.d/homebridge.list > /dev/null 50 | sudo apt-get update 51 | sudo apt-get install -y homebridge 52 | 53 | - name: Display Installed Version 54 | id: installed-version 55 | run: | 56 | dpkg -l homebridge 57 | echo "homebridge-version=\"$(dpkg -l homebridge | tail -1 | awk '{ print $3 }')\"" >> "$GITHUB_OUTPUT" 58 | 59 | - name: Validate Homebridge 60 | run: | 61 | sudo hb-service status 62 | sudo hb-service view 63 | 64 | - name: List Available Versions 65 | run: | 66 | apt-cache madison homebridge 67 | 68 | - name: Publish Notice 69 | run: echo "::notice::APT Package Installed from ${{ needs.determine-channel.outputs.channel }} - Version ${{ steps.installed-version.outputs.homebridge-version }}" 70 | -------------------------------------------------------------------------------- /.github/workflows/beta-stage-1_auto_merge_dependabot_updates.yml: -------------------------------------------------------------------------------- 1 | name: Beta Stage 1 - Auto Merge Beta Dependabot Updates 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize, reopened] 6 | 7 | permissions: 8 | pull-requests: write 9 | contents: write 10 | 11 | jobs: 12 | auto-merge: 13 | if: github.actor == 'dependabot[bot]' 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | - name: Checkout code 18 | uses: actions/checkout@v3 19 | with: 20 | fetch-depth: 2 21 | 22 | - name: Check and log changed files PR#${{ github.event.pull_request.number }} 23 | id: filecheck 24 | run: | 25 | echo "Fetching changed files..." 26 | git fetch --no-tags --depth=1 origin ${{ github.base_ref }} 27 | 28 | files=$(git diff --name-only FETCH_HEAD...HEAD) 29 | echo "$files" 30 | 31 | if echo "$files" | grep -qv '^beta/'; then 32 | echo "non_beta_changes=true" >> $GITHUB_OUTPUT 33 | echo "::notice::🚫 Auto-merge skipped: PR includes files outside of beta directory." 34 | else 35 | echo "non_beta_changes=false" >> $GITHUB_OUTPUT 36 | fi 37 | 38 | - name: Check and log PR title PR#${{ github.event.pull_request.number }} 39 | id: titlecheck 40 | run: | 41 | title="${{ github.event.pull_request.title }}" 42 | echo "PR Title: $title" 43 | if [[ "$title" == BETA* ]]; then 44 | echo "beta_title=true" >> $GITHUB_OUTPUT 45 | else 46 | echo "beta_title=false" >> $GITHUB_OUTPUT 47 | echo "::notice::🚫 Auto-merge skipped: PR title does not start with BETA." 48 | fi 49 | 50 | - name: Enable auto-merge for Dependabot PR#${{ github.event.pull_request.number }} 51 | if: steps.filecheck.outputs.non_beta_changes == 'false' && steps.titlecheck.outputs.beta_title == 'true' 52 | uses: peter-evans/enable-pull-request-automerge@v3 53 | with: 54 | token: ${{ secrets.GITHUB_TOKEN }} 55 | pull-request-number: ${{ github.event.pull_request.number }} 56 | merge-method: squash 57 | 58 | - name: Log auto-merge notice 59 | if: steps.filecheck.outputs.non_beta_changes == 'false' && steps.titlecheck.outputs.beta_title == 'true' 60 | run: | 61 | echo "::notice::✅ Auto-merge enabled for Dependabot PR #${{ github.event.pull_request.number }}" 62 | -------------------------------------------------------------------------------- /.github/workflows/beta-stage-2_build_beta_release_and_store.yml: -------------------------------------------------------------------------------- 1 | name: Beta Stage 2 - Build and Release Beta Package 2 | 3 | permissions: 4 | contents: read 5 | actions: write 6 | id-token: write 7 | 8 | on: 9 | pull_request: 10 | types: [closed] # Add 'merged' for auto-merge compatibility 11 | workflow_dispatch: 12 | 13 | jobs: 14 | check-changes: 15 | # Only run for merged PRs or manual dispatch 16 | if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch' 17 | runs-on: ubuntu-latest 18 | steps: 19 | - name: Checkout repository 20 | uses: actions/checkout@v4 21 | 22 | - name: Log event context for debugging 23 | if: github.event_name == 'pull_request' 24 | run: | 25 | echo "Event: ${{ github.event_name }}" 26 | echo "Merged: ${{ github.event.pull_request.merged }}" 27 | 28 | - name: Verify beta-only changes 29 | if: github.event_name == 'pull_request' 30 | run: | 31 | changed_files=$(git diff --name-only HEAD^ HEAD) 32 | for file in $changed_files; do 33 | if [[ ! $file == beta/* ]]; then 34 | echo "Non-beta changes detected in $file. Exiting." 35 | exit 1 36 | fi 37 | done 38 | 39 | generate_beta_version: 40 | needs: check-changes 41 | name: Generate Beta Package Version 42 | runs-on: ubuntu-latest 43 | outputs: 44 | version: ${{ steps.beta_version.outputs.version }} 45 | steps: 46 | - uses: actions/checkout@v4 47 | 48 | - name: Get base version 49 | uses: reecetech/version-increment@2023.10.1 50 | id: release_version 51 | with: 52 | scheme: semver 53 | increment: patch 54 | 55 | - name: Generate beta package version 56 | id: beta_version 57 | run: | 58 | BASE_VERSION=${{ steps.release_version.outputs.version }} 59 | BASE_VERSION_CLEAN=$(echo "$BASE_VERSION" | sed -E 's/-[a-z0-9.]+//') 60 | DATE=$(date +%Y%m%d) 61 | VERSION="${BASE_VERSION_CLEAN}~beta.${DATE}" 62 | echo "version=$VERSION" >> $GITHUB_OUTPUT 63 | echo "::notice::📦 Beta version: $VERSION" 64 | 65 | build_beta_and_store: 66 | name: Build Beta Packages for (${{ matrix.name }}) 67 | needs: [generate_beta_version] 68 | runs-on: ${{ matrix.os }} 69 | strategy: 70 | fail-fast: false 71 | matrix: 72 | name: [debian-x86_64, debian-arm32v6, debian-arm64v8] 73 | include: 74 | - name: debian-x86_64 75 | os: ubuntu-latest 76 | BASE_IMAGE: library/debian:bullseye 77 | QEMU_ARCH: x86_64 78 | - name: debian-arm32v6 79 | os: ubuntu-latest 80 | BASE_IMAGE: balenalib/raspberrypi3-debian:bullseye 81 | QEMU_ARCH: arm 82 | - name: debian-arm64v8 83 | os: ubuntu-latest 84 | BASE_IMAGE: arm64v8/debian:bullseye 85 | QEMU_ARCH: aarch64 86 | 87 | steps: 88 | - uses: actions/checkout@v4 89 | 90 | - name: Setup build environment 91 | run: | 92 | sudo apt-get update 93 | sudo apt-get --yes --no-install-recommends install binfmt-support qemu-user-static 94 | docker run --rm --privileged multiarch/qemu-user-static:register --reset 95 | continue-on-error: false 96 | 97 | - name: Build Docker image 98 | run: | 99 | docker build -f build/Dockerfile \ 100 | --build-arg BASE_IMAGE=${{ matrix.BASE_IMAGE }} \ 101 | --build-arg QEMU_ARCH=${{ matrix.QEMU_ARCH }} \ 102 | -t beta-package-build \ 103 | --platform=linux/${{ matrix.QEMU_ARCH }} \ 104 | --cache-from=beta-package-build:latest \ 105 | --build-arg BUILDKIT_INLINE_CACHE=1 . 106 | continue-on-error: false 107 | 108 | - name: Build package 109 | run: | 110 | docker run --rm -v $(pwd):/repo \ 111 | -e PKG_RELEASE_TYPE="beta" \ 112 | -e PKG_RELEASE_VERSION="${{ needs.generate_beta_version.outputs.version }}" \ 113 | beta-package-build 114 | continue-on-error: false 115 | 116 | - name: Rename package to include v 117 | run: | 118 | DEB_FILE=$(ls homebridge*.deb 2>/dev/null || echo "") 119 | if [ -z "$DEB_FILE" ]; then 120 | echo "No .deb file found. Exiting." 121 | exit 1 122 | fi 123 | UPDATED=$(echo "$DEB_FILE" | sed -e 's/homebridge_/homebridge_v/g') 124 | mv "$DEB_FILE" "$UPDATED" 125 | 126 | - name: Rename manifest to include v 127 | run: | 128 | MANIFEST_FILE=$(ls homebridge*.manifest 2>/dev/null || echo "") 129 | if [ -z "$MANIFEST_FILE" ]; then 130 | echo "No .manifest file found. Exiting." 131 | exit 1 132 | fi 133 | UPDATED=$(echo "$MANIFEST_FILE" | sed -e 's/homebridge_/homebridge_v/g') 134 | mv "$MANIFEST_FILE" "$UPDATED" 135 | 136 | - uses: actions/upload-artifact@v4 137 | with: 138 | name: artifacts-${{ matrix.name }} 139 | retention-days: 7 140 | path: | 141 | homebridge_v*.deb 142 | homebridge_v*.manifest 143 | 144 | publish_beta: 145 | name: Publish to APT Beta Repo 146 | runs-on: ubuntu-latest 147 | needs: [generate_beta_version, build_beta_and_store] 148 | steps: 149 | - uses: actions/checkout@v4 150 | 151 | - name: Download all artifacts 152 | uses: actions/download-artifact@v4 153 | with: 154 | pattern: artifacts-* 155 | merge-multiple: true 156 | path: repo/ 157 | 158 | - name: Display structure of downloaded files 159 | run: ls -R 160 | 161 | - name: Import GPG Key 162 | uses: crazy-max/ghaction-import-gpg@v6 163 | with: 164 | gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} 165 | passphrase: ${{ secrets.GPG_PASSPHRASE }} 166 | 167 | - name: Install deb-s3 168 | run: | 169 | curl -sLO https://github.com/deb-s3/deb-s3/releases/download/0.11.8/deb-s3-0.11.8.gem 170 | sudo gem install deb-s3-0.11.8.gem 171 | 172 | - name: Upload to Beta APT Repo 173 | run: | 174 | sudo chown -R $USER: repo/ 175 | deb-s3 upload \ 176 | --codename=beta \ 177 | --preserve-versions \ 178 | --s3-region=us-west-2 \ 179 | --bucket repo.homebridge.io \ 180 | --access-key-id=${{ secrets.AWS_ACCESS_KEY_ID }} \ 181 | --secret-access-key=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ 182 | --sign=${{ secrets.GPG_KEY_ID }} \ 183 | repo/homebridge_v*.deb -------------------------------------------------------------------------------- /.github/workflows/pr-labeler.yml: -------------------------------------------------------------------------------- 1 | name: PR Labeler 2 | 3 | on: 4 | pull_request: # required for auto labeler 5 | types: [opened, reopened, synchronize] 6 | workflow_dispatch: 7 | 8 | jobs: 9 | stale: 10 | uses: homebridge/.github/.github/workflows/pr-labeler.yml@latest 11 | secrets: 12 | token: ${{ secrets.GITHUB_TOKEN }} 13 | -------------------------------------------------------------------------------- /.github/workflows/purge.yml: -------------------------------------------------------------------------------- 1 | name: "Purge Old Releases" 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | min_version: 7 | description: 'Enter minimum version to keep (x.x.x):' 8 | required: true 9 | release_type: 10 | type: choice 11 | description: Release Type 12 | options: 13 | - stable 14 | - test 15 | 16 | jobs: 17 | purge_old_releases: 18 | name: Purge Old Releases 19 | runs-on: ubuntu-latest 20 | 21 | steps: 22 | - uses: actions/checkout@v3 23 | 24 | - name: Import GPG key 25 | id: import_gpg 26 | uses: crazy-max/ghaction-import-gpg@v4 27 | with: 28 | gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} 29 | passphrase: ${{ secrets.GPG_PASSPHRASE }} 30 | 31 | - name: Install deb-s3 32 | run: | 33 | curl -sLO https://github.com/deb-s3/deb-s3/releases/download/0.11.3/deb-s3-0.11.3.gem 34 | sudo gem install deb-s3-0.11.3.gem 35 | 36 | - name: Purge from S3 37 | env: 38 | AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} 39 | AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} 40 | MIN_VERSION: ${{ github.event.inputs.min_version }} 41 | RELEASE_TYPE: ${{ github.event.inputs.release_type }} 42 | S3_BUCKET: repo.homebridge.io 43 | S3_REGION: us-west-2 44 | run: ./purge.sh 45 | 46 | - name: Update Repo 47 | run: | 48 | deb-s3 verify \ 49 | --codename=${{ github.event.inputs.release_type }} \ 50 | --s3-region=us-west-2 \ 51 | --bucket repo.homebridge.io \ 52 | --access-key-id=${{ secrets.AWS_ACCESS_KEY_ID }} \ 53 | --secret-access-key=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ 54 | --sign=${{ secrets.GPG_KEY_ID }} \ 55 | --fix-manifests 56 | 57 | purge_cloudflare_cache: 58 | name: Clear Cache 59 | needs: purge_old_releases 60 | uses: ./.github/workflows/purge-cf-cache.yml 61 | secrets: 62 | CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} 63 | CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} 64 | -------------------------------------------------------------------------------- /.github/workflows/release_trigger_logger.yml: -------------------------------------------------------------------------------- 1 | name: "Release Trigger Logger" 2 | 3 | on: 4 | release: 5 | 6 | jobs: 7 | release_logger: 8 | # allows for both the workflow_dispatch and push events to trigger this job 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Dump GitHub context 12 | env: 13 | GITHUB_CONTEXT: ${{ toJson(github) }} 14 | run: echo "$GITHUB_CONTEXT" 15 | 16 | - name: Variables 17 | run: | 18 | echo "::notice:: event_name: ${{ github.event_name }}" 19 | echo "::notice:: event_action: ${{ github.event.action }}" 20 | 21 | 22 | -------------------------------------------------------------------------------- /.github/workflows/stage-1_create_a_release_and_store.yml: -------------------------------------------------------------------------------- 1 | name: "Stage 1 - Create a pre-release and build APT package" 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | increment: 7 | description: 'Release Level' 8 | required: true 9 | default: 'patch' 10 | type: choice 11 | options: 12 | - major 13 | - minor 14 | - patch 15 | push: 16 | branches: 17 | - latest 18 | paths: 19 | - package.json 20 | 21 | jobs: 22 | merge_inputs: 23 | # allows for both the workflow_dispatch and push events to trigger this job 24 | runs-on: ubuntu-latest 25 | outputs: 26 | username: ${{ steps.merge_username.outputs.username }} 27 | increment: ${{ steps.merge_increment.outputs.increment }} 28 | steps: 29 | - name: Merge Username 30 | id: merge_username 31 | run: | 32 | if [ "${{ github.event.commits[0].author.username }}" ]; then 33 | USERNAME=${{ github.event.commits[0].author.username }} 34 | else 35 | USERNAME='dependabot[bot]' 36 | fi 37 | echo "Using USERNAME: $USERNAME" 38 | echo "username=$USERNAME" >> "$GITHUB_OUTPUT" 39 | 40 | - name: Merge Username 41 | id: merge_increment 42 | run: | 43 | if [ "${{ inputs.increment }}" ]; then 44 | INCREMENT=${{ inputs.increment }} 45 | else 46 | INCREMENT=patch 47 | fi 48 | echo "Using INCREMENT: $INCREMENT" 49 | echo "increment=$INCREMENT" >> "$GITHUB_OUTPUT" 50 | 51 | create_draft_prerelease: 52 | # Only run this job if the username is dependabot[bot] 53 | needs: merge_inputs 54 | if: ${{ needs.merge_inputs.outputs.username == 'dependabot[bot]' }} 55 | permissions: 56 | # write permission is required to create a github release 57 | contents: write 58 | # write permission is required for autolabeler 59 | # otherwise, read permission is required at least 60 | pull-requests: write 61 | runs-on: ubuntu-latest 62 | outputs: 63 | version: ${{ steps.release_version.outputs.version }} # Without a V 64 | v-version: ${{ steps.release_version.outputs.v-version }} # With a V 65 | release_type: 'stable' 66 | steps: 67 | - name: Checkout code 68 | uses: actions/checkout@v4 69 | 70 | - name: Get next version 71 | uses: reecetech/version-increment@2023.10.1 72 | id: release_version 73 | with: 74 | scheme: semver 75 | increment: ${{ needs.merge_inputs.outputs.increment }} 76 | 77 | message_about_not_running: 78 | # Only run this job if the username is dependabot[bot] 79 | needs: merge_inputs 80 | if: ${{ needs.merge_inputs.outputs.username != 'dependabot[bot]' }} 81 | permissions: 82 | # write permission is required to create a github release 83 | contents: write 84 | # write permission is required for autolabeler 85 | # otherwise, read permission is required at least 86 | pull-requests: write 87 | runs-on: ubuntu-latest 88 | steps: 89 | - name: Display Message 90 | run: echo "::error::This job is not running automatically because the invoker is not 'dependabot[bot]'." && exit 1 91 | 92 | build_package_and_store: 93 | needs: [create_draft_prerelease] 94 | name: Build Packages for (${{ matrix.name }}) v${{ needs.create_draft_prerelease.outputs.version }} 95 | runs-on: ${{ matrix.os }} 96 | strategy: 97 | fail-fast: false 98 | matrix: 99 | name: [ 100 | debian-x86_64, 101 | debian-arm32v6, 102 | debian-arm64v8, 103 | ] 104 | include: 105 | - name: debian-x86_64 106 | os: ubuntu-latest 107 | BASE_IMAGE: library/debian:bullseye 108 | QEMU_ARCH: x86_64 109 | 110 | - name: debian-arm32v6 111 | os: ubuntu-latest 112 | BASE_IMAGE: balenalib/raspberrypi3-debian:bullseye 113 | QEMU_ARCH: arm 114 | 115 | - name: debian-arm64v8 116 | os: ubuntu-latest 117 | BASE_IMAGE: arm64v8/debian:bullseye 118 | QEMU_ARCH: aarch64 119 | 120 | steps: 121 | - uses: actions/checkout@v4 122 | 123 | - name: Linux - Setup Dependencies 124 | if: runner.os == 'Linux' 125 | run: | 126 | sudo apt-get update 127 | sudo apt-get --yes --no-install-recommends install binfmt-support qemu-user-static 128 | docker run --rm --privileged multiarch/qemu-user-static:register --reset 129 | 130 | - name: Linux - Build Docker Image 131 | if: runner.os == 'Linux' 132 | run: | 133 | docker build -f build/Dockerfile --build-arg BASE_IMAGE=${{ matrix.BASE_IMAGE }} --build-arg QEMU_ARCH=${{ matrix.QEMU_ARCH }} -t package-build --platform=linux/${{ matrix.QEMU_ARCH }} . 134 | 135 | - name: Linux - Build Package 136 | if: runner.os == 'Linux' 137 | run: | 138 | docker run --rm -v $(pwd):/repo -e PKG_RELEASE_TYPE="${{ needs.create_draft_prerelease.outputs.release_type }}" -e PKG_RELEASE_VERSION="${{ needs.create_draft_prerelease.outputs.version }}" package-build 139 | 140 | - name: Rename package to include v 141 | run: | 142 | UPDATED=$(ls homebridge*.deb | sed -e 's/homebridge_/homebridge_v/g') 143 | mv homebridge_*.deb ${UPDATED} 144 | 145 | - name: Rename manifest to include v 146 | run: | 147 | UPDATED=$(ls homebridge*.manifest | sed -e 's/homebridge_/homebridge_v/g') 148 | mv homebridge_*.manifest ${UPDATED} 149 | 150 | - uses: actions/upload-artifact@v4 151 | with: 152 | name: artifacts-${{ matrix.name }} 153 | retention-days: 7 154 | path: | 155 | *.deb 156 | *.manifest 157 | 158 | publish_prerelease: 159 | # Publish the pre-release to the GitHub Releases page 160 | needs: [build_package_and_store, create_draft_prerelease] 161 | runs-on: ubuntu-latest 162 | steps: 163 | - uses: actions/checkout@v4 164 | 165 | - uses: actions/download-artifact@v4 166 | with: 167 | pattern: artifacts-* 168 | merge-multiple: true 169 | 170 | - name: Display structure of downloaded files 171 | run: ls -R 172 | 173 | - name: Get the date 174 | id: date 175 | run: | 176 | echo "builddate=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT 177 | 178 | - name: Create Release Body 179 | id: release_body 180 | run: | 181 | echo "BODY_FILE=$(ls *.manifest | head -n 1)" >> $GITHUB_OUTPUT 182 | 183 | - name: Dump Steps context 184 | env: 185 | STEPS_CONTEXT: ${{ toJson(steps) }} 186 | run: echo "$STEPS_CONTEXT" 187 | 188 | - name: Create Pre-Release 189 | uses: docker://ghcr.io/mini-bomba/create-github-release:v1.2.0 190 | with: 191 | token: ${{ secrets.GITHUB_TOKEN }} 192 | tag: ${{ needs.create_draft_prerelease.outputs.v-version }} 193 | prerelease: true 194 | draft: false 195 | name: "${{ needs.create_draft_prerelease.outputs.v-version }} - ${{ steps.date.outputs.builddate }}" 196 | files: | 197 | *.deb 198 | *.manifest 199 | body: ${{ steps.release_body.outputs.BODY_FILE }} 200 | clear_attachments: true 201 | fail_on_no_files: true 202 | 203 | - name: update release 204 | uses: tubone24/update_release@v1.3.1 205 | env: 206 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 207 | TAG_NAME: ${{ needs.create_draft_prerelease.outputs.v-version }} 208 | with: 209 | body_path: ${{ steps.release_body.outputs.BODY_FILE }} 210 | 211 | print_context: 212 | runs-on: ubuntu-latest 213 | steps: 214 | - name: Dump Inputs context 215 | env: 216 | INPUTS_CONTEXT: ${{ toJson(inputs) }} 217 | run: echo "$INPUTS_CONTEXT" 218 | - name: Dump GitHub context 219 | env: 220 | GITHUB_CONTEXT: ${{ toJson(github) }} 221 | run: echo "$GITHUB_CONTEXT" 222 | - name: Dump job context 223 | env: 224 | JOB_CONTEXT: ${{ toJson(job) }} 225 | run: echo "$JOB_CONTEXT" 226 | - name: Dump steps context 227 | env: 228 | STEPS_CONTEXT: ${{ toJson(steps) }} 229 | run: echo "$STEPS_CONTEXT" 230 | - name: Dump runner context 231 | env: 232 | RUNNER_CONTEXT: ${{ toJson(runner) }} 233 | run: echo "$RUNNER_CONTEXT" 234 | - name: Dump strategy context 235 | env: 236 | STRATEGY_CONTEXT: ${{ toJson(strategy) }} 237 | run: echo "$STRATEGY_CONTEXT" 238 | - name: Dump matrix context 239 | env: 240 | MATRIX_CONTEXT: ${{ toJson(matrix) }} 241 | run: echo "$MATRIX_CONTEXT" 242 | 243 | - name: Show default environment variables 244 | run: | 245 | echo "The job_id is: $GITHUB_JOB" # reference the default environment variables 246 | echo "The id of this action is: $GITHUB_ACTION" # reference the default environment variables 247 | echo "The run id is: $GITHUB_RUN_ID" 248 | echo "The GitHub Actor's username is: $GITHUB_ACTOR" 249 | echo "GitHub SHA: $GITHUB_SHA" 250 | -------------------------------------------------------------------------------- /.github/workflows/stage-2_pre-release_validation.yml: -------------------------------------------------------------------------------- 1 | name: "Stage 2 - Pre-Release Validation Workflow" 2 | 3 | on: 4 | workflow_dispatch: 5 | inputs: 6 | release_tag: 7 | description: "The tag of the release to validate." 8 | required: true 9 | type: string 10 | release: 11 | types: [prereleased] 12 | # The workflow run trigger is a workaround due to mini-bomba/create-github-release@v1.2.0 in Stage 1 - not triggering the release event 13 | workflow_run: 14 | workflows: ["Stage 1 - Create a pre-release and build APT package", 15 | "Test - Stage 1 - Create a pre-release and build APT package"] 16 | types: 17 | - completed 18 | 19 | concurrency: 20 | group: ${{ github.workflow }}-${{ github.ref }} 21 | cancel-in-progress: true 22 | 23 | jobs: 24 | determine_release_tag: 25 | name: Determine Release Tag 26 | runs-on: ubuntu-latest 27 | outputs: 28 | release_tag: ${{ steps.set_release_tag.outputs.release_tag }} 29 | preRelease: ${{ steps.set_release_tag.outputs.preRelease }} 30 | latest: ${{ steps.set_release_tag.outputs.latest }} 31 | steps: 32 | - name: Set Release Tag 33 | id: set_release_tag 34 | run: | 35 | if [ "${{ github.event_name }}" == "release" ]; then 36 | echo "release_tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT" 37 | echo "preRelease=false" >> "$GITHUB_OUTPUT" 38 | echo "latest=false" >> "$GITHUB_OUTPUT" 39 | elif [ "${{ github.event_name }}" == "workflow_dispatch" ]; then 40 | echo "release_tag=${{ inputs.release_tag }}" >> "$GITHUB_OUTPUT" 41 | echo "preRelease=false" >> "$GITHUB_OUTPUT" 42 | echo "latest=false" >> "$GITHUB_OUTPUT" 43 | elif [ "${{ github.event_name }}" == "workflow_run" ] && [ "${{ github.event.workflow_run.conclusion }}" == "success" ]; then 44 | echo "release_tag=''" >> "$GITHUB_OUTPUT" 45 | echo "preRelease=true" >> "$GITHUB_OUTPUT" 46 | echo "latest=true" >> "$GITHUB_OUTPUT" 47 | else 48 | echo "::error::Unexpected event: ${{ github.event_name }}" 49 | exit 1 50 | fi 51 | 52 | count_prerelease_assets: 53 | name: Download Latest Pre-Release Assets 54 | runs-on: ubuntu-latest 55 | needs: determine_release_tag 56 | steps: 57 | - name: Download prerelease assets 58 | id: download_assets 59 | uses: robinraju/release-downloader@v1.11 60 | with: 61 | tag: ${{ needs.determine_release_tag.outputs.release_tag }} 62 | preRelease: ${{ needs.determine_release_tag.outputs.preRelease }} 63 | latest: ${{ needs.determine_release_tag.outputs.latest }} 64 | fileName: 'homebridge*.deb' 65 | 66 | - name: List the downloaded files 67 | run: ls -l 68 | 69 | - name: Check the number of downloaded files 70 | id: check_file_count 71 | run: | 72 | FILE_COUNT=$(ls -1 | wc -l) 73 | echo "Number of files downloaded: $FILE_COUNT" 74 | if [ "$FILE_COUNT" -ne 3 ]; then 75 | echo "::error::Expected 3 files, but found $FILE_COUNT" 76 | exit 1 77 | fi 78 | 79 | validate_prerelease_x86_package: 80 | needs: [determine_release_tag, count_prerelease_assets] 81 | name: Download, Install, and Validate Homebridge Package 82 | runs-on: ubuntu-latest 83 | steps: 84 | - name: Download release asset 85 | id: download_release 86 | uses: robinraju/release-downloader@v1.11 87 | with: 88 | tag: ${{ needs.determine_release_tag.outputs.release_tag }} 89 | preRelease: ${{ needs.determine_release_tag.outputs.preRelease }} 90 | latest: ${{ needs.determine_release_tag.outputs.latest }} 91 | fileName: 'homebridge_*_amd64.deb' 92 | 93 | - name: List downloaded files 94 | run: | 95 | echo "Downloaded files:" 96 | ls -l 97 | 98 | - name: Install the downloaded package 99 | run: | 100 | sudo dpkg -i homebridge_*_amd64.deb || sudo apt-get install -f -y 101 | sleep 30 102 | 103 | - name: Validate Homebridge Service 104 | run: | 105 | sudo hb-service view 106 | sudo hb-service status 107 | 108 | print_context: 109 | runs-on: ubuntu-latest 110 | steps: 111 | - name: Dump Inputs context 112 | env: 113 | INPUTS_CONTEXT: ${{ toJson(inputs) }} 114 | run: echo "$INPUTS_CONTEXT" 115 | - name: Dump GitHub context 116 | env: 117 | GITHUB_CONTEXT: ${{ toJson(github) }} 118 | run: echo "$GITHUB_CONTEXT" 119 | - name: Dump job context 120 | env: 121 | JOB_CONTEXT: ${{ toJson(job) }} 122 | run: echo "$JOB_CONTEXT" 123 | - name: Dump steps context 124 | env: 125 | STEPS_CONTEXT: ${{ toJson(steps) }} 126 | run: echo "$STEPS_CONTEXT" 127 | - name: Dump runner context 128 | env: 129 | RUNNER_CONTEXT: ${{ toJson(runner) }} 130 | run: echo "$RUNNER_CONTEXT" 131 | - name: Dump strategy context 132 | env: 133 | STRATEGY_CONTEXT: ${{ toJson(strategy) }} 134 | run: echo "$STRATEGY_CONTEXT" 135 | - name: Dump matrix context 136 | env: 137 | MATRIX_CONTEXT: ${{ toJson(matrix) }} 138 | run: echo "$MATRIX_CONTEXT" 139 | 140 | - name: Show default environment variables 141 | run: | 142 | echo "The job_id is: $GITHUB_JOB" 143 | echo "The id of this action is: $GITHUB_ACTION" 144 | echo "The run id is: $GITHUB_RUN_ID" 145 | echo "The GitHub Actor's username is: $GITHUB_ACTOR" 146 | echo "GitHub SHA: $GITHUB_SHA" 147 | -------------------------------------------------------------------------------- /.github/workflows/stage-3_5_purge_cloudflare_cache.yml: -------------------------------------------------------------------------------- 1 | name: "Stage 3.5 - Purge Cloudflare Cache" 2 | 3 | on: 4 | workflow_dispatch: 5 | workflow_call: 6 | secrets: 7 | CLOUDFLARE_API_TOKEN: 8 | required: true 9 | CLOUDFLARE_ZONE_ID: 10 | required: true 11 | 12 | jobs: 13 | purge_cloudflare_cache: 14 | name: Purge Cloudflare Cache 15 | runs-on: ubuntu-latest 16 | 17 | steps: 18 | - uses: actions/checkout@v4 19 | 20 | - name: Purge Cloudflare Cache 21 | env: 22 | CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} 23 | CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} 24 | run: ./purge-cf-cache.sh 25 | -------------------------------------------------------------------------------- /.github/workflows/stage-3_promote_release_to_apt.yml: -------------------------------------------------------------------------------- 1 | name: "Stage 3 - Promote Release Package to APT Stores" 2 | 3 | on: 4 | release: 5 | types: [published, released] 6 | workflow_dispatch: 7 | inputs: 8 | release_tag: 9 | description: "The tag of the release to Package to APT Stores." 10 | required: true 11 | type: string 12 | 13 | jobs: 14 | determine_release_tag: 15 | name: Determine Release Tag 16 | runs-on: ubuntu-latest 17 | outputs: 18 | release_tag: ${{ steps.set_release_tag.outputs.release_tag }} 19 | steps: 20 | - name: Set Release Tag 21 | id: set_release_tag 22 | run: | 23 | if [ "${{ github.event_name }}" == "release" ]; then 24 | echo "release_tag=${{ github.event.release.tag_name }}" >> "$GITHUB_OUTPUT" 25 | else 26 | echo "release_tag=${{ inputs.release_tag }}" >> "$GITHUB_OUTPUT" 27 | fi 28 | 29 | release_type: 30 | name: Determine Release Type 31 | runs-on: ubuntu-latest 32 | needs: determine_release_tag 33 | outputs: 34 | release_type: ${{ steps.release_type.outputs.type }} 35 | steps: 36 | - name: Determine Release Type 37 | id: release_type 38 | run: | 39 | if [ "${{ github.event.release.prerelease }}" == "true" ]; then 40 | echo "type=test" >> "$GITHUB_OUTPUT" 41 | else 42 | echo "type=stable" >> "$GITHUB_OUTPUT" 43 | fi 44 | 45 | update_apt_repo: 46 | name: Update APT Repo 47 | runs-on: ubuntu-latest 48 | needs: [determine_release_tag, release_type] 49 | steps: 50 | - uses: actions/checkout@v4 51 | 52 | - name: Download Release Assets 53 | uses: robinraju/release-downloader@v1.11 54 | with: 55 | tag: ${{ needs.determine_release_tag.outputs.release_tag }} 56 | fileName: 'homebridge*.deb' 57 | out-file-path: 'repo/' 58 | 59 | - name: Import GPG Key 60 | id: import_gpg 61 | uses: crazy-max/ghaction-import-gpg@v4 62 | with: 63 | gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} 64 | passphrase: ${{ secrets.GPG_PASSPHRASE }} 65 | 66 | - name: Install deb-s3 67 | run: | 68 | curl -sLO https://github.com/deb-s3/deb-s3/releases/download/0.11.8/deb-s3-0.11.8.gem 69 | sudo gem install deb-s3-0.11.8.gem 70 | 71 | - name: Upload Package to APT Repo 72 | run: | 73 | sudo chown -R $USER: repo/ 74 | deb-s3 upload \ 75 | --codename=${{ needs.release_type.outputs.release_type }} \ 76 | --preserve-versions \ 77 | --s3-region=us-west-2 \ 78 | --bucket repo.homebridge.io \ 79 | --access-key-id=${{ secrets.AWS_ACCESS_KEY_ID }} \ 80 | --secret-access-key=${{ secrets.AWS_SECRET_ACCESS_KEY }} \ 81 | --sign=${{ secrets.GPG_KEY_ID }} \ 82 | repo/*.deb 83 | 84 | purge_cloudflare_cache: 85 | name: Purge Cloudflare Cache 86 | needs: update_apt_repo 87 | uses: ./.github/workflows/stage-3_5_purge_cloudflare_cache.yml 88 | secrets: 89 | CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} 90 | CLOUDFLARE_ZONE_ID: ${{ secrets.CLOUDFLARE_ZONE_ID }} 91 | 92 | notify_discord: 93 | name: Notify Discord 94 | needs: [update_apt_repo, purge_cloudflare_cache, determine_release_tag] 95 | uses: homebridge/.github/.github/workflows/discord-webhooks.yml@latest 96 | with: 97 | title: "Homebridge APT Package Released" 98 | description: "Version `${{ needs.determine_release_tag.outputs.release_tag }}` has been released." 99 | url: "https://github.com/homebridge/homebridge-apt-pkg/releases/tag/${{ needs.determine_release_tag.outputs.release_tag }}" 100 | secrets: 101 | DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK_URL_LATEST }} 102 | 103 | print_context: 104 | runs-on: ubuntu-latest 105 | steps: 106 | - name: Dump Inputs context 107 | env: 108 | INPUTS_CONTEXT: ${{ toJson(inputs) }} 109 | run: echo "$INPUTS_CONTEXT" 110 | - name: Dump GitHub context 111 | env: 112 | GITHUB_CONTEXT: ${{ toJson(github) }} 113 | run: echo "$GITHUB_CONTEXT" 114 | - name: Dump job context 115 | env: 116 | JOB_CONTEXT: ${{ toJson(job) }} 117 | run: echo "$JOB_CONTEXT" 118 | - name: Dump steps context 119 | env: 120 | STEPS_CONTEXT: ${{ toJson(steps) }} 121 | run: echo "$STEPS_CONTEXT" 122 | - name: Dump runner context 123 | env: 124 | RUNNER_CONTEXT: ${{ toJson(runner) }} 125 | run: echo "$RUNNER_CONTEXT" 126 | - name: Dump strategy context 127 | env: 128 | STRATEGY_CONTEXT: ${{ toJson(strategy) }} 129 | run: echo "$STRATEGY_CONTEXT" 130 | - name: Dump matrix context 131 | env: 132 | MATRIX_CONTEXT: ${{ toJson(matrix) }} 133 | run: echo "$MATRIX_CONTEXT" 134 | 135 | - name: Show default environment variables 136 | run: | 137 | echo "The job_id is: $GITHUB_JOB" # reference the default environment variables 138 | echo "The id of this action is: $GITHUB_ACTION" # reference the default environment variables 139 | echo "The run id is: $GITHUB_RUN_ID" 140 | echo "The GitHub Actor's username is: $GITHUB_ACTOR" 141 | echo "GitHub SHA: $GITHUB_SHA" -------------------------------------------------------------------------------- /.github/workflows/stage-5_update_version_on_npm.yml: -------------------------------------------------------------------------------- 1 | name: Stage 5 - Update Version on npm 2 | # This workflow updates the version of the stub package on npm when a new tag is pushed. 3 | # It extracts the version from the tag and updates the package.json file accordingly 4 | # before publishing the package to npm. 5 | # It is triggered by the completion of the "Stage 3 - Promote Release Package to APT Stores" workflow. 6 | 7 | on: 8 | workflow_run: 9 | workflows: [Stage 3 - Promote Release Package to APT Stores] 10 | types: 11 | - completed 12 | 13 | jobs: 14 | publish: 15 | name: Publish ${{ github.event.workflow_run.head_branch }} 16 | runs-on: ubuntu-latest 17 | 18 | steps: 19 | - name: Checkout Repo 20 | uses: actions/checkout@v4 21 | 22 | - name: Set up Node.js 23 | uses: actions/setup-node@v4 24 | with: 25 | node-version: latest 26 | registry-url: 'https://registry.npmjs.org' 27 | 28 | - name: Extract and validate version from tag 29 | id: version 30 | run: | 31 | RAW_TAG="${{ github.event.workflow_run.head_branch }}" 32 | if [[ "$RAW_TAG" =~ ^v([0-9]+\.[0-9]+\.[0-9]+.*)$ ]]; then 33 | CLEAN_VERSION="${BASH_REMATCH[1]}" 34 | echo "CLEAN_VERSION=$CLEAN_VERSION" >> "$GITHUB_ENV" 35 | else 36 | echo "::error::Invalid tag format: '$RAW_TAG'. Expected format 'v1.2.3'" 37 | exit 1 38 | fi 39 | 40 | - name: Set package.json version 41 | run: | 42 | echo "Setting version to $CLEAN_VERSION" 43 | jq ".version = \"$CLEAN_VERSION\"" package.json > tmp.$$.json && mv tmp.$$.json package.json 44 | cat package.json 45 | 46 | - name: Publish to npm 47 | run: npm publish --access public 48 | env: 49 | NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} 50 | 51 | - name: Output Success Notice 52 | run: echo "::notice::Published @homebridge/homebridge-apt-pkg as version $CLEAN_VERSION" 53 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | name: Stale workflow 2 | 3 | on: 4 | workflow_dispatch: 5 | schedule: 6 | - cron: '30 1 * * *' 7 | 8 | jobs: 9 | stale: 10 | uses: homebridge/.github/.github/workflows/stale.yml@latest 11 | secrets: 12 | token: ${{ secrets.GITHUB_TOKEN }} 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.tar.gz 2 | *.tar.xz 3 | *.deb 4 | *.buildinfo 5 | *.changes 6 | *.dsc 7 | .pnpm-debug.log 8 | Packages 9 | Release 10 | staging/ 11 | .DS_Store 12 | /node_modules 13 | *.manifest 14 | *.tgz 15 | /beta/node_modules 16 | -------------------------------------------------------------------------------- /.npmignore: -------------------------------------------------------------------------------- 1 | # Just a stub package.json to prevent npm from publishing this directory 2 | * 3 | !package.json 4 | !.npmignore 5 | !README.md -------------------------------------------------------------------------------- /BUILD.md: -------------------------------------------------------------------------------- 1 | # Release workflow to Publish a refreshed homebridge-apt-pkg 2 | 3 | ## High Level Workflow to Trigger a Release 4 | 5 | 1. Approve and merge Dependabot Pull Request ( triggers Stage 1 then 2 ) 6 | 2. Wait about an hour for builds and validation to occur. 7 | 3. Change Prerelease to Release and set status as Latest ( triggers Stage 3 then 4 ) 8 | 9 | The package.json dependencies are used to manage the versions used within the release package. And Dependabot watches the versions, and creates a pull request if a version needs updating. Nothing else in package.json is used. If you manually update the dependencies, package-lock.json also needs updating. 10 | 11 | Then once a change is made to package.json in the latest branch, originated by Depandabot, the stage 1 workflow will kick off. 12 | 13 | Release TAG is created by `reecetech/version-increment`, and is configured to increment the patch level every time, and not based on the package.json. To release a minor or major release, the manual workflow dispatch must be used, and package.json/package-lock.json manually updated. 14 | 15 | ## Actions 16 | 17 | ### Stage 1 - Create a pre-release and build APT package 18 | >Average Execution time: Approx 40 minutes 19 | 20 | This job is triggered when package.json is updated on the latest branch, and the author of the change is dependabot. 21 | 22 | 1. Determine release version based on either manual workflow input or the latest release. 23 | 2. Build apt packages for x86_64, Arm ( RPI 32 bit), and aarch64 ( RPI 64 bit ). 24 | 3. Apt packages are stored as an artifact against the workflow. 25 | 4. Create a Pre-Release, and attach the artifacts. 26 | 27 | ### Stage 2 - Pre-Release Validation Workflow 28 | >Average Execution time: Approx 5 minutes 29 | 30 | This job is triggered by the the publishing of a prerelease or the completion of the stage 1 workflow.. 31 | 32 | 1. This job checks that 3 apt packages are attached to the release ( x86_64, Arm ( RPI 32 bit), and aarch64 ( RPI 64 bit )). 33 | 2. That the homebridge_*_amd64.deb apt package can be installed, and that homebridge starts. 34 | 35 | ### Stage 3 - Promote Release Package to APT Stores 36 | >Average Execution time: Approx 5 minutes 37 | 38 | This job is triggered by the changing of the Release status from `pre-release` to `released`. Changing the prerelease to release is a manual step. 39 | 40 | 1. Release assets are downloaded from the latest release 41 | 2. Assets are promoted to `repo.homebridge.io` 42 | 3. Cloud flare cache is purged 43 | 44 | ### Stage 4 - Post Release Validation 45 | >Average Execution time: Approx 5 minutes 46 | 47 | This job is triggered by the successful completion of step 3 48 | 49 | 1. Download the current homebridge-apt-pkg for x86 and install. 50 | 2. Check that homebridge starts -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | GNU GENERAL PUBLIC LICENSE 2 | Version 3, 29 June 2007 3 | 4 | Copyright (C) 2007 Free Software Foundation, Inc. 5 | Everyone is permitted to copy and distribute verbatim copies 6 | of this license document, but changing it is not allowed. 7 | 8 | Preamble 9 | 10 | The GNU General Public License is a free, copyleft license for 11 | software and other kinds of works. 12 | 13 | The licenses for most software and other practical works are designed 14 | to take away your freedom to share and change the works. By contrast, 15 | the GNU General Public License is intended to guarantee your freedom to 16 | share and change all versions of a program--to make sure it remains free 17 | software for all its users. We, the Free Software Foundation, use the 18 | GNU General Public License for most of our software; it applies also to 19 | any other work released this way by its authors. You can apply it to 20 | your programs, too. 21 | 22 | When we speak of free software, we are referring to freedom, not 23 | price. Our General Public Licenses are designed to make sure that you 24 | have the freedom to distribute copies of free software (and charge for 25 | them if you wish), that you receive source code or can get it if you 26 | want it, that you can change the software or use pieces of it in new 27 | free programs, and that you know you can do these things. 28 | 29 | To protect your rights, we need to prevent others from denying you 30 | these rights or asking you to surrender the rights. Therefore, you have 31 | certain responsibilities if you distribute copies of the software, or if 32 | you modify it: responsibilities to respect the freedom of others. 33 | 34 | For example, if you distribute copies of such a program, whether 35 | gratis or for a fee, you must pass on to the recipients the same 36 | freedoms that you received. You must make sure that they, too, receive 37 | or can get the source code. And you must show them these terms so they 38 | know their rights. 39 | 40 | Developers that use the GNU GPL protect your rights with two steps: 41 | (1) assert copyright on the software, and (2) offer you this License 42 | giving you legal permission to copy, distribute and/or modify it. 43 | 44 | For the developers' and authors' protection, the GPL clearly explains 45 | that there is no warranty for this free software. For both users' and 46 | authors' sake, the GPL requires that modified versions be marked as 47 | changed, so that their problems will not be attributed erroneously to 48 | authors of previous versions. 49 | 50 | Some devices are designed to deny users access to install or run 51 | modified versions of the software inside them, although the manufacturer 52 | can do so. This is fundamentally incompatible with the aim of 53 | protecting users' freedom to change the software. The systematic 54 | pattern of such abuse occurs in the area of products for individuals to 55 | use, which is precisely where it is most unacceptable. Therefore, we 56 | have designed this version of the GPL to prohibit the practice for those 57 | products. If such problems arise substantially in other domains, we 58 | stand ready to extend this provision to those domains in future versions 59 | of the GPL, as needed to protect the freedom of users. 60 | 61 | Finally, every program is threatened constantly by software patents. 62 | States should not allow patents to restrict development and use of 63 | software on general-purpose computers, but in those that do, we wish to 64 | avoid the special danger that patents applied to a free program could 65 | make it effectively proprietary. To prevent this, the GPL assures that 66 | patents cannot be used to render the program non-free. 67 | 68 | The precise terms and conditions for copying, distribution and 69 | modification follow. 70 | 71 | TERMS AND CONDITIONS 72 | 73 | 0. Definitions. 74 | 75 | "This License" refers to version 3 of the GNU General Public License. 76 | 77 | "Copyright" also means copyright-like laws that apply to other kinds of 78 | works, such as semiconductor masks. 79 | 80 | "The Program" refers to any copyrightable work licensed under this 81 | License. Each licensee is addressed as "you". "Licensees" and 82 | "recipients" may be individuals or organizations. 83 | 84 | To "modify" a work means to copy from or adapt all or part of the work 85 | in a fashion requiring copyright permission, other than the making of an 86 | exact copy. The resulting work is called a "modified version" of the 87 | earlier work or a work "based on" the earlier work. 88 | 89 | A "covered work" means either the unmodified Program or a work based 90 | on the Program. 91 | 92 | To "propagate" a work means to do anything with it that, without 93 | permission, would make you directly or secondarily liable for 94 | infringement under applicable copyright law, except executing it on a 95 | computer or modifying a private copy. Propagation includes copying, 96 | distribution (with or without modification), making available to the 97 | public, and in some countries other activities as well. 98 | 99 | To "convey" a work means any kind of propagation that enables other 100 | parties to make or receive copies. Mere interaction with a user through 101 | a computer network, with no transfer of a copy, is not conveying. 102 | 103 | An interactive user interface displays "Appropriate Legal Notices" 104 | to the extent that it includes a convenient and prominently visible 105 | feature that (1) displays an appropriate copyright notice, and (2) 106 | tells the user that there is no warranty for the work (except to the 107 | extent that warranties are provided), that licensees may convey the 108 | work under this License, and how to view a copy of this License. If 109 | the interface presents a list of user commands or options, such as a 110 | menu, a prominent item in the list meets this criterion. 111 | 112 | 1. Source Code. 113 | 114 | The "source code" for a work means the preferred form of the work 115 | for making modifications to it. "Object code" means any non-source 116 | form of a work. 117 | 118 | A "Standard Interface" means an interface that either is an official 119 | standard defined by a recognized standards body, or, in the case of 120 | interfaces specified for a particular programming language, one that 121 | is widely used among developers working in that language. 122 | 123 | The "System Libraries" of an executable work include anything, other 124 | than the work as a whole, that (a) is included in the normal form of 125 | packaging a Major Component, but which is not part of that Major 126 | Component, and (b) serves only to enable use of the work with that 127 | Major Component, or to implement a Standard Interface for which an 128 | implementation is available to the public in source code form. A 129 | "Major Component", in this context, means a major essential component 130 | (kernel, window system, and so on) of the specific operating system 131 | (if any) on which the executable work runs, or a compiler used to 132 | produce the work, or an object code interpreter used to run it. 133 | 134 | The "Corresponding Source" for a work in object code form means all 135 | the source code needed to generate, install, and (for an executable 136 | work) run the object code and to modify the work, including scripts to 137 | control those activities. However, it does not include the work's 138 | System Libraries, or general-purpose tools or generally available free 139 | programs which are used unmodified in performing those activities but 140 | which are not part of the work. For example, Corresponding Source 141 | includes interface definition files associated with source files for 142 | the work, and the source code for shared libraries and dynamically 143 | linked subprograms that the work is specifically designed to require, 144 | such as by intimate data communication or control flow between those 145 | subprograms and other parts of the work. 146 | 147 | The Corresponding Source need not include anything that users 148 | can regenerate automatically from other parts of the Corresponding 149 | Source. 150 | 151 | The Corresponding Source for a work in source code form is that 152 | same work. 153 | 154 | 2. Basic Permissions. 155 | 156 | All rights granted under this License are granted for the term of 157 | copyright on the Program, and are irrevocable provided the stated 158 | conditions are met. This License explicitly affirms your unlimited 159 | permission to run the unmodified Program. The output from running a 160 | covered work is covered by this License only if the output, given its 161 | content, constitutes a covered work. This License acknowledges your 162 | rights of fair use or other equivalent, as provided by copyright law. 163 | 164 | You may make, run and propagate covered works that you do not 165 | convey, without conditions so long as your license otherwise remains 166 | in force. You may convey covered works to others for the sole purpose 167 | of having them make modifications exclusively for you, or provide you 168 | with facilities for running those works, provided that you comply with 169 | the terms of this License in conveying all material for which you do 170 | not control copyright. Those thus making or running the covered works 171 | for you must do so exclusively on your behalf, under your direction 172 | and control, on terms that prohibit them from making any copies of 173 | your copyrighted material outside their relationship with you. 174 | 175 | Conveying under any other circumstances is permitted solely under 176 | the conditions stated below. Sublicensing is not allowed; section 10 177 | makes it unnecessary. 178 | 179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 180 | 181 | No covered work shall be deemed part of an effective technological 182 | measure under any applicable law fulfilling obligations under article 183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 184 | similar laws prohibiting or restricting circumvention of such 185 | measures. 186 | 187 | When you convey a covered work, you waive any legal power to forbid 188 | circumvention of technological measures to the extent such circumvention 189 | is effected by exercising rights under this License with respect to 190 | the covered work, and you disclaim any intention to limit operation or 191 | modification of the work as a means of enforcing, against the work's 192 | users, your or third parties' legal rights to forbid circumvention of 193 | technological measures. 194 | 195 | 4. Conveying Verbatim Copies. 196 | 197 | You may convey verbatim copies of the Program's source code as you 198 | receive it, in any medium, provided that you conspicuously and 199 | appropriately publish on each copy an appropriate copyright notice; 200 | keep intact all notices stating that this License and any 201 | non-permissive terms added in accord with section 7 apply to the code; 202 | keep intact all notices of the absence of any warranty; and give all 203 | recipients a copy of this License along with the Program. 204 | 205 | You may charge any price or no price for each copy that you convey, 206 | and you may offer support or warranty protection for a fee. 207 | 208 | 5. Conveying Modified Source Versions. 209 | 210 | You may convey a work based on the Program, or the modifications to 211 | produce it from the Program, in the form of source code under the 212 | terms of section 4, provided that you also meet all of these conditions: 213 | 214 | a) The work must carry prominent notices stating that you modified 215 | it, and giving a relevant date. 216 | 217 | b) The work must carry prominent notices stating that it is 218 | released under this License and any conditions added under section 219 | 7. This requirement modifies the requirement in section 4 to 220 | "keep intact all notices". 221 | 222 | c) You must license the entire work, as a whole, under this 223 | License to anyone who comes into possession of a copy. This 224 | License will therefore apply, along with any applicable section 7 225 | additional terms, to the whole of the work, and all its parts, 226 | regardless of how they are packaged. This License gives no 227 | permission to license the work in any other way, but it does not 228 | invalidate such permission if you have separately received it. 229 | 230 | d) If the work has interactive user interfaces, each must display 231 | Appropriate Legal Notices; however, if the Program has interactive 232 | interfaces that do not display Appropriate Legal Notices, your 233 | work need not make them do so. 234 | 235 | A compilation of a covered work with other separate and independent 236 | works, which are not by their nature extensions of the covered work, 237 | and which are not combined with it such as to form a larger program, 238 | in or on a volume of a storage or distribution medium, is called an 239 | "aggregate" if the compilation and its resulting copyright are not 240 | used to limit the access or legal rights of the compilation's users 241 | beyond what the individual works permit. Inclusion of a covered work 242 | in an aggregate does not cause this License to apply to the other 243 | parts of the aggregate. 244 | 245 | 6. Conveying Non-Source Forms. 246 | 247 | You may convey a covered work in object code form under the terms 248 | of sections 4 and 5, provided that you also convey the 249 | machine-readable Corresponding Source under the terms of this License, 250 | in one of these ways: 251 | 252 | a) Convey the object code in, or embodied in, a physical product 253 | (including a physical distribution medium), accompanied by the 254 | Corresponding Source fixed on a durable physical medium 255 | customarily used for software interchange. 256 | 257 | b) Convey the object code in, or embodied in, a physical product 258 | (including a physical distribution medium), accompanied by a 259 | written offer, valid for at least three years and valid for as 260 | long as you offer spare parts or customer support for that product 261 | model, to give anyone who possesses the object code either (1) a 262 | copy of the Corresponding Source for all the software in the 263 | product that is covered by this License, on a durable physical 264 | medium customarily used for software interchange, for a price no 265 | more than your reasonable cost of physically performing this 266 | conveying of source, or (2) access to copy the 267 | Corresponding Source from a network server at no charge. 268 | 269 | c) Convey individual copies of the object code with a copy of the 270 | written offer to provide the Corresponding Source. This 271 | alternative is allowed only occasionally and noncommercially, and 272 | only if you received the object code with such an offer, in accord 273 | with subsection 6b. 274 | 275 | d) Convey the object code by offering access from a designated 276 | place (gratis or for a charge), and offer equivalent access to the 277 | Corresponding Source in the same way through the same place at no 278 | further charge. You need not require recipients to copy the 279 | Corresponding Source along with the object code. If the place to 280 | copy the object code is a network server, the Corresponding Source 281 | may be on a different server (operated by you or a third party) 282 | that supports equivalent copying facilities, provided you maintain 283 | clear directions next to the object code saying where to find the 284 | Corresponding Source. Regardless of what server hosts the 285 | Corresponding Source, you remain obligated to ensure that it is 286 | available for as long as needed to satisfy these requirements. 287 | 288 | e) Convey the object code using peer-to-peer transmission, provided 289 | you inform other peers where the object code and Corresponding 290 | Source of the work are being offered to the general public at no 291 | charge under subsection 6d. 292 | 293 | A separable portion of the object code, whose source code is excluded 294 | from the Corresponding Source as a System Library, need not be 295 | included in conveying the object code work. 296 | 297 | A "User Product" is either (1) a "consumer product", which means any 298 | tangible personal property which is normally used for personal, family, 299 | or household purposes, or (2) anything designed or sold for incorporation 300 | into a dwelling. In determining whether a product is a consumer product, 301 | doubtful cases shall be resolved in favor of coverage. For a particular 302 | product received by a particular user, "normally used" refers to a 303 | typical or common use of that class of product, regardless of the status 304 | of the particular user or of the way in which the particular user 305 | actually uses, or expects or is expected to use, the product. A product 306 | is a consumer product regardless of whether the product has substantial 307 | commercial, industrial or non-consumer uses, unless such uses represent 308 | the only significant mode of use of the product. 309 | 310 | "Installation Information" for a User Product means any methods, 311 | procedures, authorization keys, or other information required to install 312 | and execute modified versions of a covered work in that User Product from 313 | a modified version of its Corresponding Source. The information must 314 | suffice to ensure that the continued functioning of the modified object 315 | code is in no case prevented or interfered with solely because 316 | modification has been made. 317 | 318 | If you convey an object code work under this section in, or with, or 319 | specifically for use in, a User Product, and the conveying occurs as 320 | part of a transaction in which the right of possession and use of the 321 | User Product is transferred to the recipient in perpetuity or for a 322 | fixed term (regardless of how the transaction is characterized), the 323 | Corresponding Source conveyed under this section must be accompanied 324 | by the Installation Information. But this requirement does not apply 325 | if neither you nor any third party retains the ability to install 326 | modified object code on the User Product (for example, the work has 327 | been installed in ROM). 328 | 329 | The requirement to provide Installation Information does not include a 330 | requirement to continue to provide support service, warranty, or updates 331 | for a work that has been modified or installed by the recipient, or for 332 | the User Product in which it has been modified or installed. Access to a 333 | network may be denied when the modification itself materially and 334 | adversely affects the operation of the network or violates the rules and 335 | protocols for communication across the network. 336 | 337 | Corresponding Source conveyed, and Installation Information provided, 338 | in accord with this section must be in a format that is publicly 339 | documented (and with an implementation available to the public in 340 | source code form), and must require no special password or key for 341 | unpacking, reading or copying. 342 | 343 | 7. Additional Terms. 344 | 345 | "Additional permissions" are terms that supplement the terms of this 346 | License by making exceptions from one or more of its conditions. 347 | Additional permissions that are applicable to the entire Program shall 348 | be treated as though they were included in this License, to the extent 349 | that they are valid under applicable law. If additional permissions 350 | apply only to part of the Program, that part may be used separately 351 | under those permissions, but the entire Program remains governed by 352 | this License without regard to the additional permissions. 353 | 354 | When you convey a copy of a covered work, you may at your option 355 | remove any additional permissions from that copy, or from any part of 356 | it. (Additional permissions may be written to require their own 357 | removal in certain cases when you modify the work.) You may place 358 | additional permissions on material, added by you to a covered work, 359 | for which you have or can give appropriate copyright permission. 360 | 361 | Notwithstanding any other provision of this License, for material you 362 | add to a covered work, you may (if authorized by the copyright holders of 363 | that material) supplement the terms of this License with terms: 364 | 365 | a) Disclaiming warranty or limiting liability differently from the 366 | terms of sections 15 and 16 of this License; or 367 | 368 | b) Requiring preservation of specified reasonable legal notices or 369 | author attributions in that material or in the Appropriate Legal 370 | Notices displayed by works containing it; or 371 | 372 | c) Prohibiting misrepresentation of the origin of that material, or 373 | requiring that modified versions of such material be marked in 374 | reasonable ways as different from the original version; or 375 | 376 | d) Limiting the use for publicity purposes of names of licensors or 377 | authors of the material; or 378 | 379 | e) Declining to grant rights under trademark law for use of some 380 | trade names, trademarks, or service marks; or 381 | 382 | f) Requiring indemnification of licensors and authors of that 383 | material by anyone who conveys the material (or modified versions of 384 | it) with contractual assumptions of liability to the recipient, for 385 | any liability that these contractual assumptions directly impose on 386 | those licensors and authors. 387 | 388 | All other non-permissive additional terms are considered "further 389 | restrictions" within the meaning of section 10. If the Program as you 390 | received it, or any part of it, contains a notice stating that it is 391 | governed by this License along with a term that is a further 392 | restriction, you may remove that term. If a license document contains 393 | a further restriction but permits relicensing or conveying under this 394 | License, you may add to a covered work material governed by the terms 395 | of that license document, provided that the further restriction does 396 | not survive such relicensing or conveying. 397 | 398 | If you add terms to a covered work in accord with this section, you 399 | must place, in the relevant source files, a statement of the 400 | additional terms that apply to those files, or a notice indicating 401 | where to find the applicable terms. 402 | 403 | Additional terms, permissive or non-permissive, may be stated in the 404 | form of a separately written license, or stated as exceptions; 405 | the above requirements apply either way. 406 | 407 | 8. Termination. 408 | 409 | You may not propagate or modify a covered work except as expressly 410 | provided under this License. Any attempt otherwise to propagate or 411 | modify it is void, and will automatically terminate your rights under 412 | this License (including any patent licenses granted under the third 413 | paragraph of section 11). 414 | 415 | However, if you cease all violation of this License, then your 416 | license from a particular copyright holder is reinstated (a) 417 | provisionally, unless and until the copyright holder explicitly and 418 | finally terminates your license, and (b) permanently, if the copyright 419 | holder fails to notify you of the violation by some reasonable means 420 | prior to 60 days after the cessation. 421 | 422 | Moreover, your license from a particular copyright holder is 423 | reinstated permanently if the copyright holder notifies you of the 424 | violation by some reasonable means, this is the first time you have 425 | received notice of violation of this License (for any work) from that 426 | copyright holder, and you cure the violation prior to 30 days after 427 | your receipt of the notice. 428 | 429 | Termination of your rights under this section does not terminate the 430 | licenses of parties who have received copies or rights from you under 431 | this License. If your rights have been terminated and not permanently 432 | reinstated, you do not qualify to receive new licenses for the same 433 | material under section 10. 434 | 435 | 9. Acceptance Not Required for Having Copies. 436 | 437 | You are not required to accept this License in order to receive or 438 | run a copy of the Program. Ancillary propagation of a covered work 439 | occurring solely as a consequence of using peer-to-peer transmission 440 | to receive a copy likewise does not require acceptance. However, 441 | nothing other than this License grants you permission to propagate or 442 | modify any covered work. These actions infringe copyright if you do 443 | not accept this License. Therefore, by modifying or propagating a 444 | covered work, you indicate your acceptance of this License to do so. 445 | 446 | 10. Automatic Licensing of Downstream Recipients. 447 | 448 | Each time you convey a covered work, the recipient automatically 449 | receives a license from the original licensors, to run, modify and 450 | propagate that work, subject to this License. You are not responsible 451 | for enforcing compliance by third parties with this License. 452 | 453 | An "entity transaction" is a transaction transferring control of an 454 | organization, or substantially all assets of one, or subdividing an 455 | organization, or merging organizations. If propagation of a covered 456 | work results from an entity transaction, each party to that 457 | transaction who receives a copy of the work also receives whatever 458 | licenses to the work the party's predecessor in interest had or could 459 | give under the previous paragraph, plus a right to possession of the 460 | Corresponding Source of the work from the predecessor in interest, if 461 | the predecessor has it or can get it with reasonable efforts. 462 | 463 | You may not impose any further restrictions on the exercise of the 464 | rights granted or affirmed under this License. For example, you may 465 | not impose a license fee, royalty, or other charge for exercise of 466 | rights granted under this License, and you may not initiate litigation 467 | (including a cross-claim or counterclaim in a lawsuit) alleging that 468 | any patent claim is infringed by making, using, selling, offering for 469 | sale, or importing the Program or any portion of it. 470 | 471 | 11. Patents. 472 | 473 | A "contributor" is a copyright holder who authorizes use under this 474 | License of the Program or a work on which the Program is based. The 475 | work thus licensed is called the contributor's "contributor version". 476 | 477 | A contributor's "essential patent claims" are all patent claims 478 | owned or controlled by the contributor, whether already acquired or 479 | hereafter acquired, that would be infringed by some manner, permitted 480 | by this License, of making, using, or selling its contributor version, 481 | but do not include claims that would be infringed only as a 482 | consequence of further modification of the contributor version. For 483 | purposes of this definition, "control" includes the right to grant 484 | patent sublicenses in a manner consistent with the requirements of 485 | this License. 486 | 487 | Each contributor grants you a non-exclusive, worldwide, royalty-free 488 | patent license under the contributor's essential patent claims, to 489 | make, use, sell, offer for sale, import and otherwise run, modify and 490 | propagate the contents of its contributor version. 491 | 492 | In the following three paragraphs, a "patent license" is any express 493 | agreement or commitment, however denominated, not to enforce a patent 494 | (such as an express permission to practice a patent or covenant not to 495 | sue for patent infringement). To "grant" such a patent license to a 496 | party means to make such an agreement or commitment not to enforce a 497 | patent against the party. 498 | 499 | If you convey a covered work, knowingly relying on a patent license, 500 | and the Corresponding Source of the work is not available for anyone 501 | to copy, free of charge and under the terms of this License, through a 502 | publicly available network server or other readily accessible means, 503 | then you must either (1) cause the Corresponding Source to be so 504 | available, or (2) arrange to deprive yourself of the benefit of the 505 | patent license for this particular work, or (3) arrange, in a manner 506 | consistent with the requirements of this License, to extend the patent 507 | license to downstream recipients. "Knowingly relying" means you have 508 | actual knowledge that, but for the patent license, your conveying the 509 | covered work in a country, or your recipient's use of the covered work 510 | in a country, would infringe one or more identifiable patents in that 511 | country that you have reason to believe are valid. 512 | 513 | If, pursuant to or in connection with a single transaction or 514 | arrangement, you convey, or propagate by procuring conveyance of, a 515 | covered work, and grant a patent license to some of the parties 516 | receiving the covered work authorizing them to use, propagate, modify 517 | or convey a specific copy of the covered work, then the patent license 518 | you grant is automatically extended to all recipients of the covered 519 | work and works based on it. 520 | 521 | A patent license is "discriminatory" if it does not include within 522 | the scope of its coverage, prohibits the exercise of, or is 523 | conditioned on the non-exercise of one or more of the rights that are 524 | specifically granted under this License. You may not convey a covered 525 | work if you are a party to an arrangement with a third party that is 526 | in the business of distributing software, under which you make payment 527 | to the third party based on the extent of your activity of conveying 528 | the work, and under which the third party grants, to any of the 529 | parties who would receive the covered work from you, a discriminatory 530 | patent license (a) in connection with copies of the covered work 531 | conveyed by you (or copies made from those copies), or (b) primarily 532 | for and in connection with specific products or compilations that 533 | contain the covered work, unless you entered into that arrangement, 534 | or that patent license was granted, prior to 28 March 2007. 535 | 536 | Nothing in this License shall be construed as excluding or limiting 537 | any implied license or other defenses to infringement that may 538 | otherwise be available to you under applicable patent law. 539 | 540 | 12. No Surrender of Others' Freedom. 541 | 542 | If conditions are imposed on you (whether by court order, agreement or 543 | otherwise) that contradict the conditions of this License, they do not 544 | excuse you from the conditions of this License. If you cannot convey a 545 | covered work so as to satisfy simultaneously your obligations under this 546 | License and any other pertinent obligations, then as a consequence you may 547 | not convey it at all. For example, if you agree to terms that obligate you 548 | to collect a royalty for further conveying from those to whom you convey 549 | the Program, the only way you could satisfy both those terms and this 550 | License would be to refrain entirely from conveying the Program. 551 | 552 | 13. Use with the GNU Affero General Public License. 553 | 554 | Notwithstanding any other provision of this License, you have 555 | permission to link or combine any covered work with a work licensed 556 | under version 3 of the GNU Affero General Public License into a single 557 | combined work, and to convey the resulting work. The terms of this 558 | License will continue to apply to the part which is the covered work, 559 | but the special requirements of the GNU Affero General Public License, 560 | section 13, concerning interaction through a network will apply to the 561 | combination as such. 562 | 563 | 14. Revised Versions of this License. 564 | 565 | The Free Software Foundation may publish revised and/or new versions of 566 | the GNU General Public License from time to time. Such new versions will 567 | be similar in spirit to the present version, but may differ in detail to 568 | address new problems or concerns. 569 | 570 | Each version is given a distinguishing version number. If the 571 | Program specifies that a certain numbered version of the GNU General 572 | Public License "or any later version" applies to it, you have the 573 | option of following the terms and conditions either of that numbered 574 | version or of any later version published by the Free Software 575 | Foundation. If the Program does not specify a version number of the 576 | GNU General Public License, you may choose any version ever published 577 | by the Free Software Foundation. 578 | 579 | If the Program specifies that a proxy can decide which future 580 | versions of the GNU General Public License can be used, that proxy's 581 | public statement of acceptance of a version permanently authorizes you 582 | to choose that version for the Program. 583 | 584 | Later license versions may give you additional or different 585 | permissions. However, no additional obligations are imposed on any 586 | author or copyright holder as a result of your choosing to follow a 587 | later version. 588 | 589 | 15. Disclaimer of Warranty. 590 | 591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 599 | 600 | 16. Limitation of Liability. 601 | 602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 610 | SUCH DAMAGES. 611 | 612 | 17. Interpretation of Sections 15 and 16. 613 | 614 | If the disclaimer of warranty and limitation of liability provided 615 | above cannot be given local legal effect according to their terms, 616 | reviewing courts shall apply local law that most closely approximates 617 | an absolute waiver of all civil liability in connection with the 618 | Program, unless a warranty or assumption of liability accompanies a 619 | copy of the Program in return for a fee. 620 | 621 | END OF TERMS AND CONDITIONS 622 | 623 | How to Apply These Terms to Your New Programs 624 | 625 | If you develop a new program, and you want it to be of the greatest 626 | possible use to the public, the best way to achieve this is to make it 627 | free software which everyone can redistribute and change under these terms. 628 | 629 | To do so, attach the following notices to the program. It is safest 630 | to attach them to the start of each source file to most effectively 631 | state the exclusion of warranty; and each file should have at least 632 | the "copyright" line and a pointer to where the full notice is found. 633 | 634 | 635 | Copyright (C) 636 | 637 | This program is free software: you can redistribute it and/or modify 638 | it under the terms of the GNU General Public License as published by 639 | the Free Software Foundation, either version 3 of the License, or 640 | (at your option) any later version. 641 | 642 | This program is distributed in the hope that it will be useful, 643 | but WITHOUT ANY WARRANTY; without even the implied warranty of 644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 645 | GNU General Public License for more details. 646 | 647 | You should have received a copy of the GNU General Public License 648 | along with this program. If not, see . 649 | 650 | Also add information on how to contact you by electronic and paper mail. 651 | 652 | If the program does terminal interaction, make it output a short 653 | notice like this when it starts in an interactive mode: 654 | 655 | Copyright (C) 656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 657 | This is free software, and you are welcome to redistribute it 658 | under certain conditions; type `show c' for details. 659 | 660 | The hypothetical commands `show w' and `show c' should show the appropriate 661 | parts of the General Public License. Of course, your program's commands 662 | might be different; for a GUI interface, you would use an "about box". 663 | 664 | You should also get your employer (if you work as a programmer) or school, 665 | if any, to sign a "copyright disclaimer" for the program, if necessary. 666 | For more information on this, and how to apply and follow the GNU GPL, see 667 | . 668 | 669 | The GNU General Public License does not permit incorporating your program 670 | into proprietary programs. If your program is a subroutine library, you 671 | may consider it more useful to permit linking proprietary applications with 672 | the library. If this is what you want to do, use the GNU Lesser General 673 | Public License instead of this License. But first, please read 674 | . -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Debian Package For Homebridge 2 | 3 | This project builds and publishes a debian-based package that can be installed using `apt` on Ubuntu / Debian / Raspberry Pi OS based Linux systems. 4 | 5 | The project aims to deploy Homebridge and the Homebridge UI in a secure and stable way, with no dependencies outside those available in the standard distribution repos. It comes bundled with it's own Node.js runtime and runs Homebridge in an isolated environment as a service user with no sudo / admin priviledges. 6 | 7 | Supported architectures: 8 | 9 | * x86_64 10 | * armhf ( armv7) 11 | * aarch64 (arm64) 12 | 13 | ## Using APT 14 | 15 | Add package source: 16 | 17 | ```bash 18 | # make sure the tools needed to add the repo exist 19 | sudo apt-get update 20 | sudo apt-get install -y curl gpg 21 | 22 | # add the homebridge gpg key 23 | curl -sSfL https://repo.homebridge.io/KEY.gpg | sudo gpg --dearmor | sudo tee /usr/share/keyrings/homebridge.gpg > /dev/null 24 | 25 | # add the homebridge repo 26 | echo "deb [signed-by=/usr/share/keyrings/homebridge.gpg] https://repo.homebridge.io stable main" | sudo tee /etc/apt/sources.list.d/homebridge.list > /dev/null 27 | ``` 28 | 29 | Update and install: 30 | 31 | ```bash 32 | sudo apt-get update 33 | sudo apt-get install homebridge 34 | ``` 35 | 36 | Remove: 37 | 38 | ``` 39 | sudo apt-get remove homebridge 40 | ``` 41 | 42 | Purge (this will delete `/var/lib/homebridge`): 43 | 44 | ``` 45 | sudo apt-get purge homebridge 46 | ``` 47 | 48 | ## Manual Install 49 | 50 | Download the correct file for your system from https://github.com/homebridge/homebridge-apt-pkg/releases/latest 51 | 52 | ``` 53 | dpkg -i homebridge_x.x.x_xxxx.deb 54 | ``` 55 | 56 | Remove: 57 | 58 | ``` 59 | dpkg --remove homebridge 60 | ``` 61 | 62 | Purge (this will delete `/var/lib/homebridge`): 63 | 64 | ``` 65 | dpkg --purge homebridge 66 | ``` 67 | 68 | ## Updating / Downgrading 69 | 70 | ### To install the latest version 71 | 72 | To update Homebridge, Homebridge UI and NodeJS when installed via this APT package, run: 73 | 74 | ```bash 75 | sudo apt update 76 | sudo apt install homebridge 77 | ``` 78 | 79 | This will upgrade all related components managed by this package. 80 | 81 | ⚠️ Your configuration files and plugins are stored in /var/lib/homebridge and will not be affected by updates. 82 | 83 | ### Downgrading to a previous release 84 | 85 | Downgrading will return NodeJS, Homebridge and the Homebridge UI to the version bundled within the apt package. You can view the release manifest of older versions from this page on GitHub - https://github.com/homebridge/homebridge-apt-pkg/releases 86 | 87 | If you need to install an older version or previous release of Homebridge: 88 | 89 | ```bash 90 | sudo apt update 91 | apt list -a homebridge # Shows available versions 92 | sudo apt install homebridge= 93 | ``` 94 | 95 | NOTE: apt versions do not start with a v, while the verion on GitHub starts with v 96 | ## About 97 | 98 | This package contains a self-contained Node.js installation and environment for Homebridge to run in. 99 | 100 | The bundled Node.js runtime is isolated and not exposed on the default PATH. 101 | 102 | To assist in debugging, a shell command `hb-shell` is added to the default PATH to allow the user to enter the Homebridge Shell Environment. When in the Homebridge Shell, users will have access to `node` and `npm` as they would expect. 103 | 104 | ```shell 105 | # Node.js and package scripts are stored in /opt/homebridge 106 | 107 | /opt/homebridge # This directory is managed by the homebridge apt package and the contents are overwritten during updates 108 | |-- bin 109 | | |-- node 110 | | |-- npm 111 | | |-- npx 112 | |-- lib 113 | | |-- node_modules 114 | | |-- npm 115 | | |-- homebridge-config-ui-x 116 | |-- bashrc 117 | |-- bashrc-hb-shell 118 | |-- CHANGELOG.md 119 | |-- hb-shell 120 | |-- LICENSE 121 | |-- README.md 122 | |-- source.sh 123 | |-- start.sh 124 | 125 | # "hb-shell" command to allow user access to the Homebridge env from the cli 126 | /usr/local/bin # These links are managed by the homebridge apt package and the contents are overwritten during updates 127 | |-- hb-service -> /opt/homebridge/hb-service-shim 128 | |-- hb-shell -> /opt/homebridge/hb-shell 129 | 130 | # homebridge storage directory, plugins are stored in node_modules 131 | /var/lib/homebridge 132 | |-- node_modules 133 | | |-- homebridge 134 | | |-- homebridge-dummy 135 | | |-- homebridge-hue 136 | |-- accessories 137 | |-- persist 138 | |-- config.json 139 | ``` 140 | 141 | ## Customising Homebridge 142 | 143 | ### Environment Variables 144 | 145 | The Homebridge systemd service will automatically load any environment variables defined in `/etc/default/homebridge`. 146 | 147 | This file can be used to customize the behavior of Homebridge or its plugins at runtime. 148 | 149 | After making changes to the file, please use `Restart HB Service & UI` for your changes to be picked up. 150 | 151 | #### Example 152 | 153 | To disable the terminal feature in the Homebridge UI, add the following: 154 | 155 | ```bash 156 | # /etc/default/homebridge 157 | HOMEBRIDGE_CONFIG_UI_TERMINAL=0 158 | ``` 159 | ### Customising the Systemd Service File 160 | 161 | You should not edit the service file included with the package as any changes made here will be overwritten during updates. 162 | 163 | You should use a systemd override file to make any changes. 164 | 165 | To preview the current unit file run: 166 | 167 | ```bash 168 | cat /lib/systemd/system/homebridge.service 169 | ``` 170 | 171 | Use systemctl to create an override file at `/etc/systemd/system/homebridge.service.d/override.conf`: 172 | 173 | ```bash 174 | sudo systemctl edit homebridge 175 | ``` 176 | 177 | Add the config items you want to override. **You should only add the settings you want to change.** 178 | 179 | For example, to change the user the service runs as: 180 | 181 | ```bash 182 | [Service] 183 | User=pi # replace with the user you want to run the service as 184 | ``` 185 | 186 | Or to add additional startup flags to Homebridge: 187 | 188 | ```bash 189 | [Service] 190 | ExecStart= 191 | ExecStart=/opt/homebridge/start.sh -T 192 | ``` 193 | 194 | Or to run as root, and allow the UI to shutdown/restart the host: 195 | 196 | ``` 197 | [Service] 198 | User=root 199 | ExecStart= 200 | ExecStart=/opt/homebridge/start.sh --allow-root 201 | Environment="UIX_CAN_SHUTDOWN_RESTART_HOST=1" 202 | ``` 203 | 204 | Save the file and restart Homebridge: 205 | 206 | ```bash 207 | sudo systemctl restart homebridge 208 | ``` 209 | 210 | To revert any changes run: 211 | 212 | ```bash 213 | sudo systemctl revert homebridge 214 | ``` 215 | 216 | ## Packaging Notes 217 | 218 | Package scripts workflow (preinst, postinst, postrm etc.): 219 | 220 | https://wiki.debian.org/MaintainerScripts 221 | 222 | ## License 223 | 224 | Copyright (C) 2024 homebridge 225 | 226 | This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 227 | 228 | This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the [GNU General Public License](./LICENSE) for more details. 229 | -------------------------------------------------------------------------------- /README.npm.md: -------------------------------------------------------------------------------- 1 | # @homebridge/homebridge-apt-pkg 2 | 3 | This is a **stub package** used to track versions of the Homebridge APT package via npm and Dependabot. 4 | 5 | > **Note:** This package does **not** contain any actual code or binaries. 6 | 7 | ## 🔗 Related Projects 8 | 9 | - 🧩 APT Releases: https://github.com/homebridge/homebridge-apt-pkg/releases 10 | - 🐳 Docker Image: https://github.com/homebridge/docker-homebridge 11 | - 🏠 Homebridge Project: https://homebridge.io 12 | 13 | ## 🛠 Purpose 14 | 15 | This package exists solely to: 16 | - Allow `dependabot` to track version updates via GitHub Releases. 17 | - Help downstream projects automate version syncing (e.g., Docker builds). 18 | 19 | --- 20 | 21 | -------------------------------------------------------------------------------- /beta/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@homebridge/homebridge-apt-pkg-beta", 3 | "version": "0.0.0", 4 | "description": "Stub package for tracking BETA Homebridge APT release versions via npm", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1", 7 | "prepublishOnly": "cp README.npm.md README.md", 8 | "postpublish": "git restore README.md || true" 9 | }, 10 | "files": [ 11 | "README.md" 12 | ], 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/homebridge/homebridge-apt-pkg.git" 16 | }, 17 | "author": "Homebridge", 18 | "license": "ISC", 19 | "bugs": { 20 | "url": "https://github.com/homebridge/homebridge-apt-pkg/issues" 21 | }, 22 | "homepage": "https://github.com/homebridge/homebridge-apt-pkg#readme", 23 | "private": false, 24 | "dependencies": { 25 | "homebridge": "1.9.0-beta.14", 26 | "homebridge-config-ui-x": "5.0.0-beta.78", 27 | "node": "^22.16.0" 28 | } 29 | } -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | set -x 5 | 6 | # Determine if beta or stable config should be used 7 | if [[ "$PKG_RELEASE_TYPE" == "beta" ]]; then 8 | PACKAGE_JSON_PATH="beta/package.json" 9 | else 10 | PACKAGE_JSON_PATH="package.json" 11 | fi 12 | 13 | echo "🔧 Using $PACKAGE_JSON_PATH for version resolution" 14 | 15 | # Update changelog if version info is present 16 | if [[ -n "${PKG_RELEASE_TYPE}" && -n "${PKG_RELEASE_VERSION}" ]]; then 17 | cd deb 18 | DISTRO="$PKG_RELEASE_TYPE" 19 | if [ "$PKG_RELEASE_TYPE" != "stable" ]; then 20 | DISTRO="UNRELEASED" 21 | fi 22 | dch -b -v "$PKG_RELEASE_VERSION" --controlmaint "Automated Release" --distribution "$DISTRO" "Automated release for $PKG_RELEASE_VERSION" 23 | cd .. 24 | fi 25 | 26 | rm -rf staging 27 | cp -R deb staging 28 | 29 | NODE_VERSION=$(jq -r '.dependencies.node | gsub("^\\^"; "v")' "$PACKAGE_JSON_PATH") 30 | HOMEBRIDGE_VERSION=$(jq -r '.dependencies["homebridge"]' "$PACKAGE_JSON_PATH") 31 | HOMEBRIDGE_UIX_VERSION=$(jq -r '.dependencies["homebridge-config-ui-x"]' "$PACKAGE_JSON_PATH") 32 | 33 | BUILD_ARCH=${QEMU_ARCH:-x86_64} 34 | case "$BUILD_ARCH" in 35 | x86_64) NODE_ARCH='x64' ;; 36 | arm) NODE_ARCH='armv7l' ;; 37 | aarch64) NODE_ARCH='arm64' ;; 38 | i386) NODE_ARCH='x86' ;; 39 | *) echo "unsupported architecture"; exit 1 ;; 40 | esac 41 | 42 | MANIFEST="homebridge_apt_pkg_$NODE_ARCH.manifest" 43 | echo "Homebridge Apt Package Manifest" > "$MANIFEST" 44 | echo >> "$MANIFEST" 45 | echo "**Release Version**: ${PKG_RELEASE_VERSION:-unknown}" >> "$MANIFEST" 46 | echo "**Release Type**: ${PKG_RELEASE_TYPE:-stable}" >> "$MANIFEST" 47 | echo >> "$MANIFEST" 48 | echo "| Package | Version |" >> "$MANIFEST" 49 | echo "|:-------:|:-------:|" >> "$MANIFEST" 50 | echo "|NodeJS| $NODE_VERSION |" >> "$MANIFEST" 51 | 52 | # Download and unpack NodeJS binary 53 | if [ ! -f "node-$NODE_VERSION-linux-$NODE_ARCH.tar.gz" ]; then 54 | if [[ "$NODE_ARCH" == "armv6l" || "$NODE_ARCH" == "x86" ]]; then 55 | curl -SLO "https://unofficial-builds.nodejs.org/download/release/$NODE_VERSION/node-$NODE_VERSION-linux-$NODE_ARCH.tar.gz" 56 | else 57 | curl -SLO "https://nodejs.org/dist/$NODE_VERSION/node-$NODE_VERSION-linux-$NODE_ARCH.tar.gz" 58 | fi 59 | fi 60 | tar xzf "node-$NODE_VERSION-linux-$NODE_ARCH.tar.gz" -C staging/opt/homebridge/ --strip-components=1 --no-same-owner 61 | 62 | PATH="$(pwd)/staging/opt/homebridge/bin:$PATH" 63 | 64 | export npm_config_prefix=$(pwd)/staging/opt/homebridge 65 | export npm_config_global_style=true 66 | export npm_config_package_lock=false 67 | export npm_config_audit=false 68 | export npm_config_fund=false 69 | export npm_config_update_notifier=false 70 | export npm_config_auto_install_peers=true 71 | export npm_config_loglevel=error 72 | 73 | # Install packages 74 | npm install --location=global homebridge-config-ui-x@$HOMEBRIDGE_UIX_VERSION 75 | echo "|Homebridge-Config-UI-X| $HOMEBRIDGE_UIX_VERSION |" >> "$MANIFEST" 76 | 77 | npm install --prefix "$(pwd)/staging/var/lib/homebridge" homebridge@$HOMEBRIDGE_VERSION 78 | echo "|Homebridge| $HOMEBRIDGE_VERSION |" >> "$MANIFEST" 79 | 80 | # Build .deb 81 | cd staging 82 | dpkg-buildpackage -us -uc 83 | cd .. 84 | 85 | # Finalize manifest name 86 | FINAL_MANIFEST=$(ls homebridge*.deb | sed -e 's/.deb/.manifest/') 87 | mv "$MANIFEST" "$FINAL_MANIFEST" 88 | -------------------------------------------------------------------------------- /build/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BASE_IMAGE 2 | FROM ${BASE_IMAGE:-library/debian:bullseye} 3 | 4 | ARG QEMU_ARCH 5 | ENV QEMU_ARCH=${QEMU_ARCH:-x86_64} S6_KEEP_ENV=1 6 | 7 | COPY build/qemu/qemu-${QEMU_ARCH}-static /usr/bin/ 8 | 9 | RUN apt-get update && \ 10 | apt-get install -y build-essential debhelper debhelper dh-make devscripts jq 11 | 12 | WORKDIR /repo 13 | 14 | CMD [ "/repo/build.sh" ] 15 | -------------------------------------------------------------------------------- /build/qemu/qemu-aarch64-static: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homebridge/homebridge-apt-pkg/80118bee1585e7a935258cc3c8cc47f8921a8777/build/qemu/qemu-aarch64-static -------------------------------------------------------------------------------- /build/qemu/qemu-arm-static: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homebridge/homebridge-apt-pkg/80118bee1585e7a935258cc3c8cc47f8921a8777/build/qemu/qemu-arm-static -------------------------------------------------------------------------------- /build/qemu/qemu-i386-static: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homebridge/homebridge-apt-pkg/80118bee1585e7a935258cc3c8cc47f8921a8777/build/qemu/qemu-i386-static -------------------------------------------------------------------------------- /build/qemu/qemu-x86_64-static: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/homebridge/homebridge-apt-pkg/80118bee1585e7a935258cc3c8cc47f8921a8777/build/qemu/qemu-x86_64-static -------------------------------------------------------------------------------- /deb/debian/changelog: -------------------------------------------------------------------------------- 1 | homebridge (1.0.0) UNRELEASED; urgency=medium 2 | 3 | * Automated Release 4 | 5 | -- oznu Mon, 25 Apr 2022 05:56:38 +0000 6 | -------------------------------------------------------------------------------- /deb/debian/compat: -------------------------------------------------------------------------------- 1 | 10 -------------------------------------------------------------------------------- /deb/debian/control: -------------------------------------------------------------------------------- 1 | Source: homebridge 2 | Section: test 3 | Priority: optional 4 | Maintainer: NorthernMan54 5 | Build-Depends: debhelper (>= 9.20160709) | dh-systemd 6 | Standards-Version: 4.0.0 7 | 8 | Package: homebridge 9 | Pre-Depends: libc6 (>= 2.31), jq (>= 1.4), openssl, psmisc, make, gcc, g++, python3, net-tools, python3-venv, python3-dev 10 | Architecture: any 11 | Description: HomeKit support for the impatient. 12 | Homepage: http://homebridge.io -------------------------------------------------------------------------------- /deb/debian/homebridge.install: -------------------------------------------------------------------------------- 1 | var/lib/homebridge var/lib 2 | var/lib/polkit-1/localauthority/10-vendor.d/homebridge.pkla var/lib/polkit-1/localauthority/10-vendor.d 3 | usr/share/polkit-1/rules.d/homebridge.rules usr/share/polkit-1/rules.d 4 | opt/homebridge opt 5 | etc/hb-service etc 6 | -------------------------------------------------------------------------------- /deb/debian/homebridge.service: -------------------------------------------------------------------------------- 1 | [Unit] 2 | Description=Homebridge 3 | Wants=network-online.target 4 | After=syslog.target network-online.target 5 | 6 | [Service] 7 | Type=simple 8 | User=homebridge 9 | EnvironmentFile=-/etc/default/homebridge 10 | SupplementaryGroups=homebridge 11 | PermissionsStartOnly=true 12 | WorkingDirectory=/var/lib/homebridge 13 | ExecStartPre=-/bin/run-parts /etc/hb-service/homebridge/prestart.d 14 | ExecStart=/opt/homebridge/start.sh 15 | Restart=always 16 | RestartSec=3 17 | KillMode=process 18 | AmbientCapabilities=CAP_NET_BIND_SERVICE CAP_NET_RAW CAP_NET_ADMIN 19 | 20 | [Install] 21 | WantedBy=multi-user.target 22 | -------------------------------------------------------------------------------- /deb/debian/postinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # post-install and post-upgrade 4 | if [ "$1" = "configure" ]; then 5 | # stop homebridge.service if it is running 6 | if systemctl is-active --quiet homebridge.service; then 7 | echo "Stopping Homebridge service..." 8 | systemctl stop homebridge.service 2> /dev/null 9 | fi 10 | fi 11 | 12 | # post-upgrade only 13 | if [ "$1" = "configure" ] && [ $2 ]; then 14 | true 15 | fi 16 | 17 | if [ "$1" = "configure" ] && [ -f /tmp/homebridge-tmp/package.json ] && [ -f /var/lib/homebridge/package.json ]; then 18 | echo "Merging package.json file..." 19 | 20 | # enter homebridge env 21 | . "/opt/homebridge/source.sh" 22 | 23 | # merge the new package.json into the old one, and save 24 | PACKAGE_JSON=$(jq -M -s '.[0] * .[1]' /tmp/homebridge-tmp/package.json /var/lib/homebridge/package.json) > /var/lib/homebridge/package.json 25 | if [ "$?" = "0" ]; then 26 | echo $PACKAGE_JSON | jq '.' > /var/lib/homebridge/package.json 27 | fi 28 | 29 | # remove the package-lock.json 30 | if [ -e /var/lib/homebridge/package-lock.json ]; then 31 | rm -rf /var/lib/homebridge/package-lock.json 32 | fi 33 | 34 | # remove homebridge-config-ui-x from the package.json 35 | if [ -e /var/lib/homebridge/package.json ]; then 36 | if [ "$(cat /var/lib/homebridge/package.json | jq -r '.dependencies."homebridge-config-ui-x"')" != "null" ]; then 37 | packageJson="$(cat /var/lib/homebridge/package.json | jq -rM 'del(."dependencies"."homebridge-config-ui-x")')" 38 | if [ "$?" = "0" ]; then 39 | printf "$packageJson" > /var/lib/homebridge/package.json 40 | echo "Removed homebridge-config-ui-x from package.json" 41 | fi 42 | fi 43 | fi 44 | 45 | # Re-install user plugins 46 | echo "Refreshing user plugins, this may take a few minutes, please wait..." 47 | echo "" 48 | npm --prefix /var/lib/homebridge install 49 | npm --prefix /var/lib/homebridge rebuild 50 | echo "" 51 | 52 | # remove tmp package.json 53 | rm -rf /tmp/homebridge-tmp/package.json 54 | fi 55 | 56 | # post-install and post-upgrade 57 | if [ "$1" = "configure" ]; then 58 | echo "Running post-install steps..." 59 | 60 | # create user 61 | adduser --system --group homebridge --home /home/homebridge 2> /dev/null 62 | 63 | # some old versions didn't create the homebridge group 64 | if ! getent group homebridge > /dev/null; then 65 | addgroup --system homebridge 2> /dev/null 66 | usermod -g homebridge homebridge 2> /dev/null 67 | fi 68 | 69 | # copy .bashrc to service user home 70 | cp /opt/homebridge/bashrc /home/homebridge/.bashrc 71 | 72 | # fix permissions on homebridge user home 73 | chown -R homebridge: /home/homebridge/.bashrc 74 | 75 | # add user to default groups if running on raspbian 76 | if [ -f /usr/bin/raspi-config ]; then 77 | for groupName in udio bluetooth dialout gpio video input i2c spi audio render; do 78 | usermod -a -G $groupName homebridge 2> /dev/null 79 | done 80 | fi 81 | 82 | # on install only 83 | # if running on Offical Homebridge Raspberry Pi, run as the "pi" user (uid 1000) instead 84 | if [ -z $2 ] && [ -f /usr/bin/raspi-config ] && [ -f /etc/hb-release ] && [ ! -f /etc/systemd/system/homebridge.service.d/override.conf ]; then 85 | getent passwd 1000 > /dev/null 86 | if [ "$?" -eq 0 ]; then 87 | mkdir -p /etc/systemd/system/homebridge.service.d 88 | echo "[Service]" > /etc/systemd/system/homebridge.service.d/override.conf 89 | echo "User=1000" >> /etc/systemd/system/homebridge.service.d/override.conf 90 | echo "Environment=\"UIX_CAN_SHUTDOWN_RESTART_HOST=1\"" >> /etc/systemd/system/homebridge.service.d/override.conf 91 | echo "Environment=\"UIX_STORAGE_PATH=/var/lib/homebridge\"" >> /etc/systemd/system/homebridge.service.d/override.conf 92 | fi 93 | fi 94 | 95 | # clear any masks on the homebridge service 96 | systemctl unmask homebridge.service 2> /dev/null 97 | 98 | # reload systemctl 99 | systemctl daemon-reload 100 | 101 | # enable systemctl service 102 | systemctl enable homebridge.service 103 | 104 | # start / restart homebridge 105 | echo "Starting Homebridge service...." 106 | systemctl restart homebridge.service 107 | 108 | # create symlink to hb-shell 109 | ln -fs /opt/homebridge/hb-shell /usr/local/bin/hb-shell 110 | 111 | # create symlink to hb-service-shim 112 | ln -fs /opt/homebridge/hb-service-shim /usr/local/bin/hb-service 113 | 114 | # remove symlinks create by npm for global hb-service installs 115 | rm -rf /usr/bin/hb-service 116 | fi 117 | 118 | # post-install only 119 | if [ "$1" = "configure" ] && [ -z $2 ]; then 120 | IP=$(hostname -I) 121 | PORT=8581 122 | 123 | # check to see if an alternate port is defined in the config 124 | if [ -f /var/lib/homebridge/config.json ]; then 125 | PORT_FROM_CONFIG=$(cat /var/lib/homebridge/config.json | jq '.platforms[] | select(.platform == "config") | .port' 2> /dev/null) 126 | if [ ${#PORT_FROM_CONFIG} -gt 0 ]; then 127 | PORT=$PORT_FROM_CONFIG 128 | fi 129 | fi 130 | 131 | # create ufw firewall rules 132 | if [ -e "/usr/sbin/ufw" ]; then 133 | if ufw status 2> /dev/null | head -n 1 | grep -qw "active"; then 134 | echo "" 135 | ufw allow $PORT/tcp > /dev/null 136 | if [ "$?" = "0" ]; then 137 | echo "Added local firewall rule to allow inbound traffic on port $PORT/tcp." 138 | echo "Run \"ufw status\" to view all active firewall rules." 139 | else 140 | echo "You may need to create a firewall rule to allow access to port $PORT/tcp before you can access the Homebridge UI." 141 | fi 142 | echo "You may need to create additional firewall rules to allow HomeKit access to the main Homebridge port and any Child Bridge ports." 143 | fi 144 | fi 145 | 146 | echo "" 147 | echo "Homebridge Installation Complete!" 148 | echo "You can access the Homebridge UI via:" 149 | echo "" 150 | 151 | for ip in $IP; do 152 | if [[ $ip =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then 153 | echo "* http://$ip:$PORT" 154 | else 155 | echo "* http://[$ip]:$PORT" 156 | fi 157 | done 158 | 159 | echo "" 160 | echo "Thanks for installing Homebridge!" 161 | echo "" 162 | fi 163 | 164 | exit 0 165 | -------------------------------------------------------------------------------- /deb/debian/postrm: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # if removing - ensure app data is gone, but keep user data unless purgin 4 | if [ "$1" = "remove" ]; then 5 | echo "Running post-remove steps..." 6 | # stop service 7 | systemctl stop homebridge.service 2> /dev/null 8 | 9 | # disable systemctl service 10 | systemctl disable homebridge.service 2> /dev/null 11 | 12 | # remove symlink to hb-shell 13 | rm -rf /usr/local/bin/hb-shell 14 | 15 | # remove symlink to hb-service-shim 16 | rm -rf /usr/local/bin/hb-service 17 | 18 | # ensure package is completely gone 19 | rm -rf /var/lib/homebridge/node_modules /var/lib/homebridge/package-lock.json /var/lib/homebridge/pnpm-lock.yaml 20 | rm -rf /opt/homebridge 21 | fi 22 | 23 | # if purging - delete the /var/lib/homebridge folder entirely 24 | if [ "$1" = "purge" ]; then 25 | echo "Running post-purge steps..." 26 | rm -rf /var/lib/homebridge 27 | echo "Removed /var/lib/homebridge" 28 | fi 29 | 30 | exit 0 31 | -------------------------------------------------------------------------------- /deb/debian/preinst: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # before install 4 | if [ "$1" = "install" ]; then 5 | echo "Running pre-install steps..." 6 | 7 | # make sure the package is not being installed using the Homebridge UI integrated terminal 8 | pstree -s $$ | grep "hb-service" > /dev/null 9 | if [ "$?" -eq 0 ]; then 10 | echo 11 | >&2 echo "ERROR: The homebridge package must not be installed from the Homebridge UI Terminal." 12 | echo 13 | exit 1 14 | fi 15 | 16 | # remove the hb-service generated fix-permission pre-start script (fresh install only!) 17 | if [ -z $2 ] && [ -f /etc/hb-service/homebridge/prestart.d/10-fix-permissions ]; then 18 | rm -rf /etc/hb-service/homebridge/prestart.d/10-fix-permissions 19 | fi 20 | 21 | # check for existing homebridge.service 22 | if [ -f /etc/systemd/system/homebridge.service ]; then 23 | # try and get a list of the installed plugins and create a temporary package.json that will be used to install them again in the new location 24 | if [ ! -f /var/lib/homebridge/package.json ] && [ -f /var/lib/homebridge/config.json ] && [ -f /var/lib/homebridge/.uix-secrets ]; then 25 | if systemctl is-active --quiet homebridge.service; then 26 | # get the ui port 27 | ui_port=$(cat /var/lib/homebridge/config.json | jq -rM '.platforms[] | select(.platform == "config") | .port' 2> /dev/null) 28 | # generate a jwt for the http request 29 | secret=$(cat /var/lib/homebridge/.uix-secrets | jq '.secretKey' | tr -d '"') 30 | header=$(echo -n '{"alg":"HS256","typ":"JWT"}' | openssl base64 -e -A | sed s/\+/-/g | sed -E s/=+$// | sed 's/\//_/g') 31 | payload=$(echo -n '{"username":"homebridge-apt-pkg","name":"homebridge-apt-pkg","admin":true,"instanceId":"xxxxxxxx"}' | openssl base64 -e -A | sed s/\+/-/g | sed -E s/=+$// | sed 's/\//_/g') 32 | signature=$(echo -n "${header}.${payload}"| openssl dgst -sha256 -hmac $secret -binary | openssl base64 -e -A | sed s/\+/-/g | sed -E s/=+$// | sed 's/\//_/g') 33 | token="${header}.${payload}.${signature}" 34 | 35 | # get the list of installed plugins from the running instance of the Homebridge UI 36 | output="" 37 | getPluginStatus="fail" 38 | for protocol in "http" "https"; do 39 | output=$(curl -sfk -H "Authorization: bearer ${token}" $protocol://localhost:${ui_port}/api/plugins 2> /dev/null) 40 | if [ "$?" = "0" ]; then 41 | getPluginStatus="success" 42 | break 43 | fi 44 | done 45 | 46 | if [ "$getPluginStatus" = "success" ]; then 47 | # build a package.json like format containing the list of plugins the user has installed 48 | dependencies=$(echo $output | jq -rM '. | map({(.name) : .installedVersion }) | add | del(."homebridge-config-ui-x") | del(."homebridge")') 49 | packageJson=$(jq ".dependencies += $dependencies" <<< '{ "dependencies": {} }') 50 | if [ "$?" = "0" ]; then 51 | pluginCount=$(echo $dependencies | jq length) 52 | if [ $pluginCount -gt 0 ]; then 53 | # save the package.json file to a temp file which will be picked up in the postinst script 54 | mkdir -p /tmp/homebridge-tmp 55 | echo $packageJson > /tmp/homebridge-tmp/package.json 56 | fi 57 | fi 58 | fi 59 | fi 60 | fi 61 | 62 | # stop homebridge.service if it is running 63 | if systemctl is-active --quiet homebridge.service; then 64 | echo "Stopping existing Homebridge service..." 65 | systemctl stop homebridge.service 66 | fi 67 | 68 | # disable and remove the old homebridge.service 69 | echo "Removing existing Homebridge service..." 70 | systemctl disable homebridge.service 71 | rm -rf /etc/systemd/system/homebridge.service 72 | systemctl daemon-reload 73 | fi 74 | 75 | fi 76 | 77 | # before an upgrade 78 | if [ "$1" = "upgrade" ] && [ $2 ]; then 79 | echo "Running pre-upgrade steps..." 80 | 81 | # make sure the package is not being upgraded using the Homebridge UI integrated terminal 82 | pstree -s $$ | grep "hb-service" > /dev/null 83 | if [ "$?" -eq 0 ]; then 84 | echo 85 | >&2 echo "ERROR: The homebridge package must not be upgraded from the Homebridge UI Terminal." 86 | echo 87 | exit 1 88 | fi 89 | 90 | # stop homebridge.service if it is running 91 | if systemctl is-active --quiet homebridge.service; then 92 | echo "Stopping Homebridge service..." 93 | systemctl stop homebridge.service 2> /dev/null 94 | fi 95 | 96 | # take a copy of the existing "package.json" 97 | mkdir -p /tmp/homebridge-tmp 98 | [ -f /var/lib/homebridge/package.json ] && cp /var/lib/homebridge/package.json /tmp/homebridge-tmp/package.json 99 | 100 | # remove existing node_modules/homebridge and lock files 101 | # the postinst upgrade step will merge the new package.json with the existing one 102 | rm -rf /var/lib/homebridge/node_modules/homebridge 103 | rm -rf /var/lib/homebridge/package-lock.json 104 | rm -rf /var/lib/homebridge/pnpm-lock.yaml 105 | rm -rf /var/lib/homebridge/package.json 106 | rm -rf /var/lib/homebridge/.npmrc 107 | # cleanup node-pty-prebuilt-multiarch 108 | rm -rf /opt/homebridge/lib/node_modules/homebridge-config-ui-x/node_modules/node-pty-prebuilt-multiarch/build 109 | rm -rf /opt/homebridge/lib/node_modules/homebridge-config-ui-x/node_modules/@homebridge/node-pty-prebuilt-multiarch/build 110 | fi 111 | 112 | echo "Unpacking may take several minutes on low powered devices." 113 | 114 | exit 0 115 | -------------------------------------------------------------------------------- /deb/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ --with systemd 4 | 5 | override_dh_strip: 6 | override_dh_makeshlibs: 7 | override_dh_shlibdeps: 8 | override_dh_fixperms: 9 | -------------------------------------------------------------------------------- /deb/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) -------------------------------------------------------------------------------- /deb/etc/hb-service/homebridge/prestart.d/10-fix-permissions: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # Ensure the storage path permissions are correct 4 | if [ -n "$USER" ] && [ "$USER" != "root" ]; then 5 | echo "Ensuring /var/lib/homebridge and /opt/homebridge are owned by $USER" 6 | [ -d /var/lib/homebridge ] || mkdir -p /var/lib/homebridge 7 | chown -R $USER: /var/lib/homebridge /opt/homebridge 8 | fi 9 | -------------------------------------------------------------------------------- /deb/opt/homebridge/bashrc: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | GREEN='\033[1;32m' 4 | BOLD='\e[1m' 5 | CYAN='\033[0;36m' 6 | NC='\033[0m' 7 | 8 | PS1="\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \$\[\033[00m\] " 9 | 10 | if id -nG "$USER" | grep -qw "sudo"; then 11 | printf "${CYAN}Note: This is a restricted shell.${NC}\n\n" 12 | else 13 | printf "${CYAN}Note: This is a restricted shell, sudo cannot be used here.${NC}\n\n" 14 | alias sudo='echo "ERROR: sudo / root access is not allowed by the homebridge service account. You can use \"su \" to swap to your local user account. " # ' 15 | fi 16 | 17 | printf "${GREEN}Homebridge Terminal${NC}\n\n" 18 | 19 | printf "${BOLD}Node.js Version:${NC} ${GREEN}$(node -v)${NC}\n" 20 | printf "${BOLD}Node.js Path:${NC} ${GREEN}$(which node)${NC}\n" 21 | printf "${BOLD}Plugin Path:${NC} ${GREEN}/var/lib/homebridge/node_modules${NC}\n\n" 22 | 23 | printf "${BOLD}Update Node.js:${NC} ${GREEN}hb-service update-node${NC}\n\n" 24 | 25 | printf "${BOLD}Install Plugin:${NC} ${GREEN}hb-service add homebridge-plugin-name${NC}\n" 26 | printf "${BOLD}Remove Plugin:${NC} ${GREEN}hb-service remove homebridge-plugin-name${NC}\n\n" 27 | -------------------------------------------------------------------------------- /deb/opt/homebridge/bashrc-hb-shell: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # bashrc file for the hb-shell command 4 | 5 | source "/opt/homebridge/source.sh" 6 | source "/opt/homebridge/bashrc" 7 | -------------------------------------------------------------------------------- /deb/opt/homebridge/hb-service-shim: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | if [ "$(id -u)" -ne 0 ]; then 4 | echo "This command must be executed as root or with sudo." 5 | exit 1 6 | fi 7 | 8 | # default shell user 9 | SHELL_USER=homebridge 10 | SHELL_USER_HOME=/home/homebridge 11 | 12 | function check_shell_user_override { 13 | # if a systemd override is in place, check which user the shell should run as 14 | if [ -f /etc/systemd/system/homebridge.service.d/override.conf ]; then 15 | OVERRIDE_USER=$(cat /etc/systemd/system/homebridge.service.d/override.conf | grep '^[[:blank:]]*[^[:blank:]#;]' | awk /User=/ | awk -F "=" '{print $2}' | xargs) 16 | if [ ${#OVERRIDE_USER} -gt 0 ]; then 17 | # check if user exists 18 | getent passwd $OVERRIDE_USER > /dev/null 19 | if [ "$?" -eq 0 ]; then 20 | SHELL_USER=$(id -nu $OVERRIDE_USER) 21 | else 22 | echo "ERROR: User '$OVERRIDE_USER' as defined in /etc/systemd/system/homebridge.service.d/override.conf does not exist on the system!" 23 | fi 24 | fi 25 | fi 26 | 27 | # set the shell user's home directory 28 | SHELL_USER_HOME=$(eval echo ~$SHELL_USER) 29 | } 30 | 31 | # default port 32 | PORT=8581 33 | 34 | function check_port_override { 35 | if [ -f /var/lib/homebridge/config.json ]; then 36 | PORT_FROM_CONFIG=$(cat /var/lib/homebridge/config.json | jq '.platforms[] | select(.platform == "config") | .port' 2> /dev/null) 37 | if [ ${#PORT_FROM_CONFIG} -gt 0 ]; then 38 | PORT=$PORT_FROM_CONFIG 39 | fi 40 | fi 41 | } 42 | 43 | case "$1" in 44 | "start") 45 | echo "Starting Homebridge..." 46 | systemctl start homebridge.service 47 | ;; 48 | 49 | "stop") 50 | echo "Stopping Homebridge..." 51 | systemctl stop homebridge.service 52 | ;; 53 | 54 | "restart") 55 | echo "Restarting Homebridge..." 56 | systemctl restart homebridge.service 57 | ;; 58 | 59 | "update-node") 60 | check_shell_user_override 61 | hb_cmd="hb-service $@" 62 | cd /var/lib/homebridge 63 | exec sudo --user $SHELL_USER env "HOME=$SHELL_USER_HOME" bash --rcfile /opt/homebridge/source.sh -ci "$hb_cmd" 64 | ;; 65 | 66 | "rebuild") 67 | check_shell_user_override 68 | hb_cmd="hb-service $@" 69 | cd /var/lib/homebridge 70 | exec sudo --user $SHELL_USER env "HOME=$SHELL_USER_HOME" bash --rcfile /opt/homebridge/source.sh -ci "$hb_cmd" 71 | ;; 72 | 73 | "status") 74 | check_shell_user_override 75 | check_port_override 76 | hb_cmd="hb-service status --port $PORT" 77 | cd /var/lib/homebridge 78 | exec sudo --user $SHELL_USER env "HOME=$SHELL_USER_HOME" bash --rcfile /opt/homebridge/source.sh -ci "$hb_cmd" 79 | ;; 80 | 81 | "add") 82 | check_shell_user_override 83 | npm_cmd="npm --prefix /var/lib/homebridge $@" 84 | cd /var/lib/homebridge 85 | exec sudo --user $SHELL_USER env "HOME=$SHELL_USER_HOME" bash --rcfile /opt/homebridge/source.sh -ci "$npm_cmd" 86 | ;; 87 | 88 | "remove") 89 | check_shell_user_override 90 | npm_cmd="npm --prefix /var/lib/homebridge $@" 91 | cd /var/lib/homebridge 92 | exec sudo --user $SHELL_USER env "HOME=$SHELL_USER_HOME" bash --rcfile /opt/homebridge/source.sh -ci "$npm_cmd" 93 | ;; 94 | 95 | "link") 96 | check_shell_user_override 97 | target_dir="$(pwd)" 98 | if [ "$target_dir" = "/var/lib/homebridge" ]; then 99 | echo "Error: Cannot run link command in /var/lib/homebridge" 100 | exit 1 101 | fi 102 | 103 | if [ ! -f "$target_dir/package.json" ]; then 104 | echo "Error: Target directory ($target_dir) does not contain a package.json file." 105 | exit 1 106 | fi 107 | 108 | package_name=$(cat "$target_dir/package.json" | jq -r '.name') 109 | if [ "$?" != 0 ] || [ "$package_name" = "null" ]; then 110 | echo "Error: Could not read plugin name in package.json" 111 | exit 1 112 | fi 113 | 114 | target_link="/var/lib/homebridge/node_modules/$package_name" 115 | target_dirname="$(dirname $target_link)" 116 | 117 | if [ ! -d "$target_dirname" ]; then 118 | mkdir -p $target_dirname 119 | chown -h $SHELL_USER: $target_dirname 120 | fi 121 | 122 | if [ -e "$target_link" ]; then 123 | if [ "$(realpath $target_link)" = "$target_dir" ]; then 124 | echo "Error: $package_name is already linked." 125 | exit 1 126 | fi 127 | fi 128 | 129 | ln -sf "$target_dir" "$target_link" 130 | chown -h $SHELL_USER: "$target_link" 131 | if [ "$?" = "0" ]; then 132 | echo "Success: $package_name linked" 133 | fi 134 | ;; 135 | 136 | "unlink") 137 | check_shell_user_override 138 | target_dir="$(pwd)" 139 | if [ "$target_dir" = "/var/lib/homebridge" ]; then 140 | echo "Error: Cannot run unlink command in /var/lib/homebridge" 141 | exit 1 142 | fi 143 | if [ ! -f "$target_dir/package.json" ]; then 144 | echo "Error: Target directory ($target_dir) does not contain a package.json file." 145 | exit 1 146 | fi 147 | package_name=$(cat "$target_dir/package.json" | jq -r '.name') 148 | target_link="/var/lib/homebridge/node_modules/$package_name" 149 | if [ "$?" != 0 ] || [ "$package_name" = "null" ]; then 150 | echo "Error: Could not read plugin name in package.json" 151 | exit 1 152 | fi 153 | if [ ! -e "$target_link" ]; then 154 | echo "Error: $package_name is not linked." 155 | exit 1 156 | fi 157 | rm -rf "/var/lib/homebridge/node_modules/$package_name" 158 | if [ "$?" = "0" ]; then 159 | echo "Success: $package_name unlinked" 160 | fi 161 | ;; 162 | 163 | "logs") 164 | exec tail -n 100 -f /var/lib/homebridge/homebridge.log 165 | ;; 166 | 167 | "view") 168 | exec tail -n 100 /var/lib/homebridge/homebridge.log 169 | ;; 170 | 171 | "shell") 172 | exec /opt/homebridge/hb-shell 173 | ;; 174 | 175 | "install") 176 | echo "The 'hb-service install' command is not available when Homebridge is running as a system package." 177 | exit 1 178 | ;; 179 | 180 | "uninstall") 181 | echo "The 'hb-service uninstall' command is not available when Homebridge is running as a system package." 182 | exit 1 183 | ;; 184 | 185 | "-V") 186 | echo "Print Version Homebridge." 187 | exec /var/lib/homebridge/node_modules/homebridge/bin/homebridge -V 188 | ;; 189 | 190 | "-D") 191 | # Debug 192 | exec /var/lib/homebridge/node_modules/homebridge/bin/homebridge -D 193 | ;; 194 | 195 | *) 196 | printf '%s\n' \ 197 | "Usage: hb-service [start|stop|restart|logs|status|update-node]" \ 198 | "" \ 199 | "This hb-service command is provided by Homebridge APT Package" \ 200 | "" \ 201 | "Please provide a command:" \ 202 | " start start the homebridge service" \ 203 | " stop stop the homebridge service" \ 204 | " restart restart the homebridge service" \ 205 | " add @ install a plugin" \ 206 | " remove @ remove a plugin" \ 207 | " link adds the current directory to Homebridge for plugin development" \ 208 | " unlink reverses the link operation for the current directory" \ 209 | " update-node [version] update Node.js" \ 210 | " logs tails the homebridge service logs" \ 211 | " view view the homebridge service logs" \ 212 | " status check if the Homebridge UI web server is running" \ 213 | " shell open the Homebridge Terminal" \ 214 | " -V Print Homebridge Version" \ 215 | " -D Debug Homebridge " \ 216 | "" \ 217 | "See the wiki for help with hb-service: https://homebridge.io/w/JTtHK" 218 | ;; 219 | esac 220 | -------------------------------------------------------------------------------- /deb/opt/homebridge/hb-shell: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ "$(id -u)" -ne 0 ]; then 4 | echo "This command must be executed as root or with sudo." 5 | exit 1 6 | fi 7 | 8 | # change to working directory 9 | cd "/var/lib/homebridge" 10 | 11 | # default shell user 12 | SHELL_USER=homebridge 13 | 14 | # if a systemd override is in place, check which user the shell should run as 15 | if [ -f /etc/systemd/system/homebridge.service.d/override.conf ]; then 16 | OVERRIDE_USER=$(cat /etc/systemd/system/homebridge.service.d/override.conf | grep '^[[:blank:]]*[^[:blank:]#;]' | awk /User=/ | awk -F "=" '{print $2}' | xargs) 17 | if [ ${#OVERRIDE_USER} -gt 0 ]; then 18 | # check if user exists 19 | getent passwd $OVERRIDE_USER > /dev/null 20 | if [ "$?" -eq 0 ]; then 21 | SHELL_USER=$(id -nu $OVERRIDE_USER) 22 | echo "User: $SHELL_USER (/etc/systemd/system/homebridge.service.d/override.conf)" 23 | else 24 | echo "ERROR: User '$OVERRIDE_USER' as defined in /etc/systemd/system/homebridge.service.d/override.conf does not exist on the system!" 25 | fi 26 | fi 27 | fi 28 | 29 | # get the shell user's home directory 30 | SHELL_USER_HOME=$(eval echo ~$SHELL_USER) 31 | 32 | printf "Entering Homebridge Shell. To exit type 'exit'.\n\n" 33 | 34 | exec sudo --user "$SHELL_USER" env "HOME=$SHELL_USER_HOME" bash --rcfile /opt/homebridge/bashrc-hb-shell 35 | -------------------------------------------------------------------------------- /deb/opt/homebridge/source.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | NODE_BIN_PATH="/opt/homebridge/bin" 4 | HB_SERVICE_STORAGE_PATH="/var/lib/homebridge" 5 | 6 | export PATH="$NODE_BIN_PATH:$HB_SERVICE_STORAGE_PATH/node_modules/.bin:$PATH" 7 | 8 | export npm_config_global_style=true 9 | export npm_config_package_lock=false 10 | export npm_config_audit=false 11 | export npm_config_fund=false 12 | export npm_config_update_notifier=false 13 | export npm_config_auto_install_peers=true 14 | export npm_config_loglevel=error 15 | export npm_config_prefix=/opt/homebridge 16 | 17 | export HOMEBRIDGE_APT_PACKAGE=1 18 | export UIX_CUSTOM_PLUGIN_PATH=$HB_SERVICE_STORAGE_PATH/node_modules 19 | export UIX_BASE_PATH_OVERRIDE=/opt/homebridge/lib/node_modules/homebridge-config-ui-x 20 | export UIX_USE_PNPM=0 21 | export UIX_USE_PLUGIN_BUNDLES=1 22 | -------------------------------------------------------------------------------- /deb/opt/homebridge/start.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | HB_SERVICE_STORAGE_PATH="/var/lib/homebridge" 4 | HB_SERVICE_NODE_EXEC_PATH="/opt/homebridge/bin/node" 5 | HB_SERVICE_EXEC_PATH="/opt/homebridge/lib/node_modules/homebridge-config-ui-x/dist/bin/hb-service.js" 6 | 7 | . "/opt/homebridge/source.sh" 8 | 9 | cd $HB_SERVICE_STORAGE_PATH 10 | 11 | # check for invalid package.json file 12 | if [ -e $HB_SERVICE_STORAGE_PATH/package.json ]; then 13 | jq empty $HB_SERVICE_STORAGE_PATH/package.json 2>/dev/null 14 | if [ "$?" != 0 ]; then 15 | echo "ERROR: $HB_SERVICE_STORAGE_PATH/package.json is not a valid JSON file; deleting..." 16 | rm -rf $HB_SERVICE_STORAGE_PATH/package.json 17 | rm -rf $HB_SERVICE_STORAGE_PATH/package-lock.json 18 | rm -rf $HB_SERVICE_STORAGE_PATH/pnpm-lock.yaml 19 | rm -rf $HB_SERVICE_STORAGE_PATH/node_modules 20 | fi 21 | fi 22 | 23 | # remove the package-lock.json 24 | if [ -e /var/lib/homebridge/package-lock.json ]; then 25 | rm -rf /var/lib/homebridge/package-lock.json 26 | fi 27 | 28 | # check for missing homebridge 29 | if [ ! -f "$HB_SERVICE_STORAGE_PATH/node_modules/homebridge/package.json" ]; then 30 | cd $HB_SERVICE_STORAGE_PATH 31 | echo "Re-installing homebridge..." 32 | npm --prefix $HB_SERVICE_STORAGE_PATH install --save homebridge@latest 33 | fi 34 | 35 | # remove homebridge-config-ui-x package from the plugins store 36 | if [ -e "/var/lib/homebridge/node_modules/homebridge-config-ui-x" ]; then 37 | rm -rf $HB_SERVICE_STORAGE_PATH/node_modules/homebridge-config-ui-x 38 | fi 39 | 40 | exec $HB_SERVICE_NODE_EXEC_PATH $HB_SERVICE_EXEC_PATH run -I -U $HB_SERVICE_STORAGE_PATH -P $HB_SERVICE_STORAGE_PATH/node_modules --strict-plugin-resolution "$@" 41 | -------------------------------------------------------------------------------- /deb/usr/share/polkit-1/rules.d/homebridge.rules: -------------------------------------------------------------------------------- 1 | polkit.addRule(function(action, subject) { 2 | if ((action.id == "org.freedesktop.resolve1.register-service" || 3 | action.id == "org.freedesktop.resolve1.unregister-service") && 4 | subject.isInGroup("homebridge")) { 5 | return polkit.Result.YES; 6 | } 7 | }); 8 | -------------------------------------------------------------------------------- /deb/var/lib/homebridge/.npmrc: -------------------------------------------------------------------------------- 1 | audit = false 2 | auto-install-peers = true 3 | fund = false 4 | global-style = true 5 | loglevel = "error" 6 | update-notifier = false 7 | package-lock = false -------------------------------------------------------------------------------- /deb/var/lib/polkit-1/localauthority/10-vendor.d/homebridge.pkla: -------------------------------------------------------------------------------- 1 | [Homebridge ManageService] 2 | Identity=unix-group:homebridge 3 | Action=org.freedesktop.resolve1.register-service;org.freedesktop.resolve1.unregister-service 4 | ResultAny=yes 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@homebridge/homebridge-apt-pkg", 3 | "version": "0.0.0", 4 | "description": "Stub package for tracking Homebridge APT release versions via npm", 5 | "scripts": { 6 | "test": "echo \"Error: no test specified\" && exit 1", 7 | "prepublishOnly": "cp README.npm.md README.md", 8 | "postpublish": "git restore README.md || true" 9 | }, 10 | "files": [ 11 | "README.md" 12 | ], 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/homebridge/homebridge-apt-pkg.git" 16 | }, 17 | "author": "Homebridge", 18 | "license": "ISC", 19 | "bugs": { 20 | "url": "https://github.com/homebridge/homebridge-apt-pkg/issues" 21 | }, 22 | "homepage": "https://github.com/homebridge/homebridge-apt-pkg#readme", 23 | "private": false, 24 | "dependencies": { 25 | "homebridge": "^1.9.0", 26 | "homebridge-config-ui-x": "^4.75.0", 27 | "node": "^22.16.0" 28 | } 29 | } -------------------------------------------------------------------------------- /purge-cf-cache.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # CLOUDFLARE_API_TOKEN= 4 | # CLOUDFLARE_ZONE_ID= 5 | 6 | if [ -z $CLOUDFLARE_API_TOKEN ]; then 7 | echo >&2 echo "CLOUDFLARE_API_TOKEN missing." 8 | exit 1 9 | fi 10 | 11 | if [ -z $CLOUDFLARE_ZONE_ID ]; then 12 | echo >&2 echo "CLOUDFLARE_ZONE_ID missing." 13 | exit 1 14 | fi 15 | 16 | # test the token is working still 17 | curl -sSf -X GET "https://api.cloudflare.com/client/v4/user/tokens/verify" \ 18 | -H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \ 19 | -H "Content-Type:application/json" > /dev/null 20 | 21 | if [ "$?" != "0" ]; then 22 | >&2 echo "Failed to verify token." 23 | exit 1 24 | fi 25 | 26 | # get list of files to purge 27 | PURGE_URLS_PAYLOAD=$(cat ./repo/cf-cache-purge-urls.json) 28 | 29 | # purge cache 30 | curl -sSf -X POST "https://api.cloudflare.com/client/v4/zones/${CLOUDFLARE_ZONE_ID}/purge_cache" \ 31 | -H "Authorization: Bearer ${CLOUDFLARE_API_TOKEN}" \ 32 | -H "Content-Type: application/json" \ 33 | --data "$PURGE_URLS_PAYLOAD" 34 | 35 | if [ "$?" != "0" ]; then 36 | >&2 echo "Failed to purge cache." 37 | exit 1 38 | fi 39 | -------------------------------------------------------------------------------- /purge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # 4 | # This script is to purge s3 of older package versions 5 | # 6 | 7 | # minimum version to keep 8 | # MIN_VERSION=1.0.2 9 | 10 | # stable | test 11 | # RELEASE_TYPE=stable 12 | 13 | # bucket name 14 | # S3_BUCKET=repo.homebridge.io 15 | 16 | # region 17 | # S3_REGION=us-west-2 18 | 19 | # from https://stackoverflow.com/a/4025065 20 | vercomp () { 21 | if [[ $1 == $2 ]] 22 | then 23 | return 0 24 | fi 25 | local IFS=. 26 | local i ver1=($1) ver2=($2) 27 | # fill empty fields in ver1 with zeros 28 | for ((i=${#ver1[@]}; i<${#ver2[@]}; i++)) 29 | do 30 | ver1[i]=0 31 | done 32 | for ((i=0; i<${#ver1[@]}; i++)) 33 | do 34 | if [[ -z ${ver2[i]} ]] 35 | then 36 | # fill empty fields in ver2 with zeros 37 | ver2[i]=0 38 | fi 39 | if ((10#${ver1[i]} > 10#${ver2[i]})) 40 | then 41 | return 1 42 | fi 43 | if ((10#${ver1[i]} < 10#${ver2[i]})) 44 | then 45 | return 2 46 | fi 47 | done 48 | return 0 49 | } 50 | 51 | # loop over the objects in the bucket and find packages to remove 52 | for i in $(aws s3api list-objects --region $S3_REGION --bucket "$S3_BUCKET" --prefix pool/$RELEASE_TYPE/h/ho/ | jq ".Contents[] | .Key"); do 53 | version=${i#*_} 54 | version=${version%_*} 55 | vercomp $MIN_VERSION $version 56 | result=$? 57 | if [ $result -eq 1 ]; then 58 | key=$(echo "$i" | tr -d '"') 59 | echo "Removing ($version) from s3 at $key" 60 | aws s3api delete-object --region $S3_REGION --bucket "$S3_BUCKET" --key="$key" --output=json 61 | fi 62 | done 63 | -------------------------------------------------------------------------------- /repo/KEY.gpg: -------------------------------------------------------------------------------- 1 | -----BEGIN PGP PUBLIC KEY BLOCK----- 2 | 3 | mQINBGJk6IkBEADG8vlhwx+AFoZiQfIKIrCbWuIsLmZdxoFyAh61jbZIfrwZyxKG 4 | 6qMb+NdVu7x+gNLLy/fET+s5bE146OaJrIkQDPtzTIZ/0JalZikbogfsFUra6OgF 5 | 1K3vtn+dTORzL44EJ+LIAeeRngvWek3+dRLnsJ1MNi30qjW6SgAXcAmRNc34ukqS 6 | 2TkB46lzjZnVtuyivJpw+QeJA6/3Z50/BTqBeijvABc6bjdPkOcwnXfgVPZSVPNS 7 | QoY6anGMpDmlaDu0ZlG/n7X5Xhm86CbOp+gMY0uP8oWl46B75Gms/EVjQdNlnqBw 8 | v05vFLD5psUxxQnWLIRYYQidBa1KVXw0jmSQacayiciXCGkXb97p8+uk0se4FZ3Z 9 | 9V91gH8UiLHajL6SkzX64meJdjrW0IRl6chQ9IGJzGyMmWM7dVUv1K3Lw/wX4j6c 10 | BiEoDrZZgXnfjgI8WlbrkfEuNsssNvNYNObJEy5rcqPuP+6n2OS6xtq3zQ0r5r68 11 | zlpe0Ki/VCm3HmafwQc/VOphZvKnBtA1Jh8iFGMpEg0WGhqTpkpk965Cc+Rokx13 12 | dO+UMI0ZHd3Q58az3KVCoame7sKqaCAbjj58pvjkTX3XH8E1reSgJtm0ZbjMnsfL 13 | X5C3KfBUq1s9pAGeeO3hpiHYGfN1sKeAOrBVyiS8R1S0JnbQK12yC8CfTQARAQAB 14 | tEhIb21lYnJpZGdlIENJIChHUEcgS2V5IEZvciBHaXRIdWIgQWN0aW9uIERlcGxv 15 | eW1lbnRzKSA8Y2lAaG9tZWJyaWRnZS5pbz6JAk4EEwEKADgWIQSsqmCBSnUkUE8H 16 | 3gffWw/ojI9dkgUCYmToiQIbAwULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRDf 17 | Ww/ojI9dkuDGEACrF0gaonn1Q+3V+TiFTVF/iIGOz2T1wNc5sX/FtQCp9s9JhSEW 18 | uPOMO06gW2/xd8aciw80wBxGp/XFukwtPaDLfeLJAR7afGhuS6zIa577hyMBmrHQ 19 | fxIbxm7iVoJTLyo6DHfgj85wjCAgwV//lkKgElVBgsB+gZpZrL8JrZK+f4vxpEMy 20 | VQeoDWD8fpIZxjvDuWXEeetxGXRj5HENbyo+7L7yH+yBW7iq13gLaoxjPf4dhMP5 21 | iy7QnJE3IvhN1LXBqI6szedxld1W3fwdMKW8snXyawoOCXB+r4GvuRF7L45B4uz8 22 | YTq3qejA+HKgmiWX1/orCGTajNrNnZQ3GXIt+dlk5hLD2r/hKx9ohUvKB97lLmkQ 23 | 4Q3fGKajPLMAq3+XCRUNw4u1hXfY1V1uE/kulaQVN7kjF5IJvzAZs1k0D5xWUNE8 24 | sH/f4UcCK3N47hbULXL2VCfjrbOxPUkS66pDeGntAnNGLbdqiFsHH/sbC0+gFL/t 25 | YVkMzJfM1aw3Dt5E+wQdrEmPXn+HFO5Jp8RXFRAA3orB43u80/+2pmtTf5F0DzEf 26 | joef/9A575F02kGO6HSwz+zpcU8MIwtgxrijewG8Tc1WA/iIrfP/x5b/lRNx0Iqx 27 | ona6K+dRtVAhsyzXX6Ya0xoKLz2MZj4JCA6hLBb8psWvxBLWT0a+VRVdiLkCDQRi 28 | ZOiJARAAr76QBgTen0+znLyJFrS6MCeUmah0mPjENbO7Hyz4N4dsIitbgfFZSIbf 29 | r30YEFflckh/unLmJxL80qKkiEePedKoP4SCBXfCOwWM6PYYHlQCSOLXwmXBejoO 30 | d9+fdk40Llu3b0kayZCoxGKFFSebv8186qiRhAcw8DRGMgS78tahIdXQtSLKb76C 31 | znOgAa8wmgyulKlsPdw3s8+K0Bx7jbvSzNOs2lf7JzPp2FvqUBSKDDbA1L8Kh6kc 32 | Xh/H7biakrWlVPhcCMCElOijHPO96hlbWYThAXFbdJiWp2ykzvOgRNB+I2u6vpdL 33 | 9EQwY5Ne8jBuHpCl0bA6Jf2xfTUVtqqSYvaL0Dh9xuHsQZ+MHa6t6kf/LoDoEkbh 34 | xCRHi6DpKq8nKK4KwQzzXK4oMAoX5kAG5Tci8h1CSu49WxbZac3JoL96QmuQwGYm 35 | ZtKHtVjn5NI17662ZzCigVSJaFb1aCFMgLeXMlf9RGUhaw791a9UVGaMS/vzI2Ww 36 | vsJEuTqEJfxmb8O7Ofdcf2ku+/oiqZ6u8BY20TK4/9mWw9oeb9RCQveiPUWCk/9A 37 | sKO/hKLb47P5weeoxAkWt1VVVtfEXwR52B7z720aJDRGA4T7kbi4udU9Uko81QME 38 | /7lBBtXYOEvVY0njXEohJiSQKFp/IB0IJBJGuFZ4IfEdBky+cUMAEQEAAYkCNgQY 39 | AQoAIBYhBKyqYIFKdSRQTwfeB99bD+iMj12SBQJiZOiJAhsMAAoJEN9bD+iMj12S 40 | 26QQAJArvaoAAivjZ4txTjKf1qEakTaoLa/vAN7pA0J+fXwDBNF1EzWhRfG0HBIl 41 | IjLMm4D4uJUc6zO8F1D1cJ8lXxUqg6Nf1zd0XQKyXtXuQGEnzgmTdtj6e7UCCttn 42 | FJ1SKx10WpEGRRxQR1geLBSNpxZCJq+sR4YyyYmZY9CKjSTG7EdflS3k9qOpmLGx 43 | K6IcINlKKIiAS+qI5eIWO8mhm7kBZdNTvWk1LlQP+QJ74MQuHJ7Q6ykpjGBKdIkU 44 | ZN/dNGJS3RwT11fhXdxUVqvwon5E/LzGyjzdWZ3QTb9YtKkr4Ri8hmRtdDcXO+4i 45 | GUZv085D2KjraVIhB+zXYBz0Mcwe5yNk74QUvOAT4lD5eI/ZR3+mNG2r3GWMBalp 46 | AbieeURcfovRm+BKYucjm/iWxKbDQxU4DJkE8eojwXouuPtKgqHSSJipw976exGm 47 | xXC4LrA/JjsblTSkPIdp4EOrsRRRYuMoMdnGeZiFId6OdbfvS9Y2E24exbSb859e 48 | /Zw0RpmTKpciUQE9Ua6zVQbeMKDj1kACfzQWPPPQwDlQ25Qtye4Wp/EgWDFQasKN 49 | /YTaFUcUOcRUv7NHITbd+FdRCQa8d51pW6+PxEFkunBnUoIvnq9ZczeCVQBR+FEg 50 | +nMLD+aSjt4ZessJP50hmB9pk5AeV4qvnYR66oCSTtJJ7A2Q 51 | =Mh06 52 | -----END PGP PUBLIC KEY BLOCK----- 53 | -------------------------------------------------------------------------------- /repo/cf-cache-purge-urls.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [ 3 | "https://repo.homebridge.io/KEY.gpg", 4 | "https://repo.homebridge.io/dists/stable/InRelease", 5 | "https://repo.homebridge.io/dists/stable/Release", 6 | "https://repo.homebridge.io/dists/stable/Release.gpg", 7 | "https://repo.homebridge.io/dists/stable/main/binary-amd64/Packages", 8 | "https://repo.homebridge.io/dists/stable/main/binary-amd64/Packages.gz", 9 | "https://repo.homebridge.io/dists/stable/main/binary-arm64/Packages", 10 | "https://repo.homebridge.io/dists/stable/main/binary-arm64/Packages.gz", 11 | "https://repo.homebridge.io/dists/stable/main/binary-armhf/Packages", 12 | "https://repo.homebridge.io/dists/stable/main/binary-armhf/Packages.gz", 13 | "https://repo.homebridge.io/dists/stable/main/binary-i386/Packages", 14 | "https://repo.homebridge.io/dists/stable/main/binary-i386/Packages.gz", 15 | "https://repo.homebridge.io/dists/test/InRelease", 16 | "https://repo.homebridge.io/dists/test/Release", 17 | "https://repo.homebridge.io/dists/test/Release.gpg", 18 | "https://repo.homebridge.io/dists/test/main/binary-amd64/Packages", 19 | "https://repo.homebridge.io/dists/test/main/binary-amd64/Packages.gz", 20 | "https://repo.homebridge.io/dists/test/main/binary-arm64/Packages", 21 | "https://repo.homebridge.io/dists/test/main/binary-arm64/Packages.gz", 22 | "https://repo.homebridge.io/dists/test/main/binary-armhf/Packages", 23 | "https://repo.homebridge.io/dists/test/main/binary-armhf/Packages.gz", 24 | "https://repo.homebridge.io/dists/test/main/binary-i386/Packages", 25 | "https://repo.homebridge.io/dists/test/main/binary-i386/Packages.gz" 26 | ] 27 | } --------------------------------------------------------------------------------