Update packages
This commit is contained in:
@@ -1,53 +1,37 @@
|
||||
# Maintainer: max.bra <max dot bra dot gtalk at gmail dot com>
|
||||
# Maintainer: graysky <graysky AT archlinux DOT us>
|
||||
|
||||
pkgname=pi-hole-ftl
|
||||
_pkgname=FTL
|
||||
pkgver=3.0
|
||||
pkgrel=2
|
||||
_servicename=pihole-FTL
|
||||
pkgver=4.2.3
|
||||
pkgrel=1
|
||||
arch=('i686' 'x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
|
||||
pkgdesc="The Pi-hole FTL engine"
|
||||
url="https://github.com/pi-hole/FTL"
|
||||
license=('EUPL-1.1')
|
||||
depends=()
|
||||
depends=('nettle' 'gmp')
|
||||
makedepends=('sqlite')
|
||||
conflicts=('dnsmasq')
|
||||
provides=('dnsmasq')
|
||||
install=$pkgname.install
|
||||
backup=('etc/pihole/pihole-FTL.conf')
|
||||
backup=('etc/pihole/pihole-FTL.conf' 'etc/pihole/pihole-FTL.db')
|
||||
source=("https://github.com/pi-hole/FTL/archive/v$pkgver.tar.gz"
|
||||
"$pkgname.tmpfile"
|
||||
"$pkgname.service"
|
||||
"$pkgname.conf"
|
||||
"$pkgname.sysuser"
|
||||
)
|
||||
md5sums=('45fd33e4498b2ab9403d96e1251abb8c'
|
||||
'ca844c23699ba64777571253bc7ccb21'
|
||||
'0f65203b2585fb83e02826091d220386'
|
||||
'2d6ae93eea48a09ce5bc5bf62e081dd4'
|
||||
'68e78907dc2a0c89421d02377e76d353')
|
||||
"https://raw.githubusercontent.com/max72bra/pi-hole-ftl-archlinux-customization/master/arch-ftl-$pkgver.patch"
|
||||
"$pkgname.tmpfile"
|
||||
"$pkgname.service"
|
||||
"$pkgname.db"
|
||||
"$pkgname.conf")
|
||||
md5sums=('c77c455a423db6963ab0860cb3f256d6'
|
||||
'a1dffe02d7749ed94c0c2b088db36446'
|
||||
'5faa64558cc0a5888923fcf77c299fa7'
|
||||
'f3e42ec6f04180c6d6972998bf172a41'
|
||||
'0495c002b7d5dce303d451e4cd2fede5'
|
||||
'40b1c4174198eacd7d12eb9b356aced0')
|
||||
|
||||
prepare() {
|
||||
_ssc="/tmp/sedcontrol"
|
||||
|
||||
cd "$srcdir"/"$_pkgname"-"$pkgver"
|
||||
|
||||
# git descriptions setup
|
||||
sed -i "s|^GIT_BRANCH := .*$|GIT_BRANCH := master|w $_ssc" "$srcdir"/$_pkgname-$pkgver/Makefile
|
||||
if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: git descriptions setup 1" && return 1 ; fi
|
||||
sed -i "s|^GIT_VERSION := .*$|GIT_VERSION := v$pkgver|w $_ssc" "$srcdir"/$_pkgname-$pkgver/Makefile
|
||||
if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: git descriptions setup 2" && return 1 ; fi
|
||||
sed -i "s|^GIT_DATE := .*$|GIT_DATE := $(date -I)|w $_ssc" "$srcdir"/$_pkgname-$pkgver/Makefile
|
||||
if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: git descriptions setup 3" && return 1 ; fi
|
||||
sed -i "s|^GIT_TAG := .*$|GIT_TAG := v$pkgver|w $_ssc" "$srcdir"/$_pkgname-$pkgver/Makefile
|
||||
if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: git descriptions setup 4" && return 1 ; fi
|
||||
|
||||
# setting up logs paths
|
||||
sed -i "s|/var/log/pihole-FTL.log|/run/log/pihole-ftl/pihole-FTL.log|w $_ssc" "$srcdir"/$_pkgname-$pkgver/memory.c
|
||||
if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up logs paths 1" && return 1 ; fi
|
||||
sed -i "s|/var/run/pihole-FTL|/run/pihole-ftl/pihole-FTL|w $_ssc" "$srcdir"/$_pkgname-$pkgver/memory.c
|
||||
if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up logs paths 2" && return 1 ; fi
|
||||
sed -i "s|/var/log/pihole.log|/run/log/pihole/pihole.log|w $_ssc" "$srcdir"/$_pkgname-$pkgver/memory.c
|
||||
if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up logs paths 3" && return 1 ; fi
|
||||
sed -i "s|/var/run/pihole/|/run/pihole-ftl/|w $_ssc" "$srcdir"/$_pkgname-$pkgver/memory.c
|
||||
if [ -s $_ssc ] ; then rm $_ssc ; else echo " ==> Sed error: setting up logs paths 4" && return 1 ; fi
|
||||
patch -Np1 -i ../arch-ftl-$pkgver.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
@@ -60,12 +44,12 @@ package() {
|
||||
install -Dm755 "$_pkgname"-$pkgver/pihole-FTL "${pkgdir}"/usr/bin/pihole-FTL
|
||||
|
||||
install -Dm644 "$pkgname.tmpfile" "$pkgdir"/usr/lib/tmpfiles.d/$pkgname.conf
|
||||
install -Dm644 "$pkgname.sysuser" "$pkgdir"/usr/lib/sysusers.d/$pkgname.conf
|
||||
|
||||
install -dm755 "$pkgdir"/etc/pihole
|
||||
install -Dm644 "$pkgname.conf" "$pkgdir"/etc/pihole/pihole-FTL.conf
|
||||
install -Dm644 "$pkgname.db" "$pkgdir"/etc/pihole/pihole-FTL.db
|
||||
|
||||
install -Dm644 "$pkgname.service" "$pkgdir"/usr/lib/systemd/system/$pkgname.service
|
||||
install -Dm644 "$pkgname.service" "$pkgdir"/usr/lib/systemd/system/$_servicename.service
|
||||
install -dm755 "$pkgdir/usr/lib/systemd/system/multi-user.target.wants"
|
||||
ln -s ../$pkgname.service "$pkgdir/usr/lib/systemd/system/multi-user.target.wants/$pkgname.service"
|
||||
ln -s ../$_servicename.service "$pkgdir/usr/lib/systemd/system/multi-user.target.wants/$_servicename.service"
|
||||
}
|
||||
|
||||
@@ -1,9 +1,84 @@
|
||||
SOCKET_LISTENING=localonly
|
||||
TIMEFRAME=rolling24h
|
||||
QUERY_DISPLAY=yes
|
||||
AAAA_QUERY_ANALYSIS=yes
|
||||
MAXDBDAYS=365
|
||||
RESOLVE_IPV6=yes
|
||||
RESOLVE_IPV4=yes
|
||||
DBINTERVAL=1.0
|
||||
DBFILE=/etc/pihole/pihole-FTL.db
|
||||
### This file contains parameters for FTL behavior.
|
||||
### At install, all parameters are commented out. The user can select desired options.
|
||||
### Options shown are the default configuration. No modification is needed for most
|
||||
### installations.
|
||||
### Visit https://docs.pi-hole.net/ftldns/configfile/ for more detailed parameter explanations
|
||||
|
||||
## Socket Listening
|
||||
## Listen only for local socket connections or permit all connections
|
||||
## Options: localonly, all
|
||||
#SOCKET_LISTENING=localonly
|
||||
|
||||
## Query Display
|
||||
## Display all queries? Set to no to hide query display
|
||||
## Options: yes, no
|
||||
#QUERY_DISPLAY=yes
|
||||
|
||||
## AAA Query Analysis
|
||||
## Allow FTL to analyze AAAA queries from pihole.log?
|
||||
## Options: yes, no
|
||||
#AAAA_QUERY_ANALYSIS=yes
|
||||
|
||||
## Resolve IPv6
|
||||
## Should FTL try to resolve IPv6 addresses to host names?
|
||||
## Options: yes, no
|
||||
#RESOLVE_IPV6=yes
|
||||
|
||||
## Resolve IPv4
|
||||
## Should FTL try to resolve IPv4 addresses to host names?
|
||||
## Options: yes, no
|
||||
#RESOLVE_IPV4=yes
|
||||
|
||||
## Max Database Days
|
||||
## How long should queries be stored in the database -days-?
|
||||
## Setting this to 0 disables the database
|
||||
## See: https://docs.pi-hole.net/ftldns/database/
|
||||
## Options: number of days
|
||||
#MAXDBDAYS=365
|
||||
|
||||
## Database Interval
|
||||
## How often do we store queries in FTL's database -minutes-?
|
||||
## See: https://docs.pi-hole.net/ftldns/database/
|
||||
## Options: number of minutes
|
||||
#DBINTERVAL=1.0
|
||||
|
||||
## Database File
|
||||
## Specify path and filename of FTL's SQLite3 long-term database.
|
||||
## Setting this to DBFILE= disables the database altogether
|
||||
## See: https://docs.pi-hole.net/ftldns/database/
|
||||
## Option: path to db file
|
||||
#DBFILE=/etc/pihole/pihole-FTL.db
|
||||
|
||||
## Max Log Age
|
||||
## Up to how many hours of queries should be imported from the database and logs -hours-?
|
||||
## Maximum is 744 -31 days-
|
||||
## Options: number of days
|
||||
#MAXLOGAGE=24.0
|
||||
|
||||
## FTL Port
|
||||
## On which port should FTL be listening?
|
||||
## Options: tcp port
|
||||
#FTLPORT=4711
|
||||
|
||||
## Privacy Level
|
||||
## Which privacy level is used?
|
||||
## See: https://docs.pi-hole.net/ftldns/privacylevels/
|
||||
## Options: 0, 1, 2, 3
|
||||
#PRIVACYLEVEL=0
|
||||
|
||||
## Ignore Localhost
|
||||
## Should FTL ignore queries coming from the local machine?
|
||||
## Options: yes, no
|
||||
#IGNORE_LOCALHOST=no
|
||||
|
||||
## Blocking Mode
|
||||
## How should FTL reply to blocked queries?
|
||||
## See: https://docs.pi-hole.net/ftldns/blockingmode/
|
||||
## Options: NULL, IP-NODATA-AAAA, IP, NXDOMAIN
|
||||
#BLOCKINGMODE=NULL
|
||||
|
||||
## Regex Debug Mode
|
||||
## Controls if FTLDNS should print extended details about regex matching into pihole-FTL.log.
|
||||
## See: https://docs.pi-hole.net/ftldns/regex/overview/
|
||||
## Options: true, false
|
||||
#REGEX_DEBUGMODE=false
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
post_install() {
|
||||
# ftl DB permissions
|
||||
[ -e /etc/pihole/pihole-FTL.db ] && chown nobody.nobody /etc/pihole /etc/pihole/pihole-FTL.db
|
||||
|
||||
echo -e "\e[1;33m==>\e[0m Possible configurations in \e[1;31m/etc/pihole/pihole-FTL.conf\e[0m file"
|
||||
echo -e "\e[1;33m==>\e[0m Please read the instructions on the project page: \e[1;36mhttps://github.com/pi-hole/FTL#ftls-config-file\e[0m"
|
||||
echo -e "\e[1;33m==>\e[0m Please read the instructions on the project page: \e[1;36mhttps://docs.pi-hole.net/ftldns/configfile/\e[0m"
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
@@ -8,5 +11,5 @@ post_upgrade() {
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
userdel -f pihole
|
||||
id -u pihole > /dev/null 2>&1 && userdel -f pihole
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
[Unit]
|
||||
Description=Pi-hole FTL engine
|
||||
Description=Pi-hole FTLDNS engine
|
||||
|
||||
[Service]
|
||||
User=pihole
|
||||
Group=pihole
|
||||
PIDFile=/run/pihole-ftl/pihole-FTL.pid
|
||||
ExecStart=/usr/bin/pihole-FTL no-daemon
|
||||
Restart=on-failure
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
d /run/log/pihole-ftl 0755 pihole pihole - -
|
||||
f /run/log/pihole-ftl/pihole-FTL.log 0644 pihole pihole - -
|
||||
d /run/pihole-ftl 0755 pihole pihole - -
|
||||
f /run/pihole-ftl/pihole-FTL.pid 0644 pihole pihole - -
|
||||
f /run/pihole-ftl/pihole-FTL.port 0644 pihole pihole - -
|
||||
d /run/log/pihole-ftl 0755 nobody nobody - -
|
||||
f /run/log/pihole-ftl/pihole-FTL.log 0644 nobody nobody - -
|
||||
d /run/pihole-ftl 0755 nobody nobody - -
|
||||
f /run/pihole-ftl/pihole-FTL.pid 0644 nobody nobody - -
|
||||
f /run/pihole-ftl/pihole-FTL.port 0644 nobody nobody - -
|
||||
|
||||
Reference in New Issue
Block a user