support/testing: remove references to host/usr
PATCH 1/3 support/testing: remove references to host/usr
The tools are now installed in host/bin instead of host/usr/bin.
--- 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(-)
support/testing/tests/fs/test_ext.py +1 -1
@@ -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,
support/testing/tests/fs/test_jffs2.py +1 -1
@@ -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()
support/testing/tests/fs/test_squashfs.py +1 -1
@@ -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"})
Signature · 1 line
2.13.2
PATCH 2/3 check-host-rpath: no longer allow $(HOST_DIR)/usr
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.
--- support/scripts/check-host-rpath | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
support/scripts/check-host-rpath +1 -3
@@ -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' \
Signature · 1 line
2.13.2
PATCH 2/3 check-host-rpath: no longer allow $(HOST_DIR)/usr
Hallo,
Am 05.07.2017 um 14:09 schrieb Arnout Vandecappelle (Essensium/Mind):
Quoted 25 lines
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.
Cc Wolfgang Grandegger <[email protected]>--- support/scripts/check-host-rpath | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)support/scripts/check-host-rpath +1
-1@@ -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
support/scripts/check-host-rpath check_elf_has_rpath() { · line 64
Quoted 8 lines
support/scripts/check-host-rpath +0
-2@@ -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.
PATCH 3/3 CHANGES: update with removal of $(HOST_DIR)/usr
In reply to Arnout Vandecappelle (Essensium/Mind)--- CHANGES | 7 +++++++ 1 file changed, 7 insertions(+)
CHANGES +7 -0
@@ -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.
Signature · 1 line
2.13.2
PATCH 1/3 support/testing: remove references to host/usr
In reply to Arnout Vandecappelle (Essensium/Mind)Hello,
Quoted 8 lines · Arnout Vandecappelle (Essensium/Mind)
The tools are now installed in host/bin instead of host/usr/bin.
--- 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
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com