Compare commits
24 Commits
v6.2
...
7df117876f
| Author | SHA1 | Date | |
|---|---|---|---|
| 7df117876f | |||
| ff75860de3 | |||
| 4ff250edac | |||
| 2e24c2d805 | |||
| c7ebaece92 | |||
| 766e61c52a | |||
| 558f0c4bf7 | |||
| 23e48cf544 | |||
| 1837b754b9 | |||
| d0fd967734 | |||
| 4247a6056b | |||
| dff04eb822 | |||
| c5a2078ce7 | |||
| 1d6b3cd894 | |||
| 91727fe284 | |||
| fc4c10dbe2 | |||
| 0e46b9c83f | |||
| 49099d017a | |||
| 72e3699265 | |||
| 1818e7e59e | |||
| 770aa1f061 | |||
| 66a3c73d6c | |||
| 1ca693866c | |||
| 77dd566a4f |
@@ -29,12 +29,12 @@ jobs:
|
|||||||
# Initializes the CodeQL tools for scanning.
|
# Initializes the CodeQL tools for scanning.
|
||||||
-
|
-
|
||||||
name: Initialize CodeQL
|
name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@16140ae1a102900babc80a33c44059580f687047 #v4.30.9
|
uses: github/codeql-action/init@0499de31b99561a6d14a36a5f662c2a54f91beee #v4.31.2
|
||||||
with:
|
with:
|
||||||
languages: 'python'
|
languages: 'python'
|
||||||
-
|
-
|
||||||
name: Autobuild
|
name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@16140ae1a102900babc80a33c44059580f687047 #v4.30.9
|
uses: github/codeql-action/autobuild@0499de31b99561a6d14a36a5f662c2a54f91beee #v4.31.2
|
||||||
-
|
-
|
||||||
name: Perform CodeQL Analysis
|
name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@16140ae1a102900babc80a33c44059580f687047 #v4.30.9
|
uses: github/codeql-action/analyze@0499de31b99561a6d14a36a5f662c2a54f91beee #v4.31.2
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ jobs:
|
|||||||
ignore_words_file: .codespellignore
|
ignore_words_file: .codespellignore
|
||||||
|
|
||||||
- name: Get editorconfig-checker
|
- name: Get editorconfig-checker
|
||||||
uses: editorconfig-checker/action-editorconfig-checker@5ecdd656fe347c26f76b1b435b90e1d74fb5e787 # tag v2. is really out of date
|
uses: editorconfig-checker/action-editorconfig-checker@4b6cd6190d435e7e084fb35e36a096e98506f7b9 #v2.1.0
|
||||||
|
|
||||||
- name: Run editorconfig-checker
|
- name: Run editorconfig-checker
|
||||||
run: editorconfig-checker
|
run: editorconfig-checker
|
||||||
@@ -74,6 +74,7 @@ jobs:
|
|||||||
fedora_40,
|
fedora_40,
|
||||||
fedora_41,
|
fedora_41,
|
||||||
fedora_42,
|
fedora_42,
|
||||||
|
fedora_43,
|
||||||
alpine_3_21,
|
alpine_3_21,
|
||||||
alpine_3_22,
|
alpine_3_22,
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -8,12 +8,20 @@ utilsfile="${PI_HOLE_SCRIPT_DIR}/utils.sh"
|
|||||||
|
|
||||||
# Get file paths
|
# Get file paths
|
||||||
FTL_PID_FILE="$(getFTLConfigValue files.pid)"
|
FTL_PID_FILE="$(getFTLConfigValue files.pid)"
|
||||||
|
FTL_LOG_FILE="$(getFTLConfigValue files.log.ftl)"
|
||||||
|
PIHOLE_LOG_FILE="$(getFTLConfigValue files.log.dnsmasq)"
|
||||||
|
WEBSERVER_LOG_FILE="$(getFTLConfigValue files.log.webserver)"
|
||||||
|
FTL_PID_FILE="${FTL_PID_FILE:-/run/pihole-FTL.pid}"
|
||||||
|
FTL_LOG_FILE="${FTL_LOG_FILE:-/var/log/pihole/FTL.log}"
|
||||||
|
PIHOLE_LOG_FILE="${PIHOLE_LOG_FILE:-/var/log/pihole/pihole.log}"
|
||||||
|
WEBSERVER_LOG_FILE="${WEBSERVER_LOG_FILE:-/var/log/pihole/webserver.log}"
|
||||||
|
|
||||||
# Ensure that permissions are set so that pihole-FTL can edit all necessary files
|
# Ensure that permissions are set so that pihole-FTL can edit all necessary files
|
||||||
mkdir -p /var/log/pihole
|
mkdir -p /var/log/pihole
|
||||||
chown -R pihole:pihole /etc/pihole/ /var/log/pihole/
|
chown -R pihole:pihole /etc/pihole/ /var/log/pihole/
|
||||||
|
|
||||||
# allow all users read version file (and use pihole -v)
|
# allow all users read version file (and use pihole -v)
|
||||||
|
touch /etc/pihole/versions
|
||||||
chmod 0644 /etc/pihole/versions
|
chmod 0644 /etc/pihole/versions
|
||||||
|
|
||||||
# allow pihole to access subdirs in /etc/pihole (sets execution bit on dirs)
|
# allow pihole to access subdirs in /etc/pihole (sets execution bit on dirs)
|
||||||
@@ -28,7 +36,7 @@ chown root:root /etc/pihole/logrotate
|
|||||||
|
|
||||||
# Touch files to ensure they exist (create if non-existing, preserve if existing)
|
# Touch files to ensure they exist (create if non-existing, preserve if existing)
|
||||||
[ -f "${FTL_PID_FILE}" ] || install -D -m 644 -o pihole -g pihole /dev/null "${FTL_PID_FILE}"
|
[ -f "${FTL_PID_FILE}" ] || install -D -m 644 -o pihole -g pihole /dev/null "${FTL_PID_FILE}"
|
||||||
[ -f /var/log/pihole/FTL.log ] || install -m 640 -o pihole -g pihole /dev/null /var/log/pihole/FTL.log
|
[ -f "${FTL_LOG_FILE}" ] || install -m 640 -o pihole -g pihole /dev/null "${FTL_LOG_FILE}"
|
||||||
[ -f /var/log/pihole/pihole.log ] || install -m 640 -o pihole -g pihole /dev/null /var/log/pihole/pihole.log
|
[ -f "${PIHOLE_LOG_FILE}" ] || install -m 640 -o pihole -g pihole /dev/null "${PIHOLE_LOG_FILE}"
|
||||||
[ -f /var/log/pihole/webserver.log ] || install -m 640 -o pihole -g pihole /dev/null /var/log/pihole/webserver.log
|
[ -f "${WEBSERVER_LOG_FILE}" ] || install -m 640 -o pihole -g pihole /dev/null "${WEBSERVER_LOG_FILE}"
|
||||||
[ -f /etc/pihole/dhcp.leases ] || install -m 644 -o pihole -g pihole /dev/null /etc/pihole/dhcp.leases
|
[ -f /etc/pihole/dhcp.leases ] || install -m 644 -o pihole -g pihole /dev/null /etc/pihole/dhcp.leases
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ extra_started_commands="reload"
|
|||||||
|
|
||||||
respawn_max=5
|
respawn_max=5
|
||||||
respawn_period=60
|
respawn_period=60
|
||||||
capabilities="^CAP_NET_BIND_SERVICE,CAP_NET_RAW,CAP_NET_ADMIN,CAP_SYS_NICE,CAP_IPC_LOCK,CAP_CHOWN,CAP_SYS_TIME"
|
capabilities="^CAP_NET_BIND_SERVICE,^CAP_NET_RAW,^CAP_NET_ADMIN,^CAP_SYS_NICE,^CAP_IPC_LOCK,^CAP_CHOWN,^CAP_SYS_TIME"
|
||||||
|
|
||||||
depend() {
|
depend() {
|
||||||
want net
|
want net
|
||||||
|
|||||||
@@ -116,11 +116,11 @@ c=70
|
|||||||
PIHOLE_META_PACKAGE_CONTROL_APT=$(
|
PIHOLE_META_PACKAGE_CONTROL_APT=$(
|
||||||
cat <<EOM
|
cat <<EOM
|
||||||
Package: pihole-meta
|
Package: pihole-meta
|
||||||
Version: 0.5
|
Version: 0.6
|
||||||
Maintainer: Pi-hole team <adblock@pi-hole.net>
|
Maintainer: Pi-hole team <adblock@pi-hole.net>
|
||||||
Architecture: all
|
Architecture: all
|
||||||
Description: Pi-hole dependency meta package
|
Description: Pi-hole dependency meta package
|
||||||
Depends: awk,bash-completion,binutils,ca-certificates,cron|cron-daemon,curl,dialog,dnsutils,dns-root-data,git,grep,iproute2,iputils-ping,jq,libcap2,libcap2-bin,lshw,procps,psmisc,sudo,unzip
|
Depends: awk,bash-completion,binutils,ca-certificates,cron|cron-daemon,curl,dialog,bind9-dnsutils|dnsutils,dns-root-data,git,grep,iproute2,iputils-ping,jq,libcap2,libcap2-bin,lshw,procps,psmisc,sudo,unzip
|
||||||
Section: contrib/metapackages
|
Section: contrib/metapackages
|
||||||
Priority: optional
|
Priority: optional
|
||||||
EOM
|
EOM
|
||||||
@@ -155,7 +155,7 @@ EOM
|
|||||||
)
|
)
|
||||||
|
|
||||||
# List of required packages on APK based systems
|
# List of required packages on APK based systems
|
||||||
PIHOLE_META_VERSION_APK=0.1
|
PIHOLE_META_VERSION_APK=0.2
|
||||||
PIHOLE_META_DEPS_APK=(
|
PIHOLE_META_DEPS_APK=(
|
||||||
bash
|
bash
|
||||||
bash-completion
|
bash-completion
|
||||||
@@ -165,6 +165,8 @@ PIHOLE_META_DEPS_APK=(
|
|||||||
cronie
|
cronie
|
||||||
curl
|
curl
|
||||||
dialog
|
dialog
|
||||||
|
doas # sudo replacement
|
||||||
|
doas-sudo-shim
|
||||||
git
|
git
|
||||||
grep
|
grep
|
||||||
iproute2-minimal # piholeARPTable.sh
|
iproute2-minimal # piholeARPTable.sh
|
||||||
@@ -178,7 +180,6 @@ PIHOLE_META_DEPS_APK=(
|
|||||||
procps-ng
|
procps-ng
|
||||||
psmisc
|
psmisc
|
||||||
shadow
|
shadow
|
||||||
sudo
|
|
||||||
tzdata
|
tzdata
|
||||||
unzip
|
unzip
|
||||||
wget
|
wget
|
||||||
@@ -694,10 +695,11 @@ chooseInterface() {
|
|||||||
status="OFF"
|
status="OFF"
|
||||||
done
|
done
|
||||||
# Disable check for double quote here as we are passing a string with spaces
|
# Disable check for double quote here as we are passing a string with spaces
|
||||||
|
# shellcheck disable=SC2086
|
||||||
PIHOLE_INTERFACE=$(dialog --no-shadow --keep-tite --output-fd 1 \
|
PIHOLE_INTERFACE=$(dialog --no-shadow --keep-tite --output-fd 1 \
|
||||||
--cancel-label "Exit" --ok-label "Select" \
|
--cancel-label "Exit" --ok-label "Select" \
|
||||||
--radiolist "Choose An Interface (press space to toggle selection)" \
|
--radiolist "Choose An Interface (press space to toggle selection)" \
|
||||||
${r} ${c} "${interfaceCount}" "${interfacesList}")
|
${r} ${c} "${interfaceCount}" ${interfacesList})
|
||||||
|
|
||||||
result=$?
|
result=$?
|
||||||
case ${result} in
|
case ${result} in
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
FROM fedora:43
|
||||||
|
RUN dnf install -y git initscripts
|
||||||
|
|
||||||
|
ENV GITDIR=/etc/.pihole
|
||||||
|
ENV SCRIPTDIR=/opt/pihole
|
||||||
|
|
||||||
|
RUN mkdir -p $GITDIR $SCRIPTDIR /etc/pihole
|
||||||
|
ADD . $GITDIR
|
||||||
|
RUN cp $GITDIR/advanced/Scripts/*.sh $GITDIR/gravity.sh $GITDIR/pihole $GITDIR/automated\ install/*.sh $GITDIR/advanced/Scripts/COL_TABLE $SCRIPTDIR/
|
||||||
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$SCRIPTDIR
|
||||||
|
|
||||||
|
RUN true && \
|
||||||
|
chmod +x $SCRIPTDIR/*
|
||||||
|
|
||||||
|
ENV SKIP_INSTALL=true
|
||||||
|
|
||||||
|
#sed '/# Start the installer/Q' /opt/pihole/basic-install.sh > /opt/pihole/stub_basic-install.sh && \
|
||||||
@@ -2,5 +2,5 @@ pyyaml == 6.0.3
|
|||||||
pytest == 8.4.2
|
pytest == 8.4.2
|
||||||
pytest-xdist == 3.8.0
|
pytest-xdist == 3.8.0
|
||||||
pytest-testinfra == 10.2.2
|
pytest-testinfra == 10.2.2
|
||||||
tox == 4.31.0
|
tox == 4.32.0
|
||||||
pytest-clarity == 1.0.1
|
pytest-clarity == 1.0.1
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
[tox]
|
||||||
|
envlist = py3
|
||||||
|
|
||||||
|
[testenv]
|
||||||
|
allowlist_externals = docker
|
||||||
|
deps = -rrequirements.txt
|
||||||
|
setenv =
|
||||||
|
COLUMNS=120
|
||||||
|
commands = docker buildx build --load --progress plain -f _fedora_43.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
|
||||||
Reference in New Issue
Block a user