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

gcrypt: dlopenify for libsystemd #32019

Merged
merged 2 commits into from Apr 3, 2024
Merged

gcrypt: dlopenify for libsystemd #32019

merged 2 commits into from Apr 3, 2024

Conversation

bluca
Copy link
Member

@bluca bluca commented Mar 30, 2024

gcrypt is used only for journal sealing operations in libsystemd, so it can be made into a dlopen dependency that is used only on demand. This allows to reduce the footprint of libsystemd in the most common cases.

Keep systemd-pull and systemd-resolved with normal linking, as they are executables, and usually built with OpenSSL support anyway.

src/resolve/resolved-dns-dnssec.c Outdated Show resolved Hide resolved
src/basic/gcrypt-util.h Show resolved Hide resolved
src/basic/gcrypt-util.c Outdated Show resolved Hide resolved
src/basic/gcrypt-util.h Outdated Show resolved Hide resolved
src/basic/gcrypt-util.h Outdated Show resolved Hide resolved
src/basic/gcrypt-util.h Outdated Show resolved Hide resolved
src/libsystemd/sd-journal/fsprg.c Outdated Show resolved Hide resolved
src/libsystemd/sd-journal/fsprg.c Outdated Show resolved Hide resolved
src/libsystemd/sd-journal/fsprg.c Outdated Show resolved Hide resolved
src/libsystemd/sd-journal/journal-authenticate.c Outdated Show resolved Hide resolved
@DaanDeMeyer DaanDeMeyer added good-to-merge/with-minor-suggestions and removed please-review PR is ready for (re-)review by a maintainer labels Apr 3, 2024
gcrypt is used only for journal sealing operations in libsystemd, so it
can be made into a dlopen dependency that is used only on demand. This
allows to reduce the footprint of libsystemd in the most common cases.

Keep systemd-pull and systemd-resolved with normal linking, as they are
executables, and usually built with OpenSSL support anyway.
@bluca bluca added good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed and removed network good-to-merge/with-minor-suggestions labels Apr 3, 2024
@mbiebl
Copy link
Contributor

mbiebl commented Apr 3, 2024

Would be great that whenever a library is dlopened (for the first time), a log message (info) is sent to the journal.

@bluca
Copy link
Member Author

bluca commented Apr 3, 2024

Would be great that whenever a library is dlopened (for the first time), a log message (info) is sent to the journal.

info would be too verbose, as every time a binary is called you'd get the message, but we can add a debug one for sure

@bluca
Copy link
Member Author

bluca commented Apr 3, 2024

Would be great that whenever a library is dlopened (for the first time), a log message (info) is sent to the journal.

info would be too verbose, as every time a binary is called you'd get the message, but we can add a debug one for sure

-> #32065

@poettering
Copy link
Member

lgtm

@bluca bluca merged commit 26cbb21 into systemd:main Apr 3, 2024
44 of 49 checks passed
@bluca bluca deleted the gcrypt_dlopen branch April 3, 2024 15:10
@github-actions github-actions bot removed the good-to-merge/waiting-for-ci 👍 PR is good to merge, but CI hasn't passed at time of review. Please merge if you see CI has passed label Apr 3, 2024
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this pull request Apr 4, 2024
…y included

Some required libraries that used to be statically included are in the process
to be opened via `dlopen()`.

References:
- systemd/systemd#31131
- systemd/systemd#31550
- systemd/systemd#32019

Closes dracutdevs#2642
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this pull request Apr 4, 2024
…y included

Some required libraries that used to be statically included are in the process
to be opened via `dlopen()`.

References:
- systemd/systemd#31131
- systemd/systemd#31550
- systemd/systemd#32019
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this pull request Apr 4, 2024
…y included

Some required libraries that used to be statically included are in the process
to be opened via `dlopen()`.

References:
- systemd/systemd#31131
- systemd/systemd#31550
- systemd/systemd#32019
dracutng pushed a commit to dracutng/dracut-ng that referenced this pull request Apr 6, 2024
…y included

Some required libraries that used to be statically included are in the process
to be opened via `dlopen()`.

References:
- systemd/systemd#31131
- systemd/systemd#31550
- systemd/systemd#32019

Closes #2642
Conan-Kudo pushed a commit to dracut-ng/dracut-ng that referenced this pull request Apr 8, 2024
…y included

Some required libraries that used to be statically included are in the process
to be opened via `dlopen()`.

References:
- systemd/systemd#31131
- systemd/systemd#31550
- systemd/systemd#32019

Closes #2642
pvalena pushed a commit to pvalena/dracut-fedora that referenced this pull request May 15, 2024
…y included

Some required libraries that used to be statically included are in the process
to be opened via `dlopen()`.

References:
- systemd/systemd#31131
- systemd/systemd#31550
- systemd/systemd#32019

Closes #2642
pvalena pushed a commit to redhat-plumbers/dracut-fedora that referenced this pull request May 15, 2024
…y included

Some required libraries that used to be statically included are in the process
to be opened via `dlopen()`.

References:
- systemd/systemd#31131
- systemd/systemd#31550
- systemd/systemd#32019

Closes #2642
pvalena pushed a commit to pvalena/dracut-fedora that referenced this pull request May 16, 2024
…y included

Some required libraries that used to be statically included are in the process
to be opened via `dlopen()`.

References:
- systemd/systemd#31131
- systemd/systemd#31550
- systemd/systemd#32019

Closes #2642
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

Reduce dependencies of libsystemd
6 participants