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

WIP: triblerd docker build sys for linux #5258

Closed
wants to merge 1 commit into from
Closed

WIP: triblerd docker build sys for linux #5258

wants to merge 1 commit into from

Conversation

hbiyik
Copy link

@hbiyik hbiyik commented Mar 30, 2020

This script provides a sterile way of generating headless tribler daemon using containers.
The container is based on manylinux1 (https://www.python.org/dev/peps/pep-0513/#the-manylinux1-policy) abi compatability to satisfy broadrange of linux distrubtion systems.

Only dependecy generated by the executable is glibc v2.5 and zlin. zlib is alreay bundled in the executable. The complier used in he container is gcc 4.8.2.

0x00000001 (NEEDED) Shared Library: [libdl.so.2]
0x00000001 (NEEDED) Shared Library: [libz.so.1] (Bundled in the executable)
0x00000001 (NEEDED) Shared Library: [libc.so.6]

The basis for the container can be found at (https://github.com/hbiyik/shared-manylinux1) which is a fork of original manylinux1 repo with python to be compiled shared libraries enabled.

To use the script you need docker installed inn your system. Then simply run the script.

First Results:
Drop that below nasty 45MB of binary to any linux distro and it will work.

https://github.com/hbiyik/repository.biyik/blob/master/plugin.program.tribler/bin/manylinux1-x86/triblerd?raw=true

@tribler-ci
Copy link
Contributor

Can one of the admins verify this patch?

@ghost
Copy link

ghost commented Mar 30, 2020

Congratulations 🎉. DeepCode analyzed your code in 2.79 seconds and we found no issues. Enjoy a moment of no bugs ☀️.

👉 View analysis in DeepCode’s Dashboard

@sonarcloud
Copy link

sonarcloud bot commented Mar 30, 2020

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@hbiyik
Copy link
Author

hbiyik commented Mar 30, 2020

I was too sleepy to mention, of course not only kodi is the target here also all kind of embeddded platforms are a use case for this.

Copy link
Contributor

@devos50 devos50 left a comment

Choose a reason for hiding this comment

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

Nice contribution! Thank you!

I think this PR needs some more changes, in particular, the triblerd.spec file. It seems that it is inspired/copied from tribler.spec, which is probably going to lead to code duplication across these two spec files. Therefore, if we make a change in one file, there is a risk that we forget to update its counterpart. Could we combine these files somehow (since I think the diff between these two files is rather small), and use a flag to indicate whether we should build Tribler in headless mode or not?

That also reminds me of another thing. We should include the Dockerfile to build a Docker container of Tribler in this repository. It is currently in another repository.

@hbiyik
Copy link
Author

hbiyik commented Mar 30, 2020

Hello

I pushed this PR just to show the approach and I agree with the duplicate spec files are lame.

Do you think I should rely on

if 'CORE_PROCESS' in os.environ:
CORE_PROCESS env variable which is used for android (afaik) and not even related to PyInstaller (afaik) or should I create a new env variable like CORE_DAEMON. I prefer to have different variable just to be on the safe side.

Also I agree with the docker files but I will leave this task to the end which is very time demanding and cancerous for me.

I also need to create another docker for ARM probably with arm_v6 only that will work with all arms.

But i need to understand some versioning dependecies with openssl & libtorrent.

Long story short this 2 are hard to make uniform for all bindings (including python itself as well) is there already agreed upon versions of them. Currently I am using libtorrent 1.1.5 which has issues with OpenSSL 1.1.1 and seem to work with OpenSSL 1.0.1 (at least for i386), also cryptography does not work with SSL 1.0.1 and needs SSL 1.1.1, so I would aprreciate either an update libtorrent may be 1.2.x and OpenSSL?

@hbiyik
Copy link
Author

hbiyik commented Mar 31, 2020

Any comment on openssl and libtorrent versions?

@hbiyik hbiyik closed this Apr 2, 2020
@hbiyik hbiyik deleted the triblerd branch June 19, 2020 10:45
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

3 participants