main: allow seed setting
Allow users to define the seed that's used for manifest generation. Regenerating an image with a given seed leads to the same manifest (provided depsolving does the same). The seed is normally mostly used to generate random filesystem UUIDs. This will need a bunch of documentation in a follow up since the use cases are meant to be advanced but it can really speed up multi-type and rebuilds of the same image. Signed-off-by: Simon de Vlieger <supakeen@redhat.com>
This commit is contained in:
parent
f25b5e325e
commit
02461ac2a3
3 changed files with 46 additions and 0 deletions
|
|
@ -24,6 +24,7 @@ type manifestOptions struct {
|
|||
Ostree *ostree.ImageOptions
|
||||
RpmDownloader osbuild.RpmDownloader
|
||||
WithSBOM bool
|
||||
CustomSeed *int64
|
||||
|
||||
ForceRepos []string
|
||||
UseBootstrapContainer bool
|
||||
|
|
@ -55,6 +56,7 @@ func generateManifest(dataDir string, extraRepos []string, img *imagefilter.Resu
|
|||
Output: output,
|
||||
RpmDownloader: opts.RpmDownloader,
|
||||
UseBootstrapContainer: opts.UseBootstrapContainer,
|
||||
CustomSeed: opts.CustomSeed,
|
||||
}
|
||||
if opts.WithSBOM {
|
||||
outputDir := basenameFor(img, opts.OutputDir)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue