diff options
Diffstat (limited to 'src')
165 files changed, 507 insertions, 373 deletions
diff --git a/src/busctl/busctl-introspect.h b/src/busctl/busctl-introspect.h index d922e352db..3dd1df4e47 100644 --- a/src/busctl/busctl-introspect.h +++ b/src/busctl/busctl-introspect.h @@ -20,6 +20,7 @@ ***/ #include <stdbool.h> +#include <stdint.h> typedef struct XMLIntrospectOps { int (*on_path)(const char *path, void *userdata); diff --git a/src/grp-boot/systemd-boot/Makefile b/src/grp-boot/systemd-boot/Makefile index 3b4d4ddda1..8b770c0c81 100644 --- a/src/grp-boot/systemd-boot/Makefile +++ b/src/grp-boot/systemd-boot/Makefile @@ -25,6 +25,7 @@ include $(topsrcdir)/build-aux/Makefile.head.mk ifneq ($(ENABLE_EFI),) ifneq ($(HAVE_GNUEFI),) +# ------------------------------------------------------------------------------ efi_cppflags = \ $(EFI_CPPFLAGS) \ -I$(top_builddir) -include config.h \ @@ -81,9 +82,18 @@ EFI_FORMAT = -O binary else EFI_FORMAT = --target=efi-app-$(EFI_ARCH) endif # ARCH_AARCH64 -endif # HAVE_GNUEFI -endif # ENABLE_EFI +$(outdir)/%.o: $(srcdir)/%.c + $(AM_V_EFI_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@ + +$(outdir)/%.so: + @if test $(words $^) = 0; then echo 'Cannot link EFI library with no dependencies: $@' >&2; exit 1; fi + $(AM_V_EFI_CCLD)$(LD) $(efi_ldflags) $^ -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name) + $(AM_V_at)! { nm -D -u $@ | grep ' U '; } + +# These next 2 are the same rule +$(outdir)/%$(EFI_MACHINE_TYPE_NAME).efi : $(outdir)/%.so; $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@ +$(outdir)/%$(EFI_MACHINE_TYPE_NAME).efi.stub: $(outdir)/%.so; $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@ # ------------------------------------------------------------------------------ systemd_boot_headers = \ src/boot/efi/util.h \ @@ -102,33 +112,9 @@ systemd_boot_sources = \ src/boot/efi/measure.c \ src/boot/efi/boot.c -EXTRA_DIST += $(systemd_boot_sources) $(systemd_boot_headers) - -systemd_boot_objects = $(addprefix $(top_builddir)/,$(systemd_boot_sources:.c=.o)) -systemd_boot_solib = $(top_builddir)/src/boot/efi/systemd_boot.so systemd_boot = systemd-boot$(EFI_MACHINE_TYPE_NAME).efi - -ifneq ($(ENABLE_EFI),) -ifneq ($(HAVE_GNUEFI),) -bootlib_DATA = $(systemd_boot) - -$(outdir)/%.o: $(top_srcdir)/src/boot/efi/%.c $(addprefix $(top_srcdir)/,$(systemd_boot_headers)) - @$(MKDIR_P) $(top_builddir)/src/boot/efi/ - $(AM_V_CC)$(EFI_CC) $(efi_cppflags) $(efi_cflags) -c $< -o $@ - -$(systemd_boot_solib): $(systemd_boot_objects) - $(AM_V_CCLD)$(LD) $(efi_ldflags) $(systemd_boot_objects) \ - -o $@ -lefi -lgnuefi $(shell $(CC) -print-libgcc-file-name); \ - nm -D -u $@ | grep ' U ' && exit 1 || : - -$(systemd_boot): $(systemd_boot_solib) - $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \ - -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@ -endif # HAVE_GNUEFI -endif # ENABLE_EFI - -CLEANFILES += $(systemd_boot_objects) $(systemd_boot_solib) $(systemd_boot) - +bootlib_DATA += $(systemd_boot) +$(outdir)/systemd-boot.so: $(addprefix $(outdir)/,$(notdir $(systemd_boot_sources:.c=.o))) # ------------------------------------------------------------------------------ stub_headers = \ src/boot/efi/util.h \ @@ -149,45 +135,19 @@ stub_sources = \ src/boot/efi/measure.c \ src/boot/efi/stub.c -EXTRA_DIST += \ - $(stub_sources) \ - $(stub_headers) \ - test/splash.bmp - -stub_objects = $(addprefix $(top_builddir)/,$(stub_sources:.c=.o)) -stub_solib = $(top_builddir)/src/boot/efi/stub.so stub = linux$(EFI_MACHINE_TYPE_NAME).efi.stub - -ifneq ($(ENABLE_EFI),) -ifneq ($(HAVE_GNUEFI),) bootlib_DATA += $(stub) - -$(outdir)/%.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); \ - nm -D -u $@ | grep ' U ' && exit 1 || : - -$(stub): $(stub_solib) - $(AM_V_GEN)$(OBJCOPY) -j .text -j .sdata -j .data -j .dynamic \ - -j .dynsym -j .rel -j .rela -j .reloc $(EFI_FORMAT) $< $@ -endif # HAVE_GNUEFI -endif # ENABLE_EFI - -CLEANFILES += $(stub_objects) $(stub_solib) $(stub) - +$(outdir)/linux.so: $(addprefix $(outdir)/,$(notdir $(stub_sources:.c=.o))) # ------------------------------------------------------------------------------ -CLEANFILES += test-efi-disk.img - -test-efi-disk.img: $(systemd_boot) $(stub) test/test-efi-create-disk.sh - $(AM_V_GEN)test/test-efi-create-disk.sh +$(outdir)/test-efi-disk.img: $(outdir)/$(systemd_boot) $(outdir)/$(stub) $(srcdir)/test-efi-create-disk.sh + $(AM_V_GEN)$(@D)/test-efi-create-disk.sh -test-efi: test-efi-disk.img +test-efi: $(outdir)/test-efi-disk.img $(QEMU) -machine accel=kvm -m 1024 -bios $(QEMU_BIOS) -snapshot test-efi-disk.img -EXTRA_DIST += test/test-efi-create-disk.sh +files.out.int += test-efi-disk.img +# ------------------------------------------------------------------------------ +endif # HAVE_GNUEFI +endif # ENABLE_EFI include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-boot/systemd-boot/console.h b/src/grp-boot/systemd-boot/console.h index 3fe0ce5ec4..887995a9cc 100644 --- a/src/grp-boot/systemd-boot/console.h +++ b/src/grp-boot/systemd-boot/console.h @@ -16,6 +16,8 @@ #ifndef __SDBOOT_CONSOLE_H #define __SDBOOT_CONSOLE_H +#include <efi.h> + #define EFI_SHIFT_STATE_VALID 0x80000000 #define EFI_RIGHT_CONTROL_PRESSED 0x00000004 #define EFI_LEFT_CONTROL_PRESSED 0x00000008 diff --git a/src/grp-boot/systemd-boot/disk.h b/src/grp-boot/systemd-boot/disk.h index af91a9c674..5804b8881a 100644 --- a/src/grp-boot/systemd-boot/disk.h +++ b/src/grp-boot/systemd-boot/disk.h @@ -15,5 +15,7 @@ #ifndef __SDBOOT_DISK_H #define __SDBOOT_DISK_H +#include <efi.h> + EFI_STATUS disk_get_part_uuid(EFI_HANDLE *handle, CHAR16 uuid[37]); #endif diff --git a/src/grp-boot/systemd-boot/graphics.h b/src/grp-boot/systemd-boot/graphics.h index cf48e647e7..d8e5adfcd8 100644 --- a/src/grp-boot/systemd-boot/graphics.h +++ b/src/grp-boot/systemd-boot/graphics.h @@ -18,5 +18,7 @@ #ifndef __SDBOOT_GRAPHICS_H #define __SDBOOT_GRAPHICS_H +#include <efi.h> + EFI_STATUS graphics_mode(BOOLEAN on); #endif diff --git a/src/grp-boot/systemd-boot/linux.h b/src/grp-boot/systemd-boot/linux.h index d9e6ed7955..b87a7f0d38 100644 --- a/src/grp-boot/systemd-boot/linux.h +++ b/src/grp-boot/systemd-boot/linux.h @@ -15,6 +15,8 @@ #ifndef __SDBOOT_kernel_H #define __SDBOOT_kernel_H +#include <efi.h> + EFI_STATUS linux_exec(EFI_HANDLE *image, CHAR8 *cmdline, UINTN cmdline_size, UINTN linux_addr, diff --git a/src/grp-boot/systemd-boot/measure.c b/src/grp-boot/systemd-boot/measure.c index 05adf41778..63f8280107 100644 --- a/src/grp-boot/systemd-boot/measure.c +++ b/src/grp-boot/systemd-boot/measure.c @@ -160,6 +160,7 @@ typedef EFI_STATUS(EFIAPI * EFI_TCG2_SUBMIT_COMMAND) (IN EFI_TCG2_PROTOCOL * Thi IN UINT32 OutputParameterBlockSize, IN UINT8 * OutputParameterBlock); typedef EFI_STATUS(EFIAPI * EFI_TCG2_GET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This, OUT UINT32 * ActivePcrBanks); + typedef EFI_STATUS(EFIAPI * EFI_TCG2_SET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This, IN UINT32 ActivePcrBanks); typedef EFI_STATUS(EFIAPI * EFI_TCG2_GET_RESULT_OF_SET_ACTIVE_PCR_BANKS) (IN EFI_TCG2_PROTOCOL * This, diff --git a/src/grp-boot/systemd-boot/measure.h b/src/grp-boot/systemd-boot/measure.h index a2cfe817d0..ddd686a8fd 100644 --- a/src/grp-boot/systemd-boot/measure.h +++ b/src/grp-boot/systemd-boot/measure.h @@ -13,6 +13,8 @@ #ifndef __SDBOOT_MEASURE_H #define __SDBOOT_MEASURE_H +#include <efi.h> + #ifndef SD_TPM_PCR #define SD_TPM_PCR 8 #endif diff --git a/src/grp-boot/systemd-boot/pefile.h b/src/grp-boot/systemd-boot/pefile.h index 2e445ede17..bc2d73fea9 100644 --- a/src/grp-boot/systemd-boot/pefile.h +++ b/src/grp-boot/systemd-boot/pefile.h @@ -15,6 +15,8 @@ #ifndef __SDBOOT_PEFILE_H #define __SDBOOT_PEFILE_H +#include <efi.h> + EFI_STATUS pefile_locate_sections(EFI_FILE *dir, CHAR16 *path, CHAR8 **sections, UINTN *addrs, UINTN *offsets, UINTN *sizes); #endif diff --git a/src/grp-boot/systemd-boot/splash.h b/src/grp-boot/systemd-boot/splash.h index 09b543fb47..362ff22643 100644 --- a/src/grp-boot/systemd-boot/splash.h +++ b/src/grp-boot/systemd-boot/splash.h @@ -16,5 +16,7 @@ #ifndef __SDBOOT_SPLASH_H #define __SDBOOT_SPLASH_H +#include <efi.h> + EFI_STATUS graphics_splash(UINT8 *content, UINTN len, const EFI_GRAPHICS_OUTPUT_BLT_PIXEL *background); #endif diff --git a/src/grp-boot/systemd-boot/util.h b/src/grp-boot/systemd-boot/util.h index e673cdf9a0..e2da8b3fee 100644 --- a/src/grp-boot/systemd-boot/util.h +++ b/src/grp-boot/systemd-boot/util.h @@ -22,7 +22,7 @@ #define ELEMENTSOF(x) (sizeof(x)/sizeof((x)[0])) static inline const CHAR16 *yes_no(BOOLEAN b) { - return b ? L"yes" : L"no"; + return b ? (CHAR16*)L"yes" : (CHAR16*)L"no"; } EFI_STATUS parse_boolean(CHAR8 *v, BOOLEAN *b); diff --git a/src/grp-coredump/systemd-coredump/.gitignore b/src/grp-coredump/systemd-coredump/.gitignore new file mode 100644 index 0000000000..768e3d4d9f --- /dev/null +++ b/src/grp-coredump/systemd-coredump/.gitignore @@ -0,0 +1 @@ +/50-coredump.sysctl diff --git a/src/grp-coredump/systemd-coredump/Makefile b/src/grp-coredump/systemd-coredump/Makefile index bc71db120e..108186488c 100644 --- a/src/grp-coredump/systemd-coredump/Makefile +++ b/src/grp-coredump/systemd-coredump/Makefile @@ -75,7 +75,10 @@ CLEANFILES += \ endif # ENABLE_COREDUMP EXTRA_DIST += \ - sysctl.d/50-coredump.conf.in \ + sysctl.d/50-coredump.sysctl.in \ units/systemd-coredump@.service.in +sd.CPPFLAGS += -I$(topsrcdir)/src/grp-journal/libjournal-core +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-hostname/hostnamectl/Makefile b/src/grp-hostname/hostnamectl/Makefile index a75fb56cbd..f43d717260 100644 --- a/src/grp-hostname/hostnamectl/Makefile +++ b/src/grp-hostname/hostnamectl/Makefile @@ -39,6 +39,7 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_hostnamectl + endif # ENABLE_HOSTNAMED include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-hostname/systemd-hostnamed/Makefile b/src/grp-hostname/systemd-hostnamed/Makefile index dce9d99feb..171bce55a4 100644 --- a/src/grp-hostname/systemd-hostnamed/Makefile +++ b/src/grp-hostname/systemd-hostnamed/Makefile @@ -55,6 +55,7 @@ BUSNAMES_TARGET_WANTS += \ org.freedesktop.hostname1.busname endif # ENABLE_HOSTNAMED + polkitpolicy_in_files += \ src/hostname/org.freedesktop.hostname1.policy.in diff --git a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile index 58b1699d14..8c0eba2b1a 100644 --- a/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile +++ b/src/grp-initprogs/grp-sleep/systemd-hibernate-resume-generator/Makefile @@ -35,4 +35,6 @@ systemd_hibernate_resume_generator_LDADD = \ endif # ENABLE_HIBERNATE +sd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile b/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile index 8b99dd2197..161d4ebd50 100644 --- a/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/Makefile @@ -42,8 +42,17 @@ nodist_systemunit_DATA += \ endif # ENABLE_HIBERNATE +dist_systemunit_DATA += \ + units/suspend.target + +nodist_systemunit_DATA += \ + units/systemd-suspend.service + EXTRA_DIST += \ + units/systemd-suspend.service.in \ units/systemd-hibernate.service.in \ units/systemd-hybrid-sleep.service.in +sd.CPPFLAGS += -DSYSTEM_SLEEP_PATH=\"$(systemsleepdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.xml b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.xml index a8beb86f4d..efd97eb671 100644 --- a/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.xml +++ b/src/grp-initprogs/grp-sleep/systemd-sleep/systemd-sleep.xml @@ -26,7 +26,7 @@ xmlns:xi="http://www.w3.org/2001/XInclude"> <refentryinfo> - <title>systemd-suspend.service</title> + <title>systemd-sleep</title> <productname>systemd</productname> <authorgroup> @@ -40,7 +40,7 @@ </refentryinfo> <refmeta> - <refentrytitle>systemd-suspend.service</refentrytitle> + <refentrytitle>systemd-sleep</refentrytitle> <manvolnum>8</manvolnum> </refmeta> diff --git a/src/grp-initprogs/systemd-firstboot/systemd-firstboot.completion.bash b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.completion.bash new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.completion.bash diff --git a/src/grp-initprogs/systemd-firstboot/systemd-firstboot.completion.zsh b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.completion.zsh new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/grp-initprogs/systemd-firstboot/systemd-firstboot.completion.zsh diff --git a/src/grp-initprogs/systemd-quotacheck/Makefile b/src/grp-initprogs/systemd-quotacheck/Makefile index 4220946f39..076d33a587 100644 --- a/src/grp-initprogs/systemd-quotacheck/Makefile +++ b/src/grp-initprogs/systemd-quotacheck/Makefile @@ -38,9 +38,12 @@ systemd_quotacheck_LDADD = \ endif # ENABLE_QUOTACHECK EXTRA_DIST += \ + units/quotaon.service.in \ units/systemd-quotacheck.service.in nodist_systemunit_DATA += \ units/quotaon.service +sd.CPPFLAGS += -DQUOTACHECK=\"$(QUOTACHECK)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-initprogs/systemd-random-seed/Makefile b/src/grp-initprogs/systemd-random-seed/Makefile index 56d1af7431..489a8ab007 100644 --- a/src/grp-initprogs/systemd-random-seed/Makefile +++ b/src/grp-initprogs/systemd-random-seed/Makefile @@ -44,4 +44,7 @@ endif # ENABLE_RANDOMSEED EXTRA_DIST += \ units/systemd-random-seed.service.in +sd.CPPFLAGS += -DRANDOM_SEED_DIR=\"$(localstatedir)/lib/systemd/\" +sd.CPPFLAGS += -DRANDOM_SEED=\"$(localstatedir)/lib/systemd/random-seed\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-initprogs/systemd-sysusers/.gitignore b/src/grp-initprogs/systemd-sysusers/.gitignore deleted file mode 100644 index c065034d29..0000000000 --- a/src/grp-initprogs/systemd-sysusers/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/basic.conf -/systemd.conf -/systemd-remote.conf diff --git a/src/grp-initprogs/systemd-sysusers/Makefile b/src/grp-initprogs/systemd-sysusers/Makefile index c2c6254a1e..9339b9fd8b 100644 --- a/src/grp-initprogs/systemd-sysusers/Makefile +++ b/src/grp-initprogs/systemd-sysusers/Makefile @@ -40,7 +40,6 @@ SYSINIT_TARGET_WANTS += \ systemd-sysusers.service nodist_sysusers_DATA = \ - sysusers.d/systemd.conf \ sysusers.d/basic.conf INSTALL_DIRS += \ @@ -49,8 +48,6 @@ endif # ENABLE_SYSUSERS EXTRA_DIST += \ units/systemd-sysusers.service.in \ - sysusers.d/systemd.conf.m4 \ - sysusers.d/systemd-remote.conf.m4 \ - sysusers.d/basic.conf.in + sysusers.d/basic.sysusers.in include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-initprogs/systemd-sysusers/systemd-sysusers.completion.bash b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.completion.bash new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.completion.bash diff --git a/src/grp-initprogs/systemd-sysusers/systemd-sysusers.completion.zsh b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.completion.zsh new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/grp-initprogs/systemd-sysusers/systemd-sysusers.completion.zsh diff --git a/src/grp-initprogs/systemd-tmpfiles/Makefile b/src/grp-initprogs/systemd-tmpfiles/Makefile index d12c910883..de085fa334 100644 --- a/src/grp-initprogs/systemd-tmpfiles/Makefile +++ b/src/grp-initprogs/systemd-tmpfiles/Makefile @@ -42,7 +42,6 @@ nodist_systemunit_DATA += \ units/systemd-tmpfiles-clean.service nodist_tmpfiles_DATA = \ - tmpfiles.d/systemd.conf \ tmpfiles.d/etc.conf dist_tmpfiles_DATA = \ @@ -50,9 +49,7 @@ dist_tmpfiles_DATA = \ tmpfiles.d/tmp.conf \ tmpfiles.d/x11.conf \ tmpfiles.d/var.conf \ - tmpfiles.d/home.conf \ - tmpfiles.d/systemd-nspawn.conf \ - tmpfiles.d/journal-nocow.conf + tmpfiles.d/home.conf ifneq ($(HAVE_SYSV_COMPAT),) dist_tmpfiles_DATA += \ @@ -75,8 +72,7 @@ INSTALL_DIRS += \ endif # ENABLE_TMPFILES EXTRA_DIST += \ - tmpfiles.d/systemd.conf.m4 \ - tmpfiles.d/etc.conf.m4 \ + tmpfiles.d/etc.tmpfiles.m4 \ units/systemd-tmpfiles-setup-dev.service.in \ units/systemd-tmpfiles-setup.service.in \ units/systemd-tmpfiles-clean.service.in diff --git a/src/grp-initprogs/systemd-tmpfiles/tmpfiles.c b/src/grp-initprogs/systemd-tmpfiles/tmpfiles.c index c674bf1226..f865b9cc3e 100644 --- a/src/grp-initprogs/systemd-tmpfiles/tmpfiles.c +++ b/src/grp-initprogs/systemd-tmpfiles/tmpfiles.c @@ -2179,7 +2179,7 @@ static int read_config_file(const char *fn, bool ignore_enoent) { Iterator iterator; unsigned v = 0; Item *i; - int r; + int r = 0; assert(fn); diff --git a/src/grp-journal/.gitignore b/src/grp-journal/.gitignore index c3fea7424f..c9bd45a7be 100644 --- a/src/grp-journal/.gitignore +++ b/src/grp-journal/.gitignore @@ -1 +1,5 @@ +/journald-gperf.c +/libsystemd-journal.pc +/audit_type-list.txt +/audit_type-*-name.* /README diff --git a/src/grp-journal/Makefile b/src/grp-journal/Makefile index 91293d8dfa..764ab80758 100644 --- a/src/grp-journal/Makefile +++ b/src/grp-journal/Makefile @@ -167,14 +167,13 @@ tests += \ test-compress-benchmark endif # HAVE_COMPRESSION -ifneq ($(HAVE_SYSV_COMPAT),) +dist_tmpfiles_DATA = \ + tmpfiles.d/journal-nocow.conf +ifneq ($(HAVE_SYSV_COMPAT),) varlog_DATA = \ docs/var-log/README -$(outdir)/README: docs/var-log/README.in - $(SED_PROCESS) - CLEANFILES += \ docs/var-log/README endif # HAVE_SYSV_COMPAT @@ -182,6 +181,9 @@ endif # HAVE_SYSV_COMPAT EXTRA_DIST += \ docs/var-log/README.in +dist_systempreset_DATA = \ + 90-journald.preset + nested.subdirs += grp-remote nested.subdirs += journalctl nested.subdirs += libjournal-core diff --git a/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile b/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile index 2003240fbe..d481db82dc 100644 --- a/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile +++ b/src/grp-journal/grp-remote/systemd-journal-gatewayd/Makefile @@ -60,6 +60,9 @@ nodist_systemunit_DATA += \ dist_gatewayddocumentroot_DATA = \ src/journal-remote/browse.html +dist_sysusers_DATA += \ + sysusers.d/systemd-journal-gatewayd.conf + endif # HAVE_MICROHTTPD EXTRA_DIST += \ diff --git a/src/grp-journal/grp-remote/systemd-journal-remote/Makefile b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile index b387eae386..45ed4abb63 100644 --- a/src/grp-journal/grp-remote/systemd-journal-remote/Makefile +++ b/src/grp-journal/grp-remote/systemd-journal-remote/Makefile @@ -63,15 +63,15 @@ endif # HAVE_GNUTLS dist_systemunit_DATA += \ units/systemd-journal-remote.socket +dist_sysusers_DATA += \ + sysusers.d/systemd-journal-remote.conf + nodist_systemunit_DATA += \ units/systemd-journal-remote.service -journal-remote-install-hook: journal-install-hook - -$(MKDIR_P) $(DESTDIR)/var/log/journal/remote - -chown 0:0 $(DESTDIR)/var/log/journal/remote - -chmod 755 $(DESTDIR)/var/log/journal/remote - -INSTALL_EXEC_HOOKS += journal-remote-install-hook +files.sys.all += /var/log/journal/remote +$(DESTDIR)/var/log/journal/remote: + $(MKDIR_P) $@ nodist_pkgsysconf_DATA += \ src/journal-remote/journal-remote.conf diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/Makefile b/src/grp-journal/grp-remote/systemd-journal-upload/Makefile index 3c6b92832b..3d90f294af 100644 --- a/src/grp-journal/grp-remote/systemd-journal-upload/Makefile +++ b/src/grp-journal/grp-remote/systemd-journal-upload/Makefile @@ -46,6 +46,9 @@ nodist_systemunit_DATA += \ nodist_pkgsysconf_DATA += \ src/journal-remote/journal-upload.conf +dist_sysusers_DATA += \ + sysusers.d/systemd-journal-upload.conf + endif # HAVE_LIBCURL EXTRA_DIST += \ diff --git a/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h index 2decc7b22e..9eeb8d2123 100644 --- a/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h +++ b/src/grp-journal/grp-remote/systemd-journal-upload/journal-upload.h @@ -1,5 +1,6 @@ #pragma once +#include <curl/curl.h> #include <inttypes.h> #include <systemd/sd-event.h> diff --git a/src/grp-journal/journalctl/Makefile b/src/grp-journal/journalctl/Makefile index fcf118f4d3..3c98169647 100644 --- a/src/grp-journal/journalctl/Makefile +++ b/src/grp-journal/journalctl/Makefile @@ -52,11 +52,15 @@ rootbin_PROGRAMS += \ nodist_systemunit_DATA += \ units/systemd-journal-flush.service \ units/systemd-journal-catalog-update.service + SYSINIT_TARGET_WANTS += \ systemd-journal-flush.service \ systemd-journal-catalog-update.service + EXTRA_DIST += \ units/systemd-journal-flush.service.in \ units/systemd-journal-catalog-update.service.in +sd.CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-journal/libjournal-core/.gitignore b/src/grp-journal/libjournal-core/.gitignore deleted file mode 100644 index 04d5852547..0000000000 --- a/src/grp-journal/libjournal-core/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/journald-gperf.c -/libsystemd-journal.pc -/audit_type-list.txt -/audit_type-*-name.* diff --git a/src/grp-journal/libjournal-core/Makefile b/src/grp-journal/libjournal-core/Makefile index d55aebfb49..997fcf0468 100644 --- a/src/grp-journal/libjournal-core/Makefile +++ b/src/grp-journal/libjournal-core/Makefile @@ -53,4 +53,6 @@ libjournal_core_la_LIBADD = \ noinst_LTLIBRARIES += \ libjournal-core.la +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-journal/systemd-journald/Makefile b/src/grp-journal/systemd-journald/Makefile index b71b2dc494..62f19aa1b8 100644 --- a/src/grp-journal/systemd-journald/Makefile +++ b/src/grp-journal/systemd-journald/Makefile @@ -45,7 +45,8 @@ nodist_systemunit_DATA += \ dist_pkgsysconf_DATA += \ src/journal/journald.conf -dist_catalog_DATA = \ +# TODO +_dist_catalog_DATA = \ catalog/systemd.bg.catalog \ catalog/systemd.be.catalog \ catalog/systemd.be@latin.catalog \ diff --git a/src/grp-locale/localectl/Makefile b/src/grp-locale/localectl/Makefile index 9a661bce68..d0023df124 100644 --- a/src/grp-locale/localectl/Makefile +++ b/src/grp-locale/localectl/Makefile @@ -24,6 +24,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk ifneq ($(ENABLE_LOCALED),) + localectl_SOURCES = \ src/locale/localectl.c @@ -38,6 +39,7 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_localectl + endif # ENABLE_LOCALED include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-locale/systemd-localed/.gitignore b/src/grp-locale/systemd-localed/.gitignore index b1e0ba755e..6d9d6089c0 100644 --- a/src/grp-locale/systemd-localed/.gitignore +++ b/src/grp-locale/systemd-localed/.gitignore @@ -1 +1 @@ -org.freedesktop.locale1.policy +/org.freedesktop.locale1.policy diff --git a/src/grp-locale/systemd-localed/Makefile b/src/grp-locale/systemd-localed/Makefile index 8c0c775d35..de38bb8576 100644 --- a/src/grp-locale/systemd-localed/Makefile +++ b/src/grp-locale/systemd-localed/Makefile @@ -73,4 +73,7 @@ polkitpolicy_in_files += \ EXTRA_DIST += \ units/systemd-localed.service.in +sd.CPPFLAGS += -DSYSTEMD_KBD_MODEL_MAP=\"$(pkgdatadir)/kbd-model-map\" +sd.CPPFLAGS += -DSYSTEMD_LANGUAGE_FALLBACK_MAP=\"$(pkgdatadir)/language-fallback-map\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-login/systemd-logind/Makefile b/src/grp-login/systemd-logind/Makefile index 5285c0b657..3c9a0a05ef 100644 --- a/src/grp-login/systemd-logind/Makefile +++ b/src/grp-login/systemd-logind/Makefile @@ -23,9 +23,8 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -ifneq ($(ENABLE_LOGIND),) - systemd_logind_SOURCES = \ + $(_liblogind_core_la_SOURCES) \ src/login/logind.c \ src/login/logind.h @@ -33,9 +32,9 @@ nodist_systemd_logind_SOURCES = \ src/login/logind-gperf.c systemd_logind_LDADD = \ - liblogind-core.la + libshared.la -liblogind_core_la_SOURCES = \ +_liblogind_core_la_SOURCES = \ src/login/logind-core.c \ src/login/logind-device.c \ src/login/logind-device.h \ @@ -60,17 +59,11 @@ liblogind_core_la_SOURCES = \ src/login/logind-utmp.c \ src/login/logind-acl.h -liblogind_core_la_LIBADD = \ - libshared.la - ifneq ($(HAVE_ACL),) -liblogind_core_la_SOURCES += \ +_liblogind_core_la_SOURCES += \ src/login/logind-acl.c endif # HAVE_ACL -noinst_LTLIBRARIES += \ - liblogind-core.la - rootlibexec_PROGRAMS += \ systemd-logind @@ -115,8 +108,6 @@ nodist_udevrules_DATA += \ src/login/71-seat.rules \ src/login/73-seat-late.rules -endif # ENABLE_LOGIND - polkitpolicy_in_files += \ src/login/org.freedesktop.login1.policy.in @@ -129,4 +120,7 @@ EXTRA_DIST += \ units/systemd-logind.service.in \ src/login/logind.conf.in +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" +sd.CPPFLAGS += -DKEXEC=\"$(KEXEC)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-machine/grp-import/libimport/Makefile b/src/grp-machine/grp-import/libimport/Makefile index 4162da6c9d..5691d0bba1 100644 --- a/src/grp-machine/grp-import/libimport/Makefile +++ b/src/grp-machine/grp-import/libimport/Makefile @@ -23,6 +23,15 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +noinst_LTLIBRARIES += libimport.la + +libimport_la_SOURCES = \ + qcow2-util.c \ + import-common.c \ + import-compress.c + +libimport_la_LIBADD += libbasic.la + manual_tests += \ test-qcow2 diff --git a/src/grp-machine/grp-import/libimport/import-common.h b/src/grp-machine/grp-import/libimport/import-common.h index 07d3250e71..3abd62e8c3 100644 --- a/src/grp-machine/grp-import/libimport/import-common.h +++ b/src/grp-machine/grp-import/libimport/import-common.h @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <sys/types.h> + int import_make_read_only_fd(int fd); int import_make_read_only(const char *path); diff --git a/src/grp-machine/grp-import/systemd-export/Makefile b/src/grp-machine/grp-import/systemd-export/Makefile index f6e15987a5..f8fcbc3cca 100644 --- a/src/grp-machine/grp-import/systemd-export/Makefile +++ b/src/grp-machine/grp-import/systemd-export/Makefile @@ -30,11 +30,7 @@ systemd_export_SOURCES = \ src/import/export-tar.c \ src/import/export-tar.h \ src/import/export-raw.c \ - src/import/export-raw.h \ - src/import/import-common.c \ - src/import/import-common.h \ - src/import/import-compress.c \ - src/import/import-compress.h + src/import/export-raw.h systemd_export_CFLAGS = \ $(AM_CFLAGS) \ @@ -44,6 +40,7 @@ systemd_export_CFLAGS = \ systemd_export_LDADD = \ libshared.la \ + libimport.la \ $(XZ_LIBS) \ $(ZLIB_LIBS) \ $(BZIP2_LIBS) diff --git a/src/grp-machine/grp-import/systemd-export/export-raw.h b/src/grp-machine/grp-import/systemd-export/export-raw.h index cf34d512bc..00f6931d7b 100644 --- a/src/grp-machine/grp-import/systemd-export/export-raw.h +++ b/src/grp-machine/grp-import/systemd-export/export-raw.h @@ -25,6 +25,7 @@ #include "import-compress.h" typedef struct RawExport RawExport; + typedef void (*RawExportFinished)(RawExport *export, int error, void *userdata); int raw_export_new(RawExport **export, sd_event *event, RawExportFinished on_finished, void *userdata); diff --git a/src/grp-machine/grp-import/systemd-export/export-tar.h b/src/grp-machine/grp-import/systemd-export/export-tar.h index c048a6d642..9efde8931d 100644 --- a/src/grp-machine/grp-import/systemd-export/export-tar.h +++ b/src/grp-machine/grp-import/systemd-export/export-tar.h @@ -25,6 +25,7 @@ #include "import-compress.h" typedef struct TarExport TarExport; + typedef void (*TarExportFinished)(TarExport *export, int error, void *userdata); int tar_export_new(TarExport **export, sd_event *event, TarExportFinished on_finished, void *userdata); diff --git a/src/grp-machine/grp-import/systemd-import/Makefile b/src/grp-machine/grp-import/systemd-import/Makefile index e117efc68a..06fd01fcd7 100644 --- a/src/grp-machine/grp-import/systemd-import/Makefile +++ b/src/grp-machine/grp-import/systemd-import/Makefile @@ -29,13 +29,7 @@ systemd_import_SOURCES = \ src/import/import-raw.c \ src/import/import-raw.h \ src/import/import-tar.c \ - src/import/import-tar.h \ - src/import/import-common.c \ - src/import/import-common.h \ - src/import/import-compress.c \ - src/import/import-compress.h \ - src/import/qcow2-util.c \ - src/import/qcow2-util.h + src/import/import-tar.h systemd_import_CFLAGS = \ $(AM_CFLAGS) \ @@ -45,6 +39,7 @@ systemd_import_CFLAGS = \ systemd_import_LDADD = \ libshared.la \ + libimport.la \ $(XZ_LIBS) \ $(ZLIB_LIBS) \ $(BZIP2_LIBS) diff --git a/src/grp-machine/grp-import/systemd-import/import-raw.h b/src/grp-machine/grp-import/systemd-import/import-raw.h index ae7e0b017d..61ec8cc91e 100644 --- a/src/grp-machine/grp-import/systemd-import/import-raw.h +++ b/src/grp-machine/grp-import/systemd-import/import-raw.h @@ -25,6 +25,7 @@ #include "shared/import-util.h" typedef struct RawImport RawImport; + typedef void (*RawImportFinished)(RawImport *import, int error, void *userdata); int raw_import_new(RawImport **import, sd_event *event, const char *image_root, RawImportFinished on_finished, void *userdata); diff --git a/src/grp-machine/grp-import/systemd-import/import-tar.h b/src/grp-machine/grp-import/systemd-import/import-tar.h index b5012f1ea4..35a08fcfc5 100644 --- a/src/grp-machine/grp-import/systemd-import/import-tar.h +++ b/src/grp-machine/grp-import/systemd-import/import-tar.h @@ -25,6 +25,7 @@ #include "shared/import-util.h" typedef struct TarImport TarImport; + typedef void (*TarImportFinished)(TarImport *import, int error, void *userdata); int tar_import_new(TarImport **import, sd_event *event, const char *image_root, TarImportFinished on_finished, void *userdata); diff --git a/src/grp-machine/grp-import/systemd-pull/Makefile b/src/grp-machine/grp-import/systemd-pull/Makefile index 31a90fc90f..1ee9fa25de 100644 --- a/src/grp-machine/grp-import/systemd-pull/Makefile +++ b/src/grp-machine/grp-import/systemd-pull/Makefile @@ -34,14 +34,8 @@ systemd_pull_SOURCES = \ src/import/pull-job.h \ src/import/pull-common.c \ src/import/pull-common.h \ - src/import/import-common.c \ - src/import/import-common.h \ - src/import/import-compress.c \ - src/import/import-compress.h \ src/import/curl-util.c \ - src/import/curl-util.h \ - src/import/qcow2-util.c \ - src/import/qcow2-util.h + src/import/curl-util.h systemd_pull_CFLAGS = \ $(AM_CFLAGS) \ @@ -54,6 +48,7 @@ systemd_pull_CFLAGS = \ -D USER_KEYRING_PATH=\"$(pkgsysconfdir)/import-pubring.gpg\" systemd_pull_LDADD = \ + libimport.la \ libshared.la \ $(LIBCURL_LIBS) \ $(XZ_LIBS) \ diff --git a/src/grp-machine/grp-import/systemd-pull/pull-raw.h b/src/grp-machine/grp-import/systemd-pull/pull-raw.h index 93032edf09..47ed499c12 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-raw.h +++ b/src/grp-machine/grp-import/systemd-pull/pull-raw.h @@ -25,6 +25,7 @@ #include "shared/import-util.h" typedef struct RawPull RawPull; + typedef void (*RawPullFinished)(RawPull *pull, int error, void *userdata); int raw_pull_new(RawPull **pull, sd_event *event, const char *image_root, RawPullFinished on_finished, void *userdata); diff --git a/src/grp-machine/grp-import/systemd-pull/pull-tar.h b/src/grp-machine/grp-import/systemd-pull/pull-tar.h index 81797fa359..a2850fee9e 100644 --- a/src/grp-machine/grp-import/systemd-pull/pull-tar.h +++ b/src/grp-machine/grp-import/systemd-pull/pull-tar.h @@ -25,6 +25,7 @@ #include "shared/import-util.h" typedef struct TarPull TarPull; + typedef void (*TarPullFinished)(TarPull *pull, int error, void *userdata); int tar_pull_new(TarPull **pull, sd_event *event, const char *image_root, TarPullFinished on_finished, void *userdata); diff --git a/src/grp-machine/systemd-machined/Makefile b/src/grp-machine/systemd-machined/Makefile index ee17bfcd7c..66ac0b9275 100644 --- a/src/grp-machine/systemd-machined/Makefile +++ b/src/grp-machine/systemd-machined/Makefile @@ -24,16 +24,19 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk systemd_machined_SOURCES = \ + $(_libmachine_core_la_SOURCES) \ src/machine/machined.c \ src/machine/machined.h systemd_machined_LDADD = \ - libmachine-core.la + libsystemd-internal.la \ + libshared.la \ + libbasic.la rootlibexec_PROGRAMS += \ systemd-machined -libmachine_core_la_SOURCES = \ +_libmachine_core_la_SOURCES = \ src/machine/machine.c \ src/machine/machine.h \ src/machine/machined-dbus.c \ @@ -44,18 +47,10 @@ libmachine_core_la_SOURCES = \ src/machine/operation.c \ src/machine/operation.h -libmachine_core_la_LIBADD = \ - libshared.la - -noinst_LTLIBRARIES += \ - libmachine-core.la - test_machine_tables_SOURCES = \ + $(_libmachine_core_la_SOURCES) \ src/machine/test-machine-tables.c -test_machine_tables_LDADD = \ - libmachine-core.la - tests += \ test-machine-tables @@ -89,13 +84,4 @@ polkitpolicy_in_files += \ EXTRA_DIST += \ units/systemd-machined.service.in -# ------------------------------------------------------------------------------ -ifneq ($(ENABLE_IMPORTD),) - -ifneq ($(HAVE_LIBCURL),) -ifneq ($(HAVE_XZ),) -ifneq ($(HAVE_ZLIB),) -ifneq ($(HAVE_BZIP2),) -ifneq ($(HAVE_GCRYPT),) - include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-network/Makefile b/src/grp-network/Makefile index 3313eb989e..7502fcbdde 100644 --- a/src/grp-network/Makefile +++ b/src/grp-network/Makefile @@ -23,7 +23,8 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -dist_network_DATA = \ +# TODO +_dist_network_DATA = \ network/99-default.link \ network/80-container-host0.network \ network/80-container-ve.network \ @@ -72,10 +73,8 @@ gperf_gperf_sources += \ src/network/networkd-network-gperf.gperf \ src/network/networkd-netdev-gperf.gperf -EXTRA_DIST += \ - units/systemd-networkd.service.m4.in \ - units/systemd-networkd-wait-online.service.in \ - test/networkd-test.py +dist_systempreset_DATA = \ + 90-networkd.preset nested.subdirs += libnetworkd-core nested.subdirs += networkctl diff --git a/src/grp-network/libnetworkd-core/Makefile b/src/grp-network/libnetworkd-core/Makefile index 53d65460f2..4375a4d4f3 100644 --- a/src/grp-network/libnetworkd-core/Makefile +++ b/src/grp-network/libnetworkd-core/Makefile @@ -88,6 +88,10 @@ nodist_libnetworkd_core_la_SOURCES = \ libnetworkd_core_la_LIBADD = \ libsystemd-network.la \ + libsystemd-internal.la \ + libfirewall.la \ libshared.la +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-network/systemd-networkd-wait-online/Makefile b/src/grp-network/systemd-networkd-wait-online/Makefile index 12aa13c48f..8d1870c862 100644 --- a/src/grp-network/systemd-networkd-wait-online/Makefile +++ b/src/grp-network/systemd-networkd-wait-online/Makefile @@ -41,4 +41,13 @@ systemd_networkd_wait_online_LDADD = \ libsystemd-network.la \ libshared.la +nodist_systemunit_DATA += \ + units/systemd-networkd-wait-online.service + +GENERAL_ALIASES += \ + $(systemunitdir)/systemd-networkd-wait-online.service $(pkgsysconfdir)/system/network-online.target.wants/systemd-networkd-wait-online.service + +EXTRA_DIST += \ + units/systemd-networkd-wait-online.service.in + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-network/systemd-networkd/Makefile b/src/grp-network/systemd-networkd/Makefile index 5a4845ab73..d6ef3bb91d 100644 --- a/src/grp-network/systemd-networkd/Makefile +++ b/src/grp-network/systemd-networkd/Makefile @@ -30,6 +30,7 @@ systemd_networkd_SOURCES = \ src/network/networkd.c systemd_networkd_LDADD = \ + libbasic.la \ libnetworkd-core.la ifneq ($(HAVE_LIBIPTC),) @@ -41,8 +42,7 @@ dist_systemunit_DATA += \ units/systemd-networkd.socket nodist_systemunit_DATA += \ - units/systemd-networkd.service \ - units/systemd-networkd-wait-online.service + units/systemd-networkd.service dist_systemunit_DATA_busnames += \ units/org.freedesktop.network1.busname @@ -55,8 +55,7 @@ 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 + $(systemunitdir)/systemd-networkd.service $(pkgsysconfdir)/system/multi-user.target.wants/systemd-networkd.service SYSTEM_UNIT_ALIASES += \ systemd-networkd.service dbus-org.freedesktop.network1.service @@ -64,4 +63,8 @@ SYSTEM_UNIT_ALIASES += \ BUSNAMES_TARGET_WANTS += \ org.freedesktop.network1.busname +EXTRA_DIST += \ + units/systemd-networkd.service.m4.in \ + test/networkd-test.py + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-resolve/Makefile b/src/grp-resolve/Makefile index 8132573d49..5e90fec8c7 100644 --- a/src/grp-resolve/Makefile +++ b/src/grp-resolve/Makefile @@ -23,6 +23,9 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +dist_systempreset_DATA = \ + 90-resolved.preset + nested.subdirs += libbasic-dns nested.subdirs += nss-resolve nested.subdirs += systemd-resolve diff --git a/src/grp-resolve/libbasic-dns/Makefile b/src/grp-resolve/libbasic-dns/Makefile index 3e48f2a326..1d342c5f3b 100644 --- a/src/grp-resolve/libbasic-dns/Makefile +++ b/src/grp-resolve/libbasic-dns/Makefile @@ -23,18 +23,30 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -$(outdir)/dns_type-list.txt: src/resolve/dns-type.h - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/dns_type-list.txt: $(srcdir)/dns-type.h $(AM_V_GEN)$(SED) -n -r 's/.* DNS_TYPE_(\w+).*/\1/p' <$< >$@ -$(outdir)/dns_type-to-name.h: src/resolve/dns_type-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/dns_type-to-name.h: $(outdir)/dns_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *dns_type_to_string(int type) {\n\tswitch(type) {" } {printf " case DNS_TYPE_%s: return ", $$1; sub(/_/, "-"); printf "\"%s\";\n", $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@ -$(outdir)/dns_type-from-name.gperf: src/resolve/dns_type-list.txt - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/dns_type-from-name.gperf: $(outdir)/dns_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct dns_type_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { s=$$1; sub(/_/, "-", s); printf "%s, ", $$s; printf "DNS_TYPE_%s\n", $$1 }' <$< >$@ +basic_dns_sources = +libbasic_dns_la_SOURCES = \ + src/resolve/resolved-dns-dnssec.c \ + src/resolve/resolved-dns-dnssec.h \ + src/resolve/resolved-dns-packet.c \ + src/resolve/resolved-dns-packet.h \ + src/resolve/resolved-dns-rr.c \ + src/resolve/resolved-dns-rr.h \ + src/resolve/resolved-dns-answer.c \ + src/resolve/resolved-dns-answer.h \ + src/resolve/resolved-dns-question.c \ + src/resolve/resolved-dns-question.h \ + src/resolve/dns-type.c \ + src/resolve/dns-type.h + tests += \ test-dns-packet \ test-resolve-tables \ @@ -51,6 +63,7 @@ test_resolve_tables_SOURCES = \ src/shared/test-tables.h test_resolve_tables_LDADD = \ + libbasic-dns.la \ libshared.la test_dns_packet_SOURCES = \ @@ -62,6 +75,7 @@ test_dns_packet_CPPFLAGS = \ -DRESOLVE_TEST_DIR=\"$(abs_top_srcdir)/src/resolve/test-data\" test_dns_packet_LDADD = \ + libbasic-dns.la \ libshared.la EXTRA_DIST += \ @@ -82,6 +96,7 @@ test_dnssec_SOURCES = \ $(basic_dns_sources) test_dnssec_LDADD = \ + libbasic-dns.la \ libshared.la test_dnssec_complex_SOURCES = \ @@ -92,7 +107,8 @@ test_dnssec_complex_SOURCES = \ test_dnssec_complex_LDADD = \ libshared.la -gperf_txt_sources += \ - src/resolve/dns_type-list.txt +noinst_LTLIBRARIES = libbasic-dns.la +libbasic_dns_la_LIBADD = libshared.la +$(outdir)/dns-type.lo: $(outdir)/dns_type-from-name.h $(outdir)/dns_type-to-name.h include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-resolve/systemd-resolve/Makefile b/src/grp-resolve/systemd-resolve/Makefile index 7f01d47407..edb2270c3e 100644 --- a/src/grp-resolve/systemd-resolve/Makefile +++ b/src/grp-resolve/systemd-resolve/Makefile @@ -23,11 +23,11 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +basic_dns_sources = + systemd_resolve_SOURCES = \ src/resolve/resolve-tool.c \ - $(basic_dns_sources) \ - src/shared/gcrypt-util.c \ - src/shared/gcrypt-util.h + $(basic_dns_sources) nodist_systemd_resolve_SOURCES = \ src/resolve/dns_type-from-name.h \ @@ -45,4 +45,6 @@ dist_bashcompletion_data += \ dist_zshcompletion_data += \ shell-completion/zsh/_systemd-resolve +systemd_resolve_LDADD += libbasic-dns.la + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-resolve/systemd-resolved/Makefile b/src/grp-resolve/systemd-resolved/Makefile index 5906bbfc2a..30173ce08c 100644 --- a/src/grp-resolve/systemd-resolved/Makefile +++ b/src/grp-resolve/systemd-resolved/Makefile @@ -23,21 +23,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -ifneq ($(ENABLE_RESOLVED),) - -basic_dns_sources = \ - src/resolve/resolved-dns-dnssec.c \ - src/resolve/resolved-dns-dnssec.h \ - src/resolve/resolved-dns-packet.c \ - src/resolve/resolved-dns-packet.h \ - src/resolve/resolved-dns-rr.c \ - src/resolve/resolved-dns-rr.h \ - src/resolve/resolved-dns-answer.c \ - src/resolve/resolved-dns-answer.h \ - src/resolve/resolved-dns-question.c \ - src/resolve/resolved-dns-question.h \ - src/resolve/dns-type.c \ - src/resolve/dns-type.h +basic_dns_sources = systemd_resolved_SOURCES = \ src/resolve/resolved.c \ @@ -80,9 +66,7 @@ systemd_resolved_SOURCES = \ src/resolve/resolved-dns-trust-anchor.h \ src/resolve/resolved-dns-trust-anchor.c \ src/resolve/resolved-etc-hosts.h \ - src/resolve/resolved-etc-hosts.c \ - src/shared/gcrypt-util.c \ - src/shared/gcrypt-util.h + src/resolve/resolved-etc-hosts.c nodist_systemd_resolved_SOURCES = \ src/resolve/dns_type-from-name.h \ @@ -120,7 +104,9 @@ GENERAL_ALIASES += \ nodist_pkgsysconf_DATA += \ src/resolve/resolved.conf -endif # ENABLE_RESOLVED +gperf_txt_sources += \ + src/resolve/dns_type-list.txt + gperf_gperf_sources += \ src/resolve/resolved-gperf.gperf @@ -128,4 +114,8 @@ EXTRA_DIST += \ units/systemd-resolved.service.m4.in \ src/resolve/resolved.conf.in +systemd_resolved_LDADD += libbasic-dns.la + +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h index af1d01f694..e3c4e15ead 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-scope.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-scope.h @@ -27,8 +27,10 @@ typedef struct DnsScope DnsScope; #include "resolved-dns-cache.h" #include "resolved-dns-server.h" +#include "resolved-dns-stream.h" #include "resolved-dns-zone.h" #include "resolved-link.h" +#include "resolved-manager.h" typedef enum DnsScopeMatch { DNS_SCOPE_NO, diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-server.h b/src/grp-resolve/systemd-resolved/resolved-dns-server.h index 2855c97faa..bfbf692c64 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-server.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-server.h @@ -23,16 +23,6 @@ typedef struct DnsServer DnsServer; -typedef enum DnsServerType { - DNS_SERVER_SYSTEM, - DNS_SERVER_FALLBACK, - DNS_SERVER_LINK, -} DnsServerType; -#define _DNS_SERVER_TYPE_MAX (DNS_SERVER_LINK + 1) - -const char* dns_server_type_to_string(DnsServerType i) _const_; -DnsServerType dns_server_type_from_string(const char *s) _pure_; - typedef enum DnsServerFeatureLevel { DNS_SERVER_FEATURE_LEVEL_TCP, DNS_SERVER_FEATURE_LEVEL_UDP, @@ -52,6 +42,16 @@ int dns_server_feature_level_from_string(const char *s) _pure_; #include "resolved-link.h" #include "resolved-manager.h" +typedef enum DnsServerType { + DNS_SERVER_SYSTEM, + DNS_SERVER_FALLBACK, + DNS_SERVER_LINK, +} DnsServerType; +#define _DNS_SERVER_TYPE_MAX (DNS_SERVER_LINK + 1) + +const char* dns_server_type_to_string(DnsServerType i) _const_; +DnsServerType dns_server_type_from_string(const char *s) _pure_; + struct DnsServer { Manager *manager; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-stream.h b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h index e610986833..65be14c5ed 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-stream.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-stream.h @@ -25,6 +25,7 @@ typedef struct DnsStream DnsStream; #include "resolved-dns-transaction.h" +#include "resolved-manager.h" struct DnsStream { Manager *manager; diff --git a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h index 6802d00514..96cedd7bc8 100644 --- a/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h +++ b/src/grp-resolve/systemd-resolved/resolved-dns-transaction.h @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <systemd/sd-event.h> + typedef struct DnsTransaction DnsTransaction; typedef enum DnsTransactionState DnsTransactionState; typedef enum DnsTransactionSource DnsTransactionSource; diff --git a/src/grp-resolve/systemd-resolved/resolved-link.h b/src/grp-resolve/systemd-resolved/resolved-link.h index 53a5f597ef..98b440b563 100644 --- a/src/grp-resolve/systemd-resolved/resolved-link.h +++ b/src/grp-resolve/systemd-resolved/resolved-link.h @@ -29,6 +29,7 @@ typedef struct Link Link; typedef struct LinkAddress LinkAddress; +#include "resolved-dns-scope.h" #include "resolved-dns-search-domain.h" #include "resolved-dns-server.h" #include "resolved-manager.h" diff --git a/src/grp-resolve/systemd-resolved/resolved-manager.c b/src/grp-resolve/systemd-resolved/resolved-manager.c index b82c2569bf..a326823c3a 100644 --- a/src/grp-resolve/systemd-resolved/resolved-manager.c +++ b/src/grp-resolve/systemd-resolved/resolved-manager.c @@ -34,7 +34,6 @@ #include "basic/string-table.h" #include "basic/string-util.h" #include "basic/utf8.h" -#include "sd-netlink/netlink-util.h" #include "shared/dns-domain.h" #include "systemd-network/network-internal.h" diff --git a/src/grp-system/Makefile b/src/grp-system/Makefile index 482fbb5670..e9c6d7b07f 100644 --- a/src/grp-system/Makefile +++ b/src/grp-system/Makefile @@ -23,6 +23,9 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk +dist_systempreset_DATA = \ + 90-systemd.preset + nested.subdirs += grp-utils nested.subdirs += libcore nested.subdirs += systemctl diff --git a/src/grp-system/grp-utils/systemd-sysv-generator/Makefile b/src/grp-system/grp-utils/systemd-sysv-generator/Makefile index 9dec62efdc..dfb065af90 100644 --- a/src/grp-system/grp-utils/systemd-sysv-generator/Makefile +++ b/src/grp-system/grp-utils/systemd-sysv-generator/Makefile @@ -29,18 +29,10 @@ systemd_sysv_generator_SOURCES = \ systemd_sysv_generator_LDADD = \ libcore.la -ifneq ($(HAVE_SYSV_COMPAT),) sysvinit_DATA = \ docs/sysvinit/README -$(outdir)/README: docs/sysvinit/README.in - $(SED_PROCESS) - -CLEANFILES += \ - docs/sysvinit/README -endif # HAVE_SYSV_COMPAT - EXTRA_DIST += \ - docs/sysvinit/README.in + docs/sysvinit/README.in \ include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-system/libcore/Makefile b/src/grp-system/libcore/Makefile index cbf4916c13..1f19355412 100644 --- a/src/grp-system/libcore/Makefile +++ b/src/grp-system/libcore/Makefile @@ -163,8 +163,13 @@ libcore_la_LIBADD = \ $(APPARMOR_LIBS) \ $(MOUNT_LIBS) -$(outdir)/load-fragment-gperf-nulstr.c: src/core/load-fragment-gperf.gperf - $(AM_V_at)$(MKDIR_P) $(dir $@) +$(outdir)/load-fragment-gperf-nulstr.c: $(outdir)/load-fragment-gperf.gperf $(AM_V_GEN)$(AWK) 'BEGIN{ keywords=0 ; FS="," ; print "extern const char load_fragment_gperf_nulstr[];" ; print "const char load_fragment_gperf_nulstr[] ="} ; keyword==1 { print "\"" $$1 "\\0\"" } ; /%%/ { keyword=1} ; END { print ";" }' < $< > $@ +sd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src +sd.CPPFLAGS += -DMOUNT_PATH=\"$(MOUNT_PATH)\" +sd.CPPFLAGS += -DUMOUNT_PATH=\"$(UMOUNT_PATH)\" +sd.CPPFLAGS += -DSYSTEMD_CGROUP_AGENT_PATH=\"$(libexecdir)/systemd-cgroups-agent\" +sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(libexecdir)/systemd\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-system/libcore/busname.h b/src/grp-system/libcore/busname.h index aa7f0ecb1b..95a356bddc 100644 --- a/src/grp-system/libcore/busname.h +++ b/src/grp-system/libcore/busname.h @@ -20,7 +20,6 @@ ***/ typedef struct BusName BusName; -typedef struct BusNamePolicy BusNamePolicy; #include "bus-policy.h" #include "unit.h" diff --git a/src/grp-system/libcore/cgroup.h b/src/grp-system/libcore/cgroup.h index 7ba03aee68..36699fb21b 100644 --- a/src/grp-system/libcore/cgroup.h +++ b/src/grp-system/libcore/cgroup.h @@ -115,8 +115,6 @@ struct CGroupContext { bool delegate; }; -#include "basic/cgroup-util.h" - #include "unit.h" void cgroup_context_init(CGroupContext *c); diff --git a/src/grp-system/libcore/dbus-automount.h b/src/grp-system/libcore/dbus-automount.h index 7b51eb973a..d1168c8188 100644 --- a/src/grp-system/libcore/dbus-automount.h +++ b/src/grp-system/libcore/dbus-automount.h @@ -19,5 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <systemd/sd-bus.h> extern const sd_bus_vtable bus_automount_vtable[]; diff --git a/src/grp-system/libcore/dbus-busname.h b/src/grp-system/libcore/dbus-busname.h index 8643d1a404..c6aa90a424 100644 --- a/src/grp-system/libcore/dbus-busname.h +++ b/src/grp-system/libcore/dbus-busname.h @@ -19,5 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <systemd/sd-bus.h> extern const sd_bus_vtable bus_busname_vtable[]; diff --git a/src/grp-system/libcore/dbus-path.h b/src/grp-system/libcore/dbus-path.h index d3c19e0c2b..f24b1d5d3d 100644 --- a/src/grp-system/libcore/dbus-path.h +++ b/src/grp-system/libcore/dbus-path.h @@ -19,6 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ - +#include <systemd/sd-bus.h> extern const sd_bus_vtable bus_path_vtable[]; diff --git a/src/grp-system/libcore/device.h b/src/grp-system/libcore/device.h index 184a1a349b..60d5122966 100644 --- a/src/grp-system/libcore/device.h +++ b/src/grp-system/libcore/device.h @@ -21,6 +21,8 @@ typedef struct Device Device; +#include "unit.h" + typedef enum DeviceFound { DEVICE_NOT_FOUND = 0, DEVICE_FOUND_UDEV = 1, diff --git a/src/grp-system/libcore/killall.h b/src/grp-system/libcore/killall.h index acc2439f00..bbb101c863 100644 --- a/src/grp-system/libcore/killall.h +++ b/src/grp-system/libcore/killall.h @@ -19,4 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <stdbool.h> + void broadcast_signal(int sig, bool wait_for_exit, bool send_sighup); diff --git a/src/grp-system/libcore/load-fragment-gperf.gperf.m4 b/src/grp-system/libcore/load-fragment-gperf.gperf.m4 index 8193418980..c9f6e6acf7 100644 --- a/src/grp-system/libcore/load-fragment-gperf.gperf.m4 +++ b/src/grp-system/libcore/load-fragment-gperf.gperf.m4 @@ -1,8 +1,8 @@ %{ #include <stddef.h> -#include "conf-parser.h" +#include "shared/conf-parser.h" #include "load-fragment.h" -#include "missing.h" +#include "basic/missing.h" %} struct ConfigPerfItem; %null_strings diff --git a/src/grp-system/libcore/loopback-setup.c b/src/grp-system/libcore/loopback-setup.c index d5b65bca9c..f92e346f8c 100644 --- a/src/grp-system/libcore/loopback-setup.c +++ b/src/grp-system/libcore/loopback-setup.c @@ -21,7 +21,6 @@ #include <stdlib.h> #include "basic/missing.h" -#include "sd-netlink/netlink-util.h" #include "sd-netlink/sd-netlink.h" #include "loopback-setup.h" diff --git a/src/grp-system/libcore/machine-id-setup.h b/src/grp-system/libcore/machine-id-setup.h index a7e7678ed9..c5dd8d7790 100644 --- a/src/grp-system/libcore/machine-id-setup.h +++ b/src/grp-system/libcore/machine-id-setup.h @@ -19,5 +19,7 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <systemd/sd-id128.h> + int machine_id_commit(const char *root); int machine_id_setup(const char *root, sd_id128_t machine_id); diff --git a/src/grp-system/libcore/scope.h b/src/grp-system/libcore/scope.h index 2dc86325c5..f0cb3bd3e2 100644 --- a/src/grp-system/libcore/scope.h +++ b/src/grp-system/libcore/scope.h @@ -22,6 +22,7 @@ typedef struct Scope Scope; #include "kill.h" +#include "unit.h" typedef enum ScopeResult { SCOPE_SUCCESS, diff --git a/src/grp-system/libcore/service.h b/src/grp-system/libcore/service.h index ba9086d8cd..aa7d1de8b6 100644 --- a/src/grp-system/libcore/service.h +++ b/src/grp-system/libcore/service.h @@ -27,6 +27,7 @@ typedef struct ServiceFDStore ServiceFDStore; #include "kill.h" #include "path.h" +#include "socket.h" typedef enum ServiceRestart { SERVICE_RESTART_NO, @@ -199,7 +200,7 @@ struct Service { extern const UnitVTable service_vtable; -int service_set_socket_fd(Service *s, int fd, struct Socket *socket, bool selinux_context_net); +int service_set_socket_fd(Service *s, int fd, Socket *socket, bool selinux_context_net); void service_close_socket_fd(Service *s); const char* service_restart_to_string(ServiceRestart i) _const_; diff --git a/src/grp-system/libcore/slice.h b/src/grp-system/libcore/slice.h index c9f3f61067..71e05a4d6a 100644 --- a/src/grp-system/libcore/slice.h +++ b/src/grp-system/libcore/slice.h @@ -21,6 +21,8 @@ typedef struct Slice Slice; +#include "unit.h" + struct Slice { Unit meta; diff --git a/src/grp-system/libcore/smack-setup.h b/src/grp-system/libcore/smack-setup.h index 78164c85e6..f8c62ce067 100644 --- a/src/grp-system/libcore/smack-setup.h +++ b/src/grp-system/libcore/smack-setup.h @@ -21,4 +21,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <stdbool.h> + int mac_smack_setup(bool *loaded_policy); diff --git a/src/grp-system/libcore/socket.h b/src/grp-system/libcore/socket.h index 3b214946e0..232d653fbe 100644 --- a/src/grp-system/libcore/socket.h +++ b/src/grp-system/libcore/socket.h @@ -23,7 +23,6 @@ typedef struct Socket Socket; -#include "mount.h" #include "service.h" typedef enum SocketExecCommand { diff --git a/src/grp-system/libcore/swap.h b/src/grp-system/libcore/swap.h index c2cbfc5d2a..52e22e22e8 100644 --- a/src/grp-system/libcore/swap.h +++ b/src/grp-system/libcore/swap.h @@ -24,6 +24,8 @@ typedef struct Swap Swap; +#include "unit.h" + typedef enum SwapExecCommand { SWAP_EXEC_ACTIVATE, SWAP_EXEC_DEACTIVATE, diff --git a/src/grp-system/libcore/target.c b/src/grp-system/libcore/target.c index e62a49be84..74af0ced0c 100644 --- a/src/grp-system/libcore/target.c +++ b/src/grp-system/libcore/target.c @@ -23,7 +23,6 @@ #include "basic/unit-name.h" #include "dbus-target.h" -#include "target.h" #include "unit.h" static const UnitActiveState state_translation_table[_TARGET_STATE_MAX] = { diff --git a/src/grp-system/libcore/target.h b/src/grp-system/libcore/target.h index 339aea154e..406b80019c 100644 --- a/src/grp-system/libcore/target.h +++ b/src/grp-system/libcore/target.h @@ -21,6 +21,8 @@ typedef struct Target Target; +#include "unit.h" + struct Target { Unit meta; diff --git a/src/grp-system/libcore/timer.h b/src/grp-system/libcore/timer.h index 99b47c3880..710ef126f0 100644 --- a/src/grp-system/libcore/timer.h +++ b/src/grp-system/libcore/timer.h @@ -23,6 +23,8 @@ typedef struct Timer Timer; +#include "unit.h" + typedef enum TimerBase { TIMER_ACTIVE, TIMER_BOOT, diff --git a/src/grp-system/libcore/unit.h b/src/grp-system/libcore/unit.h index 9321537fe6..72ceed1fef 100644 --- a/src/grp-system/libcore/unit.h +++ b/src/grp-system/libcore/unit.h @@ -259,8 +259,10 @@ typedef enum UnitSetPropertiesMode { #include "automount.h" #include "busname.h" #include "device.h" +#include "mount.h" #include "path.h" #include "scope.h" +#include "service.h" #include "slice.h" #include "socket.h" #include "swap.h" diff --git a/src/grp-system/systemctl/.gitignore b/src/grp-system/systemctl/.gitignore index ebd59d3c9e..89c7427edd 100644 --- a/src/grp-system/systemctl/.gitignore +++ b/src/grp-system/systemctl/.gitignore @@ -1,2 +1,2 @@ -/systemctl -/_systemctl +/systemctl.completion.bash +/systemctl.completion.zsh diff --git a/src/grp-system/systemctl/Makefile b/src/grp-system/systemctl/Makefile index 24585cc12b..114e58cb27 100644 --- a/src/grp-system/systemctl/Makefile +++ b/src/grp-system/systemctl/Makefile @@ -30,4 +30,12 @@ systemctl_SOURCES = \ systemctl_LDADD = \ libshared.la +files.out.all += systemctl.completion.bash +files.out.all += systemctl.completion.zsh +sd.sed_files += systemctl.completion.bash +sd.sed_files += systemctl.completion.zsh +sd.CPPFLAGS += -DROOTLIBEXECDIR=\"$(rootlibexecdir)\" +sd.CPPFLAGS += -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" +sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-system/systemd-shutdown/Makefile b/src/grp-system/systemd-shutdown/Makefile index 87cffd19f3..257a057823 100644 --- a/src/grp-system/systemd-shutdown/Makefile +++ b/src/grp-system/systemd-shutdown/Makefile @@ -36,4 +36,7 @@ systemd_shutdown_SOURCES = \ systemd_shutdown_LDADD = \ libshared.la +sd.CPPFLAGS += -DSYSTEM_SHUTDOWN_PATH=\"$(systemshutdowndir)\" +sd.CPPFLAGS += -DKEXEC=\"$(KEXEC)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-system/systemd-shutdown/systemd-shutdown.xml b/src/grp-system/systemd-shutdown/systemd-shutdown.xml index c94e2a1820..749158e5da 100644 --- a/src/grp-system/systemd-shutdown/systemd-shutdown.xml +++ b/src/grp-system/systemd-shutdown/systemd-shutdown.xml @@ -21,10 +21,10 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. --> -<refentry id="systemd-halt.service"> +<refentry id="systemd-shutdown"> <refentryinfo> - <title>systemd-halt.service</title> + <title>systemd-shutdown</title> <productname>systemd</productname> <authorgroup> @@ -38,7 +38,7 @@ </refentryinfo> <refmeta> - <refentrytitle>systemd-halt.service</refentrytitle> + <refentrytitle>systemd-shutdown</refentrytitle> <manvolnum>8</manvolnum> </refmeta> diff --git a/src/grp-system/systemd-shutdown/umount.h b/src/grp-system/systemd-shutdown/umount.h index 4e2215a47d..ce2fd9ec58 100644 --- a/src/grp-system/systemd-shutdown/umount.h +++ b/src/grp-system/systemd-shutdown/umount.h @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <stdbool.h> + int umount_all(bool *changed); int swapoff_all(bool *changed); diff --git a/src/grp-system/systemd/Makefile b/src/grp-system/systemd/Makefile index cfef258c6d..3efc406281 100644 --- a/src/grp-system/systemd/Makefile +++ b/src/grp-system/systemd/Makefile @@ -35,6 +35,10 @@ systemd_CFLAGS = \ systemd_LDADD = \ libcore.la +dist_tmpfiles_DATA = \ + tmpfiles.d/systemd.conf \ + systemd-tmpfs.conf + dist_pkgsysconf_DATA += \ src/core/system.conf \ src/core/user.conf @@ -68,4 +72,10 @@ dist_systemunit_DATA_busnames += \ BUSNAMES_TARGET_WANTS += \ org.freedesktop.systemd1.busname +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + +sd.CPPFLAGS += -DSYSTEMD_BINARY_PATH=\"$(rootlibexecdir)/systemd\" +sd.CPPFLAGS += -DSYSTEMD_SHUTDOWN_BINARY_PATH=\"$(rootlibexecdir)/systemd-shutdown\" +sd.CPPFLAGS += -DSYSTEMCTL_BINARY_PATH=\"$(rootbindir)/systemctl\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/Makefile b/src/grp-udev/Makefile index e589bfed0b..6b287f458c 100644 --- a/src/grp-udev/Makefile +++ b/src/grp-udev/Makefile @@ -42,6 +42,11 @@ dist_udevrules_DATA += \ rules/78-sound-card.rules \ rules/80-net-setup-link.rules +ifneq ($(HAVE_KMOD),) +dist_udevrules_DATA += \ + rules/80-drivers.rules +endif # HAVE_KMOD + nodist_udevrules_DATA += \ rules/99-systemd.rules @@ -69,11 +74,6 @@ SYSINIT_TARGET_WANTS += \ systemd-udevd.service \ systemd-udev-trigger.service -ifneq ($(HAVE_KMOD),) -dist_udevrules_DATA += \ - rules/80-drivers.rules -endif # HAVE_KMOD - nested.subdirs += ata_id nested.subdirs += cdrom_id nested.subdirs += collect diff --git a/src/grp-udev/libudev-core/Makefile b/src/grp-udev/libudev-core/Makefile index 8e9848309b..e4bf7c64f3 100644 --- a/src/grp-udev/libudev-core/Makefile +++ b/src/grp-udev/libudev-core/Makefile @@ -38,7 +38,7 @@ $(outdir)/keyboard-keys-from-name.h: $(outdir)/keyboard-keys-from-name.gperf gperf_txt_sources += \ src/udev/keyboard-keys-list.txt -libudev_core_la_SOURCES = \ +_libudev_core_la_SOURCES = \ src/udev/udev.h \ src/udev/udev-event.c \ src/udev/udev-watch.c \ @@ -59,7 +59,7 @@ libudev_core_la_SOURCES = \ src/udev/net/ethtool-util.h \ src/udev/net/ethtool-util.c -nodist_libudev_core_la_SOURCES = \ +_nodist_libudev_core_la_SOURCES = \ src/udev/keyboard-keys-from-name.h \ src/udev/net/link-config-gperf.c @@ -95,6 +95,11 @@ libudev_core_la_SOURCES += \ src/systemd/sd-login.h endif # HAVE_ACL +sd.libudev-core_SOURCES = $(patsubst src/udev/%,%,$(filter %.c,$(_libudev_core_la_SOURCES) $(_nodist_libudev_core_la_SOURCES))) +$(outdir)/libudev-core.la: $(addprefix $(outdir)/,$(sd.libudev-core_SOURCES:.c=.lo)) +$(outdir)/udev-builtin-keyboard.lo: $(outdir)/keyboard-keys-from-name.h +sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" + nested.subdirs += net include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/libudev-core/net/Makefile b/src/grp-udev/libudev-core/net/Makefile index b094ad75cf..5ccbd00002 100644 --- a/src/grp-udev/libudev-core/net/Makefile +++ b/src/grp-udev/libudev-core/net/Makefile @@ -20,6 +20,7 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. + include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk diff --git a/src/grp-udev/libudev-core/udev-builtin-input_id.c b/src/grp-udev/libudev-core/udev-builtin-input_id.c index bc2cab1cb8..386ef5b5dc 100644 --- a/src/grp-udev/libudev-core/udev-builtin-input_id.c +++ b/src/grp-udev/libudev-core/udev-builtin-input_id.c @@ -28,8 +28,8 @@ #include <string.h> #include <unistd.h> -#include <linux/limits.h> #include <linux/input.h> +#include <linux/limits.h> #include "basic/fd-util.h" #include "basic/stdio-util.h" diff --git a/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c b/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c index bf36b42957..3f3522f5e1 100644 --- a/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c +++ b/src/grp-udev/libudev-core/udev-builtin-net_setup_link.c @@ -19,9 +19,10 @@ #include "basic/alloc-util.h" #include "basic/log.h" -#include "link-config.h" #include "udev.h" +#include "net/link-config.h" + static link_config_ctx *ctx = NULL; static int builtin_net_setup_link(struct udev_device *dev, int argc, char **argv, bool test) { diff --git a/src/grp-udev/mtd_probe/Makefile b/src/grp-udev/mtd_probe/Makefile index d7392a8a3b..50703dddda 100644 --- a/src/grp-udev/mtd_probe/Makefile +++ b/src/grp-udev/mtd_probe/Makefile @@ -34,4 +34,6 @@ dist_udevrules_DATA += \ udevlibexec_PROGRAMS += \ mtd_probe +mtd_probe_LDADD += libbasic.la + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/scsi_id/scsi.h b/src/grp-udev/scsi_id/scsi.h index a27a84a40a..497cfe3e31 100644 --- a/src/grp-udev/scsi_id/scsi.h +++ b/src/grp-udev/scsi_id/scsi.h @@ -13,6 +13,7 @@ */ #include <scsi/scsi.h> +#include <sys/types.h> struct scsi_ioctl_command { unsigned int inlen; /* excluding scsi command length */ diff --git a/src/grp-udev/scsi_id/scsi_id.h b/src/grp-udev/scsi_id/scsi_id.h index 5c2e1c28ee..86d56a0c3f 100644 --- a/src/grp-udev/scsi_id/scsi_id.h +++ b/src/grp-udev/scsi_id/scsi_id.h @@ -17,6 +17,8 @@ * along with this program. If not, see <http://www.gnu.org/licenses/>. */ +#include <libudev.h> + #define MAX_PATH_LEN 512 /* diff --git a/src/grp-udev/systemd-hwdb/Makefile b/src/grp-udev/systemd-hwdb/Makefile index 03e7c283f2..ef4e5074ae 100644 --- a/src/grp-udev/systemd-hwdb/Makefile +++ b/src/grp-udev/systemd-hwdb/Makefile @@ -73,4 +73,6 @@ EXTRA_DIST += \ hwdb/ids-update.pl \ hwdb/sdio.ids +sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-udev/systemd-udevd/udevd.c b/src/grp-udev/systemd-udevd/udevd.c index 4915a285a5..07edbb3450 100644 --- a/src/grp-udev/systemd-udevd/udevd.c +++ b/src/grp-udev/systemd-udevd/udevd.c @@ -61,7 +61,6 @@ #include "basic/string-util.h" #include "basic/terminal-util.h" #include "basic/user-util.h" -#include "sd-netlink/netlink-util.h" #include "shared/dev-setup.h" #include "shared/udev-util.h" #include "udev.h" diff --git a/src/grp-udev/udevadm/Makefile b/src/grp-udev/udevadm/Makefile index ba3b466935..6fa837f6e3 100644 --- a/src/grp-udev/udevadm/Makefile +++ b/src/grp-udev/udevadm/Makefile @@ -42,4 +42,6 @@ udevadm_SOURCES = \ udevadm_LDADD = \ libudev-core.la +sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-utils/systemd-escape/systemd-escape.completion.bash b/src/grp-utils/systemd-escape/systemd-escape.completion.bash new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/grp-utils/systemd-escape/systemd-escape.completion.bash diff --git a/src/grp-utils/systemd-escape/systemd-escape.completion.zsh b/src/grp-utils/systemd-escape/systemd-escape.completion.zsh new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/grp-utils/systemd-escape/systemd-escape.completion.zsh diff --git a/src/grp-utils/systemd-path/Makefile b/src/grp-utils/systemd-path/Makefile index 442dbf00b4..9fcae47938 100644 --- a/src/grp-utils/systemd-path/Makefile +++ b/src/grp-utils/systemd-path/Makefile @@ -26,9 +26,13 @@ include $(topsrcdir)/build-aux/Makefile.head.mk bin_PROGRAMS += systemd-path systemd_path_SOURCES = \ + sd-path.c \ src/path/path.c systemd_path_LDADD = \ - libshared.la + libbasic.la + +sd.CPPFLAGS += -DLIBDIR=\"$(libdir)\" +sd.CPPFLAGS += -DROOTLIBDIR=\"$(rootlibdir)\" include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/grp-utils/systemd-path/systemd-path.completion.zsh b/src/grp-utils/systemd-path/systemd-path.completion.zsh new file mode 100644 index 0000000000..4919cf4250 --- /dev/null +++ b/src/grp-utils/systemd-path/systemd-path.completion.zsh @@ -0,0 +1,18 @@ +#compdef systemd-path + +__get_names() { + systemd-path | { while IFS=: read -r a b; do echo " $a"; done; } +} + +__names() { + local -a _names + _names=(${(fo)"$(__get_names)"}) + typeset -U _names + _describe 'names' _names +} + +_arguments \ + {-h,--help}'[Show help message]' \ + '--version[Show package version]' \ + '--host=[Sufix to append to paths]:suffix' \ + '*:name:__names' diff --git a/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.bash b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.bash new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.bash diff --git a/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.zsh b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.zsh new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/grp-utils/systemd-socket-activate/systemd-socket-activate.completion.zsh diff --git a/src/libbasic/include/basic/Makefile b/src/libbasic/include/basic/Makefile index d442808156..b1d41dc79d 100644 --- a/src/libbasic/include/basic/Makefile +++ b/src/libbasic/include/basic/Makefile @@ -23,7 +23,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -$(outdir)/errno-list.txt: +$(outdir)/errno-list.txt: | $(outdir)/.deps $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM -include errno.h - </dev/null | $(AWK) '/^#define[ \t]+E[^ _]+[ \t]+/ { print $$2; }' >$@ $(outdir)/errno-to-name.h: $(outdir)/errno-list.txt @@ -44,8 +44,8 @@ $(outdir)/arphrd-to-name.h: $(outdir)/arphrd-list.txt $(outdir)/arphrd-from-name.gperf: $(outdir)/arphrd-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "struct arphrd_name { const char* name; int id; };"; print "%null-strings"; print "%%";} { printf "%s, ARPHRD_%s\n", $$1, $$1 }' <$< >$@ -$(outdir)/cap-list.txt: - $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM -include linux/capability.h -include missing.h - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@ +$(outdir)/cap-list.txt: $(srcdir)/missing.h + $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM -include linux/capability.h -include $< - </dev/null | $(AWK) '/^#define[ \t]+CAP_[A-Z_]+[ \t]+/ { print $$2; }' | grep -v CAP_LAST_CAP >$@ $(outdir)/cap-to-name.h: $(outdir)/cap-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "static const char* const capability_names[] = { "} { printf "[%s] = \"%s\",\n", $$1, tolower($$1) } END{print "};"}' <$< >$@ @@ -56,4 +56,6 @@ $(outdir)/cap-from-name.gperf: $(outdir)/cap-list.txt $(outdir)/cap-from-name.h: $(outdir)/cap-from-name.gperf $(AM_V_GPERF)$(GPERF) -L ANSI-C -t --ignore-case -N lookup_capability -H hash_capability_name -p -C <$< >$@ +sd.CPPFLAGS += $(libbasic.CPPFLAGS) + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libbasic/include/basic/btrfs-ctree.h b/src/libbasic/include/basic/btrfs-ctree.h index 66bdf9736e..15e6d5582c 100644 --- a/src/libbasic/include/basic/btrfs-ctree.h +++ b/src/libbasic/include/basic/btrfs-ctree.h @@ -1,6 +1,7 @@ #pragma once #include "macro.h" +#include "missing.h" /* for BTRFS_UUID_SIZE */ #include "sparse-endian.h" /* Stolen from btrfs' ctree.h */ diff --git a/src/libbasic/include/basic/missing_syscall.h b/src/libbasic/include/basic/missing_syscall.h index d502d3b9ca..2929123679 100644 --- a/src/libbasic/include/basic/missing_syscall.h +++ b/src/libbasic/include/basic/missing_syscall.h @@ -22,6 +22,10 @@ /* Missing glibc definitions to access certain kernel APIs */ +#if __INCLUDE_LEVEL__ <= 1 +#error "Do not include missing_syscall.h directly; include it through missing.h." +#endif + #if !HAVE_DECL_PIVOT_ROOT static inline int pivot_root(const char *new_root, const char *put_old) { return syscall(SYS_pivot_root, new_root, put_old); diff --git a/src/libbasic/include/basic/rm-rf.h b/src/libbasic/include/basic/rm-rf.h index f693a5bb7c..8d315792ac 100644 --- a/src/libbasic/include/basic/rm-rf.h +++ b/src/libbasic/include/basic/rm-rf.h @@ -19,8 +19,11 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <stdlib.h> #include <sys/stat.h> +#include "macro.h" + typedef enum RemoveFlags { REMOVE_ONLY_DIRECTORIES = 1, REMOVE_ROOT = 2, diff --git a/src/libbasic/include/basic/socket-util.h b/src/libbasic/include/basic/socket-util.h index bad1f32e09..2b717a91d4 100644 --- a/src/libbasic/include/basic/socket-util.h +++ b/src/libbasic/include/basic/socket-util.h @@ -27,8 +27,8 @@ #include <sys/types.h> #include <sys/un.h> -#include <linux/netlink.h> #include <linux/if_packet.h> +#include <linux/netlink.h> #include "macro.h" #include "util.h" diff --git a/src/libbasic/include/basic/time-util.h b/src/libbasic/include/basic/time-util.h index a5e3f567ec..8324bb0dd0 100644 --- a/src/libbasic/include/basic/time-util.h +++ b/src/libbasic/include/basic/time-util.h @@ -26,6 +26,8 @@ #include <stdio.h> #include <time.h> +#include "macro.h" + typedef uint64_t usec_t; typedef uint64_t nsec_t; diff --git a/src/libbasic/src/Makefile b/src/libbasic/src/Makefile index 2fc52e91f5..19883d92a1 100644 --- a/src/libbasic/src/Makefile +++ b/src/libbasic/src/Makefile @@ -240,4 +240,11 @@ libbasic_la_LIBADD = \ -lrt \ -lm +_inc = $(call at.path,$(addprefix $(outdir)/../include/basic/,$1)) +$(outdir)/af-list.lo: $(call _inc,af-from-name.h af-to-name.h) +$(outdir)/arphrd-list.lo: $(call _inc,arphrd-from-name.h arphrd-to-name.h) +$(outdir)/cap-list.lo: $(call _inc,cap-from-name.h cap-to-name.h) +$(outdir)/errno-list.lo: $(call _inc,errno-from-name.h errno-to-name.h) +sd.CPPFLAGS += $(libbasic.CPPFLAGS) + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libfirewall/Makefile b/src/libfirewall/Makefile index ced0f7e476..0302964186 100644 --- a/src/libfirewall/Makefile +++ b/src/libfirewall/Makefile @@ -39,4 +39,6 @@ libfirewall_la_LIBADD = \ $(LIBIPTC_LIBS) endif # HAVE_LIBIPTC +sd.CPPFLAGS += $(libbasic.CPPFLAGS) + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libshared/include/shared/test-tables.h b/src/libshared/include/shared/test-tables.h index 228e510104..bf286bede5 100644 --- a/src/libshared/include/shared/test-tables.h +++ b/src/libshared/include/shared/test-tables.h @@ -20,6 +20,8 @@ #include <stdio.h> #include <stdlib.h> +#include "basic/macro.h" + typedef const char* (*lookup_t)(int); typedef int (*reverse_t)(const char*); diff --git a/src/libshared/src/Makefile b/src/libshared/src/Makefile index d808b55361..9ac9ba59ac 100644 --- a/src/libshared/src/Makefile +++ b/src/libshared/src/Makefile @@ -134,10 +134,27 @@ libshared_la_CFLAGS = \ libshared_la_LIBADD = \ libsystemd-internal.la \ - libsystemd-journal-internal.la \ libudev-internal.la \ $(ACL_LIBS) \ $(LIBIDN_LIBS) \ $(SECCOMP_LIBS) +sd.CPPFLAGS += $(addprefix -I,$(call at.path,$(srcdir)/../include $(srcdir)/../include/shared)) +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" +sd.CPPFLAGS += -DSYSTEM_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/system\" +sd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" +sd.CPPFLAGS += -DSYSTEM_SYSVINIT_PATH=\"$(SYSTEM_SYSVINIT_PATH)\" +sd.CPPFLAGS += -DSYSTEM_SYSVRCND_PATH=\"$(SYSTEM_SYSVRCND_PATH)\" +sd.CPPFLAGS += -DUSER_CONFIG_UNIT_PATH=\"$(pkgsysconfdir)/user\" +sd.CPPFLAGS += -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" + +sd.CPPFLAGS += -DSYSTEMD_FSCK_PATH=\"$(libexecdir)/systemd-fsck\" + +sd.CPPFLAGS += -DSYSTEMD_TTY_ASK_PASSWORD_AGENT_BINARY_PATH=\"$(bindir)/systemd-tty-ask-password-agent\" + +sd.CPPFLAGS += -DSYSTEM_GENERATOR_PATH=\"$(systemgeneratordir)\" +sd.CPPFLAGS += -DUSER_GENERATOR_PATH=\"$(usergeneratordir)\" + +sd.CPPFLAGS += -DPOLKIT_AGENT_BINARY_PATH=\"$(bindir)/pkttyagent\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd-network/include/systemd-network/sd-ndisc.h b/src/libsystemd-network/include/systemd-network/sd-ndisc.h index 58e6e80b5d..9ef96a8aa0 100644 --- a/src/libsystemd-network/include/systemd-network/sd-ndisc.h +++ b/src/libsystemd-network/include/systemd-network/sd-ndisc.h @@ -22,6 +22,7 @@ #include <inttypes.h> #include <net/ethernet.h> +#include <netinet/in.h> #include <systemd/sd-event.h> diff --git a/src/libsystemd-network/src/Makefile b/src/libsystemd-network/src/Makefile index 69a415c2bb..30afeae1ef 100644 --- a/src/libsystemd-network/src/Makefile +++ b/src/libsystemd-network/src/Makefile @@ -78,4 +78,8 @@ libsystemd_network_la_SOURCES = \ libsystemd_network_la_LIBADD = \ $(KMOD_LIBS) +sd.CPPFLAGS += $(libsystemd-network.CPPFLAGS) +sd.CPPFLAGS += $(libshared.CPPFLAGS) +sd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd-network/src/network-internal.c b/src/libsystemd-network/src/network-internal.c index d9f7603104..53a2202068 100644 --- a/src/libsystemd-network/src/network-internal.c +++ b/src/libsystemd-network/src/network-internal.c @@ -23,6 +23,7 @@ #include <linux/if.h> #include "basic/alloc-util.h" +#include "basic/ether-addr-util.h" #include "basic/hexdecoct.h" #include "basic/log.h" #include "basic/parse-util.h" @@ -32,7 +33,6 @@ #include "basic/strv.h" #include "basic/utf8.h" #include "basic/util.h" -#include "ether-addr-util.c" #include "shared/condition.h" #include "shared/conf-parser.h" #include "systemd-network/dhcp-lease-internal.h" diff --git a/src/libsystemd/Makefile b/src/libsystemd/Makefile index 479bcb6487..23a2bddfee 100644 --- a/src/libsystemd/Makefile +++ b/src/libsystemd/Makefile @@ -32,14 +32,14 @@ EXTRA_DIST += \ src/libsystemd/sd-bus/DIFFERENCES \ src/libsystemd/sd-bus/GVARIANT-SERIALIZATION -libsystemd_la_SOURCES = \ +#libsystemd_la_SOURCES = \ $(libsystemd_internal_la_SOURCES) \ $(libsystemd_journal_internal_la_SOURCES) -nodist_libsystemd_la_SOURCES = \ +#nodist_libsystemd_la_SOURCES = \ $(nodist_libsystemd_internal_la_SOURCES) -libsystemd_la_CFLAGS = \ +#libsystemd_la_CFLAGS = \ $(libsystemd_internal_la_CFLAGS) \ $(libsystemd_journal_internal_la_CFLAGS) @@ -48,14 +48,16 @@ libsystemd_la_LDFLAGS = \ -version-info $(LIBSYSTEMD_CURRENT):$(LIBSYSTEMD_REVISION):$(LIBSYSTEMD_AGE) \ -Wl,--version-script=$(srcdir)/libsystemd.sym -libsystemd_la_LIBADD = \ +#libsystemd_la_LIBADD = \ $(libsystemd_internal_la_LIBADD) \ $(libsystemd_journal_internal_la_LIBADD) +libsystemd_la_LIBADD = $(libsystemd-internal.DEPENDS) + pkgconfiglib_DATA += \ src/libsystemd/libsystemd.pc -pkginclude_HEADERS += \ +_pkginclude_HEADERS += \ src/systemd/sd-bus.h \ src/systemd/sd-bus-protocol.h \ src/systemd/sd-bus-vtable.h \ @@ -64,7 +66,12 @@ pkginclude_HEADERS += \ src/systemd/sd-id128.h \ src/systemd/sd-daemon.h -lib_LTLIBRARIES += \ +_pkginclude_HEADERS += \ + src/systemd/sd-journal.h \ + src/systemd/sd-messages.h \ + src/systemd/_sd-common.h + +rootlib_LTLIBRARIES += \ libsystemd.la # ------------------------------------------------------------------------------ @@ -90,23 +97,28 @@ tests += \ test-local-addresses \ test-resolve -test-libsystemd-sym.c: \ - $(top_builddir)/src/libsystemd/libsystemd.sym \ - src/systemd/sd-journal.h \ - src/systemd/sd-daemon.h \ - src/systemd/sd-login.h \ - src/systemd/sd-bus.h \ - src/systemd/sd-utf8.h \ - src/systemd/sd-resolve.h \ - src/systemd/sd-path.h \ - src/systemd/sd-event.h - $(generate-sym-test) +$(outdir)/test-libsystemd-sym.c: \ + $(srcdir)/include/systemd/sd-journal.h \ + $(srcdir)/include/systemd/sd-daemon.h \ + $(srcdir)/include/systemd/sd-login.h \ + $(srcdir)/include/systemd/sd-bus.h \ + $(srcdir)/include/systemd/sd-utf8.h \ + $(srcdir)/include/systemd/sd-resolve.h \ + $(srcdir)/include/systemd/sd-path.h \ + $(srcdir)/include/systemd/sd-event.h nodist_test_libsystemd_sym_SOURCES = \ test-libsystemd-sym.c test_libsystemd_sym_LDADD = \ libsystemd.la +$(DESTDIR)$(pkgincludedir)/%.h: $(srcdir)/include/systemd/%.h + @$(NORMAL_INSTALL) + $(am.INSTALL_HEADERS) + +files.sys.all += $(addprefix $(pkgincludedir)/,$(notdir $(_pkginclude_HEADERS))) +$(outdir)/libsystemd.la: $(srcdir)/libsystemd.sym + nested.subdirs += src include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/include/systemd/sd-bus.h b/src/libsystemd/include/systemd/sd-bus.h index 4e338a3270..779c4b07d3 100644 --- a/src/libsystemd/include/systemd/sd-bus.h +++ b/src/libsystemd/include/systemd/sd-bus.h @@ -100,10 +100,10 @@ enum { /* Callbacks */ typedef int (*sd_bus_message_handler_t)(sd_bus_message *m, void *userdata, sd_bus_error *ret_error); -typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error); -typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error); typedef int (*sd_bus_property_get_t) (sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *reply, void *userdata, sd_bus_error *ret_error); typedef int (*sd_bus_property_set_t) (sd_bus *bus, const char *path, const char *interface, const char *property, sd_bus_message *value, void *userdata, sd_bus_error *ret_error); +typedef int (*sd_bus_object_find_t) (sd_bus *bus, const char *path, const char *interface, void *userdata, void **ret_found, sd_bus_error *ret_error); +typedef int (*sd_bus_node_enumerator_t) (sd_bus *bus, const char *prefix, void *userdata, char ***ret_nodes, sd_bus_error *ret_error); typedef int (*sd_bus_track_handler_t) (sd_bus_track *track, void *userdata); #include "sd-bus-protocol.h" diff --git a/src/libsystemd/include/systemd/sd-utf8.h b/src/libsystemd/include/systemd/sd-utf8.h deleted file mode 100644 index 6781983878..0000000000 --- a/src/libsystemd/include/systemd/sd-utf8.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef foosdutf8hfoo -#define foosdutf8hfoo - -/*** - This file is part of systemd. - - Copyright 2013 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include "_sd-common.h" - -_SD_BEGIN_DECLARATIONS; - -_sd_pure_ const char *sd_utf8_is_valid(const char *s); -_sd_pure_ const char *sd_ascii_is_valid(const char *s); - -_SD_END_DECLARATIONS; - -#endif diff --git a/src/libsystemd/sd_event_get_fd.xml b/src/libsystemd/sd_event_get_fd.xml index f68752dd0e..982f279657 100644 --- a/src/libsystemd/sd_event_get_fd.xml +++ b/src/libsystemd/sd_event_get_fd.xml @@ -119,7 +119,7 @@ <example> <title>Integration in the GLib event loop</title> - <programlisting><xi:include href="glib-event-glue.c" parse="text" /></programlisting> + <programlisting><xi:include href="sd_event_get_fd-glib-example.c" parse="text" /></programlisting> </example> </refsect1> diff --git a/src/libsystemd/src/Makefile b/src/libsystemd/src/Makefile index d46b0749b9..dee853576d 100644 --- a/src/libsystemd/src/Makefile +++ b/src/libsystemd/src/Makefile @@ -23,18 +23,16 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -libsystemd_internal_la_SOURCES = \ +_libsystemd_internal_la_SOURCES = \ src/systemd/sd-bus.h \ src/systemd/sd-bus-protocol.h \ src/systemd/sd-bus-vtable.h \ - src/systemd/sd-utf8.h \ src/systemd/sd-event.h \ src/systemd/sd-netlink.h \ src/systemd/sd-resolve.h \ src/systemd/sd-login.h \ src/systemd/sd-id128.h \ src/systemd/sd-daemon.h \ - src/systemd/sd-path.h \ src/systemd/sd-network.h \ src/systemd/sd-hwdb.h \ src/systemd/sd-device.h \ @@ -81,7 +79,6 @@ libsystemd_internal_la_SOURCES = \ src/libsystemd/sd-bus/kdbus.h \ src/libsystemd/sd-bus/bus-dump.c \ src/libsystemd/sd-bus/bus-dump.h \ - src/libsystemd/sd-utf8/sd-utf8.c \ src/libsystemd/sd-event/sd-event.c \ src/libsystemd/sd-netlink/sd-netlink.c \ src/libsystemd/sd-netlink/netlink-internal.h \ @@ -97,7 +94,6 @@ libsystemd_internal_la_SOURCES = \ src/libsystemd/sd-id128/sd-id128.c \ src/libsystemd/sd-daemon/sd-daemon.c \ src/libsystemd/sd-login/sd-login.c \ - src/libsystemd/sd-path/sd-path.c \ src/libsystemd/sd-network/sd-network.c \ src/libsystemd/sd-network/network-util.h \ src/libsystemd/sd-network/network-util.c \ @@ -120,12 +116,7 @@ libsystemd_internal_la_LIBADD = \ noinst_LTLIBRARIES += \ libsystemd-internal.la -pkginclude_HEADERS += \ - src/systemd/sd-journal.h \ - src/systemd/sd-messages.h \ - src/systemd/_sd-common.h - -libsystemd_journal_internal_la_SOURCES = \ +_libsystemd_journal_internal_la_SOURCES = \ src/journal/sd-journal.c \ src/systemd/sd-journal.h \ src/systemd/_sd-common.h \ @@ -150,7 +141,7 @@ libsystemd_journal_internal_la_SOURCES = \ src/shared/gcrypt-util.h \ src/shared/gcrypt-util.c -nodist_libsystemd_journal_internal_la_SOURCES = \ +#nodist_libsystemd_journal_internal_la_SOURCES = \ src/journal/audit_type-to-name.h gperf_txt_sources += \ @@ -179,7 +170,7 @@ libsystemd_journal_internal_la_LIBADD += \ endif # HAVE_LZ4 ifneq ($(HAVE_GCRYPT),) -libsystemd_journal_internal_la_SOURCES += \ +_libsystemd_journal_internal_la_SOURCES += \ src/journal/journal-authenticate.c \ src/journal/journal-authenticate.h \ src/journal/fsprg.c \ @@ -188,11 +179,26 @@ libsystemd_journal_internal_la_SOURCES += \ libsystemd_journal_internal_la_LIBADD += \ $(GCRYPT_LIBS) +libsystemd_journal_internal_la_CFLAGS += \ + $(GCRYPT_CFLAGS) endif # HAVE_GCRYPT -noinst_LTLIBRARIES += \ +#noinst_LTLIBRARIES += \ libsystemd-journal-internal.la +# Hook into the `am` module +libsystemd_internal_la_CFLAGS += $(libsystemd_journal_internal_la_CFLAGS) +libsystemd_internal_la_LIBADD += $(libsystemd_journal_internal_la_LIBADD) + +# Don't bother trying to hook into the `am` module for the sources; the only +# thing it adds over declaring the dependencies is adding the appropriate +# directories to am.subdirs=>at.subdirs; but we can do that here just as easily +# with nested.subdirs. +sd.libsystemd_SOURCES = +sd.libsystemd_SOURCES += $(patsubst src/libsystemd/%,%,$(filter %.c,$(_libsystemd_internal_la_SOURCES))) +sd.libsystemd_SOURCES += $(addprefix sd-journal/,$(notdir $(filter %.c,$(_libsystemd_journal_internal_la_SOURCES)))) +$(outdir)/libsystemd-internal.la: $(addprefix $(outdir)/,$(sd.libsystemd_SOURCES:.c=.lo)) + nested.subdirs += sd-bus nested.subdirs += sd-daemon nested.subdirs += sd-device diff --git a/src/libsystemd/src/sd-bus/bus-signature.h b/src/libsystemd/src/sd-bus/bus-signature.h index 1e0cd7f587..8b7a45cef5 100644 --- a/src/libsystemd/src/sd-bus/bus-signature.h +++ b/src/libsystemd/src/sd-bus/bus-signature.h @@ -20,6 +20,7 @@ ***/ #include <stdbool.h> +#include <sys/types.h> bool signature_is_single(const char *s, bool allow_dict_entry); bool signature_is_pair(const char *s); diff --git a/src/libsystemd/src/sd-bus/bus-socket.h b/src/libsystemd/src/sd-bus/bus-socket.h index 6e1d32e6a7..712e37bcc0 100644 --- a/src/libsystemd/src/sd-bus/bus-socket.h +++ b/src/libsystemd/src/sd-bus/bus-socket.h @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <stdbool.h> + #include <systemd/sd-bus.h> void bus_socket_setup(sd_bus *b); diff --git a/src/libsystemd/src/sd-bus/bus-track.h b/src/libsystemd/src/sd-bus/bus-track.h index 7d93a727d6..73b7503ae5 100644 --- a/src/libsystemd/src/sd-bus/bus-track.h +++ b/src/libsystemd/src/sd-bus/bus-track.h @@ -19,4 +19,6 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <systemd/sd-bus.h> + void bus_track_dispatch(sd_bus_track *track); diff --git a/src/libsystemd/src/sd-device/device-internal.h b/src/libsystemd/src/sd-device/device-internal.h index 5e5ae47339..a1a1d3c4e3 100644 --- a/src/libsystemd/src/sd-device/device-internal.h +++ b/src/libsystemd/src/sd-device/device-internal.h @@ -23,6 +23,8 @@ #include "basic/hashmap.h" #include "basic/set.h" +#include "sd-device.h" + struct sd_device { uint64_t n_ref; diff --git a/src/libsystemd/src/sd-journal/Makefile b/src/libsystemd/src/sd-journal/Makefile index d0415fb0d3..f13c2b51fa 100644 --- a/src/libsystemd/src/sd-journal/Makefile +++ b/src/libsystemd/src/sd-journal/Makefile @@ -23,20 +23,22 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -audit_list_includes = -include linux/audit.h -include missing.h +audit_list_includes = -include linux/audit.h -include $(topsrcdir)/src/libbasic/include/basic/missing.h ifneq ($(HAVE_AUDIT),) audit_list_includes += -include libaudit.h endif # HAVE_AUDIT -$(outdir)/audit_type-list.txt: +$(outdir)/audit_type-list.txt: $(call at.path,$(topsrcdir)/src/libbasic/include/basic/missing.h) $(AM_V_GEN)$(CPP) $(sd.ALL_CPPFLAGS) -dM $(audit_list_includes) - </dev/null | grep -vE 'AUDIT_.*(FIRST|LAST)_' | $(SED) -r -n 's/^#define\s+AUDIT_(\w+)\s+([0-9]{4})\s*$$/\1\t\2/p' | sort -k2 >$@ $(outdir)/audit_type-to-name.h: $(outdir)/audit_type-list.txt $(AM_V_GEN)$(AWK) 'BEGIN{ print "const char *audit_type_to_string(int type) {\n\tswitch(type) {" } {printf " case AUDIT_%s: return \"%s\";\n", $$1, $$1 } END{ print " default: return NULL;\n\t}\n}\n" }' <$< >$@ # fsprg.c is a drop-in file using void pointer arithmetic -libsystemd_journal_internal_la_CFLAGS += \ - $(GCRYPT_CFLAGS) \ - -Wno-pointer-arith +$(outdir)/fsprg.lo: sd.ALL_CFLAGS += -Wno-pointer-arith + +sd.CPPFLAGS += $(libbasic.CPPFLAGS) +sd.CPPFLAGS += -DCATALOG_DATABASE=\"$(catalogstatedir)/database\" +$(outdir)/audit-type.lo: $(outdir)/audit_type-to-name.h include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/src/sd-journal/audit-type.c b/src/libsystemd/src/sd-journal/audit-type.c index 0ccbb456c3..f4dd1e9417 100644 --- a/src/libsystemd/src/sd-journal/audit-type.c +++ b/src/libsystemd/src/sd-journal/audit-type.c @@ -24,8 +24,8 @@ # include <libaudit.h> #endif -#include "audit_type-to-name.h" #include "basic/macro.h" #include "basic/missing.h" #include "audit-type.h" +#include "audit_type-to-name.h" diff --git a/src/libsystemd/src/sd-journal/journal-def.h b/src/libsystemd/src/sd-journal/journal-def.h index 7e456fcc66..86c843905a 100644 --- a/src/libsystemd/src/sd-journal/journal-def.h +++ b/src/libsystemd/src/sd-journal/journal-def.h @@ -32,16 +32,20 @@ */ typedef struct Header Header; + typedef struct ObjectHeader ObjectHeader; typedef union Object Object; + typedef struct DataObject DataObject; typedef struct FieldObject FieldObject; typedef struct EntryObject EntryObject; typedef struct HashTableObject HashTableObject; typedef struct EntryArrayObject EntryArrayObject; typedef struct TagObject TagObject; + typedef struct EntryItem EntryItem; typedef struct HashItem HashItem; + typedef struct FSSHeader FSSHeader; /* Object types */ diff --git a/src/libsystemd/src/sd-journal/mmap-cache.h b/src/libsystemd/src/sd-journal/mmap-cache.h index 199d944647..d7eca3c237 100644 --- a/src/libsystemd/src/sd-journal/mmap-cache.h +++ b/src/libsystemd/src/sd-journal/mmap-cache.h @@ -20,7 +20,9 @@ ***/ #include <stdbool.h> +#include <stdint.h> #include <sys/stat.h> +#include <sys/types.h> /* One context per object type, plus one of the header, plus one "additional" one */ #define MMAP_CACHE_MAX_CONTEXTS 9 diff --git a/src/libsystemd/src/sd-netlink/local-addresses.c b/src/libsystemd/src/sd-netlink/local-addresses.c index 81e99e0e5d..0baaab557f 100644 --- a/src/libsystemd/src/sd-netlink/local-addresses.c +++ b/src/libsystemd/src/sd-netlink/local-addresses.c @@ -22,7 +22,6 @@ #include "basic/macro.h" #include "local-addresses.h" -#include "netlink-util.h" #include "sd-netlink.h" static int address_compare(const void *_a, const void *_b) { diff --git a/src/libsystemd/src/sd-netlink/sd-netlink.h b/src/libsystemd/src/sd-netlink/sd-netlink.h index d88506a9d7..1df902d30e 100644 --- a/src/libsystemd/src/sd-netlink/sd-netlink.h +++ b/src/libsystemd/src/sd-netlink/sd-netlink.h @@ -24,8 +24,8 @@ #include <netinet/ether.h> #include <netinet/in.h> -#include <linux/rtnetlink.h> #include <linux/neighbour.h> +#include <linux/rtnetlink.h> #include <systemd/_sd-common.h> #include <systemd/sd-event.h> diff --git a/src/libsystemd/src/sd-network/network-util.h b/src/libsystemd/src/sd-network/network-util.h index 26780dce28..902be2b2e8 100644 --- a/src/libsystemd/src/sd-network/network-util.h +++ b/src/libsystemd/src/sd-network/network-util.h @@ -19,6 +19,8 @@ along with systemd; If not, see <http://www.gnu.org/licenses/>. ***/ +#include <stdbool.h> + #include "sd-network.h" bool network_is_online(void); diff --git a/src/libsystemd/src/sd-utf8/sd-utf8.c b/src/libsystemd/src/sd-utf8/sd-utf8.c deleted file mode 100644 index 58e4a88f07..0000000000 --- a/src/libsystemd/src/sd-utf8/sd-utf8.c +++ /dev/null @@ -1,35 +0,0 @@ -/*** - This file is part of systemd. - - Copyright 2013 Lennart Poettering - - systemd is free software; you can redistribute it and/or modify it - under the terms of the GNU Lesser General Public License as published by - the Free Software Foundation; either version 2.1 of the License, or - (at your option) any later version. - - systemd is distributed in the hope that it will be useful, but - WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License - along with systemd; If not, see <http://www.gnu.org/licenses/>. -***/ - -#include <systemd/sd-utf8.h> - -#include "basic/utf8.h" -#include "basic/util.h" - -_public_ const char *sd_utf8_is_valid(const char *s) { - assert_return(s, NULL); - - return utf8_is_valid(s); -} - -_public_ const char *sd_ascii_is_valid(const char *s) { - assert_return(s, NULL); - - return ascii_is_valid(s); -} diff --git a/src/libsystemd/src/subdir.mk b/src/libsystemd/src/subdir.mk index 605b592401..71691e8dac 100644 --- a/src/libsystemd/src/subdir.mk +++ b/src/libsystemd/src/subdir.mk @@ -20,10 +20,13 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk + +include $(dir $(lastword $(MAKEFILE_LIST)))/../../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -sd.CPPFLAGS += -DLIBDIR=\"$(libdir)\" +sd.CPPFLAGS += $(libsystemd.CPPFLAGS) +sd.CPPFLAGS += $(libbasic.CPPFLAGS) +sd.CPPFLAGS += $(libshared.CPPFLAGS) sd.CPPFLAGS += -DUDEVLIBEXECDIR=\"$(udevlibexecdir)\" include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libsystemd/src/test.mk b/src/libsystemd/src/test.mk index bffba67d5e..0290b33f6b 100644 --- a/src/libsystemd/src/test.mk +++ b/src/libsystemd/src/test.mk @@ -20,8 +20,6 @@ # # You should have received a copy of the GNU Lesser General Public License # along with systemd; If not, see <http://www.gnu.org/licenses/>. -include $(dir $(lastword $(MAKEFILE_LIST)))/../../config.mk -include $(topsrcdir)/build-aux/Makefile.head.mk test_bus_marshal_SOURCES = \ src/libsystemd/sd-bus/test-bus-marshal.c @@ -152,6 +150,3 @@ test_resolve_SOURCES = \ test_resolve_LDADD = \ libshared.la - - -include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/libudev/Makefile b/src/libudev/Makefile index 3bc64ab8e0..0ca3d15841 100644 --- a/src/libudev/Makefile +++ b/src/libudev/Makefile @@ -38,8 +38,7 @@ libudev_la_LDFLAGS = \ -version-info $(LIBUDEV_CURRENT):$(LIBUDEV_REVISION):$(LIBUDEV_AGE) \ -Wl,--version-script=$(srcdir)/libudev.sym -libudev_la_LIBADD = \ - libsystemd-internal.la +libudev_la_LIBADD += $(libudev-internal.DEPENDS) pkgconfiglib_DATA += \ src/libudev/libudev.pc @@ -47,10 +46,8 @@ pkgconfiglib_DATA += \ EXTRA_DIST += \ src/libudev/libudev.pc.in -test-libudev-sym.c: \ - src/libudev/libudev.sym \ - src/udev/udev.h - $(generate-sym-test) +$(outdir)/test-libudev-sym.c: \ + $(srcdir)/udev.h nodist_test_libudev_sym_SOURCES = \ test-libudev-sym.c diff --git a/src/libudev/src/Makefile b/src/libudev/src/Makefile index 46f122d52d..3f2f59ed39 100644 --- a/src/libudev/src/Makefile +++ b/src/libudev/src/Makefile @@ -23,7 +23,7 @@ include $(dir $(lastword $(MAKEFILE_LIST)))/../../../config.mk include $(topsrcdir)/build-aux/Makefile.head.mk -libudev_la_SOURCES =\ +libudev_internal_la_SOURCES =\ src/libudev/libudev.sym \ src/libudev/libudev-private.h \ src/libudev/libudev-device-internal.h \ @@ -36,10 +36,11 @@ libudev_la_SOURCES =\ src/libudev/libudev-monitor.c \ src/libudev/libudev-queue.c \ src/libudev/libudev-hwdb.c + +libudev_internal_la_LIBADD = \ + libsystemd-internal.la + noinst_LTLIBRARIES += \ libudev-internal.la -libudev_internal_la_SOURCES =\ - $(libudev_la_SOURCES) - include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-cryptsetup/Makefile b/src/systemd-cryptsetup/Makefile index 73a46bf6da..981bd89c85 100644 --- a/src/systemd-cryptsetup/Makefile +++ b/src/systemd-cryptsetup/Makefile @@ -56,4 +56,6 @@ SYSINIT_TARGET_WANTS += \ endif # HAVE_LIBCRYPTSETUP +sd.CPPFLAGS += -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-dbus1-generator/Makefile b/src/systemd-dbus1-generator/Makefile index 1d7f0d1a81..8a4193621a 100644 --- a/src/systemd-dbus1-generator/Makefile +++ b/src/systemd-dbus1-generator/Makefile @@ -40,10 +40,14 @@ dbus1-generator-install-hook: dbus1-generator-uninstall-hook: rm -f $(DESTDIR)$(usergeneratordir)/systemd-dbus1-generator -dist_xinitrc_SCRIPTS = \ +# TODO +_dist_xinitrc_SCRIPTS = \ xorg/50-systemd-user.sh INSTALL_EXEC_HOOKS += dbus1-generator-install-hook UNINSTALL_EXEC_HOOKS += dbus1-generator-uninstall-hook +sd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" +sd.CPPFLAGS += -DUSER_DATA_UNIT_PATH=\"$(userunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-debug-generator/Makefile b/src/systemd-debug-generator/Makefile index bba46c2905..d07c97f2ef 100644 --- a/src/systemd-debug-generator/Makefile +++ b/src/systemd-debug-generator/Makefile @@ -31,4 +31,6 @@ systemd_debug_generator_SOURCES = \ systemd_debug_generator_LDADD = \ libshared.la +sd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-getty-generator/Makefile b/src/systemd-getty-generator/Makefile index 14f7d02a86..9ca689c035 100644 --- a/src/systemd-getty-generator/Makefile +++ b/src/systemd-getty-generator/Makefile @@ -30,4 +30,6 @@ systemd_getty_generator_SOURCES = \ systemd_getty_generator_LDADD = \ libshared.la +sd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-gpt-auto-generator/Makefile b/src/systemd-gpt-auto-generator/Makefile index 177db8da7c..ef832ad737 100644 --- a/src/systemd-gpt-auto-generator/Makefile +++ b/src/systemd-gpt-auto-generator/Makefile @@ -40,4 +40,6 @@ systemd_gpt_auto_generator_CFLAGS = \ $(BLKID_CFLAGS) endif # HAVE_BLKID +sd.CPPFLAGS += -DSYSTEMD_CRYPTSETUP_PATH=\"$(rootlibexecdir)/systemd-cryptsetup\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-nspawn/Makefile b/src/systemd-nspawn/Makefile index d6f928ebd6..2fe9bcc143 100644 --- a/src/systemd-nspawn/Makefile +++ b/src/systemd-nspawn/Makefile @@ -82,4 +82,9 @@ test_patch_uid_LDADD = \ manual_tests += \ test-patch-uid +dist_tmpfiles_DATA = \ + tmpfiles.d/systemd-nspawn.conf + +sd.CPPFLAGS += -I$(topsrcdir)/src/libudev/src + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-nspawn/nspawn-expose-ports.c b/src/systemd-nspawn/nspawn-expose-ports.c index 6c9dbf4508..a00e7600aa 100644 --- a/src/systemd-nspawn/nspawn-expose-ports.c +++ b/src/systemd-nspawn/nspawn-expose-ports.c @@ -26,7 +26,6 @@ #include "basic/util.h" #include "firewall-util.h" #include "sd-netlink/local-addresses.h" -#include "sd-netlink/netlink-util.h" #include "sd-netlink/sd-netlink.h" #include "nspawn-expose-ports.h" diff --git a/src/systemd-nspawn/nspawn-mount.h b/src/systemd-nspawn/nspawn-mount.h index 0daf145412..0b3f3fbefa 100644 --- a/src/systemd-nspawn/nspawn-mount.h +++ b/src/systemd-nspawn/nspawn-mount.h @@ -20,6 +20,7 @@ ***/ #include <stdbool.h> +#include <sys/types.h> typedef enum VolatileMode { VOLATILE_NO, diff --git a/src/systemd-nspawn/nspawn-network.c b/src/systemd-nspawn/nspawn-network.c index f27b6c4105..1ae0a52f03 100644 --- a/src/systemd-nspawn/nspawn-network.c +++ b/src/systemd-nspawn/nspawn-network.c @@ -32,7 +32,6 @@ #include "basic/stat-util.h" #include "basic/string-util.h" #include "basic/util.h" -#include "sd-netlink/netlink-util.h" #include "sd-netlink/sd-netlink.h" #include "shared/udev-util.h" diff --git a/src/systemd-nspawn/nspawn-register.c b/src/systemd-nspawn/nspawn-register.c index f1ed51e8b8..3f174b6f24 100644 --- a/src/systemd-nspawn/nspawn-register.c +++ b/src/systemd-nspawn/nspawn-register.c @@ -22,7 +22,7 @@ #include "basic/stat-util.h" #include "basic/strv.h" #include "basic/util.h" -#include "sd-bus/bus-error.h" +#include "sd-bus/bus-error.h" /* for bus_error_message */ #include "shared/bus-unit-util.h" #include "shared/bus-util.h" diff --git a/src/systemd-nspawn/nspawn.c b/src/systemd-nspawn/nspawn.c index 7f555accf4..5537a526f0 100644 --- a/src/systemd-nspawn/nspawn.c +++ b/src/systemd-nspawn/nspawn.c @@ -72,7 +72,6 @@ #include "basic/process-util.h" #include "basic/random-util.h" #include "basic/rm-rf.h" -#include "sd-netlink/netlink-util.h" #include "shared/base-filesystem.h" #include "shared/dev-setup.h" #include "shared/gpt.h" diff --git a/src/systemd-remount-fs/Makefile b/src/systemd-remount-fs/Makefile index 49b10a879a..a0dcf27135 100644 --- a/src/systemd-remount-fs/Makefile +++ b/src/systemd-remount-fs/Makefile @@ -32,4 +32,7 @@ systemd_remount_fs_SOURCES = \ systemd_remount_fs_LDADD = \ libshared.la +sd.CPPFLAGS += -DMOUNT_PATH=\"$(MOUNT_PATH)\" +sd.CPPFLAGS += -DUMOUNT_PATH=\"$(UMOUNT_PATH)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.bash b/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.bash new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.bash diff --git a/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.zsh b/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.zsh new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/systemd-stdio-bridge/systemd-stdio-bridge.completion.zsh diff --git a/src/systemd-system-update-generator/Makefile b/src/systemd-system-update-generator/Makefile index fd44aef359..2fa9008ff6 100644 --- a/src/systemd-system-update-generator/Makefile +++ b/src/systemd-system-update-generator/Makefile @@ -30,4 +30,6 @@ systemd_system_update_generator_SOURCES = \ systemd_system_update_generator_LDADD = \ libshared.la +sd.CPPFLAGS += -DSYSTEM_DATA_UNIT_PATH=\"$(systemunitdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/systemd-timesyncd/Makefile b/src/systemd-timesyncd/Makefile index c9289846c4..511c86ba82 100644 --- a/src/systemd-timesyncd/Makefile +++ b/src/systemd-timesyncd/Makefile @@ -61,4 +61,9 @@ EXTRA_DIST += \ units/systemd-timesyncd.service.in \ src/timesync/timesyncd.conf.in +dist_systempreset_DATA = \ + 90-timesyncd.preset + +sd.CPPFLAGS += -DPKGSYSCONFDIR=\"$(pkgsysconfdir)\" + include $(topsrcdir)/build-aux/Makefile.tail.mk diff --git a/src/test/test-netlink-manual.c b/src/test/test-netlink-manual.c index 49b659b3a9..50c960882c 100644 --- a/src/test/test-netlink-manual.c +++ b/src/test/test-netlink-manual.c @@ -21,8 +21,8 @@ #include <libkmod.h> #include <net/if.h> -#include <linux/ip.h> #include <linux/if_tunnel.h> +#include <linux/ip.h> #include "basic/macro.h" #include "basic/util.h" |