[Notes] [Git][BuildStream/buildstream][jjardon/strip-binaries-removal] 3 commits: buildstream/data/projectconfig.yaml: Remove default strip-binaries



Title: GitLab

Javier Jardón pushed to branch jjardon/strip-binaries-removal at BuildStream / buildstream

Commits:

21 changed files:

Changes:

  • NEWS
    ... ... @@ -2,6 +2,10 @@
    2 2
     buildstream 1.3.1
    
    3 3
     =================
    
    4 4
     
    
    5
    +  o BREAKING CHANGE: Default strip-commands have been removed as they are too
    
    6
    +    specific. Recommendation if you are building in Linux is to use the
    
    7
    +    ones begin used in freedesktop-sdk project, for example
    
    8
    +
    
    5 9
       o All elements must now be suffixed with `.bst`
    
    6 10
         Attempting to use an element that does not have the `.bst` extension,
    
    7 11
         will result in a warning.
    

  • buildstream/data/projectconfig.yaml
    ... ... @@ -44,38 +44,8 @@ variables:
    44 44
       # Indicates the build installation directory in the sandbox
    
    45 45
       install-root: /buildstream-install
    
    46 46
     
    
    47
    -  # Arguments for tooling used when stripping debug symbols
    
    48
    -  objcopy-link-args: --add-gnu-debuglink
    
    49
    -  objcopy-extract-args: |
    
    50
    -
    
    51
    -    --only-keep-debug --compress-debug-sections
    
    52
    -
    
    53
    -  strip-args: |
    
    54
    -
    
    55
    -    --remove-section=.comment --remove-section=.note --strip-unneeded
    
    56
    -
    
    57
    -  # Generic implementation for stripping debugging symbols
    
    58
    -  strip-binaries: |
    
    59
    -
    
    60
    -    cd "%{install-root}" && find -type f \
    
    61
    -      '(' -perm -111 -o -name '*.so*' \
    
    62
    -          -o -name '*.cmxs' -o -name '*.node' ')' \
    
    63
    -      -exec sh -ec \
    
    64
    -      'read -n4 hdr <"$1" # check for elf header
    
    65
    -       case "$1" in
    
    66
    -         %{install-root}%{debugdir}/*)
    
    67
    -           exit 0
    
    68
    -           ;;
    
    69
    -       esac
    
    70
    -       if [ "$hdr" != "$(printf \\x7fELF)" ]; then
    
    71
    -           exit 0
    
    72
    -       fi
    
    73
    -       debugfile="%{install-root}%{debugdir}/$1"
    
    74
    -       mkdir -p "$(dirname "$debugfile")"
    
    75
    -       objcopy %{objcopy-extract-args} "$1" "$debugfile"
    
    76
    -       chmod 644 "$debugfile"
    
    77
    -       strip %{strip-args} "$1"
    
    78
    -       objcopy %{objcopy-link-args} "$debugfile" "$1"' - {} ';'
    
    47
    +  # You need to override this with the commands specific for your system
    
    48
    +  strip-binaries: ""
    
    79 49
     
    
    80 50
       # Generic implementation for reproducible python builds
    
    81 51
       fix-pyc-timestamps: |
    
    ... ... @@ -196,4 +166,4 @@ shell:
    196 166
     
    
    197 167
       # Command to run when `bst shell` does not provide a command
    
    198 168
       #
    
    199
    -  command: [ 'sh', '-i' ]
    \ No newline at end of file
    169
    +  command: [ 'sh', '-i' ]

  • buildstream/plugins/elements/autotools.py
    ... ... @@ -51,6 +51,14 @@ Here is the default configuration for the ``autotools`` element in full:
    51 51
       .. literalinclude:: ../../../buildstream/plugins/elements/autotools.yaml
    
    52 52
          :language: yaml
    
    53 53
     
    
    54
    +.. note::
    
    55
    +
    
    56
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    57
    +   appropiate commands depending of the system you are building.
    
    58
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    59
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    60
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    61
    +
    
    54 62
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    55 63
     details on common configuration options for build elements.
    
    56 64
     """
    

  • buildstream/plugins/elements/cmake.py
    ... ... @@ -50,6 +50,14 @@ Here is the default configuration for the ``cmake`` element in full:
    50 50
       .. literalinclude:: ../../../buildstream/plugins/elements/cmake.yaml
    
    51 51
          :language: yaml
    
    52 52
     
    
    53
    +.. note::
    
    54
    +
    
    55
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    56
    +   appropiate commands depending of the system you are building.
    
    57
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    58
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    59
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    60
    +
    
    53 61
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    54 62
     details on common configuration options for build elements.
    
    55 63
     """
    

  • buildstream/plugins/elements/distutils.py
    ... ... @@ -27,6 +27,14 @@ The distutils default configuration:
    27 27
       .. literalinclude:: ../../../buildstream/plugins/elements/distutils.yaml
    
    28 28
          :language: yaml
    
    29 29
     
    
    30
    +.. note::
    
    31
    +
    
    32
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    33
    +   appropiate commands depending of the system you are building.
    
    34
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    35
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    36
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    37
    +
    
    30 38
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    31 39
     details on common configuration options for build elements.
    
    32 40
     """
    

  • buildstream/plugins/elements/make.py
    ... ... @@ -32,6 +32,14 @@ Here is the default configuration for the ``make`` element in full:
    32 32
       .. literalinclude:: ../../../buildstream/plugins/elements/make.yaml
    
    33 33
          :language: yaml
    
    34 34
     
    
    35
    +.. note::
    
    36
    +
    
    37
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    38
    +   appropiate commands depending of the system you are building.
    
    39
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    40
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    41
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    42
    +
    
    35 43
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    36 44
     details on common configuration options for build elements.
    
    37 45
     """
    

  • buildstream/plugins/elements/makemaker.py
    ... ... @@ -27,6 +27,14 @@ The MakeMaker default configuration:
    27 27
       .. literalinclude:: ../../../buildstream/plugins/elements/makemaker.yaml
    
    28 28
          :language: yaml
    
    29 29
     
    
    30
    +.. note::
    
    31
    +
    
    32
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    33
    +   appropiate commands depending of the system you are building.
    
    34
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    35
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    36
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    37
    +
    
    30 38
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    31 39
     details on common configuration options for build elements.
    
    32 40
     """
    

  • buildstream/plugins/elements/manual.py
    ... ... @@ -27,6 +27,15 @@ The empty configuration is as such:
    27 27
       .. literalinclude:: ../../../buildstream/plugins/elements/manual.yaml
    
    28 28
          :language: yaml
    
    29 29
     
    
    30
    +.. note::
    
    31
    +
    
    32
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    33
    +   appropiate commands depending of the system you are building.
    
    34
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    35
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    36
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    37
    +
    
    38
    +
    
    30 39
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    31 40
     details on common configuration options for build elements.
    
    32 41
     """
    

  • buildstream/plugins/elements/meson.py
    ... ... @@ -47,6 +47,14 @@ Here is the default configuration for the ``meson`` element in full:
    47 47
       .. literalinclude:: ../../../buildstream/plugins/elements/meson.yaml
    
    48 48
          :language: yaml
    
    49 49
     
    
    50
    +.. note::
    
    51
    +
    
    52
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    53
    +   appropiate commands depending of the system you are building.
    
    54
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    55
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    56
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    57
    +
    
    50 58
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    51 59
     details on common configuration options for build elements.
    
    52 60
     """
    

  • buildstream/plugins/elements/modulebuild.py
    ... ... @@ -27,6 +27,14 @@ The modulebuild default configuration:
    27 27
       .. literalinclude:: ../../../buildstream/plugins/elements/modulebuild.yaml
    
    28 28
          :language: yaml
    
    29 29
     
    
    30
    +.. note::
    
    31
    +
    
    32
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    33
    +   appropiate commands depending of the system you are building.
    
    34
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    35
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    36
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    37
    +
    
    30 38
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    31 39
     details on common configuration options for build elements.
    
    32 40
     """
    

  • buildstream/plugins/elements/pip.py
    ... ... @@ -27,6 +27,14 @@ The pip default configuration:
    27 27
       .. literalinclude:: ../../../buildstream/plugins/elements/pip.yaml
    
    28 28
          :language: yaml
    
    29 29
     
    
    30
    +.. note::
    
    31
    +
    
    32
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    33
    +   appropiate commands depending of the system you are building.
    
    34
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    35
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    36
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    37
    +
    
    30 38
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    31 39
     details on common configuration options for build elements.
    
    32 40
     """
    

  • buildstream/plugins/elements/qmake.py
    ... ... @@ -27,6 +27,14 @@ The qmake default configuration:
    27 27
       .. literalinclude:: ../../../buildstream/plugins/elements/qmake.yaml
    
    28 28
          :language: yaml
    
    29 29
     
    
    30
    +.. note::
    
    31
    +
    
    32
    +   The `strip-binaries` variable is by default **empty**. You need to use the
    
    33
    +   appropiate commands depending of the system you are building.
    
    34
    +   If you are targetting Linux, ones known to work are the ones used by the
    
    35
    +   `freedesktop-sdk <https://freedesktop-sdk.io/>`_, you can take a look to them in their
    
    36
    +   `project.conf <https://gitlab.com/freedesktop-sdk/freedesktop-sdk/blob/freedesktop-sdk-18.08.21/project.conf#L74>`_
    
    37
    +
    
    30 38
     See :ref:`built-in functionality documentation <core_buildelement_builtins>` for
    
    31 39
     details on common configuration options for build elements.
    
    32 40
     """
    

  • tests/cachekey/project/elements/build1.expected
    1
    -ce0ddf7126d45d14f5ec1a525337c39ec8ddbbe4b0ec2ef51bae777619ed39bb
    \ No newline at end of file
    1
    +dd211062098430b528dbfe327484b1d4daa9d7442cd3915857184a9381ff09d3

  • tests/cachekey/project/elements/build2.expected
    1
    -5e2a48dbeae43f6bab84071dbd02345a3aa32a473c189645ab26f3d5d6cfe547
    \ No newline at end of file
    1
    +4d5359b872737b4c97e3989fe060eee04ceb59d534a33a81cb845507d735e466

  • tests/cachekey/project/target.expected
    1
    -125d9e7dcf4f49e5f80d85b7f144b43ed43186064afc2e596e57f26cce679cf5
    \ No newline at end of file
    1
    +9df2f39e68131e95bbcd221ab3d306ed87619984a83385687f93e1d8601d3525

  • tests/examples/autotools.py
    ... ... @@ -29,9 +29,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
    29 29
         result.assert_success()
    
    30 30
     
    
    31 31
         assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
    
    32
    -                               '/usr/share', '/usr/lib/debug',
    
    33
    -                               '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
    
    34
    -                               '/usr/lib/debug/usr/bin/hello',
    
    32
    +                               '/usr/share',
    
    35 33
                                    '/usr/bin/hello',
    
    36 34
                                    '/usr/share/doc', '/usr/share/doc/amhello',
    
    37 35
                                    '/usr/share/doc/amhello/README'])
    

  • tests/examples/developing.py
    ... ... @@ -30,9 +30,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
    30 30
         result.assert_success()
    
    31 31
     
    
    32 32
         assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
    
    33
    -                               '/usr/share', '/usr/lib/debug',
    
    34
    -                               '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
    
    35
    -                               '/usr/lib/debug/usr/bin/hello',
    
    33
    +                               '/usr/share',
    
    36 34
                                    '/usr/bin/hello'])
    
    37 35
     
    
    38 36
     
    

  • tests/examples/flatpak-autotools.py
    ... ... @@ -48,9 +48,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
    48 48
         assert result.exit_code == 0
    
    49 49
     
    
    50 50
         assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
    
    51
    -                               '/usr/share', '/usr/lib/debug',
    
    52
    -                               '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
    
    53
    -                               '/usr/lib/debug/usr/bin/hello',
    
    51
    +                               '/usr/share',
    
    54 52
                                    '/usr/bin/hello', '/usr/share/doc',
    
    55 53
                                    '/usr/share/doc/amhello',
    
    56 54
                                    '/usr/share/doc/amhello/README'])
    

  • tests/integration/autotools.py
    ... ... @@ -32,9 +32,7 @@ def test_autotools_build(cli, tmpdir, datafiles):
    32 32
         assert result.exit_code == 0
    
    33 33
     
    
    34 34
         assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
    
    35
    -                               '/usr/share', '/usr/lib/debug',
    
    36
    -                               '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
    
    37
    -                               '/usr/lib/debug/usr/bin/hello',
    
    35
    +                               '/usr/share',
    
    38 36
                                    '/usr/bin/hello', '/usr/share/doc',
    
    39 37
                                    '/usr/share/doc/amhello',
    
    40 38
                                    '/usr/share/doc/amhello/README'])
    
    ... ... @@ -57,9 +55,7 @@ def test_autotools_confroot_build(cli, tmpdir, datafiles):
    57 55
         assert result.exit_code == 0
    
    58 56
     
    
    59 57
         assert_contains(checkout, ['/usr', '/usr/lib', '/usr/bin',
    
    60
    -                               '/usr/share', '/usr/lib/debug',
    
    61
    -                               '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
    
    62
    -                               '/usr/lib/debug/usr/bin/hello',
    
    58
    +                               '/usr/share',
    
    63 59
                                    '/usr/bin/hello', '/usr/share/doc',
    
    64 60
                                    '/usr/share/doc/amhello',
    
    65 61
                                    '/usr/share/doc/amhello/README'])
    

  • tests/integration/cmake.py
    ... ... @@ -28,10 +28,7 @@ def test_cmake_build(cli, tmpdir, datafiles):
    28 28
         result = cli.run(project=project, args=['checkout', element_name, checkout])
    
    29 29
         assert result.exit_code == 0
    
    30 30
     
    
    31
    -    assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello',
    
    32
    -                               '/usr/lib/debug', '/usr/lib/debug/usr',
    
    33
    -                               '/usr/lib/debug/usr/bin',
    
    34
    -                               '/usr/lib/debug/usr/bin/hello'])
    
    31
    +    assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
    
    35 32
     
    
    36 33
     
    
    37 34
     @pytest.mark.datafiles(DATA_DIR)
    
    ... ... @@ -47,10 +44,7 @@ def test_cmake_confroot_build(cli, tmpdir, datafiles):
    47 44
         result = cli.run(project=project, args=['checkout', element_name, checkout])
    
    48 45
         assert result.exit_code == 0
    
    49 46
     
    
    50
    -    assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello',
    
    51
    -                               '/usr/lib/debug', '/usr/lib/debug/usr',
    
    52
    -                               '/usr/lib/debug/usr/bin',
    
    53
    -                               '/usr/lib/debug/usr/bin/hello'])
    
    47
    +    assert_contains(checkout, ['/usr', '/usr/bin', '/usr/bin/hello'])
    
    54 48
     
    
    55 49
     
    
    56 50
     @pytest.mark.datafiles(DATA_DIR)
    

  • tests/integration/compose.py
    ... ... @@ -39,9 +39,8 @@ def create_compose_element(name, path, config={}):
    39 39
     @pytest.mark.parametrize("include_domains,exclude_domains,expected", [
    
    40 40
         # Test flat inclusion
    
    41 41
         ([], [], ['/usr', '/usr/lib', '/usr/bin',
    
    42
    -              '/usr/share', '/usr/lib/debug',
    
    43
    -              '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
    
    44
    -              '/usr/lib/debug/usr/bin/hello', '/usr/bin/hello',
    
    42
    +              '/usr/share',
    
    43
    +              '/usr/bin/hello',
    
    45 44
                   '/usr/share/doc', '/usr/share/doc/amhello',
    
    46 45
                   '/usr/share/doc/amhello/README',
    
    47 46
                   '/tests', '/tests/test']),
    
    ... ... @@ -55,17 +54,11 @@ def create_compose_element(name, path, config={}):
    55 54
                                   '/usr/share/doc/amhello/README']),
    
    56 55
         # Test with only runtime excluded
    
    57 56
         ([], ['runtime'], ['/usr', '/usr/lib', '/usr/share',
    
    58
    -                       '/usr/lib/debug', '/usr/lib/debug/usr',
    
    59
    -                       '/usr/lib/debug/usr/bin',
    
    60
    -                       '/usr/lib/debug/usr/bin/hello',
    
    61 57
                            '/usr/share/doc', '/usr/share/doc/amhello',
    
    62 58
                            '/usr/share/doc/amhello/README',
    
    63 59
                            '/tests', '/tests/test']),
    
    64 60
         # Test with runtime and doc excluded
    
    65 61
         ([], ['runtime', 'doc'], ['/usr', '/usr/lib', '/usr/share',
    
    66
    -                              '/usr/lib/debug', '/usr/lib/debug/usr',
    
    67
    -                              '/usr/lib/debug/usr/bin',
    
    68
    -                              '/usr/lib/debug/usr/bin/hello',
    
    69 62
                                   '/tests', '/tests/test']),
    
    70 63
         # Test with runtime simultaneously in- and excluded
    
    71 64
         (['runtime'], ['runtime'], ['/usr', '/usr/lib', '/usr/share']),
    
    ... ... @@ -77,9 +70,8 @@ def create_compose_element(name, path, config={}):
    77 70
                         '/tests', '/tests/test']),
    
    78 71
         # Test excluding a custom 'test' domain
    
    79 72
         ([], ['test'], ['/usr', '/usr/lib', '/usr/bin',
    
    80
    -                    '/usr/share', '/usr/lib/debug',
    
    81
    -                    '/usr/lib/debug/usr', '/usr/lib/debug/usr/bin',
    
    82
    -                    '/usr/lib/debug/usr/bin/hello', '/usr/bin/hello',
    
    73
    +                    '/usr/share',
    
    74
    +                    '/usr/bin/hello',
    
    83 75
                         '/usr/share/doc', '/usr/share/doc/amhello',
    
    84 76
                         '/usr/share/doc/amhello/README'])
    
    85 77
     ])
    



  • [Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]