Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/3]adt-installer: fix sdk relocation issues
@ 2013-06-26  4:38 Hongxu Jia
  2013-06-26  4:38 ` [PATCH 1/3] adt_installer_internal: fix perl modules relocated failed on older distributions Hongxu Jia
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Hongxu Jia @ 2013-06-26  4:38 UTC (permalink / raw)
  To: openembedded-core

Some of them have already been fixed in toolchain:
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=aeb53bd78991af9fbb60d64176ec864cfc2ddbb9
http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=5ce8c7fe9ebb8dca0a0b091bda9c58141da26216

//Hongxu

The following changes since commit 8e9501ffa8726d69412d669580d787ffedb88d34:

  populate_sdk_base, adt_installer: abort install if path contains spaces (2013-06-25 17:59:17 +0100)

are available in the git repository at:

  git://git.pokylinux.org/poky-contrib hongxu/fix-adt
  http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=hongxu/fix-adt

Hongxu Jia (3):
  adt_installer_internal: fix perl modules relocated failed on older
    distributions
  adt_installer_internal:fix perl lib version mismatch
  adt_installer_internal:add sudo when permission deny on installation
    directory

 .../adt-installer/scripts/adt_installer_internal          | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

-- 
1.8.1.2



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 1/3] adt_installer_internal: fix perl modules relocated failed on older distributions
  2013-06-26  4:38 [PATCH 0/3]adt-installer: fix sdk relocation issues Hongxu Jia
@ 2013-06-26  4:38 ` Hongxu Jia
  2013-06-26  4:38 ` [PATCH 2/3] adt_installer_internal:fix perl lib version mismatch Hongxu Jia
  2013-06-26  4:38 ` [PATCH 3/3] adt_installer_internal:add sudo when permission deny on installation directory Hongxu Jia
  2 siblings, 0 replies; 4+ messages in thread
From: Hongxu Jia @ 2013-06-26  4:38 UTC (permalink / raw)
  To: openembedded-core

The perl module for automake has an embedded path in it, this needs
to be relocated.

Older versions of 'file' do not return the "ASCII" text in the output for
a perl module file. Hence, the regex pattern didn't match perl module and
they were not getting relocated at all on older distributions.

1) On CentOS release 6.4, the version of file is 5.04
$ file /usr/lib/perl5/Config_heavy.pl
$ /usr/lib/perl5/Config_heavy.pl: Perl5 module source text

2) On Ubuntu 13.04, the version of file is 5.11
$ file /usr/lib/perl/5.14/Config_heavy.pl
$ /usr/lib/perl/5.14/Config_heavy.pl: C source, ASCII text, with very long lines

[YOCTO #4550]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../installer/adt-installer/scripts/adt_installer_internal            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index 4322964..25c955a 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -212,8 +212,8 @@ check_result
 env_setup_script=$(find $NATIVE_INSTALL_DIR/ -name "environment-setup-*")
 $SUDO sed -i -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:g" $env_setup_script
 
-find $OECORE_NATIVE_SYSROOT -type f -exec file '{}' \;|grep ":.*\(ASCII\|script\).*text"|cut -d':' -f1|\
-    xargs $SUDO sed -i -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:g"
+find $OECORE_NATIVE_SYSROOT -type f -exec file '{}' \; | grep ":.*\(ASCII\|script\|source\).*text" | \
+    cut -d':' -f1 | xargs $SUDO sed -i -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:g"
 
 # change all symlinks pointing to /opt/${DISTRO}/${SDK_VERSION}
 for l in $(find $NATIVE_INSTALL_DIR -type l); do
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/3] adt_installer_internal:fix perl lib version mismatch
  2013-06-26  4:38 [PATCH 0/3]adt-installer: fix sdk relocation issues Hongxu Jia
  2013-06-26  4:38 ` [PATCH 1/3] adt_installer_internal: fix perl modules relocated failed on older distributions Hongxu Jia
@ 2013-06-26  4:38 ` Hongxu Jia
  2013-06-26  4:38 ` [PATCH 3/3] adt_installer_internal:add sudo when permission deny on installation directory Hongxu Jia
  2 siblings, 0 replies; 4+ messages in thread
From: Hongxu Jia @ 2013-06-26  4:38 UTC (permalink / raw)
  To: openembedded-core

When run "autoreconf" in toolchain, there is an error if the host's perl's
version is not the same as the one in the SDK, the error says that the
executable perl mismatches the perl lib's version.

This is because most of the autotools' scripts use the "#!/usr/bin/perl -w"
which is host perl, but the gnu-configize uses "#! /usr/bin/env perl" which
invokes the perl wrapper in the SDK, and the wrapper will set the PERL5LIB to
the SDK which causes the mismatch. We can make all the perl scripts to use the
host perl or the SDK perl to fix this problem.

[YOCTO #4758]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../installer/adt-installer/scripts/adt_installer_internal         | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index 25c955a..16677e7 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -220,6 +220,13 @@ for l in $(find $NATIVE_INSTALL_DIR -type l); do
     $SUDO ln -sfn $(readlink $l|sed -e "s:$DEFAULT_INSTALL_FOLDER:$NATIVE_INSTALL_DIR:") $l
 done
 
+# find out all perl scripts in $OECORE_NATIVE_SYSROOT and modify them
+# replacing the host perl with SDK perl.
+for perl_script in $($SUDO grep -m 1 "^#!.*perl" -rl $OECORE_NATIVE_SYSROOT); do
+    $SUDO sed -i -e "s:^#! */usr/bin/perl.*:#! /usr/bin/env perl:g" -e \
+        "s: /usr/bin/perl: /usr/bin/env perl:g" $perl_script
+done
+
 echo_info "\nSuccessfully installed selected native ADT!"
 }
 
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 3/3] adt_installer_internal:add sudo when permission deny on installation directory
  2013-06-26  4:38 [PATCH 0/3]adt-installer: fix sdk relocation issues Hongxu Jia
  2013-06-26  4:38 ` [PATCH 1/3] adt_installer_internal: fix perl modules relocated failed on older distributions Hongxu Jia
  2013-06-26  4:38 ` [PATCH 2/3] adt_installer_internal:fix perl lib version mismatch Hongxu Jia
@ 2013-06-26  4:38 ` Hongxu Jia
  2 siblings, 0 replies; 4+ messages in thread
From: Hongxu Jia @ 2013-06-26  4:38 UTC (permalink / raw)
  To: openembedded-core

When the user doesn't have rights to access the installation directory,
the sdk installation will fail, add sudo to fix this.

[YOCTO #4760]

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 .../installer/adt-installer/scripts/adt_installer_internal            | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
index 16677e7..175d285 100755
--- a/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
+++ b/meta/recipes-devtools/installer/adt-installer/scripts/adt_installer_internal
@@ -199,7 +199,7 @@ escaped_sdkpath=$(echo $DEFAULT_INSTALL_FOLDER |sed -e "s:[\+\.]:\\\\\\\\\0:g")
 
 # We don't change the script in-place since we may want the user to re-run
 # adt-installer script
-$SUDO sed -e "s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:" scripts/relocate_sdk.py > scripts/relocate_sdk_tmp.py
+$SUDO sh -c "sed -e '"s:##DEFAULT_INSTALL_DIR##:$escaped_sdkpath:"' scripts/relocate_sdk.py > scripts/relocate_sdk_tmp.py"
 $SUDO chmod +x scripts/relocate_sdk_tmp.py
 
 dl_path=$(find $OECORE_NATIVE_SYSROOT/lib -name "ld-linux*")
@@ -258,7 +258,7 @@ qemu_type=`echo "$1" | sed -e 's/x86_64/x86-64/'`
 sysroot_image_name="core-image-$target_sysroot_image-qemu$qemu_type.tar.bz2"
     #echo_info "Extracting rootfs: $sysroot_image_name, using pseudo..."
 
-scripts/extract_rootfs $sysroot_image_name $target_sysroot $OECORE_NATIVE_SYSROOT $user_inst_type
+$SUDO scripts/extract_rootfs $sysroot_image_name $target_sysroot $OECORE_NATIVE_SYSROOT $user_inst_type
 check_result
 
 echo_info "Updating environment script with target sysroot location."
-- 
1.8.1.2



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-06-26  4:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-26  4:38 [PATCH 0/3]adt-installer: fix sdk relocation issues Hongxu Jia
2013-06-26  4:38 ` [PATCH 1/3] adt_installer_internal: fix perl modules relocated failed on older distributions Hongxu Jia
2013-06-26  4:38 ` [PATCH 2/3] adt_installer_internal:fix perl lib version mismatch Hongxu Jia
2013-06-26  4:38 ` [PATCH 3/3] adt_installer_internal:add sudo when permission deny on installation directory Hongxu Jia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox