summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authormax.bra2021-06-15 12:54:32 +0200
committermax.bra2021-06-15 12:54:32 +0200
commit67d897cd17b1925da92f03eb7d385c693934009d (patch)
tree9d42450e2f7174f569d95467d838b7ad40e3a035
parentafee74ee7b528ea5bc7d31e7e56164a19b1fb2d9 (diff)
downloadaur-67d897cd17b1925da92f03eb7d385c693934009d.tar.gz
mimic-basic-install.sh function upstream alignment
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD4
-rw-r--r--mimic_basic-install.sh23
3 files changed, 18 insertions, 16 deletions
diff --git a/.SRCINFO b/.SRCINFO
index cead2fbf2081..159ead79f07d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pi-hole-standalone
pkgdesc = The Pi-hole is an advertising-aware DNS/Web server. Arch alteration for standalone PC.
pkgver = 5.3.1
- pkgrel = 2
+ pkgrel = 3
url = https://github.com/pi-hole/pi-hole
install = pi-hole-standalone.install
arch = any
@@ -15,7 +15,7 @@ pkgbase = pi-hole-standalone
conflicts = pi-hole-server
backup = etc/dnsmasq.d/01-pihole.conf
source = pi-hole-standalone-core-5.3.1.tar.gz::https://github.com/pi-hole/pi-hole/archive/v5.3.1.tar.gz
- source = arch-server-core-5.3.1-906387555.patch::https://raw.githubusercontent.com/max72bra/pi-hole-standalone-archlinux-customization/master/arch-server-core-5.3.1.patch
+ source = arch-server-core-5.3.1-599559767.patch::https://raw.githubusercontent.com/max72bra/pi-hole-standalone-archlinux-customization/master/arch-server-core-5.3.1.patch
source = dnsmasq.include
source = pi-hole.tmpfile
source = pi-hole-gravity.service
@@ -34,8 +34,7 @@ pkgbase = pi-hole-standalone
sha256sums = 88e3c78bbeaf5dc1100df65202ded8207877954a96bdf1b0ab3d9990d9fa759f
sha256sums = ff507ce58c9492cce57e947696e1b814469fc2d856a1e303c6e68f98c62ebf46
sha256sums = 2039755530379ed25a2c0f0ebac32d52f2743004c733ee1cddb2aec1e7e60d14
- sha256sums = fa8d91d07b75f21076e5334c46d323cbc3dcf9a33fe9b8b4e032dbc5c979a6d2
+ sha256sums = 2dd900fa9ddae977e987321fc86b8c90b66e30bc31337b512e0ebda51145e744
sha256sums = 73a8362f7a3eac91c77efbbcb4910ff079203bb5f829e32ecf3391d017117bb8
pkgname = pi-hole-standalone
-
diff --git a/PKGBUILD b/PKGBUILD
index b8412bc70710..1ac0bbf6bc61 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=pi-hole-standalone
_pkgname=pi-hole
pkgver=5.3.1
-pkgrel=2
+pkgrel=3
_now=`date +%N`
pkgdesc='The Pi-hole is an advertising-aware DNS/Web server. Arch alteration for standalone PC.'
arch=('any')
@@ -35,7 +35,7 @@ sha256sums=('19c856584f180b2ed5b3d0500cd3567f00e37fa9c493282bc119be8276cdddd9'
'88e3c78bbeaf5dc1100df65202ded8207877954a96bdf1b0ab3d9990d9fa759f'
'ff507ce58c9492cce57e947696e1b814469fc2d856a1e303c6e68f98c62ebf46'
'2039755530379ed25a2c0f0ebac32d52f2743004c733ee1cddb2aec1e7e60d14'
- 'fa8d91d07b75f21076e5334c46d323cbc3dcf9a33fe9b8b4e032dbc5c979a6d2'
+ '2dd900fa9ddae977e987321fc86b8c90b66e30bc31337b512e0ebda51145e744'
'73a8362f7a3eac91c77efbbcb4910ff079203bb5f829e32ecf3391d017117bb8')
prepare() {
diff --git a/mimic_basic-install.sh b/mimic_basic-install.sh
index f1feac7abe3e..6072c27f2b8c 100644
--- a/mimic_basic-install.sh
+++ b/mimic_basic-install.sh
@@ -7,17 +7,18 @@ valid_ip() {
local ip=${1}
local stat=1
- # One IPv4 element is 8bit: 0 - 256
+ # Regex matching one IPv4 component, i.e. an integer from 0 to 255.
+ # See https://tools.ietf.org/html/rfc1340
local ipv4elem="(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]?|0)";
- # optional port number starting '#' with range of 1-65536
- local portelem="(#([1-9]|[1-8][0-9]|9[0-9]|[1-8][0-9]{2}|9[0-8][0-9]|99[0-9]|[1-8][0-9]{3}|9[0-8][0-9]{2}|99[0-8][0-9]|999[0-9]|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-6]))?"
- # build a full regex string from the above parts
+ # Regex matching an optional port (starting with '#') range of 1-65536
+ local portelem="(#(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))?";
+ # Build a full IPv4 regex from the above subexpressions
local regex="^${ipv4elem}\.${ipv4elem}\.${ipv4elem}\.${ipv4elem}${portelem}$"
+ # Evaluate the regex, and return the result
[[ $ip =~ ${regex} ]]
stat=$?
- # Return the exit code
return "${stat}"
}
@@ -25,16 +26,18 @@ valid_ip6() {
local ip=${1}
local stat=1
- # One IPv6 element is 16bit: 0000 - FFFF
+ # Regex matching one IPv6 element, i.e. a hex value from 0000 to FFFF
local ipv6elem="[0-9a-fA-F]{1,4}"
- # CIDR for IPv6 is 1- 128 bit
+ # Regex matching an IPv6 CIDR, i.e. 1 to 128
local v6cidr="(\\/([1-9]|[1-9][0-9]|1[0-1][0-9]|12[0-8])){0,1}"
- # build a full regex string from the above parts
- local regex="^(((${ipv6elem}))((:${ipv6elem}))*::((${ipv6elem}))*((:${ipv6elem}))*|((${ipv6elem}))((:${ipv6elem})){7})${v6cidr}$"
+ # Regex matching an optional port (starting with '#') range of 1-65536
+ local portelem="(#(6553[0-5]|655[0-2][0-9]|65[0-4][0-9]{2}|6[0-4][0-9]{3}|[1-5][0-9]{4}|[1-9][0-9]{0,3}|0))?";
+ # Build a full IPv6 regex from the above subexpressions
+ local regex="^(((${ipv6elem}))*((:${ipv6elem}))*::((${ipv6elem}))*((:${ipv6elem}))*|((${ipv6elem}))((:${ipv6elem})){7})${v6cidr}${portelem}$"
+ # Evaluate the regex, and return the result
[[ ${ip} =~ ${regex} ]]
stat=$?
- # Return the exit code
return "${stat}"
}