shadowsocks-libev icon indicating copy to clipboard operation
shadowsocks-libev copied to clipboard

Binary releases?

Open riobard opened this issue 9 years ago • 36 comments

Is there any plan to offer binary releases for common platforms (e.g. Linux x64)?

riobard avatar Mar 14 '17 18:03 riobard

All the binary distributions are maintained by downstreams:

Debian: https://packages.debian.org/sid/shadowsocks-libev Ubuntu: https://launchpad.net/ubuntu/+source/shadowsocks-libev Arch Linux: https://www.archlinux.org/packages/community/i686/shadowsocks-libev/ Homebrew: https://github.com/Homebrew/homebrew-core/blob/master/Formula/shadowsocks-libev.rb

madeye avatar Mar 15 '17 02:03 madeye

Thanks!

Debian and Ubuntu dists seem to be outdated. Any way to get latest version binaries?

riobard avatar Mar 15 '17 05:03 riobard

I think @rogers0 is already working on this. It should take a while to get the code review passed.

madeye avatar Mar 15 '17 05:03 madeye

If I understand you correctly, the code review is for the latest version to get into the official dists, right? I don't think it addresses the needs to stay up-to-date because both Debian and Ubuntu have the concept of stable vs testing repos. Latest releases will land in testing/unstable repo, and won't be available to normal dists on stable repo.

I'm wondering if it is possible to use the GitHub Releases page to automatically release pre-built binaries for common platforms for each Git tag. For example, is it possible to get the result from Travis CI build?

riobard avatar Mar 15 '17 06:03 riobard

It would be very troublesome to release binaries for a project like shadowsocks-libev due to the dependency hell. My suggestion is to try docker instead: https://hub.docker.com/r/easypi/shadowsocks-libev/tags/

madeye avatar Mar 15 '17 06:03 madeye

The dependency hell is exactly the reason why I'm thinking about binary releases because it's just too much for end users to deal with the build process.

I was using the Docker release on Linux servers, which is quite convenient on platforms like hyper.sh. But getting Docker to work on ordinary VPS is another haunting task. Also it lacks build for other platforms like OpenWRT, BSD and macOS because Docker is Linux-only.

Therefore I'm wondering if it might be better to use Docker to build for OpenWRT/Linux/macOS and release the prebuilt binaries in GitHub Release page. Does Travis CI support build for those platforms?

riobard avatar Mar 15 '17 06:03 riobard

OpenWRT is especially troublesome because of the diversity of its hardware support.

riobard avatar Mar 15 '17 06:03 riobard

OpenWRT-shadowsocks is maintained here: https://github.com/shadowsocks/openwrt-shadowsocks

Binaries for OpenWRT are released like this: https://github.com/shadowsocks/openwrt-shadowsocks/releases/tag/v3.0.3

@rogers0 has written a script to build shadowsocks-libev from source and resolve the dependency automatically for Debian and Ubuntu distributions: https://github.com/shadowsocks/shadowsocks-libev/blob/master/scripts/build_deb.sh

madeye avatar Mar 15 '17 07:03 madeye

Nice! So could we use the script by @rogers0 to build binary releases and put them into the GitHub Release page?

riobard avatar Mar 15 '17 08:03 riobard

This is not a trivial task actually. At least 8 packages we should provide, for different distributions like Ubuntu 14.04, 16.04, Debian 7, 8 and different platforms like 386/x86_64.

And I believe installing from source is always the best choice for a Linux user.

madeye avatar Mar 15 '17 14:03 madeye

What's the difference between binary release for Debian 7 and 8? I thought it would be identical.

riobard avatar Mar 15 '17 15:03 riobard

I found the docker project provides debian packages:

https://github.com/EasyPi/docker-shadowsocks-libev#deploy-without-docker

In order provide binary releases, should have an auto-building system first. Wonder if there already have this kinds of solutions out there.

hellofwy avatar Mar 15 '17 15:03 hellofwy

@riobard Maybe @rogers0 can help to explain the details. I think the key difference is the different versions of shared libraries on different distributions.

madeye avatar Mar 16 '17 02:03 madeye

Yeah, we definitely need @rogers0's input to see if it is feasible. Most likely we need statically-linked binaries to be dist-independent.

riobard avatar Mar 16 '17 05:03 riobard

What's the difference between binary release for Debian 7 and 8? I thought it would be identical.

@riobard quite different due to library dependency:

  • libc version
  • gcc version
  • libsodium version
  • whether there're libcork / libcorkipset in official repo etc..

rogers0 avatar Mar 16 '17 17:03 rogers0

@rogers0 Thanks for the response! I have several questions:

  1. Is library dependency still a problem if we statically compile?
  2. Are dynamically linked libraries required if we release it thru Debian/Ubuntu's official repos?
  3. How does it work on dists using source release? E.g. ArchLinux?
  4. What about macOS?

I'd appreciate if you could explain a bit more in detail. Thanks again! :)

riobard avatar Mar 17 '17 02:03 riobard

@riobard Debian don't recommend static linked package, because it's not maintainable. each package should fix its own issue (security or not), and other depended package can benefit without rebuilding. If not, there's no way we get to know when to rebuild.

Sorry, I don't know things about ArchLinux or macOS. Maybe other developer can help you.

rogers0 avatar Mar 20 '17 15:03 rogers0

How does it work on dists using source release? E.g. ArchLinux?

Source releases should not have the delay problem.

What about macOS?

Homebrew solves the dependencies. shadowsocks-libev is compiled in a mixed-link mode. Only libraries already in homebrew would be linked dynamically, IIRC.

madeye avatar Mar 22 '17 00:03 madeye

It's also a problem to me. I attempted build binary package with all the dependencies static link but failed some days before.

@riobard You can get the latest OpenWRT binary package from http://openwrt-dist.tonylee.name/

And now, I build the binary package from Docker and package all the dependencies(Linux dd ss-server). Running the ss-server with the LD_LIBRARY_PATH be exported when I migrate to a new server. It works fine, but there will be very nice to provide static linked binary package 🍻.

csrutil avatar Mar 22 '17 07:03 csrutil

I think it is possible to provide binary packages , just like how torproject distribute tor-browser. see https://www.torproject.org/download/download.html.en

by the way, i am continuing shadowsocks-libuv project, renamed to minisocks , and it provides linux and windows binary under the build directory. https://github.com/zhou0/minisocks/tree/master/build/bin

zhou0 avatar Mar 22 '17 14:03 zhou0