1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-22 23:08:07 +00:00

Merge branch 'development' into packages

Signed-off-by: Christian König <github@yubiuser.dev>
This commit is contained in:
Christian König 2024-11-17 21:08:10 +01:00
commit 4137275f24
No known key found for this signature in database
12 changed files with 34 additions and 29 deletions

View File

@ -25,7 +25,7 @@ jobs:
steps:
-
name: Checkout repository
uses: actions/checkout@v4.2.1
uses: actions/checkout@v4.2.2
# Initializes the CodeQL tools for scanning.
-
name: Initialize CodeQL

View File

@ -40,7 +40,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.1
uses: actions/checkout@v4.2.2
- name: Remove 'stale' label
run: gh issue edit ${{ github.event.issue.number }} --remove-label ${{ env.stale_label }}
env:

View File

@ -33,7 +33,7 @@ jobs:
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v4.2.1
uses: actions/checkout@v4.2.2
- name: Opening pull request
run: gh pr create -B development -H master --title 'Sync master back into development' --body 'Created by Github action' --label 'internal'
env:

View File

@ -18,7 +18,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.1
uses: actions/checkout@v4.2.2
- name: Check scripts in repository are executable
run: |
@ -68,17 +68,17 @@ jobs:
ubuntu_23,
ubuntu_24,
centos_9,
fedora_39,
fedora_40,
fedora_41,
]
env:
DISTRO: ${{matrix.distro}}
steps:
- name: Checkout repository
uses: actions/checkout@v4.2.1
uses: actions/checkout@v4.2.2
- name: Set up Python 3.10
uses: actions/setup-python@v5.2.0
uses: actions/setup-python@v5.3.0
with:
python-version: "3.10"

View File

@ -192,7 +192,7 @@ GetComment() {
comment="$1"
if [[ "${comment}" =~ [^a-zA-Z0-9_\#:/\.,\ -] ]]; then
echo " ${CROSS} Found invalid characters in domain comment!"
exit
exit 1
fi
}

View File

@ -38,10 +38,13 @@ GitCheckUpdateAvail() {
local curBranch
directory="${1}"
curdir=$PWD
cd "${directory}" || return
cd "${directory}" || exit 1
# Fetch latest changes in this repo
git fetch --quiet origin
if ! git fetch --quiet origin ; then
echo -e "\\n ${COL_LIGHT_RED}Error: Unable to update local repository. Contact Pi-hole Support.${COL_NC}"
exit 1
fi
# Check current branch. If it is master, then check for the latest available tag instead of latest commit.
curBranch=$(git rev-parse --abbrev-ref HEAD)
@ -71,17 +74,17 @@ GitCheckUpdateAvail() {
echo -e "\\n ${COL_LIGHT_RED}Error: Local revision could not be obtained, please contact Pi-hole Support"
echo -e " Additional debugging output:${COL_NC}"
git status
exit
exit 1
fi
if [[ "${#REMOTE}" == 0 ]]; then
echo -e "\\n ${COL_LIGHT_RED}Error: Remote revision could not be obtained, please contact Pi-hole Support"
echo -e " Additional debugging output:${COL_NC}"
git status
exit
exit 1
fi
# Change back to original directory
cd "${curdir}" || exit
cd "${curdir}" || exit 1
if [[ "${LOCAL}" != "${REMOTE}" ]]; then
# Local branch is behind remote branch -> Update
@ -145,7 +148,7 @@ main() {
local binary
binary="pihole-FTL${funcOutput##*pihole-FTL}" #binary name will be the last line of the output of get_binary_name (it always begins with pihole-FTL)
if FTLcheckUpdate "${binary}"; then
if FTLcheckUpdate "${binary}" &>/dev/null; then
FTL_update=true
echo -e " ${INFO} FTL:\\t\\t${COL_YELLOW}update available${COL_NC}"
else

View File

@ -66,7 +66,7 @@ CREATE TABLE info
value TEXT NOT NULL
);
INSERT INTO "info" VALUES('version','18');
INSERT INTO "info" VALUES('version','19');
CREATE TABLE domain_audit
(

View File

@ -449,7 +449,7 @@ package_manager_detect() {
# we cannot install required packages
printf " %b No supported package manager found\\n" "${CROSS}"
# so exit the installer
exit
exit 1
fi
}
@ -2438,15 +2438,6 @@ main() {
pihole -a -p "${pw}"
fi
# write privacy level and logging to pihole.toml
# set on fresh installations by setPrivacyLevel() and setLogging(
if [ -n "${QUERY_LOGGING}" ]; then
pihole-FTL --config dns.queryLogging "${QUERY_LOGGING}"
fi
if [ -n "${PRIVACY_LEVEL}" ]; then
pihole-FTL --config misc.privacylevel "${PRIVACY_LEVEL}"
fi
# Migrate existing install to v6.0
migrate_dnsmasq_configs
@ -2472,6 +2463,16 @@ main() {
restart_service pihole-FTL
# write privacy level and logging to pihole.toml
# needs to be done after FTL service has been started, otherwise pihole.toml does not exist
# set on fresh installations by setPrivacyLevel() and setLogging(
if [ -n "${QUERY_LOGGING}" ]; then
setFTLConfigValue "dns.queryLogging" "${QUERY_LOGGING}"
fi
if [ -n "${PRIVACY_LEVEL}" ]; then
setFTLConfigValue "misc.privacylevel" "${PRIVACY_LEVEL}"
fi
# Download and compile the aggregated block list
runGravity

View File

@ -598,7 +598,8 @@ gravity_DownloadBlocklistFromUrl() {
# Check for allowed protocols
if [[ $url != "http"* && $url != "https"* && $url != "file"* && $url != "ftp"* && $url != "ftps"* && $url != "sftp"* ]]; then
echo -e "${OVER} ${CROSS} ${str} Invalid protocol specified, ignoring list"
echo -e "${OVER} ${CROSS} ${str} Invalid protocol specified. Ignoring list."
echo -e "Ensure your URL starts with a valid protocol like http:// , https:// or file:// ."
download=false
fi

View File

@ -1,4 +1,4 @@
FROM fedora:39
FROM fedora:41
RUN dnf install -y git initscripts
ENV GITDIR=/etc/.pihole

View File

@ -2,5 +2,5 @@ pyyaml == 6.0.2
pytest == 8.3.3
pytest-xdist == 3.6.1
pytest-testinfra == 10.1.1
tox == 4.21.2
tox == 4.23.2
pytest-clarity == 1.0.1

View File

@ -6,5 +6,5 @@ allowlist_externals = docker
deps = -rrequirements.txt
setenv =
COLUMNS=120
commands = docker buildx build --load --progress plain -f _fedora_39.Dockerfile -t pytest_pihole:test_container ../
commands = docker buildx build --load --progress plain -f _fedora_41.Dockerfile -t pytest_pihole:test_container ../
pytest {posargs:-vv -n auto} ./test_any_automated_install.py ./test_any_utils.py ./test_centos_fedora_common_support.py