linuxserver / docker-nzbget

GNU General Public License v3.0
150 stars 83 forks source link

Include libstdc++ and libc6-compat in the container #54

Closed j9ac9k closed 5 years ago

j9ac9k commented 6 years ago

linuxserver.io

Feature Request:

I propose that libstdc++ and libc6-compat be added to the container. These dependencies would allow for the running of (many) binaries on linux systems. The reason this is beneficial with nzbget is that it opens the door for much more powerful post-processing scripts.

In my use case, I wanted to create a post-processing script to run mkclean on downloaded mkv files, and while I could get a script setup, and I could reference a compiled binary with a directory mapping to the host OS, the binary would not run (due to missing libraries).

root@4bb49dcb91f6:/utils$ ldd mkclean
    /lib64/ld-linux-x86-64.so.2 (0x14d447b80000)
    libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x14d44782e000)
    libm.so.6 => /lib64/ld-linux-x86-64.so.2 (0x14d447b80000)
    libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x14d44761c000)
    libc.so.6 => /lib64/ld-linux-x86-64.so.2 (0x14d447b80000)
root@4bb49dcb91f6:/utils$ ls /lib64
ls: cannot access '/lib64': No such file or directory
root@4bb49dcb91f6:/utils$ ls /usr/lib64/
ls: cannot access '/usr/lib64/': No such file or directory
root@4bb49dcb91f6:/utils$ ls /lib64
ls: cannot access '/lib64': No such file or directory
root@4bb49dcb91f6:/utils$

Installing libstdc++ and libc6-compat provides all the necessary libraries for mkclean, mkvalidate and spectool to run, but it can further allow for far better use of custom post-processing scripts.

Thanks, team linuxserver.io

JTarasovic commented 6 years ago

Why couldn't the binary be statically compiled? Adding the C stdlib, while useful, seems like a slippery slope.

j9ac9k commented 6 years ago

I don't think so given that it's not exactly an infrequently used dependency. If this was a super nitche case that would be one thing. Also it's not as if this dependency is large and nzbget is the right plave to add it given it's ability to run post processing scripts.

thelamer commented 5 years ago

@j9ac9k sorry for the late response here, as it stands we encourage our power users to fork and build local if you need custom dependencies. As for post processing scripts, if this was my infrastructure I would have a separate container running mkclean watching the output Directory of nzbget and performing custom post processing. We bend the rules of Docker quite a bit when it comes to the core ideology of one pid for a container, but I think in this case, if a user wants to harness very custom post processing it should be done with another container.