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

Please make the manpages reproducible #345

Conversation

lamby
Copy link
Contributor

@lamby lamby commented Apr 21, 2018

Whilst working on the Reproducible Builds effort, we noticed that corosync could not be built reproducibly.

This is because, whilst it uses SOURCE_DATE_EPOCH, the output varies depending on the current timezone.

This was originally filed in Debian as #896441.

@knet-ci-bot
Copy link

Can one of the admins verify this patch?

@wferi
Copy link
Contributor

wferi commented Apr 21, 2018

Thanks, Chris, absolutely true, I omitted this from 14d251d by mistake. I vote for merging this fix.

Aside: this won't work on BSD, even the current code wouldn't: the -u and -d options are specific to GNU date. It isn't apparent in CI because Jenkins does not export SOURCE_DATE_EPOCH. An ad-hoc solution is given at https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell, a more elaborate one in kronosnet/kronosnet#143. I'm willing to put something together along those lines if the project lead agrees.

@lamby
Copy link
Contributor Author

lamby commented Apr 21, 2018

👍 :)

@fabbione
Copy link
Member

Feri, corosync and knet do share a great deal of code and build facilities around (beside it´s the same people managing the 2 projects ;) ). There is a good 90% chance that a bug in one build system affects the other ;) I think it´s fine to port the knet patch to corosync,

@jfriesse
Copy link
Member

@wferi: -u seems to be supported in Free/Net/OpenBSD (I don't think we really care about other implementations).

Because current code is using -d it's not compatible with BSD systems, so patch is not making things worse.

I have a question. Is there anything bad on An ad-hoc solution is given at https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell? It looks like quite simple compared to ax_prog_date.m4.

@lamby
Copy link
Contributor Author

lamby commented Apr 23, 2018

I have a question. Is there anything bad on An ad-hoc solution is given at https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell? It looks like quite simple compared to ax_prog_date.m4.

Can't parse this, sorry. Can you help? :)

@jfriesse
Copy link
Member

jfriesse commented Apr 23, 2018

@lamby Yep.

Is anything bad on solution described in the link https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell?

Or other way around. What advantages has using the ax_prog_date.m4 instead of solution described in the debian wiki link?

@wferi
Copy link
Contributor

wferi commented Apr 23, 2018

I don't think there's anything bad with it if you only use it once. If you want to use the date utility several times at different locations, then doing the checks once starts to make sense.

@jfriesse
Copy link
Member

@wferi Ok, thank you for the reply. So I would say that because we have only one place where date is called we can stick with solution@debian wiki.

@lamby Would you mind to rework your patch in a way stated at https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal#Bash_.2F_POSIX_shell ?

Whilst working on the Reproducible Builds effort [0], we noticed
that corosync could not be built reproducibly.

This is because, whilst it uses SOURCE_DATE_EPOCH[1], the output
varies depending on the current timezone.

(The LC_ALL is not needed as we only use %Y-%m-%d)

This was originally filed in Debian as #896441.

 [0] https://reproducible-builds.org/
 [1] https://reproducible-builds.org/specs/source-date-epoch/
 [2] https://bugs.debian.org/896441
@lamby lamby force-pushed the 896441-corosync-please-make-the-build-reproducible branch from fcddd0d to 7833904 Compare April 23, 2018 16:10
@lamby
Copy link
Contributor Author

lamby commented Apr 23, 2018

@jfriesse Done :)

@jfriesse
Copy link
Member

@lamby: Nice patch so ACK and merged as 82b8199 (master) and 06ef44f (needle).

Thank you for the patch!

@jfriesse jfriesse closed this Apr 25, 2018
@lamby
Copy link
Contributor Author

lamby commented Apr 25, 2018

Thanks :)

@lamby lamby deleted the 896441-corosync-please-make-the-build-reproducible branch April 25, 2018 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants