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: Add option for RPM compression type #63

Merged
merged 2 commits into from
Aug 23, 2019

Conversation

AdrianWennberg
Copy link
Contributor

Allows you to choose between gzip, xz, and lzma as the RPM compression type.

See #62

@AdrianWennberg
Copy link
Contributor Author

Here's the documentation comment from /usr/lib/rpm/macros on my system for reference:

#       Compression type and level for source/binary package payloads.
#               "w9.gzdio"      gzip level 9 (default).
#               "w9.bzdio"      bzip2 level 9.
#               "w6.xzdio"      xz level 6, xz's default.
#               "w7T16.xzdio"   xz level 7 using 16 thread (xz only)
#               "w6.lzdio"      lzma-alone level 6, lzma's default
#
#%_source_payload       w9.gzdio
#%_binary_payload       w9.gzdio

@caarlos0
Copy link
Member

caarlos0 commented Aug 22, 2019

can we default to one of them?

also would be nice to have tests covering this if you can :)


thanks for the contribution btw 🙏

@AdrianWennberg
Copy link
Contributor Author

It currently defaults to whatever your system defaults to, which I feel should be the default behavior, since most people are not going to want to override it. Also adding a default would change the behavior for people already using nfpm, unless they specify their own default.

I'll try to add some acceptance tests.

@codecov-io
Copy link

Codecov Report

Merging #63 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #63   +/-   ##
=======================================
  Coverage   71.68%   71.68%           
=======================================
  Files           5        5           
  Lines         498      498           
=======================================
  Hits          357      357           
  Misses         87       87           
  Partials       54       54
Impacted Files Coverage Δ
nfpm.go 89.65% <ø> (ø) ⬆️
rpm/rpm.go 73.41% <ø> (ø) ⬆️

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 76d7d4f...5f8a240. Read the comment docs.

@caarlos0 caarlos0 merged commit c17636c into goreleaser:master Aug 23, 2019
@caarlos0
Copy link
Member

thanks for the contribution :D

@caarlos0
Copy link
Member

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

@goreleaser goreleaser locked as resolved and limited conversation to collaborators Nov 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants