Skip to content

feat(linbo-remote, linbo_wrapper): create and upload images under a new name - #196

Merged
HappyBasher merged 1 commit into
7.4from
feat/image-name-133
Oct 23, 2026
Merged

HappyBasher merged 1 commit into
7.4from
feat/image-name-133

Conversation

@HappyBasher

Copy link
Copy Markdown
Member

Summary

Last part of #133: linbo-remote can create and upload an image under a new name, as requested in the issue.

linbo-remote -i pc01 -c image_name:noble,create_image:1,upload_image:1
  • image_name:<name> makes the following create_image/upload_image commands use <name>.qcow2 instead of the start.conf image.
  • linbo_wrapper is started once per command (both -c over ssh and onboot -p), so a name kept in the wrapper would be lost. The parser therefore appends the name as 4th field to the image commands (create_image:1:"msg":noble, upload_image:1::noble) instead of passing image_name on. Stateless, nothing left behind on the client.
  • linbo_wrapper only reads that field for the image commands, so linbo:<password> is never parsed or echoed as a name.
  • Refused: invalid names (^[A-Za-z0-9_-]+$), chains combining image_name with create_qdiff/upload_qdiff, and image_name without a following create_image/upload_image.
  • Help texts of linbo-remote and linbo_wrapper updated; headers converted.

Follow-up outside this repo: linuxmuster-tools' SUPPORTED_COMMANDS (linbo_sync.py) does not know image_name, so WebUI/API cannot use it yet.

Test plan

  • tests/python 134 passed (new image_name cases), shell suite green under dash and busybox ash (image_name_file)
  • Live on lmnsrv1 (7.4.21 test package + this PR's linbo_remote_*.py) and multi-1 (this PR's linbo_wrapper), originals restored afterwards:
    • image_name:no.ble,..., image_name:zznew2,create_qdiff:2, image_name:zznew2,reboot refused by linbo-remote
    • --dry-run -c 'image_name:zznew2,create_image:2:pr6 test,upload_image:2': wrapper would run linbo_create_image 2 zznew2.qcow2, create_desc zznew2.qcow2, linbo_upload ***** zznew2.qcow2
    • real run of the same chain: rc 0, zznew2 re-created and uploaded (own derivative of debian, accepted by the pre-upload guards), desc "pr6 test", previous version moved to backups/, supplemental files kept

🤖 Generated with Claude Code

…ew name

linbo-remote accepts the new command image_name:<name>, which makes the
following create_image and upload_image commands work on <name>.qcow2
instead of the image defined in start.conf, e.g.

  linbo-remote -i pc01 -c image_name:noble,create_image:1,upload_image:1

linbo_wrapper runs once per command, both for -c over ssh and for onboot
commands, so a name set by a command of its own would be lost before the
next one. The parser therefore does not pass image_name on, it appends
the name as 4th field to the following image commands, e.g.
create_image:1:"msg":noble and upload_image:1::noble. linbo_wrapper reads
this field for the image commands only, so "linbo:<password>" is never
parsed or echoed as an image name, and hands it to linbo_create_image or
uses it as the upload file.

The name has to consist of letters, digits, "_" and "-". A chain with
image_name is refused if it contains create_qdiff or upload_qdiff, or if
no create_image/upload_image follows image_name.

Covered by tests/python/test_linbo_remote_lib.py and
tests/shell/test_linbo_wrapper.sh.

Refs #133

Signed-off-by: thomas@linuxmuster.net
Assisted-by: Claude
@HappyBasher
HappyBasher merged commit 06c35b9 into 7.4 Oct 23, 2026
6 checks passed
@HappyBasher
HappyBasher deleted the feat/image-name-133 branch October 23, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant