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

Introduction of reproducible builds causes Lintian to throw package-contains-ancient-file errors for directories #757

Closed
2 tasks done
christian-stephen opened this issue Dec 21, 2023 · 3 comments · Fixed by #758
Assignees
Labels
bug Something isn't working

Comments

@christian-stephen
Copy link

christian-stephen commented Dec 21, 2023

What happened?

In v2.35.0, the introduction of reproducible builds appears to cause Lintian to throw package-contains-ancient-file errors for directories created by nfpm, due to it defaulting to zero (epoch).

I thought I could get around this by specifying the mtime in the nfpm configuration, but this doesn't seem to work. I see that the mtime appears hardcoded in some places that may be related to this.

I could ignore this error in .lintian-overrides, but this wasn't an issue before.

How can we reproduce this?

Define an nfpm config with something along the following:

mtime: 2023-12-21
contents:
  - src: ./config.yml
    dst: /etc/my-app/config.yml
    type: "config|noreplace"

Install Lintian per the nfpm docs' recommendation (I'm on Lintian v2.114.0ubuntu1.3), and run:

lintian --fail-on error --no-tag-display-limit /path/to/deb

Observe package-contains-ancient-file errors, like this:

E: my-app: package-contains-ancient-file etc/ 1970-01-01

nfpm version

_____ ____  __  __
 _ __ |  ___|  _ \|  \/  |
| '_ \| |_  | |_) | |\/| |
| | | |  _| |  __/| |  | |
|_| |_|_|   |_|   |_|  |_|
nfpm: a simple and 0-dependencies deb, rpm, apk and arch linux packager written in Go
https://nfpm.goreleaser.com

GitVersion:    dev
GitCommit:     unknown
GitTreeState:  unknown
BuildDate:     unknown
BuiltBy:       unknown
GoVersion:     go1.21.5
Compiler:      gc
ModuleSum:     h1:rUUc2TdsJ1rSAy09X25ilBqDfAp7/MzUQIKsAfYbqWs=
Platform:      linux/amd64

Search

  • I did search for other open and closed issues before opening this.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Additional context

This issue seems related: #750

@christian-stephen christian-stephen added the bug Something isn't working label Dec 21, 2023
@caarlos0
Copy link
Member

ah, good catch, will fix that, thanks

caarlos0 added a commit that referenced this issue Dec 21, 2023
@caarlos0 caarlos0 mentioned this issue Dec 21, 2023
@caarlos0
Copy link
Member

can you try with #758?

@christian-stephen
Copy link
Author

can you try with #758?

Thanks! I'll give it a try and report back.

caarlos0 added a commit that referenced this issue Dec 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants