mirror of
https://github.com/systemd/systemd.git
synced 2025-01-10 05:18:17 +03:00
Merge pull request #5756 from keszybz/make-cleanups
Various meson-independent cleanups from the meson patchset
This commit is contained in:
commit
56744c037d
47
Makefile.am
47
Makefile.am
@ -2990,22 +2990,24 @@ endif
|
||||
endif
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
systemd_boot_headers = \
|
||||
src/boot/efi/util.h \
|
||||
efi_headers = \
|
||||
src/boot/efi/console.h \
|
||||
src/boot/efi/disk.h \
|
||||
src/boot/efi/graphics.h \
|
||||
src/boot/efi/pefile.h \
|
||||
src/boot/efi/linux.h \
|
||||
src/boot/efi/measure.h \
|
||||
src/boot/efi/disk.h
|
||||
src/boot/efi/pefile.h \
|
||||
src/boot/efi/splash.h \
|
||||
src/boot/efi/util.h
|
||||
|
||||
systemd_boot_sources = \
|
||||
src/boot/efi/util.c \
|
||||
src/boot/efi/boot.c \
|
||||
src/boot/efi/console.c \
|
||||
src/boot/efi/graphics.c \
|
||||
src/boot/efi/pefile.c \
|
||||
src/boot/efi/disk.c \
|
||||
src/boot/efi/graphics.c \
|
||||
src/boot/efi/measure.c \
|
||||
src/boot/efi/boot.c
|
||||
src/boot/efi/pefile.c \
|
||||
src/boot/efi/util.c
|
||||
|
||||
EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers)
|
||||
|
||||
@ -3017,7 +3019,7 @@ if ENABLE_EFI
|
||||
if HAVE_GNUEFI
|
||||
bootlib_DATA = $(systemd_boot)
|
||||
|
||||
$(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers))
|
||||
$(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(efi_headers))
|
||||
@$(MKDIR_P) $(top_builddir)/src/boot/efi/
|
||||
$(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
|
||||
|
||||
@ -3035,24 +3037,15 @@ endif
|
||||
CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot)
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
stub_headers = \
|
||||
src/boot/efi/util.h \
|
||||
src/boot/efi/pefile.h \
|
||||
src/boot/efi/disk.h \
|
||||
src/boot/efi/graphics.h \
|
||||
src/boot/efi/splash.h \
|
||||
src/boot/efi/measure.h \
|
||||
src/boot/efi/linux.h
|
||||
|
||||
stub_sources = \
|
||||
src/boot/efi/util.c \
|
||||
src/boot/efi/pefile.c \
|
||||
src/boot/efi/disk.c \
|
||||
src/boot/efi/graphics.c \
|
||||
src/boot/efi/splash.c \
|
||||
src/boot/efi/linux.c \
|
||||
src/boot/efi/measure.c \
|
||||
src/boot/efi/stub.c
|
||||
src/boot/efi/pefile.c \
|
||||
src/boot/efi/splash.c \
|
||||
src/boot/efi/stub.c \
|
||||
src/boot/efi/util.c
|
||||
|
||||
EXTRA_DIST += \
|
||||
$(stub_sources) \
|
||||
@ -3067,10 +3060,6 @@ if ENABLE_EFI
|
||||
if HAVE_GNUEFI
|
||||
bootlib_DATA += $(stub)
|
||||
|
||||
$(top_builddir)/src/boot/efi/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(stub_headers))
|
||||
@$(MKDIR_P) $(top_builddir)/src/boot/efi/
|
||||
$(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@
|
||||
|
||||
$(stub_solib): $(stub_objects)
|
||||
$(AM_V_CCLD)$(LD) $(efi_ldflags) $(stub_objects) \
|
||||
-o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \
|
||||
@ -5933,10 +5922,8 @@ dist_dbuspolicy_DATA += \
|
||||
GENERAL_ALIASES += \
|
||||
$(systemunitdir)/systemd-networkd.socket $(pkgsysconfdir)/system/sockets.target.wants/systemd-networkd.socket \
|
||||
$(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service \
|
||||
$(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service
|
||||
|
||||
SYSTEM_UNIT_ALIASES += \
|
||||
systemd-networkd.service dbus-org.freedesktop.network1.service
|
||||
$(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service \
|
||||
$(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/dbus-org.freedesktop.network1.service
|
||||
|
||||
BUSNAMES_TARGET_WANTS += \
|
||||
org.freedesktop.network1.busname
|
||||
|
19
configure.ac
19
configure.ac
@ -328,7 +328,6 @@ AC_CHECK_DECLS([
|
||||
pivot_root,
|
||||
name_to_handle_at,
|
||||
setns,
|
||||
getrandom,
|
||||
renameat2,
|
||||
kcmp,
|
||||
keyctl,
|
||||
@ -343,6 +342,13 @@ AC_CHECK_DECLS([
|
||||
#include <sched.h>
|
||||
#include <string.h>
|
||||
#include <linux/loop.h>
|
||||
]])
|
||||
|
||||
AC_CHECK_DECLS([getrandom],
|
||||
[AC_DEFINE([USE_SYS_RANDOM_H], [], [sys/random.h is usable])],
|
||||
[AC_CHECK_DECLS([getrandom], [], [], [[
|
||||
#include <sys/random.h>
|
||||
]])], [[
|
||||
#include <linux/random.h>
|
||||
]])
|
||||
|
||||
@ -398,6 +404,16 @@ AS_IF([test "x$enable_dbus" != "xno"], [
|
||||
[AC_MSG_ERROR([*** dbus-1 support requested but libraries not found])])])
|
||||
AM_CONDITIONAL(HAVE_DBUS, [test "$have_dbus" = "yes"])
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
have_glib=no
|
||||
AC_ARG_ENABLE(glib, AS_HELP_STRING([--disable-glib], [disable usage of glib,gobject,gio in tests]))
|
||||
AS_IF([test "x$enable_glib" != "xno"], [
|
||||
PKG_CHECK_MODULES(GLIB, [glib-2.0 >= 2.22.0 gobject-2.0 >= 2.22.0 gio-2.0],
|
||||
[AC_DEFINE(HAVE_GLIB, 1, [Define if glib,gobject,gio are available]) have_glib=yes],
|
||||
[have_glib=no])
|
||||
AS_IF([test "x$have_glib" = "xno" -a "x$enable_glib" = "xyes"],
|
||||
[AC_MSG_ERROR([*** glib support requested but libraries not found])])])
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
have_utmp=yes
|
||||
AC_ARG_ENABLE([utmp], AS_HELP_STRING([--disable-utmp], [disable utmp/wtmp log handling]),
|
||||
@ -1741,6 +1757,7 @@ AC_MSG_RESULT([
|
||||
blkid: ${have_blkid}
|
||||
libmount: ${have_libmount}
|
||||
dbus: ${have_dbus}
|
||||
glib: ${have_glib}
|
||||
nss-myhostname: ${have_myhostname}
|
||||
hwdb: ${enable_hwdb}
|
||||
tpm: ${have_tpm}
|
||||
|
@ -67,10 +67,6 @@
|
||||
.un.sun_path = "\0/org/freedesktop/plymouthd", \
|
||||
}
|
||||
|
||||
#ifndef TTY_GID
|
||||
#define TTY_GID 5
|
||||
#endif
|
||||
|
||||
#define NOTIFY_FD_MAX 768
|
||||
#define NOTIFY_BUFFER_MAX PIPE_BUF
|
||||
|
||||
|
@ -68,8 +68,6 @@ struct sockaddr_vm {
|
||||
};
|
||||
#endif /* !HAVE_LINUX_VM_SOCKETS_H */
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
#ifndef RLIMIT_RTTIME
|
||||
#define RLIMIT_RTTIME 15
|
||||
#endif
|
||||
|
@ -27,7 +27,13 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef HAVE_SYS_AUXV_H
|
||||
#include <sys/auxv.h>
|
||||
# include <sys/auxv.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_SYS_RANDOM_H
|
||||
# include <sys/random.h>
|
||||
#else
|
||||
# include <linux/random.h>
|
||||
#endif
|
||||
|
||||
#include "fd-util.h"
|
||||
|
@ -529,7 +529,7 @@ static int process_http_upload(
|
||||
log_warning("Failed to process data for connection %p", connection);
|
||||
if (r == -E2BIG)
|
||||
return mhd_respondf(connection,
|
||||
r, MHD_HTTP_REQUEST_ENTITY_TOO_LARGE,
|
||||
r, MHD_HTTP_PAYLOAD_TOO_LARGE,
|
||||
"Entry is too large, maximum is " STRINGIFY(DATA_SIZE_MAX) " bytes.");
|
||||
else
|
||||
return mhd_respondf(connection,
|
||||
|
@ -31,14 +31,21 @@
|
||||
# define MHD_HTTP_NOT_ACCEPTABLE MHD_HTTP_METHOD_NOT_ACCEPTABLE
|
||||
#endif
|
||||
|
||||
/* Renamed in µhttpd 0.9.51 */
|
||||
#ifndef MHD_USE_PIPE_FOR_SHUTDOWN
|
||||
# define MHD_USE_ITC MHD_USE_PIPE_FOR_SHUTDOWN
|
||||
#endif
|
||||
|
||||
/* Renamed in µhttpd 0.9.52 */
|
||||
#ifndef MHD_USE_EPOLL_LINUX_ONLY
|
||||
# define MHD_USE_EPOLL MHD_USE_EPOLL_LINUX_ONLY
|
||||
#endif
|
||||
|
||||
/* Renamed in µhttpd 0.9.51 */
|
||||
#ifndef MHD_USE_PIPE_FOR_SHUTDOWN
|
||||
# define MHD_USE_ITC MHD_USE_PIPE_FOR_SHUTDOWN
|
||||
/* Both the old and new names are defines, check for the new one. */
|
||||
|
||||
/* Renamed in µhttpd 0.9.53 */
|
||||
#ifndef MHD_HTTP_PAYLOAD_TOO_LARGE
|
||||
# define MHD_HTTP_PAYLOAD_TOO_LARGE MHD_HTTP_REQUEST_ENTITY_TOO_LARGE
|
||||
#endif
|
||||
|
||||
#if MHD_VERSION < 0x00094203
|
||||
|
@ -30,6 +30,8 @@ typedef int (compress_t)(const void *src, uint64_t src_size, void *dst,
|
||||
typedef int (decompress_t)(const void *src, uint64_t src_size,
|
||||
void **dst, size_t *dst_alloc_size, size_t* dst_size, size_t dst_max);
|
||||
|
||||
#if defined(HAVE_XZ) || defined(HAVE_LZ4)
|
||||
|
||||
static usec_t arg_duration = 2 * USEC_PER_SEC;
|
||||
static size_t arg_start;
|
||||
|
||||
@ -151,8 +153,10 @@ static void test_compress_decompress(const char* label, const char* type,
|
||||
100 - compressed * 100. / total,
|
||||
skipped);
|
||||
}
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
#if defined(HAVE_XZ) || defined(HAVE_LZ4)
|
||||
const char *i;
|
||||
|
||||
log_set_max_level(LOG_INFO);
|
||||
@ -177,4 +181,7 @@ int main(int argc, char *argv[]) {
|
||||
#endif
|
||||
}
|
||||
return 0;
|
||||
#else
|
||||
return EXIT_TEST_SKIP;
|
||||
#endif
|
||||
}
|
||||
|
@ -54,6 +54,7 @@ typedef int (decompress_sw_t)(const void *src, uint64_t src_size,
|
||||
typedef int (compress_stream_t)(int fdf, int fdt, uint64_t max_bytes);
|
||||
typedef int (decompress_stream_t)(int fdf, int fdt, uint64_t max_size);
|
||||
|
||||
#if defined(HAVE_XZ) || defined(HAVE_LZ4)
|
||||
static void test_compress_decompress(int compression,
|
||||
compress_blob_t compress,
|
||||
decompress_blob_t decompress,
|
||||
@ -203,6 +204,7 @@ static void test_compress_stream(int compression,
|
||||
assert_se(unlink(pattern) == 0);
|
||||
assert_se(unlink(pattern2) == 0);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LZ4
|
||||
static void test_lz4_decompress_partial(void) {
|
||||
@ -247,6 +249,7 @@ static void test_lz4_decompress_partial(void) {
|
||||
#endif
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
#if defined(HAVE_XZ) || defined(HAVE_LZ4)
|
||||
const char text[] =
|
||||
"text\0foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF"
|
||||
"foofoofoofoo AAAA aaaaaaaaa ghost busters barbarbar FFF";
|
||||
@ -312,4 +315,7 @@ int main(int argc, char *argv[]) {
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
#else
|
||||
return EXIT_TEST_SKIP;
|
||||
#endif
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <sd-bus.h>
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "macro.h"
|
||||
|
||||
|
@ -28,14 +28,6 @@
|
||||
#include "string-util.h"
|
||||
#include "util.h"
|
||||
|
||||
#ifndef RC_LOCAL_SCRIPT_PATH_START
|
||||
#define RC_LOCAL_SCRIPT_PATH_START "/etc/rc.d/rc.local"
|
||||
#endif
|
||||
|
||||
#ifndef RC_LOCAL_SCRIPT_PATH_STOP
|
||||
#define RC_LOCAL_SCRIPT_PATH_STOP "/sbin/halt.local"
|
||||
#endif
|
||||
|
||||
static const char *arg_dest = "/tmp";
|
||||
|
||||
static int add_symlink(const char *service, const char *where) {
|
||||
|
@ -17,7 +17,7 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <sd-messages.h>
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "resolved-dns-server.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <sd-messages.h>
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "af-list.h"
|
||||
#include "alloc-util.h"
|
||||
|
@ -17,7 +17,7 @@
|
||||
along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
||||
***/
|
||||
|
||||
#include <sd-messages.h>
|
||||
#include "sd-messages.h"
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "conf-files.h"
|
||||
|
@ -24,8 +24,6 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <systemd/sd-bus.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "bus-error.h"
|
||||
#include "bus-util.h"
|
||||
|
@ -22,7 +22,7 @@
|
||||
#include <stdbool.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <systemd/sd-bus.h>
|
||||
#include "sd-bus.h"
|
||||
|
||||
#include "logs-show.h"
|
||||
#include "output-mode.h"
|
||||
|
@ -42,8 +42,8 @@
|
||||
#include "udev-util.h"
|
||||
#include "xattr-util.h"
|
||||
|
||||
_unused_ static int probe_filesystem(const char *node, char **ret_fstype) {
|
||||
#ifdef HAVE_BLKID
|
||||
static int probe_filesystem(const char *node, char **ret_fstype) {
|
||||
_cleanup_blkid_free_probe_ blkid_probe b = NULL;
|
||||
const char *fstype;
|
||||
int r;
|
||||
@ -80,8 +80,10 @@ static int probe_filesystem(const char *node, char **ret_fstype) {
|
||||
not_found:
|
||||
*ret_fstype = NULL;
|
||||
return 0;
|
||||
}
|
||||
#else
|
||||
return -EOPNOTSUPP;
|
||||
#endif
|
||||
}
|
||||
|
||||
int dissect_image(int fd, const void *root_hash, size_t root_hash_size, DissectImageFlags flags, DissectedImage **ret) {
|
||||
|
||||
@ -949,7 +951,7 @@ int dissected_image_decrypt(
|
||||
*
|
||||
* = 0 → There was nothing to decrypt
|
||||
* > 0 → Decrypted successfully
|
||||
* -ENOKEY → There's some to decrypt but no key was supplied
|
||||
* -ENOKEY → There's something to decrypt but no key was supplied
|
||||
* -EKEYREJECTED → Passed key was not correct
|
||||
*/
|
||||
|
||||
|
@ -223,7 +223,7 @@ static int gather_stdout_three(int fd, void *arg) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const gather_stdout_callback_t const gather_stdout[] = {
|
||||
const gather_stdout_callback_t gather_stdout[] = {
|
||||
gather_stdout_one,
|
||||
gather_stdout_two,
|
||||
gather_stdout_three,
|
||||
|
@ -42,6 +42,7 @@ ReadWritePaths=/run/systemd
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Also=systemd-networkd.socket
|
||||
Alias=dbus-org.freedesktop.network1.service
|
||||
|
||||
# We want to enable systemd-networkd-wait-online.service whenever this service
|
||||
# is enabled. systemd-networkd-wait-online.service has
|
||||
|
Loading…
Reference in New Issue
Block a user