summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Rework how we cache mtime to figure out if units changedZbigniew Jędrzejewski-Szmek2020-08-318-36/+47
| | | | | | | | | | | | | | | | | Instead of assuming that more-recently modified directories have higher mtime, just look for any mtime changes, up or down. Since we don't want to remember individual mtimes, hash them to obtain a single value. This should help us behave properly in the case when the time jumps backwards during boot: various files might have mtimes that in the future, but we won't care. This fixes the following scenario: We have /etc/systemd/system with T1. T1 is initially far in the past. We have /run/systemd/generator with time T2. The time is adjusted backwards, so T2 will be always in the future for a while. Now the user writes new files to /etc/systemd/system, and T1 is updated to T1'. Nevertheless, T1 < T1' << T2. We would consider our cache to be up-to-date, falsely.
* core: always try to reload not-found unitZbigniew Jędrzejewski-Szmek2020-08-311-3/+0
| | | | | | | This check was added in d904afc730268d50502f764dfd55b8cf4906c46f. It would only apply in the case where the cache hasn't been loaded yet. I think we pretty much always have the cache loaded when we reach this point, but even if we didn't, it seems better to try to reload the unit. So let's drop this check.
* pid1: use the cache mtime not clock to "mark" load attemptsZbigniew Jędrzejewski-Szmek2020-08-313-5/+5
| | | | | | | | | | | | | | | | | | | | We really only care if the cache has been reloaded between the time when we last attempted to load this unit and now. So instead of recording the actual time we try to load the unit, just store the timestamp of the cache. This has the advantage that we'll notice if the cache mtime jumps forward or backward. Also rename fragment_loadtime to fragment_not_found_time. It only gets set when we failed to load the unit and the old name was suggesting it is always set. In https://bugzilla.redhat.com/show_bug.cgi?id=1871327 (and most likely https://bugzilla.redhat.com/show_bug.cgi?id=1867930 and most likely https://bugzilla.redhat.com/show_bug.cgi?id=1872068) we try to load a non-existent unit over and over from transaction_add_job_and_dependencies(). My understanding is that the clock was in the future during inital boot, so cache_mtime is always in the future (since we don't touch the fs after initial boot), so no matter how many times we try to load the unit and set fragment_loadtime / fragment_not_found_time, it is always higher than cache_mtime, so manager_unit_cache_should_retry_load() always returns true.
* core: rename manager_unit_file_maybe_loadable_from_cache()Zbigniew Jędrzejewski-Szmek2020-08-314-9/+16
| | | | | | The name is misleading, since we aren't really loading the unit from cache — if this function returns true, we'll try to load the unit from disk, updating the cache in the process.
* Merge pull request #16879 from keszybz/test-last-cap-and-dbus-docsZbigniew Jędrzejewski-Szmek2020-08-288-41/+184
|\ | | | | Add "developer mode" and test last cap and dbus docs
| * man: update dbus doc stubsZbigniew Jędrzejewski-Szmek2020-08-271-0/+96
| | | | | | | | | | For 4e39995371738b04d98d27b0d34ea8fe09ec9fab and bb0c0d6f29236645c8beb7ba662b2c4e7b241407.
| * update-dbus-docs: add hintZbigniew Jędrzejewski-Szmek2020-08-271-1/+2
| |
| * update-dbus-docs: omit verbose output when in --test modeZbigniew Jędrzejewski-Szmek2020-08-271-5/+5
| | | | | | | | It makes the ninja output listing very long for no good purpose.
| * test: verify that dbus docs are freshZbigniew Jędrzejewski-Szmek2020-08-272-2/+9
| | | | | | | | | | | | | | | | | | This makes use of the developer mode switch: the test is only done if the user opted-in into developer mode. Before the man/update-dbus-docs was using the argument form where we don't need to run find_command(), but that doesn't work with test(),, so find_command() is used and we get one more line in the config log.
| * update-dbus-docs: add test modeZbigniew Jędrzejewski-Szmek2020-08-271-8/+19
| |
| * update-dbus-docs: use argparseZbigniew Jędrzejewski-Szmek2020-08-271-11/+12
| |
| * update-dbus-docs: print statistics at the endZbigniew Jędrzejewski-Szmek2020-08-271-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now: org.freedesktop.LogControl1.xml: 3/3 org.freedesktop.home1.xml: 44/44 org.freedesktop.hostname1.xml: 21/21 org.freedesktop.import1.xml: 17/19 org.freedesktop.locale1.xml: 10/10 org.freedesktop.login1.xml: 172/172 org.freedesktop.machine1.xml: 49/65 org.freedesktop.resolve1.xml: 25/61 org.freedesktop.systemd1.xml: 214/1468 org.freedesktop.timedate1.xml: 12/12 total: 567/1875 :(
| * basic/missing_capability: clean up our defines and check that our fallback ↵Zbigniew Jędrzejewski-Szmek2020-08-272-15/+20
| | | | | | | | | | | | | | | | | | is up-to-date There is little point in #defining and #undefining CAP_LAST_CAP multiple times. The check is only done in developer mode. After all, it's not an error to compile on a newer kernel, and we shouldn't even warn in that case.
| * meson: add "develop mode" config switchZbigniew Jędrzejewski-Szmek2020-08-272-0/+6
| |
| * test-path: remove unnecessary checkZbigniew Jędrzejewski-Szmek2020-08-271-1/+1
| | | | | | | | test points to an array, so it canont be NULL at this point.
* | Merge pull request #16872 from keszybz/test-50Zbigniew Jędrzejewski-Szmek2020-08-284-18/+19
|\ \ | | | | | | Improve handling of os-release in tests
| * | test/test-functions: do not execute strip_binaries twiceZbigniew Jędrzejewski-Szmek2020-08-271-4/+2
| | | | | | | | | | | | | | | It is called from setup_basic_environment(), which also calls install_symtemd() a bit earlier, so in effect it would be called twice.
| * | tests/TEST-50: support the case when /etc/os-release is presentZbigniew Jędrzejewski-Szmek2020-08-274-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We have four legal cases: 1. /usr/lib/os-release exists and /etc/os-release is a symlink to it 2. both exist but /etc/os-release is not a symlink to /usr/lib/os-release 3. only /usr/lib/os-release exists 4. only /etc/os-release exists The generic setup code in test-functions and create-busybox-image didn't handle case 3. The test-specific code in TEST-50 didn't handle 2 (because the general setup code would only install /etc/os-release in the image and grep -f /usr/lib/os-release would not work) and 4 (same reason) and would fail in case 3 in generic setup.
| * | TEST-50: sfdisk is already installed by setup_basic_environmentZbigniew Jędrzejewski-Szmek2020-08-271-1/+0
| | |
* | | hwdb: fix size lenovo x240 touchpad (#16871)Jérémy Nouhaud2020-08-271-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed in https://gitlab.freedesktop.org/libinput/libinput/-/issues/521, it adds a narrower match that only applies to X240. Other laptops that match `pvrThinkPad??40` are not affected: $ systemd-hwdb query 'evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX240:*' EVDEV_ABS_00=1232:5711:51 EVDEV_ABS_01=1159:4700:53 EVDEV_ABS_35=1232:5711:51 EVDEV_ABS_36=1159:4700:53 $ systemd-hwdb query 'evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX140:*' EVDEV_ABS_00=::41 EVDEV_ABS_01=::37 EVDEV_ABS_35=::41 EVDEV_ABS_36=::37
* | | network: dhcp6: logs only new addressYu Watanabe2020-08-271-1/+2
| | | | | | | | | | | | Closes #16731.
* | | Merge pull request #16863 from weblate/weblate-systemd-masterZbigniew Jędrzejewski-Szmek2020-08-272-19/+24
|\ \ \ | | | | | | | | Translations update from Weblate
| * | | Translated using Weblate (Swedish)Göran Uddeborg2020-08-271-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently translated at 100.0% (121 of 121 strings) Co-authored-by: Göran Uddeborg <goeran@uddeborg.se> Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/sv/ Translation: systemd/master
| * | | Translated using Weblate (French)Julien Humbert2020-08-271-11/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently translated at 100.0% (184 of 184 strings) Co-authored-by: Julien Humbert <julroy67@gmail.com> Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fr/ Translation: systemd/master
* | | | Don't run test-repart when loop devices are not availableDaan De Meyer2020-08-271-0/+2
| |_|/ |/| |
* | | Merge pull request #16864 from yuwata/coverity-fixesLennart Poettering2020-08-272-7/+11
|\ \ \ | | | | | | | | Two coverity fixes
| * | | journal: fix divide-by-zero warningYu Watanabe2020-08-271-5/+6
| | | | | | | | | | | | | | | | Fixes CID#1430209.
| * | | core: clear bind mounts on errorYu Watanabe2020-08-271-2/+5
| | |/ | |/| | | | | | | | | | | | | Follow-up for bbb4e7f39f2c68c719c26c2c65f8b7b91b009e92. Fixes CID#1431998.
* | | Merge pull request #16866 from yuwata/networkctl-tiny-cleanupsLennart Poettering2020-08-272-1/+7
|\ \ \ | | | | | | | | networkctl: tiny cleanups
| * | | man: clarify that several networkctl commands takes device namesYu Watanabe2020-08-271-0/+6
| | | |
| * | | networkctl: label command does not take any argumentYu Watanabe2020-08-271-1/+1
| | | |
* | | | missing: Add new Linux capabilityMichal Koutný2020-08-271-0/+8
| | | | | | | | | | | | | | | | | | | | Yet another new capability coming in Linux kernel v5.9. Make sure we can recongize them even when built with older kernel headers.
* | | | test: remove executable bit from testsuite-52.serviceMichael Biebl2020-08-271-0/+0
| |/ / |/| |
* | | Merge pull request #16860 from poettering/tty-ask-pw-agent-list-fixZbigniew Jędrzejewski-Szmek2020-08-272-11/+11
|\ \ \ | | | | | | | | tty-ask-password-agent: three fixes
| * | | tty-ask-pw-agent: properly propagate errorLennart Poettering2020-08-261-3/+2
| | | |
| * | | tty-ask-pw-agent: the message string might not be setLennart Poettering2020-08-262-6/+7
| | | |
| * | | tty-ask-pw-agent: make sure "--list" works correctlyLennart Poettering2020-08-261-2/+2
| | | | | | | | | | | | | | | | Fixes: #16836
* | | | Add sensor configuration for Acer SW5-017-17BUNjibhu2020-08-271-0/+3
| | | |
* | | | Merge pull request #16847 from olivierlemoal/masterZbigniew Jędrzejewski-Szmek2020-08-271-13/+23
|\ \ \ \ | | | | | | | | | | shell-completion/zsh: add missing verbs for networkctl
| * | | | add "list" verb to autocompleted commandsOlivier Le Moal2020-08-271-1/+1
| | | | |
| * | | | shell-completion/zsh: add missing verbs for networkctlOlivier Le Moal2020-08-261-13/+23
| | | | |
* | | | | udev: use path_startswith() instead of startswith() in two more casesLennart Poettering2020-08-272-2/+3
| |_|/ / |/| | |
* | | | Replace gendered pronouns with gender neutral ones. (#16844)PhoenixDiscord2020-08-278-9/+9
| |_|/ |/| |
* | | path: Improve $PATH search directory caseChris Down2020-08-271-7/+18
| |/ |/| | | | | | | | | | | | | | | | | | | | | Previously: 1. last_error wouldn't be updated with errors from is_dir; 2. We'd always issue a stat(), even for binaries without execute; 3. We used stat() instead of access(), which is cheaper. This change avoids all of those, by only checking inside X_OK-positive case whether access() works on the path with an extra slash appended. Thanks to Lennart for the suggestion.
* | Merge pull request #16757 from poettering/nss-resolve-varlinkZbigniew Jędrzejewski-Szmek2020-08-2614-383/+1028
|\ \ | |/ |/| resolved: use varlink for communication between nss-resolve and resolved
| * nss-resolve: port over to new varlink interfaceLennart Poettering2020-08-261-252/+276
| |
| * resolved: add minimal varlink api for resolving hostnames/addressesLennart Poettering2020-08-267-39/+598
| | | | | | | | | | | | This allows us to later port nss-resolve to use Varlink rather than D-Bus for resolution. This has the benefit that nss-resolve based resoluton works even without D-Bus being up. And it's faster too.
| * resolved: minor clean-ups for resolved-bus.cLennart Poettering2020-08-261-11/+29
| |
| * resolved: move query bus tracking to resolved-bus.cLennart Poettering2020-08-263-37/+39
| | | | | | | | | | | | | | | | It's strictly bus-specific, hence let's move this to resolved-bus.c like the rest of the bus specific logic. This is also in preparation for adding an alternative varlink transport, which needs similar functionality, but varlink instead of bus-specific.
| * resolved: rename request → bus_requestLennart Poettering2020-08-263-38/+38
| | | | | | | | | | | | Let's prepare for adding a new varlink interface, and thus rename the "request" field to "bus_request", so that we can later add a varlink_request field too.