mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Merge branch 'dev' into bullseye
This commit is contained in:
commit
45584b44a6
11 changed files with 82 additions and 17 deletions
|
@ -24,7 +24,9 @@ def get_network_local_interfaces() -> Dict[str, Dict[str, List[str]]]:
|
|||
"ipv4": [
|
||||
ip.ip
|
||||
for ip in adapter.ips
|
||||
if ip.is_IPv4 and ip_address(ip.ip).is_private
|
||||
if ip.is_IPv4
|
||||
and ip_address(ip.ip).is_private
|
||||
and not ip_address(ip.ip).is_link_local
|
||||
],
|
||||
"ipv6": [
|
||||
ip.ip[0]
|
||||
|
|
10
conf/dnsmasq/dnsmasq.conf.tpl
Normal file
10
conf/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
|
35
debian/changelog
vendored
35
debian/changelog
vendored
|
@ -4,6 +4,41 @@ yunohost (11.0.0~alpha) unstable; urgency=low
|
|||
|
||||
-- Alexandre Aubin <alex.aubin@mailoo.org> Fri, 05 Feb 2021 00:02:38 +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))
|
||||
- [fix] certificate: fix stupid certificate/diagnosis issue with subdomains of ynh domains (7c569d16)
|
||||
- [fix] diagnosis: Read DNS Blacklist answer and compare it against list of non-BL codes ([#1375](https://github.com/YunoHost/yunohost/pull/1375))
|
||||
- [enh] helpers: Update n to 8.0.0 ([#1372](https://github.com/YunoHost/yunohost/pull/1372))
|
||||
- [fix] helpers: Make ynh_add_fpm_config more robust to some edge cases (51d5dca0)
|
||||
- [fix] backup: conf_ynh_settings backup/restore hook, /etc/yunohost/domains may not exist (38f5352f)
|
||||
- [i18n] Translations updated for Basque, Chinese (Simplified), Indonesian, Italian, Ukrainian
|
||||
|
||||
Thanks to all contributors <3 ! (dagangtie, ericgaspar, Félix Piédallu, Flavio Cristoforetti, liimee, punkrockgirl, Romain Thouvenin, Tommi, Tymofii-Lytvynenko)
|
||||
|
||||
-- Alexandre Aubin <alex.aubin@mailoo.org> Sun, 14 Nov 2021 22:55:16 +0100
|
||||
|
||||
yunohost (4.3.2.2) stable; urgency=low
|
||||
|
||||
- [fix] nginx: Try to fix again the webadmin cache hell (74e2a51e)
|
||||
|
|
|
@ -170,6 +170,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
|
||||
|
|
|
@ -671,4 +671,4 @@
|
|||
"ldap_attribute_already_exists": "Xa existe o atributo LDAP '{attribute}' con valor '{value}'",
|
||||
"log_domain_config_set": "Actualizar configuración para o dominio '{}'",
|
||||
"domain_unknown": "Dominio '{domain}' descoñecido"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -78,7 +78,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