bundleinstall

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package bundleinstall copies the web extension's bundle out of its image into the volume OpenCloud loads extensions from.

It replaces the `mkdir -p … && cp -R …` shell one-liner OpenCloud's own web-extensions images are run with, so the image needs no shell and no GPL-licensed busybox (phase-11 §11.1, #99). It keeps that one-liner's behaviour: the destination is created if missing, files the bundle has are overwritten, and files it does not have are left alone, so a restart over a volume that already holds an earlier copy succeeds.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Files int
	Bytes int64
}

Result says what Install copied.

func Install

func Install(src fs.FS, dst string) (Result, error)

Install copies the tree src into the directory dst, creating dst and every directory below it as needed. Only directories and regular files are copied; anything else in src (a symlink, a device) is refused, because the bundle has none and copying one could reach outside dst.

dst is opened as an os.Root: nothing already in the volume (a symlink left by someone else) can redirect a write outside it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL