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

mono-5.16 release contains object files in release tar #11501

Closed
RealDolos opened this issue Nov 1, 2018 · 2 comments · Fixed by #11509

Comments

@RealDolos
Copy link

@RealDolos RealDolos commented Nov 1, 2018

The official release tar for the stable channel at
https://download.mono-project.com/sources/mono/mono-5.16.0.179.tar.bz2
contains in external/corefx/src/Native/Unix/System.Native/ various object and other build files that have no business being included.
The presence of the object files (along with the .dirstamp) makes the build system not actually rebuild the files, but instead it will try to use and link the object files from the tar.

$ tar tjf mono-5.16.0.179.tar.bz2 | grep -e '.*\.o$'
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/libmono_system_native_la-pal_random.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/libmono_system_native_la-pal_networking.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/libmono_system_native_la-pal_memory.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/libmono_system_native_la-pal_maphardwaretype.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/libmono_system_native_la-pal_io.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/.libs/libmono_system_native_la-pal_random.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/.libs/libmono_system_native_la-pal_networking.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/.libs/libmono_system_native_la-pal_memory.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/.libs/libmono_system_native_la-pal_maphardwaretype.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/.libs/libmono_system_native_la-pal_io.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/.libs/libmono_system_native_la-pal_errno.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/.libs/libmono_system_native_la-pal_networkstatistics.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/.libs/libmono_system_native_la-pal_tcpstate.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/libmono_system_native_la-pal_errno.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/libmono_system_native_la-pal_networkstatistics.o
mono-5.16.0.179/external/corefx/src/Native/Unix/System.Native/libmono_system_native_la-pal_tcpstate.o

This is most probably a simple mistake by whoever packaged the release tar, but there is also an ever so slight possibility of something malicious going on.

Since I am building mono on a platform not compatible to the object files (the tarred object files are ELF 64-bit LSB relocatable, x86-64), make eventually rightfully failed with the linker complaining about incompatible object files.

@marek-safar

This comment has been minimized.

Copy link
Member

@marek-safar marek-safar commented Nov 1, 2018

It looks like we have a broad filter for the tar

/cc @directhex

@directhex

This comment has been minimized.

Copy link
Contributor

@directhex directhex commented Nov 1, 2018

Yeah, so here's the problem:

EXTRA_DIST= \
[...]
        external                \

make dist is including the world from external, but make in mono.native causes object files to be created in ../../external/corefx/src/Native/Unix/System.Native/

We can add some housekeeping to dist-hook to purge all .o files and .libs directories from external/ (we already do .exe/.dll) to try and guard against this.

directhex added a commit to directhex/mono that referenced this issue Nov 1, 2018
monojenkins added a commit to monojenkins/mono that referenced this issue Mar 1, 2019
akoeplinger added a commit that referenced this issue Mar 2, 2019
…3256)

* Clean up .o files from System.Native during `make dist`

Closes: #11501

* Delete more useless binary cruft from `make dist`
jonpryor added a commit to xamarin/xamarin-android that referenced this issue Mar 7, 2019
monojenkins added a commit to monojenkins/mono that referenced this issue Apr 23, 2019
marek-safar added a commit that referenced this issue Apr 24, 2019
…4185)

* Clean up .o files from System.Native during `make dist`

Closes: #11501

* Delete more useless binary cruft from `make dist`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.