cs-image-system-bash-mod-plugin 0.1.7__tar.gz → 0.1.8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/.gitignore +5 -2
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/PKG-INFO +9 -8
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/README.md +7 -6
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/pyproject.toml +2 -2
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/tests/test_bash_provisioner.py +6 -0
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/LICENSE +0 -0
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/src/cs_image_system/bash_mod_plugin/__init__.py +0 -0
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/src/cs_image_system/bash_mod_plugin/bash_builder.py +0 -0
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/src/cs_image_system/bash_mod_plugin/bash_models.py +0 -0
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/src/cs_image_system/bash_mod_plugin/main.py +0 -0
- {cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/src/cs_image_system/py.typed +0 -0
|
@@ -13,16 +13,19 @@ build/
|
|
|
13
13
|
.venv/
|
|
14
14
|
.DS_Store
|
|
15
15
|
packages/**/*.code-workspace
|
|
16
|
-
# the IDE rewrites the root workspace file whenever folders are opened: it is the editor's, not the repository's
|
|
16
|
+
# the IDE rewrites the root workspace file whenever folders are opened: it is the editor's, not the repository's
|
|
17
17
|
/*.code-workspace
|
|
18
18
|
trial
|
|
19
19
|
tfmodules/tftest
|
|
20
20
|
YAML_DUMP.yaml
|
|
21
|
+
# a configuration tree's run-local plaintexts and debug output, wherever a tree
|
|
22
|
+
# sits in this repository (a copy of the frozen fixture included)
|
|
23
|
+
_private/
|
|
21
24
|
.obsidian
|
|
22
25
|
.tofu-plugin-cache/
|
|
23
26
|
_uncommitted/
|
|
24
27
|
target/
|
|
25
|
-
# never publishable, whatever the root (
|
|
28
|
+
# never publishable, whatever the root (the public-safe hook refuses them; `just publish-tree` checks the policy)
|
|
26
29
|
tfplan
|
|
27
30
|
*.tfstate
|
|
28
31
|
*.tfstate.backup
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: cs-image-system-bash-mod-plugin
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.8
|
|
4
4
|
Summary: The shell modification plugin: inline script, script files and an ensure form become Packer shell provisioners
|
|
5
5
|
Project-URL: Repository, https://github.com/infrastructurebuilder/cs-image-system-3
|
|
6
6
|
Project-URL: Documentation, https://github.com/infrastructurebuilder/cs-image-system-3/blob/develop/docs/OPERATIONS.md
|
|
@@ -9,7 +9,7 @@ Author-email: Mykel Alvis <mykelalvis@infrastructurebuilder.org>
|
|
|
9
9
|
License-Expression: Apache-2.0
|
|
10
10
|
License-File: LICENSE
|
|
11
11
|
Requires-Python: >=3.13
|
|
12
|
-
Requires-Dist: cs-image-system-base==0.1.
|
|
12
|
+
Requires-Dist: cs-image-system-base==0.1.8
|
|
13
13
|
Requires-Dist: cs-image-system-contract<0.5,>=0.4
|
|
14
14
|
Requires-Dist: pydantic>=2.13
|
|
15
15
|
Description-Content-Type: text/markdown
|
|
@@ -191,10 +191,11 @@ calls, in order:
|
|
|
191
191
|
`scripts` to `<block_dir>/<script path>` and returns
|
|
192
192
|
`{script: script path}`. The source is resolved against the process's
|
|
193
193
|
current working directory; the configuration load has already changed
|
|
194
|
-
directory to the configuration root (`--root-dir`, else
|
|
195
|
-
`working_directory` in `cfg/_config.yml
|
|
196
|
-
path is root-relative. A missing file raises
|
|
197
|
-
absolute path is not copied and is left in
|
|
194
|
+
directory to the configuration root (`--root-dir`, else the directory
|
|
195
|
+
the command was started from; `working_directory` in `cfg/_config.yml`
|
|
196
|
+
is not read), so the path is root-relative. A missing file raises
|
|
197
|
+
`FileNotFoundError`; an absolute path is not copied and is left in
|
|
198
|
+
place.
|
|
198
199
|
2. `mod.remap_self_with_copied_assets(mapping)` on the item. Because the
|
|
199
200
|
mapping's value is the same relative path the copy was placed at, the
|
|
200
201
|
item's `scripts` entries keep their text; the emitted `scripts = [...]`
|
|
@@ -372,8 +373,8 @@ in `ensure` lines works there too.
|
|
|
372
373
|
**How the plugin finds things.** The builder by the item's `type:` (the
|
|
373
374
|
builder's name); the item class by the builder's `type: bash-remote`; the
|
|
374
375
|
`bash` entry by the builder's `executable:`; script files by path relative
|
|
375
|
-
to the configuration root (the working directory the load
|
|
376
|
-
`--root-dir`, else
|
|
376
|
+
to the configuration root (the working directory the load changes into:
|
|
377
|
+
`--root-dir`, else the directory the command was started from); the
|
|
377
378
|
build VM through the image builder that hosts the emission. No environment
|
|
378
379
|
variable, profile or file of its own.
|
|
379
380
|
|
|
@@ -175,10 +175,11 @@ calls, in order:
|
|
|
175
175
|
`scripts` to `<block_dir>/<script path>` and returns
|
|
176
176
|
`{script: script path}`. The source is resolved against the process's
|
|
177
177
|
current working directory; the configuration load has already changed
|
|
178
|
-
directory to the configuration root (`--root-dir`, else
|
|
179
|
-
`working_directory` in `cfg/_config.yml
|
|
180
|
-
path is root-relative. A missing file raises
|
|
181
|
-
absolute path is not copied and is left in
|
|
178
|
+
directory to the configuration root (`--root-dir`, else the directory
|
|
179
|
+
the command was started from; `working_directory` in `cfg/_config.yml`
|
|
180
|
+
is not read), so the path is root-relative. A missing file raises
|
|
181
|
+
`FileNotFoundError`; an absolute path is not copied and is left in
|
|
182
|
+
place.
|
|
182
183
|
2. `mod.remap_self_with_copied_assets(mapping)` on the item. Because the
|
|
183
184
|
mapping's value is the same relative path the copy was placed at, the
|
|
184
185
|
item's `scripts` entries keep their text; the emitted `scripts = [...]`
|
|
@@ -356,8 +357,8 @@ in `ensure` lines works there too.
|
|
|
356
357
|
**How the plugin finds things.** The builder by the item's `type:` (the
|
|
357
358
|
builder's name); the item class by the builder's `type: bash-remote`; the
|
|
358
359
|
`bash` entry by the builder's `executable:`; script files by path relative
|
|
359
|
-
to the configuration root (the working directory the load
|
|
360
|
-
`--root-dir`, else
|
|
360
|
+
to the configuration root (the working directory the load changes into:
|
|
361
|
+
`--root-dir`, else the directory the command was started from); the
|
|
361
362
|
build VM through the image builder that hosts the emission. No environment
|
|
362
363
|
variable, profile or file of its own.
|
|
363
364
|
|
{cs_image_system_bash_mod_plugin-0.1.7 → cs_image_system_bash_mod_plugin-0.1.8}/pyproject.toml
RENAMED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cs-image-system-bash-mod-plugin"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.8"
|
|
8
8
|
description = "The shell modification plugin: inline script, script files and an ensure form become Packer shell provisioners"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
authors = [{ name = "Mykel Alvis", email = "mykelalvis@infrastructurebuilder.org" }]
|
|
@@ -13,7 +13,7 @@ license-files = ["LICENSE"]
|
|
|
13
13
|
requires-python = ">=3.13"
|
|
14
14
|
dependencies = [
|
|
15
15
|
"cs-image-system-contract>=0.4,<0.5",
|
|
16
|
-
"cs-image-system-base==0.1.
|
|
16
|
+
"cs-image-system-base==0.1.8",
|
|
17
17
|
"pydantic>=2.13",
|
|
18
18
|
]
|
|
19
19
|
|
|
@@ -7,6 +7,7 @@ from pathlib import Path
|
|
|
7
7
|
from types import SimpleNamespace
|
|
8
8
|
from typing import Any, cast
|
|
9
9
|
|
|
10
|
+
from cs_image_system.base.bake_steps import execute_command_line
|
|
10
11
|
from cs_image_system.bash_mod_plugin.bash_builder import BashModBuilder
|
|
11
12
|
from cs_image_system.bash_mod_plugin.bash_models import BashModItemModel
|
|
12
13
|
from cs_image_system.contract.lifecycle import ExecutionLifecyclePhase
|
|
@@ -20,6 +21,11 @@ def _builder(**model_fields):
|
|
|
20
21
|
model.effective_execute_command = lambda: model.execute_command
|
|
21
22
|
b = BashModBuilder.__new__(BashModBuilder)
|
|
22
23
|
b._model = model # type: ignore[attr-defined]
|
|
24
|
+
# the builder asks its run's commands service for the execute_command
|
|
25
|
+
# line; a builder made here is bound to a stand-in that answers with the
|
|
26
|
+
# kit's own (the loader binds a real one)
|
|
27
|
+
b.bind(cast(Any, SimpleNamespace(services=SimpleNamespace(
|
|
28
|
+
commands=SimpleNamespace(execute_command_line=execute_command_line)))))
|
|
23
29
|
return b
|
|
24
30
|
|
|
25
31
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|