Compare commits
1 Commits
master
...
0b35be6284
| Author | SHA1 | Date | |
|---|---|---|---|
| 0b35be6284 |
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -2,3 +2,7 @@
|
|||||||
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
|
||||||
|
|||||||
@@ -14,8 +14,7 @@ RUN apk update && apk add \
|
|||||||
libmnl libmnl-dev \
|
libmnl libmnl-dev \
|
||||||
libnftnl libnftnl-dev \
|
libnftnl libnftnl-dev \
|
||||||
dbus dbus-dev \
|
dbus dbus-dev \
|
||||||
fontconfig-dev \
|
fontconfig-dev
|
||||||
wayland-dev
|
|
||||||
|
|
||||||
# Set pkg-config to use static libraries
|
# Set pkg-config to use static libraries
|
||||||
ENV PKG_CONFIG_ALLOW_STATIC=1
|
ENV PKG_CONFIG_ALLOW_STATIC=1
|
||||||
|
|||||||
@@ -4,8 +4,6 @@ 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"
|
||||||
@@ -24,5 +22,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,90 +1,81 @@
|
|||||||
maintainer="Joakim Hulthe <joakim@hulthe.net>"
|
# Contributor:
|
||||||
|
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
|
||||||
pkgname=mullvad-vpn-daemon
|
pkgname=mullvad-vpn-daemon
|
||||||
pkgver=2026.3_beta1
|
pkgver=2026.1_git
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="Mullvad VPN client (daemon and CLI)"
|
pkgdesc="Mullvad VPN system service"
|
||||||
url="https://mullvad.net/"
|
url="https://mullvad.net/"
|
||||||
# Mullvad depends on old versions of the `nix` library
|
arch="$(uname -m)"
|
||||||
# which are broken on on loongarch64 and s390x
|
license="GPL-3-or-later"
|
||||||
arch="all !loongarch64 !s390x"
|
depends="
|
||||||
license="GPL-3.0-or-later"
|
dbus
|
||||||
|
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
|
||||||
"
|
"
|
||||||
install="
|
checkdepends=""
|
||||||
$pkgname.post-install
|
# TODO: pre/post(de)install-scripts
|
||||||
$pkgname.post-upgrade
|
install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall"
|
||||||
$pkgname.pre-upgrade
|
#install=""
|
||||||
$pkgname-systemd.post-install
|
subpackages="$pkgname-systemd"
|
||||||
$pkgname-systemd.post-upgrade
|
source=""
|
||||||
"
|
builddir="$srcdir/"
|
||||||
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:-$builddir/target}"
|
_cargo_target_dir="${CARGO_TARGET_DIR:-$startdir/mullvadvpn-app/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() {
|
||||||
# Specify `--target` so that build artifacts will be in target/<target>/release
|
cd "$startdir/mullvadvpn-app"
|
||||||
# This avoids clashes with host system when building in a container.
|
|
||||||
|
|
||||||
# Compile all binaries
|
# * Force the `stable` toolchain since it's installed in the container.
|
||||||
cargo auditable build --release --frozen \
|
# We don't wan't to needlessly download rust while building.
|
||||||
--target "$CHOST" \
|
# * Specify `--target` so that the final binary ends up in target/<target>/release.
|
||||||
-p mullvad-cli \
|
cargo auditable build --release --locked \
|
||||||
-p mullvad-daemon \
|
--target "$CHOST" \
|
||||||
-p mullvad-exclude \
|
-p mullvad-daemon \
|
||||||
-p mullvad-problem-report \
|
-p mullvad-cli \
|
||||||
-p mullvad-setup
|
-p mullvad-exclude \
|
||||||
|
-p mullvad-problem-report
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cargo test --target "$CHOST" --frozen
|
cd "$startdir/mullvadvpn-app"
|
||||||
|
cargo test --frozen
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
install -m755 -Dt "$pkgdir/usr/bin/" \
|
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-daemon" \
|
||||||
"$_cargo_release_dir/mullvad" \
|
"$pkgdir"/usr/bin/mullvad-daemon
|
||||||
"$_cargo_release_dir/mullvad-daemon" \
|
|
||||||
"$_cargo_release_dir/mullvad-problem-report" \
|
|
||||||
"$_cargo_release_dir/mullvad-setup"
|
|
||||||
|
|
||||||
# Bundle the relay list.
|
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad" \
|
||||||
install -m644 -D "$builddir/dist-assets/relays/relays.json" \
|
"$pkgdir"/usr/bin/mullvad
|
||||||
"$pkgdir/usr/share/mullvad-vpn/relays.json"
|
|
||||||
|
|
||||||
# Files in /usr/lib/systemd/ are automatically put in systemd subpackage
|
install -m755 -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" \
|
chmod u+s "$pkgdir"/usr/bin/mullvad-exclude
|
||||||
"$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
|
||||||
}
|
}
|
||||||
|
|
||||||
suid() {
|
systemd() {
|
||||||
pkgdesc="mullvad-exclude cli for split tunneling"
|
install -m755 -D "$startdir/mullvadvpn-app/dist-assets/linux/mullvad-daemon.service" \
|
||||||
depends="$pkgname=$pkgver-r$pkgrel"
|
"$subpkgdir"/usr/lib/systemd/system/mullvad-daemon.service
|
||||||
|
|
||||||
install -m4755 -Dt "$subpkgdir/usr/bin/" \
|
|
||||||
"$_cargo_release_dir/mullvad-exclude"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sha512sums="
|
|
||||||
7766ad0401cd42a43c272726bd600e70d29a95f4f9b5192cc906e6e7008139a403fb6128a00940ea1306c0446f8af4a43d2f3fd89c6cd81a730be9db8ae50f82 2026.3-beta1.tar.gz
|
|
||||||
"
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
echo '>>> To start Mullvad VPN, enable the daemon:'
|
|
||||||
echo ' systemctl enable --now mullvad-daemon.service'
|
|
||||||
echo ''
|
|
||||||
echo '>>> Optional: block network until VPN is up at boot:'
|
|
||||||
echo ' systemctl enable mullvad-early-boot-blocking.service'
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
# Mark systemd service for restart
|
|
||||||
systemctl set-property mullvad-daemon.service Markers=+needs-restart \
|
|
||||||
|| echo "Failed to mark mullvad-daemon for restart"
|
|
||||||
39
mullvad-vpn-daemon/mullvad-vpn-daemon.post-deinstall
Normal file
39
mullvad-vpn-daemon/mullvad-vpn-daemon.post-deinstall
Normal file
@@ -0,0 +1,39 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
function remove_logs_and_cache {
|
||||||
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
function remove_config {
|
||||||
|
rm -r --interactive=never /etc/mullvad-vpn || \
|
||||||
|
echo "Failed to remove mullvad-vpn config"
|
||||||
|
}
|
||||||
|
|
||||||
|
function remove_symlinks {
|
||||||
|
rm /usr/bin/mullvad-problem-report || \
|
||||||
|
echo "Failed to remove mullvad-problem-report"
|
||||||
|
}
|
||||||
|
|
||||||
|
# checking what kind of an action is taking place
|
||||||
|
case $@ in
|
||||||
|
# apt purge passes "purge"
|
||||||
|
"purge")
|
||||||
|
remove_logs_and_cache
|
||||||
|
remove_config
|
||||||
|
remove_symlinks
|
||||||
|
;;
|
||||||
|
# apt remove passes "remove"
|
||||||
|
"remove")
|
||||||
|
remove_symlinks
|
||||||
|
;;
|
||||||
|
# dnf remove passes a 0
|
||||||
|
"0")
|
||||||
|
remove_logs_and_cache
|
||||||
|
remove_config
|
||||||
|
remove_symlinks
|
||||||
|
;;
|
||||||
|
esac
|
||||||
@@ -1,7 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
# Copy vendored relay list into place
|
ln -sf /opt/Mullvad\ VPN/resources/mullvad-problem-report /usr/bin/mullvad-problem-report
|
||||||
mkdir -p /var/cache/mullvad-vpn \
|
|
||||||
&& cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json \
|
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||||
|| echo "failed to install /var/cache/mullvad-vpn/relays.json"
|
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||||
|
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
# Overwrite the cached relay list with the vendored one.
|
|
||||||
# The new daemon should contain an up-to-date list.
|
|
||||||
mkdir -p /var/cache/mullvad-vpn \
|
|
||||||
&& cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json \
|
|
||||||
|| echo "failed to install /var/cache/mullvad-vpn/relays.json"
|
|
||||||
23
mullvad-vpn-daemon/mullvad-vpn-daemon.pre-deinstall
Normal file
23
mullvad-vpn-daemon/mullvad-vpn-daemon.pre-deinstall
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
echo "Running prerm."
|
||||||
|
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
|
||||||
|
|
||||||
|
/opt/Mullvad\ VPN/resources/mullvad-setup reset-firewall || echo "Failed to reset firewall"
|
||||||
|
/opt/Mullvad\ VPN/resources/mullvad-setup remove-device || echo "Failed to remove device from account"
|
||||||
16
mullvad-vpn-daemon/mullvad-vpn-daemon.pre-install
Normal file
16
mullvad-vpn-daemon/mullvad-vpn-daemon.pre-install
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||||
|
if systemctl status mullvad-daemon &> /dev/null; then
|
||||||
|
/opt/Mullvad\ VPN/resources/mullvad-setup prepare-restart || true
|
||||||
|
systemctl stop mullvad-daemon.service
|
||||||
|
systemctl disable mullvad-daemon.service
|
||||||
|
systemctl disable mullvad-early-boot-blocking.service || true
|
||||||
|
cp /var/log/mullvad-vpn/daemon.log /var/log/mullvad-vpn/old-install-daemon.log \
|
||||||
|
|| echo "Failed to copy old daemon log"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f /var/cache/mullvad-vpn/relays.json
|
||||||
|
rm -f /var/cache/mullvad-vpn/api-ip-address.txt
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -eu
|
|
||||||
|
|
||||||
# Clear the cached API IP address.
|
|
||||||
# The new daemon should contain an up-to-date address.
|
|
||||||
rm -f /var/cache/mullvad-vpn/api-ip-address.txt
|
|
||||||
1
mullvad-vpn-daemon/mullvadvpn-app
Submodule
1
mullvad-vpn-daemon/mullvadvpn-app
Submodule
Submodule mullvad-vpn-daemon/mullvadvpn-app added at 7cd3cfe21e
@@ -2,23 +2,22 @@
|
|||||||
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
|
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
|
||||||
pkgname=mullvad-vpn-slint
|
pkgname=mullvad-vpn-slint
|
||||||
pkgver=2026.1_git
|
pkgver=2026.1_git
|
||||||
pkgrel=4
|
pkgrel=1
|
||||||
pkgdesc="Mullvad VPN GUI"
|
pkgdesc="Mullvad VPN GUI"
|
||||||
url="https://mullvad.net/"
|
url="https://mullvad.net/"
|
||||||
arch="all"
|
arch="$(uname -m)"
|
||||||
license="GPL-3-or-later"
|
license="GPL-3-or-later"
|
||||||
# TODO: maybe depend on mullvad-vpn-daemon?
|
# TODO: maybe depend on mullvad-vpn-daemon?
|
||||||
depends="
|
depends="
|
||||||
"
|
"
|
||||||
makedepends="
|
makedepends="
|
||||||
build-base
|
build-base
|
||||||
cargo-auditable
|
rustup
|
||||||
rust
|
musl-dev
|
||||||
pkgconfig
|
pkgconfig
|
||||||
protobuf-dev
|
protobuf-dev
|
||||||
fontconfig-dev
|
fontconfig-dev
|
||||||
dbus-dev
|
dbus-dev
|
||||||
wayland-dev
|
|
||||||
"
|
"
|
||||||
checkdepends=""
|
checkdepends=""
|
||||||
install=""
|
install=""
|
||||||
@@ -29,25 +28,28 @@ options="net !check"
|
|||||||
|
|
||||||
_cargo_target_dir="${CARGO_TARGET_DIR:-$startdir/mullvadvpn-app/target}"
|
_cargo_target_dir="${CARGO_TARGET_DIR:-$startdir/mullvadvpn-app/target}"
|
||||||
|
|
||||||
prepare() {
|
|
||||||
default_prepare
|
|
||||||
|
|
||||||
cd "$startdir/mullvadvpn-app"
|
|
||||||
cargo fetch --target "$CHOST" --locked
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
# rustup-init -y --default-toolchain stable
|
||||||
|
source "$HOME/.cargo/env"
|
||||||
|
|
||||||
cd "$startdir/mullvadvpn-app"
|
cd "$startdir/mullvadvpn-app"
|
||||||
|
|
||||||
# Specify `--target` so that the final binary ends up in target/<target>/release.
|
# rustup default stable
|
||||||
cargo build --release --locked \
|
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
|
||||||
--target "$CHOST" \
|
|
||||||
|
# * Force the `stable` toolchain since it's installed in the container.
|
||||||
|
# We don't wan't to needlessly download rust while building.
|
||||||
|
# * Specify `--target` so that the final binary ends up in target/<target>/release.
|
||||||
|
cargo +stable build --release --locked \
|
||||||
|
--target "$target" \
|
||||||
-p mullvad-slint
|
-p mullvad-slint
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
|
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
|
||||||
|
|
||||||
# Executable
|
# Executable
|
||||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-slint" \
|
install -m755 -D "$_cargo_target_dir/$target/release/mullvad-slint" \
|
||||||
"$pkgdir"/usr/bin/mullvad-slint
|
"$pkgdir"/usr/bin/mullvad-slint
|
||||||
|
|
||||||
# .desktop file
|
# .desktop file
|
||||||
|
|||||||
Submodule mullvad-vpn-slint/mullvadvpn-app updated: 236bbc4c0e...7cd3cfe21e
@@ -4,8 +4,6 @@ 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"
|
||||||
@@ -24,5 +22,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