%global web_version 7.0 %global ftl_version 7.0 %global ftl_tag v%{ftl_version} %global revision 0 %global core_branch development+rpm %global web_branch development+rpm %global ftl_branch development+rpm %global core_hash a8461650+rpm %global web_hash c1296144+rpm %global ftl_hash 6b6a1558+rpm %global ftl_commit_date 2026-10-11 08:28:10 +0200 %global _vpath_srcdir pi-hole-FTL-rpm-v7 %global release ftl%{ftl_version}.web%{web_version}.rev%{revision} Name: pihole-v7 Version: 7.0 Release: %{release}%{?dist} Summary: Network-wide ad blocking with Pi-hole FTL, CLI, and web UI License: EUPL-1.2 URL: https://pi-hole.net/ Source0: https://github.com/darkexplosiveqwx/pi-hole/archive/refs/heads/rpm-v7.tar.gz#/core-v%{version}.tar.gz Source1: https://github.com/pi-hole/web/archive/refs/heads/development.tar.gz#/web-v%{web_version}.tar.gz Source2: https://github.com/darkexplosiveqwx/pi-hole-FTL/archive/refs/heads/rpm-v7.tar.gz#/FTL-v%{ftl_version}.tar.gz Source3: https://www.wireshark.org/download/automated/data/manuf.gz Source4: sysusers.conf Source5: pihole-gravity.service Source6: pihole-gravity.timer BuildRequires: cmake BuildRequires: dbus-devel BuildRequires: gcc BuildRequires: gmp-devel BuildRequires: libnetfilter_conntrack-devel BuildRequires: make BuildRequires: nettle-devel BuildRequires: nftables-devel BuildRequires: openssl-devel BuildRequires: python3 # no network traffic is generated during build, but requests is imported (for the option of downloading a manuf file, but we use a local one) BuildRequires: python3-requests BuildRequires: libidn2-devel BuildRequires: libnghttp2-devel %if 0%{?fedora} # nghttp3 is not available on RHEL or CentOS BuildRequires: libnghttp3-devel %endif BuildRequires: libunistring-devel BuildRequires: readline-devel BuildRequires: systemd-rpm-macros BuildRequires: xxd Requires: bash Requires: bash-completion Requires: bind-utils Requires: ca-certificates Requires: curl Requires: findutils Requires: gawk Requires: grep Requires: iproute Requires: jq Requires: logrotate Requires: lshw Requires: procps-ng Requires: psmisc Requires: sudo Requires: systemd Requires: unzip Requires(pre): shadow-utils Requires(post): systemd Requires(preun): systemd Requires(postun): systemd Suggests: padd Conflicts: pihole Provides: bundled(dnsmasq) = 2.93 Provides: bundled(sqlite3) = 3.53.3 Provides: bundled(civetweb) = 1.17 Provides: bundled(tomlc17) Provides: bundled(lua) = 5.5.0 Provides: bundled(tre) = 0.8.0 Provides: bundled(cjson) = 1.7.18 Provides: bundled(miniz) = 3.0.0 %description Pi-hole is a network-wide DNS sinkhole that blocks unwanted content across devices on your network. This RPM bundles the Pi-hole CLI, the web interface, and the Pi-hole FTL daemon into a single installable package for RPM-based systems. This packaged build is managed through the system package manager. Pi-hole's upstream self-update, repair, checkout, and uninstall flows are disabled. %prep %setup -q -n pi-hole-rpm-v7 tar -xzf %{SOURCE1} tar -xzf %{SOURCE2} %build export GIT_BRANCH=%{ftl_branch} export GIT_HASH=%{ftl_hash} export GIT_VERSION=%{ftl_tag} export GIT_DATE='%{ftl_commit_date}' export GIT_TAG=%{ftl_tag} if [ "$USER" = "mockbuild" ]; then export MOCK_ARCH="%{_target_cpu}" fi %cmake %cmake_build # Generates macvendor.db from manuf file, outputted to working directory %{__python3} %{_vpath_srcdir}/tools/macvendor.py %{SOURCE3} %install %cmake_install install -d %{buildroot}%{_libexecdir}/pihole install -d %{buildroot}%{_sysconfdir}/pihole/hosts install -d %{buildroot}%{_sharedstatedir}/pihole install -d %{buildroot}%{_localstatedir}/log/pihole install -d %{buildroot}%{_datadir}/pihole install -d %{buildroot}%{_datadir}/pihole/www install -d %{buildroot}%{_datadir}/pihole/www/admin install -d %{buildroot}%{_datadir}/pihole/database_migration install -d %{buildroot}%{_licensedir}/%{name} install -D -m 0755 pihole %{buildroot}%{_bindir}/pihole install -m 0755 gravity.sh %{buildroot}%{_libexecdir}/pihole/ install -m 0755 advanced/Scripts/*.sh %{buildroot}%{_libexecdir}/pihole/ install -m 0644 advanced/Scripts/COL_TABLE %{buildroot}%{_libexecdir}/pihole/COL_TABLE rm -f %{buildroot}%{_libexecdir}/pihole/piholeCheckout.sh rm -f %{buildroot}%{_libexecdir}/pihole/updatecheck.sh rm -f %{buildroot}%{_libexecdir}/pihole/update.sh install -D -m 0755 advanced/Templates/pihole-FTL-prestart.sh %{buildroot}%{_libexecdir}/pihole/pihole-FTL-prestart.sh install -D -m 0755 advanced/Templates/pihole-FTL-poststop.sh %{buildroot}%{_libexecdir}/pihole/pihole-FTL-poststop.sh install -D -m 0644 advanced/Templates/pihole-FTL.systemd %{buildroot}%{_unitdir}/pihole-FTL.service install -D -m 0644 %{SOURCE5} %{buildroot}%{_unitdir}/pihole-gravity.service install -D -m 0644 %{SOURCE6} %{buildroot}%{_unitdir}/pihole-gravity.timer install -D -m 0644 advanced/Templates/logrotate %{buildroot}%{_sysconfdir}/logrotate.d/pihole install -D -m 0644 advanced/Templates/gravity.db.sql %{buildroot}%{_datadir}/pihole/gravity.db.sql install -D -m 0644 advanced/Templates/gravity_copy.sql %{buildroot}%{_datadir}/pihole/gravity_copy.sql install -D -m 0755 advanced/Scripts/database_migration/gravity-db.sh %{buildroot}%{_datadir}/pihole/database_migration/gravity-db.sh cp -a advanced/Scripts/database_migration/gravity %{buildroot}%{_datadir}/pihole/database_migration/ install -D -m 0644 macvendor.db %{buildroot}%{_datadir}/pihole/macvendor.db install -D -m 0644 advanced/bash-completion/pihole.bash %{buildroot}%{_datadir}/bash-completion/completions/pihole install -D -m 0644 advanced/bash-completion/pihole-ftl.bash %{buildroot}%{_datadir}/bash-completion/completions/pihole-FTL install -D -m 0644 manpages/pihole.8 %{buildroot}%{_mandir}/man8/pihole.8 cp -a web-development/. %{buildroot}%{_datadir}/pihole/www/admin/ rm -rf %{buildroot}%{_datadir}/pihole/www/admin/.devcontainer rm -rf %{buildroot}%{_datadir}/pihole/www/admin/.github rm -f %{buildroot}%{_datadir}/pihole/www/admin/.codespellignore rm -f %{buildroot}%{_datadir}/pihole/www/admin/.editorconfig rm -f %{buildroot}%{_datadir}/pihole/www/admin/.gitattributes rm -f %{buildroot}%{_datadir}/pihole/www/admin/.gitignore rm -f %{buildroot}%{_datadir}/pihole/www/admin/CONTRIBUTING.md rm -f %{buildroot}%{_datadir}/pihole/www/admin/README.md rm -f %{buildroot}%{_datadir}/pihole/www/admin/package.json rm -f %{buildroot}%{_datadir}/pihole/www/admin/package-lock.json rm -f %{buildroot}%{_datadir}/pihole/www/admin/postcss.config.js rm -f %{buildroot}%{_datadir}/pihole/www/admin/xo.config.js install -D -m 0644 LICENSE %{buildroot}%{_licensedir}/%{name}/core-LICENSE install -D -m 0644 web-development/LICENSE %{buildroot}%{_licensedir}/%{name}/web-LICENSE install -D -m 0644 pi-hole-FTL-rpm-v7/LICENSE %{buildroot}%{_licensedir}/%{name}/ftl-LICENSE install -D -m 0644 %{SOURCE4} %{buildroot}%{_sysusersdir}/pihole.conf install -Dm0644 /dev/stdin %{buildroot}%{_datadir}/pihole/versions <