Compare commits
19 Commits
2026.1-dev
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
| 045f20a120 | |||
| 2d8dcb239a | |||
|
|
3867f9acdc | ||
|
|
71776145db | ||
|
|
3f915b3120 | ||
|
|
f97907e95e | ||
|
|
43338c3fd4 | ||
|
|
8c8579b3f6 | ||
|
|
6b66146b2a | ||
|
|
4486d6a3c1 | ||
|
|
81862a0b80 | ||
|
|
5f355cdc1b | ||
| fa2c6775c0 | |||
| b0d79cbb26 | |||
| 6e88da887c | |||
| 5591ae7379 | |||
| 6e56dd1e6c | |||
| c1fe3c1c9b | |||
|
|
7af09af8d1 |
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -2,7 +2,3 @@
|
|||||||
path = mullvad-vpn-daemon/mullvadvpn-app
|
path = mullvad-vpn-daemon/mullvadvpn-app
|
||||||
url = git@github.com:mullvad/mullvadvpn-app-priv.git
|
url = git@github.com:mullvad/mullvadvpn-app-priv.git
|
||||||
branch = poc-slint
|
branch = poc-slint
|
||||||
[submodule "mullvad-vpn-slint/mullvadvpn-app"]
|
|
||||||
path = mullvad-vpn-slint/mullvadvpn-app
|
|
||||||
url = git@github.com:mullvad/mullvadvpn-app-priv.git
|
|
||||||
branch = poc-slint
|
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ set -ex
|
|||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
package="$1"
|
package="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
builder_image="mullvad-slint-musl-builder"
|
builder_image="mullvad-slint-musl-builder"
|
||||||
cargo_home="${CARGO_HOME:-$HOME/.cargo}"
|
cargo_home="${CARGO_HOME:-$HOME/.cargo}"
|
||||||
. "$HOME/.abuild/abuild.conf"
|
. "$HOME/.abuild/abuild.conf"
|
||||||
@@ -22,5 +24,5 @@ docker run --rm \
|
|||||||
-e "CARGO_TARGET_DIR=/cargo-target" \
|
-e "CARGO_TARGET_DIR=/cargo-target" \
|
||||||
-it \
|
-it \
|
||||||
"$builder_image" \
|
"$builder_image" \
|
||||||
abuild -F
|
abuild -F "$@"
|
||||||
|
|
||||||
|
|||||||
@@ -1,85 +1,93 @@
|
|||||||
# Contributor:
|
maintainer="Joakim Hulthe <joakim@hulthe.net>"
|
||||||
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
|
|
||||||
pkgname=mullvad-vpn-daemon
|
pkgname=mullvad-vpn-daemon
|
||||||
pkgver=2026.1_git
|
pkgver=2026.2_beta1
|
||||||
pkgrel=4
|
pkgrel=0
|
||||||
pkgdesc="Mullvad VPN system service"
|
pkgdesc="Mullvad VPN client (daemon and CLI)"
|
||||||
url="https://mullvad.net/"
|
url="https://mullvad.net/"
|
||||||
arch="all"
|
# Mullvad depends on old versions of the `nix` library
|
||||||
license="GPL-3-or-later"
|
# which are broken on on loongarch64 and s390x
|
||||||
depends="
|
arch="all !loongarch64 !s390x"
|
||||||
dbus
|
license="GPL-3.0-or-later"
|
||||||
libmnl
|
|
||||||
libnftnl
|
|
||||||
"
|
|
||||||
makedepends="
|
makedepends="
|
||||||
build-base
|
|
||||||
cargo-auditable
|
cargo-auditable
|
||||||
rust
|
|
||||||
pkgconfig
|
|
||||||
git
|
git
|
||||||
protobuf-dev
|
protobuf-dev
|
||||||
dbus-dev
|
dbus-dev
|
||||||
libmnl-dev
|
libmnl-dev
|
||||||
libnftnl-dev
|
libnftnl-dev
|
||||||
"
|
"
|
||||||
checkdepends=""
|
install="
|
||||||
install="$pkgname.post-install $pkgname.pre-upgrade $pkgname.post-upgrade $pkgname.pre-deinstall $pkgname.post-deinstall"
|
$pkgname.pre-upgrade
|
||||||
subpackages="$pkgname-systemd"
|
$pkgname.pre-deinstall
|
||||||
source=""
|
$pkgname-systemd.post-install
|
||||||
builddir="$srcdir/"
|
$pkgname-systemd.post-upgrade
|
||||||
|
$pkgname-systemd.pre-deinstall
|
||||||
|
"
|
||||||
|
subpackages="
|
||||||
|
$pkgname-systemd
|
||||||
|
$pkgname-suid
|
||||||
|
"
|
||||||
|
source="
|
||||||
|
https://github.com/mullvad/mullvadvpn-app/archive/refs/tags/${pkgver//_/-}.tar.gz
|
||||||
|
"
|
||||||
|
builddir="$srcdir/mullvadvpn-app-${pkgver//_/-}/"
|
||||||
options="net suid"
|
options="net suid"
|
||||||
|
|
||||||
_cargo_target_dir="${CARGO_TARGET_DIR:-$startdir/mullvadvpn-app/target}"
|
_cargo_target_dir="${CARGO_TARGET_DIR:-$builddir/target}"
|
||||||
|
_cargo_release_dir="$_cargo_target_dir/$CHOST/release"
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
default_prepare
|
default_prepare
|
||||||
|
|
||||||
cd "$startdir/mullvadvpn-app"
|
|
||||||
cargo fetch --target "$CHOST" --locked
|
cargo fetch --target "$CHOST" --locked
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$startdir/mullvadvpn-app"
|
# Specify `--target` so that build artifacts will be in target/<target>/release
|
||||||
|
# This avoids clashes with host system when building in a container.
|
||||||
|
|
||||||
# Specify `--target` so that the build artifacts ends up in target/<target>/release to
|
# Compile all binaries
|
||||||
# avoid clashes with host system when running in a container with a mounted target folder.
|
cargo auditable build --release --frozen \
|
||||||
cargo auditable build --release --locked \
|
--target "$CHOST" \
|
||||||
--target "$CHOST" \
|
-p mullvad-cli \
|
||||||
-p mullvad-cli \
|
-p mullvad-daemon \
|
||||||
-p mullvad-daemon \
|
-p mullvad-exclude \
|
||||||
-p mullvad-exclude \
|
-p mullvad-problem-report \
|
||||||
-p mullvad-problem-report \
|
-p mullvad-setup
|
||||||
-p mullvad-setup
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd "$startdir/mullvadvpn-app"
|
|
||||||
cargo test --target "$CHOST" --frozen
|
cargo test --target "$CHOST" --frozen
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad" \
|
install -m755 -Dt "$pkgdir/usr/bin/" \
|
||||||
"$pkgdir"/usr/bin/mullvad
|
"$_cargo_release_dir/mullvad" \
|
||||||
|
"$_cargo_release_dir/mullvad-daemon" \
|
||||||
|
"$_cargo_release_dir/mullvad-problem-report" \
|
||||||
|
"$_cargo_release_dir/mullvad-setup"
|
||||||
|
|
||||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-daemon" \
|
# TODO: Bundle a relay list.
|
||||||
"$pkgdir"/usr/bin/mullvad-daemon
|
# We can't generate one at build time since that would break build reproducibility.
|
||||||
|
# Once mullvad starts checking a relay list into their release branches, we can bundle that.
|
||||||
|
#install -m644 -D "$builddir/<todo>/relays.json" \
|
||||||
|
# "$pkgdir/usr/share/mullvad-vpn/relays.json"
|
||||||
|
# TODO: Copy relay list into /var/cache/ in post-upgrade/post-install
|
||||||
|
|
||||||
# mullvad-exclude requires setuid
|
# files in /usr/lib/systemd/ are automatically put in systemd subpackage
|
||||||
install -m4755 -D "$_cargo_target_dir/$CHOST/release/mullvad-exclude" \
|
install -m755 -Dt "$pkgdir/usr/lib/systemd/system/" \
|
||||||
"$pkgdir"/usr/bin/mullvad-exclude
|
"$builddir/dist-assets/linux/mullvad-daemon.service" \
|
||||||
|
"$builddir/dist-assets/linux/mullvad-early-boot-blocking.service"
|
||||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-problem-report" \
|
|
||||||
"$pkgdir"/usr/bin/mullvad-problem-report
|
|
||||||
|
|
||||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-setup" \
|
|
||||||
"$pkgdir"/usr/bin/mullvad-setup
|
|
||||||
}
|
}
|
||||||
|
|
||||||
systemd() {
|
suid() {
|
||||||
install -m755 -D "$startdir/mullvadvpn-app/dist-assets/linux/mullvad-daemon.service" \
|
pkgdesc="mullvad-exclude cli for split tunneling"
|
||||||
"$subpkgdir"/usr/lib/systemd/system/mullvad-daemon.service
|
depends="$pkgname=$pkgver-r$pkgrel"
|
||||||
|
|
||||||
install -m755 -D "$startdir/mullvadvpn-app/dist-assets/linux/mullvad-early-boot-blocking.service" \
|
install -m4755 -Dt "$subpkgdir/usr/bin/" \
|
||||||
"$subpkgdir"/usr/lib/systemd/system/mullvad-early-boot-blocking.service
|
"$_cargo_release_dir/mullvad-exclude"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sha512sums="
|
||||||
|
9af0c263f0e5985d7842099f50a5070da0b23691f08ffe57c3b6d239d2c1c9acea89c07890f31d89bd75448a2dd1fd3c878b85be458baba0bcd90760e714b032 2026.2-beta1.tar.gz
|
||||||
|
"
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# Enable and start systemd services
|
||||||
|
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
||||||
|
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||||
|
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||||
|
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||||
|
fi
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# Enable and start systemd services
|
||||||
|
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
||||||
|
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||||
|
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||||
|
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||||
|
fi
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
# Stop and disable all mullvad services
|
||||||
|
systemctl stop mullvad-daemon.service || true
|
||||||
|
systemctl disable mullvad-daemon.service || true
|
||||||
|
systemctl stop mullvad-early-boot-blocking.service || true
|
||||||
|
systemctl disable mullvad-early-boot-blocking.service || true
|
||||||
@@ -1,9 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
rm -r --interactive=never /var/log/mullvad-vpn/ || \
|
|
||||||
echo "Failed to remove mullvad-vpn logs"
|
|
||||||
rm -r --interactive=never /var/cache/mullvad-vpn/ || \
|
|
||||||
echo "Failed to remove mullvad-vpn cache"
|
|
||||||
rm -r --interactive=never /etc/mullvad-vpn || \
|
|
||||||
echo "Failed to remove mullvad-vpn config"
|
|
||||||
@@ -1,10 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
# TODO: see `package()` in APKBUILD
|
||||||
if systemctl status mullvad-daemon &> /dev/null; then
|
# Copy vendored relay list into place
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
# mkdir -p /var/cache/mullvad-vpn \
|
||||||
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
# && cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json \
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
# || echo "failed to install /var/cache/mullvad-vpn/relays.json"
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -1,10 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
# TODO: see `package()` in APKBUILD
|
||||||
if systemctl status mullvad-daemon &> /dev/null; then
|
# Overwrite the cached relay list with the vendored one.
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
# mkdir -p /var/cache/mullvad-vpn \
|
||||||
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
# && cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json \
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
# || echo "failed to install /var/cache/mullvad-vpn/relays.json"
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|||||||
@@ -1,23 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
echo "Running prerm."
|
# Log out and remove any firewall rules
|
||||||
is_number_re='^[0-9]+$'
|
|
||||||
# Check if we're running during an upgrade step on Fedora
|
|
||||||
# https://fedoraproject.org/wiki/Packaging:Scriptlets#Syntax
|
|
||||||
if [[ "$1" =~ $is_number_re ]] && [ "$1" -gt 0 ]; then
|
|
||||||
exit 0;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [[ "$1" == "upgrade" ]]; then
|
|
||||||
exit 0;
|
|
||||||
fi
|
|
||||||
|
|
||||||
# the user might've disabled or stopped the service themselves already
|
|
||||||
systemctl stop mullvad-daemon.service || true
|
|
||||||
systemctl disable mullvad-daemon.service || true
|
|
||||||
systemctl stop mullvad-early-boot-blocking.service || true
|
|
||||||
systemctl disable mullvad-early-boot-blocking.service || true
|
|
||||||
|
|
||||||
mullvad-setup reset-firewall || echo "Failed to reset firewall"
|
mullvad-setup reset-firewall || echo "Failed to reset firewall"
|
||||||
mullvad-setup remove-device || echo "Failed to remove device from account"
|
mullvad-setup remove-device || echo "Failed to remove device from account"
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
#!/usr/bin/env bash
|
#!/bin/sh
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
# Stop the daemon gracefully, and set up firewall rules to prevent network
|
||||||
if systemctl status mullvad-daemon &> /dev/null; then
|
# leaks during upgrade.
|
||||||
|
if which systemctl >/dev/null 2>&1 && systemctl is-system-running | grep -vq offline >/dev/null 2>&1; then
|
||||||
|
if systemctl status mullvad-daemon >/dev/null 2>&1; then
|
||||||
mullvad-setup prepare-restart || true
|
mullvad-setup prepare-restart || true
|
||||||
systemctl stop mullvad-daemon.service
|
systemctl stop mullvad-daemon.service
|
||||||
systemctl disable mullvad-daemon.service
|
systemctl disable mullvad-daemon.service
|
||||||
@@ -12,5 +14,5 @@ if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offlin
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm -f /var/cache/mullvad-vpn/relays.json
|
# Clear the cached API IP address.
|
||||||
rm -f /var/cache/mullvad-vpn/api-ip-address.txt
|
rm -f /var/cache/mullvad-vpn/api-ip-address.txt
|
||||||
|
|||||||
Submodule mullvad-vpn-daemon/mullvadvpn-app deleted from 236bbc4c0e
@@ -4,6 +4,8 @@ set -ex
|
|||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
package="$1"
|
package="$1"
|
||||||
|
shift
|
||||||
|
|
||||||
builder_image="mullvad-slint-musl-builder"
|
builder_image="mullvad-slint-musl-builder"
|
||||||
cargo_home="${CARGO_HOME:-$HOME/.cargo}"
|
cargo_home="${CARGO_HOME:-$HOME/.cargo}"
|
||||||
. "$HOME/.abuild/abuild.conf"
|
. "$HOME/.abuild/abuild.conf"
|
||||||
@@ -22,5 +24,5 @@ podman run --rm \
|
|||||||
-e "CARGO_TARGET_DIR=/cargo-target" \
|
-e "CARGO_TARGET_DIR=/cargo-target" \
|
||||||
-it \
|
-it \
|
||||||
"$builder_image" \
|
"$builder_image" \
|
||||||
abuild -F
|
abuild -F "$@"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user