Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development v6 #1950

Merged
merged 2,128 commits into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2128 commits
Select commit Hold shift + click to select a range
5db4ade
Use TCP queries for internal name resolution to avoid truncated replies
DL6ER May 26, 2024
090c1ad
Implement later retrying if name resolution attempt failed temporaril…
DL6ER May 27, 2024
5a539a9
Add NTP-server/client implementation
DL6ER May 28, 2024
3de9e12
Change magic comment put next to config options which are forced thro…
DL6ER May 28, 2024
2cb6b36
Print config file statistics at the end of the config file
DL6ER May 28, 2024
cdc7d00
Add missing help text for new ntp-client option
DL6ER May 28, 2024
a5f5092
List forced environment variables at end of the config file
DL6ER May 28, 2024
7bfe4dc
Reset config options previously forced by env vars but not any longer
DL6ER May 28, 2024
980cc84
Reset special debug.all in a similar way
DL6ER May 29, 2024
23d9476
Merge pull request #1962 from pi-hole/new/clang
DL6ER May 29, 2024
c6e776d
Merge branch 'development-v6' into tweak/env_reset
DL6ER May 29, 2024
63c4be6
Merge branch 'development-v6' into new/ntp
DL6ER May 29, 2024
86d6833
Merge branch 'development-v6' into fix/resolver
DL6ER May 29, 2024
60b1a75
Merge pull request #1979 from pi-hole/tweak/env_reset
DL6ER May 29, 2024
19715ea
Add help description of new optional ptr IP [tcp] flag
DL6ER May 29, 2024
51de04c
Fix include paths
DL6ER May 29, 2024
47c7de6
Merge pull request #1976 from pi-hole/fix/resolver
DL6ER May 30, 2024
7ff016f
Merge pull request #1737 from pi-hole/new/migrate_dnsmasq_conf
DL6ER May 30, 2024
8e34c3e
Merge branch 'development-v6' into tweak/remove_expert_flag
DL6ER May 30, 2024
6fa6a20
Merge branch 'development-v6' into fix/domainNeeded
DL6ER May 30, 2024
1a5e7f6
Add new dhcp.ignoreUnknownClients option
DL6ER May 30, 2024
96da0d4
Synchronize test/pihole.toml with the many config file changes that h…
DL6ER May 30, 2024
1f6d9c1
Explicitly chown PID and remove old PORT file
DL6ER May 30, 2024
306710e
Add timezone information where this is appropriate. We do not include…
DL6ER May 30, 2024
7db4483
Update macvendor script
DL6ER May 31, 2024
021c0a1
Merge pull request #1983 from pi-hole/fix/macvendor_db
DL6ER May 31, 2024
f4b9ca2
Merge pull request #1980 from pi-hole/new/dhcp_ignoreUnknownClients
DL6ER Jun 1, 2024
aac9968
Merge branch 'development-v6' into new/timezone
DL6ER Jun 1, 2024
391f7d0
Merge branch 'development-v6' into new/ntp
DL6ER Jun 1, 2024
d406327
Synchronize pihole.toml and config.c
DL6ER Jun 1, 2024
4be0ff6
Bump eps1lon/actions-label-merge-conflict
dependabot[bot] Jun 1, 2024
d66db45
Merge pull request #1984 from pi-hole/dependabot-github_actions-devel…
yubiuser Jun 1, 2024
daa26ae
Implement time updating via optional --update flag and switch to unsi…
DL6ER Jun 2, 2024
79c966e
Reduce code duplication
DL6ER Jun 2, 2024
f8990e7
Average over up to eight successive NTP queries to reduce total time …
DL6ER Jun 2, 2024
14ea246
Always include timezone in human-readable timestamps
DL6ER Jun 2, 2024
58c59a0
Skip certificate domain check when TLS is not actually used even if a…
DL6ER Jun 2, 2024
3d2fd6d
Add new misc.readOnly config option to force the configuration to be …
DL6ER Jun 2, 2024
d343959
Default to resolve internal PTRs using UDP, fall back to TCP for indi…
DL6ER Jun 2, 2024
5b9df02
Add missing newlines in dnsmasq config
DL6ER Jun 2, 2024
9f8c4c2
Merge pull request #1981 from pi-hole/new/timezone
DL6ER Jun 2, 2024
d343781
Merge pull request #1986 from pi-hole/fix/retry_truncated
DL6ER Jun 2, 2024
f2c14cc
Fix incorrect unification of regex warnings
DL6ER Jun 3, 2024
1899792
Store correct database ID when issuing a warning
DL6ER Jun 3, 2024
b20d80f
Merge pull request #1989 from pi-hole/fix/regex_diagnosis
DL6ER Jun 3, 2024
af0468e
Fix very long DNS names (>64 bytes) potentially crashing the internal…
DL6ER Jun 3, 2024
a564e32
Merge pull request #1990 from pi-hole/fix/long_dns_names
DL6ER Jun 3, 2024
a724402
Merge pull request #1987 from pi-hole/tweak/cert_no_tls
DL6ER Jun 3, 2024
d8469bd
Merge branch 'development-v6' into new/ntp
DL6ER Jun 4, 2024
7c0d7e8
Add debug.ntp flag
DL6ER Jun 4, 2024
10e4c73
Use trimmed mean to compute time offset to exclude outliers where pac…
DL6ER Jun 4, 2024
de45ba8
Add CAP_SYS_TIME to required capabilities to set the system time with…
DL6ER Jun 4, 2024
12758da
Use David L. Mills' clock adjustment algorithm (RFC 5905) for gradual…
DL6ER Jun 4, 2024
3971e67
Add NTP background synchronization
DL6ER Jun 4, 2024
a872c03
Fix formating error
DL6ER Jun 4, 2024
2269cae
Make NTP sync thread cancelable
DL6ER Jun 4, 2024
61826a4
Merge pull request #1883 from pi-hole/tweak/remove_expert_flag
PromoFaux Jun 5, 2024
f088b79
Exit synchronization early if no trimmed time offest average is avala…
DL6ER Jun 6, 2024
85fdaff
Merge branch 'development-v6' into new/misc_readOnly
DL6ER Jun 6, 2024
ee8f989
Add NTP settings category to the API and create all threads in detach…
DL6ER Jun 6, 2024
d923904
Tweak config option description
DL6ER Jun 6, 2024
08f2e37
Apply suggestions from code review
DL6ER Jun 6, 2024
44d57e5
Add checking of return status of sqlite3_open_v2 to ensure we are not…
DL6ER Jun 6, 2024
9491cdf
Merge pull request #1992 from pi-hole/fix/no_gravity
DL6ER Jun 6, 2024
f9eea51
Ensure we also recalculate te checksum of the config file when in rea…
DL6ER Jun 6, 2024
2406e1a
Check if the newly set password is the same as the old one
DL6ER Jun 6, 2024
93f751f
Use adjtimex instead of adjtime as the latter uses the former (see ht…
DL6ER Jun 7, 2024
671771c
Improve NTP synchronization by rejecting synchronization if the stand…
DL6ER Jun 7, 2024
fb0b06e
Merge branch 'new/ntp' of github.com:pi-hole/FTL into new/ntp
DL6ER Jun 7, 2024
791e3a8
Add RTC synchronization
DL6ER Jun 7, 2024
a05bf8d
Improve shutdown sequence of threads
DL6ER Jun 10, 2024
27db8a4
Copy root delay/dispersion errors from upstream server (after first u…
DL6ER Jun 10, 2024
fcc0a5a
Use "fresh" sockets for NTP client requests to avoid reusing the same…
DL6ER Jun 10, 2024
d737bf5
Determine root dispersion and error based on our own most recent time…
DL6ER Jun 10, 2024
b8eee89
Do not detach threads because we want to join them during shutdown
DL6ER Jun 10, 2024
ec6750d
Make definition of __USE_MISC conditional
DL6ER Jun 10, 2024
9bc0d4c
Fix root delay/dispersion debug printing
DL6ER Jun 11, 2024
90ba90a
Pre-define thread names so they can always be shown during shutdown, …
DL6ER Jun 11, 2024
2516dcf
Always join threads if they have ever been started to avoid resource …
DL6ER Jun 11, 2024
126d4d8
Mark timer thread as running
DL6ER Jun 12, 2024
7adda9a
Merge pull request #1993 from pi-hole/tweak/pogo
DL6ER Jun 12, 2024
e70c364
Add message table entries for selected NTP warnings/errors
DL6ER Jun 13, 2024
3ae3afa
Fix harmless incorrect warning when generating HTML regex messages
DL6ER Jun 13, 2024
e05d931
Spellchecking
DL6ER Jun 13, 2024
09a1f6f
Adjust CI tests due to modified NTP error message text
DL6ER Jun 13, 2024
5a6a212
Add special handling for systems without password in the password che…
DL6ER Jun 13, 2024
950fc60
Limit app password permissions by default. Add new app_sudo mode for …
DL6ER Jun 14, 2024
01c5c56
Merge pull request #1994 from pi-hole/fix/env_password
DL6ER Jun 15, 2024
d394808
Apply code review
DL6ER Jun 15, 2024
4f60134
Improve config description of webserver.api.app_sudo
DL6ER Jun 15, 2024
bf47650
Bump actions/checkout in the github_action-dependencies group
dependabot[bot] Jun 15, 2024
b318256
Fix API hint
yubiuser Jun 15, 2024
a09088e
Merge pull request #1996 from pi-hole/dependabot-github_actions-devel…
yubiuser Jun 15, 2024
c82676b
Merge pull request #1998 from pi-hole/no_dnsmasq
yubiuser Jun 15, 2024
0ed7f6d
Fix app status not being backed up correctly during FTL restarts
DL6ER Jun 16, 2024
87dd091
Fix crash caused by double free() corruption encountered with rev-ser…
DL6ER Jun 16, 2024
784e119
Add CLI password generation
DL6ER Jun 19, 2024
b74696f
Remove webserver.api.searchAPIauth option
DL6ER Jun 19, 2024
069cc30
Remove webserver.api.localAPIauth option
DL6ER Jun 19, 2024
a5569d5
Add CI test for generation and permissions of CLI password file
DL6ER Jun 19, 2024
9e329be
Fix DNS-SD query analysis
DL6ER Jun 21, 2024
75b5e5f
Merge pull request #2000 from pi-hole/fix/dns-sd
DL6ER Jun 24, 2024
b45695c
Restart FTL if system time has been updated by more than one hour usi…
DL6ER Jun 25, 2024
96f7dff
Merge pull request #1988 from pi-hole/new/misc_readOnly
DL6ER Jun 25, 2024
ab52ea0
Merge branch 'development-v6' into new/ntp
DL6ER Jun 25, 2024
f863c05
Update embedded LUA engine to 5.4.7
DL6ER Jun 25, 2024
0367117
Merge pull request #2003 from pi-hole/update/lua_5.4.7
DL6ER Jun 25, 2024
23ddd85
Check if database is actually writable when we request this
DL6ER Jun 26, 2024
5c2da0d
Only use valid replies. Before, invalid replies would have contribute…
DL6ER Jun 26, 2024
b3d72cb
Load queries only after first NTP synchronization (if enabled)
DL6ER Jun 26, 2024
6d164a3
Remove restarting step as queries are now loaded *after* NTP time syn…
DL6ER Jun 26, 2024
14e7167
Styling
DL6ER Jun 26, 2024
6eff029
Check availablity of CAP_SYS_TIME when NTP client is invoked from CLI
DL6ER Jun 27, 2024
4e55268
Clarify which server is used when invoked via CLI
DL6ER Jun 27, 2024
ec0e0c9
Print database statistics after historic queries have been loaded fro…
DL6ER Jun 27, 2024
8e63dd9
Adjust tests
DL6ER Jun 27, 2024
3f7d317
Check capabilities only when user requested updating time time
DL6ER Jun 27, 2024
0278cc1
Update condig item description as suggested during code review
DL6ER Jun 29, 2024
fbae3b9
Merge pull request #1977 from pi-hole/new/ntp
DL6ER Jun 29, 2024
e0330a3
Merge branch 'development-v6' into new/app_sudo
DL6ER Jun 29, 2024
630b358
Merge branch 'development-v6' into new/cli_pw
DL6ER Jun 29, 2024
76cfb5b
Merge pull request #1995 from pi-hole/new/app_sudo
DL6ER Jun 29, 2024
bc96dec
Merge branch 'development-v6' into new/cli_pw
DL6ER Jun 29, 2024
62acbce
Backup and restore CLI session property
DL6ER Jun 29, 2024
9de4336
Update expected database schema in CI tests
DL6ER Jun 30, 2024
10491f0
Query CLI property from database table
DL6ER Jun 30, 2024
1e41902
Merge pull request #1999 from pi-hole/new/cli_pw
DL6ER Jun 30, 2024
8e032db
Start NTP server only after first successful NTP synchronization
DL6ER Jul 1, 2024
a04303a
Ensure NTP servers are properly terminated when FTL is shutting down …
DL6ER Jul 1, 2024
1abf158
Fix compile problem with Pogoplug, reported on Discourse
DL6ER Jul 1, 2024
a037276
DNSSEC signatures are only valid for specified time windows, and shou…
DL6ER Jul 1, 2024
49cd5da
Merge pull request #2006 from pi-hole/tweak/pogo2
DL6ER Jul 1, 2024
4d32ffe
Run the NTP test later in the test suite to ensure the NTP server has…
DL6ER Jul 1, 2024
c846b21
Add new ntp.sync.active boolean to ease disabling of the NTP client. …
DL6ER Jul 1, 2024
a3d2d46
Start NTP server also when NTP client is disabled - the system may ge…
DL6ER Jul 1, 2024
4059586
Do not even try to start NTP client thread if CAP_SYS_TIME is not ava…
DL6ER Jul 1, 2024
0b82825
The CI containers may not be able to set the host's time - this is okay
DL6ER Jul 1, 2024
73d5827
Log API warnings caused by send_json_error() only if debug.api is true
DL6ER Jul 1, 2024
4781c8d
Do not add errors encountered seen in CLI mode to the message table
DL6ER Jul 2, 2024
cdeb5e3
Add which capability is missing in warnings (if applicable). Also red…
DL6ER Jul 2, 2024
5c97d29
Merge pull request #2005 from pi-hole/tweak/api_warnings_debug
DL6ER Jul 3, 2024
1e251fb
Remove hard-coded signal name from reloading string
DL6ER Jul 5, 2024
bfd242d
Importmetatables already before delayed importing of queries during s…
DL6ER Jul 5, 2024
93ca236
Revert "Importmetatables already before delayed importing of queries …
DL6ER Jul 6, 2024
f2f8c24
Revert "DNSSEC signatures are only valid for specified time windows, …
DL6ER Jul 6, 2024
7f070e6
Load queries during initialization of FTL
DL6ER Jul 6, 2024
e07858f
Restart FTL if system time has been updated by more than one hour us…
DL6ER Jul 6, 2024
3aa3e84
Use abs(time_delta) to ensure we also restart if coming from the futu…
DL6ER Jul 8, 2024
3e7bfd3
Usw double time calculation
DL6ER Jul 8, 2024
172eaa5
Parse additional kernel info to get more IPv6 address details and las…
DL6ER Jul 8, 2024
00ff114
Do not start threads in detached mode. Joining them may SEGFAULT with…
DL6ER Jul 9, 2024
6cf1a67
Add netlink implementation
DL6ER Jul 9, 2024
c9cfd38
Merge pull request #2008 from pi-hole/fix/joining
DL6ER Jul 10, 2024
35166fd
Fix a small bug in the API response verifier and ensure we always fav…
DL6ER Jul 13, 2024
c284d64
Move netlink under tools/
DL6ER Jul 14, 2024
c342c60
fail*.dnssec.works changed its configuration from being BOGUS to ABAN…
DL6ER Jul 14, 2024
7c42a78
Report cstamp/tstamp in wall_clock time
DL6ER Jul 14, 2024
66b7fdf
Add link-netnsid and address types
DL6ER Jul 15, 2024
f12d14f
Merge pull request #2010 from pi-hole/fix/rev-servers-crash
yubiuser Jul 15, 2024
b75db0e
Merge branch 'development-v6' into tweak/ntp_delay
DL6ER Jul 16, 2024
c91ac40
fail*.dnssec.works changed its configuration from being BOGUS to ABAN…
DL6ER Jul 14, 2024
c29e87d
Merge pull request #2012 from pi-hole/fix/ci_dnssec
DL6ER Jul 16, 2024
d39703b
Restart timer if set even if no blocking mode change was requested. T…
DL6ER Jul 16, 2024
af7ea10
Implement actual TOP suggestions for the Query Log
DL6ER Jun 25, 2024
d01809a
Sort only once for TOP clients
DL6ER Jun 25, 2024
94dceae
Only add non-empty TOP replies
DL6ER Jun 25, 2024
5d2d74a
Fix LegacyKeyValueFormat warning during CI builds
DL6ER Jun 25, 2024
bf1355c
Increase speed of the /api/stats/* endpoints by reducing the use of s…
DL6ER Jul 16, 2024
5fdfeb9
Add blocked domains in Query Log suggestions
DL6ER Jul 16, 2024
307436e
Merge branch 'development-v6' into tweak/ntp_delay
DL6ER Jul 16, 2024
0a971d3
Remove duplicates from client name suggestions
DL6ER Jul 18, 2024
e128d86
Undo unintended test change
DL6ER Jul 18, 2024
d948208
Merge pull request #2004 from pi-hole/tweak/ntp_delay
DL6ER Jul 18, 2024
1dbd955
Merge pull request #2011 from pi-hole/tweak/blocking_timer
DL6ER Jul 18, 2024
10e98d1
Merge pull request #2001 from pi-hole/tweak/top_suggests
DL6ER Jul 19, 2024
f07d902
Merge branch 'development-v6' into tweak/api_network_info
DL6ER Jul 19, 2024
260456c
Implement fully self-contained VALID/BOGUS DNSSEC zones for our CI tests
DL6ER Jul 22, 2024
ac1db97
Merge pull request #2014 from pi-hole/test/internal-dnssec
DL6ER Jul 22, 2024
3b85e10
Merge pull request #1900 from pi-hole/fix/domainNeeded
DL6ER Jul 23, 2024
1381fd0
Merge pull request #2009 from pi-hole/tweak/api_network_info
DL6ER Jul 23, 2024
d6bf943
Remove webserver.tls.rev_server config option
DL6ER Jul 22, 2024
64144a9
Add session.x_forwarded_for property to API sessions
DL6ER Jul 23, 2024
d3e4f10
Fix "Conditional jump or move depends on uninitialised value(s)" in d…
DL6ER Jul 22, 2024
092a68d
Remove minor (fre bytes) memory-leaks in resolver code. Ensure to fin…
DL6ER Jul 22, 2024
ca1c870
Fix possible memory leak when handling special domains
DL6ER Jul 22, 2024
966650c
Memorize parent memory pointers when reopening gravity database in fo…
DL6ER Jul 22, 2024
ac2aa95
Merge pull request #2015 from pi-hole/tweak/something
DL6ER Jul 24, 2024
f32b68a
Add undocumented sigtest feature
DL6ER Jul 18, 2024
8b566e3
Add extra debug logging and reduce code duplication in signal handlin…
DL6ER Jul 22, 2024
d54f0a2
Handle SIGTERM in FTL if dnsmasq failed to start. Otherwise, we may e…
DL6ER Jul 25, 2024
ae1415f
Add new 2024 DNS root trust anchor published today on www.iana.org
DL6ER Jul 26, 2024
5fdb6cd
Merge pull request #2017 from pi-hole/new/sigtest
DL6ER Jul 26, 2024
46e4564
Merge pull request #2018 from pi-hole/tweak/dnssec_ksk_2024
DL6ER Jul 26, 2024
7c00ea3
Merge pull request #2016 from pi-hole/tweak/proxy
DL6ER Jul 29, 2024
e942301
Improve automatic PTR handling code, fix a small memory leak and remo…
DL6ER Jul 30, 2024
4c4489a
Use pipe to main process instead of printing directly from the signal…
DL6ER Jul 31, 2024
c9275ac
Merge pull request #2019 from pi-hole/tweak/autoPTR
DL6ER Jul 31, 2024
1c2e44d
Use client->firstSeen for new cients for the netDB if available
DL6ER Aug 1, 2024
7363476
Remove deprecated asprintf() calls from network-table code
DL6ER Aug 1, 2024
04f2559
Update firstSeen on importing clients from the database. Before, thei…
DL6ER Aug 1, 2024
4d71d88
Add exception for the case where the device is not yet in the databas…
DL6ER Aug 2, 2024
1fb9df9
127.0.0.1 is not in the ARP table and handled specially
DL6ER Aug 3, 2024
1b2ce29
Fix value overflow in get_top_upstreams() due to in_port_t being an u…
DL6ER Aug 3, 2024
f0c8e94
Merge pull request #2024 from pi-hole/fix/port_overflow
DL6ER Aug 4, 2024
cce2c21
Merge pull request #2022 from pi-hole/fix/netDBfirstSeen
DL6ER Aug 4, 2024
23c2607
Add new GET /api/padd endpoint
DL6ER Aug 5, 2024
e5d901a
Improve pihole-FTL process concurrency
DL6ER Aug 6, 2024
5659393
Be more explicit about errors appending to the main FTL log file
DL6ER Aug 7, 2024
a2d1d16
Do not read config.files.log.ftl from the TOML file if it has been se…
DL6ER Aug 9, 2024
e6f5bf7
ALways log to syslog when writing to the logfile failed
DL6ER Aug 9, 2024
72e2a0b
Immediately continue after canceling a thread. It may crash FTL other…
DL6ER Aug 10, 2024
467f5b5
Merge pull request #2025 from pi-hole/tweak/multi-FTL
DL6ER Aug 10, 2024
6928ddf
Directly specify NTP port instead of service by name. Having checked …
DL6ER Aug 10, 2024
b6838de
Merge pull request #2026 from pi-hole/new/api_padd
yubiuser Aug 12, 2024
57b9bac
Merge pull request #2027 from pi-hole/fix/ntp_service_unknown
DL6ER Aug 12, 2024
828dd7b
Update embedded SQLite3 engine to 3.46.1 released today. None of the …
DL6ER Aug 13, 2024
f2ae6db
Add further API debugging to top_client generation and fix an incorre…
DL6ER Aug 13, 2024
338e099
Merge pull request #2031 from pi-hole/update/sqlite_3.46.1
DL6ER Aug 13, 2024
0c36f47
Merge pull request #2032 from pi-hole/fix/top_clients
DL6ER Aug 14, 2024
0756183
Update embedded CivetWeb to latest master of their repo
DL6ER Aug 15, 2024
ce62ddc
Apply and update Pi-hole patches
DL6ER Aug 15, 2024
1c8579e
Fix headers not being correctly handled for Kepler-style Lua server p…
DL6ER Aug 18, 2024
588ae42
Improve behavior on systems where mandatory config file locations are…
DL6ER Aug 18, 2024
72f9874
Clarify that our version of CivetWeb has been modified for our needs
DL6ER Aug 18, 2024
c2ebb3c
Merge pull request #2033 from pi-hole/update/civetweb
DL6ER Aug 19, 2024
f40d895
Merge pull request #2036 from pi-hole/tweak/config_warnings
DL6ER Aug 20, 2024
070544b
Implement DNS caching for queries blocked upstream (NXDOMAIN + no RA,…
DL6ER Aug 12, 2024
17b9bfc
If multiple records are returned but at least one is a blocked IP add…
DL6ER Aug 12, 2024
af1c5b3
Add new config option dns.cache.upstreamTTL (defaulting to one day) f…
DL6ER Aug 21, 2024
7fea068
Allow other FTL process inside docker
DL6ER Aug 22, 2024
267d150
Make v5 -> v6 migration verbose by default (not only when debug.confi…
DL6ER Aug 25, 2024
2341704
Merge pull request #2037 from pi-hole/fix/another_in_docker
DL6ER Aug 26, 2024
c98f1cf
Avoid (unlikely) memory leaking and ensure we properly reset the conf…
DL6ER Aug 20, 2024
358478e
Ensure we free all memory in ngethostbyname()
DL6ER Aug 22, 2024
8571c99
Restart FTL on change of webserver.api.cli_pw
DL6ER Aug 26, 2024
42b626f
Rename dns.cache.upstreamTTL -> dns.cache.upstreamBlockedTTL
DL6ER Aug 26, 2024
453cdef
Update src/config/setupVars.c
DL6ER Aug 26, 2024
727c76d
Merge pull request #2043 from pi-hole/fix/config_crash2
DL6ER Aug 27, 2024
ee9ca39
Merge pull request #2030 from pi-hole/new/cache_upstream_replies
DL6ER Aug 27, 2024
c09ce7c
Remove CLI password file after emptying it
DL6ER Aug 29, 2024
1e0bec5
Use ftl-build:v2.7 builder for Actions
DL6ER Aug 31, 2024
9afc12e
Merge pull request #2046 from pi-hole/tweak/ftl-build
DL6ER Aug 31, 2024
8001aa0
Merge pull request #2041 from pi-hole/fix/cli_pw_restart
DL6ER Sep 2, 2024
0fa865a
Add GET /api/stats/summary -> .gravity.last_update timestamp exposing…
DL6ER Sep 2, 2024
68a14bf
Use total number of *configured* (= existing) cores rather then the n…
DL6ER Aug 31, 2024
f13a760
Merge pull request #2048 from pi-hole/new/stats_last_gravity_update
DL6ER Sep 2, 2024
11d6c79
Merge pull request #2047 from pi-hole/tweak/nprocs_conf
DL6ER Sep 2, 2024
ecc05dc
Remove appending ?target=... when redirecting to the login page. web-…
DL6ER Sep 2, 2024
0f4448b
Merge pull request #2049 from pi-hole/tweak/remove_redirection
DL6ER Sep 2, 2024
e5a24bd
Merge pull request #2042 from pi-hole/tweak/verbose_migration
DL6ER Sep 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
30 changes: 21 additions & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,22 @@
{
"name": "FTL x86_64 Build Env",
"image": "ghcr.io/pi-hole/ftl-build:x86_64",
"extensions": [
"jetmartin.bats",
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"eamodio.gitlens"
],
}
"name": "FTL x86_64 Build Env",
"image": "ghcr.io/pi-hole/ftl-build:nightly",
"runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
"customizations": {
"vscode": {
"extensions": [
"jetmartin.bats",
"ms-vscode.cpptools",
"ms-vscode.cmake-tools",
"eamodio.gitlens",
"github.copilot",
"ms-python.python"
]
}
},
"mounts": [
"type=bind,source=/home/${localEnv:USER}/.ssh,target=/root/.ssh,readonly",
"type=bind,source=/var/www/html,target=/var/www/html,readonly"
]

}
11 changes: 10 additions & 1 deletion .github/.codespellignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,14 @@ ssudo
tre
ede
nd
doubleclick
requestor
requestors
requestors
punycode
bitap
mmapped
dnsmasq
iif
prefered
padd
rabit
3 changes: 3 additions & 0 deletions .github/.codespellignore_lines
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
self.errors.append("Exception when GETing from FTL: " + str(e))
// sitten -> sittin (substitution of "i" for "e"),
// sittin -> sitting (insertion of "g" at the end).
30 changes: 30 additions & 0 deletions .github/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
FROM ghcr.io/pi-hole/ftl-build:v2.7 AS builder

WORKDIR /app

COPY . /app

ARG CI_ARCH="linux/amd64"
ENV CI_ARCH=${CI_ARCH}
ARG GIT_BRANCH="test"
ENV GIT_BRANCH=${GIT_BRANCH}
ARG GIT_TAG="test"
ENV GIT_TAG=${GIT_TAG}
ARG BUILD_OPTS=""
ENV BUILD_OPTS=${BUILD_OPTS}

# Build FTL
# Remove possible old build files
RUN rm -rf cmake && \
# Build and test FTL
bash build.sh "-DSTATIC=${STATIC}" test ${BUILD_OPTS} && \
# Move FTL binary to root directory
cd / &&\
mv /app/pihole-FTL . && \
# Create tarball of API docs
tar -C /app/src/api/docs/content/ -czvf /api-docs.tar.gz .

# Create final image containing only the FTL binary and API docs
FROM scratch AS result
COPY --from=builder /pihole-FTL /pihole-FTL
COPY --from=builder /api-docs.tar.gz /api-docs.tar.gz
142 changes: 142 additions & 0 deletions .github/actions/build-and-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
name: Build and test
description: Builds and tests FTL on all supported platforms

inputs:
platform:
required: true
description: The platform to build for
build_opts:
required: true
description: Any extra build opts to use
git_branch:
required: true
description: The branch to build from
git_tag:
required: true
description: The tag to build from (if any)
bin_name:
required: true
description: The name of the binary to build
artifact_name:
required: true
description: The name of the artifact to upload
event_name:
required: true
description: The name of the event that triggered the workflow run
actor:
required: true
description: The name of the user or app that initiated the workflow run
target_dir:
required: true
description: The directory to deploy the artifacts to
# Secrets cannot be accessed in the action.yml file so we need to pass them as
# inputs to the action.
SSH_KEY:
required: true
description: The SSH private key to use for authentication
KNOWN_HOSTS:
required: true
description: The SSH known hosts file
SSH_USER:
required: true
description: The SSH user to use for authentication
SSH_HOST:
required: true
description: The SSH host to connect to

# Both the definition of environment variables and checking out the code
# needs to be done outside of the composite action as
# - environment variables cannot be defined using inputs
# - the checkout action needs to be the first step in the workflow, otherwise we
# cannot use the composite action as the corresponding "action.yml" isn't
# there yet
runs:
using: "composite"
steps:
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.1.0
-
name: Print directory contents
shell: bash
run: ls -l
-
name: Build and test FTL in ftl-build container (QEMU)
uses: Wandalen/wretry.action@v1.4.8
with:
attempt_limit: 3
action: docker/build-push-action@v5.0.0
with: |
platforms: ${{ inputs.platform }}
pull: true
push: false
context: .
target: result
file: .github/Dockerfile
outputs: |
type=tar,dest=build.tar
build-args: |
"CI_ARCH=${{ inputs.platform }}"
"GIT_BRANCH=${{ inputs.git_branch }}"
"GIT_TAG=${{ inputs.git_tag }}"
"BUILD_OPTS=${{ inputs.build_opts }}"
-
name: List files in current directory
shell: bash
run: ls -l
-
name: Extract FTL binary from container
shell: bash
run: |
tar -xf build.tar pihole-FTL
-
name: "Generate checksum file"
shell: bash
run: |
mv pihole-FTL "${{ inputs.bin_name }}"
sha1sum pihole-FTL-* > ${{ inputs.bin_name }}.sha1
-
name: Store binary artifacts for later deployoment
if: inputs.event_name != 'pull_request'
uses: actions/upload-artifact@v4.3.1
with:
name: ${{ inputs.artifact_name }}
path: '${{ inputs.bin_name }}*'
-
name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
# Skip attestation if ACTIONS_ID_TOKEN_REQUEST_URL env variable is not
# available (e.g., PR originating from a fork)
if: ${{ env.ACTIONS_ID_TOKEN_REQUEST_URL != '' }}
with:
subject-path: ${{ inputs.bin_name }}
-
name: Extract documentation files from container
if: inputs.event_name != 'pull_request' && inputs.platform == 'linux/amd64' && inputs.build_opts == ''
shell: bash
run: |
tar -xf build.tar api-docs.tar.gz
-
name: Upload documentation artifacts for deployoment
if: inputs.event_name != 'pull_request' && inputs.platform == 'linux/amd64' && inputs.build_opts == ''
uses: actions/upload-artifact@v4.3.1
with:
name: pihole-api-docs
path: 'api-docs.tar.gz'
-
name: Deploy
# Skip deployment step if:
# - this is a triggered by a PR event (we only push on commit to branch
# events)
# - no SSH key is provided (this is a PR from a fork)
if: inputs.event_name != 'pull_request' && ${{ inputs.SSH_KEY != '' }}
uses: ./.github/actions/deploy
with:
pattern: ${{ inputs.bin_name }}-binary
target_dir: ${{ inputs.target_dir }}
event_name: ${{ inputs.event_name }}
actor: ${{ inputs.actor }}
SSH_KEY: ${{ inputs.SSH_KEY }}
KNOWN_HOSTS: ${{ inputs.KNOWN_HOSTS }}
SSH_USER: ${{ inputs.SSH_USER }}
SSH_HOST: ${{ inputs.SSH_HOST }}
96 changes: 96 additions & 0 deletions .github/actions/deploy/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: Deploy
description: Deploy the FTL binary and documentation

inputs:
pattern:
required: true
description: The pattern to match the artifacts to download
target_dir:
required: true
description: The directory to deploy the artifacts to
event_name:
required: true
description: The name of the event that triggered the workflow run
actor:
required: true
description: The name of the user or app that initiated the workflow run
# Secrets cannot be accessed in the action.yml file so we need to pass them as
# inputs to the action.
SSH_KEY:
required: true
description: The SSH private key to use for authentication
KNOWN_HOSTS:
required: true
description: The SSH known hosts file
SSH_USER:
required: true
description: The SSH user to use for authentication
SSH_HOST:
required: true
description: The SSH host to connect to

runs:
using: "composite"
steps:
-
name: Get binaries built in previous jobs
uses: actions/download-artifact@v4.1.4
id: download
with:
path: ftl_builds/
pattern: ${{ inputs.pattern }}
merge-multiple: true
-
name: Get documentation files built in previous jobs
if: inputs.pattern == 'pihole-FTL-amd64-binary'
uses: actions/download-artifact@v4.1.4
with:
path: ftl_builds/
name: pihole-api-docs
-
name: Display structure of downloaded files
shell: bash
run: ls -R
working-directory: ${{steps.download.outputs.download-path}}
-
name: Install SSH Key
uses: benoitchantre/setup-ssh-authentication-action@1.0.1
with:
private-key: ${{ inputs.SSH_KEY }}
private-key-name: id_rsa
known-hosts: ${{ inputs.KNOWN_HOSTS }}
-
name: Set private key permissions
shell: bash
run: chmod 600 ~/.ssh/id_rsa
-
name: Untar documentation files
if: inputs.pattern == 'pihole-FTL-amd64-binary'
working-directory: ftl_builds/
shell: bash
run: |
mkdir docs/
tar xzvf api-docs.tar.gz -C docs/
-
name: Display structure of files ready for upload
working-directory: ftl_builds/
shell: bash
run: ls -R
-
name: Transfer Builds to Pi-hole server for pihole checkout
if: inputs.actor != 'dependabot[bot]'
env:
USER: ${{ inputs.SSH_USER }}
HOST: ${{ inputs.SSH_HOST }}
TARGET_DIR: ${{ inputs.target_dir }}
SOURCE_DIR: ftl_builds/
shell: bash
run: |
bash ./deploy.sh
-
name: Attach binaries to release
if: inputs.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: |
ftl_builds/*
Loading
Loading