1 |
Unused since the removal of the original netboot target. |
2 |
|
3 |
I'm honestly kind of impressed with the strategy of running ldd and |
4 |
recursively copying libraries to the netboot image. Unfortunately for |
5 |
this strategy, dlopen() exists so this cannot work. |
6 |
|
7 |
Fixes: 89f57e145f82 (targets: Delete the netboot target) |
8 |
Signed-off-by: Matt Turner <mattst88@g.o> |
9 |
--- |
10 |
targets/support/chroot-functions.sh | 75 ----------------------------- |
11 |
1 file changed, 75 deletions(-) |
12 |
|
13 |
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh |
14 |
index d40279ae..d63e4918 100755 |
15 |
--- a/targets/support/chroot-functions.sh |
16 |
+++ b/targets/support/chroot-functions.sh |
17 |
@@ -335,81 +335,6 @@ run_default_funcs() { |
18 |
fi |
19 |
} |
20 |
|
21 |
-# Functions |
22 |
-# Copy libs of a executable in the chroot |
23 |
-function copy_libs() { |
24 |
- # Check if it's a dynamix exec |
25 |
- ldd ${1} > /dev/null 2>&1 || return |
26 |
- |
27 |
- for lib in `ldd ${1} | awk '{ print $3 }'` |
28 |
- do |
29 |
- echo ${lib} |
30 |
- if [ -e ${lib} ] |
31 |
- then |
32 |
- if [ ! -e ${clst_root_path}/${lib} ] |
33 |
- then |
34 |
- copy_file ${lib} |
35 |
- [ -e "${clst_root_path}/${lib}" ] && \ |
36 |
- strip -R .comment -R .note ${clst_root_path}/${lib} \ |
37 |
- || echo "WARNING : Cannot strip lib ${clst_root_path}/${lib} !" |
38 |
- fi |
39 |
- else |
40 |
- echo "WARNING : Some library was not found for ${lib} !" |
41 |
- fi |
42 |
- done |
43 |
-} |
44 |
- |
45 |
-function copy_symlink() { |
46 |
- STACK=${2} |
47 |
- [ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 )) |
48 |
- |
49 |
- if [ ${STACK} -le 0 ] |
50 |
- then |
51 |
- echo "WARNING : ${TARGET} : too many levels of symbolic links !" |
52 |
- return |
53 |
- fi |
54 |
- |
55 |
- [ ! -e ${clst_root_path}/`dirname ${1}` ] && \ |
56 |
- mkdir -p ${clst_root_path}/`dirname ${1}` |
57 |
- [ ! -e ${clst_root_path}/${1} ] && \ |
58 |
- cp -vfdp ${1} ${clst_root_path}/${1} |
59 |
- |
60 |
- if [[ -n $(type -p realpath) ]]; then |
61 |
- TARGET=`realpath ${1}` |
62 |
- else |
63 |
- TARGET=`readlink -f ${1}` |
64 |
- fi |
65 |
- if [ -h ${TARGET} ] |
66 |
- then |
67 |
- copy_symlink ${TARGET} ${STACK} |
68 |
- else |
69 |
- copy_file ${TARGET} |
70 |
- fi |
71 |
-} |
72 |
- |
73 |
-function copy_file() { |
74 |
- f="${1}" |
75 |
- |
76 |
- if [ ! -e "${f}" ] |
77 |
- then |
78 |
- echo "WARNING : File not found : ${f}" |
79 |
- continue |
80 |
- fi |
81 |
- |
82 |
- [ ! -e ${clst_root_path}/`dirname ${f}` ] && \ |
83 |
- mkdir -p ${clst_root_path}/`dirname ${f}` |
84 |
- [ ! -e ${clst_root_path}/${f} ] && \ |
85 |
- cp -vfdp ${f} ${clst_root_path}/${f} |
86 |
- if [ -x ${f} -a ! -h ${f} ] |
87 |
- then |
88 |
- copy_libs ${f} |
89 |
- strip -R .comment -R .note ${clst_root_path}/${f} > /dev/null 2>&1 |
90 |
- elif [ -h ${f} ] |
91 |
- then |
92 |
- copy_symlink ${f} |
93 |
- fi |
94 |
-} |
95 |
- |
96 |
create_handbook_icon() { |
97 |
# This function creates a local icon to the Gentoo Handbook |
98 |
echo "[Desktop Entry] |
99 |
-- |
100 |
2.26.2 |