Skip to content

Commit c2d6223

Browse files
supakeenachilleas-k
authored andcommitted
image/archive: set numeric owner by default
It is always a good idea to use numeric owner for the tar archive image type. Let's do that. Signed-off-by: Simon de Vlieger <[email protected]>
1 parent cfbe697 commit c2d6223

File tree

96 files changed

+115
-111
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+115
-111
lines changed

pkg/image/archive.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package image
33
import (
44
"math/rand"
55

6+
"github.com/osbuild/images/internal/common"
67
"github.com/osbuild/images/internal/environment"
78
"github.com/osbuild/images/pkg/artifact"
89
"github.com/osbuild/images/pkg/manifest"
@@ -39,6 +40,7 @@ func (img *Archive) InstantiateManifest(m *manifest.Manifest,
3940
osPipeline.OSVersion = img.OSVersion
4041

4142
tarPipeline := manifest.NewTar(buildPipeline, osPipeline, "archive")
43+
tarPipeline.NumericOwner = common.ToPtr(true)
4244

4345
compressionPipeline := GetCompressionPipeline(img.Compression, buildPipeline, tarPipeline)
4446
compressionPipeline.SetFilename(img.filename)

pkg/manifest/tar.go

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ type Tar struct {
1010
Base
1111
filename string
1212

13-
Format osbuild.TarArchiveFormat
14-
Compression osbuild.TarArchiveCompression
15-
RootNode osbuild.TarRootNode
16-
Paths []string
17-
ACLs *bool
18-
SELinux *bool
19-
Xattrs *bool
20-
Transform string
13+
Format osbuild.TarArchiveFormat
14+
Compression osbuild.TarArchiveCompression
15+
RootNode osbuild.TarRootNode
16+
Paths []string
17+
ACLs *bool
18+
SELinux *bool
19+
Xattrs *bool
20+
Transform string
21+
NumericOwner *bool
2122

2223
inputPipeline Pipeline
2324
}
@@ -55,15 +56,16 @@ func (p *Tar) serialize() (osbuild.Pipeline, error) {
5556
}
5657

5758
tarOptions := &osbuild.TarStageOptions{
58-
Filename: p.Filename(),
59-
Format: p.Format,
60-
Compression: p.Compression,
61-
ACLs: p.ACLs,
62-
SELinux: p.SELinux,
63-
Xattrs: p.Xattrs,
64-
RootNode: p.RootNode,
65-
Paths: p.Paths,
66-
Transform: p.Transform,
59+
Filename: p.Filename(),
60+
Format: p.Format,
61+
Compression: p.Compression,
62+
ACLs: p.ACLs,
63+
SELinux: p.SELinux,
64+
Xattrs: p.Xattrs,
65+
RootNode: p.RootNode,
66+
Paths: p.Paths,
67+
Transform: p.Transform,
68+
NumericOwner: p.NumericOwner,
6769
}
6870
tarStage := osbuild.NewTarStage(tarOptions, p.inputPipeline.Name())
6971
pipeline.AddStage(tarStage)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
a8efafd615efea8bd2dabd1ffd4a79550fc6f365
1+
a41bdc128d3b5089da08beb0d9d9b8dba5d78914
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0590d32c80008669ef39c2658ff2592e85e478f5
1+
506c0e916fa8314895f6f55d8b0236deb158bbc2
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
30b667f6e9e8ffabf6cc19f66860a064d943c515
1+
349b398d35a715246c784e7949e079f51cf59bb4
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c0279a9351becca7d7a9933a6986a2ed04c88d53
1+
39340cb2cc7ac6eafdcc2f845cdb04a40da95793
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
68b2b131214aee92568e55ff24060b77d1c0c332
1+
0547e60a58279f1b0235668ab5939c899968d057
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0bdaeb6d10cc5dae48558f0cf6ec5276eedbcc32
1+
e666296ad20dbcdff38b1098d199df0bb99a08bd
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
de8f79c73aa1baca85eb5c98b27e6abddc6d8750
1+
458034fb49f7ef008ba4913bb2d8b117d4c0e849
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
4c99e03588c4745221237d131c6758559099fb7c
1+
28ede0415c959564abc8fa9b90f53cb7b04a8398

0 commit comments

Comments
 (0)