Skip to content

Commit 86cc14d

Browse files
committed
Merge branch 'development' into fix/list-item-query-fallback
Signed-off-by: DL6ER <dl6er@dl6er.de>
2 parents abca372 + 0af0d74 commit 86cc14d

117 files changed

Lines changed: 17210 additions & 2221 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/.codespellignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ iif
1313
prefered
1414
padd
1515
rabit
16+
clen

.github/.codespellignore_lines

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
self.errors.append("Exception when GETing from FTL: " + str(e))
22
// sitten -> sittin (substitution of "i" for "e"),
33
// sittin -> sitting (insertion of "g" at the end).
4+
"upgrade", "te", "host", "http2-settings",

.github/Dockerfile

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ghcr.io/pi-hole/ftl-build:v2.19
1+
FROM ghcr.io/pi-hole/ftl-build:v2.25
22

33
WORKDIR /app
44

@@ -16,16 +16,28 @@ ENV BUILD_OPTS=${BUILD_OPTS}
1616
# Setting TERM is needed for pretty output in BATS tests
1717
ENV TERM=xterm
1818

19-
# Monkeypatch BATS to remove duplicate output of starting and finished test
20-
# BATS uses ANSI escape codes to overwrite the line after the test has finished
21-
# This is not supported by Github Actions as it does not provide a TTY to the docker build container
22-
RUN sed -i '/buffer_with_truncation /d' /bats/bats-core/libexec/bats-core/bats-format-pretty
19+
# CI starts from a fresh checkout every time, so cmake has no build tree to
20+
# compare against and recompiles all 207 translation units on every run - on
21+
# riscv64, sqlite3.c alone is over half of that under QEMU. ccache is keyed on
22+
# content rather than on mtimes in a build tree, so it survives the fresh clone
23+
# and only units that actually changed are compiled.
24+
ENV CCACHE_DIR=/app/.ccache
25+
ENV CCACHE_MAXSIZE=500M
26+
# Identify the compiler by hashing the binary rather than by its mtime and size,
27+
# which is what ccache would do by default. The compiler arrives in an image
28+
# here, so a rebuilt ftl-build must never be able to reuse entries made by the
29+
# gcc it replaced.
30+
ENV CCACHE_COMPILERCHECK=content
2331

2432
# Build FTL
2533
# Remove possible old build files
2634
RUN rm -rf cmake && \
35+
# Start from clean counters so the statistics below describe this build alone
36+
ccache --zero-stats && \
2737
# Build and test FTL
28-
bash build.sh "-DSTATIC=${STATIC} -DBUILD_TAR_REGRESSION=ON -DBUILD_GZIP_REGRESSION=ON" ${BUILD_OPTS} && \
38+
bash build.sh "-DSTATIC=${STATIC} -DBUILD_TAR_REGRESSION=ON -DBUILD_GZIP_REGRESSION=ON -DBUILD_DOTDOH_REGRESSION=ON -DCMAKE_C_COMPILER_LAUNCHER=ccache" ${BUILD_OPTS} && \
39+
# Report what the cache saved, so the CI log shows whether it is worth keeping
40+
ccache --show-stats && \
2941
# Copy FTL binary to root directory
3042
cd / &&\
3143
cp /app/pihole-FTL . && \

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<!--- Please base your code and PRs against the `development` branch.
2+
3+
Note that we do not accept changes to `src/dnsmasq/`: that tree is a
4+
verbatim copy of upstream dnsmasq. Send fixes for it to the
5+
`dnsmasq-discuss` mailing list instead, see item 6 below. -->
6+
7+
# What does this implement/fix?
8+
9+
<!--- Replace this with a detailed description of your change, screenshots (if necessary), as well as links to any relevant GitHub issues -->
10+
11+
## How to test the change during review
12+
13+
<!--- Replace this with concrete steps a reviewer can run: the manual checks to exercise the change, and which automated tests (bats/pytest/CI matrix) cover it -->
14+
15+
## Additional information
16+
17+
**Related issue or feature (if applicable):** N/A
18+
19+
**Pull request in [docs](https://github.com/pi-hole/docs) with documentation (if applicable):** N/A
20+
21+
---
22+
**By submitting this pull request, I confirm the following:**
23+
24+
1. I have read and understood the [contributors guide](https://docs.pi-hole.net/guides/github/contributing/), as well as this entire template. I understand which branch to base my commits and Pull Requests against.
25+
2. I have commented my proposed changes within the code.
26+
3. I am willing to help maintain this change if there are issues with it later.
27+
4. It is compatible with the [EUPL 1.2 license](https://opensource.org/licenses/EUPL-1.2)
28+
5. I have squashed any insignificant commits. ([`git rebase`](https://gitready.com/advanced/2009/02/10/squashing-commits-with-rebase.html))
29+
6. My change does not modify `src/dnsmasq/`. That tree is a verbatim copy of upstream dnsmasq and we do not carry anything in it that deviates from upstream. Fixes have to go through the [`dnsmasq-discuss` mailing list](https://lists.thekelleys.org.uk/cgi-bin/mailman/listinfo/dnsmasq-discuss) first, we merge them once they are in dnsmasq master.
30+
31+
## Checklist:
32+
33+
- [ ] The code change is tested and works locally.
34+
- [ ] I based my code and PRs against the repository's `development` branch.
35+
- [ ] I [signed off](https://docs.pi-hole.net/guides/github/how-to-signoff/) all commits. Pi-hole enforces the [DCO](https://docs.pi-hole.net/guides/github/dco/) for all contributions
36+
- [ ] I [signed](https://docs.github.com/en/authentication/managing-commit-signature-verification/signing-commits) all my commits. Pi-hole requires signatures to verify authorship
37+
- [ ] I have read the above and my PR is ready for review.

.github/workflows/build.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
steps:
3333
-
3434
name: Checkout code
35-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
35+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
3636
-
3737
name: "Calculate required variables"
3838
id: variables
@@ -110,7 +110,7 @@ jobs:
110110
steps:
111111
-
112112
name: Checkout code
113-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
113+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
114114
# QEMU should come before Buildx
115115
-
116116
name: Set up QEMU
@@ -122,6 +122,19 @@ jobs:
122122
name: Print directory contents
123123
shell: bash
124124
run: ls -l
125+
-
126+
name: Restore ccache
127+
# Restored into the build context, where .github/Dockerfile picks it up
128+
# through its COPY. Keyed per matrix entry: the platforms compile for
129+
# different architectures and the clang entry uses a different compiler,
130+
# so none of them can share entries. The restore-keys prefix falls back
131+
# to whatever the most recent run of this entry saved.
132+
uses: actions/cache/restore@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 #v6.1.0
133+
with:
134+
path: .ccache
135+
key: ccache-${{ matrix.bin_name }}-${{ github.sha }}
136+
restore-keys: |
137+
ccache-${{ matrix.bin_name }}-
125138
-
126139
name: Build FTL in ftl-build container (QEMU)
127140
# Creates an image to build FTL and load it into the local Docker daemon
@@ -140,6 +153,28 @@ jobs:
140153
--build-arg "BUILD_OPTS=${{ matrix.build_opts }}" \
141154
--tag ftl-builder:local \
142155
--file .github/Dockerfile .
156+
-
157+
name: Export ccache from ftl-build container (QEMU)
158+
# Exported here rather than alongside the other files further down, so a
159+
# failing test run does not discard a cache the build just filled. The
160+
# restored copy is removed first, as docker cp would otherwise nest the
161+
# directory inside it.
162+
run: |
163+
docker create --platform ${{ matrix.platform }} --name ccache-container ftl-builder:local
164+
rm -rf .ccache
165+
docker cp ccache-container:/app/.ccache ./.ccache
166+
docker rm ccache-container
167+
-
168+
name: Save ccache
169+
# Cache entries are immutable, so the key carries the commit SHA and
170+
# every run writes a new entry for GitHub to age out. Pull requests only
171+
# run here when they come from a fork, and a fork's token cannot write
172+
# caches, so there is nothing to save for them.
173+
if: github.event_name == 'push'
174+
uses: actions/cache/save@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 #v6.1.0
175+
with:
176+
path: .ccache
177+
key: ccache-${{ matrix.bin_name }}-${{ github.sha }}
143178
-
144179
name: Test FTL in ftl-build container (QEMU)
145180
# Uses the ftl-builder image to run tests
@@ -157,7 +192,7 @@ jobs:
157192
--env BUILD_OPTS=${{ matrix.build_opts }} \
158193
--env STATIC=${STATIC} \
159194
ftl-builder:local \
160-
/bin/bash -c "test/arch_test.sh && test/run.sh"
195+
/bin/bash -c "test/arch_test.sh && test/run.sh && test/http2_test.sh"
161196
-
162197
name: Export FTL files from ftl-build container (QEMU)
163198
# Create a temporary container to extract the built files
@@ -185,7 +220,7 @@ jobs:
185220
path: '${{ matrix.bin_name }}*'
186221
-
187222
name: Generate artifact attestation
188-
uses: actions/attest@a1948c3f048ba23858d222213b7c278aabede763 #v4.1.1
223+
uses: actions/attest@1e69f48acb82d1966a394da916b4c1698aa569d6 #v4.2.2
189224
# Skip attestation if ACTIONS_ID_TOKEN_REQUEST_URL env variable is not
190225
# available (e.g., PR originating from a fork)
191226
if: env.DO_DEPLOY == 'true' && env.ACTIONS_ID_TOKEN_REQUEST_URL != ''
@@ -275,7 +310,7 @@ jobs:
275310
-
276311
name: Attach binaries to release
277312
if: github.event_name == 'release'
278-
uses: softprops/action-gh-release@718ea10b132b3b2eba29c1007bb80653f286566b #v3.0.1
313+
uses: softprops/action-gh-release@3d0d9888cb7fd7b750713d6e236d1fcb99157228 #v3.0.2
279314
with:
280315
tag_name: ${{ github.event.release.tag_name }}
281316
files: |

.github/workflows/codeql.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
5959
steps:
6060
- name: Checkout repository
61-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
61+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
6262

6363
- name: Install dependencies
6464
run: |
@@ -87,7 +87,7 @@ jobs:
8787
8888
# Initializes the CodeQL tools for scanning.
8989
- name: Initialize CodeQL
90-
uses: github/codeql-action/init@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a #v4.36.3
90+
uses: github/codeql-action/init@5595ccaf912efad79be6eef63a5619ff05969be3 #v4.37.6
9191
with:
9292
languages: ${{ matrix.language }}
9393
build-mode: ${{ matrix.build-mode }}
@@ -110,7 +110,7 @@ jobs:
110110
./build.sh
111111
112112
- name: Perform CodeQL Analysis
113-
uses: github/codeql-action/analyze@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a #v4.36.3
113+
uses: github/codeql-action/analyze@5595ccaf912efad79be6eef63a5619ff05969be3 #v4.37.6
114114
with:
115115
category: "/language:${{matrix.language}}"
116116
upload: failure-only # upload only in case of failure, otherwise upload later after filtering
@@ -136,7 +136,7 @@ jobs:
136136
output: codeql-results/cpp.sarif
137137

138138
- name: Upload SARIF
139-
uses: github/codeql-action/upload-sarif@54f647b7e1bb85c95cddabcd46b0c578ec92bc1a #v4.36.3
139+
uses: github/codeql-action/upload-sarif@5595ccaf912efad79be6eef63a5619ff05969be3 #v4.37.6
140140
with:
141141
sarif_file: codeql-results/cpp.sarif
142142

.github/workflows/codespell.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
steps:
1414
-
1515
name: Checkout repository
16-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
16+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
1717
-
1818
name: Spell-Checking
1919
uses: codespell-project/actions-codespell@8f01853be192eb0f849a5c7d721450e7a467c579 #v2.2

.github/workflows/openapi-validator.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212

1313
steps:
1414
- name: Clone repository
15-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
15+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
1616

1717
- name: Set up Node.js
18-
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e #v6.4.0
18+
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 #v7.0.0
1919
with:
2020
node-version: "20"
2121
cache: npm

.github/workflows/stale.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
issues: write
1818

1919
steps:
20-
- uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 #v10.3.0
20+
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 #v11.0.0
2121
with:
2222
repo-token: ${{ secrets.GITHUB_TOKEN }}
2323
days-before-stale: 30
@@ -40,7 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
43+
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1
4444
- name: Remove 'stale' label
4545
run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
4646
env:

.github/workflows/stale_pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
pull-requests: write
1818

1919
steps:
20-
- uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 #v10.3.0
20+
- uses: actions/stale@4391f3da665fdf50b6810c1a66712fb9ba21aa93 #v11.0.0
2121
with:
2222
repo-token: ${{ secrets.GITHUB_TOKEN }}
2323
# Do not automatically mark PR/issue as stale

0 commit comments

Comments
 (0)