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

Detect Go binaries and skip some checks for them. #599

Closed

Conversation

marxin
Copy link
Contributor

@marxin marxin commented Jan 11, 2021

Fixes #598.

@Conan-Kudo
Copy link
Member

Does this make sense when Go binaries are built with standard Go macros? @jcajka, could you verify?

@jcajka
Copy link

jcajka commented Jan 11, 2021

I don't think outright disabling the checks makes sense(as they from quick look on the python check script make sense, even for Go, to me). IIRC we use in fedora pie build mode of Go. That will generate pie binaries. In the linked issue example it should AFAIK in default mode produce static binaries(in C sense). I don't remember from top of my head how "static" pie (elf) C binaries looks like but I would assume that Go ones will look the same. I will double check.

@jcajka
Copy link

jcajka commented Jan 11, 2021

Does this make sense when Go binaries are built with standard Go macros? @jcajka, could you verify?

@Conan-Kudo BTW do you remember to what and where are the "gobuildflags" set nowadays?

@jcajka
Copy link

jcajka commented Jan 11, 2021

Other issue, uh... more factor, might be that the CGO got disabled for the build of the binaries, IMO the rpmlint can't realistically cater for such manual fine tuning, on other hand should probably handle it more gracefully.

@marxin marxin force-pushed the detect-go-binaries branch 3 times, most recently from 751c9bc to 890758d Compare January 13, 2021 08:41
@marxin
Copy link
Contributor Author

marxin commented May 18, 2021

@Conan-Kudo What do you think about this pull request?

@Conan-Kudo
Copy link
Member

I'm not sure it makes sense to incorporate this into rpmlint, given @jcajka's feedback. Actually, I wonder if we might be doing something wrong in openSUSE that we're not getting PIE and debuginfo+build-ids enabled on Go builds there...

@marxin
Copy link
Contributor Author

marxin commented Jul 20, 2022

Ok, so taking the provided example from the bug and my analysis:
#598 (comment)

We report the following:

$ ./lint.py /tmp/example-1.0-1.utm.x86_64.rpm
...
example.x86_64: E: shared-library-without-dependency-information /usr/bin/example1
example.x86_64: E: shared-library-without-dependency-information /usr/bin/example2
...

So either the provided Go shared library is self-contained (does not link to any shared library) and it's fine or the error message is correct and we can close the reported issue?

What should I choose @jcajka ?

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.

E: shared-lib-without-dependency-information /usr/bin/xxx for GO binaries
3 participants