From 744b8f13ed04a3c34e15cd4011d97b6dfa5a1a19 Mon Sep 17 00:00:00 2001 From: Michael Vorburger Date: Tue, 29 Dec 2020 23:26:54 +0100 Subject: make baseline have working ethernet networking, like releng --- .../airootfs/etc/systemd/network/20-ethernet.network | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 configs/baseline/airootfs/etc/systemd/network/20-ethernet.network (limited to 'configs/baseline/airootfs/etc/systemd/network/20-ethernet.network') diff --git a/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network b/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network new file mode 100644 index 0000000..efa309c --- /dev/null +++ b/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network @@ -0,0 +1,13 @@ +# +# SPDX-License-Identifier: GPL-3.0-or-later + +[Match] +Name=en* +Name=eth* + +[Network] +DHCP=yes +IPv6PrivacyExtensions=yes + +[DHCP] +RouteMetric=512 -- cgit v1.2.3-70-g09d2 From c6a1ccca4fe5c42e2a435e5335c701c112242bd0 Mon Sep 17 00:00:00 2001 From: nl6720 Date: Fri, 9 Jul 2021 17:01:57 +0300 Subject: configs/releng/airootfs/etc/systemd/network/: move RouteMetric= from [DHCPv6] to [IPv6AcceptRA] systemd moved the option. See https://github.com/systemd/systemd/commit/8ebafba9f987c21aa5787c8767f2e390b4ec0bc5 . Implements #123. Document in comments why the route metrics need to be set (because of https://github.com/systemd/systemd/issues/17698 ) and use the same metric values as NetworkManager. https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c Additionally remove RouteMetric from configs/baseline/airootfs/etc/systemd/network/20-ethernet.network. There is only one networkd configuration file in baseline, meaning, there are no other routes. --- .../baseline/airootfs/etc/systemd/network/20-ethernet.network | 3 --- .../releng/airootfs/etc/systemd/network/20-ethernet.network | 11 ++++++++--- configs/releng/airootfs/etc/systemd/network/20-wlan.network | 11 ++++++++--- configs/releng/airootfs/etc/systemd/network/20-wwan.network | 11 ++++++++--- 4 files changed, 24 insertions(+), 12 deletions(-) (limited to 'configs/baseline/airootfs/etc/systemd/network/20-ethernet.network') diff --git a/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network b/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network index efa309c..9157e96 100644 --- a/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network +++ b/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network @@ -8,6 +8,3 @@ Name=eth* [Network] DHCP=yes IPv6PrivacyExtensions=yes - -[DHCP] -RouteMetric=512 diff --git a/configs/releng/airootfs/etc/systemd/network/20-ethernet.network b/configs/releng/airootfs/etc/systemd/network/20-ethernet.network index 142c591..88662a4 100644 --- a/configs/releng/airootfs/etc/systemd/network/20-ethernet.network +++ b/configs/releng/airootfs/etc/systemd/network/20-ethernet.network @@ -9,8 +9,13 @@ Name=eth* DHCP=yes IPv6PrivacyExtensions=yes +# systemd-networkd does not set per-interface-type default route metrics +# https://github.com/systemd/systemd/issues/17698 +# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband. +# Use values from NetworkManager. From nm_device_get_route_metric_default in +# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c [DHCPv4] -RouteMetric=512 +RouteMetric=100 -[DHCPv6] -RouteMetric=512 +[IPv6AcceptRA] +RouteMetric=100 diff --git a/configs/releng/airootfs/etc/systemd/network/20-wlan.network b/configs/releng/airootfs/etc/systemd/network/20-wlan.network index c164666..6bbd7ed 100644 --- a/configs/releng/airootfs/etc/systemd/network/20-wlan.network +++ b/configs/releng/airootfs/etc/systemd/network/20-wlan.network @@ -8,8 +8,13 @@ Name=wl* DHCP=yes IPv6PrivacyExtensions=yes +# systemd-networkd does not set per-interface-type default route metrics +# https://github.com/systemd/systemd/issues/17698 +# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband. +# Use values from NetworkManager. From nm_device_get_route_metric_default in +# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c [DHCPv4] -RouteMetric=1024 +RouteMetric=600 -[DHCPv6] -RouteMetric=1024 +[IPv6AcceptRA] +RouteMetric=600 diff --git a/configs/releng/airootfs/etc/systemd/network/20-wwan.network b/configs/releng/airootfs/etc/systemd/network/20-wwan.network index 7fba35b..d57cb0f 100644 --- a/configs/releng/airootfs/etc/systemd/network/20-wwan.network +++ b/configs/releng/airootfs/etc/systemd/network/20-wwan.network @@ -8,8 +8,13 @@ Name=ww* DHCP=yes IPv6PrivacyExtensions=yes +# systemd-networkd does not set per-interface-type default route metrics +# https://github.com/systemd/systemd/issues/17698 +# Explicitly set route metric, so that Ethernet is preferred over Wi-Fi and Wi-Fi is preferred over mobile broadband. +# Use values from NetworkManager. From nm_device_get_route_metric_default in +# https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/blob/main/src/core/devices/nm-device.c [DHCPv4] -RouteMetric=2048 +RouteMetric=700 -[DHCPv6] -RouteMetric=2048 +[IPv6AcceptRA] +RouteMetric=700 -- cgit v1.2.3-70-g09d2 From f4324e2f814733e711ba29b1b0272dc593e014bc Mon Sep 17 00:00:00 2001 From: David Runge Date: Thu, 29 Jul 2021 20:45:08 +0200 Subject: Remove SPDX license identifier from releng configs configs/baseline/*: Remove the SPDX license identifier comment from the configuration files in the profile, as they are not eligible for copyright. --- configs/baseline/airootfs/etc/mkinitcpio.conf | 3 --- configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset | 3 --- configs/baseline/airootfs/etc/systemd/network/20-ethernet.network | 3 --- .../wait-for-only-one-interface.conf | 3 --- configs/baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf | 3 --- .../baseline/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf | 3 --- configs/baseline/efiboot/loader/loader.conf | 3 --- configs/baseline/packages.x86_64 | 2 -- configs/baseline/pacman.conf | 2 -- configs/baseline/syslinux/syslinux-linux.cfg | 3 --- configs/baseline/syslinux/syslinux.cfg | 3 --- 11 files changed, 31 deletions(-) (limited to 'configs/baseline/airootfs/etc/systemd/network/20-ethernet.network') diff --git a/configs/baseline/airootfs/etc/mkinitcpio.conf b/configs/baseline/airootfs/etc/mkinitcpio.conf index 4b7b7fb..34b1a06 100644 --- a/configs/baseline/airootfs/etc/mkinitcpio.conf +++ b/configs/baseline/airootfs/etc/mkinitcpio.conf @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - # vim:set ft=sh # MODULES # The following modules are loaded before any boot hooks are diff --git a/configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset b/configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset index d35f137..9f67184 100644 --- a/configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset +++ b/configs/baseline/airootfs/etc/mkinitcpio.d/linux.preset @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - # mkinitcpio preset file for the 'linux' package on archiso PRESETS=('archiso') diff --git a/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network b/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network index 9157e96..e8842f2 100644 --- a/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network +++ b/configs/baseline/airootfs/etc/systemd/network/20-ethernet.network @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - [Match] Name=en* Name=eth* diff --git a/configs/baseline/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf b/configs/baseline/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf index 191db81..c9f9bce 100644 --- a/configs/baseline/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf +++ b/configs/baseline/airootfs/etc/systemd/system/systemd-networkd-wait-online.service.d/wait-for-only-one-interface.conf @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - # Allow systemd-networkd-wait-online to succeed with one interface, otherwise, if multiple network interfaces exist, # network-online.target gets needlessly delayed. # See https://wiki.archlinux.org/title/systemd-networkd#systemd-networkd-wait-online diff --git a/configs/baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf b/configs/baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf index 8dd7a16..11624b6 100644 --- a/configs/baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf +++ b/configs/baseline/efiboot/loader/entries/01-archiso-x86_64-linux.conf @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - title Arch Linux (x86_64, UEFI) linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img diff --git a/configs/baseline/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf b/configs/baseline/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf index c5e9ab9..d66f5a6 100644 --- a/configs/baseline/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf +++ b/configs/baseline/efiboot/loader/entries/02-archiso-x86_64-ram-linux.conf @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - title Arch Linux (x86_64, UEFI) Copy to RAM linux /%INSTALL_DIR%/boot/x86_64/vmlinuz-linux initrd /%INSTALL_DIR%/boot/x86_64/initramfs-linux.img diff --git a/configs/baseline/efiboot/loader/loader.conf b/configs/baseline/efiboot/loader/loader.conf index beacd81..17110fa 100644 --- a/configs/baseline/efiboot/loader/loader.conf +++ b/configs/baseline/efiboot/loader/loader.conf @@ -1,5 +1,2 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - timeout 3 default 01-archiso-x86_64-linux.conf diff --git a/configs/baseline/packages.x86_64 b/configs/baseline/packages.x86_64 index 224f7f0..0a64120 100644 --- a/configs/baseline/packages.x86_64 +++ b/configs/baseline/packages.x86_64 @@ -1,5 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later base cloud-init linux diff --git a/configs/baseline/pacman.conf b/configs/baseline/pacman.conf index adb1ea8..5ee6c1e 100644 --- a/configs/baseline/pacman.conf +++ b/configs/baseline/pacman.conf @@ -2,8 +2,6 @@ # /etc/pacman.conf # # See the pacman.conf(5) manpage for option and repository directives -# -# SPDX-License-Identifier: GPL-3.0-or-later # # GENERAL OPTIONS diff --git a/configs/baseline/syslinux/syslinux-linux.cfg b/configs/baseline/syslinux/syslinux-linux.cfg index ced6801..6bfd0c3 100644 --- a/configs/baseline/syslinux/syslinux-linux.cfg +++ b/configs/baseline/syslinux/syslinux-linux.cfg @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - LABEL arch MENU LABEL Arch Linux (x86_64, BIOS) LINUX /%INSTALL_DIR%/boot/%ARCH%/vmlinuz-linux diff --git a/configs/baseline/syslinux/syslinux.cfg b/configs/baseline/syslinux/syslinux.cfg index f35f0c2..561ac7c 100644 --- a/configs/baseline/syslinux/syslinux.cfg +++ b/configs/baseline/syslinux/syslinux.cfg @@ -1,6 +1,3 @@ -# -# SPDX-License-Identifier: GPL-3.0-or-later - SERIAL 0 115200 UI menu.c32 MENU TITLE Arch Linux -- cgit v1.2.3-70-g09d2