Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr
@ 2017-07-05 12:09 Arnout Vandecappelle
  2017-07-05 12:09 ` [Buildroot] [PATCH 2/3] check-host-rpath: no longer allow $(HOST_DIR)/usr Arnout Vandecappelle
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2017-07-05 12:09 UTC (permalink / raw)
  To: buildroot

The tools are now installed in host/bin instead of host/usr/bin.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 support/testing/tests/fs/test_ext.py      | 2 +-
 support/testing/tests/fs/test_jffs2.py    | 2 +-
 support/testing/tests/fs/test_squashfs.py | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/support/testing/tests/fs/test_ext.py b/support/testing/tests/fs/test_ext.py
index ea3d3f11d7..34321a3995 100644
--- a/support/testing/tests/fs/test_ext.py
+++ b/support/testing/tests/fs/test_ext.py
@@ -13,7 +13,7 @@ RESBLKCNT_PROP = "Reserved block count"
 CHECK_FS_TYPE_CMD = "mount | grep '/dev/root on / type {}'"
 
 def dumpe2fs_run(builddir, image):
-    cmd = ["host/usr/sbin/dumpe2fs", os.path.join("images", image)]
+    cmd = ["host/sbin/dumpe2fs", os.path.join("images", image)]
     ret = subprocess.check_output(cmd,
                                   stderr=open(os.devnull, "w"),
                                   cwd=builddir,
diff --git a/support/testing/tests/fs/test_jffs2.py b/support/testing/tests/fs/test_jffs2.py
index 0d45af209b..7185df7899 100644
--- a/support/testing/tests/fs/test_jffs2.py
+++ b/support/testing/tests/fs/test_jffs2.py
@@ -28,7 +28,7 @@ BR2_TARGET_ROOTFS_JFFS2_PADSIZE=0x4000000
 
     def test_run(self):
         img = os.path.join(self.builddir, "images", "rootfs.jffs2")
-        out = subprocess.check_output(["host/usr/sbin/jffs2dump", "-c", img],
+        out = subprocess.check_output(["host/sbin/jffs2dump", "-c", img],
                                       cwd=self.builddir,
                                       env={"LANG": "C"})
         out = out.splitlines()
diff --git a/support/testing/tests/fs/test_squashfs.py b/support/testing/tests/fs/test_squashfs.py
index edaa087106..b205b6a55a 100644
--- a/support/testing/tests/fs/test_squashfs.py
+++ b/support/testing/tests/fs/test_squashfs.py
@@ -13,7 +13,7 @@ BR2_TARGET_ROOTFS_SQUASHFS4_LZ4=y
 """
 
     def test_run(self):
-        unsquashfs_cmd = ["host/usr/bin/unsquashfs", "-s", "images/rootfs.squashfs"]
+        unsquashfs_cmd = ["host/bin/unsquashfs", "-s", "images/rootfs.squashfs"]
         out = subprocess.check_output(unsquashfs_cmd,
                                       cwd=self.builddir,
                                       env={"LANG": "C"})
-- 
2.13.2

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

* [Buildroot] [PATCH 2/3] check-host-rpath: no longer allow $(HOST_DIR)/usr
  2017-07-05 12:09 [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr Arnout Vandecappelle
@ 2017-07-05 12:09 ` Arnout Vandecappelle
  2017-07-05 12:23   ` Wolfgang Grandegger
  2017-07-05 12:09 ` [Buildroot] [PATCH 3/3] CHANGES: update with removal of $(HOST_DIR)/usr Arnout Vandecappelle
  2017-07-05 16:10 ` [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr Thomas Petazzoni
  2 siblings, 1 reply; 5+ messages in thread
From: Arnout Vandecappelle @ 2017-07-05 12:09 UTC (permalink / raw)
  To: buildroot

Now all packages have been updated to install things in $(HOST_DIR)/lib
instead of $(HOST_DIR)/usr/lib, there should no longer be any reason
to have $(HOST_DIR)/usr/lib in the RPATH, so we don't allow it any more.

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Cc: Wolfgang Grandegger <wg@grandegger.com>
---
 support/scripts/check-host-rpath | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath
index 2846d5eb51..74a25ba99c 100755
--- a/support/scripts/check-host-rpath
+++ b/support/scripts/check-host-rpath
@@ -1,7 +1,7 @@
 #!/usr/bin/env bash
 
 # This script scans $(HOST_DIR)/{bin,sbin} for all ELF files, and checks
-# they have an RPATH to $(HOST_DIR)/{,usr/}lib if they need libraries from
+# they have an RPATH to $(HOST_DIR)/lib if they need libraries from
 # there.
 
 # Override the user's locale so we are sure we can parse the output of
@@ -59,8 +59,6 @@ check_elf_has_rpath() {
             # Remove duplicate and trailing '/' for proper match
             dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )"
             [ "${dir}" = "${hostdir}/lib" -o "${dir}" = "\$ORIGIN/../lib" ] && return 0
-            # For the time being, the rpath is allowed with both usr/lib and lib
-            [ "${dir}" = "${hostdir}/usr/lib" -o "${dir}" = "\$ORIGIN/../../usr/lib" ] && return 0
         done
     done < <( readelf -d "${file}"                                              \
               |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
-- 
2.13.2

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

* [Buildroot] [PATCH 3/3] CHANGES: update with removal of $(HOST_DIR)/usr
  2017-07-05 12:09 [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr Arnout Vandecappelle
  2017-07-05 12:09 ` [Buildroot] [PATCH 2/3] check-host-rpath: no longer allow $(HOST_DIR)/usr Arnout Vandecappelle
@ 2017-07-05 12:09 ` Arnout Vandecappelle
  2017-07-05 16:10 ` [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr Thomas Petazzoni
  2 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2017-07-05 12:09 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
---
 CHANGES | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CHANGES b/CHANGES
index 105c9318f4..a530e8fb45 100644
--- a/CHANGES
+++ b/CHANGES
@@ -17,6 +17,13 @@
 	Therefore, if you need NLS support in packages, you must now
 	explicitly enable the BR2_SYSTEM_ENABLE_NLS option.
 
+	Infrastructure:
+
+	- The host directory no longer has a usr/ component. This
+	  makes it much more natural to use that directory as an
+	  externally used toolchain. For compatibility with existing
+	  scripts, a link usr -> . is still added.
+
 2017.05.1, Released July 4th, 2017
 
 	Important / security related fixes.
-- 
2.13.2

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

* [Buildroot] [PATCH 2/3] check-host-rpath: no longer allow $(HOST_DIR)/usr
  2017-07-05 12:09 ` [Buildroot] [PATCH 2/3] check-host-rpath: no longer allow $(HOST_DIR)/usr Arnout Vandecappelle
@ 2017-07-05 12:23   ` Wolfgang Grandegger
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfgang Grandegger @ 2017-07-05 12:23 UTC (permalink / raw)
  To: buildroot

Hallo,

Am 05.07.2017 um 14:09 schrieb Arnout Vandecappelle (Essensium/Mind):
> Now all packages have been updated to install things in $(HOST_DIR)/lib
> instead of $(HOST_DIR)/usr/lib, there should no longer be any reason
> to have $(HOST_DIR)/usr/lib in the RPATH, so we don't allow it any more.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> Cc: Wolfgang Grandegger <wg@grandegger.com>
> ---
>   support/scripts/check-host-rpath | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath
> index 2846d5eb51..74a25ba99c 100755
> --- a/support/scripts/check-host-rpath
> +++ b/support/scripts/check-host-rpath
> @@ -1,7 +1,7 @@
>   #!/usr/bin/env bash
>   
>   # This script scans $(HOST_DIR)/{bin,sbin} for all ELF files, and checks
> -# they have an RPATH to $(HOST_DIR)/{,usr/}lib if they need libraries from
> +# they have an RPATH to $(HOST_DIR)/lib if they need libraries from
>   # there.
>   
>   # Override the user's locale so we are sure we can parse the output of
> @@ -59,8 +59,6 @@ check_elf_has_rpath() {
>               # Remove duplicate and trailing '/' for proper match
>               dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )"
>               [ "${dir}" = "${hostdir}/lib" -o "${dir}" = "\$ORIGIN/../lib" ] && return 0
> -            # For the time being, the rpath is allowed with both usr/lib and lib
> -            [ "${dir}" = "${hostdir}/usr/lib" -o "${dir}" = "\$ORIGIN/../../usr/lib" ] && return 0
>           done
>       done < <( readelf -d "${file}"                                              \
>                 |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
> 

Looks good. Also ORIGIN/../lib is correct now. Going through my series 
to handle "usr" removal properly.

Wolfgang.

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

* [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr
  2017-07-05 12:09 [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr Arnout Vandecappelle
  2017-07-05 12:09 ` [Buildroot] [PATCH 2/3] check-host-rpath: no longer allow $(HOST_DIR)/usr Arnout Vandecappelle
  2017-07-05 12:09 ` [Buildroot] [PATCH 3/3] CHANGES: update with removal of $(HOST_DIR)/usr Arnout Vandecappelle
@ 2017-07-05 16:10 ` Thomas Petazzoni
  2 siblings, 0 replies; 5+ messages in thread
From: Thomas Petazzoni @ 2017-07-05 16:10 UTC (permalink / raw)
  To: buildroot

Hello,

On Wed, 5 Jul 2017 14:09:48 +0200, Arnout Vandecappelle
(Essensium/Mind) wrote:
> The tools are now installed in host/bin instead of host/usr/bin.
> 
> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
> ---
>  support/testing/tests/fs/test_ext.py      | 2 +-
>  support/testing/tests/fs/test_jffs2.py    | 2 +-
>  support/testing/tests/fs/test_squashfs.py | 2 +-
>  3 files changed, 3 insertions(+), 3 deletions(-)

Series applied to master. Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-07-05 16:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-05 12:09 [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr Arnout Vandecappelle
2017-07-05 12:09 ` [Buildroot] [PATCH 2/3] check-host-rpath: no longer allow $(HOST_DIR)/usr Arnout Vandecappelle
2017-07-05 12:23   ` Wolfgang Grandegger
2017-07-05 12:09 ` [Buildroot] [PATCH 3/3] CHANGES: update with removal of $(HOST_DIR)/usr Arnout Vandecappelle
2017-07-05 16:10 ` [Buildroot] [PATCH 1/3] support/testing: remove references to host/usr Thomas Petazzoni

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