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

AdrianWennberg commented Aug 22, 2019

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

See #62

See #62
@AdrianWennberg

This comment has been minimized.

Copy link
Contributor Author

AdrianWennberg commented Aug 22, 2019

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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Contributor Author

AdrianWennberg commented Aug 23, 2019

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

This comment has been minimized.

Copy link

codecov-io commented Aug 23, 2019

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
4 checks passed
4 checks passed
WIP Ready for review
Details
codecov/patch Coverage not affected when comparing 76d7d4f...5f8a240
Details
codecov/project 71.68% remains the same compared to 76d7d4f
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@caarlos0

This comment has been minimized.

Copy link
Member

caarlos0 commented Aug 23, 2019

thanks for the contribution :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.