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

Reproducibility fixes #932

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Reproducibility fixes #932

wants to merge 4 commits into from

Conversation

sten0
Copy link

@sten0 sten0 commented May 4, 2023

Hello,

I'm a member of the Debian Multimedia Team, and we've recently applied these reproducibility fixes. Thanks to @vagrantc

I hope that you'll consider applying them to your tree as well.

Regards,
Nicholas

@falkTX
Copy link
Member

falkTX commented Jul 4, 2023

Please rebase against latest develop branch, github deprecated and removed macos-10.15 builders that we were still using, so macOS builds were not tested.

Changes look good to me, if it doesn't break mac builds then it should be good for merging.

@sten0
Copy link
Author

sten0 commented Jul 4, 2023 via email

@falkTX
Copy link
Member

falkTX commented Jul 4, 2023

jack2 is supported on macOS and FreeBSD, so it needs to work on those.
but in https://github.com/jackaudio/jack2/blob/develop/wscript#L835 we can see the manpages are only handled in Linux and FreeBSD.

@0EVSG do you have date --utc in FreeBSD? on macOS there is no such option, but mac tends to have old tools and maybe FreeBSD has that now?

@0EVSG
Copy link
Contributor

0EVSG commented Jul 4, 2023

There's date -u but no date --utc - it may be possible to install gnu utils from ports, didn't check.

@sten0
Copy link
Author

sten0 commented Jul 4, 2023 via email

@falkTX
Copy link
Member

falkTX commented Jul 4, 2023

That seems fine, even on macOS man date shows a -u option:

-u   Display or set the date in UTC (Coordinated Universal) time
% date -u
Tue Jul  4 14:47:32 UTC 2023

@dvzrv as last check, since you handled the man page stuff before, do you see any potential issues with these changes?

@0EVSG
Copy link
Contributor

0EVSG commented Jul 4, 2023

Thanks! date -u is even POSIX standard, just looked it up.
We're lucky to have so many standards and best practices to choose from :)

@vagrantc
Copy link

vagrantc commented Jul 4, 2023

I believe BSD style date also has a different invocation for using SOURCE_DATE_EPOCH.

https://reproducible-builds.org/docs/source-date-epoch/ has an example that should work with at least GNU date and BSD date:

DATE_FMT="+%Y-%m-%d"
SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}"
BUILD_DATE=$(date -u -d "@$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "$DATE_FMT" 2>/dev/null || date -u "$DATE_FMT")

@0EVSG
Copy link
Contributor

0EVSG commented Jul 6, 2023

@vagrantc you're right, there's no --date argument either for FreeBSD date, but -r is supported.

If I read correctly, we only hit this code when SOURCE_DATE_EPOCH is set. Which is not the case at the moment. And I don't know of any significant efforts towards reproducible builds on any *BSD. No idea about macOS.

Still, it might be easier to do this in a portable fashion right now, than to deal with possible fallout in the future.

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.

4 participants