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

feat: custom packager configuration for rpm pkg #409

Merged
merged 1 commit into from Nov 30, 2021

Conversation

crazy-max
Copy link
Member

Atm rpm Packager uses the maintainer value which is sometimes not true when another entity wants to redistribute a package:

#
# Example spec file for cdplayer app...
#
Summary: A CD player app that rocks!
Name: cdplayer
Version: 1.0
Release: 1
License: GPL
Group: Applications/Sound
Source: ftp://ftp.gnomovision.com/pub/cdplayer/cdplayer-1.0.tgz
URL: http://www.gnomovision.com/cdplayer/cdplayer.html
Distribution: WSS Linux
Vendor: White Socks Software, Inc.
Packager: Santa Claus <sclaus@northpole.com>

%description
It slices!  It dices!  It's a CD player app that
can't be beat.  By using the resonant frequency
of the CD itself, it is able to simulate 20X
oversampling.  This leads to sound quality that
cannot be equaled with more mundane software...

The vendor line identifies the organization that distributes the software. Maintaining our fictional motif, we've invented fictional company, White Socks Software, to add to our spec file. Individuals will probably omit this as well.

The packager line is used to identify the organization that actually packaged the software, as opposed to the author of the software. In our example, we've chosen the greatest packager of them all, Santa Claus, to work at White Socks Software. Note that we've included contact information, in the form of an e-mail address.

This PR allows to customize this field and also to expand env var for it.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Nov 30, 2021
@vercel vercel bot temporarily deployed to Preview November 30, 2021 16:30 Inactive
@codecov
Copy link

codecov bot commented Nov 30, 2021

Codecov Report

Merging #409 (6395411) into main (1de9194) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #409      +/-   ##
==========================================
+ Coverage   66.18%   66.19%   +0.01%     
==========================================
  Files          15       15              
  Lines        1854     1855       +1     
==========================================
+ Hits         1227     1228       +1     
  Misses        488      488              
  Partials      139      139              
Impacted Files Coverage Δ
nfpm.go 86.29% <100.00%> (+0.06%) ⬆️
rpm/rpm.go 69.05% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1de9194...6395411. Read the comment docs.

@crazy-max
Copy link
Member Author

Looks like there is an issue on the Windows runner: https://github.com/goreleaser/nfpm/runs/4370360116?check_suite_focus=true#step:7:8

task: [test] go test  -failfast -race -coverpkg=./... -covermode=atomic -coverprofile=coverage.txt ./... -run . -timeout=5m
# runtime/cgo
cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%
FAIL	github.com/goreleaser/nfpm/v2 [build failed]
FAIL	github.com/goreleaser/nfpm/v2/apk [build failed]
FAIL	github.com/goreleaser/nfpm/v2/deb [build failed]
FAIL	github.com/goreleaser/nfpm/v2/deprecation [build failed]
FAIL	github.com/goreleaser/nfpm/v2/files [build failed]
FAIL	github.com/goreleaser/nfpm/v2/internal/glob [build failed]
FAIL	github.com/goreleaser/nfpm/v2/internal/sign [build failed]
FAIL	github.com/goreleaser/nfpm/v2/rpm [build failed]
task: Failed to run task "test": exit status 2
Error: Process completed with exit code 1.

Copy link
Contributor

@djgilcrease djgilcrease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

rpm/rpm.go Outdated Show resolved Hide resolved
@vercel vercel bot temporarily deployed to Preview November 30, 2021 18:36 Inactive
@caarlos0 caarlos0 merged commit 9570f52 into goreleaser:main Nov 30, 2021
@caarlos0 caarlos0 added this to the 2.11.0 milestone Nov 30, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants