Skip to content

Fix path in Debian md5sums file#1052

Merged
caarlos0 merged 1 commit intogoreleaser:mainfrom
Flood1993:fix_deb_md5sums_path
Mar 14, 2026
Merged

Fix path in Debian md5sums file#1052
caarlos0 merged 1 commit intogoreleaser:mainfrom
Flood1993:fix_deb_md5sums_path

Conversation

@Flood1993
Copy link
Contributor

When packaging a Debian file, I noticed:

$ cat /var/lib/dpkg/info/<my-pkg>.md5sums
d53cafdbafeaa62df89f21a80ccb7c1e  ./etc/<my-pkg>/<some-file>.yml

From the Debian md5sums manpages:

This file contains a list of MD5 digests (as 32 case-insensitive
hexadecimal characters) followed by two spaces (U+0020 SPACE) and
the absolute pathname of a plain file, one per line.

Trailing slashes (U+002F /) in the pathname will be trimmed.
Neither trailing whitespace nor empty or whitespace-only
lines are accepted.

So, a proper file should contain lines like (note no ./):

d53cafdbafeaa62df89f21a80ccb7c1e  etc/<my-pkg>/<some-file>.yml

I do not know Go but I was able to come up with this fix which works at least for my use case.

@pull-request-size pull-request-size bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 13, 2026
When packaging a Debian file, I noticed:

```bash
$ cat /var/lib/dpkg/info/<my-pkg>.md5sums
d53cafdbafeaa62df89f21a80ccb7c1e  ./etc/<my-pkg>/<some-file>.yml
```

From the [Debian md5sums manpages](https://manpages.debian.org/testing/dpkg-dev/deb-md5sums.5.en.html):

> This file contains a list of MD5 digests (as 32 case-insensitive
> hexadecimal characters) followed by two spaces (U+0020 SPACE) and
> the absolute pathname of a plain file, one per line.
>
> Trailing slashes (U+002F /) in the pathname will be trimmed.
> Neither trailing whitespace nor empty or whitespace-only
> lines are accepted.

So, a proper file should contain lines like (note no `./`):

```
d53cafdbafeaa62df89f21a80ccb7c1e  etc/<my-pkg>/<some-file>.yml
```

I do not know Go but I was able to come up with this fix which
works at least for my use case.
@Flood1993 Flood1993 force-pushed the fix_deb_md5sums_path branch from 5e5e6a4 to ba95f3e Compare March 13, 2026 17:20
@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 73.05%. Comparing base (532c31d) to head (ba95f3e).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
deb/deb.go 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1052   +/-   ##
=======================================
  Coverage   73.05%   73.05%           
=======================================
  Files          22       22           
  Lines        2576     2576           
=======================================
  Hits         1882     1882           
  Misses        480      480           
  Partials      214      214           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@caarlos0 caarlos0 merged commit 66fa3f7 into goreleaser:main Mar 14, 2026
54 of 55 checks passed
@caarlos0
Copy link
Member

thanks!

@github-actions github-actions bot added this to the 2.38.0 milestone Mar 14, 2026
caarlos0 added a commit that referenced this pull request Mar 15, 2026
refs #1052

Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants