summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Brock2023-09-20 17:19:05 +0200
committerLaurent Brock2023-09-20 17:19:05 +0200
commit4dea9cc0f6ff61b040d83c5492e649181d0354a6 (patch)
tree57c719fb3c604a3b4c2c58bd5aa5c224b3b7832a
parentffe2f5a3041805c078b135f090134832dc120299 (diff)
downloadaur-4dea9cc0f6ff61b040d83c5492e649181d0354a6.tar.gz
Fix for iproute2 package changing rt_tables file location
-rw-r--r--.SRCINFO46
-rw-r--r--PKGBUILD8
-rw-r--r--piavpn-bin.install18
3 files changed, 38 insertions, 34 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 73efc0b9e5bf..5ee382869e41 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,26 +1,26 @@
pkgbase = piavpn-bin
-pkgdesc = Private Internet Access client
-pkgver = 3.3.1_06924
-pkgrel = 3
-url = https://privateinternetaccess.com/
-install = piavpn-bin.install
-arch = x86_64
-arch = aarch64
-license = custom
-makedepends = libcap
-depends = libxkbcommon-x11
-depends = libnl
-depends = zip
-optdepends = WIREGUARD-MODULE: to use the wireguard kernel module instead
-provides = piavpn
-conflicts = pia-launch
-conflicts = pia-manager
-conflicts = pia-tools
-conflicts = private-internet-access-vpn
-options = !strip
-source_x86_64 = https://installers.privateinternetaccess.com/download/pia-linux-3.3.1-06924.run
-sha256sums_x86_64 = eee140e511adfac4d74b059ed9d673f1b910163b5b92ac35642a65592fef639d
-source_aarch64 = https://installers.privateinternetaccess.com/download/pia-linux-arm64-3.3.1-06924.run
-sha256sums_aarch64 = 7cde46390c69104f6d21a7729f90222c3ff88dab6c8bef33c4d41dedcf2df783
+ pkgdesc = Private Internet Access client
+ pkgver = 3.3.1_06924
+ pkgrel = 4
+ url = https://privateinternetaccess.com/
+ install = piavpn-bin.install
+ arch = x86_64
+ arch = aarch64
+ license = custom
+ makedepends = libcap
+ depends = libxkbcommon-x11
+ depends = libnl
+ depends = zip
+ optdepends = WIREGUARD-MODULE: to use the wireguard kernel module instead
+ provides = piavpn
+ conflicts = pia-launch
+ conflicts = pia-manager
+ conflicts = pia-tools
+ conflicts = private-internet-access-vpn
+ options = !strip
+ source_x86_64 = https://installers.privateinternetaccess.com/download/pia-linux-3.3.1-06924.run
+ sha256sums_x86_64 = eee140e511adfac4d74b059ed9d673f1b910163b5b92ac35642a65592fef639d
+ source_aarch64 = https://installers.privateinternetaccess.com/download/pia-linux-arm64-3.3.1-06924.run
+ sha256sums_aarch64 = 7cde46390c69104f6d21a7729f90222c3ff88dab6c8bef33c4d41dedcf2df783
pkgname = piavpn-bin
diff --git a/PKGBUILD b/PKGBUILD
index f55d5e2191d5..a7591378dde9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,9 +1,9 @@
-# Maintainer: solsTiCe d'Hiver <solstice.dhiver@gmail.com>
+# Maintainer: Laurent Brock <incognito0135@protonmail.com>
pkgname=piavpn-bin
pkgver=3.3.1_06924
_pkgver=${pkgver/\.0_/_}
_pkgver=${_pkgver/_/-}
-pkgrel=3
+pkgrel=4
pkgdesc="Private Internet Access client"
# https://www.privateinternetaccess.com/pages/changelog
arch=('x86_64' 'aarch64')
@@ -66,6 +66,10 @@ package() {
# limit log to the minimum to avoid excessive flooding
mkdir -p $pkgdir/opt/piavpn/var
cat > $pkgdir/opt/piavpn/var/debug.txt << EOF
+
+ echo "== For a first install, you need to enable and start piavpn.service. Run sudo systemctl enable --now piavpn.service =="
+ echo "== If you are upgrading from 3.3.1_06924-3 to 3.3.1_06924-4, you need to uninstall and reinstall the package, as the rt_tables file has changed locations =="
+
[rules]
*.debug=false
*.info=false
diff --git a/piavpn-bin.install b/piavpn-bin.install
index d863d92c4894..080526e04c6e 100644
--- a/piavpn-bin.install
+++ b/piavpn-bin.install
@@ -1,11 +1,11 @@
-# copy-pasted from install.sh in .run file
+# copy-pasted from install.sh in .run file, but with modified rt_tables path
function addRoutingTable() {
- local highestIndex=$(awk '/^[0-9]/{print $1}' /etc/iproute2/rt_tables | sort -n | tail -1)
+ local highestIndex=$(awk '/^[0-9]/{print $1}' /usr/lib/iproute2/rt_tables | sort -n | tail -1)
local newIndex=$(($highestIndex + 1))
local routingTable="$1"
- if ! grep -q "$routingTable" /etc/iproute2/rt_tables; then
- echo -e "$newIndex\t$routingTable" >> /etc/iproute2/rt_tables
+ if ! grep -q "$routingTable" /usr/lib/iproute2/rt_tables; then
+ echo -e "$newIndex\t$routingTable" >> /usr/lib/iproute2/rt_tables
fi
}
@@ -30,16 +30,16 @@ pre_remove() {
}
post_remove() {
- sed -i '/.*piavpnrt$/d' /etc/iproute2/rt_tables
- sed -i '/.*piavpnOnlyrt$/d' /etc/iproute2/rt_tables
- sed -i '/.*piavpnWgrt$/d' /etc/iproute2/rt_tables
- sed -i '/.*piavpnFwdrt$/d' /etc/iproute2/rt_tables
+ sed -i '/.*piavpnrt$/d' /usr/lib/iproute2/rt_tables
+ sed -i '/.*piavpnOnlyrt$/d' /usr/lib/iproute2/rt_tables
+ sed -i '/.*piavpnWgrt$/d' /usr/lib/iproute2/rt_tables
+ sed -i '/.*piavpnFwdrt$/d' /usr/lib/iproute2/rt_tables
groupdel piavpn
groupdel piahnsd
}
post_upgrade() {
- if ! grep -q piavpnFwdrt /etc/iproute2/rt_tables; then
+ if ! grep -q piavpnFwdrt /usr/lib/iproute2/rt_tables; then
addRoutingTable piavpnFwdrt
fi
systemctl daemon-reload