Drew-Alleman / DataSurgeon

Quickly Extracts IP's, Email Addresses, Hashes, Files, Credit Cards, Social Security Numbers and a lot More From Text
Apache License 2.0
749 stars 62 forks source link

Static binary? #11

Open borestad opened 1 year ago

borestad commented 1 year ago

Hi! Great util! Any chance to also distribute it as a static binary? (and more platforms as well, like mac m1) πŸ™‚

Drew-Alleman commented 1 year ago

Hi there,

Thank you for the kind words!

Regarding your request for a static binary, I added a static binary for Linux available in the latest release. However, please note that this binary is specific to Linux and won't be directly runnable on macOS.

As for the macOS build, cross-compiling from a non-macOS system to macOS is challenging due to Apple's licensing restrictions and the proprietary nature of the macOS SDK and related build tools. However, we've made updates to the code that should allow it to compile on macOS. If you have access to a macOS machine, you should be able to compile and run the project there.

If you encounter any issues or have further questions, please don't hesitate to let me know. I appreciate your interest and support!

Best, Drew

borestad commented 1 year ago

Awesome!

Just FYI - this seems to work fine on Ubuntu 22.04, but older dists like Debian 11 fails due libssl.so.3 being missing, hense it's not truly "static" .... might be a corner case though, but haven't tried other dists like alpine (that uses musl).

./ds: error while loading shared libraries: libssl.so.3: cannot open shared object file: No such file or directory

Just some food for thoughts regarding the naming convention if you want to add more architectures/builds later on - a lot of cli's seems to be using this naming pattern, like https://github.com/sharkdp/bat/releases or https://github.com/starship/starship/releases

image

Thanks again ☺️

Drew-Alleman commented 1 year ago

Hi,

Thanks for the feedback, I will look into the issue with the libssl.so.3 library, as well as the naming convention.

Best, Drew Alleman

Drew-Alleman commented 1 year ago

Hi,

In the latest release I've added more binaries, though I still haven't included one for Mac M1. However, I believe I might have resolved the issue with the libssl.so.3 library. Additionally, I've updated the names of the binaries (e.g ds-v1.2.4-win-x64.exe, ds-v1.2.4-debian-aarch64). Please let me know if the library issue has been addressed.

Best, Drew

borestad commented 1 year ago

Hi! Cool. Just tried it out. The problem with the naming though is that you're now deferring it to per platform, which may get quickly confusing.

I.e, on debian11 - the working binary is ds-v1.2.4-redhat-x86_64 .... so, what about i.e ubuntu then? πŸ˜ƒ

Not sure how to solve this in the best way though. https://github.com/BurntSushi/ripgrep/blob/master/.github/workflows/release.yml#L69C19-L69C44 ripgrep is using a matrix and compiling it to musl as well (musl is often my goto arch, and works AFAIK on every distro)

Sorry for the trouble! πŸ˜‡