1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
systemd/units
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
..
user meson: build systemd using meson 2017-04-23 21:47:26 -04:00
.gitignore fstab-generator: add support for volatile boots 2016-12-21 19:09:29 +01:00
basic.target Merge pull request #2565 from poettering/fix-2315 2016-02-09 19:13:15 -05:00
bluetooth.target
busnames.target units: install busnames.target by default 2013-12-03 01:18:26 +01:00
console-getty.service.m4.in console-getty.service: don't start when /dev/console is missing 2015-03-17 12:40:56 +01:00
container-getty@.service.m4.in units: fix all TTY paths for container gettys 2015-01-27 14:31:44 +01:00
cryptsetup-pre.target cryptsetup: introduce new cryptsetup-pre.traget unit so that services can make sure they are started before and stopped after any LUKS setup 2014-06-18 00:09:46 +02:00
cryptsetup.target
debug-shell.service.in debug-shell: add condition for tty device to run on 2014-06-12 22:26:43 +02:00
dev-hugepages.mount units: disable /dev/hugepages in private user namespaces 2016-10-26 20:12:52 -04:00
dev-mqueue.mount units: don't try to mount the mqueue fs if we lack the privileges for it 2016-02-11 02:45:11 +00:00
emergency.service.in units: simplify rescue.service and emergency.service (#5623) 2017-03-22 23:37:06 -04:00
emergency.target
exit.target containers: systemd exits with non-zero code 2015-09-21 17:32:45 +02:00
final.target
getty.target unit: link up getty configuration from man page and unit files 2012-11-20 20:10:30 +01:00
getty@.service.m4 getty@.service.m4: add Conflicts=/Before= against rescue.service (#3792) 2016-07-25 16:18:00 +02:00
graphical.target units: make graphical.target dependencies more complete and similar to those of multi-user.target 2014-12-29 17:00:05 +01:00
halt-local.service.in build-sys: make rc-local support part of SYSV compat 2013-01-04 23:26:20 +01:00
halt.target units: rename halt/hibernate/kexec/poweroff/reboot/suspend to systed-xxx 2012-06-25 14:28:50 +02:00
hibernate.target unit: rename BindTo= to BindsTo= 2012-07-13 23:34:40 +02:00
hybrid-sleep.target logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) 2012-10-28 00:50:35 +02:00
initrd-cleanup.service.in core: replace OnFailureIsolate= setting by a more generic OnFailureJobMode= setting and make use of it where applicable 2013-11-26 02:26:31 +01:00
initrd-fs.target core: replace OnFailureIsolate= setting by a more generic OnFailureJobMode= setting and make use of it where applicable 2013-11-26 02:26:31 +01:00
initrd-parse-etc.service.in initrd-parse-etc.service: ignore return code of daemon-reload 2014-09-03 13:28:31 +02:00
initrd-root-device.target Create initrd-root-device.target synchronization point (#3239) 2016-05-12 18:42:39 +02:00
initrd-root-fs.target core: replace OnFailureIsolate= setting by a more generic OnFailureJobMode= setting and make use of it where applicable 2013-11-26 02:26:31 +01:00
initrd-switch-root.service.in units: drop KillMode= from initrd-switch-root.service 2017-01-31 01:34:40 -05:00
initrd-switch-root.target units: add Wants=initrd-cleanup.service to initrd-switch-root.target (#4345) 2016-10-11 14:36:14 +02:00
initrd-udevadm-cleanup-db.service.in Move udevadm to rootbindir 2013-03-11 07:18:33 +01:00
initrd.target Create initrd-root-device.target synchronization point (#3239) 2016-05-12 18:42:39 +02:00
kexec.target units: rename halt/hibernate/kexec/poweroff/reboot/suspend to systed-xxx 2012-06-25 14:28:50 +02:00
kmod-static-nodes.service.in kmod-static-nodes: don't run if module list is empty 2016-01-11 16:26:17 +01:00
ldconfig.service units: restore ConditionNeesUpdate=/etc in ldconfig.service (#3311) 2016-05-21 17:09:18 -04:00
local-fs-pre.target units: disallow manual starting of passive units 2013-03-26 15:15:39 +01:00
local-fs.target units: local-fs.target - don't pull in default dependencies 2014-06-29 16:20:33 +02:00
machine.slice logind: add infrastructure to keep track of machines, and move to slices 2013-06-20 03:49:59 +02:00
machines.target units: rework systemd-nspawn@.service unit 2014-12-29 17:00:05 +01:00
Makefile
meson.build meson: build systemd using meson 2017-04-23 21:47:26 -04:00
multi-user.target units: drop [Install] section from multi-user.target and graphical.target 2014-01-17 20:27:35 +01:00
network-online.target units: order network-online.target after network.target 2014-06-11 15:00:45 +02:00
network-pre.target units: introduce network-pre.target as place to hook in firewalls 2014-06-11 12:14:55 +02:00
network.target units: introduce network-pre.target as place to hook in firewalls 2014-06-11 12:14:55 +02:00
nss-lookup.target units: disallow manual starting of passive units 2013-03-26 15:15:39 +01:00
nss-user-lookup.target units: disallow manual starting of passive units 2013-03-26 15:15:39 +01:00
org.freedesktop.hostname1.busname units: remove "AllowUser=root own", the bus owner can always own names 2014-03-08 19:38:06 +01:00
org.freedesktop.import1.busname import: introduce new mini-daemon systemd-importd, and make machinectl a client to it 2015-01-22 04:02:07 +01:00
org.freedesktop.locale1.busname units: remove "AllowUser=root own", the bus owner can always own names 2014-03-08 19:38:06 +01:00
org.freedesktop.login1.busname units: remove "AllowUser=root own", the bus owner can always own names 2014-03-08 19:38:06 +01:00
org.freedesktop.machine1.busname units: remove "AllowUser=root own", the bus owner can always own names 2014-03-08 19:38:06 +01:00
org.freedesktop.network1.busname units: networkd - fix busname to work on kdbus 2015-02-06 12:12:13 +01:00
org.freedesktop.resolve1.busname units: make resolved pull in its own .busname unit, but only on kdbus systems 2015-01-07 23:44:08 +01:00
org.freedesktop.systemd1.busname units: improve Description= for systemd's own busname unit 2015-01-07 23:44:08 +01:00
org.freedesktop.timedate1.busname units: remove "AllowUser=root own", the bus owner can always own names 2014-03-08 19:38:06 +01:00
paths.target units: introduce new timers.target and paths.target to hook timer/path units into for boot 2013-03-25 21:28:30 +01:00
poweroff.target units: restore job timeouts for poweroff and reboot 2014-11-06 08:17:45 -05:00
printer.target
proc-sys-fs-binfmt_misc.automount units: add reference to new wiki page to all api mount units 2013-01-15 18:14:13 +01:00
proc-sys-fs-binfmt_misc.mount units: add reference to new wiki page to all api mount units 2013-01-15 18:14:13 +01:00
quotaon.service.in units: move Before deps for quota services to remote-fs.target (#5627) 2017-03-30 11:21:18 +02:00
rc-local.service.in units: Add "GuessMainPID=no" to compatibility unit for rc-local (#3018) 2016-04-21 19:16:28 +02:00
reboot.target units: restore job timeouts for poweroff and reboot 2014-11-06 08:17:45 -05:00
remote-fs-pre.target units: disallow manual starting of passive units 2013-03-26 15:15:39 +01:00
remote-fs.target filesystem targets: disable default dependencies 2013-09-11 14:40:58 +02:00
rescue.service.in units: simplify rescue.service and emergency.service (#5623) 2017-03-22 23:37:06 -04:00
rescue.target
rpcbind.target units: disallow manual starting of passive units 2013-03-26 15:15:39 +01:00
serial-getty@.service.m4 serial-getty@.service.m4: add Conflicts=/Before= against rescue.service (#5632) 2017-03-30 10:39:16 +02:00
shutdown.target
sigpwr.target
sleep.target units: stop sleep.target when it has done its job 2012-06-25 12:01:09 +02:00
slices.target core: general cgroup rework 2013-06-27 04:17:34 +02:00
smartcard.target
sockets.target
sound.target
suspend.target unit: rename BindTo= to BindsTo= 2012-07-13 23:34:40 +02:00
swap.target
sys-fs-fuse-connections.mount units: disable /sys/fs/fuse/connections in private user namespaces (#4592) 2016-11-11 19:00:33 +01:00
sys-kernel-config.mount units: conditionalize configfs and debugfs with CAP_SYS_RAWIO 2014-07-04 03:24:42 +02:00
sys-kernel-debug.mount units: conditionalize configfs and debugfs with CAP_SYS_RAWIO 2014-07-04 03:24:42 +02:00
sysinit.target units: remove RefuseManualStart from units which are always around 2014-06-28 00:06:30 -04:00
syslog.socket service: ignore dependencies on $syslog and $local_fs in LSB scripts 2013-01-16 21:34:09 +01:00
system-update-cleanup.service.in units: add system-update-cleanup.service to guard against offline-update loops 2016-11-29 01:40:34 -05:00
system-update.target units: add system-update-cleanup.service to guard against offline-update loops 2016-11-29 01:40:34 -05:00
system.slice units: fix system.slice to require -.slice, instead of just want it 2015-11-11 16:04:16 +01:00
systemd-ask-password-console.path systemd-ask-password: make sure directory watch is started before cryptsetup (#3850) 2016-08-02 08:55:25 -04:00
systemd-ask-password-console.service.in units: set SystemCallArchitectures=native on all our long-running services 2017-02-09 16:12:03 +01:00
systemd-ask-password-wall.path systemd-ask-password: make sure directory watch is started before cryptsetup (#3850) 2016-08-02 08:55:25 -04:00
systemd-ask-password-wall.service.in units: set SystemCallArchitectures=native on all our long-running services 2017-02-09 16:12:03 +01:00
systemd-backlight@.service.in units: so far we defaulted to 90s as default timeout for most things, let's do so for our oneshot services too 2015-02-02 21:34:32 +01:00
systemd-binfmt.service.in units: specify timeouts for more oneshot services 2015-04-28 08:52:17 -04:00
systemd-coredump.socket coredump: rework coredumping logic 2016-02-10 16:08:32 +01:00
systemd-coredump@.service.in units: lock down coredump service a bit 2017-02-09 16:12:03 +01:00
systemd-exit.service.in containers: systemd exits with non-zero code 2015-09-21 17:32:45 +02:00
systemd-firstboot.service.in units: run firstboot before sysusers, so that firstboot can initialize the root password 2014-10-23 01:24:59 +02:00
systemd-fsck-root.service.in fsck: remove fsckd again, but keep the door open for external replacement 2015-04-28 17:30:00 +02:00
systemd-fsck@.service.in units: make sure that fsck is executed before quotacheck 2016-05-10 14:10:17 +02:00
systemd-halt.service.in man: document systemd-halt.service and friends 2012-06-26 17:50:29 +02:00
systemd-hibernate-resume@.service.in systemd-hibernate-resume@.service: remove unnecessary ordering 2014-10-09 23:53:15 -04:00
systemd-hibernate.service.in man: document systemd-suspend.service 2012-06-26 17:33:11 +02:00
systemd-hostnamed.service.in units: make use of @reboot and @swap in our long-running service SystemCallFilter= settings 2017-02-09 16:12:03 +01:00
systemd-hwdb-update.service.in Revert "hwdb: actually search /run/udev/hwdb.d" 2015-06-09 11:26:06 +02:00
systemd-hybrid-sleep.service.in logind: support for hybrid sleep (i.e. suspend+hibernate at the same time) 2012-10-28 00:50:35 +02:00
systemd-importd.service.in units: make use of @reboot and @swap in our long-running service SystemCallFilter= settings 2017-02-09 16:12:03 +01:00
systemd-initctl.service.in units: set SystemCallArchitectures=native on all our long-running services 2017-02-09 16:12:03 +01:00
systemd-initctl.socket initctl: move /dev/initctl fifo into /run, replace it by symlink 2014-06-04 16:53:58 +02:00
systemd-journal-catalog-update.service.in units: fix condition for systemd-journal-catalog-update.service (#4990) 2016-12-29 10:38:52 +01:00
systemd-journal-flush.service.in units: so far we defaulted to 90s as default timeout for most things, let's do so for our oneshot services too 2015-02-02 21:34:32 +01:00
systemd-journal-gatewayd.service.in units: turn on ProtectKernelModules= for most long-running services 2017-02-09 16:12:03 +01:00
systemd-journal-gatewayd.socket journal-remote: add documents in the unit files 2015-12-15 10:51:12 +09:00
systemd-journal-remote.service.in units: turn on ProtectKernelModules= for most long-running services 2017-02-09 16:12:03 +01:00
systemd-journal-remote.socket journal-remote: add units and read certs from default locations 2014-07-15 22:23:49 -04:00
systemd-journal-upload.service.in journal-upload: add state file directory to ReadWritePaths (#5578) 2017-03-30 18:01:03 +02:00
systemd-journald-audit.socket units: conditionalize audit multicast socket on CAP_AUDIT_READ 2015-05-20 17:40:05 +02:00
systemd-journald-dev-log.socket journald: also increase the SendBuffer of /dev/log to 8M 2014-08-13 18:53:05 +02:00
systemd-journald.service.in units: drop explicit NotifyAccess setting from journald's unit file (#5749) 2017-04-19 08:52:40 +02:00
systemd-journald.socket journald: move /dev/log socket to /run 2014-06-04 16:53:58 +02:00
systemd-kexec.service.in man: document systemd-halt.service and friends 2012-06-26 17:50:29 +02:00
systemd-localed.service.in units: make use of @reboot and @swap in our long-running service SystemCallFilter= settings 2017-02-09 16:12:03 +01:00
systemd-logind.service.in units: make use of @reboot and @swap in our long-running service SystemCallFilter= settings 2017-02-09 16:12:03 +01:00
systemd-machine-id-commit.service.in machine-id-commit: merge machine-id-commit functionality into machine-id-setup 2015-09-29 21:55:51 +02:00
systemd-machined.service.in units: make use of @reboot and @swap in our long-running service SystemCallFilter= settings 2017-02-09 16:12:03 +01:00
systemd-modules-load.service.in units: specify timeouts for more oneshot services 2015-04-28 08:52:17 -04:00
systemd-networkd-wait-online.service.in units: networkd - don't order wait-online.service before network.target 2014-06-30 13:06:33 +02:00
systemd-networkd.service.m4.in Makefile.am: link dbus-org.freedesktop.network1 alias in /etc 2017-04-19 19:27:01 -04:00
systemd-networkd.socket networkd: route - track routes 2015-10-30 12:32:48 +01:00
systemd-nspawn@.service.in units: order systemd-nspawn@.service after systemd-resolved.service 2017-02-17 16:06:31 -05:00
systemd-poweroff.service.in man: document systemd-halt.service and friends 2012-06-26 17:50:29 +02:00
systemd-quotacheck.service.in units: move Before deps for quota services to remote-fs.target (#5627) 2017-03-30 11:21:18 +02:00
systemd-random-seed.service.in units: do not start load-random-seed in containers (#3941) 2016-08-13 17:15:19 +02:00
systemd-reboot.service.in man: document systemd-halt.service and friends 2012-06-26 17:50:29 +02:00
systemd-remount-fs.service.in readahead: wipe out readahead 2014-09-25 16:39:18 +02:00
systemd-resolved.service.m4.in units: systemd-resolved should start before network-online.target and nss-lookup.target (#5691) 2017-04-21 11:21:17 +02:00
systemd-rfkill.service.in rfkill: rework and make it listen on /dev/rfkill 2015-10-01 16:21:09 +02:00
systemd-rfkill.socket rfkill: rework and make it listen on /dev/rfkill 2015-10-01 16:21:09 +02:00
systemd-suspend.service.in man: document systemd-suspend.service 2012-06-26 17:33:11 +02:00
systemd-sysctl.service.in sysctl: run sysctl service if /proc/sys/net is writable (#4425) 2016-10-20 19:36:28 +02:00
systemd-sysusers.service.in units: specify timeouts for more oneshot services 2015-04-28 08:52:17 -04:00
systemd-timedated.service.in units: make use of @reboot and @swap in our long-running service SystemCallFilter= settings 2017-02-09 16:12:03 +01:00
systemd-timesyncd.service.in units: make use of @reboot and @swap in our long-running service SystemCallFilter= settings 2017-02-09 16:12:03 +01:00
systemd-tmpfiles-clean.service.in readahead: wipe out readahead 2014-09-25 16:39:18 +02:00
systemd-tmpfiles-clean.timer man: link systemd-tmpfiles-setup-dev.service 2013-04-23 12:55:44 +02:00
systemd-tmpfiles-setup-dev.service.in units: tmpfiles-setup-dev - allow unsafe file creation to happen in /dev at boot 2014-10-27 17:40:24 +01:00
systemd-tmpfiles-setup.service.in readahead: wipe out readahead 2014-09-25 16:39:18 +02:00
systemd-udev-settle.service.in udev: replace CAP_MKNOD by writable /sys condition 2013-08-17 19:07:42 +02:00
systemd-udev-trigger.service.in units: move After=systemd-hwdb-update.service dependency from udev to udev-trigger 2015-04-03 14:27:16 +02:00
systemd-udevd-control.socket units: remove udev control socket when systemd stops the socket unit (#4039) 2016-08-26 00:07:58 +02:00
systemd-udevd-kernel.socket units: make ReceiveBuffer= line more readable by using M suffix 2014-11-03 21:51:28 +01:00
systemd-udevd.service.in units: set SystemCallArchitectures=native on all our long-running services 2017-02-09 16:12:03 +01:00
systemd-update-done.service.in readahead: wipe out readahead 2014-09-25 16:39:18 +02:00
systemd-update-utmp-runlevel.service.in utmp: turn systemd-update-utmp-shutdown.service into a normal runtime service 2013-05-16 00:19:03 +02:00
systemd-update-utmp.service.in readahead: wipe out readahead 2014-09-25 16:39:18 +02:00
systemd-user-sessions.service.in units: order systemd-user-sessions.service after network.target 2016-04-22 16:17:00 +02:00
systemd-vconsole-setup.service.in units: restore Before dependencies for systemd-vconsole-setup.service 2017-01-31 01:34:40 -05:00
systemd-volatile-root.service.in fstab-generator: add support for volatile boots 2016-12-21 19:09:29 +01:00
time-sync.target units: time-sync.target probably makes sense, is not just sysv compat 2014-06-11 12:14:55 +02:00
timers.target unit: do not order timers.target before basic.target 2014-11-02 12:33:54 -05:00
tmp.mount.m4 units: add nosuid and nodev options to tmp.mount (#3575) 2016-06-22 12:32:59 +02:00
umount.target
user.slice logind: add infrastructure to keep track of machines, and move to slices 2013-06-20 03:49:59 +02:00
user@.service.m4.in units: extend stop timeout for user@.service to 120s (#4426) 2016-10-20 17:45:27 +02:00
var-lib-machines.mount units: add missing unit file 2015-02-24 18:46:49 +01:00