summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* bootctl: add --install-source=auto|image|hostLuca Boccassi2022-07-084-6/+53
| | | | | | | | | When using --root=/--image= the binaries to install/update will be picked from the directory/image. Add an option to let the caller choose. By default (auto) the image is tried first, and if nothing is found then the host. The other options allow to strictly try the image or host and ignore the other.
* bootctl: add --root and --imageLuca Boccassi2022-07-0811-88/+266
| | | | Operate on image/directory, and also take files to install from it
* Merge pull request #23396 from msekletar/fix-idle-action-lockYu Watanabe2022-07-074-4/+111
|\ | | | | logind: remember our idle state and use it to detect idle level transitions
| * tests: verify that Lock D-Bus signal is sent when IdleAction=lockMichal Sekletar2022-07-042-0/+91
| |
| * logind: remember our idle state and use it to detect idle level transitionsMichal Sekletar2022-06-302-4/+20
| | | | | | | | Fixes #16391
* | os-release: define SUPPORT_END=Zbigniew Jędrzejewski-Szmek2022-07-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #21764. I think is very simple, but flexible. The date may be set early, for distros that have a fixed schedule, but it doesn't have to. So for example Debian could push out an update that sets a few months before the release goes EOL. And various tools, in particular graphical desktops, can start nagging people to upgrade a few weeks before the date. As discussed in the bug, we don't need granularity higher than a day. And this means that we can use a simple human- and machine-readable format. I was considering other names, e.g. something with "EOL", but I think that "SUPPORT_END" is better because it doesn't imply that the machine will somehow stop working. This is supposed to be an advisory, nothing more.
* | Merge pull request #23918 from yuwata/dissectLuca Boccassi2022-07-061-1/+3
|\ \ | | | | | | Revert "dissect: ID from os-release should be non-empty, not just non-NULL"
| * | dissect: refuse empty release IDYu Watanabe2022-07-061-0/+2
| | |
| * | Revert "dissect: ID from os-release should be non-empty, not just non-NULL"Yu Watanabe2022-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a2cf73f0b602a93a32107cfc066a5e307263c577. This is not necessary after 78ab2b5064a0f87579ce5430f9cb83bba0db069a. Addresses https://github.com/systemd/systemd/pull/23454#discussion_r913611798.
* | | fundamental: adjust #if conditional for _fallthrough_ for clangThomas Haller2022-07-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | NetworkManager takes systemd sources. It gets compiler warnings related to _fallthrough_. They probably can also affect systemd itself. A) on RHEL-7, gcc 4.8.5-44.el7 we get: ../src/libnm-systemd-shared/src/fundamental/macro-fundamental.h:45:22: error: "__clang__" is not defined [-Werror=undef] #if __GNUC__ >= 7 || __clang__ ^ Presumably gcc older than 7 is supported, so fix this. B) on Ubuntu 18.04, clang 1:6.0-41~exp5~ubuntu1 we get: ../src/libnm-systemd-core/src/libsystemd-network/sd-dhcp6-client.c:746:17: error: declaration does not declare anything [-Werror,-Wmissing-declarations] _fallthrough_; ^ ../src/libnm-systemd-shared/src/fundamental/macro-fundamental.h:46:25: note: expanded from macro '_fallthrough_' # define _fallthrough_ __attribute__((__fallthrough__)) ^ Granted, README comments that clang >= 10 is required. However, parts of systemd build just fine with older clang. It seems unnecessary to break this and the fix helps NetworkManager. Fixes: c0f5d58c9ab7 ('meson: Document why -Wimplicit-fallthrough is not used with clang')
* | | Merge pull request #15205 from jlebon/pr/preset-all-firstbootZbigniew Jędrzejewski-Szmek2022-07-066-7/+14
|\ \ \ | | | | | | | | manager: optionally, do a full preset on first boot
| * | | manager: optionally, do a full preset on first bootJonathan Lebon2022-05-043-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A compile time option is added to select behaviour: by default UNIT_FILE_PRESET_ENABLE_ONLY is still used, but the intent is to change to UNIT_FILE_PRESET_FULL at some point in the future. Distros that want to opt-in can use the config option to change the behaviour. (The option is just a boolean: it would be possible to make it multi-valued, and allow full, enable-only, disable-only, none. But so far nobody has asked for this, and it's better not to complicate things needlessly.) With the configuration option flipped, instead of only doing enablements, perform a full preset on first boot. The reason is that although `/etc/machine-id` might be missing, there may be other files provisioned in `/etc` (in fact, this use case is mentioned in `log_execution_mode`). Some of those possible files include enablement symlinks even if presets dictate it should be disabled. Such a seemingly contradictory situation occurs in {RHEL,Fedora} CoreOS, where we ship `/etc` as if `preset-all` were called. However, we want to allow users to disable default-enabled services via Ignition, which does this by creating preset dropins before switchroot. (For why we do `preset-all` at compose time, see: https://github.com/coreos/fedora-coreos-config/pull/77). For example, the composed FCOS image has a `enable zincati.service` preset and an enablement for that in `/etc`, while at boot time when we switch root, there may be a `disable zincati.service` preset with higher precedence. In that case, we want systemd to disable the service. This is essentially a revert of 304b3079a203. It seems like systemd *used* to do this, but it was changed to try to make the container workflow a bit faster. Resolves: https://github.com/coreos/fedora-coreos-tracker/issues/392 Co-authored-by: Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
| * | | systemctl: stop saying "vendor preset"Zbigniew Jędrzejewski-Szmek2022-05-043-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have vendor presets, and local admin presets, and runtime presets (under /usr/lib, /usr/local/lib and /etc, /run, respectively). When we display preset state, it can be configured in any of those places, so we shouldn't say anything about the origin. (Another nice advantage is that it improves alignment: [root@f36 ~]# systemctl list-unit-files multipathd.service UNIT FILE STATE VENDOR PRESET multipathd.service enabled enabled ^ this looks we have a "PRESET" column that is empty.)
* | | | mkosi: Update to latest releaseDaan De Meyer2022-07-061-1/+1
| | | | | | | | | | | | | | | | This fixes the mkosi github action to unbreak the mkosi CI
* | | | man: "enabled commands are started at boot" is rubbishLennart Poettering2022-07-061-20/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | it's enabled units, and they might be started by various forms of activation, not just "at boot". Fix that.
* | | | update TODOLennart Poettering2022-07-061-0/+3
| |/ / |/| |
* | | Merge pull request #23916 from keszybz/assorted-patchesYu Watanabe2022-07-0618-6/+6
|\ \ \ | | | | | | | | Assorted patches
| * | | tree-wide: drop duplicated semicolonsZbigniew Jędrzejewski-Szmek2022-07-056-6/+6
| | | |
| * | | man: fix link to glob(3)Zbigniew Jędrzejewski-Szmek2022-07-051-3/+3
| | | |
| * | | fuzz: rename samples to avoid long test namesZbigniew Jędrzejewski-Szmek2022-07-0514-0/+0
| | | |
* | | | json: actually use numeric C locale we just allocatedLennart Poettering2022-07-051-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes formatting of JSON real values, and uses C locale for them. It's kinda interesting that this wasn't noticed before: the C locale object we allocated was not used, hence doing the dance had zero effect. This makes "test-varlink" pass again on systems with non-C locale. (My guess: noone noticed this because "long double" was used before by the JSON code and that had no locale supporting printer or so?)
* | | | journal: Make sd_journal_previous/next() return 0 at HEAD/TAILDaan De Meyer2022-07-052-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, both these functions don't return 0 if we're at HEAD/TAIL and move in the corresponding direction. Let's fix that. Replaces #23480
* | | | docs: normalize uppercasing of titles of network docLennart Poettering2022-07-052-23/+17
| | | |
* | | | Merge pull request #23855 from keszybz/drop-list-is-emptyLennart Poettering2022-07-0517-235/+227
|\ \ \ \ | | | | | | | | | | basic/list: drop LIST_IS_EMPTY
| * | | | test-list: rename field to indicate that it's a listZbigniew Jędrzejewski-Szmek2022-07-021-163/+163
| | | | | | | | | | | | | | | | | | | | | | | | | With this commit, lists are generally either names with plural (items), or in a way that indicates a multi-item container (queue, *_list, or similar).
| * | | | systemctl: rename field for clarityZbigniew Jędrzejewski-Szmek2022-07-021-7/+7
| | | | |
| * | | | udev: rename fieldZbigniew Jędrzejewski-Szmek2022-07-021-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we start, the contents of the variable match the name. But then in the loop, the variable doesn't point at the old head any more. So let's rename it to something with a plural.
| * | | | sd-event: rename field to indicate that it's a listZbigniew Jędrzejewski-Szmek2022-07-021-6/+6
| | | | |
| * | | | sd-event: rename field to indicate that it's a listZbigniew Jędrzejewski-Szmek2022-07-021-7/+7
| | | | |
| * | | | sd-event: align tableZbigniew Jędrzejewski-Szmek2022-07-021-11/+11
| | | | |
| * | | | resolved: rename field to indicate that it's a listZbigniew Jędrzejewski-Szmek2022-07-024-10/+10
| | | | |
| * | | | basic/list: drop LIST_IS_EMPTYZbigniew Jędrzejewski-Szmek2022-07-0214-29/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was a trivial wrapper that didn't provide any added value. With more complicated structures like strvs, hashmaps, sets, and arrays, it is possible to have an empty container. But in case of a list, the list is empty only when the head is missing. Also, we generally want the positive condition, so we replace many if (!LIST_IS_EMPTY(x)) with just if (x).
* | | | | firstboot: Don't skip passwd/shadow logic if only one of the files existsDaan De Meyer2022-07-051-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If one of the files exists but not the other one, we want to make sure we create the other file to make sure the passwd database is in a valid state.
* | | | | Merge pull request #23906 from poettering/isdigitisalphaLennart Poettering2022-07-0525-93/+72
|\ \ \ \ \ | | | | | | | | | | | | tree-wide: add global ascii_isalpha() + ascii_isdigit() and use it everywhere
| * | | | | tree-wide: add global ascii_isdigit() + ascii_isalpha()Lennart Poettering2022-07-0525-89/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now have a local implementation in string-util-fundamental.c, but it's useful at a lot of other places, hence let's give it a more expressive name and share it across the tree. Follow-up for: 8d9156660d6958c8d63b1d44692968f1b5d33920
| * | | | | sd-id128: don't allow chars > f in valid id128 valuesLennart Poettering2022-07-051-4/+4
| | | | | |
* | | | | | machine: switch to BusLocator-oriented helpersQuentin Deslandes2022-07-052-24/+7
| | | | | | | | | | | | | | | | | | | | | | | | Replace existing sd_bus_x calls with counterparts from bus-locator.h.
* | | | | | user: delegate cpu controller, assign weights to user slicesZbigniew Jędrzejewski-Szmek2022-07-055-1/+12
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far we didn't enable the cpu controller because of overhead of the accounting. If I'm reading things correctly, delegation was enabled for a while for the units with user and pam context set, i.e. for user@.service too. a931ad47a8623163a29d898224d8a8c1177ffdaf added the explicit Delegate=yes|no switch, but it was initially set to 'yes'. acc8059129b38d60c1b923670863137f8ec8f91a disabled delegation for user@.service with the justication that CPU accounting is expensive, but half a year later a88c5b8ac4df713d9831d0073a07fac82e884fb3 changed DefaultCPUAccounting=yes for kernels >=4.15 with the justification that CPU accounting is inexpensive there. In my (very noncomprehensive) testing, I don't see a measurable overhead if the cpu controller is enabled for user slices. I tried some repeated compilations, and there is was no statistical difference, but the noise level was fairly high. Maybe better benchmarking would reveal a difference. The goal of this change is very simple: currently all of the user session, including services like the display server and pipewire are under user@.service. This means that when e.g. a compilation job is started in the session's app.slice, the processes in session.slice compete for CPU and can be starved. In particular, audio starts to stutter, etc. With CPU controller enabled, I can start start 'ninja -C build -j40' in a tab and this doesn't have any noticable effect on audio. I don't think the particular values matter too much: the CPU controller is work-convserving, and presumably the session slice would never need more than e.g. one 1 full CPU, i.e. half or a quarter of available CPU resources on even the smallest of today's machines. app.slice and session.slice are assigned equal weights, background.slice is assigned a smaller fraction. CPUWeight=100 is the default, but I wrote it explicitly to make it easier for users to see how the split is done. So effectively this should result in session.slice getting as much power as it needs. If if turns out that this does have a noticable overhead, we could make it opt-in. But I think that the benefit to usability is important enough to enable it by default. W/o something like this the session is not really usable with background tasks.
* | | | | update TODOLennart Poettering2022-07-051-0/+33
| | | | |
* | | | | docs: move some stuff into "Networking" sectionLennart Poettering2022-07-052-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "Networking" section has a lonely single document listed right now, even though the "Concepts" section has two more network related docs. Move them over, let's end this loneliness.
* | | | | tree-wide: Remove the repeated ';' from code (#23901)Li kunyu2022-07-053-3/+3
| | | | |
* | | | | tree-wide: link to docs.kernel.org for kernel documentationnl67202022-07-0440-78/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://www.kernel.org/ links to https://docs.kernel.org/ for the documentation. See https://git.kernel.org/pub/scm/docs/kernel/website.git/commit/?id=ebc1c372850f249dd143c6d942e66c88ec610520 These URLs are shorter and nicer looking.
* | | | | Merge pull request #23104 from mrc0mmand/resolved-testsYu Watanabe2022-07-0412-7/+551
|\ \ \ \ \ | | | | | | | | | | | | Introduce systemd-resolved test suite
| * | | | | test: Introduce systemd-resolved test suiteFrantisek Sumsal2022-07-0411-0/+545
| | | | | | | | | | | | | | | | | | | | | | | | Resolves: #19599
| * | | | | test: resize the terminal automagically with INTERACTIVE_DEBUG=yesFrantisek Sumsal2022-07-041-7/+5
| | | | | |
| * | | | | test: install /usr/libexec/vi as wellFrantisek Sumsal2022-07-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | since `/bin/vi` (at least on Fedora) is a shell wrapper which runs either `/bin/vim` or `/usr/libexec/vi` based on availability.
* | | | | | meson: Assign tests a suite based on their directoryDaan De Meyer2022-07-041-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This can be used to run only a subset of tests, e.g. "meson test -C build --suite journal" to run only the journal unit tests.
* | | | | | Merge pull request #23886 from keszybz/https-links-kernelYu Watanabe2022-07-0319-48/+43
|\ \ \ \ \ \ | | | | | | | | | | | | | | tree-wide: use html links for kernel docs
| * | | | | | man/network: fix wording and syntaxZbigniew Jędrzejewski-Szmek2022-07-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follow-up for 0bcc6557fbba32ebcdf323e76688ced50e3c8d8e. Docbook doesn't know <variable>.
| * | | | | | tree-wide: use html links for kernel docsZbigniew Jędrzejewski-Szmek2022-07-0219-43/+38
| | |_|/ / / | |/| | | | | | | | | | | | | | | | Instead of using "*.txt" as reference name, use the actual destination title.