mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge branch 'dev' into migrate_to_bullseye
This commit is contained in:
commit
a124bbc790
13 changed files with 82 additions and 20 deletions
|
@ -21,7 +21,7 @@ def get_network_local_interfaces() -> Dict[str, Dict[str, List[str]]]:
|
|||
|
||||
interfaces = {
|
||||
adapter.name: {
|
||||
"ipv4": [ip.ip for ip in adapter.ips if ip.is_IPv4 and ip_address(ip.ip).is_private],
|
||||
"ipv4": [ip.ip for ip in adapter.ips if ip.is_IPv4 and ip_address(ip.ip).is_private and not ip_address(ip.ip).is_link_local],
|
||||
"ipv6": [ip.ip[0] for ip in adapter.ips if ip.is_IPv6 and ip_address(ip.ip[0]).is_private and not ip_address(ip.ip[0]).is_link_local],
|
||||
}
|
||||
for adapter in ifaddr.get_adapters()
|
||||
|
|
|
@ -325,7 +325,7 @@ EOF
|
|||
ynh_app_setting_set --app=$app --key=phpversion --value=$specific_php_version
|
||||
|
||||
# Integrate new php-fpm service in yunohost
|
||||
yunohost service add php${specific_php_version}-fpm --log "/var/log/php${phpversion}-fpm.log"
|
||||
yunohost service add php${specific_php_version}-fpm --log "/var/log/php${specific_php_version}-fpm.log"
|
||||
elif grep --quiet 'php' <<< "$dependencies"; then
|
||||
# Store phpversion into the config of this app
|
||||
ynh_app_setting_set --app=$app --key=phpversion --value=$YNH_DEFAULT_PHP_VERSION
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
n_version=8.0.0
|
||||
n_version=8.0.1
|
||||
n_install_dir="/opt/node_n"
|
||||
node_version_path="$n_install_dir/n/versions/node"
|
||||
# N_PREFIX is the directory of n, it needs to be loaded as a environment variable.
|
||||
|
@ -16,7 +16,7 @@ export N_PREFIX="$n_install_dir"
|
|||
ynh_install_n() {
|
||||
# Build an app.src for n
|
||||
echo "SOURCE_URL=https://github.com/tj/n/archive/v${n_version}.tar.gz
|
||||
SOURCE_SUM=9e8879dc4f1c4c0fe4e08a108ed6c23046419b6865fe922ca5176ff7998ae6ff" >"$YNH_APP_BASEDIR/conf/n.src"
|
||||
SOURCE_SUM=8703ae88fd06ce7f2d0f4018d68bfbab7b26859ed86a86ce4b8f25d2110aee2f" >"$YNH_APP_BASEDIR/conf/n.src"
|
||||
# Download and extract n
|
||||
ynh_setup_source --dest_dir="$n_install_dir/git" --source_id=n
|
||||
# Install n
|
||||
|
|
|
@ -179,6 +179,9 @@ do_post_regen() {
|
|||
chown admin:root /home/yunohost.backup
|
||||
chown admin:root /home/yunohost.backup/archives
|
||||
|
||||
# NB: x permission for 'others' is important for ssl-cert (and maybe mdns), otherwise slapd will fail to start because can't access the certs
|
||||
chmod 755 /etc/yunohost
|
||||
|
||||
# Certs
|
||||
# We do this with find because there could be a lot of them...
|
||||
chown -R root:ssl-cert /etc/yunohost/certs
|
||||
|
|
|
@ -4,14 +4,18 @@ set -e
|
|||
|
||||
_generate_config() {
|
||||
echo "domains:"
|
||||
echo " - yunohost.local"
|
||||
# Add yunohost.local (only if yunohost.local ain't already in ynh_domains)
|
||||
if ! echo "$YNH_DOMAINS" | tr ' ' '\n' | grep -q --line-regexp 'yunohost.local'
|
||||
then
|
||||
echo " - yunohost.local"
|
||||
fi
|
||||
for domain in $YNH_DOMAINS; do
|
||||
# Only keep .local domains (don't keep
|
||||
[[ "$domain" =~ [^.]+\.[^.]+\.local$ ]] && echo "Subdomain $domain cannot be handled by Bonjour/Zeroconf/mDNS" >&2
|
||||
[[ "$domain" =~ ^[^.]+\.local$ ]] || continue
|
||||
echo " - $domain"
|
||||
done
|
||||
if [[ -e /etc/yunohot/mdns.aliases ]]
|
||||
if [[ -e /etc/yunohost/mdns.aliases ]]
|
||||
then
|
||||
for localalias in $(cat /etc/yunohost/mdns.aliases | grep -v "^ *$")
|
||||
do
|
||||
|
|
|
@ -14,9 +14,8 @@ do_pre_regen() {
|
|||
etcdefault_dir="${pending_dir}/etc/default"
|
||||
mkdir -p "$etcdefault_dir"
|
||||
|
||||
# add general conf files
|
||||
# add default conf files
|
||||
cp plain/etcdefault ${pending_dir}/etc/default/dnsmasq
|
||||
cp plain/dnsmasq.conf ${pending_dir}/etc/dnsmasq.conf
|
||||
|
||||
# add resolver file
|
||||
cat plain/resolv.dnsmasq.conf | grep "^nameserver" | shuf >${pending_dir}/etc/resolv.dnsmasq.conf
|
||||
|
@ -26,11 +25,22 @@ do_pre_regen() {
|
|||
ynh_validate_ip4 "$ipv4" || ipv4='127.0.0.1'
|
||||
ipv6=$(curl -s -6 https://ip6.yunohost.org 2>/dev/null || true)
|
||||
ynh_validate_ip6 "$ipv6" || ipv6=''
|
||||
interfaces="$(ip -j addr show | jq -r '[.[].ifname]|join(" ")')"
|
||||
wireless_interfaces="lo"
|
||||
for dev in $(ls /sys/class/net); do
|
||||
if [ -d "/sys/class/net/$dev/wireless" ]; then
|
||||
wireless_interfaces+=" $dev"
|
||||
fi
|
||||
done
|
||||
|
||||
export ipv4
|
||||
export ipv6
|
||||
# General configuration
|
||||
export wireless_interfaces
|
||||
ynh_render_template "dnsmasq.conf.tpl" "${pending_dir}/etc/dnsmasq.conf"
|
||||
|
||||
# add domain conf files
|
||||
export interfaces
|
||||
export ipv4
|
||||
export ipv6
|
||||
for domain in $YNH_DOMAINS; do
|
||||
[[ ! $domain =~ \.local$ ]] || continue
|
||||
export domain
|
||||
|
@ -51,6 +61,9 @@ do_pre_regen() {
|
|||
do_post_regen() {
|
||||
regen_conf_files=$1
|
||||
|
||||
# Force permission (to cover some edge cases where root's umask is like 027 and then dnsmasq cant read this file)
|
||||
chown 644 /etc/resolv.dnsmasq.conf
|
||||
|
||||
# Fuck it, those domain/search entries from dhclient are usually annoying
|
||||
# lying shit from the ISP trying to MiTM
|
||||
if grep -q -E "^ *(domain|search)" /run/resolvconf/resolv.conf; then
|
||||
|
|
|
@ -6,4 +6,6 @@ set -eu
|
|||
# Source YNH helpers
|
||||
source /usr/share/yunohost/helpers
|
||||
|
||||
ynh_restore_file --origin_path="/home/yunohost.multimedia" --not_mandatory
|
||||
backup_dir="data/multimedia"
|
||||
|
||||
ynh_restore_file --origin_path="${backup_dir}" --dest_path="/home/yunohost.multimedia" --not_mandatory
|
||||
|
|
10
data/templates/dnsmasq/dnsmasq.conf.tpl
Normal file
10
data/templates/dnsmasq/dnsmasq.conf.tpl
Normal file
|
@ -0,0 +1,10 @@
|
|||
domain-needed
|
||||
expand-hosts
|
||||
localise-queries
|
||||
|
||||
{% set interfaces = wireless_interfaces.strip().split(' ') %}
|
||||
{% for interface in interfaces %}
|
||||
interface={{ interface }}
|
||||
{% endfor %}
|
||||
resolv-file=/etc/resolv.dnsmasq.conf
|
||||
cache-size=256
|
|
@ -1,5 +1,8 @@
|
|||
host-record={{ domain }},{{ ipv4 }}
|
||||
host-record=xmpp-upload.{{ domain }},{{ ipv4 }}
|
||||
{% set interfaces_list = interfaces.split(' ') %}
|
||||
{% for interface in interfaces_list %}
|
||||
interface-name={{ domain }},{{ interface }}
|
||||
interface-name=xmpp-upload.{{ domain }},{{ interface }}
|
||||
{% endfor %}
|
||||
{% if ipv6 %}
|
||||
host-record={{ domain }},{{ ipv6 }}
|
||||
host-record=xmpp-upload.{{ domain }},{{ ipv6 }}
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
domain-needed
|
||||
expand-hosts
|
||||
|
||||
listen-address=127.0.0.1
|
||||
resolv-file=/etc/resolv.dnsmasq.conf
|
||||
cache-size=256
|
32
debian/changelog
vendored
32
debian/changelog
vendored
|
@ -1,3 +1,35 @@
|
|||
yunohost (4.3.4.2) stable; urgency=low
|
||||
|
||||
- [fix] yunomdns: Ignore ipv4 link-local addresses (6854f23c)
|
||||
- [fix] backup: Fix path for multimedia restore ([#1386](https://github.com/YunoHost/yunohost/pull/1386))
|
||||
- [fix] helpers apt/php: typo in extra php-fpm yunohost service integration (47f3c00d)
|
||||
- [enh] helpers: Update n to 8.0.1 (d1ab1f67)
|
||||
|
||||
Thanks to all contributors <3 ! (ericgaspar, Kayou)
|
||||
|
||||
-- Alexandre Aubin <alex.aubin@mailoo.org> Wed, 08 Dec 2021 22:04:04 +0100
|
||||
|
||||
yunohost (4.3.4.1) stable; urgency=low
|
||||
|
||||
- [fix] regenconf: Force permission on /etc/resolv.dnsmasq.conf to fix an issue on some setup with umask=027 (5881938c)
|
||||
- [fix] regenconf: Typo in custom mdns alias regen conf (b3df36dd)
|
||||
- [fix] regenconf: Try to fix the return line bug in dnsmasq conf ([#1385](https://github.com/YunoHost/yunohost/pull/1385))
|
||||
|
||||
Thanks to all contributors <3 ! (ljf)
|
||||
|
||||
-- Alexandre Aubin <alex.aubin@mailoo.org> Sat, 27 Nov 2021 21:15:29 +0100
|
||||
|
||||
yunohost (4.3.4) stable; urgency=low
|
||||
|
||||
- [fix] apps: Allow tilde in username/organization for repo URLs ([#1382](https://github.com/YunoHost/yunohost/pull/1382))
|
||||
- [fix] misc: /etc/yunohost permissions broken on some setups (6488b4f6)
|
||||
- [fix] mdns: Don't add yunohost.local in config if it's already among the yunohost domains (c4962834)
|
||||
- [enh] dnsmasq: Tweak conf for better support of some stuff like the hotspot app ([#1383](https://github.com/YunoHost/yunohost/pull/1383))
|
||||
|
||||
Thanks to all contributors <3 ! (ljf, tituspijean)
|
||||
|
||||
-- Alexandre Aubin <alex.aubin@mailoo.org> Sat, 27 Nov 2021 00:53:16 +0100
|
||||
|
||||
yunohost (4.3.3) stable; urgency=low
|
||||
|
||||
- [fix] log: fix dump_script_log_extract_for_debugging displaying wrong log snippet during failed upgrade ([#1376](https://github.com/YunoHost/yunohost/pull/1376))
|
||||
|
|
|
@ -79,7 +79,7 @@ re_app_instance_name = re.compile(
|
|||
)
|
||||
|
||||
APP_REPO_URL = re.compile(
|
||||
r"^https://[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_./]+/[a-zA-Z0-9-_.]+_ynh(/?(-/)?tree/[a-zA-Z0-9-_.]+)?(\.git)?/?$"
|
||||
r"^https://[a-zA-Z0-9-_.]+/[a-zA-Z0-9-_./~]+/[a-zA-Z0-9-_.]+_ynh(/?(-/)?tree/[a-zA-Z0-9-_.]+)?(\.git)?/?$"
|
||||
)
|
||||
|
||||
APP_FILES_TO_COPY = [
|
||||
|
|
|
@ -70,6 +70,7 @@ def test_repo_url_definition():
|
|||
)
|
||||
assert _is_app_repo_url("https://github.com/YunoHost-Apps/foobar_ynh/tree/1.23.4")
|
||||
assert _is_app_repo_url("git@github.com:YunoHost-Apps/foobar_ynh.git")
|
||||
assert _is_app_repo_url("https://git.super.host/~max/foobar_ynh")
|
||||
|
||||
assert not _is_app_repo_url("github.com/YunoHost-Apps/foobar_ynh")
|
||||
assert not _is_app_repo_url("http://github.com/YunoHost-Apps/foobar_ynh")
|
||||
|
|
Loading…
Add table
Reference in a new issue