diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index d867328..3838729 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -12,31 +12,31 @@ assignees: '' - -This is a: **FILL ME IN** +This is a: **FILL ME IN** ## Details ## Related Issues -- [ ] I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar +- [ ] I have searched this repository/Pi-hole forums for existing issues and pull requests that look similar -## How to reproduce the issue +## How to reproduce the issue 1. Environment data * Operating System: **ENTER HERE** * Hardware: * Kernel Architecture: - * Docker Install Info and version: + * Docker Install Info and version: - Software source: - Supplimentary Software: * Hardware architecture: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 62d5533..519fc92 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -9,4 +9,4 @@ contact_links: - name: Documentation url: https://docs.pi-hole.net about: Documentation and guides. - + diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 09030cc..b375cf3 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -2,7 +2,7 @@ version: 2 updates: # Maintain dependencies for GitHub Actions - package-ecosystem: "github-actions" - directories: + directories: - "/" schedule: interval: "weekly" diff --git a/.github/workflows/build-and-publish.yml b/.github/workflows/build-and-publish.yml index af90bb0..f1f1ab1 100644 --- a/.github/workflows/build-and-publish.yml +++ b/.github/workflows/build-and-publish.yml @@ -33,7 +33,7 @@ jobs: runner: ubuntu-24.04-arm - platform: linux/riscv64 runner: ubuntu-24.04-arm - + steps: - name: Prepare name for digest up/download run: | @@ -57,7 +57,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} images: | ${{ env.dockerhub }} - ${{ env.ghcr }} + ${{ env.ghcr }} flavor: | latest=${{ startsWith(github.ref, 'refs/tags/') }} tags: | @@ -95,10 +95,10 @@ jobs: context: ./src/ platforms: ${{ matrix.platform }} build-args: | - PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }} + PIHOLE_DOCKER_TAG=${{ steps.meta.outputs.version }} FTL_BRANCH=${{ env.components_branch }} CORE_BRANCH=${{ env.components_branch }} - WEB_BRANCH=${{ env.components_branch }} + WEB_BRANCH=${{ env.components_branch }} PADD_BRANCH=${{ env.components_branch }} labels: ${{ steps.meta.outputs.labels }} outputs: | @@ -142,7 +142,7 @@ jobs: path: /tmp/digests pattern: digests-* merge-multiple: true - + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -187,4 +187,4 @@ jobs: - name: Inspect images run: | docker buildx imagetools inspect ${{ env.dockerhub }}:${{ steps.meta.outputs.version }} - docker buildx imagetools inspect ${{ env.ghcr }}:${{ steps.meta.outputs.version }} \ No newline at end of file + docker buildx imagetools inspect ${{ env.ghcr }}:${{ steps.meta.outputs.version }} diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index dd72189..185feab 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -34,7 +34,7 @@ jobs: uses: actions/setup-python@v5.6.0 with: python-version: "3.13" - + - name: Run black formatter run: | pip install black diff --git a/.github/workflows/housekeeping.yml b/.github/workflows/housekeeping.yml index 9090099..63e15eb 100644 --- a/.github/workflows/housekeeping.yml +++ b/.github/workflows/housekeeping.yml @@ -15,4 +15,4 @@ jobs: repository: ${{ github.repository }} untagged_only: true owner_type: org # or user - except_untagged_multiplatform: true \ No newline at end of file + except_untagged_multiplatform: true diff --git a/.gitignore b/.gitignore index 0b0d977..3a9365f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,9 +13,11 @@ docker-compose.yml etc-dnsmasq.d/ etc-pihole/ var-log/ +.vscode/ +.pytest_cache/ # WIP/test stuff doco.yml # Ignore FTL Binary if it exists -src/pihole-FTL \ No newline at end of file +src/pihole-FTL diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index de794da..0000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "github-actions.workflows.pinned.workflows": [ - ".github/workflows/v6-alpine-play.yml" - ] -} \ No newline at end of file diff --git a/build.sh b/build.sh index 7f8d3cf..c79a674 100755 --- a/build.sh +++ b/build.sh @@ -5,7 +5,7 @@ usage() { echo "Usage: $0 [-l] [-f ] [-c ] [-w ] [-t ] [use_cache]" echo "Options:" echo " -f, --ftlbranch Specify FTL branch (cannot be used in conjunction with -l)" - echo " -c, --corebranch Specify Core branch" + echo " -c, --corebranch Specify Core branch" echo " -w, --webbranch Specify Web branch" echo " -p, --paddbranch Specify PADD branch" echo " -t, --tag Specify Docker image tag (default: pihole:local)" @@ -91,7 +91,7 @@ while [[ $# -gt 0 ]]; do DOCKER_BUILD_CMD+=" --build-arg CORE_BRANCH=$CORE_BRANCH" shift shift - ;; + ;; -w | --webbranch) WEB_BRANCH="$2" check_branch_exists "web" "$WEB_BRANCH" "$WEB_FORK" diff --git a/examples/docker-compose-caddy-proxy.yml b/examples/docker-compose-caddy-proxy.yml index 217f6be..1eabd67 100644 --- a/examples/docker-compose-caddy-proxy.yml +++ b/examples/docker-compose-caddy-proxy.yml @@ -34,13 +34,13 @@ services: # Set the appropriate timezone for your location (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones), e.g: TZ: 'Europe/London' # Set a password to access the web interface. Not setting one will result in a random password being assigned - FTLCONF_webserver_api_password: 'correct horse battery staple' + FTLCONF_webserver_api_password: 'correct horse battery staple' # Volumes store your data between container upgrades volumes: # For persisting Pi-hole's databases and common configuration file - './etc-pihole:/etc/pihole' # Uncomment the below if you have custom dnsmasq config files that you want to persist. Not needed for most. - #- './etc-dnsmasq.d:/etc/dnsmasq.d' + #- './etc-dnsmasq.d:/etc/dnsmasq.d' cap_add: # See https://github.com/pi-hole/docker-pi-hole#note-on-capabilities # Required if you are using Pi-hole as your DHCP server, else not needed diff --git a/src/Dockerfile b/src/Dockerfile index e42ba5d..a8c4781 100644 --- a/src/Dockerfile +++ b/src/Dockerfile @@ -59,9 +59,9 @@ COPY crontab.txt /crontab.txt # Add PADD to the container, too. ADD --chmod=0755 https://raw.githubusercontent.com/${PADD_FORK}/PADD/${PADD_BRANCH}/padd.sh /usr/local/bin/padd -# download a the main repos from github +# download a the main repos from github # if the branch is master we clone the latest tag as sometimes the master branch contains meta changes that have not been tagged -# (we need to create a new "master" branch to avoid the "detached HEAD" state for the version check to work correctly) +# (we need to create a new "master" branch to avoid the "detached HEAD" state for the version check to work correctly) RUN clone_repo() { \ FORK="$1"; \ diff --git a/src/start.sh b/src/start.sh index cff4ffc..da83b67 100644 --- a/src/start.sh +++ b/src/start.sh @@ -79,12 +79,12 @@ start() { while ! grep -q '########## FTL started' /var/log/pihole/FTL.log; do sleep 0.5 done - + pihole updatechecker local versionsOutput versionsOutput=$(pihole -v) echo " [i] Version info:" - printf "%b" "${versionsOutput}\\n" | sed 's/^/ /' + printf "%b" "${versionsOutput}\\n" | sed 's/^/ /' echo "" if [ "${TAIL_FTL_LOG:-1}" -eq 1 ]; then @@ -100,8 +100,8 @@ start() { # Wait for the capsh process (which spawned FTL) to finish wait $CAPSH_PID FTL_EXIT_CODE=$? - - + + # If we are here, then FTL has exited. # If the trap was triggered, then stop will have already been called if [ $TRAP_TRIGGERED -eq 0 ]; then diff --git a/test/requirements.txt b/test/requirements.txt index 0cb6fa1..6f69610 100644 --- a/test/requirements.txt +++ b/test/requirements.txt @@ -2,5 +2,5 @@ pytest == 8.4.1 pytest-testinfra == 10.2.2 pytest-clarity == 1.0.1 tox == 4.28.4 -# Not adding pytest-xdist as using pytest with n > 1 cores -# causes random issues with the emulated architectures \ No newline at end of file +# Not adding pytest-xdist as using pytest with n > 1 cores +# causes random issues with the emulated architectures diff --git a/test/tox.ini b/test/tox.ini index 98e4cb8..5aa913d 100644 --- a/test/tox.ini +++ b/test/tox.ini @@ -7,10 +7,10 @@ deps = -rrequirements.txt passenv = CIPLATFORM setenv = COLUMNS=120 - PY_COLORS=1 + PY_COLORS=1 commands = # Build the Docker image for testing depending on the architecture, fall back to 'local' if not set # This allows us to run the tests on the host architecture if not on CI docker buildx build --load --platform={env:CIPLATFORM:local} --progress plain -f ../src/Dockerfile -t pihole:CI_container ../src/ # run the tests # # Not using > 1 cores as it causes random issues with the emulated architectures - pytest {posargs:-vv} ./tests/ \ No newline at end of file + pytest {posargs:-vv} ./tests/