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

fix(deb): content file modes to support gdebi #904

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

erikgeiser
Copy link
Member

This PR fixes the file/dir modes in the .deb data tar headers. When creating directory entries based on actual on-disk directories, their modes ended up including some flags that confused graphical package manager frontends (Software Install and gdebi). With this PR, the mode field in the tar header only contains the permissions, because other type information is already included in other header fields.

Fixes #856.

@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 4, 2025
Copy link

codecov bot commented Feb 4, 2025

Codecov Report

Attention: Patch coverage is 50.00000% with 42 lines in your changes missing coverage. Please review.

Project coverage is 69.40%. Comparing base (f9d9d19) to head (70e8c90).
Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
deb/deb.go 49.39% 33 Missing and 9 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #904      +/-   ##
==========================================
- Coverage   70.03%   69.40%   -0.63%     
==========================================
  Files          22       22              
  Lines        3080     3131      +51     
==========================================
+ Hits         2157     2173      +16     
- Misses        718      745      +27     
- Partials      205      213       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@erikgeiser erikgeiser force-pushed the fix_deb_file_modes branch 2 times, most recently from 067a99a to 3328717 Compare February 4, 2025 20:37
@erikgeiser
Copy link
Member Author

I'll deal with the failing acceptance test tomorrow.

@erikgeiser erikgeiser force-pushed the fix_deb_file_modes branch 2 times, most recently from 9619751 to ad400e5 Compare February 5, 2025 07:34
@erikgeiser
Copy link
Member Author

I accidentally broke mod time handling but it is fixed now.

deb/deb.go Show resolved Hide resolved
Copy link
Member

@caarlos0 caarlos0 left a comment

Choose a reason for hiding this comment

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

aside for that one comment, lgmt

thanks for looking into this @erikgeiser 🙏

@caarlos0 caarlos0 changed the title Fix: deb: Fix content file modes to support gdebi, etc. fix(deb): content file modes to support gdebi, etc. Feb 5, 2025
@caarlos0 caarlos0 changed the title fix(deb): content file modes to support gdebi, etc. fix(deb): content file modes to support gdebi Feb 5, 2025
@pull-request-size pull-request-size bot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 5, 2025
@erikgeiser
Copy link
Member Author

Good find. I took the time to refactor the function to avoid shadowing altogether and use the opportunity to add better error messages unique to each case.

@caarlos0 caarlos0 merged commit 38a851d into goreleaser:main Feb 5, 2025
46 of 48 checks passed
@caarlos0
Copy link
Member

caarlos0 commented Feb 5, 2025

amazing, thank you @erikgeiser ❤️

@github-actions github-actions bot added this to the 2.38.0 milestone Feb 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

type: tree creates issues in deb packages
2 participants