diff options
author | Javier Jardón <jjardon@gnome.org> | 2018-12-04 20:13:15 +0000 |
---|---|---|
committer | Javier Jardón <jjardon@gnome.org> | 2018-12-09 16:59:26 +0000 |
commit | 56c2c2cc1df78d04cb46e288db4cd75552f1c153 (patch) | |
tree | 8cbf81b89b6f6483ebdc35c98a440b0af9340ad8 | |
parent | 2a0676c3bf607a95a41bd802839eaf677588bf79 (diff) | |
download | buildstream-56c2c2cc1df78d04cb46e288db4cd75552f1c153.tar.gz |
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
-rw-r--r-- | buildstream/data/projectconfig.yaml | 36 | ||||
-rw-r--r-- | tests/cachekey/project/elements/build1.expected | 2 | ||||
-rw-r--r-- | tests/cachekey/project/elements/build2.expected | 2 | ||||
-rw-r--r-- | tests/cachekey/project/target.expected | 2 | ||||
-rw-r--r-- | tests/examples/autotools.py | 4 | ||||
-rw-r--r-- | tests/examples/developing.py | 4 | ||||
-rw-r--r-- | tests/examples/flatpak-autotools.py | 4 | ||||
-rw-r--r-- | tests/integration/autotools.py | 8 | ||||
-rw-r--r-- | tests/integration/cmake.py | 10 | ||||
-rw-r--r-- | tests/integration/compose.py | 34 |
10 files changed, 26 insertions, 80 deletions
diff --git a/buildstream/data/projectconfig.yaml b/buildstream/data/projectconfig.yaml index 4fe95a620..e9bdaa160 100644 --- a/buildstream/data/projectconfig.yaml +++ b/buildstream/data/projectconfig.yaml @@ -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' ] diff --git a/tests/cachekey/project/elements/build1.expected b/tests/cachekey/project/elements/build1.expected index ef18ad98b..623a491e9 100644 --- a/tests/cachekey/project/elements/build1.expected +++ b/tests/cachekey/project/elements/build1.expected @@ -1 +1 @@ -a0d000abc1dea8714cd27f348d0b798b35e7246c44e330c4b3f7912fabacc6db
\ No newline at end of file +dadb8f86874f714b4f6d4c9025332934efb7e85c38f6a68b1267746ae8f43f24 diff --git a/tests/cachekey/project/elements/build2.expected b/tests/cachekey/project/elements/build2.expected index 015085d9e..34853b9ad 100644 --- a/tests/cachekey/project/elements/build2.expected +++ b/tests/cachekey/project/elements/build2.expected @@ -1 +1 @@ -79f546a78748d943a6958c99ab4ad03305f96fefd0b424b6b246b0c9816e00c6
\ No newline at end of file +f81cefce283dd3581ba2fc865ff9c2763119274b114b12edb4e87196cfff8b2a diff --git a/tests/cachekey/project/target.expected b/tests/cachekey/project/target.expected index 00ac2beeb..66a38036e 100644 --- a/tests/cachekey/project/target.expected +++ b/tests/cachekey/project/target.expected @@ -1 +1 @@ -d6d283ed1fb0467fcfa5bf69f8596d0f0ac6638281bc9d8e52e1212e2ec0bcab
\ No newline at end of file +92dae6a712b4f91f4fdbdf8dad732cf07ff4da092a319fa4f4b261a9287640de diff --git a/tests/examples/autotools.py b/tests/examples/autotools.py index 8e4bf5a75..af440cc6f 100644 --- a/tests/examples/autotools.py +++ b/tests/examples/autotools.py @@ -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']) diff --git a/tests/examples/developing.py b/tests/examples/developing.py index 0a51802a9..3b09962bd 100644 --- a/tests/examples/developing.py +++ b/tests/examples/developing.py @@ -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']) diff --git a/tests/examples/flatpak-autotools.py b/tests/examples/flatpak-autotools.py index 73910c5eb..d63771ebf 100644 --- a/tests/examples/flatpak-autotools.py +++ b/tests/examples/flatpak-autotools.py @@ -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']) diff --git a/tests/integration/autotools.py b/tests/integration/autotools.py index b80dd6d61..1dc7eeacc 100644 --- a/tests/integration/autotools.py +++ b/tests/integration/autotools.py @@ -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']) diff --git a/tests/integration/cmake.py b/tests/integration/cmake.py index d5d1a1695..235dee321 100644 --- a/tests/integration/cmake.py +++ b/tests/integration/cmake.py @@ -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) diff --git a/tests/integration/compose.py b/tests/integration/compose.py index 885497c48..9d647fae9 100644 --- a/tests/integration/compose.py +++ b/tests/integration/compose.py @@ -38,48 +38,40 @@ def create_compose_element(name, path, config={}): @pytest.mark.datafiles(DATA_DIR) @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', '/usr/bin', + '/usr/share', + '/usr/bin/hello', '/usr/share/doc', '/usr/share/doc/amhello', '/usr/share/doc/amhello/README', '/tests', '/tests/test']), # Test only runtime - (['runtime'], [], ['/usr', '/usr/lib', '/usr/share', + (['runtime'], [], ['/usr', '/usr/share', '/usr/bin', '/usr/bin/hello']), # Test with runtime and doc - (['runtime', 'doc'], [], ['/usr', '/usr/lib', '/usr/share', + (['runtime', 'doc'], [], ['/usr', '/usr/share', '/usr/bin', '/usr/bin/hello', '/usr/share/doc', '/usr/share/doc/amhello', '/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', + ([], ['runtime'], ['/usr', '/usr/share', '/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', + ([], ['runtime', 'doc'], ['/usr', '/usr/share', '/tests', '/tests/test']), # Test with runtime simultaneously in- and excluded - (['runtime'], ['runtime'], ['/usr', '/usr/lib', '/usr/share']), + (['runtime'], ['runtime'], ['/usr', '/usr/share']), # Test with runtime included and doc excluded - (['runtime'], ['doc'], ['/usr', '/usr/lib', '/usr/share', + (['runtime'], ['doc'], ['/usr', '/usr/share', '/usr/bin', '/usr/bin/hello']), # Test including a custom 'test' domain - (['test'], [], ['/usr', '/usr/lib', '/usr/share', + (['test'], [], ['/usr', '/usr/share', '/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', + ([], ['test'], ['/usr', '/usr/bin', + '/usr/share', + '/usr/bin/hello', '/usr/share/doc', '/usr/share/doc/amhello', '/usr/share/doc/amhello/README']) ]) |