support/check-bin-arch: add support for excluding arbitrary locations
v2 cover support/check-bin-arch: add support for excluding arbitrary locations
Hello All!
Users have started reporting issues with this check, when they have local packages (mostly out-of-tree, proprietary) that install binary blobs (like co-processor firmwares) in arbitrary locations, like /opt, which we currently do not exclude from the check.
Changes v1 -> v2:
- typoes and rephrasing (Peter)
- use of intermediate variable (Thomas)
- code-style (Thomas)
Regards,
Yann E. MORIN.
The following changes since commit 13fb1c49128d4c039fc23fcf32317008862f8b4b
configs/teliv_evk_pro3: remove defconfig (2018-03-07 22:37:51 +0100)
are available in the git repository at:
git://git.buildroot.org/~ymorin/git/buildroot.git
for you to fetch changes up to 9fe26c138652b171d9192c128713c3e6ce989d38
support/check-bin-arch: exclude kernel modules for merged /usr (2018-03-07 22:45:01 +0100)
----------------------------------------------------------------
Yann E. MORIN (2):
spport/check-bin-arch: accept arbitrary ignore paths support/check-bin-arch: exclude kernel modules for merged /usr
docs/manual/adding-packages-generic.txt | 7 ++++ package/pkg-generic.mk | 1 + support/scripts/check-bin-arch | 57 ++++++++++++++++++++------------- 3 files changed, 43 insertions(+), 22 deletions(-)
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v2 1/2 spport/check-bin-arch: accept arbitrary ignore paths
Some packages (mostly, out-of-tree) may want to install binary blobs for another architecture, outside the locations we currently exclude, like in /opt or whatever...
Add support in check-bin-arch to accept any arbitrary location, that individual package can each request to excude from the check, when they are installed.
---
Changes v1 -> v2:
- typoes and rephrasing (Peter)
- use intermediate variable to cleanup the ignore option (Thomas)
--- docs/manual/adding-packages-generic.txt | 7 +++++ package/pkg-generic.mk | 1 + support/scripts/check-bin-arch | 56 ++++++++++++++++++++------------- 3 files changed, 42 insertions(+), 22 deletions(-)
docs/manual/adding-packages-generic.txt +7 -0
@@ -453,6 +453,13 @@ information is (assuming the package name is +libfoo+) : FLAT binary format is only 4k bytes. If the application consumes more stack, append the required number here. +* +LIBFOO_BIN_ARCH_EXCLUDE+ is a space-separated list of paths (relative + to the target directory) to ignore when checking that the package + installs correctly cross-compiled binaries. You seldom need to set this + variable, unless the package installs binary blobs outside the default + locations, `/lib/firmware`, `/usr/lib/firmware`, `/lib/modules`, and + `/usr/share`, which are automatically excluded. + The recommended way to define these variables is to use the following syntax:
package/pkg-generic.mk +1 -0
@@ -112,6 +112,7 @@ define check_bin_arch $(if $(filter end-install-target,$(1)-$(2)),\ support/scripts/check-bin-arch -p $(3) \ -l $(BUILD_DIR)/packages-file-list.txt \ + $(foreach i,$($(PKG)_BIN_ARCH_EXCLUDE),-i "$(i)") \ -r $(TARGET_READELF) \ -a $(BR2_READELF_ARCH_NAME)) endef
support/scripts/check-bin-arch +34 -22
78 lines not on this page · raw message
Signature · 1 line
2.14.1
PATCH v2 1/2 spport/check-bin-arch: accept arbitrary ignore paths
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Some packages (mostly, out-of-tree) may want to install binary blobs for another architecture, outside the locations we currently exclude, like in /opt or whatever...
Add support in check-bin-arch to accept any arbitrary location, that individual package can each request to excude from the check, when they are installed.
Quoted 8 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Peter Korsgaard <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Changes v1 -> v2:
- typoes and rephrasing (Peter)
- use intermediate variable to cleanup the ignore option (Thomas)
I've added 'per-package' to $SUBJECT to make it clear that this is per-package and committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 1/2 spport/check-bin-arch: accept arbitrary ignore paths
In reply to Yann E. MORINQuoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
Some packages (mostly, out-of-tree) may want to install binary blobs for another architecture, outside the locations we currently exclude, like in /opt or whatever...
Add support in check-bin-arch to accept any arbitrary location, that individual package can each request to excude from the check, when they are installed.
Quoted 8 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Peter Korsgaard <[email protected]>Cc Thomas Petazzoni <[email protected]>---
Changes v1 -> v2:
- typoes and rephrasing (Peter)
- use intermediate variable to cleanup the ignore option (Thomas)
Committed to 2018.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 2/2 support/check-bin-arch: exclude kernel modules for merged /usr
In reply to Yann E. MORINWhen using a merged /usr, the kernel module path is really /usr/lib/modules, as /lib is a symlink to usr/lib .
---
Changes v1 -> v2:
- also add it to the manual
--- docs/manual/adding-packages-generic.txt | 4 ++-- support/scripts/check-bin-arch | 1 + 2 files changed, 3 insertions(+), 2 deletions(-)
docs/manual/adding-packages-generic.txt +2 -2
@@ -457,8 +457,8 @@ information is (assuming the package name is +libfoo+) : to the target directory) to ignore when checking that the package installs correctly cross-compiled binaries. You seldom need to set this variable, unless the package installs binary blobs outside the default - locations, `/lib/firmware`, `/usr/lib/firmware`, `/lib/modules`, and - `/usr/share`, which are automatically excluded. + locations, `/lib/firmware`, `/usr/lib/firmware`, `/lib/modules`, + `/usr/lib/modules`, and `/usr/share`, which are automatically excluded. The recommended way to define these variables is to use the following syntax:
support/scripts/check-bin-arch +1 -0
@@ -14,6 +14,7 @@ declare -a IGNORES=( # and its modules may still be 64-bit. To keep the basic # check-bin-arch logic simple, just skip this directory. "/lib/modules" + "/usr/lib/modules" # Skip files in /usr/share, several packages (qemu, # pru-software-support) legitimately install ELF binaries that
Signature · 1 line
2.14.1
PATCH v2 2/2 support/check-bin-arch: exclude kernel modules for merged /usr
Quoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
When using a merged /usr, the kernel module path is really
/usr/lib/modules, as /lib is a symlink to usr/lib .
Quoted 8 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Peter Korsgaard <[email protected]>Reviewed-by Peter Korsgaard <[email protected]>---
Changes v1 -> v2:
- also add it to the manual
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH v2 2/2 support/check-bin-arch: exclude kernel modules for merged /usr
In reply to Yann E. MORINQuoted 5 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Yann" == Yann E MORIN <[email protected]> writes:
When using a merged /usr, the kernel module path is really
/usr/lib/modules, as /lib is a symlink to usr/lib .
Quoted 8 lines
Signed-off-by "Yann E. MORIN" <[email protected]>Cc Thomas Petazzoni <[email protected]>Cc Peter Korsgaard <[email protected]>Reviewed-by Peter Korsgaard <[email protected]>---
Changes v1 -> v2:
- also add it to the manual
Committed to 2018.02.x, thanks.
Signature · 1 line
Bye, Peter Korsgaard