Use 'recommended' priority for the default compression library, to indicate that it should be prioritized over the other ones, as it will be used to compress journals/core files. Also use 'recommended' for kmod, as systems will likely fail to boot if it's missing from the initrd. Use 'suggested' for everything else. There is one dlopen'ed TPM library that has the name generated at runtime (depending on the driver), so that cannot be added, as it needs to be known at build time. Also when we support multiple ABI versions list them all, as for the same reason we cannot know which one will be used at build time. $ dlopen-notes.py build/libsystemd.so.0.39.0 build/src/shared/libsystemd-shared-256.so libarchive.so.13 suggested libbpf.so.0 suggested libbpf.so.1 suggested libcryptsetup.so.12 suggested libdw.so.1 suggested libelf.so.1 suggested libfido2.so.1 suggested libgcrypt.so.20 suggested libidn2.so.0 suggested libip4tc.so.2 suggested libkmod.so.2 recommended liblz4.so.1 suggested liblzma.so.5 suggested libp11-kit.so.0 suggested libpcre2-8.so.0 suggested libpwquality.so.1 suggested libqrencode.so.3 suggested libqrencode.so.4 suggested libtss2-esys.so.0 suggested libtss2-mu.so.0 suggested libtss2-rc.so.0 suggested libzstd.so.1 recommended Co-authored-by: Luca Boccassi <bluca@debian.org>
68 lines
2.8 KiB
C
68 lines
2.8 KiB
C
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
|
|
#include "libarchive-util.h"
|
|
|
|
#if HAVE_LIBARCHIVE
|
|
static void *libarchive_dl = NULL;
|
|
|
|
DLSYM_FUNCTION(archive_entry_free);
|
|
DLSYM_FUNCTION(archive_entry_new);
|
|
DLSYM_FUNCTION(archive_entry_set_ctime);
|
|
DLSYM_FUNCTION(archive_entry_set_filetype);
|
|
DLSYM_FUNCTION(archive_entry_set_gid);
|
|
DLSYM_FUNCTION(archive_entry_set_mtime);
|
|
DLSYM_FUNCTION(archive_entry_set_pathname);
|
|
DLSYM_FUNCTION(archive_entry_set_perm);
|
|
DLSYM_FUNCTION(archive_entry_set_rdevmajor);
|
|
DLSYM_FUNCTION(archive_entry_set_rdevminor);
|
|
DLSYM_FUNCTION(archive_entry_set_symlink);
|
|
DLSYM_FUNCTION(archive_entry_set_size);
|
|
DLSYM_FUNCTION(archive_entry_set_uid);
|
|
DLSYM_FUNCTION(archive_error_string);
|
|
DLSYM_FUNCTION(archive_write_close);
|
|
DLSYM_FUNCTION(archive_write_data);
|
|
DLSYM_FUNCTION(archive_write_free);
|
|
DLSYM_FUNCTION(archive_write_header);
|
|
DLSYM_FUNCTION(archive_write_new);
|
|
DLSYM_FUNCTION(archive_write_open_FILE);
|
|
DLSYM_FUNCTION(archive_write_open_fd);
|
|
DLSYM_FUNCTION(archive_write_set_format_filter_by_ext);
|
|
DLSYM_FUNCTION(archive_write_set_format_gnutar);
|
|
|
|
int dlopen_libarchive(void) {
|
|
ELF_NOTE_DLOPEN("archive",
|
|
"Support for decompressing archive files",
|
|
ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED,
|
|
"libarchive.so.13");
|
|
|
|
return dlopen_many_sym_or_warn(
|
|
&libarchive_dl,
|
|
"libarchive.so.13",
|
|
LOG_DEBUG,
|
|
DLSYM_ARG(archive_entry_free),
|
|
DLSYM_ARG(archive_entry_new),
|
|
DLSYM_ARG(archive_entry_set_ctime),
|
|
DLSYM_ARG(archive_entry_set_filetype),
|
|
DLSYM_ARG(archive_entry_set_gid),
|
|
DLSYM_ARG(archive_entry_set_mtime),
|
|
DLSYM_ARG(archive_entry_set_pathname),
|
|
DLSYM_ARG(archive_entry_set_perm),
|
|
DLSYM_ARG(archive_entry_set_rdevmajor),
|
|
DLSYM_ARG(archive_entry_set_rdevminor),
|
|
DLSYM_ARG(archive_entry_set_size),
|
|
DLSYM_ARG(archive_entry_set_symlink),
|
|
DLSYM_ARG(archive_entry_set_uid),
|
|
DLSYM_ARG(archive_error_string),
|
|
DLSYM_ARG(archive_write_close),
|
|
DLSYM_ARG(archive_write_data),
|
|
DLSYM_ARG(archive_write_free),
|
|
DLSYM_ARG(archive_write_header),
|
|
DLSYM_ARG(archive_write_new),
|
|
DLSYM_ARG(archive_write_open_FILE),
|
|
DLSYM_ARG(archive_write_open_fd),
|
|
DLSYM_ARG(archive_write_set_format_filter_by_ext),
|
|
DLSYM_ARG(archive_write_set_format_gnutar));
|
|
}
|
|
|
|
#endif
|