summaryrefslogtreecommitdiff
path: root/units/meson.build
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #14398 from poettering/mount-prepZbigniew Jędrzejewski-Szmek2020-02-041-0/+1
|\
| * units: introduce blockdev@.target for properly ordering mounts/swaps against ↵Lennart Poettering2020-01-211-0/+1
| | | | | | | | | | | | | | | | | | cryptsetup Let's hook it into both cryptsetup-generator and gpt-auto-generator with a shared implementation in generator.c Fixes: #8472
* | journald: add ability to activate by varlink socketLennart Poettering2020-01-311-0/+1
| | | | | | | | | | | | | | | | | | If we have exit on idle, then operations such as "journalctl --namespace=foo --rotate" should work even if the journal daemon is currently not running. (Note that we don't do activation by varlink for the main instance of journald, I am not sure the deadlocks it might introduce are worth it)
* | units: add unit files for instantiated journal daemonsLennart Poettering2020-01-311-0/+2
| |
* | home: add new systemd-homed service that can manage LUKS homesLennart Poettering2020-01-281-0/+2
| | | | | | | | Fixes more or less: https://bugs.freedesktop.org/show_bug.cgi?id=67474
* | units: add unit file for systemd-repart to automatically run at bootLennart Poettering2020-01-201-0/+2
|/
* units: drop full paths for utilities in $PATHZbigniew Jędrzejewski-Szmek2020-01-201-33/+33
| | | | | | | This makes things a bit simpler and the build a bit faster, because we don't have to rewrite files to do the trivial substitution. @rootbindir@ is always in our internal $PATH that we use for non-absolute paths, so there should be no functional change.
* userdbd: add new service that can merge userdb queries from multiple clientsLennart Poettering2020-01-151-0/+3
|
* units: Split modprobing out into a separate service unitIain Lane2020-01-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Devices referred to by `DeviceAllow=` sandboxing are resolved into their corresponding major numbers when the unit is loaded by looking at `/proc/devices`. If a reference is made to a device which is not yet available, the `DeviceAllow` is ignored and the unit's processes cannot access that device. In both logind and nspawn, we have `DeviceAllow=` lines, and `modprobe` in `ExecStartPre=` to load some kernel modules. Those kernel modules cause device nodes to become available when they are loaded: the device nodes may not exist when the unit itself is loaded. This means that the unit's processes will not be able to access the device since the `DeviceAllow=` will have been resolved earlier and denied it. One way to fix this would be to re-evaluate the available devices and re-apply the policy to the cgroup, but this cannot work atomically on cgroupsv1. So we fall back to a second approach: instead of running `modprobe` via `ExecStartPre`, we move this out to a separate unit and order it before the units which want the module. Closes #14322. Fixes: #13943.
* Revert "Drop dbus activation stub service"Lennart Poettering2019-12-201-0/+3
| | | | | | | | | | | | | | | This reverts commit 07125d24eedb71693b3bf2b1f0730cd01aaac2dd. In contrast to what is claimed in #13396 dbus-broker apparently does care for the service file to be around, and otherwise will claim "Service Not Activatable" in the time between systemd starting up the broker and connecting to it, which the stub service file is supposed to make go away. Reverting this makes the integration test suite pass again on host with dbus-broker (i.e. current Fedora desktop). Tested with dbus-broker-21-6.fc31.x86_64.
* crypsetup: introduce x-initrd.attach optionFranck Bui2019-12-051-0/+1
| | | | | | | | | | | | | | | | | This option is an indication for PID1 that the entry in crypttab is handled by initrd only and therefore it shouldn't interfer during the usual start-up and shutdown process. It should be primarily used with the encrypted device containing the root FS as we want to keep it (and thus its encrypted device) until the very end of the shutdown process, i.e. when initrd takes over. This option is the counterpart of "x-initrd.mount" used in fstab. Note that the slice containing the cryptsetup services also needs to drop the usual shutdown dependencies as it's required by the cryptsetup services. Fixes: #14224
* systemd-tmpfiles: don't install timer when service isn't installed eitherPascal de Bruijn2019-11-221-1/+1
| | | | | Fixes: systemd-tmpfiles-clean.timer: Refusing to start, unit systemd-tmpfiles-clean.service to trigger not loaded.
* Drop dbus activation stub serviceMichael Biebl2019-08-301-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | This fixes the following problem: > At the very end of the boot, just after the first user logs in > (usually using sddm / X) I get the following messages in my logs: > Nov 18 07:02:33 samd dbus-daemon[2879]: [session uid=1000 pid=2877] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1 > Nov 18 07:02:33 samd dbus-daemon[2879]: [session uid=1000 pid=2877] Activated service 'org.freedesktop.systemd1' failed: Process org.freedesktop.systemd1 exited with status 1 These messages are caused by the "stub" service files that systemd installs. It installed them because early versions of systemd activation required them to exist. Since dbus 1.11.0, a dbus-daemon that is run with --systemd-activation automatically assumes that o.fd.systemd1 is an activatable service. As a result, with a new enough dbus version, /usr/share/dbus-1/services/org.freedesktop.systemd1.service and /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service should become unnecessary, and they can be removed. dbus 1.11.0 was released 2015-12-02. Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=914015
* unit: rename initrd-network-generator.service -> ↵Yu Watanabe2019-07-301-1/+1
| | | | systemd-network-generator.service
* units: automatically initialize the system token if that makes senseLennart Poettering2019-07-251-0/+2
|
* units: add initrd-network-generator.serviceYu Watanabe2019-07-251-0/+1
|
* pstore: Tool to archive contents of pstoreEric DeVolder2019-07-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch introduces the systemd pstore service which will archive the contents of the Linux persistent storage filesystem, pstore, to other storage, thus preserving the existing information contained in the pstore, and clearing pstore storage for future error events. Linux provides a persistent storage file system, pstore[1], that can store error records when the kernel dies (or reboots or powers-off). These records in turn can be referenced to debug kernel problems (currently the kernel stuffs the tail of the dmesg, which also contains a stack backtrace, into pstore). The pstore file system supports a variety of backends that map onto persistent storage, such as the ACPI ERST[2, Section 18.5 Error Serialization] and UEFI variables[3 Appendix N Common Platform Error Record]. The pstore backends typically offer a relatively small amount of persistent storage, e.g. 64KiB, which can quickly fill up and thus prevent subsequent kernel crashes from recording errors. Thus there is a need to monitor and extract the pstore contents so that future kernel problems can also record information in the pstore. The pstore service is independent of the kdump service. In cloud environments specifically, host and guest filesystems are on remote filesystems (eg. iSCSI or NFS), thus kdump relies [implicitly and/or explicitly] upon proper operation of networking software *and* hardware *and* infrastructure. Thus it may not be possible to capture a kernel coredump to a file since writes over the network may not be possible. The pstore backend, on the other hand, is completely local and provides a path to store error records which will survive a reboot and aid in post-mortem debugging. Usage Notes: This tool moves files from /sys/fs/pstore into /var/lib/systemd/pstore. To enable kernel recording of error records into pstore, one must either pass crash_kexec_post_notifiers[4] to the kernel command line or enable via 'echo Y > /sys/module/kernel/parameters/crash_kexec_post_notifiers'. This option invokes the recording of errors into pstore *before* an attempt to kexec/kdump on a kernel crash. Optionally, to record reboots and shutdowns in the pstore, one can either pass the printk.always_kmsg_dump[4] to the kernel command line or enable via 'echo Y > /sys/module/printk/parameters/always_kmsg_dump'. This option enables code on the shutdown path to record information via pstore. This pstore service is a oneshot service. When run, the service invokes systemd-pstore which is a tool that performs the following: - reads the pstore.conf configuration file - collects the lists of files in the pstore (eg. /sys/fs/pstore) - for certain file types (eg. dmesg) a handler is invoked - for all other files, the file is moved from pstore - In the case of dmesg handler, final processing occurs as such: - files processed in reverse lexigraphical order to faciliate reconstruction of original dmesg - the filename is examined to determine which dmesg it is a part - the file is appended to the reconstructed dmesg For example, the following pstore contents: root@vm356:~# ls -al /sys/fs/pstore total 0 drwxr-x--- 2 root root 0 May 9 09:50 . drwxr-xr-x 7 root root 0 May 9 09:50 .. -r--r--r-- 1 root root 1610 May 9 09:49 dmesg-efi-155741337601001 -r--r--r-- 1 root root 1778 May 9 09:49 dmesg-efi-155741337602001 -r--r--r-- 1 root root 1726 May 9 09:49 dmesg-efi-155741337603001 -r--r--r-- 1 root root 1746 May 9 09:49 dmesg-efi-155741337604001 -r--r--r-- 1 root root 1686 May 9 09:49 dmesg-efi-155741337605001 -r--r--r-- 1 root root 1690 May 9 09:49 dmesg-efi-155741337606001 -r--r--r-- 1 root root 1775 May 9 09:49 dmesg-efi-155741337607001 -r--r--r-- 1 root root 1811 May 9 09:49 dmesg-efi-155741337608001 -r--r--r-- 1 root root 1817 May 9 09:49 dmesg-efi-155741337609001 -r--r--r-- 1 root root 1795 May 9 09:49 dmesg-efi-155741337710001 -r--r--r-- 1 root root 1770 May 9 09:49 dmesg-efi-155741337711001 -r--r--r-- 1 root root 1796 May 9 09:49 dmesg-efi-155741337712001 -r--r--r-- 1 root root 1787 May 9 09:49 dmesg-efi-155741337713001 -r--r--r-- 1 root root 1808 May 9 09:49 dmesg-efi-155741337714001 -r--r--r-- 1 root root 1754 May 9 09:49 dmesg-efi-155741337715001 results in the following: root@vm356:~# ls -al /var/lib/systemd/pstore/155741337/ total 92 drwxr-xr-x 2 root root 4096 May 9 09:50 . drwxr-xr-x 4 root root 40 May 9 09:50 .. -rw-r--r-- 1 root root 1610 May 9 09:50 dmesg-efi-155741337601001 -rw-r--r-- 1 root root 1778 May 9 09:50 dmesg-efi-155741337602001 -rw-r--r-- 1 root root 1726 May 9 09:50 dmesg-efi-155741337603001 -rw-r--r-- 1 root root 1746 May 9 09:50 dmesg-efi-155741337604001 -rw-r--r-- 1 root root 1686 May 9 09:50 dmesg-efi-155741337605001 -rw-r--r-- 1 root root 1690 May 9 09:50 dmesg-efi-155741337606001 -rw-r--r-- 1 root root 1775 May 9 09:50 dmesg-efi-155741337607001 -rw-r--r-- 1 root root 1811 May 9 09:50 dmesg-efi-155741337608001 -rw-r--r-- 1 root root 1817 May 9 09:50 dmesg-efi-155741337609001 -rw-r--r-- 1 root root 1795 May 9 09:50 dmesg-efi-155741337710001 -rw-r--r-- 1 root root 1770 May 9 09:50 dmesg-efi-155741337711001 -rw-r--r-- 1 root root 1796 May 9 09:50 dmesg-efi-155741337712001 -rw-r--r-- 1 root root 1787 May 9 09:50 dmesg-efi-155741337713001 -rw-r--r-- 1 root root 1808 May 9 09:50 dmesg-efi-155741337714001 -rw-r--r-- 1 root root 1754 May 9 09:50 dmesg-efi-155741337715001 -rw-r--r-- 1 root root 26754 May 9 09:50 dmesg.txt where dmesg.txt is reconstructed from the group of related dmesg-efi-155741337* files. Configuration file: The pstore.conf configuration file has four settings, described below. - Storage : one of "none", "external", or "journal". With "none", this tool leaves the contents of pstore untouched. With "external", the contents of the pstore are moved into the /var/lib/systemd/pstore, as well as logged into the journal. With "journal", the contents of the pstore are recorded only in the systemd journal. The default is "external". - Unlink : is a boolean. When "true", the default, then files in the pstore are removed once processed. When "false", processing of the pstore occurs normally, but the pstore files remain. References: [1] "Persistent storage for a kernel's dying breath", March 23, 2011. https://lwn.net/Articles/434821/ [2] "Advanced Configuration and Power Interface Specification", version 6.2, May 2017. https://www.uefi.org/sites/default/files/resources/ACPI_6_2.pdf [3] "Unified Extensible Firmware Interface Specification", version 2.8, March 2019. https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf [4] "The kernel’s command-line parameters", https://static.lwn.net/kerneldoc/admin-guide/kernel-parameters.html
* Drop support for /usr/sbin/halt.localMichael Biebl2019-05-231-1/+0
| | | | | /usr/sbin/halt.local is a Fedora/Red Hat anachronism from pre-systemd times.
* units: add time-set.targetPeter A. Bigot2019-04-081-0/+1
| | | | | | | | | | | | | time-sync.target is supposed to indicate system clock is synchronized with a remote clock, but as used through 241 it only provided a system clock that was updated based on a locally-maintained timestamp. Systems that are powered off for extended periods would not come up with accurate time. Retain the existing behavior using a new time-set.target leaving time-sync.target for cases where accuracy is required. Closes #8861
* meson: stop creating enablement symlinks in /etc during installationZbigniew Jędrzejewski-Szmek2019-04-011-20/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch was initially prompted by a report on a Fedora update [1], that the upgrade causes systemd-resolved.service and systemd-networkd.service to be re-enabled. We generally want to preserve the enablement of all services during upgrades, so a reset like this is not expected. Both services declare two symlinks in their [Install] sections, for their dbus names and for multi-user.target.wants/. It turns out that both services were only partially enabled, because their dbus unit symlinks /etc/systemd/system/dbus-org.freedesktop.{resolve1,network1}.service were created, by the symlinks in /etc/systemd/system/multi-user.target.wants/ were not. This means that the units could be activated by dbus, but not in usual fashion using systemctl start. Our tools make it rather hard to figure out when something like this happens, and it is definitely an area for improvement on its own. The symlink in .wants/ was filtered out by during packaging, but the dbus symlink was left in (I assume by mistake). Let's simplify things by not creating the symlinks statically during 'ninja install'. This means that the units shipped by systemd have to be enabled in the usual fashion, which in turns means that [Install] section and presets become the "single source of truth" and we don't have two sets of conflicting configuration. Let's consider a few cases: - developer: a developer installs systemd from git on a running system, and they don't want the installation to reset enablement of anything. So this change is either positive for them, or has no effect (if they have everything at defaults). - package creation: we want to create symlinks using 'preset-all' and 'preset' on upgraded packages, we don't want to have any static symlinks. This change will remove the need to filter out symlinks in packaging and of course fix the original report. - installation of systemd from scratch: this change means that without 'preset-all' the system will not be functional. This case could be affected negatively by this change, but I think it's enough of a corner case to accept this. In practice I expect people to build a package, not installl directly into the file system, so this might not even matter in practice. Creating those symlinks was probably the right thing in the beginning, but nowadays the preset system is very well established and people expect it to be honoured. Ignoring the presets and doing static configuration is not welcome anymore. Note: during package installation, either 'preset-all' or 'preset getty@.service machines.target remote-cryptsetup.target remote-fs.target systemd-networkd.service systemd-resolved.service systemd-networkd-wait-online.service systemd-timesyncd.service' should be called. [1] https://bodhi.fedoraproject.org/updates/FEDORA-2019-616045ca76
* meson: indentationZbigniew Jędrzejewski-Szmek2019-04-011-1/+1
|
* Pull in systemd-remount-fs.service only when requiredZbigniew Jędrzejewski-Szmek2019-01-031-2/+1
| | | | | | Instead of enabling it unconditionally and then using ConditionPathExists=/etc/fstab, and possibly masking this condition if it should be enabled for auto gpt stuff, just pull it in explicitly when required.
* units: add simple boot check unitLennart Poettering2018-10-191-0/+1
| | | | | | | | | This is might be useful in some cases, but it's primarily an example for a boot check service that can be plugged before boot-complete.target. It's disabled by default. All it does is check whether the failed unit count is zero
* add new systemd-bless-boot.service that marks boots as successfulLennart Poettering2018-10-191-0/+1
| | | | | | This is the counterpiece to the boot counting implemented in systemd-boot: if a boot is detected as successful we mark drop the counter again from the booted snippet or kernel image.
* units: add generic boot-complete.targetLennart Poettering2018-10-191-0/+1
|
* units: allow and use SuccessAction=exit-force in system systemd-exit.serviceZbigniew Jędrzejewski-Szmek2018-10-171-1/+1
| | | | | | | | | C.f. 287419c119ef961db487a281162ab037eba70c61: 'systemctl exit 42' can be used to set an exit value and pulls in exit.target, which pulls in systemd-exit.service, which calls org.fdo.Manager.Exit, which calls method_exit(), which sets the objective to MANAGER_EXIT. Allow the same to happen through SuccessAction=exit. v2: update for 'exit' and 'exit-force'
* units: use SuccessAction=poweroff-force in systemd-poweroff.serviceZbigniew Jędrzejewski-Szmek2018-10-171-1/+1
| | | | | | | Explicit systemctl calls remain in systemd-halt.service and the system systemd-exit.service. To convert systemd-halt, we'd need to add SuccessAction=halt-force. Halting doesn't make much sense, so let's just leave that is. systemd-exit.service will be converted in the next commit.
* units: use SuccessAction=reboot-force in systemd-reboot.serviceZbigniew Jędrzejewski-Szmek2018-10-171-1/+1
|
* units: Add new system-update-pre.targetHans de Goede2018-06-191-0/+1
| | | | | | | | | | | | | | | | | | | | | systemd offline-updates allows dropping multiple system update units to be added to system-update.target.wants. As documented in systemd.offline-updates(7) only 1 of these units should actually be active (based on the /system-update symlink) and when that unit is done it should reboot the system. In some cases it is desirable to run a unit whenever booting in offline-updates mode indepedent of which update unit is going to handle the update. One example of this is integration with bootloader code which checks if the previous boot was succesful. Since the active unit will reboot the system when it is done, there is no guarantee that adding such a unit to system-update.target.wants will get it executed always. This commit adds a system-update-pre.target which can be used for units which should always run when booting in offline-updates mode.
* Drop my copyright headersZbigniew Jędrzejewski-Szmek2018-06-141-2/+0
| | | | | | | perl -i -0pe 's/\s*Copyright © .... Zbigniew Jędrzejewski.*?\n/\n/gms' man/*xml git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/(#\n)?# +Copyright © [0-9, -]+ Zbigniew Jędrzejewski.*?\n//gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s*\/\*\*\*\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*?\s*\*\*\*\/\s*/\n\n/gms' git grep -e 'Copyright.*Jędrzejewski' -l | xargs perl -i -0pe 's/\s+Copyright © [0-9, -]+ Zbigniew Jędrzejewski[^\n]*//gms'
* tree-wide: beautify remaining copyright statementsLennart Poettering2018-06-141-1/+1
| | | | | | Let's unify an beautify our remaining copyright statements, with a unicode ©. This means our copyright statements are now always formatted the same way. Yay.
* add new portable service frameworkLennart Poettering2018-05-241-0/+2
| | | | | | | | | | | This adds a small service "systemd-portabled" and a matching client "portablectl", which implement the "portable service" concept. The daemon implements the actual operations, is PolicyKit-enabled and is activated on demand with exit-on-idle. Both the daemon and the client are an optional build artifact, enabled by default rhough.
* meson: generate m4 preprocessor from config.h (#8914)Yu Watanabe2018-05-071-1/+1
|
* logind: split %t directory creation to a helper unitZbigniew Jędrzejewski-Szmek2018-04-251-0/+1
| | | | | | | | | | | | | | | Unfortunately this needs a new binary to do the mount because there's just too many special steps to outsource this to systemd-mount: - EPERM needs to be treated specially - UserRuntimeDir= setting must be obeyed - SELinux label must be adjusted This allows user@.service to be started independently of logind. So 'systemctl start user@nnn' will start the user manager for user nnn. Logind will start it too when the user logs in, and will stop it (unless lingering is enabled) when the user logs out. Fixes #7339.
* Use a dash-truncated drop-in for user-%j.slice configurationZbigniew Jędrzejewski-Szmek2018-04-251-0/+3
| | | | | | | | | | | | | | | | | | | This removes the UserTasksMax= setting in logind.conf. Instead, the generic TasksMax= setting on the slice should be used. Instead of a transient unit we use a drop-in to tweak the default definition of a .slice. It's better to use the normal unit mechanisms instead of creating units on the fly. This will also make it easier to start user@.service independently of logind, or set additional settings like MemoryMax= for user slices. The setting in logind is removed, because otherwise we would have two sources of "truth": the slice on disk and the logind config. Instead of trying to coordinate those two sources of configuration (and maintainer overrides to both), let's just convert to the new one fully. Right now now automatic transition mechanism is provided. logind will emit a hint when it encounters the setting, but otherwise it will be ignored. Fixes #2556.
* unit,meson: drop .in suffix if no substitution is required (#8740)Yu Watanabe2018-04-171-17/+3
|
* units: leave systemd-time-wait-sync disabled by defaultPeter A. Bigot2018-04-141-2/+1
| | | | Also mark its presence conditional on ENABLE_TIMESYNCD.
* tree-wide: drop license boilerplateZbigniew Jędrzejewski-Szmek2018-04-061-13/+0
| | | | | | | | | | Files which are installed as-is (any .service and other unit files, .conf files, .policy files, etc), are left as is. My assumption is that SPDX identifiers are not yet that well known, so it's better to retain the extended header to avoid any doubt. I also kept any copyright lines. We can probably remove them, but it'd nice to obtain explicit acks from all involved authors before doing that.
* Rename suspend-to-hibernate to suspend-then-hibernateMario Limonciello2018-03-281-2/+2
| | | | | Per some discussion with Gnome folks, they would prefer this name as it's more descriptive of what's happening.
* time-sync-wait: add service (#8494)Peter A. Bigot2018-03-211-0/+2
| | | | This one-shot service waits until the kernel time has been set to synchronized.
* Introduce suspend-to-hibernate (#8274)Mario Limonciello2018-03-081-0/+2
| | | | | | | | | | | | | | Suspend to Hibernate is a new sleep method that invokes suspend for a predefined period of time before automatically waking up and hibernating the system. It's similar to HybridSleep however there isn't a performance impact on every suspend cycle. It's intended to use with systems that may have a higher power drain in their supported suspend states to prevent battery and data loss over an extended suspend cycle. Signed-off-by: Mario Limonciello <mario.limonciello@dell.com>
* slice: system.slice should be perpetual like -.mountAlan Jenkins2018-02-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `-.mount` is placed in `system.slice`, and hence depends on it. `-.mount` is always active and can never be stopped. Therefore the same should be true of `system.slice`. Synthesize it as perpetual (unless systemd is running as a user manager). Notice we also drop `Before=slices.target` as unnecessary. AFAICS the justification for `perpetual` is to provide extra protection against unintentionally stopping every single service. So adding system.slice to the perpetual units is perfectly consistent. I don't expect this will (or can) fix any other problem. And the `perpetual` protection probably isn't formal enough to spend much time thinking about. I've just noticed this a couple of times, as something that looks strange. Might be a bit surprising that we have user.slice on-disk but not system.slice, but I think it's ok. `systemctl status system.slice` will still point you towards `man systemd.special`. The only detail is that the system slice disables `DefaultDependencies`. If you're worrying about how system shutdown works when you read `man systemd.slice`, I think it is not too hard to guess that system.slice might do this: > Only slice units involved with early boot > or late system shutdown should disable this option (Docs are great. I really appreciate the systemd ones).
* Add license headers and SPDX identifiers to meson.build filesZbigniew Jędrzejewski-Szmek2017-11-191-0/+17
| | | | | | | So far I avoided adding license headers to meson files, but they are pretty big and important and should carry license headers like everything else. I added my own copyright, even though other people modified those files too. But this is mostly symbolic, so I hope that's OK.
* meson: do not create systemd-user-sessions.service if PAM is disabledYu Watanabe2017-10-311-1/+1
| | | | Fixes #7227.
* units: replace remote-cryptsetup-pre.target with remote-fs-pre.targetZbigniew Jędrzejewski-Szmek2017-10-171-1/+0
| | | | | | | | | | | | | | | | | remote-cryptsetup-pre.target was designed as an active unit (that pulls in network-online.target), the opposite of remote-fs-pre.target (a passive unit, with individual provider services ordering itself before it and pulling it in, for example iscsi.service and nfs-client.target). To make remote-cryptsetup-pre.target really work, those services should be ordered before it too. But this would require updates to all those services, not just changes from systemd side. But the requirements for remote-fs-pre.target and remote-cryptset-pre.target are fairly similar (e.g. iscsi devices can certainly be used for both), so let's reuse remote-fs-pre.target also for remote cryptsetup units. This loses a bit of flexibility, but does away with the requirement for various provider services to know about remote-cryptsetup-pre.target.
* build-sys: s/ENABLE_RESOLVED/ENABLE_RESOLVE/Zbigniew Jędrzejewski-Szmek2017-10-041-1/+1
| | | | | | The configuration option was called -Dresolve, but the internal define was …RESOLVED. This options governs more than just resolved itself, so let's settle on the version without "d".
* build-sys: s/HAVE_UTMP/ENABLE_UTMP/Zbigniew Jędrzejewski-Szmek2017-10-041-2/+2
| | | | | "Have" should be about the external environment and dependencies. Anything which is a pure yes/no choice should be "enable".
* build-sys: use #if Y instead of #ifdef Y everywhereZbigniew Jędrzejewski-Szmek2017-10-041-7/+7
| | | | | | | | | | | | | | | The advantage is that is the name is mispellt, cpp will warn us. $ git grep -Ee "conf.set\('(HAVE|ENABLE)_" -l|xargs sed -r -i "s/conf.set\('(HAVE|ENABLE)_/conf.set10('\1_/" $ git grep -Ee '#ifn?def (HAVE|ENABLE)' -l|xargs sed -r -i 's/#ifdef (HAVE|ENABLE)/#if \1/; s/#ifndef (HAVE|ENABLE)/#if ! \1/;' $ git grep -Ee 'if.*defined\(HAVE' -l|xargs sed -i -r 's/defined\((HAVE_[A-Z0-9_]*)\)/\1/g' $ git grep -Ee 'if.*defined\(ENABLE' -l|xargs sed -i -r 's/defined\((ENABLE_[A-Z0-9_]*)\)/\1/g' + manual changes to meson.build squash! build-sys: use #if Y instead of #ifdef Y everywhere v2: - fix incorrect setting of HAVE_LIBIDN2
* units: add remote-cryptsetup.target and remote-cryptsetup-pre.targetZbigniew Jędrzejewski-Szmek2017-09-051-0/+3
| | | | | | The pair is similar to remote-fs.target and remote-fs-pre.target. Any cryptsetup devices which require network shall be ordered after remote-cryptsetup-pre.target and before remote-cryptsetup.target.
* units: introduce getty-pre.target (#6667)Michal Sekletar2017-08-311-0/+1
| | | | | | | | This new target is a passive unit, hence it is supposed to be pulled in to the transaction by the service that wants to block login on the console (e.g. text version of initial-setup). Now both getty and serial-getty are ordered after this target. https://lists.freedesktop.org/archives/systemd-devel/2015-July/033754.html