goreleaser / nfpm

nFPM is Not FPM - a simple deb, rpm, apk, ipk, and arch linux packager written in Go
https://nfpm.goreleaser.com/
MIT License
2.14k stars 156 forks source link

RPM cpio name contains the release twice #714

Closed WeirdBob closed 11 months ago

WeirdBob commented 11 months ago

What happened?

Hi, in v2.33.0, there is a new bug regarding the generation of an RPM. using the minimal description file attached, the generated RPM is called test-1.2.3-1.x86_64.rpm (correct) but contains test-1.2.3-1-1.x86_64.cpio (not correct, release is used twice). With v2.32.0, the rpm and cpio are correctly named.

How can we reproduce this?

test.yaml :

name: "test"
version: 1.2.3
contents:
  - src: test
    dst: test

go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.33.0 nfpm pkg --config test.yaml --packager rpm

nfpm version

_____ ____  __  __
 _ __ |  ___|  _ \|  \/  |
| '_ \| |_  | |_) | |\/| |
| | | |  _| |  __/| |  | |
|_| |_|_|   |_|   |_|  |_|
nfpm: a simple and 0-dependencies deb, rpm, apk and arch linux packager written in Go
https://nfpm.goreleaser.com

GitVersion:    dev
GitCommit:     unknown
GitTreeState:  unknown
BuildDate:     unknown
BuiltBy:       unknown
GoVersion:     go1.21.1
Compiler:      gc
ModuleSum:     h1:yBv6jgkPwih4va/S42rceSjJ2Znt3Og/Ntc76oP0tfI=
Platform:      windows/amd64

Search

Code of Conduct

Additional context

No response

atc0005 commented 11 months ago

See also:

I too noticed the behavior described in this GH issue (#714), but wasn't sure if the behavior was intended.

caarlos0 commented 11 months ago

releasing a patch rn

caarlos0 commented 11 months ago

thanks for reporting :D