Compare commits
9 Commits
2026.1-dev
...
9f1cc0665f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f1cc0665f | ||
| 29043fedc1 | |||
| 6462c4e25d | |||
| 6899a71899 | |||
| 3ff5cf83fc | |||
| 84c30e3130 | |||
| 4e232c39be | |||
| c5383fd2c9 | |||
| 374eeba758 |
15
Dockerfile
15
Dockerfile
@@ -6,17 +6,16 @@ RUN apk update && apk add \
|
||||
build-base \
|
||||
abuild \
|
||||
git \
|
||||
rustup \
|
||||
musl-dev \
|
||||
rust \
|
||||
cargo-auditable \
|
||||
pkgconfig \
|
||||
protobuf-dev \
|
||||
protobuf-dev \
|
||||
libmnl-dev \
|
||||
libnftnl-dev \
|
||||
dbus-dev \
|
||||
fontconfig-dev
|
||||
|
||||
RUN rustup-init -y --default-toolchain stable
|
||||
libmnl libmnl-dev \
|
||||
libnftnl libnftnl-dev \
|
||||
dbus dbus-dev \
|
||||
fontconfig-dev \
|
||||
wayland-dev
|
||||
|
||||
# Set pkg-config to use static libraries
|
||||
ENV PKG_CONFIG_ALLOW_STATIC=1
|
||||
|
||||
@@ -2,72 +2,104 @@
|
||||
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
|
||||
pkgname=mullvad-vpn-daemon
|
||||
pkgver=2026.1_git
|
||||
pkgrel=0
|
||||
pkgrel=4
|
||||
pkgdesc="Mullvad VPN system service"
|
||||
url="https://mullvad.net/"
|
||||
arch="$(uname -m)"
|
||||
arch="all"
|
||||
license="GPL-3-or-later"
|
||||
depends="
|
||||
dbus
|
||||
libmnl
|
||||
libnftnl
|
||||
"
|
||||
makedepends="
|
||||
build-base
|
||||
rustup
|
||||
musl-dev
|
||||
cargo-auditable
|
||||
rust
|
||||
pkgconfig
|
||||
git
|
||||
protobuf-dev
|
||||
dbus-dev
|
||||
libmnl-dev
|
||||
libnftnl-dev
|
||||
dbus-dev
|
||||
"
|
||||
checkdepends=""
|
||||
# TODO: pre/post(de)install-scripts
|
||||
#install="$pkgname.pre-install $pkgname.post-install $pkgname.pre-deinstall $pkgname.post-deinstall"
|
||||
install=""
|
||||
install="
|
||||
$pkgname.post-install
|
||||
$pkgname.pre-upgrade
|
||||
$pkgname.post-upgrade
|
||||
$pkgname.pre-deinstall
|
||||
$pkgname.post-deinstall
|
||||
$pkgname-systemd.post-install
|
||||
$pkgname-systemd.post-upgrade
|
||||
"
|
||||
subpackages="$pkgname-systemd"
|
||||
source=""
|
||||
builddir="$srcdir/"
|
||||
options="net !check suid"
|
||||
options="net suid"
|
||||
|
||||
_cargo_target_dir="${CARGO_TARGET_DIR:-$startdir/mullvadvpn-app/target}"
|
||||
|
||||
build() {
|
||||
# rustup-init -y --default-toolchain stable
|
||||
source "$HOME/.cargo/env"
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
cd "$startdir/mullvadvpn-app"
|
||||
cargo fetch --target "$CHOST" --locked
|
||||
}
|
||||
|
||||
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
|
||||
build() {
|
||||
cd "$startdir/mullvadvpn-app"
|
||||
|
||||
# * 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-daemon \
|
||||
# Specify `--target` so that the build artifacts ends up in target/<target>/release to
|
||||
# avoid clashes with host system when running in a container with a mounted target folder.
|
||||
|
||||
# Compile all binaries
|
||||
cargo auditable build --release --locked \
|
||||
--target "$CHOST" \
|
||||
-p mullvad-cli \
|
||||
-p mullvad-daemon \
|
||||
-p mullvad-exclude \
|
||||
-p mullvad-problem-report
|
||||
-p mullvad-problem-report \
|
||||
-p mullvad-setup
|
||||
|
||||
# Generate vendored relay list
|
||||
cargo run --release --locked \
|
||||
-p mullvad-api --bin relay_list \
|
||||
--target "$CHOST" \
|
||||
> "$builddir/relays.json"
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$startdir/mullvadvpn-app"
|
||||
cargo test --target "$CHOST" --frozen
|
||||
}
|
||||
|
||||
package() {
|
||||
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
|
||||
|
||||
install -m755 -D "$_cargo_target_dir/$target/release/mullvad-daemon" \
|
||||
"$pkgdir"/usr/bin/mullvad-daemon
|
||||
|
||||
install -m755 -D "$_cargo_target_dir/$target/release/mullvad" \
|
||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad" \
|
||||
"$pkgdir"/usr/bin/mullvad
|
||||
|
||||
install -m755 -D "$_cargo_target_dir/$target/release/mullvad-exclude" \
|
||||
"$pkgdir"/usr/bin/mullvad-exclude
|
||||
chmod u+s "$pkgdir"/usr/bin/mullvad-exclude
|
||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-daemon" \
|
||||
"$pkgdir"/usr/bin/mullvad-daemon
|
||||
|
||||
install -m755 -D "$_cargo_target_dir/$target/release/mullvad-problem-report" \
|
||||
# mullvad-exclude requires setuid
|
||||
install -m4755 -D "$_cargo_target_dir/$CHOST/release/mullvad-exclude" \
|
||||
"$pkgdir"/usr/bin/mullvad-exclude
|
||||
|
||||
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
|
||||
|
||||
# Bundle the vendored relay list. It's copied to /var/cache/mullvad-vpn/ by the post-* scripts.
|
||||
install -m644 -D "$builddir/relays.json" \
|
||||
"$pkgdir"/usr/share/mullvad-vpn/relays.json
|
||||
}
|
||||
|
||||
systemd() {
|
||||
install -m755 -D "$startdir/mullvadvpn-app/dist-assets/linux/mullvad-daemon.service" \
|
||||
"$subpkgdir"/usr/lib/systemd/system/mullvad-daemon.service
|
||||
|
||||
install -m755 -D "$startdir/mullvadvpn-app/dist-assets/linux/mullvad-early-boot-blocking.service" \
|
||||
"$subpkgdir"/usr/lib/systemd/system/mullvad-early-boot-blocking.service
|
||||
}
|
||||
|
||||
13
mullvad-vpn-daemon/mullvad-vpn-daemon-systemd.post-install
Normal file
13
mullvad-vpn-daemon/mullvad-vpn-daemon-systemd.post-install
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad-systemd post-install"
|
||||
# Are we running systemd?
|
||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||
# Does `mullvad-daemon.service` exist?
|
||||
if systemctl list-unit-files mullvad-daemon.service &> /dev/null; 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
|
||||
fi
|
||||
25
mullvad-vpn-daemon/mullvad-vpn-daemon-systemd.post-upgrade
Normal file
25
mullvad-vpn-daemon/mullvad-vpn-daemon-systemd.post-upgrade
Normal file
@@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad-systemd post-upgrade"
|
||||
# Are we running systemd?
|
||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||
echo "systemctl exists and is running"
|
||||
# Does `mullvad-daemon.service` exist?
|
||||
if systemctl list-unit-files mullvad-daemon.service &> /dev/null; then
|
||||
echo "enable mullvad-daemon"
|
||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
||||
echo "start mullvad-daemon"
|
||||
systemctl start mullvad-daemon.service || echo "Failed to start mullvad-daemon.service"
|
||||
echo "enable mullvad-early-boot-blocking"
|
||||
systemctl enable "/usr/lib/systemd/system/mullvad-early-boot-blocking.service"
|
||||
else
|
||||
echo "mullvad-daemon.service does not exist!!"
|
||||
systemctl list-unit-files mullvad-daemon.service
|
||||
fi
|
||||
else
|
||||
echo "systemctl does not exit!"
|
||||
fi
|
||||
|
||||
echo "sleep 5"
|
||||
sleep 5
|
||||
@@ -1,39 +1,11 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
function remove_logs_and_cache {
|
||||
rm -r --interactive=never /var/log/mullvad-vpn/ || \
|
||||
echo "mullvad post-deinstall"
|
||||
|
||||
rm -r --interactive=never /var/log/mullvad-vpn/ || \
|
||||
echo "Failed to remove mullvad-vpn logs"
|
||||
rm -r --interactive=never /var/cache/mullvad-vpn/ || \
|
||||
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 || \
|
||||
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,8 +1,9 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
ln -sf /opt/Mullvad\ VPN/resources/mullvad-problem-report /usr/bin/mullvad-problem-report
|
||||
echo "mullvad post-install"
|
||||
|
||||
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"
|
||||
# Overwrite the cached relay list with the one embedded in the package.
|
||||
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"
|
||||
|
||||
8
mullvad-vpn-daemon/mullvad-vpn-daemon.post-upgrade
Normal file
8
mullvad-vpn-daemon/mullvad-vpn-daemon.post-upgrade
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad post-upgrade"
|
||||
|
||||
# Overwrite the cached relay list with the one embedded in the package.
|
||||
mkdir /var/cache/mullvad-vpn
|
||||
cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "Running prerm."
|
||||
echo "mullvad pre-deinstall"
|
||||
is_number_re='^[0-9]+$'
|
||||
# Check if we're running during an upgrade step on Fedora
|
||||
# https://fedoraproject.org/wiki/Packaging:Scriptlets#Syntax
|
||||
@@ -19,5 +19,5 @@ 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"
|
||||
mullvad-setup reset-firewall || echo "Failed to reset firewall"
|
||||
mullvad-setup remove-device || echo "Failed to remove device from account"
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eu
|
||||
|
||||
echo "mullvad pre-upgrade"
|
||||
# Are we running systemd?
|
||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||
# Is `mullvad-daemon.service` running?
|
||||
if systemctl status mullvad-daemon &> /dev/null; then
|
||||
/opt/Mullvad\ VPN/resources/mullvad-setup prepare-restart || true
|
||||
mullvad-setup prepare-restart || true
|
||||
systemctl stop mullvad-daemon.service
|
||||
systemctl disable mullvad-daemon.service
|
||||
systemctl disable mullvad-early-boot-blocking.service || true
|
||||
@@ -12,5 +15,5 @@ if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offlin
|
||||
fi
|
||||
fi
|
||||
|
||||
rm -f /var/cache/mullvad-vpn/relays.json
|
||||
# Since we are upgrading mullvad-daemon, it will probably have current IP baked into itself.
|
||||
rm -f /var/cache/mullvad-vpn/api-ip-address.txt
|
||||
Submodule mullvad-vpn-daemon/mullvadvpn-app updated: 27f4b02410...236bbc4c0e
@@ -2,22 +2,23 @@
|
||||
# Maintainer: Joakim Hulthe <joakim@hulthe.net>
|
||||
pkgname=mullvad-vpn-slint
|
||||
pkgver=2026.1_git
|
||||
pkgrel=0
|
||||
pkgrel=4
|
||||
pkgdesc="Mullvad VPN GUI"
|
||||
url="https://mullvad.net/"
|
||||
arch="$(uname -m)"
|
||||
arch="all"
|
||||
license="GPL-3-or-later"
|
||||
# TODO: maybe depend on mullvad-vpn-daemon?
|
||||
depends="
|
||||
"
|
||||
makedepends="
|
||||
build-base
|
||||
rustup
|
||||
musl-dev
|
||||
cargo-auditable
|
||||
rust
|
||||
pkgconfig
|
||||
protobuf-dev
|
||||
fontconfig-dev
|
||||
dbus-dev
|
||||
wayland-dev
|
||||
"
|
||||
checkdepends=""
|
||||
install=""
|
||||
@@ -28,28 +29,25 @@ options="net !check"
|
||||
|
||||
_cargo_target_dir="${CARGO_TARGET_DIR:-$startdir/mullvadvpn-app/target}"
|
||||
|
||||
build() {
|
||||
# rustup-init -y --default-toolchain stable
|
||||
source "$HOME/.cargo/env"
|
||||
prepare() {
|
||||
default_prepare
|
||||
|
||||
cd "$startdir/mullvadvpn-app"
|
||||
cargo fetch --target "$CHOST" --locked
|
||||
}
|
||||
|
||||
# rustup default stable
|
||||
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
|
||||
build() {
|
||||
cd "$startdir/mullvadvpn-app"
|
||||
|
||||
# * 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" \
|
||||
# Specify `--target` so that the final binary ends up in target/<target>/release.
|
||||
cargo build --release --locked \
|
||||
--target "$CHOST" \
|
||||
-p mullvad-slint
|
||||
}
|
||||
|
||||
package() {
|
||||
local target="$(rustup +stable show active-toolchain | sed 's/^[^-]*-//' | grep -o "^[^ ]*")"
|
||||
|
||||
# Executable
|
||||
install -m755 -D "$_cargo_target_dir/$target/release/mullvad-slint" \
|
||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-slint" \
|
||||
"$pkgdir"/usr/bin/mullvad-slint
|
||||
|
||||
# .desktop file
|
||||
@@ -57,31 +55,31 @@ package() {
|
||||
"$pkgdir"/usr/share/applications/mullvad-vpn-slint.desktop
|
||||
|
||||
# Icons
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_1_16x16x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/16x16/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/16x16/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_2_20x20x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/20x20/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/20x20/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_3_24x24x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/24x24/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/24x24/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_5_30x30x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/30x30/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/30x30/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_6_32x32x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/32x32/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/32x32/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_7_36x36x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/36x36/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/36x36/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_8_40x40x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/40x40/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/40x40/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_9_48x48x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/48x48/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/48x48/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_12_64x64x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/64x64/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/64x64/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_13_72x72x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/72x72/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/72x72/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_15_96x96x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/96x96/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/96x96/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_4_256x256x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/256x256/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/256x256/apps/mullvad.png
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/icon_10_512x512x32.png" \
|
||||
install -m644 -D "$startdir/mullvadvpn-app/dist-assets/linux/slint/512x512/apps/mullvad.png" \
|
||||
"$pkgdir"/usr/share/icons/hicolor/512x512/apps/mullvad.png
|
||||
}
|
||||
|
||||
|
||||
Submodule mullvad-vpn-slint/mullvadvpn-app updated: 27f4b02410...236bbc4c0e
Reference in New Issue
Block a user