6698 Commits

Author SHA1 Message Date
Adam Warner
f01e8c70d9
Weirldly, GHA missed these minor warnings however have disabled them as they are due to variables either being used in or declared in basic-install,.sh
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
3a9b9c027e
In ./pihole line 20:
source "${colfile}"
       ^----------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./pihole line 23:
source "${utilsfile}"
       ^------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./pihole line 27:
source "${apifile}"
       ^----------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./pihole line 34:
    source "${versionsfile}"
           ^---------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./pihole line 251:
  local timer="$(echo "${data}"| jq --raw-output '.timer' )"
        ^---^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./pihole line 255:
  local str="Pi-hole $(echo "${data}" | jq --raw-output '.blocking')${extra}"
        ^-^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./pihole line 378:
  local logging_enabled=$(getFTLConfigValue dns.queryLogging)
        ^-------------^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./pihole line 385:
  readonly LOGFILE=$(getFTLConfigValue files.log.dnsmasq)
           ^-----^ SC2155 (warning): Declare and assign separately to avoid masking return values.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
f5dc337d1b
In ./advanced/Scripts/piholeLogFlush.sh line 12:
source ${colfile}
       ^--------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

In ./advanced/Scripts/piholeLogFlush.sh line 16:
source "${utilsfile}"
       ^------------^ SC1090 (warning): ShellCheck can't follow non-constant source. Use a directive to specify location.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
63623c4353
In ./advanced/Scripts/piholeCheckout.sh line 112:
corebranches=($(get_available_branches "${PI_HOLE_FILES_DIR}"))
                      ^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).

In ./advanced/Scripts/piholeCheckout.sh line 139:
        webbranches=($(get_available_branches "${webInterfaceDir}"))
                     ^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).

In ./advanced/Scripts/piholeCheckout.sh line 170:
        ftlbranches=( $(git ls-remote https://github.com/pi-hole/ftl | grep "refs/heads" | cut -d'/' -f3- -) )
                      ^-- SC2207 (warning): Prefer mapfile or read -a to split command output (or quote to avoid splitting).

In ./advanced/Scripts/piholeCheckout.sh line 218:
            elif [ $? -eq 2 ]; then
                   ^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
59d2177271
In ./advanced/Scripts/database_migration/gravity-db.sh line 18:
piholeDir="${2}"
    ^-------^ SC2034 (warning): piholeDir appears unused. Verify use (or export if used externally).

Turns out it is _actually_ unused, the full path of the gravity database is passed to the function, so we'll tidy this up rather than supressing.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
a624d3be8d
In ./advanced/Scripts/utils.sh line 91:
if [[ $? -eq 5 ]]; then
     ^------------^ SC3010 (warning): In POSIX sh, [[ ]] is undefined.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
39f5115135
In ./automated install/basic-install.sh line 1753:
local status=$(curl --head --silent "https://ftl.pi-hole.net/${1}" | head -n 1)
          ^----^ SC2155 (warning): Declare and assign separately to avoid masking return values.

In ./automated install/basic-install.sh line 2076:
            elif [ $? -eq 2 ]; then
                   ^-- SC2319 (warning): This $? refers to a condition, not a command. Assign to a variable to avoid it being overwritten.

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
e018a37a8c
First things first - bump severity of shellcheck action from error to warning
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-06 14:11:40 +01:00
Adam Warner
7e5d9db6b7
Remove no-longer-needed pihole sudoers file (#6143) 2025-04-06 13:52:37 +01:00
Dominik
5afab5e96c
Move list parsing entirely into FTL (#6105) 2025-04-05 20:15:16 +02:00
yubiuser
ab8b8da9c3
Bump pytest-testinfra from 10.1.1 to 10.2.2 in /test (#6151) 2025-04-05 12:11:16 +02:00
dependabot[bot]
07864032de
Bump pytest-testinfra from 10.1.1 to 10.2.2 in /test
Bumps [pytest-testinfra](https://github.com/pytest-dev/pytest-testinfra) from 10.1.1 to 10.2.2.
- [Release notes](https://github.com/pytest-dev/pytest-testinfra/releases)
- [Changelog](https://github.com/pytest-dev/pytest-testinfra/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest-testinfra/compare/10.1.1...10.2.2)

---
updated-dependencies:
- dependency-name: pytest-testinfra
  dependency-version: 10.2.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-05 10:05:08 +00:00
Adam Warner
bdcb6fc88c
Update update.sh, updatecheck.sh and uninstall.sh to honour pihole.to… (#5981) 2025-04-05 01:18:49 +01:00
Adam Warner
f403468450
Add webserver log to piholeLogFlush.sh (#6049) 2025-04-05 00:33:18 +01:00
Adam Warner
097ac8336e
Add recommended fields to the deb package (#6054) 2025-04-05 00:31:26 +01:00
Christian König
fe2b22c570
Add recommended fields to the deb package
Signed-off-by: Christian König <github@yubiuser.dev>
2025-04-05 00:29:13 +01:00
Adam Warner
2477d6b184
Revert #6137 (#6146) 2025-04-04 23:28:51 +01:00
Adam Warner
f98b9520e4
v5 sudoers file that allowed www-data to run pihole command is no longer needed. "Fixes" #6066
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
2025-04-04 23:19:14 +01:00
yubiuser
65b42c1c8f
Ensure gravity_Cleanup() checks the correct directory (#6131) 2025-04-04 22:50:19 +02:00
Michael Woolweaver
e548ed043f
ensure gravity_Cleanup() checks the correct directory for list data
also glob with * to ensure .etag & .sha1 are removed as well
should fix #6075

Co-authored-by: yubiuser <github@yubiuser.dev>
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-04 15:15:51 -05:00
Adam Warner
4108c817dc
Revert "source with source not dot (#6137)"
This reverts commit 8fd2ebd3d7bc00fe4c36dcdae0932d7bab4a3c3c, reversing
changes made to 557bc6f1794244f55b36258a51e3bd494860b439.
2025-04-04 19:12:57 +01:00
Dan Schaper
8fd2ebd3d7
source with source not dot (#6137) 2025-04-02 12:36:48 -07:00
Michael Woolweaver
4efe4dfd4b
source with source not dot
Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-02 14:21:45 -05:00
Adam Warner
557bc6f179
Add CentOS 10 to test suite (#6126) 2025-04-02 18:24:36 +01:00
Adam Warner
8fce8f6149
build gravityDBfile_default like the other variables (#6133) 2025-04-02 17:12:21 +01:00
Michael Woolweaver
3cb6ea503a
build gravityDBfile_default like the other variables
seems this one was forgotten

Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-04-01 23:57:56 -05:00
Christian König
7886cfc80b
Add CentOS 10 to test suite
Signed-off-by: Christian König <github@yubiuser.dev>
2025-03-31 12:13:34 +02:00
Adam Warner
8797a0df05
Sync master back into development (#6122) 2025-03-30 18:31:02 +01:00
Adam Warner
0f7803b775
Pi-hole Core v6.0.6 (#6118) v6.0.6 2025-03-30 17:54:55 +01:00
James George
0f482396ee
Update update.sh, updatecheck.sh and uninstall.sh to honour pihole.toml settings for webserver.paths.webroot and webserver.paths.webhome
When uninstalling, remove web interface parent directory empty check and possible removal.

Signed-off-by: James George <james.george@vigilantvoid.com>
2025-03-30 13:11:21 +08:00
yubiuser
73074f1557
Bump tox from 4.24.2 to 4.25.0 in /test (#6116) 2025-03-29 21:46:47 +01:00
yubiuser
bc23303788
Bump actions/setup-python from 5.4.0 to 5.5.0 (#6117) 2025-03-29 21:43:58 +01:00
dependabot[bot]
49fbdc4c00
Bump actions/setup-python from 5.4.0 to 5.5.0
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 5.4.0 to 5.5.0.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v5.4.0...v5.5.0)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-29 10:25:36 +00:00
dependabot[bot]
315528d740
Bump tox from 4.24.2 to 4.25.0 in /test
Bumps [tox](https://github.com/tox-dev/tox) from 4.24.2 to 4.25.0.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.24.2...4.25.0)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-29 10:25:08 +00:00
Adam Warner
e5cb0efd61
revert #6030 in preparation for docker-pi-hole #1794 (#6086) 2025-03-25 17:06:01 +00:00
DL6ER
dec670a6d6
Move list parsing entirely into FTL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2025-03-22 09:18:02 +01:00
Michael Woolweaver
3a592471c6
revert pi-hole/pi-hole/pull/6030
in preparation for pi-hole/docker-pi-hole/pull/1786

Signed-off-by: Michael Woolweaver <michael@woolweaver.bid>
2025-03-14 14:32:29 -05:00
yubiuser
3f5c00919b
Remove WEB_CALL from COL_TABLE (#6062) 2025-03-10 06:14:47 +01:00
yubiuser
349544b24a
Create webserver.log on FTL startup (#6051) 2025-03-10 06:14:22 +01:00
yubiuser
387ec3a3c2
Bump pytest from 8.3.4 to 8.3.5 in /test (#6068) 2025-03-08 11:50:40 +01:00
dependabot[bot]
6b873b2d7f
Bump pytest from 8.3.4 to 8.3.5 in /test
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.3.4 to 8.3.5.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](https://github.com/pytest-dev/pytest/compare/8.3.4...8.3.5)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 10:46:01 +00:00
yubiuser
46e5b3b02e
Bump tox from 4.24.1 to 4.24.2 in /test (#6067) 2025-03-08 11:44:54 +01:00
dependabot[bot]
27aeed76f0
Bump tox from 4.24.1 to 4.24.2 in /test
Bumps [tox](https://github.com/tox-dev/tox) from 4.24.1 to 4.24.2.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/main/docs/changelog.rst)
- [Commits](https://github.com/tox-dev/tox/compare/4.24.1...4.24.2)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-08 10:30:22 +00:00
yubiuser
80d63eca93
Add 2FA handling to api.sh (#6065) 2025-03-08 10:46:54 +01:00
yubiuser
72404c983d
Add trailing / when changing ownership of /etc/pihole (#6057) 2025-03-07 23:08:04 +01:00
casperklein
9b4502a7a9
Add trailing / to directories
Signed-off-by: casperklein <casperklein@users.noreply.github.com>
2025-03-07 23:00:40 +01:00
Christian König
5de9b6ae69
Add 2FA handling to api.sh
Signed-off-by: Christian König <github@yubiuser.dev>
2025-03-07 13:43:41 +01:00
Christian König
f3dc202e36
Remove WEB_CALL from COL_TABLE
Signed-off-by: Christian König <github@yubiuser.dev>
2025-03-07 10:16:25 +01:00
yubiuser
9050e47049
version.sh: fix typo in comment (#6056) 2025-03-06 20:49:20 +01:00
XhmikosR
45cb722e50
version.sh: fix typo in comment
Signed-off-by: XhmikosR <xhmikosr@gmail.com>
2025-03-06 21:40:17 +02:00