Systemd/src/shared
Zbigniew Jędrzejewski-Szmek 5c23128dab meson: build systemd using meson
It's crucial that we can build systemd using VS2010!

... er, wait, no, that's not the official reason. We need to shed old systems
by requring python 3! Oh, no, it's something else. Maybe we need to throw out
345 years of knowlege accumulated in autotools? Whatever, this new thing is
cool and shiny, let's use it.

This is not complete, I'm throwing it out here for your amusement and critique.

- rules for sd-boot are missing. Those might be quite complicated.

- rules for tests are missing too. Those are probably quite simple and
  repetitive, but there's lots of them.

- it's likely that I didn't get all the conditions right, I only tested "full"
  compilation where most deps are provided and nothing is disabled.

- busname.target and all .busname units are skipped on purpose.

  Otherwise, installation into $DESTDIR has the same list of files and the
  autoconf install, except for .la files.

It'd be great if people had a careful look at all the library linking options.
I added stuff until things compiled, and in the end there's much less linking
then in the old system. But it seems that there's still a lot of unnecessary
deps.

meson has a `shared_module` statement, which sounds like something appropriate
for our nss and pam modules. Unfortunately, I couldn't get it to work. For the
nss modules, we need an .so version of '2', but `shared_module` disallows the
version argument. For the pam module, it also didn't work, I forgot the reason.

The handling of .m4 and .in and .m4.in files is rather awkward. It's likely
that this could be simplified. If make support is ever dropped, I think it'd
make sense to switch to a different templating system so that two different
languages and not required, which would make everything simpler yet.

v2:
- use get_pkgconfig_variable
- use sh not bash
- use add_project_arguments

v3:
- drop required:true and fix progs/prog typo

v4:
- use find_library('bz2')
- add TTY_GID definition
- define __SANE_USERSPACE_TYPES__
- use join_paths(prefix, ...) is used on all paths to make them all absolute

v5:
- replace all declare_dependency's with []
- add more conf.get guards around optional components

v6:
- drop -pipe, -Wall which are the default in meson
- use compiler.has_function() and compiler.has_header_symbol instead of the
  hand-rolled checks.
- fix duplication in 'liblibsystemd' library name
- use the right .sym file for pam_systemd
- rename 'compiler' to 'cc': shorter, and more idiomatic.

v7:
- use ENABLE_ENVIRONMENT_D not HAVE_ENVIRONMENT_D
- rename prefix to prefixdir, rootprefix to rootprefixdir
  ("prefix" is too common of a name and too easy to overwrite by mistake)
- wrap more stuff with conf.get('ENABLE...') == 1
- use rootprefix=='/' and rootbindir as install_dir, to fix paths under
  split-usr==true.

v8:
- use .split() also for src/coredump. Now everything is consistent ;)
- add rootlibdir option and use it on the libraries that require it

v9:
- indentation

v10:
- fix check for qrencode and libaudit

v11:
- unify handling of executable paths, provide options for all progs

  This makes the meson build behave slightly differently than the
  autoconf-based one, because we always first try to find the executable in the
  filesystem, and fall back to the default. I think different handling of
  loadkeys, setfont, and telinit was just a historical accident.

  In addition to checking in $PATH, also check /usr/sbin/, /sbin for programs.
  In Fedora $PATH includes /usr/sbin, (and /sbin is is a symlink to /usr/sbin),
  but in Debian, those directories are not included in the path.

  C.f. https://github.com/mesonbuild/meson/issues/1576.

- call all the options 'xxx-path' for clarity.
- sort man/rules/meson.build properly so it's stable
2017-04-23 21:47:26 -04:00
..
linux
linux-3.13 Avoid strict DM interface version dependencies (#5519) 2017-03-02 19:11:37 +01:00
acl-util.c acl-util: fix memleak 2016-11-03 22:07:49 +00:00
acl-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
acpi-fpdt.c shared/acpi-fpdt: use ENODATA for missing data and skip test 2016-03-04 21:45:45 -05:00
acpi-fpdt.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
apparmor-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
apparmor-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
ask-password-api.c treewide: replace homegrown memory_erase with explicit_bzero 2017-02-05 21:07:55 -05:00
ask-password-api.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
base-filesystem.c base-filesystem: skip fchownat() if the previous mkdirat() on same path failed (#5548) 2017-03-15 22:30:15 -04:00
base-filesystem.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
boot-timestamps.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
boot-timestamps.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
bus-unit-util.c systemctl: show extra args if defined (#5379) 2017-02-17 15:27:45 -05:00
bus-unit-util.h bus-util: unify loop around bus_append_unit_property_assignment() 2016-08-18 22:23:31 +02:00
bus-util.c tree-wide: make bus_map_all_properties return a proper sd_bus_error 2017-02-09 16:13:07 +01:00
bus-util.h tree-wide: make bus_map_all_properties return a proper sd_bus_error 2017-02-09 16:13:07 +01:00
cgroup-show.c bus: include sd-{bus,messages}.h the same as other systemd headers 2017-04-21 12:05:55 -04:00
cgroup-show.h bus: include sd-{bus,messages}.h the same as other systemd headers 2017-04-21 12:05:55 -04:00
clean-ipc.c fs-util: unify code we use to check if dirent's d_name is "." or ".." 2017-02-02 00:06:18 +01:00
clean-ipc.h core: add RemoveIPC= setting 2016-08-19 00:37:25 +02:00
condition.c tree-wide: stop using canonicalize_file_name(), use chase_symlinks() instead 2016-12-01 00:25:51 +01:00
condition.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
conf-parser.c tree-wide: drop unneded WHITESPACE param to extract_first_word 2016-11-05 15:35:51 -04:00
conf-parser.h shared/conf-parser: add config_parse_many which takes strv with dirs 2016-09-16 10:32:03 -04:00
dev-setup.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
dev-setup.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
dissect-image.c libshared: fix compilation without libblkid 2017-04-21 12:05:55 -04:00
dissect-image.h core,nspawn,dissect: make nspawn's .roothash file search reusable 2017-02-07 12:21:28 +01:00
dns-domain.c shared: add new API to validate a string as hostname or IP address 2016-11-21 22:58:26 +01:00
dns-domain.h shared: add new API to validate a string as hostname or IP address 2016-11-21 22:58:26 +01:00
dropin.c dropin: always initialize return parameters on success 2017-02-09 20:10:03 +01:00
dropin.h core: drop code that is now unused 2017-02-07 21:31:59 -05:00
efivars.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
efivars.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
fdset.c tree-wide: replace all readdir cycles with FOREACH_DIRENT{,_ALL} (#4853) 2016-12-09 10:04:30 +01:00
fdset.h build-sys: move fdset.[ch] src/basic → src/shared (#3580) 2016-06-23 05:10:53 +03:00
firewall-util.c firewall-util: add an assert that we're not overwriting a buffer 2017-02-20 16:02:15 -05:00
firewall-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
fstab-util.c Fix missing space in comments (#5439) 2017-02-24 18:14:02 +01:00
fstab-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
gcrypt-util.c build-sys: fix build with libgrcypt disabled 2016-03-27 21:51:44 -04:00
gcrypt-util.h systemd-resolve: use sha256 for local-part of openpgp key (#4193) 2016-10-08 13:59:34 +02:00
generator.c generator: order fsck service After= the device 2016-12-14 10:13:52 +01:00
generator.h Create initrd-root-device.target synchronization point (#3239) 2016-05-12 18:42:39 +02:00
gpt.h dissect: don't honour NOAUTO flags when looking for ESP (#5224) 2017-02-07 22:10:48 -05:00
ima-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
ima-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
import-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
import-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
initreq.h
install-printf.c shared/install-printf: fix memleak 2017-01-15 13:42:53 -05:00
install-printf.h tree-wide: place #pragma once at the same place everywhere 2016-02-20 22:42:29 +01:00
install.c install: never hit assert() when we can't figure out where to write configuration symlinks 2017-02-10 15:14:18 +01:00
install.h shared, systemctl: teach is-enabled to show installation targets 2016-10-24 10:19:08 +02:00
journal-util.c journalctl: move access_check() to shared/ 2017-02-28 21:37:35 -05:00
journal-util.h journalctl: move access_check() to shared/ 2017-02-28 21:37:35 -05:00
logs-show.c time-util: refuse formatting/parsing times that we can't store 2017-02-02 20:12:31 +01:00
logs-show.h shared: move output_mode_to_string() into output-mode.c 2016-04-22 16:16:59 +02:00
loop-util.c dissect: add small "systemd-dissect" tool as wrapper around dissect-image.c 2016-12-07 18:38:41 +01:00
loop-util.h dissect: add small "systemd-dissect" tool as wrapper around dissect-image.c 2016-12-07 18:38:41 +01:00
machine-image.c Fix missing space in comments (#5439) 2017-02-24 18:14:02 +01:00
machine-image.h machinectl: add new "machinectl clean" command 2016-04-12 13:43:33 +02:00
machine-pool.c tree-wide: stop using canonicalize_file_name(), use chase_symlinks() instead 2016-12-01 00:25:51 +01:00
machine-pool.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
Makefile build-sys: add missing Makefile symlink 2015-08-31 13:09:52 +02:00
meson.build meson: build systemd using meson 2017-04-23 21:47:26 -04:00
nsflags.c Merge pull request #4538 from fbuihuu/confirm-spawn-fixes 2016-11-18 11:08:06 +01:00
nsflags.h core: add new RestrictNamespaces= unit file setting 2016-11-04 07:40:13 -06:00
output-mode.c journalctl: add new output mode "short-full" (#3880) 2016-08-03 19:45:07 -04:00
output-mode.h journalctl: add new output mode "short-full" (#3880) 2016-08-03 19:45:07 -04:00
pager.c assigning stdout and stderr is not allowed 2017-03-16 03:24:49 +01:00
pager.h tree-wide: merge pager_open_if_enabled() to the pager_open() 2016-02-26 01:13:23 +06:00
path-lookup.c Merge pull request #5131 from keszybz/environment-generators 2017-02-21 11:11:44 +01:00
path-lookup.h systemctl: don't confuse sysv code with generated units 2016-04-12 13:43:32 +02:00
ptyfwd.c run: exit early in --pty if service failed 2017-02-03 11:51:57 +01:00
ptyfwd.h run: exit early in --pty if service failed 2017-02-03 11:51:57 +01:00
resolve-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
resolve-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
seccomp-util.c Define clone order on ppc (#5325) 2017-02-14 11:27:40 +01:00
seccomp-util.h Define clone order on ppc (#5325) 2017-02-14 11:27:40 +01:00
sleep-config.c tree-wide: fix wrong indent (#5757) 2017-04-19 08:48:29 +02:00
sleep-config.h tree-wide: place #pragma once at the same place everywhere 2016-02-20 22:42:29 +01:00
spawn-ask-password-agent.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
spawn-ask-password-agent.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
spawn-polkit-agent.c polkit: don't start polkit agent when running as root 2016-04-05 12:18:55 +02:00
spawn-polkit-agent.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
specifier.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
specifier.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
switch-root.c shared: rework switch_root() code 2016-12-21 19:09:29 +01:00
switch-root.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
sysctl-util.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
sysctl-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
test-tables.h test-tables: ellide boring parts of sparse mappings 2016-01-29 12:13:08 -05:00
tests.c test: drop TEST_DATA_DIR, fold into get_testdata_dir() 2017-02-16 21:45:57 +01:00
tests.h test: drop TEST_DATA_DIR, fold into get_testdata_dir() 2017-02-16 21:45:57 +01:00
udev-util.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
uid-range.c tree-wide: make ++/-- usage consistent WRT spacing 2016-02-22 20:32:04 -08:00
uid-range.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
utmp-wtmp.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
utmp-wtmp.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
vlan-util.c networkd: clean up vlan handling a bit (#3478) 2016-06-09 18:55:16 +02:00
vlan-util.h networkd: clean up vlan handling a bit (#3478) 2016-06-09 18:55:16 +02:00
volatile-util.c fstab-generator: add support for volatile boots 2016-12-21 19:09:29 +01:00
volatile-util.h fstab-generator: add support for volatile boots 2016-12-21 19:09:29 +01:00
watchdog.c tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00
watchdog.h tree-wide: remove Emacs lines from all files 2016-02-10 13:41:57 +01:00