Skip to content

Commit 8d7671a

Browse files
authored
Merge pull request #1956 from pi-hole/development
Development
2 parents 7c2dff0 + e751947 commit 8d7671a

10 files changed

Lines changed: 57 additions & 40 deletions

File tree

.github/workflows/build-and-publish.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ jobs:
3131
runner: ubuntu-24.04-arm
3232
- platform: linux/arm64
3333
runner: ubuntu-24.04-arm
34-
# Drop this for the time being. bind-tools is failing to install on riscv64, and I don't have time to dig into it currently.exclude:
35-
# It is unlikely that there are a lot of Pi-hole users on riscv64 architecture, let alone Docker users.
36-
# - platform: linux/riscv64
37-
# runner: ubuntu-24.04-arm
34+
- platform: linux/riscv64
35+
runner: ubuntu-24.04-arm
3836

3937
steps:
4038
- name: Prepare name for digest up/download
@@ -45,19 +43,19 @@ jobs:
4543
- &checkout-repo
4644
name: Checkout Repo
4745
if: github.event_name != 'schedule'
48-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
46+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
4947

5048
- &checkout-dev
5149
name: Checkout dev branch if scheduled
5250
if: github.event_name == 'schedule'
53-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
51+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
5452
with:
5553
ref: development
5654

5755
- &docker-meta
5856
name: Docker meta
5957
id: meta
60-
uses: docker/metadata-action@c1e51972afc2121e065aed6d45c65596fe445f3f #v5.8.0
58+
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 #v5.9.0
6159
with:
6260
github-token: ${{ secrets.GITHUB_TOKEN }}
6361
images: |
@@ -87,7 +85,7 @@ jobs:
8785
password: ${{ secrets.GITHUB_TOKEN }}
8886

8987
- name: Set up QEMU
90-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0
88+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 #v3.7.0
9189
with:
9290
platforms: ${{ matrix.platform}}
9391

.github/workflows/build-and-test.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,16 @@ jobs:
1919
runner: ubuntu-24.04-arm
2020
- platform: linux/arm64
2121
runner: ubuntu-24.04-arm
22-
# Drop this for the time being. bind-tools is failing to install on riscv64, and I don't have time to dig into it currently.exclude:
23-
# It is unlikely that there are a lot of Pi-hole users on riscv64 architecture, let alone Docker users.
24-
# - platform: linux/riscv64
25-
# runner: ubuntu-24.04-arm
22+
- platform: linux/riscv64
23+
runner: ubuntu-24.04-arm
2624
env:
2725
CI_ARCH: ${{ matrix.platform }}
2826
steps:
2927
- name: Checkout Repo
30-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
28+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
3129

3230
- name: Set up QEMU
33-
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 #v3.6.0
31+
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 #v3.7.0
3432

3533
- name: Set up Python
3634
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v6.0.0

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
steps:
1111
-
1212
name: Checkout repository
13-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
13+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
1414
-
1515
name: Spell-Checking
16-
uses: codespell-project/actions-codespell@406322ec52dd7b488e48c1c4b82e2a8b3a1bf630 #v2.1
16+
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 #v2.2
1717
with:
1818
ignore_words_file: .codespellignore
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Update Docker Hub Description
2+
permissions:
3+
contents: read
4+
on:
5+
push:
6+
branches:
7+
- master
8+
paths:
9+
- README.md
10+
- .github/workflows/dockerhub-description.yml
11+
jobs:
12+
dockerHubDescription:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
16+
17+
- name: Docker Hub Description
18+
uses: peter-evans/dockerhub-description@1b9a80c056b620d92cedb9d9b5a223409c68ddfa #v5
19+
with:
20+
username: ${{ secrets.DOCKERHUB_USER }}
21+
password: ${{ secrets.DOCKERHUB_PASS }}
22+
repository: pihole/pihole
23+
short-description: ${{ github.event.repository.description }}

.github/workflows/editorconfig.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout repository
12-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
12+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
1313

1414
- name: Get editorconfig-checker
1515
uses: editorconfig-checker/action-editorconfig-checker@4b6cd6190d435e7e084fb35e36a096e98506f7b9 #v2.1.0

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
runs-on: ubuntu-latest
4242
steps:
4343
- name: Checkout
44-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
44+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
4545
- name: Remove 'stale' label
4646
run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
4747
env:

.github/workflows/sync-back-to-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
name: Syncing branches
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0
14+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 #v6.0.0
1515
- name: Opening pull request
1616
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
1717
env:

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ services:
7676
TZ: 'Europe/London'
7777
# Set a password to access the web interface. Not setting one will result in a random password being assigned
7878
FTLCONF_webserver_api_password: 'correct horse battery staple'
79-
# If using Docker's default `bridge` network setting the dns listening mode should be set to 'all'
80-
FTLCONF_dns_listeningMode: 'all'
79+
# If using Docker's default `bridge` network setting the dns listening mode should be set to 'ALL'
80+
FTLCONF_dns_listeningMode: 'ALL'
8181
# Volumes store your data between container upgrades
8282
volumes:
8383
# For persisting Pi-hole's databases and common configuration file
@@ -300,6 +300,8 @@ We have noticed that a lot of people use Watchtower to keep their Pi-hole contai
300300
- If you care about your data (logs/customizations), make sure you have it volume-mapped or it will be deleted in this step.
301301
- Recreate the container using the new image.
302302
303+
To exclude the Pi-hole container from Watchtower's auto-update system take a look at [Full Exclude](https://containrrr.dev/watchtower/container-selection/#full_exclude) in Watchtower's docs.
304+
303305
Pi-hole is an integral part of your network, don't let it fall over because of an unattended update in the middle of the night.
304306
305307
# User Feedback

src/start.sh

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,13 @@ start() {
5858
fix_capabilities
5959
sh /opt/pihole/pihole-FTL-prestart.sh
6060

61+
# Get the FTL log file path from the config
62+
FTLlogFile=$(getFTLConfigValue files.log.ftl)
63+
64+
# Get the EOF position of the FTL log file so that we can tail from there later.
65+
local startFrom
66+
startFrom=$(stat -c%s "${FTLlogFile}")
67+
6168
echo " [i] Starting pihole-FTL ($FTL_CMD) as ${DNSMASQ_USER}"
6269
echo ""
6370

@@ -70,18 +77,11 @@ start() {
7077
# We need the PID of the capsh process so that we can wait for it to finish
7178
CAPSH_PID=$!
7279

73-
# Get the FTL log file path from the config
74-
FTLlogFile=$(getFTLConfigValue files.log.ftl)
75-
76-
# Wait until the log file exists before continuing
77-
while [ ! -f "${FTLlogFile}" ]; do
78-
sleep 0.5
79-
done
80-
81-
# Wait until the FTL log contains the "FTL started" message before continuing
82-
while ! grep -q '########## FTL started' "${FTLlogFile}"; do
83-
sleep 0.5
84-
done
80+
# Wait for FTL to start by monitoring the FTL log file for the "FTL started" line
81+
if ! timeout 30 tail -F -c +$((startFrom + 1)) -- "${FTLlogFile}" | grep -q '########## FTL started'; then
82+
echo " [!] ERROR: Did not find 'FTL started' message in ${FTLlogFile} in 30 seconds, stopping container"
83+
exit 1
84+
fi
8585

8686
pihole updatechecker
8787
local versionsOutput
@@ -91,11 +91,8 @@ start() {
9191
echo ""
9292

9393
if [ "${TAIL_FTL_LOG:-1}" -eq 1 ]; then
94-
# Start tailing the FTL log from the most recent "FTL Started" message
95-
# Get the line number
96-
startFrom=$(grep -n '########## FTL started' "${FTLlogFile}" | tail -1 | cut -d: -f1)
97-
# Start the tail from the line number and background it
98-
tail --follow=name -n +"${startFrom}" "${FTLlogFile}" &
94+
# Start tailing the FTL log file from the EOF position we recorded on container start
95+
tail -F -c +$((startFrom + 1)) -- "${FTLlogFile}" &
9996
else
10097
echo " [i] FTL log output is disabled. Remove the Environment variable TAIL_FTL_LOG, or set it to 1 to enable FTL log output."
10198
fi
@@ -104,7 +101,6 @@ start() {
104101
wait $CAPSH_PID
105102
FTL_EXIT_CODE=$?
106103

107-
108104
# If we are here, then FTL has exited.
109105
# If the trap was triggered, then stop will have already been called
110106
if [ $TRAP_TRIGGERED -eq 0 ]; then

test/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
pytest == 8.4.2
1+
pytest == 9.0.1
22
pytest-testinfra == 10.2.2
33
pytest-clarity == 1.0.1
44
tox == 4.32.0

0 commit comments

Comments
 (0)