[neon/extras/calamares/Neon/release] debian/patches: patch from git

Jonathan Riddell null at kde.org
Tue Feb 27 21:34:21 GMT 2024


Git commit af23589f63e21b2795462c99205e44eb4348ea5c by Jonathan Riddell.
Committed on 27/02/2024 at 21:33.
Pushed by jriddell into branch 'Neon/release'.

patch from git

M  +21   -40   debian/patches/network-config.diff

https://invent.kde.org/neon/extras/calamares/-/commit/af23589f63e21b2795462c99205e44eb4348ea5c

diff --git a/debian/patches/network-config.diff b/debian/patches/network-config.diff
index ff687ab..4808a29 100644
--- a/debian/patches/network-config.diff
+++ b/debian/patches/network-config.diff
@@ -1,45 +1,26 @@
-commit 562cae387c73b4818c36aff7a956e70b6bd4c4af
-Author: Lukas Märdian <slyon at ubuntu.com>
-Date:   Tue Feb 13 16:13:29 2024 +0100
+commit 5568d22549384a092a0d294d7343840d186839c6
+Author: Adriaan de Groot <groot at kde.org>
+Date:   Tue Feb 27 22:16:14 2024 +0100
 
-    networkcfg: Configure NetworkManager to be the default renderer
+    [networkcfg] fix python crash
     
-    When Netplan is installed in the target system:
-    In case NM is not yet set to be the default Netplan renderer (e.g. through a
-    /usr/lib/netplan/00-network-manager-all.yaml file shipped by an installed
-    package), create the /etc/netplan/01-network-manager-all.yaml configuration
-    and copy over all other Netplan configuration from the installer system.
+    open(path, "w") returns a TextIOWrapper,
+    open(path, "wb") returns a BufferedWriter,
+    .. neither of which is one of the types that os.chmod()
+       consumes. Use fileno(), an integer file-descriptor.
+    
+    FIXES #2294
 
-diff --git b/src/modules/networkcfg/main.py a/src/modules/networkcfg/main.py
-index 9c8965f85..ed130c33a 100644
---- b/src/modules/networkcfg/main.py
-+++ a/src/modules/networkcfg/main.py
-@@ -138,27 +138,7 @@ def run():
-     target_netplan = os.path.join(root_mount_point, source_netplan.lstrip('/'))
- 
-     if os.path.exists(source_netplan) and os.path.exists(target_netplan):
--        # Set NetworkManager to be the default renderer if Netplan is installed
--        # TODO: We might rather do that inside the network-manager package, see:
--        # https://bugs.launchpad.net/ubuntu/+source/ubuntu-settings/+bug/2020110
--        default_renderer = os.path.join(root_mount_point, "usr/lib/netplan",
--                                        "00-network-manager-all.yaml")
--        if not os.path.exists(default_renderer):
--            renderer_file = os.path.join(target_netplan,
--                                         "01-network-manager-all.yaml")
--            nm_renderer = """# This file was written by calamares.
--# Let NetworkManager manage all devices on this system.
--# For more information, see netplan(5).
--network:
--  version: 2
--  renderer: NetworkManager
--"""
--            with open(renderer_file, 'w') as f:
--                f.writelines(nm_renderer)
+diff --git a/src/modules/networkcfg/main.py b/src/modules/networkcfg/main.py
+index 9c8965f85..efe6930ee 100644
+--- a/src/modules/networkcfg/main.py
++++ b/src/modules/networkcfg/main.py
+@@ -155,7 +155,7 @@ network:
+ """
+             with open(renderer_file, 'w') as f:
+                 f.writelines(nm_renderer)
 -                os.chmod(f, 0o600)
--
--        # Copy existing Netplan configuration
--        for cfg in glob.glob(os.path.join(source_netplan, "*.yaml")):
-+        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))
++                os.chmod(f.fileno(), 0o600)
  
+         # Copy existing Netplan configuration
+         for cfg in glob.glob(os.path.join(source_netplan, "*.yaml")):


More information about the Neon-commits mailing list