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

Replace BUILD_TIME with SOURCE_DATE_EPOCH for reproduceable builds #4221

Closed
ainar-g opened this issue Jan 28, 2022 · 2 comments
Closed

Replace BUILD_TIME with SOURCE_DATE_EPOCH for reproduceable builds #4221

ainar-g opened this issue Jan 28, 2022 · 2 comments
Assignees
Labels
Milestone

Comments

@ainar-g
Copy link
Contributor

ainar-g commented Jan 28, 2022

Currently, we compile in the date of the build. And we compile it in as plain text.

Reproducible-Builds.org recommends using the commit date instead, given through the environment variable SOURCE_DATE_EPOCH and as a Unix timestamp. This should improve the life of people building their own AGH, such as package maintainers, since this will only require a shallow clone of the repo and the “correct” Go version to build a bit-by-bit identical copy of a binary.

The documentation in scripts/README.md obviously should be updates as well.

@jamesmacwhite, @yurivict, @simonbcn, if I recall correctly, you maintain AdGuard Home packages? Do you have any objections to this?

@ainar-g ainar-g added this to the v0.108.0 milestone Jan 28, 2022
@ainar-g ainar-g self-assigned this Jan 28, 2022
@jamesmacwhite
Copy link

@ainar-g Thanks for this. I've contributed to the AdGuardHome package in OpenWrt, but I am not the primary maintainer of it, so I'm probably not the best person to speak for the OpenWrt package as a whole.

I'd imagine this relates to the Makefile and how they are being used when compiling in OpenWrt.

@ainar-g
Copy link
Contributor Author

ainar-g commented Feb 1, 2022

If we're doing this, we'll probably need to change the BUILD_DATE argument inside the Dockerfile as well.

Disregard that. The BUILD_DATE parameter in the Dockerfile is the actual build time for the Open Container Initiative labels.

@adguard adguard closed this as completed in 0ee3453 Feb 1, 2022
@ainar-g ainar-g modified the milestones: v0.108.0, v0.107.7 Jun 2, 2022
heyxkhoa pushed a commit to heyxkhoa/AdGuardHome that referenced this issue Mar 20, 2023
Closes AdguardTeam#4221.

Squashed commit of the following:

commit c84a569
Author: Ainar Garipov <A.Garipov@AdGuard.COM>
Date:   Tue Feb 1 21:13:30 2022 +0300

    all: switch to SOURCE_DATE_EPOCH for source date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants