compat: Add ability to run as non-root
PATCH 1/1 compat: Add ability to run as non-root
get-compat-kernels now extracts the kernel headers into $HOME/compat-ksrc if the user is not root.
Similarly, ckmake tries first to use $HOME/compat-ksrc if it exists. If not, it fallbacks to system-wide /usr/src silently.
Signed-off-by Ozan Çağlayan <[email protected]>
--- bin/ckmake | 9 +++++- bin/get-compat-kernels | 76 ++++++++++++++++++++++++++++++++++++++---------- 2 files changed, 68 insertions(+), 17 deletions(-)
bin/ckmake +8 -1
@@ -34,7 +34,14 @@ RET_FILE="ret-tmp.txt" RET="" -for i in $(find /lib/modules/ -type d -name \*generic\* | sort -n -r | grep -v -E '\-[[:alnum:]]{1,2}\-'); do +# If $HOME/compat-ksrc is found use that, otherwise use system-wide +# sources in /usr/src. +KSRC_PREFIX= +if [[ -d "$HOME/compat-ksrc" ]]; then + KSRC_PREFIX="$HOME/compat-ksrc" +fi + +for i in $(find $KSRC_PREFIX/lib/modules/ -type d -name \*generic\* | sort -n -r | grep -v -E '\-[[:alnum:]]{1,2}\-'); do KLIBS="$KLIBS $i" done
bin/get-compat-kernels +60 -16
138 lines not on this page · raw message
Signature · 1 line
1.7.10.4
Quoted 7 lines · Ozan Çağlayan
get-compat-kernels now extracts the kernel headers into $HOME/compat-ksrc if the user is not root.
Similarly, ckmake tries first to use $HOME/compat-ksrc if it exists. If not, it fallbacks to system-wide
/usr/srcsilently.Signed-off-by Ozan Çağlayan <[email protected]>
Applied and pushed, thanks!
Luis