mirror of
https://github.com/systemd/systemd
synced 2025-11-16 07:14:45 +01:00
Compare commits
6 Commits
dee82ead3c
...
b3c117172f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b3c117172f | ||
|
|
7304557ea9 | ||
|
|
0213b68969 | ||
|
|
3519b73b70 | ||
|
|
5123d9d38c | ||
|
|
242088e98b |
16
meson.build
16
meson.build
@ -1301,7 +1301,7 @@ feature = get_option('gcrypt')
|
|||||||
libgcrypt = dependency('libgcrypt',
|
libgcrypt = dependency('libgcrypt',
|
||||||
required : feature)
|
required : feature)
|
||||||
libgpg_error = dependency('gpg-error',
|
libgpg_error = dependency('gpg-error',
|
||||||
required : feature.disabled() ? feature : false)
|
required : feature)
|
||||||
|
|
||||||
have = libgcrypt.found() and libgpg_error.found()
|
have = libgcrypt.found() and libgpg_error.found()
|
||||||
if not have
|
if not have
|
||||||
@ -1427,10 +1427,16 @@ libarchive = dependency('libarchive',
|
|||||||
required : get_option('libarchive'))
|
required : get_option('libarchive'))
|
||||||
libarchive_cflags = libarchive.partial_dependency(includes: true, compile_args: true)
|
libarchive_cflags = libarchive.partial_dependency(includes: true, compile_args: true)
|
||||||
conf.set10('HAVE_LIBARCHIVE', libarchive.found())
|
conf.set10('HAVE_LIBARCHIVE', libarchive.found())
|
||||||
conf.set10('HAVE_LIBARCHIVE_UID_IS_SET',
|
|
||||||
libarchive.found() and cc.has_function('archive_entry_uid_is_set', dependencies : libarchive))
|
foreach ident : [
|
||||||
conf.set10('HAVE_LIBARCHIVE_HARDLINK_IS_SET',
|
'archive_entry_gid_is_set', # since 3.7.3
|
||||||
libarchive.found() and cc.has_function('archive_entry_hardlink_is_set', dependencies : libarchive))
|
'archive_entry_uid_is_set', # since 3.7.3
|
||||||
|
'archive_entry_hardlink_is_set', # since 3.7.5
|
||||||
|
]
|
||||||
|
|
||||||
|
have = libarchive.found() and cc.has_function(ident, dependencies : libarchive)
|
||||||
|
conf.set10('HAVE_' + ident.to_upper(), have)
|
||||||
|
endforeach
|
||||||
|
|
||||||
libxkbcommon = dependency('xkbcommon',
|
libxkbcommon = dependency('xkbcommon',
|
||||||
version : '>= 0.3.0',
|
version : '>= 0.3.0',
|
||||||
|
|||||||
@ -101,7 +101,6 @@ executables += [
|
|||||||
'sources' : files('test-qcow2.c'),
|
'sources' : files('test-qcow2.c'),
|
||||||
'objects' : ['systemd-importd'],
|
'objects' : ['systemd-importd'],
|
||||||
'dependencies' : common_deps,
|
'dependencies' : common_deps,
|
||||||
'conditions' : ['HAVE_ZLIB'],
|
|
||||||
'type' : 'manual',
|
'type' : 'manual',
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@ -25,19 +25,21 @@ struct bpf_map_create_opts;
|
|||||||
* - after bpf_map_create_opts struct has been defined for older libbpf
|
* - after bpf_map_create_opts struct has been defined for older libbpf
|
||||||
* - before the compat static inline helpers that use them.
|
* - before the compat static inline helpers that use them.
|
||||||
* When removing this file move these back to bpf-dlopen.h */
|
* When removing this file move these back to bpf-dlopen.h */
|
||||||
extern int (*sym_bpf_map_create)(enum bpf_map_type, const char *, __u32, __u32, __u32, const struct bpf_map_create_opts *);
|
extern int (*sym_bpf_map_create)(enum bpf_map_type, const char *, __u32, __u32, __u32, const struct bpf_map_create_opts *);
|
||||||
extern struct bpf_map* (*sym_bpf_object__next_map)(const struct bpf_object *obj, const struct bpf_map *map);
|
extern struct bpf_map* (*sym_bpf_object__next_map)(const struct bpf_object *obj, const struct bpf_map *map);
|
||||||
|
|
||||||
/* compat symbols removed in libbpf 1.0 */
|
/* compat symbols removed in libbpf 1.0 */
|
||||||
extern int (*sym_bpf_create_map)(enum bpf_map_type, int key_size, int value_size, int max_entries, __u32 map_flags);
|
extern int (*sym_bpf_create_map)(enum bpf_map_type, int key_size, int value_size, int max_entries, __u32 map_flags);
|
||||||
|
|
||||||
/* helpers to use the available variant behind new API */
|
/* helpers to use the available variant behind new API */
|
||||||
static inline int compat_bpf_map_create(enum bpf_map_type map_type,
|
static inline int compat_bpf_map_create(
|
||||||
|
enum bpf_map_type map_type,
|
||||||
const char *map_name,
|
const char *map_name,
|
||||||
__u32 key_size,
|
__u32 key_size,
|
||||||
__u32 value_size,
|
__u32 value_size,
|
||||||
__u32 max_entries,
|
__u32 max_entries,
|
||||||
const struct bpf_map_create_opts *opts) {
|
const struct bpf_map_create_opts *opts) {
|
||||||
|
|
||||||
if (sym_bpf_map_create)
|
if (sym_bpf_map_create)
|
||||||
return sym_bpf_map_create(map_type, map_name, key_size,
|
return sym_bpf_map_create(map_type, map_name, key_size,
|
||||||
value_size, max_entries, opts);
|
value_size, max_entries, opts);
|
||||||
|
|||||||
@ -3,6 +3,7 @@
|
|||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
|
|
||||||
#include "libarchive-util.h"
|
#include "libarchive-util.h"
|
||||||
|
#include "user-util.h"
|
||||||
|
|
||||||
#if HAVE_LIBARCHIVE
|
#if HAVE_LIBARCHIVE
|
||||||
static void *libarchive_dl = NULL;
|
static void *libarchive_dl = NULL;
|
||||||
@ -14,11 +15,15 @@ DLSYM_PROTOTYPE(archive_entry_fflags) = NULL;
|
|||||||
DLSYM_PROTOTYPE(archive_entry_filetype) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_filetype) = NULL;
|
||||||
DLSYM_PROTOTYPE(archive_entry_free) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_free) = NULL;
|
||||||
DLSYM_PROTOTYPE(archive_entry_gid) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_gid) = NULL;
|
||||||
#if HAVE_LIBARCHIVE_UID_IS_SET
|
#if HAVE_ARCHIVE_ENTRY_GID_IS_SET
|
||||||
DLSYM_PROTOTYPE(archive_entry_gid_is_set) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_gid_is_set) = NULL;
|
||||||
|
#else
|
||||||
|
int sym_archive_entry_gid_is_set(struct archive_entry *e) {
|
||||||
|
return gid_is_valid(sym_archive_entry_gid(e));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
DLSYM_PROTOTYPE(archive_entry_hardlink) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_hardlink) = NULL;
|
||||||
#if HAVE_LIBARCHIVE_HARDLINK_IS_SET
|
#if HAVE_ARCHIVE_ENTRY_HARDLINK_IS_SET
|
||||||
DLSYM_PROTOTYPE(archive_entry_hardlink_is_set) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_hardlink_is_set) = NULL;
|
||||||
#endif
|
#endif
|
||||||
DLSYM_PROTOTYPE(archive_entry_mode) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_mode) = NULL;
|
||||||
@ -45,8 +50,12 @@ DLSYM_PROTOTYPE(archive_entry_set_uid) = NULL;
|
|||||||
DLSYM_PROTOTYPE(archive_entry_sparse_add_entry) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_sparse_add_entry) = NULL;
|
||||||
DLSYM_PROTOTYPE(archive_entry_symlink) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_symlink) = NULL;
|
||||||
DLSYM_PROTOTYPE(archive_entry_uid) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_uid) = NULL;
|
||||||
#if HAVE_LIBARCHIVE_UID_IS_SET
|
#if HAVE_ARCHIVE_ENTRY_UID_IS_SET
|
||||||
DLSYM_PROTOTYPE(archive_entry_uid_is_set) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_uid_is_set) = NULL;
|
||||||
|
#else
|
||||||
|
int sym_archive_entry_uid_is_set(struct archive_entry *e) {
|
||||||
|
return uid_is_valid(sym_archive_entry_uid(e));
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
DLSYM_PROTOTYPE(archive_entry_xattr_add_entry) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_xattr_add_entry) = NULL;
|
||||||
DLSYM_PROTOTYPE(archive_entry_xattr_next) = NULL;
|
DLSYM_PROTOTYPE(archive_entry_xattr_next) = NULL;
|
||||||
@ -86,11 +95,11 @@ int dlopen_libarchive(void) {
|
|||||||
DLSYM_ARG(archive_entry_filetype),
|
DLSYM_ARG(archive_entry_filetype),
|
||||||
DLSYM_ARG(archive_entry_free),
|
DLSYM_ARG(archive_entry_free),
|
||||||
DLSYM_ARG(archive_entry_gid),
|
DLSYM_ARG(archive_entry_gid),
|
||||||
#if HAVE_LIBARCHIVE_UID_IS_SET
|
#if HAVE_ARCHIVE_ENTRY_GID_IS_SET
|
||||||
DLSYM_ARG(archive_entry_gid_is_set),
|
DLSYM_ARG(archive_entry_gid_is_set),
|
||||||
#endif
|
#endif
|
||||||
DLSYM_ARG(archive_entry_hardlink),
|
DLSYM_ARG(archive_entry_hardlink),
|
||||||
#if HAVE_LIBARCHIVE_HARDLINK_IS_SET
|
#if HAVE_ARCHIVE_ENTRY_HARDLINK_IS_SET
|
||||||
DLSYM_ARG(archive_entry_hardlink_is_set),
|
DLSYM_ARG(archive_entry_hardlink_is_set),
|
||||||
#endif
|
#endif
|
||||||
DLSYM_ARG(archive_entry_mode),
|
DLSYM_ARG(archive_entry_mode),
|
||||||
@ -117,7 +126,7 @@ int dlopen_libarchive(void) {
|
|||||||
DLSYM_ARG(archive_entry_sparse_add_entry),
|
DLSYM_ARG(archive_entry_sparse_add_entry),
|
||||||
DLSYM_ARG(archive_entry_symlink),
|
DLSYM_ARG(archive_entry_symlink),
|
||||||
DLSYM_ARG(archive_entry_uid),
|
DLSYM_ARG(archive_entry_uid),
|
||||||
#if HAVE_LIBARCHIVE_UID_IS_SET
|
#if HAVE_ARCHIVE_ENTRY_UID_IS_SET
|
||||||
DLSYM_ARG(archive_entry_uid_is_set),
|
DLSYM_ARG(archive_entry_uid_is_set),
|
||||||
#endif
|
#endif
|
||||||
DLSYM_ARG(archive_entry_xattr_add_entry),
|
DLSYM_ARG(archive_entry_xattr_add_entry),
|
||||||
|
|||||||
@ -16,7 +16,19 @@ extern DLSYM_PROTOTYPE(archive_entry_fflags);
|
|||||||
extern DLSYM_PROTOTYPE(archive_entry_filetype);
|
extern DLSYM_PROTOTYPE(archive_entry_filetype);
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_free);
|
extern DLSYM_PROTOTYPE(archive_entry_free);
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_gid);
|
extern DLSYM_PROTOTYPE(archive_entry_gid);
|
||||||
|
#if HAVE_ARCHIVE_ENTRY_GID_IS_SET
|
||||||
|
extern DLSYM_PROTOTYPE(archive_entry_gid_is_set);
|
||||||
|
#else
|
||||||
|
int sym_archive_entry_gid_is_set(struct archive_entry *e);
|
||||||
|
#endif
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_hardlink);
|
extern DLSYM_PROTOTYPE(archive_entry_hardlink);
|
||||||
|
#if HAVE_ARCHIVE_ENTRY_HARDLINK_IS_SET
|
||||||
|
extern DLSYM_PROTOTYPE(archive_entry_hardlink_is_set);
|
||||||
|
#else
|
||||||
|
static inline int sym_archive_entry_hardlink_is_set(struct archive_entry *e) {
|
||||||
|
return !!sym_archive_entry_hardlink(e);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_mode);
|
extern DLSYM_PROTOTYPE(archive_entry_mode);
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_mtime);
|
extern DLSYM_PROTOTYPE(archive_entry_mtime);
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_mtime_is_set);
|
extern DLSYM_PROTOTYPE(archive_entry_mtime_is_set);
|
||||||
@ -41,6 +53,11 @@ extern DLSYM_PROTOTYPE(archive_entry_set_uid);
|
|||||||
extern DLSYM_PROTOTYPE(archive_entry_sparse_add_entry);
|
extern DLSYM_PROTOTYPE(archive_entry_sparse_add_entry);
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_symlink);
|
extern DLSYM_PROTOTYPE(archive_entry_symlink);
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_uid);
|
extern DLSYM_PROTOTYPE(archive_entry_uid);
|
||||||
|
#if HAVE_ARCHIVE_ENTRY_UID_IS_SET
|
||||||
|
extern DLSYM_PROTOTYPE(archive_entry_uid_is_set);
|
||||||
|
#else
|
||||||
|
int sym_archive_entry_uid_is_set(struct archive_entry *e);
|
||||||
|
#endif
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_xattr_add_entry);
|
extern DLSYM_PROTOTYPE(archive_entry_xattr_add_entry);
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_xattr_next);
|
extern DLSYM_PROTOTYPE(archive_entry_xattr_next);
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_xattr_reset);
|
extern DLSYM_PROTOTYPE(archive_entry_xattr_reset);
|
||||||
@ -62,27 +79,6 @@ extern DLSYM_PROTOTYPE(archive_write_open_fd);
|
|||||||
extern DLSYM_PROTOTYPE(archive_write_set_format_filter_by_ext);
|
extern DLSYM_PROTOTYPE(archive_write_set_format_filter_by_ext);
|
||||||
extern DLSYM_PROTOTYPE(archive_write_set_format_pax);
|
extern DLSYM_PROTOTYPE(archive_write_set_format_pax);
|
||||||
|
|
||||||
#if HAVE_LIBARCHIVE_UID_IS_SET
|
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_gid_is_set);
|
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_uid_is_set);
|
|
||||||
#else
|
|
||||||
#include "user-util.h"
|
|
||||||
static inline int sym_archive_entry_gid_is_set(struct archive_entry *e) {
|
|
||||||
return gid_is_valid(sym_archive_entry_gid(e));
|
|
||||||
}
|
|
||||||
static inline int sym_archive_entry_uid_is_set(struct archive_entry *e) {
|
|
||||||
return uid_is_valid(sym_archive_entry_uid(e));
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if HAVE_LIBARCHIVE_HARDLINK_IS_SET
|
|
||||||
extern DLSYM_PROTOTYPE(archive_entry_hardlink_is_set);
|
|
||||||
#else
|
|
||||||
static inline int sym_archive_entry_hardlink_is_set(struct archive_entry *e) {
|
|
||||||
return !!sym_archive_entry_hardlink(e);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
int dlopen_libarchive(void);
|
int dlopen_libarchive(void);
|
||||||
|
|
||||||
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct archive_entry*, sym_archive_entry_free, archive_entry_freep, NULL);
|
DEFINE_TRIVIAL_CLEANUP_FUNC_FULL_RENAME(struct archive_entry*, sym_archive_entry_free, archive_entry_freep, NULL);
|
||||||
|
|||||||
@ -262,7 +262,7 @@ static int reread_partition_table_full(sd_device *dev, int fd, RereadPartitionTa
|
|||||||
if (flock(lock_fd, LOCK_EX|LOCK_NB) < 0) {
|
if (flock(lock_fd, LOCK_EX|LOCK_NB) < 0) {
|
||||||
r = log_device_debug_errno(dev, errno, "Failed to take BSD lock on block device '%s': %m", p);
|
r = log_device_debug_errno(dev, errno, "Failed to take BSD lock on block device '%s': %m", p);
|
||||||
|
|
||||||
if (r == -EBUSY && FLAGS_SET(flags, REREADPT_FORCE_UEVENT)) {
|
if (r == -EAGAIN && FLAGS_SET(flags, REREADPT_FORCE_UEVENT)) {
|
||||||
log_device_debug(dev, "Giving up rereading partition table of '%s'. Triggering change events for the device and its partitions.", p);
|
log_device_debug(dev, "Giving up rereading partition table of '%s'. Triggering change events for the device and its partitions.", p);
|
||||||
(void) trigger_partitions(dev, /* blkrrpart_success= */ false);
|
(void) trigger_partitions(dev, /* blkrrpart_success= */ false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user