SHA256
1
0
forked from pool/cloud-init
Ana Guerrero 2025-02-12 20:30:43 +00:00 committed by Git OBS Bridge
commit 9d54ca0906
3 changed files with 57 additions and 23 deletions

24
cloud-init-direxist.patch Normal file
View File

@ -0,0 +1,24 @@
--- cloudinit/atomic_helper.py.orig
+++ cloudinit/atomic_helper.py
@@ -7,6 +7,8 @@ import stat
import tempfile
from base64 import b64decode, b64encode
+from cloudinit import util
+
_DEF_PERMS = 0o644
LOG = logging.getLogger(__name__)
@@ -43,9 +45,9 @@ def write_file(
tf = None
try:
- tf = tempfile.NamedTemporaryFile(
- dir=os.path.dirname(filename), delete=False, mode=omode
- )
+ dirname = os.path.dirname(filename)
+ util.ensure_dir(dirname)
+ tf = tempfile.NamedTemporaryFile(dir=dirname, delete=False, mode=omode)
LOG.debug(
"Atomically writing to file %s (via temporary file %s) - %s: [%o]"
" %d bytes/chars",

View File

@ -1,7 +1,14 @@
-------------------------------------------------------------------
Tue Feb 4 16:44:12 UTC 2025 - Robert Schweikert <rjschwei@suse.com>
- Add cloud-init-direxist.patch (bsc#1236720)
+ Make sure the directory exists, if not create it, before writing in that
location.
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Jan 20 14:21:55 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com> Mon Jan 20 14:21:55 UTC 2025 - Daniel Garcia <daniel.garcia@suse.com>
- Support python 3.13: - Support python 3.13 (bsc#1233649):
+ pep-594-drop-pipes.patch, gh#canonical/cloud-init#4392 + pep-594-drop-pipes.patch, gh#canonical/cloud-init#4392
+ cloud-init-fix-python313.patch, gh#canonical/cloud-init#4669 + cloud-init-fix-python313.patch, gh#canonical/cloud-init#4669
+ cloud-init-dont-assume-ordering-of-ThreadPoolExecutor.patch gh#canonical/cloud-init#5052 + cloud-init-dont-assume-ordering-of-ThreadPoolExecutor.patch gh#canonical/cloud-init#5052

View File

@ -61,6 +61,8 @@ Patch17: pep-594-drop-pipes.patch
Patch18: cloud-init-fix-python313.patch Patch18: cloud-init-fix-python313.patch
# FIXME https://github.com/canonical/cloud-init/pull/5052 # FIXME https://github.com/canonical/cloud-init/pull/5052
Patch19: cloud-init-dont-assume-ordering-of-ThreadPoolExecutor.patch Patch19: cloud-init-dont-assume-ordering-of-ThreadPoolExecutor.patch
# FIXME https://github.com/canonical/cloud-init/pull/4938
Patch20: cloud-init-direxist.patch
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: filesystem BuildRequires: filesystem
# pkg-config is needed to find correct systemd unit dir # pkg-config is needed to find correct systemd unit dir
@ -178,6 +180,7 @@ Documentation and examples for cloud-init tools
%patch -p1 -P 17 %patch -p1 -P 17
%patch -p1 -P 18 %patch -p1 -P 18
%patch -p1 -P 19 %patch -p1 -P 19
%patch -P 20
# patch in the full version to version.py # patch in the full version to version.py
version_pys=$(find . -name version.py -type f) version_pys=$(find . -name version.py -type f)