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

deb: add override_dh_strip to disable stripping binaries #238

Closed
wants to merge 1 commit into from

Conversation

thaJeztah
Copy link
Member

We had this override in place for the docker engine packaging (https://github.com/docker/docker-ce-packaging/blob/4cd3a7eca2f7887b15e98c2e67be1880f337d291/deb/common/rules#L42-L43, and in upstream moby (before packaging was moved); https://github.com/moby/moby/blob/v1.10.0/hack/make/.build-deb/rules#L19-L21), and I noticed it was missing here. This looks still relevant though, so adding here as well.

Comment was taken from the https://github.com/git-lfs/git-lfs repository, which had a link with more information :)

We had this override in place for the docker engine packaging, and I noticed
it was missing here. This looks still relevant though, so adding here as well.

Comment was taken from the https://github.com/git-lfs/git-lfs repository,
which had a link with more information :)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@thaJeztah
Copy link
Member Author

@tianon @silvin-lubecki ptal

@tianon
Copy link
Contributor

tianon commented Jul 3, 2021

I think there was a discussion on this in runc recently, right? I think it was very relevant in Go 1.6 but may not actually be relevant anymore?

@thaJeztah
Copy link
Member Author

Oh, I might've missed that discussion. I was working on the other repository, and noticed that this one didn't have it. Then I also recalled some issues with armhf binaries at some point, and wondered if those could be related 😅

@tianon
Copy link
Contributor

tianon commented Jul 6, 2021

Yep, see opencontainers/runc#3054 (comment):

GNU strip used to break stack backtraces in Go programs, while -w would reduce the size of the binary without that problem (in fact there are some go-nuts threads from a long time ago where folks were told to not use GNU strip on Go binaries).

So, I think this should be fine to let dh_strip do its thing?

The issues with ARM binaries was with the static binaries (not the .deb packages); docker-library/docker#260

@thaJeztah
Copy link
Member Author

Ah, interesting.

Trying to find it that issue has any references (other than "Now, it seems that this is no longer the case" 😅). If true, I guess we can remove it from https://github.com/docker/docker-ce-packaging/blob/4cd3a7eca2f7887b15e98c2e67be1880f337d291/deb/common/rules#L42-L43 as well 🤔

@tianon
Copy link
Contributor

tianon commented Jul 8, 2021

A bit hard to search for, but I found http://dominik.honnef.co/posts/2016/10/go-and-strip/ which is full of a bunch of useful references that say "yes, stripping is fine (maybe unless you use gccgo)", especially https://groups.google.com/g/golang-dev/c/ABppMOjYP6w/m/2RXbcSQPAwAJ.

@thaJeztah thaJeztah closed this Mar 16, 2024
@thaJeztah thaJeztah deleted the no_strip branch March 16, 2024 16:29
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

2 participants