diff --git a/backport-fix-properly-handle-blank-lines-in-fstab-5643.patch b/backport-fix-properly-handle-blank-lines-in-fstab-5643.patch new file mode 100644 index 0000000000000000000000000000000000000000..75f6a52a39be77de1f2f91474b4e0a7f1cd0e051 --- /dev/null +++ b/backport-fix-properly-handle-blank-lines-in-fstab-5643.patch @@ -0,0 +1,33 @@ +From 93f30bbfcb073fd8213c18c2e7eb7f857234fc8a Mon Sep 17 00:00:00 2001 +From: James Falcon +Date: Thu, 29 Aug 2024 18:22:23 -0400 +Subject: [PATCH] fix: properly handle blank lines in fstab (#5643) + +Reference:https://github.com/canonical/cloud-init/commit/93f30bbfcb073fd8213c18c2e7eb7f857234fc8a +Conflict:(1)not change test, the corresponding test case does not exist. +(2)change handle() not parse_fstab(), diff commit is d15a770. + +--- + cloudinit/config/cc_mounts.py | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/cloudinit/config/cc_mounts.py b/cloudinit/config/cc_mounts.py +index 4efa2a2..1cd53ef 100644 +--- a/cloudinit/config/cc_mounts.py ++++ b/cloudinit/config/cc_mounts.py +@@ -459,8 +459,9 @@ def handle(name: str, cfg: Config, cloud: Cloud, args: list) -> None: + toks = WS.split(line) + except Exception: + pass +- fstab_devs[toks[0]] = line +- fstab_lines.append(line) ++ if toks: ++ fstab_devs[toks[0]] = line ++ fstab_lines.append(line) + + device_aliases = cfg.get("device_aliases", {}) + +-- +2.33.0 + + diff --git a/cloud-init.spec b/cloud-init.spec index 08268841871f75de90c6704609779a84b97a7cbd..a7f46ef817b0c0028f623d4f770814b062d95075 100644 --- a/cloud-init.spec +++ b/cloud-init.spec @@ -1,6 +1,6 @@ Name: cloud-init Version: 23.4.1 -Release: 10 +Release: 11 Summary: the defacto multi-distribution package that handles early initialization of a cloud instance. License: ASL 2.0 or GPLv3 URL: http://launchpad.net/cloud-init @@ -32,6 +32,7 @@ Patch6014: backport-fix-net-klibc-ipconfig-PROTO-compatibility-5437.patch Patch6015: backport-test-fix-mocking-leaks-4815.patch Patch6016: backport-feat-Ensure-random-passwords-contain-multiple-charac.patch Patch6017: backport-test-Fix-duplicate-judgment-conditions-in-password-g.patch +Patch6018: backport-fix-properly-handle-blank-lines-in-fstab-5643.patch Patch9000: do-not-generate-dsa.patch @@ -164,6 +165,12 @@ fi %exclude /usr/share/doc/* %changelog +* Thu Nov 14 2024 shixuantong - 23.4.1-11 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix: properly handle blank lines in fstab + * Wed Nov 06 2024 shixuantong - 23.4.1-10 - Type:bugfix - CVE:NA