summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Kramer2020-10-03 17:11:17 +0200
committerTimo Kramer2020-10-03 17:11:17 +0200
commit6ab792dfe648fc947a8585f9427d0fa60c864d5c (patch)
tree3e9aa1685f6ef17909be8775055a0d9fbcfbc8b5
parent667627fea57628805423f5de8a2347acb93f83b4 (diff)
downloadaur-6ab792dfe648fc947a8585f9427d0fa60c864d5c.tar.gz
2020.5 disabled testing
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD51
-rw-r--r--mullvad-vpn-cli.install53
3 files changed, 62 insertions, 51 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 933d9ddecd74..7f888c34e863 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = mullvad-vpn-cli
pkgdesc = The Mullvad VPN client cli
- pkgver = 2020.4
- pkgrel = 2
+ pkgver = 2020.5
+ pkgrel = 1
url = https://www.mullvad.net
install = mullvad-vpn-cli.install
arch = x86_64
@@ -11,12 +11,11 @@ pkgbase = mullvad-vpn-cli
makedepends = go
depends = nss
conflicts = mullvad-vpn
- source = git+https://github.com/mullvad/mullvadvpn-app.git#tag=2020.4?signed
- source = git+https://github.com/mullvad/mullvadvpn-app-binaries.git#commit=90b0c06b59a0b9d6cda69924377335f39854b216?signed
+ source = git+https://github.com/mullvad/mullvadvpn-app.git#tag=2020.5?signed
+ source = git+https://github.com/mullvad/mullvadvpn-app-binaries.git#commit=f9c55513f372de96223fad3ab6bd2aa78d517387?signed
source = override.conf
source = settings.json.sample
validpgpkeys = EA0A77BF9E115615FC3BD8BC7653B940E494FE87
- validpgpkeys = 8339C7D2942EB854E3F27CE5AEE9DECFD582E984
sha256sums = SKIP
sha256sums = SKIP
sha256sums = ed978958f86da9acbce950a832491b140a350c594e2446b99a7c397a98731316
diff --git a/PKGBUILD b/PKGBUILD
index f58fb2db3106..9f1b7edbed22 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,8 +1,8 @@
# Maintainer: Timo Kramer <fw minus aur at timokramer dot de>
pkgname=mullvad-vpn-cli
-pkgver=2020.4
-pkgrel=2
+pkgver=2020.5
+pkgrel=1
pkgdesc="The Mullvad VPN client cli"
url="https://www.mullvad.net"
arch=('x86_64')
@@ -11,7 +11,7 @@ depends=('nss')
makedepends=('git' 'rust' 'go')
conflicts=('mullvad-vpn')
install="${pkgname}.install"
-_commit='90b0c06b59a0b9d6cda69924377335f39854b216'
+_commit='f9c55513f372de96223fad3ab6bd2aa78d517387'
source=("git+https://github.com/mullvad/mullvadvpn-app.git#tag=${pkgver}?signed"
"git+https://github.com/mullvad/mullvadvpn-app-binaries.git#commit=${_commit}?signed"
'override.conf'
@@ -20,36 +20,39 @@ sha256sums=('SKIP'
'SKIP'
'ed978958f86da9acbce950a832491b140a350c594e2446b99a7c397a98731316'
'2729b6842bff30eb3dae23a2133054ab1cfe9312a4fc9baa8433a81e9bafd362')
-validpgpkeys=('EA0A77BF9E115615FC3BD8BC7653B940E494FE87'
+validpgpkeys=('EA0A77BF9E115615FC3BD8BC7653B940E494FE87')
# Linus Färnstrand (code signing key) <linus at mullvad dot net>
- '8339C7D2942EB854E3F27CE5AEE9DECFD582E984')
- # David Lönnhager (code signing) <david dot l at mullvad dot net>
prepare() {
# Point the submodule to our local copy
cd "${srcdir}/mullvadvpn-app"
git submodule init dist-assets/binaries
- git config submodule.mullvadvpn-app-binaries.url \
- "${srcdir}/mullvadvpn-app-binaries"
+ git config submodule.mullvadvpn-app-binaries.url "${srcdir}/mullvadvpn-app-binaries"
git submodule update
+ export GOPATH="$srcdir/gopath"
+ go clean -modcache
+
mkdir -p dist-assets/shell-completions
}
build() {
- # Build wireguard-go
+ # Compile wireguard-go
cd "$srcdir/mullvadvpn-app/wireguard/libwg"
mkdir -p "../../build/lib/$arch-unknown-linux-gnu"
- go build \
- -trimpath \
- -ldflags "-extldflags $LDFLAGS" \
- -v -o "../../build/lib/$arch-unknown-linux-gnu"/libwg.a \
- -buildmode c-archive
+ export CGO_CPPFLAGS="${CPPFLAGS}"
+ export CGO_CFLAGS="${CFLAGS}"
+ export CGO_CXXFLAGS="${CXXFLAGS}"
+ export CGO_LDFLAGS="${LDFLAGS}"
+ export GOFLAGS="-buildmode=pie -trimpath -ldflags=-linkmode=external -mod=readonly -modcacherw"
+ go build -v -o "../../build/lib/$arch-unknown-linux-gnu"/libwg.a -buildmode c-archive
+
+ go clean -modcache
cd "${srcdir}/mullvadvpn-app"
- # Remove old Rust build artifacts
- cargo clean --release --locked
+ echo "Removing old Rust build artifacts"
+ cargo clean
# Build mullvad-daemon
cargo build --release --locked
@@ -59,6 +62,8 @@ build() {
binaries=(mullvad
mullvad-daemon
mullvad-problem-report
+ mullvad-setup
+ mullvad-exclude
libtalpid_openvpn_plugin.so)
for binary in ${binaries[*]}; do
cp target/release/${binary} dist-assets/${binary}
@@ -76,17 +81,12 @@ build() {
done
}
-check() {
- cd "${srcdir}/mullvadvpn-app"
- cargo test --release --locked
-}
-
package() {
cd "${srcdir}/mullvadvpn-app"
# Install main files
install --verbose --directory --mode=755 "${pkgdir}/opt/mullvad-vpn-cli"
- cp -av dist-assets/* "${pkgdir}/opt/mullvad-vpn-cli"
+ cp -rav dist-assets/* "${pkgdir}/opt/mullvad-vpn-cli"
# Install daemon service
install --verbose -D --mode=644 dist-assets/linux/mullvad-daemon.service -t \
@@ -99,13 +99,16 @@ package() {
# Install CLI binary
install --verbose -D --mode=755 target/release/mullvad -t "${pkgdir}/usr/bin"
+ # Install CLI exclude binary
+ install --verbose -D --mode=755 target/release/mullvad-exclude -t "${pkgdir}/usr/bin"
+
# Install shell completion zsh
install --verbose -D --mode=644 dist-assets/shell-completions/_mullvad -t \
- "${pkgdir}/usr/local/share/zsh/site-functions"
+ "${pkgdir}/usr/share/zsh/site-functions"
# Install shell completion bash
install --verbose -D --mode=644 dist-assets/shell-completions/mullvad.bash -t \
- "${pkgdir}/usr/share/bash-completion/completions"
+ "${pkgdir}/usr/share/bash-completion/completions/mullvad"
# Install settings.json
install --verbose -D --mode=644 "${srcdir}/settings.json.sample" -t "${pkgdir}/etc/mullvad-vpn"
diff --git a/mullvad-vpn-cli.install b/mullvad-vpn-cli.install
index b56ee3ea82d9..8de2edc48b46 100644
--- a/mullvad-vpn-cli.install
+++ b/mullvad-vpn-cli.install
@@ -1,8 +1,8 @@
pre_install() {
- if systemctl status mullvad-daemon &> /dev/null; then
- echo 'Stopping & disabling Mullvad VPN daemon...'
- systemctl disable --now mullvad-daemon
- fi
+ if systemctl status mullvad-daemon &> /dev/null; then
+ echo 'Stopping & disabling Mullvad VPN daemon...'
+ systemctl disable --now mullvad-daemon
+ fi
}
post_install() {
@@ -13,34 +13,43 @@ post_install() {
echo 'Please edit /etc/mullvad-vpn/settings.json'
fi
echo 'Enabling Mullvad VPN daemon...'
- systemctl enable --now mullvad-daemon
+ systemctl enable mullvad-daemon
+ chmod u+s "/usr/bin/mullvad-exclude"
+ echo -----------------------------------------------------------------------------------
+ echo 'Mullvad daemon enabled but not started because the CLI might be used remotely.'
+ echo 'Be aware that the daemon will be started after a reboot.'
+ echo 'Please start the daemon now if you want to:'
+ echo ''
+ echo 'systemctl start mullvad-daemon.service'
+ echo -----------------------------------------------------------------------------------
}
pre_upgrade() {
- echo 'Stopping Mullvad VPN daemon...'
- systemctl stop mullvad-daemon
+ echo 'Stopping Mullvad VPN daemon...'
+ systemctl stop mullvad-daemon
}
post_upgrade() {
- echo 'Restarting Mullvad VPN daemon...'
- systemctl daemon-reload
- systemctl start mullvad-daemon
+ echo 'Restarting Mullvad VPN daemon...'
+ systemctl daemon-reload
+ systemctl start mullvad-daemon
+ chmod u+s "/usr/bin/mullvad-exclude"
}
pre_remove() {
- # the user might've disabled or stopped the service themselves already
- echo 'Making sure the Mullvad VPN daemon is stopped & disabled...'
- systemctl stop mullvad-daemon || true
- systemctl disable mullvad-daemon || true
+ # the user might've disabled or stopped the service themselves already
+ echo 'Making sure the Mullvad VPN daemon is stopped & disabled...'
+ systemctl stop mullvad-daemon || true
+ systemctl disable mullvad-daemon || true
}
post_remove() {
- echo -------------------------------------------------------------
- echo 'Optionally remove logs & cache:'
- echo 'sudo rm -rf /var/log/mullvad-vpn/'
- echo 'sudo rm -rf /var/cache/mullvad-vpn/'
- echo ''
- echo 'Optionally remove config:'
- echo 'sudo rm /etc/mullvad-vpn/settings.json'
- echo -------------------------------------------------------------
+ echo -------------------------------------------------------------
+ echo 'Optionally remove logs & cache:'
+ echo 'sudo rm -rf /var/log/mullvad-vpn/'
+ echo 'sudo rm -rf /var/cache/mullvad-vpn/'
+ echo ''
+ echo 'Optionally remove config:'
+ echo 'sudo rm /etc/mullvad-vpn/settings.json'
+ echo -------------------------------------------------------------
}