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

release: build with consistent paths #13552

Merged
merged 1 commit into from Nov 21, 2022

Conversation

dbussink
Copy link
Contributor

This changes the builds to always add -trimpath which removes specific build time paths from the binary (like current directories etc).

Improves build reproducability to make the final binary independent from the specific build path.

Lastly, when stripping debug symbols, also add -w to strip DWARF symbols as well which aren't needed in that case either.

Found this when doing #13545 and thought that maybe these additional changes would also be welcome.

@dbussink
Copy link
Contributor Author

Is this something that there's any interest in?

@dbussink
Copy link
Contributor Author

I have rebased this branch since there were conflicts with main.

@codecov-commenter
Copy link

codecov-commenter commented Feb 18, 2022

Codecov Report

Merging #13552 (4b41f74) into main (4b41f74) will not change coverage.
The diff coverage is n/a.

❗ Current head 4b41f74 differs from pull request most recent head 830afdb. Consider uploading reports for the commit 830afdb to get more accurate results

@@           Coverage Diff           @@
##             main   #13552   +/-   ##
=======================================
  Coverage   75.17%   75.17%           
=======================================
  Files         452      452           
  Lines       36770    36770           
=======================================
  Hits        27643    27643           
  Misses       7393     7393           
  Partials     1734     1734           
Flag Coverage Δ
all 75.17% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4b41f74...830afdb. Read the comment docs.

@stale
Copy link

stale bot commented Jun 11, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 11, 2022
@stale stale bot removed the stale label Jun 11, 2022
@dbussink
Copy link
Contributor Author

I have rebased this branch since there were conflicts with main.

Have done this again, is there interest in this or should I close it?

@stale
Copy link

stale bot commented Sep 20, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@dbussink
Copy link
Contributor Author

dbussink commented Oct 1, 2022

Have done this again, is there interest in this or should I close it?

I have updated again, but still have the same question 😄.

@serathius
Copy link
Member

Thanks for your resilience, sorry that the PR got lost.

Looks like you haven't signed the commit. I would like to include this in latest release so let me fix that.

@dbussink
Copy link
Contributor Author

Looks like you haven't signed the commit. I would like to include this in latest release so let me fix that.

Ah, I think maybe that's new since this originally was opened? I can update the PR here and do that.

@serathius
Copy link
Member

@dbussink Would be great if you add a signoff like bd6b435

Just add Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com> to end of commit message.

Copy link
Member

@serathius serathius left a comment

Choose a reason for hiding this comment

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

LGTM, this change removes build GOPATH from binary strings, which is important for release scripts.

This changes the builds to always add -trimpath which removes specific
build time paths from the binary (like current directories etc).

Improves build reproducability to make the final binary independent from
the specific build path.

Lastly, when stripping debug symbols, also add -w to strip DWARF symbols
as well which aren't needed in that case either.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
@dbussink
Copy link
Contributor Author

@serathius Rebased and added the signature!

@serathius serathius merged commit 16862fa into etcd-io:main Nov 21, 2022
@dbussink dbussink deleted the small-build-improvement branch November 21, 2022 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

None yet

3 participants