Gentoo Archives: gentoo-catalyst

From: Matt Turner <mattst88@g.o>
To: gentoo-catalyst@l.g.o
Cc: Matt Turner <mattst88@g.o>
Subject: [gentoo-catalyst] [PATCH 01/21] targets: Remove copy_{file,symlink,lib} functions
Date: Wed, 20 May 2020 03:42:37
Message-Id: 20200520034226.2870937-1-mattst88@gentoo.org
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

Replies

Subject Author
[gentoo-catalyst] [PATCH 02/21] targets: Remove check_genkernel_version() function Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 03/21] catalyst: Drop --cli option Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 04/21] catalyst: Remove PythonDir setting Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 05/21] catalyst: Switch internal snapshot option parsing to SpecParser Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 06/21] catalyst: Remove unused decompression_mode spec option Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 07/21] catalyst: Delete unused {required,valid}_build_targets Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 08/21] catalyst: Disallow DEBUG and VERBOSE in spec files Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 09/21] catalyst: Add decompressor_search_order as valid spec option Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 10/21] catalyst: Remove spec file options from valid_config_file_values Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 11/21] catalyst: Add a missing options to valid_config_file_values Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 12/21] catalyst: Disallow config file options in spec files Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 13/21] catalyst: Remove support for source_matching="loose" Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 14/21] catalyst: Convert catalyst.conf to TOML Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 15/21] catalyst: Verify config options against valid_config_file_values Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 16/21] catalyst: Don't even try to make envars from dicts Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 17/21] catalyst: Only emit true boolean envars Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 18/21] catalyst: Support emitting int/float envars Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 19/21] catalyst: Set jobs/load-average via catalyst.conf Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 20/21] catalyst: Configure distcc_hosts in the config file Matt Turner <mattst88@g.o>
[gentoo-catalyst] [PATCH 21/21] catalyst: Drop ConfigParser Matt Turner <mattst88@g.o>