Skip to content

Update ldd|awk to account for Bookworm's merged /usr #1927

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

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

yosifkit
Copy link
Contributor

Description

Bookworm moved to UsrMerge by default. This means /lib is a symlink to /usr/lib, so some ldd returned paths need to be adjusted so that Debian can figure out which package it belongs to (since the package will report /usr/lib... now). The fix is backward compatible with Buster and Bullseye based images.

The same change was done for other Docker Official Images: docker-library/php#1416, docker-library/wordpress#834, docker-library/python#822.

Motivation and Context

Without this, the node:*-bookworm-slim images fail to build on arm32v7 (https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/node/):

$ docker build --platform linux/arm/v7 20/bookworm-slim/
...
dpkg-query: no path found matching pattern /lib/arm-linux-gnueabihf/libatomic.so.1
dpkg-query: no path found matching pattern /lib/arm-linux-gnueabihf/libstdc++.so.6
libc6 set to manually installed.
libgcc-s1 set to manually installed.
+ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
  ca-certificates* curl* dirmngr* gnupg* gnupg-l10n* gnupg-utils* gpg*
  gpg-agent* gpg-wks-client* gpg-wks-server* gpgconf* gpgsm* libassuan0*
  libatomic1* libbrotli1* libcurl4* libgssapi-krb5-2* libk5crypto3*
  libkeyutils1* libkrb5-3* libkrb5support0* libksba8* libldap-2.5-0*
  libncursesw6* libnghttp2-14* libnpth0* libpsl5* libreadline8* librtmp1*
  libsasl2-2* libsasl2-modules-db* libsqlite3-0* libssh2-1* libssl3* openssl*
  pinentry-curses* readline-common* wget* xz-utils*
0 upgraded, 0 newly installed, 39 to remove and 0 not upgraded.
...
+ ln -s /usr/local/bin/node /usr/local/bin/nodejs
+ node --version
node: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

Testing Details

Just ran docker build --platform linux/arm/v7 20/bookworm-slim/ to ensure that it did fix this issue.
(Assuming a host with the correct platform or emulation, like automatically available in Docker Desktop)

Types of changes

  • Documentation
  • Version change (Update, remove or add more Node.js versions)
  • Variant change (Update, remove or add more variants, or versions of variants)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (none of the above)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING.md document.
  • All new and existing tests passed.
    • tests should pass, but haven't run them

@nschonni nschonni merged commit 7b04e27 into nodejs:main Jun 28, 2023
@github-actions
Copy link

Created PR on the official-images repo (docker-library/official-images#14950). See https://github.com/docker-library/faq#an-images-source-changed-in-git-now-what if you are wondering when it will be available on the Docker Hub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants