mirror of
https://github.com/YunoHost-Apps/wireguard_ynh.git
synced 2024-09-03 20:35:58 +02:00
Bullseye: drop linux headers requirements (#41)
Co-authored-by: yunohost-bot <yunohost@yunohost.org>
This commit is contained in:
parent
6960cc9532
commit
21d2c73d93
7 changed files with 33 additions and 135 deletions
20
README.md
20
README.md
|
@ -5,7 +5,7 @@ It shall NOT be edited by hand.
|
||||||
|
|
||||||
# WireGuard for YunoHost
|
# WireGuard for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/wireguard)  
|
[](https://dash.yunohost.org/appci/app/wireguard)  
|
||||||
[](https://install-app.yunohost.org/?app=wireguard)
|
[](https://install-app.yunohost.org/?app=wireguard)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
@ -20,11 +20,10 @@ WireGuard® is fast and modern VPN that utilizes state-of-the-art cryptography.
|
||||||
**Shipped version:** 0.3.7~ynh1
|
**Shipped version:** 0.3.7~ynh1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Screenshots
|
## Screenshots
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## Disclaimers / important information
|
## Disclaimers / important information
|
||||||
|
|
||||||
|
@ -40,20 +39,21 @@ After installation, you need to `Apply Config` once in the UI before the VPN ser
|
||||||
|
|
||||||
## Documentation and resources
|
## Documentation and resources
|
||||||
|
|
||||||
* Official app website: https://www.wireguard.com/
|
* Official app website: <https://www.wireguard.com/>
|
||||||
* Upstream app code repository: https://github.com/ngoduykhanh/wireguard-ui
|
* Upstream app code repository: <https://github.com/ngoduykhanh/wireguard-ui>
|
||||||
* YunoHost documentation for this app: https://yunohost.org/app_wireguard
|
* YunoHost documentation for this app: <https://yunohost.org/app_wireguard>
|
||||||
* Report a bug: https://github.com/YunoHost-Apps/wireguard_ynh/issues
|
* Report a bug: <https://github.com/YunoHost-Apps/wireguard_ynh/issues>
|
||||||
|
|
||||||
## Developer info
|
## Developer info
|
||||||
|
|
||||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing).
|
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing).
|
||||||
|
|
||||||
To try the testing branch, please proceed like that.
|
To try the testing branch, please proceed like that.
|
||||||
```
|
|
||||||
|
``` bash
|
||||||
sudo yunohost app install https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing --debug
|
||||||
or
|
or
|
||||||
sudo yunohost app upgrade wireguard -u https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing --debug
|
sudo yunohost app upgrade wireguard -u https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
**More info regarding app packaging:** https://yunohost.org/packaging_apps
|
**More info regarding app packaging:** <https://yunohost.org/packaging_apps>
|
||||||
|
|
28
README_fr.md
28
README_fr.md
|
@ -1,10 +1,14 @@
|
||||||
|
<!--
|
||||||
|
N.B.: This README was automatically generated by https://github.com/YunoHost/apps/tree/master/tools/README-generator
|
||||||
|
It shall NOT be edited by hand.
|
||||||
|
-->
|
||||||
|
|
||||||
# WireGuard pour YunoHost
|
# WireGuard pour YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/wireguard)  
|
[](https://dash.yunohost.org/appci/app/wireguard)  
|
||||||
[](https://install-app.yunohost.org/?app=wireguard)
|
[](https://install-app.yunohost.org/?app=wireguard)
|
||||||
|
|
||||||
*[Read this readme in english.](./README.md)*
|
*[Read this readme in english.](./README.md)*
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
|
||||||
|
|
||||||
> *Ce package vous permet d'installer WireGuard rapidement et simplement sur un serveur YunoHost.
|
> *Ce package vous permet d'installer WireGuard rapidement et simplement sur un serveur YunoHost.
|
||||||
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.*
|
||||||
|
@ -13,14 +17,13 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
WireGuard® is fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN.
|
WireGuard® is fast and modern VPN that utilizes state-of-the-art cryptography. It aims to be faster, simpler, leaner, and more useful than IPsec. It intends to be considerably more performant than OpenVPN. WireGuard is designed as a general purpose VPN.
|
||||||
|
|
||||||
**Version incluse :** 0.3.7~ynh1
|
**Version incluse :** 0.3.7~ynh1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Captures d'écran
|
## Captures d'écran
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
## Avertissements / informations importantes
|
## Avertissements / informations importantes
|
||||||
|
|
||||||
|
@ -36,20 +39,21 @@ Après installation, vous devrez cliquer sur `Apply Config` une fois dans l'UI a
|
||||||
|
|
||||||
## Documentations et ressources
|
## Documentations et ressources
|
||||||
|
|
||||||
* Site officiel de l'app : https://www.wireguard.com/
|
* Site officiel de l'app : <https://www.wireguard.com/>
|
||||||
* Dépôt de code officiel de l'app : https://github.com/ngoduykhanh/wireguard-ui
|
* Dépôt de code officiel de l'app : <https://github.com/ngoduykhanh/wireguard-ui>
|
||||||
* Documentation YunoHost pour cette app : https://yunohost.org/app_wireguard
|
* Documentation YunoHost pour cette app : <https://yunohost.org/app_wireguard>
|
||||||
* Signaler un bug : https://github.com/YunoHost-Apps/wireguard_ynh/issues
|
* Signaler un bug : <https://github.com/YunoHost-Apps/wireguard_ynh/issues>
|
||||||
|
|
||||||
## Informations pour les développeurs
|
## Informations pour les développeurs
|
||||||
|
|
||||||
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing).
|
Merci de faire vos pull request sur la [branche testing](https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing).
|
||||||
|
|
||||||
Pour essayer la branche testing, procédez comme suit.
|
Pour essayer la branche testing, procédez comme suit.
|
||||||
```
|
|
||||||
|
``` bash
|
||||||
sudo yunohost app install https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing --debug
|
sudo yunohost app install https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing --debug
|
||||||
ou
|
ou
|
||||||
sudo yunohost app upgrade wireguard -u https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing --debug
|
sudo yunohost app upgrade wireguard -u https://github.com/YunoHost-Apps/wireguard_ynh/tree/testing --debug
|
||||||
```
|
```
|
||||||
|
|
||||||
**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps
|
**Plus d'infos sur le packaging d'applications :** <https://yunohost.org/packaging_apps>
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
"email": "tituspijean@outlook.com"
|
"email": "tituspijean@outlook.com"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.3.0"
|
"yunohost": ">= 11"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
@ -27,14 +27,6 @@
|
||||||
],
|
],
|
||||||
"arguments": {
|
"arguments": {
|
||||||
"install": [
|
"install": [
|
||||||
{
|
|
||||||
"name": "warning",
|
|
||||||
"type": "display_text",
|
|
||||||
"ask": {
|
|
||||||
"en": "WireGuard installs a Linux kernel module and will most likely require a reboot of your server to work properly.",
|
|
||||||
"fr": "WireGuard installe un module au noyau Linux et nécessite probablement un redémarrage du serveur pour fonctionner correctement."
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name": "domain",
|
"name": "domain",
|
||||||
"type": "domain"
|
"type": "domain"
|
||||||
|
|
|
@ -4,66 +4,17 @@
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# WireGuard was integrated in Linux kernel 5.6
|
|
||||||
# Before that, we need Linux Headers
|
|
||||||
if dpkg --compare-versions $(uname -r) lt 5.6; then
|
|
||||||
pkg_headers="raspberrypi-kernel-headers|linux-headers-generic|linux-headers-virtual|linux-headers-$(uname -r)|linux-headers-${YNH_ARCH}|linux-headers-cloud-${YNH_ARCH}"
|
|
||||||
else
|
|
||||||
pkg_headers=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
# dependencies used by the app
|
|
||||||
pkg_dependencies="$pkg_headers dkms wireguard-dkms wireguard"
|
|
||||||
|
|
||||||
interface=$(ip route | awk '/default/ { print $5 }' | head -n1)
|
interface=$(ip route | awk '/default/ { print $5 }' | head -n1)
|
||||||
|
|
||||||
main_domain=$(cat /etc/yunohost/current_host)
|
main_domain=$(cat /etc/yunohost/current_host)
|
||||||
|
|
||||||
|
# dependencies used by the app
|
||||||
|
pkg_dependencies="wireguard"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# Add gpg keys for repositories
|
|
||||||
#
|
|
||||||
# [internal]
|
|
||||||
#
|
|
||||||
# usage: ynh_install_repo_gpg --key=key_url --name=name [--append]
|
|
||||||
# | arg: -k, --key= - url to get the public key.
|
|
||||||
# | arg: -n, --name= - Name for the files for this repo, $app as default value.
|
|
||||||
# | arg: -a, --append - Do not overwrite existing files.
|
|
||||||
#
|
|
||||||
# Requires YunoHost version 3.8.1 or higher.
|
|
||||||
ynh_install_repo_gpg () {
|
|
||||||
# Declare an array to define the options of this helper.
|
|
||||||
local legacy_args=kna
|
|
||||||
local -A args_array=( [k]=key= [n]=name= [a]=append )
|
|
||||||
local key
|
|
||||||
local name
|
|
||||||
local append
|
|
||||||
# Manage arguments with getopts
|
|
||||||
ynh_handle_getopts_args "$@"
|
|
||||||
name="${name:-$app}"
|
|
||||||
append=${append:-0}
|
|
||||||
key=${key:-}
|
|
||||||
|
|
||||||
if [ $append -eq 1 ]
|
|
||||||
then
|
|
||||||
append="--append"
|
|
||||||
wget_append="tee --append"
|
|
||||||
else
|
|
||||||
append=""
|
|
||||||
wget_append="tee"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Get the public key for the repo
|
|
||||||
if [ -n "$key" ]
|
|
||||||
then
|
|
||||||
mkdir --parents "/etc/apt/trusted.gpg.d"
|
|
||||||
# Timeout option is here to enforce the timeout on dns query and tcp connect (c.f. man wget)
|
|
||||||
wget --timeout 900 --quiet "$key" --output-document=- | gpg --dearmor | $wget_append /etc/apt/trusted.gpg.d/$name.gpg > /dev/null
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# EXPERIMENTAL HELPERS
|
# EXPERIMENTAL HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -76,22 +76,7 @@ ynh_exec_warn_less yunohost firewall allow --no-upnp UDP $port_wg
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Installing dependencies..." --weight=7
|
ynh_script_progression --message="Installing dependencies..." --weight=7
|
||||||
|
|
||||||
# Add buster-backports gpg key
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
ynh_install_repo_gpg --key="https://ftp-master.debian.org/keys/archive-key-10.asc" --name="$app"
|
|
||||||
|
|
||||||
# Add buster-backports repo
|
|
||||||
ynh_add_repo --uri="http://deb.debian.org/debian" --suite="buster-backports" --component="main" --name="$app"
|
|
||||||
|
|
||||||
# Add pin-priority for wireguard packages
|
|
||||||
ynh_pin_repo --package="wireguard*" --pin="origin deb http://deb.debian.org/debian buster-backports main" --priority=995 --name="$app"
|
|
||||||
|
|
||||||
# Update the list of package with the new repo
|
|
||||||
ynh_package_update
|
|
||||||
|
|
||||||
ynh_add_app_dependencies --package="$pkg_dependencies"
|
|
||||||
|
|
||||||
# Remove buster-backports repo and pin-priority
|
|
||||||
ynh_remove_extra_repo --name=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
|
|
@ -85,24 +85,7 @@ chown -R $app: /etc/wireguard
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reinstalling dependencies..." --weight=5
|
ynh_script_progression --message="Reinstalling dependencies..." --weight=5
|
||||||
|
|
||||||
# Define and install dependencies
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
# Add buster-backports gpg key
|
|
||||||
ynh_install_repo_gpg --key="https://ftp-master.debian.org/keys/archive-key-10.asc" --name="$app"
|
|
||||||
|
|
||||||
# Add buster-backports repo
|
|
||||||
ynh_add_repo --uri="http://deb.debian.org/debian" --suite="buster-backports" --component="main" --name="$app"
|
|
||||||
|
|
||||||
# Add pin-priority for wireguard packages
|
|
||||||
ynh_pin_repo --package="wireguard*" --pin="origin deb http://deb.debian.org/debian buster-backports main" --priority=995 --name="$app"
|
|
||||||
|
|
||||||
# Update the list of package with the new repo
|
|
||||||
ynh_package_update
|
|
||||||
|
|
||||||
ynh_add_app_dependencies --package="$pkg_dependencies"
|
|
||||||
|
|
||||||
#Remove buster-backports repo and pin-priority
|
|
||||||
ynh_remove_extra_repo --name=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE SYSTEMD
|
# RESTORE SYSTEMD
|
||||||
|
|
|
@ -156,24 +156,7 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=7
|
ynh_script_progression --message="Upgrading dependencies..." --weight=7
|
||||||
|
|
||||||
#TODO: remove buster-backports kernel
|
ynh_install_app_dependencies "$pkg_dependencies"
|
||||||
|
|
||||||
# Add buster-backports gpg key
|
|
||||||
ynh_install_repo_gpg --key="https://ftp-master.debian.org/keys/archive-key-10.asc" --name="$app"
|
|
||||||
|
|
||||||
# Add buster-backports repo
|
|
||||||
ynh_add_repo --uri="http://deb.debian.org/debian" --suite="buster-backports" --component="main" --name="$app"
|
|
||||||
|
|
||||||
# Add pin-priority for wireguard packages
|
|
||||||
ynh_pin_repo --package="wireguard*" --pin="origin deb http://deb.debian.org/debian buster-backports main" --priority=995 --name="$app"
|
|
||||||
|
|
||||||
# Update the list of package with the new repo
|
|
||||||
ynh_package_update
|
|
||||||
|
|
||||||
ynh_add_app_dependencies --package="$pkg_dependencies"
|
|
||||||
|
|
||||||
# Remove buster-backports repo and pin-priority
|
|
||||||
ynh_remove_extra_repo --name=$app
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CREATE DEDICATED USER
|
# CREATE DEDICATED USER
|
||||||
|
|
Loading…
Add table
Reference in a new issue