mirror of
https://github.com/goreleaser/nfpm
synced 2024-11-18 19:04:07 +01:00
fix: ensure rpm files have owner (#117)
Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com>
This commit is contained in:
parent
30eb8de17a
commit
60adb12ef3
1
acceptance/testdata/rpm.min.dockerfile
vendored
1
acceptance/testdata/rpm.min.dockerfile
vendored
@ -3,3 +3,4 @@ ARG package
|
||||
COPY ${package} /tmp/foo.rpm
|
||||
RUN rpm -ivh /tmp/foo.rpm
|
||||
RUN rpm -e foo
|
||||
RUN rpm -qvl /tmp/foo.rpm | grep -E "root\s+root"
|
||||
|
@ -200,6 +200,8 @@ func addEmptyDirsRPM(info *nfpm.Info, rpm *rpmpack.RPM) {
|
||||
Name: dir,
|
||||
Mode: uint(040755),
|
||||
MTime: uint32(time.Now().Unix()),
|
||||
Owner: "root",
|
||||
Group: "root",
|
||||
},
|
||||
)
|
||||
}
|
||||
@ -265,6 +267,8 @@ func copyToRPM(rpm *rpmpack.RPM, src, dst string, config bool) error {
|
||||
Body: data,
|
||||
Mode: uint(info.Mode()),
|
||||
MTime: uint32(info.ModTime().Unix()),
|
||||
Owner: "root",
|
||||
Group: "root",
|
||||
}
|
||||
|
||||
if config {
|
||||
|
Loading…
Reference in New Issue
Block a user