Compare commits
1 Commits
c1fe3c1c9b
...
9f1cc0665f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9f1cc0665f |
@@ -2,7 +2,7 @@
|
|||||||
# 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.1_git
|
||||||
pkgrel=5
|
pkgrel=4
|
||||||
pkgdesc="Mullvad VPN system service"
|
pkgdesc="Mullvad VPN system service"
|
||||||
url="https://mullvad.net/"
|
url="https://mullvad.net/"
|
||||||
arch="all"
|
arch="all"
|
||||||
@@ -33,10 +33,7 @@ install="
|
|||||||
$pkgname-systemd.post-install
|
$pkgname-systemd.post-install
|
||||||
$pkgname-systemd.post-upgrade
|
$pkgname-systemd.post-upgrade
|
||||||
"
|
"
|
||||||
subpackages="
|
subpackages="$pkgname-systemd"
|
||||||
$pkgname-systemd
|
|
||||||
$pkgname-suid
|
|
||||||
"
|
|
||||||
source=""
|
source=""
|
||||||
builddir="$srcdir/"
|
builddir="$srcdir/"
|
||||||
options="net suid"
|
options="net suid"
|
||||||
@@ -84,6 +81,10 @@ package() {
|
|||||||
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-daemon" \
|
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-daemon" \
|
||||||
"$pkgdir"/usr/bin/mullvad-daemon
|
"$pkgdir"/usr/bin/mullvad-daemon
|
||||||
|
|
||||||
|
# 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" \
|
install -m755 -D "$_cargo_target_dir/$CHOST/release/mullvad-problem-report" \
|
||||||
"$pkgdir"/usr/bin/mullvad-problem-report
|
"$pkgdir"/usr/bin/mullvad-problem-report
|
||||||
|
|
||||||
@@ -102,8 +103,3 @@ systemd() {
|
|||||||
install -m755 -D "$startdir/mullvadvpn-app/dist-assets/linux/mullvad-early-boot-blocking.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
|
"$subpkgdir"/usr/lib/systemd/system/mullvad-early-boot-blocking.service
|
||||||
}
|
}
|
||||||
|
|
||||||
suid() {
|
|
||||||
install -m4755 -D "$_cargo_target_dir/$CHOST/release/mullvad-exclude" \
|
|
||||||
"$subpkgdir"/usr/bin/mullvad-exclude
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
echo "mullvad-systemd post-install"
|
||||||
# Are we running systemd?
|
# Are we running systemd?
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||||
# Does `mullvad-daemon.service` exist?
|
# Does `mullvad-daemon.service` exist?
|
||||||
|
|||||||
@@ -1,12 +1,25 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
echo "mullvad-systemd post-upgrade"
|
||||||
# Are we running systemd?
|
# Are we running systemd?
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
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?
|
# Does `mullvad-daemon.service` exist?
|
||||||
if systemctl list-unit-files mullvad-daemon.service &> /dev/null; then
|
if systemctl list-unit-files mullvad-daemon.service &> /dev/null; then
|
||||||
|
echo "enable mullvad-daemon"
|
||||||
systemctl enable "/usr/lib/systemd/system/mullvad-daemon.service"
|
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"
|
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"
|
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
|
fi
|
||||||
|
else
|
||||||
|
echo "systemctl does not exit!"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "sleep 5"
|
||||||
|
sleep 5
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
echo "mullvad post-deinstall"
|
||||||
|
|
||||||
rm -r --interactive=never /var/log/mullvad-vpn/ || \
|
rm -r --interactive=never /var/log/mullvad-vpn/ || \
|
||||||
echo "Failed to remove mullvad-vpn logs"
|
echo "Failed to remove mullvad-vpn logs"
|
||||||
rm -r --interactive=never /var/cache/mullvad-vpn/ || \
|
rm -r --interactive=never /var/cache/mullvad-vpn/ || \
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
echo "mullvad post-install"
|
||||||
|
|
||||||
# Overwrite the cached relay list with the one embedded in the package.
|
# Overwrite the cached relay list with the one embedded in the package.
|
||||||
mkdir -p /var/cache/mullvad-vpn \
|
mkdir -p /var/cache/mullvad-vpn \
|
||||||
&& cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json \
|
&& cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json \
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
echo "mullvad post-upgrade"
|
||||||
|
|
||||||
# Overwrite the cached relay list with the one embedded in the package.
|
# Overwrite the cached relay list with the one embedded in the package.
|
||||||
mkdir /var/cache/mullvad-vpn
|
mkdir /var/cache/mullvad-vpn
|
||||||
cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json
|
cp /usr/share/mullvad-vpn/relays.json /var/cache/mullvad-vpn/relays.json
|
||||||
|
|||||||
@@ -1,6 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
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
|
||||||
|
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
|
# the user might've disabled or stopped the service themselves already
|
||||||
systemctl stop mullvad-daemon.service || true
|
systemctl stop mullvad-daemon.service || true
|
||||||
systemctl disable mullvad-daemon.service || true
|
systemctl disable mullvad-daemon.service || true
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
|
echo "mullvad pre-upgrade"
|
||||||
# Are we running systemd?
|
# Are we running systemd?
|
||||||
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
if which systemctl &> /dev/null && systemctl is-system-running | grep -vq offline &> /dev/null; then
|
||||||
# Is `mullvad-daemon.service` running?
|
# Is `mullvad-daemon.service` running?
|
||||||
|
|||||||
Reference in New Issue
Block a user