Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nfpm RPMs cause rpm2cpio to silently error #341

Closed
mharvey-jt opened this issue Jun 8, 2021 · 4 comments
Closed

nfpm RPMs cause rpm2cpio to silently error #341

mharvey-jt opened this issue Jun 8, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@mharvey-jt
Copy link

mharvey-jt commented Jun 8, 2021

Hello,

I've found that RPMs generated by nfpm can be successfully unpacked by rpm2cpio, but that tool silently errors with a non-zero exit code. Steps to repo:

$go install github.com/goreleaser/nfpm/cmd/nfpm@latest
$ echo '
name: "foo"
arch: "amd64"
platform: "linux"
version: "v1.0.0"
section: "default"
priority: "extra"
files:
  /etc/redhat-release: "/etc/redhat-release"
' > nfpm.yaml

$ nfpm pkg -p rpm -f nfpm.yaml
$ rpm2cpio foo-1.0.0.x86_64.rpm   > /dev/null
$ echo $?
1

Expectation is that rpm2cpio exits with 0. Confirmed that this is so with a similar RPM built with fpm

This occurs with the RHEL7 distro rpm and also upstream latest 4.16.1.3.

The proximal source of the error in rpm2cpio.c is that the payload size as determined from the RPM header does not match the actual size as returned from ufdCopy()

@caarlos0 caarlos0 added the bug Something isn't working label Jun 8, 2021
@mharvey-jt
Copy link
Author

This is an issue in https://github.com/google/rpmpack, so will close this and move it there.

@caarlos0
Copy link
Member

did you open an issue there as well so we can keep track?

@caarlos0
Copy link
Member

oh, this one I assume google/rpmpack#60

@github-actions
Copy link
Contributor

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 10, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants