Skip to content
Snippets Groups Projects
Commit 94be49a1 authored by Javier Jardón's avatar Javier Jardón
Browse files

buildstream/data/projectconfig.yaml: Remove default strip-binaries

They are too specific to be included by default

Recommendation is if you are building in Linux is to use the
ones begin used in the freedesktop-sdk project, for example

See #645
parent f7581026
No related branches found
No related tags found
No related merge requests found
......@@ -44,38 +44,8 @@ variables:
# Indicates the build installation directory in the sandbox
install-root: /buildstream-install
# Arguments for tooling used when stripping debug symbols
objcopy-link-args: --add-gnu-debuglink
objcopy-extract-args: |
--only-keep-debug --compress-debug-sections
strip-args: |
--remove-section=.comment --remove-section=.note --strip-unneeded
# Generic implementation for stripping debugging symbols
strip-binaries: |
cd "%{install-root}" && find -type f \
'(' -perm -111 -o -name '*.so*' \
-o -name '*.cmxs' -o -name '*.node' ')' \
-exec sh -ec \
'read -n4 hdr <"$1" # check for elf header
case "$1" in
%{install-root}%{debugdir}/*)
exit 0
;;
esac
if [ "$hdr" != "$(printf \\x7fELF)" ]; then
exit 0
fi
debugfile="%{install-root}%{debugdir}/$1"
mkdir -p "$(dirname "$debugfile")"
objcopy %{objcopy-extract-args} "$1" "$debugfile"
chmod 644 "$debugfile"
strip %{strip-args} "$1"
objcopy %{objcopy-link-args} "$debugfile" "$1"' - {} ';'
# You need to override this with the commands specific for your system
strip-binaries: ""
# Generic implementation for reproducible python builds
fix-pyc-timestamps: |
......@@ -196,4 +166,4 @@ shell:
# Command to run when `bst shell` does not provide a command
#
command: [ 'sh', '-i' ]
\ No newline at end of file
command: [ 'sh', '-i' ]
ce0ddf7126d45d14f5ec1a525337c39ec8ddbbe4b0ec2ef51bae777619ed39bb
\ No newline at end of file
dd211062098430b528dbfe327484b1d4daa9d7442cd3915857184a9381ff09d3
5e2a48dbeae43f6bab84071dbd02345a3aa32a473c189645ab26f3d5d6cfe547
\ No newline at end of file
4d5359b872737b4c97e3989fe060eee04ceb59d534a33a81cb845507d735e466
125d9e7dcf4f49e5f80d85b7f144b43ed43186064afc2e596e57f26cce679cf5
\ No newline at end of file
9df2f39e68131e95bbcd221ab3d306ed87619984a83385687f93e1d8601d3525
......@@ -29,9 +29,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
result.assert_success()
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
'/usr/share', '/usr/lib/debug',
'/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello',
'/usr/share',
'/usr/bin/hello',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
......
......@@ -30,9 +30,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
result.assert_success()
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
'/usr/share', '/usr/lib/debug',
'/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello',
'/usr/share',
'/usr/bin/hello'])
......
......@@ -48,9 +48,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
'/usr/share', '/usr/lib/debug',
'/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello',
'/usr/share',
'/usr/bin/hello', '/usr/share/doc',
'/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
......
......@@ -32,9 +32,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
'/usr/share', '/usr/lib/debug',
'/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello',
'/usr/share',
'/usr/bin/hello', '/usr/share/doc',
'/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
......@@ -57,9 +55,7 @@ def test_autotools_confroot_build(cli, tmpdir, datafiles):
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
'/usr/share', '/usr/lib/debug',
'/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello',
'/usr/share',
'/usr/bin/hello', '/usr/share/doc',
'/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
......
......@@ -28,10 +28,7 @@ def test_cmake_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['checkout', element_name, checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello',
'/usr/lib/debug', '/usr/lib/debug/usr',
'/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello'])
assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
@pytest.mark.datafiles(DATA_DIR)
......@@ -47,10 +44,7 @@ def test_cmake_confroot_build(cli, tmpdir, datafiles):
result = cli.run(project=project, args=['checkout', element_name, checkout])
assert result.exit_code == 0
assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello',
'/usr/lib/debug', '/usr/lib/debug/usr',
'/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello'])
assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
@pytest.mark.datafiles(DATA_DIR)
......
......@@ -39,9 +39,8 @@ def create_compose_element(name, path, config={}):
@pytest.mark.parametrize("include_domains,exclude_domains,expected", [
# Test flat inclusion
([], [], ['/usr', '/usr/lib', '/usr/bin',
'/usr/share', '/usr/lib/debug',
'/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello', '/usr/bin/hello',
'/usr/share',
'/usr/bin/hello',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README',
'/tests', '/tests/test']),
......@@ -55,17 +54,11 @@ def create_compose_element(name, path, config={}):
'/usr/share/doc/amhello/README']),
# Test with only runtime excluded
([], ['runtime'], ['/usr', '/usr/lib', '/usr/share',
'/usr/lib/debug', '/usr/lib/debug/usr',
'/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README',
'/tests', '/tests/test']),
# Test with runtime and doc excluded
([], ['runtime', 'doc'], ['/usr', '/usr/lib', '/usr/share',
'/usr/lib/debug', '/usr/lib/debug/usr',
'/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello',
'/tests', '/tests/test']),
# Test with runtime simultaneously in- and excluded
(['runtime'], ['runtime'], ['/usr', '/usr/lib', '/usr/share']),
......@@ -77,9 +70,8 @@ def create_compose_element(name, path, config={}):
'/tests', '/tests/test']),
# Test excluding a custom 'test' domain
([], ['test'], ['/usr', '/usr/lib', '/usr/bin',
'/usr/share', '/usr/lib/debug',
'/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
'/usr/lib/debug/usr/bin/hello', '/usr/bin/hello',
'/usr/share',
'/usr/bin/hello',
'/usr/share/doc', '/usr/share/doc/amhello',
'/usr/share/doc/amhello/README'])
])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment