From 3ab57a811baf93843b28e352205cade4360dc998 Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Sun, 8 Oct 2023 11:41:22 -0500 Subject: [PATCH] 3.3.0-alpha2-0ubuntu6 (patches unapplied) Imported using git-ubuntu import. --- debian/changelog | 6 ++++ debian/patches/netplan-networking.patch | 40 +++++++++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 47 insertions(+) create mode 100644 debian/patches/netplan-networking.patch diff --git a/debian/changelog b/debian/changelog index 28a4d6a..a6a5827 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +calamares (3.3.0-alpha2-0ubuntu6) mantic; urgency=medium + + * Add support for Netplan backends (LP: #2036999). + + -- Simon Quigley Sun, 08 Oct 2023 11:41:22 -0500 + calamares (3.3.0-alpha2-0ubuntu5) mantic; urgency=medium * Rebuild against new libyaml-cpp0.8. diff --git a/debian/patches/netplan-networking.patch b/debian/patches/netplan-networking.patch new file mode 100644 index 0000000..312e7ab --- /dev/null +++ b/debian/patches/netplan-networking.patch @@ -0,0 +1,40 @@ +Description: Add support for Netplan backends + Ubuntu switched to using Netplan as a backend for Network Manager. Add support for those configs +Author: Simon Quigley +Origin: vendor +Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/calamares/+bug/2036999 +Last-Update: 2023-10-08 +--- +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ +--- a/src/modules/networkcfg/main.py ++++ b/src/modules/networkcfg/main.py +@@ -14,6 +14,7 @@ + # + + import os ++import glob + import shutil + + import libcalamares +@@ -131,6 +132,21 @@ def run(): + except FileExistsError: + pass + ++ # Also install netplan files ++ source_netplan = "/etc/netplan" ++ root_mount_point = libcalamares.globalstorage.value("rootMountPoint") ++ target_netplan = os.path.join(root_mount_point, source_netplan.lstrip('/')) ++ ++ if os.path.exists(source_netplan) and os.path.exists(target_netplan): ++ for cfg in glob.glob(os.path.join(source_netplan, "90-NM-*")): ++ source_cfg = os.path.join(source_netplan, cfg) ++ target_cfg = os.path.join(target_netplan, os.path.basename(cfg)) ++ ++ if os.path.exists(target_cfg): ++ continue ++ ++ shutil.copy(source_cfg, target_cfg) ++ + # We need to overwrite the default resolv.conf in the chroot. + source_resolv, target_resolv = path_pair(root_mount_point, "etc/resolv.conf") + if source_resolv != target_resolv and os.path.exists(source_resolv): diff --git a/debian/patches/series b/debian/patches/series index 683ca99..62ee15f 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0001-replace-pkexec-by-sudo.patch apport-package-hook.patch +netplan-networking.patch