1
1
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:
Carlos Alexandro Becker 2020-01-15 16:23:05 -03:00 committed by GitHub
parent 30eb8de17a
commit 60adb12ef3
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

@ -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 {