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

Change when ldconfig runs and what files it looks for #1861

Merged
merged 1 commit into from
Dec 10, 2021

Conversation

arnaldo2792
Copy link
Contributor

Issue number:
N / A

Description of changes:
Related to #1799 , that PR is quite big. I'm taking some of the commits in that PR as their individual PR. The commit in this PR is variant independent, since it changes a package used among all variants.

507d5eae systemd: delay ldconfig.service

There are packages that create ldconfig.d/*.conf files using a tmpfilesd file to cache additional libraries, thus ldconfig.service has to run after the tmpfilesd daemon creates the files.

8b20ba9b Include ld.so.conf.d/* to build ld cache

This commit adds a configuration file for ldconfig to read additional configurations from /etc/ld.so.conf, which will be created at runtime by the tmpfilesd daemon.

Testing done:

  • Build a Bottlerocket aws-dev image
  • Confirmed that ldconfig.service waits for systemd-tmpfiles-setup.service
  • Confirmed that ldconfig looks for libraries in directories specified in /etc/ld.so.conf.d/*.conf files

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

Comment on lines 1 to 4
[Unit]
# Run `ldconfig.service` after `tmpfilesd`, since `ldconfig` will attempt to
# read files from `/etc/ld.so.conf.d`, which are created by `tmpfilesd`
After=systemd-tmpfiles-setup.service
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's put this in glibc as well; I think that's more clear since it's the use of ld.so.conf via tmpfiles that creates this ordering requirement.

@arnaldo2792
Copy link
Contributor Author

Forced push includes:

  • Move drop-in file to glibc instead of release

This commit adds a configuration file for ldconfig to read additional
configurations from /etc/ld.so.conf, which will be created at runtime by
the tmpfilesd daemon.

There are packages that create `ldconfig.d/*.conf` files using a
tmpfilesd file to cache additional libraries, thus `ldconfig.service`
has to run after the tmpfilesd daemon creates the files.

Signed-off-by: Arnaldo Garcia Rincon <[email protected]>
@arnaldo2792
Copy link
Contributor Author

Forced push squashes both commits. In previous versions, the commits modified different packages, and now they modify the same package.

@arnaldo2792 arnaldo2792 merged commit 7d31aba into bottlerocket-os:develop Dec 10, 2021
@arnaldo2792 arnaldo2792 deleted the ldconfig branch December 10, 2021 20:29
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