Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T5589: Nonstripped binaries exists in VyOS #434

Merged
merged 1 commit into from Oct 9, 2023
Merged

Conversation

Apachez-
Copy link
Contributor

@Apachez- Apachez- commented Oct 4, 2023

Change Summary

Add capability to exclude files from being stripped by data/live-build-config/hooks/live/99-strip-symbols.chroot.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Follow up on:

Component(s) name

build

Proposed changes

Turns out that package binutils contains libraries who have not been stripped according to Debian policy:

Parse dir (strip-unneeded: /usr/lib/x86_64-linux-gnu
Strip file (strip-unneeded): /usr/lib/x86_64-linux-gnu/libsframe.so.0.0.0
/root/99-strip-symbols.chroot: line 53: 52424 Segmentation fault      (core dumped) ${STRIPCMD_UNNEEDED} ${FILE}
Strip file (strip-unneeded): /usr/lib/x86_64-linux-gnu/libusdm_drv_s.so
Parse dir (strip-unneeded: /usr/lib32

This commit add variable STRIP_EXCLUDE to exclude files from being stripped by the 99-strip-symbols.chroot script.

Currently the files to be excluded are added dynamically to be compatible with future updates of the libbinutils package (installed by package binutils):

STRIP_EXCLUDE=`dpkg-query -L libbinutils | grep '.so'`

How to test

During build of ISO the log output should look something like this (good):

Exclude files: /usr/lib/x86_64-linux-gnu/libbfd-2.40-system.so
/usr/lib/x86_64-linux-gnu/libopcodes-2.40-system.so
/usr/lib/x86_64-linux-gnu/libsframe.so.0.0.0
/usr/lib/x86_64-linux-gnu/libsframe.so.0
Parse dir (strip-debug): /usr/lib/modules
...
Parse dir (strip-unneeded: /usr/lib/x86_64-linux-gnu
Strip file (strip-unneeded): /usr/lib/x86_64-linux-gnu/libusdm_drv_s.so
Parse dir (strip-unneeded: /usr/lib32

rather than this (bad):

Parse dir (strip-unneeded: /usr/lib/x86_64-linux-gnu
Strip file (strip-unneeded): /usr/lib/x86_64-linux-gnu/libsframe.so.0.0.0
/root/99-strip-symbols.chroot: line 53: 52424 Segmentation fault      (core dumped) ${STRIPCMD_UNNEEDED} ${FILE}
Strip file (strip-unneeded): /usr/lib/x86_64-linux-gnu/libusdm_drv_s.so
Parse dir (strip-unneeded: /usr/lib32

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@vyosbot vyosbot requested review from a team, dmbaturin, sarthurdev, zdc, jestabro, sever-sever and c-po and removed request for a team October 4, 2023 14:34
@c-po c-po merged commit c0662f7 into vyos:current Oct 9, 2023
4 checks passed
@Apachez- Apachez- deleted the T5589 branch October 9, 2023 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 participants