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

[linux] Allow reproducible builds #94

Merged
merged 2 commits into from
Jun 7, 2020
Merged

Conversation

T4cC0re
Copy link
Contributor

@T4cC0re T4cC0re commented Jun 4, 2020

In a reproducible build all varied information is removed.
This patch does so, by checking if the standard SOURCE_DATE_EPOCH variable is set.
If it is, we are attempting a reproducible build and will strip varying information.

@eli-schwartz
Copy link

Thanks for working on this! Note that for reproducible builds we need to avoid embedding the time zone also, so that date call (for the SOURCE_DATE_EPOCH case) should also use -u.

See also "reading the variable": https://reproducible-builds.org/docs/source-date-epoch/

@T4cC0re
Copy link
Contributor Author

T4cC0re commented Jun 4, 2020

@eli-schwartz Thanks for noticing. I just pushed an amended commit with the fix.

@masatake masatake self-requested a review June 4, 2020 23:25
Copy link
Contributor

@masatake masatake left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you update 00DIST file?

@masatake
Copy link
Contributor

masatake commented Jun 4, 2020

@ lrosenman, I will merge this though testing on freebsd is failed because the change is nothing to do with other dialect than Linux.

@lrosenman
Copy link
Contributor

@masatake the FreeBSD CI is failed due to the Cirrus stuff using outdated images.
I'll see if I can figure out how to fix that for all 3 FreeBSD versions.

@masatake
Copy link
Contributor

masatake commented Jun 5, 2020

@lrosenman, thank you.

@T4cC0re
Copy link
Contributor Author

T4cC0re commented Jun 5, 2020

@masatake Is there a procedure to updating the 00DIST file? Or do I just edit it by hand?

@masatake
Copy link
Contributor

masatake commented Jun 5, 2020

@T4cC0re, please, edit the file by hand directly.

@T4cC0re
Copy link
Contributor Author

T4cC0re commented Jun 5, 2020

@masatake There is a Footnote in the bootom of the file with your name and a date. Should I change the date or leave it be?

@masatake
Copy link
Contributor

masatake commented Jun 5, 2020

Please, keep my name as is. Please, write what you did as an item like:


		[linux] fix a crash when printing the endpoint for unaccepted
		unix socket with +E option.
		This closes the github issue #74 reported by @jolmg.

The number of pull request (#94) and your name should be written in the item.

Updating 00CREDITS is ... my job.

@T4cC0re
Copy link
Contributor Author

T4cC0re commented Jun 5, 2020

@masatake I updated the 00DIST file, does that look good to you?

@masatake
Copy link
Contributor

masatake commented Jun 5, 2020

@T4cC0re, yes thank you. I will merge this, and we will make a release in ... a month.

@masatake masatake self-assigned this Jun 5, 2020
@masatake masatake mentioned this pull request Jun 5, 2020
7 tasks
@lrosenman
Copy link
Contributor

lrosenman commented Jun 5, 2020

The FreeBSD CI images are changed in master now, but until #97 is merged they will fail. This should be fine to merge.

@masatake
Copy link
Contributor

masatake commented Jun 6, 2020

@lrosenman, though you merged #97, the tests of this pull request are failed.
Are they expected?

@lrosenman
Copy link
Contributor

Yes, until I can get the kernel folks to look at the code and fix getting the executable and library names.

@masatake
Copy link
Contributor

masatake commented Jun 7, 2020

@lrosenman, I see. Thank you.
After updating 00CREDITS, I will merge this.

T4cC0re and others added 2 commits June 7, 2020 12:02
In a reproducible build all varied information is removed. This
patch does so, by checking if the standard
[SOURCE_DATE_EPOCH](https://reproducible-builds.org/specs/source-date-epoch/)
variable is set. If it is, we are attempting a reproducible build
and will strip varying information.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
@masatake masatake merged commit 39e54d8 into lsof-org:master Jun 7, 2020
@masatake
Copy link
Contributor

masatake commented Jun 7, 2020

@T4cC0re, thank you.

@bmwiedemann
Copy link

In openSUSE, we had
https://github.com/bmwiedemann/openSUSE/blob/master/packages/l/lsof/lsof-no-build-date-etc.patch from 2010 for reproducible-builds that will soon not be needed anymore, thanks to this patch.

masatake added a commit to masatake/lsof that referenced this pull request Oct 15, 2020
lsof-org#94 (comment)

    lrosenman commented on Jun 5

    @masatake the FreeBSD CI is failed due to the Cirrus stuff using outdated images.
    I'll see if I can figure out how to fix that for all 3 FreeBSD versions.

Till we find the way to update the images, disable the testing.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
masatake added a commit that referenced this pull request Oct 15, 2020
#94 (comment)

    lrosenman commented on Jun 5

    @masatake the FreeBSD CI is failed due to the Cirrus stuff using outdated images.
    I'll see if I can figure out how to fix that for all 3 FreeBSD versions.

Till we find the way to update the images, disable the testing.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
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.

5 participants