AUR AI Reviewer

Review Results

Version #2950 of pi-hole-core · commit 4c558e173505 · status Reviewed

Risk 0/5 · Safe .SRCINFO
Result #5594

Comment

The only change in this diff is a pkgrel bump from 3 to 4 in .SRCINFO. This is metadata-only and does not alter sources, build steps, dependencies, install scripts, or shipped artifacts. No security-relevant behavior changes are introduced by this hunk.

@@ -1,7 +1,7 @@
 pkgbase = pi-hole-core
 	pkgdesc = The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server.
 	pkgver = 6.5
-	pkgrel = 3
+	pkgrel = 4
 	url = https://github.com/pi-hole/pi-hole
 	install = pi-hole-core.install
 	arch = any
Risk 0/5 · Safe .SRCINFO
Result #5595

Comment

The change only removes a backup entry from .SRCINFO for etc/pihole/pihole.toml. This does not introduce code execution, network access, privilege escalation, or packaging integrity issues; it merely changes pacman’s backup-file metadata. The main effect is that the config file may no longer be treated as a preserved conffile on upgrade, which is a packaging regression but not a security vulnerability in itself.

@@ -21,7 +21,6 @@ pkgbase = pi-hole-core
 	provides = pi-hole-server
 	conflicts = pi-hole-standalone
 	conflicts = pi-hole-server
-	backup = etc/pihole/pihole.toml
 	source = pi-hole-core-6.5.tar.gz::https://github.com/pi-hole/pi-hole/archive/refs/tags/v6.5.tar.gz
 	source = arch-core.patch
 	source = pi-hole.tmpfile
Risk 0/5 · Safe PKGBUILD
Result #5596

Comment

This change only bumps pkgrel from 3 to 4 in PKGBUILD. No source URLs, build steps, install scripts, dependencies, or packaging behavior changed, so there is no new security-relevant surface in the reviewed diff.

@@ -5,7 +5,7 @@
 pkgname=pi-hole-core
 _pkgname=pi-hole
 pkgver=6.5
-pkgrel=3
+pkgrel=4
 pkgdesc='The Pi-hole is an advertising-aware DNS/Web server. Arch adaptation for lan wide DNS server.'
 arch=('any')
 license=('EUPL-1.2')
Risk 0/5 · Safe PKGBUILD
Result #5597

Comment

The change only removes the backup() declaration for /etc/pihole/pihole.toml from PKGBUILD. This does not introduce code execution, network access, privilege escalation, persistence, or integrity issues; it merely changes pacman file handling for that config file on install/upgrade. I see no security impact in the diff itself.

@@ -16,7 +16,6 @@ optdepends=()
 conflicts=('pi-hole-standalone' 'pi-hole-server')
 provides=('pi-hole-standalone' 'pi-hole-server')
 install=$pkgname.install
-backup=('etc/pihole/pihole.toml')
 
 source=($pkgname-$pkgver.tar.gz::https://github.com/$_pkgname/$_pkgname/archive/refs/tags/v$pkgver.tar.gz
         arch-core.patch
Risk 1/5 · Low pi-hole-core.install
Result #5598

Comment

The change is low risk. It only alters the package uninstall hook to stop deleting /etc/pihole contents and to stop removing the pihole user, replacing that behavior with a best-effort rmdir check and informational messages. There is no new network access, privilege escalation, persistence mechanism, or execution of untrusted code. The only security-relevant effect is that package removal now leaves configuration/data behind, which is a retention/privacy concern rather than a vulnerability in the package itself.

@@ -25,8 +25,15 @@ post_upgrade() {
 }
 
 post_remove() {
-  # delete all temp files except those modified the user
-  # TODO - make this more intelligent to save *.pacsave.# where # is a number
-  find /etc/pihole -type f ! -name '*.pacsave' ! -name 'pihole-FTL.conf' ! -name 'pihole-FTL.db' ! -name 'gravity.db' -delete
-  id -u pihole > /dev/null 2>&1 && userdel -f pihole
+  # Do not delete anything in /etc/pihole and do not touch the pihole user:
+  # the config/data in there may have been created or changed by the user and
+  # the user itself is managed by the pi-hole-ftl package (sysusers).
+  if ! rmdir /etc/pihole 2>/dev/null && [[ -d /etc/pihole ]]; then
+    echo -e "\e[1;33m==>\e[0m Your Pi-hole configuration and databases were left untouched in \e[1;36m/etc/pihole\e[0m."
+    echo -e "\e[1;33m==>\e[0m Remove them manually if you no longer need them:"
+    echo -e "      \e[1;36mrm -rf /etc/pihole\e[0m"
+  fi
+
+  # keep pacman from throwing errors should none them be on the filesystem
+  return 0
 }