Skip to content

feat(rsync-post-upload): take over the supplemental files of the source image - #195

Merged
HappyBasher merged 1 commit into
7.4from
feat/post-upload-supplements-133
Oct 23, 2026
Merged

HappyBasher merged 1 commit into
7.4from
feat/post-upload-supplements-133

Conversation

@HappyBasher

Copy link
Copy Markdown
Member

Summary

Server part 3 of #133: an image uploaded under a new name takes over the supplemental files of its source image.

  • When <name>.qcow2.info arrives (successful upload) and names a sourceimage, rsync-post-upload.sh copies <source>.reg, <source>.postsync and <source>.prestart as <name>.* into the new image dir, like duplicate() in linuxmuster-tools.
  • Existing files of the new image are never overwritten, so later uploads keep adapted files.
  • A copied file that mentions the source name is logged (Note: <name>.postsync mentions <source>, please check it.), since a postsync may fetch files by the old name.
  • A sourceimage that is not a qcow2 image, is the image itself or contains path components is ignored.
  • Driver profile assignments are not taken over (decided in linbo-remote: CLI option to create separate image with new name #133).

Test plan

  • tests/shell/test_rsync-post-upload.sh (8 tests) green under dash and busybox ash, full shell suite green
  • End-to-end with the 7.4.21 test package on lmnsrv1 + client multi-1 (new linbofs): linbo_create_image 2 zznew + linbo_upload succeeded, all four files accepted by the new pre-upload hook, info contains sourceimage="debian.qcow2", torrent seeded
  • Live with this hook on lmnsrv1 (dummy debian.reg/.postsync/.prestart, pre-existing zznew.prestart): re-upload of zznew.qcow2.info took over reg and postsync, logged the postsync note, kept zznew.prestart; test image and dummies removed, package hook restored

Note for testing by hand: the rsync client does not wait for the post-xfer hook, so check the result a few seconds after the upload.

🤖 Generated with Claude Code

…ce image

An image uploaded under a new name had none of the server-side files
that belong to an image by name: the Windows registry patch <name>.reg
and the <name>.postsync and <name>.prestart scripts. A sync of such an
image after switching start.conf to it ran without them.

When <name>.qcow2.info of a successful upload names a sourceimage, the
post-upload hook now copies reg, postsync and prestart of that source
image as <name>.reg, <name>.postsync and <name>.prestart, like
duplicating an image in linuxmuster-tools does. Files the new image
already has are never overwritten, so a later upload keeps adapted
files. A copied file that mentions the source image name is logged, as
a postsync may download files by the old name. A sourceimage that is no
qcow2 image, is the image itself or contains path components is
ignored. Driver profile assignments are not taken over.

The new function is covered by tests/shell/test_rsync-post-upload.sh.

Refs #133

Signed-off-by: thomas@linuxmuster.net
Assisted-by: Claude
@HappyBasher
HappyBasher merged commit ed052cf into 7.4 Oct 23, 2026
6 checks passed
@HappyBasher
HappyBasher deleted the feat/post-upload-supplements-133 branch October 23, 2026 13:52
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