From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A9C7813835B for ; Wed, 20 May 2020 03:39:55 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C52A4E084A; Wed, 20 May 2020 03:39:54 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A102CE084A for ; Wed, 20 May 2020 03:39:54 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CB4AA34F1D6 for ; Wed, 20 May 2020 03:39:53 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 87A1324E for ; Wed, 20 May 2020 03:39:52 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1589939370.5a8322accecab68d7b00637f288487354e7a01d3.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:pending/mattst88 commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/chroot-functions.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 5a8322accecab68d7b00637f288487354e7a01d3 X-VCS-Branch: pending/mattst88 Date: Wed, 20 May 2020 03:39:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f5298a07-9004-48a3-a97c-1851f2635080 X-Archives-Hash: e99b40c0ed059347148eadb7646ec0b1 commit: 5a8322accecab68d7b00637f288487354e7a01d3 Author: Matt Turner gentoo org> AuthorDate: Wed May 20 01:20:02 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed May 20 01:49:30 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5a8322ac targets: Remove copy_{file,symlink,lib} functions Unused since the removal of the original netboot target. I'm honestly kind of impressed with the strategy of running ldd and recursively copying libraries to the netboot image. Unfortunately for this strategy, dlopen() exists so this cannot work. Fixes: 89f57e145f82 (targets: Delete the netboot target) Signed-off-by: Matt Turner gentoo.org> targets/support/chroot-functions.sh | 75 ------------------------------------- 1 file changed, 75 deletions(-) diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index d40279ae..d63e4918 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -335,81 +335,6 @@ run_default_funcs() { fi } -# Functions -# Copy libs of a executable in the chroot -function copy_libs() { - # Check if it's a dynamix exec - ldd ${1} > /dev/null 2>&1 || return - - for lib in `ldd ${1} | awk '{ print $3 }'` - do - echo ${lib} - if [ -e ${lib} ] - then - if [ ! -e ${clst_root_path}/${lib} ] - then - copy_file ${lib} - [ -e "${clst_root_path}/${lib}" ] && \ - strip -R .comment -R .note ${clst_root_path}/${lib} \ - || echo "WARNING : Cannot strip lib ${clst_root_path}/${lib} !" - fi - else - echo "WARNING : Some library was not found for ${lib} !" - fi - done -} - -function copy_symlink() { - STACK=${2} - [ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 )) - - if [ ${STACK} -le 0 ] - then - echo "WARNING : ${TARGET} : too many levels of symbolic links !" - return - fi - - [ ! -e ${clst_root_path}/`dirname ${1}` ] && \ - mkdir -p ${clst_root_path}/`dirname ${1}` - [ ! -e ${clst_root_path}/${1} ] && \ - cp -vfdp ${1} ${clst_root_path}/${1} - - if [[ -n $(type -p realpath) ]]; then - TARGET=`realpath ${1}` - else - TARGET=`readlink -f ${1}` - fi - if [ -h ${TARGET} ] - then - copy_symlink ${TARGET} ${STACK} - else - copy_file ${TARGET} - fi -} - -function copy_file() { - f="${1}" - - if [ ! -e "${f}" ] - then - echo "WARNING : File not found : ${f}" - continue - fi - - [ ! -e ${clst_root_path}/`dirname ${f}` ] && \ - mkdir -p ${clst_root_path}/`dirname ${f}` - [ ! -e ${clst_root_path}/${f} ] && \ - cp -vfdp ${f} ${clst_root_path}/${f} - if [ -x ${f} -a ! -h ${f} ] - then - copy_libs ${f} - strip -R .comment -R .note ${clst_root_path}/${f} > /dev/null 2>&1 - elif [ -h ${f} ] - then - copy_symlink ${f} - fi -} - create_handbook_icon() { # This function creates a local icon to the Gentoo Handbook echo "[Desktop Entry] From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1AD011382C5 for ; Wed, 20 May 2020 01:52:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 21105E0833; Wed, 20 May 2020 01:52:30 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E537DE0833 for ; Wed, 20 May 2020 01:52:29 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3797A34F133 for ; Wed, 20 May 2020 01:52:28 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 97AC4242 for ; Wed, 20 May 2020 01:52:25 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1589939370.5a8322accecab68d7b00637f288487354e7a01d3.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:wip/mattst88 commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/chroot-functions.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 5a8322accecab68d7b00637f288487354e7a01d3 X-VCS-Branch: wip/mattst88 Date: Wed, 20 May 2020 01:52:25 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c6da1fe0-7da0-49f9-8663-d68b85259df9 X-Archives-Hash: d261a868eecd318ce9b39f5f82451df2 Message-ID: <20200520015225.kD_LmJHEKCDnI2ojy2v5ZT7QRsp6cFwwGFkn-p5iyUA@z> commit: 5a8322accecab68d7b00637f288487354e7a01d3 Author: Matt Turner gentoo org> AuthorDate: Wed May 20 01:20:02 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed May 20 01:49:30 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5a8322ac targets: Remove copy_{file,symlink,lib} functions Unused since the removal of the original netboot target. I'm honestly kind of impressed with the strategy of running ldd and recursively copying libraries to the netboot image. Unfortunately for this strategy, dlopen() exists so this cannot work. Fixes: 89f57e145f82 (targets: Delete the netboot target) Signed-off-by: Matt Turner gentoo.org> targets/support/chroot-functions.sh | 75 ------------------------------------- 1 file changed, 75 deletions(-) diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index d40279ae..d63e4918 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -335,81 +335,6 @@ run_default_funcs() { fi } -# Functions -# Copy libs of a executable in the chroot -function copy_libs() { - # Check if it's a dynamix exec - ldd ${1} > /dev/null 2>&1 || return - - for lib in `ldd ${1} | awk '{ print $3 }'` - do - echo ${lib} - if [ -e ${lib} ] - then - if [ ! -e ${clst_root_path}/${lib} ] - then - copy_file ${lib} - [ -e "${clst_root_path}/${lib}" ] && \ - strip -R .comment -R .note ${clst_root_path}/${lib} \ - || echo "WARNING : Cannot strip lib ${clst_root_path}/${lib} !" - fi - else - echo "WARNING : Some library was not found for ${lib} !" - fi - done -} - -function copy_symlink() { - STACK=${2} - [ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 )) - - if [ ${STACK} -le 0 ] - then - echo "WARNING : ${TARGET} : too many levels of symbolic links !" - return - fi - - [ ! -e ${clst_root_path}/`dirname ${1}` ] && \ - mkdir -p ${clst_root_path}/`dirname ${1}` - [ ! -e ${clst_root_path}/${1} ] && \ - cp -vfdp ${1} ${clst_root_path}/${1} - - if [[ -n $(type -p realpath) ]]; then - TARGET=`realpath ${1}` - else - TARGET=`readlink -f ${1}` - fi - if [ -h ${TARGET} ] - then - copy_symlink ${TARGET} ${STACK} - else - copy_file ${TARGET} - fi -} - -function copy_file() { - f="${1}" - - if [ ! -e "${f}" ] - then - echo "WARNING : File not found : ${f}" - continue - fi - - [ ! -e ${clst_root_path}/`dirname ${f}` ] && \ - mkdir -p ${clst_root_path}/`dirname ${f}` - [ ! -e ${clst_root_path}/${f} ] && \ - cp -vfdp ${f} ${clst_root_path}/${f} - if [ -x ${f} -a ! -h ${f} ] - then - copy_libs ${f} - strip -R .comment -R .note ${clst_root_path}/${f} > /dev/null 2>&1 - elif [ -h ${f} ] - then - copy_symlink ${f} - fi -} - create_handbook_icon() { # This function creates a local icon to the Gentoo Handbook echo "[Desktop Entry] From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3AD611382C5 for ; Thu, 21 May 2020 20:25:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 093BAE0954; Thu, 21 May 2020 20:25:36 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D64C1E0954 for ; Thu, 21 May 2020 20:25:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id CFBD434F286 for ; Thu, 21 May 2020 20:25:34 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 7A7B3230 for ; Thu, 21 May 2020 20:25:33 +0000 (UTC) From: "Matt Turner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Matt Turner" Message-ID: <1589939370.5a8322accecab68d7b00637f288487354e7a01d3.mattst88@gentoo> Subject: [gentoo-commits] proj/catalyst:master commit in: targets/support/ X-VCS-Repository: proj/catalyst X-VCS-Files: targets/support/chroot-functions.sh X-VCS-Directories: targets/support/ X-VCS-Committer: mattst88 X-VCS-Committer-Name: Matt Turner X-VCS-Revision: 5a8322accecab68d7b00637f288487354e7a01d3 X-VCS-Branch: master Date: Thu, 21 May 2020 20:25:33 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: c0462093-2f95-45ff-a114-4c3d566b4e3b X-Archives-Hash: 1977526dc4239b45b368f75cb7c33cd1 Message-ID: <20200521202533.JtgMX_WyEaBuXOJwlysVBp7bFXOVX0qtwSZLBoEpnpE@z> commit: 5a8322accecab68d7b00637f288487354e7a01d3 Author: Matt Turner gentoo org> AuthorDate: Wed May 20 01:20:02 2020 +0000 Commit: Matt Turner gentoo org> CommitDate: Wed May 20 01:49:30 2020 +0000 URL: https://gitweb.gentoo.org/proj/catalyst.git/commit/?id=5a8322ac targets: Remove copy_{file,symlink,lib} functions Unused since the removal of the original netboot target. I'm honestly kind of impressed with the strategy of running ldd and recursively copying libraries to the netboot image. Unfortunately for this strategy, dlopen() exists so this cannot work. Fixes: 89f57e145f82 (targets: Delete the netboot target) Signed-off-by: Matt Turner gentoo.org> targets/support/chroot-functions.sh | 75 ------------------------------------- 1 file changed, 75 deletions(-) diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index d40279ae..d63e4918 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -335,81 +335,6 @@ run_default_funcs() { fi } -# Functions -# Copy libs of a executable in the chroot -function copy_libs() { - # Check if it's a dynamix exec - ldd ${1} > /dev/null 2>&1 || return - - for lib in `ldd ${1} | awk '{ print $3 }'` - do - echo ${lib} - if [ -e ${lib} ] - then - if [ ! -e ${clst_root_path}/${lib} ] - then - copy_file ${lib} - [ -e "${clst_root_path}/${lib}" ] && \ - strip -R .comment -R .note ${clst_root_path}/${lib} \ - || echo "WARNING : Cannot strip lib ${clst_root_path}/${lib} !" - fi - else - echo "WARNING : Some library was not found for ${lib} !" - fi - done -} - -function copy_symlink() { - STACK=${2} - [ "${STACK}" = "" ] && STACK=16 || STACK=$((${STACK} - 1 )) - - if [ ${STACK} -le 0 ] - then - echo "WARNING : ${TARGET} : too many levels of symbolic links !" - return - fi - - [ ! -e ${clst_root_path}/`dirname ${1}` ] && \ - mkdir -p ${clst_root_path}/`dirname ${1}` - [ ! -e ${clst_root_path}/${1} ] && \ - cp -vfdp ${1} ${clst_root_path}/${1} - - if [[ -n $(type -p realpath) ]]; then - TARGET=`realpath ${1}` - else - TARGET=`readlink -f ${1}` - fi - if [ -h ${TARGET} ] - then - copy_symlink ${TARGET} ${STACK} - else - copy_file ${TARGET} - fi -} - -function copy_file() { - f="${1}" - - if [ ! -e "${f}" ] - then - echo "WARNING : File not found : ${f}" - continue - fi - - [ ! -e ${clst_root_path}/`dirname ${f}` ] && \ - mkdir -p ${clst_root_path}/`dirname ${f}` - [ ! -e ${clst_root_path}/${f} ] && \ - cp -vfdp ${f} ${clst_root_path}/${f} - if [ -x ${f} -a ! -h ${f} ] - then - copy_libs ${f} - strip -R .comment -R .note ${clst_root_path}/${f} > /dev/null 2>&1 - elif [ -h ${f} ] - then - copy_symlink ${f} - fi -} - create_handbook_icon() { # This function creates a local icon to the Gentoo Handbook echo "[Desktop Entry]