mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-29 03:57:44 +00:00
stdbuf: add feat_external_stdbuf
Fixes https://github.com/uutils/coreutils/issues/6591 "feat_external_stdbuf": use an external libstdbuf.so for stdbuf instead of embedding it into the stdbuf binary. There are 2 use-cases: 1. Installation of uutils-coreutils using cargo install (e.g. from crates.io which supports only "cargo install" as installation method). In this case, installing libstdbuf.so is impossible, because "cargo install" installs only binary programs (no cdylib), thus libstdbuf.so must be embedded into stdbuf and written to /tmp at runtime. This is a hack, and may not work on some platforms, e.g. because the SELinux permissions may not allow stdbuf to write to /tmp, /tmp may be read-only, libstdbuf.so may not work at all without SELinux labels, etc. 2. Installation of uutils-coreutils using an external tool, e.g. dpkg/apt on debian. In this case, libstdbuf.so should be installed separately to its correct location and the environment variable LIBSTDBUF_PATH configures the installation path during the build. E.g. LIBSTDBUF_PATH="/lib/libstdbuf.so" Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
This commit is contained in:
parent
83424751c1
commit
99aa51a9a9
5 changed files with 82 additions and 9 deletions
|
@ -3,6 +3,8 @@ linker = "x86_64-unknown-redox-gcc"
|
|||
|
||||
[env]
|
||||
PROJECT_NAME_FOR_VERSION_STRING = "uutils coreutils"
|
||||
# See feat_external_libstdbuf in src/uu/stdbuf/Cargo.toml
|
||||
LIBSTDBUF_DIR = "/usr/lib"
|
||||
|
||||
# libstdbuf must be a shared library, so musl libc can't be linked statically
|
||||
# https://github.com/rust-lang/rust/issues/82193
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue