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: Fix deb file path prefixes and md5sums file #218

Merged
merged 3 commits into from Aug 24, 2020

Conversation

erikgeiser
Copy link
Member

This pull request is based on #217 and ensures that files inside .tar.gz files of deb packages adhere to the same path prefix convention as regular upstream Debian packages. I created this PR to fix the broken acceptance test in #217 which was caused by the fact that dpkg in Ubuntu Docker images is configured to ignore changelog files but ONLY if we adhere to the path prefix conventions that are introduced in the PR.

During debugging I also found a nasty bug when generating the md5sums file if a changelog is added that results in a broken md5sums file. I included the fix and corresponding test in this PR because the changes were all lumped together after I was done debugging. Sorry for the mess.

This patch ensures that all items contained in tar.gz files in Debian
packages have a relative path prefix, so the names all start with "./".
While this is not strictly required for a Debian package to function,
detecting a changed config file fails with an error messages similar to
the following:

    tar: ./etc/default/conffilename: Not found in archive

It seems to fail extracting config files for checking if they have been
modified by the system administrator.

All reference documentation that I was able to find (e.g. in the Debian
Handbook[1]) shows that all paths contained in either data.tar.gz and
control.tar.gz have the prefix "./".

I've verified that with this change, config files works as expected.

[1] https://debian-handbook.info/browse/stable/packaging-system.html#sect.binary-package-structure
@vercel
Copy link

vercel bot commented Aug 24, 2020

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/goreleaser/nfpm/6forwzino
✅ Preview: https://nfpm-git-fork-erikgeiser-fix-fix-tgz-path-prefix.goreleaser.vercel.app

@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Aug 24, 2020
@vercel vercel bot temporarily deployed to Preview August 24, 2020 18:59 Inactive
@codecov
Copy link

codecov bot commented Aug 24, 2020

Codecov Report

Merging #218 into master will decrease coverage by 0.01%.
The diff coverage is 56.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #218      +/-   ##
==========================================
- Coverage   69.00%   68.99%   -0.02%     
==========================================
  Files           7        7              
  Lines         926      932       +6     
==========================================
+ Hits          639      643       +4     
- Misses        178      179       +1     
- Partials      109      110       +1     
Impacted Files Coverage Δ
deb/deb.go 71.04% <56.66%> (-0.10%) ⬇️

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 0c25629...8e460e4. Read the comment docs.

@caarlos0 caarlos0 merged commit 59de11a into goreleaser:master Aug 24, 2020
@caarlos0
Copy link
Member

Thanks!

@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
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.

None yet

3 participants